This file contains 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 | |
// A pretty basic but effective class that can be used for doing CRUD operations on Microsoft Dynamics NAV's Odata services | |
error_reporting(E_ALL); | |
ini_set("display_errors", 1); | |
class http_request { | |
protected $_handle = NULL; |
This file contains 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
// This code will only work if you use Sass 3.3 (or higher) | |
// Configuration : | |
// ----------------------------------------- | |
$screensizes : ( | |
'default' : 0 infinity, | |
'mobile' : 0 767px, | |
'phone' : 0 480px, | |
'tablet' : 481px 767px, |
This file contains 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 repeat() { | |
eat(); | |
sleep(); | |
code(); | |
repeat(); | |
})(); |
This file contains 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
<body> | |
<span id="a">red</span> | |
<span id="b">yellow</span> | |
<span id="n">Are you sure you want to start a new game?</span> | |
<span id="w">The %s player won. | |
Do you want to play a new game?</span> | |
<div id="game">It's the <span id="c"></span> player's move. | |
<table id="gameboard"> | |
<tr> | |
<td id="c-1-1"></td> |
This file contains 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
/* Add the desktop-hidden class to any HTML tag that contains mobile specific content */ | |
.desktop-hidden { | |
*display:none !important; /* IE6-7 */ | |
} | |
@media \0 screen { | |
.desktop-hidden { | |
display:none !important; /* IE8 only */ |
This file contains 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
%display-block-hacked { | |
display: block; | |
*zoom: 1; | |
} | |
%clear-both { | |
clear : both; | |
} | |
%blank-as-table { |
This file contains 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 parseQuery(str) { | |
var qso = {}; | |
var qs = (str || document.location.search); | |
// Check for an empty querystring | |
if (qs == "") { | |
return qso; | |
} | |
// Normalize the querystring | |
qs = qs.replace(/(^\?)/, '').replace(/;/g, '&'); | |
while (qs.indexOf("&&") != -1) { |
This file contains 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 "compass"; | |
/** | |
* Mixin scrollbar | |
*/ | |
@mixin scrollbar($size, $primary, $secondary: lighten($primary, 25%)) { | |
::-webkit-scrollbar { | |
width: $size; | |
height: $size; | |
} |
This file contains 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 helper = {}; | |
helper.string = { | |
contains : function (haystack, needle) { | |
return !!~haystack.indexOf(needle); | |
}, | |
... | |
}; |
This file contains 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 contains($haystack, $needle, $caseSensitive = false) { | |
return $caseSensitive? | |
(strpos($haystack, $needle) === FALSE ? FALSE : TRUE): | |
(stripos($haystack, $needle) === FALSE ? FALSE : TRUE); | |
} | |
var_dump(contains('bare','are')); // Outputs : bool(true) | |
var_dump(contains('stare', 'are')); // Outputs : bool(true) | |
var_dump(contains('stare', 'Are')); // Outputs : bool(true) | |
var_dump(contains('stare', 'Are', true)); // Outputs : bool(false) |
NewerOlder