This file contains hidden or 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
module comet_proto { | |
export interface Client { | |
connect(nick:string); | |
disconnect(nick:string); | |
message(channel:string, nick:string, message:string); | |
move(nick:string, nx:number, ny:number, ox:number, oy:number); | |
nicklist(nicks:string[]); | |
tile(world:string, wx:number, wy:number, tx:number, ty:number); | |
warp(nick:string, nx:number, ny:number); | |
} |
This file contains hidden or 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> | |
int main(int argc, char **argv) { | |
int i = 10; | |
comefrom loop; | |
if(i < 0) { | |
stop:; | |
} |
This file contains hidden or 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 <iostream> | |
#include <string> | |
using namespace std; | |
#include <oil/util.hpp> | |
#include <oil/db/pgsql.hpp> | |
#include <indigo/server.hpp> | |
#include <indigo/client.hpp> | |
#include <indigo/protoserver.hpp> |
This file contains hidden or 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
[jac@rasa gapi]$ m | |
g++ -o gapi gapi.cpp git.cpp -lgit2 -std=c++11 -g -rdynamic | |
[jac@rasa gapi]$ ./gapi | |
branch: future | |
branch: master | |
branch: sqlite | |
Segmentation fault (core dumped) | |
[jac@rasa gapi]$ |
This file contains hidden or 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 <iostream> | |
#include <string> | |
#include <vector> | |
using namespace std; | |
#include <oil/util.hpp> | |
#include <indigo/server.hpp> | |
#include <indigo/client.hpp> | |
#include "protocol.hpp" | |
#include "martial.hpp" |
This file contains hidden or 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 <iostream> | |
using std::cout; | |
using std::endl; | |
#include <string> | |
using std::string; | |
#include "db/sqlite.hpp" | |
struct Test { | |
int a; |
This file contains hidden or 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 <stdint.h> | |
uint64_t *prime = NULL, pCount = 0; | |
uint64_t primeByN(uint64_t k, uint64_t n) { | |
uint64_t j; | |
for(j = 0; j < n; ++j) | |
if(k % prime[j] == 0) |
This file contains hidden or 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
class EventLog { | |
class Event { | |
DateTime when; | |
// can track when event started as well, lets you loop back through and find failed tasks | |
Key key; | |
} | |
Event[] events; | |
int nextPush = 0; | |
int nextPop = 0; |
This file contains hidden or 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
Device Boot Start End Sectors Size Id Type | |
>> Free space 2048 538989390 538987343 257G | |
/dev/sdh1p1 1936028272 3787887330 1851859059 883G 68 unknown | |
/dev/sdh1p2 1330184192 1869160479 538976288 257G 79 unknown | |
/dev/sdh1p3 538989391 1937352302 1398362912 666.8G 53 OnTrack DM6 Aux3 | |
/dev/sdh1p4 1394627663 1394648999 21337 10.4M 49 unknown | |
Free space 1394649088 1936028271 541379184 |
This file contains hidden or 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 <random> | |
using std::random_device; | |
using std::uniform_int_distribution; | |
using std::generate_canonical; | |
int main(int, char **) { | |
// makes random numbers | |
random_device engine{}; | |
// generate in [0, 2] |
NewerOlder