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 net.blerg.util; | |
import java.lang.reflect.InvocationTargetException; | |
import java.lang.reflect.Method; | |
import java.util.HashMap; | |
import java.util.List; | |
import java.util.Map; | |
import org.slf4j.Logger; | |
import org.slf4j.LoggerFactory; |
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
/* | |
Copyright (c) 2007 Arthur Embleton | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is | |
furnished to do so, subject to the following conditions: |
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
<?xml version="1.0" encoding="UTF-8" standalone="no"?> | |
<project basedir="." default="jar" name="jar"> | |
<property environment="env"/> | |
<property name="debuglevel" value="source,lines,vars"/> | |
<property name="target" value="1.6"/> | |
<property name="source" value="1.6"/> | |
<path id="DataPersist.classpath"> | |
<pathelement location="bin"/> | |
<pathelement location="lib/commons-cli-1.1.jar"/> | |
<pathelement location="lib/commons-io-1.2.jar"/> |
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 utils; | |
import java.util.HashSet; | |
import java.util.Set; | |
public class KeyValue { | |
private static final char DELIMITER = ':'; | |
private static final char KEY_VALUE_DELIMITER = ','; | |
private static final char ESCAPE_CHAR = '\\'; |
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.LinkedList; | |
import java.util.List; | |
/** | |
* Provides a way to produce an information box surrounded by a char such as *. To use, add lines by calling {@link #add(String)} and then call {@link #getStringsInBox(char)} to get a String that can | |
* be put into a System.out.println call or used elsewhere that is formatted. | |
* | |
* @author Arthur Embleton | |
* | |
*/ |
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 net.blerg.oracleToMysql.util; | |
import java.util.LinkedList; | |
import java.util.List; | |
public class PatternReplace { | |
public static String replace (String string, String pattern, String replacement, char wildcard, char escapeChar, boolean ignoreCase) { | |
//tokenise against the pattern |
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
// ---------------------------------------------------------- | |
// A short snippet for detecting versions of IE in JavaScript | |
// without resorting to user-agent sniffing | |
// ---------------------------------------------------------- | |
// If you're not in IE (or IE version is less than 5) then: | |
// ie === undefined | |
// If you're in IE (>=5) then you can determine which version: | |
// ie === 7; // IE7 | |
// Thus, to detect IE: | |
// if (ie) {} |
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
select substring_index(value, '@',-1) as email, count(*) as frequency FROM emailTable where name="EmailAddress" group by email order by frequency desc; |
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 com.jandrewthompson; | |
import java.io.File; | |
import java.net.URL; | |
import java.util.ArrayList; | |
import java.util.List; | |
import org.hibernate.cfg.AnnotationConfiguration; | |
import org.hibernate.tool.hbm2ddl.SchemaExport; | |
/** |