This file contains hidden or 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
@CheckReturnValue | |
@SchedulerSupport("none") | |
public final Disposable subscribe(Consumer<? super T> onNext) { | |
return this.subscribe(onNext, Functions.ON_ERROR_MISSING, Functions.EMPTY_ACTION, Functions.emptyConsumer()); | |
} |
This file contains hidden or 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
RxView.clicks(cancel_button).subscribe { println("clicked!") } |
This file contains hidden or 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
cancelButton.rx.tap.subscribe(onNext: { print("yes!") }) |
This file contains hidden or 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
FirebaseStorage.getInstance().reference | |
.child("header-photos") | |
.putFile(uri) | |
.addOnCompleteListener(object: OnCompleteListener<UploadTask.TaskSnapshot> { | |
override fun onComplete(p0: Task<UploadTask.TaskSnapshot>) { | |
TODO("not implemented") | |
} | |
}) |
This file contains hidden or 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
FirebaseStorage.getInstance().reference | |
.child("header-photos") | |
.putFile(uri) | |
.addOnCompleteListener { | |
TODO("not implemented") | |
} |
This file contains hidden or 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
FirebaseDatabase.getInstance().reference | |
.child("photos") | |
.child(photoId) | |
.addListenerForSingleValueEvent(object : ValueEventListener { | |
override fun onCancelled(p0: DatabaseError?) { | |
TODO("not implemented") | |
} | |
override fun onDataChange(p0: DataSnapshot?) { | |
TODO("not implemented") |
This file contains hidden or 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
const crypto = require('crypto'); | |
const hash = crypto.createHash('sha1'); | |
hash.update('#ハッシュタグです'); | |
console.log(hash.digest('hex')); |
This file contains hidden or 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
const hi = `yes`; | |
const test = `test ${hi} test`; | |
console.log(test); |
This file contains hidden or 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
// https://dzone.com/articles/rxjava-flatmap-vs-concatmap-vs-concatmapeager | |
package com.example.oogatta.concatmap | |
import android.os.Bundle | |
import android.support.v7.app.AppCompatActivity | |
import io.reactivex.BackpressureStrategy | |
import io.reactivex.Flowable | |
import io.reactivex.schedulers.Schedulers | |
This file contains hidden or 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
// 適当コードです。全体は記事の一番下にあります。 | |
exports.createPost = functions.database.ref("/commands/create_post/{postId}/").onWrite(event => { | |
const data = event.data.val(); | |
const postId = event.params.postId; | |
const userId = data.userId; | |
console.log(`postId: ${postId}`); | |
console.log(`userId: ${userId}`); | |
// 投稿ユーザーの現在地を取るぞ! |