|
There are numerous scripts that I have written for my server. Some of them are in my ~/scripts and some of them are in application directories.
I am just wondering is there a directory that you would normally use to keep your shell scripts?
Started by Kiril Piskunov on
, 6 posts
by 6 people.
Answer Snippets (Read the full thread at serverfault):
System-wide ones go in /usr/local/bin or /usr/local/sbin as appropriate (scripts which should only be run as root go in sbin , while scripts intended to help ordinary users go in bin ), rolled out via configuration... .
Personal ones for my account, ~/bin.
|
|
Do you normally set your compiler to optimize for maximum speed or smallest code size? or do you manually configure individual optimization settings? Why?
I notice most of the time people tend to just leave compiler optimization settings to their default...
Started by Ferruccio on
, 12 posts
by 12 people.
Answer Snippets (Read the full thread at stackoverflow):
Memory is cheap now days :) So it can be meaningful to set compiler... .
We always use maximize for optimal speed but then, all the code I write in C++ is somehow related to bioinformatics algorithms and speed is crucial while the code size is relatively small .
|
|
I haven't explained this well.
But what i mean is, if I have an ajax script that loads the content of a page in a DIV element, through the function 'loadpage('whatever.php');, instead of going around manually doing this to all links, is there a way of...
Started by Tom on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
When the anchor element is clicked, the event handler finds the href attribute and loads that page... .
This script goes through the document, finds every anchor element and binds an event handler to the click event of each .
Sure, you can do it with jQuery.
|
Ask your Facebook Friends
|
I have several problems with a laptop... When I try to boot it doesn't act deterministcally but goes randomly into one of several modes:
Restarting every 4 seconds Boots up and gets a bluescreen instead of the Windows login screen that demands the password...
Started by Christian on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at superuser):
When it starts normally, does it run without issue until you.
That sometimes the machine starts normally.
|
|
How long does one normally have to wait for facebook to approve an application? What has been your experience.
I you have submitted an app on facebook please post how long it took you app to be accepted.
Please do not vote to close: this is related to...
Started by Jamey McElveen on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
My main point....
I've never been accepted in less than a week, but it's never been much more than that either .
I'll second what ceejayoz says.
I've heard of them being approved anywhere between one day and a month .
The only real answer here is "it depends".
|
|
I have a little example Rails app called tickets, which views and edits fictional tickets sold to various customers. In tickets_controller.rb, inside def index , I have this standard line, generated by scaffolding:
@tickets = Ticket.find(:all)
To sort...
Started by Nathan Long on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Use :order => 'criteria' for anything simple that....
You should take advantage of the features offered by the RDBMS when you're able to do so .
I specify an order in the ActiveRecord finder or in the model association because sorting using SQL is faster .
|
|
When defining a custom operator from the limited set of single-character operators that can be both infix and prefix operators ( + - % & ) I decided to use the ampersand, since it's the only one of those operators that I have not so far had occasion to...
Started by Joel Mueller on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
However, note that defining your own unary & operator will not affect this behavior... .
As to your question about "AND patterns", here's a quick example .
This may or may not be a big deal for you .
You won't be able to call methods which take byref parameters .
|
|
Hello All,
I am connecting to TCP/IP port in Asp.Net, basically i have attached a device on this port to which i am reading, it is working fine but on second time when tcp listener tries to start then it generates the above error. can any body guide me...
Started by Mohammad Tanveer on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Your multiple catch blocks may get all scenarios, but I can't easily tell by reading... .
If there are exceptions anywhere in your code, the cleanup may not happen .
You don't make use of the using keyword or finally blocks to ensure your resources are closed .
|
|
Hi
In the following code, I copy a string in to a char* str, which is 10 characters long, using strncpy() .
Now according to strncpy() manual, "Warning: If there is no null byte among the first n bytes of src, the string placed in dest will not be null...
Answer Snippets (Read the full thread at stackoverflow):
Most likely malloc() allocates more memory and puts so-called guard values that happen to contain null bytes or it puts some metadata to be used by free() later and this... .
It just happens that there's a null byte right beyond the end of allocated block .
|
|
Can anyone please help me? I'm very confused now while browsing SmartHome's magnetic contact switches.
While viewing this product I noticed it's advertised as " Sensor is Normally Closed (NC) ". But right after that it states " Contacts are closed when...
Started by Skram0 on
, 8 posts
by 2 people.
Answer Snippets (Read the full thread at smarthome):
I read one ....
Now that product is for security systems and rated as NO .
I have seen many automation-Contact-Switch-Normally-Open/p.aspx
Cool, thanks for helping out.
Switch-Normally-Open/p.aspx
Confusing? Yes ,but not unique to Smarthome.
|