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
function compStr(a, b) | |
{ | |
return lcSubString2(a, b)/(a.length > b.length ? a.length : b.length); | |
} | |
function lcSubString2(_a, _b) | |
{ | |
var max = ""; | |
var maxai = 0; |
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') | |
, TwilioClient = require('twilio').Client | |
, Twiml = require('twilio').Twiml | |
var creds = { | |
sid: 'dsadas', | |
authToken: 'dasdas', | |
incoming: '+1234567890', | |
outgoing: '+', | |
hostname: 'host.com' |
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 <stdio.h> | |
void merge(int * items, int * sorted_items, int start, int middle, int end); | |
void mergesort (int * items, int * sorted_items, int start, int end) | |
{ | |
int middle = (int) ((start+end) / 2); | |
if ( start < 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 ROCK = 0, PAPER = 1, SCISSORS = 2; | |
var compare = function (a, b) | |
{ | |
return ( (a - b + 3) % 3 ) | |
} | |
// Compare | |
// 0 = Tie | |
// 1 = First Wins |
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
#!/bin/bash | |
# by Crouse - usalug.org 09-12-2007 | |
clear | |
num_cpus=`cat /proc/cpuinfo | grep -c "model name"` | |
machine_cpu=`cat /proc/cpuinfo | grep -m 1 "model name" | cut -d: -f2` | |
machine_mhz=`cat /proc/cpuinfo | grep -m 1 "cpu MHz" | cut -d: -f2` | |
machine_cpuinfo=`uname -mp` | |
todays_date=`date +"%D %r"` | |
machine_uptime=`uptime` | |
machine_ram=`cat /proc/meminfo | grep -m 1 "MemTotal:" | cut -d: -f2 | sed 's/^[ \t]*//'` |
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
XTerm*font: -*-fixed-medium-*-*-*-18-*-*-*-*-*-iso8859-* | |
! | |
XTerm*title: xterm | |
XTerm*antialias: true | |
!XTerm*background: #011622 | |
!XTerm*foreground: WhiteSmoke | |
!XTerm*pointerColor: white | |
!XTerm*pointerColorBackground: #011622 | |
XTerm*cursorColor: #EBD27D |
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
|1 5 -3| R2 - 3R1 |1 5 -3| -1/6R2 |1 5 -3| R3-R2 |1 5 -3| | |
|3 -3 3| R3 - 2R1 |0 -18 12| |0 3 -2| |0 3 -2| | |
|2 13 -7| |0 3 -1| |0 3 -1| |0 0 1| | |
det(A) = 1 * 3 * 1 = 3 | |
Theroem 3.c "If one row of A is multiplied by k to produce B, then detB D k * detA." | |
3 * -1/6 or 3 * -6 as I "Pulled" a -6 out. |
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 Stagger = function (data, stagger, fn, cb) { | |
var self = this; | |
this.timerID = 0; | |
this.data = [].concat(data); | |
this.fn = fn; | |
this.cb = cb; | |
this.stagger = stagger; | |
this.iteration = 0; | |
this.store = {}; |
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
{"version":1.2,"stores":{"wood":3181,"meat":3544,"bait":183,"fur":687,"cloth":89,"scales":80,"teeth":104,"compass":1,"leather":485,"cured meat":353,"charm":0,"torch":7,"bone spear":5,"l armour":1,"waterskin":1,"rucksack":1,"iron sword":0},"perks":{"barbarian":true},"room":{"temperature":{"value":4,"text":"hot"},"fire":{"value":4,"text":"roaring"},"buttons":{"trap":true,"cart":true,"hut":true,"lodge":true,"trading post":true,"tannery":true,"smokehouse":true,"workshop":true,"torch":true,"waterskin":true,"rucksack":true,"l armour":true,"bone spear":true},"builder":4},"outside":{"buildings":{"trap":10,"cart":1,"hut":20,"lodge":1,"trading post":1,"tannery":1,"smokehouse":1,"workshop":1},"population":80,"workers":{"hunter":50,"trapper":0,"tanner":5,"charcutier":3}},"seenForest":true,"income":{"builder":{"delay":10,"stores":{"wood":2},"timeLeft":5},"gatherer":{"delay":10,"stores":{"wood":22},"timeLeft":5},"hunter":{"delay":10,"stores":{"fur":25,"meat":25},"timeLeft":4},"trapper":{"delay":10,"stores":{"meat":0,"bait" |
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://v8.googlecode.com/svn/trunk/src/array.js | |
function ObservedArrayPush() { | |
var n = TO_UINT32(this.length); | |
var m = %_ArgumentsLength(); | |
EnqueueSpliceRecord(this, n, [], m); | |
try { | |
BeginPerformSplice(this); |