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
from pygments.lexers.compiled import JavaLexer | |
from pygments.lexers.web import XmlLexer | |
from pygments.lexers.agile import RubyLexer | |
class TubainaAFCLexer(RegexLexer): | |
""" | |
A lexer that highlights Tubaina AFC syntax. | |
""" | |
name = 'AFC' |
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.util.Calendar | |
class Data (val data: Calendar) { | |
import Data.Conjuncao | |
private var ultimo = 0; | |
def mais(num: Int) = { ultimo = num; this } | |
def menos(num: Int) = { ultimo = -num; this} | |
def meses = { data.add(Calendar.MONTH, ultimo); this } |
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.util.Calendar; | |
public final class Periodo { | |
private final Calendar inicio; | |
private final Calendar fim; | |
public Periodo(Calendar inicio, Calendar fim) { | |
this((Calendar) inicio.clone(), (Calendar) fim.clone(), false); | |
} |
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
class Pato | |
def quack | |
puts 'quack' | |
end | |
end | |
class PatoEstranho | |
def quack | |
puts 'quaaaack' | |
end |
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
javascript:(function() {window.frames[3][0].document.getElementById('frameplugin').style.display='none'})() |
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
public List<Movimentacao> listaTodasMovimentacoes(Conta conta) { | |
CriteriaBuilder cb = em.getCriteriaBuilder(); | |
CriteriaQuery<Movimentacao> criteria = cb.createQuery(Movimentacao.class); | |
Root<Movimentacao> movimentacao = criteria.from(Movimentacao.class); | |
criteria.where(cb.equal(movimentacao.get(Movimentacao_.conta), conta)) | |
.orderBy(cb.desc(movimentacao.get(Movimentacao_.valor))); | |
return em.createQuery(criteria).getResultList(); | |
} |
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
<filter> | |
<filter-name>struts2</filter-name> | |
<filter-class> | |
org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter | |
</filter-class> | |
</filter> | |
<filter-mapping> | |
<filter-name>struts2</filter-name> | |
<url-pattern>/*</url-pattern> | |
</filter-mapping> |
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
#!/bin/bash | |
i=$1 | |
while true; do | |
echo | |
echo | |
echo Tentando $i | |
pdftk Fatura_10_SERGIO_1288_Visa_0001969284.pdf input_pw $i output saida.txt | |
if [ "$?" = "0" ]; then | |
echo SENHA = $i |
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 conta = new Conta(900) | |
var cliente = new Cliente() | |
// DSL bacana | |
cliente debita 500 da conta | |
println(conta saldo) | |
// classes | |
class Cliente { | |
def debita(valor: Int) = new Debito(valor, this) |
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
#!/usr/bin/env python | |
# A simple python script to grab all your photos from flickr, | |
# dump into a directory - organised into folders by set - | |
# along with any favourites you have saved. | |
# | |
# Based on FlickrTouchr 1.2 plus: | |
# - Video download support | |
# - Photo title on filename | |
# |
OlderNewer