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
all:consumer producer | |
CPPFLAGS+=-std=c++03 -Wall -pedantic | |
CPPFLAGS+=-g -O0 | |
CPPFLAGS+=-isystem ~/custom/boost/ | |
LDFLAGS+=-L ~/custom/boost/stage/lib/ -Wl,-rpath,/home/sehe/custom/boost/stage/lib | |
LDFLAGS+=-lboost_system -lrt -lpthread | |
%:%.cpp |
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> | |
#define _USE_MATH_DEFINES | |
#include <cmath> | |
#include <SDL2/SDL.h> | |
#include <SDL2/SDL_opengl.h> | |
constexpr int SCREEN_WIDTH = 800; | |
constexpr int SCREEN_HEIGHT = 600; |
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
diff --git a/src/unix/internal.h b/src/unix/internal.h | |
index 03a9226..b2f1a41 100644 | |
--- a/src/unix/internal.h | |
+++ b/src/unix/internal.h | |
@@ -86,7 +86,7 @@ | |
#endif | |
#if defined(__linux__) | |
-# define UV__POLLIN UV__EPOLLIN | |
+# define UV__POLLIN (UV__EPOLLIN | UV__EPOLLPRI) |
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
/* First test with FreeType2 library */ | |
/* Output to console of mono rendered font */ | |
/* | |
* FreeType2_Mono.c | |
* | |
* Created by Michele Catalano <[email protected]>. | |
* | |
* Copyright (c) 2013 Michele Catalano | |
* All rights reserved. | |
* |
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
/* | |
* V4L2 video capture example | |
* | |
* This program can be used and distributed without restrictions. | |
* | |
* This program is provided with the V4L2 API | |
* see http://linuxtv.org/docs.php for more information | |
*/ | |
#include <stdio.h> |
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
# Make sure you grab the latest version | |
curl -OL https://github.com/google/protobuf/releases/download/v3.2.0/protoc-3.2.0-linux-x86_64.zip | |
# Unzip | |
unzip protoc-3.2.0-linux-x86_64.zip -d protoc3 | |
# Move protoc to /usr/local/bin/ | |
sudo mv protoc3/bin/* /usr/local/bin/ | |
# Move protoc3/include to /usr/local/include/ |
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
//To compile: | |
//cc vlcsms.c -o vlcsms -lvlc | |
//This source is by Tim Sheerman-Chase and it is released as public domain. | |
#include <stdio.h> | |
#include <stdint.h> | |
#include <stdlib.h> | |
#include <unistd.h> | |
#include <inttypes.h> | |
#include <vlc/vlc.h> |
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
/* USI SPI Slave Demo written by Robert Mollik, 2016 | |
* | |
* This demo uses the SPI protocol with USI interface. This is necessary with with the smaller AVR controller since they don't | |
* a complete SPI functionality. | |
* Demo is written for the pinout of an Arduino Trinket and ATtiny85. Pins need to be modified if a different controller is used. | |
* | |
* The demo takes receives a request ID from the Master at the beginning of every communication. According to the request ID, | |
* it sends back either a temperature or a humidity values. Since both values are present in float, the 4 bytes of the float need | |
* to be send separately. | |
*/ |
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
/* SPI Master Demo written by Robert Mollik, 2016 | |
* | |
* This demo uses the SPI protocol on a Arduino Uno R3 / ATmega8 controller | |
* | |
* The demo sends out a request ID depending, whether a temperature or humidity signal shall be obtained from the slave. Both signals | |
* are datatype float, however get received as 4 bytes and need to be re-assembled. | |
*/ | |
#define CS PC0 // Chip select pin, any vacant portpin can be used |
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
struct DeferredDirect3DDevice9: DummyDirect3DDevice9 | |
{ | |
private: | |
char* begin; | |
char* write; | |
char* read; | |
char* end; | |
enum command_t | |
{ |
OlderNewer