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
| package com.example | |
| import io.reactivex.Observable | |
| import io.reactivex.ObservableSource | |
| import io.reactivex.ObservableTransformer | |
| import io.reactivex.Scheduler | |
| import java.util.concurrent.TimeUnit | |
| class FlushableBufferTransformer<T>( | |
| val flusher: Observable<Unit>, |
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
| return connection!! | |
| .subscribeOn(Schedulers.io()) | |
| .flatMap { | |
| Observable.defer { | |
| val successValue = AtomicReference<ByteArray>() | |
| it.readCharacteristic("0222828d-1d28-4f2c-82e7-2e8f8740d29d") | |
| .doOnSuccess { | |
| successValue.lazySet(it) | |
| } | |
| .repeatWhen { flowable -> |
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
| Privacy Policy | |
| Sky Kelsey built the Soundcolor app as a Free app. This SERVICE is provided by Sky Kelsey at no cost and is intended for use as is. | |
| This page is used to inform website visitors regarding my policies with the collection, use, and disclosure of Personal Information if anyone decided to use my Service. | |
| If you choose to use my Service, then you agree to the collection and use of information in relation to this policy. The Personal Information that I collect is used for providing and improving the Service. I will not use or share your information with anyone except as described in this Privacy Policy. | |
| The terms used in this Privacy Policy have the same meanings as in our Terms and Conditions, which is accessible at Soundcolor unless otherwise defined in this Privacy Policy. |
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
| Skys-MacBook-Pro:java sky$ javac ShelfProbability.java | |
| Skys-MacBook-Pro:java sky$ java ShelfProbability 10000000 | |
| Finished in 2.31 seconds | |
| -------------------------------- | |
| Iterations: 10,000,000 | |
| Green Bottoms: 5,001,852 | |
| GreenTops: 3,334,291 | |
| Green Top Probability: 0.6666% |
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
| 1. Import the existing Apptentive Android SDK module into your project. | |
| 2. Add the android-Gradle facet to the apptentive-android-sdk module (in the module settings). | |
| 3. Add a build.gradle file listed below to apptentive-android-sdk/ | |
| 4. In your main module's build.gradle file, add a reference to the Apptentive Android SDK : | |
| dependencies { | |
| compile project(":apptentive-android-sdk") | |
| } | |
| 5. In your settings.gradle file, add an include for apptentive-android-sdk: | |
| include ':apptentive-android-sdk', ':your-module' |