Today I learned - Page 10
Page 10 of 15 FirstFirst ... 89101112 ... LastLast
Results 136 to 150 of 219

Thread: Today I learned

  1. #136
    Senior Member
    Join Date
    Apr 2003
    Location
    Flanders Fields
    Posts
    5,833
    Today I learned I'll have to get a new phone soon. https://arstechnica.com/apple/2017/0...nd-the-ipad-4/
    IMPORTANT: STOP using the mysql extension. Use mysqli or pdo instead.
    World War One happened 100 years ago. Visit Old Grey Horror for the agony and irony.

  2. #137
    Senior Member cluelessPHP's Avatar
    Join Date
    Apr 2015
    Location
    Scotland
    Posts
    429
    Today I learned

    PHP Code:
    *{
        
    transitionall .25s linear
      -
    o-transitionall .25s linear
      -
    moz-transitionall .25s linear
      -
    webkit-transitionall .25s linear

    Once you had a good excuse, you opened the door to bad excuses ― Terry Pratchett, Thud
    Blog

    Six month project

  3. #138
    Senior Member cluelessPHP's Avatar
    Join Date
    Apr 2015
    Location
    Scotland
    Posts
    429
    Today I learned "this may effect the performance of your system" isn't just a randomly generated message
    Once you had a good excuse, you opened the door to bad excuses ― Terry Pratchett, Thud
    Blog

    Six month project

  4. #139
    Junior Member
    Join Date
    Jul 2017
    Location
    Spain, Majorca
    Posts
    0
    Today I learned that I need to Update my Laptop soon

  5. #140
    Senior Member cluelessPHP's Avatar
    Join Date
    Apr 2015
    Location
    Scotland
    Posts
    429
    Today I learned, rowing machines may look fun but they are actually death traps
    Once you had a good excuse, you opened the door to bad excuses ― Terry Pratchett, Thud
    Blog

    Six month project

  6. #141
    Junior Member
    Join Date
    Jul 2017
    Posts
    0
    Today I learned I don't know as much as I thought I knew.

  7. #142
    Senior Member cluelessPHP's Avatar
    Join Date
    Apr 2015
    Location
    Scotland
    Posts
    429
    Today I learned if you open up a laptop and poke around inside with a screwdriver it will stop working
    Once you had a good excuse, you opened the door to bad excuses ― Terry Pratchett, Thud
    Blog

    Six month project

  8. #143
    Senior Member cluelessPHP's Avatar
    Join Date
    Apr 2015
    Location
    Scotland
    Posts
    429
    Today I learned I won't be watching Doctor who after Christmas
    Once you had a good excuse, you opened the door to bad excuses ― Terry Pratchett, Thud
    Blog

    Six month project

  9. #144
    Pedantic Curmudgeon Weedpacket's Avatar
    Join Date
    Aug 2002
    Location
    General Contact Unit "Coping Mechanism"
    Posts
    22,503
    Why? Is Whittaker a rubbish actor?
    THERE IS AS YET INSUFFICIENT DATA FOR A MEANINGFUL ANSWER
    FAQs! FAQs! FAQs! Most forums have them!
    Search - Debugging 101 - Collected Solutions - General Guidelines - Getting help at all

  10. #145
    Senior Member cluelessPHP's Avatar
    Join Date
    Apr 2015
    Location
    Scotland
    Posts
    429
    Quote Originally Posted by Weedpacket View Post
    Why? Is Whittaker a rubbish actor?
    The actress has a voice similar to running nails over a chalk board
    Once you had a good excuse, you opened the door to bad excuses ― Terry Pratchett, Thud
    Blog

    Six month project

  11. #146
    Senior Member cluelessPHP's Avatar
    Join Date
    Apr 2015
    Location
    Scotland
    Posts
    429
    Today I learned I will never drink alcohol again evever ever ever agaun
    Once you had a good excuse, you opened the door to bad excuses ― Terry Pratchett, Thud
    Blog

    Six month project

  12. #147
    High Energy Magic Dept. NogDog's Avatar
    Join Date
    Aug 2006
    Location
    Ankh-Morpork
    Posts
    14,843
    Just learned about CSS Grid this weekend. Seems like a good idea. Gonna play around with it some....

    "Well done....Consciousness to sarcasm in five seconds!" ~ Terry Pratchett, Night Watch

    How to Ask Questions the Smart Way (not affiliated with this site, but well worth reading)

    My Blog
    cwrBlog: simple, no-database PHP blogging framework

  13. #148
    Senior Member cluelessPHP's Avatar
    Join Date
    Apr 2015
    Location
    Scotland
    Posts
    429
    PHP Code:
    <?php
        $i 
    5;
        
        switch (
    $i) :
            case 
    0:
                echo 
    '$i is 0.';
                break;
            case 
    1:
            case 
    2:
            case 
    3:
            case 
    4:
            case 
    5:
                echo 
    '$i is somewhere between 1 and 5.';
                break;
            case 
    6:
            case 
    7:
                echo 
    '$i is either 6 or 7.';
                break;
            default:
                echo 
    "I don't know how much \$i is.";
        endswitch;
        
    ?>
    Can't remember if I knew this and forgot or just learned this today


    Instead of

    PHP Code:
     <?php
        $i 
    5;
        
        switch (
    $i) {
            case 
    0:
                echo 
    '$i is 0.';
                break;
            case 
    1:
            case 
    2:
            case 
    3:
            case 
    4:
            case 
    5:
                echo 
    '$i is somewhere between 1 and 5.';
                break;
            case 
    6:
            case 
    7:
                echo 
    '$i is either 6 or 7.';
                break;
            default:
                echo 
    "I don't know how much \$i is.";
        }
        
    ?>
    Once you had a good excuse, you opened the door to bad excuses ― Terry Pratchett, Thud
    Blog

    Six month project

  14. #149
    Settled 4 red convertible dalecosp's Avatar
    Join Date
    Jul 2002
    Location
    Accelerating Windows at 9.81 m/s....
    Posts
    8,493
    Quote Originally Posted by cluelessPHP View Post
    PHP Code:
        
        
    switch ($i) : 
    Can't remember if I knew this and forgot or just learned this today


    Instead of

    PHP Code:
        
        
    switch ($i) { 
    Of course, if your project conforms to the PHP-FIG's PSR-2, the second way is required.

    Today I learned that I've no idea how to get meaningful results/action from pcntl_waitpid(), so I'll just call it with WNOHANG and follow up with something like this:

    PHP Code:
    $working true;

    while (
    $working) {

        
    sleep(60);

        
    $test = `pgrep $name_of_external_program`;

        if (
    strlen($test) < 1) {
            
    $working false;
        }
    }
    return; 
    /!!\ mysql_ is deprecated --- don't use it! Tell your hosting company you will switch if they don't upgrade! /!!!\ ereg() is deprecated --- don't use it!

    dalecosp "God doesn't play dice." --- Einstein "Perl is hardly a paragon of beautiful syntax." --- Weedpacket

    Getting Help at All --- Collected Solutions to Common Problems --- Debugging 101 --- Unanswered Posts --- OMBE: Office Machines, Business Equipment

  15. #150
    Senior Member cluelessPHP's Avatar
    Join Date
    Apr 2015
    Location
    Scotland
    Posts
    429
    Once you had a good excuse, you opened the door to bad excuses ― Terry Pratchett, Thud
    Blog

    Six month project

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
  •