View autoreload.pde
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); |
View setupReciever.cpp
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 | |
{ |
View BullDog
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; |
View ciAngel_Bind_StdVector.h
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
/* | |
std::vector binding library for AngelScript | |
Copyright (c) 2004 Anthony "JM" Casteel | |
This software is provided 'as-is', without any express or implied | |
warranty. In no event will the authors be held liable for any | |
damages arising from the use of this software. | |
Permission is granted to anyone to use this software for any | |
purpose, including commercial applications, and to alter it and |
View gist:9920572
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 |
View gist:9900219
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; |
View gist:9742374
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 "cinder/app/AppNative.h" | |
#include "cinder/gl/gl.h" | |
#include "cinder\Capture.h" | |
#include "cinder\Surface.h" | |
#include "cinder/gl/Texture.h" | |
#include "cinder/MayaCamUI.h" | |
#include "cinder/Camera.h" | |
#include "cinder\Utilities.h" | |
#include "cinder/params/Params.h" | |
#include "cinder/ip/EdgeDetect.h" |
View gist:8902181
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
// TESTED ON nightly-build ver 0.8 (of_v20130813) in Visual Studio 2012 - Win64 | |
// MAKE APP ALWAYS ON TOP | |
HWND AppWindow = GetActiveWindow(); | |
SetWindowPos(AppWindow, HWND_TOPMOST, NULL, NULL, NULL, NULL, SWP_NOMOVE | SWP_NOSIZE); | |
// DISABLE FUNCTION DESCRIBED ABOVE | |
HWND AppWindow = GetActiveWindow(); |
View gist:8782425
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
// in main.cpp | |
#pragma comment(linker, "/subsystem:\"windows\" /entry:\"mainCRTStartup\"") | |
View vectorArrayManager2
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; | |
} |