Squirrels have fuzzy tails.
0 Members and 1 Guest are viewing this topic.
System Warming Up...........Initialization Complete 9 0 112 176 0 0 0 0 0speed=1max_bulk=20155 0 113 177 0 0 0 0 0286 0 112 179 3 3 3 3 78279 0 112 178 0 0 0 0 0270 0 112 176 2 2 2 3 154271 0 113 176 3 3 3 3 95273 0 114 176 1 1 1 1 55279 0 115 178 1 1 1 1 7286 0 113 177 0 0 0 0 0293 0 110 179 3 3 3 3 21298 0 109 178 1 1 1 1 86437 0 109 180 1 1 1 1 72288 0 112 179 1 1 1 1 98279 0 115 176 0 0 0 0 0271 0 117 174 3 3 3 3 134271 0 117 176 2 2 2 2 87272 0 116 177 1 1 1 1 62speed=3max_bulk=60155 0 113 177 0 0 0 0 0283 0 112 177 2 2 1 1 1283 0 112 177 1 1 1 1 3286 0 112 176 0 0 0 0 2274 0 112 176 2 2 3 3 131277 0 113 177 0 0 0 0 0278 0 113 176 0 0 0 0 0267 0 112 177 3 3 3 3 96269 0 113 177 1 1 1 1 47272 0 113 176 0 0 0 0 62266 0 112 177 2 2 2 2 72266 0 111 177 0 1 1 1 34269 0 112 178 0 0 0 0 29268 0 112 177 1 1 1 1 52269 0 112 178 0 0 0 0 27272 0 113 178 0 0 0 0 0274 0 113 176 2 2 2 2 12275 0 112 177 0 0 0 0 0278 0 111 179 0 0 0 0 3283 0 111 178 1 1 1 1 1283 0 111 178 1 2 1 1 8286 0 111 177 0 0 0 0 1289 0 112 175 3 3 3 3 93291 0 112 177 1 1 1 1 44295 0 112 177 0 0 0 0 0292 0 112 177 2 2 2 2 67293 0 112 178 0 0 0 0 28298 0 112 177 0 0 0 0 0289 0 112 176 1 2 2 2 61291 0 112 178 0 0 0 0 1436 0 113 178 0 0 0 0 11284 0 114 176 2 1 1 1 2283 0 112 176 1 1 0 0 2286 0 112 176 0 0 0 0 1274 0 111 177 2 2 2 2 130277 0 111 177 1 1 1 1 1278 0 112 177 0 0 0 0 0267 0 110 177 3 3 3 3 97268 0 112 176 1 1 1 1 45273 0 113 176 0 0 0 0 57266 0 112 177 2 2 2 2 67
import java.io.*; import java.util.*; public class Process { public static void main(String[] args) throws Exception { int count = 0; int[] data = new int[9]; int pos = 0; int speed = 2; int bulk = 20; long time; time = System.currentTimeMillis(); Scanner s = new Scanner(new File("data.txt")); while(s.hasNextLine()) { count++; String line = s.nextLine(); if(line.length() == 0) break; if(line.substring(0,1).compareTo("s") == 0) { System.out.println("Speed: " + speed + " Bulk: " + bulk); for(int i = 0; i < 9; i++) { System.out.print(data[i]/count + "\t"); } System.out.println(); System.out.println(); count = 0; data = new int[9]; speed = Integer.parseInt(line.substring(6,7)); if(speed == 0) { System.out.println(); System.out.println(System.currentTimeMillis() - time); return; } String b = s.nextLine(); bulk = Integer.parseInt(b.substring(9,11)); line = s.nextLine(); } StringTokenizer st = new StringTokenizer(line); while (st.hasMoreTokens()) { int i = Integer.parseInt(st.nextToken()); data[pos] += i; pos++; } pos = 0; } } }
----jGRASP exec: java ProcessSpeed: 2 Bulk: 20287 114 172 0 0 0 0 33 0 Speed: 3 Bulk: 20284 114 171 0 0 0 0 25 0 Speed: 4 Bulk: 20282 114 171 0 0 0 0 23 0 Speed: 5 Bulk: 20281 114 171 0 0 0 0 15 0 Speed: 2 Bulk: 40287 114 180 0 0 0 0 41 0 Speed: 3 Bulk: 40284 114 176 0 0 0 0 39 0 Speed: 4 Bulk: 40283 114 175 0 0 0 0 36 0 Speed: 5 Bulk: 40282 114 176 0 0 0 0 28 0 Speed: 2 Bulk: 60287 115 195 0 0 0 0 34 0 Speed: 3 Bulk: 60284 114 179 0 0 0 0 39 0 Speed: 4 Bulk: 60283 113 177 0 0 0 0 37 0 Speed: 5 Bulk: 60282 114 177 0 0 0 0 30 0 Speed: 2 Bulk: 80287 115 200 0 0 0 0 32 0 Speed: 3 Bulk: 80284 113 184 0 0 0 0 31 0 Speed: 4 Bulk: 80283 113 179 0 0 0 0 34 0 Speed: 5 Bulk: 80282 114 179 0 0 0 0 35 0 312
how do I do this step?- multiply each averaged column value by another valuethen this step?- subtract column value in Water datafile by equivalent column value in Air datafile
(ps - I suck at Java )
didn't you have to take 15-100?(i'm a current cmu student, we've met)
Results for "data_file_water.txt" and "data_file_air.txtProcessed on Mon. August 10,2009 08:10:27 AMWater:speed=2 max_bulk=20 Air:speed=2 max_bulk=20 0.03 0.00 0.17 -4.49 -0.02 -0.02 -0.04 0.00 2.20 Water:speed=3 max_bulk=20 Air:speed=3 max_bulk=20-0.06 0.00 0.12 -5.80 0.00 0.00 -0.01 -0.04 -3.82 Water:speed=4 max_bulk=20 Air:speed=4 max_bulk=200.01 0.00 0.09 -5.65 -0.01 -0.01 -0.01 -0.01 0.53 Water:speed=5 max_bulk=20 Air:speed=5 max_bulk=20-0.06 0.00 0.08 -5.75 0.01 0.01 0.01 0.01 -2.93 Water:speed=2 max_bulk=40 Air:speed=2 max_bulk=40-0.33 0.00 0.78 3.29 0.04 0.02 0.02 0.05 6.03 Water:speed=3 max_bulk=40 Air:speed=3 max_bulk=400.02 0.00 0.01 -1.09 -0.02 -0.02 -0.01 0.00 1.31 Water:speed=4 max_bulk=40 Air:speed=4 max_bulk=400.09 0.00 -0.01 -1.40 -0.03 -0.02 -0.02 0.00 3.88 Water:speed=5 max_bulk=40 Air:speed=5 max_bulk=400.05 0.00 0.10 -1.25 0.01 0.01 0.02 0.05 1.49 Water:speed=2 max_bulk=60 Air:speed=2 max_bulk=60-0.13 0.00 1.67 17.89 -0.08 -0.07 -0.06 -0.03 5.51 Water:speed=3 max_bulk=60 Air:speed=3 max_bulk=60-0.32 0.00 0.02 2.52 -0.06 -0.06 -0.05 -0.03 2.33 Water:speed=4 max_bulk=60 Air:speed=4 max_bulk=600.01 0.00 -0.04 0.72 -0.01 -0.01 -0.01 -0.01 1.49 Water:speed=5 max_bulk=60 Air:speed=5 max_bulk=60-0.05 0.00 0.09 0.63 -0.03 -0.02 -0.01 -0.02 1.59 Water:speed=2 max_bulk=80 Air:speed=2 max_bulk=800.21 0.00 1.79 23.34 0.11 0.11 0.12 0.12 9.24 Water:speed=3 max_bulk=80 Air:speed=3 max_bulk=80-0.14 0.00 0.02 6.81 0.00 -0.01 -0.03 -0.03 3.99 Water:speed=4 max_bulk=80 Air:speed=4 max_bulk=80-0.25 0.00 0.03 2.59 -0.02 -0.02 -0.02 0.00 1.01 Water:speed=5 max_bulk=80 Air:speed=5 max_bulk=800.05 0.00 0.17 1.97 -0.01 -0.02 -0.02 -0.04 4.70
Quote from: wil.hamilton on August 06, 2009, 01:48:57 PMdidn't you have to take 15-100?(i'm a current cmu student, we've met)When I took 15-100 to 15-whatever, it was all taught using C++. They moved to Java the year after my CS classes. Probably a good thing, as C++ is more similar to C, which is great for microcontrollers. I had to use Java once for a class, but don't really remember any of it.I graduated in 2004 . . . met where?
mobot 2008 (14th), we were both competitors, we talked for a few minutes between heats, i'm still a student there
Quote from: wil.hamilton on August 11, 2009, 06:47:24 PMmobot 2008 (14th), we were both competitors, we talked for a few minutes between heats, i'm still a student therewhich bot was yours?