Skip to content

Instantly share code, notes, and snippets.

View KentaKomai's full-sized avatar
🏠
Working from home

kken KentaKomai

🏠
Working from home
  • vitte
  • Tokyo, Japan
View GitHub Profile
@KentaKomai
KentaKomai / gist:936895a6059ac872ee25
Created June 26, 2014 01:36
マウスに向かってくる
int length = 1000;
float[] x = new float[length];
float[] y = new float[length];
float[] speedX = new float[length];
float[] speedY = new float[length];
float[] speedRate = new float[length];
void setup(){
size(1000, 700);
@KentaKomai
KentaKomai / gist:3077f87e749ee332e155
Created June 24, 2014 01:10
跳ね返るボールのサンプル
float FRICTION = 0.99;
float x, y;
float speedY, speedX;
int radius = 10;
void setup(){
size(200, 200);
colorMode(HSB, 100);
background(99);
void setup(){
size(1000, 750);
colorMode(RGB, 100);
frameRate(10);
background(100);
noStroke();
}
void draw(){
int counter;
void setup(){
size(900, 900);
//frameRate(10);
counter = 0;
}
void draw(){
background(255);
try
{
throw new Exception();
}
catch (Exception exp)
{
StackTrace st = new StackTrace(exp, true);
StackFrame sf = st.GetFrame(0);
Console.WriteLine(sf.GetFileName());
Console.WriteLine(sf.GetFileLineNumber());
@KentaKomai
KentaKomai / .vimrc
Created April 30, 2014 00:44
会社のvimrc
filetype indent plugin on
syntax on
set wildmenu
set autoindent
set smartindent
set number
set tabstop=4
set tw=0
set shiftwidth=4
set whichwrap=b,s,h,l,<,>,[,]
@KentaKomai
KentaKomai / Unite.vim option and sources
Created April 28, 2014 02:28
Unite.vim option and sources(read later)
Unite options
-auto-highright
-auto-preview
-auto-quit
-auto-resize
-buffer-name=
-comlete
-create
-cursor-line-highlights
@KentaKomai
KentaKomai / gist:11109058
Created April 20, 2014 08:53
type juggling
<?php
error_reporting(false);
$input = "0";
if( $input == "0e94323" ){
print("$input == 0e94323\n");
}
# -*- encoding:utf-8 -*-
import socket
import sys
version = 1.0
email = "kaede06152000@gmail.com"
host = 'localhost'
port = 1234
sendMessage = 'send by TcpSender'
static IplImage FaceDe(IplImage srcImg)
{
const double Scale = 1.04;
const double ScaleFactor = 1.139;
const int MinNeighbors = 2;
using (IplImage smallImg = new IplImage(new CvSize(Cv.Round(srcImg.Width / Scale), Cv.Round(srcImg.Height / Scale)), BitDepth.U8, 1))
{
// 顔検出用の画像の生成