runtime

Java generic methods cast to parameter type at runtime, is it possible?

I have a method that looks like this public static <T extends MyClass, X extends AnotherClass> List<T> (Class<T> aParameter, X anotherParameter) Now if AnotherClass is an abstract class that does NOT Have getId defined, but every single class that extends this interface does. (Don't ask me why it is designed this why, I did not desi...

How do different EXEs run in the right runtime?

I've always been curious as to how one extension, EXE, can be as versatile as it is in that if you assemble an assembly program, you get an EXE in machine code for your processor but if you compile a C# or other .Net program, you also get an EXE except that it is run in the proper runtime environment. I'm not sure if this is different fr...

Why do I not see the "Application Error" dialog box?

I was interested in learning more about mixing runtimes between exes and dlls. On a WinXP machine, I created a dll build against the release runtime (/MD) and an exe that calls a function in the dll that is built debug (/MDd). The function in the dll allocates memory to the heap and the exe deletes it. I expected this to crash, howeve...

Android - change textView at run time

Hi, I´m working with a lineal layout and I´m trying to change the text of a TextView but it doesn´t refresh. When I debug I´ve checked that the text have changed correctly. Thanks public class Position extends Activity { Button botonempezar; Button botonsalir; TextView text; @Override public void onCreate(Bundle savedInstanceS...

maximum number of connections to network accessed Access database

If I have a Microsoft Access 2007 database on a network location, is there a limit to the number of client computers that can use the database? The client will not have Access installed and instead will be using the Access Runtime 2007. Will the maximum number of connections be changed if I split the front end from the back end as oppos...

How to use Dictionary to provide data (which are defined in runtime) to DataGrid (xaml) in SL4

Hi, I am looking for information on how to provide data to DataGrid using Dictionary. My use case is: I have WebService that provides me a table with the content (and column names) I get know in runtime. My current implementation of a data tuple is: public class GridTuple : Dictionary<string, string> { public GridTuple(IDic...

How to read command line ouput from Java (via Runtime.getRuntime().exec(...))

I'm trying to present some information in a Swing application about the existance of symlinks. The GUI has a JTextArea resultTextArea and a JTextField statusField. This is the code inside the Dialog class: public void checkForSymLinks(File... dirs) { for (File dir : dirs) { try { Process p = Runtime.getRuntime()....

Set .Net 4 'useLegacyV2RuntimeActivationPolicy' during runtime?

Is it possible to set the app.config useLegacyV2RuntimeActivationPolicy parameter during runtime (basically before one of the 'affected' assemblies is being loaded?). ...

Silverlight adjust DataGrid height at run time

I have a Grid of 5 rows. At row 2 and 4 I have a DataGrid. The other rows have a fixed Height. The contents of the tables in the DataGrids is of course dynamically determined, and therefore their height too. As in my particular app there is a relation between the height of the two tables, I want to adjust the MaxHeight of both at run-tim...

JNI or Runtime.exec() ??

I need to call a RPC client which is implemented in C from a Java class. The interaction is one way only(i.e) Java has to invoke specific functions in C, while C need not return anything to the calling Java code. Can someone explain me the pros & cons in using either of the types (JNI/Runtime.exec)?? and which is the best option for m...

C: Run-time vs Pre-loaded

I'm not sure if I got my terms straight here, but I was wondering: Is creating objects in run-time faster than adding objects to a form before running it? In case my terms are messed up, in the load function, you add this: lOptions.AutoSize = true; lOptions.Location = new System.Drawing.Point(7, 75); lOptions.Name = "lOptions"; lOptio...

Is there a way to access debug symbols at run time?

Here's some example code to give an idea of what I want. int regular_function(void) { int x,y,z; /** do some stuff **/ my_api_call(); return x; } ... void my_api_call(void) { char* caller = get_caller_file(); int line = get_caller_line(); printf("I was called from %s:%d\n", caller, line); } Is there a w...

Problem with Runtime.freeMemory() - Java

Hey I'm testing out Runtime.freeMemory() with this code: Runtime runtime = Runtime.getRuntime(); long freeMemory = runtime.freeMemory(); // This is some arbitary factor that should work <= 1 double factor = 0.8; int size = (int) (factor * freeMemory); byte[] testArray = new byte[size]; I'm creating a byte array of size close t...

xcopy installation of Visual C++ 2008 runtime

Hello! Is it possible to make my C++ application run on a machine without Microsoft Visual C++ 2008 Redistributable Package by simply including some dlls in the program folder? I want to make my app as portable as possible and want to avoid forced installation of the runtime, so is it possible? I don't care about possible future runtim...

Add custom toolbar button to application at runtime

Hi, I use an application compiled in either Visuall C++ or Visual Basic (not sure which) and do not have access to source code. I would like to add a button to the existing toolbar at runtime. Can I code a program that uses something like sendmessage to add a button and set an onclick event? I would like for the button to rename a file o...

How can I run dynamic code in Perl?

I have a question relating to Perl dynamic code. Is there a construct in Perl where I could use to execute code. For instance, $command = " some command"; $perl -> execute($command); $command changes in run time . Sorry for my terminology. I do not know how to explain it otherwise. I am trying to accomplish this: I have a function w...

runtime casting in C#?

I'm reading data from a custom data format that conceptually stores data in a table. Each column can have a distinct type. The types are specific to the file format and map to C# types. I have a Column type that encapsulates the idea of a column, with generic parameter T indicating the C# type that is in the column. The Column.FormatTyp...

php __autoload() and dynamic / runtime class definition - is there a way without eval?

Hi, I read this post after doing a search for related posts. I have a slightly different, but related problem. Is there a way WITHOUT EVAL() (because this is a bad idea - open for abuse if someone allows a user to supply the value that is used in eval, etc) such that you can define the structure of the class, for example: if(!class_e...

32-bit VC++ redistributable on 64 bit OS?

Using Visual Studio, I have built an C++ application running in 32bit. It will be deployed both to 32-bit and 64-bit Windows servers. It won't be run in 64-bit mode (but rather under WoW). Should I include both the 32-bit and 64-bit Visual C++ redistributable, and install 32bit on 32bit Windows and 64bit on 64 bit Windows, or is it enou...

Getting the wrong C runtime version in my manifest files (Visual Studio 2008)

Hi, I am having a problem with building an application in Visual Studio 2008. I have declared the following in my project properties: _BIND_TO_CURRENT_MFC_VERSION=1 _BIND_TO_CURRENT_CRT_VERSION=1 _BIND_TO_CURRENT_ATL_VERSION=1 When I build my application in VS2008 it generates an intermediate.manifest file which contains: <dependent...