密碼授權問題:
1.在mysql資料夾/bin/my.ini設定密碼編碼

JBLin 發表在 痞客邦 留言(0) 人氣()

gradle:

android {
  ...
  // Butterknife requires Java 8.
  compileOptions {
    sourceCompatibility JavaVersion.VERSION_1_8
    targetCompatibility JavaVersion.VERSION_1_8
  }
}

dependencies {
  implementation 'com.jakewharton:butterknife:10.2.0'
  annotationProcessor 'com.jakewharton:butterknife-compiler:10.2.0'
}

Activity oncreate:

JBLin 發表在 痞客邦 留言(0) 人氣()

每次delay1秒重複發射RX流,直到return true;

Observable.repeatUntil(() -> {Thread.sleep(1000);return false;})

JBLin 發表在 痞客邦 留言(0) 人氣()

return timer會一直重複發射RX流,直到發射onComplete時候停止

.repeatWhen(objectObservable ->
    objectObservable.flatMap(o -> {
        if(++index > 5) {
            return Observer::onComplete;
        }else{
            return objectObservable.timer(1,TimeUnit.SECONDS);
        }
    })
)

JBLin 發表在 痞客邦 留言(0) 人氣()

git  https://github.com/JeremyLiao/LiveEventBus

JBLin 發表在 痞客邦 留言(0) 人氣()

kotlin部分可以使用 classpath "org.jetbrains.kotlin:kotlin-android-extensions:$kotlin_version"做替代(不用綁定layout即可點出view做控制)
example: view.textView.text = "Hello" (text為view ID)

JBLin 發表在 痞客邦 留言(0) 人氣()

官方文件: https://realm.io/docs/java/latest/
gradle依賴

JBLin 發表在 痞客邦 留言(0) 人氣()

manifests.xml增加權限

<uses-permission android:name="android.permission.INTERNET" />

gradle依賴

JBLin 發表在 痞客邦 留言(0) 人氣()

 

 

JBLin 發表在 痞客邦 留言(0) 人氣()

用buffer搜集,再用fromIterable+reduce去阻塞每個Rx流做處理,之後用concatMap(flatMap)發射一次

Observable.range(1, 100)
.buffer(50)
.concatMap(int-> Observable.fromIterable(int).reduce((s, s2) -> s + s2).toObservable())

JBLin 發表在 痞客邦 留言(0) 人氣()