Skip to content

Instantly share code, notes, and snippets.

@theresajayne
theresajayne / gist:1333177
Created November 2, 2011 08:28
useredit.jsp
<%@page import="uk.co.inbrand.dto.UsersBase"%>
<%@page import="uk.co.inbrand.dto.OrganisationBase" %>
<%@page import="java.util.ArrayList" %>
<%@page import="java.util.Iterator" %>
<%@page language="java" %>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib uri="/struts-tags" prefix="html" %>
<html:form action="edit.action" >
<table width="80%" border="0">
package uk.co.inbrand.common.aspects;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
warning no match for this type name: HttpServletRequest [Xlint:invalidAbsoluteTypeName]
************************************************************
<aop:config>
<aop:aspect ref="loginAspect">
<aop:pointcut id="theExecutionofattemptAuthentication" expression="execution(* uk.co.inbrand.security.LoginFilter.attemptAuthentication(HttpServletRequest , HttpServletResponse )) and args(request,response)"/>
<aop:around pointcut-ref="theExecutionofattemptAuthentication" method="loginAction"/>
</aop:aspect>
</aop:config>
package uk.co.inbrand.dao;
import java.io.Serializable;
import java.util.List;
/**
* Generic interface for DAOs providing basic CRUD (Create, Review, Update,
* Delete) operations on a given entity (<code>T</code>) with a
* {@link Serializable} object (<code>ID</code>) as its unique identifier.
*
@theresajayne
theresajayne / gist:1409545
Created November 30, 2011 15:46
XML file
<?xml version="1.0" encoding="UTF-8"?>
<document>
<version inline="2.0" author="Theresa Forster"/>
<data>
<body class="page page-id-61 page-template page-template-propertydetail-page-php">
<header role="banner">
<div class="container">
<h1 class="png_bg">
<a shape="rect" href="http://shuretys.co.uk/" title="Shurety's Estate Agents" rel="home">Shurety's Estate Agents</a>
</h1> <p class="png_bg">The Surrey Hills Specialists</p>
@theresajayne
theresajayne / gist:1409552
Created November 30, 2011 15:47
XSL 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;"> ]><xsl:stylesheet version="1.1" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:svg="http://www.w3.org/2000/svg" xmlns:date="http://exslt.org/dates-and-times" xmlns:fox="http://xml.apache.org/fop/extensions" xmlns:inbrand="http://www.inbrand1.co.uk/xsl" exclude-result-prefixes="fo">
<inbrand:fields/>
<inbrand:styles/>
<xsl:output method="xml" version="1.0" omit-xml-declaration="no" indent="yes"/>
<xsl:include href="file:///c:/InBrand-1.0/Runtime/Scripts/CropImage.xsl" />
<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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>uk.co.inbrand</groupId>
<artifactId>FopEngine</artifactId>
<version>1.0</version>
<packaging>jar</packaging>
<name>FopEngine</name>
03-Jan-2012 11:44:27 org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'defaultDataSource' defined in class path resource [uk/co/inbrand/db/applicationContext-database.xml]: Initialization of bean failed; nested exception is java.lang.NoSuchFieldError: NULL
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:527)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225)
at org.springframework.bea
C:\Maven\InBrand>git push --force origin master
[email protected]'s password:
Counting objects: 1206, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (1167/1167), done.
Writing objects: 100% (1206/1206), 96.59 MiB | 6.04 MiB/s, done.
Total 1206 (delta 185), reused 0 (delta 0)
remote: error: refusing to update checked out branch: refs/heads/master
remote: error: By default, updating the current branch in a non-bare repository
remote: error: is denied, because it will make the index and work tree inconsist
package uk.co.inbrand.utilities;
import java.io.IOException;
import java.io.StringReader;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;