Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am vscarpenter on github.
  • I am vinnycarpenter (https://keybase.io/vinnycarpenter) on keybase.
  • I have a public key whose fingerprint is 57AC BD7C 42BD 63C7 547E 1F14 02EA 7586 3C0B 9274

To claim this, I am signing this object:

# Built application files
/*/build/
# Crashlytics configuations
com_crashlytics_export_strings.xml
# Local configuration file (sdk path, etc)
local.properties
# Gradle generated files
@vscarpenter
vscarpenter / springmvc-weblogic10
Created July 11, 2012 21:08
Request and Response Headers
Request Headers:
GET http://stgwap03:7400/ArtisanServices/roleMaint/role/roleTypes?_dc=1342040695632&page=1&start=0&limit=25 HTTP/1.1
Host: stgwap03:7400
Connection: keep-alive
X-Requested-With: XMLHttpRequest
User-Agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/536.11 (KHTML, like Gecko) Chrome/20.0.1132.47 Safari/536.11
Accept: */*
Referer: http://stgwap03:7400/ArtisanServices/roleMaint?categoryTypeId=1
import org.apache.pdfbox.util.PDFMergerUtility;
import java.io.File;
public class PDFCombineTest {
public static void main(String[] args) {
PDFMergerUtility mergerUtility = new PDFMergerUtility();
mergerUtility.addSource(new File("C:\\projects\\PDFCombine\\docs\\Getting Started with Vaadin.pdf"));
mergerUtility.addSource(new File("C:\\projects\\PDFCombine\\docs\\Getting Started With Hadoop_0.pdf"));
@vscarpenter
vscarpenter / dash-gwt
Created October 2, 2011 20:15
Future of JavaScript - Internal doc from Google
---------- Forwarded message ----------
From: Mark S. Miller <erig...@google.com>
Date: Tue, Nov 16, 2010 at 3:44 PM
Subject: "Future of Javascript" doc from our internal "JavaScript Summit"
last week
To: java...@google.com
On November 10th and 11th, a number of Google teams representing a variety
of viewpoints on client-side languages met to agree on a common vision for
the future of Javascript.
MBeanHome home = null;
try {
Environment env = new Environment();
env.setProviderUrl("t3://adminserver:port");
env.setSecurityPrincipal("username");
env.setSecurityCredentials("password");
Context ctx = env.getInitialContext();
home = (MBeanHome) ctx.lookup(MBeanHome.ADMIN_JNDI_NAME);
} catch (NamingException e) {
System.out.println("Exception caught: " + e);
SqlMapClient sqlMapClient = null;
try {
String sqlMapConfigFile = "sql-map-config.xml";
Reader sqlMapConfigReader = Resources.getResourceAsReader(sqlMapConfigFile);
sqlMapClient = SqlMapClientBuilder.buildSqlMapClient(sqlMapConfigReader);
} catch (IOException e) {
log.error(e);
}
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN"
"http://www.ibatis.com/dtd/sql-map-2.dtd">
<sqlmap namespace="Account">
<typealias alias="account" type="com.j2eegeek.ibatis.domain.Account"/>
<resultmap id="accounts" class="account">
<result property="userID" column="userid"/>
<transactionmanager type="JDBC">
<datasource type="SIMPLE">
<property name="JDBC.Driver" value="com.mysql.jdbc.Driver"/>
<property name="JDBC.ConnectionURL" value="jdbc:mysql:///localhost"/>
<property name="JDBC.Username" value="user"/>
<property name="JDBC.Password" value="password"/>
<!-- optional elements include -->
<property name="Pool.MaximumActiveConnections" value="10"/>
<property name="Pool.MaximumIdleConnections" value="5"/>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMapConfig PUBLIC "-//iBATIS.com//DTD SQL Map Config 2.0//EN" "http://www.ibatis.com/dtd/sql-map-config-2.dtd"?>
<sqlmapconfig>
<settings cacheModelsEnabled="false" enhancementEnabled=" true" lazyLoadingEnabled="true"
maxRequests="32" maxSessions="100" maxTransactions="100" useStatementNamespaces="false"/>
<transactionmanager type="JDBC">
<datasource type="JNDI">