Skip to content

Instantly share code, notes, and snippets.

View hsipeng's full-sized avatar

Hsi P'eng hsipeng

View GitHub Profile
@hsipeng
hsipeng / user.html
Created July 24, 2017 15:06
JQuery 选择器的表单删除,添加,修改操作。
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script language="JavaScript" src="../js/jquery-1.4.2.js"></script>
<title>添加用户</title>
</head>
<body>
<center>
@hsipeng
hsipeng / web.xml
Created July 24, 2017 14:37
web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
<servlet>
<servlet-name>AjaxServlet</servlet-name>
<servlet-class>servlet.AjaxServlet</servlet-class>
@hsipeng
hsipeng / ajax.js
Created July 24, 2017 08:45
传统ajax
document.getElementById("b1").onclick=function () {
//AJAX调用
/**
创建xmlHttpRequest
绑定回调函数
与服务器建立连接
发送数据
回调函数处理相应的数据
*/
var xmlhttp = createXMLHttpRequest();
@hsipeng
hsipeng / IDEA.md
Created July 16, 2017 05:09
IDEA激活服务器地址
@hsipeng
hsipeng / pattern.md
Created July 12, 2017 08:38
表单验证常用的15个JS正则表达式

用户名正则

//用户名正则,4到16位(字母,数字,下划线,减号)
var uPattern = /^[a-zA-Z0-9_-]{4,16}$/;
//输出 true
console.log(uPattern.test("caibaojian"));

密码强度正则

JAVA_HOME" "C:\Java\jdk1.8.0_05"(即JDK的安装路径) "Path",在原变量值的最后面加上“;%JAVA_HOME%\bin;%JAVA_HOME%\jre\bin” “CLASSPATH”,变量值“.;%JAVA_HOME%\lib;%JAVA_HOME%\lib\dt.jar;%JAVA_HOME%\lib\tools.jar”

@hsipeng
hsipeng / xe.sql
Created July 4, 2017 08:41
orcale切换默认端口号
begin
dbms_xdb.sethttpport('8081');
dbms_xdb.setftpport('0');
end;
@hsipeng
hsipeng / C:\Users\用户名\.m2
Created July 4, 2017 03:26
收集的国内maven镜像地址
<?xml version="1.0" encoding="UTF-8"?>
<!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor
license agreements. See the NOTICE file distributed with this work for additional
information regarding copyright ownership. The ASF licenses this file to
you under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of
the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required
by applicable law or agreed to in writing, software distributed under the
License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
## DBUtil
```
package jdbc2;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

begin

sudo apt-get install git git config --global user.name "Your Name" git config --global user.email "your email"

ssh-keygen -t rsa -C "youremail@example.com"

win

$ cd ~/.ssh