October 12, 2005
Journal compiled by Kimberly Barnaby
* Compare the array in chapter 5 with the array that is used in the web.
* For example, look at the site www.stonybrook.edu.
* Our project is to build a web-system/e-commerce site that integrates knowledge you have learned throughout the class.
* Today, we will examine how the array is used in your system.
* On the stony brook website, we observed an array of images; there were a total of 10 images in the array.
* There was also an array of 10 texts on the site that corresponds to the images.
* Do you see any problems in the program?
- a loop should have been used.
* Building a search engine using an array:
- put every line of the web page or the HTML into the array
example:
mysearch[0] = "Hello this is Dr. Ebrahimi's webpage"
* What does the "rand(10)" function do?
Generates a random number between 0 & 9.
- example:
______ /_____/'picture' + rand(10) + '.jpg' - this is known as concatenation or overloading.
* For your own business, if you are selling goods, put a tip of the day. Or, you can have a quote of the day for 365 days, etc.
Why is the array faster than the file?
The array is part of the system itself (CPU or RAM), but the file is outside as a secondary storage (USB), making it slower. The file is safer to use though.
Array has to be done manually, but the file can have an array in it.