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
* { | |
margin: 0; | |
padding: 0; | |
} | |
html { | |
font-family: Arial, Helvetica, sans-serif; | |
} | |
.container { |
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> | |
<meta charset="UTF-8"> | |
<title>Layout Fixo</title> | |
<link href="style.css" rel="stylesheet" /> | |
</head> | |
<body> | |
<div class="container"> |
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
class Palestrante { | |
private String name; | |
private int postsNoGuj; | |
public String getName() { | |
return name; | |
} | |
public int getPostsNoGuj() { |
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
http://code.google.com/apis/ajax/playground/?type=visualization#geo_chart | |
function drawVisualization() { | |
console.log('asdad'); | |
var data = new google.visualization.DataTable(); | |
data.addColumn('string', 'City'); | |
data.addRows([ | |
['Foz do Iguacu'], |
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"> | |
console.log("ola mundo"); | |
function par(a, b) { | |
return function(f) { | |
return f(a, 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
Query query = session.createQuery("select sum(p.valor) " + | |
"from ParcelaDeAula as p where " + | |
"p.contrato.dataDeCriacao <= :data " + | |
"and " + | |
"(p.dataDePagamento >= :data " + | |
"or (p.situacao = :situacao and (p.dataDePagamento = null and p.dataOriginalDeVencimento >= :data)) " + | |
")"); | |
query.setParameter("data", data); | |
query.setParameter("situacao", SituacaoDeParcela.PAGO); |
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
#lang racket | |
(define (pontos x) | |
(define (soma-lista x) (apply + x)) | |
(define (strike? x) (= (length x) 1)) | |
(define (spare? x) (= (soma-lista x) 10)) | |
(define (pontos2 jogada-anterior jogadas) | |
; devolve a proxima jogada, que pode ter um ou dois lances | |
(define (proxima-jogada) | |
(if (= (first jogadas) 10) |
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
class LRUCache extends LinkedHashMap<String, String> { | |
private int tamanho; | |
public LRUCache(int tamanho) { | |
super(3, 0.75f, true); | |
this.tamanho = tamanho; | |
} | |
protected boolean removeEldestEntry( | |
java.util.Map.Entry<String, String> eldest) { |
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
@WebServlet(urlPatterns = { "/chat/*" }, asyncSupported=true, loadOnStartup = 1) | |
public class ChatServlet extends HttpServlet { | |
private Queue<AsyncContext> clients = new ConcurrentLinkedQueue<AsyncContext>(); | |
private BlockingQueue<String> messages = new LinkedBlockingQueue<String>(); | |
private int contador; | |
static { | |
System.out.println("tomcat carregou?"); | |
} |
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
apply plugin: 'java' | |
apply plugin: 'eclipse' | |
// apply plugin 'war' | |
version = '0.1-SNAPSHOT' | |
compileJava { | |
options.encoding='UTF-8' | |
} |