Results 1 to 30 of 99

Hybrid View

  1. Collapse Details
     
    #1
    friends with english jon's Avatar
    Join Date
    Dec 2011
    Location
    alcatraz
    Posts
    4,510
    i cannot believe i even read that code snippet
    Reply With Quote
     

  2. Collapse Details
     
    #2
    DogManz maks's Avatar
    Join Date
    Dec 2011
    Location
    Lud, Midworld
    Posts
    99,256
    Quote Originally Posted by jon View Post
    i cannot believe i even read that code snippet
    gotta start somewhere... What's with the 3 embedded 'if/else' loops though does php not have 'case'?
    Last edited by maks; 08-11-2012 at 11:09 AM.
    Reply With Quote
     

  3. Collapse Details
     
    #3
    friends with english jon's Avatar
    Join Date
    Dec 2011
    Location
    alcatraz
    Posts
    4,510
    identical logic expressed in the shortest possible number of instructions
    Code:
    function m0nde($input)
    {
      if ($input < 4) return leanonoppositeday;
      if ($input < 6) return fatbadcirculation;
      if ($input < 9) return obeselacksdiscipline;
      if ($input > 9) return fatfuckheartattack;
      return null;
    }
    $val = m0nde(trim(fgets(STDIN)));
    not sure why barry didn't think 9 was a notable input

    oh wait yes i am
    Reply With Quote
     

  4. Collapse Details
     
    #4
    full metal merchant timmy's Avatar
    Join Date
    Sep 2008
    Location
    i daer you to make it out of ferguson alive
    Posts
    19,567
    Quote Originally Posted by jon View Post
    identical logic expressed in the shortest possible number of instructions
    Code:
    function m0nde($input)
    {
      if ($input < 4) return leanonoppositeday;
      if ($input < 6) return fatbadcirculation;
      if ($input < 9) return obeselacksdiscipline;
      if ($input > 9) return fatfuckheartattack;
      return null;
    }
    $val = m0nde(trim(fgets(STDIN)));
    not sure why barry didn't think 9 was a notable input

    oh wait yes i am
    ive taken two classes in php, cut it out!
    *call centre crew*
    *hate talking to people crew*
    *get abused for a living crew*
    *sexually harassed by hot women crew*
    Reply With Quote
     

  5. Collapse Details
     
    #5
    v me in love v Camoron's Avatar
    Join Date
    Dec 1969
    Location
    Swampland
    Posts
    13,095
    Quote Originally Posted by fjs wins again View Post
    ive taken two classes in php, cut it out!
    2? really? i was thinking it was like ur first week

    or do you mean 2 classes as in 2 class periods not like 2 complete courses? i hope so.
    Reply With Quote
     

  6. Collapse Details
     
    #6
    full metal merchant timmy's Avatar
    Join Date
    Sep 2008
    Location
    i daer you to make it out of ferguson alive
    Posts
    19,567
    Quote Originally Posted by Camoron View Post
    2? really? i was thinking it was like ur first week

    or do you mean 2 classes as in 2 class periods not like 2 complete courses? i hope so.
    yes i literally hav ehad 2 days camoronar cut it out
    *call centre crew*
    *hate talking to people crew*
    *get abused for a living crew*
    *sexually harassed by hot women crew*
    Reply With Quote
     

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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