Skip to content
Snippets Groups Projects
Commit ab884daf authored by Ray Liu's avatar Ray Liu
Browse files

Finished hisogram and documentation and windows script

parent e8406ba7
No related branches found
No related tags found
No related merge requests found
package data;
/**
* Enumeration of classifications of Taxa.
* Enumeration of classifications of Taxontype.
* @author Christopher W. Schankula
*
*/
//Changed to only capitalizing the first character
public enum TaxonType {
Kingdom, Phylum, Class, Order,
Family, Genus, Species, Subspecies;
......
......@@ -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
package sort;
/**
* Enumeration of bound types.
* @author Christopher W. Schankula
*
*/
public enum Bound {
LOWER, UPPER, LOWHIGH, ANY, EQUALS;
}
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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment