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.io.File; | |
import java.io.FileWriter; | |
import org.jdom2.Document; | |
import org.jdom2.input.SAXBuilder; | |
import org.jdom2.output.Format; | |
import org.jdom2.output.XMLOutputter; | |
public class XmlFormatter |
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
<html> | |
<head> | |
<title>Fluid Canvas HTML Example </title> | |
</head> | |
<body> | |
<div id="allContent" class="span12"> | |
<form class="form-horizontal"> |
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
#gem install rb-libsvm | |
require 'libsvm' | |
class Predictor | |
def initialize | |
parameter = Libsvm::SvmParameter.new | |
parameter.cache_size = 3 # in megabytes |
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
<fix major="4" minor="1"> | |
<header> | |
<field name="BeginString" required="Y"/> | |
<field name="BodyLength" required="Y"/> | |
<field name="MsgType" required="Y"/> | |
<field name="SenderCompID" required="Y"/> | |
<field name="TargetCompID" required="Y"/> | |
<field name="OnBehalfOfCompID" required="N"/> | |
<field name="DeliverToCompID" required="N"/> | |
<field name="SecureDataLen" required="N"/> |
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
package br.com.fredericci.validation; | |
import java.util.ArrayList; | |
import java.util.Collection; | |
import java.util.Collections; | |
import java.util.List; | |
import org.slf4j.Logger; | |
import org.slf4j.LoggerFactory; |
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
No controller: | |
@Get("/cobrancas/{cobranca.id}/boleto") | |
public Download gerarBoleto(@Load Cobranca cobranca) { | |
Boleto boleto = cobranca.gerarBoleto(); | |
BoletoDownload download = new BoletoDownload(boleto); | |
return download; | |
} | |
Classe para auxiliar o download: |
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
require 'rubygems' | |
require 'serialport' | |
begin | |
parameters = {"baud" => 19200, "data_bits" => 8, "stop_bits"=>1,"parity"=>SerialPort::NONE} | |
comm_port = '/dev/tty.usbmodem411' | |
sp = SerialPort.new(comm_port, parameters) |
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
USE mysql; | |
UPDATE user SET password=PASSWORD("root") WHERE user = 'root'; | |
FLUSH PRIVILEGES; |
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
@Aspect | |
public class PedidoAspect { | |
public interface Customer { | |
String getNome(); | |
}; | |
@DeclareParents("br.com.test.Cliente") | |
public static Customer customer; |
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
<web-app xmlns="http://java.sun.com/xml/ns/javaee" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" | |
version="3.0"> | |
<servlet> | |
<display-name>Servlet1</display-name> | |
<servlet-name>Servlet1</servlet-name> | |
<servlet-class>test.Servlet1</servlet-class> | |
<init-param> |
OlderNewer