Skip to content

Instantly share code, notes, and snippets.

View sasurai-usagi3's full-sized avatar

うさやま sasurai-usagi3

  • Shizuoka, Japan
View GitHub Profile
@omuomugin
omuomugin / else-if-elif.py
Last active October 25, 2017 05:18
python why elif not else if
if condition:
# do something
else condition1:
if condition2:
# else-if 1
else condition3:
if condition4:
# else-if 2
if condition:
//
// var date = new Date();
//
// var year = date.getFullYear();
// var month = date.getMonth() + 1;
// var day = date.getDate();
// var dayOfWeek = date.getDay(); // Sunday -> 0
//
// 休日の判定
@kawanet
kawanet / string_to_buffer.js
Last active May 16, 2024 10:35
String と ArrayBuffer の相互変換 JavaScript
// 文字列から ArrayBuffer への変換
function string_to_buffer(src) {
return (new Uint16Array([].map.call(src, function(c) {
return c.charCodeAt(0)
}))).buffer;
}
// ArrayBuffer から文字列への変換