Skip to content

Commit 4585232

Browse files
author
binbin.hou
committed
Initial commit
0 parents  commit 4585232

16 files changed

+932
-0
lines changed

Diff for: .coveralls.yml

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
service_name: travis-ci

Diff for: .gitignore

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# maven ignore
2+
target/
3+
*.jar
4+
*.war
5+
*.zip
6+
*.tar
7+
*.tar.gz
8+
9+
# eclipse ignore
10+
.settings/
11+
.project
12+
.classpath
13+
14+
# idea ignore
15+
.idea/
16+
*.ipr
17+
*.iml
18+
*.iws
19+
20+
# temp ignore
21+
*.log
22+
*.cache
23+
*.diff
24+
*.patch
25+
*.tmp
26+
*.java~
27+
*.properties~
28+
*.xml~
29+
30+
# system ignore
31+
.DS_Store
32+
Thumbs.db
33+

Diff for: .travis.yml

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
language: java
2+
jdk:
3+
- openjdk8
4+
install: mvn install -DskipTests=true -Dmaven.javadoc.skip=true
5+
script: mvn test
6+
after_success:
7+
- mvn clean cobertura:cobertura coveralls:report
8+

Diff for: CHANGELOG.md

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# 变更日志
2+
3+
| 类型 | 说明 |
4+
|:----|:----|
5+
| A | 新增 |
6+
| U | 更新 |
7+
| D | 删除 |
8+
| T | 测试 |
9+
| O | 优化 |
10+
| F | 修复BUG |
11+
12+
# release_0.0.1
13+
14+
| 序号 | 变更类型 | 说明 | 时间 | 备注 |
15+
|:---|:---|:---|:---|:--|
16+
| 1 | A | 基本功能的实现 | 2020-5-12 21:06:00 | |
17+
18+
# release_0.0.2
19+
20+
| 序号 | 变更类型 | 说明 | 时间 | 备注 |
21+
|:---|:---|:---|:---|:--|
22+
| 1 | A | 本地内存的 ID 策略 | 2020-5-14 15:14:06 | |
23+
24+
# release_0.0.3
25+
26+
| 序号 | 变更类型 | 说明 | 时间 | 备注 |
27+
|:---|:---|:---|:---|:--|
28+
| 1 | A | 新增 uuidNum 算法 | 2020-5-15 22:08:43 | |
29+
30+
# release_0.0.4
31+
32+
| 序号 | 变更类型 | 说明 | 时间 | 备注 |
33+
|:---|:---|:---|:---|:--|
34+
| 1 | A | 新增 human 算法 | 2020-5-16 09:27:37 | |

Diff for: LICENSE.txt

+331
Large diffs are not rendered by default.

Diff for: README.md

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# leet code
2+
3+
| 序号 | 难题 | 解决方案 | 速度% | 内存% | 时间 |
4+
| 1 | [two num sum](doc/01-two-num-sum.md) | []() | 99.93 | 69.35 | 2020-6-9 11:24:16 |

Diff for: cgit.bat

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
:: 用于提交当前变更(windows)
2+
:: author: houbb
3+
:: LastUpdateTime: 2018-11-22 09:08:52
4+
:: 用法:双击运行,或者当前路径 cmd 直接输入 .\cgit.bat
5+
6+
git pull
7+
git add .
8+
git commit -m "[Feature] add for new"
9+
git push
10+
git status
11+

Diff for: cgit.sh

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# 提交
2+
3+
git pull
4+
git add .
5+
git commit -m "[Feature] add for new"
6+
git push
7+
git status
8+
9+
# 1. 赋值权限: chmod +x ./cgit.sh
10+
# 2. 执行: ./cgit.sh
11+
# Last Update Time: 2018-11-21 21:55:38
12+
# Author: houbb

Diff for: doc/01-two-num-sum.md

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
Given an array of integers, return indices of the two numbers such that they add up to a specific target.
2+
3+
You may assume that each input would have exactly one solution, and you may not use the same element twice.
4+
5+
Example:
6+
7+
```
8+
Given nums = [2, 7, 11, 15], target = 9,
9+
10+
Because nums[0] + nums[1] = 2 + 7 = 9,
11+
return [0, 1].
12+
```

Diff for: doc/README.md

Whitespace-only changes.

Diff for: pom.xml

+221
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,221 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
~ Copyright (c) 2019. houbinbin Inc.
4+
~ id All rights reserved.
5+
-->
6+
7+
<project xmlns="http://maven.apache.org/POM/4.0.0"
8+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
10+
<modelVersion>4.0.0</modelVersion>
11+
12+
<groupId>com.github.houbb</groupId>
13+
<artifactId>id</artifactId>
14+
<version>0.0.5-SNAPSHOT</version>
15+
16+
<properties>
17+
<!--============================== All Plugins START ==============================-->
18+
<plugin.compiler.version>3.2</plugin.compiler.version>
19+
<plugin.compiler.version>3.2</plugin.compiler.version>
20+
<plugin.surefire.version>2.18.1</plugin.surefire.version>
21+
<plugin.surefire.skip-it>false</plugin.surefire.skip-it>
22+
<plugin.surefire.ignore-failure>false</plugin.surefire.ignore-failure>
23+
24+
<plugin.maven-source-plugin.version>2.2.1</plugin.maven-source-plugin.version>
25+
<plugin.maven-javadoc-plugin.version>2.9.1</plugin.maven-javadoc-plugin.version>
26+
<plugin.maven-gpg-plugin.version>1.5</plugin.maven-gpg-plugin.version>
27+
28+
<!--============================== MAIN ==============================-->
29+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
30+
<project.compiler.level>1.7</project.compiler.level>
31+
32+
<!--============================== INTER ==============================-->
33+
<heaven.version>0.1.104</heaven.version>
34+
35+
<!--============================== OTHER ==============================-->
36+
<junit.version>4.12</junit.version>
37+
</properties>
38+
39+
<dependencies>
40+
<!--============================== SELF ==============================-->
41+
42+
<!--============================== INTER ==============================-->
43+
<dependency>
44+
<groupId>com.github.houbb</groupId>
45+
<artifactId>heaven</artifactId>
46+
<version>${heaven.version}</version>
47+
</dependency>
48+
49+
<!--============================== OTHER ==============================-->
50+
<dependency>
51+
<groupId>junit</groupId>
52+
<artifactId>junit</artifactId>
53+
<version>${junit.version}</version>
54+
<optional>true</optional>
55+
<scope>test</scope>
56+
</dependency>
57+
58+
</dependencies>
59+
60+
<build>
61+
<plugins>
62+
<!--compiler plugin -->
63+
<plugin>
64+
<groupId>org.apache.maven.plugins</groupId>
65+
<artifactId>maven-compiler-plugin</artifactId>
66+
<version>${plugin.compiler.version}</version>
67+
<configuration>
68+
<source>${project.compiler.level}</source>
69+
<target>${project.compiler.level}</target>
70+
<encoding>${project.build.sourceEncoding}</encoding>
71+
</configuration>
72+
</plugin>
73+
74+
<plugin>
75+
<groupId>org.apache.maven.plugins</groupId>
76+
<artifactId>maven-surefire-plugin</artifactId>
77+
<version>${plugin.surefire.version}</version>
78+
<configuration>
79+
<skipTests>${plugin.surefire.skip-it}</skipTests>
80+
<testFailureIgnore>${plugin.surefire.ignore-failure}</testFailureIgnore>
81+
</configuration>
82+
</plugin>
83+
84+
<!--mvn cobertura:cobertura coveralls:report -DrepoToken=yourcoverallsprojectrepositorytoken-->
85+
<plugin>
86+
<groupId>org.eluder.coveralls</groupId>
87+
<artifactId>coveralls-maven-plugin</artifactId>
88+
<version>4.3.0</version>
89+
</plugin>
90+
91+
<plugin>
92+
<groupId>org.codehaus.mojo</groupId>
93+
<artifactId>cobertura-maven-plugin</artifactId>
94+
<version>2.7</version>
95+
<configuration>
96+
<format>xml</format>
97+
<maxmem>256m</maxmem>
98+
<!-- aggregated reports for multi-module projects -->
99+
<aggregate>true</aggregate>
100+
<instrumentation>
101+
<excludes>
102+
<exclude>**/*Test.class</exclude>
103+
<exclude>**/HelpMojo.class</exclude>
104+
<exclude>**/*Vo.class</exclude>
105+
</excludes>
106+
</instrumentation>
107+
</configuration>
108+
</plugin>
109+
110+
<!--mvn clean install sonar:sonar -Dmaven.test.skip=true -Dsonar.host.url=http://localhost:9000-->
111+
<!--sonar-->
112+
<plugin>
113+
<groupId>org.sonarsource.scanner.maven</groupId>
114+
<artifactId>sonar-maven-plugin</artifactId>
115+
<version>3.1.1</version>
116+
</plugin>
117+
118+
<!-- Javadoc -->
119+
<plugin>
120+
<groupId>org.apache.maven.plugins</groupId>
121+
<artifactId>maven-javadoc-plugin</artifactId>
122+
<version>${plugin.maven-javadoc-plugin.version}</version>
123+
</plugin>
124+
125+
</plugins>
126+
</build>
127+
128+
<!--============================== ADD For sonatype START ==============================-->
129+
<name>id</name>
130+
<description>The time schedule framework for java.</description>
131+
132+
<parent>
133+
<groupId>org.sonatype.oss</groupId>
134+
<artifactId>oss-parent</artifactId>
135+
<version>7</version>
136+
</parent>
137+
<licenses>
138+
<license>
139+
<name>The Apache Software License, Version 2.0</name>
140+
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
141+
<distribution>repo</distribution>
142+
</license>
143+
</licenses>
144+
<scm>
145+
<url>https://github.com/houbb/id</url>
146+
<connection>https://github.com/houbb/id.git</connection>
147+
<developerConnection>https://houbb.github.io/</developerConnection>
148+
</scm>
149+
<developers>
150+
<developer>
151+
<name>houbb</name>
152+
<email>[email protected]</email>
153+
<url>https://houbb.github.io/</url>
154+
</developer>
155+
</developers>
156+
<!--============================== ADD For sonatype END ==============================-->
157+
158+
159+
<profiles>
160+
<profile>
161+
<id>release</id>
162+
<build>
163+
<plugins>
164+
<!-- Source -->
165+
<plugin>
166+
<groupId>org.apache.maven.plugins</groupId>
167+
<artifactId>maven-source-plugin</artifactId>
168+
<version>${plugin.maven-source-plugin.version}</version>
169+
<executions>
170+
<execution>
171+
<phase>package</phase>
172+
<goals>
173+
<goal>jar-no-fork</goal>
174+
</goals>
175+
</execution>
176+
</executions>
177+
</plugin>
178+
<!-- Javadoc -->
179+
<plugin>
180+
<groupId>org.apache.maven.plugins</groupId>
181+
<artifactId>maven-javadoc-plugin</artifactId>
182+
<version>${plugin.maven-javadoc-plugin.version}</version>
183+
<executions>
184+
<execution>
185+
<phase>package</phase>
186+
<goals>
187+
<goal>jar</goal>
188+
</goals>
189+
</execution>
190+
</executions>
191+
</plugin>
192+
<!-- GPG -->
193+
<plugin>
194+
<groupId>org.apache.maven.plugins</groupId>
195+
<artifactId>maven-gpg-plugin</artifactId>
196+
<version>${plugin.maven-gpg-plugin.version}</version>
197+
<executions>
198+
<execution>
199+
<phase>verify</phase>
200+
<goals>
201+
<goal>sign</goal>
202+
</goals>
203+
</execution>
204+
</executions>
205+
</plugin>
206+
</plugins>
207+
</build>
208+
<distributionManagement>
209+
<snapshotRepository>
210+
<id>oss</id>
211+
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
212+
</snapshotRepository>
213+
<repository>
214+
<id>oss</id>
215+
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
216+
</repository>
217+
</distributionManagement>
218+
</profile>
219+
</profiles>
220+
221+
</project>

Diff for: release.bat

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
:: 用于 release 当前项目(windows)
2+
:: author: houbb
3+
:: LastUpdateTime: 2018-1-22 09:08:52
4+
:: 用法:双击运行,或者当前路径 cmd 直接输入 release.bat
5+
6+
:: 关闭回显
7+
@echo OFF
8+
9+
ECHO "============================= RELEASE START..."
10+
11+
:: 版本号信息(需要手动指定)
12+
:::: 旧版本名称
13+
SET version=0.0.4
14+
:::: 新版本名称
15+
SET newVersion=0.0.5
16+
:::: 组织名称
17+
SET groupName=com.github.houbb
18+
:::: 项目名称
19+
SET projectName=id
20+
21+
:: release 项目版本
22+
:::: snapshot 版本号
23+
SET snapshot_version=%version%"-SNAPSHOT"
24+
:::: 新的版本号
25+
SET release_version=%version%
26+
27+
call mvn versions:set -DgroupId=%groupName% -DartifactId=%projectName% -DoldVersion=%snapshot_version% -DnewVersion=%release_version%
28+
call mvn -N versions:update-child-modules
29+
call mvn versions:commit
30+
call echo "1. RELEASE %snapshot_version% TO %release_version% DONE."
31+
32+
33+
:: 推送到 github
34+
git add .
35+
git commit -m "release branch %version%"
36+
git push
37+
git status
38+
39+
ECHO "2. PUSH TO GITHUB DONE."
40+
41+
:: 推送到 maven 中央仓库
42+
call mvn clean deploy -P release
43+
ECHO "3 PUSH TO MVN CENTER DONE."

0 commit comments

Comments
 (0)