runtime

Execution of Groovy code in java at runtime.

Is it possible to execute groovy code dynamically loaded in java application. For example there is a database table which contains small pieces of groovy code, like: def test(${val_to_insert_from_java}){ if (${val_to_insert_from_java} > 10){ return true; } return false; } Where ${val_to_insert_from_java} is a place...

Get GAC entries by Public Key

Is there a way to scan all the assemblies in the GAC and return a list of names of assemblies with a specified Public Key Token during runtime? I know the Public Key of all the GAC assemblies that I am interested in loading, but don't necessarily know the names or version numbers. ...

Compile-time, load-time, run-time: phases of... what?

Hi. Sorry for the confusing title :P I'm sure I should know this but I always have trouble with terminology. I can't figure out the right word to put in the blank space in the following sentence: Different weaving strategies are usually classified according to the phase of _______ at which they are performed, resulting in the ...

How to predict at first look whether it will give a runtime error or will not compile

I am looking at quizzes and tests at various sites (like blackbeltfactory, etc..) about java. I come across with questions which have choices like "doesn't compile" or "throws exception at runtime". Are there any way to guess which will occur, at first look? Or is it a matter of getting familiar with java? I think this is an important p...

Change VS created dataset's source database at runtime

Hi, This question and answers discuss the theory as well as methods to achieve the desired result so I don't wish to re-hash those suggestions. I'm trying to make sure there isn't an easy solution in my instance before I rewrite all my tableadapters. What I do have is a relatively mature and complex project utilising many datasets all ...

Java: Add Class to Jar archive at runtime

Hi I want to add some compiled classes (.class files) to directories(packages) in current Jar file at runtime How can I do that? Thanks ...

For Linq Select Statement, how to construct a SubClass in a general way at run time?

The fake code is: public class ParentClass { decimal quantity, decimal price } IQueryable<ParentClass> parents; //SonClass is created at run time //SonClass has some extra property, such as amount=quantity*price, which is defined by a string at run time IQueryable<SonClass> sons=parents.Select(p=>new S...

How to load a type from an earlier .net framework?

If i am running a .net 4 application how do i load a type from an earlier .net runtime? For example i want to load the type "System.Object" from .net 3.5 ...

Validation with DataAnnotations in Silverlight getting a ResolutionFailedException.

I am trying to make a small proof of concept example that employs validation for my model, using the System.ComponentModel.DataAnnotations namespace. What I am trying to do here, is make sure that user input is between a specified range, using the supplied [Range] attribute. I get a run-time exception that says Resolution of the depend...

Are there any programming defects in this Java code?

import java.lang.*; import java.io.*; class test { public static void main(String[] a) throws Exception { int i; String[] str = new String[]{"javac","example.java"}; String[] str1 = new String[]{"java","example"}; Runtime r = Runtime.getRuntime(); Process p = null; Process p1 ...

What does #if !USING_NET11 using System.Runtime.InteropServices.ComTypes; #endif mean ?

Hi, what does the following code mean and what does it do ? Is it really required ? #if !USING_NET11 using System.Runtime.InteropServices.ComTypes; #endif In my project file I have implemented the web cam capture using the dshownet wrapper. The above code was there in the Form1.cs file. Many Thanks ...

What is the best way to collapse an optional Grid Column at runtime?

Currently I have a Grid with 6 optional fields, one on each row, in a data template bound to my view model. 6 Rows - 2 Columns Column 0 has the label Column 1 has the content associated with the label. In this case I want to collapse the column when the Column 0 label is null. My plan is to simply create a converter, if content is ...

How to modify a workflow from rehosted workflow designer on runtime?

I have the rehosted workflow designer, but I want to modify a workflow of an application at runtime. How I can accomplish that? Fonts: Rehosted Workflow Designer Thanks in advance! ...

Unity 2 and Silverlight 4

I am using Unity 2.0 with Silverlight 4 and RIA Services. Is xml configuration not supported in the web project of a Silverlight Business Application? The only way I can get the resolve method of the container to work is if I register my types at runtime vs design time in the xml config file. ...

callgrind equivalent for java?

Is there a free callgrind equivalent for java? basically, i just need anything that gives me cycle counts or time spent for each method and function of my java code. i suppose i should mention i'm using mac, which means the eclipse thing below doesn't work for me, i believe. ...

How to get runtime-argument info from extression tree parameter array

Okay first to explain the rules: I need a function that constructs a delegate matching any delegate type that encapsulates a body of which invokes a delegate of type (Object) (Object[] args) with 'args' containing all of the arguments passed to the original delegate during invocation. My work so far: delegate void TestDelegate(int...

List of silverlight limitations / restrictions

I have seen and heard of various Silverlight restrictions, e.g. file I/O restrictions, some reflection limitations, restrictions on which languages can be used, printing, resolution, etc. Could you please compile a list of all major silverlight limitations, as compared to a full-blown .NET application? This is for the latest version (4....

.NET 3.5 runtime and .NET 4 runtime compatibility

Is it possible to run an application built on .NET 3.5 with a plug-in built with .NET 4? Cheers, Christian ...

Create Java Pojo dynamically

How can I create Java Pojo at runtime? ASM or BCEL is required for this? I am reading a XML file and I want to generate Pojo according to this xml. ...

How can I get the jruby version at runtime?

I need to get the jruby version for logging & debugging purposes. I tried looking around JRuby.runtime for a 'version' method, but I didn't find anything useful. I also thought about using %x{jruby -v}. It works in most cases, except that there is always the possibility that more than one jruby version are installed, and I want to get ...