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
import {Injectable} from '@angular/core'; | |
import {Headers, Http, RequestOptions, Response} from '@angular/http'; | |
import {Observable} from 'rxjs/Observable'; | |
import 'rxjs/add/operator/toPromise'; | |
import 'rxjs/add/operator/catch'; | |
import 'rxjs/add/operator/map'; | |
@Injectable() | |
export class GitHubService { | |
// private baseUrl = 'https://api.github.com/search/'; |
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
rnc.calculator = function () { | |
rnc.Display.init($("#displayPanel")[0]); | |
$(".key").on('touchstart', function (event) { | |
var key = $(this).attr("data-rnc-tag"), | |
id = this.id; | |
// this is a performance boost | |
event.preventDefault(); | |
event.stopPropagation(); |
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
RocknCoder.Pages.splash = (function () { | |
return { | |
pageshow: function () { | |
RocknCoder.Game.dims = RocknCoder.Dimensions.get(); | |
var context, loaderReady, | |
timerReady = $.Deferred(), | |
imageReady = $.Deferred(), | |
sounds = [ | |
"sounds/83560__nbs-dark__ship-fire.wav", |
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
/** | |
* User: Troy | |
* Date: 11/4/13 | |
* Time: 4:24 AM | |
*/ | |
var RocknCoder = RocknCoder || {}; | |
(function () { |
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
function BufferLoader(context, urlList, callback) { | |
this.context = context; | |
this.urlList = urlList; | |
this.onload = callback; | |
this.bufferList = new Array(); | |
this.loadCount = 0; | |
} | |
BufferLoader.prototype.loadBuffer = function(url, index) { | |
// Load buffer asynchronously |
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
RocknCoder.Pages.splash = (function () { | |
return { | |
pageshow: function () { | |
// create our deferred objects | |
// the Ajax get methods return deferred objects | |
var timerReady = $.Deferred(), | |
spriteMapReady = $.get("1945.png"), | |
musicReady = $.get("DST-Afternoon.mp3"); | |
// put our load screen up |
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
/** | |
* Module dependencies. | |
*/ | |
var express = require('express') | |
, routes = require('./routes') | |
, http = require('http') | |
, hbs = require('hbs') | |
, path = require('path') | |
, app = express(); |
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
// Render an option tag's value and selected attributes | |
hbs.registerHelper("option", function (current, field) { | |
current = hbs.Utils.escapeExpression(current); | |
field = hbs.Utils.escapeExpression(field); | |
var results = 'value="' + current + '" ' + (field === current ? 'selected="selected"' : ""); | |
return new hbs.SafeString(results); | |
}); | |
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
private String getTwitterStream(String screenName) { | |
String results = null; | |
// Step 1: Encode consumer key and secret | |
try { | |
// URL encode the consumer key and secret | |
String urlApiKey = URLEncoder.encode(CONSUMER_KEY, "UTF-8"); | |
String urlApiSecret = URLEncoder.encode(CONSUMER_SECRET, "UTF-8"); | |
// Concatenate the encoded consumer key, a colon character, and the |