Skip to content

Instantly share code, notes, and snippets.

apply plugin: 'com.android.application'
apply plugin: 'android-apt'
android {
compileSdkVersion versions.compileSdk
buildToolsVersion versions.buildTools
defaultConfig {
applicationId "samples.linhtruong.com.ui_reactive_rxjava_realm"
minSdkVersion versions.minSdk
public interface RetrofitService {
@POST("players")
Call<Profile> registerUser(@Body Registration registration);
}
public abstract class RetrofitCallback<T>
implements Callback<T> {
private static final String TAG = "RetrofitCallback";
Retrofit retrofit;
@pchrysa
pchrysa / SumOfDigits.kt
Created August 2, 2017 21:29
Sum digits of a given number in Kotlin
/*
In mathematics, the digit sum of a given integer is the sum of all its digits (e.g.
the digit sum of 84001 is calculated as 8+4+0+0+1 = 13).
Write a function that will get an integer and will return the digit sum for that integer.
*/
fun main(args: Array<String>) {
sumOfDigits("84001");
}