Original link: http://www.concentric.net/~Ttwang/tech/inthash.htm
Taken from: http://web.archive.org/web/20071223173210/http://www.concentric.net/~Ttwang/tech/inthash.htm
Reformatted using pandoc
Thomas Wang, Jan 1997
last update Mar 2007
// concurrent-queue.h | |
#ifndef CONCURRENT_QUEUE_H_ | |
#define CONCURRENT_QUEUE_H_ | |
#include <queue> | |
#include <thread> | |
#include <mutex> | |
#include <condition_variable> | |
template <typename T> |
ffmpeg -i test.mov -vcodec libx264 -vf 'scale=640:trunc(ow/a/2)*2' -acodec aac -vb 1024k -minrate 1024k -maxrate 1024k -bufsize 1024k -ar 44100 -strict experimental -r 30 out.mp4 |
char *f="char *f=\"$\";\n" | |
"char buf[65536];\n" | |
"char in[65536];\n" | |
"char *sub_copy(char *b){\n" | |
"char *a=f;\n" | |
"for(;*a;a++)switch(*a){\n" | |
"case 10:*b++=92;*b++=110;*b++=34;*b++=10;*b++=34; break;\n" | |
"case 34:\n" | |
"case 92:*b++=92;\n" | |
"default:*b++=*a;\n" |
#include <stdlib.h> | |
#include <stdio.h> | |
#include <math.h> | |
typedef int i; //Save space by using 'i' instead of 'int' | |
typedef float f; //Save even more space by using 'f' instead of 'float' | |
//Define a vector class with constructor and operator: 'v' | |
struct v { | |
f x,y,z; // Vector has three float attributes. |
Original link: http://www.concentric.net/~Ttwang/tech/inthash.htm
Taken from: http://web.archive.org/web/20071223173210/http://www.concentric.net/~Ttwang/tech/inthash.htm
Reformatted using pandoc
Thomas Wang, Jan 1997
last update Mar 2007
class Account < ActiveRecord::Base | |
def self.search(name = nil) | |
# search logic | |
end | |
end |
#include <sys/socket.h> | |
#include <sys/types.h> | |
#include <netinet/in.h> | |
#include <arpa/inet.h> | |
#include <netdb.h> | |
#include <unistd.h> | |
#include <string.h> | |
#include <iostream> | |
#include <stdarg.h> | |
#include <stdio.h> |