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
if condition: | |
# do something | |
else condition1: | |
if condition2: | |
# else-if 1 | |
else condition3: | |
if condition4: | |
# else-if 2 | |
if condition: |
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 date = new Date(); | |
// | |
// var year = date.getFullYear(); | |
// var month = date.getMonth() + 1; | |
// var day = date.getDate(); | |
// var dayOfWeek = date.getDay(); // Sunday -> 0 | |
// | |
// 休日の判定 |
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
// 文字列から ArrayBuffer への変換 | |
function string_to_buffer(src) { | |
return (new Uint16Array([].map.call(src, function(c) { | |
return c.charCodeAt(0) | |
}))).buffer; | |
} | |
// ArrayBuffer から文字列への変換 |