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
ko.bindingHandlers.kendoDataBar = { | |
init: function (element, valueAccessor, | |
allBindingsAccessor, viewModel, bindingContext) { | |
var data = ko.computed(function() { | |
var field = ko.utils.unwrapObservable(valueAccessor().field), | |
comparisons = ko.utils.unwrapObservable(valueAccessor().comparisons), | |
numerator = 0, | |
max = 0, | |
sum = 0, | |
values = [], |
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
ko.bindingHandlers.number = { | |
update: function(element, valueAccessor, allBindingsAccessor) { | |
var value = ko.utils.unwrapObservable(valueAccessor()), | |
precision = ko.utils.unwrapObservable(allBindingsAccessor().precision) || ko.bindingHandlers.number.defaultPrecision, | |
format = '###,###,###,###.' + '0'.repeat(precision) + ';(###,###,###,###.' + '0'.repeat(precision) + ')', | |
formattedValue = kendo.toString(parseFloat(value, 10), format); | |
ko.bindingHandlers.text.update(element, function() { return formattedValue; }); | |
}, | |
defaultPrecision: 0 |
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
ko.bindingHandlers.kendoBullet = { | |
init: function (element, valueAccessor, | |
allBindingsAccessor, viewModel, bindingContext) { | |
var options = ko.utils.unwrapObservable(valueAccessor()); | |
options.type = 'bullet'; | |
if (!options.chartArea) { | |
options.chartArea = {}; | |
} |
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
namespace ViewModels | |
{ | |
using System; | |
using System.Collections.ObjectModel; | |
using System.Collections.Specialized; | |
using System.ComponentModel; | |
/// <summary> | |
/// Represents an observable item collection. | |
/// </summary> |
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
/*---------------------------------------------------------- | |
// Micro JavaScript Templating xtpl (minified version) | |
// Leo Lems - http://2basix.nl - MIT Licensed | |
------------------------------------------------------------*/ | |
(function(){this.xtpl=function xtpl(templatestring,data){var ret='',xfn=new Function("o","var arr=['"+templatestring.replace(/[\r\t\n]/g,"").split("'").join("\\'").replace(/{%=\s*\(\s*(.+?)\s*\)\s*%}/g,"',($1),'").replace(/{%=\s*(.+?)\s*%}/g,"',(o.$1)?o.$1:'','")+"']; return arr.join('');");if(!data){return xfn}return xfn(data)}})(); |
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
/*jslint white: true*/ | |
/*global Phaser*/ | |
/** | |
* Defines a glow filter for Web GL. | |
* @module | |
*/ | |
Phaser.Filter.Glow = function (game) { | |
'use strict'; |
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
// Also depends on: npm install --save-dev flash-sdk | |
var colors = require('colors'), | |
flash = require('gulp-flash'), | |
flexPmd = require('flexpmd'), | |
fs = require('fs'), | |
gulp = require('gulp'), | |
process = require('child_process'), | |
xpath = require('xpath'), | |
xmldom = require('xmldom'), | |
config = { |
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
'use strict'; | |
function BitBuffer(size) { | |
size = Math.ceil(size / 8); | |
this.buffer = new Buffer(size); | |
this.buffer.fill(0); | |
} | |
BitBuffer.prototype = { |
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 ko = require('knockout'); | |
var crossroads = require('crossroads'); | |
var hasher = require('hasher'); | |
function parseHash(newHash, oldHash) { | |
crossroads.parse(newHash); | |
} | |
function Router(routes) { | |
var self = this; |
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
/* Compass */ | |
.compass { | |
background: #eee; | |
width: 200px; | |
height: 200px; | |
border-radius: 100%; | |
border: 5px solid #666; | |
position: relative; | |
} | |
.arrow { |