Skip to content

Instantly share code, notes, and snippets.

View icq4ever's full-sized avatar
๐ŸŒ
127.0.0.1

Yi donghoon icq4ever

๐ŸŒ
127.0.0.1
View GitHub Profile
void ofApp::setup() {
camWidth = 1280;
camHeight = 800;
cam.initGrabber(camWidth, camHeight);
tracker.setup();
camImg.allocate(camWidth, camHeight, OF_IMAGE_COLOR); // ofImage camImg - full size
copiedImg.allocate(camWidth/2, camHeight/2, OF_IMAGE_COLOR); // ofImage copiedImg - half size
fbo.allocate(camWidth/2, camHeight/2); // ofFbo fbo - half size
const int numReadings = 10;
int readings[numReadings]; // the readings from the analog input
int readIndex = 0; // the index of the current reading
int total = 0; // the running total
int average = 0; // the average
int inputPin = A0;
int distance;
@icq4ever
icq4ever / VSCode+processing_tip.md
Last active February 22, 2017 09:08
VisualStudioCode Processing extension setup
  1. download visualStudioCode from here
  2. open PDE file
  3. [Ctrl + Shift + P] and type task
  4. select Tasks : Configure Task Runner
  5. replace with below
{
    "version": "0.1.0",
    "command": "processing-java",
 "isShellCommand": true,
@icq4ever
icq4ever / integration.cpp
Created August 1, 2017 03:00
get distance from acceleration and gyroscope
/*
ofVec3f lastAccel;
ofVec3f speed;
ofVec3f lastSpeed;
ofVec3f distance;
ofVec3f lastDistance;
ofVec3f gyro, lastGyro;
@icq4ever
icq4ever / test.cpp
Last active August 14, 2017 17:10
test
// original
std::list<std::pair<int,double> > nbors;
std::list<std::pair<int,double> >::iterator iter;
//find 'k' closest neighbors of testpoint
double x, y, xT, yT, dist;
// SEARCHING FOR BLOBS
for(int i=0; i < newBlobs->nBlobs; i++){
x = newBlobs->blobs[i].centroid.x;
@icq4ever
icq4ever / c_cpp_properties.json
Last active August 23, 2017 05:46
oF x visual studio code settings. [tested with MacOS.]
{
"configurations": [
{
"name": "Mac",
"includePath": [
"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1",
"/usr/local/include",
"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/8.1.0/include",
"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include",
"/usr/include",
@icq4ever
icq4ever / part_01.md
Last active September 5, 2017 02:01
ํ…Œํฌ๋†€๋กœ์ง€์•„ํŠธ1 - 1ํ•™๊ธฐ ๋ณต์Šต๋‚ด์šฉ

1ํ•™๊ธฐ ๋‚ด์šฉ ๋ณต์Šต

processing ์„ค์น˜ ํ™•์ธ

ํ”„๋กœ๊ทธ๋ž˜๋ฐ ๊ธฐ์ดˆ

  • ์ปดํŒŒ์ผ
  • ์Šค์ผ€์น˜ ๋ฐ ์บ”๋ฒ„์Šค
  • ๋ช…๋ น์–ด(ํ•จ์ˆ˜)
  • ์„ธ๋ฏธ์ฝœ๋ก 
@icq4ever
icq4ever / EaglePanWithCtrl.md
Last active October 28, 2024 16:15
make Autodesk Eagle panning with Ctrl Key

why?

usually I work with thinkpad laptop. which has trackpoint and trackpad.
eagle has no pan command. by default, panning needs mouse wheel.
but usually I don't use it. i prefer trackpoint. that's why love thinkpad laptop.

where is eaglerc file?

  • for windows users, this file located here -> c:\Users\_yourUserName_\AppData\Roaming\Eagle\setrtings\9.6.2\eaglerc
  • for linux users, this file located here -> ~/.local/share/Eagle/settings/9.3.1/eaglerc
    • you might need to replace 9.3.1 to installed eagle version
@icq4ever
icq4ever / body text.md
Last active January 11, 2018 03:33
scattering lights, gliding sounds body text

scattering lights

SCATTERING LIGHTS

ํฉ์–ด์ง€๋Š” ๋น›

'ํฉ์–ด์ง€๋Š” ๋น›, ๋ฏธ๋„๋Ÿฌ์ง€๋Š” ์†Œ๋ฆฌ'๋Š” ์˜จ๋„, ํ’ํ–ฅ, ํ’์†, ์Šต๋„ ๋“ฑ ์„œ์šธ๊ณผ ํ‰์ฐฝ์˜ ๋‚ ์”จ ์ •๋ณด๋ฅผ ๋น›๊ณผ ์†Œ๋ฆฌ์˜ ์‹ ํ˜ธ๋กœ ์น˜ํ™˜ํ•ด ๋ณดํ–‰์ž๋“ค์ด ๊ณต๊ฐ๊ฐ์  ๊ฒฝํ—˜์„ ํ†ตํ•ด ์ž์—ฐ์˜ ์•„๋ฆ„๋‹ค์›€์„ ๋А๋‚„์ˆ˜ ์žˆ๋„๋ก ํ•˜์˜€๋‹ค. ๊น€๋‹ค์›€, ์ด๋™ํ›ˆ, ํ•ซ์‚ฐ ํ›„์ž์ด๋ฆฌ๊ฐ€ ์ฐธ์—ฌํ–ˆ๋‹ค.

์„œ์šธ๋กœ7017 ์—์„œ 2018๋…„ 2์›” 28์ผ๊นŒ์ง€ ๋งค์ผ ์˜คํ›„ 5:30๋ถ€ํ„ฐ ์˜คํ›„ 11์‹œ ์‚ฌ์ด์— ์‹œ์—ฐ๋œ๋‹ค.

Node.js ๋กœ db๋‹ค๋ฃจ๊ธฐ, application ๋งŒ๋“ค๊ธฐ

MySQL

Mysql ์ ‘์† : mysql -uroot -p

db๋งŒ๋“ค๊ธฐ : create database something;