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 math_dist(mmx:int, mmy:int, ox:int, oy:int):Number{ | |
return Math.sqrt((mmx-ox)*(mmx-ox)+(mmy-oy)*(mmy-oy)); | |
} | |
private function point_dist(p1:Point, p2:Point):Number{ | |
return Point.distance( p1, p2 ); | |
} | |
private function time_it():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
import org.jasmineflex.global.*; | |
describe("adding", function():void { | |
it("sums two values", function():void { | |
expect(1 + 1).toBe(2); | |
}); | |
}); |
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 | |
{ | |
include "mathSpec.as" | |
import flash.display.Sprite; | |
import org.jasmineflex.* | |
public class asJasmine extends Sprite | |
{ | |
public function asJasmine() |
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 model = Backbone.Model.extend({ | |
setProcessors: { | |
"name": requireLowerCase, | |
"sometingElse": someOtherFunction | |
}, | |
requireLowerCase: function(value) { | |
return value.toLowerCase(); | |
}, |
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
firstNames = JSLINQ(myList).Select (item) -> item.FirstName |
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.app = | |
models: {} | |
views: {} | |
class app.models.OfferClass extends Backbone.Model | |
class app.models.OfferClasses extends Backbone.Collection | |
model: app.models.OfferClass | |
url: "/offerClasses" |
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 QuestionHub : BackboneModelHub<Question> | |
{ | |
private static readonly List<Question> questions = new List<Question>(); | |
protected override Question CreateModel(Question question) | |
{ | |
question.Id = Guid.NewGuid(); | |
questions.Add(question); | |
return question; | |
} |
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.exports = require('lineman').config.extend('application', { | |
server: { | |
web: { | |
port: process.env.PORT | |
} | |
} | |
}); |
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
port = process.env.PORT || 3001 | |
app = require('express').createServer() | |
serveUp = (res, filename) -> | |
console.log "REQUESTING: ", filename | |
res.sendfile "#{__dirname}#{filename}" | |
app.get "/", (req, res) -> serveUp res, "/index.html" | |
app.get "/*", (req, res) -> serveUp res, req.url | |
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
<script src="http://d3js.org/d3.v3.min.js" charset="utf-8"></script> |
OlderNewer