Skip to content

Instantly share code, notes, and snippets.

@MaySnow
MaySnow / gist:3803509
Created September 29, 2012 08:49
myeclipse 修改UTF-8
windows → preference → 输入JSP → Encoding
@MaySnow
MaySnow / applicationContext.xml
Created September 29, 2012 05:51
ssh框架配置(基于注解)
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:tx="http://www.springframework.org/schema/tx"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
@MaySnow
MaySnow / gist:3779955
Created September 25, 2012 04:17
gt ge le le eq ne
GT: Greater Than , >
GE: Greater than or Equivalent with , >=
LT: Less than, <
LE: Less than or Equivalent with, <=
EQ: EQuivalent with, ==
NE: Not Equivalent with, /=
@MaySnow
MaySnow / AppAction.java
Created September 24, 2012 14:42
基于注解的struts2 convention
package com.kaishengit.action;
import java.util.Map;
import org.apache.struts2.convention.annotation.Action;
import org.apache.struts2.convention.annotation.Result;
import org.apache.struts2.interceptor.SessionAware;
import org.springframework.beans.factory.annotation.Autowired;
import com.kaishengit.pojo.User;
@MaySnow
MaySnow / BaseDao.java
Created September 24, 2012 08:49 — forked from fankay/BaseDao.java
SSH中BaseDao的写法
package com.kaishengit.dao.core;
import java.io.Serializable;
import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;
import java.util.List;
import java.util.Map;
import org.hibernate.Criteria;
import org.hibernate.Query;
@MaySnow
MaySnow / event_tracking.coffee
Created September 24, 2012 08:49 — forked from bricker/event_tracking.coffee
Example of data attribute parsing
<a href="/news/" data-ga="MegaMenu,Clicked News,News">News</a>
@attributes = $(@el).attr("data-ga").split(",")
@category = @attributes[0]
@action = @attributes[1]
@label = @attributes[2]
@MaySnow
MaySnow / del.html
Created September 22, 2012 09:07
删除询问
<!DOCTYPE HTML>
<html >
<head>
<meta charset="UTF-8">
<title></title>
<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css" />
<style type="text/css">
.modal-backdrop.fade.in {
@MaySnow
MaySnow / return.html
Created September 22, 2012 08:47
返回
<a type="button" class="btn" href="javascript:window.history.go(-1)">返回</a>
@MaySnow
MaySnow / add.html
Created September 22, 2012 07:29
添加
<!DOCTYPE HTML>
<html >
<head>
<meta charset="UTF-8">
<title></title>
<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css" />
<style type="text/css">
.modal-backdrop.fade.in {
@MaySnow
MaySnow / param.html
Created August 9, 2012 01:02
EL表达式中获得URL的参数
<c:choose>
<c:when test="${param.code == 10001}">
<div style="color:red">用户名或密码错误</div>
</c:when>
</c:choose>