|
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 .
|
|
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".
|
Ask your Facebook Friends
|
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 .
|
|
In all the tutorials I see of using SVN or Git, they always show them updating individual files. I may work on 100 files in 1 day, is it normal to work on many files and at the end of the day, just do 1 commit for all the files instead of doing each file...
Started by jasondavis on
, 10 posts
by 10 people.
Answer Snippets (Read the full thread at stackoverflow):
Just make sure that the code compiles before commiting.
Etc."
It's normal.
It's normal, but sometimes smaller commits are better than and rename F to G).
And merges more complicated later on.
|
|
How can I make an Application look nice and not like an amateur pulled it together?
I mean graphic-wise.
Is there some sort of book you can read regarding beautiful program layouts, etc?
I put this in Community Wiki so please feel free to leave your opinions...
Started by John McClane on
, 22 posts
by 22 people.
Answer Snippets (Read the full thread at stackoverflow):
An idea of where my head is at that my answer to "How do you normally make a program look beautiful.
|
|
On all my Windows servers, except for one machine, when I execute the following code to allocate a temporary files folder:
use CGI; my $tmpfile = new CGITempFile(1); print "tmpfile='", $tmpfile->as_string(), "'\n";
The variable $tmpfile is assigned...
Started by Kev on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
If IIS is executing, check the values in registry for TMP and TEMP under HKEY_USERS/.DEFAULT/Environment
The name of the temporary directory is held ... .
If you're running this script as you, check the %TEMP% environment variable to see if if it differs .
|
|
How can I determine what 'mode' my site is running under?
In this specific case, I have code in the code-behind pages that should act one way in 'release' mode - that is someone navigating there with a browser, and another way if I'm in debug mode coming...
Started by David on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
If you want to know if the application is compiled in debug mode, then you can do this:
... .
If you want to know if the application is currently being debugged, you can check the System.Diagnostics.Debugger.IsAttached property .
I'm not sure what you mean.
|
|
I can't see any provision for this in the django docs, so how do people go about doing this.
My specific case is this.
I have a shopping cart, each cart instance has an invoice number field, however the invoice number is only generated if the cart goes...
Answer Snippets (Read the full thread at stackoverflow):
You can create a field in a model and state it as primary key or use your current primary key if you... .
The default primary key will already be a unique monotonic integer (even in SQLite if you don't delete any records), so you can just use that for it .
|