Skip to content

Commit

Permalink
build jar
Browse files Browse the repository at this point in the history
  • Loading branch information
ice1000 committed Oct 2, 2016
1 parent 87c1140 commit 0203108
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions src/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Manifest-Version: 1.0
Main-Class: spider.SpiderKt

4 changes: 2 additions & 2 deletions src/oj/OJ.kt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ abstract class OJ() {

protected fun write100(begin: Int, name: String, url: String) {
checkFile(name)
((begin * 100)..(begin * 100 + 99)).forEach { i ->
((begin * 20)..(begin * 20 + 19)).forEach { i ->
try {
File("$name${File.separator}$name-${(1000 + i)}.html")
.writeText(URL("$url${1000 + i}").readText())
Expand All @@ -31,7 +31,7 @@ abstract class OJ() {
}

protected fun multiThreadGo(all: Int, name: String, url: String) {
for (idx in 0..all) thread {
for (idx in 0..(all * 5)) thread {
write100(idx, name, url)
}
}
Expand Down

0 comments on commit 0203108

Please sign in to comment.