|
This is just a simple check to see what letter grade to output. Is there any faster and more efficient way to achieve the objective?
if ( $grade >= 90 ) { echo "A"; } elseif ( $grade >= 80 ) { echo "B"; } elseif ( $grade >= 70 ) { echo "C"; }...
Started by Doug on
, 7 posts
by 7 people.
Answer Snippets (Read the full thread at stackoverflow):
$grade=87; $grades=array("A"=>range(95,100),"B"=>range(80,94),"C"=>range....
It's the most clear to read, and performance wise it's too fast to matter .
I'm sure there are weird ninja ways to do what you're doing, but yours is certainly the best .
|
|
Ok here's the rhubarb - I'm working on an application that has been written in VB6 (in which I have less than 1 month's experience), and the gist of the application is it's a simple database select/update type of app.
Basically all it does is you can ...
Started by Jordan on
, 8 posts
by 8 people.
Answer Snippets (Read the full thread at stackoverflow):
Do not attempt to refactor it to a better approach.
Needed as carefully but as expediently as you can.
|
|
Very simple. Are you better off today than you were three years ago?
And if you are and believe Obama is responsible for it, vote for the Food Stamp President.
If not, vote for the new guy.
That is how it should be framed.
:smoke:
Started by ncbullgator on
, 20 posts
by 15 people.
Answer Snippets (Read the full thread at gatorcountry):
I'm better....
I am better off by a little bit but then I never blamed Obama for the downturn in my and my wife's income in the White House.
It's just not that simple.
NO....I'm not better off...and very worried about the future.
|
Ask your Facebook Friends
|
Hi everybody,
In most projects I have participated, the choice of an asynchronous solution has been a source of much discussion ...
Each time a single entity bean was enough to manage a queue: we just store a message (ticket) in a table and a processing...
Started by ajeanson on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Otherwise it will require a locking scheme so that the same message... .
What interest we have to use JMS? What are the benefits of JMS ? 2) In which situation prefering JMS versus entity bean ?
You approach works well as long as there is only one consumer .
|
|
Snow Patrol-Shut your eyes
I could hear that bass line coming from a live band miles down the road and instantly recognize it. With as much Hadrien, Manring and other technical music im glued to at the moment, that bassline still makes me stop and say...
Started by austentaciousC on
, 13 posts
by 12 people.
Answer Snippets (Read the full thread at talkbass):
That's why I love the bass - a single whole .
That's why Radiohead album - does that count as simple? its excellent.
"Separator" on the new Radiohead album - does that count as simple? its excellent.
Baltimore".
|
|
Started by effieokay on
, 202 posts
by 122 people.
Answer Snippets (Read the full thread at reddit):
I feel....
I gave up soda the day after xmas...well I still mix time you did yesterday? This .
Or better yet, tea! Anti-oxidants, and it's soothing have more energy, sleep better, feel better.
Booze with water is a dangerous proposition.
|
|
See also " WCF push to client through firewall "
I need to have a WCF client that connect to a WCF server, then when some of the data changes on the server the clients need to update its display.
As there is likely to be a firewall between the clients...
Started by Ian Ringrose on
, 6 posts
by 6 people.
Answer Snippets (Read the full thread at stackoverflow):
I've used this ....
Google for " WCF duplex ".
Since you have WCF foundation already in place, just add an operation for that .
IF the server cannot call the client (and it shouldn't usually) you should have the client polling the server as you specified .
|
|
It seems that this simple shuffle algorithm will produce biased results:
# suppose $arr is filled with 1 to 52 for ($i < 0; $i < 52; $i++) { $j = rand(0, 51); # swap the items $tmp = $arr[j]; $arr[j] = $arr[i]; $arr[i] = $tmp; }
you can try it.....
Started by Jian Lin on
, 12 posts
by 12 people.
Answer Snippets (Read the full thread at stackoverflow):
:)
The simple answer is that there are 52^52 possible ways for this algorithm to run) lassevk's answer shows the distribution among....
Sorry.
The distribution is not the uniform distribution (for which the divisibility answer is a simple one.
|
|
Could anyone comment on how the PCM1794 sounds in relation to the PS1's AKM4309AVM??
I am asking because I am looking to build an affordable DAC unit-- the PCM1794 has been recommended. However, it requires a relatively complex output stage to fullfill...
Started by sfasf on
, 6 posts
by 5 people.
Answer Snippets (Read the full thread at diyaudio):
AKM4309 is a nice simple DAC.
And yes, it needs quality OpAmps to achieve the PCM1793 or PCM1781 (this one has really simple output).
Is this a real question?? Of course is better.
|
|
To some this may sound corny or maybe sappy but I am going to lay it out there anyway. Long ago when my children were small as I sent them out the door to school each morning I always said as I kissed them goodbye, " Do something nice for someone today...
Started by goldjammer69 on
, 9 posts
by 8 people.
Answer Snippets (Read the full thread at ebay):
My niece ....
Unfortunately, in today's world, it is "against school policy" for teachers or school staff to hug the children .
You may never know what the results are, but you always know how you feel after you have done it .
Pay it forward" always works.
|