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
Transition | |
.to(WaitingPaymentProvider()) | |
.withSideEffect(EmitCommand(PaymentProvider.CreateOutgoingSCT(...))) |
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
interface State { | |
fun onInput(input: Input, entity: Entity): Transition? | |
} |
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
import android.app.Activity; | |
import android.app.Application; | |
import android.os.Bundle; | |
import com.google.android.gms.maps.MapView; | |
import com.google.android.gms.maps.MapsInitializer; | |
import static java.lang.String.format; | |
public class MapsUtils { |
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
import rx.Observable | |
import java.io.File | |
import rx.schedulers.Schedulers | |
import java.util.concurrent.Executors | |
/** Make it true to show some logs during computation. */ | |
val DEBUG = true | |
/** Basic data structure to add information to a file reference. */ | |
data class FileInfo(val file: File, var bytes: Long = 0, var filesCount: Long = 1) |
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
import rx.Observable | |
import java.io.File | |
/** Basic data structure to add information to a file reference. */ | |
data class FileInfo(val file: File, var bytes: Long = 0, var filesCount: Long = 1) | |
/** Main function. */ | |
fun main(args: Array<String>) { | |
Observable.just(File("/Users/joan/Dropbox")) | |
.flatMap({ fileToFileInfo(it) }) |
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
import android.support.v4.view.PagerAdapter; | |
import android.support.v4.view.ViewPager; | |
import android.view.View; | |
import android.view.ViewGroup; | |
/** | |
* Implementation of PagerAdapter that uses | |
* the children of a ViewPager as pages. | |
*/ | |
public class AutoPagerAdaptor extends PagerAdapter { |
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
import android.app.Service; | |
import android.content.Intent; | |
import android.os.Binder; | |
import android.os.IBinder; | |
public abstract class LocalService<T> extends Service { | |
@Override | |
public IBinder onBind(Intent intent) { | |
return new LocalServiceBinder(); |