Skip to content

Instantly share code, notes, and snippets.

View xraymemory's full-sized avatar
💽

M E A xraymemory

💽
View GitHub Profile
@xraymemory
xraymemory / switches.c
Created September 14, 2012 18:34
Program to read in primes from a text file and perform the "switch flipping" problem
#include <stdio.h>
#include <stdlib.h>
#define N 10
int switches[N];
void flipSwitches(int p) {
int j;
int flipped = 0;
for (j = 1; j <= N; j++) {
# /etc/apache2/sites-available/default
<VirtualHost *:80>
ServerAdmin webmaster@localhost
ServerName default
DocumentRoot /var/www
<Directory />
Options FollowSymLinks
AllowOverride None
@xraymemory
xraymemory / gist:2727748
Created May 18, 2012 21:39
Strange timing bug
import hypermedia.video.*;
import java.awt.Rectangle;
int MAXFACES = 500;
int DX, DY, DW, DH;
int TX, TY, TW, TH;
int numberOfFacesCaptured = 0;
int faceLengthFlag = 0;
int cueFlag = 0;
int sleepCount = 5000;