runtime

There a way to determine at runtime if an object can do a method in C++

In Perl, there is a UNIVERSAL::can method you can call on any class or object to determine if its able to do something: sub FooBar::foo {} print "Yup!\n" if FooBar->can('foo'); #prints "Yup!" Say I have a base class pointer in C++ that can be any of a number of different derived classes, is there an easy way to accomplish something si...

Why is it so slow iterating over a big std::list ?

As title suggests, I had problems with a program of mine where I used a std::list as a stack and also to iterate over all elements of the list. The program was taking way too long when the lists became very big. Does anyone have a good explanation for this? Is it some stack/cache behavior? (Solved the problem by changing the lists to s...

How to detect the OS from a silverlight application?

Hello all, I have a Silverlight3 application that is meant to run on both Windows and Mac OS environments. I would like to know in runtime if my application is running on a Windows or Mac so I can tweak a few things to the way users are accustomed to in their operating system of choice. For example, in Windows it is the norm to use "O...

Has any language been implemented in Java?

Do you know of a runtime written in Java/J2ME, that is capable of reading and executing a script/binary file? ...

How can I avoid a picturebox to dissapear when I move and place it on another picturebox in runtime?

I tested the code in this webpage that is for moving a picturebox in runtime: http://www.davidsuarez.es/2007/11/mover-y-soltar-controles-con-drag-drop-visual-basic/ I created a Form with two pictureboxex: Picture1 and Picture2 (the page is in spanish, so I copy the modified code here): Dim DY As Single Dim DX As Single Dim Flag_MouseMo...

Start Java Runtime Process with Administrator rights on Vista

Hi, i want to execute a setup.exe installer which installes a software on vista with java 1.6. The user is not an administrator. When i try to start the process i get the error message: CreateProcess error=740 which indicates, that the user has not enough rights for starting the process. Can i submit a flag or an option to indicat...

DB2 Runtime Error

UPDATE S SET (S.a, S.b, S.c) = ( SELECT FS.a, FS.b, FS.c FROM (SELECT T.a, T.b, T.c, T.d, T.e, CASE WHEN IS.a IS NULL THEN 'N' ELSE 'Y' END FROM t T JOIN y ON(y.a = T.a) ) FS WHERE FS.a = S.e...

Socket communication?

What are the preferred platforms to implement TCP socket communication? I'm interested in: scripting languages (eg Swocket for Python) and runtimes (eg .NET / Java). ...

Set vector type at runtime.

I have a program that needs to set the type of a vector as the program is executed (according to a value in a configuration file). I have tried this: int a = 1 if(a == 1) vector<int> test(6); else vector<unsigned int> test(6); test.push_back(3); But this gives me: Error 1 error C2065: 'test' : undeclared identifier I'm not e...

Defining a runtime environment

I need to define a runtime environment for my development. The first idea is of course not to reinvent the wheel. I downloaded macports, used easy_install, tried fink. I always had problems. Right now, for example, I am not able to compile scipy because the MacPorts installer wants to download and install gcc43, but this does not compile...

NSIS:Detecting whether VS2005 runtimes are installed

Hi, 1)Which is the best way to detect whether vs2005 runtimes are installed in a system using NSIS installer? 2)If runtimes are not detected which is the best way to add run time libraries- a)running an embedded vcredist or b)copying dlls to the installation folder Thanks ...

Microsoft JScript runtime error: 'Sys.Mvc.AsyncHyperlink' is null or not an object

Hi I'm working on an asp.net ajax mvc application I used Ajax.ActionLink method to add a link for updating span context using ajax, here is some part of my code : ... <span id="status">No Status</span> <%=Ajax.ActionLink("Update Status", "GetStatus", new AjaxOptions { UpdateTargetId = "status" })%> ... but when I run application & c...

-forwardInvocation works with Clang - LLVM but not with GCC

The following code implements an NSProxy subclass which forwards methods to an NSNumber instance. However when calling [nsproxy floatValue] I get 0.0 under GCC 4.2. Under LLVM-Clang I get the correct answer 42.0. Any idea what is going on? (by the way this is running under Garbage Collection) -(id) init; { _result = [NSNumber nu...

Calling a generic function with a type parameter determined at runtime

Hello, I have a question involving calling a class's generic method with a type parameter that is known at runtime. In specific, the code looks like so: FieldInfo[] dataFields = this.GetType().GetFields( BindingFlags.Public | BindingFlags.Instance ); // data is just a byte array used internally in DataStream DataStream ds = new DataS...

Delphi ODBC Connection Dialog Component ?

Hi, I am thinking about adding ODBC database connectivity to an application. The user will at runtime configure and select their database odbc connection. Are there any components that will give me the required series of dialogs ? Allowing the user to select the data source type, select drivers, browse already defined ODBC connect...

How to disable runtime warnings in java?

I am using a jar file in a java program and it generates warnings during runtime. But I don't want that my customer sees these warnings. How can I disable these warnings. The warning is as below: Sep 25, 2009 10:10:33 PM com.gargoylesoftware.htmlunit.IncorrectnessListenerImpl notify WARNING: Expected content type of 'application/javasc...

malloc_error_break causing C++ SIGABRT

What is wrong with my code? (I'm trying to at least get copy a file with this code in XCode (OS X 10.6 Snow Leopard.) I keep on getting a SIGABRT with an malloc_error when running: Lesson 4(796) malloc: *** error for object 0x10000a8a0: pointer being freed was not allocated *** set a breakpoint in malloc_error_break to debug Here's th...

change db name in connection string at runtime in Entity Framework

Hello guys, In my project I want to run some unit tests on the DAL layer that is using EntityFramework. I'm creating from scrips a new database before each run of the tests (in order to have always the same initial data when doing the tests). At the end of the tests, this database is dropped, (all is made automatically with the help of ...

Changing Crystal Reports reports shipped with an application and a runtime version

We have a purchased application (I'm told it's .NET, it's client server, running on Windows XP, connecting to SQL Server 2005) that uses a Crystal Reports runtime and separate report files (.rpt) to do it's reporting function. I have a copy of the CR Designer program but we don't have the CR Enterprise software. I can open the reports ...

What are the most commonly used runtime exceptions in java?

As a java programmer who wishes to perfect his programming skills, I often come across the situations that I have to create a runtime exception. I know it's a good practice if one use wisely. Personally, NullPointerException and IllegalStateException are the most commonly used in the softwares that I have created. How about you? What ...