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
func split(buf []byte, lim int) [][]byte { | |
var chunk []byte | |
chunks := make([][]byte, 0, len(buf)/lim+1) | |
for len(buf) >= lim { | |
chunk, buf = buf[:lim], buf[lim:] | |
chunks = append(chunks, chunk) | |
} | |
if len(buf) > 0 { | |
chunks = append(chunks, buf[:len(buf)]) | |
} |
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
var keyCodeCheck = (function () { | |
var konamiCommandKeyCodes = [38, 38, 40, 40, 37, 39, 37, 39, 66, 65]; | |
var acceptIndex = 0; | |
var timerId = null; | |
var resetAcceptIndex = function () { | |
console.log('最初からやりなおしです'); | |
acceptIndex = 0; | |
}; |