Skip to content

Instantly share code, notes, and snippets.

@theresajayne
theresajayne / gist:1016569
Created June 9, 2011 11:43
sample template
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE xsl:stylesheet
[
<!ENTITY nbsp "&#160;">
<!ENTITY bull "&#8226;">
<!ENTITY tab "&#9;">
<!ENTITY oquote "&#8220;">
<!ENTITY cquote "&#8221;">
]>
map.put(RenderingHints.KEY_INTERPOLATION,
RenderingHints.VALUE_INTERPOLATION_BILINEAR);
map.put(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY);
map.put(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
RenderingHints hints = new RenderingHints(map);
BufferedImageOp op = new ConvolveOp(new Kernel(3, 3, blurKernel), ConvolveOp.EDGE_NO_OP, hints);
return op.filter(image, null);
@theresajayne
theresajayne / gist:1058233
Created July 1, 2011 10:15
context + class
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5" 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_2_5.xsd">
<servlet>
<servlet-name>getcmyk</servlet-name>
<servlet-class>uk.co.inbrand.getcmyk.GetCMYK</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>getcmyk</servlet-name>
<url-pattern>/getcmyk/*</url-pattern>
<url-pattern>/*</url-pattern>
package uk.co.inbrand.inline;
import java.io.BufferedInputStream;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStream;
import java.net.MalformedURLException;
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package uk.co.inbrand.fopengine;
import java.io.BufferedOutputStream;
import java.io.BufferedReader;
import java.io.File;
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package uk.co.inbrand.test;
import java.io.BufferedOutputStream;
import java.io.File;
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE xsl:stylesheet
[
<!ENTITY nbsp "&#160;">
<!ENTITY bull "&#8226;">
<!ENTITY tab "&#9;">
<!ENTITY oquote "&#8220;">
<!ENTITY cquote "&#8221;">
]>
<fop xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >
<strict-configuration>true</strict-configuration>
<base>C:/InBrand-1.0/Runtime/Fonts</base>
<font-base>C:/InBrand-1.0/Runtime/Fonts</font-base>
<cache-file>C:/InBrand-1.0/fop-cache</cache-file>
<!--
************************************************************************
Add fonts here
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>inbrandcore</groupId>
<artifactId>inbrandcore</artifactId>
<packaging>war</packaging>
<version>1.0-SNAPSHOT</version>
<name>AppFuse Spring MVC Application</name>
package ptv.publishing;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.net.URISyntaxException;
import java.sql.Clob;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;