あまり深く理解してないので識者のツッコミ大歓迎
取り敢えず最低限だけ
# 補完を有効にする
// HSVに変換して肌色っぽい領域を抽出する | |
// 顔認識結果は全く使わない | |
void detect(void) | |
{ | |
IplImage *image_src; // 元画像 カラーモデルはBGR | |
IplImage *image_src_hsv; // 元画像をHSV表色系に変換したもの | |
IplImage *image_only_hadairo; // 肌色領域だけを抽出したマスク画像 | |
IplImage *image_dst; // 何らかのフィルタの結果を入れる予定だけど、今は元画像のまま | |
char* file_name = "images/purikura.jpg"; | |
if((image_src = loadImage(file_name, CV_LOAD_IMAGE_ANYCOLOR)) == NULL){ |
public static IObservable<T> Pausable<T>( | |
this IObservable<T> sourceStream, | |
IObservable<bool> isPausedStream, | |
bool startPaused = false) | |
{ | |
return Observable.Create<T>(o => | |
{ | |
var subscriptions = new SerialDisposable(); | |
var replaySubjects = new SerialDisposable(); |
// 処理対象の文字列 | |
var str = "Hello, JavaScript!"; | |
// 通常のfor文で行う | |
for (var i = 0; i < str.length; i++) { | |
console.log(str[i]); | |
} | |
// 一応動くけど、まぁやめた方が良い | |
for (var i in str) { |
alternatively use: http://geoff.greer.fm/lscolors/
The value of this variable describes what color to use for which attribute when colors are enabled with CLICOLOR. This string is a concatenation of pairs of the format fb, where f is the foreground color and b is the background color.
The color designators are as follows:
a black
module.exports = (grunt) -> | |
# configuration | |
grunt.initConfig | |
# grunt sass | |
sass: | |
compile: | |
options: | |
style: 'expanded' |
/* | |
v2: Matt Rix pointed out there's an undocumented ONGeneratedCSProjectFiles() callback | |
https://gist.github.com/MattRix/0bf8de88e16e8b494dbb | |
v1: Still available in the gist history if you want a FileSystemWatcher solution! | |
THE PROBLEM: | |
- Unity constantly rewrites its .sln files whenever you rename/add/remove scripts |
import Foundation | |
import Combine | |
public func async<T>(_ body: @escaping (Yield<T>) throws -> ()) -> Async<T> { | |
Async(body: body) | |
} | |
public func await<P>(_ publisher: P) throws -> P.Output where P: Publisher { | |
try publisher.await() | |
} |