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 / core-site.xml
Last active June 6, 2017 04:33
Hadoop伪分布式配置文件
<?xml version="1.0" ?>
<configuration>
<property>
<name>fs.defaultFS</name>
<value>hdfs://localhost/</value>
</property>
</configuration>
@jahentao
jahentao / Eclipse.gitignore
Last active February 10, 2019 14:06
jetbrains IDE 项目gitignore
# copy from https://github.com/github/gitignore/blob/master/Global/Eclipse.gitignore
.metadata
bin/
tmp/
*.tmp
*.bak
*.swp
*~.nib
local.properties
@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>
@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 / 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 / 修改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 / 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 / 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 / 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">
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; /*存放跨分界线的结果*/