Skip to content

Instantly share code, notes, and snippets.

View VictorAlbertos's full-sized avatar

Víctor Albertos VictorAlbertos

View GitHub Profile
import Foundation
import ObjectMapper
class News : Mappable {
var id: Int!
var username : String!
var date: String!
var share_url: String!
var image: String!
var title: String!
System.out.println("Hello world!");
NSLog(@"Hello world!");
Console.WriteLine("Hello world!");
print("Hello world!")
//I get tired of this nonsense
private static class Emitter {
private final String className, methodName, lineNumber;
public Emitter() {
this.className = getNameCurrentClassExecution();
this.methodName = getNameCurrentMethodExecution();
this.lineNumber = getLineNumberExecution();
}
public String getClassName() {
public function send($userId, $message, $email) {
$data = array(
'where' => array('userId' => $userId, 'email' => $email),
'data' => array(
"alert" => $message,
"sound" => "default",
"badge" => "Increment"
)
);
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
mavenCentral()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.3.0'
apply plugin: 'java'
apply plugin: 'me.tatarka.retrolambda'
buildscript {
repositories {
mavenCentral()
jcenter()
maven {
url "https://plugins.gradle.org/m2/"
}
{"idShop":1,"serverVersionCode":"1","hour":"00:00 - 00:30","orderNow":false,"action":"get_data","token":"sushigo2015!","lang":"en","day":"2015-12-05","customer":{"addresses":[{"address":"addres buena","addressName":"addresbue","associatedEstablishment":{"address":"Calle Joan Crespí, 53","availableDays":[{"availableHours":["00:00 - 00:30","00:30 - 01:00","01:00 - 01:30","01:30 - 02:00"],"day":"Saturday - 05","rawDay":"2015-12-05"},{"availableHours":["00:30 - 02:02","01:00 - 01:30","01:05 - 05:30","01:30 - 02:00","07:00 - 07:05","07:05 - 07:10","07:10 - 07:15","07:15 - 07:20","07:20 - 07:25","07:25 - 07:30","07:30 - 07:35","07:35 - 07:40","07:40 - 07:45","07:45 - 07:50","07:50 - 07:55","07:55 - 08:00","08:00 - 08:05","08:05 - 08:10","08:10 - 08:15","08:15 - 08:20","08:20 - 08:25","08:25 - 08:30","08:30 - 08:35","08:35 - 08:40","08:40 - 08:45","08:45 - 08:50","08:50 - 08:55","08:55 - 09:00"],"day":"Monday - 07","rawDay":"2015-12-07"},{"availableHours":["00:00 - 01:00","01:00 - 02:00"],"day":"Wednesday - 09","raw
//read from loader
api
.compose(rxCache.<User>.read("mock").toObservable())
.subscribe();
//read without loader
RxCache.<User>.read("mock")
.toObservable()
.subscribe();
data class SampleEntity(val id: Int, val name: String)
sealed class SampleViewEvents {
data class Edit(val sampleEntity: SampleEntity) : SampleViewEvents()
data class Remove(val sampleEntity: SampleEntity) : SampleViewEvents()
object InsertItemHeader : SampleViewEvents()
object InsertItemFooter : SampleViewEvents()
}