You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/tutorials/text/data/index.mdx
+19-19Lines changed: 19 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -46,7 +46,7 @@ In [Strings and Drawing Text](http://processing.org/learning/text/), we saw how
46
46
47
47
<FixedImagecenterwidth={333}height={222}>
48
48
49
-

49
+

50
50
51
51
</FixedImage>
52
52
@@ -193,7 +193,7 @@ Once the text file is in place, Processing’s `loadStrings()` function is used
193
193
194
194
<FixedImagecenterwidth={333}height={130}>
195
195
196
-

196
+

197
197
198
198
</FixedImage>
199
199
@@ -208,7 +208,7 @@ To run the code, create a text file called “file.txt,” type a bunch of lines
208
208
209
209
<FixedImagecenterwidth={333}height={130}>
210
210
211
-

211
+

212
212
213
213
</FixedImage>
214
214
@@ -218,7 +218,7 @@ The results of visualizing this data are shown below.
218
218
219
219
<FixedImagesidewidth={200}height={200}>
220
220
221
-

221
+

222
222
223
223
</FixedImage>
224
224
@@ -252,7 +252,7 @@ A table consists of data arranged as a set of rows and columns, also called “t
252
252
253
253
<FixedImagecenterwidth={333}height={130}>
254
254
255
-

255
+

256
256
257
257
</FixedImage>
258
258
@@ -278,7 +278,7 @@ Now that the table is loaded, I can show how you grab individual pieces of data
278
278
279
279
<FixedImagecenterwidth={645}height={222}>
280
280
281
-

281
+

282
282
283
283
</FixedImage>
284
284
@@ -367,7 +367,7 @@ The following example puts all of the above code together. Notice how each row o
367
367
368
368
<FixedImagecenterwidth={500}height={375}>
369
369
370
-

370
+

371
371
372
372
</FixedImage>
373
373
@@ -477,7 +477,7 @@ Here, the distance between a given point and a circle's center is compared to th
477
477
478
478
<FixedImagecenterwidth={406}height={210}>
479
479
480
-

480
+

481
481
482
482
</FixedImage>
483
483
@@ -568,15 +568,15 @@ An example of data only available as HTML is the [Internet Movie Database](http:
568
568
569
569
<FixedImagecenterwidth={333}height={234}>
570
570
571
-

571
+

572
572
573
573
</FixedImage>
574
574
575
575
Looking in the HTML source from the above URL, I find a giant mess of markup.
576
576
577
577
<FixedImagecenterwidth={333}height={233}>
578
578
579
-

579
+

580
580
581
581
</FixedImage>
582
582
@@ -623,7 +623,7 @@ The following code retrieves both the running time and movie poster iamge from I
623
623
624
624
<FixedImagecenterwidth={333}height={388}>
625
625
626
-

626
+

627
627
628
628
</FixedImage>
629
629
@@ -700,15 +700,15 @@ As you learned earlier, an array is an ordered list of variables. Each element o
700
700
701
701
<FixedImagecenterwidth={355}height={174}>
702
702
703
-

703
+

704
704
705
705
</FixedImage>
706
706
707
707
However, what if instead of numbering the elements of an array you could name them? This element is named “Sue,” this one “Bob,” this one “Jane,” and so on and so forth. In programming, this kind of data structure is often referred to as an _associative array, map,_ or _dictionary._ It’s a collection of (key, value) pairs. Imagine you had a dictionary of people's ages. When you look up “Sue” (the key), the definition, or value, is her age, 24.
708
708
709
709
<FixedImagecenterwidth={354}height={173}>
710
710
711
-

711
+

712
712
713
713
</FixedImage>
714
714
@@ -757,7 +757,7 @@ The concordance now becomes a rather simple program to write. All I need to do i
757
757
758
758
<FixedImagecenterwidth={333}height={394}>
759
759
760
-

760
+

761
761
762
762
</FixedImage>
763
763
@@ -832,7 +832,7 @@ XML organizes information in a tree structure. Let’s imagine a list of student
832
832
833
833
<FixedImagecenterwidth={500}height={320}>
834
834
835
-

835
+

836
836
837
837
</FixedImage>
838
838
@@ -893,7 +893,7 @@ The data is mapped in the tree stucture shown below:
893
893
894
894
<FixedImagecenterwidth={500}height={214}>
895
895
896
-

896
+

897
897
898
898
</FixedImage>
899
899
@@ -972,7 +972,7 @@ Following is the above code put together in an example that retrieves weather da
972
972
973
973
<FixedImagecenterwidth={200}height={129}>
974
974
975
-

975
+

976
976
977
977
</FixedImage>
978
978
@@ -1055,7 +1055,7 @@ I can use `getChildren()` to retrieve the array of `<bubble>` elements and make
1055
1055
1056
1056
<FixedImagecenterwidth={500}height={375}>
1057
1057
1058
-

1058
+

1059
1059
1060
1060
</FixedImage>
1061
1061
@@ -1429,7 +1429,7 @@ In the above example, I likely don't want to request the data sixty times per se
1429
1429
1430
1430
<FixedImagecenterwidth={200} height={78}>
1431
1431
1432
-

1432
+

0 commit comments