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
package | |
{ | |
import flash.display.Loader; | |
import flash.events.Event; | |
import flash.net.URLRequest; | |
import flash.net.URLStream; | |
import flash.system.LoaderContext; | |
import flash.utils.ByteArray; | |
import flash.utils.Endian; | |
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 http = require("http"), | |
url = require("url"), | |
path = require("path"), | |
fs = require("fs"); | |
var port = process.env.PORT || 3000; | |
http.createServer(function(req, res) { | |
var pathname = __dirname + url.parse(req.url).pathname; |
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
package | |
{ | |
public function zeroPad(number:int, width:int):String { | |
var result:String = ""+number; | |
while( result.length < width ) result = "0" + result; | |
return result; | |
} | |
} |
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
package | |
{ | |
public function trim(s:String):String { | |
return s ? s.replace(/^\s+|\s+$/gs, '') : ""; | |
} | |
} |