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
PS C:\Dev\_jsPrototypes\serialPort> npm i serialport --save | |
> serialport@4.0.7 install C:\Dev\_jsPrototypes\serialPort\node_modules\serialport | |
> node-pre-gyp install --fallback-to-build | |
node-pre-gyp ERR! install error | |
node-pre-gyp ERR! stack Error: Unsupported target version: 0.18.5 | |
node-pre-gyp ERR! stack at get_runtime_abi (C:\Dev\_jsPrototypes\serialPort\node_modules\serialport\node_modules\nod | |
e-pre-gyp\lib\util\versioning.js:156:23) | |
node-pre-gyp ERR! stack at Object.module.exports.evaluate (C:\Dev\_jsPrototypes\serialPort\node_modules\serialport\n |
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
import java.io.File; | |
long lastTime = 0; | |
File f; | |
String[] data; | |
void setup() { | |
f = new File("e:/test.txt"); | |
} | |
void draw() { | |
background(0); |
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
import java.io.File; | |
long lastTime = 0; | |
File f; | |
String[] data; | |
void setup() { | |
f = new File("e:/test.txt"); | |
} | |
void draw() { | |
background(0); |
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
void OSC_TestApp::setupReciever(int portNum) | |
{ | |
if (mReciever) | |
{ | |
mReciever->close(); | |
mReciever.release(); | |
mReciever = make_unique<osc::ReceiverUdp>(portNum); | |
} else | |
{ |
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
auto i = std::begin(inv); | |
while (i != std::end(inv)) { | |
// do some stuff | |
if (blah) | |
i = inv.erase(i); | |
else | |
++i; | |
} |
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
float rand(vec2 co){ | |
return fract(sin(dot(co.xy ,vec2(12.9898,78.233))) * 43758.5453); | |
} |
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
for(vector<bloomPop>::iterator it = bloomPool.begin(); it != bloomPool.end();){ // loop through vector with iterator | |
it->update(); // update all objects in vector | |
if(it->time < 0){ /// if condition matches... | |
it = bloomPool.erase(it); // ..go to hell.. | |
}else{ | |
++it; // ..or keep counting and continue! | |
} | |
} |
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
/// minimal autoreloading in cinder | |
/// it's called BullDog, LOL!!!! | |
struct wFile | |
{ | |
time_t time; | |
fs::path path; | |
std::function<void()> callback; | |
wFile(time_t t, fs::path p, std::function<void()> c) { | |
time = t; | |
path = p; |
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
double PI = 4.0 * atan(1.0); // precise PI calculation |
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
void Player::getWaveformPreview(vector <Vec2f> &preview, unsigned int size){ | |
if (size == 0) | |
{ | |
return; | |
} | |
preview.clear(); | |
peak = 0; | |
void *waveData; | |
void *pointer2; |