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
float d[] = new float[4]; | |
float f[] = new float[4]; | |
float p[] = new float[4]; | |
float E = exp(1); | |
PVector current_pt; | |
PVector center; | |
void setup() { |
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
class EqTriangle { | |
public float x, y, h, w; | |
EqTriangle(float xx, float yy, float hh, float ww) { | |
x = xx; | |
y = yy; | |
h = hh; | |
w = ww; | |
} | |
//copy |
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
(function () { | |
"use strict"; | |
WinJS.Binding.optimizeBindingReferences = true; | |
var app = WinJS.Application; | |
var activation = Windows.ApplicationModel.Activation; | |
app.onactivated = function (args) { | |
if (args.detail.kind === activation.ActivationKind.launch) { |
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
from xml.etree import ElementTree | |
import re, random, os, json, argparse | |
### Initial parsing & table creation | |
# Parse through the dialog XML file and take all of the dialogue out for parsing, removing character names | |
def parse_xml(): | |
tree = ElementTree.parse("dialog.xml") | |
root = tree.getroot() |
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
myObj.prototype.setupHandler() { | |
someElement.addEventListener('click', function(e) { | |
this.someOtherFunction(e.target); | |
}.bind(this)); | |
} |
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
Alice->Bob: Hello Bob, how are you? | |
Note right of Bob: Bob thinks | |
Bob-->Alice: I am good thanks! |
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
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" | |
"http://www.w3.org/TR/html4/strict.dtd"> | |
<html> | |
<head> | |
<title></title> | |
<meta http-equiv="content-type" content="text/html; charset=latin1"> | |
<style type="text/css"> | |
td.linenos { background-color: #f0f0f0; padding-right: 10px; } | |
span.lineno { background-color: #f0f0f0; padding: 0 5px 0 5px; } |
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
// Defines a live, embedded hasMany relationship that updates automatically | |
// models | |
App.ChatRoom = DS.Firebase.LiveModel.extend({ | |
title: DS.attr("text"), | |
messages: DS.hasMany("App.Message", {live: true}) | |
}); | |
App.Message = DS.Firebase.LiveModel.extend({ |
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
// calibration constants | |
// this was for a 13" MacBook Pro with the Leap horizontally centered and placed on the | |
// table against the front edge of the laptop | |
// left and right edges of the screen. may be the opposite of what you want, depending | |
// on the orientation of your Leap | |
var X_LEFT = -140; | |
var X_RIGHT = 140; | |
// heights for the top and bottom of the screen |
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 MyModel = DS.Model.extend({ | |
// ... | |
saveQueued: false, | |
save: function() { | |
Ember.run.sync(); //may actually need to be a Ember.run.once(function() {...}) wrapper | |
if (this.get("stateManager.currentState.name" == "inFlight")) { | |
if (!this.get("saveQueued")) { | |
this.set("saveQueued", true); | |
this.one("didSave", function() { | |
Ember.run.sync(); |