This file contains 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
{ | |
"version": 8, | |
"name": "Raster Tiles", | |
"sources": { | |
"yourTileLayer": { | |
"type": "raster", | |
"tiles": [ | |
"https://maps.wikimedia.org/osm-intl/{z}/{x}/{y}.png" | |
], | |
"tileSize": 256 |
This file contains 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
/* | |
MIT License | |
Copyright (c) 2016 Diego Yasuhiko Kurisaki | |
*/ | |
/* Example: | |
mEmailView.addTextChangedListener(new MaskWatcher("###-##")); | |
*/ | |
import android.text.Editable; |
This file contains 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.tismart.goldfish.presentation.main.view.activities | |
import android.content.Context | |
import android.content.Intent | |
import android.graphics.drawable.GradientDrawable | |
import android.os.Bundle | |
import android.support.v4.view.ViewPager | |
import android.support.v7.app.AppCompatActivity | |
import android.view.MenuItem | |
import android.view.View |
This file contains 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
class ColorsRepository() { | |
val restDataSource = RestDataSource() // <-- Es una dependencia | |
val sqliteDataSource = SQLiteDataSource() // <-- Es una dependencia | |
fun listColors(): List<Color> { | |
val colors = restDataSource.listColor() | |
sqliteDataSource.saveOrUpdateColors(colors) |
This file contains 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
class ColorsRepository(val restDataSource: RestDataSource, val sqliteDataSource: SQLiteDataSource) { | |
fun listColors(): List<Color> { | |
val colors = restDataSource.listColor() | |
sqliteDataSource.saveOrUpdateColors(colors) | |
return colors | |
} |
This file contains 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
interface LocalDataSource { | |
fun saveOrUpdateColors(colors: List<Color>) | |
fun listColors(): List<Color> | |
} | |
interface RemoteDataSource { | |
fun listColor(): List<Color> | |
} | |
class RestDataSource : RemoteDataSource { |
This file contains 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
/* | |
1.- Crear un programa con 3 variables enteros e identificar cual es el mayor, usar IF, ELSEIF, ELSE | |
2.- Crear una calculadora (suma, resta, multiplicación, división), usar funciones | |
que reciba 2 parámetros e imprimir el resultado | |
3.- Recorrer los siguientes valores y mostrarlo en un print List<String> animals = ['Perro', 'Gato', 'Ratón']; | |
usar forEach y función de flecha | |
4.- Combiar las siguientes listas y mostrarlo en un print | |
List<String> animales = ['Conejo', 'Gato']; | |
List<String> mascotas = ['Tortuga', 'Perro']; | |
como resultado debe mostrar: [Conejo, Gato, Tortuga, Perro] |
OlderNewer