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 panda = (function () { | |
var panda = {}, bambooLevel = 0, isAsleep = false; | |
function wakeUp() { | |
isAsleep = false; | |
} | |
panda.eatBamboo = function () { | |
bambooLevel = bambooLevel + 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
<h1>CSS Basic Elements</h1> | |
<p>The purpose of this HTML is to help determine what default settings are with CSS and to make sure that all possible HTML Elements are included in this HTML so as to not miss any possible Elements when designing a site.</p> | |
<hr /> | |
<h1 id="headings">Headings</h1> | |
<h1>Heading 1</h1> | |
<h2>Heading 2</h2> |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>FuzzBuzz with CSS</title> | |
<style type="text/css"> | |
body{counter-reset:fuzzbuzz;font-family:arial;font-size:18px;} | |
div{padding:10px;margin:10px;width:80px;float:left;height:30px;color:#999;text-align:center;} | |
div:after{content:counter(fuzzbuzz);counter-increment:fuzzbuzz;} | |
div:nth-child(3n):not(:nth-child(5n)):after{content:"fuzz";color:red;font-weight:bold;} |
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 GIST IS OUT OF DATE AND NOT MONITORED | |
PLEASE SEE https://github.com/leecrossley/cordova-plugin-shake-detection | |
*/ | |
var shake = (function () { | |
var shake = {}, | |
watchId = null, | |
options = { frequency: 300 }, | |
previousAcceleration = { x: null, y: null, z: 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
NSString* doc = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex:0]; | |
NSString* lib = [NSSearchPathForDirectoriesInDomains(NSLibraryDirectory, NSUserDomainMask, YES) objectAtIndex:0]; | |
float version = [[[UIDevice currentDevice] systemVersion] floatValue]; | |
if (version < 5.1) | |
{ | |
u_int8_t b = 1; | |
setxattr([doc fileSystemRepresentation], "com.apple.MobileBackup", &b, 1, 0, 0); | |
setxattr([lib fileSystemRepresentation], "com.apple.MobileBackup", &b, 1, 0, 0); |
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 turtleWriter = new CompressingTurtleWriter | |
{ | |
HighSpeedModePermitted = true, | |
CompressionLevel = WriterCompressionLevel.None, | |
PrettyPrintMode = false | |
}; |
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
public static void ForEach<T>(this IEnumerable<T> items, Action<T> action) | |
{ | |
foreach (var item in items) | |
{ | |
action(item); | |
} | |
} |
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
window.onerror = function (message, file, line) { | |
window.external.Notify("Error in Application: " + message + ". Source File: " + file + ", Line: " + line); | |
} |
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
<canvas id="user-icon" width="256" height="256"></canvas> |
OlderNewer