I hereby claim:
- I am sdailey on github.
- I am sdailey (https://keybase.io/sdailey) on keybase.
- I have a public key ASAjT_uduzu3YN8jm15i1MtFlZ205-SyctMt815jaBX4lwo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
<html> | |
<head> | |
<style type="text/css"> | |
img.pinnable { | |
width: 201px; | |
height: auto; | |
z-index: 2; | |
} | |
</style> | |
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script> |
describe "Events", -> | |
beforeEach -> | |
@truth = truth: (term) -> term | |
@falsehood = falsehood: -> 'other' | |
@TestObject = @truth | |
HE.Event.Subscribe "know:truth", @TestObject.truth | |
@currentChannel = HE.Event.Channels['know:truth'][0] | |
@callback = @currentChannel.callback |
describe "Events", -> | |
beforeEach -> | |
@truth = truth: (term) -> term | |
@falsehood = falsehood: -> 'other' | |
@TestObject = @truth | |
HE.Event.Subscribe "know:truth", @TestObject.truth | |
@currentChannel = HE.Event.Channels['know:truth'][0] | |
@callback = @currentChannel.callback |
# Mediator Pattern from: http://addyosmani.com/largescalejavascript/ | |
# | |
# The HE.Event object manages a list of channels, where each channel | |
# holds a list of actions. | |
# | |
# To subscribe an object to an event: | |
# HE.Event.Subscribe "event", object.functionToHandleEvent | |
# | |
# To publish an event: | |
# HE.Event.Publish "event" |
describe "Events", -> | |
beforeEach -> | |
@truth = truth: (term) -> term | |
@different = different: -> 'other' | |
@TestObject = @truth | |
HE.Event.Subscribe "know:truth", @TestObject.truth | |
@currentChannel = HE.Event.Channels['know:truth'][0] | |
@callback = @currentChannel.callback |
function determinant(vector1, vector2) | |
{ | |
return vector1.x * vector2.y - vector1.y * vector2.x; | |
} | |
function lineSegmentsIntersect(_segment1_Start, _segment1_End, _segment2_Start, _segment2_End) | |
{ //note the use of 'subtract' | |
det = determinant(_segment1_End.subtract(_segment1_Start), _segment2_Start.subtract(_segment2_End)); | |
t = determinant(_segment2_Start.subtract(_segment1_Start), _segment2_Start.subtract(_segment2_End)) / det; |
//please don't use this in building the next space shuttle :) | |
//var vertex is an array which has all our points to build our polygon with | |
testPolygon = new google.maps.Polygon({ paths: vertex, fillColor: color, geodesic: true, fillOpacity: 1, strokeColor: '#00ff00', strokeWeight: 1, strokeOpacity: 0.6 }); | |
count= 0; | |
while (count<vertex.length){ | |
//lets check the angle between the last two vectors | |
if (count == vertex.length - 2){ |
/** | |
* Lists models that match user ID. | |
*/ | |
public function actionIndex() | |
{ | |
$checkId = yii::app()->user->id; | |
$dataProvider=new CActiveDataProvider('Crop', array( | |
'criteria'=>array( | |
'condition'=>$checkId.'=:userid', | |
), |
var SessionView = Backbone.View.extend({ | |
el: $(".login_box"), | |
// ... events, initialize, render ... | |
temp_button: function(){ | |
console.log('trying'); | |
this.trigger('devicesReady'); | |
} |