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
.main | |
table#grid.table.table-striped | |
thead | |
tr | |
th ID | |
th Nome | |
th Opções | |
tbody | |
tr | |
td 1 |
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
<div class="main"> | |
<table id="grid" class="table table-striped"> | |
<thead> | |
<tr> | |
<th>ID</th> | |
<th>Nome</th> | |
<th>Opções</th> | |
</tr> | |
</thead> | |
<tbody> |
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
/** | |
* Jogo da memoria | |
* | |
* Os leds piscam em ordem, em um efeito 'carregando'; | |
* Para iniciar o jogo precione qualquer tecla; | |
* Um led aleatorio ira piscar; | |
* Aperte o botao correspondente a este led; | |
* O mesmo led ira piscar novamente, e depois dele mais outro; | |
* Aperte os botoes seguindo a ordem dos leds; | |
* A cada nivel um novo led aleatorio sera adicionado. |
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
// Useless box | |
// Fernando Falci <falci at falci dot me> | |
#include <Servo.h> | |
Servo servo; | |
const int PIN_SERVO = 8; | |
const int PIN_BTN = 7; | |
const int POS_FECHADO = 100; |
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
<TextView | |
android:id="@+id/label" | |
android:layout_width="wrap_content" | |
android:layout_height="wrap_content" | |
android:layout_centerHorizontal="true" | |
android:layout_centerVertical="true" /> |
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
<Button | |
android:layout_width="wrap_content" | |
android:layout_height="wrap_content" | |
android:layout_below="@id/label" | |
android:layout_centerHorizontal="true" | |
android:onClick="lerQR" | |
android:text="@string/ler" /> |
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
... | |
<string name="ler">Ler QR Code</string> | |
... |
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 class MainActivity extends Activity { | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.activity_main); | |
} | |
@Override | |
public boolean onCreateOptionsMenu(Menu menu) { |
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
/** | |
* Método que será chamado no clique do botão | |
* @param view | |
*/ | |
public void lerQR(View view){ | |
// Criamos um Intent com o caminho aplicativo que irá ler o QR code | |
Intent intent = new Intent("com.google.zxing.client.android.SCAN"); | |
// Passamos o parametro "SCAN_MODE" para ler somente códigos no formato QR | |
intent.putExtra("SCAN_MODE", "QR_CODE_MODE"); |
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 class MainActivity extends Activity { | |
protected static final String ZXING_MARKET = "market://search?q=pname:com.google.zxing.client.android"; | |
protected static final String ZXING_DIRECT = "https://zxing.googlecode.com/files/BarcodeScanner3.1.apk"; | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.activity_main); | |
} |