Lick provided a guide for decades of computer research to follow. In 1962, Lick was asked by the Director of the Advanced Research Projects Agency (ARPA). This program led the way to commercial time-sharing in the late 60s and to networking in the mid-70s. "It seems reasonable to envision, for a time 10 or 15 years hence, a 'thinking center' that will incorporate the functions of present-day libraries together with anticipated advances in information storage and retrieval and the symbiotic functions suggested earlier in this paper. The picture readily enlarges itself into a network of such centers, connected to one another by wide-band communication lines and to individual users by leased-wire services. In such a system, the speed of the computers would be balanced, and the cost of the gigantic memories and the sophisticated programs would be divided by the number of users." Licklider, pg. 8 SAGE sites were connected to multiple radar stations which transmitted tracking data (range and azimuth) in digitized format by modem over ordinary telephone lines. These digitized inputs were automatically prepared from analog radar inputs by the AN/FST-2B (or successor, AN/FYQ-47[1]) at the radar stations. The SAGE computers then collected the tracking data for display on a CRT as icons. Situation Display (SD) console operators at the center could select any of the "targets" on the display with a light gun, and then display additional information about the tracking data reported by the radar stations. The total engineering effort for SAGE was immense. Total project cost remains unknown, but estimates place it between 8 and 12 billion 1964 dollars, around 55 billion 2000 dollars, more than the Manhattan Project that developed the nuclear bomb that SAGE defended against. In peacetime SAGE was, for all intents, an air traffic control system and it influenced the design of the FAA's automated control systems. Can not save a class in a folder with the same name as the class - generates an error. Chapter 9 ARRAYS VIEW: "arraysCh9.pde" You can think of an array as a list of variables or data. It is possible to have an array of any data type (intergers, floating point numbers, expressions, variables, objects). Array lists are use to: 1. keep track of the elements in the list themselves 2. the list keeps track of the order of those elements (which element is the first in the list, the second, the third, etc.). The first element of an array is [0], the second element is [1]... and so on. Syntax for array declaration and array size assignment: int[] arrayOfIntsOrAnyName = new int [30]; First declare the data type (same as variables). Then the empty square brackets denotes an array followed by the name of the array and the size that the array will equal by using the "new" operator following the equal sign. Arrays are similar to objects, so they must be created with the keyword new. Every array has a variable length which is an integer value for the total number of elements in the array. In an array, each element of the list has a unique index, an integer value that designates its position in the list starting at zero. In all cases, the name of the array refers to the list as a whole, while each element is accessed via its position or index. Declaring and creating an Array Initialize elements of an array one at a time - arrayName[index]: int[] stuff = new int [3]; stuff[0]= 6; stuff[1]=8; stuff[2]=5; //third element of array stuff initializing all at once: int[] stuff = {6, 8, 5}; If there are many elements to an array, it is best to use a while or for loop... int i = 0; while (i < 1000) { values[i] = random(0,10); i = i+1; //each new i has an added value } Using for loop for (int i = 0; i< 1000; i++) { values[i] = random(0,10); } VIEW: "basicArray.pde" The size of an array may be based on a variable. Processing provides the keyword "length" to access the size of an array - arrayName.length: for (int i = 0; i< values.length; i++) { values[i] = random(0,10); } Review of building classes: A class is a composite of data and methods (functions) which may be instantiated as objects. The first letter of a class name is usually uppercase to separate it from other kinds of variables. class ClassName { statements } REVIEW BUTTON EXAMPLE - buttonClassEx9_8 Arrays in relation to the popularity of objects in relation to GUI Manipulating the number of an array (9.9) Technically speaking, when you allocate 10 spots in an array, you have told Processing exactly how much space in memory you intend to use. You can’t expect that block of memory to happen to have more space next to it so that you can expand the size of your array. However, there is no reason why you couldn’t just make a new array (one that has 11 spots in it), copy the first 10 from your original array, and pop a new Button object in the last spot. Processing , in fact, offers a set of array functions that manipulate the size of an array by managing this process for you. They are: shorten( ), concat( ), subset( ), append( ), splice( ), and expand( ) . In addition, there are functions for changing the order in an array, such as sort( ) and reverse( ). REVIEW ballsClassEx9_11 Practice: classFirefly classFireflies ---------------- Artist Example: http://artport.whitney.org/commissions/thedumpster/dumpster.shtml The outside world Adding libraries: In the folder where your sketches are saved (preferences default User > Documents > Processing worked in User > Library > Processing) add a "libraries" folder. Loading HTML and XML documents is convenient for pulling information from the web, however, for more sophisticated applications, many sites offer an API. An API (Application Programming Interface) is an interface through which one application can access the services of another. There are many APIs that can be used with Processing and you might look through the Data / Protocols section of the Processing libraries web page for some ideas. http://www.learningprocessing.com/tutorials/yahoo/ We have bundled together libraries and example code for accessing the Yahoo! Search Web Services as a Software Development Kit (SDK). As more examples are written both inside and outside of Yahoo!, we may add them to this SDK. You make a YahooSearch object and call the search() function. When the search is completed, it will arrive in an event callback: searchEvent(). There, you can ask for URLs, titles, or summaries (all available as String arrays).