[PHP] Re: PHP Brain Teasers

2008-08-06 Thread tedd
At 12:51 PM -0400 8/5/08, Daniel Brown wrote: On Tue, Jun 26, 2007 at 1:44 PM, Daniel Brown <[EMAIL PROTECTED]> wrote: Try to use some really common phrases that all of us around the world should recognize, but feel free to get really elaborate with the > code. function getToDoList($wif

[PHP] Re: PHP Brain Teasers

2008-08-05 Thread Daniel Brown
On Tue, Jun 26, 2007 at 1:44 PM, Daniel Brown <[EMAIL PROTECTED]> wrote: > > Try to use some really common phrases that all of us around the > world should recognize, but feel free to get really elaborate with the > code. -- More full-root dedicated server packages: Intel 2.4GHz/60GB/512

Re: [PHP] Re: PHP Brain Teasers

2008-01-04 Thread Daniel Brown
On Jul 20, 2007 1:09 PM, Daniel Brown <[EMAIL PROTECTED]> wrote: > This isn't necessarily a brain-teaser, but it's still pretty cool. > Dice (the employment site) has a new advertisement out there that > says the following: > > > What's missing from your job? > > format = 'The %2s contai

Re: [PHP] Re: PHP Brain Teasers

2007-07-20 Thread tedd
At 2:09 PM -0400 7/20/07, Daniel Brown wrote: This isn't necessarily a brain-teaser, but it's still pretty cool. In similar fashion, I tell clients, you can have: a) Quality; b) Cheap; c) Quick; Pick any two. Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://

Re: [PHP] Re: PHP Brain Teasers

2007-07-20 Thread Daniel Brown
This isn't necessarily a brain-teaser, but it's still pretty cool. Dice (the employment site) has a new advertisement out there that says the following: What's missing from your job? I thought it was a pretty simple for of genius, so to speak. -- Daniel P. Brown [office] (570-

Re: [PHP] Re: PHP Brain Teasers

2007-07-13 Thread Daniel Brown
On 7/13/07, Robert Cummings <[EMAIL PROTECTED]> wrote: But more importantly there's an omission of the concept of "both ways" ;) Ha! I was thinking exactly the same thing! -- Daniel P. Brown [office] (570-) 587-7080 Ext. 272 [mobile] (570-) 766-8107 -- PHP General Mailing List (http://www

Re: [PHP] Re: PHP Brain Teasers

2007-07-13 Thread Robert Cummings
On Fri, 2007-07-13 at 01:59 -0500, Richard Lynch wrote: > On Thu, July 12, 2007 10:20 am, Daniel Brown wrote: > > On 7/12/07, Robert Cummings <[EMAIL PROTECTED]> wrote: > >> G... must be nice, some of us had to toil 18 hours a day > >> sweeping > >> chimneys! > >> > >> ;) > >> > >> Cheers, > >>

Re: [PHP] Re: PHP Brain Teasers

2007-07-13 Thread Richard Lynch
On Thu, July 12, 2007 10:26 am, Robert Cummings wrote: > On Thu, 2007-07-12 at 11:20 -0400, Daniel Brown wrote: >> On 7/12/07, Robert Cummings <[EMAIL PROTECTED]> wrote: >> > G... must be nice, some of us had to toil 18 hours a day >> sweeping >> > chimneys! >> > >> > ;) >> > >> > Cheers, >> >

Re: [PHP] Re: PHP Brain Teasers

2007-07-13 Thread Richard Lynch
On Thu, July 12, 2007 10:20 am, Daniel Brown wrote: > On 7/12/07, Robert Cummings <[EMAIL PROTECTED]> wrote: >> G... must be nice, some of us had to toil 18 hours a day >> sweeping >> chimneys! >> >> ;) >> >> Cheers, >> Rob. > > What do you mean "us"? Weren't you born before they invented

Re: [PHP] Re: PHP Brain Teasers

2007-07-12 Thread Tijnema
On 7/12/07, Jon Anderson <[EMAIL PROTECTED]> wrote: Daniel Brown wrote: >Did you come before or after the chicken egg? > Relevant to the above: $a = array('Chicken','Egg'); echo "The " . $a[array_rand($a)] . " comes first."; I appologize if this one's already been done...I've only glanced a

Re: [PHP] Re: PHP Brain Teasers

2007-07-12 Thread Daniel Brown
On 7/12/07, Robert Cummings <[EMAIL PROTECTED]> wrote: > > I wasn't born silly-ass, I was hatched. >:) > > Did you come before or after the chicken egg? After the first one, but I fried it up and so earth had to wait another couple of million years for a chicken to evolve again. Ah, so t

Re: [PHP] Re: PHP Brain Teasers

2007-07-12 Thread Jon Anderson
Daniel Brown wrote: Did you come before or after the chicken egg? Relevant to the above: $a = array('Chicken','Egg'); echo "The " . $a[array_rand($a)] . " comes first."; I appologize if this one's already been done...I've only glanced at a few entries in this thread, entertaining though i

Re: [PHP] Re: PHP Brain Teasers

2007-07-12 Thread Robert Cummings
On Thu, 2007-07-12 at 17:06 +0200, Tijnema wrote: > On 7/12/07, Daniel Brown <[EMAIL PROTECTED]> wrote: > > On 7/12/07, Colin Guthrie <[EMAIL PROTECTED]> wrote: > > > Thijs Lensselink wrote: > > > >> > > >> $evil[] = "6"; > > > >> $evil[] = "6"; > > > >> $evil[] = "6"; > > > >> for($i=0;$i > > >>

Re: [PHP] Re: PHP Brain Teasers

2007-07-12 Thread Daniel Brown
On 7/12/07, Tijnema <[EMAIL PROTECTED]> wrote: On 7/12/07, Daniel Brown <[EMAIL PROTECTED]> wrote: > On 7/12/07, Tijnema <[EMAIL PROTECTED]> wrote: > > You can probably remember the good old time of being a child and > > having holiday ;) > > > > Tijnema > > -- > > Vote for PHP Color Coding in Gm

Re: [PHP] Re: PHP Brain Teasers

2007-07-12 Thread Tijnema
On 7/12/07, Daniel Brown <[EMAIL PROTECTED]> wrote: On 7/12/07, Tijnema <[EMAIL PROTECTED]> wrote: > You can probably remember the good old time of being a child and > having holiday ;) > > Tijnema > -- > Vote for PHP Color Coding in Gmail! -> http://gpcc.tijnema.info > Don't rub it in, Tijne

Re: [PHP] Re: PHP Brain Teasers

2007-07-12 Thread Daniel Brown
On 7/12/07, Tijnema <[EMAIL PROTECTED]> wrote: You can probably remember the good old time of being a child and having holiday ;) Tijnema -- Vote for PHP Color Coding in Gmail! -> http://gpcc.tijnema.info Don't rub it in, Matijn ;-P -- Daniel P. Brown [office] (570-) 587-7080 Ext. 272

Re: [PHP] Re: PHP Brain Teasers

2007-07-12 Thread Stut
Robert Cummings wrote: On Thu, 2007-07-12 at 11:20 -0400, Daniel Brown wrote: On 7/12/07, Robert Cummings <[EMAIL PROTECTED]> wrote: G... must be nice, some of us had to toil 18 hours a day sweeping chimneys! ;) Cheers, Rob. What do you mean "us"? Weren't you born before they invent

Re: [PHP] Re: PHP Brain Teasers

2007-07-12 Thread Robert Cummings
On Thu, 2007-07-12 at 11:27 -0400, Daniel Brown wrote: > On 7/12/07, Robert Cummings <[EMAIL PROTECTED]> wrote: > > On Thu, 2007-07-12 at 11:20 -0400, Daniel Brown wrote: > > > On 7/12/07, Robert Cummings <[EMAIL PROTECTED]> wrote: > > > > G... must be nice, some of us had to toil 18 hours a da

Re: [PHP] Re: PHP Brain Teasers

2007-07-12 Thread Daniel Brown
On 7/12/07, Robert Cummings <[EMAIL PROTECTED]> wrote: On Thu, 2007-07-12 at 11:20 -0400, Daniel Brown wrote: > On 7/12/07, Robert Cummings <[EMAIL PROTECTED]> wrote: > > G... must be nice, some of us had to toil 18 hours a day sweeping > > chimneys! > > > > ;) > > > > Cheers, > > Rob. > >

Re: [PHP] Re: PHP Brain Teasers

2007-07-12 Thread Robert Cummings
On Thu, 2007-07-12 at 11:20 -0400, Daniel Brown wrote: > On 7/12/07, Robert Cummings <[EMAIL PROTECTED]> wrote: > > G... must be nice, some of us had to toil 18 hours a day sweeping > > chimneys! > > > > ;) > > > > Cheers, > > Rob. > > What do you mean "us"? Weren't you born before they i

RE: [PHP] Re: PHP Brain Teasers

2007-07-12 Thread Jay Blanchard
[snip] > >> >> $evil[] = "6"; > >> $evil[] = "6"; > >> $evil[] = "6"; > >> for($i=0;$i >> $_ = sqrt($evil); > >> } > >> ?> It was supposed to be "money is the root of all evil," but the code above wouldn't work correctly anyway, as each time through the for() loop it'll try to get the squ

Re: [PHP] Re: PHP Brain Teasers

2007-07-12 Thread Daniel Brown
On 7/12/07, Robert Cummings <[EMAIL PROTECTED]> wrote: G... must be nice, some of us had to toil 18 hours a day sweeping chimneys! ;) Cheers, Rob. What do you mean "us"? Weren't you born before they invented the chimney? -- Daniel P. Brown [office] (570-) 587-7080 Ext. 272 [mobile] (

Re: [PHP] Re: PHP Brain Teasers

2007-07-12 Thread Tijnema
On 7/12/07, Daniel Brown <[EMAIL PROTECTED]> wrote: On 7/12/07, Colin Guthrie <[EMAIL PROTECTED]> wrote: > Thijs Lensselink wrote: > >> >> $evil[] = "6"; > >> $evil[] = "6"; > >> $evil[] = "6"; > >> for($i=0;$i >> $_ = sqrt($evil); > >> } > >> ?> It was supposed to be "money is the root

Re: [PHP] Re: PHP Brain Teasers

2007-07-12 Thread Daniel Brown
On 7/12/07, Colin Guthrie <[EMAIL PROTECTED]> wrote: Thijs Lensselink wrote: >> > $evil[] = "6"; >> $evil[] = "6"; >> $evil[] = "6"; >> for($i=0;$i> $_ = sqrt($evil); >> } >> ?> It was supposed to be "money is the root of all evil," but the code above wouldn't work correctly anyway, as e

[PHP] Re: PHP Brain Teasers

2007-07-12 Thread Colin Guthrie
Thijs Lensselink wrote: >> > $evil[] = "6"; >> $evil[] = "6"; >> $evil[] = "6"; >> for($i=0;$i> $_ = sqrt($evil); >> } >> ?> >> That also illustrates to newbies the allowance of using an >> underscore as a variable. (Thank God it's almost Friday) Thank _God_ it's Friday??? Covering all

Re: [PHP] Re: PHP Brain Teasers

2007-07-12 Thread Thijs Lensselink
On Thu, 12 Jul 2007 09:56:18 -0400, "Daniel Brown" <[EMAIL PROTECTED]> wrote: > On 7/12/07, Jay Blanchard <[EMAIL PROTECTED]> wrote: >> [snip] >> Mine was trying to go for an old funk song that starts: >> >> What goes up, must come down. >> Spinning wheel got to go 'round >> Drop all the painted po

Re: [PHP] Re: PHP Brain Teasers

2007-07-12 Thread Daniel Brown
On 7/12/07, Jay Blanchard <[EMAIL PROTECTED]> wrote: [snip] Mine was trying to go for an old funk song that starts: What goes up, must come down. Spinning wheel got to go 'round Drop all the painted ponies by the riverside. [mumble] let the spinning wheel slide. Only later did I realize I broke

RE: [PHP] Re: PHP Brain Teasers

2007-07-12 Thread Jay Blanchard
[snip] Mine was trying to go for an old funk song that starts: What goes up, must come down. Spinning wheel got to go 'round Drop all the painted ponies by the riverside. [mumble] let the spinning wheel slide. Only later did I realize I broke the cardinal rule of Name That Tune and have NO IDEA w

Re: [PHP] Re: PHP Brain Teasers

2007-07-11 Thread Richard Lynch
On Tue, July 3, 2007 3:51 pm, Jochem Maas wrote: > $I = null; sleep(10); $I = rear(); function rear() {}; Looks like a snooze alarm to me... :-) Mine was trying to go for an old funk song that starts: What goes up, must come down. Spinning wheel got to go 'round Drop all the painted ponies by th

Re: [PHP] Re: PHP Brain Teasers

2007-07-07 Thread tedd
At 8:26 PM -0700 7/6/07, [EMAIL PROTECTED] wrote: Isn't this a PHP list? Why is there discussion about chickens? if ($this == "PHP List") { unset('chicken discussion!'); } Because obviously, we occasionally wander off topic. Your php example made your point very well and was within the subje

Re: [PHP] Re: PHP Brain Teasers

2007-07-07 Thread Tijnema
On 7/7/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: Isn't this a PHP list? Why is there discussion about chickens? if ($this == "PHP List") { unset('chicken discussion!'); } Hmm, I'm too bad with this things :( For me, the chicken never predated the chicken egg, and the chicken egg never

Re: [PHP] Re: PHP Brain Teasers

2007-07-06 Thread heavyccasey
Isn't this a PHP list? Why is there discussion about chickens? if ($this == "PHP List") { unset('chicken discussion!'); } On 7/6/07, Robert Cummings <[EMAIL PROTECTED]> wrote: On Fri, 2007-07-06 at 21:40 -0400, tedd wrote: > At 10:24 AM -0400 7/6/07, Robert Cummings wrote: > >On Fri, 2007-07-06

Re: [PHP] Re: PHP Brain Teasers

2007-07-06 Thread Robert Cummings
On Fri, 2007-07-06 at 21:40 -0400, tedd wrote: > At 10:24 AM -0400 7/6/07, Robert Cummings wrote: > >On Fri, 2007-07-06 at 10:08 -0400, tedd wrote: > > > I doubt that one can demarcate the non-chicken parents from the > >> chicken offspring. So... it is perplexing. > > > >We don't need to demarca

Re: [PHP] Re: PHP Brain Teasers

2007-07-06 Thread Tijnema
On 7/7/07, tedd <[EMAIL PROTECTED]> wrote: At 4:16 PM +0200 7/6/07, Tijnema wrote: >From which point in the evolution do you call it a chicken egg? See it >like bytes, is a fish egg, and is a chicken egg, >then it went from fish egg to chicken egg like this: >0001 >0011

Re: [PHP] Re: PHP Brain Teasers

2007-07-06 Thread tedd
At 4:16 PM +0200 7/6/07, Tijnema wrote: From which point in the evolution do you call it a chicken egg? See it like bytes, is a fish egg, and is a chicken egg, then it went from fish egg to chicken egg like this: 0001 0011 0111 0001 0011 0111 111

Re: [PHP] Re: PHP Brain Teasers

2007-07-06 Thread tedd
At 10:24 AM -0400 7/6/07, Robert Cummings wrote: On Fri, 2007-07-06 at 10:08 -0400, tedd wrote: > I doubt that one can demarcate the non-chicken parents from the chicken offspring. So... it is perplexing. We don't need to demarcate, we only need to know that it happened. Yes, but knowing t

Re: [PHP] Re: PHP Brain Teasers

2007-07-06 Thread Robert Cummings
On Fri, 2007-07-06 at 10:08 -0400, tedd wrote: > At 11:00 PM -0400 7/5/07, Robert Cummings wrote: > >On Thu, 2007-07-05 at 22:44 -0400, tedd wrote: > >> At 4:48 PM -0400 7/5/07, Daniel Brown wrote: > >> >On 7/5/07, Robert Cummings <[EMAIL PROTECTED]> wrote: > >> >>On Thu, 2007-07-05 at 15:04 -05

Re: [PHP] Re: PHP Brain Teasers

2007-07-06 Thread Daniel Brown
On 7/6/07, Paul Novitski <[EMAIL PROTECTED]> wrote: Without bothering to run the code I'd say a tisket, a tasket, a green and yellow basket. Very close. The RGB values actually give away the colors (brown and yellow), and through string replacement and appending, the words `task` and `ticke

Re: [PHP] Re: PHP Brain Teasers

2007-07-06 Thread Tijnema
On 7/6/07, tedd <[EMAIL PROTECTED]> wrote: At 11:00 PM -0400 7/5/07, Robert Cummings wrote: >On Thu, 2007-07-05 at 22:44 -0400, tedd wrote: >> At 4:48 PM -0400 7/5/07, Daniel Brown wrote: >> >On 7/5/07, Robert Cummings <[EMAIL PROTECTED]> wrote: >> >>On Thu, 2007-07-05 at 15:04 -0500, Kaleb Po

Re: [PHP] Re: PHP Brain Teasers

2007-07-06 Thread Paul Novitski
At 7/5/2007 01:45 PM, Daniel Brown wrote: $objects->original_image = "http://www.sewterific.com/images/Just%20Baskets/SmPicnicBasket.jpg";; $_SCRIPT[word] = "task"; $_SCRIPT[otherword] = "ticket"; $update_word1 = $_SCRIPT[word]."et"; $rgb1 = "134,89,32"; $rgb2 = "231,223,48"; $objects->paint(

Re: [PHP] Re: PHP Brain Teasers

2007-07-06 Thread tedd
At 11:00 PM -0400 7/5/07, Robert Cummings wrote: On Thu, 2007-07-05 at 22:44 -0400, tedd wrote: At 4:48 PM -0400 7/5/07, Daniel Brown wrote: >On 7/5/07, Robert Cummings <[EMAIL PROTECTED]> wrote: >>On Thu, 2007-07-05 at 15:04 -0500, Kaleb Pomeroy wrote: >>> Which came first, the chicken or

RE: [PHP] Re: PHP Brain Teasers

2007-07-06 Thread Kaleb Pomeroy
A ticket, a tasket, a red and yellow basket -Original Message- From: Jochem Maas [mailto:[EMAIL PROTECTED] Sent: Friday, July 06, 2007 2:59 AM To: Daniel Brown Cc: Larry Garfield; php-general@lists.php.net Subject: Re: [PHP] Re: PHP Brain Teasers Daniel Brown wrote: >Let&#x

[PHP] Re: PHP Brain Teasers

2007-07-06 Thread Colin Guthrie
tedd wrote: > $actions > $words It pretty much goes without saying. So I wont. My actions say it for me without words. Col -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: PHP Brain Teasers

2007-07-06 Thread Colin Guthrie
Jochem Maas wrote: > Daniel Brown wrote: >>Let's get obscure try to guess it before running the code. It >> actually shouldn't be difficult. > > I tried to figure it out - I couldn't, I ran the code and I still don't > get it. oh well :-) I'm guessing it's related to "Don't put all your

Re: [PHP] Re: PHP Brain Teasers

2007-07-06 Thread Jochem Maas
Daniel Brown wrote: >Let's get obscure try to guess it before running the code. It > actually shouldn't be difficult. I tried to figure it out - I couldn't, I ran the code and I still don't get it. oh well :-) > > > class Brainteaser { >function > paint($original_image,$rgb_string

Re: [PHP] Re: PHP Brain Teasers

2007-07-05 Thread Robert Cummings
On Thu, 2007-07-05 at 22:44 -0400, tedd wrote: > At 4:48 PM -0400 7/5/07, Daniel Brown wrote: > >On 7/5/07, Robert Cummings <[EMAIL PROTECTED]> wrote: > >>On Thu, 2007-07-05 at 15:04 -0500, Kaleb Pomeroy wrote: > >>> Which came first, the chicken or the egg? > >> > >>The egg, fish were laying them

Re: [PHP] Re: PHP Brain Teasers

2007-07-05 Thread tedd
At 4:48 PM -0400 7/5/07, Daniel Brown wrote: On 7/5/07, Robert Cummings <[EMAIL PROTECTED]> wrote: On Thu, 2007-07-05 at 15:04 -0500, Kaleb Pomeroy wrote: Which came first, the chicken or the egg? The egg, fish were laying them long before chickens walked the earth :) Yeah, good point,

Re: [PHP] Re: PHP Brain Teasers

2007-07-05 Thread Robert Cummings
On Thu, 2007-07-05 at 22:37 -0400, tedd wrote: > At 4:17 PM -0400 7/5/07, Robert Cummings wrote: > >On Thu, 2007-07-05 at 16:08 -0400, Daniel Brown wrote: > >> > >> That's the question that still perplexes even the greatest of minds. > > > >I've never found it very perplexing :| > > > >Cheers, > >

Re: [PHP] Re: PHP Brain Teasers

2007-07-05 Thread tedd
At 4:17 PM -0400 7/5/07, Robert Cummings wrote: On Thu, 2007-07-05 at 16:08 -0400, Daniel Brown wrote: That's the question that still perplexes even the greatest of minds. I've never found it very perplexing :| Cheers, Rob. Yeah, but he did say the "greatest" of minds. :-) Cheers, ted

[PHP] Re: PHP Brain Teasers

2007-07-05 Thread Colin Guthrie
Chris Boget wrote: > I wasn't sure if this one was done well enough; I guess it wasn't. The > answer is 'Dropping like flies'. :p Well you can't make it too easy... I like it :) (didn't get it but I like it!!) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.p

Re: [PHP] Re: PHP Brain Teasers

2007-07-05 Thread Robert Cummings
On Thu, 2007-07-05 at 16:08 -0400, Daniel Brown wrote: > > That's the question that still perplexes even the greatest of minds. I've never found it very perplexing :| Cheers, Rob. -- .. | InterJinn Application Framework - http://www.int

Re: [PHP] Re: PHP Brain Teasers

2007-07-05 Thread Daniel Brown
On 7/5/07, Robert Cummings <[EMAIL PROTECTED]> wrote: On Thu, 2007-07-05 at 15:04 -0500, Kaleb Pomeroy wrote: > Which came first, the chicken or the egg? The egg, fish were laying them long before chickens walked the earth :) Yeah, good point, smartass. ;-P -- Daniel P. Brown [office] (57

Re: [PHP] Re: PHP Brain Teasers

2007-07-05 Thread Daniel Brown
Let's get obscure try to guess it before running the code. It actually shouldn't be difficult. original_image = "http://www.sewterific.com/images/Just%20Baskets/SmPicnicBasket.jpg";; $_SCRIPT[word] = "task"; $_SCRIPT[otherword] = "ticket"; $update_word1 = $_SCRIPT[word]."et"; $rgb1 = "

RE: [PHP] Re: PHP Brain Teasers

2007-07-05 Thread Robert Cummings
On Thu, 2007-07-05 at 15:04 -0500, Kaleb Pomeroy wrote: > Which came first, the chicken or the egg? The egg, fish were laying them long before chickens walked the earth :) Cheers, Rob. -- .. | InterJinn Application Framework - http://ww

Re: [PHP] Re: PHP Brain Teasers

2007-07-05 Thread Daniel Brown
On 7/5/07, tedd <[EMAIL PROTECTED]> wrote: $which = isset($_GET['chicken']) ? $_GET['egg'] : null; Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub

RE: [PHP] Re: PHP Brain Teasers

2007-07-05 Thread Kaleb Pomeroy
Which came first, the chicken or the egg? -Original Message- From: tedd [mailto:[EMAIL PROTECTED] Sent: Thursday, July 05, 2007 2:56 PM To: php-general@lists.php.net Subject: Re: [PHP] Re: PHP Brain Teasers $which = isset($_GET['chicken']) ? $_GET['egg'] :

Re: [PHP] Re: PHP Brain Teasers

2007-07-05 Thread tedd
$which = isset($_GET['chicken']) ? $_GET['egg'] : null; Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: PHP Brain Teasers

2007-07-05 Thread Robert Cummings
On Thu, 2007-07-05 at 10:19 -0400, Daniel Brown wrote: > An easy one going on a previous theme. And see? Every so often, > I come up with some good ideas like this thread albeit more > intrusive than productive :-\ > > > global $eggs; > global $chickens; > > function hatch($eggs)

Re: [PHP] Re: PHP Brain Teasers

2007-07-05 Thread Daniel Brown
On 7/4/07, Robert Cummings <[EMAIL PROTECTED]> wrote: On Wed, 2007-07-04 at 19:38 +0100, Colin Guthrie wrote: > Robert Cummings wrote: > > For every action there is an equal and opposite reaction. Thanks Abe, > > Sir Abraham Newton - father of modern mechanics! It's the new physics where you hav

Re: [PHP] Re: PHP Brain Teasers

2007-07-04 Thread Robert Cummings
On Wed, 2007-07-04 at 19:38 +0100, Colin Guthrie wrote: > Robert Cummings wrote: > > For every action there is an equal and opposite reaction. Thanks Abe, > > Sir Abraham Newton - father of modern mechanics! It's the new physics where you have to lobby to get things to move :/ Cheers, Rob. -- .

[PHP] Re: PHP Brain Teasers

2007-07-04 Thread Colin Guthrie
Robert Cummings wrote: > For every action there is an equal and opposite reaction. Thanks Abe, Sir Abraham Newton - father of modern mechanics! :p -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: PHP Brain Teasers

2007-07-04 Thread Robert Cummings
On Wed, 2007-07-04 at 14:26 -0400, Robert Cummings wrote: > On Wed, 2007-07-04 at 12:31 -0500, Larry Garfield wrote: > > On Wednesday 04 July 2007, tedd wrote: > > > Try this: > > > > > > -(4 * 20 + 7) > > > > > > tedd > > > > "Four score and seven years ago..." Thanks Abe. :-) > > > > > > Try

Re: [PHP] Re: PHP Brain Teasers

2007-07-04 Thread Robert Cummings
On Wed, 2007-07-04 at 12:31 -0500, Larry Garfield wrote: > On Wednesday 04 July 2007, tedd wrote: > > Try this: > > > > -(4 * 20 + 7) > > > > tedd > > "Four score and seven years ago..." Thanks Abe. :-) > > > Try this one: > > foreach ($actions as $action) { > $actions[] = -$action; > } > >

[PHP] Re: PHP Brain Teasers

2007-07-04 Thread Colin Guthrie
Larry Garfield wrote: > Try this one: > > foreach ($actions as $action) { > $actions[] = -$action; > } > > This is fun. :-) Every action has an equal and opposite reaction! I think I'm addicted. We should publish a book. It would rival sudoku! Col -- PHP General Mailing List (http://www.ph

Re: [PHP] Re: PHP Brain Teasers

2007-07-04 Thread Larry Garfield
On Wednesday 04 July 2007, tedd wrote: > Try this: > > -(4 * 20 + 7) > > tedd "Four score and seven years ago..." Thanks Abe. :-) Try this one: foreach ($actions as $action) { $actions[] = -$action; } This is fun. :-) -- Larry Garfield AIM: LOLG42 [EMAIL PROTECTED]

Re: [PHP] Re: PHP Brain Teasers

2007-07-04 Thread Stut
Colin Guthrie wrote: Stut wrote: class Here { private $chickens; } -Stut What you do in your private live with chickens is a mystery to us all Stut.. :p "Nobody 'ere but us chickens." -Stut -- http://stut.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, vis

[PHP] Re: PHP Brain Teasers

2007-07-04 Thread Colin Guthrie
Stut wrote: > class Here > { > private $chickens; > } > > -Stut What you do in your private live with chickens is a mystery to us all Stut.. :p Col -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: PHP Brain Teasers

2007-07-04 Thread Zoltán Németh
2007. 07. 4, szerda keltezéssel 16.20-kor Colin Guthrie ezt írta: > Jochem Maas wrote: > > this one should be easy: > > > > function work($v) { echo "$v,"; } > > foreach(array_merge(range(9,12),range(1,5)) as $ing) > > work($ing); > > > > > Workin' 9 til' 5 > > > On a similar theme: > >

[PHP] Re: PHP Brain Teasers

2007-07-04 Thread Colin Guthrie
Jochem Maas wrote: > this one should be easy: > > function work($v) { echo "$v,"; } > foreach(array_merge(range(9,12),range(1,5)) as $ing) > work($ing); > Workin' 9 til' 5 On a similar theme: function jack($all) { static int $play = 0; if ($all == 'work' && !$play) return 'dull

Re: [PHP] Re: PHP Brain Teasers

2007-07-04 Thread Jochem Maas
this one should be easy: function work($v) { echo "$v,"; } foreach(array_merge(range(9,12),range(1,5)) as $ing) work($ing); -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: PHP Brain Teasers

2007-07-04 Thread tedd
Hi, there are two in this one :- function Cat($Danger = "") { static int $Lives = 9; if (preg_match("/^curiosity$/i", $Danger)) die("Cat Killed"); $Threats = array("dog", "flu", "fall", "drowning"); if (in_array(strtolower($Danger), $Thr

Re: [PHP] Re: PHP Brain Teasers

2007-07-04 Thread tedd
Try this: -(4 * 20 + 7) tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: PHP Brain Teasers (SPOILER)

2007-07-04 Thread Jochem Maas
Colin Guthrie wrote: > Jochem Maas wrote: >> Jochem Maas wrote: >>> three for the price of one, cheap at half the price ... >>> >>> for ($me = 1; $you = $me; $me++); > > One for me and one for you? correct! > Everything that is mine is yours? > To me, to you? > > >>> $u = create_function("\$bo

[PHP] Re: PHP Brain Teasers

2007-07-04 Thread Colin Guthrie
Robert Cummings wrote: > On Tue, 2007-07-03 at 21:26 +0100, David Restall - System Administrator > wrote: >> Hi, >> >> there are two in this one :- >> >> function Cat($Danger = "") >> { >> static int $Lives = 9; >> >> if (preg_match("/^curiosity$/i", $Danger)) >> die("Ca

[PHP] Re: PHP Brain Teasers

2007-07-04 Thread Colin Guthrie
Jochem Maas wrote: > Jochem Maas wrote: >> three for the price of one, cheap at half the price ... >> >> for ($me = 1; $you = $me; $me++); One for me and one for you? Everything that is mine is yours? To me, to you? >> $u = create_function("\$bond", "if (\$bond < 2) echo \"live\"; else die();")

Re: [PHP] Re: PHP Brain Teasers

2007-07-03 Thread Jochem Maas
Jochem Maas wrote: > three for the price of one, cheap at half the price ... > > for ($me = 1; $you = $me; $me++); > > > > $u = create_function("\$bond", "if (\$bond < 2) echo \"live\"; else die();") > $u();$u();$u(); this one here should have been: $u = create_function("\$bon

Re: [PHP] Re: PHP Brain Teasers

2007-07-03 Thread Jochem Maas
three for the price of one, cheap at half the price ... for ($me = 1; $you = $me; $me++); $u = create_function("\$bond", "if (\$bond < 2) echo \"live\"; else die();") $u();$u();$u(); $I = null; sleep(10); $I = rear(); function rear() {}; -- PHP General Maili

Re: [PHP] Re: PHP Brain Teasers

2007-07-03 Thread Robert Cummings
On Tue, 2007-07-03 at 21:26 +0100, David Restall - System Administrator wrote: > Hi, > > there are two in this one :- > > function Cat($Danger = "") > { > static int $Lives = 9; > > if (preg_match("/^curiosity$/i", $Danger)) > die("Cat Killed"); > > $Threat

[PHP] Re: PHP Brain Teasers

2007-07-03 Thread David Restall - System Administrator
Hi, there are two in this one :- function Cat($Danger = "") { static int $Lives = 9; if (preg_match("/^curiosity$/i", $Danger)) die("Cat Killed"); $Threats = array("dog", "flu", "fall", "drowning"); if (in_array(strtolower($Danger), $Thre

[PHP] Re: PHP Brain Teasers

2007-07-03 Thread Colin Guthrie
Robert Cummings wrote: > Your hint was too good :) > > "Can't see the woods for the trees." :D -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: PHP Brain Teasers

2007-07-03 Thread Robert Cummings
On Tue, 2007-07-03 at 21:54 +0200, Tijnema wrote: > On 7/3/07, Robert Cummings <[EMAIL PROTECTED]> wrote: > > On Tue, 2007-07-03 at 21:41 +0200, Tijnema wrote: > > > On 7/3/07, Robert Cummings <[EMAIL PROTECTED]> wrote: > > > > On Tue, 2007-07-03 at 15:26 -0400, Robert Cummings wrote: > > > > > On

Re: [PHP] Re: PHP Brain Teasers

2007-07-03 Thread Tijnema
On 7/3/07, Robert Cummings <[EMAIL PROTECTED]> wrote: On Tue, 2007-07-03 at 21:41 +0200, Tijnema wrote: > On 7/3/07, Robert Cummings <[EMAIL PROTECTED]> wrote: > > On Tue, 2007-07-03 at 15:26 -0400, Robert Cummings wrote: > > > On Tue, 2007-07-03 at 20:18 +0100, Colin Guthrie wrote: > > > > Jay B

Re: [PHP] Re: PHP Brain Teasers

2007-07-03 Thread Robert Cummings
On Tue, 2007-07-03 at 21:41 +0200, Tijnema wrote: > On 7/3/07, Robert Cummings <[EMAIL PROTECTED]> wrote: > > On Tue, 2007-07-03 at 15:26 -0400, Robert Cummings wrote: > > > On Tue, 2007-07-03 at 20:18 +0100, Colin Guthrie wrote: > > > > Jay Blanchard wrote: > > > > > [snip] > > > > > if($x == 0.01

Re: [PHP] Re: PHP Brain Teasers

2007-07-03 Thread Jim Lucas
Colin Guthrie wrote: Robert Cummings wrote: On Tue, 2007-07-03 at 02:17 -0500, Richard Lynch wrote: On Tue, June 26, 2007 7:14 pm, Robert Cummings wrote: On Tue, 2007-06-26 at 17:00 -0700, Eric Newberry wrote: I think I have to answer to this one: 'If at first you don't succeed try, try again

Re: [PHP] Re: PHP Brain Teasers

2007-07-03 Thread Daniel Brown
On 7/3/07, Colin Guthrie <[EMAIL PROTECTED]> wrote: Jay Blanchard wrote: > [snip] > if($x == 0.01 || $x == 1.0){ >$y = "in"; > } > [/snip] > > Anyone? I'm struggling. Col -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Dani

Re: [PHP] Re: PHP Brain Teasers

2007-07-03 Thread Tijnema
On 7/3/07, Robert Cummings <[EMAIL PROTECTED]> wrote: On Tue, 2007-07-03 at 15:26 -0400, Robert Cummings wrote: > On Tue, 2007-07-03 at 20:18 +0100, Colin Guthrie wrote: > > Jay Blanchard wrote: > > > [snip] > > > if($x == 0.01 || $x == 1.0){ > > >$y = "in"; > > > } > > > [/snip] > > > > > >

Re: [PHP] Re: PHP Brain Teasers

2007-07-03 Thread Robert Cummings
On Tue, 2007-07-03 at 15:26 -0400, Robert Cummings wrote: > On Tue, 2007-07-03 at 20:18 +0100, Colin Guthrie wrote: > > Jay Blanchard wrote: > > > [snip] > > > if($x == 0.01 || $x == 1.0){ > > >$y = "in"; > > > } > > > [/snip] > > > > > > Anyone? > > > > > > I'm struggling. > > I'm not

Re: [PHP] Re: PHP Brain Teasers

2007-07-03 Thread Daniel Brown
On 7/3/07, Daniel Brown <[EMAIL PROTECTED]> wrote: On 7/3/07, Colin Guthrie <[EMAIL PROTECTED]> wrote: > Jay Blanchard wrote: > > [snip] > > if($x == 0.01 || $x == 1.0){ > >$y = "in"; > > } > > [/snip] > > > > Anyone? > > > I'm struggling. > > Col > > -- > PHP General Mailing List (http:/

Re: [PHP] Re: PHP Brain Teasers

2007-07-03 Thread Robert Cummings
On Tue, 2007-07-03 at 20:18 +0100, Colin Guthrie wrote: > Jay Blanchard wrote: > > [snip] > > if($x == 0.01 || $x == 1.0){ > >$y = "in"; > > } > > [/snip] > > > > Anyone? > > > I'm struggling. I'm not getting any lightbulbs either :/ Cheers, Rob. -- .--

Re: [PHP] Re: PHP Brain Teasers

2007-07-03 Thread Robert Cummings
On Tue, 2007-07-03 at 20:00 +0100, Colin Guthrie wrote: > Daniel Brown wrote: > >> Ahh well, how about this: > >> > >> >> > >> abstract class wood > >> { > >> protected function the() > >> { > >> > >> } > >> } > >> > >> class thetrees extends wood > >> { > >> public function foo() > >> {

[PHP] Re: PHP Brain Teasers

2007-07-03 Thread Colin Guthrie
Jay Blanchard wrote: > [snip] > if($x == 0.01 || $x == 1.0){ >$y = "in"; > } > [/snip] > > Anyone? I'm struggling. Col -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: PHP Brain Teasers

2007-07-03 Thread Robert Cummings
On Tue, 2007-07-03 at 19:54 +0100, Colin Guthrie wrote: > Robert Cummings wrote: > > On Tue, 2007-07-03 at 02:17 -0500, Richard Lynch wrote: > >> On Tue, June 26, 2007 7:14 pm, Robert Cummings wrote: > >>> On Tue, 2007-06-26 at 17:00 -0700, Eric Newberry wrote: > I think I have to answer to th

[PHP] Re: PHP Brain Teasers

2007-07-03 Thread Colin Guthrie
Daniel Brown wrote: >> Ahh well, how about this: >> >> > >> abstract class wood >> { >> protected function the() >> { >> >> } >> } >> >> class thetrees extends wood >> { >> public function foo() >> { >> } >> } >> >> >> $u = new thetrees(); >> $u->wood(); // Blerg >> >"If a tree fall

Re: [PHP] Re: PHP Brain Teasers

2007-07-03 Thread Daniel Brown
On 7/3/07, Colin Guthrie <[EMAIL PROTECTED]> wrote: Robert Cummings wrote: > On Tue, 2007-07-03 at 02:17 -0500, Richard Lynch wrote: >> On Tue, June 26, 2007 7:14 pm, Robert Cummings wrote: >>> On Tue, 2007-06-26 at 17:00 -0700, Eric Newberry wrote: I think I have to answer to this one: 'If

[PHP] Re: PHP Brain Teasers

2007-07-03 Thread Colin Guthrie
Robert Cummings wrote: > On Tue, 2007-07-03 at 02:17 -0500, Richard Lynch wrote: >> On Tue, June 26, 2007 7:14 pm, Robert Cummings wrote: >>> On Tue, 2007-06-26 at 17:00 -0700, Eric Newberry wrote: I think I have to answer to this one: 'If at first you don't succeed try, try again'.

Re: [PHP] Re: PHP Brain Teasers

2007-06-27 Thread Tijnema
On 6/27/07, Daniel Brown <[EMAIL PROTECTED]> wrote: Hooray! I started a thread that's been able to get beyond 40 posts, and it's not a flame war of wit or a CAPTCHA discussion. haha, the CAPTCHA discussions were nice :) This may be a bit nested and obscure, but it's actually a quote we

Re: [PHP] Re: PHP Brain Teasers

2007-06-27 Thread Daniel Brown
Hooray! I started a thread that's been able to get beyond 40 posts, and it's not a flame war of wit or a CAPTCHA discussion. This may be a bit nested and obscure, but it's actually a quote we see on the list quite often and I get a kick out of it each time I see it. > window.txt');

Re: [PHP] Re: PHP Brain Teasers

2007-06-27 Thread Robert Cummings
On Wed, 2007-06-27 at 16:01 +0100, Stut wrote: > Robert Cummings wrote: > > On Wed, 2007-06-27 at 09:52 -0500, Jay Blanchard wrote: > >> Ignoring the extra $ and moving on... I would code it like this... > >> > >> function think(&$i) > >> { > >> $i = 'am'; > >> } > >> > >> If I call think, the

RE: [PHP] Re: PHP Brain Teasers

2007-06-27 Thread Robert Cummings
On Wed, 2007-06-27 at 09:37 -0500, Jay Blanchard wrote: > [snip] > Just noticed something else though... what function does $return > contain? >:) > [/snip] > > A typo. What else did you notice? Well since you've asked... the braces are all wrong, they should be vertically aligned *ducks and fle

RE: [PHP] Re: PHP Brain Teasers

2007-06-27 Thread Jay Blanchard
[snip] Just noticed something else though... what function does $return contain? >:) [/snip] A typo. What else did you notice? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

  1   2   >