@@ -138,7 +138,7 @@ <h3>Splitting and Joining Strings</h3>
138138// Converting the String array to an int array
139139int[] list = int(split(numbers, ','));
140140int sum = 0;
141- for (int i = 0; i < list .length; i++ ) {
141+ for (int i = 0; i< list.length; i++ ) {
142142 sum = sum + list[i];
143143}
144144println(sum);
@@ -266,7 +266,7 @@ <h3>Working with Text Files</h3>
266266void draw() {
267267 background(255);
268268 stroke(0);
269- for (int i = 0; i < data .length; i++) {
269+ for (int i = 0; i< data.length; i++) {
270270 // Use array of ints to set the color and height of each rectangle.
271271 rect(i*20, 0, 20, data[i]);
272272 }
@@ -360,7 +360,7 @@ <h3>Tabular Data</h3>
360360 </ p >
361361
362362< pre >
363- for (int i = 0; i < table .getRowCount(); i++) {
363+ for (int i = 0; i< table.getRowCount(); i++) {
364364
365365 // Access each row of the table one at a time, in a loop.
366366 TableRow row = table.getRow(i);
@@ -407,7 +407,7 @@ <h3>Tabular Data</h3>
407407
408408< pre >
409409// If the table has more than 10 rows
410- if (table.getRowCount() > 10) {
410+ if (table.getRowCount()> 10) {
411411
412412//Delete the first row (index 0).
413413 table.removeRow(0);
@@ -437,7 +437,7 @@ <h3>Tabular Data</h3>
437437void draw() {
438438 background(255);
439439 // Display all bubbles
440- for (int i = 0; i < bubbles .length; i++) {
440+ for (int i = 0; i< bubbles.length; i++) {
441441 bubbles[i].display();
442442 }
443443}
@@ -448,7 +448,7 @@ <h3>Tabular Data</h3>
448448 bubbles = new Bubble[table.getRowCount()];
449449
450450
451- for (int i = 0; i < table.getRowCount(); i++) {
451+ for (int i = 0; i< table.getRowCount(); i++) {
452452
453453 // Iterate over all the rows in a table.
454454 TableRow row = table.getRow(i);
@@ -474,7 +474,7 @@ <h3>Tabular Data</h3>
474474 row.setString("name", "Blah");
475475
476476 // If the table has more than 10 rows, delete the oldest row.
477- if (table.getRowCount() > 10) {
477+ if (table.getRowCount()> 10) {
478478 table.removeRow(0);
479479 }
480480
@@ -502,7 +502,7 @@ <h3>Tabular Data</h3>
502502 // Checking if mouse is over the bubble
503503 void rollover(float px, float py) {
504504 float d = dist(px, py, x, y);
505- if (d < diameter /2) {
505+ if (d< diameter/2) {
506506 over = true;
507507 } else {
508508 over = false;
@@ -536,7 +536,7 @@ <h3>Tabular Data</h3>
536536
537537< pre >
538538boolean rollover(int mx, int my) {
539- if (dist(mx, my, x, y) < diameter /2) {
539+ if (dist(mx, my, x, y)< diameter/2) {
540540 return true;
541541 } else {
542542 return false;
@@ -883,7 +883,7 @@ <h3>Text Analysis</h3>
883883
884884
885885
886- for (int i = 0; i < allwords .length; i++) {
886+ for (int i = 0; i< allwords.length; i++) {
887887 // It's useful to convert each word to lower case so that,
888888 // for example, “The” and “the” are both counted as the same word.
889889 String s = allwords[i].toLowerCase();
@@ -907,7 +907,7 @@ <h3>Text Analysis</h3>
907907 String[] keys = concordance.keyArray();
908908
909909
910- for (int i = 0; i < height/h; i++) {
910+ for (int i = 0; i< height/h; i++) {
911911 // Look at each key one at a time and retrieve its count.
912912 String word = keys[i];
913913 int count = concordance.get(word);
@@ -1528,7 +1528,7 @@ <h3><tt>JSONObject</tt> and <tt>JSONArray</tt></h3>
15281528 bubbles = new Bubble[bubbleData.size()];
15291529
15301530
1531- for (int i = 0; i < bubbleData .size(); i++) {
1531+ for (int i = 0; i< bubbleData.size(); i++) {
15321532
15331533 // Iterate through the array, grabbing each JSON object one at a time.
15341534 JSONObject bubble = bubbleData.getJSONObject(i);
@@ -1659,7 +1659,7 @@ <h3>Threads</h3>
16591659 stroke(0);
16601660 //Ddraw a little animation to demonstrate that the draw() loop never pauses.
16611661 rotate(frameCount*0.04);
1662- for (int i = 0; i < 10 ; i++) {
1662+ for (int i = 0; i< 10; i++) {
16631663 rotate(radians(36));
16641664 line(5, 0, 10, 0);
16651665 }
0 commit comments