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
<jaxb:bindings version="1.0" xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" | |
xmlns:xs="http://www.w3.org/2001/XMLSchema" | |
xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc" | |
jaxb:extensionBindingPrefixes="xjc"> | |
<jaxb:globalBindings | |
fixedAttributeAsConstantProperty="true" | |
typesafeEnumBase="xs:string" | |
typesafeEnumMemberName="generateName" |
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.IOException; | |
import javax.websocket.OnClose; | |
import javax.websocket.OnError; | |
import javax.websocket.OnMessage; | |
import javax.websocket.OnOpen; | |
import javax.websocket.Session; | |
import javax.websocket.server.ServerEndpoint; | |
import org.slf4j.Logger; |
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
$url = 'http://download.oracle.com/otn-pub/java/jdk/7u60-b19/jdk-7u60-windows-x64.exe' | |
$filename = $url.Substring($url.LastIndexOf("/") + 1); | |
$client = new-object System.Net.WebClient; | |
$client.Headers.Add("Cookie", "oraclelicense=accept-securebackup-cookie"); | |
$client.DownloadFile( $url, $filename ); | |
$result = (Start-Process -FilePath $filename -ArgumentList "/quiet /qn /norestart /l* jdk7_install.log" -Wait -Passthru).ExitCode; | |
echo $result; | |
Get-WmiObject -Class Win32_Product -Filter "Name LIKE '%java%SE Development Kit 7%'"; | |
# IdentifyingNumber : {64A3A4F4-B792-11D6-A78A-00B0D0170600} |
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 org.apache.activemq.camel.component.ActiveMQComponent | |
import org.apache.camel.CamelContext | |
import org.apache.camel.builder.RouteBuilder | |
import org.apache.camel.impl.DefaultCamelContext | |
class CopyFromOneServerToAnother extends RouteBuilder{ | |
public static void main(String[] args) { |
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 xml.adapters.jodatime; | |
import javax.xml.bind.annotation.adapters.XmlAdapter; | |
import org.joda.time.LocalDateTime; | |
/** | |
* LocalDateTimeAdapter, useful to convert String to Joda Time's LocalDateTime and conversely, for use with JAXB 2.0. | |
* <br> | |
* Can be used when customizing XML Schema to Java Representation Binding (XJC). |
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
<%@ page language="java" contentType="text/html;charset=UTF-8" %> | |
<%@ page import="org.apache.log4j.Level" %> | |
<%@ page import="org.apache.log4j.LogManager" %> | |
<%@ page import="org.apache.log4j.Logger" %> | |
<%@ page import="java.util.HashMap" %> | |
<%@ page import="java.util.Enumeration" %> | |
<%@ page import="java.util.Set" %> | |
<%@ page import="java.util.Arrays" %> | |
<% long beginPageLoadTime = System.currentTimeMillis();%> |
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
${e:import(org.apache.commons.lang3.builder.EqualsBuilder)} | |
${h:import(org.apache.commons.lang3.builder.HashCodeBuilder)} | |
@Override | |
public boolean equals(Object object) { | |
if (object instanceof ${enclosing_type}) { | |
${enclosing_type} another = (${enclosing_type}) object; | |
return new EqualsBuilder().append(${replaceWithFieldName}, another.${replaceWithFieldName}).isEquals(); | |
} |
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
Obs: http://tinyurl.com/raml-file | |
----- | |
#%RAML 0.8 | |
baseUri: http://mocksvc.mulesoft.com/mocks/a296cd19-32ae-4c10-ba8a-ffb527bd4f24 | |
title: pagamentos | |
version: 1.0 | |
mediaType: application/json |
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
@Configuration | |
public class TestMongoConfig { | |
private static final MongodStarter starter = MongodStarter.getDefaultInstance(); | |
@SuppressWarnings("SpringJavaAutowiringInspection") | |
@Autowired | |
private MongoProperties properties; | |
@Autowired(required = false) | |
private MongoClientOptions options; |