runtime

Extract a WPF content template of a running WPF application

Hey guys, is there a way of extracting a content template of a WPF control which is hosted in a running WPF application? Just the same way as I am able to dig through the visual tree of any WPF application with tools like Snoop I'd like to be able to extract the Content Template. I have asked Google already. But either my keywords wer...

How to change Shape border stroke runtime in Actionsctipt 3

I've got a complicated shape in a MovieClip. Runtime i want to change the stroke width of this Shape depending on a size ratio. How can I change this property without redrawing the entire Shape with the drawing API (almost impossible, is a map with very detailed borders) ? Is it possible ? ...

Flex 4 Run/Debug Path - How to use Macro/Variable there?

Let's say that I want all my programs under a flex project to go to a new url, with the name of the program's html and swf as variables. Now, normally, it's going to hardcode Foo.mxml to a URL of: file:///local/wherever/project/bin-debug/Foo.html But I want it to go to: http://localhost/elsewhere/?a=Foo.html?b=Foo.swf Now, I can do...

Does the mono runtime already handle tail call optimisation as required by the IL spec?

I know that by this infamous post http://flyingfrogblog.blogspot.com/2009/01/mono-does-not-support-tail-calls.html the mono runtime did not offer tail call elimination as required by the IL. Has this changed since? ...

Merge javascript files in runtime

So, I got a big menu with a couple of sub-items under each menu-item. Each sub-item needs javascript-includes and in some (pretty often) cases there are 20~ includes. This obviously sucks considering the HTTP-request time blah blah. My thoughts are the following. I'm creating a merger-file (in PHP) that will handle all the js-includes a...

Flagging possible identical users in an account management system

Hi, I am working on a possible architecture for an abuse detection mechanism on an account management system. What I want is to detect possible duplicate users based on certain correlating fields within a table. To make the problem simplistic, lets say I have a USER table with the following fields: Name Nationality Current Address Logi...

C# - Determine at runtime if property is a Type or an Object instance?

I want to determine whether MyBindingSource.DataSource is assigned to the designer-set Type, or if it has been assigned an object instance. This is my current (somewhat ugly) solution: object result = MyBindingSource.DataSource; if(result.GetType().ToString() == "System.RuntimeType") return null; return (ExpectedObjType) result; ...

How to compile rhino/javascript files to .class bytecode for java at runtime

I'm making a falling sand game in Java. I want users to be able to write their own engine for it using a simpler language. Falling sand games can be very CPU intensive so I want to have the engine running as fast as possible while not having to manually compile. I need to know how to compile rhino javascript files to .class files by at ...

Retrieving YAML parameters during runtime in App Engine (Python)

Is it possible to programmatically retrieve any of the YAML parameters during run-time? Are they stored in the environment somewhere? Good example would be to automatically find the application version and to add it as a comment in the landing HTML page. ...

UAC ask permission programmatically

I have an application that uses an COM file. Sometimes this file has not been registered by regsvr32 and i'd like to program a function that if the file cannot be loaded it tries to register it and retry. To do so i'd need admin privileges, so i'd like to ask if there's a way to show the UAC "run as administrator" question to the user at...

Is VS 10.0 Runtime part of .Net framework 4?

Hi all, My questions title says it all.. Are VC Runtimes part of .Net framework? also how can I get the VC 10.0 Runtime for download? ...

Add Event at runtime

my method is : private void button1_Click(object sender, EventArgs e) { for (int i = 1; i < 10; i++) { Button btn = new Button(); btn.Name = "btn" + i.ToString(); btn.Text = "btn" + i.ToString(); btn.Click += new EventHandler(this.btn_Click); this.flowLayout...

Determining type of variable during run-time in C

I have several variables of type char (array), int, and double. Is there a way to identify what type they are during run-time? For example, I'm looking for something like: int dummyInt = 5; double dummyDouble = 5.0; dummyInt == int ? printf("yes, it's of int type\n") : printf("no, it's not of int type\n"); dummyDouble ...

Why would a runtime undefined symbol be fixed by adding /usr/lib to ld.so.conf?

I've got a case in linux where gcc and ld build things cleanly, but at runtime I get an undefined symbol (for something in libxerces-c.so.28), reported by one of my own shared libraries, when running my program. First assumption was cache was broken, xerces recently installed, or something similar, so I ran ldconfig. Didn't fix it. But...

Printing Runtime exec() OutputStream to console

I am trying to get the OutputStream of the Process initiated by exec() to the console. How can this be done? Here is some incomplete code: import java.io.BufferedReader; import java.io.File; import java.io.IOException; import java.io.OutputStream; import java.io.PrintStream; import java.io.Reader; public class RuntimeTests { publi...

How to load a grid from XAML codes and add it to a stackpanel dynamically/at runtime?

I generate the XAML codes which actually describe a valid grid control - called the GridXAML. I want to create a grid object and add it to a stackpanel on my form. How can I 1) create an object from its XAML string value, and 2) add it dynamically to a panel? Please help! Giving a specific sample context as below. The generated grid's...

What does a C++ program require to run?

This question has been bothering me for a while now. Let's consider the two following programs: #incude <iostream> int main() { std::cout << "Hello, World!"; } and int main() { int x = 5; int y = x*x; } Windows: The first example, naturally, requires some system .dll's for the console. I understand that. What about the se...

See dynamicly generated DOM and CSS

This address is has a console javascript that i build with a custom jquery plugin. I wan't to extract the exact DOM and CSS after i fill some commands into it. Since the CSS and the DOM is generated at Runtime, i'm unable to get it. So my question is, how can i see this DOM and CSS that is generated at runtime? Thank you very much. ...

How to add a WPF grid control from its XAML string at runtime?

Let's say we have a grid XAML like below - eg. a generated string returned from a method. <Grid> <Grid.ColumnDefinitions> <ColumnDefinition Width='*' /> <ColumnDefinition Width='*' /> </Grid.ColumnDefinitions> <TextBlock Text='id' Grid.Column='0'/> <Rectangle Fill='Black' Grid.Column='1' /> </Grid> What...

Opening an external, non-java file with Java

I am trying to access the file "J:\Java\NetBeansProjects\List of forgoten things\list.eml" and open it using the OS-defined default application. This can be acomplished in the command prompt by calling cd "J:\Java\NetBeansProjects\List of forgoten things" "list.eml" so I decided to use Runtime.getRuntime().exec("cd \"" + System.g...