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
import java.util.ArrayList; | |
import java.util.List; | |
import java.util.concurrent.Semaphore; | |
public class Main { | |
private Semaphore empty, full, readers, writers; | |
private List<Double> buffer; | |
private List<Thread> threads; | |
public class Reader implements Runnable { |
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 "lodepng/lodepng.h" | |
#include "iomap.h" | |
bool IOMap::exportPNG(const Map& map, std::string filename) | |
{ | |
uint32_t size = static_cast<uint32_t>(map._height) * static_cast<uint32_t>(map._width); | |
std::vector<uint8_t> bytes(size * 4); | |
for (uint16_t x = 0; x < map._height; ++x) { | |
for (uint16_t y = 0; y < map._width; ++y) { |
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
From 9063dccc1a8a730c6ffce6e78567e191e217be6e Mon Sep 17 00:00:00 2001 | |
From: Ranieri Althoff <[email protected]> | |
Date: Mon, 1 Jun 2015 02:52:35 -0300 | |
Subject: [PATCH] Fix offline traning ignoring skill/magic rate | |
--- | |
src/player.cpp | 8 ++++---- | |
1 file changed, 4 insertions(+), 4 deletions(-) | |
diff --git a/src/player.cpp b/src/player.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
From b05c021f0023fb17ab502e0b7dc0baecedcb0c7f Mon Sep 17 00:00:00 2001 | |
From: Ranieri Althoff <[email protected]> | |
Date: Mon, 1 Jun 2015 02:16:42 -0300 | |
Subject: [PATCH] Add timestamp to player log in/out message | |
--- | |
src/player.cpp | 10 ++++++++-- | |
1 file changed, 8 insertions(+), 2 deletions(-) | |
diff --git a/src/player.cpp b/src/player.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 <chrono> | |
#include <iostream> | |
#include <mutex> | |
#include <thread> | |
#include <vector> | |
const unsigned int philosophers = 5; | |
const unsigned int iterations = 10; | |
std::mutex output; |
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
// Configure pings accordingly | |
enum LED_PINS { | |
LED_RED = 0, | |
LED_GREEN = 1, | |
LED_BLUE = 2, | |
LED_PWM = 3 | |
}; | |
void writeColor(int color) { | |
GPIO_Pin red(LED_RED), green(LED_GREEN), blue(LED_BLUE), pwm(LED_PWM); |
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
From 39f11e36d0fc2cf43a06108808d6bba35462dc8f Mon Sep 17 00:00:00 2001 | |
From: Ranieri Althoff <[email protected]> | |
Date: Mon, 11 May 2015 01:36:26 -0300 | |
Subject: [PATCH] Make offline training optional via config.lua | |
--- | |
config.lua | 1 + | |
src/actions.cpp | 6 +++++- | |
src/configmanager.cpp | 1 + | |
src/configmanager.h | 1 + |
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
From 0daf4a3aa895283cf847d4333748ae69eec9b990 Mon Sep 17 00:00:00 2001 | |
From: Ranieri Althoff <[email protected]> | |
Date: Thu, 9 Jul 2015 03:38:45 -0300 | |
Subject: [PATCH] Enable dual weapon wielding, batteries included. | |
--- | |
config.lua | 8 ++++++ | |
src/configmanager.cpp | 3 +++ | |
src/configmanager.h | 3 +++ | |
src/luascript.cpp | 4 +++ |
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
#!/usr/bin/env sh | |
sed -i "s/^\(ip\s*=\s*\)\".*\"/\1\"$(curl -s icanhazip.com)\"/" config.lua |
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
From 275f39c3faa61e59383915288de85cc90d9aca06 Mon Sep 17 00:00:00 2001 | |
From: Ranieri Althoff <[email protected]> | |
Date: Sun, 19 Apr 2015 03:47:18 -0300 | |
Subject: [PATCH 1/1] Make player walkthrough optional | |
--- | |
config.lua | 1 + | |
src/configmanager.cpp | 1 + | |
src/configmanager.h | 1 + | |
src/player.cpp | 4 ++-- |