I hereby claim:
- I am sambarboza on github.
- I am sambarboza (https://keybase.io/sambarboza) on keybase.
- I have a public key ASDz-MOsY-hCxB7wavEIQCtz2CD4E28dDq4ubx6HMz-7wAo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
#! /bin/sh | |
adb shell input tap 270 668 | |
sleep .3 | |
adb shell input tap 280 532 | |
sleep .2 | |
adb shell input text "$1" | |
sleep 1 | |
adb shell input tap 280 50 | |
adb shell input tap 280 50 | |
adb shell input tap 280 50 |
'use strict'; | |
/** | |
* controller test | |
*/ | |
angular.module('inOutDeliveryAdmin.test', ['ngRoute']) | |
.config(['$routeProvider', function ($routeProvider) { | |
$routeProvider.when('/test', { | |
templateUrl: 'test/test.html', | |
controller: 'TestCtrl' | |
}) |
@ParseClassName("Car") | |
class Car : ParseObject() { | |
var brand by ParseDelegate<String?>() | |
var image by ParseDelegate<ParseFile?>() | |
} |
@ParseClassName("Car") | |
class Car : ParseObject() { | |
var brand: String? | |
get() { | |
return this.getString("car") | |
} | |
set(value) { | |
this.put("car", value) | |
} |
package com.sambarboza | |
import com.parse.ParseObject | |
import kotlin.reflect.KProperty | |
public class ParseDelegate<T> { | |
@Suppress("UNCHECKED_CAST") | |
operator fun getValue(parseObj: ParseObject, propertyMetadata: KProperty<*>): T { | |
return parseObj.get(propertyMetadata.name) as T | |
} |
import com.google.gson.annotations.SerializedName; | |
public class AddressComponent { | |
@SerializedName("long_name") | |
private String longName; | |
@SerializedName("short_name") | |
private String shortName; | |
private String[] types; |
buildscript { | |
repositories { | |
mavenCentral() | |
jcenter() | |
} | |
dependencies { | |
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.4' | |
} | |
} |
//Define your sublclass of ParseObject | |
ParseClassName("Person") | |
public data class Person : ParseObject() { | |
var name: String by ParseDelegate<String>() | |
var age: Int by ParseDelegate<Int>() | |
var avatar: ParseFile by ParseDelegate<ParseFile>() | |
} | |
//Define ParseDelegate | |
public class ParseDelegate<T> { |
public class DateUtils { | |
private long secondMillis = 1000, | |
minuteMillis = 60 * secondMillis, | |
hourMillis = 60 * minuteMillis, | |
dayMillis = 24 * hourMillis; | |
public String getRelativeTime(Date from, Date to) { | |
long fromMillis = from.getTime(); | |
long toMillis = to.getTime(); |