Skip to content

Instantly share code, notes, and snippets.

View ericksprengel's full-sized avatar

Erick Massa Sprengel ericksprengel

View GitHub Profile
class Conta {
String nome;
int cc
int agencia;
double saldo;
}
@ericksprengel
ericksprengel / JavaA01E01Fibonacci.java
Created September 20, 2016 19:53
Aula Java - A01E01 - Fibonacci
class JavaA01E01Fibonacci {
public static void main(String[] args) {
// Reference: https://pt.wikipedia.org/wiki/Sequ%C3%AAncia_de_Fibonacci
int f0 = 0;
int f1 = 1;
int aux;
System.out.println("0: " + f0);
System.out.println("1: " + f1);
@ericksprengel
ericksprengel / AndroidA02T02Activity.java
Created September 22, 2016 23:02
Android - Aula 02 - Tópico 02 - Activity
package br.com.ericksprengel.aula04;
import android.app.Activity;
import android.os.Bundle;
import android.util.Log;
public class AndroidA02T02Activity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
@ericksprengel
ericksprengel / AsyncTaskActivity.java
Created September 28, 2016 18:18
AndroidA03T03 - AsyncTask
package br.com.ericksprengel.androidaula03;
import android.app.Activity;
import android.os.AsyncTask;
import android.os.Bundle;
import android.view.View;
import android.widget.TextView;
public class AsyncTaskActivity extends Activity {
@ericksprengel
ericksprengel / layout_padding_vs_margin.xml
Created September 30, 2016 18:47
AndroidA02ApB - Padding vs Margin
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/activity_main"
android:orientation="vertical"
android:background="#fcc"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView
android:id="@+id/imageView"
@ericksprengel
ericksprengel / http_gist.txt
Created October 8, 2016 05:21
AndroidA03T03 - HTTP Request/Response
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* Trying 192.30.253.116...
* Connected to api.github.com (192.30.253.116) port 443 (#0)
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* TLS 1.2 connection using TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
* Server certificate: *.github.com
* Server certificate: DigiCert SHA2 High Assurance Server CA
* Server certificate: DigiCert High Assurance EV Root CA
@ericksprengel
ericksprengel / ArrayAdapterActivity.java
Last active October 8, 2016 21:12
AndroidA02T02 - ListView
package br.com.comschool.aula02b;
import android.app.ListActivity;
import android.os.Bundle;
import android.widget.ArrayAdapter;
public class ArrayAdapterActivity extends ListActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
@ericksprengel
ericksprengel / Giphy.java
Created October 20, 2016 11:21
Retrofit - Giphy API
package br.com.ericksprengel.aa.retrofit.model;
import java.util.Map;
public class Giphy {
public String id;
public String type;
public Map<String, GiphyImage> images;