wrapper

creating a wrapper for strncpy to insert terminating null

Hello, I have decided to make a wrapper for strncpy as my source code requires me to do a lot of string copies. And I want to ensure that the string is terminated if the source is equal or greater than the destination. As this code will be used in production, so I just want to see if there are any potential dangers using this wrapper. ...

AS3 Wrapper Accessing AS1 Variables

Okay, so I have a Flash CS3 (+ AS3) program which is loading another flash program (called "pacman_main.swf" in this example). I've determined this is a rather old SWF, as it is made in Flash 5 and AS1 (yippee!). I want the parent SWF (a.k.a. the wrapper) to be able to access the variables, specifically the score, of the child SWFG (a.k...

Java Wrapper to Perl/Python code

I have to deploy some Web Services on a server that only supports the Java ones, but some of them will be done using perl or python. I want to know if is possible to develop a Java wrapper to call a specific code written in perl or python. So, I want to have all the Web Services in Java, but some of them will call some code using other l...

Wrapper type in .NET: struct or class?

Consider the following scenario: int Caller1<T>(T t) where T : IInterface {...} T Caller2<T>() where T : IInterface {...} class Wrappee // doesn't implement IInterface, but could ??? Wrapper : IInterface { private readonly Wrappee _wrappee; // methods call _wrappee's methods } Now, the general advice for choosing between struct...

Fastest service wrapper for Java apps

Hi. I'm looking for most performing Java service wrapper, which could make Java application running as a service on Linux. Can anyone recommend such utility. Thanks. ...

Ways to indicate a BOOL wrapper?

In Objective-C, are there any ways to indicate that an NSNumber* should actually be a BOOL? Right now my code looks like: NSNumber *audio; // BOOL wrapper Without the comment, it is not immediately obvious that *audio is a boolean value. My first thought was to try typedef NSNumber* BOOL; but this gave a compiler error apparently ...

C# class wrapper for a distributable dll

Hello, I have a C# library that I'd like to make distributable with a wrapper dll that provides a bit more functionality than the class itself. I'd like to be able to create an object from the class library and use it with the wrapper dll in another project like so: class Program { static void Main(string[] args) { var ...

CSS Dynamic Heights

I have three div tags, a wrapper and two side by side within the wrapper: <div id="wrapper"> <div id="left"></div> <div id="right"></div> </div> I want to create the condition where the <div id="left"> tag is variable height, stretching the wrapper. As a result, the <div id="right"> will expand to whatever height the wrapper ha...

Java: Is there a class which wraps a reference and provides a getter and setter?

Hello! Sorry for the stupid question. I'm very sure, that the Java API provides a class which wraps a reference, and provides a getter and a setter to it. class SomeWrapperClass<T> { private T obj; public T get(){ return obj; } public void set(T obj){ this.obj=obj; } } Am I right? Is there something like this in the Ja...

Java Service Wrapper 3.2.3 on Mac OS X 64-bit

What's the best way to run an app using Java Service Wrapper 3.2.3 on Mac OS X 64-bit? sh.script.in works, but there is no macosx-universal-64 version of the wrapper native binary (on JSW's 3.2.3 downloads page anyway http://wrapper.tanukisoftware.org/downloads/3.2.3/). The result is the following error in the logs: INFO | jvm 1 ...

How to modify an immutable object?

Sorry I couldn't think of a good title for this question... At application start I load objects from a database via a DB access library, lets call their class CDbObject. class CDbObject { //... virtual CState getState() const { return m_state; } protected: CState m_state; } At runtime, I receive messages which correspond t...

How to create a /usr/bin/mysql wrapper program via IO redirection?

Presently, I'm thoroughly dissatisfied by the command-line program /usr/bin/mysql! It does not, e.g., let me leverage: (a) various Unix tools (like, grep, sed...), and (b) Unix concepts such as io-redirection, piping. (Btw, IIRC, a command-line shell for Sybase used to allow piping and sufficiently powerful, Unix-style command-line ...

Wrapping a C Library with Objective-C - Function Pointers

Hey guys, I'm writing a wrapper around a C library in Objective-C. The library allows me to register callback functions when certain events occur. The register_callback_handler() function takes a function pointer as one of the parameters. My question to you gurus of programming is this: How can I represent an Objective-C method call /...

C# Ghostscript Wrapper

Has anyone encountered a nice wrapper for GhostScript in C#. My specific use is to take postscript and turn it into a pdf ...

Wrapping Mutually Dependent Structs in Pyrex

Hello, I am attempting to wrap some C code in Python using Pyrex. I've run into an issue with defining two structs. In this case, the structures have been defined in terms of one another, and Pyrex cannot seem to handle the conflict. The structures look something like so: typedef struct a { b * b_pointer; } a; typedef struct b ...

authorize.net C# wrappers/library

Are there any good libraries or wrappers for Authorize.net? The code samples available from their site seem a little ... raw. I'm looking for an easy to use, object oriented API that I can simply set some properties, and it takes care of all the plumbing code under the hood. I've found a few random blog posts of people offering their ...

Zend Form and nested fieldsets/containers?

I have a form. I have a single element that needs to be wrapped in a div or fieldset (for formatting). Then I have two groups of elements, including the above, that I want to wrap in a fieldset or div. I've managed to create two groups, but Zend Form seems to balk at letting me create a group containing a group. Should I be able to do th...

Differences between Foundation frameworks on Mac OS X and iPhone

Curious: Why is it that Foundation on OS X contains a wrapper for CFHost (NSHost) but not CFSocket, and Foundation on iPhone OS doesn't even have NSHost? And as an aside, are there any libraries or has any written any wrappers for CFHost and CFSocket on the iPhone? ...

PHP equivalent for a python decorator?

I want to be able to wrap a PHP function by another function, but leaving its original name/parameter list intact. For instance: function A() { print "inside A()\n"; } function Wrap_A() { print "Calling A()\n"; A(); print "Finished calling A()\n"; } // <--- Do some magic here (effectively "A = Wrap_A") A(); Output:...

Example code for a python server wrapper

I have a command line server for which I want to create a wrapper in python. The idea is that the wrapper receives commands like: my_wrapper start my_wrapper stop my_wrapper restart my_wrapper status And handles the server in background, unlinked to the terminal that launched it from the wrapper. I was about to start thinking on how ...