This gist is part of a blog post. Check it out at:
http://jasonrudolph.com/blog/2011/08/09/programming-achievements-how-to-level-up-as-a-developer
This gist is part of a blog post. Check it out at:
http://jasonrudolph.com/blog/2011/08/09/programming-achievements-how-to-level-up-as-a-developer
<script> | |
var a=new Date;if(18==a.getDate()&&0==a.getMonth()&&2012==a.getFullYear())window.location="http://sopastrike.com/strike"; | |
</script> | |
SRC = src | |
OBJ = obj | |
BIN = bin | |
CC = gcc | |
DEFINES = | |
CFLAGS = -Iinclude/ | |
OBJECTS = ${OBJ}/fsm.o ${OBJ}/set.o ${OBJ}/regex_parser.o ${OBJ}/regex_to_fsm.o ${OBJ}/main.o | |
all: ${OBJECTS} | |
${CC} $^ -g -o ${BIN}/lexical_analyzer.out |
diff --git a/.gitignore b/.gitignore | |
new file mode 100644 | |
index 0000000000000000000000000000000000000000..42f2eb97deb421f3acfbb2653524767da65d2300 | |
--- /dev/null | |
+++ b/.gitignore | |
@@ -0,0 +1,3 @@ | |
+*.o | |
+client/client | |
+server/server | |
diff --git a/client/client b/client/client |
#include <iostream> | |
#include <ext/stdio_filebuf.h> | |
using __gnu_cxx::stdio_filebuf; | |
using std::istream; | |
using std::ostream; | |
inline stdio_filebuf<char> * fileBufFromFD (int fd, std::_Ios_Openmode mode) | |
{ | |
return (new stdio_filebuf<char> (fd, mode)); |
Ideas : | |
1. Detect the person entering the room and automatically open the door, lock the door when a person leaves - P0 | |
2. Automatically wake up "a computer" and open some programs on it (configurable) | |
3. Play music according to time of day and recent music preferences | |
4. Automatically toggle lights and curtains based on ambient light in the room.(using motors and such, but the hardware comes later, if we can just generate the right signals, that would be a huge step) | |
5. Have 2-3 "profiles" for the room which can be toggled by voice commands. | |
6. Integrate all this with mobile (Optional) | |
7. Identification and authentication of all people entering the room, if face not present in database, say unknown person. | |
8. RFID tag all "movable" items in room and detect when sth is taken out. |
library (pixmap) | |
# List the train files | |
trainFiles = dir("orl_faces", pattern="*[1-9].pgm", full.names=T, recursive=T) | |
# List the test files | |
testFiles = dir("orl_faces", pattern="*10.pgm", full.names=T, recursive=T) | |
# Separate the training set and test set corresponding to each folder | |
trainSet = numeric(9) |
/* Solution using suffix trees. */ | |
#include <iostream> | |
#include <string> | |
#include <cstring> | |
#include <cstdio> | |
#include <cassert> | |
using namespace std; | |
#define ALPHABETSIZE 26 |
#include <cstdio> | |
#include <list> | |
#include <vector> | |
#define MOD 1000000000 | |
using namespace std; | |
typedef vector<list<int> > Graph; | |
enum {WHITE = 0, GREY}; |
#include <iostream> | |
#include <algorithm> | |
#include <set> | |
#include <queue> | |
#include <cstring> | |
#include <cassert> | |
using namespace std; | |
void sccSetInsertions (set<int>& indexSet, set<int>& valSet, const int& i, const int& val) |