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
data class MainViewState( | |
val error: Throwable? = null | |
val loading: Boolean = false, | |
val teamAScore: Int = 0, | |
val teamBScore: Int = 0) |
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
private void showTask(Task task) { | |
// The view may not be able to handle UI updates anymore | |
if (mAddTaskView.isActive()) { | |
mAddTaskView.setTitle(task.getTitle()); | |
mAddTaskView.setDescription(task.getDescription()); | |
} | |
mIsDataMissing = false; | |
} |
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
package com.example.android.architecture.blueprints.todoapp.addedittask; | |
import android.support.annotation.NonNull; | |
import android.support.annotation.Nullable; | |
import com.example.android.architecture.blueprints.todoapp.UseCase; | |
import com.example.android.architecture.blueprints.todoapp.UseCaseHandler; | |
import com.example.android.architecture.blueprints.todoapp.addedittask.domain.usecase.GetTask; | |
import com.example.android.architecture.blueprints.todoapp.addedittask.domain.usecase.SaveTask; | |
import com.example.android.architecture.blueprints.todoapp.tasks.domain.model.Task; |
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
package com.example.android.architecture.blueprints.todoapp.addedittask; | |
import android.app.Activity; | |
import android.os.Bundle; | |
import android.support.annotation.NonNull; | |
import android.support.annotation.Nullable; | |
import android.support.design.widget.FloatingActionButton; | |
import android.support.design.widget.Snackbar; | |
import android.support.v4.app.Fragment; | |
import android.view.LayoutInflater; |
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
Observable.fromIterable(listOf(1,2,3,4,5)) | |
.map { number -> number*5 } // 1,2,3,4,5 -> 5, 10, 15, 20, 25 | |
.map { multipliedNumber -> multipliedNumber.toString() } // 5, 10, 15, 20, 25 -> "5", "10", "15", "20", "25" | |
.filter { it.endsWith("0") } // "5", "10", "15", "20", "25" -> "10", "20" | |
.subscribe { result -> println(result) } // "10", "20" |
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
package com.freelancer.android.observablemergetest | |
import io.reactivex.Observable | |
import io.reactivex.ObservableTransformer | |
fun masterActionProcessor(): ObservableTransformer<Action, Result> = | |
ObservableTransformer { action: Observable<Action> -> | |
action.publish { shared -> | |
Observable.merge( | |
shared.ofType(Action.Action1::class.java).compose(action1Processor()), |
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
//This is where we tell gradle that we have added an extra build file | |
apply from: 'gradle/dependencies.gradle' | |
buildscript { | |
repositories { | |
jcenter() | |
} | |
dependencies { | |
classpath 'com.android.tools.build:gradle:2.3.2' | |
} |
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
apply plugin: 'com.android.library' | |
//Declaring a variable to points to the ext list we added to in the dependencies.gradle | |
def globalConf = rootProject.ext | |
android { | |
compileSdkVersion 26 | |
buildToolsVersion "26.0.2" | |
defaultConfig { |
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
ext { | |
kotlin_version = "1.2.0" | |
commonDependencies = [ | |
appCompat : 'com.android.support:appcompat-v7:26.+', | |
jUnit : 'junit:junit:4.12', | |
kotlinStdLib : "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version", | |
rxJava : 'io.reactivex.rxjava2:rxjava:2.1.6', | |
espressoCore : 'com.android.support.test.espresso:espresso-core:2.2.2', | |
] |
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
: panic: page 4 already freed | |
09-18 22:31:51.694 24945-0/com.arran.cloudburst E/Go: goroutine 15750 [running]: | |
09-18 22:31:51.694 24945-0/com.arran.cloudburst E/Go: github.com/boltdb/bolt.(*freelist).free(0x4420151470, 0x5, 0x7f7ceb4000) | |
09-18 22:31:51.694 24945-0/com.arran.cloudburst E/Go: D:/Go/projects/src/github.com/boltdb/bolt/freelist.go:121 +0x274 | |
09-18 22:31:51.694 24945-0/com.arran.cloudburst E/Go: github.com/boltdb/bolt.(*node).spill(0x44203f6380, 0x442091a738, 0x14) | |
09-18 22:31:51.694 24945-0/com.arran.cloudburst E/Go: D:/Go/projects/src/github.com/boltdb/bolt/node.go:363 +0x190 | |
09-18 22:31:51.694 24945-0/com.arran.cloudburst E/Go: github.com/boltdb/bolt.(*Bucket).spill(0x4420281100, 0x44208ce900, 0x442091ab20) | |
09-18 22:31:51.694 24945-0/com.arran.cloudburst E/Go: D:/Go/projects/src/github.com/boltdb/bolt/bucket.go:570 +0x354 | |
09-18 22:31:51.694 24945-0/com.arran.cloudburst E/Go: github.com/boltdb/bolt.(*Bucket).spill(0x442035a1d8, 0x68d7af7b9, 0x7f7e054800) | |
09-18 22:31:51.694 24945-0/com.arran.c |
NewerOlder