php-general Digest 6 Jul 2007 14:28:47 -0000 Issue 4888
Topics (messages 258385 through 258418):
Re: PHP Courses in India
258385 by: Nathan Nobbe
Re: PHP Brain Teasers
258386 by: tedd
258387 by: tedd
258388 by: Robert Cummings
258389 by: tedd
258390 by: tedd
258392 by: tedd
258393 by: heavyccasey.gmail.com
258395 by: Robert Cummings
258400 by: Jochem Maas
258401 by: Jochem Maas
258402 by: Colin Guthrie
258403 by: Colin Guthrie
258404 by: Brice
258408 by: Kaleb Pomeroy
258410 by: tedd
258411 by: Paul Novitski
258413 by: Tijnema
258415 by: Daniel Brown
258416 by: Robert Cummings
258417 by: Daniel Brown
Re: About Website Search Engine
258391 by: Robert Cummings
258394 by: Nathan Nobbe
258412 by: tedd
mailparse_msg_extract_part_file error
258396 by: Bruce Cowin
Adding the array in to each element of another one array
258397 by: sivasakthi
258398 by: Jim Lucas
Possible configuration problem w/ php??
258399 by: Jamie Dahl
Re: About DREAMWEAVER
258405 by: Ford, Mike
Re: Suggestion re: PHP Brain Teasers
258406 by: David Robley
258407 by: Jochem Maas
Re: php security books
258409 by: Chris Shiflett
Re: Getting WAY OT now Re: PHP Brain Teasers
258414 by: David Restall - System Administrator
258418 by: Robert Cummings
Administrivia:
To subscribe to the digest, e-mail:
[EMAIL PROTECTED]
To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]
To post to the list, e-mail:
[EMAIL PROTECTED]
----------------------------------------------------------------------
--- Begin Message ---
you might try the online training courses from php
architect<http://hades.phparch.com/socrates/>
.
-nathan
On 7/5/07, Dan <[EMAIL PROTECTED]> wrote:
You go to an institute in India to learn PHP? Isn't it more of a language
that you could get from a book? I know there's been lots of book
discussions on this newsgroup, your English seems pretty good that would
probably be the best option. As far as an institute goes I have no idea.
Sorry I couldn't be more helpfull.
- Dan
""OOzy Pal"" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>I would like to take PHP courses (intermediate to Advance) in India.
> Can someone recommend a good institute anywhere in India?
>
> --
> OOzy
> Ubuntu-Feisty
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
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,
tedd
--
-------
http://sperling.com http://ancientstones.com http://earthstones.com
--- End Message ---
--- Begin Message ---
At 9:20 PM +0100 7/5/07, Chris Boget wrote:
while( TRUE ) {
$actions++;
$words--;
}
$bets = array(1,2,3,4,5);
unset( $bets );
$arr = array( 'this', 'that', 'times' );
$arr[] = 'behind';
for( $i = 0; $i <= 6; $i++ ) {
$deep++;
}
for( $i = 0; $i <= 5; $i++ ) {
$flies--;
}
thnx,
Chris
In similar vein.
$actions > $words
Cheers,
tedd
--
-------
http://sperling.com http://ancientstones.com http://earthstones.com
--- End Message ---
--- Begin Message ---
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,
> >Rob.
>
>
> Yeah, but he did say the "greatest" of minds. :-)
I know *sniffle*.
Cheers,
Rob.
--
.------------------------------------------------------------.
| InterJinn Application Framework - http://www.interjinn.com |
:------------------------------------------------------------:
| An application and templating framework for PHP. Boasting |
| a powerful, scalable system for accessing system services |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for |
| creating re-usable components quickly and easily. |
`------------------------------------------------------------'
--- End Message ---
--- Begin Message ---
2b || !2b
Cheers,
tedd
--
-------
http://sperling.com http://ancientstones.com http://earthstones.com
--- End Message ---
--- Begin Message ---
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, smartass. ;-P
Yeah, fish got all the action back then.
But actually, it was dinosaurs.
Cheers,
tedd
--
-------
http://sperling.com http://ancientstones.com http://earthstones.com
--- End Message ---
--- Begin Message ---
My favorite.
</world>
Cheers,
tedd
--
-------
http://sperling.com http://ancientstones.com http://earthstones.com
--- End Message ---
--- Begin Message ---
To be.. or not to be?
On 7/5/07, tedd <[EMAIL PROTECTED]> wrote:
2b || !2b
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
--- End Message ---
--- Begin Message ---
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 long before chickens walked the earth :)
> >
> > Yeah, good point, smartass. ;-P
>
> Yeah, fish got all the action back then.
>
> But actually, it was dinosaurs.
Ummmmm... fish predate all land creatures according to evolution....
that's not to say something with eggs didn't predate fish, but I'm too
lazy to go look.
But dwelling on the topic, the chicken egg problem is actually stated
incorrectly to some degree, it's a more interesting question to ask:
What came first? The chicken or the chicken egg?
Now this question is only perplexing until you realize that the concept
of "chicken egg" is ambiguous. Is a "chicken egg" an egg that was
created by a chicken, or an egg from which a chicken hatches? As such,
there are two possible answers to the age old question...
Case 1: a "chicken egg" is defined by having been created
by a chicken.
In this case the chicken must have come first :)
Case 2: a "chicken egg" is defined by being an egg from
which a chicken hatches.
In this case the egg comes first since the first
genetic chicken was born from an egg created by
it's direct ancestor that was not a chicken.
See... it's not perplexing at all :)
Cheers,
Rob.
--
.------------------------------------------------------------.
| InterJinn Application Framework - http://www.interjinn.com |
:------------------------------------------------------------:
| An application and templating framework for PHP. Boasting |
| a powerful, scalable system for accessing system services |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for |
| creating re-usable components quickly and easily. |
`------------------------------------------------------------'
--- End Message ---
--- Begin Message ---
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_string1,$rgb_string2,$input1,$input2) {
> header("Content-type: image/png");
> $im = imagecreatefromjpeg($original_image);
> $rgb1 = explode(',',$rgb_string1);
> $rgb2 = explode(',',$rgb_string2);
> $color1 = imagecolorallocate($im,$rgb1[0],$rgb1[1],$rgb1[2]);
> $color2 = imagecolorallocate($im,$rgb2[0],$rgb2[1],$rgb2[2]);
> $px = (imagesx($im) - 7.5 * strlen($input1)) / 2;
> imagestring($im, 50, $px, 90, $input2, $color1);
> imagestring($im, 50, ($px + 30), 120, $input1, $color2);
> imagepng($im);
> imagedestroy($im);
> }
> }
>
> $objects = new Brainteaser();
>
> $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($objects->original_image,$rgb1,$rgb2,$update_word1,str_replace("c","s",$_SCRIPT[otherword]));
>
> ?>
>
--- End Message ---
--- Begin Message ---
tedd wrote:
>
> 2b || !2b
this is not javascript dude.
$_2b | ~$_2b;
that said this is one of the coolest so far, nice one tedd.
>
> Cheers,
>
> tedd
--- End Message ---
--- Begin Message ---
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 eggs in one basket."?
But to be honest the image wasn't too obvious and had "tasket" written
on it :)
Col
--- End Message ---
--- Begin Message ---
tedd wrote:
> $actions > $words
It pretty much goes without saying. So I wont. My actions say it for me
without words.
Col
--- End Message ---
--- Begin Message ---
On 7/6/07, tedd <[EMAIL PROTECTED]> wrote:
My favorite.
</world>
End of the world. Great!
Brice
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
--- End Message ---
--- Begin Message ---
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; [EMAIL PROTECTED]
Subject: Re: [PHP] Re: PHP Brain Teasers
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_string1,$rgb_string2,$input1,$input2) {
> header("Content-type: image/png");
> $im = imagecreatefromjpeg($original_image);
> $rgb1 = explode(',',$rgb_string1);
> $rgb2 = explode(',',$rgb_string2);
> $color1 = imagecolorallocate($im,$rgb1[0],$rgb1[1],$rgb1[2]);
> $color2 = imagecolorallocate($im,$rgb2[0],$rgb2[1],$rgb2[2]);
> $px = (imagesx($im) - 7.5 * strlen($input1)) / 2;
> imagestring($im, 50, $px, 90, $input2, $color1);
> imagestring($im, 50, ($px + 30), 120, $input1, $color2);
> imagepng($im);
> imagedestroy($im);
> }
> }
>
> $objects = new Brainteaser();
>
> $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($objects->original_image,$rgb1,$rgb2,$update_word1,str_r
eplace("c","s",$_SCRIPT[otherword]));
>
> ?>
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
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 the egg?
>>
>>The egg, fish were laying them long before chickens walked the earth :)
> >
>
> But actually, it was dinosaurs.
Ummmmm... fish predate all land creatures according to evolution....
that's not to say something with eggs didn't predate fish, but I'm too
lazy to go look.
Yes, but I was talking about predecessors to the chicken, like
Archeopteryx (one of the first feathered dinosaurs), which is/was (my
education is dated) believed to be the predecessor of birds.
As far as eggs are concerned, they predate fish considerably.
So, IF the question is "Which came first, the chicken or the egg?" --
then the answer is clearly "the egg".
However, if the question is "Which came first, the chicken or the
chicken's egg?" -- then the answer is much less obvious.
Evolution is alteration in the genetic code usually caused by changes
in the critter's environment. So, the question becomes, is the
alteration of the genetic code found in the egg a random fluctuation
of genetic code not found in the parent, or is it the product of a
lifetime experience, under the influence of the parent's environment,
that changed the parents genetic code in reproduction?
Also, there is a difference in the genetic code you have and the code
your pass on in terms of dominance/preference with your spouse's
genetic code. In other words, male and female produce something
different than either of them. However, for both to reach
reproduction age, they both had to have "successful" genetic makeup.
As such, their offspring has a different chance, perhaps better, of
reaching reproduction age and passing on it's contribution.
Now at what point does the offspring differ enough in genetic code to
be classified as a chicken? That's an interesting question
considering that it's offspring may not be a chicken (consider that).
Pre-chickens will have to go through numerous generations before
producing a "true" chicken in our taxonomy.
I doubt that one can demarcate the non-chicken parents from the
chicken offspring. So... it is perplexing.
Cheers,
tedd
===
But dwelling on the topic, the chicken egg problem is actually stated
incorrectly to some degree, it's a more interesting question to ask:
What came first? The chicken or the chicken egg?
Now this question is only perplexing until you realize that the concept
of "chicken egg" is ambiguous. Is a "chicken egg" an egg that was
created by a chicken, or an egg from which a chicken hatches? As such,
there are two possible answers to the age old question...
Case 1: a "chicken egg" is defined by having been created
by a chicken.
In this case the chicken must have come first :)
Case 2: a "chicken egg" is defined by being an egg from
which a chicken hatches.
In this case the egg comes first since the first
genetic chicken was born from an egg created by
it's direct ancestor that was not a chicken.
See... it's not perplexing at all :)
Cheers,
Rob.
--
.------------------------------------------------------------.
| InterJinn Application Framework - http://www.interjinn.com |
:------------------------------------------------------------:
| An application and templating framework for PHP. Boasting |
| a powerful, scalable system for accessing system services |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for |
| creating re-usable components quickly and easily. |
`------------------------------------------------------------'
--
-------
http://sperling.com http://ancientstones.com http://earthstones.com
--- End Message ---
--- Begin Message ---
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($objects->original_image,$rgb1,$rgb2,$update_word1,str_replace("c","s",$_SCRIPT[otherword]));
Without bothering to run the code I'd say a tisket, a tasket, a green
and yellow basket. Now what obscure corner of childhood poetry
memories did that come from? It's easy to google... My god, Ella
Fitzgerald? THE Ella Fitzgerald?? Yowsa!
Bemusedly,
Paul
__________________________
Paul Novitski
Juniper Webcraft Ltd.
http://juniperwebcraft.com
--- End Message ---
--- Begin Message ---
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 Pomeroy wrote:
>> >>> Which came first, the chicken or the egg?
>> >>
>> >>The egg, fish were laying them long before chickens walked the earth :)
> > >
> >
> > But actually, it was dinosaurs.
>
>Ummmmm... fish predate all land creatures according to evolution....
>that's not to say something with eggs didn't predate fish, but I'm too
>lazy to go look.
Yes, but I was talking about predecessors to the chicken, like
Archeopteryx (one of the first feathered dinosaurs), which is/was (my
education is dated) believed to be the predecessor of birds.
As far as eggs are concerned, they predate fish considerably.
So, IF the question is "Which came first, the chicken or the egg?" --
then the answer is clearly "the egg".
However, if the question is "Which came first, the chicken or the
chicken's egg?" -- then the answer is much less obvious.
Evolution is alteration in the genetic code usually caused by changes
in the critter's environment. So, the question becomes, is the
alteration of the genetic code found in the egg a random fluctuation
of genetic code not found in the parent, or is it the product of a
lifetime experience, under the influence of the parent's environment,
that changed the parents genetic code in reproduction?
Also, there is a difference in the genetic code you have and the code
your pass on in terms of dominance/preference with your spouse's
genetic code. In other words, male and female produce something
different than either of them. However, for both to reach
reproduction age, they both had to have "successful" genetic makeup.
As such, their offspring has a different chance, perhaps better, of
reaching reproduction age and passing on it's contribution.
Now at what point does the offspring differ enough in genetic code to
be classified as a chicken? That's an interesting question
considering that it's offspring may not be a chicken (consider that).
Pre-chickens will have to go through numerous generations before
producing a "true" chicken in our taxonomy.
I doubt that one can demarcate the non-chicken parents from the
chicken offspring. So... it is perplexing.
Cheers,
tedd
From which point in the evolution do you call it a chicken egg? See it
like bytes, 00000000 is a fish egg, and 11111111 is a chicken egg,
then it went from fish egg to chicken egg like this:
00000001
00000011
00000111
00001111
00011111
00111111
01111111
11111111
So, at which point do you call it which egg, same with the fish and
the chicken itself. If you call the fish earlier a chicken than you
call the fish egg a chicken egg, then the chicken was first, if you
call the fish egg earlier a chicken egg than you call the fish a
chicken, then the chicken egg was first...
Tijnema
>
>But dwelling on the topic, the chicken egg problem is actually stated
>incorrectly to some degree, it's a more interesting question to ask:
>
> What came first? The chicken or the chicken egg?
>
>Now this question is only perplexing until you realize that the concept
>of "chicken egg" is ambiguous. Is a "chicken egg" an egg that was
>created by a chicken, or an egg from which a chicken hatches? As such,
>there are two possible answers to the age old question...
>
> Case 1: a "chicken egg" is defined by having been created
> by a chicken.
>
> In this case the chicken must have come first :)
>
> Case 2: a "chicken egg" is defined by being an egg from
> which a chicken hatches.
>
> In this case the egg comes first since the first
> genetic chicken was born from an egg created by
> it's direct ancestor that was not a chicken.
>
>See... it's not perplexing at all :)
>
>Cheers,
>Rob.
>--
>.------------------------------------------------------------.
>| InterJinn Application Framework - http://www.interjinn.com |
>:------------------------------------------------------------:
>| An application and templating framework for PHP. Boasting |
>| a powerful, scalable system for accessing system services |
>| such as forms, properties, sessions, and caches. InterJinn |
>| also provides an extremely flexible architecture for |
>| creating re-usable components quickly and easily. |
>`------------------------------------------------------------'
--
-------
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
--
Vote for PHP Color Coding in Gmail! -> http://gpcc.tijnema.info
--- End Message ---
--- Begin Message ---
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 `ticket` become `tasket` and `tisket`, respectively. Then
their order is reversed when printed on the picture. In honor of the
British bastards like Robert Cummings ( :-P ) I used a British version
of the old nursery rhyme, which starts, "A tisket, a tasket, a brown
and yellow basket."
Now what obscure corner of childhood poetry
memories did that come from? It's easy to google... My god, Ella
Fitzgerald? THE Ella Fitzgerald?? Yowsa!
Ha! Actually, Google is where I got it from, too. I wanted to do
something a bit more involved, and as soon as I saw the first two
lines of that nursery rhyme, I already had the vision in mind.
However, I may be just a *bit* disturbed by your attraction to Ella
Fitzgerald.... especially in her present state. Though if you've ever
read her biography.... damn, what a tough lady!
Bemusedly,
Paul
Glad you enjoyed it. If I may say so myself, I thought it was
rather well done. I really enjoyed it, too.... so far, it was the
most involved --- and actually worked when ran.
/me takes a bow.
--
Daniel P. Brown
[office] (570-) 587-7080 Ext. 272
[mobile] (570-) 766-8107
--- End Message ---
--- Begin Message ---
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 -0500, Kaleb Pomeroy wrote:
> >> >>> Which came first, the chicken or the egg?
> >> >>
> >> >>The egg, fish were laying them long before chickens walked the earth :)
> > > >
> > >
> > > But actually, it was dinosaurs.
> >
> >Ummmmm... fish predate all land creatures according to evolution....
> >that's not to say something with eggs didn't predate fish, but I'm too
> >lazy to go look.
>
>
> Yes, but I was talking about predecessors to the chicken, like
> Archeopteryx (one of the first feathered dinosaurs), which is/was (my
> education is dated) believed to be the predecessor of birds.
>
> As far as eggs are concerned, they predate fish considerably.
>
> So, IF the question is "Which came first, the chicken or the egg?" --
> then the answer is clearly "the egg".
>
> However, if the question is "Which came first, the chicken or the
> chicken's egg?" -- then the answer is much less obvious.
>
> Evolution is alteration in the genetic code usually caused by changes
> in the critter's environment. So, the question becomes, is the
> alteration of the genetic code found in the egg a random fluctuation
> of genetic code not found in the parent, or is it the product of a
> lifetime experience, under the influence of the parent's environment,
> that changed the parents genetic code in reproduction?
>
> Also, there is a difference in the genetic code you have and the code
> your pass on in terms of dominance/preference with your spouse's
> genetic code. In other words, male and female produce something
> different than either of them. However, for both to reach
> reproduction age, they both had to have "successful" genetic makeup.
> As such, their offspring has a different chance, perhaps better, of
> reaching reproduction age and passing on it's contribution.
>
> Now at what point does the offspring differ enough in genetic code to
> be classified as a chicken? That's an interesting question
> considering that it's offspring may not be a chicken (consider that).
> Pre-chickens will have to go through numerous generations before
> producing a "true" chicken in our taxonomy.
I described below how one knows which came first and for which side of
the ambiguity you choose to define "chicken egg". You're above analysis
of determining chickens from non-chickens is fabricated confusion in
your own mind. We don't need to know the time at which a bird became a
chicken, nor do we need to know it's genetic makeup. It's not important
to the greater question, all that is important is to know that at some
point, no matter when that point was or what birds were involved, there
was an instance when a hatched bird was a chicken that had two parents
that were not chickens. At that exact event when the offspring was a
chicken and the parents were not we know that the chicken was finally
born. And that event had to happen unless you believe in Creationism or
Intelligent Design.
> 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.
> >
> >But dwelling on the topic, the chicken egg problem is actually stated
> >incorrectly to some degree, it's a more interesting question to ask:
> >
> > What came first? The chicken or the chicken egg?
> >
> >Now this question is only perplexing until you realize that the concept
> >of "chicken egg" is ambiguous. Is a "chicken egg" an egg that was
> >created by a chicken, or an egg from which a chicken hatches? As such,
> >there are two possible answers to the age old question...
> >
> > Case 1: a "chicken egg" is defined by having been created
> > by a chicken.
> >
> > In this case the chicken must have come first :)
> >
> > Case 2: a "chicken egg" is defined by being an egg from
> > which a chicken hatches.
> >
> > In this case the egg comes first since the first
> > genetic chicken was born from an egg created by
> > it's direct ancestor that was not a chicken.
> >
> >See... it's not perplexing at all :)
> >
--
.------------------------------------------------------------.
| InterJinn Application Framework - http://www.interjinn.com |
:------------------------------------------------------------:
| An application and templating framework for PHP. Boasting |
| a powerful, scalable system for accessing system services |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for |
| creating re-usable components quickly and easily. |
`------------------------------------------------------------'
--- End Message ---
--- Begin Message ---
On 7/5/07, tedd <[EMAIL PROTECTED]> wrote:
My favorite.
</world>
Fan-freaking-tastic! I've never seen it before (I live under a
rock), but it has so many potential uses.
--
Daniel P. Brown
[office] (570-) 587-7080 Ext. 272
[mobile] (570-) 766-8107
--- End Message ---
--- Begin Message ---
On Thu, 2007-07-05 at 22:26 -0400, Nathan Nobbe wrote:
> Kevin,
>
> just like Daniel said,
> > $sql .= "OR product_description *LIKE '%".$terms."%'"*;
>
> most of the *search engines* ive seen revolve around the use of the LIKE
> construct<http://dev.mysql.com/doc/refman/5.1/en/string-comparison-functions.html#operator_like>
> which is a simplified regex mechanism for an SQL query [for MySQL at least,
> probly other RDBMS' as well]
Don't do that. Unless you have a teency weency set of data don't use
LIKE syntax to match data. It's extremely inefficient and requires
scanning the entire table. If you need to use MySQL use the MATCH
AGAINST syntax since it will index the data and search much faster. I've
heard tell it sucks beyond a certain size, but it's great for quick
solutions and moderate sized data. If you need something more powerful
look into something like Lucene.
Cheers,
Rob.
--
.------------------------------------------------------------.
| InterJinn Application Framework - http://www.interjinn.com |
:------------------------------------------------------------:
| An application and templating framework for PHP. Boasting |
| a powerful, scalable system for accessing system services |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for |
| creating re-usable components quickly and easily. |
`------------------------------------------------------------'
--- End Message ---
--- Begin Message ---
note: i never said this was an optimal solution; i just said thats what ive
seen.
obviously i havent worked on any major search engine to date.
in fact i was fishing a bit for some info on how to do it right.
On 7/5/07, Robert Cummings < [EMAIL PROTECTED]> wrote:
If you need to use MySQL use the MATCH
AGAINST syntax since it will index the data and search much faster. I've
heard tell it sucks beyond a certain size, but it's great for quick
solutions and moderate sized data. If you need something more powerful
look into something like Lucene.
thanks Robert,
-nathan
On 7/5/07, Robert Cummings < [EMAIL PROTECTED]> wrote:
On Thu, 2007-07-05 at 22:26 -0400, Nathan Nobbe wrote:
> Kevin,
>
> just like Daniel said,
> > $sql .= "OR product_description *LIKE '%".$terms."%'"*;
>
> most of the *search engines* ive seen revolve around the use of the LIKE
> construct<
http://dev.mysql.com/doc/refman/5.1/en/string-comparison-functions.html#operator_like
>
> which is a simplified regex mechanism for an SQL query [for MySQL at
least,
> probly other RDBMS' as well]
Don't do that. Unless you have a teency weency set of data don't use
LIKE syntax to match data. It's extremely inefficient and requires
scanning the entire table. If you need to use MySQL use the MATCH
AGAINST syntax since it will index the data and search much faster. I've
heard tell it sucks beyond a certain size, but it's great for quick
solutions and moderate sized data. If you need something more powerful
look into something like Lucene.
Cheers,
Rob.
--
.------------------------------------------------------------.
| InterJinn Application Framework - http://www.interjinn.com |
:------------------------------------------------------------:
| An application and templating framework for PHP. Boasting |
| a powerful, scalable system for accessing system services |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for |
| creating re-usable components quickly and easily. |
`------------------------------------------------------------'
--- End Message ---
--- Begin Message ---
At 1:34 PM -0700 7/5/07, Kelvin Park wrote:
I'm trying to build a search engine for my website (with php), it will have
functions such as finding product names and their codes from the mysql
database.
Does anyone know any good tutorial or reference on any website, or any good
books out there that you might recommend?
I couldnt' find any decent one but only the ones that keep on saying, "use
google search engine to search your website!" etc.
Thanks!
While it's not a "write your own" solution, it does work:
http://sperling.com/examples/search/
Cheers,
tedd
--
-------
http://sperling.com http://ancientstones.com http://earthstones.com
--- End Message ---
--- Begin Message ---
I have written a PHP (v5.1) app to parse a bunch of MIME files. It works for
the vast majority, but sometimes I get this error:
mailparse_msg_extract_part_file(): mbstring doesn't know how to decode plain
transfer encoding!
It appears to be when messages have Content-Type: text/plain; charset=us-ascii
or Content-Transfer-Encoding: plain or a combination of the two. I've searched
on the error message and only found a url that times out.
Does anyone have any experience with this? The code in question is this (it's
part of a function that gets the email body):
foreach ($this->_sectiondata as $index => $data)
{
$contdisp = $this->_getHeaderData($index, 'content-disposition');
if ($contdisp == "" && $data['content-type'] != 'multipart/mixed')
{
$sec = mailparse_msg_get_part($this->_mimehandle, $index);
ob_start();
/* extract the part from the message file and dump it to the
output buffer */
mailparse_msg_extract_part_file($sec, $this->_filename);
$contents = ob_get_contents();
ob_end_clean();
$this->_body = $contents;
}
}
Thanks!
Regards,
Bruce
--- End Message ---
--- Begin Message ---
Hi Guys,
I have a array like that below,
$values = ("name1 %we %tr ", "name2 %de.%ty %sd", "name3 %we 5te %mt/%
Hs");
another one array like that,
$tmp = ("%tr", "%uy", "%xc");
I need to add the array of $tmp in to each element of array
$values.....Also i need to add the $tmp array in to after the name of
each element..
could you help me to find the solution..??
Thanks,
--- End Message ---
--- Begin Message ---
sivasakthi wrote:
Hi Guys,
I have a array like that below,
$values = ("name1 %we %tr ", "name2 %de.%ty %sd", "name3 %we 5te %mt/%
Hs");
another one array like that,
$tmp = ("%tr", "%uy", "%xc");
I need to add the array of $tmp in to each element of array
$values.....Also i need to add the $tmp array in to after the name of
each element..
could you help me to find the solution..??
Thanks,
well, if I understand what you are asking to do, it should be as simple
as this.
<?php
$values[] = "name1 %we %tr ";
$values[] = "name2 %de.%ty %sd";
$values[] = "name3 %we 5te %mt/% Hs";
$tmp[] = "%tr";
$tmp[] = "%uy";
$tmp[] = "%xc";
foreach ( $values AS $k => $v ) {
if ( isset( $tmp[$k] ) ) {
$values[$k] = $v . $tmp[$k]; // This puts it on the end
$values[$k] = $tmp[$k] . $v; // This puts it at the start
}
}
print_r($values);
?>
Hope this helps
Jim Lucas
--- End Message ---
--- Begin Message ---
So after I recently upgraded from php4 to php5 I noticed that email
attachments > 88k get truncated at 88k within squirrelmail/roundcube,
however those same email attachments work just fine if I hit the imap
server in thunderbird etc...
Has anyone else run across this before? I've seen other bugs on different
sites, but I did not manage to find any answers to this puzzle.
thanks
--
Jamie Dahl
"Thousands of tired, nerve-shaken, over-civilized people are beginning to
find out that going to the mountains is going home; that wilderness is a
necessity; and that mountain parks and reservations are useful not only as
fountains of timber and irrigating rivers, but as fountains of life."
--John Muir
"We must remember the First Amendment which protects any shrill jackass no
matter how self-seeking" -- F. G. Withington
"The Mountains are calling so I must go" --John Muir
--- End Message ---
--- Begin Message ---
On 05 July 2007 20:19, Dan Shirah wrote:
> There is a "Find and Replace" function in Dreamweaver, but it is very
> specific and will only find specific words/tags.
Not at all true. Dreamweaver has a fully-functional regexp search in both Text
and Source Code modes.
Cheers!
Mike
---------------------------------------------------------------------
Mike Ford, Electronic Information Services Adviser,
JG125, The Headingley Library,
James Graham Building, Leeds Metropolitan University,
Headingley Campus, LEEDS, LS6 3QS, United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 812 4730 Fax: +44 113 812 3211
To view the terms under which this email is distributed, please go to
http://disclaimer.leedsmet.ac.uk/email.htm
--- End Message ---
--- Begin Message ---
Steve Edberg wrote:
> At 7:37 PM -0400 7/5/07, Robert Cummings wrote:
>>On Thu, 2007-07-05 at 16:27 -0700, Steve Edberg wrote:
>>> Proposal -
>>>
>>> Perhaps we could separate Brain Teasers, Obfuscated PHP challenges,
>>> and what-have-you to a separate mailing list, say php-fun (php-phun?
>>> PHPhun?)? Maybe you could also include 'use of eval()' in that list,
>>> since I think 97.004% of the time using eval() inevitably leads to
>>> obfuscation. And one should eschew obfuscation.
>>
>>We could... but why bother?!
>>
>
>
> Minimizing the circumlocution and periphrasis that is characteristic
> of an exhaustively obfuscated style is conducive to a maximally
> productive ISO-9000/six-sigma enterprise infrastructure that is
> architected towards the rightsized core competencies of an n-tier
> profit maximization strategy.
>
> Errr, wait, I think I just wandered into the 'PHP as a strategic
> BUSINESS language' thread...
That almost made more sense when ROTed :-)
Cheers
--
David Robley
"It's a bloody lion," said Tom categorically.
Today is Boomtime, the 41st day of Confusion in the YOLD 3173.
--- End Message ---
--- Begin Message ---
Steve Edberg wrote:
> At 7:37 PM -0400 7/5/07, Robert Cummings wrote:
>> On Thu, 2007-07-05 at 16:27 -0700, Steve Edberg wrote:
>>> Proposal -
>>>
>>> Perhaps we could separate Brain Teasers, Obfuscated PHP challenges,
>>> and what-have-you to a separate mailing list, say php-fun (php-phun?
>>> PHPhun?)? Maybe you could also include 'use of eval()' in that list,
>>> since I think 97.004% of the time using eval() inevitably leads to
>>> obfuscation. And one should eschew obfuscation.
>>
>> We could... but why bother?!
>>
>
>
> Minimizing the circumlocution and periphrasis that is characteristic of
> an exhaustively obfuscated style is conducive to a maximally productive
> ISO-9000/six-sigma enterprise infrastructure that is architected towards
> the rightsized core competencies of an n-tier profit maximization strategy.
>
that's the shortest essay I've read on the subject of 'what is wrong with the
world',
brilliant :-P
--- End Message ---
--- Begin Message ---
Andrew Hutchings wrote:
> I prefer prepared statements and would use them all the time if
> it wasn't for the fact that those queries aren't cached until
> recent versions of MySQL 5.1
Use PDO. It emulates prepared statements and doesn't avoid the query cache:
$db->setAttribute(PDO::ATTR_EMULATE_PREPARES, TRUE);
For more information:
http://netevil.org/blog/2006/apr/using-pdo-mysql
Hope that helps.
Chris
--
Chris Shiflett
http://shiflett.org/
--- End Message ---
--- Begin Message ---
Hi,
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 -0500, Kaleb Pomeroy wrote:
> >> >>> Which came first, the chicken or the egg?
> >> >>
> >> >>The egg, fish were laying them long before chickens walked the earth :)
> > > >
> > >
> > > But actually, it was dinosaurs.
> >
> >Ummmmm... fish predate all land creatures according to evolution....
> >that's not to say something with eggs didn't predate fish, but I'm too
> >lazy to go look.
>
>
> Yes, but I was talking about predecessors to the chicken, like
> Archeopteryx (one of the first feathered dinosaurs), which is/was (my
> education is dated) believed to be the predecessor of birds.
>
> As far as eggs are concerned, they predate fish considerably.
As far as I'm aware, eggs don't predate anything. How could they - they
don't have legs or mouths so couldn't eat anything if they could run to
catch it :-)
TTFN
D
php/general-2007-07-06.tx php-general [EMAIL PROTECTED]
[EMAIL PROTECTED] [EMAIL PROTECTED]
[EMAIL PROTECTED]
+----------------------------------------------------------------------------+
| Dave Restall, Computer Nerd, Cyclist, Radio Amateur G4FCU, Bodger |
| Mob +44 (0) 7973 831245 Skype: dave.restall Radio: G4FCU |
| email : [EMAIL PROTECTED] Web : Not Ready Yet :-( |
+----------------------------------------------------------------------------+
| "Mind if I smoke?" |
| "I don't care if you burst into flames and die!" |
+----------------------------------------------------------------------------+
--- End Message ---
--- Begin Message ---
On Fri, 2007-07-06 at 15:19 +0100, David Restall - System Administrator
wrote:
> Hi,
>
> 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 -0500, Kaleb Pomeroy wrote:
> > >> >>> Which came first, the chicken or the egg?
> > >> >>
> > >> >>The egg, fish were laying them long before chickens walked the earth
> > >> :)
> > > > >
> > > >
> > > > But actually, it was dinosaurs.
> > >
> > >Ummmmm... fish predate all land creatures according to evolution....
> > >that's not to say something with eggs didn't predate fish, but I'm too
> > >lazy to go look.
> >
> >
> > Yes, but I was talking about predecessors to the chicken, like
> > Archeopteryx (one of the first feathered dinosaurs), which is/was (my
> > education is dated) believed to be the predecessor of birds.
> >
> > As far as eggs are concerned, they predate fish considerably.
>
> As far as I'm aware, eggs don't predate anything. How could they - they
> don't have legs or mouths so couldn't eat anything if they could run to
> catch it :-)
Don't confuse predation with predate :)
http://www.m-w.com/dictionary/predate
Cheers,
Rob.
--
.------------------------------------------------------------.
| InterJinn Application Framework - http://www.interjinn.com |
:------------------------------------------------------------:
| An application and templating framework for PHP. Boasting |
| a powerful, scalable system for accessing system services |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for |
| creating re-usable components quickly and easily. |
`------------------------------------------------------------'
--- End Message ---