- Scala syntax
- How well do you know Option/Try/Either/Future types from Scala standard library?
- I don't use them
- I use them, but I don't see clear benefits
- I use them and understand the benefits, but I struggle with them
- I fully understand why we use them and have no problems with them
- How do you get and combine values from those types mentioned above?
- I don't
- I use map/flatMap most of the time
- How well do you know Option/Try/Either/Future types from Scala standard library?
- I try using for-comprehension most of the time
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
Apache License | |
Version 2.0, January 2004 | |
http://www.apache.org/licenses/ | |
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION | |
1. Definitions. | |
"License" shall mean the terms and conditions for use, reproduction, | |
and distribution as defined by Sections 1 through 9 of this document. |
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 from: './flavors.gradle' | |
... | |
android { | |
buildTypes { | |
productFlavors { | |
project.flavors.each { flavor, config -> | |
"$flavor" { | |
dimension 'scope' | |
if (flavor != 'full') { |
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.annotation.SuppressLint | |
import android.os.Parcelable | |
import kotlinx.android.parcel.Parcelize | |
@SuppressLint("ParcelCreator") // IntelliJ Issue https://youtrack.jetbrains.com/issue/KT-19300 | |
@Parcelize | |
data class Movie(val title: String) : Parcelable |
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.txusballesteros.instrumentacion.assertion | |
import android.support.test.espresso.EspressoException | |
import android.support.test.espresso.ViewAssertion | |
import android.support.test.espresso.matcher.ViewMatchers.assertThat | |
import android.support.v7.widget.RecyclerView | |
import android.view.View | |
import android.view.View.FIND_VIEWS_WITH_TEXT | |
import android.widget.TextView | |
import org.hamcrest.Matchers.greaterThan |
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
/* | |
* Copyright (C) 2017 The Android Open Source Project | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
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
adb help // List all comands | |
== Adb Server | |
adb kill-server | |
adb start-server | |
== Adb Reboot | |
adb reboot | |
adb reboot recovery | |
adb reboot-bootloader |
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
/* | |
* Here we want to get the appbar offset changes paired with the direction it's moving and | |
* using RxBinding's great `offsetChanges` API to make an rx Observable of this. The first | |
* part buffers two while skipping one at a time and emits y delta pairs (cur and prev). Second | |
* part is just a simple map to pair the offset with the resolved scroll direction comparing | |
* to the previous offset. This gives us a nice stream of (offset, direction) emissions. | |
* | |
* Note that the filter() is important if you manipulate child views of the ABL. If any child | |
* view requests layout again, it will trigger an emission from the offset listener with the | |
* same value as before, potentially causing measure/layout/draw thrashing if your logic |
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 kotterknife | |
import android.app.Activity | |
import android.app.Dialog | |
import android.app.DialogFragment | |
import android.app.Fragment | |
import android.arch.lifecycle.Lifecycle | |
import android.arch.lifecycle.LifecycleObserver | |
import android.arch.lifecycle.LifecycleOwner | |
import android.arch.lifecycle.OnLifecycleEvent |