Skip to content

Instantly share code, notes, and snippets.

@rinp
rinp / AlgorithmOne
Last active November 7, 2016 12:16 — forked from naka-Eff/AlgorithmOne
simply
package naka;
import java.util.Random;
/**
* Created by rinp on 2016/11/07.
*/
public class AlgorithmOne {
private static AlgorithmOne algo = new AlgorithmOne();
Condition wolf = Condition.LEFT_FIELD;
@rinp
rinp / zero padding
Last active August 29, 2015 14:21
0埋め(JavaScript)
function (length) {
return function (str) {
var max = length - str.length;
// 利用する文字列長を考慮の上で初期値を決めておく。
var s = "0000";
while (s.length < max) {
s += "00";
}
return (s + str).slice(-length);