Skip to content

Instantly share code, notes, and snippets.

@awgtek
awgtek / gist:fa6241219b085799574cf3d4f80ea3e9
Created April 10, 2017 00:37
Diffs when changing the simpapp (from WTC Samples) to point to TOLOWER
$ diff ../simpapp/build.xml build.xml
6c6
< <property file="../../../../examples.properties"/>
---
> <property file="examples.properties"/>
15,16c15,16
< <property name="ejb.jar" value="wtc_toupper.jar"/>
< <property name="ejb.client.jar" value="wtc_toupper_client.jar"/>
---
> <property name="ejb.jar" value="wtc_wl2wl.jar"/>
@awgtek
awgtek / gist:97da1289fb39e78f4ed6229a0d1f94ed
Created November 16, 2016 04:31
A Sub Expression Parser - useful to extract the expressions from regex groupings where the regex is a series of "OR" clauses that translate to options in a drop down etc.
package optionsparser;
import java.io.IOException;
import java.util.Scanner;
import java.util.Stack;
public class SubExpressionParser {
public static void main(String[] args) {
@awgtek
awgtek / BeanFieldsMatcher.java
Created October 19, 2015 21:09
Hamcrest wrapper for EqualsBuilder.reflectionEquals
import java.util.Collection;
import org.apache.commons.lang3.builder.EqualsBuilder;
import org.hamcrest.Description;
import org.hamcrest.TypeSafeMatcher;
/**
* Hamcrest matcher that verifies that is used to assert equality
* based on all fields of the class except for those excluded.
*/