Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
2XB3FinalProject
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Analyze
Contributor analytics
Repository analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Christopher Schankula
2XB3FinalProject
Commits
ab884daf
Commit
ab884daf
authored
6 years ago
by
Ray Liu
Browse files
Options
Downloads
Patches
Plain Diff
Finished hisogram and documentation and windows script
parent
e8406ba7
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
src/data/TaxonType.java
+2
-2
2 additions, 2 deletions
src/data/TaxonType.java
src/search/Histogram.java
+12
-6
12 additions, 6 deletions
src/search/Histogram.java
src/sort/Bound.java
+5
-1
5 additions, 1 deletion
src/sort/Bound.java
tomcat/windows-script.py
+12
-13
12 additions, 13 deletions
tomcat/windows-script.py
with
31 additions
and
22 deletions
src/data/TaxonType.java
+
2
−
2
View file @
ab884daf
package
data
;
/**
* Enumeration of classifications of Tax
a
.
* Enumeration of classifications of Tax
ontype
.
* @author Christopher W. Schankula
*
*/
//Changed to only capitalizing the first character
public
enum
TaxonType
{
Kingdom
,
Phylum
,
Class
,
Order
,
Family
,
Genus
,
Species
,
Subspecies
;
...
...
This diff is collapsed.
Click to expand it.
src/search/Histogram.java
+
12
−
6
View file @
ab884daf
...
...
@@ -38,12 +38,18 @@ public class Histogram {
int
max
=
0
;
int
scale
=
100
;
Iterable
<
Integer
>
results
=
record
.
keys
();
//Finds the max individual count
for
(
Integer
year:
results
)
{
if
(
max
<
record
.
get
(
year
))
max
=
record
.
get
(
year
);
}
//Based the scale on the max
System
.
out
.
println
(
" |"
+
(
new
String
(
new
char
[
scale
]).
replace
(
'\0'
,
'-'
))
+
"|"
);
String
format
=
"%1$-5d|%2$-"
+
(
scale
+
1
)
+
"s"
;
//Print out histogram based on scale
for
(
Integer
year:
results
)
{
String
s
=
"="
;
int
loopc
=
(
int
)
((
float
)(
record
.
get
(
year
)/
(
float
)
max
)
*
scale
);
...
...
@@ -56,7 +62,11 @@ public class Histogram {
System
.
out
.
format
(
"Scale: one = is %d individuals.\n"
,
max
/
scale
);
}
/**
* Gets the count of the record
*
* @param sum count of the record
*/
public
static
int
sum
(
Iterable
<
Record
>
records
)
{
int
sum
=
0
;
for
(
Record
r:
records
)
...
...
@@ -64,8 +74,4 @@ public class Histogram {
return
sum
;
}
public
static
void
main
(
String
[]
args
)
{
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
src/sort/Bound.java
+
5
−
1
View file @
ab884daf
package
sort
;
/**
* Enumeration of bound types.
* @author Christopher W. Schankula
*
*/
public
enum
Bound
{
LOWER
,
UPPER
,
LOWHIGH
,
ANY
,
EQUALS
;
}
This diff is collapsed.
Click to expand it.
tomcat/windows-script.py
+
12
−
13
View file @
ab884daf
import
subprocess
pathToTomcat
=
"
C:
\\
Users
\\
liang
\\
Documents
\\
Git
\\
Trawl
\\
src
\\
tomcat
"
# REPLACE ME - CUSTOM
pathToTomcat
=
"
\
"
C:
\\
Users
\\
Ray Liu
\\
Desktop
\\
Uni
\\
Second year
\\
2xb3
\\
2XB3
"
# REPLACE ME - CUSTOM
pathToSrc
=
"
\\
webapps
\\
Trawl
\\
bin
\\
com
\\
example
\\
"
pathToFin
=
"
\\
webapps
\\
Trawl
\\
WEB-INF
\\
classes
\
\
com
\\
example
\\
"
pathClasspath
=
pathToTomcat
+
"
\\
lib
\\
servlet-api.jar;
"
+
pathToTomcat
+
"
\\
webapps
\\
Trawl
\\
bin
"
pathToSrc
=
"
\\
bin
\"
"
pathToFin
=
"
\\
tomcat
\\
webapps
\\
Trawl
\\
WEB-INF
\\
classes
\
"
"
#
pathClasspath = pathToTomcat + "\\lib\\servlet-api.jar;" + pathToTomcat + "\\webapps\\Trawl\\bin"
compileCMD1
=
"
javac -cp
"
+
pathClasspath
+
"
"
+
pathToTomcat
+
pathToSrc
+
"
web
\\
Director.java
"
compileCMD2
=
"
javac -cp
"
+
pathClasspath
+
"
"
+
pathToTomcat
+
pathToSrc
+
"
model
\\
TrawlExpert.java
"
#
compileCMD1 = "javac -cp " + pathClasspath + " " + pathToTomcat + pathToSrc + "web\\Director.java"
#
compileCMD2 = "javac -cp " + pathClasspath + " " + pathToTomcat + pathToSrc + "model\\TrawlExpert.java"
# print(compileCMD1)
# print(compileCMD2)
copyCMD1
=
"
copy
"
+
pathToTomcat
+
pathToSrc
+
"
web
\\
Director.class
"
+
"
"
+
pathToTomcat
+
pathToFin
+
"
web
\\
Director.class
"
copyCMD2
=
"
copy
"
+
pathToTomcat
+
pathToSrc
+
"
model
\\
TrawlExpert.class
"
+
"
"
+
pathToTomcat
+
pathToFin
+
"
model
\\
TrawlExpert.class
"
copyCMD1
=
"
xcopy
"
+
pathToTomcat
+
pathToSrc
+
"
"
+
pathToTomcat
+
pathToFin
+
"
"
+
"
/E
"
#print(copyCMD1)
# print(copyCMD1)
# print(copyCMD2)
# Command Processes
subprocess
.
call
(
compileCMD1
,
shell
=
True
)
subprocess
.
call
(
compileCMD2
,
shell
=
True
)
subprocess
.
call
(
copyCMD1
,
shell
=
True
)
subprocess
.
call
(
copyCMD2
,
shell
=
True
)
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment