This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var images = [ | |
| "http://www.netcarshow.org/uploads/42/20081215163952524.jpg", | |
| "http://www.netcarshow.org/uploads/11/20081213162058711.jpg", | |
| "http://www.netcarshow.org/uploads/40/20081223052831150.jpg" | |
| ]; | |
| // The index variable will keep track of which image is currently showing | |
| var index = 0,oldIndex; | |
| $(document).ready(function() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!doctype html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <title>Grid test</title> | |
| <link rel="stylesheet" href="css/example.css"> | |
| </head> | |
| <body> | |
| <div id="wrapper"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SELECT Products.* | |
| FROM Products | |
| JOIN ProductTags ON Products.id = ProductTags.product_id | |
| WHERE ProductTags.tag_id IN (1,2,3) | |
| GROUP BY Products.id | |
| HAVING COUNT(DISTINCT ProductTags.tag_id) = 3 | |
| /* | |
| Assuming that there is a unique | |
| constraint on product_id,tag_id you |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function getTweets($hash_tag) { | |
| $url = 'http://search.twitter.com/search.atom?q='.urlencode($hash_tag) ; | |
| echo "<p>Connecting to <strong>$url</strong> ...</p>"; | |
| $ch = curl_init($url); | |
| curl_setopt ($ch, CURLOPT_RETURNTRANSFER, TRUE); | |
| $xml = curl_exec ($ch); | |
| curl_close ($ch); | |
| //If you want to see the response from Twitter, uncomment this next part out: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <div class="example-class<?php echo ($xyz++%2); ?>"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // Our custom error handler | |
| function nettuts_error_handler($number, $message, $file, $line, $vars){ | |
| $email = " | |
| <p>An error ($number) occurred on line | |
| <strong>$line</strong> and in the <strong>file: $file.</strong> | |
| <p> $message </p>"; | |
| $email .= "<pre>" . print_r($vars, 1) . "</pre>"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function get_client_language($availableLanguages, $default='en'){ | |
| if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) { | |
| $langs=explode(',',$_SERVER['HTTP_ACCEPT_LANGUAGE']); | |
| foreach ($langs as $value){ | |
| $choice=substr($value,0,2); | |
| if(in_array($choice, $availableLanguages)){ | |
| return $choice; | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @import "mediaquery" | |
| .fart { | |
| width: 25%; | |
| @include breakpoint(tablet-size) { | |
| width: 100%; | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var myModule = angular.module(...); | |
| myModule.directive('directiveName', function (injectables) { | |
| return { | |
| restrict: 'A', | |
| template: '<div></div>', | |
| templateUrl: 'directive.html', | |
| replace: false, | |
| priority: 0, | |
| transclude: false, | |
| scope: false, |