Not for everyone. Each programmer has their own appreciation of what is good coding music.
(From most influential to least)
Not for everyone. Each programmer has their own appreciation of what is good coding music.
(From most influential to least)
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()) { |
Functional Programming
is 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 Programming
is a model of programming focuses on data flow and change propagation.ReactiveX
is 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.RxJava
is the open-source implementation of ReactiveX
in Java.RxJava
is a Java VM implementation of ReactiveX
(Reactive Extensions): a library for composing asynchronous and event-based programs by using observable sequences.RxAndroid
is 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.Observable
and Subscriber
.# | |
# 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 is a class that should be | |
* mapped on your json response from the server | |
*/ | |
class ServerPollingResponse { | |
boolean isJobDone; | |
@Override | |
public String toString() { | |
return "isJobDone=" + isJobDone; |
public class RestServiceMockUtils { | |
public static String convertStreamToString(InputStream is) throws Exception { | |
BufferedReader reader = new BufferedReader(new InputStreamReader(is)); | |
StringBuilder sb = new StringBuilder(); | |
String line = null; | |
while ((line = reader.readLine()) != null) { | |
sb.append(line).append("\n"); | |
} | |
reader.close(); |
# install openjdk | |
sudo apt-get install openjdk-7-jdk | |
# download android sdk | |
wget http://dl.google.com/android/android-sdk_r24.2-linux.tgz | |
tar -xvf android-sdk_r24.2-linux.tgz | |
cd android-sdk-linux/tools | |
# install all sdk packages |
private String cameraFileName; | |
@Override | |
public void choiceAvatarFromCamera() { | |
Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); | |
cameraFileName = Constants.DOWNLOAD_IMAGE_PATH + System.currentTimeMillis(); | |
File file = new File(Constants.DOWNLOAD_IMAGE_PATH); | |
if(!file.exists()){ | |
file.mkdirs(); | |
} | |
intent.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(new File(cameraFileName))); |
/* | |
* Copyright 2015 Johannes Homeier | |
* | |
* 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 |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.