コピー to クリップボードについて
Chrome 43、Fx 41、IE10、iOS 10 以上で対応している
iOSはちょっと特殊なので以下のような処理は必要
<input>,<textarea>からのみコピー可能- それ以外は
contenteditable属性を付ける必要がある readonlyであってはいけない
| { | |
| "accessKeyId": "YOUR_AWS_ACCESSKEYID", | |
| "secretAccessKey": "YOUR_AWS_SECRETACCESSKEY" | |
| } |
| gulp = require 'gulp' | |
| browserify = require 'browserify' | |
| watchify = require 'watchify' | |
| source = require 'vinyl-source-stream' | |
| colors = require 'colors' | |
| files = [ | |
| { |
Seasar2とJunitでテストするときに色々調べた結果
| # 全角を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 | |
| # 全角文字をカウント |
| //closure | |
| var setting = (function () { | |
| return { | |
| speed: 100, | |
| doubleSpeed: function () { | |
| return this.speed * 2; | |
| } | |
| } | |
| }()); |