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 RPi.GPIO as GPIO | |
import time | |
PIN = 7 | |
# 1 | |
GPIO.setmode(GPIO.BOARD) | |
# 2 | |
GPIO.setwarnings(False) | |
# 3 |
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 RPi.GPIO as GPIO | |
import time | |
#1 | |
PINS = [7,15,16] | |
PIN_BTN = 19 | |
COUNTER = 0 | |
MAX_COUNT = 7 | |
GPIO.setmode(GPIO.BOARD) | |
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 RPi.GPIO as GPIO | |
import time | |
#1 | |
PINS = [7,15,16] | |
COUNTER = 0 | |
GPIO.setwarnings(False) | |
GPIO.setmode(GPIO.BOARD) | |
def Setup(): | |
for p in PINS: |
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.time.LocalDate; | |
import java.time.Month; | |
public class LocalDateTeste { | |
public static void main(String[] args) { | |
LocalDate agora = LocalDate.now(); | |
System.out.println(agora); | |
//Exibe a data atual no formato YYYY-MM-DD | |
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.time.LocalDate; | |
public class LocalDateMetodos1 { | |
public static void main(String[] args) { | |
LocalDate hoje = LocalDate.now(); | |
LocalDate daquiACincoDias = hoje.plusDays(5); | |
LocalDate daquiADuasSemanas = hoje.plusWeeks(2); | |
LocalDate daquiASeisMeses = hoje.plusWeeks(6); |
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.time.DayOfWeek; | |
import java.time.LocalDate; | |
import java.time.temporal.TemporalAdjusters; | |
public class TemporalAdjustersTeste { | |
public static void main(String[] args) { | |
LocalDate primeiroSetembro = LocalDate.of(2015, 9, 1); | |
//Primeira 2ª de Setembro |
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.time.LocalDate; | |
import java.time.Month; | |
import java.time.Period; | |
import java.time.temporal.ChronoUnit; | |
public class PeriodTest { | |
public static void main(String[] args) { | |
LocalDate hoje = LocalDate.now(); | |
LocalDate rio16 = LocalDate.of(2016, Month.AUGUST, 5); |
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
var a = 10; | |
//Global Scope | |
function function1() { | |
var a = 20; // function1 Scope | |
console.log(a); //imprime 20 | |
function function2() { | |
var a = 30; //function2 scope | |
console.log(a); //imprime 30 | |
} |
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
function loop() { | |
for(var i = 0; i < 5; i++) { | |
console.log(i); | |
} | |
console.log(i); // imprime 5 | |
} | |
// i só é visível no escopo de loop() |
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
<!-- dependências comuns aqui --> | |
.... | |
<profile> | |
<id>prod</id> | |
<dependencies> | |
<dependency> | |
<groupId>org.postgresql</groupId> | |
<artifactId>postgresql</artifactId> | |
</dependency> |