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
// suspending functions | |
flow { | |
emit(doSomethingSuspending()) | |
}.mapNotNull { | |
if (it == null) { | |
throw Exception() | |
} | |
it | |
}.retryWhen { _, _ -> | |
delay(RETRY_INTERVAL) |
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
// kinds of callbacks | |
channelFlow { | |
do.something(object: SomethingListher { | |
override fun onSomething(something: Something?) { | |
send(something) | |
} | |
}) | |
}.mapNotNull { | |
if (it == null) { | |
throw Exception() |
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
{ | |
"title": "oogatta", | |
"rules": [ | |
{ | |
"description": "右コントロールを単体で押したときに、カーソル上を送信する。", | |
"manipulators": [ | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "right_control", |
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
<span style="color:#f00">test</span> |
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
// ☁️ Admin node | |
admin.database().ref().child("test").child("Admin") | |
.orderByChild("hoge") // ソートキー | |
.endAt(2) // 切り取る範囲 | |
.limitToLast(2) // 切り取る範囲 | |
.on("child_added", snapshot => { | |
console.log(`(${snapshot.val().hoge}, ${snapshot.val().fuga})`); | |
}); | |
// 🍎 iOS Swift |
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
// ☁️ Admin node | |
admin.database().ref().child("test").child("Admin") | |
.orderByChild("hoge") // ソートキー | |
.startAt(2) // 切り取る範囲 | |
.limitToFirst(2) // 切り取る範囲 | |
.on("child_added", snapshot => { | |
console.log(`(${snapshot.val().hoge}, ${snapshot.val().fuga})`); | |
}); | |
// 🍎 iOS Swift |
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
// ☁️ Admin node | |
admin.database().ref().child("test").child("Admin") | |
.orderByChild("hoge") // ソートキー | |
.startAt(2) // 切り取る範囲 | |
.endAt(4) // 切り取る範囲 | |
.on("child_added", snapshot => { | |
console.log(`(${snapshot.val().hoge}, ${snapshot.val().fuga})`); | |
}); | |
// 🍎 iOS Swift |
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
// ☁️ Admin node | |
admin.database().ref().child("test").child("Admin") | |
.orderByChild("fuga") // ソートキー | |
.equalTo(4) // 切り取る範囲 | |
.on("child_added", snapshot => { | |
console.log(`(${snapshot.val().hoge}, ${snapshot.val().fuga})`); | |
}); | |
// 🍎 iOS Swift | |
Database.database().reference().child("test").child("iOS") |
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
// ☁️ Admin node | |
admin.database().ref().child("test").child("Admin") | |
.orderByChild("fuga") // ソートキー | |
.endAt(2) // 切り取る範囲 | |
.on("child_added", snapshot => { | |
console.log(`(${snapshot.val().hoge}, ${snapshot.val().fuga})`); | |
}); | |
// 🍎 iOS Swift | |
Database.database().reference().child("test").child("iOS") |
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
// ☁️ Admin node | |
admin.database().ref().child("test").child("Admin") | |
.orderByChild("fuga") // ソートキー | |
.startAt(4) // 切り取る範囲 | |
.on("child_added", snapshot => { | |
console.log(`(${snapshot.val().hoge}, ${snapshot.val().fuga})`); | |
}); | |
// 🍎 iOS Swift |
NewerOlder