Skip to content

Instantly share code, notes, and snippets.

View jahentao's full-sized avatar

Jiaheng Tao jahentao

  • HangZhou, Zhejiang
View GitHub Profile
@jahentao
jahentao / book.json
Last active November 17, 2017 02:43
gitbook book.json
{
"auth": "jahentao<[email protected]>",
"output": null,
"generator": "site",
"title": "Sample GitBook",
"description": null,
"isbn": "978-3-16-148410-0",
"extension": null,
"plugins": ["disqus"],
"pluginsConfig": {
@jahentao
jahentao / Windows删除目录下所有exe文件.bat
Last active November 4, 2017 05:22
实用的批处理脚本
@echo off
Setlocal enabledelayedexpansion
::CODER BY jahentao POWERD BY iBAT
(del /f *.exe)4>>%0 2>nul
pause
::1>nul 意思是不显示命令运行的正确提示
::2>nul 是不显示错误提示
::一起就是 正确错误的都不显示
int Max3( int A, int B, int C )
{ /* 返回3个整数中的最大值 */
return A > B ? A > C ? A : C : B > C ? B : C;
}
int DivideAndConquer( int List[], int left, int right )
{ /* 分治法求List[left]到List[right]的最大子列和 */
int MaxLeftSum, MaxRightSum; /* 存放左右子问题的解 */
int MaxLeftBorderSum, MaxRightBorderSum; /*存放跨分界线的结果*/
@jahentao
jahentao / pan.baidu.com_delete_duplicate.xml
Created October 8, 2017 03:55
百度云重复文件删除Selenium IDE脚本
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head profile="http://selenium-ide.openqa.org/profiles/test-case">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="selenium.base" href="https://pan.baidu.com/" />
<title>百度云重复文件删除</title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
@jahentao
jahentao / spring_security.xml
Created July 19, 2017 10:45
Spring Security 配置文件
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:security="http://www.springframework.org/schema/security"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-4.0.xsd
http://www.springframework.org/schema/security
http://www.springframework.org/schema/security/spring-security.xsd">
<!-- 权限不拦截静态资源 -->
<security:http pattern="/js/**" security="none" />
@jahentao
jahentao / generatorConfig.xml
Last active July 18, 2017 14:14
mybatis 逆向代码生成配置
<!--
也可在线使用国内[最著名]的mybatis代码生成网站 --- fwjava.com
-----------------------------------------------------------------
第一步:先安装mybatis-generator插件;
第二步:创建maven项目, 在src/main/resources下创建generatorConfig.xml
第三步:配置generatorConfig.xml,具体配置如下:
-->
@jahentao
jahentao / 修改php.ini
Last active July 8, 2017 11:12
PHP远程调试的配置
[xdebug]
;refer to https://xdebug.org/docs/all_settings
zend_extension="/usr/lib/php/20151012/xdebug.so"
xdebug.remote_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_host=192.168.237.1
xdebug.remote_port=9010
;xdebug.remote_connect_back=1
;xdebug.remote_port=9800
xdebug.idekey=PHPSTORM
@jahentao
jahentao / JDBCUtils.java
Created July 7, 2017 03:52
Java-DB-操作使用代码段
/**
* 尝试抽象更为一般的
* TODO
* select中用反射实现属性的自动装配
*/
import java.beans.BeanInfo;
import java.beans.Introspector;
import java.beans.PropertyDescriptor;
import java.lang.reflect.Constructor;
@jahentao
jahentao / Cursors_Demo.sql
Created June 6, 2017 04:29
存储过程Demo
delimiter //
CREATE PROCEDURE curdemo()
BEGIN
DECLARE done INT DEFAULT FALSE;
DECLARE a CHAR(16);
DECLARE b, c INT;
DECLARE cur1 CURSOR FOR SELECT id,data FROM test.t1;
DECLARE cur2 CURSOR FOR SELECT i FROM test.t2;
DECLARE CONTINUE HANDLER FOR NOT FOUND SET done = TRUE;
@jahentao
jahentao / schema.xsd
Created May 27, 2017 08:47
SCHEMA导言一般格式
<?xml version="1.0" encoding="UTF-8" ?>
<!--自定义SCHEMA-->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://www.jahentao.com"
xmlns="http://www.jahentao.com"
elementFormDefault="qualified">
<!--SCHEMA文档中的子元素的名字和类型的定义-->
</xs:schema>