Skip to content

Instantly share code, notes, and snippets.

View jordanorelli's full-sized avatar
👾

Jordan Orelli jordanorelli

👾
View GitHub Profile
diff --git a/core/src/processing/core/PVector.java b/core/src/processing/core/PVector.java
index ca25eb1..67c8bfe 100644
--- a/core/src/processing/core/PVector.java
+++ b/core/src/processing/core/PVector.java
@@ -432,10 +432,11 @@ public class PVector implements Serializable {
* @param v the vector to be added
* @brief Adds x, y, and z components to a vector, one vector to another, or two independent vectors
*/
- public void add(PVector v) {
+ public PVector add(PVector v) {
Particle p;
void setup() {
size(500, 500);
background(255);
p = new Particle(width*0.5, height*0.5, 1);
}
void draw() {
background(255);
int val;
int scratch_min = 12;
int scratch_max = 128;
int scratches = 0;
boolean scratched = false;
void setup() {
Serial.begin(9600);
}
float angle = 0;
float r = 25; //radii of outer rotating circles
float rtwo = 3; //radii of golden circles
float n = 100; //number of golden circles
int numFrames = 300;
void setup() {
size(500,500);
background(59, 79, 88);
}
func read_slave_status(db *sql.DB) map[string]string {
rows, err := db.Query("SHOW SLAVE STATUS")
if err != nil {
log.Fatalf("Query fail: %v\n", err)
}
defer rows.Close()
cols, _ := rows.Columns()
// this is spectacularly awful. there must be a better way
values := make([]string, len(cols))
(DEV) user@host [database]> show slave status \G
*************************** 1. row ***************************
Slave_IO_State: Waiting for master to send event
Master_Host: host
Master_User: user
Master_Port: 3315
Connect_Retry: 60
Master_Log_File: filename-bin.000001
Read_Master_Log_Pos: 1
Relay_Log_File: filename-relay-bin.000004
def plus_one(x):
return x + 1
y = 5
print plus_one(y)
@jordanorelli
jordanorelli / gist:10683601
Created April 14, 2014 21:22
databus cloc
jorelli@ETSYNY-L645[0] /projects/databus: cloc .
1256 text files.
1104 unique files.
484 files ignored.
http://cloc.sourceforge.net v 1.60 T=16.94 s (54.2 files/s, 14614.6 lines/s)
--------------------------------------------------------------------------------
Language files blank comment code
--------------------------------------------------------------------------------
Java 794 27043 34514 147744
psynch_cvwait(0x7FA80B014368, 0x100000100, 0x0) = -1 Err#316
psynch_cvwait(0x7FA80B014368, 0x100000100, 0x0) = -1 Err#316
psynch_cvwait(0x7FA80B014368, 0x100000100, 0x0) = -1 Err#316
psynch_cvwait(0x7FA80B014368, 0x100000100, 0x0) = -1 Err#316
psynch_cvwait(0x7FA80B014368, 0x100000100, 0x0) = -1 Err#316
psynch_cvwait(0x7FA80B014368, 0x100000100, 0x0) = -1 Err#316
psynch_cvwait(0x7FA80B014368, 0x100000100, 0x0) = -1 Err#316
psynch_cvwait(0x7FA80B014368, 0x100000100, 0x0) = -1 Err#316
psynch_cvwait(0x7FA80B014368, 0x100000100, 0x0) = -1 Err#316
psynch_cvwait(0x7FA80B014368, 0x100000100, 0x0) = -1 Err#316
user@host ~: which ruby
/Users/user/.rvm/rubies/ruby-2.0.0-p451/bin/ruby
user@host ~: which irb
/Users/user/.rvm/rubies/ruby-2.0.0-p451/bin/irb
user@host ~: ruby -v
ruby 2.0.0p451 (2014-02-24 revision 45167) [x86_64-darwin12.5.0]
user@host ~: irb
1.9.2 :001 >