Ive searched a lot of places for the answer to this seemingly simple problem, but Ive only found rather complicated answers involving classes, event handlers and callbacks (which seem to me to be a somewhat sledgehammer approach). I think callbacks may be useful but I cant seem to apply these in the simplest context. See this example:
<...
Hi,
Does anyone know of a Java ExecutorService equivlent in VC++ 2008? What I want is a framework which I can pass tasks to fixed size thread pool. The framework should manage the thread pool itself (i.e. creation and destruction of threads).
...
I am wondering if there is a way to specify a php function or file to be called every time a user visits and exits a page on my site. So if a user visits say example.com/ex.php can I have a function called before ex.php is run and after ex.php is finished?
I want to be able to record the time it takes to execute php files on my site and...
Hi guys,
I am working on a PHP script that makes an API call to a external site. However, if this site is not available or the request times out, I would like my function to return false.
I have found following, but I am not sure on how to implement it on my script, since i use "file_get_contents" to retrieve the content of the externa...
Are you able to halt JavaScript execution without locking up the browser? The way you would normally halt execution is to do an infinite while()-loop, but in the case of FireFox, it locks up the browser until the loop has ended.
What's your take on this?
I am trying to override window.confirm() to implement my own dialog using HTML. ...
Taking into account the execute disable bit what is the recommended way of executing instructions against a native processor from a high level managed environment such as VB.NET 2008 or C#. In addition has anyone achieved similar in executing GPU instructions against a graphics processor?
...
I'm in the middle of my a levels and im doing some revision for my Computing exam.
I was wondering if someone could tell me what the difference is between machine code and object code.
keep it it simple please.
...
I need to create a script in PHP language which performs permutation of numbers. But PHP has an execution time limit set to 60 seconds. How can I run the script so that if you need to run more than 60 sesunde, not been interrupted by the server. I know I can change the maximum execution time limit in php, but I want to hear another versi...
Hi,
how can I trace code execution of my C# application? Are there any tools available. Please Help. I have an issue in my production site.
Thanks in Advance
...
I was wondering if Python has similar issues as C regarding the order of execution of certain elements of code.
For example, I know in C there are times say when it's not guaranteed that some variable is initialized before another. Or just because one line of code is above another it's not guaranteed that it is implemented before all th...
I've REALLY been wanting to test speeds of regex etc. and on php.net it has this example:
$time_start = microtime(true);
// Sleep for a while
usleep(100); // Or anything for that matter..
$time_end = microtime(true);
$time = $time_end - $time_start;
echo "Did nothing in $time seconds\n";
EDIT: What I meant was to play a large loop ...
Hello everyone,
I'm currently pondering how best to take an AST generated using Antlr and convert it into useful objects which I can use in my program.
The purpose of my grammar (apart from learning) is to create an executable (runtime interpretted) language.
For example, how would I take an attribute sub-tree and have a specific A...
i want to know about Multi monitor support, Multi targeting, Parallel Development, Side by Side execution, Backward compatibility and SqlServer 2008 integration.
all in one..
...
I'm having a very strange problem. I'm running a loop in a detached thread, and some lines of code in my loop (different lines in each iteration of the loop) are taking a long long time (~45 seconds) to execute, even if they are simple commands like initializing an NSXMLDocument with data. This problem is also very inconsistent, and it d...
I'm debugging into the .NET Framework source code to look for a bug in my application. I have two similar inputs for the code where one exhibits the bug and the other doesn't. However to follow the code path into the .NET source is quite complex.
What I'd like is a tool that can be executed for both inputs and compare the results to see...
A single channel image is my input. ( defalut IPL_DEPTH_8U)
I am multiplying each pixel of my input image with scalar floating point numbers like 2.8085 (as a part of my algorithm).
So this needs me to increase the depth and change the image type to IPL_DEPTH_64F
But whenever I am trying to change my image datatype to IPL_DEPTH_64F an...
Hi, i need to do something like this:
Execute a piece of code
Start to load an image and block the script execution
When the image is loaded resume the execution
Execute the rest of the code
I know that the simplest way is to assign a function on the onload event of the image and then execute the rest of the code in the function, but...
Possible Duplicate:
how to find the location of the executable in C
Hi,
I am looking for a portable way to find the root directory of a program (in C++). For instance, under Linux, a user could copy code to /opt, add it to the PATH, then execute it:
cp -r my_special_code /opt/
export PATH=${PATH}:/opt/my_special_code/
cd /ho...
Hi all,
I am using netbeans to code java and i was wondering if there is an option to have a program stopped by pressing a shortcut. I can press F6 to execute program, but I have to use mouse to stop program, which I find a little annoying.
many thanks alfred
...
Hi,
I don't often see talk or research on JavaScript file loading/executing order. I'm interested in sites explaining how JavaScript is being handled. In particular, if I have
<script src="a.js"></script>
<script src="b.js"></script>
<script src="c.js"></script>
I presume a.js is downloaded first, then b.js and finally c.js or are th...