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
import java.util.ArrayList; | |
import java.util.Arrays; | |
import java.util.List; | |
import rx.Observable; | |
import rx.Observer; | |
import rx.functions.Func2; | |
public class RxJavaExamples { |
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
//MODULE | |
@Provides | |
@PerActivity | |
public Retrofit provideRetrofit(Gson gson, OkHttpClient okHttpClient) { | |
Retrofit retrofit = new Retrofit.Builder() | |
.addConverterFactory(GsonConverterFactory.create(gson)) | |
.baseUrl(BASE_URL) | |
.client(okHttpClient) | |
//converts Retrofit response into Observable | |
.addCallAdapterFactory(RxJavaCallAdapterFactory.create()) |
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 gorick.gradesprojectandroid.MVP.Model; | |
import com.google.gson.annotations.Expose; | |
import com.google.gson.annotations.SerializedName; | |
import java.text.DecimalFormat; | |
import lombok.Data; | |
import lombok.NoArgsConstructor; |
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 votos; | |
import java.util.Scanner; | |
public class Votos { | |
Scanner e; | |
public static void main(String[] args) { | |
int idade; |
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
//SHALL WE BEGIN? | |
//FILE 1 - THE MODULE | |
@Module //MODULE IS WHAT YOU WANT TO INSTANTIATE. | |
public class UserLoginModule { | |
@Provides //@PROVIDES RELEASE THE OBJECT TO INJECTION. | |
@PerActivity //@PERACTIVITY IS THE SCOPE, LIKE BOUNDS WHERE YOU CAN USE THAT. | |
public UserModel getUser(){ |
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
//FILLE 1- MAVEN | |
<dependencies> | |
<dependency> | |
<groupId>org.springframework</groupId> | |
<artifactId>spring-context</artifactId> | |
<version>4.3.8.RELEASE</version> | |
</dependency> | |
<dependency> | |
<groupId>org.springframework</groupId> |
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
import React, { Component } from 'react' | |
const List = props => { | |
let list = props.list; | |
const itensList = props.list.map((list) => { | |
return <li key={list.id}> | |
<span>{list.id} - {list.item}</span><br /> | |
<button onClick={() => this.handleReplace(list.id)}>Replace</button> | |
<button onClick={() => this.handleDelete(list.id)}>Delete</button> | |
</li>; |
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
Show hidden characters
{ | |
"presets": [ | |
"react", | |
"es2015" | |
], | |
"plugins": [ | |
"react-hot-loader/babel" | |
] | |
} |
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
//call |
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
{ | |
"presets": ["es2015", "react"], | |
"plugins": [ | |
["transform-class-properties", { "spec": true }] | |
] | |
} |
OlderNewer