Seasar2とJunitでテストするときに色々調べた結果
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
//closure | |
var setting = (function () { | |
return { | |
speed: 100, | |
doubleSpeed: function () { | |
return this.speed * 2; | |
} | |
} | |
}()); |
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
# 全角を2,半角を1とした、文字列の長さを導出 | |
# @param string 文字列 | |
def get_exact_size(string) | |
string.each_char.map{|c| c.bytesize == 1 ? 1 : 2}.reduce(0, &:+) | |
end | |
get_exact_size "aあ" #=>3 | |
get_exact_size "('aa漢字')" #=>10 | |
# 全角文字をカウント |
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
gulp = require 'gulp' | |
browserify = require 'browserify' | |
watchify = require 'watchify' | |
source = require 'vinyl-source-stream' | |
colors = require 'colors' | |
files = [ | |
{ |
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
{ | |
"accessKeyId": "YOUR_AWS_ACCESSKEYID", | |
"secretAccessKey": "YOUR_AWS_SECRETACCESSKEY" | |
} |