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
@Entity | |
@Table(name = "estudantes") | |
public class Estudante { | |
@Id | |
@GeneratedValue(strategy = GenerationType.IDENTITY) | |
private Long id; | |
private String nome; | |
//outros atributos... | |
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
@Entity | |
@Table(name = "estudantes") | |
public class Estudante { | |
@Id | |
@GeneratedValue(strategy = GenerationType.IDENTITY) | |
private Long id; | |
private String nome; | |
//outros atributos... | |
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
public interface Escritor { | |
void escrever(String linha); | |
} |
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
* Refactoring: Improving the Design of Existing Code | |
https://www.amazon.com.br/Refactoring-Improving-Design-Existing-Code/dp/0201485672 | |
* Clean Code: A Handbook of Agile Software Craftsmanship | |
https://www.amazon.com.br/Clean-Code-Handbook-Software-Craftsmanship-ebook/dp/B001GSTOAM | |
* Domain-Driven Design: Tackling Complexity in the Heart of Software | |
https://www.amazon.com.br/Domain-Driven-Design-Tackling-Complexity-Software-ebook/dp/B00794TAUG | |
* Implementing Domain-Driven Design |
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
@WebFilter("/*") | |
public class CSPFilter implements Filter { | |
private static final String POLICY = "default-src 'none';" | |
+ "base-uri 'self';" | |
+ "font-src 'self';" | |
+ "form-action 'self';" | |
+ "img-src 'self';" | |
+ "media-src 'none';" | |
+ "object-src 'none';" |
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
public class CandleStickFactoryTest { | |
@Test | |
public void deveriaCriar3CandlesParaNegociacoesEmTresDiasDistintos() { | |
Calendar hoje = Calendar.getInstance(); | |
Negociacao negociacao1 = new Negociacao(40.5, 100, hoje); | |
Negociacao negociacao2 = new Negociacao(45.0, 100, hoje); | |
Negociacao negociacao3 = new Negociacao(39.8, 100, hoje); | |
Negociacao negociacao4 = new Negociacao(42.3, 100, hoje); |
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 java.io.IOException; | |
import javax.annotation.Priority; | |
import javax.ws.rs.Priorities; | |
import javax.ws.rs.container.ContainerRequestContext; | |
import javax.ws.rs.container.ContainerRequestFilter; | |
import javax.ws.rs.core.HttpHeaders; | |
import javax.ws.rs.core.Response; | |
import javax.ws.rs.core.Response.Status; | |
import javax.ws.rs.ext.Provider; |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Mirror Fashion</title> | |
<meta charset="utf-8" /> | |
<link rel="stylesheet" href="css/reset.css" /> | |
<style> | |
.menu-opcoes li { | |
display: inline; |
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
#Comando para baixar o composer: | |
curl -sS https://getcomposer.org/installer | php | |
#Comando para adicionar o comando composer ao terminal | |
sudo mv composer.phar /usr/local/bin/composer | |
#Comando para criar novo projeto laravel via composer | |
composer create-project laravel/laravel projeto "5.4.*" --prefer-dist |
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 xmlns="http://www.w3.org/1999/xhtml" | |
xmlns:jsf="http://xmlns.jcp.org/jsf"> | |
<head jsf:id="head"> | |
<title>Cadastro de Cliente</title> | |
<script jsf:target="head" jsf:name="app.js" /> | |
<link jsf:name="estilos.css" rel="stylesheet" type="text/css" /> | |
</head> | |
<body jsf:id="body"> |
NewerOlder