This file contains hidden or 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
# encoding: utf-8 | |
#require 'rubygems' | |
#require 'fraction' | |
class Base3D | |
attr_accessor :x, :y, :z | |
def initialize(x, y, z) | |
@x = x; @y = y; @z = z | |
end |
This file contains hidden or 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 stylus = require('stylus'), | |
jade = require('jade'), | |
fs = require('fs'); | |
function compile_jade(){ | |
console.log('compiling html index'); | |
var fn = jade.compile(fs.readFileSync('index.jade', 'utf8'), {pretty: true}); | |
if (fn){ | |
fs.writeFileSync('index.html', fn()); | |
} else { |
This file contains hidden or 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
// in c | |
#include <stdio.h> | |
void loopz(int num){ | |
num += 1; | |
if (num < 10) { | |
loopz(num); | |
puts("Cannot Compute"); | |
} else { | |
puts("Stopping"); | |
} |
This file contains hidden or 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
<?php | |
class Director { public function set_dev_servers($arg){} }; | |
class SSViewer { public function set_theme($arg){} }; | |
include_once('../public_html/mpt/_config.php'); | |
$sql = "DELETE FROM SiteTree_versions | |
WHERE CONCAT_WS('_', RecordID, Version) NOT IN |
This file contains hidden or 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 styluscomp = require('stylus'), | |
jadecomp = require('jade'), | |
fs = require('fs'); | |
function jade(data, cb, filename){ | |
cb(false, jadecomp.compile(data, { pretty: true, filename: filename })()); | |
} | |
function styl(data, cb, filename){ | |
styluscomp.render(data, { pretty: true, filename: filename }, cb); | |
} |
This file contains hidden or 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 express = require('express'), | |
socketio = require('socket.io'), | |
app = express.createServer(), | |
serialport = require('serialport'), | |
serial_term = new serialport.SerialPort('/dev/tty.usbmodem1d11'), | |
sio = socketio.listen(app); | |
var databuf = ''; | |
sio.sockets.on('connection', function(socket){ |
This file contains hidden or 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
sparks% cat benchmark.js | |
var obj = {}, num_in = 1000000; | |
while(num_in--){ | |
obj[(Math.random()*10000).toString()] = Math.random().toString(); | |
} | |
function time_it(fn_tm){ | |
var start_time = new Date().getTime(); | |
fn_tm(); | |
var end_time = new Date().getTime(); |
This file contains hidden or 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 <iostream> | |
#include <iomanip> | |
#include <cmath> | |
#include <cmath> | |
using namespace std; | |
int main() | |
{ | |
int A, B, C, dec; |
This file contains hidden or 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
http://catalogue.usc.edu/schools/architecture/courses/ | |
http://catalogue.usc.edu/schools/business/courses/ | |
http://catalogue.usc.edu/schools/accounting/courses/ | |
http://catalogue.usc.edu/schools/business/courses/ | |
http://catalogue.usc.edu/schools/accounting/courses/ | |
http://catalogue.usc.edu/schools/business/courses/ | |
http://catalogue.usc.edu/schools/accounting/courses/ | |
http://catalogue.usc.edu/schools/cinema/courses/ | |
http://catalogue.usc.edu/schools/college/amst/courses/ | |
http://catalogue.usc.edu/schools/college/anth/courses/ |
This file contains hidden or 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="//js.leapmotion.com/0.2.2/leap.min.js"></script> | |
<script> | |
window.addEventListener('load', function(){ | |
var ctl = new Leap.Controller({enableGestures: true}); | |
var swiper = ctl.gesture('swipe'); | |
var totalDistance = 0; |