Functional Programmingis a model of programming that transform and compose stream of immutable sequences by applying map, filter and reduce. Events are immutable because you can't change history.Reactive Programmingis a model of programming focuses on data flow and change propagation.ReactiveXis an API that focuses on asynchronous composition and manipulation of observable streams of data or events by using a combination of the Observer pattern, Iterator pattern, and features of Functional Programming.RxJavais the open-source implementation ofReactiveXin Java.RxJavais a Java VM implementation ofReactiveX(Reactive Extensions): a library for composing asynchronous and event-based programs by using observable sequences.RxAndroidis a lightweight extension to RxJava that providers a Scheduler for Android’s Main Thread, as well as the ability to create a Scheduler that runs on any given Android Handler class.- The two main classes are
ObservableandSubscriber. - `O
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
| # | |
| # Circle CI & gradle.properties live in harmony | |
| # | |
| # Android convention is to store your API keys in a local, non-versioned | |
| # gradle.properties file. Circle CI doesn't allow users to upload pre-populated | |
| # gradle.properties files to store this secret information, but instaed allows | |
| # users to store such information as environment variables. | |
| # | |
| # This script creates a local gradle.properties file on current the Circle CI | |
| # instance. It then reads environment variable TEST_API_KEY_ENV_VAR which a user |
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
| public class PermissionUtil { | |
| /* | |
| * Check if version is marshmallow and above. | |
| * Used in deciding to ask runtime permission | |
| * */ | |
| public static boolean shouldAskPermission() { | |
| return (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M); | |
| } | |
| private static boolean shouldAskPermission(Context context, String permission){ | |
| if (shouldAskPermission()) { |
Not for everyone. Each programmer has their own appreciation of what is good coding music.
(From most influential to least)
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.androidrecipes.downloader; | |
| import android.app.Activity; | |
| import android.app.DownloadManager; | |
| import android.content.BroadcastReceiver; | |
| import android.content.Context; | |
| import android.content.Intent; | |
| import android.content.IntentFilter; | |
| import android.content.SharedPreferences; | |
| import android.database.Cursor; |
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
| import android.annotation.SuppressLint | |
| import android.content.Context | |
| import android.content.SharedPreferences | |
| import com.hardiktrivedi.gdg_pune_kotlin_workshop.R | |
| import kotlin.reflect.KProperty | |
| class PreferenceExtension<T>(val context: Context, val key: String, val defaultValue: T) { | |
| val prefs: SharedPreferences by lazy { context.getSharedPreferences(context.getString(R.string.app_name), Context.MODE_PRIVATE) } | |
| operator fun getValue(thisRef: Any?, property: KProperty<*>): T { |
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
| public class VerticalTimelineDecoration extends RecyclerView.ItemDecoration { | |
| Paint paintFill = null; | |
| Paint paintStrokeFill = null; | |
| Paint paintStroke = null; | |
| Paint paintDotLine = null; | |
| Paint paintText=null; | |
| Paint paintTextBold=null; |
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
| #!/bin/bash | |
| #hi | |
| SAVEIFS=$IFS | |
| IFS=$(echo -en "\n\b") | |
| for rootFolder in */ ; do | |
| if [ -d $rootFolder"build" ]; then | |
| echo "do you want to delete build folders of \"${rootFolder%?}\" project?" | |
| read ans | |
| if [ "$ans" = "y" ] || [ "$ans" = "Y" ]; then |
http://www.oreilly.com/programming/free/files/microservices-for-java-developers.pdf
http://www.oreilly.com/programming/free/files/microservices-for-java-developers.epub
http://www.oreilly.com/programming/free/files/microservices-for-java-developers.mobi
http://www.oreilly.com/programming/free/files/modern-java-ee-design-patterns.pdf
http://www.oreilly.com/programming/free/files/modern-java-ee-design-patterns.epub
http://www.oreilly.com/programming/free/files/modern-java-ee-design-patterns.mobi