|
Now I've heard the expression maths is the language if the universe; and most languages are based on maths.
But today i got into a heated discussion with my head of department over whether a bachelors degree in Ireland is the same as in America. The result...
Started by OVERTONE on
, 8 posts
by 8 people.
Answer Snippets (Read the full thread at stackoverflow):
Programming languages Self evidently human languages are not the same everywhere, so two different question: are degrees the same everywhere, and are programming languages the same everywhere?
Concerning the first question, degrees....
|
|
In my java project, almost every non-static method I've written is synchronized . I've decided to fix up some code today, by removing most of the synchronized keywords. Right there I created several threading issues that took quite a while to fix, with...
Started by unknown on
, 9 posts
by 9 people.
Answer Snippets (Read the full thread at stackoverflow):
Far better than putting synchronized everywhere but using the same ....
This will just end up causing you pain.
() { b.doSomethingWithFoo(f); } }).start(); }
If you think that putting the "synchronized" keyword everywhere is a good design.
|
|
Hi friends,
I use CodeIgniter, I'm happy with that, but I have a question.
I build my projects under /www/projectname/beta/... directory, so at my code, at many parts like including some images or css files or etc. I have to make ... src="/projectname...
Started by artmania on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
There are two answers to your question:
Set your variables as array fields of $config in application/config/config.php and access them with $this->config->item('name');
Use the URL-helper (Or $this->config->item('base_url')) to get the current... .
|
Ask your Facebook Friends
|
I wrote a very simple perl script, and now I want to make it executable from everywhere.
I know I could just drop it into /bin/, rename it from 'mytest.pl' -> 'mytest', and chmod +x, but is this standard practice? I noticed nothing in /bin/ is a perl...
Started by aidan on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
As far as logging to /var/logs/mytest/*, you can try to make the script suid (this is sometimes not allowed for security) with a user... .
It is preferable to put user-made scripts in /usr/local/bin , but it's your call whether it's worth worrying about this .
|
|
So I'm writing a small gem and I have a '/tasks' dir in it with some specific rake tasks. How do I make those tasks available automatically everywhere, where the gem is required? For example I wish I could run 'rake mygemrake:task' inside my rails root...
Started by snitko on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
The task is defined in ruby instead of the rake build language and can be required like so:
require 'rake' # the gem require 'rake/rdoctask' # the task
You can't... .
Check out the rdoctask in rake for an example of how to define a task provided by a gem .
|
|
How can I set variables that work everywhere? My .bashrc has:
Questions='/Users/User/Stackoverflow/Questions' Address='My address'
My file has:
$Questions $Addres
The command "$ cat my_file" in Shell prints "$Questions" and "$Address", instead of "/Users...
Started by Masi on
, 8 posts
by 8 people.
Answer Snippets (Read the full thread at stackoverflow):
If it ....
You just can't.
You just can't have a text file, cat out it's content and expect the environments variables to be parsed .
After re-iterating I now see your problem.
If so, try calling them with ${VAR_NAME}.
Type env see if the variables exist.
|
|
I notice, in C# i use very short variable names EVERYWHERE. My code is polluted with
foreach(var (v|f|i) in SOMETHING) for(int (i|n|z)=0 var (ret|r) = blah(); ... return ret; var sw = new StringWriter(); using(var r = cmd.ExecuteNonQuery()) { while(r....
Started by acidzombie24 on
, 16 posts
by 16 people.
Answer Snippets (Read the full thread at stackoverflow):
I recall hearing that we ought all code as if the next person to manage our project is a psychopathic killer who knows where... .
Your code should be effortlessly intelligible.
Unless your code is minified, you shouldn't see vars like this all over the place .
|
|
I'm writing a command line program in ANSI C to parse a Quake 2 map file to report how many entities and textures are being used. My development machine is MacBook. I'm testing on OS X Snow Leopard (32-bit), Windows XP (32-bit) and Vista (64-bit), and...
Started by C.D. Reimer on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
Lint can be a good.
Than that, as Ken's comment said, "write-once-test-everywhere is a fact of life".
|
|
Hi,
See the example below: it shows lines of text in a table (there's a good reason for this, but that's not the issue here).
Basically, all I need is a function that alert()'s me the perfect coordinates of the text selection when I click on the link....
Started by Bernard Modriken on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
InnerText works in IE and textContent....
You could easily make it work in all browsers as well by checking for .innerText and using that if it exists, otherwise use .textContent .
You can use the .textContent property to get just the text values without the HTML .
|
|
The Rain in Texas is Mostly Well, Everywhere The Rain in Texas is Mostly Well, Everywhere
http://stateimpact.npr.org/texas/2012/01/10/the-rain-in-texas-is-mostly-well-everywhere/
A "gun free zone" is tyrannys playground.
Started by matefrio on
, 18 posts
by 15 people.
Answer Snippets (Read the full thread at texasguntalk):
Re: The Rain in Texas is Mostly Well, Everywhere is Mostly Well, Everywhere All ....
Re: The Rain in Texas is Mostly Well, Everywhere Midland/Odesssa area has had 9-10 inches of snow Because it makes us look cultured and smart n shit.
|