I hereby claim:
- I am tsuharesu on github.
- I am tsuharesu (https://keybase.io/tsuharesu) on keybase.
- I have a public key whose fingerprint is 9162 DB1A A33A 0618 1F39 78F1 C177 7945 5C25 595B
To claim this, I am signing this object:
{ | |
"source_id": "302598399050397860", | |
"version": "1", | |
"workflow": { | |
"name": "Words from the Heart", | |
"blueprint": { | |
"version": "1", | |
"trigger": { | |
"type": "channel_action", | |
"id": "4bde8971-a75a-4310-b5ec-efceeea0a91a", |
/** Define callback that will be triggered after a photo has been taken and saved to disk */ | |
private val imageSavedListener = object : ImageCapture.OnImageSavedListener { | |
override fun onError(error: ImageCapture.UseCaseError, message: String, exc: Throwable?) { | |
exc?.printStackTrace() | |
} | |
override fun onImageSaved(photoFile: File) { | |
lifecycle.coroutineScope.launch { | |
rotateImageCorrectly() | |
} |
override fun start() { | |
program.accept(LoadLabelsMsg) | |
program.accept(LoadAccountsMsg) | |
} | |
override fun resume() { | |
} | |
override fun destroy() { | |
programDisposable.dispose() |
class AccountActivity : AccountView { | |
lateinit var presenter: AccountPresenter | |
// Using the ViewBinder is simple | |
override var accountView: AccountViewModel by ViewBinder { | |
txt_username.text = it.userName | |
txt_company.text = it.company | |
txt_contact_email.text = it.email | |
txt_contact_phone.text = it.phone |
/** | |
* View binder with nullable types support | |
*/ | |
class ViewBinder<M>(val function: (M) -> Unit) : ReadWriteProperty<Any, M> { | |
private var mValue: M? = null | |
override fun getValue(thisRef: Any, property: KProperty<*>): M { | |
return mValue as M | |
} |
Verifying that +tsuharesu is my blockchain ID. https://onename.com/tsuharesu |
I hereby claim:
To claim this, I am signing this object:
# Generate a stream | |
Stream.unfold({0, 1}, fn {a, b} -> {a, {b, a + b}} end) | |
# Take the first 15 numbers | |
|> Enum.take(15) |
# This is a exercise in Programming Elixir from Pragmatic Bookshelf | |
fizzbuzz_check = fn | |
(0, 0, _) -> "FizzBuzz" | |
(0, _, _) -> "Fizz" | |
(_, 0, _) -> "Buzz" | |
(_, _, c) -> c | |
end | |
fizzbuzz = fn(n) -> fizzbuzz_check.(rem(n, 3), rem(n, 5), n) end |