execution

Thread vs async execution. What's different?

I believed any kind of asynchronous execution makes a thread in invisible area. But if so, Async codes does not offer any performance gain than threaded codes. But I can't understand why so many developers are making many features async form. Could you explain about difference and cost of them? ...

Why is postgresql update query so slow sometimes, even with index

i have a simple update query (foo column type is BOOLEAN (default false)): update tablename set foo = true where id = 234; which "id" is set to (primary) key, and if i run "explain analyze" i got: Index Cond: (id = 234) Total runtime: 0.358 ms but still, i have plenty of unexplained queries at slow log (pgfouine), which took more t...

Same query, different execution plans

Hi, I am trying to find a solution for a problem that is driving me mad... I have a query which runs very fast in a QA Server but it is very slow in production. I realized that they have different execution plans... so I have try recompiling, cleanning the cache for the execution plans, update statistics, check the type of collation......

Trigger local program execution from browser

First and foremost: I know it's not right or even good thing to do but my current customer will not cave in. So here's what he is asking for (this is for in-house-behind-a-firewall-etc project). In the web report I need to supply a link which points to the executable script that lives on the universally mapped location (network file serv...

Sending Bulk Emails using PHP

Hi All I have to send mails to all users in the site when a new user joins. My problem is the script stops execution after sending around 400 mails. I have set the set_time_limit to 0. And also I am giving sleep(2) after sending 10 mails. What may be the reason behind this issue.Any solution for this problem . Is there any better metho...

Code coverage (c++ code execution path)

Let's say I have this code: int function(bool b) { // execution path 1 int ret = 0; if(b) { // execution path 2 ret = 55; } else { // execution path 3 ret = 120; } return ret; } I need some sort of a mechanism to make sure that the code has gone in any possible path, ...

PHP programmers: I would like to optimize the speed at which my PHP scripts execute. What could I do?

I have zlib and Zend Optimizer enabled on my server. I have read about the zlib.output_compression directive. Are there any caveats with turning this directive on in my server? ...

what practical proofs are there about the Turing completeness of neural nets? what nns can execute code/algorithms?

I'm interested in the computational power of neural nets. It is generally accepted that recurrent neural nets are Turing complete. Now I was searching for some papers which proofs this. What I found so far: Turing computability with neural nets, Hava T. Siegelmann and Eduardo D. Sontag, 1991 I think this is only interesting from a th...

How to give process specific privileges in windows

Hi, I am writing some testing software that receives some source code, compiles it on the server, executes it, forward input from the database, catches output and compares it with one in the database to see if it is correct. The problem is that source code can be anything (it is written in c/c++ and compiled with visual studio cl), so ...

PHP/Codeigniter FTP Timout

I'm trying to access an FTP server from my PHP script using Codeigniter's FTP Library. These functions work great, but when testing the script I discovered that if I attempt to connect to a server that does not exist, the script does not terminate with an error message of any kind. The page continues to execute, until the web server giv...

C# Step by Step Execution

Hi. I'm building an app that uses and scanner API and a image to other format converter. I have a method (actually a click event) that do this: private void ButtonScanAndParse_Click(object sender, EventArgs e) { short scan_result = scanner_api.Scan(); if (scan_result == 1) parse_api.Parse(); // This will check for...

C++ counting execution time eror

Hi, I'm trying to count the execution of function in my code (that takes over an hour), and I'm using clock(), but I'm getting some errors, since the time calculated is negative. I'm doing like this: long double time; clock_t start, t_end; t_start = clock(); algorithm->execute(); t_end = clock(); time = ((long double) t_end - t_start)...

Odd linked list/anonymous class behavior - executing when added?

This question is related to How to Queue and Call Actual Methods... Anyway, I've decided to (after all) go with the anonymous class idea. The problem is that when I ADD my anonymous class to the linked list, it's actually calling execute() immediately... and it shouldn't be. Execute() is to be called later. Anyway, this is what I have: ...

Windows Azure: how to measure the execution time of a code

I wanted to measure the execution time of my code running on windows azure cloud across multiple instances. Can anyone tell me how to do it. ...

Does Windows 7 treat full-screen applications differently?

I have a hidden process that waits for non-standard hardware button messages and runs an application (with CreateProcess). No problem with the user disturbing, it's an action that the user approved himself. Everything is fine when it's usual layout with taskbar shown and multiply captioned and non captioned- windows. But the situation is...

How to return the result of dialog window work in the moment of its closing?

Everyone knows the MessageBox.Show() method, that returns DialogResult value after dialog closed. How can I implement such a method in my dialog class? class MyDialog : Form { public static MyDialogResult Show() {}; } The problem, as you can guess, is that the method returns a value only after user clicks some button in the dialog. ...

SSIS DTEXEC Package Variable Space Not Accepted

I'm attempting to execute an SSIS package on SQL 2005 using the following: dtexec /SQL "\MyPackageName" /SERVER mssql1 /MAXCONCURRENT " -1 " /CHECKPOINTING OFF /SET "\Package.Variables[FileFolder].Value";"\\SomeServer\Someshare\Output Batch\" this yields: Option "Batch " is not valid. The space at the end of the word Batch inside ...

Suggestion for this kind of execution in asp.net

I have a web application that sends a single sms to multiple numbers via gsm.Every user has this application in his local system. I am able to send messages one by one. Thus far i have only 10 numbers so there is no problem. Consider i have a file having 10000 mobile numbers, what will happen to my execution time? What is your suggesti...

Running external commands in IPython

I'd like to run a new command from IPython configuration and capture its output. Basically, I'd like to access the equivalent of !command via normal functions. I know I can just use subprocess, but since IPython already provides this functionality, I guess there must be a properly made wrapper included somewhere in the API. ...

continuously execute an emacs lisp function

Is there a way to trigger the execution of an emacs lisp function other than M-x myfun? I would like to have the function re-called every time the buffer is changed. Background: I have a table of numbers with some mistakes. The table has column totals and other features which can be used to identify the mistakes. My elisp function highl...