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? ...
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? ...
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 ! ...
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...
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 ...
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? ...
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...
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...
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...
For example result of this code snippet depends on which machine: the compiler machine or the machine executable file works? sizeof(short int) ...
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? ...
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 can I add a webform (aspx page) at runtime in ASP.NET? ...
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...
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 ...
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! ...
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...
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?...
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...
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 ...
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...