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 <threads.h> | |
#include "raylib.h" | |
#include "rlgl.h" | |
int main(int argc, char **argv) | |
{ | |
if (argc != 4) { |
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 <math.h> | |
#include <string.h> | |
#include <stdint.h> | |
typedef struct fixed_point { | |
long long i; // integer part | |
unsigned long long d; // decimal part | |
} fixed_point; |
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 <iostream> | |
#include <map> | |
struct s { | |
float red = 1.0/*F*/; | |
}; | |
static const std::map<int, s> m { | |
{ 10, {} }, | |
{ 12, {} }, |
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 <iostream> | |
#include "zmq.hpp" | |
static const char *addr = "tcp://localhost:1337"; | |
void sub_loop(void) | |
{ | |
zmq::context_t ctx; | |
zmq::socket_t so(ctx, ZMQ_SUB); |
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 <iostream> | |
#include <unistd.h> | |
#include "zmq.hpp" | |
static const char *addr = "tcp://*:1337"; | |
void pub_loop(void) | |
{ | |
zmq::context_t ctx; |
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
#define _GNU_SOURCE | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <unistd.h> | |
#include <fcntl.h> | |
int p[2]; | |
const size_t sz = 65536; | |
void cat(int fd) |
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 <stddef.h> | |
#include <string.h> | |
#include <inttypes.h> | |
#include <unistd.h> | |
#include <json-c/json.h> | |
void json2sexp(struct json_object *jobj); |