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 ng-app> | |
<head> | |
<title>Angular Example</title> | |
<script src="angular.js"></script> | |
<script src="script.js"></script> | |
</head> | |
<body ng-controller="MainController"> | |
<h1>{{message}}</h1> | |
</body> |
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 work = function () { | |
console.log("working hard!"); | |
}; | |
var doWork = function(f) { | |
console.log("starting"); | |
try { | |
f(); |
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
array(17) { ["jquery.com"]=> array(3) { ["blog_id"]=> int(1) ["cookie_domain"]=> string(11) ".jquery.com" ["options"]=> array(3) { ["blogname"]=> string(6) "jQuery" ["stylesheet"]=> string(10) "jquery.com" ["active_plugins"]=> array(1) { [0]=> string(23) "jquery-static-index.php" } } } ["blog.jquery.com"]=> array(3) { ["blog_id"]=> int(2) ["cookie_domain"]=> string(11) ".jquery.com" ["options"]=> array(2) { ["blogname"]=> string(11) "jQuery Blog" ["stylesheet"]=> string(15) "blog-jquery-com" } } ["api.jquery.com"]=> array(3) { ["blog_id"]=> int(3) ["cookie_domain"]=> string(11) ".jquery.com" ["options"]=> array(2) { ["blogname"]=> string(24) "jQuery API Documentation" ["stylesheet"]=> string(14) "api.jquery.com" } } ["plugins.jquery.com"]=> array(3) { ["blog_id"]=> int(4) ["cookie_domain"]=> string(11) ".jquery.com" ["options"]=> array(2) { ["blogname"]=> string(14) "jQuery Plugins" ["stylesheet"]=> string(18) "plugins.jquery.com" } } ["learn.jquery.com"]=> array(3) { ["blog_id"]=> int(5) ["cookie_domain"]=> |
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
int LED = 13; | |
int s = 300; | |
int o = 800; | |
void setup() { | |
// put your setup code here, to run once: | |
pinMode(LED, OUTPUT); | |
} | |
void character(int speed) { |
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 jQueryVer = { | |
isEqual: function (test, act) { | |
this.version = test || this.version; | |
if (this.version) { | |
//if actual jquery version is passed in use that if not get it. | |
act = act || jQuery.fn.jquery; | |
return this._compare(act); | |
} | |
}, | |
//Boolean value on if the actual jQuery Version is greater then the test version. |
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 parser = document.createElement('a'); | |
parser.href = "http://example.com:3000/pathname/?search=test#hash"; | |
parser.protocol; // => "http:" | |
parser.hostname; // => "example.com" | |
parser.port; // => "3000" | |
parser.pathname; // => "/pathname/" | |
parser.search; // => "?search=test" | |
parser.hash; // => "#hash" | |
parser.host; // => "example.com:3000" |
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
<script src="/static/js/libs/jquery.min.js"></script> | |
<script>window.jQuery || document.write('<script src="/static/js/libs/jquery.min.js"><\/script>')</script> |
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
// Create a reference to the Array.slice "static" method. | |
var slice = [].slice; | |
// call some function with one required argument. | |
var somefunction = function (requiredArgument) { | |
// arguments is an Array-like local variable available within all functions. | |
// arguments refers to the function's arguments within the function, you can use the | |
// arguments object if you call a function with more arguments than it is formally declared to accept. | |
// https://developer.mozilla.org/en/JavaScript/Reference/Functions_and_function_scope/arguments |
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
$("#product-links").delegate("a", "click", function(e) { | |
e.preventDefault(); | |
var $this = $(this), | |
$id = $($this.attr("href")); | |
if ($id.is(":not(.ui-dialog)")) { | |
$id.dialog({ | |
modal: true, | |
width: 540 | |
}); | |
} else { |
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
'WWAHost.exe' (Script): Loaded 'Script Code (Windows Internet Explorer)'. | |
JavaScript runtime error: Unable to add dynamic content. A script attempted to inject dynamic content, or elements previously modified dynamically, that might be unsafe. For example, using the innerHTML property or the document.write method to add a script element will generate this exception. If the content is safe and from a trusted source, use a method to explicitly manipulate elements and attributes, such as createElement, or use msWWA.execUnsafeLocalFunction. |
NewerOlder