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
//create dynamic vector and fix | |
private var _items:Vector.<uint> = new <uint>[]; | |
_items.push(1); | |
_items.push(2); | |
_items.push(3); | |
_items.push(4); | |
_items.push(5); | |
_items.fixed = true; | |
//create static vector |
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 pyglet | |
def update_image(dt): | |
img = pyglet.image.load(image_paths[count]) | |
#... do other stuff | |
count += 1 #cant do this cause its immutable | |
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
.container-center { | |
position: absolute; | |
margin: 0 auto; | |
width: 100%; | |
height: 100%; | |
} | |
.element-center { | |
position: absolute; | |
top:50%; |
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
public class ApplicationContext extends ConfigurableContext | |
{ | |
public function PreloaderContext( contextView:DisplayObjectContainer ) | |
{ | |
super( contextView ); | |
} | |
override public function startup():void | |
{ |
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
controllers.CanvasCtrl = function ( $scope, $timeout, CanvasService ) { | |
$scope.onStart = function () { | |
$scope.pageNumber = $scope.data.pageNumber; | |
$scope.velocity = 0; | |
$scope.damping = 0.002; | |
$scope.repeat = false; | |
} | |
$scope.onDrag = 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
var should = require('should'); | |
var TickProvider = require('../scripts/tick/tick_provider'); | |
describe('TickProvider', function() { | |
it('should instantiate', function() { | |
var tick = new TickProvider() | |
}); | |
}); |
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 Mocha = require('mocha'), | |
path = require('path'), | |
fs = require('fs'); | |
var mocha = new Mocha({ | |
reporter: 'dot', | |
ui: 'bdd', | |
timeout: 999999 | |
}); |
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
commandmap | |
.map( Event.COMPLETE, Event ) | |
.toCommand( DispatchProcessEvent ) | |
.withHooks( InjectMakeAbsoluteProcess ) | |
.withGuards( OnlyIfReasonNotAbsolute ); | |
commandmap | |
.map( Event.COMPLETE, Event ) | |
.toCommand( DispatchProcessEvent ) | |
.withHooks( InjectMakeEvenProcess ) |
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 function configProcesses():void | |
{ | |
// LOCK Process | |
fsmConfig.configureProcess( LOCK ) | |
.ifCurrentState( CLOSED ) | |
.transitionTo( LOCK ); | |
fsmConfig.configureProcess( LOCK ) | |
.ifCurrentState( OPENED ) | |
.transitionTo( CLOSED, LOCK ); |
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
// state names | |
public static const LOADING:StateName = new StateName("loading"); | |
public static const DECODING:StateName = new StateName("decoding"); | |
public static const DISPLAYING:StateName = new StateName ("displaying"); | |
// process names | |
public static const IN:ProcessName = new ProcessName("in"); | |
// state declaration | |
fsmConfig.configureState( LOADING ) |
NewerOlder