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
window.MicroEvent = function() {}; | |
MicroEvent.prototype = { | |
on: function(event, listener) { | |
this._events = this._events || {}; | |
this._events[event] = this._events[event] || []; | |
this._events[event].push(listener); | |
}, | |
removeListener: function(event, listener) { | |
this._events = this._events || {}; |
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
{ | |
"{Exif}": { | |
"ExposureTime": 0.06666666666666667, | |
"LensMake": "Apple", | |
"Flash": 16, | |
"ColorSpace": 1, | |
"SubjectArea": [1210, 1108, 509, 509], | |
"ExifVersion": [2, 2, 1], | |
"FocalLenIn35mmFilm": 33, | |
"SceneCaptureType": 0, |
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
/*globals define*/ | |
define(function(require, exports, module) { | |
'use strict'; | |
// import dependencies | |
var Engine = require('famous/core/Engine'); | |
var Surface = require('famous/core/Surface'); | |
var Modifier = require('famous/core/Modifier'); | |
var Transform = require('famous/core/Transform'); | |
var Utility = require('famous/utilities/Utility'); |
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
myScrollView.render = function() { | |
_tickScrollViewRender() { | |
var prevNode = this._node; | |
var retValue = Scrollview.prototype.render.call(this); | |
var node = this._node; | |
if (node !== prevNode) | |
this._eventOutput.emit('sequenceChange', { node: node, prevNode: prevNode }); |
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
define(function(require, exports, module) { | |
var RenderNode = require('famous/core/RenderNode'); | |
var Modifier = require('famous/core/Modifier'); | |
var Surface = require('famous/core/Surface'); | |
function RenderPool() { | |
this._node = new RenderNode(); | |
this._children = {}; | |
this._unusedChildren = []; |
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
var Engine = require('famous/core/Engine'); | |
/** | |
* Sleep after n milliseconds of no touch/mouse movement | |
*/ | |
function sleepOnIdle(idleMS) { | |
var lastMoveMS = Date.now(); | |
window.addEventListener('mousemove', _handleMovement, true); | |
window.addEventListener('touchmove', _handleMovement, true); |
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 UIKit | |
import CoreLocation | |
@UIApplicationMain | |
class AppDelegate: UIResponder, UIApplicationDelegate, CLLocationManagerDelegate { | |
var window: UIWindow? | |
let locationManager: CLLocationManager = CLLocationManager() | |
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: NSDictionary?) -> Bool { |
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
+ (instancetype)sharedInstance { | |
static id instance; | |
static dispatch_once_t onceToken; | |
dispatch_once(&onceToken, ^{ | |
instance = [[self alloc] init]; | |
}); | |
return instance; | |
} |
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
- (id)init | |
{ | |
if (self = [super init]) { | |
} | |
return self; | |
} |
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
#ifdef DEBUG | |
#define kAPIEndpointHost @"http://example.dev" | |
#else | |
#define kAPIEndpointHost @"http://www.example.com" | |
#endif | |
#define kAPIEndpointLatest (kAPIEndpointHost @"/api/latest_content") | |
#define kAPIEndpointMostPopular (kAPIEndpointHost @"/api/most_popular") |
OlderNewer