runtime

How to synchronize java code

I have the next code: Process p = Runtime.getRuntime().exec(args); and I want my program to wait for the Runtime.getRuntime().exec(args); to finish cause it last 2-3sec and then to continue. Ideas? ...

Override methods in an Objective C Class

Hi, Why can't I do this, and how could I perform the same behavior in Objective C ? @interface Test { } - (void)test:(Foo *)fooBar; - (void)test:(Bar *)fooBar; @end Thanks in advance ! ...

"Invalid Procedure Call or Argument", but only in a compiled or P-Code EXE

I have a VB6 program which I've been maintaining for ten years. There is a subroutine in the program called "Prepare Copy", which looks like this (Edited to add changes): Public Sub PrepareCopy() On Local Error GoTo PrepareCopyError MsgBox "in modeldescription preparecopy" Set CopiedShapes = New Collection MsgBox "leaving preparecop...

Creating Modules for VB Program (Similar to firefox add on)

Hi all. I have a contact manager program that I'd like to design for multiple network marketing companies. My desired structure would include a core program which covers basic contact management functions. After that one could purchase a module for their specific network marketing company. This module would contain a variety of controls ...

Getting version of java in runtime

I need to write version-independent java code, because of some bugs in JDK 1.5 which was fixed in JDK 1.6 now i use the following condition: if (System.getProperty("java.version").startsWith("1.5.")) { ... } else{ ... } Is there another possibility to check this? Will it work for JVM from IBM? ...

C++ dynamic type construction and detection

There was an interesting problem in C++, but it concerns more likely architecture. There are many (10, 20, 40, etc) classes that describe some characteristics (mix-in classes), for exmaple: struct Base { virtual ~Base() {} }; struct A : virtual public Base { int size; }; struct B : virtual public Base { float x, y; }; struct C : virt...

How to insert multiple input boxes during run time in JSF richfaces

HI, suppose i have one input box which takes value for mobile no. and when the user wants to add another mobile no at that time user will click 'plus' button. as soon as he clicks the plus button another text box should appear and user should allow to enter another mobile number i want code in JSF richfaces please help me out. Thanks i...

Java Runtime command line Process

I have a class with the following code: Process process = null; try { process = Runtime.getRuntime().exec("gs -version"); System.out.println(process.toString()); } catch (Exception e1) { e1.printStackTrace(); } finally { process.destroy(); } I can run "gs -version" on my command line and get: GPL Ghostscript 8.71 (201...

Is sizeof in C++ evaluated at compilation time or run time?

For example result of this code snippet depends on which machine: the compiler machine or the machine executable file works? sizeof(short int) ...

Run time vs design time

I read somewhere that somebody could access a config value during run time but not during design time. Whats the difference between run time and design time in this context? ...

Changing css-class-wrapper parameter of liferay portlet at runtime

As the title says - I need to change css-class-wrapper parameter at runtime, preferably in action class. I've found that Portlet interface has setCssClassWrapper method that could probably do what I want, but I can't seem to find any easy way to access current portlet object from my code. Could anyone please give me a hand with what I wa...

How to add .aspx page at runtime?

How can I add a webform (aspx page) at runtime in ASP.NET? ...

Set up ECLIPSE IDE Path

I'm still working on this problem: http://stackoverflow.com/questions/2610469/java-runtime-command-line-process Based on what one of the contributors has said I tried the following: So I've tried adding the path to "gs" in my "Run Configurations" -> Environment Tab and "Linked Resources" (Preferences -> General -> Workspace -> Linked Re...

Do variable references (alias) incure runtime costs in c++?

Maybe this is a compiler specific thing. If so, how about for gcc (g++)? If you use a variable reference/alias like this: int x = 5; int& y = x; y += 10; Does it actually require more cycles than if we didn't use the reference. int x = 5; x += 10; In other words, does the machine code change, or does the "alias" happen only at the ...

WPF: How to create a new class of user control in runtime?

Hello! I need to define a user control in runtime and then instantiate it wherever I want. So it should not be just a "new UserControl()" (that will be an instance of a UserControl class) but the one I can use as a template. Should I use reflection to generate new type or is there a better way? Thanks! ...

Where to put external archives to configure running in Eclipse?

As a Java/Eclipse noob coming from a Visual Studio .NET background, I'm trying to understand how to set up my run/debug environment in the Eclipse IDE so I can start stepping through code. I have built my application with separate src and bin hierarchies for each library project, and each project has its own jar. For example, in a Windo...

How to approximate how much time is left for an indexing process on mysql

I am running a long indexing process. I know there is no concrete way of knowing the remaining time for the process, but how can one get a rough estimation I read somewhere that I can get some approximation by looking at the size of the table before the indexing and comparing that with size of the temp table being created. Is this true?...

Changing schema name on runtime - Entity Framework

Hi, I need to change the storage schema of the entities on runtime. I've followed a wonderful post, available here: http://blogs.microsoft.co.il/blogs/idof/archive/2008/08/22/change-entity-framework-storage-db-schema-in-runtime.aspx?CommentPosted=true#commentmessage This works perfectly, but only for queries, not for modifications. Any...

Howto programmatically determine ASP.Net worker process account

Hi there My web application is a product which has to deploy to a variety of web servers. Is there a way to determine the account name that the .Net worker process account is using at runtime? Using .Net 3.5, C# Thanks in advance -Pete ...

In .NET, at runtime: How to get the default value of a type from a Type object?

Possible Duplicate: Default value of a type In C#, to get the default value of a Type, i can write... var DefaultValue = default(bool);` But, how to get the same default value for a supplied Type variable?. public object GetDefaultValue(Type ObjectType) { return Type.GetDefaultValue(); // This is what I need } Or, i...