Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
from sqlalchemy import (create_engine, event, | |
Column, Integer, | |
ForeignKey) | |
from sqlalchemy import event | |
from sqlalchemy.orm import sessionmaker, scoped_session | |
from sqlalchemy.orm import relationship | |
from sqlalchemy.ext.declarative import declarative_base, declared_attr | |
from sqlalchemy.exc import DBAPIError | |
import sqlite3 |
This file contains 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> | |
#include <string.h> | |
#include <errno.h> | |
#include <unistd.h> | |
#include <sys/types.h> | |
#include <sys/stat.h> | |
#include <fcntl.h> | |
This file contains 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
CXXFLAGS=-O2 -Wall -g -fPIC $(shell pkg-config --cflags lua5.1 luabind) -I/usr/local/include/bullet | |
LDFLAGS=-lstdc++ $(shell pkg-config --libs lua5.1 luabind) -lLinearMath | |
all: luavector | |
luavector: luavector.o | |
luavector.o: luavector.cpp | |
.PHONY: clean |
This file contains 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
// line 1 "Lexer.rl" | |
public class Lexer { | |
// line 19 "Lexer.rl" | |
// line 10 "Lexer.java" | |
private static byte[] init__simple_lexer_actions_0() |
This file contains 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
CFLAGS=-O2 | |
CXXFLAGS=-O2 | |
all: parser | |
parser.cpp: parser.rl | |
ragel -G2 $^ -o $@ | |
parser.o: parser.cpp RawQuote.h |
This file contains 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> | |
struct B; | |
struct A | |
{ | |
struct B *ptr; | |
}; | |
struct B |
This file contains 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> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <unistd.h> | |
#include <sys/types.h> | |
#include <sys/socket.h> | |
#include <sys/ioctl.h> | |
#include <net/if.h> | |
#include <netinet/in.h> |
This file contains 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> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <unistd.h> | |
#include <fcntl.h> | |
#include <sys/stat.h> | |
#include <sys/types.h> | |
#define BUF_SIZE 1048576 |
This file contains 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
expr :: String -> (Double, String) | |
expr s = expr1 x rest where (x, rest) = term s | |
expr1 lhs ('+' : s) = expr1 (lhs + x) rest where (x, rest) = term s | |
expr1 lhs ('-' : s) = expr1 (lhs - x) rest where (x, rest) = term s | |
expr1 lhs s = (lhs, s) | |
term s = term1 x rest where (x, rest) = factor s | |
term1 lhs ('*' : s) = term1 (lhs * x) rest where (x, rest) = factor s | |
term1 lhs ('/' : s) = term1 (lhs / x) rest where (x, rest) = factor s | |
term1 lhs s = (lhs, s) | |
factor ('(' : s) = (x, rest) where (x, ')' : rest) = expr s |
NewerOlder