runtime

How can I compile and deploy a java class at runtime?

Hi all, I am in the process of writing a rule engine that performs simple assignments as determined by conditional constructs. It is a prerequisite of the project that the rules be in XML format. I have modeled my XML schema to resemble simple code blocks. I wish to parse the XML and to then transform it into Java code. I then wish to c...

How to set styles from database runtime?

Hi all! I'm having hard time finding a nice and clear solution on how to create a web page that loads it's style attributes from a database f.ex. button back- and forecolor, font size etc.to a Session object and from there would set them on each page to needed controls. I have a loader in the Global.asax -> Session_Start which loads t...

How to run other main class during runtome and get it's console output?

I have a list of jars that contains jar with needed main-class. I try to run it main class: public static void runCommandlineMain(String classPathFile, String args[]) throws Exception{ URL[] urls = getJarUrls(classPathFile); URLClassLoader classLoader = new URLClassLoader(urls); Class<?> clazz = classLoader.loadClass("liqui...

Is it possible to get all the subclasses of a class?

Possible Duplicate: How do you find all subclasses of a given class in Java? Hi, I would like to get a list of classes that implement an interface in Java at runtime so I can do a lookup service without having to hard code it. Is there a simple way of doing this? I fear not. Cheers, Cuvavu ...

Invoking an Objective-C method by name

How can I invoke a method at runtime on an Objective-C class when all I have is it's signature in string form: NSString* typeName = @"Widgets"; NSString* methodName = [NSString stringWithFormat:@"add%@Object:", typeName]; Note that the method name can change at runtime but the number of arguments stays fixed - one in this instance. ...

Programmatically docking a User Control at Run Time

I need to dock a WinForms user control at run time but I'm encountering an issue. In my main form, I have a menu strip at the top of it. I want to programmatically add a UserControl docked to the left of the main window and below the menu strip. When I add my User control at runtime and then set its Dock property to DockStyle.Left, it...

Mounting and untar'ing a file in Java

Hello all, I'm currently working on a web application that involves mounting a drive and extracting a tar.gz file, all in Java. Since the application runs in a linux environment, I figured I'd try using unix commands like "mount" and "tar". Runtime runtime = Runtime.getRuntime(); Process proc; String mountCommand = "mount -t cifs -o u...

How do I add components at run time to a Swing UI created with Netbeans visual editor ?

I am currently writing an application where the user has, at some point, to click a button which have been generated at run time. I know how to do it when writing all my swing code from scratch, but I'd like to take advantage of Netbeans' visual editor. The generated UI code goes into an initComponents() method I can't modify since it i...

Reconstructing generic types at runtime with Guice via Types and TypeLiterals

I have a few types that are like this // a value that is aware of its key type (K) Bar<K> // something that deals with such values and keys Foo<V extends Bar<K>, K> how would one recreate Foo such that you could consume it in guice? the bit I'm stuck on is how to cross reference the K from Bar to the 2nd parameterised type of Foo. s...

Is it possible to use Objective-C runtime features to determine where a method was called from?

Objective-C uses a sophisticated message-passing system when one object calls a method on another object. I want to know if it is possible, within the called method, to determine what the calling object was? For example: @implementation callingClass - (void)performTest { calledObject = [[[calledClass alloc] init] autorelease]; ...

Differences in developer experience between Mac and Windows versions of the Silverlight 3 runtime?

After last Friday's announcement, I'm just getting around to reading about the Silverlight 3 release. One of the first pages I visited was the Overview page, where it states, near the top of the page: Currently there are two runtimes available for users to experience Silverlight content. Windows Runtime - Mac Runtime B...

Which popular libraries for a standalone JavaScript interpreter (jslibs) ?

I am working on a standalone JavaScript development runtime environment for using JavaScript as a general-purpose scripting language. Currently I support the following libraries: zlib, SQLite, FastCGI, NSPR (Netscape Portable Runtime), ODE (Open Dynamics Engine), libpng, libjpeg, librsvg, freetype, librsvg, SDL, libiconv, OpenGL, OpenAL...

MS-Access 2007 Runtime SendObject Crash

I have programmed an Access Database program using Access 2007. I have a button that points to the event: DoCmd.SendObject acSendReport to have it email a PDF report (acFormatPDF). Everything works fine in the normal Access 2007 program, but when a user opens the program with Access 2007 Runtime, when clicking on this button it goes thro...

How to implement run-time licensing?

I need to implement run-time licensing in an embedded protocol stack. I already have an idea about how to achieve this but I am interested in hearing any alternative approaches, or any pitfalls to watch out for. You can assume that each device running the stack will have a unique hard-coded identifier (MAC address equivalent) and acces...

Winforms TableLayoutPanel adding rows programatically

I've been fighting with this for a while, and have found that a number of other people struggle with the TableLayoutPanel (.net 2.0 Winforms) as well. Problem I am attempting to take a 'blank' tablelayoutpanel, which has 10 columns defined, then at runtime programatically add rows of controls (i.e. one control per cell). One might hav...

How can I disable PHP magic quotes at runtime?

I'm writing a set of PHP scripts that'll be run in some different setups, some of them shared hosting with magic quotes on (the horror). Without the ability to control PHP or Apache configuration, can I do anything in my scripts to disable PHP quotes at runtime? It'd be better if the code didn't assume magic quotes are on, so that I ca...

iPhone Simulator: build errors when using synthesized instance variables

There are two runtimes for Cocoa/Objective-C: the legacy runtime and the "modern" runtime (that's what Apple calls it). According to Apple's documentation, "iPhone applications and 64-bit programs on Mac OS X v10.5 and later use the modern version of the runtime". So far so good. Now, the "modern" runtime supports a feature called "sy...

Assign a type to an object at runtime in vb.net or c#

I have an object, o, and a type, T. I'd like to use reflection to change object o to type T at runtime without instantiating it. The equivalent at compile time would be: Dim p as Point = Nothing I know how to use Activator.CreateInstance to create an instance at run time that is equivalent to: Dim p as New Point() But i don't want...

Limit execution time of an function or command PHP

Hi is there a possibility to set time limit only to a command or only to a function eg: function doSomething() { //..code here.. function1(); //.. some code here.. } I want to set time limit only to function1. There exits set_time_limit but I think this sets the time limit to whole script. Anybody any Idea? ...

c# execute code inside custom attribute

Possible Duplicate: Why does my .NET Attribute not perform an action? Hi, This may soundlike a very dumb question and I don't know what is possible here as all the "custom attribute" tutorials on the net are pretty much the same and they don't address what I want to do. I've seen some code out there where code is written inside...