Hierarchical data metrics that allows fast read operations on tree like structures.
Based on Left and Right fields that are set during tree traversal. When entered into node value is set to it's Left, when exiting node value is set to it's Right.
| header('Content-Type: image/png'); | |
| $modified = $ch->lastmodified(); | |
| if($modified) | |
| { | |
| if (isset($_SERVER['HTTP_IF_MODIFIED_SINCE']) && strtotime($_SERVER['HTTP_IF_MODIFIED_SINCE']) >= $modified) | |
| { | |
| header('HTTP/1.0 304 Not Modified'); exit(); | |
| } | |
| //echo $modified; | |
| header('Last-Modified: ' .gmdate('D, d M Y H:i:s T', $modified).' GMT'); |
| # | |
| # Apache/PHP/Drupal settings: | |
| # | |
| # Protect files and directories from prying eyes. | |
| <FilesMatch "\.(engine|inc|info|install|make|module|profile|test|po|sh|.*sql|theme|tpl(\.php)?|xtmpl)(~|\.sw[op]|\.bak|\.orig|\.save)?$|^(\..*|Entries.*|Repository|Root|Tag|Template)$|^#.*#$|\.php(~|\.sw[op]|\.bak|\.orig\.save)$"> | |
| Order allow,deny | |
| </FilesMatch> | |
| # Don't show directory listings for URLs which map to a directory. |
| Google Suggestion | |
| //Old format | |
| http://suggestqueries.google.com/complete/search?hl=sv&output=toolbar&q=vxthus | |
| //new format | |
| http://clients1.google.com/complete/search?hl=sv&output=toolbar&q=vxthus | |
| //Suspicious | |
| https://www.google.se/complete/search?client=psy-ab&hl=en-IN&tok=0&q=droppslanga |
| //Select class selector | |
| //select option by index | |
| $('#frakt_type option:eq(0)').prop("selected",true); | |
| //select option by value | |
| $('#frakt_type option[value="'+4+'"]').prop("selected",true); | |
| //Select option by contains | |
| $('#frakt_type option:contains("find_text")').prop("selected",true); |
| <?php | |
| * This demo is partly based on a post by Anthony Sterling on the sitepoint forum. | |
| * It is partly based on a video by John Lebensold of killerphp.com | |
| * | |
| * http://www.sitepoint.com/forums/showthread.php?t=636303 | |
| * | |
| * AnthonySterling | |
| * Twitter: @AnthonySterling | |
| * | |
| * Here's a rather ridiculous, yet interesting way to use __call. |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1"> | |
| <meta name="description" content="Short example on using indexedDB with jquery mobile - last updated: May 2012"> | |
| <meta name="author" content="Ido Green"> | |
| <title>IndexedDB with JQM</title> |
| <?php | |
| function weekrange($year, $i = 0) | |
| { | |
| $week = sprintf("%02d", $i); | |
| $dto = new DateTime(); | |
| $dto->setISODate($year, $week); | |
| $year2 = $dto->format('Y'); | |
| if ($year2 < $year) $st = '01-'; | |
| else $st = $dto->format('d') . "-"; | |
| $dto->modify('+6 days'); |
Hierarchical data metrics that allows fast read operations on tree like structures.
Based on Left and Right fields that are set during tree traversal. When entered into node value is set to it's Left, when exiting node value is set to it's Right.
| <html> | |
| <head> | |
| <title>Side by Side Element</title> | |
| <style> | |
| /*---------White space: no wrap Method---------*/ | |
| .parent { | |
| white-space: nowrap; | |
| width: 400px; | |
| } |
| <?php | |
| class produkt_pool | |
| { | |
| protected static $instance = array(); | |
| public static function get_instance($pid) | |
| { | |
| if(!isset(self::$instance[$pid])) | |
| { |