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> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="x-ua-compatible" content="ie=edge"> | |
<title>WebSocket Demostration</title> | |
<meta name="description" content=""> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
</head> | |
<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
'use strict'; | |
var RUNS = 10; | |
var ITERATIONS = 10000000; | |
function Counter(initialValue) { | |
this.val = initialValue; | |
} | |
Counter.prototype.addWithOr = function addWithOr(incrVal) { | |
this.val += incrVal || 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
'use strict'; | |
var iterations = 1000000, | |
outerIterations = 100; | |
function runit() { | |
var ary | |
,result | |
,idx; | |
ary = createData(); | |
console.log('Executing while loop with prefix incre in test condition'); |
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
'use strict'; | |
var iterations = 1000000, | |
outerIterations = 100; | |
function runit() { | |
var ary | |
,result | |
,idx; | |
ary = createData(); | |
console.log('Executing while loop with prefix incre in test condition'); |
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
'use strict'; | |
myApp.factory('olingoWrapperService', ['localStorageService','$location', '$q', '$rootScope', function (localStorageService, $location, $q, $rootScope) { | |
var _recipeService = {}; | |
var _oldOlingoODataClient = odatajs.oData.net.defaultHttpClient; | |
var _authSensitiveOlingoClient = { | |
request: function (request, success, error) { | |
request.headers = request.headers || {}; | |
var authData = localStorageService.get('authorizationData'); |
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
USE [master] | |
GO | |
/****** Object: Database [Experiments] Script Date: 11/30/2014 4:39:05 PM ******/ | |
CREATE DATABASE [Experiments] | |
GO | |
ALTER DATABASE [Experiments] SET COMPATIBILITY_LEVEL = 110 | |
GO | |
ALTER DATABASE [Experiments] SET ANSI_NULL_DEFAULT OFF | |
GO | |
ALTER DATABASE [Experiments] SET ANSI_NULLS OFF |
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
//N.B. Use Steven Levithan's date formatter for richer string output options | |
//http://blog.stevenlevithan.com/archives/date-time-format | |
if (window.addEventListener) // W3C standard | |
{ | |
window.addEventListener('load', function() { | |
var timeElements = document.getElementsByClassName('make-time'); | |
for (var i = 0; i < timeElements.length; i++) { | |
var dateStr = timeElements[i].getAttribute('data-time'); | |
if (dateStr) { |
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> | |
<head> | |
<title>A working shuttle</title> | |
<script src="http://ajax.aspnetcdn.com/ajax/knockout/knockout-3.0.0.js" type="text/javascript"></script> | |
<script type="text/javascript"> | |
var vm = function() { | |
var self = this; | |
self.someFunction = function() { | |
alert('hello'); |
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> | |
<head> | |
<title>A Knockout select example</title> | |
<script src="http://ajax.aspnetcdn.com/ajax/knockout/knockout-3.0.0.js" type="text/javascript"></script> | |
<script type="text/javascript"> | |
var vm = function() { | |
var self = this; | |
self.myList = ko.observableArray(); | |
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
<MyGame>: | |
FloatLayout: | |
size: self.parent.width, self.parent.height | |
MyWidget: | |
id: widget | |
pos_hint: {'x': 0, 'y': .5 } | |
<MyWidget>: | |
canvas.before: | |
PushMatrix |