Skip to content

Instantly share code, notes, and snippets.

yokota kenji yokotak0527

Block or report user

Report or block yokotak0527

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:69b5b41d6be2c1d06ace8889f0a8eef0
- Backtraking
- Knight's tour problem
- N Queens Problem
- Cryptography
- Affine Cipher
- Caesar Cipher
- Dynamic Programming
- Catalan Number
- Fibonacci Sequence
- Integer Partition
@yokotak0527
yokotak0527 / js
Created Feb 14, 2016
簡易イベント管理
View js
!function(app){
let instance = null;
let listener = {};
let callback = {};
let nonameListener = 'event';
let nonameListenerNum = 0;
class Event{
constructor(){
View php path
class Path{
private static function encode_special_text($path){
$path = str_replace(':/','{{ptcl_sep}}',$path);
return $path;
}
private static function decode_special_text($path){
$path = str_replace('{{ptcl_sep}}',':/',$path);
return $path;
}
// =========================================================================
@yokotak0527
yokotak0527 / gist:7955970
Created Dec 14, 2013
jsdokusho typescript & three.js sample
View gist:7955970
/// <reference path="../d.ts/DefinitelyTyped/jquery/jquery.d.ts" />
/// <reference path="../d.ts/DefinitelyTyped/threejs/threejs.d.ts" />
class Sample{
camera : THREE.PerspectiveCamera;
scene : THREE.Scene;
renderer : THREE.CanvasRenderer;
geometry : THREE.CubeGeometry;
material : THREE.MeshBasicMaterial;
mesh : THREE.Mesh;
@yokotak0527
yokotak0527 / gist:7020366
Last active Dec 25, 2015
ベンダープレフィックスを付ける即席のあれ。
View gist:7020366
@mixin keyframes($name){
@-webkit-keyframes #{$name}{@content;}
@-moz-keyframes #{$name}{@content;}
@-ms-keyframes #{$name}{@content;}
@keyframes #{$name}{@content;}
}
@mixin apply-vendor($type,$val...){ @each $prefix in $vendors{
#{$prefix}#{$type} : $val; }
}
@yokotak0527
yokotak0527 / gist:6274466
Last active Dec 21, 2015
射影変換 ( ホモグラフィ )
View gist:6274466
     bx + by + c
u = -------------
     gx + yh + 1

     dx + ey + f
v = -------------
     gx + hy + 1

平面射影変換

@yokotak0527
yokotak0527 / gist:6157009
Created Aug 5, 2013
TypeScript 関数の書き方メモ
View gist:6157009
// function 文の型注訳
function func0(str:string):string{
return str;
}
// ------------------------------------------------
// function 式の型注訳
var func1:(str:string) => string = function(str){
return str;
View gist:5956263
/*
var shadow_cvs,shadow_ctx,box_blur,bounds;
shadow_cvs = document.createElement('canvas');
shadow_ctx = shadow_cvs.getContext('2d');
this.body.draw(shadow_ctx,true);
this.shadow_body = new cjs.Bitmap(shadow_cvs);
this.shadow_body.set({
x:7,
y:5,
scaleX:1.1,
View gist:5953858
import js.Lib;
class Main{
static function main(){
js.Lib.alert('hoge');
}
}
@yokotak0527
yokotak0527 / gist:5924800
Created Jul 4, 2013
JSで気になる書き方
View gist:5924800
var obj = {};
(obj.Func = function(){}).prototype = {};
You can’t perform that action at this time.