Node.js is just JavaScript running on the server side. That's it. That's all there is to it.
- Express Docs, if you want to get started and already know JavaScript this is the place to be
// checks for collisions using the separating axis theorem | |
bool VWCar::isColliding(VWCollisionObject* colObj){ | |
int i; | |
// define the axes: 2 from collision object 2 from car | |
vector<ofxVec2f*> axes; | |
axes.reserve(4); | |
vector<ofxVec2f*>* objCorners = colObj->getCorners(); | |
if(objCorners->empty()){ |
ofxVec2f vecE, vecF; | |
double s,t; | |
float Ax, Ay, Bx, By, Cx, Cy, Dx, Dy; | |
bool found = false; | |
for (int i=0; i<4; i++) { | |
Ax = objCorners->at(i)->x; | |
Ay = objCorners->at(i)->y; |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
char* toBase26(int num){ | |
char* str; | |
str = malloc(sizeof(char)*10); | |
char* temp = str; | |
while(num > 0){ |
type World = String | |
type Player = String | |
initWorld :: IO World | |
initWorld = return "World" | |
initPlayer :: IO Player | |
initPlayer = return "Player" | |
act :: World -> String -> World |
# Creates an easy to parse grade report from grade grinder csv's | |
# Usage: python grade_report.py [filename].csv | |
# Note: This assumes the CSV has had the rows before the problem headers removed | |
import sys | |
import csv | |
reader = csv.reader(open(sys.argv[1], 'rb'), delimiter=',', quotechar="'") | |
# Assignments as defined by the course webpage |
function OnEvent(event, arg) | |
if (event == "PROFILE_ACTIVATED") then | |
r1, g1, b1 = 0, 0, 0 | |
end | |
if (event == "PROFILE_DEACTIVATED") then | |
color( 255, 0, 0, 50) | |
end | |
if (event == "G_PRESSED" and arg == 18) then |
import random | |
infile = raw_input("Source file: "); | |
adjacency = [[0,0], [0,0]] | |
charlist = ["end", "start"] | |
# pick an index with a maximum value | |
def maxIndex( n ): |
Node.js is just JavaScript running on the server side. That's it. That's all there is to it.
(stolen from the feminism thread on SA)
If you are new to feminism, approaching it from a position of privilege, or haven't read any of these books for any reason, I strongly recommend them.
Feminism is For Everybody: Passionate Politics by bell hooks. Coming from the perspective of a woman of color, bell hooks calls for feminism free of divisive policies and rich with discussion. She critically analyzes the problems facing feminists today, and proposes a vision of a beloved community that appeals to all those committed to equality in just 125 pages and using simple, accessible language.
No Turning Back: The History of Feminism and the Future of Women by Estelle Freedman. The author, a Stanford professor, examines 200 years of feminism and describes the critical momentum which the movement has gained. She explores the new approaches women are taking to traditional feminist concerns, and insightfully debunks the claim the feminism is dea
filename = "test.jpg" | |
size = File.size(filename) | |
count = %x{wc -l #{filename}}.split.first.to_i | |
factor = count/300 | |
factor = 1 if factor < 1 | |
File.open(filename, "rb+") do |file| | |
# skip some | |
file.seek(size/(rand(10..20)), IO::SEEK_CUR) |