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
@Entity | |
public class Place implements Parcelable { | |
private long id; | |
private String title; | |
private double lat; | |
private double lng; | |
private String address; | |
private String uri; | |
private String description; |
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
buildscript { | |
repositories { | |
mavenCentral() | |
} | |
dependencies { | |
classpath 'com.android.tools.build:gradle:0.6.+' | |
} | |
} | |
apply plugin: 'android-library' |
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
// Top-level build.gradle | |
buildscript { | |
repositories { | |
mavenCentral() | |
} | |
dependencies { | |
classpath 'com.android.tools.build:gradle:0.11.+' | |
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.3' | |
} |
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
################################### | |
## CartoDB 2.0 Install [Working] ## | |
## Tested on Ubuntu 12.04 ## | |
################################### | |
# Change password | |
passwd | |
adduser [username] | |
adduser [username] sudo |
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
Verifying that +ghalex is my blockchain ID. https://onename.com/ghalex |
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 il.co.kotlintlv.intro | |
var switch : Boolean = true | |
class Address(val street: String) | |
class Person { | |
val age: Int | |
val address: Address? | |
get() { |
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.talkingkotlin.util | |
import android.annotation.SuppressLint | |
import android.content.Context | |
import android.content.SharedPreferences | |
import kotlin.properties.ReadWriteProperty | |
import kotlin.reflect.KProperty | |
/** | |
* Shared Preferences as Property Delegates (from the Kotlin for Android Developers book) |
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
async(UI) { | |
// before using https://github.com/JakeWharton/retrofit2-kotlin-coroutines-adapter | |
val call: Call<ApiResponse<List<VideoExtra>>> = service.getVideoExtras(userId) | |
val response: Response<ApiResponse<List<VideoExtra>>> = bg { call.execute() }.await() | |
// When using it, our code looks much better | |
val deferred: Deferred<Response<ApiResponse<List<VideoExtra>>>> = service.getVideoExtras(userId) | |
val response: Response<ApiResponse<List<VideoExtra>>> = deferred.await() | |
// using the response's data to set the value of LiveData(), etc... | |
} |
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
expect abstract class ViewModel() { | |
open fun onCleared() | |
} |
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 il.co.galex.alexpizzapp.utils | |
import android.app.Activity | |
import android.content.Context | |
import android.content.ContextWrapper | |
import androidx.activity.result.ActivityResultLauncher | |
import androidx.activity.result.ActivityResultRegistry | |
import androidx.activity.result.contract.ActivityResultContract | |
import androidx.compose.* | |
import androidx.ui.core.ContextAmbient |