Skip to content

Instantly share code, notes, and snippets.

View hsipeng's full-sized avatar

Hsi P'eng hsipeng

View GitHub Profile
@hsipeng
hsipeng / VerifyCodeServlet.java
Created July 3, 2017 03:12
java生成验证码
package com.servlet;
import java.awt.Color;
import java.awt.Font;
import java.awt.Graphics2D;
import java.awt.image.BufferedImage;
import java.util.Random;
import javax.imageio.ImageIO;
import javax.servlet.ServletException;
@hsipeng
hsipeng / applicationContext.xml
Created July 3, 2017 02:00
Spring applicationContext.xml 文件头
<?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.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context.xsd
@hsipeng
hsipeng / slider-autoplay.js
Created May 27, 2017 03:08
slider with autoplay function,using plain javascript.
var slideIndex = 1;
var t;
shwoSlides(slideIndex);
function pulsSlides(n) {
shwoSlides(slideIndex +=n);
}
function currentSlide(n) {
shwoSlides(slideIndex = n);