php-general Digest 7 Jul 2007 02:51:30 -0000 Issue 4889

Topics (messages 258419 through 258439):

Re: Getting WAY OT now Re: PHP Brain Teasers
        258419 by: Daniel Brown
        258433 by: tedd
        258434 by: tedd

Re: Using PHP to retrieve a Yahoo Groups Web Page
        258420 by: Greg Donald
        258421 by: Jim Lucas
        258422 by: Alan Milnes

Re: Possible configuration problem w/ php??
        258423 by: Dan

Reading Error: socket '/var/lib/mysql/mysql.sock'
        258424 by: kvigor
        258425 by: kvigor

Finding text in a variable
        258426 by: Alan Milnes
        258427 by: Robert Cummings

Where does PHP look for php.ini??
        258428 by: Tijnema
        258431 by: Stut
        258432 by: Tijnema

About PHP CMS
        258429 by: Kelvin Park
        258430 by: Davi

Re: PHP Brain Teasers
        258435 by: tedd
        258436 by: tedd
        258437 by: Tijnema
        258438 by: Robert Cummings

checking for duplicate values among five variables
        258439 by: Kenn Murrah

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 ---
On 7/6/07, Robert Cummings <[EMAIL PROTECTED]> wrote:
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.          |
`------------------------------------------------------------'



   An article I just read this morning is quite fitting for this
exact discussion:

http://dsc.discovery.com/news/2007/07/02/bigbird_ani.html?category=animals&guid=20070702170030&dcitc=w19-502-ak-0000


--
Daniel P. Brown
[office] (570-) 587-7080 Ext. 272
[mobile] (570-) 766-8107

--- End Message ---
--- Begin Message ---
At 3:19 PM +0100 7/6/07, David Restall - System Administrator wrote:
Tedd Wrote :-
 > 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 :-)

Oh yeah, what about Pacman?

But then again, eggs also "predate" Pacman too!

In a morphological sense, there are, and have been, egg-shaped critters that prey on other critters. The microscopic world is filled with them.

Cheers,

tedd
--
-------
http://sperling.com  http://ancientstones.com  http://earthstones.com

--- End Message ---
--- Begin Message ---
At 10:32 AM -0400 7/6/07, Daniel Brown wrote:

   An article I just read this morning is quite fitting for this
exact discussion:

http://dsc.discovery.com/news/2007/07/02/bigbird_ani.html?category=animals&guid=20070702170030&dcitc=w19-502-ak-0000


Not a bad article, but just speculation based upon the Geological assertion that "The present is the key to the past." For most things, it works reasonably well -- but, we don't know for sure.

For example, several hundred million years from now when mankind is history and some alien paleontologist is looking through the rock record and stumbles across the fossilized remains of a penguin, he might speculate that these critters had to be the fastest animals on earth to get those short wings to work.

Cheers,

tedd

--
-------
http://sperling.com  http://ancientstones.com  http://earthstones.com

--- End Message ---
--- Begin Message ---
On 7/4/07, Alan Milnes <[EMAIL PROTECTED]> wrote:
I have spent the afternoon trawling the web for how to retrieve a
Yahoo Groups Web Page using PHP.  The best option seems to be curl,
which is installed on my host.  I need to understand how to set the
cookies so that Yahoo accepts my response.

The code I have is:-

$url="http://uk.groups.yahoo.com/group/gameplan/message/17162";;

$c = curl_init ($url);

curl_setopt ($c, CURLOPT_VERBOSE, 1); // For testing
curl_setopt ($c, CURLOPT_COOKIE, "PU='t=2'");
curl_setopt ($c, CURLOPT_COOKIE, "B='fjdqm0h38nja8&b=3&s=en'");
curl_setopt ($c, CURLOPT_COOKIE,
"G='v=7&data=aV_mWZSWJqXQjMVAffABJZF90G5YVfEqEKS_8sCOGC3UJKe0r0CgoZ9Ys5lC44k1cNbU1Es8YvlWBV8HeBernGvtIA-WSq4kLkSKiwcQMo-uYLWwGFoQogK4oDv-rdb1JieLv7LLxUJvjCmZu8wAfBp8WO9dBI4gkypKEQK88Tcgb47bGiHVRZssV0LYodF64CAmb78Cu3I51FOXw1iZbUE76-qwQo2nz_qm-z21RwG8Tnm9yMed8ge588576Tqtxf7ebc3v06bvVYknMxT3AuuLpzSXb3MbyBxWXousng1nkcdooFGrFlVfSwcbl2scqfr8hBOoJLeoPdY6_aLrEtZghtVg1tvwclO3fSvXVa7TBhhHHzJ1JrD7_q-8mN140EjYon9Z4ump3lh6NHerJHlKE63J0t-syUMDNo3muAzYFQulYjQ&n=8'");

curl_exec ($c);

The page outputs:-

"Aren't you supposed to be somewhere else?"

I'm guessing that perhaps the cookies aren't being set properly.

Any pointers / articles / sites?  Can I use a cookies.txt file from a
valid visit to the site to set this up?

Use curl_setopt() to let curl save the cookies.

Specifically you need these two options:

CURLOPT_COOKIEFILE
CURLOPT_COOKIEJAR

http://us2.php.net/manual/en/function.curl-setopt.php


--
Greg Donald
http://destiney.com/

--- End Message ---
--- Begin Message ---
Greg Donald wrote:
On 7/4/07, Alan Milnes <[EMAIL PROTECTED]> wrote:
I have spent the afternoon trawling the web for how to retrieve a
Yahoo Groups Web Page using PHP.  The best option seems to be curl,
which is installed on my host.  I need to understand how to set the
cookies so that Yahoo accepts my response.

The code I have is:-

$url="http://uk.groups.yahoo.com/group/gameplan/message/17162";;

$c = curl_init ($url);

curl_setopt ($c, CURLOPT_VERBOSE, 1); // For testing
curl_setopt ($c, CURLOPT_COOKIE, "PU='t=2'");
curl_setopt ($c, CURLOPT_COOKIE, "B='fjdqm0h38nja8&b=3&s=en'");
curl_setopt ($c, CURLOPT_COOKIE,
"G='v=7&data=aV_mWZSWJqXQjMVAffABJZF90G5YVfEqEKS_8sCOGC3UJKe0r0CgoZ9Ys5lC44k1cNbU1Es8YvlWBV8HeBernGvtIA-WSq4kLkSKiwcQMo-uYLWwGFoQogK4oDv-rdb1JieLv7LLxUJvjCmZu8wAfBp8WO9dBI4gkypKEQK88Tcgb47bGiHVRZssV0LYodF64CAmb78Cu3I51FOXw1iZbUE76-qwQo2nz_qm-z21RwG8Tnm9yMed8ge588576Tqtxf7ebc3v06bvVYknMxT3AuuLpzSXb3MbyBxWXousng1nkcdooFGrFlVfSwcbl2scqfr8hBOoJLeoPdY6_aLrEtZghtVg1tvwclO3fSvXVa7TBhhHHzJ1JrD7_q-8mN140EjYon9Z4ump3lh6NHerJHlKE63J0t-syUMDNo3muAzYFQulYjQ&n=8'");

curl_exec ($c);

The page outputs:-

"Aren't you supposed to be somewhere else?"

I'm guessing that perhaps the cookies aren't being set properly.

Any pointers / articles / sites?  Can I use a cookies.txt file from a
valid visit to the site to set this up?

Use curl_setopt() to let curl save the cookies.

Specifically you need these two options:

CURLOPT_COOKIEFILE
CURLOPT_COOKIEJAR

http://us2.php.net/manual/en/function.curl-setopt.php


Also, you might want to think about passing it a different User-Agent then the 
default curl agent

        curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);

        curl_setopt($ch, CURLOPT_COOKIEJAR, './cookie.txt');  // Make sure 
location is writable
        curl_setopt($ch, CURLOPT_COOKIEFILE, './cookie.txt'); // Make sure 
location is writable


--
Jim Lucas

   "Some men are born to greatness, some achieve greatness,
       and some have greatness thrust upon them."

Twelfth Night, Act II, Scene V
    by William Shakespeare

--- End Message ---
--- Begin Message ---
On 06/07/07, Greg Donald <[EMAIL PROTECTED]> wrote:

Specifically you need these two options:

CURLOPT_COOKIEFILE
CURLOPT_COOKIEJAR

http://us2.php.net/manual/en/function.curl-setopt.php

Thanks - that was it.

Alan

--- End Message ---
--- Begin Message --- You should probably contact squrrelmail or roundcube, I believe they are both open source and they are more likely to know the cause of have heard of it before.

- Dan


""Jamie Dahl"" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]

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 ---
Can't connect to local MySQL server through socket 
'/var/lib/mysql/mysql.sock' (2)

FYI I did this to solved the problem but it didn't work: 
http://webyog.com/forums/lofiversion/index.php/t1367.html  the only thing is 
that I'm running MySQL 5.0 (I have a my.ini not my.cfg) and I put the var 
folder in the following dir C:\Program Files\MySQL\MySQL Server 
5.0\var\lib\mysql. I also modified my PHP.ini to reflect new socket 
location.

What really bothers me is that all was fine until yesterday and my AMP setup 
for localhost works fine.  Only when I upload to Webhost i get the socket 
error
The only thing I did was add the following include file @ the top of all my 
admin pages.
====================================
include file
<?php
session_start();
if($_SESSION['auth'] != "yes")
{
 header("Location: AdminForm.php");
 exit();
}
?>
//===========================================================
AdminForm looks like:
//===========================================================
<?php session_start();?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
<html xmlns="http://www.w3.org/1999/xhtml";>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>ADMIN LOGIN</title>
<style type="text/css">
<!--
.style3 {font-size: 11pt}
body {
 background-color: #F5F5F5;
}
-->
</style>
<link href="css/site.css" rel="stylesheet" type="text/css" />
</head>
<body>
<br />
<br />
<br />
<table width="611" height="310" border="1" align="center">
<tr>
 <td align="center" bordercolor="#000099" bgcolor="#FFFFFF">

     <div align="center"><br />
          <img src="../images/logoBig.jpg" width="218" height="208" /><br />
          <br />
<?php
if(@$_SESSION['sight'] == "error")
{echo "<div class='ermess3'>Username and/or Password are 
Incorrect</div>";}?>
<br />
          <br />
 </div>

 <div align="center">
  <form action="AdminFormVal.php" method="post" name="adminForm">
      <label for="uname">USERNAME</label>
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

      <input type="text" name="uname" maxlength="25" />
      <br />
      <br />
      <label for="uname">PASSWORD</label>
      &nbsp;&nbsp;&nbsp;&nbsp;

      <input type="password" name="pword" maxlength="25" />
      <br />
      <br />
      <input type="hidden" name="sight" value="" maxlength="25" />
      <br />
      <input name="submit"  type="submit" id="submit" value="Submit" />
  </form>
 </div> </td>
</tr>
</table>
</body>
</html>
END ADMIN FORM===========================================================

Also if I change the AdminFormVal.php beginning 'if' clause to $_SESSION 
instead of $_POST, I mysteriously don't get the mysql.sock error. But script 
does nothing when I do that of course.
===========================================================
AdminFormVal.php file looks like this:

<?php session_start();
if(isset($_POST['sight']))
{
 include("connex.php");
 $checkUnameQuery = "SELECT uname FROM admin WHERE uname ='$_POST[uname]'";
 $checkUnameQueryResult = mysql_query($checkUnameQuery) or die("Can't 
Connect to Admin" . mysql_error());
 $rowResults = mysql_num_rows($checkUnameQueryResult);

 if($rowResults == 1) //login name was found
 {
  $checkUnameQuery = "SELECT uname FROM admin WHERE uname ='$_POST[uname]' 
AND pword ='$_POST[pword]'";
  $checkUnameQueryResult2 = mysql_query($checkUnameQuery) or die("Can't 
Connect to Admin" . mysql_error());
  $rowResults2 = mysql_num_rows($checkUnameQueryResult2);

  if($rowResults2 > 0) //password was found
  {
   $_SESSION['auth'] = "yes";
   header("Location: Admin.php");
  }
 }
 else
 {
  $_SESSION['auth'] = "no";
  $_SESSION['sight'] = "error";
  header("Location: AdminForm.php");
 }
}
?>
===========================================================

--- End Message ---
--- Begin Message ---
PROBLEM SOLVED had wrong db connection file on HOST SERVER.


""kvigor"" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
> Can't connect to local MySQL server through socket 
> '/var/lib/mysql/mysql.sock' (2)
>
> FYI I did this to solved the problem but it didn't work: 
> http://webyog.com/forums/lofiversion/index.php/t1367.html  the only thing 
> is that I'm running MySQL 5.0 (I have a my.ini not my.cfg) and I put the 
> var folder in the following dir C:\Program Files\MySQL\MySQL Server 
> 5.0\var\lib\mysql. I also modified my PHP.ini to reflect new socket 
> location.
>
> What really bothers me is that all was fine until yesterday and my AMP 
> setup for localhost works fine.  Only when I upload to Webhost i get the 
> socket error
> The only thing I did was add the following include file @ the top of all 
> my admin pages.
> ====================================
> include file
> <?php
> session_start();
> if($_SESSION['auth'] != "yes")
> {
> header("Location: AdminForm.php");
> exit();
> }
> ?>
> //===========================================================
> AdminForm looks like:
> //===========================================================
> <?php session_start();?>
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
> <html xmlns="http://www.w3.org/1999/xhtml";>
> <head>
> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
> <title>ADMIN LOGIN</title>
> <style type="text/css">
> <!--
> .style3 {font-size: 11pt}
> body {
> background-color: #F5F5F5;
> }
> -->
> </style>
> <link href="css/site.css" rel="stylesheet" type="text/css" />
> </head>
> <body>
> <br />
> <br />
> <br />
> <table width="611" height="310" border="1" align="center">
> <tr>
> <td align="center" bordercolor="#000099" bgcolor="#FFFFFF">
>
>     <div align="center"><br />
>          <img src="../images/logoBig.jpg" width="218" height="208" /><br 
> />
>          <br />
> <?php
> if(@$_SESSION['sight'] == "error")
> {echo "<div class='ermess3'>Username and/or Password are 
> Incorrect</div>";}?>
> <br />
>          <br />
> </div>
>
> <div align="center">
>  <form action="AdminFormVal.php" method="post" name="adminForm">
>      <label for="uname">USERNAME</label>
>      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
>
>      <input type="text" name="uname" maxlength="25" />
>      <br />
>      <br />
>      <label for="uname">PASSWORD</label>
>      &nbsp;&nbsp;&nbsp;&nbsp;
>
>      <input type="password" name="pword" maxlength="25" />
>      <br />
>      <br />
>      <input type="hidden" name="sight" value="" maxlength="25" />
>      <br />
>      <input name="submit"  type="submit" id="submit" value="Submit" />
>  </form>
> </div> </td>
> </tr>
> </table>
> </body>
> </html>
> END ADMIN FORM===========================================================
>
> Also if I change the AdminFormVal.php beginning 'if' clause to $_SESSION 
> instead of $_POST, I mysteriously don't get the mysql.sock error. But 
> script does nothing when I do that of course.
> ===========================================================
> AdminFormVal.php file looks like this:
>
> <?php session_start();
> if(isset($_POST['sight']))
> {
> include("connex.php");
> $checkUnameQuery = "SELECT uname FROM admin WHERE uname ='$_POST[uname]'";
> $checkUnameQueryResult = mysql_query($checkUnameQuery) or die("Can't 
> Connect to Admin" . mysql_error());
> $rowResults = mysql_num_rows($checkUnameQueryResult);
>
> if($rowResults == 1) //login name was found
> {
>  $checkUnameQuery = "SELECT uname FROM admin WHERE uname ='$_POST[uname]' 
> AND pword ='$_POST[pword]'";
>  $checkUnameQueryResult2 = mysql_query($checkUnameQuery) or die("Can't 
> Connect to Admin" . mysql_error());
>  $rowResults2 = mysql_num_rows($checkUnameQueryResult2);
>
>  if($rowResults2 > 0) //password was found
>  {
>   $_SESSION['auth'] = "yes";
>   header("Location: Admin.php");
>  }
> }
> else
> {
>  $_SESSION['auth'] = "no";
>  $_SESSION['sight'] = "error";
>  header("Location: AdminForm.php");
> }
> }
> ?>
> =========================================================== 

--- End Message ---
--- Begin Message ---
I have a piece of code which uses curl to get a web page and puts it
into a variable.  I now need to search that variable and find
everything between `div class="msgarea"` and the next `/div`

From what I have found elsewhere I think I will need to use a regular
expression but can anyone point me in the right direction as to
exactly how I would go about this?

Cheers

Alan

--- End Message ---
--- Begin Message ---
On Fri, 2007-07-06 at 22:46 +0100, Alan Milnes wrote:
> I have a piece of code which uses curl to get a web page and puts it
> into a variable.  I now need to search that variable and find
> everything between `div class="msgarea"` and the next `/div`
> 
> >From what I have found elsewhere I think I will need to use a regular
> expression but can anyone point me in the right direction as to
> exactly how I would go about this?

Something like the following:

<?php

if( preg_match( '/div class="msgarea"(.*)\\/div/Uims', $content,
$bits ) )
{
    print_r( $bits );
}

?>

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 ---
Hi,

I just noted that my php (CLI and Apache2 SAPI) doesn't read my php.ini in /etc
I have compiled php with --prefix=/usr, and my /usr/etc is symlinked
to /etc, but it doesn't read the php.ini file..
when I use the CLI with -c /etc it works fine :)

Tijnema
--
Vote for PHP Color Coding in Gmail! -> http://gpcc.tijnema.info

--- End Message ---
--- Begin Message ---
Tijnema wrote:
I just noted that my php (CLI and Apache2 SAPI) doesn't read my php.ini in /etc
I have compiled php with --prefix=/usr, and my /usr/etc is symlinked
to /etc, but it doesn't read the php.ini file..
when I use the CLI with -c /etc it works fine :)

php -i on the command line, or phpinfo() in a SAPI script will tell you where it expects to find it, as well as whether it did find it.

-Stut

--
http://stut.net/

--- End Message ---
--- Begin Message ---
On 7/7/07, Stut <[EMAIL PROTECTED]> wrote:
Tijnema wrote:
> I just noted that my php (CLI and Apache2 SAPI) doesn't read my php.ini
> in /etc
> I have compiled php with --prefix=/usr, and my /usr/etc is symlinked
> to /etc, but it doesn't read the php.ini file..
> when I use the CLI with -c /etc it works fine :)

php -i on the command line, or phpinfo() in a SAPI script will tell you
where it expects to find it, as well as whether it did find it.

-Stut

Completely missed it LOL, it looks for it in /usr/lib :S
Is that normal?

Tijnema


--
Vote for PHP Color Coding in Gmail! -> http://gpcc.tijnema.info

--- End Message ---
--- Begin Message ---
Is it possible to have PHP code completely separate from the HTML page that
needs to be completely dynamic? (That's how ASP.NET sort of works I think).
If this is possible, HTML CODE, PHP CODE, AND THE CSS CODE can be completely
separate, increasing the clarity of all the source code.

My second question is:
Is it more efficient to always code OOP PHP then just simple functions here
and there?

--- End Message ---
--- Begin Message ---
Em Sexta 06 Julho 2007 21:24, Kelvin Park escreveu:
> Is it possible to have PHP code completely separate from the HTML page that
> needs to be completely dynamic? (That's how ASP.NET sort of works I think).
> If this is possible, HTML CODE, PHP CODE, AND THE CSS CODE can be
> completely separate, increasing the clarity of all the source code.
>
        Yes.
        Take a look at Smarty. :-)

http://smarty.php.net

> My second question is:
> Is it more efficient to always code OOP PHP then just simple functions here
> and there?

        How big is your project?
        If you're talking about a personal visit counter, run away OOP.
        If you're talking about a really big project (And yes, CMS _is_ a big 
project), go ahead and use OOP.

        OOP is better to mantain... :-)

        HTH

-- 
Davi Vidal
[EMAIL PROTECTED]
[EMAIL PROTECTED]
--
"Religion, ideology, resources, land,
spite, love or "just because"...
No matter how pathetic the reason,
it's enough to start a war. "
--------------------------------------------------------
Por favor não faça top-posting, coloque a sua resposta abaixo desta linha.
Please don't do top-posting, put your reply below the following line.
--------------------------------------------------------

Attachment: pgpcwKsmXe9NV.pgp
Description: PGP signature


--- End Message ---
--- Begin Message ---
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 that something has happened, does not mean that we know how it happened. :-)

This, my friend, is one of those things we can debate forever without reaching a definitive answer.

Thus, my assertion that this question is perplexing still stands. Unless, of course, you wish to challenge it and thus confirm my assertion further. Check and mate. :-)

Cheers,

tedd
--
-------
http://sperling.com  http://ancientstones.com  http://earthstones.com

--- End Message ---
--- Begin Message ---
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, 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:

For good grief -- you're going to hurt yourself thinking that way.

The world is not made of one's and zero's but rather thresholds, chaotic systems, and a bunch of weird stuff we haven't figured out yet.

We observe phenomena, we develop algorithms and use them until they don't fit observations anymore and then we develop others to take their place. And all the while we believe that we have figured something out, that we know what the answer is -- but the "truth" of the matter is we're like children putting our tinker toys together to mimic the things around us. From our perspective, we're pretty good at it. But, I wonder what the perspective will be one thousand years from now? Do you think todays answers will serve tomorrow's questions?

You know, I was a lot smarter when I was younger and knew better.

Cheers,

tedd
--
-------
http://sperling.com  http://ancientstones.com  http://earthstones.com

--- End Message ---
--- Begin Message ---
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, 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:

For good grief -- you're going to hurt yourself thinking that way.

The world is not made of one's and zero's but rather thresholds,
chaotic systems, and a bunch of weird stuff we haven't figured out
yet.

Thank god for that ;) All that computers with ones and zeros is enough :P
But, you CAN compare it with ones and zeros :)


We observe phenomena, we develop algorithms and use them until they
don't fit observations anymore and then we develop others to take
their place. And all the while we believe that we have figured
something out, that we know what the answer is -- but the "truth" of
the matter is we're like children putting our tinker toys together to
mimic the things around us. From our perspective, we're pretty good
at it. But, I wonder what the perspective will be one thousand years
from now? Do you think todays answers will serve tomorrow's questions?

Not tomorrow's questions ;) next year maybe...


You know, I was a lot smarter when I was younger and knew better.

Cheers,

tedd

They all say that ;)


Tijnema

ps. This was a late night reply, ... Or I should say early morning ;)
--
Vote for PHP Color Coding in Gmail! -> http://gpcc.tijnema.info

--- End Message ---
--- Begin Message ---
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 demarcate, we only need to know that it happened.
> 
> Yes, but knowing that something has happened, does not mean that we 
> know how it happened.  :-)

Actually in this case there is only one possible way it could have
happened. I'll lay it out simply for you if I must, but it's simple
logical progression.

> This, my friend, is one of those things we can debate forever without 
> reaching a definitive answer.

No, it absolutely has a definitive answer.

> Thus, my assertion that this question is perplexing still stands. 
> Unless, of course, you wish to challenge it and thus confirm my 
> assertion further.  Check and mate.  :-)

The basis of your assertion is incorrect. Methinks you're being
presumptuous by declaring check and mate prematurely.

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 --- Can anyone help me with a way to determine of two or more variables have the same value? For instance,

$a1 = 1000
$a2 = 2000
$a3 = 2000
$a4 = 4000
$a5 = 5000

I want check these five variables and determine whether, as in this case, two or more of the variables have the same value.

Any suggestions how I can do this?

Thanks in advance.

kenn

--- End Message ---

Reply via email to