Tags: time

Sort by: Date / Title /

  1. 1 year ago by stephane
    The author of this code does not tell where put it in the file... i suppose the good place is between <head> tags. You just have to build your cssheets as you want and you're done! :D
    1. <SCRIPT LANGUAGE="JavaScript">
    2. <!-- Begin
    3. function getCSS()
    4. {
    5. datetoday = new Date();
    6. timenow=datetoday.getTime();
    7. datetoday.setTime(timenow);
    8. thehour = datetoday.getHours();
    9.  
    10. if (thehour > 20)
    11. display = "tree_twilight.css";
    12. else if (thehour > 17)
    13. display = "tree_sunset.css";
    14. else if (thehour > 14)
    15. display = "tree_afternoon.css";
    16. else if (thehour > 11)
    17. display = "tree_noon.css";
    18. else if (thehour > 7)
    19. display = "tree_morning.css";
    20. else if (thehour > 4)
    21. display = "tree_sunrise.css";
    22. else if (thehour > 1)
    23. display = "tree_twilight.css";
    24. else
    25. display = "tree_sunset.css";
    26.  
    27. var css = '<';  css+='link rel="stylesheet" href=' + display + ' \/';  css+='>';
    28.  
    29. document.write(css);
    30. // End -->
    31. }
    32. </script>
    33. <script language="javascript">getCSS();</script>
    Paste this in your website: <script type="text/javascript" src="http://www.posteet.com/embed/1398"></script>
  2. 1 year ago by spirit
    1. # [Default] All domains have the same time synchronized from ntp-client in dom0.
    2. echo 0 > /proc/sys/xen/independent_wallclock
    3.  
    4. # If, however, this is not the case, you will have to run ntp-client on all guests. For this to work, you will need to set  to 1, i.e.
    5. echo 1 > /proc/sys/xen/independent_wallclock
    Paste this in your website: <script type="text/javascript" src="http://www.posteet.com/embed/1336"></script>
  3. 1 year ago by spirit
    1. $start = microtime(TRUE);
    2. // Code PHP à bencher
    3. for ($i = 0; $i < 10000; $i++)
    4. {
    5.     isset($array['id']);
    6. }
    7.  
    8. echo number_format(microtime(TRUE) - $start, 6)." seconds: isset\n";
    Paste this in your website: <script type="text/javascript" src="http://www.posteet.com/embed/1310"></script>
  4. sponsorised links
  5. 2 years ago by skanx
    time command > timelog doesn't work, because time outputs to stderr
    time command 2> timelog doesn't work either, because time actually is a bash keyword, and it's always run in a subshell
    
    Redirecting the output of time can be achieved by executing the whole command in a block, then redirecting its output:
    { time command; } 2> timelog
    
    Note: Linux also provides a time binary (/usr/bin/time), but with a different output (and might be less efficient ?)
    Paste this in your website: <script type="text/javascript" src="http://www.posteet.com/embed/803"></script>

First / Previous / Next / Last / Page 1 of 1 (4 posteets)