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
'use strict'; | |
var B = typeof exports !== 'undefined' ? exports : {}; | |
// prefix for internal property state | |
var __PROP__ = '__PROP__'; | |
// default constructor used in setting up prototype chain | |
var ctor = function() {}; | |
B.extend = function(__super__, proto) { |
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
Feedback on Home Alpha/Beta: | |
---------------------------- |
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 im.wsb.example | |
import java.lang.reflect.Field; | |
import android.content.Context; | |
import android.util.AttributeSet; | |
import android.view.MotionEvent; | |
import android.view.ViewConfiguration; | |
import android.widget.AbsListView; | |
import android.widget.ListView; |
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
#include <stdio.h> | |
int main(int argc, char *argv[]) { | |
char *days[] = {"first", "second", "third", "fourth", "fifth", "sixth", | |
"seventh", "eighth", "ninth", "tenth", "eleventh", "twelfth"}; | |
char *gifts[] = {"a partridge in a pear tree", "two turtle doves", | |
"three french hens", "four calling birds", "***** five golden rings *****", | |
"six geese a laying", "seven swans a swimming", "eight maids a milking", |
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
### | |
CoffeeScript port of http://processing.org/learning/topics/flocking.html | |
### | |
window.FlockingSketch = class FlockingSketch | |
# setup the environment and start the draw loop | |
constructor: -> | |
@setup() | |
@draw() |
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
randomColor = function() { | |
var i = 0, val = null, out = ''; | |
while (i < 3) { | |
val = Math.round(Math.random() * 255).toString(16); | |
if (val.length < 2) { | |
val = '0' + val; | |
} | |
out +=val; | |
i++; | |
} |
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> | |
<html> | |
<head> | |
<meta http-equiv="content-type" content="text/html; charset=utf-8"> | |
<title>Index</title> | |
<script type="text/javascript" charset="utf-8" src="https://raw.github.com/gist/2354906/aefea983f6ca0b0e22656726a74250608397ab83/transformations.js"></script> | |
<script type="text/javascript" charset="utf-8"> | |
document.addEventListener('DOMContentLoaded', function() { | |
// creating a transformable element |
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
// ### Events | |
// Event mixin copied from Backbone | |
var Events = { | |
bind: function(evt, callback) { | |
var events = this._events = this._events || {}; | |
var callbacks = events[evt] = events[evt] || []; | |
callbacks.push(callback); | |
}, | |
unbind: function(evt, callback) { |
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
@interface WBVector : NSObject <NSCopying> { | |
CGFloat _x; | |
CGFloat _y; | |
CGFloat _z; | |
} | |
@property (nonatomic) CGFloat x; | |
@property (nonatomic) CGFloat y; | |
@property (nonatomic) CGFloat z; |
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 extend = function(dest) { | |
var sources = Array.prototype.slice.call(arguments, 1), source, key; | |
for (var i = 0, l = sources.length; i < l; i++) { | |
source = sources[i]; | |
for (key in source) { | |
if (source.hasOwnProperty(key)) { | |
dest[key] = source[key]; | |
} | |
} | |
} |
NewerOlder