runtime

What's the best way to suppress a runtime console warning in Java?

I am using the getResponseBody() method of the org.apache.commons.httpclient.methods.PostMethod class. However, I am always getting a message written to the console at runtime: WARNING: Going to buffer response body of large or unknown size. Using getResponseBodyAsStream instead is recommended. In the code I have to write the response...

How can I change annotations/Hibernate validation rules at runtime?

If have a Java class with some fields I want to validate using Hibernate Validator. Now I want my users to be able to configure at runtime which validations take place. For example: public class MyPojo { ... @NotEmpty String void getMyField() { ... } ... } Let's say I want to remove the NotEmpty check o...

How can I get the class object, when I only know the classname at runtime in Objective-C

Hi there, I need to get the class object out of a string, containing the name of the class at runtime. I found a function called objc_getClass, but I'm not sure if it's really what I search. Can I implement it like this? NSString *name = @"AnyClass"; Class *myClass = objc_getClass([name UTF8String]); ...

Setting JVM heap size at runtime

Is there a way to set heap size from a running Java program? ...

What's the difference between CLASSPATH "bootstrap entries" and "user entries" in Eclipse?

Eclipse has a Run Configurations screen with a Classpath tab. I had some jars listed in the "user entries" section of this tab but my project did not run until I duplicated those jar files into the "bootstrap entries" section. After the jars were listed in both sections, the project ran successfully. Why? What's the difference betwe...

Fuss over Runtime and Design Time packages in Delphi

I have seen that most of the components (VCLs) in Delphi are split in two parts. 1) DesignTime Package 2) RunTime Package Why all this fuss. What difference does it make if both RunTime and DesignTime packages are united into one single Package? I have never really been able to understand this separation logic. So what is the logic be...

How to detect a property return type in Objective-C

Hello, I have an object in objective-c at runtime, from which I only know the KVC key and I need to detect the return value type (e.g. I need to know if its an NSArray or NSMutableArray) of this property, how can I do that? ...

JclDotNet, and some odd calling patterns using assembler

We have our own glue-layer-code-thingamajig that allows us to host the .NET runtime in our Win32 Delphi program. This has allowed us to do a gradual transition to .NET over time. But, we have some problems with it from time to time, and yesterday I saw an answer here on SO that referred to Jcl's .NET host implementation, so I thought I'...

Any way to extract underlying Xaml?

Is there anyway to extract the underlying xaml from a control. IE. I have a textbox named fooBox. Can I get xaml back from the textbox at runtime that represents the textbox? ...

How to use @encode() to get @"NSArray" in Objective-C

I'm using the runtime functions to get the type of a property (thanks to eJames for helping me to figure out this way). The attribute string of the property looks like this: T@"NSArray",&,Vstuff I need to check if the property type is an array, at the moment I'm doing it like this: - (BOOL)valueForKeyIsArray:(NSString *)key fromT...

How to get round VC++ Runtime requirement in a dll?

Hello, I wrote a dll in VS2008 that I use in my C# application,but my users don't like the fact they need both .NET framework and VC++ Runtime. Is there a way I could avoid the 'must-have' VC++ Runtime in my C++ dll? ...

XamlReader.Load(XmlReader) "Stack Empty" XamlParseException

I'm trying to load a xaml file at runtime. My code looks like this: StringReader stringReader = new StringReader(xamlString); XmlReader xmlReader = XmlReader.Create(stringReader); content = XamlReader.Load(xmlReader); It's basically copy paste of of msdn. the XamlReader.Load line throws a XamlParseE...

Does the .NET runtime internally map to win32 function calls?

In other words, does the .NET framework eventually make calls somewhere to get its work done? Or did Microsoft completely re-create all the functionality of the win32 library in their .NET framework. Thanks! ...

Use external Bundle-Localization path in MANIFEST file

The MANIFEST.MF file contains an entry to define which *.properties files are loaded at runtime. These entry defined name and the corresponding properties file is used to translate the plugin strings which start with the prefix "%", like "%plugin.name" Bundle-Localization: plugin plugin.properties than contains a line like %plugin.na...

Real runtime method names despite obfuscation?

Is there any way to query the name of the current method if you've obfuscated your code? I'm asking because there are times when I want to log a message with the executing method as a prefix. ...

Add row to table at runtime

On one of our pages, we've got a table that has rows generated at runtime. I want to move the content of those rows out into their own control and set properties on it at runtime, in order to separate the presentation from the code-behind. But it's not working the way I'm expecting. If I have my row-like control inherit from UserContr...

How to add a timeout value when using Java's Runtime.exec()?

I have a method I am using to execute a command on the local host. I'd like to add a timeout parameter to the method so that if the command being called doesn't finish in a reasonable amount of time the method will return with an error code. Here's what it looks like so far, without the ability to timeout: public static int executeCom...

Is there a way to assign conditional methods or add preprosessor directives at run-time in C# ?

The aim is to be able to switch debugging calls on at run-time from database on a production build ... ...

Java task runtime

Hi! First of all I have to admit that these are very basic and primitive questions... I want to demonstrate different Algorithms in Java for sorting and searching, and to get a value for the runtime. There're issues I cannot solve: there's Hotspot compiling - which is a runtime optimization I need to deactivate (I guess). How do I ge...

Run time to insert n elements into an empty hash table

People say it takes amortized O(1) to put into a hash table. Therefore, putting n elements must be O(n). That's not true for large n, however, since as an answerer said, "All you need to satisfy expected amortized O(1) is to expand the table and rehash everything with a new random hash function any time there is a collision." So: what ...