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
| { | |
| "creator":"XXXXXXXX", | |
| "subscriberCount":0, | |
| "tracks":[ | |
| { | |
| "uri":"spotify:track:2fEmyBIzS3vTzBogwq0TAE", | |
| "album":{ | |
| "title":"Nothing But The Beat", | |
| "image":"spotify:image:f0dd4a841252c146768d8a" | |
| }, |
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 express = require('express') | |
| , path = require('path'); | |
| process.on('uncaughtException', function (err) { | |
| console.log('uncaught exception:--------------------------------------------- ' ); | |
| console.log( err + err.stack); | |
| }); | |
| mainServer = module.exports = express.createServer(); | |
| mainServer.set('path', __dirname); |
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
| cio = require("socket.io-client") | |
| io = require("socket.io") | |
| var manager = io.listen( port ); | |
| manager.of('/chat').on('connection', function (socket) { | |
| console.log('connecting socket on server'); |
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
| test: function( done ) { | |
| var port = 8080, | |
| io = require("socket.io").listen(port); | |
| io.set('polling duration', .2); | |
| var client = require("socket.io-client").connect( "http://localhost", { port: port }); | |
| client.on('connect', function() { |
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
| createScrollView: function() { | |
| var parentView = this | |
| , view = null | |
| , childViews = get(parentView, 'childViews') // otherwise return null when parentView.childViews | |
| , buffer | |
| , fragment; | |
| view = parentView.createChildView( SC.View.extend(), { | |
| classNames: ['scroll-scroll-view'], |
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
| require('sproutcore'); | |
| var set = SC.set; | |
| var get = SC.get; | |
| var max = 100 | |
| , i = 0 | |
| , content = []; |
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
| CustomArrayController = SC.ArrayController.extend({ | |
| content: null, | |
| sortedContent:null, | |
| _orderContent: function() { | |
| var content = get(this, 'content'); |
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
| CustomArrayController = SC.ArrayController.extend({ | |
| content: null, | |
| sortedContent:null, | |
| _orderContent: function() { | |
| var content = get(this, 'content'); |
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
| require('sproutcore'); | |
| require('sproutcore-ui'); | |
| var set = SC.set, get = SC.get; | |
| var max = 100 | |
| , i = 0 | |
| , name = 'name' | |
| , controller | |
| , items = []; |
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
| require('sproutcore'); | |
| var set = SC.set, get = SC.get; | |
| CssPropertyBindings = SC.Mixin.create({ | |
| cssPropertyBindings: null, | |
| didInsertElement: function(r) { | |
| this._super(); |
OlderNewer