php-general Digest 16 Sep 2011 13:38:18 -0000 Issue 7481

Topics (messages 314885 through 314899):

Re: Repetitive answers . . .
        314885 by: Joshua Stoutenburg
        314892 by: tamouse mailing lists
        314895 by: Joshua Stoutenburg
        314899 by: Robert Cummings

PHP 5.4.0beta1 released
        314886 by: dsp.php.net
        314887 by: dsp.php.net
        314888 by: dsp.php.net
        314889 by: dsp.php.net
        314890 by: Sharl.Jimh.Tsin
        314891 by: dsp.php.net

Re: What would you like to see in most in a text editor?
        314893 by: tamouse mailing lists
        314894 by: Marco Lanzotti
        314896 by: Joshua Stoutenburg

Re: lost return value during a static call
        314897 by: Johan Lidström

Help on number matching function
        314898 by: Dare Williams

Administrivia:

To subscribe to the digest, e-mail:
        php-general-digest-subscr...@lists.php.net

To unsubscribe from the digest, e-mail:
        php-general-digest-unsubscr...@lists.php.net

To post to the list, e-mail:
        php-gene...@lists.php.net


----------------------------------------------------------------------
--- Begin Message ---
On Thu, Sep 15, 2011 at 5:46 PM, Jason Pruim
>
> I've always thought that getting a couple fairly similar answers to the same 
> question helped to validate the answer for someone who is in the early 
> process of learning ;)
>>
>> -nathan
>
>

Yeah, you know, I think you are right! I'd like to answer this
question the same way, even though half a dozen have already answered
it the same way.

But let me put a spin on it:

<?php

$information = <<<EOF

I got a great idea, why don't we write hundreds of books and websites
with all of our repetitive answers and call it the "information age".
Who cares if all the priceless pearls of rare knowledge are buried,
lost, and irretrievable.  We'll have the information age!

Then, after we've ushered in the information age, we'll invent a
search bot to crawl all over the heap of information and fling it
around whenever somebody asks for it!

Then, we'll all sit around on a mailing list, and when somebody comes
in seeking refuge from the flinging search bot, looking for some rare
piece of information, we'll fling all the common stuff at him instead!
 It will be hilarious!

EOF;


class baboon
{
    $ammo = '';

    public __construct($ammo)
    {
        $this->ammo = $ammo;
    }

    public function flingAt($target)
    {
        $target->flingAlert($this->ammo);
    }
}


$me = new baboon($information);
$you = new baboon();
$me->flingAt($you);


// I hope everyone finds this more humorous than offensive.

--- End Message ---
--- Begin Message ---
On Thu, Sep 15, 2011 at 8:31 PM, Joshua Stoutenburg
<jehoshu...@gmail.com> wrote:
> // I hope everyone finds this more humorous than offensive.

My baboon is offended.

--- End Message ---
--- Begin Message ---
On Fri, Sep 16, 2011 at 12:35 AM, tamouse mailing lists
>
> My baboon is offended.
>

class baboon extends human
{
   $ammo = '';

   public __construct($ammo)
   {
       $this->ammo = $ammo;
   }

   public function flingAt($target)
   {
       $target->flingAlert($this, $this->ammo);
   }

   public function flingAlert($source, $missile)
   {
       $hit = rand(0,1);
       if ($hit == 1)
       {
            $this->screech();
       }
       else {
            $this->howl();
       }

       // regardless, return the favor
       $this->flingAt($souce);
   }

   private function howl()
   {
        echo "Oooaa-oooaa";
   }

   private function screech()
   {
        echo "Eeeee";
   }
}

$ammo = "stuff";
$me = new baboon($ammo);
$you = new baboon($ammo);
$me->flingAt($you);

// :) This is pretty fun :)

--- End Message ---
--- Begin Message ---
On 11-09-15 09:31 PM, Joshua Stoutenburg wrote:
class baboon
{
     $ammo = '';

     public __construct($ammo)
     {
         $this->ammo = $ammo;
     }

     public function flingAt($target)
     {
         $target->flingAlert($this->ammo);
     }
}


$me = new baboon($information);
$you = new baboon();
$me->flingAt($you);

I'm sorry, but this is unnacceptably ambiguous. Due to the poor design I don't know whether to duck or open my mouth for a treat. Let's make the program a bit more flexible and useful...

<?php

class baboon extends mammal
{
    public function fling( $something, $target )
    {
        $target->flingAlert( $something, $target );
    }

    public function openMouth()
    {
        echo "Aaaaaaaaaaaaaaaaaaah\n";
    }

    public function evade()
    {
        if( rand( 1, 100 ) <= 70 )
        {
            echo "Pheeeeeeew! That was close.\n";
        }
        else
        {
            echo "SPLAT!\n";
        }
    }

    public function flingAlert( $something, $target )
    {
        switch( $something )
        {
            case 'treat':
            {
                $this->openMouth();
                break;
            }

            default:
            {
                $this->evade();
                break;
            }
        }
    }
}

$me = new baboon();
$you = new baboon();

$me->fling( 'scooby snack', $you );
$me->fling( 'poo', $you );

?>

I love Friday :)

Cheers,
Rob.
--
E-Mail Disclaimer: Information contained in this message and any
attached documents is considered confidential and legally protected.
This message is intended solely for the addressee(s). Disclosure,
copying, and distribution are prohibited unless authorized.

--- End Message ---
--- Begin Message ---
Hello!





Stas has packed PHP 5.4.0beta1 which you can find here:





   http://downloads.php.net/stas/





The Windows team provides windows binaries which you find here:

    http://windows.php.net/qa/





Please test it carefully, and report any bugs in the bug system, but


only if you have a short reproducable test case. The next beta


will be released on Oct 13.


regards,


Stas and David

--- End Message ---
--- Begin Message ---
Hello!





Stas has packed PHP 5.4.0beta1 which you can find here:





   http://downloads.php.net/stas/





The Windows team provides windows binaries which you find here:

    http://windows.php.net/qa/





Please test it carefully, and report any bugs in the bug system, but


only if you have a short reproducable test case. The next beta


will be released on Oct 13.


regards,


Stas and David

--- End Message ---
--- Begin Message ---
Hello!





Stas has packed PHP 5.4.0beta1 which you can find here:





   http://downloads.php.net/stas/





The Windows team provides windows binaries which you find here:

    http://windows.php.net/qa/





Please test it carefully, and report any bugs in the bug system, but


only if you have a short reproducable test case. The next beta


will be released on Oct 13.


regards,


Stas and David

--- End Message ---
--- Begin Message ---
Hello!





Stas has packed PHP 5.4.0beta1 which you can find here:





   http://downloads.php.net/stas/





The Windows team provides windows binaries which you find here:

    http://windows.php.net/qa/





Please test it carefully, and report any bugs in the bug system, but


only if you have a short reproducable test case. The next beta


will be released on Oct 13.


regards,


Stas and David

--- End Message ---
--- Begin Message ---
在 2011-09-16五的 03:50 +0200,d...@php.net写道:
> Hello!
> 
> 
> 
> 
> 
> Stas has packed PHP 5.4.0beta1 which you can find here:
> 
> 
> 
> 
> 
>    http://downloads.php.net/stas/
> 
> 
> 
> 
> 
> The Windows team provides windows binaries which you find here:
> 
>     http://windows.php.net/qa/
> 
> 
> 
> 
> 
> Please test it carefully, and report any bugs in the bug system, but
> 
> 
> only if you have a short reproducable test case. The next beta
> 
> 
> will be released on Oct 13.
> 
> 
> regards,
> 
> 
> Stas and David
> 
WHY post it four times??
-- 
Best regards,
Sharl.Jimh.Tsin (From China **Obviously Taiwan INCLUDED**)

Using Gmail? Please read this important notice:
http://www.fsf.org/campaigns/jstrap/gmail?10073.


--- End Message ---
--- Begin Message ---
>> Please test it carefully, and report any bugs in the bug system, but
>>
>>
>> only if you have a short reproducable test case. The next beta
>>
>>
>> will be released on Oct 13.
>>
>>
>> regards,
>>
>>
>> Stas and David
>>
> WHY post it four times??

a glitch with my mail server.

--- End Message ---
--- Begin Message ---
On Wed, Sep 14, 2011 at 5:07 PM, Jonesy <gm...@jonz.net> wrote:
> On Wed, 14 Sep 2011 14:08:09 +0100, Richard Quadling wrote:
>> On 14 September 2011 13:18, Tim Streater <t...@clothears.org.uk> wrote:
>>> On 14 Sep 2011 at 12:40, Richard Quadling <rquadl...@gmail.com> wrote:
>>>> On 14 September 2011 01:23, tamouse wrote:
>>>>> On Tue, Sep 13, 2011 at 3:35 PM, Robert Cummings wrote:
>>>>>> I'm a big fan of editors that work in the terminal.
>>>>>
>>>>> You'll get my emacs when you pry it out of my cold dead hands.
>>>>
>>>> Pah! You and your full screen editor.
>>>>
>>>> EDLIN is the way to go.
>>>
>>> Is that more or less terse than TECO?
>>>
>>
>> TECO - OUCH.
>
> heh.  I built my first website with WordStar 6.0 under OS/2.
>
> Jonesy -- yup, I've used TECO, too -- on an ASR-35 TTY

I declare a winner.

--- End Message ---
--- Begin Message ---
Il 13/09/2011 21:56, Brad Huskins ha scritto:
> So I would like to get some feedback on what features people would
> most want, since I am still at a very flexible stage in development.

Configurable syntax highlight, autoindent and autocomplete.

Bye,
Marco

--- End Message ---
--- Begin Message ---
On Fri, Sep 16, 2011 at 12:51 AM, Marco Lanzotti <ma...@lanzotti.com> wrote:
> Il 13/09/2011 21:56, Brad Huskins ha scritto:
>> So I would like to get some feedback on what features people would
>> most want, since I am still at a very flexible stage in development.
>

I wouldn't want a text editor. I'd want an IDE.

debugging - runtime control, watches, breakpoints, call stack, etc
syntax highlighting
project level intelligence (Ctrl+Click on usage of a function,
variable, class, etc takes you to the definition, as ONE example)
phpdoc, javadoc, etc auto-completion and referencing
function/parameter hinting
integration with Git
task list generated from customizable keyword comments like TODO
multiple coding languages (PHP, CSS, Javascript, HTML, SQL, etc, etc)
find and replace within selection, file, files, directories, etc.
(with regex too)
FAST (unlike Dreambeaver)

Netbeans and Eclipse have all/many of these features.

I started out with Notepad++. It's a text editor trying really really
hard to be an IDE.

I mostly use Netbeans. But in the future I will primarily use Eclipse
as I do more work in Java, Android, and Python.

Love the IDE for projects. Never going back.

I still use Notepad++ for editing config files.

-- Josh --
Web Developer
PHP, SQL, HTML, CSS, Javascript, AJAX

--- End Message ---
--- Begin Message ---
On 15 September 2011 15:57, Robert Williams <rewilli...@thesba.com> wrote:

>
> On Sep 15, 2011, at 6:03, "chamila gayan" <cgcham...@gmail.com> wrote:
>
> > when it goes through 2 static methods, at some point it stops returning
> > value to the calling method. (please see comments in-line).
>
> The getArray() method and the 'else' portion of the getChild() method both
> lack a return statement, so they're basically just tossing out whatever
> value they come up with.
>
> --
> Bob Williams
>
> Notice: This communication, including attachments, may contain information
> that is confidential. It constitutes non-public information intended to be
> conveyed only to the designated recipient(s). If the reader or recipient of
> this communication is not the intended recipient, an employee or agent of
> the intended recipient who is responsible for delivering it to the intended
> recipient, or if you believe that you have received this communication in
> error, please notify the sender immediately by return e-mail and promptly
> delete this e-mail, including attachments without reading or saving them in
> any manner. The unauthorized use, dissemination, distribution, or
> reproduction of this e-mail, including attachments, is prohibited and may be
> unlawful. If you have received this email in error, please notify us
> immediately by e-mail or telephone and delete the e-mail and the attachments
> (if any).
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
Confirmed, putting a return statement on lines 16 and 26 yields the expected
result.

-- 
"It is not possible to simultaneously understand and appreciate the Intel
architecture" --Ben Scott

--- End Message ---
--- Begin Message ---
Dear PHP Group,

I need a Function of any category in  either PHP or MySQL RDBMS customize 
Function, Class, Methods or anything that could help me compare a particular 
set of number and return their matching result. e.g If I have a 5 Digits set of 
number  and need to match it with another set of five  digits and return how 
many number are match and the figures that are match. 

1.    (62,39,47,25,14) - (14,39,62,25,47) - match 5 (all)
2.    (55,11,27,62,39) - (66,39,12,13,27) - match 2 (27,39)
3.    (20,04,56,17,16) - (16,01,17,04,79) - match 3 (16,17,04)

Any Help will be appreciated.

Thank you.

--- End Message ---

Reply via email to