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
| chrome.app.runtime.onLaunched.addListener( function(){ | |
| chrome.app.window.create( 'window.html', { | |
| 'bounds' : { | |
| 'width' : 400, | |
| 'height' : 500 | |
| } | |
| } ); | |
| } ); |
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
| /* Storage */ | |
| var MyProject = {}; | |
| MyProject.webdb = {}; | |
| MyProject.webdb.db = null; | |
| MyProject.webdb.open = function(){ | |
| var dbSize = 5 * 1024 * 1024; // 5MB | |
| MyProject.webdb.db = openDatabase( 'myDb' , '1.0' , 'MyProject client side data' , dbSize ); // |
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
| /* | |
| Created By: Divan Visagie | |
| Created On: 2013/06/12 | |
| License: MIT | |
| Version: 0.0.1 | |
| */ | |
| var webdb = {}; | |
| webdb.db = null; | |
| webdb.dbDetails = { //set default db details |
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 $ = require( 'NodObjC' ); | |
| // First you import the "Foundation" framework | |
| $.import( 'Foundation' ); | |
| $.import( 'Cocoa' ); | |
| // Setup the recommended NSAutoreleasePool instance | |
| var pool = $.NSAutoreleasePool( 'alloc' )( 'init' ); | |
| // NSStrings and JavaScript Strings are distinct objects, you must create an |
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
| // | |
| // File.cpp | |
| // PlayGround | |
| // | |
| // Created by Divan Visagie on 2013/06/16. | |
| // Copyright (c) 2013 Divan Visagie. All rights reserved. | |
| // | |
| #include "Animal.h" |
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 SOUT = { | |
| outputLength : 0, | |
| lastOutLength : 0, | |
| print : function( stOut ){ | |
| SOUT.outputLength = SOUT.lastOutLength; |
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
| function Test(){ | |
| var eve = document.createElement('e'); | |
| var ev = new CustomEvent( 'testEv', {'':''} ); | |
| setInterval( function(){ | |
| eve.dispatchEvent( ev ); | |
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
| <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Index.aspx.cs" Inherits="KGrids.Index" %> | |
| <!DOCTYPE html> | |
| <html xmlns="http://www.w3.org/1999/xhtml"> | |
| <head runat="server"> | |
| <title>KGrids</title> | |
| <link rel="stylesheet" type="text/css" href="Content/bootstrap.min.css" /> | |
| <script src="Scripts/knockout-2.2.1.js"></script> | |
| <script src="Scripts/jquery-2.0.2.min.js"></script> |
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
| five.Board().on("ready", function() { | |
| var pi = []; | |
| var pins = this.firmata.pins; | |
| for ( var i in pins ){ | |
| pi.push( pins[i].supportedModes.length ); | |
| } | |
| console.log( pi ); |
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'; | |
| // Add ECMA262-5 method binding if not supported natively | |
| // | |
| if (!('bind' in Function.prototype)) { | |
| Function.prototype.bind= function(owner) { | |
| var that= this; | |
| if (arguments.length<=1) { | |
| return function() { | |
| return that.apply(owner, arguments); |