This file contains hidden or 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 datanojava; | |
import java.text.DateFormat; | |
import java.util.Calendar; | |
import java.util.GregorianCalendar; | |
public class OperacoesComData { | |
public static void main (String[] args) { | |
// Cria um formatador para a data usando DateFormat: | |
DateFormat df = DateFormat.getDateInstance(DateFormat.MEDIUM); |
This file contains hidden or 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 datanojava; | |
import java.util.Calendar; | |
import java.util.GregorianCalendar; | |
public class UsandoGregorianCalendar { | |
public static void main (String[] args) { | |
GregorianCalendar gc = new GregorianCalendar(); | |
System.out.println("Ano: " + gc.get(Calendar.YEAR)); // Ano: 2016 |
This file contains hidden or 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 datanojava; | |
import java.text.SimpleDateFormat; | |
import java.util.Date; | |
public class FormatarSimpleDateFormat { | |
public static void main (String[] args) { | |
Date data = new Date(); | |
System.out.println(data); // Mon Mar 14 12:06:56 BRT 2016 | |
This file contains hidden or 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 datanojava; | |
import java.text.DateFormat; | |
import java.util.Date; | |
public class FormatarDataFormat { | |
public static void main (String[] args) { | |
Date data = new Date(); | |
System.out.println(data); // Mon Mar 14 11:48:49 BRT 2016 | |
This file contains hidden or 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 datanojava; | |
import java.util.Date; | |
public class ClasseDate { | |
public static void main(String[] args) { | |
// Não iremos passar uma data no construtor e então irá mostrar a data atual. | |
Date dataAtual = new Date(); | |
System.out.println(dataAtual); // Mon Mar 14 11:06:40 BRT 2016 | |
This file contains hidden or 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 processing.serial.*; | |
import cc.arduino.*; | |
Arduino arduino; // Objeto da classe Arduino | |
int ledPin = 7; // O LED está conectado ao pino digital 7 do Arduino | |
void setup() { | |
// println(Arduino.list()); - Para listar todas as portas seriais e mostrar em qual delas o Arduino está conectado |
This file contains hidden or 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
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Validação com Jquery</title> | |
<!-- JQuery --> | |
<script src="jquery-1.12.0.min.js"></script> | |
<!-- JQuery Validator --> | |
<script src="jquery.validate.min.js"></script> | |
<script> | |
$(document).ready(function(){ |
This file contains hidden or 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
<script> | |
$(document).ready(function(){ | |
$('#meu_formulario').validate({ | |
rules : { | |
nome : { | |
required : true, | |
minlength : 3 | |
}, | |
email : { | |
required : true, |
This file contains hidden or 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
<h1>Meu formulário</h1> | |
<form id="meu_formulario"> | |
<p> | |
<label>Seu nome:</label> | |
<input type="text" name="nome" /> | |
</p> | |
<p> | |
<label>Seu e-mail:</label> | |
<input type="text" name="email" /> | |
</p> |
This file contains hidden or 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
<script src="jquery-1.12.0.min.js"></script> | |
<script src="jquery.validate.min.js"></script> |