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
/build |
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.io.Serializable; | |
public class Pessoa implements Serializable{ | |
private int codigo; | |
private String nome; | |
public static final long serialVersionUID = 100L; | |
public int getCodigo() { | |
return codigo; | |
} |
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
ArrayList<Pessoa> pessoas = new ArrayList<Pessoa>(); | |
pessoas.add(new Pessoa(1, "Lucas")); | |
pessoas.add(new Pessoa(2, "Jose")); | |
Intent it = new Intent(this, Tela2Activity.class); | |
// Caso queira passar a lista toda use | |
it.putExtra("pessoas", pessoas); | |
// Caso queira passar apenas um objeto | |
it.putExtra("pessoa", pessoas.get(0)); | |
startActivity(it); |
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 android.os.Parcel; | |
import android.os.Parcelable; | |
public class Cliente implements Parcelable { | |
private int codigo; | |
private String nome; | |
public Cliente(int codigo, String nome) { | |
this.codigo = codigo; | |
this.nome = nome; |
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
public void chanceColorStatusBar(){ | |
if (android.os.Build.VERSION.SDK_INT >= 21) { | |
Window window = this.getWindow(); | |
window.clearFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS); | |
window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS); | |
window.setStatusBarColor(this.getResources().getColor(R.color.colorPrimaryDark)); | |
} | |
} |
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 ExampleActivity extends Activity { | |
@BindView(R.id.title) TextView title; | |
@BindView(R.id.subtitle) TextView subtitle; | |
@BindView(R.id.footer) TextView footer; | |
@Override public void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.simple_activity); | |
ButterKnife.bind(this); | |
// TODO Use fields... |
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
<?xml version="1.0" encoding="utf-8"?> | |
<layout xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:app="http://schemas.android.com/apk/res-auto" | |
xmlns:tools="http://schemas.android.com/tools"> | |
<RelativeLayout | |
android:id="@+id/activity_main" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
tools:context="com.inthecheesefactory.lab.databinding.MainActivity"> |
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
<?php | |
for ($i = 1; $i <= 100; $i++){ | |
if(divisorCinco($i) && divisorTres($i)){ | |
echo "<p>FizzBuzz</p>"; | |
}elseif (divisorCinco($i)){ | |
echo "<p>Buzz</p>"; | |
}elseif(divisorTres($i)){ | |
echo "<p>Fizz</p>"; | |
}else{ | |
echo "<p>{$i}</p>"; |
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
<? | |
/*Codigo original*/ | |
if (isset($_SESSION['loggedin']) && $_SESSION['loggedin'] == true) { | |
header("Location: http://www.google.com"); | |
exit(); | |
} elseif (isset($_COOKIE['Loggedin']) && $_COOKIE['Loggedin'] == true) { | |
header("Location: http://www.google.com"); | |
exit(); | |
} | |
?> |
OlderNewer