Is it possible to use HTML form to start an executable in the server, and allow user to input further information into the same executable?
from a web form, input executable name with one parameter missing.
the executable starts, and post question for the missing parameter.
user enter the value for the missing parameter, the information get passed to the executable.
the executable continue its execution.
Thank you,
Pan
how can i control two processes to run alternately in separate terminal windows.
for example i run the code for each on separate terminal windows at 11:59 and both of them wait for the time to be 12:00. at this moment process one starts execution and process two waits for say 10 seconds. then they switch, process two executes and process one waits.
in this way they take turns until the process is complete.
Hi,
I have a PHP script that runs database queries. Now, if a query fails, should I trigger an error or throw an exception? I noticed that if I do the latter, the script execution will stop after facing the exception.
My code is as follows:
if (!$this->connection[0]->query($this->query))
throw new Exception($this->connection[0]->error);
What are the pros and cons of using exceptions for this kind of cases (failed queries)?
This is a real shot in the dark, however maybe someone had a similar issue. Some console apps are being invoked by either SQL Server 2008, or Autosys (job schedule) under Windows Server 2008; output results of execution are being saved into .txt files. Every so often, with no definite pattern as far as I can tell saved output is displayed as a series of what I presume are Chinese characters. Have anyone encountered phenomenon above?
It should be a tool to enable versioning of a database schema and efficiently updating databases with older versions of the schema:
robustness, does it handle all edge cases
support for data migration
command line execution
flexibility, can some data be compared as well
In the answers a breakdown on support for these points (and anything I may have missed) would be appreciated.
Hello,
At times the get_file_contents takes too long and that hangs the entire script. Is there any way of setting a time out limit on get_file_contents, without modifying the maximum execution time of the script?
Edit:
Its taking long because the file does not exist. I am getting "failed to open stream: HTTP request failed!" error. But it takes forever.
I want to make Waf generate a beep when it finishes the execution of any command that took more than 10 seconds.
I don't know how do add this and assure that the code executes when Waf exits.
This should run for any Waf command not only build.
I checked the Waf book but I wasn't able to find any indication about how should I do this.
Once again I was in a design review, and encountered the claim that the probability of a particular scenario was "less than the risk of cosmic rays" affecting the program, and it occurred to me that I didn't have the faintest idea what that probability is.
What is the probability of a cosmic ray hitting a computer and affecting the execution of the program?
How can I suspend the execution of a JVM for a configurable amount of time, similar to want happens on a full, serial, Garbage Collection? I want to test some edge cases but it's difficult to create the exact pauses I need with manually generating garbage + System.gc().
I saw this kind of code at work:
class FooPlugin : IPlugin // IPlugin is a Microsoft CRM component, it has something special about it's execution
{
static FooPlugin()
{
SomeObject.StaticFunction(); // The guy who wrote it said it's meaningful to this question but he can't remember why.
}
}
Any idea what does a static modifier on a constructor mean and why in this case it is required?
What are some of the best practices for writting scripts that will execute in a remote context?
For instance, I just discovered that built-in var $Profile doesn't exist during remote execution.
Hi
I need to know if it is possible the current execution node? Ej:
..html
<script id="x"> //
console.log(document.currentNode.id); // << this must return "x"
</script>
..html
thanx
In an app I'm profiling, I found that in some scenarios this functions are able to take over 10% of total execution time.
I've seen discussion over the years of faster sqrt implementations using sneaky floating-point trickery, but I don't know if such things are outdated on modern CPUs.
MSVC++ 2008 compiler is being used, for reference... though I'd assume sqrt is not going to add much overhead though.
I have a SQL table it has more than 1000000 rows, and I need to select with the query as you can see below:
SELECT DISTINCT TOP (200) COUNT(1) AS COUNT, KEYWORD
FROM QUERIES WITH(NOLOCK)
WHERE KEYWORD LIKE '%Something%'
GROUP BY KEYWORD ORDER BY 'COUNT' DESC
Could you please tell me how can I optimize it to speed up the execution process? Thank you for useful answers.
I am trying to rescue from a `require': no such file to load in ruby in order
to hint the user at specifying the -I flag in case he has forgotten to do so.
Basically the code looks like:
begin
require 'someFile.rb'
rescue
puts "someFile.rb was not found, have you"
puts "forgotten to specify the -I flag?"
exit
end
I have expected the rescue part to take over execution in case someFile.rb was not found, but my assumption was wrong.
I am developing a Java application with MySql as the database. I have to dump the MySql database from my application periodically(let say every day at 10 a.m.) and I have written a batch (.bat) file for dumping the database. The batch file is working fine, but the problem is that it is asking for password each time during its execution.
Is there any way to dump MySql database without prompting for password and achieve it from Java application periodically?
Hi ,
I wanted to know if there is any system variable which is can use to access package execution start and end times. My requirement is that i need to store this in 2 relevant fields in a table in the database.
Thank you.
Abhi
Say I have two NSTimers in my iPhone app: timer1 and timer2. timer1 calls function1 30 times per second and timer2 calls function2 30 times per second. Assume these two functions are reading and updating the same integer variables. Are there any "multi-threading" issues here? If not how does iPhone OS handle the execution of the two functions (in general)?
I've just installed Intellitrace, and it seems that it only collects data from previous points during debugging, and I haven't found a way to get the debugger to step back to previous execution points using intellitrace.
Is this possible?
I have query like below
declare @str_CustomerID int
Insert into IMDECONP38.[Customer].dbo.CustomerMaster
( CustomerName , CustomerAddress , CustomerEmail , CustomerPhone )
values ( ‘werw12e’ , ‘jkj12kj’ , ‘3212423sdf’ , ‘1212121'
)
select @str_CustomerID= scope_identity()
after execution it returns null in my parameter
i want to get value of identity how can i do that
I am saving Images in NSCachesDirectory in a App. At the end of app execution i would like to clear all temporary cache. Is there a way to force clear all cache on application exit. I do realise the local folder keeps cache for 3 days..but my requirement is to force clear the Cache. Thx
Hello!
I imported inpout32.dll to the program and tried to do the parallel port interfacing for outputting and inputting through the port.
But when the execution reaches the statement PortAccess.Output(888,0); it throws the above exception. The PortAccess class is defined in the inpout32.dll file which i downloaded from www.logix4u.net.
Can anyone help me with this?
I'm not experiencing any performance issues, however I'd like to take a look at what takes how long and how much memory cpu it uses etc.
I'd like to get a firsthand understanding of which things can be bottle necks etc and improve any code i might reuse or build upon... (perfectionist)
I'm looking to create a litte function that i can call at the begining and end of each function that records:
execution time
memory used
cpu demand
any ideas?
My development PC has windows installed. And I've experienced weird php behaviour:
<?php
file_put_contents('c:/q', microtime(1) . "\r\n", FILE_APPEND);
sleep(10);
When I run this script in browser simultaneously in two different tabs I get such results
1294713622.125
1294713632.2188
which obviously is not what I expected, although in CLI everything is fine.
So the question: what can block execution? (session.auto_start is Off)