Skip to content

Instantly share code, notes, and snippets.

<?xml version="1.0" ?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xsql="urn:oracle-xsql" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:fox="http://xml.apache.org/fop/extensions" version="1.0">
<xsl:output method="xml" indent="no"/>
<xsl:template match="/">
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
<!-- defines the layout master -->
<fo:layout-master-set>
<!-- defines the layout of a page -->
<fo:simple-page-master master-name="simple"
## Query using: criteria.add( Restrictions.naturalId().set( "ssn", "1234" ).set( "state", france ) );
select
this_.id as id0_1_,
this_.firstname as firstname0_1_,
this_.lastname as lastname0_1_,
this_.ssn as ssn0_1_,
this_.state_id as state5_0_1_,
state2_.id as id1_0_,
state2_.name as name1_0_
@edalquist
edalquist / dec.pl
Created February 13, 2012 16:55
token encryption/decryption
#! /usr/bin/env perl
use strict;
use Digest::MD5 qw(md5);
use Crypt::OpenSSL::Random;
use Crypt::OpenSSL::RSA;
use MIME::Base64 qw(encode_base64 decode_base64);
use File::Slurp qw(read_file);
<bean id="fluidWikiWriter" class="org.jasig.irclog.ConfluenceEventWriter">
<!-- The 'confluenceFormatter' bean is defined as part of the main log bot application context -->
<property name="eventFormatter" ref="confluenceFormatter" />
<property name="confluenceServer" ref="fluidWikiServer"/>
<property name="spaceKey" value="fluid" />
<property name="pageNames">
<list>
<value>'fluid-tech IRC Logs'</value>
<value>'fluid-tech IRC Logs-'yyyy</value>
@edalquist
edalquist / ant
Created February 17, 2012 21:49
Ubuntu Notifications for Ant/Maven
#!/bin/bash
$ANT_HOME/bin/ant $@
RETCODE=$?
BUILD_DIR=${PWD##*/}
if [ $RETCODE -eq 0 ]
then
notify-send --category=ANT,BUILD "$BUILD_DIR: Ant Build successful"
else
notify-send --category=ANT,BUILD "$BUILD_DIR: Ant Build failed"
@Override
public void evictNaturalIdResolution(EntityPersister persister, final Serializable pk, Object[] naturalIdValues) {
if ( !persister.hasNaturalIdentifier() ) {
throw new IllegalArgumentException( "Entity did not define a natrual-id" );
}
if ( naturalIdValues != null && persister.getNaturalIdentifierProperties().length != naturalIdValues.length ) {
throw new IllegalArgumentException( "Mismatch between expected number of natural-id values and found." );
}
NaturalIdResolutionCache entityNaturalIdResolutionCache = naturalIdResolutionCacheMap.get( persister );
diff --git a/build.gradle b/build.gradle
index 73116a5..a7dbb41 100644
--- a/build.gradle
+++ b/build.gradle
@@ -66,6 +66,9 @@ libraries = [
// Jakarta commons-collections todo : get rid of commons-collections dependency
commons_collections:
'commons-collections:commons-collections:3.2.1',
+ // Google Guava
+ guava:
<layout xmlns:dlm="http://www.uportal.org/layout/dlm" script="classpath://org/jasig/portal/io/import-layout_v3-2.crn" username="mum-lo-academics">
<folder ID="s1" hidden="false" immutable="false" name="Root folder" type="root" unremovable="true">
<folder ID="s2" hidden="true" immutable="true" name="Header folder" type="header" unremovable="true">
<channel fname="fragment-admin-exit" unremovable="false" hidden="false" immutable="false" ID="n12"/>
</folder>
<folder ID="s3" hidden="false" immutable="true" name="Footer folder" type="footer" unremovable="true">
</folder>
<folder ID="s4" dlm:deleteAllowed="false" dlm:editAllowed="false" hidden="false" immutable="false" name="Academics" type="regular" unremovable="false">
<folder ID="s5" dlm:deleteAllowed="false" hidden="false" immutable="false" name="Column" type="regular" unremovable="false">
@edalquist
edalquist / gist:2113174
Created March 19, 2012 13:56
Parent Plugin Conf
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.7</version>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
/**
* Checks to see if the update-mvn build should run
*
* Runs update-mvn if mvn-release has run since the last update-mvn run AND
* update-all has not run since the last mvn-release run
*/
//Parse out the environment names
def envName = ( project.name =~ /(.*)-update-mvn/ ) [0][1];
def releaseProjName = envName + "-mvn-release";