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
<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 2.0//EN" | |
"http://google-web-toolkit.googlecode.com/svn/releases/2.0/distro-source/core/src/gwt-module.dtd"> | |
<module rename-to="MySampleApplication"> | |
<inherits name='com.google.gwt.user.User'/> | |
<entry-point class='com.mySampleApplication.client.MySampleApplication'/> | |
</module> |
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
com.lowagie.text.Document document = new com.lowagie.text.Document(); | |
ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); | |
PdfWriter.getInstance(document, outputStream); | |
HtmlWriter.getInstance(document, System.out); | |
document.open(); | |
List<Element> objects = HTMLWorker.parseToList(reader, null, null); | |
for (Element element : objects) { | |
document.add(element); | |
} |
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
DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance(); | |
docBuilderFactory.setNamespaceAware(false); | |
DocumentBuilder docBuilder = docBuilderFactory.newDocumentBuilder(); | |
org.w3c.dom.Document doc = docBuilder.parse(stream); | |
ITextRenderer renderer = new ITextRenderer(); | |
renderer.setDocument(doc, null); | |
renderer.layout(); | |
ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); |
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
InputStreamReader reader = new InputStreamReader(inputStream); | |
ByteArrayOutputStream outputStream = null; | |
try { | |
Document document = new Document(); | |
outputStream = new ByteArrayOutputStream(); | |
PdfWriter.getInstance(document, outputStream); | |
Map<String, String> pc2 = new HashMap<String, String>(); | |
pc2.put("line-height", "115%"); |
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
ByteArrayInputStream inputStream = new ByteArrayInputStream(htmlData); | |
InputStreamReader inputStreamReader = new InputStreamReader(inputStream); | |
ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); | |
PD4ML pd4ml = new PD4ML(); | |
pd4ml.enableDebugInfo(); | |
try { | |
pd4ml.setPageSize( PD4Constants.A4 ); | |
pd4ml.setPageInsetsMM( new Insets(topValue, leftValue, bottomValue, rightValue) ); |
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 | |
# | |
# Simple script for mercurial routine command autommation. | |
# Execute mercurial commands for all repos found in current dir. | |
# | |
# Exmaple Usage | |
# | |
# $. <- current dir 1) hgAll.sh in - get all incoming commits | |
# $../repo1 2) hgAll.sh diff - uncommitted changes | |
# $../repo2 3) hgAll.sh st - uncommitted changes |
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 | |
# | |
# Simple script to add keyring extension for mercurial. | |
# (only for cygwin users with native hg installation from debina package) | |
# This keyring extension enables password save so you do not need to enter it every time. | |
# | |
# Script install steps: | |
# 1) keyring lib from python rep. | |
# 2) downloads extension | |
# 3) configure mercurial to use keyring extension |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>SyntaxHighlighterSample</title> | |
</head> | |
<pre class="brush: java">public static void main(String args[]) { | |
System.out.println("Hello World!"); | |
} | |
</pre> | |
<link href='http://alexgorbatchev.com/pub/sh/current/styles/shCore.css' rel='stylesheet' type='text/css'/> |
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
allprojects { | |
apply plugin: 'java' | |
dependencies{ | |
compile "joda-time:joda-time:2.3" | |
} | |
repositories { | |
maven { |
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 jenkins.* | |
import jenkins.model.* | |
import hudson.* | |
import hudson.model.* | |
def printCouse(cause) { | |
println("cause ========> : "+ cause ) | |
println("cause.class ========> : "+ cause.class ) |
OlderNewer