SitePoint Sponsor

User Tag List

Page 7 of 9 FirstFirst ... 3456789 LastLast
Results 151 to 175 of 219

Thread: PHP Quiz

  1. #151
    Mlle. Ledoyen silver trophy seanf's Avatar
    Join Date
    Jan 2001
    Location
    UK
    Posts
    7,168
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Let's have a question from someone ...

    Sean
    Harry Potter

    -- You lived inside my world so softly
    -- Protected only by the kindness of your nature

  2. #152
    SitePoint Wizard samsm's Avatar
    Join Date
    Nov 2001
    Location
    Atlanta, GA, USA
    Posts
    5,011
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Alright!

    Write a php script which (assuming no timeout) would take over one year to complete.

    Rule:
    You can't use a loop that will obviously always evaluate true. Example:
    PHP Code:
     while(1) { doSomething(); } //no good 
    Using your unpaid time to add free content to SitePoint Pty Ltd's portfolio?

  3. #153
    Sidewalking anode's Avatar
    Join Date
    Mar 2001
    Location
    Philadelphia, US
    Posts
    2,205
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Assuming no timeout
    PHP Code:
    sleep(5616000);
    echo 
    'Done'
    or am I missing something?
    TuitionFree a free library for the self-taught
    Anode Says... Blogging For Your Pleasure

  4. #154
    SitePoint Wizard samsm's Avatar
    Join Date
    Nov 2001
    Location
    Atlanta, GA, USA
    Posts
    5,011
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'll accept that!

    I was thinking of something along these lines:
    PHP Code:
    $source 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa';
    preg_match('/a*a*a*a*a*a*a*a*a*a*a*a*a*a*a*a*a*a*a*a*a*a*a*a*a*a*a*a*a*a*a*a*a*a*a*a*a*[b]/'$source);
    // excution time = septillions of years 
    ... but I purposefully wasn't clear.

    Your question, anode!
    Using your unpaid time to add free content to SitePoint Pty Ltd's portfolio?

  5. #155
    Sidewalking anode's Avatar
    Join Date
    Mar 2001
    Location
    Philadelphia, US
    Posts
    2,205
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    OK,

    Describe a methodology(no code required, psudocode perhaps to illustrate a point) to program a Chess client in PHP. Difficulty levels are not required; the program is allowed to play to the best of its ability at all times.
    TuitionFree a free library for the self-taught
    Anode Says... Blogging For Your Pleasure

  6. #156
    SitePoint Zealot Egghead's Avatar
    Join Date
    Feb 2002
    Posts
    197
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by anode
    OK,

    Describe a methodology(no code required, psudocode perhaps to illustrate a point) to program a Chess client in PHP. Difficulty levels are not required; the program is allowed to play to the best of its ability at all times.
    Crikey Anode that sounds just like a school project you may have been set! Are you being sneaky and trying to get people to do your homework?

  7. #157
    Sidewalking anode's Avatar
    Join Date
    Mar 2001
    Location
    Philadelphia, US
    Posts
    2,205
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I haven't been in an academic environment in about 5 years
    TuitionFree a free library for the self-taught
    Anode Says... Blogging For Your Pleasure

  8. #158
    SitePoint Wizard samsm's Avatar
    Join Date
    Nov 2001
    Location
    Atlanta, GA, USA
    Posts
    5,011
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Egghead
    Crikey Anode...
    I'm going to have to second that"crikey"!

    Does this chess application need to be able to have strategy or does it just need to be able to follow the rules of chess?
    Using your unpaid time to add free content to SitePoint Pty Ltd's portfolio?

  9. #159
    Sidewalking anode's Avatar
    Join Date
    Mar 2001
    Location
    Philadelphia, US
    Posts
    2,205
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Should have probably been clearer on that. Yes it does, that's why I mentioned that it should play to the best of its ability(I'm under the impression most chess clients work "subtractively" as far as difficulty levels, to borrow a sound synthesis term.)
    TuitionFree a free library for the self-taught
    Anode Says... Blogging For Your Pleasure

  10. #160
    SitePoint Wizard samsm's Avatar
    Join Date
    Nov 2001
    Location
    Atlanta, GA, USA
    Posts
    5,011
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I had a feeling you meant that.

    There's a relatively concise answer for this?

    I ask because this seems kind of like something where I could think about it for eight hours and make some progress then walk to the bookstore and find that I have thought my way halfway through chapter one of a chess book, and there are 16 chapters, and each is twice as difficult as the last.
    Using your unpaid time to add free content to SitePoint Pty Ltd's portfolio?

  11. #161
    Sidewalking anode's Avatar
    Join Date
    Mar 2001
    Location
    Philadelphia, US
    Posts
    2,205
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well, I guess if you were planning on building a production version

    I meant maybe 50-100 words, maybe with a diagram (if I were answering, I'd do a diagram ) describing the high-level design of the system.

    If you guys think it's too hard wussies, I can give the floor back up.
    TuitionFree a free library for the self-taught
    Anode Says... Blogging For Your Pleasure

  12. #162
    SitePoint Evangelist cyngon's Avatar
    Join Date
    Aug 2001
    Location
    Livonia, MI, USA
    Posts
    513
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Heh, maybe I'm a wuss, but there is a minor nitpick in the fact that if a pseudo class and a diagram are all that is necissary then the question is entirely language independent.

    Edit: Evil evil typo-creating computer monkeys!!!
    Last edited by cyngon; Apr 20, 2003 at 19:55.

  13. #163
    SitePoint Wizard samsm's Avatar
    Join Date
    Nov 2001
    Location
    Atlanta, GA, USA
    Posts
    5,011
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Maybe the real challenge is to figure out how this could be related to PHP specifically. ;-)

    (cyngon: I lease my keyboard from those same monkeys)
    Last edited by samsm; Apr 21, 2003 at 07:27.
    Using your unpaid time to add free content to SitePoint Pty Ltd's portfolio?

  14. #164
    Mlle. Ledoyen silver trophy seanf's Avatar
    Join Date
    Jan 2001
    Location
    UK
    Posts
    7,168
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This is a hell of a question! Wasn't one of the PHP quizzes (can't think of the site, but you get good prizes) similar to this?

    Sean
    Harry Potter

    -- You lived inside my world so softly
    -- Protected only by the kindness of your nature

  15. #165
    SitePoint Wizard samsm's Avatar
    Join Date
    Nov 2001
    Location
    Atlanta, GA, USA
    Posts
    5,011
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Using your unpaid time to add free content to SitePoint Pty Ltd's portfolio?

  16. #166
    Mlle. Ledoyen silver trophy seanf's Avatar
    Join Date
    Jan 2001
    Location
    UK
    Posts
    7,168
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That's the site I was thinking of, but I must have seen the chess question somewhere else

    Sean
    Harry Potter

    -- You lived inside my world so softly
    -- Protected only by the kindness of your nature

  17. #167
    Sidewalking anode's Avatar
    Join Date
    Mar 2001
    Location
    Philadelphia, US
    Posts
    2,205
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by cyngon
    Heh, maybe I'm a wuss, but there is a minor nitpick in the fact that if a pseudo class and a diagram are all that is necissary then the question is entirely language independent.

    Edit: Evil evil typo-creating computer monkeys!!!
    This is kind of true and kind of not true. The basic ideas and algorithms would be the same, yet the implemenation would obviously have to be different as most chess programs run locally or as a Java app.
    TuitionFree a free library for the self-taught
    Anode Says... Blogging For Your Pleasure

  18. #168
    ********* Genius Mike's Avatar
    Join Date
    Apr 2001
    Location
    Canada
    Posts
    5,458
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by samsm
    Very nice prizes for those!
    Mike
    It's not who I am underneath, but what I do that defines me.

  19. #169
    SitePoint Zealot Anagram's Avatar
    Join Date
    Feb 2003
    Location
    Norway
    Posts
    109
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by cyborg from dh
    echo's the remote ip address of the user accessing the script, unless it is the isp, in which case, usually, HTTP_X_FORWARDED_FOR is set.
    Heheh..you're absolutely correct.
    If pigs could fly, the prize of bacon would reach the sky.

    www.dosspirit.net - Norwegian
    reviews of DOS games

  20. #170
    Prolific Blogger silver trophy Technosailor's Avatar
    Join Date
    Jun 2001
    Location
    Before These Crowded Streets
    Posts
    9,446
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ok, time to revive the thread. I have a non-PHP question but something most of you know a little about.

    Apache web server derived its name from:

    a) A multi-talented and faceted Native American tribe.
    b) lots of patches making it "a patchy server"
    c) A development codename that never was changed on stable release
    d) Apache is actually an Anglofied german word.
    Aaron Brazell
    Technosailor



  21. #171
    Mlle. Ledoyen silver trophy seanf's Avatar
    Join Date
    Jan 2001
    Location
    UK
    Posts
    7,168
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    B - at first it was literately 'a patchy server'

    Sean
    Harry Potter

    -- You lived inside my world so softly
    -- Protected only by the kindness of your nature

  22. #172
    Prolific Blogger silver trophy Technosailor's Avatar
    Join Date
    Jun 2001
    Location
    Before These Crowded Streets
    Posts
    9,446
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Knew I shoukdn't have made it multiple choice.
    Aaron Brazell
    Technosailor



  23. #173
    Mlle. Ledoyen silver trophy seanf's Avatar
    Join Date
    Jan 2001
    Location
    UK
    Posts
    7,168
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Without looking, what is the latest version of PHP, not including release candidates?

    Sean
    Harry Potter

    -- You lived inside my world so softly
    -- Protected only by the kindness of your nature

  24. #174
    Sidewalking anode's Avatar
    Join Date
    Mar 2001
    Location
    Philadelphia, US
    Posts
    2,205
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    4.3.2 released this morning.
    TuitionFree a free library for the self-taught
    Anode Says... Blogging For Your Pleasure

  25. #175
    Prolific Blogger silver trophy Technosailor's Avatar
    Join Date
    Jun 2001
    Location
    Before These Crowded Streets
    Posts
    9,446
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Was gonna say, but anode beat me.
    Aaron Brazell
    Technosailor




Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •