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
@Repository | |
public class JdbcTarefaDao | |
private Connection connection; | |
@Autowired | |
@Qualifier("postgreDataSource") | |
private DataSource dataSource; | |
@PostConstruct |
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 br.com.caelum.tarefas.controller; | |
import javax.validation.Valid; | |
import org.springframework.beans.factory.annotation.Autowired; | |
import org.springframework.stereotype.Controller; | |
import org.springframework.ui.Model; | |
import org.springframework.validation.BindingResult; | |
import org.springframework.web.bind.annotation.RequestMapping; |
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 FaultBean implements Serializable { | |
private static final long serialVersionUID = 1L; | |
@XmlElement(name="faultcode") | |
private String faultCode; | |
@XmlElement(name="faultstring") | |
private String faultString; | |
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.lang.annotation.ElementType; | |
import java.lang.annotation.Retention; | |
import java.lang.annotation.RetentionPolicy; | |
import java.lang.annotation.Target; | |
@Retention(RetentionPolicy.RUNTIME) | |
@Target({ElementType.METHOD, ElementType.FIELD, ElementType.CONSTRUCTOR}) | |
public @interface Bd2 { | |
} |
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 type="text/javascript"> | |
PrimeFaces.locales['pt'] = { | |
closeText: 'Fechar', | |
prevText: 'Anterior', | |
nextText: 'Próximo', | |
currentText: 'Começo', | |
monthNames: ['Janeiro','Fevereiro','Março','Abril','Maio','Junho','Julho','Agosto','Setembro','Outubro','Novembro','Dezembro'], | |
monthNamesShort: ['Jan','Fev','Mar','Abr','Mai','Jun', 'Jul','Ago','Set','Out','Nov','Dez'], | |
dayNames: ['Domingo','Segunda','Terça','Quarta','Quinta','Sexta','Sábado'], | |
dayNamesShort: ['Dom','Seg','Ter','Qua','Qui','Sex','Sáb'], |
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
session_start(); | |
$timeout = 600; // Tempo da sessao em segundos | |
// Verifica se existe o parametro timeout | |
if(isset($_SESSION['timeout'])) { | |
// Calcula o tempo que ja se passou desde a cricao da sessao | |
$duracao = time() - (int) $_SESSION['timeout']; | |
// Verifica se ja expirou o tempo da sessao | |
if($duracao > $timeout) { |
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
# Parallel | |
time java -verbose:gc -XX:+UseParallelOldGC EstressaGC | |
# CMS: | |
time java -verbose:gc -XX:+UseConcMarkSweepGC EstressaGC | |
# G1: | |
time java -verbose:gc -XX:+UseG1GC EstressaGC |
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"> |
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
<!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; |
OlderNewer