|
If i run a TSQL Statement in management studio and run the same the query through SqlDataReader, the latter gives the result faster than the former...
Any reason??
Started by sagar on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
How big is the result set? One possibility is the connection state is different - in particular, the SET ... .
It could be related to the time that it takes to display the results in the SSMS? Which would probably be related to the size of the result set .
|
|
How do I let user Y write in folder A only when executing script X ?
Started by khelll on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at superuser):
How about having script x write to /usr/bin, but as user z which is a user account for this specific purpose?
Granted, this means using the sticky bit, which has its own security concerns, but you can lock down user z (no logins, very restricted permissions... .
|
|
If I was running a command before the SSH connection was dropped, will the command continue executing?
Started by Miko on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at serverfault):
See:
http://en.wikipedia.org/wiki/Nohup
Not generally, although not knowing what shell or even what OS you're running,... .
You can prefix a command with 'nohup' to ignore the signal .
Processes will be sent a SIGHUP on loss of terminal .
In most cases, no.
|
Ask your Facebook Friends
|
How can I get the username of the process owner (the user who is executing my program) in C++?
Started by H4cKL0rD on
, 6 posts
by 6 people.
Answer Snippets (Read the full thread at stackoverflow):
Windows GetUserName....
On unix, use getuid.
On Windows, use GetUserName.
If its windows, and you only need to echo it, then system("echo %username%");
i believe This is specific to the operating system .
IDK, but in a batch file you can use %username% .
|
|
Is there a way to get the name of the currently executing method in Java?
Started by Omar Kooheji on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
In the extreme case, a virtual....
Some virtual machines may, under some circumstances, omit one or more stack frames from the stack trace .
GetStackTrace() will usually contain the method you’re calling it from but there are pitfalls .
CurrentThread().
Thread.
|
|
I am executing If statement based on some vales but Nunit executes all statements even if the condition is false
Started by sam on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
I would suggest that you....
Nunit doesn't actually evaluate your statements, it simply instantiates your tests and runs them .
NUnit is written entirely in C#, if statements do work in C#! :)
It must be a mistake in your implementation or interpretation .
|
|
Duplicate of: In Python, how do I get the path and name of the file that is currently executing?
I would like to find out the path to the currently executing script. I have tried os.getcwd() but that only returns the directory I ran the script from not...
Started by Ashy on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Thus:
print "I'm inside Python file %s" % __file__....
How about using sys.path[0]
You can do something like
'print os.path.join(sys.path[0], sys.argv[0])'
http://docs.python.org/lib/module-sys.html
In Python, __file__ identifies the current Python file .
|
|
Hi All,
How to write a program for executing the 'ls' command in ObjC ? Any API available ?
Thanks
Started by Biranchi on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
If it is, use the native system ....
NSTask is your friend if speed isn't necessary.
Popen().
Exec() family.
Fork().
As far as I'm aware, Objective C is built on C so you should have access to all the standard UNIXy capabilities, among them:
system() .
|
|
Is there any way of executing the already executed code in java.
for example in the main method i have int variable a = 10; and later point in time say suppose at the end of execution i will check some conditions on its(a's) value and if the condition...
Answer Snippets (Read the full thread at stackoverflow):
Something like this:
int rFunction(int a) { // if we found our needed ... .
Why can't you just do something like this?
do { a = processSomething(); } while(a != 10);
EDIT : if you can't use a proper loop construct, then recursion is your only real choice. .
|
|
We have a web server running Lighttpd on FreeBSD.
Some of our clients demand FTP access to their server. With most of them, chrooting them with the FTP daemon into a "files" directory so they can upload pictures of their kids or whatnot suffices, and ...
Started by Garrett Albright on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at serverfault):
PHP scripts on the other hand are read and executed because the configuration of the web....
CGI scripts need it because the HTTP server uses exec(3) (and friends) to execute them.
The execute bit has nothing to do with the HTTP server.
|