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
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 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?
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)
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 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
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 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 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!
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?
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?
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
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.
}
}
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
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.
}
Is it possible to know (serverside) the time it took for a file to upload? I have an image upload API and in my response I'd like to return the upload time (not including script execution time).
I am writing a program that stores data in a dictionary object, but this data needs to be saved at some point during the program execution and loaded back into the dictionary object when the program is run again.
How would I convert a dictionary object into a string that can be written to a file and loaded back into a dictionary object? This will hopefully support dictionaries containing dictionaries.
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?
I can examine the optimization using profiler, size of the executable file and time to take for the execution.
I can get the result of the optimization.
But I have these questions,
How to get the optimized C code.
Which algorithm or method used by C to optimize a code.
Thanks in advance.
I need some way to do the following efficiently in C#:
Make program execution stop until certain value is changed.
Note: I do not want to make it with a while loop to avoid wasting cpu power..
If I create a scheduled task by calling ScheduledExecutorService.schedule(), it never quits after execution, is it a JDK bug, or I just miss something?
note: doSomething() is empty method below.
public static void doSomething() {
}
public static void main(String[] args) {
ScheduledFuture scheduleFuture =
Executors.newSingleThreadScheduledExecutor().schedule(new Callable() {
public Void call() {
try {
doSomething();
} catch (Exception e) {
e.printStackTrace();
}
return null;
}
}, 1, TimeUnit.SECONDS);
}
Hello all,
I have installed native apache and mysql,php in my linux server. I tried a page using phpinfo() and it worked.But when I try my own pages, the execution of the page stops when it comes to the php tag, even the css tag following it doesn't come to the browser. Please help me how to fix this issue.. Thanks in advance
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 ++?