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
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?
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.
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.
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)?
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
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)
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?
I have two insert statements.Second one will be executed only after successful execution of First one.What I wd like to do is-
$sqlone="Insert into .....";
$sqltwo="Insert into.....";
If(mysql_query($sqlone))
{
If(mysql_query($sqltwo))
{
show message Data inserted in both tables.
}
}
i have two shell scripts:
script1.sh
echo "date : DATE"
exit 0;
script2.sh
./scripts1.sh
if [ $? -eq 0 ]; then
reboot;
else
echo "Failed"
fi
What should be the result. Ideally it should have been "reboot" , however on some execution i got the "failed" message too. Can anyone explain why this happens?
I have some clean up code that I would like to execute at the end of execution even if my C# application crashes (delete temp files, etc). Is that possible to do in C#?
Thanks!
My understanding is that by default gprof takes into account CPU time. Is there a way to get it to profile based on wall-clock time?
My program does a lot of disk i/o, so the CPU time it uses only represents a fraction of the actual execution time. I need to know which portions of the disk i/o take up the most time.
I've been trying to clean up my urls with htaccess but I can't seen to get it to work on my localhost.
My website url: localhost/index.html
This is the default htaccess file that's in my www folder.
#------------------------------------------------------------------------------
# To allow execution of cgi scripts in this directory uncomment next two lines.
#------------------------------------------------------------------------------
AddType application/x-httpd-php .html .htm .php
AddHandler cgi-script .pl .cgi
Options +ExecCGI +FollowSymLinks
Hey Guys,
I am wokring on a dialog, where in execution I want to round up all items that have a specific attribute and place an attribute value of their's into a comma delited list.
This is as far as I have gotten, which isnt far.
buttons: {
'Hook': function(){
$('.grid_pic:has(border=3)').(loop through id's, grab src, build variable with srcs comma delimeited)
}
Any ideas?
I was doing some work handling a lot of information and my partner told me that I was using too many matrices to manipulate the variables of the problem. The idea was to use one dimension arrays int a[] instead of the 2 dimensional arrays int b[][], to save memory and processing speed of the algorithm. How certain is that this change will accelerate the speed of execution or compilation of my code in c ++?
In an app I'm profiling, I found that in some scenarios this function is able to take over 10% of total execution time.
MSVC++ 2008 compiler is being used, for reference... I don't recall if modf maps to a single instruction or if there is likely any way to make it faster.
see also here for similar question on sqrt function
After testing on msvc8, I found:
Parse GetCommandLine() to argc and argv
Standard C Library initialization
C++ Constructor of global variables
These three things are called before entering main().
My questions are:
Will this execution order be different when I porting my program to different compiler (gcc or armcc), or different platform?
What stuff does Standard C Library initialization do? So far I know setlocale() is a must.
Is it safe to call standard C functions inside C++ constructor of global variables?
Hello guys,
I have mod_cache used in conjunction with mod_cband.
But when we enable mod_cache mod_cband are overridden.
Any idea in order to define the order of execution (I suppose first mod_cache and after mod_cband)?
Thanks
Hi everybody,
How could I make sure that the startProcess(); function is being called, but without halting the execution for myFunction(). I'll guess that there's a way to call a function and prevent it from returning it's value to thereby accomplishing this?
Pseudo-code:
function myFunction() {
startProcess();
return $something;
}
function startProcess() {
sleep(5);
// Do stuff that user doesn't should have to wait for.
}