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
// require | |
var _exec = require('child_process').execSync; | |
var _util = require('util'); | |
// static const | |
var _scale = 1.0; | |
var _fps = 30; | |
var _input_path = "./src/test.mov"; | |
var _output_format ="./dest/test%d.mov" |
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
// require | |
var _exec = require('child_process').execSync; | |
var _util = require('util'); | |
// static const | |
var _scale = 1.0; | |
var _fps = 30; | |
var _input_path = "./src/test.mov"; | |
var _output_format ="./dest/test%d.mov" |
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
class Utils | |
{ | |
private: | |
template< typename T > | |
static std::string IntToHex( T i ) | |
{ | |
std::stringstream stream; | |
stream | |
<< std::setfill ('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
#include "ofMain.h" | |
class Utils | |
{ | |
public: | |
static void tween(float start_val, float end_val, int interval, std::function<void(float)> task, std::function<void()> complete = [](){}) | |
{ | |
auto start_time = std::chrono::system_clock::now(); | |
std::thread([start_val, end_val, interval, start_time, task, complete]() { | |
while(true) |
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
#pragma once | |
#include "ofMain.h" | |
#include <functional> | |
#include <chrono> | |
#include <future> | |
#include <cstdio> | |
// reference : https://stackoverflow.com/questions/14650885/how-to-create-timer-events-using-c-11/14665230#14665230 |
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
var _child = require('child_process'); | |
// convert | |
init(); | |
function init() | |
{ | |
// safety success | |
var args = [ | |
"neural_style.lua", | |
"-style_image" , "outputs/kida/jiburi.jpg", |
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
// reference : https://gist.github.com/satoruhiga/1687325 | |
#pragma once | |
static int WIDTH = 300; | |
static int HEIGHT = 300; | |
#include "ofMain.h" | |
#include "Poco/Base64Encoder.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
// test | |
string stringFormat(const char *format, ...) | |
{ | |
va_list va; | |
va_start(va, format); | |
char buffer[150]; | |
vsprintf(buffer, format, va); | |
va_end(va); | |
return (string)buffer; | |
} |
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
test = require "test" | |
t = test.TestClass() | |
t\update() | |
t\print() | |
print t.val | |
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
require "test" | |
a = test.AClass() | |
a\update() | |
a\update() | |
a\print() |