Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
222100117oyq
0
提交
2f554b07
0
0
项目概览
222100117oyq
/
0
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
0
0
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
2f554b07
编写于
3月 01, 2024
作者:
222100117oyq
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
完成了除文档编写和附加功能外的数据测试等所有内容
上级
edd9a767
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
37 addition
and
480 deletion
+37
-480
DWASearch/.idea/artifacts/DWASearch_jar.xml
DWASearch/.idea/artifacts/DWASearch_jar.xml
+4
-4
DWASearch/DWASearch.jar
DWASearch/DWASearch.jar
+0
-0
DWASearch/input.txt
DWASearch/input.txt
+8
-3
DWASearch/output.txt
DWASearch/output.txt
+7
-433
DWASearch/src/main/java/org/example/DWASearch.java
DWASearch/src/main/java/org/example/DWASearch.java
+18
-40
未找到文件。
DWASearch/.idea/artifacts/DWASearch_jar.xml
浏览文件 @
2f554b07
...
...
@@ -3,13 +3,13 @@
<output-path>
$PROJECT_DIR$
</output-path>
<root
id=
"archive"
name=
"DWASearch.jar"
>
<element
id=
"module-output"
name=
"DWASearch"
/>
<element
id=
"extracted-dir"
path=
"$MAVEN_REPOSITORY$/net/sf/json-lib/json-lib/2.4/json-lib-2.4-jdk15.jar"
path-in-jar=
"/"
/>
<element
id=
"extracted-dir"
path=
"$MAVEN_REPOSITORY$/commons-io/commons-io/2.11.0/commons-io-2.11.0.jar"
path-in-jar=
"/"
/>
<element
id=
"extracted-dir"
path=
"$MAVEN_REPOSITORY$/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.jar"
path-in-jar=
"/"
/>
<element
id=
"extracted-dir"
path=
"$MAVEN_REPOSITORY$/net/sf/ezmorph/ezmorph/1.0.6/ezmorph-1.0.6.jar"
path-in-jar=
"/"
/>
<element
id=
"extracted-dir"
path=
"$MAVEN_REPOSITORY$/commons-collections/commons-collections/3.2.1/commons-collections-3.2.1.jar"
path-in-jar=
"/"
/>
<element
id=
"extracted-dir"
path=
"$MAVEN_REPOSITORY$/commons-beanutils/commons-beanutils/1.8.0/commons-beanutils-1.8.0.jar"
path-in-jar=
"/"
/>
<element
id=
"extracted-dir"
path=
"$MAVEN_REPOSITORY$/commons-collections/commons-collections/3.2.1/commons-collections-3.2.1.jar"
path-in-jar=
"/"
/>
<element
id=
"extracted-dir"
path=
"$MAVEN_REPOSITORY$/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.jar"
path-in-jar=
"/"
/>
<element
id=
"extracted-dir"
path=
"$MAVEN_REPOSITORY$/com/alibaba/fastjson/1.2.54/fastjson-1.2.54.jar"
path-in-jar=
"/"
/>
<element
id=
"extracted-dir"
path=
"$MAVEN_REPOSITORY$/net/sf/ezmorph/ezmorph/1.0.6/ezmorph-1.0.6.jar"
path-in-jar=
"/"
/>
<element
id=
"extracted-dir"
path=
"$MAVEN_REPOSITORY$/net/sf/json-lib/json-lib/2.4/json-lib-2.4-jdk15.jar"
path-in-jar=
"/"
/>
<element
id=
"extracted-dir"
path=
"$MAVEN_REPOSITORY$/commons-lang/commons-lang/2.5/commons-lang-2.5.jar"
path-in-jar=
"/"
/>
</root>
</artifact>
...
...
DWASearch/DWASearch.jar
浏览文件 @
2f554b07
无法预览此类型文件
DWASearch/input.txt
浏览文件 @
2f554b07
players
result women 1m springboard
result women 1m springboard
player
Players
resultwomen 1m springboard
result women 10m springboard
result sss
result detail
result women 1m springboard details
result men 10m synchronised
players
\ No newline at end of file
DWASearch/output.txt
浏览文件 @
2f554b07
Full Name:HART Alexander
Gender:Male
Country:Austria
Error
-----
Full Name:LOTFI Dariush
Gender:Male
Country:Austria
Error
-----
Full Name:SCHALLER Nikolaj
Gender:Male
Country:Austria
Error
-----
Full Name:ABRAMOWICZ Tazman
Gender:Male
Country:Canada
N/A
-----
Full Name:BELANGER Eloise
Gender:Female
Country:Canada
-----
Full Name:DICK Elaena
Gender:Female
Country:Canada
N/A
-----
Full Name:ERLAM Margo
Gender:Female
Country:Canada
N/A
-----
Full Name:FUNG Katelyn
Gender:Female
Country:Canada
-----
Full Name:JASMIN Amelie-Laura
Gender:Female
Country:Canada
-----
Full Name:TESSIER Benjamin
Gender:Male
Country:Canada
-----
Full Name:WILSON Aimee
Gender:Female
Country:Canada
-----
Full Name:JELINKOVA Tereza
Gender:Female
Country:Czechia
-----
Full Name:SANTIAGO Dominique
Gender:Female
Country:Czechia
-----
Full Name:ABADIA Adrian
Gender:Male
Country:Spain
-----
Full Name:ANTOLINO Valeria
Gender:Female
Country:Spain
-----
Full Name:CAMACHO DEL HOYO Carlos
Gender:Male
Country:Spain
-----
Full Name:CARVAJAL Ana
Gender:Female
Country:Spain
-----
Full Name:GARCIA BOISSIER Nicolas
Gender:Male
Country:Spain
-----
Full Name:LINAN Max
Gender:Male
Country:Spain
-----
Full Name:PAPWORTH BURREL Maria
Gender:Female
Country:Spain
-----
Full Name:RODRIGUEZ LEDESMA Jorge
Gender:Male
Country:Spain
-----
Full Name:VELAZQUEZ Rocio
Gender:Female
Country:Spain
-----
Full Name:BENT-ASHMEIL Desharne
Gender:Female
Country:Great Britain
-----
Full Name:BOND Maisie
Gender:Female
Country:Great Britain
-----
Full Name:DIXON Matthew
Gender:Male
Country:Great Britain
-----
Full Name:HEATLY James
Gender:Male
Country:Great Britain
-----
Full Name:HOULDEN Jordan Christopher
Gender:Male
Country:Great Britain
-----
Full Name:LEE Robbie
Gender:Male
Country:Great Britain
-----
Full Name:MCCABE Euan
Gender:Male
Country:Great Britain
-----
Full Name:ROLLINSON Amy
Gender:Female
Country:Great Britain
-----
Full Name:ONIKASHVILI Tornike
Gender:Male
Country:Georgia
-----
Full Name:SAKANDELIDZE Irakli
Gender:Male
Country:Georgia
-----
Full Name:SHANIDZE Mariam
Gender:Female
Country:Georgia
-----
Full Name:SHARIA Tekle
Gender:Female
Country:Georgia
-----
Full Name:TSULUKIDZE Giorgi
Gender:Male
Country:Georgia
-----
Full Name:AVILA SANCHEZ Luis Carlo
Gender:Male
Country:Germany
-----
Full Name:BARTHEL Timo
Gender:Male
Country:Germany
-----
Full Name:COORDES Carolina
Gender:Female
Country:Germany
-----
Full Name:EIKERMANN GREGORCHUK Jaden Shiloh
Gender:Male
Country:Germany
-----
Full Name:HENTSCHEL Lena
Gender:Female
Country:Germany
-----
Full Name:LUBE Alexander
Gender:Male
Country:Germany
-----
Full Name:MULLER Jette
Gender:Female
Country:Germany
-----
Full Name:OETTINGHAUS Saskia
Gender:Female
Country:Germany
-----
Full Name:PFEIF Pauline Alexandra
Gender:Female
Country:Germany
-----
Full Name:PRENZYNA Espen
Gender:Male
Country:Germany
-----
Full Name:ROSLER Ole Johannes
Gender:Male
Country:Germany
-----
Full Name:ROTHER Jana Lisa
Gender:Female
Country:Germany
-----
Full Name:RUDIGER Lars
Gender:Male
Country:Germany
-----
Full Name:WALDSTEINER Tom Laszlo
Gender:Male
Country:Germany
-----
Full Name:WASSEN Elena
Gender:Female
Country:Germany
-----
Full Name:WASSEN Christina
Gender:Female
Country:Germany
-----
Full Name:WESEMANN Moritz
Gender:Male
Country:Germany
-----
Full Name:TSIRIKOS Athanasios
Gender:Male
Country:Greece
-----
Full Name:BAEK Sunjin
Gender:Female
Country:Republic of Korea
-----
Full Name:CHOI Gangin
Gender:Male
Country:Republic of Korea
-----
Full Name:HAN Jiwoo
Gender:Female
Country:Republic of Korea
-----
Full Name:KANG Jiho
Gender:Male
Country:Republic of Korea
-----
Full Name:KIM Gyeongbin
Gender:Male
Country:Republic of Korea
-----
Full Name:LEE Yejoo
Gender:Female
Country:Republic of Korea
-----
Full Name:LEE Wonseop
Gender:Male
Country:Republic of Korea
-----
Full Name:OH Sooyeon
Gender:Female
Country:Republic of Korea
-----
Full Name:JANSEN Inge
Gender:Female
Country:Netherlands
-----
Full Name:PRAASTERINK Else
Gender:Female
Country:Netherlands
-----
Full Name:VAN DUIJN Celine
Gender:Female
Country:Netherlands
-----
Full Name:BLAZOWSKA Aleksandra
Gender:Female
Country:Poland
-----
Full Name:JACHIM Filip
Gender:Male
Country:Poland
-----
Full Name:LESIAK Kacper
Gender:Male
Country:Poland
-----
Full Name:LUKASZEWICZ Robert
Gender:Male
Country:Poland
-----
Full Name:RZESZUTEK Andrzej
Gender:Male
Country:Poland
-----
Full Name:SKRZEK Kaja
Gender:Female
Country:Poland
-----
Full Name:MUSCALU Nicoleta-Angelica
Gender:Female
Country:Romania
-----
Full Name:COQUOZ Madeline
Gender:Female
Country:Switzerland
-----
Full Name:DUTOIT Guillaume
Gender:Male
Country:Switzerland
-----
Full Name:SUCKOW Jonathan
Gender:Male
Country:Switzerland
-----
Full Name:LUNDIN Amanda
Gender:Female
Country:Sweden
-----
Full Name:AVANESOV Danylo
Gender:Male
Country:Ukraine
-----
Full Name:AZAROV Kyrylo
Gender:Male
Country:Ukraine
-----
Full Name:CHYZHOVSKYI Bohdan
Gender:Male
Country:Ukraine
-----
Full Name:HRYTSENKO Mark
Gender:Male
Country:Ukraine
-----
Full Name:KESAR Viktoriya
Gender:Female
Country:Ukraine
-----
Full Name:KONOVALOV Danylo
Gender:Male
Country:Ukraine
-----
Full Name:NAUMENKO Yevhen
Gender:Male
Country:Ukraine
-----
Full Name:OLIFERCHYK Stanislav
Gender:Male
Country:Ukraine
-----
Full Name:PYSMENSKA Anna
Gender:Female
Country:Ukraine
-----
Full Name:KACHANOV Vyacheslav
Gender:Male
Country:Uzbekistan
-----
Full Name:MYALIN Igor
Gender:Male
Country:Uzbekistan
-----
Full Name:MULLER Jette
Rank:1
Score:51.60 + 52.00 + 51.75 + 46.80 + 46.80 = 248.95
-----
Full Name:ROLLINSON Amy
Rank:2
Score:46.00 + 42.90 + 50.70 + 54.00 + 46.80 = 240.40
-----
Full Name:SKRZEK Kaja
Rank:3
Score:50.40 + 46.80 + 48.30 + 45.60 + 48.75 = 239.85
-----
Full Name:BENT-ASHMEIL Desharne
Rank:4
Score:46.80 + 50.70 + 48.30 + 43.20 + 45.50 = 234.50
-----
Full Name:JASMIN Amelie-Laura
Rank:5
Score:50.40 + 45.50 + 43.70 + 46.80 + 43.75 = 230.15
-----
Full Name:BLAZOWSKA Aleksandra
Rank:6
Score:43.20 + 44.85 + 45.60 + 53.30 + 41.80 = 228.75
-----
Full Name:WILSON Aimee
Rank:7
Score:50.40 + 44.85 + 38.40 + 44.20 + 50.70 = 228.55
-----
Full Name:OH Sooyeon
Rank:8
Score:45.60 + 36.80 + 46.80 + 46.80 + 46.80 = 222.80
-----
Full Name:LEE Yejoo
Rank:9
Score:43.20 + 41.40 + 43.20 + 41.60 + 39.60 = 209.00
-----
Full Name:JELINKOVA Tereza
Rank:10
Score:46.80 + 42.90 + 41.40 + 26.40 + 38.50 = 196.00
-----
Full Name:SHARIA Tekle
Rank:11
Score:38.40 + 41.60 + 30.00 + 30.45 + 34.10 = 174.55
-----
Full Name:SANTIAGO Dominique
Rank:12
Score:42.00 + 18.20 + 35.70 + 34.50 + 32.55 = 162.95
-----
Full Name:MULLER Jette
Rank:1
Score:51.60 + 52.00 + 51.75 + 46.80 + 46.80 = 248.95
-----
Full Name:ROLLINSON Amy
Rank:2
Score:46.00 + 42.90 + 50.70 + 54.00 + 46.80 = 240.40
-----
Full Name:SKRZEK Kaja
Rank:3
Score:50.40 + 46.80 + 48.30 + 45.60 + 48.75 = 239.85
-----
Full Name:BENT-ASHMEIL Desharne
Rank:4
Score:46.80 + 50.70 + 48.30 + 43.20 + 45.50 = 234.50
-----
Full Name:JASMIN Amelie-Laura
Rank:5
Score:50.40 + 45.50 + 43.70 + 46.80 + 43.75 = 230.15
-----
Full Name:BLAZOWSKA Aleksandra
Rank:6
Score:43.20 + 44.85 + 45.60 + 53.30 + 41.80 = 228.75
-----
Full Name:WILSON Aimee
Rank:7
Score:50.40 + 44.85 + 38.40 + 44.20 + 50.70 = 228.55
-----
Full Name:OH Sooyeon
Rank:8
Score:45.60 + 36.80 + 46.80 + 46.80 + 46.80 = 222.80
-----
Full Name:LEE Yejoo
Rank:9
Score:43.20 + 41.40 + 43.20 + 41.60 + 39.60 = 209.00
-----
Full Name:JELINKOVA Tereza
Rank:10
Score:46.80 + 42.90 + 41.40 + 26.40 + 38.50 = 196.00
-----
Full Name:SHARIA Tekle
Rank:11
Score:38.40 + 41.60 + 30.00 + 30.45 + 34.10 = 174.55
-----
Full Name:SANTIAGO Dominique
Rank:12
Score:42.00 + 18.20 + 35.70 + 34.50 + 32.55 = 162.95
N/A
-----
Full Name:HART Alexander
Gender:Male
...
...
DWASearch/src/main/java/org/example/DWASearch.java
浏览文件 @
2f554b07
...
...
@@ -11,7 +11,7 @@ import java.nio.charset.StandardCharsets;
public
class
DWASearch
{
public
static
void
main
(
String
[]
args
)
{
public
static
void
main
(
String
[]
args
)
throws
IOException
{
if
(
args
.
length
<
2
)
{
System
.
out
.
println
(
"Usage: java -jar DWASearch.jar input.txt output.txt"
);
return
;
...
...
@@ -19,14 +19,11 @@ public class DWASearch {
String
inputFile
=
args
[
0
];
String
outputFile
=
args
[
1
];
try
(
BufferedReader
br
=
new
BufferedReader
(
new
FileReader
(
inputFile
));
BufferedWriter
bw
=
new
BufferedWriter
(
new
FileWriter
(
outputFile
)))
{
String
line
;
//from here
while
((
line
=
br
.
readLine
())
!=
null
)
{
// Process the input data here
// For example, write the input data to the output file
BufferedReader
br
=
new
BufferedReader
(
new
FileReader
(
inputFile
));
BufferedWriter
bw
=
new
BufferedWriter
(
new
FileWriter
(
outputFile
));
String
line
;
while
((
line
=
br
.
readLine
())
!=
null
)
{
try
{
String
[]
word
=
line
.
split
(
" "
);
//from here
...
...
@@ -45,38 +42,17 @@ public class DWASearch {
getResultSimple
(
jsonFile
,
bw
);
}
}
}
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
}
else
{
//指令无法识别时
bw
.
write
(
"Error\n-----\n"
);
}
// String outputFile = "output.txt";
//
// try (BufferedWriter bw = new BufferedWriter(new FileWriter(outputFile))) {
// String line = "result women 1m springboard";
// String[] word = line.split(" ");
// //from here
//
// if(word[0].equals("players")&&word.length==1)
// {//功能一
// String jsonFile = "src/data/athletes.json";
// getAthletes(jsonFile,bw);
// }else if(word[0].equals("result")){
// if(word[word.length-1].equals("detail")){
// //附加功能
//
//
// }else{
// //功能二
// String[] word1 = line.split(" ",2);//提取文件名
// String jsonFile = "src/data/" +word1[1]+ ".json";
// getResultSimple(jsonFile,bw);
// }
// }
//
// } catch (IOException e) {
// e.printStackTrace();
// }
}
catch
(
IOException
e
)
{
//文件路径找不到
bw
.
write
(
"N/A\n-----\n"
);
e
.
printStackTrace
();
}
}
br
.
close
();
bw
.
close
();
}
//功能一
...
...
@@ -121,4 +97,6 @@ public class DWASearch {
}
}
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录