runtime

__bases__ doesn't work! What's next?

The following code doesn't work in Python 3.x, but it used to work with old-style classes: class Extender: def extension(self): print("Some work...") class Base: pass Base.__bases__ += (Extender,) Base().extension() Question is simple: How can I add dynamically (at runtime) a super class to a class in Python 3.x? B...

Crystal Reports Runtime

Hi, i have an application that is dependent to crystal reports. now i want to deploy my application but i can not find crystal reports runtime. i found runtime that loads version XI (3.5). i need version 2.8 which normally visual studio 2008 loads. i need the exact version on visual studio. do you know how i can find it? i checked the...

Reading Unicode from redirected STDOUT (C++, Win32 API, Qt)

Hello, I have a C++ application which dynamically loads plug-in DLLs. The DLL sends text output via std::cout and std::wcout. Qt-based UI must grab all text output from DLLs and display it. The approach with stream buffer replacement doesn't fully work since DLLs might have different instances of cout/wcout due to run-time libraries dif...

Why is my program receiving EXC_BAD_ACCESS in _class_isInitialized() during an objc_msgSend()?

Final Update: Turns out the fix to this problem is a depressing one. Go into the .xcodeproj directory inside your project, and remove the <username>.mode1v3 and <username>.pbxuser files. That fixed it. Boo, Xcode. I'll start this off by saying that it's not your usual retain/release bug. It just started happening on a development bra...

PHP and Runtime Subclassing / Object reclassification

Hi guys, Basic setup. I have a classA instance which is a subclass of classX ... On construction (or sometime else), I want it to load another class classB which is also a subclass of classX and replace itself with classB in situ. Sort of like a factory, but one that replaces itself transparently. If need be, I can wrap classB with clas...

BuildManager.GetType on the Compact Framework ( resolving a class name at runtime on all appdomain )

Hi! Is there any way to search for a Type with only its type name in all application domain on the Compact Framework 2.0? Type.GetType's behavior needs one to specify the assembly name on where to look. BuildManager.GetType does exactly that, but it isn't available for the CF. While this would be fine if I could call AppDomain.CurrentDo...

Using .Net 2.0 with Gallio

Hi, I'm running tests with TD.Net and Gallio. I've got .Net 4.0 installed, but I want to use the 2.0 runtime. I've put <supportedRuntime version="v2.0.50727"/> in my test assembly's app.config, but it still uses the 4.0. What should I do? Thanks ulu ...

Memory Comsuption in Java Programs running on different Computers

Hello I have a java program that realizes a lot of mathematical operations and handle with a lot of object instances. But the most interesting I noticed is that in different computers, the memory comsuption is drastically different. On a Intel Core 2 Duo (2Ghz) with 2Gb of ram and running WinXP 32bits- my program uses around 185mb of m...

How to determine method parameter types during runtime in C/C++ under .NET ?

Hi all, in C# it is possible by using reflection to determine parameter types of some method as well as class members (method, properies..). I suppose that this is possible because of IL and .NET technology, right ? If so is it possible to use reflection or some similar technique for C/C++ writen under Visual studio 2005/2008/2010 .NET...

How can I launch an external class outside the originator JVM without invoking Runtime.getRuntime().exec(...) ?

I mean someting conceptually similar to Runtime.getRuntime().exec(...) but which allows to invoke directly the class without calling exec("java -classpath $currentClasspath my.class.name")... Just to notice that tools.jar has an useful java class for compiling specifically java sources, there is something similar for executing directly ...

Set Django ModelForm visible fields at runtime?

I have a Django model: class Customer(models.Model): first_name=models.CharField(max_length=20,null=True, blank=True) last_name=models.CharField(max_length=25,null=True, blank=True) address=models.CharField(max_length=60,null=True, blank=True) address2=models.CharField(max_length=60,null=True, blank=True) city=models.CharField...

android:layout_below at runtime?

Is it possible to set in Java code (when creating a relative layout at runtime) the equivalent of android:layout_below ? ...

how to Apply code changes at run time without breaking exectuion

Hi there, I am in visual studio 2008 and working on a very huge project which takes alot of time to build now when it is running in debug and i make some code changes i want it to incorporate those code changes at run Time. i do understand that this will not be always possible but in some situation it is. I do know that when i break t...

Tomcat runtime aspects and jms destinations

Does anyone know if it's possible to deploy a war that could weave dynamic aspects around the method invocations of a class in a seperate deployment on the same tomcat server? I understand the security implications of this but we're looking to be able to audit our application as invasively as possible. Also is it possible at a war's de...

Visual C#: Compile with Runtime DLLs

I'm trying to compile my program in Visual C#. However, the machine I need it to run on (well, I need it to be able to run on any Windows Machine, at least Windows XP) does not have the .NET DLLs installed. I'm new to this, so how can I compile my Visual C# program with the runtime DLLs so that it will run on other machines? ...

How can I get break on runtime exception(or error) in javascript (or ecmascript?)

How can I break on error? I have a code: throw new Error("Some error"); And I'm using most recent version of Web Inspector (Webkit) and Firebug(Mozilla). These tools catch and print the error, but does not break. May I don't know the how to. Please let me know how can I to do these? ...

How to generate a failure at runtime in an xslt?

I need to generate a runtime error in an xslt. How to do so? The following xpaths do not generate runtime errors: "1 div 0" "/*/*[1 div 0]" "/*/*[0]" "/*/*[NaN]" It does not have to be done using xpath, could be done using some xslt construct. The reason I want this is to effectively have a "NotImplementedException" in my xslt. T...

Java.lang.Runtime

Hi folks, I have a piece of code that invokes an instance of the bash terminal through the use of the following -- proc = Runtime.getRuntime().exec("/bin/bash", null, working-dir); and then to run unix commands on this invoked instance of bash I'm using a PrintWriter object like this -- PrintWriter out = new PrintWriter(new Buffered...

Runtime Revolution simple but hard question...

Can anyone convert this RunRev function to a usable PHP function? I'm not an expert when it comes to PHP so I hope somebody helps me... Here is the RunRev code snippet, -> http://paste-it.net/public/n8a6437/ I hope somebody helps me... ...

Estimating running time for large inputs

An algorithm having worst-case running time of O(N^2) took 30secs to run for input size N=20. How long will the same algorithm take for input size N=400 ? ...