I hereby claim:
- I am kennethlakin on github.
- I am kennethlakin (https://keybase.io/kennethlakin) on keybase.
- I have a public key ASCxw3Z5hNnQ35qMXZRDF_mdmcVnyzD5QysVaBRAslllgwo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
$ ~/project/build/Debug+Asserts/bin/clang++ --version | |
clang version 3.3 (trunk 180858) | |
Target: x86_64-unknown-linux-gnu | |
Thread model: posix | |
$ ~/project/build/Debug+Asserts/bin/clang++ -pthread -Wall -pedantic -g -std=c++11 main.cpp && gdb -q ./a.out | |
Reading symbols from a.out...done. | |
(gdb) r | |
Starting program: a.out | |
[Thread debugging using libthread_db enabled] | |
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". |
#include <stdlib.h> | |
#include <string.h> | |
#include <stdio.h> | |
char *myStrtok(char * str, const char *delim) | |
{ | |
static char * s = NULL; | |
char * ret = NULL; | |
if(str != NULL) | |
{ |
declare class SocketId {}; | |
declare var chrome : { | |
socket: { | |
create(protocol:string, options:Object, cb:(s:{socketId:SocketId;})=>void); | |
connect(sock:SocketId, host:string, port:number, cb:Function); | |
write(sock:SocketId, ab:ArrayBuffer, cb:Function); | |
read(sock:SocketId, opt:Object, cb:(ab:ArrayBuffer)=>void); | |
disconnect(sock:SocketId, cb?:()=>void); | |
}; | |
storage: { |
-module(coin). | |
-export([start/1, stop/0, coin/2, gather/2, gatherStatus/2]). | |
start(N) -> | |
Gatherpid = spawn(?MODULE, gather, [0, now()]), | |
register(gather, Gatherpid), | |
spawn(?MODULE, gatherStatus, [Gatherpid, 0]), | |
coin(N, Gatherpid). | |
stop() -> |