# Advance Languages # Syllabus Class Time: 12:30-1:45pm MW Location: McCool 202 Instructor: Ziyi(Zeek) Niu email: zn52@msstate.edu Office: McCool 313D Phone: 662-312-7832(Text only, include your Netid) Web site: http://misweb.business.msstate.edu (Go to your instructor's faculty profile page) Important Dates:
Week Data Event
M 1 Jan 7 First day of class
W 1 Jan 9 assignment #1a due
M 2 Jan 14 Last day to register or add a course 8:00 a.m.
W 2 Jan 16 assignment #1b due
M 3 Jan 21 Holiday (No class)
W 3 Jan 23 assignment #1c due
W 4 Jan 30 assignment #2a due
M 5 Feb 4 assignment #2b due
W 5 Feb 6 assignment #3a due
W 6 Feb 13 assignment #4 due
M 7 Feb 18 Exam #1
W 7 Feb 20 assignment #5 due
W 8 Mar 6 assignment #6 due
W 9 Mar 11 assignment \#7 due
M 10 Mar 11 Spring break (no class)
M 11 Mar 18 Exam #2
W 12 Mar 27 assignment #8a due
W 12 Mar 27 assignment #8b due
W 13 Apr 3 assignment #9
W 14 Apr 10 assignment #10
W 15 Apr 17 assignment #11
M 16 Apr 22 Exam #3
W 16 Apr 24 Exam #4
F F Apr26 to May 1 Exam #5
M May 6 Get Final Grades
Course Description: This course follows BIS 1523 (Web Development I) and BIS 2523 (Web Development II), adding much more in-depth coverage of object-oriented programming, using the Java programming language. This course assumes a solid background in web development and computer programming and builds on that background. We will write text-based applications that run from the command line. While doing that, we will talk about Java's many built-in classes, and use those classes to instantiate objects for our programs. We will create our own classes. We will also learn how to read Java's documentation. Throughout all of this we will reinforce general programming concepts that you will have already learned in previous classes. We will write GUI applications, which also run from the command line. Finally, we will write Java servlets, which will remind you of your PHP server-side programming. This is the section of the course which will truly utilize your web development background. During this section, we will read data both from server-based text files and from mysql database tables. We will generate HTML for both entire web pages and for responses to AJAX requests. We will build dynamic, Java-driven web pages. The focus of our effort will be on business applications of the technologies that we cover. Hardware and Software Requirements: You must have full and complete access to a fairly powerful computer for your own practice and homework assignments. There are no Lab computers which are configured with the facilities that you will need in this course. We will be using several different software packages during the semester. All software used in the course is available, free of charge, on our course web site. In Assignment #1, you will install software from the course web site onto your computer. You need a flash drive for working in the lab, and for your programming exams. Study Materials: (required) Course Packet containing Course Information, day-by-day Course Outline, all assignments for the semester, programs for in-class discussion, and previous years’ exams. Each student must have a copy of this packet. You absolutely must bring it to class each day, as it will be the focus of each day’s in-class discussion. (The Course Packet will be available at Copy Cow) (totally optional) Java: The Complete Reference, 9th edition, by Herbert Schildt, published by McGraw Hill, ISBN 978-0071808552. Prerequisites: This is not an introductory computer course! This course covers a great deal of material, and much of it requires a solid prior understanding of computer concepts. To take BIS 3523, you must meet any one of the following three requirements: 1. completed BIS 1523 (Web Development I) and BIS 2523 (Web Development II\_, 2. completed any six hours of university level computer programming, including some experience in web development (ideally, you should be familiar with AJAX programming), 3. have permission of the instructor. In any case, you must have a desire to learn more about programming. Preparation for class: You are responsible for being prepared for each class meeting. The Course Outline shows the subject for each class meeting. If the day's schedule shows a program that we will go over, you should review the program prior to class. Classroom Etiquette: Please get to class on time, and remain seated, reasonably quiet, and attentive throughout class if possible. Don't start packing up your belongings until class is over. How would you like to be on a date and see the other person start packing up to go home while you were in the middle of what you thought was scintillating conversation? If you have a pager or cell phone, please turn it off while you are in class to avoid disruptions. Please don't bring food or drinks to class. As per normal etiquette, caps should not be worn indoors unless the sun is shining so brightly in the room that it's hurting your eyes.
Do not let your cell phone ring during class!
Class Participation: You are encouraged to participate in class! Employers sometimes say that communication skills are a problem area for some of our graduates. I encourage you to work on your communication skills in this class. Ask questions. Answer questions. Volunteer. Be bold. Go for it. Many people refuse to speak up for fear of looking stupid. Let me tell you from my own experience, once you have looked stupid enough times, it will no longer bother you. Believe me, I know! And, seriously, it is highly unlikely that your classmates will actually think you are stupid. It would be virtually impossible for a stupid person to make it this far through the BIS curriculum; no, it is more likely that every person in our class is smart, not stupid. But no one knows everything, so we will all sometimes answer questions incorrectly, and we will all sometimes say something that is wrong. We may even ask a silly question. And we may all laugh about it. That will be a growing experience in itself. You are encouraged to participate in this class! 10 points of your final grade depend on class participation. Class participation points will be determined by the teacher, and are not subject to discussion or debate. In general, you will get a participation point only for asking a good, relevant question, during class. Class participation points will be posted after each class meeting. You may receive a maximum of one participation point per class meeting. You will not receive a participation point if you are late for class, or if you leave during class (even if you return later). Homework: Completion of programming assignments is required. Assignments will not be accepted late. Programs will be graded, online, at some point after that deadline. You do not need to turn in a printed copy of your program. Most of your learning in this class will probably come from the hours that you spend working on the homework programming assignments. It is absolutely essential that you do your best to complete and learn from these assignments.
Do your own work on your programming assignments. The programming assignments are your best preparation for our programming exams. If you can truly write these assignments on your own, and you understand what you are doing, you should do very well on the programming exams. If you use someone else's work on your assignments, or if you blindly type what someone else has written, you will probably do very, very poorly on the programming exams.
Class Attendance: Class is important. Attendance will be checked at each class meeting. It would be good to develop the habit of getting to class on time (this will help you prepare for upcoming jobs in the workplace). You have the opportunity to either add points to, or subtract points from, your final class average, based on your class attendance. If you have fewer than two absences for the semester, you will get 2-n bonus points added to your final average. If you have more than 2 absences, 2n-2 points will be deducted from your final average. The table below shows your attendance bonus points for various numbers of absences.
Total absences Bonus points Total absences Bonus points
0 2 5 -8
1 1 6 -16
2 0 7 -32
3 -2 8 -64
4 -4 9 -128
Student performance data since Fall 2007 shows the importance of class attendance in BIS 3523. Based on the performance of 339 students who have taken the class during that time, each absence lowers a student's course GPA by .3 grade points (one third of a letter grade). Students understand this, which is why 42% of the students during that time have had no absences in the class. We will cover important material in each and every class, and you really should be here every day. You are expected to be at class on time. Being late to a class meeting counts as one-half of an absence. Absences and late arrivals will be posted in the misweb attendance manager. You can check your status at any time, via the Online Gradebook. Grading: The following table shows the allocation of the weights that will be assigned in calculating the final grade. Weekly online quizzes 10% Weekly programming assignments 10% Class participation 10% Exam #1-Exam #4 50% Final Exam 20% You might want to use a spreadsheet to keep track of your grades. Your spreadsheet would look something like:
Item my grade weight grade \* weight
Weekly online quizzes 100 .10 10.0
Weekly programming assignments 100 .10 10.0
Class participation 0 .10 0.0
Exam #1 90 .125 11.25
Exam #2 94 . 125 10.575
Exam #3 96 . 125 10.80
Exam #4 98 . 125 11.025
Final Exam 100 .20 20.0
Final average 83.65
If you ever have a question about a grade, you need to raise that question within seven calendar days of when the grade is posted in the Online Gradebook System (described later in this document). After a grade has been posted for seven days, the grade will not be changed. Letter Grades: Your final average will be calculated to one decimal place, with standard rounding, and final letter grades will be calculated on a 10-point scale. This means that 89.94 will round to 89.9, which is a B, and 89.95 will round to 90.0, which is an A. Your grades will be based on your performance on the various components described elsewhere in this document. Your grade will not be changed for extraneous reasons, such as "if I don't make a B, my dog will dis-own me" or "I HAVE to have a C in this course because I've already made too many D's". If you need a particular grade, be sure to work hard enough to earn the grade; when you do that, you WILL get the grade. Grading procedures: You are not competing against other students for grades. Your grade will be based on your work, and the points that you earn. If everyone has a 90+ average, everyone will receive an A. In grading programs (both assignments and programming exams), virtually all points will be based on whether a feature works or does not work. Very rarely will you receive points for effort, or for something "almost working". Having a few components working correctly is much better (and will earn you some points) than having no components working (which will earn you no points). Exams: You need to take your exams as scheduled. If you need to miss an exam, you need to let your instructor know ahead of time, if at all possible. Either call and leave voice mail, or send e-mail. The exams are scheduled on the course outline. Plan ahead. If you have any type of exam conflict, you need to let your instructor know at least two weeks ahead of time. All exams will be comprehensive. Written exams will be closed book, online multiple choice exams. For programming exams, you will be able to use your textbook, your course packet, and your old programs. You will not be allowed to use any other aids during the programming exams. Registering for misweb.business.msstate.edu: This class uses the "misweb system" for course management. Your first step in using misweb is to "register" for the system. To do this, go to: [http://misweb.business.msstate.edu/editor](http://misweb.business.msstate.edu/editor) [https://misweb.business.msstate.edu/~COBI/students/editor.html](https://misweb.business.msstate.edu/~COBI/students/editor.html) Enter your Banner net id, such as abc123, and your Banner net password. Click on the Log in button. If you have already registered for misweb, you will go straight to your Edit Routine. If you have not previously registered for misweb, you will go to a short form which will allow you to register. Complete and submit the form.
Register for misweb immediately!
The misweb system gives you a password-protected account that you can use to publish an online student profile page that is accessed through the COBI web site. You need to publish a good page as part of that site, if only to provide your instructor with information about your background. This system is intended to help you provide valuable information to instructors, fellow students, employers, and anyone else who visits COBI’s web site.
To go to the misweb system in the future, go to: [http://misweb.business.msstate.edu](http://misweb.cbi.msstate.edu/)
Course Web Site: We have both a Public Course Web Site and a Private Course Web Site. The Public site includes items that we make available to the entire world. The Private site includes everything that is on the Public site, plus links to items that are restricted to students in our class. In general, you will want to access the Private site. To access the Private Course Web Site, check your grades in the Online Gradebook System. 1. Go to http://misweb.business.msstate.edu 2. Go to your teacher's faculty profile page 3. Scroll down to the Courses Taught section 4. Click on any link to Online Grades. 5. Select your class from the list of online gradebooks, enter your net id and your net password, and click on the Continue button.. 6. Once you log in, you will see a page which contains various buttons, for various course technology components, including your online grades, the private course web site, and more. Class Calendar: All of your assignments and exams are scheduled in the Course Outline at the end of this section of the Course Packet. Class Communications: One item that you will maintain as part of your misweb page is your desired email address. Class email will be sent to whatever address you have recorded on your misweb student profile page. Be sure to have your correct email address in your misweb page. Class email is considered business communication. Please write professionally, not as if you were in a chat room. Write complete sentences, spell correctly, use correct grammar, and capitalize where appropriate. Make sure that your message makes sense. Again, write professionally. When you send email, be sure to include your name in your message. Archived EMail: Many messages that are sent to the class will be saved in a Class EMail Archive. You can read your class's archived messages any time that you check your grades in the Online Gradebook System (when you look at your grades, you will see a button to click for the Class EMail Archive). The EMail Archive has search capabilities, so you can easily find all messages that mention a particular topic. Class Message Board: A Class Message Board has been created for your use. This Board is for student use, to allow you to communicate with each other. You can create a new Topic on the Board (also known as a new Thread) asking a question, you can add a message to an existing Topic, or you can just read what other people have to say. You are encouraged to use this tool any time that it might be useful to communicate with your fellow students. You have several “notification” options relating to the Class Message Board. By default, you will not receive any automatic email when someone posts a new message on the Class Message Board. It is highly recommended that you use the Class Message Board, both to post your own messages, and especially to read what other people post. Access the Class Message Board (via your Online Grades) to change your notification option. You can get an immediate automatic email any time that someone posts a new message (highly recommended! the class message board can be an invaluable tool when you are working on your homework assignments). Alternatively, you can ask for a Daily Summary notification (a once-a-day report of all messages posted the previous day). Be sure to access the Class Message Board, and set your "notification level" to your preferred setting. The Class Message Board is there for you to use. It will not be monitored, other than by your classmates. Obviously, you should maintain an appropriate level of professionalism and decorum in your participation on the Board. You know what is right, and what is wrong. Don’t do anything wrong! Online Quizzes: We will have an online quiz due along with each homework assignment. The link to each quiz is on the Private Course Web Site. The online quizzes are intended to be useful to you, for review purposes. Your quiz will be pre-graded as soon as you submit it; you will be told how many questions you have correct, and how many you have wrong. You will have the opportunity to correct any answers before submitting your quiz. You really should make 100 on each on-line quiz. You will have the opportunity to ask for an email confirmation of your quiz. Be sure to get this confirmation, and save the message. If something happens, and your quiz grade is not recorded, or somehow gets lost, your email confirmation message will be your proof that you did indeed submit your quiz. If your grade is lost, and you don't have your confirmation message, you will not get credit for the quiz. Be sure to save your confirmation message! You also have the option, at the end of each quiz form, to check to see if you have already submitted a quiz. You can use this option at any time (it is at the very bottom of the quiz’s login page) to see if you have successfully submitted a quiz. Online quizzes must be submitted on time.
You have an Online Quiz due along with each Programming Assignment.
Academic Integrity: Mississippi State University has an approved Honor Code that applies to all students. The code is as follows: "As a Mississippi State University student I will conduct myself with honor and integrity at all times. I will not lie, cheat, or steal, nor will I accept the actions of those who do." Upon accepting admission to Mississippi State University, a student immediately assumes a commitment to uphold the Honor Code, to accept responsibility for learning, and to follow the philosophy and rules of the Honor Code. Students will be required to state their commitment on examinations, research papers, and other academic work. Ignorance of the rules does not exclude any member of the MSU community from the requirements or the processes of the Honor Code. For additional information please visit: http://students.msstate.edu/honorcode You are expected to maintain the highest levels of academic integrity in this class. All work that you submit must be your own, original work, done specifically for this class, this semester. That means that you should not copy anyone else's work, you should not use work that you did for another class, you should not use work that you did for this course during a previous attempt in the course, etc. If you ever have any question as to whether something is acceptable or not, please ask your instructor! Our programming assignments are NOT group assignments. You may talk with other students about your program, you may even let another student look at your program to help you with your program, but you may not look at anyone else’s program for the purpose of using their code as your own. You should never look at another student’s code without that student’s explicit permission. Academic misconduct will result in an XF in the course, and will be reported to the Dean of Students.
VERY IMPORTANT NOTICE In our exams, we will program web pages. These pages will be available to the world, including to other students who are taking the exam. Accessing another student’s web site during an exam is a clear case of academic misconduct. Web servers keep log files of every resource that is ever accessed on that server. The log file indicates the address of the computer that requested the resource, the date and time that the request was submitted, and the name of the resource that was requested. These log files are examined after each of our exams, and provide concrete evidence if a student accesses some other student’s exam. To be very clear: if you access some other student’s web site during an exam, it will be discovered, and it will be considered academic misconduct. If such an incident is found (in the log file), the student will get an XF in the course, and the incident will be reported. Accessing another student’s exam during the exam time is a very, very serious offense, and it will be taken very, very seriously.
Title IX Compliance: MSU is committed to complying with Title IX, a federal law that prohibits discrimination, including violence and harassment, based on sex. This means that MSU’s educational programs and activities must be free from sex discrimination, sexual harassment, and other forms of sexual misconduct. If you or someone you know has experienced sex discrimination, sexual violence and/or harassment by any member of the university community, you are encouraged to report the conduct to MSU’s Director of Title IX/EEO Programs at 325-8124 or by e-mail to titleix@msstate.edu. Additional resources are available at the following web sites: http://www.msstate.edu/web/security [http://students.msstate.edu/sexualmisconduct](http://students.msstate.edu/sexualmisconduct/) Visit the following page for more details: http://www.hrm.msstate.edu/aaeeo/titleix Unconditional Guarantee: If you attend every class during the semester, pay attention in class, and complete each programming assignment, I give you my personal guarantee that you will become a better programmer. If you fulfill your obligations as herein stated and do not feel that you have become a better programmer by the end of the semester, you may sit in on this class again in the future, as many times as you choose, absolutely free.
**Programming Assistance during the semester** I (your teacher) will be happy (perhaps even ecstatic) to help you with your programs during the semester. You must request this type of assistance via the class message board. You can email or contact me otherwise about other issues directly, not going through the class message board, but programming requests must go via the class message board, so the entire class can see the entire discussion. There are some requirements for your programming assistance requests: I will help you pretty much to the same extent that you help me. You can not, for instance, just write and say “my program doesn’t work. what’s wrong with it?”. You must tell me something, indicating: - symptoms: what is your program doing incorrectly? - effort: what you have done to try to debug the problem? - prognosis: what do you think is wrong? If you give me some good information, I will be able to help you much more quickly, and much more effectively. Your program also must be WELL-WRITTEN, following good programming style, before you seek assistance. The program must be DOCUMENTED, you must have used good variable names, it must be neatly indented... you must follow the programming rules of the course (HTML does not have to be documented; Java must be.) If you do your job, I guarantee you that I will try my very best to help you with your programs. Finally, I will check the class message board many, many times throughout the day, so it will probably be a good way for you to contact me. I do sometimes go to sleep relatively early (9:00 is early, right?), but I also wake up early, and I will respond to your email first thing in the morning. One more thing: do not send me copies of your files via email. Upload your files to your mislab account. I will check them there. **Beating the Spam Filter** As mentioned earlier, you can email me directly about items other than programming debugging requests (which must go through the class message board). When you do email me, you should put “BIS 3523" in the subject of your message, because my spam filter should automatically let that message through.
# Course Outline # Course Materials # Course Package 1 ## [Download Link](https://nextcloud.aronwk.com/index.php/s/fXNyA3grfCpweqX) ## Hello.java ```Java /* File: Hello.java This is a simple sample standalone text-based Java application. Output is generated to StdOut (Standard Out), which in this case is the user's console. In a Java application, execution begins with the main() method (defined below). If you're working from the command line (such as on mislab) compile and execute this program with the commands: javac Hello.java (creates Hello.class) java Hello (runs the JVM to execute byte code) (Note: The file names in these commands are case-sensitive.) javac.exe is the Java compiler. javac translates source code (stored in a .java file) into platform-independent byte code (stored in a .class file). Byte code is interpreted and executed by a JVM (Java Virtual Machine). java.exe is a JVM. Some consumer electronics are hardware JVM's (their electronics can actually interpret and execute Java byte code). A JVM is platform-dependent. That is, you must have a JVM that runs in your environment. The main method must be defined as it is in the example below. The only thing that you can change is the name of the parameter (args). The main method receives an Array of String objects. Some elements of programming style which are demonstrated here: 1. the class name begins with an upper-case letter 2. corresponding curly braces are aligned 3. statements within a body of code are indented 4. blank lines are used to enhance readability 5. comments are used to enhance readability and understandability */ public class Hello // Hello class header { // the body of the class is enclosed in curly braces, // which are aligned to enhance readability public static void main(String[] args) // main() method header; execution begins here { // the body of the method is enclosed in curly braces System.out.println("Hello world"); // call the println method to generate output // to StdOut } } // You should type this program, compile it, and execute it to test your Java environment. ``` ## DOS1a.java ```Java // You should type this program, compile it, and execute it to test your Java environment. /* File: DOS1a.java DOS1a uses a "for loop" to calculate the sum of the integers between two hard-coded values. This program uses three primitive int scalar variables. There are eight types of primitives in Java: boolean, char, byte, short, int, long, float, double. Everything else is object-oriented! */ public class DOS1a // DOS1a class header { public static void main(String[] args) // main() method header { int start,stop,sum; // define (declare) 3 primitive int variables // this defines name, data type, and size // these variables have "block scope"; they are // visible until the } at the end of this block // of code (this method) start=11; // initialize the variables (give each a value) stop=20; sum=0; for(int i=start;i<=stop;i++) // for loop; "i" has block scope; its life is // the block of this for loop { System.out.println(i); // print value of "i" to StdOut, followed by LF sum=sum+i; // accumulate running total } // i is no longer available System.out.println("\n"+sum); // print blank line, then value of "sum" } } ``` ## DOS1b.java ```Java /* File: DOS1b.java DOS1b uses a hard-coded, comma-delimited string of Fahrenheit temperatures as its input. It uses the String class's split method to split that string apart into its separate values, then converts those values to Centigrade. This program uses the "split" method from the String class. The documentation of the String class describes the "interface" of the method: what you pass to the method, and what the method returns to you. The following comes from the documentation of the method: (textbook: page 431) public String[] split(String s) This tells you that: split is an instance method (the method header does not include the word "static"); because it's an instance method, it "operates on" a String object; in calling this method, use a String object to the left of the dot the method accepts a String object as its sole parameter the method returns an array of String objects This program uses the length property of an Array object to know the number of elements in the array (inputs.length). This program uses the "parseDouble" method from the Double class. The documentation of the Double class describes the interface of the "parseDouble" method: what you pass to the method, and what the method returns to you. The following comes from the documentation of the method: (textbook: page 445) public static double parseDouble(String s) This tells you that: parseDouble is a class method (the method header includes the word "static"); in calling this method, use the name of its class to the left of the dot: Double.parseDouble() it accepts a String object as its sole parameter it returns a double primitive */ public class DOS1b { public static void main(String[] args) { String string="0,32,100,212"; String[] inputs=string.split(","); // define an array of String objects // split the initial string to populate that array for(int i=0;i= 0, valid value return true; // value was changed } } ``` ## DOS2c.java ```Java /* File: DOS2c.java This system uses three classes: DOS2c, NewerPerson, and Employee. The Employee class is a subclass of the NewerPerson class. This program instantiates an Employee object. */ public class DOS2c { public static void main(String[] args) { Employee subject; subject=new Employee(101,"Barney","Fife",51,17.25); // instantiate an Employee object System.out.println(" EmpNum: "+subject.getEmpNum()); // call several of the object's instance methods System.out.println("Last Name: "+subject.getLastName()); System.out.println(" First: "+subject.getFirstName()); System.out.println(" Age: "+subject.getAge()); System.out.println(" Rate: "+subject.getPayRate()); System.out.println("\n"+subject.toString()+"\n\n\n"); } } ``` ## NewrPerson.java ```Java /* File: NewerPerson.java The NewerPerson class modifies the NewPerson class. The NewPerson class used private instance variables (properties). But we now want to be able to subclass the NewPerson class to further define a specific type of NewPerson, an Employee. The problem is that private properties may not be accessed by other classes, even by a subclass. NewerPerson changes the access modifier on those properties to protected, rather than private. */ public class NewerPerson { protected String firstName,lastName; // protected instance variables protected int age; public NewerPerson() // constructor method { this.firstName=""; // default values for properties this.lastName=""; this.age=0; } public NewerPerson(String f,String l,int i) // overloaded constructor method { this.firstName=f; // set values for properties this.lastName=l; this.age=i; } public String getFirstName() // accessor method to retrieve value of firstName { // returns a String return this.firstName; } public boolean setFirstName(String s) // method to change value of firstName { if(s.length()==0) // call length() method of String object { // don't change firstName to null String return false; } this.firstName=s; // change firstName return true; // value was changed } public String getLastName() // accessor method to retrieve value of lastName { // returns a String return this.lastName; } public boolean setLastName(String s) // method to change value of lastName { if(s.length()==0) // call length() method of String object { // don't change lastName to null String return false; } this.lastName=s; // change lastName return true; // value was changed } public String getName() { return this.lastName.trim()+", "+this.firstName.trim(); } public int getAge() // accessor method to retrieve value of age { // returns an int value return this.age; // return value of this.age } public boolean setAge(int i) // mutator method to change value of age { // returns boolean indicating if value was changed if(i<0) // don't change age to negative value { return false; // value was not changed } this.age=i; // i >= 0, valid value return true; // value was changed } } ``` ## Employee.java ```Java /* File: Employee.java Object | +---NewerPerson | +---Employee The Employee class subclasses the NewerPerson class (which subclasses the Object class). Therefore, Employee inherits properties and methods of the superclass (NewerPerson). It may optionally over-ride any property or method that would otherwise be inherited (this is done with the toString() method, below). */ public class Employee extends NewerPerson // subclass the NewerPerson class { protected Integer empNum; // add specific properties of the subclass protected double payRate; public Employee() // zero-argument constructor { super(); // call zero-argument constructor of superclass this.empNum=new Integer(0); // then set values of subclass's instance variables this.payRate=0; } public Employee(int i,String s1,String s2,int j,double d) { super(s1,s2,j); // call constructor from superclass this.empNum=new Integer(i); // then set values of subclass's instance variables this.payRate=d; } public int getEmpNum() // accessor method, returns a primitive int { return this.empNum.intValue(); // use intValue() method of Integer class } public double getPayRate() { return this.payRate; } public String toString() // over-ride toString method from Person class { return this.empNum+" "+this.firstName.trim()+" "+this.lastName.trim()+" rate: "+this.payRate; } } ``` ## DOS2d.java ```Java /* File: DOS2d.java This program instantiates a Taxpayer object, then calculates a weekly tax withholding amount using the calcTax() method of the Taxpayer class. This program demonstrates reading records from a sequential data file. This program uses several classes that are in the java.io package. To help the compiler resolve these external references, the import statement is used. The import statement makes classes and interfaces from the specified package available to the compiler. The documentation of a class will tell you what package the class is in. Any class that is in the java.lang package is available automatically. You need an import statement for any class (or interface) that is in any package other than java.lang. */ import java.io.*; // import classes and interfaces from the java.io package public class DOS2d { public static void main(String[] args) throws Exception // this method throws Exception objects to its caller { int hours; String record; Taxpayer subject; FileReader reader; BufferedReader in; reader=new FileReader("Taxpayer.dat"); // specify local file name: Taxpayer.dat in=new BufferedReader(reader); // open the file so we can read its records record=in.readLine(); // attempt to read next record while(record!=null) // execute loop if record has any characters { subject=new Taxpayer(record); // pass record data, instantiate taxpayer object System.out.println("Taxpayer: "+subject.getName()); System.out.println("Pay rate: "+subject.getPayRate()+"\n"); System.out.println("Hours worked?"); hours=Utility.readInt(); // ask for hours worked; keyboard input System.out.println("\n"+subject.getName()+" taxes: "+subject.calcTax(hours)); System.out.print(subject.getName()+" formatted: "); System.out.println(Utility.padString(subject.calcTax(hours),10,2)+"\n\n"); record=in.readLine(); // attempt to read next record } in.close(); // close the file } } ``` ## Taxpayer.java ```Java /* File: Taxpayer.java This class includes tax tables. It includes a calcTax() method which will calculate the weekly withholding tax for a taxpayer. To calculate the weekly withholding tax: calculate weekly gross pay: gross=hours*payRate estimate annual gross pay: annualized=gross*52 use tax brackets to estimate annual tax -18550 in annualized gross is taxed at 15% -44900 marginal rate of 28% >44900 marginal rate of 33% calculate weekly withholding: weeklyTax=annualTax/52 */ public class Taxpayer extends Employee // subclass the Employee class { private static final double TAXRATE1=.15; // class variable (3 tax rates) private static final double TAXRATE2=.28; private static final double TAXRATE3=.33; private static final double TAXLIMIT1=18550; // upper limits of tax brackets private static final double TAXLIMIT2=44900; public Taxpayer(String s) // constructor, accepts String parameter { this.empNum=new Integer(s.substring(0,5)); // extract substrings from record // empNum is inherited from Employee this.firstName=s.substring(5,20); // properties inherited from NewerPerson this.lastName=s.substring(20,35); this.age=Integer.parseInt(s.substring(35,37)); this.payRate=Double.parseDouble(s.substring(37,43)); } public double calcTax(int hours) // receive one int parameter { double gross,annualized,annualTax,weeklyTax; // declare several primitive double items gross=hours*this.payRate; // 1. calculate weekly gross pay annualized=gross*52; // 2. annualize it if(annualized<=Taxpayer.TAXLIMIT1) // 3. now handle marginal brackets { annualTax=Taxpayer.TAXRATE1*gross; // lowest bracket, simple } else { if(annualized<=Taxpayer.TAXLIMIT2) { // middle bracket; use marginal rate! annualTax=Taxpayer.TAXRATE1*Taxpayer.TAXLIMIT1+ Taxpayer.TAXRATE2*(annualized-Taxpayer.TAXLIMIT1); } else { // highest bracket annualTax=Taxpayer.TAXRATE1*Taxpayer.TAXLIMIT1+ Taxpayer.TAXRATE2*(Taxpayer.TAXLIMIT2-Taxpayer.TAXLIMIT1)+ Taxpayer.TAXRATE3*(annualized-Taxpayer.TAXLIMIT2); } } weeklyTax=annualTax/52; // 4. calculate weekly tax return weeklyTax; // return a float value } } ``` ### Taxpayer.dat ```Java Taxpayer.dat (fixed-length fields) each record consists of: characters 0- 4: employee number -19: first name -34: last name -36: age -42: pay rate George Washington 54295.00 Benjamin Franklin 61149.95 ``` ## RandomNumbers.java ```Java /* file: RandomNumbers.java This program generates a list of random numbers without replacement. This program is a text-based application. It uses the user-defined RandomNumbersWithoutReplacement class, which contains all of the functionality one needs to get random numbers (without replacement). */ public class RandomNumbers { public static void main(String[] args) { System.out.println(); System.out.print("Enter the desired lower limit of your range of random numbers: "); int lower=Utility.readInt(); System.out.print(" and the upper limit: "); int upper=Utility.readInt(); // instantiate a (user-defined) RandomNumbersWithoutReplacement object RandomNumbersWithoutReplacement list=new RandomNumbersWithoutReplacement(lower,upper); // get random numbers, one at a time int ran=list.next(); while(ran>-1) { System.out.println(ran); ran=list.next(); } System.out.println(); } } ``` ## RandomNumbersWithoutReplacement.java ```Java /* file: RandomNumbersWithoutReplacement.java Re-usable class to generate a list of random numbers without replacement. The two steps to using this class are: instantiate a RandomNumbersWithoutReplacement object. There are two options for this: - pass a single integer indicating the desired number of random numbers - pass two integers, indicating the low number and the high number in the desired range RandomNumbersWithoutReplacement list=new RandomNumbersWithoutReplacement(16); will set up a list of random numbers in the range 0 through 15 (16 random numbers) RandomNumbersWithoutReplacement list=new RandomNumbersWithoutReplacement(11,20); will set up a list of random numbers in the range 11 through 20 (10 random numbers) Call this class's next method to get the next random number. int i=list.next(); */ import java.util.*; // the Vector class is in the java.util package public class RandomNumbersWithoutReplacement { private Vector v=new Vector(); // instantiate a Vector object public RandomNumbersWithoutReplacement(int i) // constructor method that receives a single int, { // indicating desired number of random numbers this(0,i-1); // call other constructor; random numbers will be in } // the range 0 through i-1 public RandomNumbersWithoutReplacement(int low,int high) // constructor method that receives two primitive ints { // indicating beginning and ending values for the // random numbers if(high ServletHello ServletHello ServletHello *.ServletHello IMPORTANT: Any time you change your web.xml, you must stoptom and starttom to re-process the web.xml file. Access the servlet with: http://mislab.business.msstate.edu:8080/servlet/abc123.ServletHello (substitute your primary port number for "8080" and your net id for "abc123") */ import java.io.*; // import statements import javax.servlet.*; import javax.servlet.http.*; public class ServletHello extends HttpServlet // subclass the HttpServlet class { // over-ride the doGet method so we can respond // to a Get method request // code in this method may throw an Exception, // so this method throws it as well public void doGet(HttpServletRequest request,HttpServletResponse response) throws ServletException,IOException { response.setContentType("text/html"); // set the response header (content-type) PrintWriter out=response.getWriter(); // get a PrintWriter object to print to browser out.println("Hello World"); // use it to generate some output } } ``` ## ReadFile.java ```Java /* File: ReadFile.java This servlet reads the contents of the file ServletHello.java and displays it to the browser as plain text (not to be rendered by the browser). Both the .class file for this servlet and the file that it reads (ServletHello.java) must be stored in your tomcat "classes" subdirectory" The servlet must be entered into your web.xml file (which is in your WEB-INF directory). */ import java.io.*; // import statements import javax.servlet.*; import javax.servlet.http.*; public class ReadFile extends HttpServlet { public void doGet(HttpServletRequest request,HttpServletResponse response) throws ServletException,IOException { response.setContentType("text/plain"); // set the response header (content-type) String filename="/home/rpearson/tomcat/webapps/ROOT/WEB-INF/classes/ServletHello.java"; PrintWriter out=response.getWriter(); // get a PrintWriter object to print to browser try // put I/O stuff in a try/catch block { BufferedReader in=new BufferedReader(new FileReader(filename)); // data file is now open String record=in.readLine(); // attempt to read next record while(record!=null) // execute loop if record was read { out.println(record); // print this record, then record=in.readLine(); // attempt to read next record } in.close(); // close the file } catch(Exception e) // catch any exceptions { out.println("error attempting to open "+filename); out.println(e.toString()); } } } ``` ## AllTrivia.java ```Java /* File: AllTrivia.java This servlet reads the contents of the file Trivia.fil and displays its trivia events to the browser as an HTML table (to be rendered by the browser). Both the .class file for this servlet and the file that it reads (Trivia.fil) must be stored in your tomcat "classes" subdirectory. The servlet must be entered into your web.xml file (which is in your WEB-INF directory). Since Trivia.fil contains fixed-length records, this program uses the String class's substring method to extract fields from the records. */ import java.io.*; // import statements import javax.servlet.*; import javax.servlet.http.*; public class AllTrivia extends HttpServlet // servlets subclass the HttpServlet class { public void doGet(HttpServletRequest request,HttpServletResponse response) throws ServletException,IOException { response.setContentType("text/html"); // set the response header (content-type) PrintWriter out=response.getWriter(); // get a PrintWriter object to print to browser out.println(""); // generate valid HTML for a web page out.println(""); out.println(""); out.println("AllTrivia"); out.println(""); out.println(""); out.println(""); out.println(""); try // put I/O stuff in a try/catch block { String filename="/home/rpearson/tomcat/webapps/ROOT/WEB-INF/classes/Trivia.fil"; BufferedReader in=new BufferedReader(new FileReader(filename)); // data file is now open String record=in.readLine(); // attempt to read next record while(record!=null) // execute loop if record was read { String date=record.substring(0,10); String event=record.substring(12); out.println(""); record=in.readLine(); // attempt to read next record } in.close(); // close the file } catch(Exception e) // catch any exceptions { out.print(""); } out.println("
"+date+""+event+"
error attempting to process Trivia.fil
"); out.print(e.toString()); out.println("
"); out.println(""); out.println(""); } } ``` ### BIS3523.css ```CSS BIS3523.css table,td { border: thin solid black; } table { border-collapse: collapse; } td { padding: 6px; } .noBorder {border: none} .left {text-align: left} .center {text-align: center} .right {text-align: right} .highlight:hover { color: black; background-color: yellow; } ``` ## ServerTrivia.java ```Java /* File: ServerTrivia.java This servlet reads the contents of the file Trivia.dat and displays today's trivia events to the browser as an HTML table (to be rendered by the browser). "Today" is based on the server's date and time, not the client. Since Trivia.dat contains variable-length, delimited records, this program uses the String class's split method to split the records into their subordinate fields. This program uses methods of the "deprecated" Date class. You will get a warning when you compile, but the methods still work. They're deprecated, they're not obsolete. */ import java.io.*; // import statements import javax.servlet.*; import javax.servlet.http.*; import java.util.*; public class ServerTrivia extends HttpServlet { public void doGet(HttpServletRequest request,HttpServletResponse response) throws ServletException,IOException { response.setContentType("text/html"); // set the response header (content-type) Date date=new Date(); // instantiate a Date object (deprecated) int todayMonth=date.getMonth()+1; // getMonth returns 0-11 (increment by 1) int todayDay=date.getDate(); // day of the month (1-31) int listCount=0; // initialize a counter // generate a heading PrintWriter out=response.getWriter(); // get a PrintWriter object to print to browser out.println(""); // generate valid HTML for a web page out.println(""); out.println(""); out.println("ServerTrivia"); out.println(""); out.println(""); out.println(""); out.println(""); out.println(""); try // put I/O stuff in a try/catch block { String filename="/home/rpearson/tomcat/webapps/ROOT/WEB-INF/classes/Trivia.dat"; BufferedReader in=new BufferedReader(new FileReader(filename)); // data file is now open String record=in.readLine(); // attempt to read next record while(record!=null) // execute loop if record was read { String[] fields=record.split("\t"); int thisMonth=Integer.parseInt(fields[0]); int thisDay=Integer.parseInt(fields[1]); if(todayMonth==thisMonth && todayDay==thisDay) { out.println(""); listCount++; } record=in.readLine(); // attempt to read next record } in.close(); // close the file } catch(Exception e) // catch any exceptions { out.print(""); } out.println(""); out.println("
On "+todayMonth+"/"+todayDay+", the following events happened:
"+fields[2]+""+fields[3]+"
error attempting to process Trivia.dat
"); out.print(e.toString()); out.println("
"+listCount+" trivia events listed
"); out.println(""); out.println(""); } } ``` ### Trivia.dat ```dat 01 01 1801 Giuseppe Piazzi discoved 1st asteroid, later named Ceres 01 01 1801 United Kingdom of Great Britain & Ireland established 01 01 1804 Haiti gains its independence 01 01 1863 Emancipation Proclamation issued by Lincoln. 01 01 1892 Brooklyn merges with NY to form present City of NY Ellis Island became reception center for new immigrants 01 01 1901 Commonwealth of Australia established 01 01 1902 first Rose Bowl game held in Pasadena, California. 01 01 1912 first running of SF's famed "Bay to Breakers" race (7.63 miles) 01 01 1934 Alcatraz officially becomes a Federal Prison. 01 01 1956 Sudan gains its independence 01 01 1958 European Economic Community (EEC) starts operation. 01 01 1971 Cigarette advertisements banned on TV 01 01 1984 AT & T broken up into 8 companies. 01 01 1986 Spain & Portugal become 11th & 12th members of Common Market 01 02 1776 first American revolutionary flag displayed. 01 02 1788 Georgia is 4th state to ratify US constitution 01 02 1893 World's Columbian Exposition opens in Chicago 01 02 1921 DeYoung Museum in San Francisco's Golden Gate Park opens. 01 02 1936 first electron tube described, St Louis, Missouri 01 02 1959 USSR launches Mechta, 1st lunar probe & artificial in solar orbit 01 02 1968 Dr Christian Barnard performs 1st successful heart transplant 01 02 1972 Mariner 9 begins mapping Mars 01 03 1521 Martin Luther excommunicated by Roman Catholic Church 01 03 1777 Washington defeats British at Battle of Princeton, NJ 01 03 1852 First Chinese arrive in Hawaii. 01 03 1870 Brooklyn Bridge begun, completed on May 24, 1883 01 03 1888 1st drinking straw is patented. 01 03 1957 first electric watch introduced, Lancaster Pennsylvania 01 03 1959 Alaska becomes the 49th state. 01 03 1977 Apple Computer incorporated. 01 04 1754 Columbia University openes 01 04 1784 US treaty with Great Britain is ratified 01 04 1790 President Washington delivers first "State of the Union" speech. 01 04 1896 Utah becomes 45th state 01 04 1948 Burma gains independence from Britain (National Day) 01 04 1959 Soviet Luna 1 first craft to leave Earth's gravity 01 04 1982 Golden Gate Bridge closed for the 3rd time by fierce storm. 01 05 1809 Treaty of Dardanelles was concluded between Britain & France 01 05 1911 San Francisco has its first official airplane race. 01 05 1933 Work on Golden Gate Bridge begins, on Marin County side. 01 05 1969 USSR Venera 5 launched. 1st successful planet landing - Venus 01 05 1972 NASA announces development of Space Shuttle 01 05 1975 Salyut 4 with crew of 2 is launched for 30 days 01 06 1663 Great earthquake in New England 01 06 1838 first public demonstration of telegraph, by Samuel F. B. Morse 01 06 1914 Stock brokerage firm of Merrill Lynch founded. 01 06 1941 FDR names 4 freedoms (speech, religion; from want, from fear) 01 06 1942 first around world flight by Pan Am "Pacific Clipper" 01 07 1558 Calais, last English possession in France, retaken by French 01 07 1610 Galileo discovers 1st 3 moons of Jupiter, Io, Europa & Ganymede 01 07 1714 The typewriter is patented (it was built years later) 01 07 1785 1st balloon flight across the English Channel. 01 07 1822 Liberia colonized by Americans 01 07 1929 "Tarzan", one of the first adventure comic strips appears. 01 07 1963 First Class postage raised from 4 cents to 5 cents. 01 07 1968 First Class postage raised from 5 cents to 6 cents. 01 08 1815 Battle of New Orleans, made a hero out of Andrew Jackson (the War of 1812 had ended on 12/24/1814, but nobody knew that). 01 08 1880 The passing of Norton I, Emperor of the US, Protector of Mexico 01 08 1932 Ratification of present San Francisco City Charter. 01 08 1935 Spectrophotometer patented, by AC Hardy 01 08 1958 Cuban revolutionary forces capture Havana 01 08 1968 US Surveyor 7 lands near crater Tycho on moon 01 08 1973 USSR launches Luna 21 for moon landing 01 09 1788 Conneticut becomes 5th state 01 09 1793 Jean Pierre Blanchard makes 1st balloon flight in North America 01 09 1799 1st income tax imposed, in England. 01 09 1839 Thomas Henderson measures 1st stellar parallax Alpha Centauri 01 09 1839 The daguerrotype process announced at French Academy of Science 01 09 1843 Caroline Herschel, "1st lady of astronomy," dies at 98 in Germany 01 09 1847 first San Francisco paper, 'California Star', published. 01 09 1978 Commonwealth of Northern Marianas established 01 09 1982 5.9 earthquake in New England/Canada; last one was in 1855. 01 10 1776 "Common Sense" by Thomas Paine is published. 01 10 1840 The Penny Post mail system is started. 01 10 1863 1st underground railway opens in London. 01 10 1945 Los Angeles Railway (with 5 streetcar lines) forced to close. 01 10 1946 UN General Assembly meets for first time 01 10 1946 US Army establishes first radar contact with moon. It's there. 01 10 1949 first Jewish family show - The Goldberg's begin 01 10 1951 first jet passenger trip made 01 10 1969 USSR's Venera 6 launched for parachute landing on Venus 01 10 1978 Soyuz 27 is launched 01 11 1642 Isaac Newton is elected a member of Royal Society 01 11 1787 Titania & Oberon, moons of Uranus, discovered by William Herschel 01 11 1813 First pineapples planted in Hawaii. 01 11 1935 1st woman to fly solo across Pacific left Honolulu, AE Putnam 01 11 1935 Amelia Earhart flies from Hawaii to California, non-stop 01 11 1975 Soyuz 17 is launched 01 12 1777 Mission Santa Clara de Asis founded in California 01 12 1820 Royal Astronomical Society, founded in England 01 12 1986 24th Space Shuttle Mission - Columbia 7 is launched 01 13 1610 Galileo Galilei discovers Callisto, 4th satellite of Jupiter 01 13 1630 Patent to Plymouth Colony issued 01 13 1854 Anthony Foss obtains patent for the Accordion. 01 13 1854 Anthony Foss obtains patent for accordion 01 13 1920 NY Times Editorial says rockets can never fly. 01 13 1930 Mickey Mouse comic strip first appears 01 13 1971 Apollo 14 launched (what was that about rockets can't fly??) 01 14 1784 Revolutionary War ends when Congress ratifies Treaty of Paris 01 14 1914 Henry Ford introduces the Assembly Line for his cars. 01 14 1936 L.M. "Mario" Giannini elected president of Bank of America. 01 14 1939 All commercial ferry service to the East Bay ends. 01 14 1969 Soyuz 4 is launched 01 15 1535 Henry VIII declares himself head of English Church 01 15 1759 British Museum opens 01 15 1778 Nootka Sound discovered by Capt. Cook 01 15 1861 Steam elevator patented by Elisha Otis 01 15 1927 Dunbarton Bridge, 1st bridge in Bay Area, opens. 01 15 1948 World's largest office building, The Pentagon, is completed. 01 15 1968 Soyuz 5 launched 01 16 1883 Pendleton Act creates basis of federal civil service system 01 16 1887 Cliff House badly damaged when a cargo of gunpowder on the schooner "Parallel" explodes nearby. 01 16 1920 18th Amendment, prohibition, goes into effect; repealed in 1933 01 16 1969 Soviet Soyuz 4 & Soyuz 5 perform 1st transfer of crew in space 01 16 1973 USSR's Lunakhod begins radio-controlled exploration of moon 01 16 1979 Iranian revolution overthrows shah. 01 16 1991 US led air forces begin raids on Iraq in response to Iraq's August 1990 takeover of Kuwait. 01 17 1773 Capt James Cook becomes 1st to cross Antarctic Circle (66ø 33' S) 01 17 1852 British recognize independence of Transvaal (in South Africa) 01 17 1861 Flush toilet is patented by Mr. Thomas Crapper (Honest!!). 01 17 1871 1st Cable Car is patented by Andrew S. Hallidie. 01 17 1893 Kingdom of Hawaii becomes a republic. 01 17 1899 US takes possession of Wake Island in Pacific 01 17 1943 It was Tin Can Drive Day. 01 17 1945 Liberation Day in Poland (end of Nazi occupation) 01 17 1957 Nine county commission recommends creation of BART. 01 17 1963 Joe Walker takes X-15 to altitude of 82 km 01 17 1976 Hermes rocket launched by ESA 01 18 1644 1st UFO sighting in America, by perplexed Pilgrims in Boston. 01 18 1778 Captain James Cook stumbles over the Hawaiian Islands. 01 18 1869 The elegant California Theatre opens in San Francisco. 01 18 1911 1st shipboard landing of a plane (from Tanforan Park to the USS Pennsylvania). 01 18 1919 Versailles Peace Conference, ending World War I 01 18 1956 Tunisian Revolution Day (National Day) 01 19 1903 1st regular transatlantic radio broadcast between US & England. 01 19 1921 Costa Rica, Guatemala, Honduras & El Salvador sign Pact of Union 01 20 1265 1st English Parliament, called by the Earl of Leicester 01 20 1872 California Stock Exchange Board organized. 01 20 1887 Pearl Harbor obtained by US from Hawaii for use as a naval base 01 20 1929 1st talking motion picture taken outdoors "In Old Arizona" 01 20 1937 Inauguration day, every 4th year 01 20 1981 US embassy hostages freed in Tehran after 444 days. 01 21 1813 The pineapple is introduced to Hawaii. 01 21 1954 The Nautilus launched, first nuclear submarine. 01 21 1962 Snow falls in San Francisco, believe it or not. 01 21 1979 Neptune becomes the outermost planet (Pluto moves closer). 01 22 1850 The Alta California becomes a daily paper, 1st such in Calif. 01 22 1939 Aquatic Park dedicated. 01 22 1968 Apollo 5 launched to moon, Unmanned lunar module tests made 01 22 1975 Lansat 2, an Earth Resources Technology Satellite, is launched 01 23 1579 Union of Utrecht signed, forming protestant Dutch Republic 01 23 1964 24th Amendment ratified, Barred poll tax in federal elections 01 24 1848 James Marshall finds gold in Sutter's Mill in Coloma, Calif 01 24 1899 The rubber heel is patented by Humphrey O'Sullivan. 01 24 1935 1st beer in cans is sold. 01 24 1982 San Francisco 49'ers win their 1st Super Bowl, 26-21. 01 24 1985 15th Space Shuttle Mission - Discovery 3 is launched 01 24 1986 Voyager 2 makes 1st fly-by of Uranus finds new moons, rings 01 25 1915 Alexander Bell in New York calls Thomas Watson in San Francisco. 01 25 1925 Largest diamond, Cullinan (3106 carets), found in South Africa 01 25 1949 first Emmy Awards are presented. 01 25 1949 first popular elections in Israel. 01 25 1959 first transcontinental commercial jet flight (LA to NY for $301). 01 25 1964 Echo 2, US communications satellite launched 01 26 1788 1st settlement established by the English in Australia. 01 26 1837 Michigan is admitted as the 26th of the United States 01 26 1841 Hong Kong was proclaimed a sovereign territory of Britain 01 26 1871 American income tax repealed. Would that it had lasted! 01 26 1950 India becomes a republic ceasing to be a British dominion 01 26 1954 Ground breaking begins on Disneyland 01 27 1880 Thomas Edison granted patent for an electric incandescent lamp 01 27 1888 National Geographic Society founded in Washington, DC 01 27 1926 1st public demonstration of television. 01 27 1948 1st Tape Recorder is sold. 01 27 1967 Apollo 1 fire kills astronauts Grissom, White & Chaffee 01 27 1973 US & Vietnam sign cease-fire, ending the longest US war 01 28 1807 London's Pall Mall is the 1st street lit by gaslight. 01 28 1821 Bellingshausen discovers Alexander Island off Antarctica 01 28 1878 George W. Coy hired as 1st full-time telephone operator. 01 28 1915 US Coast Guard established, Semper Paratus 01 28 1938 1st Ski Tow starts running (in Vermont). 01 28 1958 Construction began on 1st private thorium-uranium nuclear reactor 01 28 1960 first photograph bounced off moon, Washington DC 01 28 1986 Space Shuttle Challenger explodes, killing a brave crew and NASA. 01 29 1788 Australia Day 01 29 1861 Kansas becomes 34th state 01 29 1904 1st athletic letters given: to Univ of Chicago football team. 01 29 1920 Walt Disney starts 1st job as an artist $40 week with KC Slide Co 01 29 1959 Walt Disney's "Sleeping Beauty" is released 01 30 1847 Yerba Buena renamed San Francisco. 01 30 1862 US Navy's 1st ironclad warship, the "Monitor", launched. 01 30 1917 1st jazz record in United States is cut. 01 30 1969 US/Canada ISIS 1 launched to study ionosphere 01 31 1851 San Francisco Orphan's Asylum, 1st in California, founded. 01 31 1862 Telescope maker Alvin Clark discovers dwarf companion of Sirius 01 31 1871 Birds fly over the western part of San Francisco in such large numbers that they actually darken the sky. 01 31 1911 Congress passes resolution naming San Francisco as the site of the celebration of the opening of the Panama Canal. 01 31 1950 Pres Truman authorized production of H-Bomb 01 31 1958 1st U.S. satellite launched, Explorer I. 01 31 1958 James van Allen discovers radiation belt 01 31 1961 Ham the chimp is 1st animal sent into space by the US. 01 31 1966 Luna 9 launched for moon 01 31 1971 Apollo 14 launched, 1st landing in lunar highlands. 02 01 1709 Alexander Selkirk (aka Robinson Crusoe) rescued from Juan Fernand 02 01 1790 US Supreme Court convened for first time (NYC) 02 01 1865 13th amendment approved (National Freedom Day) 02 01 1867 Bricklayers start working 8-hour days. 02 01 1920 The first armored car is introduced. 02 01 1958 Egypt & Syria join to form United Arab Republic 02 01 1972 First scientific hand-held calculator (HP-35) introduced 02 02 1848 First shipload of Chinese immigrants arrive in San Francisco. 02 02 1848 Mexico sells California, New Mexico and Arizona to the USA. 02 02 1876 National Baseball League formed with 8 teams. 02 02 1880 SS Strathleven arrives in London with first successful shipment of frozen mutton from Australia. 02 02 1935 Lie detector first used in court in Portage, Wisconsin 02 02 1962 Eight of the planets line up for the first time in 400 years. 02 03 1918 Twin Peaks Tunnel, longest (11,920 feet) streetcar tunnel in the world, begins service in San Francisco. 02 03 1945 Yalta Conference, Russia agrees to enter WWII against Japan 02 03 1966 Soviet Luna 9 first spacecraft to soft-land on moon 02 04 1887 Interstate Commerce Act: Federal regulation of railroads 02 04 1932 First Winter Olympics held (At Lake Placid, NY). 02 04 1936 First radioactive substance produced synthetically - radium E 02 04 1948 Ceylon (now Sri Lanka) gains independence. 02 04 1957 First electric portable typewriter placed on sale, Syracuse NY 02 04 1974 Patricia Hearst kidnapped by Symbionese Liberation Army 02 05 1887 Snow falls on San Francisco. 02 05 1953 Walt Disney's "Peter Pan" released 02 05 1971 Apollo 14, 3rd manned expedition to moon, lands near Fra Mauro 02 05 1974 Mariner 10 takes first close-up photos of Venus' cloud structure 02 05 1979 According to Census Bureau, US population reaches 200 million 02 06 1693 College of William and Mary chartered in Williamsburg, Va 02 06 1900 Spanish-American War ends 02 06 1922 US, UK, France, Italy & Japan sign Washington Naval Arms Limitation Treaty 02 06 1952 Elizabeth II becomes queen of Great Britain 02 07 1889 Astronomical Society of Pacific holds first meeting in SF 02 07 1940 Walt Disney's "Pinocchio" released 02 08 1693 Charter granted for College of William & Mary, 2nd college in US 02 08 1883 Louis Waterman begins experiments that invent the fountain pen. 02 08 1908 Boy Scouts of America founded. 02 08 1922 Radio arrives in the White House. 02 08 1977 Earthquake, at 5.0, strongest since 1966. 02 09 1877 U.S. Weather Service is founded. 02 09 1885 First Japanese arrive in Hawaii. 02 09 1964 First appearance of the Beatles on Ed Sullivan 02 09 1969 The Boeing 747 makes its first commercial flight. 02 10 1720 Edmund Halley is appointed 2nd Astronomer Royal of England 02 10 1763 Treaty of Paris ends French & Indian War 02 10 1870 City of Anaheim incorporated (first time). 02 10 1879 First electric arc light used (in California Theater). 02 11 0660 Traditional founding of Japan by Emperor Jimmu Tenno 02 11 1854 Major streets lit by coal gas for first time. 02 11 1929 Vatican City (world's Smallest Country) made an enclave of Rome 02 11 1970 Japan becomes 4th nation to put a satellite (Osumi) in orbit 02 12 1541 Santiago, Chile founded. 02 12 1924 Gershwin's "Rhapsody In Blue" premiers in Carnegie Hall 02 12 1934 Export-Import Bank incorporated. 02 12 1945 San Francisco selected for site of United Nations Conference. 02 12 1947 A daytime fireball & meteorite fall is seen in eastern Siberia 02 12 1961 USSR launches Venera 1 toward Venus 02 13 1741 First magazine published in America (The American Magazine) 02 13 1867 "Blue Danube" waltz premiers in Vienna 02 13 1937 "Prince Valiant" comic strip appears; known for historical detail and fine detail drawing. Thanks Hal. 02 14 1859 Oregon admitted as 33rd State 02 14 1876 Alexander Graham Bell files for a patent on the telephone. 02 14 1912 Arizona becomes 48th state 02 14 1961 Element 103, lawrencium, first produced in Berkeley California 02 14 1980 Solar Maximum Mission Observatory launched to study solar flares. 02 15 1861 Fort Point completed & garrisoned (but has never fired it's cannon in anger). 02 15 1898 USS Maine sinks in Havana harbor, cause unknown. 02 15 1917 San Francisco Public Library dedicated. 02 15 1950 Walt Disney's "Cinderella" released 02 15 1954 First bevatron in operation - Berkeley, California 02 16 1883 Ladies Home Journal begins publication. 02 16 1914 First airplane flight to Los Angeles from San Francisco. 02 16 1918 Lithuania proclaims its short-lived independence. 02 16 1923 Howard Carter finds the tomb of Pharoah Tutankhamun 02 16 1937 Nylon patented, WH Carothers 02 16 1946 First commercially designed helicopter tested, Bridgeport Ct 02 17 1870 Mississippi readmitted to U.S. after Civil War 02 17 1876 Sardines were first canned, in Eastport, Maine. 02 17 1878 First telephone exchange in San Francisco opens with 18 phones. 02 18 1850 Legislature creates the 9 San Francisco Bay Area counties. 02 18 1930 Pluto, the ninth planet, is discovered by Clyde Tombaugh. 02 18 1939 Golden Gate International Exposition opens on Treasure Island (which was built for the occasion) in San Francisco Bay. 02 19 1878 Thomas Alva Edison patents the phonograph. 02 19 1945 Marines land on Iwo Jima. 02 19 1977 President Ford pardons Iva Toguri D'Aquino ("Tokyo Rose"). 02 20 1873 University of California gets its first Medical School (UC/SF). 02 20 1901 First territorial legislature of Hawaii convenes. 02 20 1915 Panama-Pacific International Exposition opens in San Francisco. 02 20 1931 Congress allows California to build the Oakland-Bay Bridge. 02 20 1962 John Glenn is first American to orbit the Earth. 02 21 1804 First self-propelled locomotive on rails demonstrated, in Wales. 02 21 1878 First Telephone book is issued, in New Haven, Conn. 02 22 1900 Hawaii becomes a US Territory. 02 23 1887 Congress grants Seal Rocks to San Francisco. 02 23 1900 Steamer "Rio de Janiero" sinks in San Francisco Bay. 02 23 1958 Last SF Municipal arc light, over intersection of Mission & 25th Street, removed (it had been installed in 1913). 02 24 1857 Los Angeles Vineyard Society organized. 02 24 1942 Voice of America begins broadcasting (in German). 02 25 1919 Oregon is first state to tax gasoline (1 cent per gallon). 02 26 1863 President Lincoln signs the National Currency Act. 02 26 1933 Golden Gate Bridge ground-breaking ceremony. 02 27 1844 Dominican Republic gains it's independence. 02 27 1991 President Bush declares a cease-fire, halting the Gulf War. 02 28 1849 First steamship enters San Francisco Bay. 02 28 1883 First vaudeville theater opens. 02 28 1914 Construction begins on the Tower of Jewels for the Exposition. 02 28 1956 Forrester issued a patent for computer core memory. 03 01 1781 The Articles of Confederation adopted by Continental Congress. 03 01 1859 Present seal of San Francisco adopted (2nd seal for city). 03 01 1864 Patent issued for taking & projecting motion pictures to Louis Ducos du Hauron (he never did build such a machine, though). 03 01 1867 Nebraska becomes a state. 03 01 1872 Yellowstone becomes world's first national park 03 01 1961 President Kennedy establishes the Peace Corps. 03 01 1966 Venera 3 becomes the first manmade object to impact another planet - Venus. 03 01 1970 End of commercial whale hunting by the US. Japan, stop it! 03 01 1982 Soviet Venera 13 makes a soft landing on Venus. 03 02 1836 Texas declares independence from Mexico. 03 02 1861 Congress creates the Territory of Nevada. 03 02 1917 Puerto Rico territory created, US citizenship granted. 03 02 1929 US Court of Customs & Patent Appeals created by US Congress. 03 02 1949 First automatic street light installed. (In New Milford, CT) 03 02 1958 First surface crossing of the Antarctic continent ends. 03 02 1972 Pioneer 10 launched for Jupiter flyby. 03 02 1974 First Class postage raised to 10 cents from 8 cents. 03 02 1978 Soyuz 28 carries 2 cosmonauts (1 Czechoslovakian) to Salyut 6 03 03 1791 Congress passed a resolution ordering U.S. Mint be established. 03 03 1812 Congress passes first foreign aid bill. 03 03 1845 Florida becomes 27th state 03 03 1849 Gold Coinage Act passed, allowing gold coins to be minted. 03 03 1851 Congress authorizes smallest US silver coin, the 3-cent piece. 03 03 1861 Russian Tsar Alexander II abolishes serfdom 03 03 1863 Abraham Lincoln approves charter for National Academy of Sciences 03 03 1875 A 20-cent coin was authorized by Congress (It lasted 3 years). 03 03 1878 Bulgaria liberated from Turkey 03 03 1885 American Telephone and Telegraph incorporated. 03 03 1923 Time magazine publishes its first issue. 03 03 1931 "Star Spangled Banner" officially becomes US national anthem. 03 03 1956 Morocco gains its independence. 03 03 1969 Apollo 9 launched 03 03 1972 Pioneer 10 launched thru asteroid belt & Jupiter 03 04 1675 John Flamsteed appointed first Astronomer Royal of England. 03 04 1789 Congress declares the Constitution to be in effect. 03 04 1791 Vermont admitted as 14th state. 03 04 1792 Oranges introduced to Hawaii. 03 04 1793 Shortest inauguration speech, 133 words, Washington (2nd time). 03 04 1801 Jefferson is the first President inaugurated in Washington, DC. 03 04 1826 First US railroad chartered, the Granite Railway in Quincy, Mass. 03 04 1841 Longest inauguration speech, 8443 words, William Henry Harrison. 03 04 1861 Confederate States adopt "Stars & Bars" flag 03 04 1902 American Automobile Association (AAA) founded. 03 04 1933 Roosevelt inaugurated, "We have nothing to fear but fear itself" 03 04 1934 Easter Cross on Mt. Davidson dedicated. 03 04 1955 First radio facsimile transmission is sent across the continent. 03 04 1959 Pioneer 4 makes first US lunar flyby. 03 04 1968 Orbiting Geophysical Observatory 5 launched 03 04 1977 First CRAY 1 supercomputer shipped to Los Alamos Labs, NM 03 04 1979 US Voyager I photo reveals Jupiter's rings 03 05 1616 Corpernicus' DE REVOLUTIONIBUS placed on Catholic forbidden index 03 05 1770 Boston Massacre 03 05 1845 Congress appropriates $30,000 to ship camels to western US. 03 05 1908 1st ascent of Mt. Erebus, Antarctica 03 05 1933 FDR proclaims 10-day bank holiday. 03 05 1946 Winston Churchill's "Iron Curtain" speech 03 05 1979 Voyager I's closest approach to Jupiter 03 06 1665 "The Philosophical Transactions of the Royal Society" was first published, and is still published today. 03 06 1836 Alamo falls. Remember it! 03 06 1857 Dred Scott decision rendered. 03 06 1986 Soviet Vega 1 probe passes within 10,000 km of Halley's comet 03 07 1778 James Cook first sights Oregon coast, at Yaquina Bay 03 07 1848 In Hawaii, the Great Mahele (division of lands) is signed. 03 07 1876 Alexander Graham Bell patents the telephone. 03 07 1912 Roald Amundsen announces the discovery of the South Pole 03 07 1926 First transatlantic telephone call (London-New York) 03 07 1933 The game "Monopoly" is invented. 03 07 1936 Hitler breaks Treaty of Versailles, sends troops to Rhineland 03 07 1962 US Orbiting Solar Observatory is launched. 03 07 1981 Walter Cronkite's final CBS anchor appearance. Still unequaled. 03 08 1862 The Confederate ironclad "Merrimack" launched. 03 08 1917 US invades Cuba, for third time. No wonder they're paranoid. 03 08 1934 Edwin Hubble photo shows as many galaxies as Milky Way has stars 03 08 1965 First US forces arrive in Vietnam. Oh unhappy day! 03 08 1976 Largest observed falling single stony meteorite (Jiling, China) 03 09 1497 Nicolaus Copernicus first recorded astronomical observation. 03 09 1796 Napoleon Bonaparte marries Josephine de Beauharnais 03 09 1822 Charles Graham of NY granted patent for artificial teeth 03 09 1862 The ironclads "Monitor" (Union) & "Merrimack" (Rebel) battle in Hampton Roads. It was a standoff. 03 09 1954 Edward R. Murrow criticizes Senator McCarthy (See it Now) 03 09 1961 Sputnik 9 carries Chernushka (dog) into orbit 03 09 1979 First extraterrestrial volcano found, (Jupiter's satellite Io). 03 10 1847 First money minted in Hawaii. 03 10 1849 Abraham Lincoln applies for a patent, only US president to do so. 03 10 1876 First telephone call, made by Alexander Graham Bell 03 10 1933 Big earthquake in Long Beach (W.C. Fields was making a movie when it struck & the cameras kept running). 03 10 1977 Rings of Uranus discovered during occultation of SAO 03 11 1810 Emperor Napoleon married by proxy to Archduchess Marie Louise 03 11 1861 Confederate convention in Montgomery, adopts constitution 03 11 1867 Great Mauna Loa eruption (volcano in Hawaii). 03 11 1892 First public game of basketball. 03 11 1938 Germany invades Austria. 03 11 1941 FDR signs Lend-Lease Bill with England. 03 11 1942 Gen MacArthur leaves Bataan for Australia. 03 11 1960 Pioneer 5 launched; orbits sun between Earth & Venus 03 11 1985 Mikhail Gorbachev replaces Konstantin Chernenko. 03 12 1850 First $20 Gold piece issued. 03 12 1868 Congress abolishes manufacturers tax 03 12 1912 Girl Guides (Girl Scouts) founded in Savanah Ga 03 12 1925 First transatlantic radio broadcast. 03 12 1936 FDR conducts his first "Fireside Chat" 03 12 1981 Soyuz T-4 carries 2 cosmonauts to Salyut 6 space station 03 13 1639 Harvard University is named for clergyman John Harvard. 03 13 1677 Massachusets gains title to Maine for $6,000. 03 13 1852 Uncle Sam makes his debut in the New York "Lantern" 03 13 1877 Chester Greenwood patents ear muffler 03 13 1884 US adopts standard time 03 13 1925 Law passed in Tennessee prohibiting teaching evolution 03 13 1930 Clyde Tombaugh announces discovery of Pluto at Lowell Observatory 03 13 1970 Digital Equipment Corp introduces the PDP-11 minicomputer. 03 13 1986 Soyuz T-15 launched 03 14 1629 Royal charter grants Massachusets Bay Colony 03 14 1644 Royal patent for Providence Plantations (now Rhode Island). 03 14 1794 Eli Whitney patents the cotton gin 03 14 1870 Legislature approves act making Golden Gate Park possible. 03 14 1896 Sutro Baths opens by Cliff House (closed Sept 1, 1952). 03 14 1900 US currency goes on gold standard 03 14 1903 First national bird reserve established in Sebastian, Florida 03 14 1923 President Harding is the first president to file his income tax. 03 14 1948 Freedom Train arrives in San Francisco. 03 14 1965 Israeli cabinet approves diplomatic relations with W Germany 03 14 1983 OPEC cuts oil prices for first time in 23 years. 03 15 1944 Julius C‘sar assassinated in Roman Senate. Et tu, Brute? 03 15 1820 Maine admitted as 23rd state 03 15 1913 Woodrow Wilson holds the first Presidential Press Conference. 03 15 1916 Pershing and 15,000 troops chase Pancho Villa into Mexico. 03 15 1917 Nicholas II, last Russian tsar, abdicates 03 15 1937 First blood bank established, Chicago, Illinois 03 15 1956 My Fair Lady opens in New York. 03 15 1960 Key Largo Coral Reef Preserve established (first underwater park) 03 15 1968 US Mint stops buying and selling gold. 03 15 1968 US Mint stops buying and selling gold. 03 15 1999 Pluto again becomes the outermost planet. 03 16 1621 First Indian appears at Plymouth, Massachusets 03 16 1802 Law signed to establish US Military Academy at West Point, NY 03 16 1827 First US black newspaper, Freedom's Journal, New York 03 16 1916 US and Canada sign Migratory Bird Treaty 03 16 1926 Robert Goddard launches first liquid fuel rocket - 184 feet 03 16 1935 Hitler orders German rearmament, violating Versailles Treaty 03 16 1966 Gemini 8 launched with 2 astronauts 03 16 1975 US Mariner 10 makes 3rd, and final, fly-by of Mercury. 03 17 1906 President Theodore Roosevelt first uses the term "muckrake". 03 17 1910 Camp Fire Girls are organized. 03 17 1941 National Gallery of Art opens in Washington, DC 03 17 1950 Element 98 (Californium) is announced. 03 17 1958 Vanguard 1 measures shape of Earth 03 17 1959 Dalai Lama flees Tibet for India 03 17 1966 US sub locates missing hydrogen bomb in Mediterranean. 03 17 1969 Golda Meir becomes Israeli Prime Minister. 03 18 1541 de Soto is first European to record flooding of the Mississippi 03 18 1766 Britain repeals Stamp Act, partial cause of American Revolution. 03 18 1850 American Express founded. 03 18 1850 American Express founded 03 18 1881 Barnum & Bailey's Greatest Show on Earth opens in Madison Square Garden in New York City. 03 18 1892 Lord Stanley proposes silver cup challenge for Hockey 03 18 1909 Einar Dessau of Denmark - first ham broadcaster. 03 18 1931 First electric razor marketed by Schick. 03 18 1938 Mexico takes control of foreign-owned oil properties. 03 18 1952 First plastic lens for cataract patients fitted, Philadelphia. 03 18 1959 Pres Eisenhower signs Hawaii statehood bill 03 18 1965 Russia launches 2nd Voshkod, first spacewalk - Aleksei Leonov. 03 19 1822 Boston, Mass incorporated 03 19 1859 Faust by Charles Gounod premiers in Paris 03 19 1917 US Supreme Court upheld 8 hour work day for the railroads. 03 19 1918 Congress authorizes time zones & approves daylight time 03 19 1920 US Senate rejects Treaty of Versailles for 2nd time 03 19 1928 Amos & Andy debuts on radio 03 19 1928 'Amos and Andy' debut on radio. 03 19 1931 Nevada legalized gambling 03 19 1949 First museum devoted exclusively to atomic energy, Oak Ridge, TN 03 20 1760 Great Fire of Boston destroys 349 buildings 03 20 1833 US and Siam conclude their first commercial treaty 03 20 1852 Harriet Beecher Stowe's `Uncle Tom's Cabin,' published 03 20 1886 First commercial AC-power plant begins operation 03 20 1942 MacArthur vowes to Phillipinos, "I shall return" 03 21 1851 Yosemite Valley discovered in California, paradise found. 03 21 1965 US Ranger 9 launched takes 5,814 pictures before lunar impact 03 21 1965 Martin Luther King Jr begins march from Selma to Montgomery 03 22 1621 Massasoit & Pilgrims agree on league of friendship (Plymouth) 03 22 1733 Joseph Priestly (father of soda pop) invents carbonated water. 03 22 1765 Britain enacts the now infamous Stamp Act 03 22 1778 Captain Cook sights Cape Flattery, in Washington state 03 22 1882 Congress outlaws polygamy. Male longevity increases. 03 22 1941 Grand Coulee Dam in Washington state goes into operation 03 22 1945 Arab League is founded 03 22 1946 Jordan (formerly Transjordan) gains independence from Britain. 03 22 1957 Earthquake gives San Francisco the shakes. 03 22 1960 Schawlow and Townes obtain a patent for the laser. 03 22 1963 Beatles release their first album, Please Please Me 03 22 1968 President Johnson's daughter, Lynda, ordered off Cable Car because she was eating an ice cream cone (no food on cars!). 03 22 1977 Indira Gandhi resigns as PM of India 03 22 1978 Robert Frost Plaza, at California, Drumm & Market, dedicated. 03 22 1981 First Class Postage raised from 15 cents to 18 cents. 03 22 1981 Soyuz 39 carries 2 cosmonauts (1 Mongolian) to Salyut 6. 03 22 1982 3rd Space Shuttle Mission - Columbia 3 launched 03 23 1743 George Frederic Handel's oratorio "Messiah" premieres in London. 03 23 1752 Pope Stephen II elected to succeed Zacharias, dies 2 days later. 03 23 1775 Patrick Henry asks for Liberty or Death. 03 23 1806 Lewis the Clark reach the Pacific coast. 03 23 1840 First photo of moon is taken. 03 23 1919 Benito Mussolini founds the Fascist movement in Milan, Italy. 03 23 1929 First telephone installed in the White House. 03 23 1933 German Reichstag grantes Adolf Hitler dictatorial powers. 03 23 1944 Nicholas Alkemade falls 5,500 m without a parachute and lives. 03 23 1956 Pakistan becomes independent within British Commonwealth. 03 23 1962 President John F. Kennedy visits San Francisco. 03 23 1965 Gemini 3 blasts off, first US 2-man space flight. 03 23 1976 International Bill of Rights goes into effect, 35 nations ratify. 03 24 1765 Britain enacts Quartering Act 03 24 1882 German scientist Robert Koch discovers bacillus cause of TB 03 24 1882 German Robert Koch discovers bacillus, cause of Tuberculosis. 03 24 1934 FDR grants future independence to Philippines 03 24 1955 Tennessee Williams, "Cat on a Hot Tin Roof" opens on Broadway. 03 24 1965 US Ranger 9 strikes moon 10 miles NE of crater Alphonsus 03 24 1972 Great Britain imposes direct rule over Northern Ireland 03 24 1976 Argentine President Isabel Peron deposed by country's miltitary. 03 24 1986 Libya attacks US forces in Gulf of Sidra. US 2, Libya 0. 03 25 1634 Maryland founded as a Catholic colony 03 25 1655 Christiaan Huygens discovers Titan, (Saturn's largest satelite) 03 25 1821 Greece gains its independence. 03 25 1857 Frederick Laggenheim takes the 1st photograph of a solar eclipse 03 25 1951 Purcell and Ewen detect 21-cm radiation at Harvard physics lab 03 25 1954 RCA manufactures the first COLOR television. 03 25 1955 East Germany granted full sovereignty by occupying power, USSR 03 25 1960 First guided missile launched from nuclear powered sub (Halibut) 03 26 1845 Adhesive medicated plaster patented, precusor of bandaid. 03 26 1878 Hastings College of Law founded. 03 26 1885 Eastman Film Company makes first commercial motion picture film 03 26 1937 Spinach growers of Crystal City, Tx, erect statue of Popeye 03 26 1953 Dr Jonas Salk announces new vaccine against polio 03 26 1958 Army launched US's 3rd successful satellite Explorer III 03 26 1970 Golden Gate Park Conservatory made a City Landmark. 03 26 1971 East Pakistan proclaimed independence taking name Bangladesh 03 26 1979 Camp David peace treaty between Israel and Egypt 03 26 1982 Groundbreaking in Washington DC for Vietnam Veterans Memorial 03 27 1512 Spanish explorer Juan Ponce de Leon sights Florida. 03 27 1625 Charles I King of England Scotland & Ireland ascends to throne 03 27 1794 The US Navy is founded. Anchors Aweigh! 03 27 1802 Asteroid Pallas discovered by Heinrich Olbers 03 27 1807 Asteroid Vesta discovered by Olbers 03 27 1836 First Mormon temple dedicated in Kirtland, Ohio. 03 27 1855 Abraham Gesner receives a patent for kerosene 03 27 1860 ML Byrn patents the corkscrew. Bless you sir! 03 27 1933 US Farm Credit Administration authorized. 03 27 1964 Earthquake strikes Alaska, 8.4 on Richter scale. 03 27 1968 SF Japanese Trade and Cultural Center (Japan Center) dedicated. 03 27 1972 Soviet spacecraft Venera 8 launched to Venus 03 27 1980 Mount St. Helens becomes active after 123 years 03 28 1794 Nathan Briggs gets patent for the washing machine. 03 28 1930 Constantinople and Angora change names to Istanbul and Ankara. 03 28 1939 Spanish Civil War ends, facist Francisco Franco wins 03 29 1871 Albert Hall opens it's doors in London. 03 29 1886 Coca-Cola is created (with cocaine). It satisfies your craving. 03 29 1961 23rd Amendment ratified, Washington DC can vote for the president 03 29 1973 US troops leave Vietnam, 9 yrs after Tonkin Resolution 03 29 1974 Mariner 10's first fly-by of Mercury, returns photos 03 30 1842 Dr. Crawford Long, first uses ether as an anesthetic. 03 30 1853 Patent granted to Hyman Lipman for a pencil with an ERASER! 03 30 1867 US purchases Alaska for $7,200,000 (Seward's Folly) 03 30 1870 15th Amendment passed, guarantees right to vote to all races 03 30 1932 Amelia Earhart is 1st woman to fly across the Atlantic solo 03 30 1950 Invention of the Phototransistor is announced at Murray Hill, NJ 03 31 1854 Commodore Perry makes Japan opens its ports to foreign trade 03 31 1870 Thomas P Mundy became 1st black to vote in US (Perth Amboy NJ) 03 31 1880 Wabash Ind - first town completely illuminated by electric light 03 31 1889 Eiffel Tower completed. 03 31 1932 Ford publicly unveils its first V-8 engine 03 31 1933 Congress authorizes Civilian Conservation Corps (CCC). 03 31 1943 Rodgers & Hammerstein musical "Oklahoma!" opens on Broadway 03 31 1949 Newfoundland becomes 10th Canadian province 03 31 1963 Los Angeles ends streetcar service after nearly 90 years. 03 31 1966 USSR launches Luna 10, first spacecraft to orbit moon 04 01 1778 Oliver Pollock, a New Orleans Businessman, creates the "$". 04 01 1850 San Francisco County Government established. 04 01 1853 Cincinnati became first US city with salaried firefighters 04 01 1918 Royal Air Force established 04 01 1952 "Big Bang" theory published by Alpher, Bethe and Gamow 04 01 1960 TIROS I (Television and Infra-Red Observation Satellite) launched to improve weather prediction. 04 01 1964 USSR launches Zond 1 towards Venus 04 01 1971 US/Canada ISIS II launched to study ionosphere 04 01 1979 Iran proclaimed an Islamic Republic following fall of the Shah 04 02 1513 Florida discovered, claimed for Spain by Ponce de Le¢n 04 02 1792 Congress establishes Coin denominations and authorizes US Mint 04 02 1935 Watson Watt granted a patent for RADAR. 04 02 1958 NACA renamed NASA 04 02 1972 Apollo 16's Young and Duke land on the moon and hot-rod with the Boeing Lunar Rover #2 04 03 1910 Highest mountain in North America, Alaska's Mt McKinley climbed 04 03 1948 Harry Truman signs Marshall Plan (Aid to Europe) 04 03 1966 USSR's Luna 10 becomes the first craft to orbit the Moon 04 03 1982 UN Security Council demands Argentina withdraw from Falklands. 04 04 1818 Congress decided US flag is 13 red and white stripes and 20 stars 04 04 1860 Pony Express begins service, from St. Joseph, Missouri. 04 04 1870 Golden Gate Park established by City Order #800. 04 04 1902 Cecil Rhodes scholarship fund established with $10 million 04 04 1949 NATO established 04 04 1983 Maiden voyage of STS Space shuttle Challenger 04 05 1614 Indian princess Pocahontas marries English colonist John Rolfe 04 05 1973 Pioneer 11 blasts off toward Jupiter 04 05 1991 Atlantis lifts off carrying the 17.5 ton Gamma Ray Observatory. 04 06 0648 BC Earliest total solar eclipse chronicled by Greeks is observed 04 06 1663 Kings Charles II signs Carolina Charter 04 06 1862 Battle of Shiloh. 04 06 1868 Brigham Young marries number 27, his final wife. 04 06 1896 First modern Olympics 04 06 1906 First animated cartoon copyrighted 04 06 1909 North Pole reached by Americans Robert Peary and Matthew Henson 04 06 1909 First credit union established in US 04 06 1917 US declares war on Germany (WWI) 04 06 1926 4 planes take off on first successful around-the-world flight. 04 06 1957 New York City ends trolley car service. 04 06 1965 Intelsat 1 ("Early Bird") first commercial geosynchronous communications satellite 04 06 1973 Pioneer 11 launched to Jupiter and Saturn 04 07 1931 Seals Stadium opens. 04 07 1933 Prohibition ends. "Gimme a beer, Mac." 04 07 1948 World Health Organization is established. 04 07 1953 First jet transatlantic non-stop flight (west to east) 04 07 1959 NASA selects first seven astronauts 04 07 1959 Radar first bounced off sun, from Stanford California. 04 08 1513 Ponce de Leon arrives in Florida. 04 08 1913 17th Amendment, requiring direct election of senators, ratified 04 08 1974 Hank Aaron hits 715th home run, beats Babe Ruth's record. 04 08 1986 Clint Eastwood elected mayor of Carmel, California. 04 09 1831 Robert Jenkins loses an ear: war between Britain and Spain. 04 09 1865 Lee surrenders at Appomattox, ending Civil War. 04 09 1953 TV Guide publishes their first issue. 04 09 1955 United Nations Charter hearing. 04 10 1790 US Patent system established 04 10 1825 First hotel in Hawaii opens. 04 10 1849 Safety pin is patented by Walter Hunt. 04 10 1866 ASPCA (Society for Prevention of Cruelty to Animals) organized. 04 10 1878 California Street Cable Car Railroad Company starts service. 04 10 1882 Matson founds his shipping company (San Francisco and Hawaii) 04 10 1912 RMS Titanic sets sail for its first and last voyage 04 10 1930 Synthetic rubber first produced 04 10 1953 House of Wax, first 3-D movie, released in New York. 04 10 1960 Senate passes landmark Civil Rights Bill 04 11 1876 Benevolent and Protective Order of Elks organized. 04 11 1943 Frank Piasecki, flies his first single-rotor helicopter 04 11 1947 Jackie Robinson becomes first black in major league baseball. 04 11 1970 Apollo 13 launched to moon; unable to land, returns in 6 days 04 12 1204 4th Crusade sacks Constantinople 04 12 1861 Fort Sumter, S. C., shelled by Confederacy, starts Civil War. 04 12 1877 British annex Transvaal, in South Africa 04 12 1898 Army transfers Yerba Buena Island to Navy. 04 12 1933 Moffatt Field (Naval Air Station) is commissioned. 04 12 1938 First US law requiring medical tests for marriage licenses, NY 04 12 1955 Salk polio vaccine safe and effective; four billion dimes marched 04 12 1961 Cosmonaut Yuri Alexeyevich Gagarin becomes first man in orbit. 04 12 1981 Maiden voyage Space Transit System-space shuttle Columbia. 04 13 1796 First elephant brought to America 04 13 1829 English Parliament grants freedom of religion to Catholics 04 13 1976 $2 bill re-introduced as United States currency, failed again. 04 14 1611 Word "telescope" is first used by Prince Federico Cesi 04 14 1817 First American school for deaf (Hartford, Conn) 04 14 1828 First edition of Noah Webster's dictionary is published. 04 14 1860 First Pony Express rider arrives in SF from St. Joseph, Missouri. 04 14 1865 Abraham Lincoln assassinated in Ford's Theater. 04 14 1894 First public showing of Edison's kinetoscope (moving pictures). 04 14 1956 Ampex Co. demonstrates first commercial videotape recorder. 04 14 1971 Fort Point dedicated as first National Park in SF Bay Area. 04 14 1981 First Space Shuttle - Columbia 1 returns to Earth. 04 15 1598 Edict of Nantes grants political rights to French Huguenots 04 15 1790 First US patent law passed 04 15 1850 City of San Francisco incorporated. 04 15 1912 Titanic sinks in the North Atlantic at 2:20 AM. 04 15 1923 Insulin becomes generally available for diabetics. 04 15 1923 First talking picture is screened before a paying audience. 04 15 1955 Ray Kroc starts the McDonald's fast food restaurants. 04 15 1983 Tokyo Disneyland opens 04 16 1705 Queen Anne of England knights Isaac Newton at Trinity College, 04 16 1866 Nitroglycerine at the Wells Fargo and Co. office explodes. 04 16 1912 Harriet Quimby flies English Channel, first woman to do so 04 16 1917 Lenin returns to Russia to start Bolshevik Revolution 04 16 1972 Apollo 16 launched; 5th lunar landing at Decartes Highlands 04 17 1492 Christopher Columbus contracts with Spain to find the Indies. 04 17 1524 New York Harbor discovered by Giovanni Verrazano. 04 17 1895 Treaty of Shimonoseki, ends first Sino-Japanese War (1894-1895). 04 17 1941 Office of Price Administration established (handled rationing) 04 17 1946 France grants Syria independence (Natl Day) 04 17 1961 Bay of Pigs, how not to run an invasion. 04 18 1775 'The British are Coming!' Paul Revere rides. 04 18 1868 San Francisco Society for Prevention of Cruelty to Animals born. 04 18 1869 First International Cricket Match, held in SF, won by Californian 04 18 1906 San Francisco Earthquake and Fire, "The Big One" 04 18 1907 Fairmont Hotel opens. 04 18 1934 First "Washateria" (laundromat) is opened, in Fort Worth, Texas 04 18 1936 The Pan Am "Clipper" begins regular passenger flights from San Francisco to Honolulu. 04 18 1946 League of Nations went out of business, replaced by UN 04 18 1949 Irish Republic comes into existence 04 18 1950 First transatlantic jet passenger trip 04 18 1978 U S Senate approves transfer of Panama Canal to Panama 04 19 1775 At Lexington Common, the shot 'heard round the world'. 04 19 1852 California Historical Society founded. 04 19 1892 Charles Duryea takes the first American-made auto out for a spin. 04 19 1934 Shirley Temple appears in her first movie, "Stand Up and Cheer" 04 19 1939 Connecticut approves the Bill of Rights (only 148 years late). 04 19 1967 US Surveyor III lands on moon 04 20 1775 British begin siege of Boston 04 20 1902 Marie and Pierre Curie isolated radioactive element radium 04 20 1940 First electron microscope demonstrated, Philadelphia, Pa 04 20 1973 Canadian ANIK A2 became first commercial satellite in orbit 04 20 1978 Korean Air Lines 707 forced to land; violated Soviet airspace 04 21 0753 BC - Rome founded. 04 21 1828 Noah Webster publishes first American dictionary 04 21 1857 A. Douglas patents the bustle (it's all behind us now). 04 21 1862 Congress establishes US Mint in Denver, Colorado. 04 21 1892 First buffalo born in Golden Gate Park. 04 21 1898 Spanish American war begins (Remember the Maine). 04 21 1967 Svetlana Alliluyeva (Stalin's daughter) defected in NYC 04 21 1972 Orbiting Astronomical Observer 4 (Copernicus) is launched 04 21 1977 Broadway play "Annie" opens, first of 2377 performances 04 21 1983 Soyuz T-8 is launched 04 21 1984 Franz Weber of Austria skis downhill at a record 209.8 kph 04 22 1500 Pedro Alvarez Cabral discovers Brazil 04 22 1509 Henry VIII ascends to throne of England 04 22 1529 Spain & Portugal divide eastern hemisphere in Treaty of Saragossa 04 22 1864 US Congress authorized "In God We Trust" on coinage 04 22 1889 Oklahoma land rush officially started; some were Sooner 04 23 1871 Blossom Rock in San Francisco Bay blown up. 04 23 1949 Courtesy Mail Boxes for motorists started in San Francisco. 04 23 1962 First US satellite to reach moon launched from Cape Canaveral 04 23 1965 Launch of first Soviet communications satelite 04 23 1967 Soyuz 1 launched, Vladimir Komarov becomes 1st inflight casualty 04 23 1972 Apollo 16 astronauts explores Moon surface 04 24 1800 Library of Congress founded with a $5000 allocation. 04 24 1865 SF Fire Alarm and Police Telegraph system put into operation. 04 24 1934 Wind gusts reach 372 kph at Mt Washington, NH 04 24 1953 Winston Churchill knighted by Queen Elizabeth II 04 24 1962 MIT sends TV signal by satellite for first time: CA to MA 04 24 1970 China launchs first satellite, transmitting song "East is Red". 04 24 1981 The IBM Personal Computer (PC) is introduced. 04 24 1990 Hubble Space Telescope put into orbit by shuttle Discovery. 04 25 1901 New York becomes first state requiring license plates for cars 04 25 1945 United Nations Conference starts. 04 25 1957 First experimental sodium nuclear reactor is operated. 04 25 1959 St Lawrence Seaway opens to shipping 04 25 1961 Mercury/Atlas rocket lifted off with an electronic mannequin. 04 25 1961 Robert Noyce granted a patent for the integrated circuit. 04 25 1972 Glider pilot Hans Grosse flies a record 1461 km 04 25 1975 First Boeing Jetfoil service, Hong Kong to Macao. 04 26 1607 First British to establish an American colony land at Cape Henry. 04 26 1777 16 year old Sybil Ludington rode from NY to CT rallying her father's militia to fight British in Danbury. 04 26 1920 Shapley and Curtis hold the "Great Debate" on nature of nebulae. 04 26 1954 Nationwide test of the Salk anti-polio begins. 04 26 1962 US/UK launched Ariel; first Intl payload. 04 26 1971 San Francisco Lightship replaced by automatic buoy. 04 26 1986 Chernobyl - world's worst nuclear power plant disaster. 04 27 1565 First Spanish settlement in Phillipines, Cebu City. 04 27 1897 Grant's Tomb (famed of song and legend) is dedicated. 04 27 1937 US Social Security system makes its first benefit payment. 04 27 1945 Founding of the Second Republic, in Austria. 04 27 1946 First radar installation aboard a commercial ship installed. 04 27 1960 First atomic-electric drive submarine launched (Tullibee). 04 27 1986 Captain Midnight (John R MacDougall) interrupts HBO. 04 27 4977 BC - Johannes Kepler's date for creation of universe. 04 28 0585 War between Lydia and Media is ended by a solar eclipse. 04 28 1686 First volume of Isaac Newton's PRINCIPIA is published. 04 28 1754 Mutiny on the HMS Bounty occurs. 04 28 1914 W. H. Carrier patents air conditioner. 04 28 1919 First successful parachute jump is made. 04 28 1942 "WW II" titled so, as result of Gallup Poll. 04 28 1947 Thor Heyerdahl and Kon-Tiki sail from Peru to Polynesia. 04 28 1952 WW II Pacific peace treaty takes effect. 04 28 1974 Last Americans evacuated from Saigon. 04 28 1977 Christopher Boyce convicted for selling satellite secrets. 04 29 1429 Joan of Arc leads Orleans, France, to victory over English. 04 29 1913 Gideon Sundback of Hoboken NJ patents the zipper. 04 29 1971 Salyut 1, world's First space station, launched into earth orbit. 04 30 1789 George Washington inaugurated as first president of the US 04 30 1798 Department of the Navy established. 04 30 1803 US more than doubles its size thru the Louisiana Purchase. 04 30 1900 Hawaii becomes a US Territory 04 30 1939 NBC/RCA make first US demo of TV at opening of NY World's Fair. 04 30 1942 First submarine built on the Great Lakes launched, the "Peto", from Manitowoc, Wisconsin. 04 30 1947 Boulder Dam renamed in honor of Herbert Hoover 04 30 1948 Organization of American States (OAS) charter signed in Bogot . 04 30 1973 Nixon announces resigtration of Haldeman, Ehrlichman, et al 04 30 1975 US forces evacuated Vietnam; Saigon surrenders 04 30 1980 Terrorists seize Iranian Embassy in London 05 01 1840 1st adhesive postage stamps (English "Penny Blacks") issued. 05 01 1850 John Geary becomes 1st mayor of City of San Francisco. 05 01 1860 1st school for the deaf founded. 05 01 1869 Folies-Bergere opens in Paris. 05 01 1884 Construction begins in Chicago on the 1st skyscraper. 05 01 1892 US Quarantine Station opens on Angel Island. 05 01 1928 Lei Day begun (a Hawaiian celebration) 05 02 1925 Kezar Stadium in Golden Gate Park opens. 05 02 1939 Lou Gehrig sets record for most consecutive games (2130) 05 03 1830 1st regular steam train passenger service starts. 05 03 1919 America's 1st passenger flight (New York-Atlantic City) 05 03 1971 national noncommercial network radio begins programming. 05 04 1626 Indians sell Manhattan Island for $24 in cloth and buttons. 05 04 1851 1st of the major San Francisco fires. 05 04 1878 Phonograph shown for 1st time at the Grand Opera House. 05 05 1908 The Great White Fleet arrives in San Francisco. 05 05 1949 Council of Europe established. 05 05 1961 Alan Shepard becomes 1st American in space (onboard Freedom 7). 05 06 1851 Patent granted to Dr. John Farrie for a "refrigeration machine" 05 06 1860 The Olympic Club, 1st athletic club in US, founded in SF. 05 07 1824 Beethoven's Ninth Symphony presented for first time. 05 07 1927 San Francisco Municipal Airport (Mills Field) dedicated. 05 07 1945 World War II ends in Europe. 05 07 1963 Telstar 2 launched (apogee 6,700 miles). 05 08 1541 Hernando de Soto discovers the Mississippi River. 05 08 1945 Germany surrenders, ending World War II in Europe. 05 10 1775 Continental Congress issues paper currency for 1st time. 05 10 1869 The Driving of the Golden Spike, Promontory Point, Utah: The Transcontinential railroad is completed. 05 10 1930 The first US planetarium opens, in Chicago. 05 11 1752 1st US fire insurance policy is issued, in Philadelphia. 05 11 1929 1st regularly scheduled TV broadcasts (3 nights per week). 05 11 1951 Jay Forrester patents computer core memory. 05 13 1607 English land to found Jamestown (1st permanent settlement) 05 13 1846 US declares war on Mexico. 05 13 1884 Institute for Electrical & Electronics Engineers (IEEE) founded 05 14 1811 Paraguay gains its independence. 05 14 1853 Gail Borden applies for patent for making condensed milk. 05 14 1948 State of Israel proclaimed. 05 14 1973 United States launches space station "Skylab". 05 15 1940 1st nylon stockings are sold in America. 05 15 1963 Last of the Mercury flights, the "Faith 7", launched. 05 16 1866 Congress authorizes nickel 5-cent piece (the silver half-dime was used up to this point). 05 16 1929 1st Oscars announced (best film was 'Wings'). 05 16 1971 First Class Mail now costs 8 cents (was 6 cents). 05 17 1792 24 brokers meet to found the New York Stock Exchange 05 17 1804 Lewis & Clark begin their exploration of the Louisiana Purchase 05 17 1954 Supreme Court rules on Brown v. Topeka Board of Education, overthrowing the principle of 'separate but equal'. 05 18 1933 Tennessee Valley Authority Act signed by President Roosevelt. 05 18 1980 Mount St. Helens blew its top in Washington State. 05 19 1862 The Homestead Act becomes law. 05 20 1927 At 7:40am, Lindbergh takes off from New York to cross Atlantic 05 21 1881 The American Red Cross is founded. 05 21 1927 Lindburgh lands in Paris, after 1st solo across Atlantic. 05 23 1898 1st Phillipine Expeditionary Troops sail from San Francisco. 05 23 1908 Dirigible explodes over SF Bay, 16 passengers fall, none die. 05 24 1844 Samual F.B. Morse taps out "What Hath God Wrought" 05 24 1866 Berkeley named (for George Berkeley, Bishop of Cloyne). 05 24 1883 The Brooklyn Bridge opened by Pres. Arthur & Gov. Cleveland. 05 24 1899 In Boston, the 1st auto repair shop opens. 05 25 1787 Constitutional Convention convenes in Philadelphia. 05 25 1927 Henry Ford stops producing the Model T car (begins Model A). 05 25 1940 Golden Gate International Exposition reopens. 05 25 1978 "Star Wars" is released. 05 25 1983 "Return of the Jedi" (Star Wars 3) is released. 05 26 1868 President Johnson avoids impeachment by 1 vote. 05 26 1937 Golden Gate Bridge opens. 05 26 1946 Patent filed in US for the H-Bomb. 05 27 1907 Bubonic Plague breaks out in San Francisco 05 27 1937 Golden Gate Bridge dedicated. 05 28 1926 United States Customs Court created by Congress. 05 29 1453 Constantinople falls to the Turks (some believe this signalled the end of the Middle Ages). 05 29 1953 Hillary & Norkay reach top of Mount Everest. 05 29 1978 First Class postage now 15 cents (was 13 cents for 3 years). 05 30 1911 Indianapolis 500 car race run for 1st time. 05 31 1433 Joan of Arc has a hot time at the stake... 05 31 1678 Lady Godiva takes a ride through Coventry 05 31 1868 1st recorded bicycle race, 2 kilometers in Paris. 05 31 1879 1st electric railway opens at Berlin Trades Exposition. 05 31 1889 Johnstown Flood 06 01 1638 First earthquake recorded in U.S., at Plymouth, Mass 06 01 1792 Kentucky becomes 15th state 06 01 1796 Tennessee becomes 16th state 06 01 1813 Capt John Lawrence utters Navy motto: 'Don't give up the ship'. 06 01 1845 Homing pigeon ends an 11,000 km trip (Namibia-London) in 55 days. 06 01 1925 Lou Gehrig starts in first of 2130 consecutive games, a record. 06 01 1933 Century of Progress world's fair opens in Chicago 06 01 1965 Penzias and Wilson detect 3 degree Kelvin primordial background. 06 01 1967 Beatles release "Sgt Pepper's Lonely Hearts Club Band". 06 02 0455 Gaiseric sacks Rome, what a Vandal. 06 02 1858 Donati Comet first seen, named after it's discoverer 06 02 1873 Construction of world's first cable car system, begins in SF. 06 02 1910 Pygmies discovered in Dutch New Guinea 06 02 1936 Gen. Anastasio Somoza takes over as dictator of Nicaragua 06 02 1953 Coronation of Queen Elizabeth II in Westminster Abbey 06 02 1966 Surveyor 1 lands in Oceanus Procellarum first moon soft-landing. 06 02 1977 New Jersey legalizes casino gambling in Atlantic City. 06 02 1979 John Paul II first pope to visit a communist country - Poland. 06 03 1539 Hernando De Soto claims Florida for Spain 06 03 1621 Dutch West India Company receives charter for "New Netherlands" 06 03 1770 Mission San Carlos Borromeo de Carmelo founded in California 06 03 1789 Alex Mackenzie began exploration of Mackenzie River 06 03 1888 "Casey at the Bat" is first published (by the SF Examiner) 06 03 1934 Dr Frederick Banting, co-discoverer of insulin knighted. 06 03 1935 French "Normandie" sets Atlantic crossing record: 1077 hours. 06 03 1937 Edward VIII, Duke of Windsor marries Wallis Warfield Simpson. 06 03 1942 Battle of Midway begins: first major battle won by airpower. 06 03 1948 200 inch Hale telescope dedicated at Palomar Observatory. 06 03 1949 "Dragnet" is first broadcast on radio (KFI in Los Angeles). 06 03 1965 Gemini IV is launched Ed White first American to walk in space 06 03 1976 US presented with oldest known copy of Magna Carta 06 03 1980 Crew of Soyuz 36 returns to Earth aboard Soyuz 35 06 04 0780 BC first total solar eclipse reliably recorded by Chinese 06 04 1784 Mme. Thible becomes first woman to fly (in a balloon) 06 04 1896 Henry drives his first Ford through streets of Detroit. 06 04 1940 British complete miracle of Dunkirk by evacuating 300,000 troops 06 04 1944 First submarine captured and boarded on high seas - German U 505 06 04 1947 Taft-Hartley Act approved despite a Truman veto. 06 04 1956 Speech by Khrushchev blasting Stalin is made public. 06 04 1986 Jonathan Pollard, spy for Israel, pleads guilty. 06 05 1783 Joseph and Jacques Montgolfier make first public balloon flight. 06 05 1833 Ada Lovelace (future computer programmer) meets Charles Babbage 06 05 1849 Denmark becomes a constitutional monarchy. 06 05 1875 Formal opening of the Pacific Stock Exchange. 06 05 1947 Sec of State George C. Marshall outlines `The Marshall Plan'. 06 05 1972 U.N. Conference on the Human Environment opens in Stockholm 06 05 1975 Suez Canal reopens (after 6 Day War caused it to close) 06 05 1980 Soyuz T-2 carries 2 cosmonauts to Salyut 6 space station 06 06 1809 Swedish Constitution and Flag Day (National Day) 06 06 1844 YMCA founded in London 06 06 1932 US Federal gas tax enacted 06 06 1933 First drive-in theatre opens, in Camden, New Jersey. 06 06 1934 Securities and Exchange Commission established 06 06 1944 D-Day, the Allied Invasion of "Festung Europa" 06 06 1946 Henry Morgan is first to take off his shirt on TV. 06 06 1967 Six Day War between Israel and its Arab neighbors begins. 06 06 1971 Soyuz 11 takes 3 cosmonauts to Salyut 1 space station 06 06 1975 British voters decide to remain on Common Market 06 06 1977 Supreme Court tosses out automatic death penalty laws 06 06 1978 Proposition 13 cuts California property taxes 57% Yipee! 06 06 1982 Israel invades Lebanon to drive out PLO 06 06 2012 Transit of Venus (between Earth and Sun) occurs. 06 07 1769 Daniel Boone begins exploring the Bluegrass State of Kentucky. 06 07 1776 Richard Lee of Virginia calls for Declaration of Independence. 06 07 1839 The Hawaiian Declaration of Rights is signed. 06 07 1839 Hawaiian Declaration of Rights is signed 06 07 1905 Norway declares independence from Sweden 06 07 1929 Vatican City becomes a soverign state 06 07 1938 First Boeing 314 Clipper "Flying Boat" flown by Eddie Allen 06 07 1948 Communists take over Czechoslovakia 06 07 1953 First color network telecast from Boston, Massachusets. 06 07 1965 Gemini 4 completes 62 orbits 06 07 1971 Soviet Soyuz 11 crew completes first transfer to orbiting Salyut 06 07 1972 German Chancellor Willy Brandt visits Israel 06 07 1977 Anita Bryant leads successful crusade against Miami gay law 06 07 1981 Israel bombs Iraqi plutonium production facility at Osirak. 06 08 1786 First commercially made ice cream sold in New York. 06 08 1869 Ives McGaffey patents his vacuum cleaner. 06 08 1918 Nova Aquila, brightest nova since Kepler's in 1604, is discovered 06 08 1940 Discovery of element 93 "Neptunium" is announced. 06 08 1953 Supreme Court forbids segregated lunch counters in Washington DC. 06 08 1975 Soviets launch Venera 9 to Venus 06 08 1979 The Source, first public computer info. service, goes online. 06 08 2004 Transit of Venus (between Earth and Sun) occurs. 06 09 1732 Royal Charter for Georgia, granted to James Oglethorpe. 06 09 1860 First dime novel published. 06 09 1898 China leases Hong Kong's New Territories to Britain for 99 years. 06 09 1931 Goddard patents rocket-fueled aircraft design. 06 09 1959 First ballistic missile launched from sub "George Washington" 06 10 1639 First American log cabin at Ft Christina (Wilmington, Del). 06 10 1752 Ben Franklin flies a kite in a thunderstorm, shocking! 06 10 1772 British revenue cutter "Gaspee" is burned by Rhode Islanders. 06 10 1801 State of Tripoli declares war on the US 06 10 1854 Georg F.B. Reiman proposes that space is curved 06 10 1869 The 'Agnes' arrives in New Orleans with the first ever shipment of frozen beef. 06 10 1898 US Marines land at Cuba in Spanish-American War. 06 10 1921 Babe Ruth becomes all time homerune champ with 120 of them. 06 10 1932 First demonstration of artificial lightning Pittsfield Mass. 06 10 1935 Alcoholics Anonymous formed in Akron by Dr Robert Smith 06 10 1940 Italy declares war on France and Britain 06 10 1954 PBS reaches San Francisco: KQED (Channel 9) starts broadcasting. 06 10 1977 Apple Computer ships its first Apple II. 06 11 1770 Capt Cook runs aground on Australian Great Barrier Reef 06 11 1859 Comstock silver load discovered near Virginia City, Nevada. 06 11 1895 First auto race. 06 11 1942 US and USSR sign Lend-Lease agreement during WW II. 06 11 1947 WW II sugar rationing finally ends. 06 11 1955 First magnesium jet airplane is flown. 06 11 1970 US leaves Wheelus Air Force Base in Libya. 06 11 1982 Movie "E T, The Extra-Terrestrial" is released. 06 12 1665 English rename New Amsterdam to New York after the Dutch leave. 06 12 1776 Virginia is first to adopt the Bill of Rights. 06 12 1812 Napoleon invades Russia. Classic "what not to" lesson. 06 12 1838 Hopkins Observatory, dedicated in Williamstown, Mass 06 12 1839 The first baseball game is played in America. Thanks Abner! 06 12 1898 Phillipines gains its independence from Spain. 06 12 1934 Black-McKeller Bill splits United Airlines from Boeing. 06 12 1957 Paul Anderson of US back-lifts a record 2850 kg. 06 12 1967 USSR launches Venera 4 for parachute landing on Venus 06 12 1967 Israel wins the Six Day War. 06 12 1979 Bryan Allen flies the "Gossamer Albatross", the first man-powered aircraft, over the English Channel. 06 13 1373 Anglo-Portuguese Treaty of Alliance (world's oldest) is signed 06 13 1611 John Fabricius dedicates the earliest sunspot publication. 06 13 1898 Yukon Territory of Canada organized, Dawson chosen as capital. 06 13 1900 China's Boxer Rebellion begins, against foreigners and Christians 06 13 1963 Valentina Tereshkova aboard Vostok 6, becomes the first woman in space. You've come a long way, baby. 06 13 1967 Thurgood Marshall nominated as first black Supreme Court justice. 06 13 1983 Pioneer 10 is first man-made object to leave the Solar System. 06 14 1775 The US Army is founded. 06 14 1777 Stars and Stripes adopted as US flag, replacing Grand Union flag. 06 14 1846 California (Bear Flag) Republic proclaimed in Sonoma. 06 14 1847 Bunson invents a gas burner. 06 14 1870 All-pro Cincinnati Red Stockings suffer first loss in 130 games. 06 14 1900 Hawaiian Territorial Government begins. 06 14 1919 First direct airplane crossing of the Atlantic. 06 14 1938 Chlorophyll patented by Benjamin Grushkin. How'd he do that? 06 14 1942 Walt Disney's "Bambi" is released. 06 14 1948 TV Guide is first published. 06 14 1951 UNIVAC 1, first commercial computer, is unveiled. 06 14 1952 Keel laid for first nuclear powered submarine, the Nautilus. 06 14 1967 Launch of Mariner V for Venus flyby 06 14 1975 USSR launches Venera 10 for Venus landing 06 14 1982 Britain wins the 74 day war for the Falkland Islands. 06 15 1215 King John reluctantly signs the Magna Carta at Runnymede. 06 15 1520 The pope threatens to toss Luther out of the Catholic Church. 06 15 1664 The state of New Jersey is founded. 06 15 1752 Ben Franklin's kite is struck by lightning, shocking! 06 15 1775 Washington appointed commander-in-chief of the American Army. 06 15 1836 Arkansas becomes 25th state 06 15 1844 Goodyear patents the process for vulcanization of rubber. 06 15 1846 Oregon Treaty signed, setting US-British boundary at 49ø North. 06 15 1878 First attempt at motion pictures(using 12 cameras, each taking one picture (to see if all 4 horse's hooves leave the ground 06 15 1919 First flight across Atlantic (Alcock and Brown). 06 15 1940 France surrenders to Hitler. 06 15 1951 First commercial electronic computer dedicated in Philadelphia. 06 15 1975 Soyuz 19 launched 06 15 1977 Spain's first free elections since 1936. 06 15 1978 Soyuz 29 carries 2 cosmonauts to Salyut 6; they stay 139 days. 06 15 1982 Riots in Argentina after Falklands/Malvinas defeat. 06 16 1567 Mary Queen of Scots thrown into Lochleven Castle prison 06 16 1775 The Battle of Bunker Hill (actually it was Breed's Hill). 06 16 1858 "A house divided against itself cannot stand" - Abraham Lincoln. 06 16 1903 Ford Motor Company, a vehicle manufacturer, is founded. 06 16 1933 US Federal Deposit Insurance Corporation (FDIC) is created. 06 16 1963 Valentina Tereshkova becomes first woman in space. 06 16 1977 Leonid Brezhnev named president of USSR 06 16 1984 Edwin Moses wins his 100th consecutive 400-meter hurdles race 06 17 1856 Republican Party opened its first convention in Philadelphia. 06 17 1885 Statue of Liberty arrives in NYC aboard French ship "Isere". 06 17 1944 Republic of Iceland proclaimed at Thingvallir, Iceland. 06 17 1947 First around-the-world civil air service leaves New York. 06 17 1963 Supreme Court strikes down Lord's Prayer recitation 06 17 1971 US returns control of Okinawa to Japanese 06 17 1972 Democratic HQ at Watergate burglarized by Republicans. 06 17 1982 Ronald Reagan delivers "evil empire" speech. 06 18 1178 Proposed time of origin of lunar crater Giordano Bruno. 06 18 1812 War of 1812 begins as US declares war against Britain. 06 18 1815 Battle of Waterloo. Napoleon defeated by Wellington and Blcher. 06 18 1873 Susan B Anthony fined $100 for attempting to vote for President. 06 18 1892 Macademia nuts first planted in Hawaii. 06 18 1928 Amelia Earhart is the first woman to fly across the Atlantic. 06 18 1953 Egypt is proclaimed a republic. 06 18 1959 First television broadcast transmitted from England to US. 06 18 1977 Space Shuttle test model "Enterprise" carries a crew aloft for first time, It was fixed to a modified Boeing 747 06 18 1981 Sandra Day O'Connor becomes first woman on the US Supreme Court. 06 18 1983 Sally Ride becomes first US woman in space, aboard Challenger. 06 19 0240 BC - Eratosthenes estimates the circumference of the earth. 06 19 1756 146 English people imprisoned in Black Hole of Calcutta. 06 19 1778 Washington's troops finally leave Valley Forge. 06 19 1846 First baseball game: NY Nines 23, Knickerbockers 1 (Hoboken, NJ). 06 19 1862 Slavery outlawed in US territories. 06 19 1910 Father's Day celebrated for first time in Spokane, Washington. 06 19 1931 First commercial photoelectric cell installed in West Haven Ct. 06 19 1932 First concert given in San Francisco's Stern Grove. 06 19 1934 Federal Communications Commission (FCC) created 06 19 1947 First plane to exceed 600 mph - Albert Boyd at Muroc, CA. 06 19 1976 Viking 1 enters Martian orbit after 10 month flight from earth. 06 19 1981 European Space Agency's Ariane carries two satellites into orbit. 06 20 1782 Congress approves Great Seal of US and the Eagle as it's symbol. 06 20 1791 King Louis XVI caught trying to escape French Revolution 06 20 1837 Queen Victoria at 18 ascends British throne following death of uncle King William IV. She ruled for 63 years, until 1901. 06 20 1863 West Virginia became 35th state 06 20 1948 Ed Sullivan has his first really big 'shoe' on Sunday night TV. 06 20 1963 US and USSR agree to set up a "Hot Line". 06 20 1968 Jim Hines becomes first person to run 100 meters in under 10 secs 06 20 1977 Oil enters Trans-Alaska pipeline exits 38 days later at Valdez. 06 20 1982 National Bald Eagle Day was declared. 06 21 1633 Galileo Galilei is forced by the Inquisition to "abjure, curse, and detest" his Copernican heliocentric views. Still in effect! 06 21 1788 US Constitution effective as NH is ninth state to ratify it. 06 21 1834 Cyrus Hall McCormick patents reaping machine. 06 21 1879 F. W. Woolworth opens his first store (failed almost immediately, so he found a new location and you know the rest...) 06 21 1948 First stored computer program run, on the Manchester Mark I. 06 21 1963 Pope Paul VI (Giovanni Battista Montini) succeeds John XXIII 06 22 1611 Henry Hudson set adrift in Hudson Bay during mutiny. 06 22 1675 Royal Greenwich Observatory established in England by Charles II. 06 22 1772 Slavery is outlawed in England. 06 22 1775 First Continental currency authorized 06 22 1807 British board USS Chesapeake, leading to the War of 1812. 06 22 1808 Zebulon Pike reaches his peak, it was all downhill after that. 06 22 1847 The doughnut is invented. 06 22 1910 First passenger carrying airship, the Zeppelin "Deutscheland". 06 22 1911 King George V of England crowned 06 22 1944 FDR signs "GI Bill of Rights" (Servicemen's Readjustment Act) 06 22 1978 The planet Pluto's partner, Charon, is discovered. 06 22 1983 First time a satellite is retrieved from orbit, by Space Shuttle. 06 23 1683 William Penn signs friendship treaty with Lenni Lenape indians in Pennsylvania; the only treaty "not sworn to, nor broken". 06 23 1757 Robert Clive defeats Indians at Plassey, wins control of Bengal 06 23 1868 Christopher Latham Sholes patents the typewriter. 06 23 1955 Walt Disney's "Lady And The Tramp" is released 06 23 1976 CN Tower in Toronto, tallest free-standing structure (555m) opens 06 23 1986 Tip O'Neill refuses to let Reagan address House 06 24 1314 Battle of Bannockburn; Scotland regains independence from England 06 24 1441 Eton College founded by Henry VI 06 24 1497 John Cabot claims eastern Canada for England 06 24 1509 Henry VIII becomes King of England 06 24 1817 First coffee planted in Hawaii, on the Kona coast. 06 24 1930 First radar detection of aircraft, at Anacostia, DC. 06 24 1949 Cargo airlines first licensed by US Civil Aeronautics Board. 06 24 1949 Hopalong Cassidy becomes first network western. 06 24 1963 First demonstration of home video recorder, BBC Studios, London. 06 24 1982 Soyuz T-6 lifts 3 cosmonauts (1 French) to Salyut 7 space station 06 24 1982 Equal Rights Amendment goes down in defeat. 06 24 1986 US Senate approves "tax reform" - taxes went up. 06 25 1178 Five Canterbury monks report something exploding on the Moon (the only known observation of probable meteor strike). 06 25 1630 The Fork is introduced to American dining by Governor Winthrop. 06 25 1835 Pueblo founded with construction of first building (start of Yerba Buena, later to be called San Francisco). 06 25 1938 Federal minimum wage law guarantees workers 40› per hour. 06 25 1950 Korean War begins; North Korea invades South. 06 25 1950 El Al begins air service. 06 25 1951 1st color TV broadcast: CBS' Arthur Godfrey from NYC to 4 cities 06 25 1953 First passenger flies commercially around the world < 100 hours. 06 25 1977 Roy C Sullivan of Virginia is struck by lightening for 7th time! 06 26 1483 Richard III crowned King of England. Villified by Thomas More. 06 26 1797 Charles Newbold patents first cast-iron plow. 06 26 1876 Custer's Last Stand 06 26 1900 Walter Reed begins research that beats yellow fever 06 26 1911 Nieuport sets an aircraft speed record of 133 kph 06 26 1934 FDR signs Federal Credit Union Act, establishing Credit Unions. 06 26 1945 UN Charter signed by 50 nations in San Francisco. 06 26 1948 US responses to Soviet blockade of Berlin with an airlift. 06 26 1949 Walter Baade discovers asteroid Icarus INSIDE orbit of Mercury. 06 26 1959 St Lawrence Seaway opens, linking Atlantic Ocean with Great Lakes 06 26 1963 John F. Kennedy visits West Berlin, "Ich bin ein Berliner". 06 26 1968 Iwo Jima and Bonin Islands returned to Japan by US 06 26 1978 First dedicated oceanographic satellite, SEASAT 1 launched. 06 27 1806 Buenos Aires captured by British 06 27 1838 Queen Victoria is crowned 06 27 1929 First color TV demo, in New York 06 27 1942 FBI captures 8 Nazi saboteurs from a sub off Long Island, NY. 06 27 1950 President Truman orders Air Force and Navy into Korean conflict. 06 27 1955 First automobile seat belt legislation enacted Illinois 06 27 1960 Chlorophyll "A" synthesized in Cambridge Mass 06 27 1962 NASA X-15 flies at 4105 mph 06 27 1963 Robert Rushworth in X-15 reaches 87 km 06 27 1978 Soyuz 30 launched 06 27 1982 4th Space Shuttle Mission - Columbia 4 launched 06 27 1983 Soyuz T-9 carries 2 cosmonauts to Salyut 7 space station 06 28 1820 The tomato is proved to be nonpoisonous. 06 28 1919 The Treaty of Versailles, ending World War I, was signed. 06 28 1939 Pan Am begins transatlantic air service with the Dixie Clipper. 06 28 1951 "Amos 'n Andy" show premiers on television (CBS). 06 29 1776 Mission Dolores founded by San Francisco Bay. 06 29 1854 Congress ratifies Gadsden Purchase of parts of New Mexico, Ariz. 06 29 1863 The very first First National Bank opens in Davenport, Iowa. 06 29 1916 The first Boeing aircraft flies. 06 29 1929 First high-speed jet wind tunnel completed Langley Field, CA. 06 29 1946 British arrest 2700 Jews in Palestine as alleged terrorists 06 29 1952 First aircraft carrier to sail around Cape Horn - the Oriskany. 06 29 1962 First flight of the Vickers VC-10 long-range airliner. 06 29 1971 Soyuz 11 docks with Salyut 1 for 22 days 06 30 1834 Congress creates Indian Territory 06 30 1893 The Excelsior diamond (blue-white, 995 carats) discovered. 06 30 1906 Pure Food and Drug Act and Meat Inspection Act adopted 06 30 1908 Giant fireball impacts in Central Siberia (the Tunguska Event) 06 30 1930 First round-the-world radio broadcast, from Schenectady NY. 06 30 1936 40 hour work week law approved in US. 06 30 1948 Transistor demonstrated Murray Hill, NJ. 06 30 1960 Zaire gains its independence. 06 30 1972 Timekeeping adjusted with the first leap second. 07 01 1535 Sir Thomas More went on trial in England charged with treason 07 01 1847 1st adhesive US postage stamps go on sale 07 01 1850 At least 626 ships lying at anchor around San Francisco Bay. 07 01 1863 Battle of Gettysburg, PA - Lee's northward advance halted. 07 01 1867 Dominion of Canada formed. 07 01 1873 Prince Edward Island becomes 7th Canadian province. 07 01 1898 Teddy Roosevelt and his Rough Riders charge up San Juan Hill. 07 01 1899 SF City Hall turned over to city, after 29 years of building 07 01 1919 First Class Postage DROPS to 2 cents from 3 cents. 07 01 1941 1st TV licenses granted: W2XBS-WNBT (NBC) & WCBW (CBS), New York 07 01 1943 first automatic withholding tax from paychecks 07 01 1944 Bretton Woods Conference starts, establishing world-wide financial systems (like the IMF and the World Bank). 07 01 1960 Italian Somalia gains independence, unites with Somali Republic. 07 01 1960 Ghana becomes a republic. 07 01 1962 Burundi & Rwanda gain independence from Belgium (National Days). 07 01 1966 Medicare goes into effect. 07 01 1968 US, Britain, USSR & 58 nations sign Nuclear Nonproliferation Trea 07 01 1969 Charles Philip Arthur George invested as the Prince of Wales 07 01 1971 Golden Gate Bridge paid for (so why is there still a toll?). 07 01 1982 Kosmos 1383, 1st search and rescue satellite, launched. 07 02 1890 Sherman Antitrust Act prohibits industrial monopolies. 07 02 1900 first flight of a Zeppelin (the LZ-1). 07 02 1926 US Army Air Corps created 07 02 1937 Amelia Earhart & Fred Noonan disappeared over the Pacific Ocean 07 02 1957 1st submarine built to fire guided missiles launched, "Grayback" 07 02 1964 President Johnson signs the Civil Rights Act. 07 02 1976 Supreme Court ruled death penalty not inherently cruel or unusual 07 02 1985 Proto launched on its way to Halley's Comet 07 03 1608 City of Quebec founded by Samuel de Champlain 07 03 1775 Washington takes command of Continental Army at Cambridge, Mass 07 03 1819 1st savings bank in US (Bank of Savings in NYC) opens its doors 07 03 1861 Pony Express arrives in SF with overland letters from New York. 07 03 1890 Idaho becomes 43rd state. 07 03 1898 US Navy defeats Spanish fleet in the harbor at Santiago Cuba 07 03 1962 Algeria becomes independent after 132 years of French rule 07 03 1983 Calvin Smith (US) becomes fastest man alive (36.25 kph for 100 m) 07 03 1986 Renovated Statue of Liberty is rededicated with great ceremony. 07 04 1054 Brightest known super-nova starts shining, for 23 days. 07 04 1057 Crab Nebula supernova recorded by Chinese & Japanese astronomers. 07 04 1776 Declaration of Independence - US gains independence from Britain 07 04 1802 US Military Academy officially openes at West Point, NY 07 04 1828 first US passenger railroad started, The Baltimore & Ohio 07 04 1845 Thoreau moves into his shack on Walden Pond. 07 04 1862 Lewis Carroll begins inventing "Alice in Wonderland" for his friend Alice Pleasance Liddell during a boating trip 07 04 1863 Boise, Idaho founded (now capital of Idaho). 07 04 1876 1st public exhibition of electric light in San Francisco. 07 04 1882 Telegraph Hill Observatory opens. 07 04 1884 Statue of Liberty is presented to theUnited States, in Paris. 07 04 1894 Elwood Haynes successfully tests one of the first US autos 07 04 1894 Republic of Hawaii established. 07 04 1903 Pacific Cable (San Francisco, Hawaii, Guam, Phillipines) opens. President Roosevelt sends a message to the Phillipines, 07 04 1933 Work begins on the Oakland Bay Bridge. 07 04 1946 Philippines gains independence from US 07 04 1965 Mariner 4 flies past Mars, sends first close-up photos. 07 04 1967 Freedom of Information Act goes into effect 07 04 1976 Raid on Entebbe - Israel rescues 229 Air France passengers 07 05 1687 Isaac Newton's PRINCIPIA is published by Royal Society in England 07 05 1811 Venezuela gains independence from Spain. 07 05 1859 Captain N.C. Brooks discovers Midway Islands. 07 05 1865 William Booth founds the Salvation Army, in London, England. 07 05 1935 first Hawaii Calls radio program is broadcast. 07 05 1938 Herb Caen gets his first column in the S.F. Chronicle. 07 05 1944 first rocket airplane flown 07 05 1950 Law of Return passes allowing all Jews rights to live in Israel 07 05 1951 Junction transistor invention announced, Murray Hill, NJ 07 05 1975 Cape Verde Islands independent, 500 years under Portuguese rule 07 05 1978 Soyuz 30 is launched 07 06 1885 1st inoculation (for rabies) of a human being, by Louis Pasteur 07 06 1928 Preview of 1st all-talking motion picture took place in NYC 07 06 1932 First Class postage back up to 3 cents from 2 cents. 07 06 1933 1st All-Star baseball game. American League won 5-2. 07 06 1964 Malawi (then Nyasaland) gains independence from Britain 07 06 1975 Comoros Islands gain independence from France (most of them). 07 06 1976 Soyuz 21 carries 2 cosmonauts to Salyut 5 space station. 07 07 1846 United States annexs California 07 07 1891 A patent was granted for the travelers cheque. 07 07 1898 Hawaii annexed to the United States. 07 07 1930 Construction began on Boulder (later Hoover) Dam 07 07 1946 Mother Frances X Cabrini canonized as 1st American saint 07 07 1978 Solomon Islands gains independence from Britain (National Day). 07 07 1980 first solar-powered aircraft crosses English Channel. 07 07 1990 The world's 3 greatest tenors: Carreras, Domingo and Pavarotti appear together, for the only time, in Rome. Simply ahhhsome! 07 08 1663 King Charles II of England granted a charter to Rhode Island 07 08 1776 Col. John Nixon gives 1st public reading of Decl of Independence 07 08 1796 1st American Passport issued by the US State Department. 07 08 1835 The Liberty Bell cracks (again). 07 08 1889 Vol 1, No 1, of "The Wall Street Journal" published. 07 08 1896 William Jennings Bryan makes his 'cross of gold' speech at the Democratic Convention in Chicago. 07 08 1905 Part of Angel Island (in SF bay ) becomes an Immigration Detention Center (port of entry for immigrants). 07 08 1907 Florenz Ziegfeld staged 1st `Follies' on NY Theater roof 07 08 1947 Demolition begins in New York for headquarters of United Nations 07 08 1977 Sabra Starr finishes longest recorded belly dance (100 hrs). 07 08 1978 Pioneer-Venus 2 Multi-probe launched to Venus. 07 09 1540 Henry VIII's 6-month marriage to Anne of Cleves is annulled. 07 09 1816 Argentina gains its independence. 07 09 1846 Capt Montgomery claims Yerba Buena (San Francisco) for the U.S. 07 09 1953 first helicopter passenger service, in New York 07 09 1957 Announcement of discovery of element 102 - nobelium 07 09 1979 Voyager II flies past Jupiter. 07 10 1890 Wyoming becomes the 44th state. 07 10 1925 USSR's official news agency TASS established. 07 10 1925 The Scopes 'Monkey Trial' on evolution, starts. 07 10 1940 Battle of Britain began as Nazi forces attack by air. 07 10 1962 Telstar, 1st communications satelite launched. 07 10 1966 Orbiter 1 Launched to moon. 07 10 1980 Ayatollah Khomeini releases Iran hostage Richard I. Queen 07 10 1985 French agents sink Greenpeace "Rainbow Warrior" in New Zealand. 07 11 1533 Pope Clement VII excommunicates England's King Henry VIII 07 11 1798 US Marine Corps is created by an act of Congress 07 11 1804 Burr and Hamilton duel. Burr won. 07 11 1864 Confederate forces, led by Gen J Early, invade Washington DC 07 11 1955 USAF Academy dedicated at Lowry AFB in Colorado 07 11 1962 Cosmonaut Micolaev set longevity space flight record-4 days 07 11 1962 1st transatlantic TV transmission via satellite (Telstar I). 07 11 1977 Medal of Freedom awarded posthumously to Martin Luther King 07 11 1979 US Skylab enters atmosphere over Australia & disintegrates. 07 11 1986 Mary Beth Whitehead christens her surrogate "Baby M", Sara. 07 12 1543 Henry VIII marries Catharine Parr (his 6th & last wife). 07 12 1812 US forces lead by Gen. Hull invade Canada (War of 1812). 07 12 1862 Congress authorizes Medal of Honor 07 12 1933 Congress passes 1st minimum wage law ($0.33 per hour). 07 12 1960 Echo I, 1st passive satellite launched. 07 12 1960 USSR's Sputnik 5 launched with 2 dogs. 07 12 1962 Cosmonaut Popovich in space 1st time 2, manned craft in space 07 12 1977 first free flight test of Space Shuttle Enterprise. 07 12 1979 Kiribati (Gilbert & Ellice Is.) gains independence from Britain. 07 12 1984 Geraldine Ferraro, Democrat, becomes the first woman to be a major-party candicate for Vice President. 07 13 1865 Horace Greeley advises readers to "Go west". He meant Michigan. 07 13 1919 first lighter-than-air transatlantic flight completed. 07 13 1977 New York City experiences a 25 hr black-out 07 13 1984 Sergei Bubka of USSR pole vaults a record 5.89 m. 07 14 1771 Mission San Antonio de Padua founded in California 07 14 1789 Citizens of Paris storm the (near empty) Bastille prison. 07 14 1850 1st public demonstration of ice made by refrigeration. 07 14 1853 Commodore Perry requests trade relations with the Japanese. 07 14 1865 1st ascent of the Matterhorn. 07 14 1953 first national monument dedicated to a Negro - GW Carver 07 14 1958 Iraqi army Iraq overthrew monarchy, a Colonel Saddam Hussein. 07 14 1959 first atomic powered cruiser, the Long Beach, Quincy Mass 07 14 1965 US Mariner IV, 1st Mars probe, passes at 6,100 miles 07 14 1987 Taiwan ends 37 years of martial law 07 15 1662 Charles II grants a charter to establish Royal Society in London. 07 15 1815 Napoleon Bonaparte captured. 07 15 1870 NW Territories created & Manitoba becomes 5th Canadian province. 07 15 1940 first betatron placed in operation, Urbana, Illinois 07 15 1954 first US passenger jet transport airplane tested (Boeing 707). 07 15 1975 Soyuz 19 and Apollo 18 launched; rendezvous 2 days later. 07 16 1212 Battle of Las Navas de Tolosa; end of Moslem power in Spain. 07 16 1548 La Paz, Bolivia is founded. 07 16 1769 Father Serra founds Mission San Diego, 1st mission in Calif. 07 16 1790 Congress establishes the District of Columbia. 07 16 1861 1st major battle of the Civil War -- Bull Run. 07 16 1935 1st automatic parking meter in US installed, Oklahoma City, OK 07 16 1945 1st atomic blast, Trinity Site, Alamogordo, New Mexico. 07 16 1969 Apollo 11, first manned ship to land on the moon is launched with astronauts Buzz Aldrin, Neil Armstrong and Michael Collins. 07 17 1821 Spain ceded Florida to US 07 17 1841 British humor magazine `Punch' 1st published. 07 17 1850 Harvard Observatory takes 1st photograph of a star (Vega) 07 17 1898 Spanish American War ends, in Santiago, Cuba. 07 17 1917 British royal family adopts the name `Windsor.' 07 17 1945 Potsdam Conference. FDR, Stalin, Churchill hold first meeting. 07 17 1948 Republic of Korea founded. 07 17 1954 Construction begins on Disneyland... 07 17 1955 ... Disneyland opens its doors in rural Orange County. 07 17 1959 Tibet abolishes serfdom 07 17 1962 Robert White in X-15 sets altitude record of 108 km (354,300 ft). 07 17 1969 Apollo/Soyuz, the first US/USSR linkup in space 07 17 0197 Pioneer 7 launched. 07 17 1984 Soyuz T-12 carries 3 cosmonauts to space station Salyut 7. 07 18 1964 The Great Fire of Rome begins (Nero didn't fiddle). 07 18 1536 Pope's authority declared void in England. 07 18 1872 Britain introduces voting by secret ballot. 07 18 1931 first air-conditioned ship launched - "Mariposa" 07 18 1936 Spanish Civil War begans, Francisco Franco leads uprising. 07 18 1938 Douglas `Wrong Way' Corrigan lands in Ireland-left NY for Calif 07 18 1955 first electric power generated from atomic energy sold. 07 18 1966 Carl Sagan turns one billion seconds old 07 18 1966 Gemini 10 launched. 07 18 1968 Intel Corporation is incorporated. Made first microchip. 07 18 1980 Rohini 1, first Indian satellite, is launched. 07 18 1984 Svetlana Savitskaya accompanies Vladimir Dzhanibekov on EVA outside Salyut 7, becoming first woman to walk in space. 07 18 1986 Videotapes released showing Titanic's sunken remains 07 19 1848 First Women's Rights Convention. Seneca Falls, NY 07 19 1880 SF Public Library allows patrons to start borrowing books. 07 19 1935 1st parking meters installed in Oklahoma City business district. 07 19 1955 "Balclutha" ties up at SF Pier 43 & becomes a floating museum. 07 19 1961 1st In-flight movie is shown (on TWA). 07 20 1810 Columbia gains its independence. 07 20 1859 admission fee first charged to see a baseball game (50 cents). 07 20 1871 British Columbia becomes 6th Canadian province. 07 20 1960 USSR recovered 2 dogs; 1st living organisms to return from space. 07 20 1960 1st submerged submarine fires Polaris missile, George Washington 07 20 1969 first men land on the moon, aboard Apollo 11 at 09:18 GMT. Neil Armstrong and Edwin Aldrin establish Tranquility Base 07 20 1976 first pictures from Mars surface received (courtesy Viking 2). 07 20 1977 Voyager 2 launched to the outer solar system. 07 21 1831 Belgium gains its independence. 07 21 1873 World's 1st train robbery, by Jesse James. 07 21 1940 Soviet Union annexes Estonia, Latvia, Lithuania. 07 21 1959 first atomic powered merchant ship, Savannah, christened. 07 21 1961 Mercury 4 is launched into sub-orbital flight 07 21 1965 Gemini 5 launched atop Titan V with Cooper and Conrad 07 21 1969 Neil Armstrong steps onto the moon at 02:56:15 GMT. "It's one small step for a man, one giant leap for mankind." 07 21 1969 Independence Day, celebrated in Belgium. 07 22 1933 Wiley Post completes 1st round-the-world solo flight. 07 22 1972 Venera 8 makes a soft landing on Venus. 07 23 1798 Napoleon captures Alexandria, Egypt. 07 23 1829 Typewriter is patented. 07 23 1904 The Ice Cream Cone is invented. 07 23 1937 Isolation of pituitary hormone announced 07 23 1968 PLO's 1st hijacking of an EL AL plane 07 23 1972 ERTS 1 (Earth Resources Technology Satellite) later called LANDSA launched to start its multi-spectral scans of Earth 07 23 1972 1st Earth Resources Technology Satellite (ERTS) is launched 07 23 1980 Soyuz 37 ferries 2 cosmonauts (1 Vietnamese) to Salyut 6. 07 24 1701 French make 1st landing at site of Detroit. 07 24 1704 Great Britain takes Gibralter from Spain 07 24 1847 Mormon leader Brigham Young & followers arrive at Salt Lake City, 07 24 1929 Hoover proclaims Kellogg-Briand Pact which renounced war 07 24 1946 US detonates atomic bomb at Bikini Atoll. See film Radio Bikini. 07 24 1959 Nixon has the `Kitchen Debate' with Khrushchev 07 25 1909 first airplane flight across the English Channel. 07 25 1952 Commonwealth of Puerto Rico created. 07 25 1956 Italian liner Andrea Doria sank after collision with Stockholm. 07 25 1963 US Russia & England sign nuclear test ban treaty 07 25 1973 USSR launches Mars 5 07 25 1981 Voyager 2 encounters Saturn, "thousands of rings". 07 25 1987 USSR launches Kosmos 1870, 15-ton earth-study satellite. 07 26 1775 Benjamin Franklin becomes the first Postmaster General. 07 26 1847 Liberia gains its independence. 07 26 1887 first book published in Esperanto. Not a hit. 07 26 1908 Federal Bureau of Investigation established 07 26 1947 Department of Defense established 07 26 1953 Fidel Castro begins revolution against Batista 07 26 1953 Korean War Armistice is signed. 07 26 1956 Egypt seizes the Suez Canal 07 26 1957 USSR launchs 1st intercontinental multi-stage ballistic missle. 07 26 1963 US launches Syncom 2, the first geosynchronous satellite 07 26 1965 Republic of Maldives gains independence from Britain (Nat'l Day). 07 26 1971 US launches Apollo 15 to the Moon 07 26 1982 Canada's Anik D1 comsat launched by US delta rocket. 07 27 1501 Copernicus formally installed as canon of Frauenberg Cathedral 07 27 1694 Bank of England is chartered. 07 27 1836 Adelaide, South Australia founded. 07 27 1866 Atlantic telegraph cable successfully laid (1,686 miles long). 07 27 1940 Billboard magazine starts publishing best-seller's charts. 07 27 1955 Austria regains full independence after 4-power occupation. 07 27 1962 Mariner 2 launched on a flyby mission to venus 07 27 1969 Pioneer 10 Launched. 07 28 1586 Sir Thomas Harriot introduces potatoes to Europe. 07 28 1821 Peru gains its independence. 07 28 1849 "Memmon" is first clipper to reach SF, 120 days out of NY 07 28 1851 total solar eclipse captured on a daguerreotype photograph 07 28 1866 Metric system becomes a legal measurement system in US 07 28 1868 14th Amendment ratified, citizenship to exslaves. 07 28 1900 The Hamburger is created by Louis Lassing in Connecticut 07 28 1914 Austria-Hungary attacks Serbia - World War I begins. 07 28 1931 Congress makes The Star-Spangled Banner our 2nd National Anthem 07 28 1932 President Hoover evicts bonus marchers from their encampment. 07 28 1933 1st Singing Telegram is delivered (to Rudy Vallee). 07 28 1964 Ranger 7 launched to the moon; sends back 4308 TV pictures. 07 28 1973 Skylab 3's astronauts are launched 07 28 1976 Eldon Joersz & Geo. Morgan set world airspeed record of 3,530 kph 07 29 1858 1st commercial treaty between US and Japan is signed. 07 29 1914 1st transcontinental phone link. Between NYC and San Francisco. 07 29 1920 1st transcontinental airmail flight: New York to San Francisco 07 29 1957 International Atomic Energy Agency established by UN 07 29 1978 Pioneer 11 transmits images of Saturn & its rings. 07 29 1981 The wedding of Prince Charles and Lady Diana 07 29 1985 19th Space Shuttle Mission - Challenger 8 is launched 07 30 1619 The House of Burgesses in Virginia is formed. 1st elective governing body in a British colony. 07 30 1836 1st English newspaper published in Hawaii. 07 30 1946 1st rocket to attain 100-mile altitude, White Sands, NM 07 30 1956 Motto of US "In God We Trust" authorized 07 30 1971 US Apollo 15 lands on Mare Imbrium. 07 30 1980 Vanuatu (then New Hebrides) gains independence from Britain, Fran 07 30 1983 STS-8 3rd flight of Challenger. 1st night launch & land. 07 30 1984 STS-14 first flight of the shuttle Discovery. 07 31 1498 Christopher Columbus discovers island of Trinidad. 07 31 1588 English fleet attacks Spanish armada 07 31 1790 1st US Patent granted (for a potash process). 07 31 1948 President Truman dedicates Idlewild Field (Kennedy Airport), NY 07 31 1964 Ranger 7 transmits the 1st lunar close-up photos before impact 07 31 1970 Chet Huntley retires from NBC, ending 'Huntley-Brinkley Report' (No more "Goodnight, David", "Goodnight, Chet") 08 01 1291 Everlasting League forms, the basis of the Swiss Confederation 08 01 1790 First U.S. Census 08 01 1794 Whisky Rebellion 08 01 1852 Black Methodists establish 1st black SF church, Zion Methodist 08 01 1901 Burial within San Francisco City limits prohibited. 08 01 1946 President Truman establishes Atomic Energy Commission. 08 01 1953 California introduces its Sales Tax (for Education). 08 01 1958 First Class postage up to 4 cents (had been 3 cents for 26 years 08 02 1873 1st trial run of an SF cable car, on Clay Street between Kearny and Jones, downhill all the way, at 4AM. 08 02 1877 San Francisco Public Library opens with 5000 volumes. 08 02 1990 Saddam Hussein of Iraq invades neighboring Kuwait in the first act of the 1991 Persian Gulf War. 08 03 1492 Columbus sets sail for 'the Indies'. 08 04 1693 Champagne is invented by Dom Perignon. 08 05 1775 The 1st Spanish ship, 'San Carlos', enters San Francisco bay. 08 05 1861 US levies its first Income Tax (3% of incomes over $800). 08 05 1864 Spectrum of a comet observed for 1st time, by Giovanni Donati 08 05 1963 Nuclear Test Ban Treaty signed. 08 06 1835 Bolivia gains its independence 08 06 1926 The first woman swims the English Channel. 08 06 1945 The first Atom Bomb was dropped on Hiroshima by the 'Enola Gay'. 08 07 1807 1st servicable steamboat, the Cleremont, goes on 1st voyage. 08 09 1842 The US-Canada border defined by the Webster-Ashburton Treaty. 08 09 1945 The 2nd Atom Bomb dropped on Nagasaki. 08 09 1974 Richard Nixon resigns presidency. 08 10 1809 Ecuador gains its independence. 08 10 1981 Pete Rose tops Stan Musial's record of 3630 hits. 08 11 1877 Asaph Hall discovers Mars' moon Deimos 08 11 1929 Babe Ruth hits his 500th homer 08 11 1933 Temp. hits 58øC (136øF) at San Luis Potos¡, Mex. (world record) 08 12 1851 Issac Singer granted a patent for his sewing machine. 08 12 1898 The peace protocol ending the Spanish-American War was signed. 08 12 1915 `Of Human Bondage,' by William Somerset Maugham, published. 08 12 1934 Babe Ruth's final game at Fenway Park, 41,766 on hand 08 13 1642 Christiaan Huygens discovers the Martian south polar cap 08 13 1876 Reciprocity Treaty between US and Hawaii ratified. 08 13 1961 Berlin Wall erected in East Germany 08 14 0410 Alaric sacks Rome, he really was a Vandal. 08 14 1457 Oldest exactly dated printed book (c. 3 years after Gutenberg) 08 14 1846 Henry David Thoreau jailed for tax resistance. 08 14 1848 Oregon Territory created 08 14 1935 Social Security Act became law 08 14 1941 Atlantic Charter signed by FDR & Churchill 08 14 1945 VJ Day - Japan surrendered to end World War II. 08 14 1966 First US lunar orbiter does it. 08 15 1901 Arch Rock, danger to Bay shipping, blasted with 30 tons of nitrogelatin (and that ain't jello). 08 15 1945 South Korea liberated from Japanese rule. 08 15 1945 Riot in San Francisco celebrating end of World War II. 08 15 1960 The Congo (Brazzaville) gains its independence. 08 16 1863 Emancipation Proclamation signed 08 16 1969 Woodstock festival begins in New York. 08 16 1970 Venera 7 launched by USSR for soft landing on Venus 08 17 1807 R. Fulton's steamboat Clermont begins 1st trip up Hudson River 08 17 1896 Gold discovered at Bonanza Creek, in Klondike region of the Yukon 08 17 1939 "The Wizard of Oz" opens at Loew's Capitol Theater in NY 08 17 1950 Indonesia gains its independence. 08 18 1868 Pierre Janssan discovers helium in solar spectrum during eclipse 08 18 1914 Pres Wilson issues Proclamation of Neutrality 08 18 1963 James Meredith becomes 1st black graduate of Univ of Miss. 08 18 1976 USSR's Luna 24 softlands on the Moon 08 19 1826 Canada Co. chartered to colonize Upper Canada (Ontario). 08 19 1891 William Huggins describes use of spectrum in astronomy. 08 19 1960 Francis Gary Powers convicted of spying by USSR (U-2 incident) 08 19 1960 Sputnik 5 carries 3 dogs into orbit (recovered alive) Yeaaa! 08 19 1979 The crew of Soyuz 32 returns to Earth aboard Soyuz 34 08 19 1982 Soyuz T-7 is launched 08 20 1866 President Andrew Johnson formally declared the Civil War over 08 20 1920 US's first radio broadcaster, 8MK later WWJ, Detroit begins daily broadcasting. 08 20 1930 Dumont's 1st TV Broadcast for home reception, NY city 08 20 1940 Churchill says of the Royal Air Force, "Never in the field of human conflict was so much owed by so many to so few." 08 20 1942 WW II dimout regulations implemented in San Francisco. 08 20 1977 Voyager II launched. 08 21 1841 John Hampson patents the venetian blind 08 21 1959 Hawaii became the 50th state. 08 21 1965 Gemini 5 launched into earth orbit (2 astronauts) 08 21 1968 Soviet Union invades Czechoslovakia. 08 21 1968 William Dana reaches 80 km (last high-altitude X-15 flight) 08 21 1972 US orbiting astronomy observatory Copernicus is launched 08 22 1485 Richard III slain at Bosworth Field - Last of the Plantagenets 08 22 1787 John Fitch's steamboat completes its tests, years before Fulton 08 22 1851 Gold fields discovered in Australia 08 22 1963 Joe Walker in a NASA X-15, reaches 106 km (67 miles) 08 23 1833 Britain abolishes slavery in colonies; 700,000 slaves freed 08 23 1869 1st carload of freight (boots & shoes) arrives in San Francisco, from Boston, after a 16-day rail trip. 08 23 1919 "Gasoline Alley" cartoon strip premiers in Chicago Tribune 08 23 1957 Digital Equipment Corp. founded 08 23 1966 Lunar Orbiter 1 takes 1st photograph of earth from the moon 08 23 1973 First Intelsat communications satellite launched 08 23 1977 1st man-powered flight (Bryan Allen in Gossamer Condor) 08 24 0079 Mt. Vesuvius erupts; Pompeii & Herculaneum are buried 08 24 1814 British sack Washington, DC. Please, it needs it again! 08 24 1869 The Waffle Iron is invented. 08 24 1909 Workers start pouring concrete for the Panama Canal. 08 24 1932 1st transcontinental non-stop flight by a woman, AE Putnam 08 24 1956 1st non-stop transcontinental helicopter flight arrived Wash DC 08 24 1960 temp. drops to -88ø (-127ø F) at Vostok, Antarctica (world record) 08 24 1989 Voyager II passes Neptune, Triton, finds rings here too. 08 25 1689 Montreal taken by the Iroquois 08 25 1825 Uruguay gains its independence. 08 25 1929 Graf Zeppelin passes over San Francisco, headed for Los Angeles after trans-Pacific voyage from Tokyo. 08 25 1981 Voyager II flies past Saturn. sees not a few, but thousands of rings. 08 25 1981 Voyager 2 in its closest approach to Saturn, 08 26 1955 B.C. Roman forces under Julius Caesar invaded Britain. 08 26 1346 English longbows defeat French in Battle of Cr‚cy 08 26 1629 Cambridge Agreement pledged. Massachusetts Bay Co. stockholders agreed to emigrate to New England. 08 26 1791 John Fitch granted a US patent for his working steamboat. 08 26 1846 W. A. Bartlett appointed 1st US mayor of Yerba Buena (SF). 08 26 1907 Houdini escapes from chains underwater at SF's Aquatic Park in 57 seconds. 08 26 1920 19th Amendment passes - Women's Suffrage granted (about time!) 08 26 1952 Fluoridation of San Francisco water begins. 08 26 1962 Mariner 2 launched for 1st planet flyby (Venus) 08 26 1973 Women's Equality Day 08 27 1776 Americans defeated by British in Battle of Long Island 08 27 1783 1st hydrogen-filled balloon ascent (unmanned) 08 27 1859 1st successful oil well drilled near Titusville, Penn. 08 27 1859 1st successful oil well drilled, near Titusville, Penn 08 27 1883 Krakatoa, Java explodes with a force of 1,300 megatons 08 27 1883 Krakatoa, WEST of Java, blew apart (Top that, St Helens). 08 27 1928 Kellogg-Briand Pact, where 60 nations agreed to outlaw war. 08 28 1565 St Augustine, Fla established 08 28 1609 Delaware Bay explored by Henry Hudson for the Netherlands 08 28 1789 William Herschel discovers Enceladus, satellite of Saturn 08 28 1828 Russian novelist Leo Tolstoy was born near Tula. 08 28 1907 United Parcel Service begins service, in Seattle 08 28 1917 10 suffragists were arrested as they picketed the White House 08 28 1965 Astronauts Cooper & Conrad complete 120 Earth orbits in Gemini 5 08 29 1526 Hungary conquered by Turks in Battle of Moh cs 08 29 1533 Last Incan King of Peru, Atahualpa, murdered by Spanish conquerors 08 29 1896 Chop suey invented in NYC by chef of visiting Chinese Ambassador 08 29 1949 USSR explodes its 1st atomic bomb 08 29 1954 San Francisco International Airport (SFO) opens. 08 30 1850 Honolulu, Hawaii becomes a city. 08 30 1979 1st recorded occurrance of a comet hitting the sun (the energy released was about equal to 1 million hydrogen bombs). 08 30 1983 8th Space Shuttle Mission - Challenger 3 is launched 08 30 1984 12th Space Shuttle Mission - Discovery 1 is launched 08 31 1842 US Naval Observatory is authorized by an act of Congress 08 31 1955 1st sun-powered automobile demonstrated, Chicago, IL 08 31 1977 Aleksandr Fedotov sets world aircraft altitude record of 38.26 km (125,524 ft) in a Mikoyan E-266M turbojet 08 31 1980 Solidarity Labor Union in Poland is founded. 09 01 1772 Mission San Luis Obispo de Tolosa founded in California 09 01 1807 Aaron Burr aquitted of charges of plotting to set up an empire. 09 01 1849 California Constitutional Convention held in Monterey. 09 01 1859 Carrington & Hodgson make first observation of a solar flare. 09 01 1878 1st woman telephone operator starts work (Emma Nutt in Boston). 09 01 1905 Alberta and Saskatchewan become 8th and 9th Canadian provinces. 09 01 1939 PHYSICAL REVIEW publishes first paper to deal with "black holes" 09 01 1939 Germany invades Poland, starting World War II. 09 01 1969 Moammar Gadhafi deposes Libya's King Idris 09 01 1977 First TRS-80 Model I computer is sold. 09 01 1979 Pioneer 11 makes 1st fly-by of Saturn, discovers new moon, rings 09 01 1983 A Korean Boeing 747, carrying 269 passengers, strays into Soviet air space and is shot down by a Soviet jet fighter. 09 01 1985 SS Titanic, sunk in 1912, is found by French & American scientists 09 02 1931 BC At the Battle of Actium; Octavian defeats Antony, and becomes the Emporer Augustus. 09 02 0490 BC Phidippides runs the first marathon, seeking aid from Sparta against the Persians. 09 02 1666 Great Fire of London starts; destroys St. Paul's Church 09 02 1789 US Treasury Department established by Congress 09 02 1804 Harding discovers Juno, the 3rd known asteroid 09 02 1898 Lord Kitchener retakes Sudan for Britain 09 02 1945 Vietnam declares independence from France (National Day) 09 02 1945 V-J Day; Japan formally surrenders aboard the USS Missouri. 09 02 1963 CBS & NBC expand network news from 15 to 30 minutes 09 03 1783 Treaty of Paris, ending the Revolutionary War, is signed. 09 03 1849 California State Constitutional Convention convenes in Monterey 09 03 1900 British annex Natal (South Africa) 09 03 1935 First automobile to exceed 300 mph, Sir Malcolm Campbell 09 03 1939 Britain declared war on Germany. France followed six hours later, quickly joined by Australia, New Zealand, South Africa & Canada 09 03 1940 First showing of high definition color television 09 03 1940 US gives Britain 50 destroyers in exchange for military bases 09 03 1976 US Viking 2 lands on Mars at Utopia 09 03 1978 Crew of Soyuz 31 returns to Earth aboard Soyuz 29 09 03 1985 20th Space Shuttle Mission - Discovery 6 returns to Earth 09 04 0476 Romulus Augustulus, last Roman emperor in the west, is deposed. 09 04 1609 Navigator Henry Hudson discovers the island of Manhattan. 09 04 1781 Los Angeles is founded in the Valley of Smokes (Indian Name). 09 04 1833 1st newsboy in the US hired (Barney Flaherty), by the NY Sun 09 04 1870 French republic proclaimed 09 04 1882 First district lit by electricty (NY's Pearl Street Station) 09 04 1886 Geronimo is captured, ending last major US-Indian war 09 04 1888 George Eastman patents 1st rollfilm camera & registers "Kodak". 09 04 1911 Garros sets world altitude record of 4,250 m (13,944 ft) 09 04 1918 US troops land in Archangel, Russia, stay 10 months 09 04 1933 First airplane to exceed 300 mph, JR Wendell, Glenview, Illinois 09 04 1950 First helicopter rescue of American pilot behind enemy lines. 09 04 1951 First transcontinental TV broadcast, by President Truman 09 04 1954 1st passage of McClure Strait, fabled Northwest Passage completed 09 04 1957 Ford introduces the Edsel. 09 04 1964 NASA launches its first Orbital Geophysical Observatory (OGO-1) 09 04 1972 US swimmer Mark Spitz is 1st athlete to win 7 olympic gold medals 09 04 1980 Iraqi troops seize Iranian territory in a border dispute. 09 05 1774 First Continental Congress assembles, in Philadelphia 09 05 1781 Battle of Virginia Capes, where the French Fleet defeats the British rescue fleet, trapping Cornwallis at Yorktown. 09 05 1885 1st gasoline pump is delivered to a gasoline dealer. 09 05 1953 First privately operated atomic reactor - Raleigh NC 09 05 1958 First color video recording on mag. tape shown, Charlotte NC 09 05 1977 Voyager II launched towards Jupiter and Saturn. 09 05 1978 Sadat, Begin and Carter began peace conference at Camp David, Md. 09 05 1980 World's longest auto tunnel, St. Gotthard in Swiss Alps, opens. 09 06 1628 Puritans land at Salem, form Massachusetts Bay Colony. 09 06 1716 First lighthouse in US built, in Boston 09 06 1869 First westbound train arrives in San Francisco. 09 06 1909 Word received: Peary discovered the North Pole five months ago. 09 06 1966 Star Trek appears on TV for the 1st time, on NBC. Beam me up! 09 07 1822 Brazil declares independence from Portugal (National Day). 09 07 1907 Sutro's ornate Cliff House in SF is destroyed by fire. 09 07 1948 First use of synthetic rubber in asphaltic concrete, Akron OH 09 07 1956 Bell X-2 sets Unofficial manned aircraft altitude record 126,000+ 09 08 1380 Russians defeat Tatars at Kulikovo, beginning decline of Tatars. 09 08 1565 1st permanent settlement in US founded at St Augustine, Florida 09 08 1565 Turkish siege of Malta broken by Maltese & Knights of St. John. 09 08 1664 Dutch surrender New Amsterdam (NY) to English. 09 08 1771 Mission San Gabriel Archangel founded in California. 09 08 1858 Lincoln makes a speech describing when you can fool people. 09 08 1883 Northern Pacific RR's last spike driven at Independence Creek, Mo 09 08 1920 1st US Air Mail service begins. 09 08 1943 Italy surrenders to the allies in WW II 09 08 1945 US invades Japanese-held Korea. 09 09 1513 Battle of Flodden Fields; English defeat James IV of Scotland. 09 09 1776 Continental Congress authorizes the name "United States". 09 09 1839 John Herschel takes the first glass plate photograph 09 09 1850 California becomes the 31st state. 09 09 1867 Luxembourg gains independence. 09 09 1892 E.E.Barnard at Lick discovers Amalthea, 5th moon of Jupiter. 09 09 1926 NBC created by the Radio Corporation of America. 09 09 1942 First bombing of the continental US, at Mount Emily Oregon by a Japanese plane launched from a submarine. 09 09 1967 First successful test flight of a Saturn V rocket. 09 09 1975 Viking 2 launched toward orbit around Mars, soft landing. 09 09 1982 "Conestoga I", the world's first private rocket, is launched. 09 10 1608 John Smith elected president of Jamestown colony council, Va. 09 10 1813 Oliver H. Perry defeats the British in the Battle of Lake Erie 09 10 1846 Elias Howe receives patent for his sewing machine. 09 10 1919 NYC welcomes home Gen. John J. Pershing and 25,000 WW I soldiers 09 10 1945 Vidkun Quisling sentenced to death for collaborating with Nazis. 09 10 1953 Swanson sells its first "TV Dinner". 09 10 1955 "Gunsmoke" premieres on CBS television. 09 10 1963 Twenty black students enter public schools in Alabama. 09 10 1974 Guinea-Bissau gains independence from Portugal. 09 11 1777 Battle of Brandywine, PA - Americans lose to British. 09 11 1814 Battle of Lake Champlain, NY - British lose to Americans 09 11 1850 Jenny Lind, the "Swedish Nightingale", makes first US concert. 09 11 1910 1st commercially successful electric bus line opens, in Hollywood 09 11 1936 FDR dedicates Boulder Dam, now known as Hoover Dam 09 11 1944 FDR and Churchill meet in Canada at the second Quebec Conference 09 11 1946 First mobile long-distance, car-to-car telephone conversation. 09 11 1947 US Department of Defense is formed. 09 11 1950 First typesetting machine without metal type is exhibited. 09 11 1954 First Miss America TV broadcast 09 11 1967 US Surveyor 5 makes first chemical analysis of lunar material. 09 11 1972 BART begins service with a 26 mile line from Oakland to Fremont 09 11 1985 Pete Rose, Cincinnati Reds, gets hit 4,192 - eclipsing Ty Cobb. 09 12 0490 BC Athenians defeat 2nd Persian invasion of Greece at Marathon. 09 12 1609 Henry Hudson discovers what is now called the Hudson River. 09 12 1758 Charles Messier observes the Crab Nebula and begins catalog. 09 12 1941 First German ship in WW II is captured by US ship (Busko) 09 12 1953 Khrushchev becomes First Secretary of the Communist Party 09 12 1959 Luna 1 launched by USSR; 1st spacecraft to impact on the moon. 09 12 1959 Bonanza, horse opera, premiers on television 09 12 1966 Gemini XI launched 09 12 1970 Luna 16 launched; returns samples from Mare Fecunditatis 09 12 1974 Emperor Haile Selassie of Ethiopia overthrown. 09 13 1788 New York City becomes the capitol of the United States. 09 13 1906 First airplane flight in Europe. 09 13 1959 Soviet Lunik 2 becomes 1st human-made object to crash on moon. 09 13 1963 The Outer Limits premiers 09 14 1716 1st lighthouse in US is lit (in Boston Harbor). 09 14 1752 England and colonies adopt Gregorian calendar, 11 days disappear. 09 14 1812 Napoleon occupies Moscow. 09 14 1814 Francis Scott Key inspired to write 'The Star-Spangled Banner'. 09 14 1847 US troops capture Mexico City. 09 14 1886 The typewriter ribbon is patented. 09 14 1899 While in New York, Henry Bliss becomes 1st automobile fatality 09 14 1940 Congress passes 1st peace time draft law. 09 14 1956 First prefrontal lobotomy performed in Washington DC. Common now. 09 14 1964 Walt Disney awarded the Medal of Freedom at the White House 09 14 1968 USSR's Zond 5 is launched on first circum lunar flight 09 14 1974 Charles Kowal discovers Leda, 13th satellite of Jupiter. 09 15 1776 British forces occupy New York during the American Revolution. 09 15 1789 Department of Foreign Affairs is renamed the Department of State 09 15 1821 Costa Rica, El Salvador, Guatamala, Honduras & Nicaragua all gain their independence. 09 15 1917 Russia is proclaimed a republic by Alexander Kerensky 09 15 1947 First 4 engine jet propelled fighter plane tested, Columbus, Oh 09 15 1950 UN forces land at Inchon during Korean conflict. 09 15 1959 Soviet Premier Khrushchev arrives in US to begin a 13-day visit 09 15 1976 Soyuz 22 carries two cosmonauts into earth orbit for 8 days. 09 16 1620 The Mayflower departs from Plymouth, England with 102 pilgrims. 09 16 1630 Massachusets village of Shawmut changes its name to Boston 09 16 1662 Flamsteed sees solar eclipse, 1st known astronomical observation 09 16 1795 British capture Capetown 09 16 1857 Patent is issued for the typesetting machine. 09 16 1893 Cherokee Strip, Oklahoma opened to white settlement homesteaders 09 16 1908 William Crapo Durant incorporates General Motors 09 16 1919 The American Legion is incorporated. 09 16 1945 Barometric pressure at 856 mb (25.55") off Okinawa (record low) 09 16 1966 Metropolitan Opera opens at New York's Lincoln Center 09 16 1968 Richard Nixon appears on Laugh-in 09 16 1972 First TV series about mixed marriage - Bridgit Loves Bernie. 09 16 1974 BART begins regular transbay service. 09 16 1974 Pres Ford announces conditional amnesty for Vietnam deserters 09 16 1975 Papua New Guinea gains independence from Australia. 09 16 1976 Episcopal Church approves ordination of women as priests & bishop 09 17 1776 The Presidio of San Francisco was founded as Spanish fort. 09 17 1787 The Constitution of The United States is adopted. 09 17 1789 William Herschel discovers Mimas, satellite of Saturn 09 17 1819 1st whaling ship arrives in Hawaii. 09 17 1908 Thomas Selfridge becomes 1st fatality of powered flight 09 17 1953 First successful separation of Siamese twins 09 17 1968 Zond 5 completes circumnavigation of the Moon 09 17 1972 BART begins passenger service 09 17 1978 Begin, Sadat and Carter sign the Camp David accord. 09 17 1985 Soyuz T-14 carries 3 cosmonauts to Salyut 7 space station 09 18 1755 Fort Ticonderoga, New York opened 09 18 1793 Washington lays cornerstone of Capitol building 09 18 1810 Chile gains its independence. 09 18 1851 "The New York Times" goes on sale, at 2 cents a copy. 09 18 1851 New York Times starts publishing, at 2› a copy 09 18 1927 Columbia Broadcasting System goes on the air. 09 18 1966 Gemini X is launched 09 18 1977 US Voyager I takes 1st space photograph of earth & moon together 09 18 1980 Soyuz 38 carries 2 cosmonauts (1 Cuban) to Salyut 6 space station 09 18 1984 Joe Kittinger completes 1st solo balloon crossing of Atlantic 09 19 1356 English defeat French at Battle of Poitiers 09 19 1796 George Washington's presidential farewell address 09 19 1812 Napoleon's retreat from Russia begins 09 19 1848 Bond (US) & Lassell (England) independently discover Hyperion 09 19 1849 First commercial laundry established, in Oakland, California. 09 19 1873 Black Friday: Jay Cooke & Co. fails, causing a securities panic 09 19 1968 Baby born on Golden Gate Bridge (those Marin County folk!). 09 19 1982 Streetcars stop running on Market St after 122 years of service 09 20 1519 Magellan starts 1st successful circumnavigation of the world. 09 20 1797 US frigate "Constitution" (Old Ironsides) launched in Boston. 09 20 1859 Patent granted on the electric range. 09 20 1884 Equal Rights Party founding convention in San Francisco, nominated female candidates for President, Vice President. 09 20 1945 German rocket engineers begin work in US 09 20 1951 First North Pole jet crossing 09 20 1954 First FORTRAN computer program is run 09 20 1970 Luna 16 lands on Moon's Mare Fecunditatis, drills core sample 09 21 1784 1st daily newspaper in US begins publication in Pennsylvania. 09 21 1895 1st auto manufacturer opens -- Duryea Motor Wagon Company. 09 21 1930 Johann Ostermeyer patents his invention, the flashbulb. 09 21 1954 The nuclear submarine "Nautilus" is commissioned. 09 21 1958 1st airplane flight exceeding 1200 hours, lands at Dallas Texas 09 21 1964 Malta gains independence from Britain 09 21 1974 US Mariner 10 makes second fly-by of Mercury 09 21 1981 Sandra Day O'Conner becomes the 1st female Supreme Court Justice 09 21 1982 SF cable cars cease operations for 2 years of repairs 09 22 1789 The US Post Office was established. 09 22 1863 President Lincoln makes his Emancipation Proclamation speech. 09 22 1893 1st auto built in US (by Duryea brothers) runs in Springfield 09 22 1903 Italo Marchiony granted a patent for the ice cream cone 09 22 1980 War between Iran and Iraq begins, lasts eight years. No winner. 09 23 1779 Naval engagement between 'Bonhomme Richard' and 'HMS Serepis'. 09 23 1780 John Andre reveals Benedict Arnold's plot to betray West Point. 09 23 1846 Johann Galle & Heinrich d'Arrest find Neptune 09 23 1912 First Mack Sennett "Keystone Comedy" movie is released. 09 23 1932 Kingdom of Saudi Arabia formed, (National Day) 09 23 1952 First closed circuit pay-TV telecast of a sports event. 09 23 1952 Richard Nixon makes his "Checker's" speech 09 23 1973 Largest known prime, 2 ^ 132,049 - 1, is calculated. 09 24 1789 Congress creates the Post Office. 09 24 1845 1st baseball team is organized. 09 24 1852 A new invention, the dirigible, is demonstrated. 09 24 1853 1st round-the-world trip by yacht (Cornelius Vanderbilt). 09 24 1869 Black Friday: crashing gold prices causes stock market panic. 09 24 1895 1st round-the-world trip by a woman on a bicycle (took 15 months 09 24 1929 Lt James H Doolittle guided a Consolidated N-Y-2 Biplane over Mitchell Field in NY in the 1st all-instrument flight 09 24 1934 Babe Ruth makes his farewell appearance as a baseball player 09 24 1941 Nine Allied govts pledged adherence to the Atlantic Charter 09 24 1954 "The Tonight Show" premieres. 09 24 1957 Eisenhower orders US troops to desegregate Little Rock schools 09 24 1960 USS Enterprise, 1st nuclear-powered aircraft carrier, launched 09 24 1963 Senate ratifies treaty with Britain & USSR limit nuclear testing 09 24 1979 CompuServe system starts, first public computer info service. 09 25 1493 Columbus sails on his second voyage to America 09 25 1513 Vasco Nunez de Balboa, the 1st European to see the Pacific Ocean 09 25 1639 First printing press in America goes to work. 09 25 1789 Congress proposes the Bill of Rights. 09 25 1890 Congress establishes Yosemite National Park. 09 25 1926 Henry Ford announces the five day work week 09 25 1956 First transatlantic telephone cable goes into operation 09 25 1973 3-man crew of Skylab II make safe splashdown after 59 days. 09 26 1542 Cabrillo discovers California 09 26 1687 Parthenon destroyed in war between Turks & Venetians 09 26 1789 Jefferson appointed 1st Sec of State; John Jay 1st chief justice; Samuel Osgood 1st Postmaster & Edmund J Randolph 1st Attorney Gen 09 26 1824 Kapiolani defies Pele (Hawaiian volcano goddess) and lives. 09 26 1896 John Philip Sousa's Band's first performance in Plainfield, NJ 09 26 1914 Federal Trade Commission formed to regulate interstate commerce 09 26 1950 UN troops in Korean War recaptured South Korean capital of Seoul 09 26 1966 Japan launches its 1st satellite in to space 09 26 1966 The Staten Island is 1st icebreaker to enter SF bay 09 26 1983 Australia II wins The America's Cup yacht race 09 26 1983 Cosmonauts Titov & Strekalov are saved from exploding Soyuz T-10 09 27 1540 Society of Jesus (Jesuits) founded by Ignatius Loyola 09 27 1787 Constitution submitted to the states for ratification 09 27 1825 Railroad transportation is born with 1st track in England. 09 27 1941 First WWII liberty ship, freighter Patrick Henry, is launched 09 27 1964 Warren Commission finds that Lee Harvey Oswald acted alone. Ha! 09 27 1973 Soyuz 12 launched 09 28 1066 William the Conqueror landed in England 09 28 1542 Juan Cabrillo discovers California, at San Diego Bay. 09 28 1781 Siege of Yorktown begins, last battle of the Revolutionary War 09 28 1858 Donati's comet becomes the 1st to be photographed 09 28 1920 Baseball's biggest scandal, grand jury indicts 8 White Sox for throwing the 1919 World Series with the Cincinnati Reds 09 28 1924 2 US Army planes completed 1st around the world flight 09 28 1965 Jack McKay in X-15 reaches 90 km 09 28 1970 Anwar Sadat replaces Nassar as President of Egypt 09 29 1829 Scotland Yard formed in London 09 29 1859 Spectacular auroral display visible over most of the US 09 29 1923 Steinhart Aquarium in Golden Gate Park opens to public. 09 29 1977 Soviet space station Salyut 6 launched into earth orbit 09 30 1452 1st book published, Johann Guttenberg's Bible 09 30 1659 Robinson Crusoe is shipwrecked (according to Defoe) 09 30 1781 siege of Yorktown begins 09 30 1846 William Morris 1st tooth extraction under anesthetics Charlestown 09 30 1880 Henry Draper takes the first photograph of the Orion Nebula 09 30 1898 City of New York is established 09 30 1939 1st manned rocket flight (by auto maker Fritz von Opel) 09 30 1967 USSR's Kosmos 186 & 188 complete the 1st automatic docking 09 30 1967 Palace of Fine Arts reopens (1st time during 1915 exposition) 10 01 0331 BC Alexander of Macedon defeats Persian army at Gaugamela 10 01 1869 1st postcards are issued in Vienna. 10 01 1896 Yosemite becomes a National Park. 10 01 1903 1st World Series starts between the National & American Leagues 10 01 1908 Henry Ford introduces the Model T car. 10 01 1940 Pennsylvania Turnpike, pioneer toll thruway, opens. 10 01 1949 People's Republic of China proclaimed (National Day) 10 01 1952 first Ultra High Frequency (UHF) TV station, in Portland, Oregon 10 01 1958 Vanguard Project transferred from military to NASA 10 01 1960 Nigeria gains its independence. 10 01 1962 Johnny Carson's Tonight Show and The Lucy Show both premier. 10 01 1962 National Radio Astronomy Observatory gets a 300' radio telescope 10 01 1964 Cable Cars declared a National Landmark. 10 01 1971 Walt Disney World in Orlando, Florida opens. 10 01 1979 US returns Canal Zone, not the canal, to Panama after 75 years. 10 02 1608 Hans Lippershey offers the Dutch a new invention - the telescope 10 02 1836 Darwin returns to England aboard the HMS Beagle. 10 02 1870 Italy annexes Rome & the Papal States; Rome made Italian capital 10 02 1889 first Pan American conference. 10 02 1935 NY Hayden Planetarium, the 4th in the US, opens 10 02 1936 first alcohol power plant established, Atchison, Kansas 10 02 1942 first self-sustaining nuclear reaction demonstrated, in Chicago. 10 02 1950 The comic strip 'Peanuts' first appears, in nine newspapers. 10 02 1958 Guinea gains its independence. 10 02 1967 Thurgood Marshall is sworn as first black Supreme Court Justice 10 03 1789 Washington proclaims the 1st national Thanksgiving Day on Nov 26 10 03 1863 Lincoln designates the last Thursday in November as Thanksgiving 10 03 1913 Federal Income Tax is signed into law (at 1%). 10 03 1932 Iraq gains full independence from Britain 10 03 1942 Launch of the first A-4 (V-2) rocket to altitude of 53 miles 10 03 1947 first 200 inch telescope lens is completed. 10 03 1955 Captain Kangaroo premieres. Good Morning, Captain! 10 03 1960 San Francisco's White House department store is first to accept the BankAmericard in lieu of cash. 10 03 1962 Wally Schirra in Sigma 7 launched into earth orbit 10 03 1967 AF pilot Pete Knight flies the X-15 to a record 4,534 MPH. 10 04 1636 first code of law for Plymouth Colony 10 04 1824 Mexico becomes a republic 10 04 1926 The dahlia is officially designated as the SF City Flower. 10 04 1957 USSR launches Sputnik, the first artificial earth satellite. 10 04 1958 Transatlantic jet passenger service begins 10 04 1959 USSR's Luna 3 sends back first photos of Moon's far side 10 04 1960 Courier 1B Launched: first active repeater satellite in orbit 10 04 1966 Lesotho (Basutoland) gains independence from Britain 10 04 1985 21st Space Shuttle Mission - Atlantis 1 is launched 10 05 1908 Bulgaria declares independence from Turkey 10 05 1910 Portugal overthrows monarchy, proclaims republic 10 05 1921 first radio broadcast of the World Series. 10 05 1923 Edwin Hubble identifies the first Cepheid variable star 10 05 1931 first nonstop transpacific flight, Japan to Washington state 10 05 1970 PBS becomes a network. TV worth watching. 10 05 1982 Unmanned rocket sled reaches 9,851 kph at White Sands, N. Mexico 10 05 1984 Challenger carries first Canadian, Marc Garneau, into orbit. 10 06 1889 Thomas Edison shows his first motion picture. 10 06 1927 "The Jazz Singer", 1st movie with a sound track, premieres. 10 06 1959 Soviet Luna 3, first successful photo spacecraft, impacts moon. 10 06 1973 Egypt and Syria invade Israel - The Yom Kippur war 10 07 1571 Turkish fleet defeated by Spanish & Italians in Battle of Lepanto 10 07 1765 The Stamp Act Congress convenes in New York 10 07 1777 British defeated by Americans at the Battle of Saratoga 10 07 1826 Granite Railway (1st chartered railway in US) begins operations 10 07 1931 first infra-red photographis taken, in Rochester, NY 10 07 1949 Democratic Republic of Germany (East) is formed. 10 07 1959 Luna 3 photographs the far side of the moon. 10 07 1968 Motion Picture Association of America adopts film rating system. 10 08 1604 The supernova called "Kepler's nova" is first sighted. 10 08 1871 The Great Fire destroys over 4 square miles of Chicago. 10 08 1896 Dow Jones starts reporting an average of industrial stocks 10 08 1933 San Francisco's Coit Tower is dedicated to firefighters. 10 08 1935 Ozzie & Harriet Nelson are married. 10 08 1970 Alexander Solzhenitsyn is awarded the Nobel Prize for Literature. 10 09 1000 Leif Ericson discovers "Vinland" (possibly New England) 10 09 1635 Religious dissident Roger Williams banished from Mass Bay Colony 10 09 1776 Mission Delores is founded by San Francisco Bay. 10 09 1888 Public admitted to Washington Monument. 10 09 1936 Hoover Dam begins transmitting electricity to Los Angeles 10 09 1962 Uganda gains independence from Britain (National Day). 10 09 1975 Andrei Sakharov wins the Nobel Peace Prize 10 10 1845 US Naval academy opens at Annapolis, Maryland 10 10 1846 Neptune's moon Triton discovered by William Lassell 10 10 1911 The Manchu Dynasty is overthrown in China. 10 10 1933 first synthetic detergent for home use marketed 10 10 1963 Nuclear Atmospheric Test Ban treaty is signed by US, UK, USSR. 10 10 1964 18th Summer Olympic Games opened in Tokyo. 10 10 1970 Fiji gains independence from Britain (National Day). 10 10 1973 VP Spiro T. Agnew pleads no contest to tax evasion & resigns. 10 10 1975 Israel formally signs Sinai accord with Egypt 10 10 1980 Very Large Array (VLA) radio telescope network dedicated. 10 10 1985 US jets force Egyptian plane carrying hijackers of Italian ship Achille Lauro to land in Italy. Gunmen are placed in custody. 10 11 1797 British naval forces defeat Dutch off Camperdown, Netherlands 10 11 1811 "Juliana", the first steam-powered ferryboat, begins operation. 10 11 1890 Daughters of the American Revolution founded. 10 11 1958 Pioneer 1 launched; first spacecraft launched by NASA 10 11 1968 Apollo 7 launched, first of the manned Apollo missions. 10 11 1969 Soyuz 6 launched; Soyuz 7 & 8 follow in next two days. 10 11 1980 Cosmonauts Popov & Ryumin set space endurance record of 184 days 10 11 1984 Kathy Sullivan becomes first American woman to walk in space. 10 11 1987 200,000 gays march for civil rights in Washington. 10 12 1492 Columbus arrives in the Bahamas; the real Columbus Day. 10 12 1957 first commercial flight between California and Antartica. 10 12 1960 Nikita Khrushchev pounds his shoe at UN General Assembly session. 10 12 1963 Archaeological dig begins at Masada, Israel 10 12 1964 USSR launches first 3-man crew into space 10 12 1968 Equatorial Guinea gains independence from Spain. 10 12 1972 Mariner 9 takes pictures of the Martian north pole. No Santa. 10 12 1985 International Physicians for the Prevention of Nuclear War get the Nobel Peace Prize. 10 13 1775 Continental Congress establishes a navy 10 13 1792 George Washington lays the cornerstone of the Executive Mansion 10 13 1969 Soyuz 8 is launched 10 13 1985 13th Space Shuttle Mission - Challenger 6 is launched 10 13 1987 1st military use of trained dolphins, by US Navy in Persian Gulf. 10 14 1066 Battle of Hastings, in which William the Conqueror wins England 10 14 1774 1st declaration of colonial rights in America. 10 14 1947 Chuck Yeager makes 1st supersonic flight, Mach 1.015 at 12,800m. 10 15 1860 Grace Bedell writes to Lincoln, tells him to grow a beard. 10 15 1914 ASCAP founded (American Soc of Composers, Authors & Publishers) 10 15 1964 Kosygin & Brezhnev replace Soviet premier Nikita Krushchev 10 16 1846 Dentist William T. Morton demonstrates the effectiveness of ether 10 16 1859 John Brown attacks the armory at Harper's Ferry. 10 16 1869 A hotel in Boston becomes the 1st to have indoor plumbing. 10 16 1916 Margaret Sanger opens first birth control clinic, in New York. 10 16 1962 Cuban missile crisis begins: JFK learns of missiles in Cuba. 10 16 1964 Brezhnev & Kosygin replace Krushchev as head of Russia 10 16 1964 China becomes world's 5th nuclear power 10 16 1970 Anwar Sadat becomes president of Egypt, succeeds Gamal Nassar. 10 16 1973 Henry Kissinger & Le Duc Tho jointly awarded Nobel Peace Prize 10 16 1978 Polish Cardinal Karol Wojtyla elected supreme pontiff-John Paul I 10 16 1982 Mt Palomar Observatory 1st to detect Halley's comet 13th return 10 16 1982 Shultz warns US will withdraw from UN if it excludes Israel. 10 16 1985 Intel introduces 32-bit 80386 microcomputer chip. 10 17 1492 Columbus sights the isle of San Salvador. 10 17 1777 British General John Burgoyne surrenders at Saratoga, NY 10 17 1781 Cornwallis defeated at Yorktown. 10 17 1919 the Radio Corporation of America (RCA), is created. 10 17 1931 Al Capone is sentenced to 11 years in prison for tax evasion. 10 17 1933 Albert Einstein arrives in the US, a refugee from Nazi Germany. 10 17 1941 1st American destroyer torpedoed in WW II, USS Kearny off Iceland 10 17 1973 The Arab oil embargo begins. It will last until March, 1974. 10 17 1977 West German commandos storm hijacked Lufthansa plane in Mogadishu Somalia, freeing 86 hostages & kill three of the four hijackers. 10 17 1979 Mother Teresa of India was awarded the Nobel Peace Prize 10 17 1989 Destructive 7.1 earthquake strikes Northern California. 10 18 1685 Louis XIV revokes Edict of Nantes, outlaws Protestantism. 10 18 1867 US takes formal possession of Alaska from Russia ($7.2 million). 10 18 1869 The United States take possession of Alaska. 10 18 1873 The Ivy League establishes rules for college football. 10 18 1892 1st commercial long-distance phone line opens (Chicago - NYC) 10 18 1922 British Broadcasting Corporation, the BBC, is established. 10 18 1962 Watson of US, Crick & Wilkins of Britain win Nobel Prize for Medicine for work in determining the structure of DNA. 10 18 1967 Soviet Venera 4 is the first probe to send data back from Venus 10 18 1968 US Olympic Committee suspended Tommie Smith & John Carlos, for giving `black power' salute as a protest during victory ceremony 10 18 1968 Robert Beaman of US broad jumps a record 8.90 m. Still stands. 10 19 1781 Cornwallis surrenders at 2PM, the fighting is over. 10 19 1845 Wagner's opera Tannh„user performed for the first time. 10 19 1879 Thomas A. Edison successfully demenstrates the electric light 10 19 1967 Mariner 5 flies by Venus 10 19 1968 Golden Gate Bridge charges tolls only for southbound cars. 10 20 1600 Battle of Sekigahara, which established the Tokugawa clan as rulers of Japan (SHOGUN) until 1865 (basis of Clavell's novel). 10 20 1740 Maria Theresa becomes ruler of Austria, Hungary & Bohemia 10 20 1803 the Senate ratifies the Louisiana Purchase. 10 20 1818 US & Britain agree to joint control of Oregon country. 10 20 1820 Spain gives Florida to the United States. 10 20 1906 Dr Lee DeForest gives a demonstration of his radio tube. 10 20 1944 MacArthur returns to the Phillipines, says "I have returned." 10 20 1979 John F. Kennedy Library dedicated in Boston. 10 21 1797 US Navy frigate Constitution, Old Ironsides, launched in Boston 10 21 1805 Battle of Trafalgar, where Nelson established British naval supremacy for the next century. 10 21 1868 Severe earthquake at 7:53AM. 10 21 1879 Thomas Edison commercially perfects the light bulb. 10 21 1897 Yerkes Observatory of the University of Chicago is dedicated. 10 21 1918 Margaret Owen sets world typing speed record of 170 wpm for 1 min 10 21 1923 Deutsches Museum, Walther Bauersfeld's first Zeiss Planetarium. 10 21 1945 Women in France allowed to vote for the first time 10 21 1975 Venera 9, 1st craft to orbit the planet Venus launched 10 21 1976 Saul Bellow wins Nobel Prize for Literature 10 21 1977 US recalls William Bowdler, ambassador to South Africa 10 22 1746 Princeton University in New Jersey received its charter. 10 22 1797 Andr‚-Jacques Garnerin makes 1st parachute jump from balloon 10 22 1836 Sam Houston inaugurated as 1st elected pres of Republic of Texas 10 22 1953 Laos gains full independence from France. 10 22 1962 Pacific Science Center opens at Seattle Center. 10 22 1962 JFK imposes naval blockade on Cuba, beginning missile crisis. 10 22 1975 Soviet spacecraft Venera 9 lands on Venus 10 22 1981 US National debt topped $1 TRILLION (nothing to celebrate). 10 22 1981 Professional Air Traffic Controllers Organization is decertified. 10 22 4004 B.C. Universe created at 8:00 PM, according to the 1650 pronouncement of Anglican archbishop James Ussher. 10 23 1910 Blanche Scott becomes first woman solo a public airplane flight 10 23 1915 25,000 women march in New York, demanding the right to vote 10 23 1941 Walt Disney's "Dumbo" is released 10 23 1946 UN Gen Assembly convenes in NY for 1st time in Flushing Meadow. 10 23 1956 The ill-fated revolt in Communist Hungary starts, later crushed by Soviet tanks. 10 23 1958 Soviet novelist Boris Pasternak, wins Nobel Prize for Literature 10 23 1977 By 2/3 majority, Panamanians vote to approve a new Canal Treaty 10 23 1980 Soviet Premier Alexei Kosygin resigns, due to illness. 10 24 1836 the match is patented. 10 24 1851 William Lassell discovers Ariel & Umbriel, satellites of Unranus. 10 24 1901 Anna Taylor, first to go over Niagara Falls in a barrel & live 10 24 1929 "Black Thursday," the beginning of the stock market crash. 10 24 1945 United Nations Charter goes into effect. 10 24 1964 Zambia (Northern Rhodesia) gains independence from Britain 10 24 1973 Yom Kippur War ends, Israel 65 miles from Cairo, 26 from Damascus 10 25 1415 Battle of Agincourt, Welsh longbow defeats the armored knight 10 25 1671 Giovanni Cassini discovers Iapetus, satellite of Saturn. 10 25 1675 Iapetus, moon of Saturn, Discovered by Giovanni Cassini 10 25 1825 Erie Canal opens for business in New York. 10 25 1854 The Light Brigade charges (Battle of Balaklava) (Crimean War) 10 25 1903 Senate begins investigating Teapot Dome scandals of Harding admin 10 25 1960 first electronic wrist watch placed on sale, New York 10 25 1971 UN General Assembly admits Mainland China & expels Taiwan. 10 25 1971 Roy Disney dedicates Walt Disney World 10 25 1975 USSR Venera 10 made day Venus landing 10 25 1983 US invades Grenada, a country of 1/2000 its population. 10 26 1825 Erie Canal between Hudson River & Lake Erie opened 10 26 1861 Telegraph service inaugurated in US (end of Pony Express). 10 26 1863 Soccer rules standardized; rugby starts as a separate game. 10 26 1881 Shootout at the OK corral, in Tombstone, Arizona. 10 26 1903 "Yerba Buena" is 1st Key System ferry to cross San Francisco Bay. 10 26 1949 Pres Truman increases minimum wage - from 40 cents to 75 cents. 10 26 1956 International Atomic Energy Agency established. 10 26 1957 Vatican Radio begins broadcasting 10 26 1958 PanAm flies the first transatlantic jet trip: New York to Paris. 10 26 1968 Soyuz 3 is launched 10 26 1970 the "Doonesbury" comic strip debuts in 28 newspapers 10 26 1972 Guided tours of Alcatraz (by Park Service) begin. 10 26 1979 St. Vincent & the Grenadines gains independence from Britain. 10 26 1984 "Baby Fae" gets a baboon heart in an experimental transplant in Loma Linda, CA. She will live for 21 days with the animal heart. 10 27 1787 The 'Federalist' letters started appearing in NY newspapers. 10 27 1795 Treaty of San Lorenzo, provides free navigation of Mississippi 10 27 1858 RH Macy & Co. opens 1st store, on 6th Avenue, New York City. 10 27 1896 1st Pali Road completed in Hawaii (the Pali is a cliff where the winds are so strong streams flow UP! Honest!). 10 27 1938 DuPont announces its new synthetic fiber will be called 'nylon' 10 27 1961 first Saturn makes an unmanned flight test 10 27 1971 Republic of the Congo becomes Zaire. 10 27 1972 Golden Gate National Recreation Area created. 10 27 1978 Menachim Begin & Anwar Sadat win the Nobel Peace Prize 10 28 1492 Columbus discovers Cuba. 10 28 1636 Harvard University founded. 10 28 1793 Eli Whitney applies for patent for the cotton gin. 10 28 1886 Grover Cleveland dedicates the Statue of Liberty. 10 28 1904 St. Louis Police try a new investigation method - fingerprints. 10 28 1918 Czechoslovakia declares independence from Austria. 10 28 1919 Volstead Act passed by Congress, starting Prohibition. 10 28 1922 Benito Mussolini takes control of Italy's government. 10 28 1962 Krushchev orders withdrawal of Cuban missiles 10 28 1965 Pope Paul VI says Jews not collectively guilty for crucifixion. 10 28 1965 Gateway Arch (190 meters high) completed in St. Louis, Missouri. 10 28 1970 US/USSR signed an agreement to discuss joint space efforts 10 28 1971 England becomes 6th nation to have a satellite (Prospero) in orbi 10 29 0539 BC Babylon falls to Cyrus the Great of Persia. 10 29 1682 Pennsylvania granted to William Penn by King Charles II. 10 29 1727 a severe earthquake strikes New England. 10 29 1833 1st College Fraternity founded. 10 29 1863 International Committee of the Red Cross founded: It has been awarded Nobel Prizes in 1917, 1944 and 1963. 10 29 1863 Intl Comm. of the Red Cross founded (Nobel 1917, 1944, 1963). 10 29 1923 Turkey is proclaimed to have a republican government. 10 29 1929 "Black Tuesday", the Stock Market crash. 10 29 1939 Golden Gate International Exposition closes (1st closure). 10 29 1956 "Goodnight, David" "Goodnight, Chet" heard on NBC for 1st time. (Chet Huntley & David Brinkley, team up on NBC News). 10 30 1270 the 8th and last crusade is launched. 10 30 1864 Helena, capital of Montana, founded. 10 30 1905 Tsar Nicholas II grants Russia a constitution. 10 30 1938 Orson Welles panics nation with broadcast: "War of the Worlds" 10 30 1945 US govt announces end of shoe rationing. 10 30 1953 General George C. Marshall is awarded Nobel Peace Prize. 10 30 1953 Dr. Albert Schweitzer receives Nobel Peace Prize for 1952. 10 30 1961 Soviet Union detonates a 58 megaton hydrogen bomb 10 30 1961 Soviet Party Congress unanimously approves a resolution removing Josef Stalin's body from Lenin's tomb in Red Square. 10 30 1967 USSR Kosmos 186 & 188 make 1st automatic docking 10 30 1978 Laura Nickel & Curt Noll find 25th Mersenne prime, 2 ^ 21701 - 1. 10 30 1985 space shuttle Challenger carries 8 crewmen (2 Germans, 1 Dutch). 10 31 1517 Martin Luther posts his 95 Theses, begins Protestant Reformation 10 31 1864 Nevada admitted as 36th state. 10 31 1922 Benito Mussolini (Il Duce) becomes premier of Italy. 10 31 1952 first thermonuclear bomb detonated - Marshall Islands 10 31 1959 Lee Harvey Oswald announces in Moscow he will never return to US 11 01 1870 US Weather Bureau begins operations. 11 01 1943 WW II Dimout ban lifted in San Francisco Bay area. 11 01 1952 first hydrogen bomb exploded at Eniwetok Atoll in the Pacific. 11 01 1981 First Class Mail raised from 18 to 20 cents. 11 02 1917 Lansing-Ishii Agreement 11 02 1920 KDKA (Pittsburgh) on the air as 1st commercial radio station. 11 02 1947 Howard Hughes' Spruce Goose flies for 1st (& last) time. 11 02 1948 Truman beats Dewey, confounding pollsters and newspapers. 11 03 1620 Great Patent granted to Plymouth Colony 11 03 1903 Panama gains its independence from Columbia. 11 03 1917 First Class Mail now costs 3 cents. 11 03 1952 Charles Birdseye markets frozen peas. 11 03 1956 the Wizard of Oz is first televised. 11 03 1957 USSR launches the dog "Laika": the first animal in orbit 11 03 1973 Mariner 10 launched-first Venus pics, first mission to Mercury 11 03 1978 UK grants Dominica independence (National Day) 11 03 1979 63 Americans taken hostage at American Embassy in Teheran, Iran 11 03 1986 Lebanese magazine Ash Shirra reveals secret US arms sales to Iran 11 04 1854 Lighthouse established on Alcatraz Island 11 04 1922 Howard Carter discovers the tomb of Tutankhamen. 11 04 1924 1st woman governor in US elected in Wyoming. 11 04 1984 Nicaragua holds 1st free elections in 56 years; Sandinistas win 63% 11 05 1605 Plot to blow up British parliment fails - first Guy Fawkes day 11 05 1781 John Hanson elected 1st "President of the United States in Congress assembled" (8 years before Washington was elected). 11 05 1875 Susan B Anthony is arrested for attempting to vote 11 05 1895 1st US patent granted for the automobile, to George B Selden 11 05 1967 ATS-3 launched by US to take 1st pictures of full Earth disc 11 06 1844 Spain grants Dominican Rep independence 11 06 1860 Abraham Lincoln is elected the 16th president. 11 06 1862 1st Direct Telegraphic link between New York and San Francisco 11 06 1869 1st intercollegiate football game played (Rutgers 6, Princeton 4 11 06 1917 the Russian Bolshevik revolution begins. 11 06 1939 WGY-TV (Schenectady NY), 1st commercial-license station begins 11 06 1962 Nixon tells press he won't be available to kick around any more 11 07 1805 Lewis and Clark first sighted the Pacific Ocean. 11 07 1811 Battle of Tippecanoe, gave Harrison a presidential slogan. 11 07 1872 Mary Celeste sails from NY to Genoa; found abandoned 4 weeks later 11 07 1875 Verney Cameron is 1st European to cross equitorial Africa from sea to sea. 11 07 1885 Canada completes its own transcontinental railway. 11 07 1917 October Revolution overthrows Russian Provisional Government 11 07 1918 Goddard demonstrates tube-launched solid propellant rocket 11 07 1983 Bomb explodes in US Capitol, causing heavy damage but no injuries 11 08 1793 The Louvre, in Paris, is opened to the public. 11 08 1889 Montana admitted as 41st state 11 08 1895 Wilhelm R”ntgen discovers x-rays 11 08 1923 Hitler's "Beer Hall Putsch" failed, In jail, writes "Mein Kampf" 11 08 1939 Life with Father, opens on Broadway, closes in 1947, a record. 11 08 1984 14th Space Shuttle Mission - Discovery 2 is launched 11 09 1799 Napoleon becomes dictator (1st consul) of France 11 09 1865 Lee surrenders to Grant at Appomattox ending the US Civil War. 11 09 1953 Cambodia (now Kampuchea) gains independence within French Union 11 09 1965 at 5:16pm, a massive power failure blacks out New Engl. & Ontario 11 09 1967 first unmanned Saturn V flight to test Apollo 4 reentry module 11 10 1775 US Marine Corps established by Congress 11 10 1801 Kentucky outlaws dueling 11 10 1864 Austrian Archduke Maximilian became emperor of Mexico 11 10 1871 Stanley presumes to meet Livingston in Ujiji, Central Africa. 11 10 1891 1st Woman's Christian Temperance Union meeting held (in Boston) 11 10 1945 Nazi concentration camp at Buchenwald is liberated by US troops. 11 10 1951 1st Long Distance telephone call without operator assistance. 11 10 1968 USSR launches Zond 6 to moon 11 10 1969 Sesame Street premiers 11 10 1970 Luna 17, with unmanned self-propelled Lunokhod 1, is launched 11 10 1975 Ore ship Edmund Fitzgerald lost in a storm on Lake Superior 11 10 1980 Voyager I flies past Saturn, sees many rings, moons. 11 11 1620 41 Pilgrims sign a compact aboard the Mayflower 11 11 1889 Washington admitted as the 42nd state. 11 11 1918 Armistice Day -- WW I ends (at 11AM on the Western Front) 11 11 1921 President Harding dedicates the Tomb of The Unknown Soldier. 11 11 1924 Palace of Legion of Honor in San Francisco is dedicated. 11 11 1939 Kate Smith first sings Irving Berlin's "God Bless America" 11 11 1965 Rhodesia proclaimes independence from Britain 11 11 1966 Gemini 12 is launched on a four day flight. 11 11 1975 Portugal grants independence to Angola (National Day). 11 11 1980 Crew of Soyuz 35 returns to Earth aboard Soyuz 37 11 11 1982 Space Shuttle 'Columbia' makes the first commercial flight. 11 11 1987 Van Gogh's "Irises" sells for record $53.6 million at auction 11 12 1918 Austria becomes a republic 11 12 1927 Trotsky expelled from Soviet CP; Stalin is now total dictator. 11 12 1933 first known photo of Loch Ness monster (or whatever) is taken 11 12 1936 Oakland Bay Bridge opened. 11 12 1946 First "autobank" (banking by car) was established, in Chicago 11 12 1954 Ellis Island, immigration station in NY Harbor, closed 11 12 1965 Venera 2 launched by Soviet Union toward Venus 11 12 1965 Venera 2 launched by Soviet Union toward Venus 11 12 1980 US space probe Voyager I comes within 77,000 miles of Saturn 11 12 1981 First time a spacecraft is launched twice -- the Space Shuttle "Columbia" lifts off again. 11 12 1981 first balloon crossing of Pacific completed (Double Eagle V) 11 12 1984 Space shuttle astronauts snare a satellite: first space salvage. 11 13 1849 Peter Burnett is elected 1st governor of California. 11 13 1921 The Sheik, starring Rudolph Valentino, was released. 11 13 1937 NBC forms first full symphony orchestra exclusively for radio. 11 13 1940 Walt Disney's "Fantasia" is released 11 13 1956 Supreme Court strikes down segregation on public buses. 11 13 1971 Mariner 9, is the first space ship to orbit another planet, Mars. 11 13 1982 Vietnam War Memorial dedicated in Washington DC 11 14 1666 Samuel Pepys reports the first blood transfusion (between dogs) 11 14 1792 George Vancouver is first Englishman to enter San Francisco Bay 11 14 1832 first streetcar appears, in New York 11 14 1851 "Moby Dick", by Herman Melville, is published. 11 14 1889 Nellie Bly beats Phineas Fogg's time for a trip around the world by 8 days (72 days). 11 14 1910 1st airplane flight from the deck of a ship. 11 14 1922 BBC begins domestic radio service 11 14 1935 FDR proclaimes the Phillippines are a free commonwealth. 11 14 1959 Kilauea's most spectacular eruption (in Hawaii). 11 14 1969 Apollo 12 is launched 11 15 1777 Continental Congress approves the Articles of Confederation 11 15 1869 Free Postal Delivery formally inaugurated. 11 15 1881 American Federation of Labor (AFL) is founded in Pittsburgh 11 15 1920 League of Nations holds 1st meeting, in Geneva 11 15 1926 National Broadcasting Company goes on-the-air, with 24 stations 11 15 1939 Social Security Administration approves 1st unemployment check. 11 15 1949 KRON (Channel 4, San Francisco) signs on, from 7 to 10 PM. 11 16 1532 Pizarro seizes Incan emperor Atahualpa 11 16 1864 Sherman begins his march to sea thru Georgia 11 16 1907 Oklahoma becomes the 46th state 11 16 1933 Roosevelt establishes diplomatic relations with the Soviet Union 11 16 1965 Venera 3 launched, 1st land on another planet (Crashes on Venus) 11 16 1973 Skylab 4 launched into earth orbit. Look out Australia! 11 17 1558 Elizabeth I ascends English throne upon death of Queen Mary 11 17 1800 Congress convened for its 1st Washington, DC session. 11 17 1869 Suez Canal opens. 11 17 1913 Panama Canal opens for use. 11 17 1970 Russia lands unmanned remote-controlled vehicle on Moon 11 17 1977 Egyptian President Sadat accepts an invitation to visit Israel. 11 18 1497 Bartolomeu Dias discovers Cape of Good Hope 11 18 1820 Antarctica discovered by US Navy Captain Nathaniel B. Palmer. 11 18 1903 Hay-Bunau-Varilla Treaty, gave US canal rights thru Panama 11 18 1913 Lincoln Deachey performs the first airplane loop-the-loop 11 18 1918 Latvia declares independence from Russia 11 18 1928 Mickey Mouse debuts in New York in "Steamboat Willy" 11 18 1936 Main span of the Golden Gate Bridge is joined. 11 19 1493 Christopher Columbus discovers Puerto Rico. 11 19 1620 Mayflower pilgrims reach Cape Cod 11 19 1863 Lincoln delivers his famous address in Gettysburg. Expecting a long speech, the photographer wasn't ready before Lincoln left. 11 19 1895 The pencil is invented. 11 19 1919 Treaty of Versailles & League of Nations rejected by US Senate 11 19 1959 Ford cancels Edsel 11 19 1970 Golden Gate Park Conservatory becomes a State Historical Landmark 11 19 1977 Egyptian President Anwar Sadat arrives in Israel. 11 20 1789 New Jersey becomes the first state to ratify the Bill of Rights. 11 20 1888 William Bundy invents the first timecard clock. 11 20 1910 Revolution breaks out in Mexico, led by Francisco Madero. 11 20 1914 The State Department starts requiring photographs for passports 11 20 1931 Commercial teletype service began 11 20 1947 Britain's Princess Elizabeth, marries Duke Philip Mountbatten 11 20 1953 first airplane to exceed 1300 mph - Scott Crossfield. 11 20 1977 Egyptian Pres Sadat is 1st Arab leader to address Israel Knesset 11 20 1980 Steve Ptacek in Solar Challenger makes 1st solar-powered flight 11 20 1986 UN's WHO announces 1st global effort to combat AIDS. 11 21 1789 NC becomes 12th state 11 21 1933 first US ambassador is sent to the USSR - WC Bullitt 11 21 1959 Jack Benny(Violin) & Richard Nixon(Piano) play their famed duet 11 21 1964 the world's longest suspension bridge, Verrazano Narrows, opens. 11 22 1906 The International Radio Telegraphic Convention adopts "SOS" as the new call for help. 11 22 1943 Lebanon gains its independence (would that it could keep it) 11 22 1963 President John F. Kennedy is assassinated in Dallas. 11 23 1852 Just past midnight an earthquake makes Lake Merced drop 30 feet 11 23 1863 Patent granted for a process of making color photographs. 11 23 1948 Lens to provide zoom effects patented - FG Back 11 23 1948 a patent is granted for the first zoom lens to F.G. Back 11 24 1759 Destructive eruption of Vesuvius 11 24 1874 Patent granted to Joseph Glidden for barbed wire. 11 24 1963 first live murder on TV - Jack Ruby shoots Lee Harvey Oswald. 11 24 1971 "D B Cooper" parachutes from a Northwest 727 with $200,000. 11 25 1783 Britain evacuate New York, their last military position in US 11 25 1866 Alfred Nobel invents dynamite. 11 25 1884 John B Meyenberg of St Louis patents evaporated milk 11 25 1960 first atomic reactor for research & development, Richland WA. 11 25 1975 Netherlands grants Surinam independence (National Day) 11 25 1983 Soyuz T-9 returns to Earth, 149 days after take-off 11 26 1716 first lion to be exhibited in America (Boston) 11 26 1778 Captain Cook discovers Maui (in the Sandwich Islands). 11 26 1789 first national celebration of Thanksgiving 11 26 1865 Alice in Wonderland is published 11 26 1949 India adopts a constitution as a British Commonwealth Republic 11 26 1965 France launches first satellite, a 92-pound A1 capsule 11 26 1966 first major tidal power plant opened at Rance estuary, France 11 26 1985 23rd Space Shuttle Mission - Atlantis 2 is launched 11 27 1095 Pope Urban II preaches for the First Crusade 11 27 1582 the first Advent Sunday 11 27 1895 Alfred Nobel establishes the Nobel Prize 11 27 1910 New York's Penn Station opens - world's largest railway terminal 11 27 1951 first rocket to intercept an airplane, White Sands, NM 11 27 1971 Soviet Mars 2, is the first to crash land on Mars. 11 27 1985 Space shuttle Atlantis carries the first Mexican astronaut. 11 28 1520 Magellan begins crossing the Pacific Ocean. 11 28 1895 America's auto race starts: 6 cars, 55 miles, winner avgd 7mph 11 28 1912 Albania declares independence from Turkey 11 28 1929 Admiral RE Byrd makes first flight over the South Pole 11 28 1960 Mauritania gains independence from France (National Day) 11 28 1964 Mariner 4 launched; first probe to fly by Mars 11 28 1983 9th Space Shuttle Mission - Columbia 6 is launched 11 28 1986 Reagan administration exceeds SALT II arms agreement for 1st time 11 29 1887 US receives rights to Pearl Harbor, on Oahu, Hawaii. 11 29 1890 1st Army-Navy football game. Score: Navy 25, Army 0. 11 29 1945 Yugoslav Republic Day is first proclamed. 11 29 1951 first underground atomic explosion, Frenchman Flat, Nevada 11 29 1961 Mercury 5 launches a chimp (Ham/Enos) 11 29 1975 Kilauea Volcano erupts in Hawaii 11 30 1939 USSR invades Finland over a border dispute 11 30 1954 first meteorite known to have struck a woman - Sylacauga Alabama 11 30 1958 first guided missile destroyer launched, the "Dewey", Bath, ME 11 30 1964 USSR launches Zond 2 towards Mars 11 30 1966 Barbados gains independence from Britain 11 30 1967 South Yemen (then Aden) gains independence from Britain 12 01 1640 Portugal becomes independent of Spain 12 01 1821 Santo Domingo (Dominican Rep) proclaims independence from Spain 12 01 1913 1st drive-up gasoline station opens, in Pittsburgh. 12 01 1917 Father Edward Flanagan founds Boys Town 12 01 1918 Iceland becomes independent state under the Danish crown 12 01 1922 first skywriting over the US: "Hello USA" by Capt Turner, RAF. 12 01 1929 Bingo invented by Edwin S Lowe 12 01 1951 Golden Gate Bridge closed because of high winds. 12 01 1958 Central African Republic established (National Day) 12 01 1959 first color photograph of Earth is received from outer space. 12 01 1967 Queen Elizabeth inaugurates 98-inch Isaac Newton Telescope 12 02 1804 Napoleon becomes the first French emperor, crowning himself. 12 02 1805 Napoleon defeats Russians & Austrians at Austerlitz 12 02 1816 1st savings bank in US opens as the Philadelphia Savings Fund 12 02 1823 President James Monroe declares his doctrine. 12 02 1942 1st controlled nuclear reaction at University of Chicago. 12 02 1957 first commercial atomic electric power plant goes to work in PA. 12 02 1971 Soviet Mars 3 is first to soft land on Mars 12 02 1975 Lao People's Democratic Republic founded (National Day) 12 02 1982 1st permanent artificial heart successfully implanted. 12 03 1621 Galileo invents the telescope. 12 03 1954 Joseph McCarthy goes too far in his attacks and is condemned by the U.S. Senate. Not well remembered. 12 03 1967 1st human heart transplant performed, in Capetown, South Africa 12 03 1973 Pioneer 10 passes Jupiter (first fly-by of an outer planet). 12 03 1985 23rd Shuttle Mission - Atlantis 2 returns to Earth 12 04 1783 Gen. Washington bids his officers farewell at Fraunce's Tavern, 12 04 1912 Roald Amundsen reaches South pole 12 04 1915 Panama Pacific International Exposition opens. 12 04 1965 Gemini 7 launched with 2 astronauts 12 05 1492 Columbus discovers Hispaniola 12 05 1776 Phi Beta Kappa, 1st American scholastic fraternity, founded. 12 05 1978 Pioneer Venus 1 begins orbiting Venus 12 06 1492 Haiti discovered by Columbus 12 06 1534 Quito, Ecuador is founded by the Spanish 12 06 1631 first predicted transit of Venus is observed, by Kepler. 12 06 1882 Atmosphere of Venus detected during transit 12 06 1917 Finland gains its independence, from Russia. 12 06 1957 1st US attempt to launch a satellite - Vanguard rocket blows up. 12 07 1787 Delaware ratifies the Constitution, becomes the first state. 12 07 1842 the New York Philharmonic plays its first concert. 12 07 1941 first Japanese submarine sunk by American ship (USS Ward) 12 07 1941 Pearl Harbor is attacked ("A day that will live in infamy.") 12 07 1960 France grants the Ivory Coast independence (National Day) 12 07 1972 Apollo 17, last of the Apollo moon series, launched. 12 08 1931 Coaxial cable is patented 12 09 1792 the first cremation in the US 12 09 1793 Noah Webster establishes New York's 1st daily newspaper. 12 09 1907 1st Christmas Seals sold, in the Wilmington Post Office. 12 09 1961 Tanganyika gains independence from Britain 12 09 1978 Pioneer Venus 2 drops 5 probes into atmosphere of Venus 12 10 1520 Martin Luther publicly burns the papal edict demanding he recant. 12 10 1817 Mississippi becomes 20th state 12 10 1869 Women granted right to vote in Wyoming Territory 12 10 1898 Spanish-American War ends - US acquires Guam from Spain 12 10 1901 first Nobel Peace Prizes (to Jean Henri Dunant, Fr‚d‚ric Passy). 12 10 1906 Theodore Roosevelt (first American) awarded Nobel Peace Prize. 12 10 1920 President Woodrow Wilson receives Nobel Peace Prize. 12 10 1948 UN Genl Assembly adopts Universal Declaration on Human Rights 12 10 1950 Ralph J. Bunche (1st black American) presented Nobel Peace Prize 12 10 1963 Zanzibar gains independence from Britain 12 10 1975 A. Sakharov's wife Yelena Bonner, accepts his Nobel Peace Prize. 12 10 1982 Soyuz T-5 returns to Earth, 211 days after take-off 12 10 1986 Holocaust survivor Elie Wiesel accepts 1986 Nobel Peace Prize 12 11 1816 Indiana becomes 19th state 12 11 1917 German-occupied Lithuania proclaims independence from Russia 12 11 1932 Snow falls in San Francisco. 12 11 1946 UN Children's Fund (UNICEF) established (Nobel 1965) 12 11 1958 Upper Volta (now Bourkina Fasso) gains autonomy from France 12 11 1975 First Class Mail now costs 13 cents (had been 10 cents). 12 12 1787 Pennsylvania becomes the 2nd state 12 12 1871 Jules Janssen discovers dark lines in solar corona spectrum 12 12 1901 Marconi receives 1st trans-Atlantic radio signal: England to US. 12 12 1937 the first mobile TV unit, in New York. 12 12 1963 Kenya gains its independence from Britain (National Day). 12 12 1964 Russia launches Voshkod I, 1st multi-crew in space (3 men) 12 13 1903 Wright brothers first airplane flight at Kittyhawk. 12 13 1918 Wilson becomes 1st to make a foreign visit while President. 12 13 1920 Interferometer used to measure 1st stellar diameter (Betelgeuse) 12 13 1974 Maltese Republic Day is declared. 12 13 1978 Susan B. Anthony dollar, 1st US coin to honor a woman, issued. 12 13 1981 Solidarity Day, in Poland. 12 14 1819 Alabama becomes 22nd state 12 14 1911 South Pole 1st reached by Amundsen. 12 14 1962 Mariner 2 makes 1st US visit to another planet (Venus) 12 15 1791 Bill of Rights ratified when Virginia gave its approval. 12 15 1859 G.R. Kirchoff describes chemical composition of sun 12 15 1877 Thomas Edison patents the phonograph. 12 15 1939 the first commercial manufacture of nylon yarn. 12 15 1964 American Radio Relay League, is founded. Dit-Dah. 12 15 1965 first rendevous in space: Gemini 6 and Gemini 7 link up. 12 15 1971 USSR's Venera 7 becomes the first craft to land on Venus. 12 15 1984 USSR launches Vega 1 for rendezvous with Halley's Comet 12 16 1689 English Parlimnt adopts Bill of Rights after Glorious Revolution 12 16 1773 Big Tea Party in Boston Harbor. Indians most welcome. 12 16 1893 Antonin Dvor k's New World Symphony premieres 12 16 1905 "Variety", covering all phases of show business, 1st published. 12 16 1907 Great White Fleet sails from Hampton Downs on its World Cruise 12 16 1965 Gemini VI returns to Earth 12 17 1538 Pope Paul III excommunicates England's King Henry VIII 12 17 1777 France recognizes independance of the 13 colonies in America. 12 17 1790 an Aztec calendar stone is discovered in Mexico City. 12 17 1791 New York City traffic regulation creates the 1st one-way street 12 17 1843 Charles Dickens's classic, "A Christmas Carol" is published. 12 17 1903 1st sustained motorized air flight at 10:35AM, for 12 seconds, by the Wright Brothers (of course). 12 17 1933 1st professional football game: Chicago Bears vs. NY Giants. 12 17 1969 Tiny Tim and Miss Vicki are married on network television in front of 50 million underwhelmed viewers. 12 17 1979 Budweiser rocket car hits 1190 kph (record for wheeled vehicle) 12 18 1787 New Jersey becomes the 3rd state 12 18 1849 William Bond takes first photograph of moon through a telescope 12 18 1865 13th Amendment ratified, slavery abolished 12 18 1958 first voice from space: Christmas message by Eisenhower 12 18 1958 Niger gains autonomy within French Community (National Day) 12 18 1961 India annexes Portuguese colonies of Goa, Damao & Diu 12 18 1965 Borman & Lovell splash down, ending 2 week Gemini VII orbit. 12 18 1969 Britain abolishes the death penalty 12 18 1985 UN Security Council unanimously condemns acts of hostage-taking 12 19 1686 Robinson Crusoe leaves his island after 28 years (as per Defoe) 12 19 1732 Benjamin Frankin begins publication of "Poor Richard's Almanack" 12 19 1777 Washington settles his troops at Valley Forge for the winter. 12 19 1842 US recognizes the independence of Hawaii 12 19 1889 Bishop Museum founded in Hawaii. 12 19 1932 the BBC begins transmitting overseas. 12 19 1946 War breaks out in Indochina as Ho Chi Minh attacks the French. 12 19 1971 NASA launches Intelsat 4 F-3 for COMSAT Corp 12 19 1986 USSR frees dissident Andrei Sakharov from internal exile 12 20 1606 Virginia Company settlers leave London to establish Jamestown 12 20 1699 Peter the Great orders Russian New Year changed: Sept 1 to Jan 1 12 20 1790 first successful US cotton mill, in Pawtucket, Rhode Island 12 20 1803 Louisiana Purchase officially transferred from France to the US. 12 20 1820 Missouri imposes a $1 bachelor tax on unmarried men from 21-50 12 20 1860 South Carolina becomes the first state to secede from the union. 12 20 1892 the pneumatic automobile tire is patented 12 20 1892 Phileas Fogg completes around world trip, according to Verne 12 20 1919 Canadian National Railways established (longest on continent with more than 50,000 kilometers of track in US & Canada) 12 20 1922 14 states form the Union of Soviet Socialist Republics. 12 20 1939 Radio Australia starts shortwave service 12 21 1620 The pilgrims land at Plymouth Rock. 12 21 1913 1st crossword puzzle (with 32 clues), printed in New York World 12 21 1937 the first feature-length cartoon with color and sound premieres, "Snow White and the Seven Dwarfs". Still one of the best. 12 21 1968 Apollo 8 (Borman, Lovell, Anders), first manned moon voyage 12 21 1973 Israel, Egypt, Syria, Jordan, US & USSR meet in Geneva: peace? 12 22 1964 Lockheed SR-71 spy aircraft reaches 3,530 kph (record for a jet) 12 23 1672 Giovanni Cassini discovers Rhea, a satellite of Saturn 12 23 1690 John Flamsteed sees Uranus but doesn't realize it's undiscovered 12 23 1920 Ireland is divided into two parts, each with its own parliament 12 23 1947 Transistor invented by Bardeen, Brattain & Shockley at Bell Labs 12 23 1968 Borman, Lovell & Anders are the first men to orbit the moon. 12 23 1973 six Persian Gulf nations double their oil prices 12 23 1975 Congress passes Metric Conversion Act 12 23 1986 Rutan & Yeager make 1st around-the-world flight without refueling 12 24 1582 Vasco daGama Day 12 24 1814 Treaty of Ghent signed, ending War of 1812 (this news did not arrive until after the Battle of New Orleans). 12 24 1818 "Silent Night" is composed by Franz Gruber and sung next day 12 24 1851 Library of Congress burns, 35,000 volumes are destroyed. 12 24 1865 Confederate veterans form the Ku Klux Klan in Pulaski, TN 12 24 1871 Giuseppe Verdi's "Aida" premieres in Cairo, at Suez canal opening 12 24 1906 the first radio program is broadcast, in Brant Rock, Mass 12 24 1920 Enrico Caruso gave his last public performance 12 24 1936 first radioactive isotope medicine administered, Berkeley, CA 12 24 1951 Libya gains independence from Italy 12 24 1966 Soviet Luna 13 lands on moon 12 24 1968 Apollo 8 astronauts broadcast seasons greetings from the moon. 12 25 0336 first recorded celebration of Christmas on Dec. 25: in Rome 12 25 1066 William the Conqueror was crowned king of England 12 25 1776 Washington crosses the Delaware and surprises the Hessians. 12 25 1868 Despite bitter opposition, Johnson grants unconditional pardons to everyone involved in the Southern rebellion (the Civil War). 12 25 1926 Hirohito becomes Emperor of Japan 12 25 1939 Montgomery Ward introduces Rudolph the 9th reindeer 12 26 1492 first Spanish settlement in the new world founded, by Columbus. 12 26 1865 James Mason invents the 1st American coffee percolator. 12 26 1933 US foreswears armed intervention in Western Hemisphere. Ha! 12 27 1825 first public steam railroad completed in England. 12 27 1831 Darwin begins his voyage onboard the HMS Beagle. 12 27 1903 "Sweet Adaline", a barbershop quartet favorite, is 1st sung. 12 27 1932 Radio City Music Hall in New York City opens. 12 27 1934 the first youth hostel is opened, in Northfield, Mass 12 27 1945 International Monetary Fund established-World Bank founded 12 27 1979 Soviet troops invade Afghanistan 12 28 1669 A patent for chewing gum is granted to William Semple. 12 28 1846 Iowa becomes the 29th state 12 28 1890 Battle of Wounded Knee, SD - Last major conflict with Indians 12 28 1902 Trans-Pacific cable links Hawaii to US. 12 28 1912 San Francisco Municipal Railway starts operation at Geary St. (MUNI was the 1st municpally-owned transit system) 12 29 1845 Texas becomes the 28th state 12 29 1848 Gas lights installed at White House for 1st time 12 29 1911 San Francisco Symphony formed. 12 29 1931 Identification of heavy water publicly announced, HC Urey 12 29 1937 Pan Am starts San Francisco to Auckland, New Zealand service. 12 29 1949 first UHF TV station operating regular basis, Bridgeport CT 12 29 1952 first transistorized hearing aid offered for sale, Elmsford NY 12 30 1809 Wearing masks at balls is forbidden in Boston 12 30 1817 first coffee planted in Hawaii 12 30 1853 Gadsden Purchase 45,000 sq miles by Gila River from Mexico for $10 million. Area is now southern Arizona & New Mexico 12 30 1924 Edwin Hubble announces existence of other Milky Way systems 12 30 1938 Electronic television system patented, VK Zworykin 12 30 1975 Democratic Republic of Madagascar founded 12 31 1600 British East India Company chartered 12 31 1744 James Bradley announces earth's motion of nutation (wobbling). 12 31 1857 Queen Victoria chooses Ottawa as new capital of Canada 12 31 1862 Union ironclad ship "Monitor" sinks off Cape Hatteras, NC 12 31 1879 Cornerstone laid for Iolani Palace (only royal palace in US). 12 31 1879 Edison gives public demonstration of his incandescent lamp. 12 31 1890 Ellis Island opens as a US immigration depot 12 31 1946 President Truman officially proclaims the end of World War II 12 31 1961 Marshall Plan expires after distributing more than $12 billion 12 31 1974 US citizens allowed to buy & own gold for 1st time in 40 years 12 31 1999 Control of the Panama Canal reverts to Panama ``` ## AjaxTrivia.html ```HTML AjaxTrivia.html
``` ## AjaxTrivia.java ```Java /* File: AjaxTrivia.java This servlet reads the contents of the file Trivia.dat and echoes today's trivia events to the browser as an HTML table (to be rendered by the browser). "Today" is based on the server's date and time, not the client. Since Trivia.dat contains variable-length, delimited records, this program uses the String class's split method to split the records into their subordinate fields. */ import java.io.*; // import statements import javax.servlet.*; import javax.servlet.http.*; import java.util.*; public class AjaxTrivia extends HttpServlet { public void doGet(HttpServletRequest request,HttpServletResponse response) throws ServletException,IOException { response.setContentType("text/html"); // set the response header (content-type) // retrieve two pieces of submitted data (submitted in name=value format) int todayMonth=Integer.parseInt(request.getParameter("month")); int todayDay=Integer.parseInt(request.getParameter("day")); int listCount=0; // initialize a counter // generate a heading PrintWriter out=response.getWriter(); // get a PrintWriter object to print to browser out.println("On "+todayMonth+"/"+todayDay+", the following events happened:"); try // put I/O stuff in a try/catch block { String filename="/home/rpearson/tomcat/webapps/ROOT/WEB-INF/classes/Trivia.dat"; BufferedReader in=new BufferedReader(new FileReader(filename)); // data file is now open String record=in.readLine(); // attempt to read next record while(record!=null) // execute loop if record was read { String[] fields=record.split("\t"); int thisMonth=Integer.parseInt(fields[0]); int thisDay=Integer.parseInt(fields[1]); if(todayMonth==thisMonth && todayDay==thisDay) { out.println(""+fields[2]+""+fields[3]+""); listCount++; } record=in.readLine(); // attempt to read next record } in.close(); // close the file } catch(Exception e) // catch any exceptions { out.println("error attempting to open Trivia.dat"); out.println(e.toString()); } out.println(""+listCount+" trivia events listed"); } } ``` ## AjaxLogin.html ```HTML AjaxLogin.html
Login id:
Password:
``` ## AjaxLogin.java ```Java /* File: AjaxLogin.java This servlet accepts a submitted login id and password, then checks for the existence of the login id in the server-based file ValidLogins.dat, and verifies that the submitted password matches the associated password in the file. Since ValidLogins.txt contains variable-length, delimited fields (delimited by tab characters), the String class's split method is used to split the record into its sub-fields. The split method returns an array of String objects. This servlet responds to an AJAX request, and responds with the word: login - if the login id was not found in ValidLogins.dat password - if the login id was found but the submitted password did not match valid - if login id and password were valid On a successful login, the servlet adds a record to a login-tracking file. */ import java.io.*; // import statements import javax.servlet.*; import javax.servlet.http.*; import java.util.*; public class AjaxLogin extends HttpServlet { public void doGet(HttpServletRequest request,HttpServletResponse response) throws ServletException,IOException { response.setContentType("text/plain"); // set the response header (content-type) // retrieve the two pieces of submitted data // also, set a flag to false String login=request.getParameter("login"); String password=request.getParameter("password"); boolean found=false; PrintWriter out=response.getWriter(); // get a PrintWriter object to print to browser BufferedReader in=null; try // put I/O stuff in a try/catch block { // try to open the ValidLogins.dat data file in=new BufferedReader(new FileReader( "/home/rpearson/tomcat/webapps/ROOT/WEB-INF/classes/ValidLogins.dat")); String record=in.readLine(); // attempt to read next record while(record!=null) // execute loop if record was read { String[] fields=record.split("\t"); // split record into its sub-fields if(login.equals(fields[0])) // does submitted login match field #0? { found=true; // if so, set flag to true if(password.equals(fields[1])) // and check to see if submitted password matches { // field #1 in.close(); out.print("valid"); // echo response back to client this.logfile(login); // call our logfile method return; // exit the doGet function } else { in.close(); out.print("password"); // echo response back to client return; // and exit the doGet function } } record=in.readLine(); // attempt to read next record } } catch(Exception e) // catch any exceptions { } in.close(); // close the file if(!found) // if flag was never changed to true { out.print("login"); // echo appropriate message back to client } // (submitted login was not found in file) } private void logfile(String login) // our logfile method { // writes a record into a log file try { Date date=new Date(); FileWriter file=new FileWriter("LoginLog.txt"); file.write(login+"\t"+date.toString()+"\n"); file.close(); } catch(Exception e) { } } } ``` ### ValidLogins.dat ```Dat ValidLogins.dat (variable-length, tab-delimited records) each record consists of: login id, tab, corresponding password rap10 password gb497 1119 cac834 1111 tc318 1105 ng254 1105 wh373 1108 zbm6 2698 jds835 1116 ``` A Brief Overview of Java Server Page (JSP) programming JSP has four predefined variables: - request - the HttpServletRequest object - response - the HttpServletResponse object - out - PrintWriter object used to send output to client - session - HttpSession object associated with request JSP includes four scripting elements: - JSP page directive `<%@ page import="java.util.*" %>` - The main use of a JSP page directive is to include imports for the compiler. - JSP declaration `<%! private int accessCount=0; %>` - A JSP declaration is used to define, and possibly initialize, a variable. The declaration is executed only the first time the .jsp page is executed (after translation). - JSP expression `<%= new Date() %>` - A JSP "expression" is used to insert a value directly into the output. The expression is evaluated, converted to a String, and inserted into the page. - JSP scriptlet ```Java <% String wordList=(String) session.getAttribute("wordList"); if(wordList==null) { out.println("wordList is empty"); } else { out.println(wordList); } %> ``` - A JSP "scriptlet" is a block of Java code that will be executed. ## Counter.jsp ```Java Counter.jsp <%@ page import="java.util.*" %> <%! private int accessCount=0; %> Today is: <%= new Date() %>




<%= ++accessCount %>




<% String ip=request.getRemoteHost(); out.println("Thank you for connection from "+ip+"\n

\n"); if(accessCount==6) { out.println("Please stop reloading this page."); } if(accessCount>6) { response.sendRedirect("http://misweb.business.msstate.edu"); } %> ``` ## Trivia.jsp ```Java Trivia.jsp <%@ page import="java.io.*" %> <%@ page import="java.util.*" %> <% Date date=new Date(); // instantiate a Date object (deprecated) int todayMonth=date.getMonth()+1; // getMonth returns 0-11 (increment by 1) int todayDay=date.getDate(); // day of the month (1-31) int listCount=0; // initialize a counter // create an array of month names String monthNames="Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec"; String[] names=monthNames.split(","); // display first table row out.println(""); try // put I/O stuff in a try/catch block { // open the trivia file (it's stored in the classes folder) BufferedReader in=new BufferedReader(new FileReader("/home/rpearson/tomcat/webapps/ROOT/WEB-INF/classes/Trivia.fil")); String record=in.readLine(); // attempt to read next record while(record!=null) // execute loop if record was read { // extract fixed-length fields from the record int thisMonth=Integer.parseInt(record.substring(0,2)); int thisDay=Integer.parseInt(record.substring(3,5)); if(thisMonth==todayMonth && thisDay==todayDay) { String year=record.substring(6,10); String event=record.substring(12); out.println(""); } record=in.readLine(); // attempt to read next record } in.close(); // close the file } catch(Exception e) // catch any exceptions { out.print(""); } %>
On this day in history, "+names[todayMonth-1]+" "+todayDay+":
"+year+""+event+"
error attempting to open Trivia.fil"); out.print(e.toString()); out.println("
``` ## Customer.jsp ```Java Customer.jsp <%@ page import="java.io.*" %> <% try // put I/O stuff in a try/catch block { BufferedReader in= new BufferedReader(new FileReader("/home/rpearson/tomcat/webapps/ROOT/WEB-INF/classes/Customer.dat")); String record=in.readLine(); // attempt to read next record while(record!=null) // execute loop if record was read { String[] fields=record.split("\t"); out.println(""); record=in.readLine(); // attempt to read next record } in.close(); // close the file } catch(Exception e) // catch any exceptions { out.print(""); } %>
"+fields[0]+""+fields[1]+"
error attempting to open Customer.dat"); out.print(e.toString()); out.println("
``` ## AjaxCustomer.jsp ```Java AjaxCustomer.jsp <%@ page import="java.io.*" %> <% try // put I/O stuff in a try/catch block { BufferedReader in= new BufferedReader(new FileReader("/home/rpearson/tomcat/webapps/ROOT/WEB-INF/classes/Customer.dat")); String record=in.readLine(); // attempt to read next record while(record!=null) // execute loop if record was read { String[] fields=record.split("\t"); out.println(""); record=in.readLine(); // attempt to read next record } in.close(); // close the file } catch(Exception e) // catch any exceptions { out.print(""); } %>
"+fields[0]+""+fields[1]+ ", "+fields[2]+"
error attempting to open Customer.dat"); out.print(e.toString()); out.println("
``` ## AjaxCustomer.java ```Java /* File: AjaxCustomer.java This servlet responds to an AJAX request for a specific customer's information, and responds with some HTML to be displayed. */ import java.io.*; // import statements import javax.servlet.*; import javax.servlet.http.*; public class AjaxCustomer extends HttpServlet { public void doGet(HttpServletRequest request,HttpServletResponse response) throws ServletException,IOException { response.setContentType("text/plain"); // set the response header (content-type) // retrieve submitted form data int custNum=Integer.parseInt(request.getParameter("custNum")); // generate a heading PrintWriter out=response.getWriter(); // get a PrintWriter object to print to browser out.println(""); try // put I/O stuff in a try/catch block { String filename="/home/rpearson/tomcat/webapps/ROOT/WEB-INF/classes/Customer.dat"; BufferedReader in=new BufferedReader(new FileReader(filename)); // data file is now open String record=in.readLine(); // attempt to read next record while(record!=null) // execute loop if record was read { String[] fields=record.split("\t"); if(custNum==Integer.parseInt(fields[0])) { out.println(""); out.println(""); break; // break out of loop, no reason to read more recorfds } record=in.readLine(); // attempt to read next record } in.close(); // close the file } catch(Exception e) // catch any exceptions { out.print(""); } out.println("
Date:"+fields[4]+"/"+fields[5]+"/"+fields[3]+"
Balance:"+fields[6]+"
error attempting to open Customer.dat"); out.print(e.toString()); out.println("
"); } } ``` ## CustomerDatabaseList.java ```Java /* File: CustomerDatabaseList.java This text-based application is used to list all of the customers in the bis3523 mysql Customer table. */ import java.sql.*; // import classes and interfaces from sql package public class CustomerDatabaseList { public static void main(String[] args) { try // put the whole shebang in a try/catch block { // connect to the mysql database server // database name: bis3523 // user name: abc123 // password: password Class.forName("com.mysql.jdbc.Driver").newInstance(); // load database driver Connection connection=DriverManager.getConnection("jdbc:mysql://localhost/bis3523", "abc123","password"); Statement statement=connection.createStatement(); String query="select * from Customer"; // set up select command ResultSet resultSet=statement.executeQuery(query); // and execute the select command while(resultSet.next()) // step through resultSet, processing each row { int number=resultSet.getInt(1); // get the first field, which is an int String name=resultSet.getString(2); // second field is a String int balance=resultSet.getInt(7); // and third is an int System.out.println(number+"\t"+name+"\t"+balance); } } catch(Exception e) // catch any database exceptions { System.out.println("database error"); System.out.println(e.toString()); } } } ``` ## CustomerDatabaseListServlet.java ```Java /* File: CustomerDatabaseListServlet.java This servlet is used to list all of the customers in the bis3523 mysql Customer table. */ import java.sql.*; // import classes and interfaces from sql package import java.io.*; // import statements import javax.servlet.*; import javax.servlet.http.*; import java.util.*; public class CustomerDatabaseListServlet extends HttpServlet { public void doGet(HttpServletRequest request,HttpServletResponse response) throws ServletException,IOException { response.setContentType("text/html"); // set the response header (content-type) PrintWriter out=response.getWriter(); // get a PrintWriter object to print to browser out.println(""); out.println(""); out.println(""); out.println("CustomerDatabaseListServlet.java"); out.println(""); out.println(""); out.println(""); try // put the whole shebang in a try/catch block { out.println(""); // connect to the mysql database server // database name: bis3523 // user name: abc123 // password: password Class.forName("com.mysql.jdbc.Driver").newInstance(); // load database driver Connection connection=DriverManager.getConnection("jdbc:mysql://localhost/bis3523", "abc123","password"); Statement statement=connection.createStatement(); String query="select * from Customer order by balance desc"; // set up select command ResultSet resultSet=statement.executeQuery(query); // and execute the select command while(resultSet.next()) // step through resultSet, processing each row { int number=resultSet.getInt(1); // get the first field, which is an int String name=resultSet.getString(2); // second field is a String int balance=resultSet.getInt(7); // and third is an int String strBalance=Utility.padString(balance,10,2); out.println(""); } } catch(Exception e) // catch any database exceptions { out.print(""); } out.println("
"+number+""+name+""+strBalance+"
database error"); out.print(e.toString()); out.println("
"); out.println(""); out.println(""); } } ``` ## CustomerDatabaseQuery.html ```HTML CustomerDatabaseQuery.html Customer Database Query System

Enter a minimum balance.

Minimum balance:
``` ## CustomerDatabaseQuery.java ```Java /* File: CustomerDatabaseQuery.java This servlet responds to requests for a Customer Outstanding Balance report. */ import java.io.*; // import statements import javax.servlet.*; import javax.servlet.http.*; import java.sql.*; public class CustomerDatabaseQuery extends HttpServlet // subclass HttpServlet { // prevent direct access via the Location field // by over-riding doGet public void doGet(HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException { response.setContentType("text/html"); // set HTTP response header type PrintWriter out=response.getWriter(); // get a PrintWriter object for output purposes out.println("break-in attempt detected

"); out.println("Click here to conitnue."); } // doPost will handle a request from the HTML form public void doPost(HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException // over-ride HttpServlet doPost method { response.setContentType("text/html"); // set HTTP response header type PrintWriter out=response.getWriter(); // get a PrintWriter object for output purposes out.println(""); out.println(""); out.println(""); out.println("CustomerDatabaseQuery.java"); out.println(""); out.println(""); out.println(""); out.println(""); String minBalance=request.getParameter("minBalance"); // get parameter from form try { Class.forName("com.mysql.jdbc.Driver").newInstance(); Connection connection=DriverManager.getConnection("jdbc:mysql://localhost/bis3523", "abc123","password"); Statement statement=connection.createStatement(); // find out how many rows in table match the query String query="select count(*) from Customer where balance>="+minBalance+" order by balance desc"; ResultSet resultSet=statement.executeQuery(query); // execute the query statement resultSet.next(); // this resultSet will have only one row int count=resultSet.getInt(1); // construct the actual select statement to retrieve the rows query="select * from Customer where balance>="+minBalance+" order by balance desc"; out.println(""); // for debugging purposes, echo the query out.print(""); resultSet=statement.executeQuery(query); // execute the query statement int i=0; // number the rows in the table while(resultSet.next()) // process results of select statement { i++; int number=resultSet.getInt(1); String name=resultSet.getString(2); int balance=resultSet.getInt(7); out.println(""); } } catch(Exception e) // catch any database exceptions { out.print(""); } out.println("
"+query+"
"+count+" row"); // echo # of rows that match query if(count==1) // properly handle singular and plural { out.print(" matches"); } else { out.print("s match"); } out.println(" query
"+i+"."+number+""+name +""+Utility.padString(balance,15,2)+"
database error"); out.print(e.toString()); out.println("
"); out.println(""); out.println(""); } } ``` ## CustomerDatabaseUpdate.jsp ```java CustomerDatabaseUpdate.jsp <%@ page import="java.sql.*" %>
<% // see if there is an attribute named "updatedNumber" associated with this request // (this is used to communicate from the servlet back to the jsp, to highlight the updated row) int updatedNumber=-1; String string=(String) request.getAttribute("updatedNumber"); if(string!=null) { updatedNumber=Integer.parseInt(string); } // connect to the mysql database server // database name: BIS3523 // user name: abc123 // password: password try { Class.forName("com.mysql.jdbc.Driver").newInstance(); // load database driver Connection connection=DriverManager.getConnection("jdbc:mysql://localhost/bis3523", "abc123","password"); Statement statement=connection.createStatement(); String query="select * from Customer"; // set up select command ResultSet resultSet=statement.executeQuery(query); // and execute the select command while(resultSet.next()) // step through the resultSet, processing each row { int number=resultSet.getInt(1); // get the first field, which is an int String name=resultSet.getString(2); // second field is a String int balance=resultSet.getInt(7); // and third is an int String strBalance=Utility.padString(balance,10,2); out.print(""); out.print(""); out.print(""); out.println(""); } } catch(Exception e) // catch any database exceptions { out.print(""); } %>
"+number+""+name+"
database error"); out.print(e.toString()); out.println("
``` ## CustomerDatabaseUpdate.java ```Java /* File: CustomerDatabaseUpdate.java This servlet updates a customer balance, and then redirects the user back to the initial JSP page. */ import java.sql.*; // import classes and interfaces from sql package import java.io.*; // import statements import javax.servlet.*; import javax.servlet.http.*; public class CustomerDatabaseUpdate extends HttpServlet { public void doPost(HttpServletRequest request,HttpServletResponse response) throws ServletException,IOException { PrintWriter out=response.getWriter(); try // put the whole shebang in a try/catch block { // retrieve two submitted form fields int customerNumber=Integer.parseInt(request.getParameter("custNum")); String string=request.getParameter("balance"); string=string.replace(",",""); // remove any commas from new balance double newBalance=Double.parseDouble(string); // connect to the mysql database server // database name: bis3523 // user name: abc123 // password: password Class.forName("com.mysql.jdbc.Driver").newInstance(); // load database driver Connection connection=DriverManager.getConnection("jdbc:mysql://localhost/bis3523", "abc123","password"); Statement statement=connection.createStatement(); // construct an SQL Update statement String sql="update Customer set balance="+newBalance+" where number="+customerNumber; statement.execute(sql); // and execute the SQL statement // set a value for an attribute to be retrieved // by the jsp when we return to it request.setAttribute("updatedNumber",""+customerNumber); RequestDispatcher rd=getServletContext().getRequestDispatcher("/CustomerDatabaseUpdate.jsp"); rd.forward(request,response); // submit request for the original .jsp } catch(Exception e) // catch any exceptions { response.setContentType("text/plain"); out.println("database error (or some type of exception)"); } } } ``` ## SessionTracker.jsp ```Java <%@ page session="true" %> <%@ page import="java.util.*" %> SessionTracker.jsp
next item?

<% // retrieve the value for the session attribute named "cart" Vector cart=(Vector)session.getAttribute("cart"); if(cart==null) { cart=new Vector(); } if(cart.size()==0) { out.print("Your shopping cart is empty."); } else { out.print("Shopping Cart:
"); out.print(""+cart.size()+" item"); if(cart.size()>1) { out.print("s"); } out.print(""); } out.println(""); %>
``` ## SessionTracker.java ```Java /* File: SessionTracker.java This servlet adds an item to the session-based shopping cart. */ import java.io.*; import javax.servlet.*; import javax.servlet.http.*; import java .util.*; public class SessionTracker extends HttpServlet // subclass HttpServlet { public void doPost(HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException // over-ride HttpServlet doPost method // to respond to Post requests { try { HttpSession session=request.getSession(true); // get an HttpSession object String item=request.getParameter("item"); // get the new "item" from the submitted data Vector cart=(Vector) session.getAttribute("cart"); // get the value of the "cart" session attribute if(cart==null) // if it's null, create new Vector object { cart=new Vector(); } cart.addElement(item); // add the new "item" to the vector (cart) session.setAttribute("cart",cart); // set "cart" as a session attribute response.sendRedirect("/SessionTracker.jsp"); // redirect browser to jsp page // (notice no HTML generated) } catch(Exception e) // catch any exceptions { // generate HTML response only on exception response.setContentType("text/html"); // set HTTP response header type PrintWriter out=response.getWriter(); // get a PrintWriter object for output purposes out.println(""); // generate valid HTML for a web page out.println(""); out.println(""); out.println("SessionTracker.java"); out.println(""); out.println(""); out.println(""); out.println("Strange error adding item to shopping cart. Please call customer service.

"); out.println(e.toString()); out.println("

"); out.println("Click here to continue."); out.println(""); out.println(""); } } } ``` ## SessionLister.java ```Java /* File: SessionLister.java This servlet lists the contents of the session-based shopping cart. */ import java.io.*; import javax.servlet.*; import javax.servlet.http.*; import java .util.*; public class SessionLister extends HttpServlet // subclass HttpServlet { public void doGet(HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException // over-ride HttpServlet doGet method // to respond to Get requests { response.setContentType("text/html"); // set HTTP response header type PrintWriter out=response.getWriter(); // get a PrintWriter object for output purposes out.println(""); // generate valid HTML for a web page out.println(""); out.println(""); out.println("SessionLister.java"); out.println(""); out.println(""); out.println(""); try { HttpSession session=request.getSession(true); // get an HttpSession object Vector cart=(Vector) session.getAttribute("cart"); // get the value of its "cart" atrribute if(cart==null) // if attribute is null, { out.println("Your shopping cart is empty."); // cart is empty } else { out.println("Your shopping cart contains:
"); // display contents of cart out.println("
    "); for(int i=0;i"+cart.elementAt(i)+""); } out.println("
"); } } catch(Exception e) // catch any exceptions { out.println("error"); out.println(e.toString()); } out.println("

Click here to continue."); out.println(""); out.println(""); } } ``` # A Brief Overview of Java Server Page (JSP) programming JSP has four predefined variables: - request - the HttpServletRequest object - response - the HttpServletResponse object - out - PrintWriter object used to send output to client - session - HttpSession object associated with request JSP includes four scripting elements: - JSP page directive `<%@ page import="java.util.*" %>` - The main use of a JSP page directive is to include imports for the compiler. - JSP declaration `<%! private int accessCount=0; %>` - A JSP declaration is used to define, and possibly initialize, a variable. The declaration is executed only the first time the .jsp page is executed (after translation). - JSP expression `<%= new Date() %>` - A JSP "expression" is used to insert a value directly into the output. The expression is evaluated, converted to a String, and inserted into the page. - JSP scriptlet ```Java <% String wordList=(String) session.getAttribute("wordList"); if(wordList==null) { out.println("wordList is empty"); } else { out.println(wordList); } %> ``` - A JSP "scriptlet" is a block of Java code that will be executed. # Course Package 2 **Listener Interfaces**
**Interface** **Interface Methods** **Add Method**
ActionListener actionPerformed(ActionEvent) addActionListener(ActionListener)
AdjustmentListener adjustmentValueChanged(AdjustmentEvent) addAdjustmentListener(AdjustmentListener)
ComponentListener componentHidden(ComponentEvent) componentMoved(ComponentEvent) componentResized(ComponentEvent) componentShown(ComponentEvent) addComponentListener(ComponentListener)
ContainerListener componentAdded(ContainerEvent) componentRemoved(ContainerEvent) addContainerListener(ContainerListener)
FocusListener focusGained(FocusEvent) focusLost(FocusEvent) addFocusListener(FocusListener)
InputMethodListener caretPositionChanged(InputMethodEvent) inputMethodTextChanged(InputMethodEvent) addInputMethodListener(InputMethodListener)
ItemListener itemStateChanged(ItemEvent) addItemListener(ItemListener)
KeyListener keyPressed(KeyEvent) keyReleased(KeyEvent) keyTyped(KeyEvent) addKeyListener(KeyListener)
MouseListener mouseClicked(MouseEvent) mouseEntered(MouseEvent) mouseExited(MouseEvent) mousePressed(MouseEvent) mouseReleased(MouseEvent) addMouseListener(MouseListener)
MouseMotionListener mouseDragged(MouseEvent) mouseMoved(MouseEvent) addMouseMotionListener(MouseMotionListener)
TextListener textValueChanged(TextEvent) addTextListener(TextListener)
WindowListener windowActivated(WindowEvent) windowClosed(WindowEvent) windowClosing(WindowEvent) windowDeactivated(WindowEvent) windowDeiconified(WindowEvent) windowIconified(WindowEvent) windowOpened(WindowEvent) addWindowListener(WindowListener)
AWTEventListener eventDispatched(AWTEvent) addAWTEventListener(AWTEventListener, long)
# index.html ```HTML put your name here Assignment #1c: HelloWorld.java
Assignment #2b: DateTime.java
Assignment #3: Payroll.java
Assignment #3: Employee.java
Assignment #3: Utility.java
Assignment #4: TextTrivia.java
Assignment #5: no assignment
Assignment #6: GUIPayroll.java
Assignment #6: Employee.java
Assignment #7: GUIPayroll.java
Assignment #7: Employee.java
Assignment #8b: DataEntry.html
Assignment #8b: DataEntry.java
Assignment #9: ListFiles.java
Assignment #9: ListSource.java
Assignment #10: Trivia.html
Assignment #10: Trivia.java
Assignment #11: Survey.html
Assignment #11: Survey.java
Assignment #12: no assignment
Assignment #13: DatabaseTrivia.html
Assignment #13: DatabaseTrivia.java
Assignment #14: CustomerList.java
Assignment #14: CustomerQuery.java

Exam #1
Exam #2
Exam #3
Exam #5
``` # Utility.java ```Java /* File: Utility.java This file contains several utility methods that are designed to be used by other programs. getMonthName - returns the name of the month getDayName - returns the name of the day padString - pads a numeric string value with a designated character to form a fixed length string fixString - pads a string with trailing spaces to form a fixed length string addComponent - adds a component to a container readString - reads a String from the keyboard readInt - reads an int value from the keyboard readDouble - reads a double value from the keyboard stringSplit - splits a String object into an array of Strings, based on a specified delimiter */ import java.awt.*; // used by addComponent method import java.text.*; // needed for DecimalFormat class import java.util.*; public class Utility { /************************************************************************ getMonthName(int) Returns the month name of a desired month. Parameters: int monthNumber month number (1-12) Returns: a String object example: String monthName=Utility.getMonthName(7); */ public static String getMonthName(int monthNumber) { String[] monthNames=new String[12]; monthNames[0]="January"; monthNames[1]="February"; monthNames[2]="March"; monthNames[3]="April"; monthNames[4]="May"; monthNames[5]="June"; monthNames[6]="July"; monthNames[7]="August"; monthNames[8]="September"; monthNames[9]="October"; monthNames[10]="November"; monthNames[11]="December"; return monthNames[monthNumber-1]; } /************************************************************************ getDayName(int) Returns the day name of a desired day number. Parameters: int dayNumber day number (1-7) Returns: a String object example: String dayName=Utility.getDayName(7); */ public static String getDayName(int dayNumber) { String[] dayNames=new String[7]; dayNames[0]="Sunday"; dayNames[1]="Monday"; dayNames[2]="Tuesday"; dayNames[3]="Wednesday"; dayNames[4]="Thursday"; dayNames[5]="Friday"; dayNames[6]="Saturday"; return dayNames[dayNumber-1]; } /************************************************************************ padString(Number,int,int,String) Method which pads a string of digits with trailing zeroes and a specified leading padding character to form a fixed length string with optional decimal places. Parameters: Number number input Number object int chars length of desired fixed length string int decimals desired number of digits to the right of the decimal point in returned fixed length string String lead character to be used for leading padding Returns: a String object example: String output=Utility.padString(50.4,6,2,"*"); output will have a String value of "*50.40" */ public static String padString(Number number,int chars,int decimals,String lead) { DecimalFormat format; String s=""; if(decimals>0) { s="."; for(int i=0;i0 && i%3==0) { s=","+s; } s="#"+s; } format=new DecimalFormat(s); s=format.format(number); digits=chars-s.length(); for(int i=0;i2) { if(inString.length()==3) { s=inString+","+s; inString=""; } else { s=inString.substring(inString.length()-3,inString.length())+","+s; inString=inString.substring(0,inString.length()-3); } } if(inString.length()>0) { s=inString+","+s; } } return s; } public static String commaString(long number) { return Utility.commaString(number+""); } public static String commaString(double number) { return Utility.commaString(number+""); } /************************************************************************ addComponent(Container container,Component component,int align) Method which adds a component to a container. This method will use a components preferred size, not necessarily filling up the container (as GridLayout would do). Parameters: Container container the container to which the component is to be added Component component the component int align a constant from the FlowLayout class Returns: nothing example: Panel myPanel=new Panel(); myPanel.setLayout(new GridLayout(4,2)); Button myButton=new Button("click me"); Utility.addComponent(myPanel,myButton); */ public static void addComponent(Container container,Component component,int align) { Panel tempPanel=new Panel(); tempPanel.setLayout(new FlowLayout(align)); tempPanel.add(component); container.add(tempPanel); } public static void addComponent(Container container,Component component) { addComponent(container,component,FlowLayout.LEFT); } /************************************************************************ readString() Method which reads a String value from the keyboard. Parameters: none Returns: a String object example: String inString=Utility.readString(); */ public static String readString() { int input=0; // define and initialize an int variable String s=""; // define and initialize a String object while(input!=10) // loop until LF byte is read { try { input=System.in.read(); // read next byte from keyboard } catch(Exception e) { input=13; } if(input!=13 && input!=10) // if byte is not CR and not LF, concatenate { s=s+(char)input; // cast int input as char, then concatenate } } return s; // return String to calling program } /************************************************************************ readInt() Method which reads an int value from the keyboard. Parameters: none Returns: an int value -999999f if error (invalid input) example: int i=Utility.readInt(); */ public static int readInt() { int i; String s=Utility.readString(); // read a String from the keyboard try { i=Integer.parseInt(s); // try to parse String into an int } catch(Exception e) // catch exception thrown by Integer.parseInt { i=-999999; // flag to indicate input error } return i; } // return value of i /************************************************************************ readDouble() Method which reads a double value from the keyboard. Parameters: none Returns: a double value -999999f if error (invalid input) example: double d=Utility.readDouble(); */ public static double readDouble() { double d; String s=Utility.readString(); // read a String from the keyboard try { Double doubleObject=Double.valueOf(s); // try to parse String into a Double d=doubleObject.doubleValue(); } catch(Exception e) // catch exception { d=-999999; // flag to indicate input error } return d; } // return value of f /************************************************************************ stringSplit(String s,String d) Method which splits a String into an array of Strings, based on a specified delimiter Parameters: s -- String to be split d -- specified delimiter Returns: an array of Strings example: String[] splitStrings=Utility.stringSplit(inputRecord,","); */ public static String[] stringSplit(String s,String d) { Vector v=new Vector(); // vector to hold parsed substrings while(s.length()>0) // loop while string is not null { int i=s.indexOf(d); // find next delimiter if(i>-1) { // delimiter was found v.addElement(s.substring(0,i)); // extract substring (left of delimiter) s=s.substring(i+1); // then strip string for further processing } else { // no delimiter found v.addElement(s); // add final string to vector s=""; // set string to null } } String[] returnString=new String[v.size()]; // instantiate String[] for return for(int i=0;iIf you have not previously registered for misweb, you will need to register. Upon trying to log in, you will see a form that has several input fields. Enter any information that is needed to complete all fields. Please try to type correctly! Click the Continue button. That’s all there is to it! You are now registered for the misweb system. You can now access any of your class's course technology. If you have any questions about this system, please email: rodney.pearson@msstate.edu Checking your misweb online grades To check your grades, go to the main misweb page, at: http://misweb.business.msstate.edu Go to your teacher's faculty profile page. Scroll down to the Courses Taught section. Click on any link for Online Grades. On the next screen, select your class from the list of Online Gradebooks, enter your net id and password in the textfields, and click the Log in button. Assuming that you log in correctly, you will see one or more buttons for your class. These buttons (if available) link to: - your grades - the private course web site - an online class calendar - the class email archive - the class message board The buttons page also has a link at the very top that you can use to log out of misweb. For (your own) security reasons, you should always log out rather than just moving to a different web page, since logging out physically terminates your misweb session. ### For your homework assignment, you must do the following: 1. Register for misweb. 2. Enter your basic information. You must enter your name and email address; everything else is optional. 3. Check your grades in this class. 4. While you are checking your grades, familiarize yourself with the available buttons, such as Private Course Web Site, EMail Archive, and Class Message Board. 5. Post a message on the Class Message Board under the Topic: Characteristics of a Good Software Developer If the Topic has not been created yet, create it. If it has been created, add your message to the Topic. Try to add something meaningful.
Pay attention to what you are doing when you post a message on the Class Message Board. If the Topic already exists, DO NOT CREATE A NEW TOPIC. Instead, add a message to the existing Topic. To add a message to an existing topic, you must actually read at least one existing message on the topic. When you read a message, you will see a button to Post a New Message.
6. When you access the class message board, you will see an option at the bottom to set your “Message Board notification” level. Select “detail”, so you get an automatic email as soon as anyone posts a message to the class message board. This is a required part of this assignment.
The messages posted on the class message board could be an invaluable tool when you are working on your homework assignments.
You do not need to turn in any type of paper or report for this assignment (or any other assignment in this class). Everything will be graded electronically. ## misweb Online Gradebook System mobile access ## Student Instructions A new feature in misweb provides you with convenient access to selected course technology through your mobile web browser (smartphone, laptop, or other mobile device). Once set up, you will be able to access your online grades, course web site, and more with just a few simple taps on your mobile device. To set your device up for quick access in the future, follow these one-time steps: 1. In your device's web browser, go to the main misweb page: misweb.business.msstate.edu This will take you to the main misweb page, which displays the College of Business academic areas. 2. Tap on your teacher's academic area to open a list of faculty in that area. 3. Tap on your teacher's name to go to his or her faculty profile page. 4. On your teacher's misweb page, tap on the "Courses taught" button. This will open a list of courses that your teacher teaches. 5. Find your class in the list of courses, and tap on the "online gradebook" button for that class. 6. You will see a login page similar to the one shown to the right. When the login page loads in your browser, you can save a bookmark to that page for fast access in the future. \[On an iPhone, iPod Touch, or iPad, tap the middle icon at the bottom of the screen (a rectangle, with an arrow pointing to the right), and select the “Add to Home Screen” option. This will create an icon on your Home Screen that you can use in the future to quickly check your grades in this class.\] On this login page, you can select your class from your teacher's list of online gradebooks, enter your net id, and save that information on your device for future accesses. With that information saved, all you will need to do in future accesses is tap your home screen icon, type in your net password, and tap the Log in button. You can save your net password on your device as well, although for privacy and security reasons, this is not recommended. If you do save your net password on your device, on future accesses you will simply tap your home screen icon, then the Log in button. Two taps, and you're logged in. Upon logging in, you will see a concise version of the Online Gradebook System, with larger buttons, larger text, and no superfluous text (as shown to the left).
**Caching** **Be sure to read this page. It describes a problem that confuses many web users.** If you ever access a web page, and it seems like you are getting an old copy of the page, your web browser may be giving you a copy of that page from its *cache*. In general, a *cache* is a temporary holding place. When you access a web page, your browser can store the page in its cache, on your local hard drive. Then, if you ask for the page again, the browser can give you the copy from its cache rather than going back to the internet for the page. If the page has not changed, the copy from cache is just fine. But if the page HAS changed, you have a problem. You can normally force the browser to give you a new copy by holding down the shift key, and clicking on the Refresh (or Reload) button. Past versions of the major browsers had good options that you could use to configure the browser cache settings. The current browsers, however, do not give you many cache configuration options. Always remember to suspect that you might be getting a cached page, and use shift-reload to force your browser to load a new page. As a web professional, always remember that browsers may be configured differently, so something that works one way on one computer may work a different way on a different computer. Caching is one of those things that can be configured differently, and it can really confuse the inexperienced user.
# Assignment #1b ## Programming Environment Setup In assignment #1b, you will download and install several pieces of software. In assignment #1c, you will write your first Java application. Be sure to do assignment #1c! The software that we will use during the semester will be made available to you on our course web site. This software is free, public domain software. The software is also available for download from various world wide web sites. 1. You will need Sun Microsystem’s Java Development Kit (JDK). The JDK is available on our misweb course web site, in both Windows (both 32-bit and 64-bit) and Mac versions. You can accept all default options during this installation. Java may already be installed on your computer, so you may want to delay this step to see if you encounter a problem in step 3. If step 3 (Eclipse installation) works, you already have the JDK installed on your computer. 2. (Steps 2 through 6 are optional. You do not need to install an IDE, but you may if you want to.) Some people like an Integrated Development Environment (IDE), in which they type their programs (probably getting type-ahead hints, color coding, delimiter matching, etc) and run the programs, all within that environment. If you want to do this, you can intall Eclipse. You can download a free copy of Eclipse from http://www.eclipse.org/downloads Download the "Eclipse IDE for Java Developers". You do not need the "EE" (Enterprise Edition) version. 3. Once downloaded, install Eclipse as you would any other Windows or Mac program. (Eclipse requires that you have a Java environment installed on your computer, which you likely already do. If you don't, you can download the Java Development Kit (JDK) from our private course web site.) 4. Run Eclipse. The first time you run it, it will ask for your desired location for your projects that you will create. You can use the default location, or customize your own location. Just be sure that you know where you are storing your files, because you'll need to find them later on. Every Eclipse project that you create will be in a separate folder, underneath the location that you create in this step. 5. If you see a Welcome window, close it. 6. By default, Eclipse will format blocks of code with the opening curly brace at the right end of a line, such as: ```qowt-stl-Normal if(i==0) { } ``` Some people prefer that the opening curly brace be on the next line: ```qowt-stl-Normal if(i==0) { } ``` If you want to configure this, in Eclipse click on Preferences (in Windows Eclipse, Preferences is under the Window menu option; in Mac Eclipse, it's under the Eclipse menu option), Java, Code Style, Formatter. Click the "New..." button to create a new Profile. Name your new profile anything you want. The "Edit Dialog" will open automatically. Under the Braces tab, change every setting to "Next Line". 7. An account will be created for you on the mislab server. Your mislab account name will be based on your Banner net id, such as abc123. You can telnet to mislab.business.msstate.edu to log onto your mislab account. \[Technically, telnet is disabled on the mislab server, because it is considered insecure. An alternate protocol, SSH (Secure Shell), is enabled. These instructions use the generic term telnet, but you must actually use SSH on mislab.\] PuTTY, an excellent, free Windows telnet/SSH program, is available on our course web site. Installing PuTTY on your computer should be straightforward (simply copy putty.exe to your desired location). On a Mac computer, you can use the built-in ssh program. Install PuTTY on your computer. When you open the program (after installation), you will see a screen similar to the one shown to the right. Type mislab.business.msstate.edu in the Host Name textfield. You may want to do one more thing here, changing the default colors to black text on a white background (the default is white text on a black background). If you do want to do this, click on Colours (on the left), then change the Red, Green, and Blue values for the Foreground and Background settings (for white, change the Red, Green, and Blue values to 255, 255, and 255; for black, change them to 0, 0, and 0). Click the Save button, which will save mislab.business.msstate.edu as your default Host Name, and save your color scheme. Then click the Open button. You will be prompted to login. Your login id is equal to your Banner net id. Type your login id, and press Enter. You will be prompted for your mislab password. **Your initial password is equal to the last four digits of your MSU student id number.**
Telnet note: Most telnet programs will not *echo* your password back onto the screen when you type it. That is, when you type your password, you will not see ANY CHARACTERS from your password displayed on the screen. Carefully type your password, and press *Enter*.
Hopefully, you will successfully log in. If you do, you will see a screen similar to the one shown below. After you log in, use the *passwd* command to change your password. Your new password should be at least 6 characters long; it should not be based on a dictionary word. You might want to consider using digits and/or special characters as well. The Linux passwd program is very picky about the password that you select! To change your password, after you telnet to mislab.business.msstate.edu and log in, type: `passwd` You will be asked for your current password (to authenticate yourself –- don’t want to let just anyone change your password!), and then asked to type your new desired password –- twice. Use the *chfn* command to specify your full name. `chfn` Type *logout* to log out of your mislab account. `logout` 8. You need to set up your mislab account for web programming. If your user name is *abc123*, your web address will be: http://mislab.business.msstate.edu/~*abc123* Throughout the remainder of these instructions, references to *abc123* represent your actual login name. When you Telnet to mislab and login to your account, you will be in your home directory.
**public\_html** In general, subdirectories are a great way to organize your files in a meaningful structure. In this class, however, you will put all of your files in your public\_html directory. This makes it much easier for your teacher to find your files.
Make sure that you are currently in your home directory (that's where you will be placed automatically when you telnet and log in to your account, so you should be there right now). Look at the prompt on the command line. Your prompt should look something like: ` [abc123@mislab abc123]$ _` This prompt shows (in order) your login id, the name of the server, and the *current* directory (the \_ is the cursor). Get a directory listing: (type the letter l, not the digit 1). **`ls -l`** get a directory listing The directory listing will show (for example): ` drwxrwxr-x 10 abc123 abc123 5120 Oct 4 13:41 public_html` This directory listing shows several things. First, the first character (d) indicates that this directory entry is a *directory*. If the entry related to a file, a dash would appear as the first character. The next nine characters show the *permissions* that apply to this directory. You need to understand Unix directory and file permissions. Unix directories and files have three sets of permissions: one set for the owner of the file (sometimes called *user* permissions); a second set for accounts which are in a Unix group (an individual group will be created for you and your teacher; use the middle set of permissions to give your teacher permission to access your files); and a final set, called *other*, or *world*, for everyone else. (The acronym *UGO* is sometimes used to refer to User, Group, and Other.) Look at the directory listing again: ` drwxrwxr-x 10 abc123 abc123 5120 Oct 4 13:41 public_html` The nine characters "rwxrwxr-x" indicate the user, group, and other permissions for this directory. The first three characters relate to the user permissions, the next three to the group permissions, and the final three to other permissions. Each entity (user, group, other) can have any combination of three permissions: read, write, and execute. The directory listing above shows: user permissions: read, write, execute group permissions: read, write, execute other permissions: read, execute When you create a directory or a file, you need to think about what permissions users will need to that directory or file. In general, you want to give users the minimal permissions necessary to do what they need to do. If users need to read your file, give them read permission. If they need to execute the file, give them execute permission. If they need to write onto your file (high risk! be careful!), give them write permission. Each set of Unix directory permissions consists of three possible rights; each right has a numeric equivalent: Read = 4 Write = 2 Execute = 1 The permissions for a file (or directory) are set with the *chmod* command, specifying a 3-digit number which relates to: digit \#1 -- user permissions #2 -- group permissions #3 -- other permissions Each of the three digits is the sum of the permission rights desired for that entity. If you want to set the permissions on your public\_html directory to (these are common permissions for web-based files): user permissions: read, write, execute group permissions: read, execute other permissions: read, execute The numeric equivalents to these permissions are: user permissions: 4+2+1 7 group permissions: 4+1 5 other permissions: 4+1 5 Use the chmod command to set the correct desired permissions on your public\_html directory: `chmod 755 public_html` change permissions Now get a new directory listing: `ls -l ` get a directory listing The directory listing will show (for example): ` drwxr-xr-x 10 abc123 abc123 5120 Oct 4 13:41 public_html` his shows that public\_html is a directory. It also shows the three sets of user/group/other permissions. Finally, it shows the group id (GID) and user id (UID) of the owners of the directory. The GID indicates the mislab group who owns this file (*abc123*); the UID indicates the user who owns the file (*abc123*). 9. You will need to create an HTML file in your public\_html subdirectory before you will actually be able to access your web site from a web browser. As a quick exercise, you can use nano (a Linux text editor) to create an HTML file.
Important: Put your HTML files in your public\_html directory.
First, be sure to move into your public\_html directory. `cd public_html` Your prompt should look something like: ` [abc123@mislab public_html]$` This prompt shows your login id, the name of the server, and the current directory. Now, to create your new file, type: ` nano index.html` Type the following HTML code: ```western Hello world ``` Press <Ctrl>-x to exit nano. Answer "y" to "Save modified buffer?", and press <enter> when prompted for the file name. Get a directory listing. `ls -l` Review the permissions on your hello.html file. You may see something like: ` -rw-rw-r-- 10 abc123 abc123 5120 Oct 4 13:41 index.html` You should now be able to get into your web browser and access your sample web page at (for example): http://mislab.business.msstate.edu/~*abc123* 10. As soon as possible, a list of all Advanced Languages students will be available at: http://mislab.business.msstate.edu As soon as you create your index.html file, be sure to test your page from the Advanced Languages student list, since that is the page from which grading will be performed.
Step 7 tells you how to install FileZilla on your own computer. If you are using a COBI Lab computer, FileZilla is already installed. You can skip to step 10. On COBI Lab computers, FileZilla is available in the *Programming Tools* icon, right there on the desktop. Double-click the Programming Tools icon to open it.
11. You will need an FTP (File Transfer Protocol) program to upload your work to your mislab account. If you do not already have such a program, you can download **FileZilla** (Windows) from our private course web site. On a Mac computer, YummyFTP is a very good FTP program. At this time, it costs $4.99.
If you are using a COBI Lab computer, you should store your files on a flash drive.
Be sure to upload your files into your public\_html directory on your mislab account.
12. Download the Java API (Application Programmer's Interface) documentation from the course web site and unzip it on your computer. You should create a bookmark link in your web browser to the JDK online documentation (the provided documentation gives detailed information about the JDK API -- Application Programmer’s Interface -- all of the classes, methods, and properties available in the JDK). Get into your web browser and select "File", "Open", then “Choose File”. Browse your JDK directory structure to find the file a file named java\\API\\index.html (there are several of them, read on to make sure you open the correct one). This page is an alphabetical list of Java classes, properties, and methods. Save a bookmark to this page, then get used to using this online documentation when you program in Java. 13. The programs and files that are included in section 3 of your course packet are available in the /home/bis3523/resources/coursePacket directory on mislab. If you ever want a copy of a program that we go over in class, you’ll know where to find it. 14. Finally... an unfortunate fact of life for web developers is that the various web browsers are somewhat incompatible. In this class, the standard is set at the current version of Firefox. That is, your assignments and programming exams will be graded with the Firefox browser. It is highly recommended that you test your programs in this browser so that you can be sure that they will work when they are graded. 15. (Windows only) If you want to use the JDK from the command-line (we will on mislab, and you can on your computer if you want to, but this is totally optional), you need to configure your environment. We will probably not need to do anything from the command line on your computer, because we will probably be able to do everything from within Eclipse, so these remaining steps are totally optional. Modify the value of your computer’s Path environment variable. The Path environment variable tells your operating system locations in which to look for executables (such as javac.exe). For this class, you should add c:\\program files\\java\\jdk1.8.0\_20\\bin to your Path. You can do this with the following steps: 1. open Control Panel 2. open System 3. click on the Advanced tab 4. click on the Environment Variables button 5. Under System Variables, edit the value of Path The value of the Path environment variable is a list of directories, separated by semi-colons. Simply add your program files\\java\\jdk1.8.0\_20\\bin directory to the end of this value, after a semi-colon. The next time you open a DOS window, the path will be updated. When you open a new DOS window, you can type: ` path` to see the value of your Path environment variable. Your java\\bin directory should be part of that value, and the operating system will look there for executables. 16. Test your Java installation. Get to your command line and type: `javac –version` This should display the version of the JDK that you just installed. More importantly, it will show that the javac command works. This is the command that you will type in the future to compile your Java programs. You should see something like: ` javac 1.8.0_20` 17. The Java interpreter (JVM) uses an environment variable named Classpath to specify “a list of directories to be searched for .class files”. That is, when you try to run a program, if your program uses any outside .class files, the interpreter will search for those .class files – but it will search only in the directories specified by the value of your Classpath environment variable. You can check the value of your Classpath environment variable by going to the DOS prompt and typing: ` set classpath` This will display something like: `CLASSPATH=C:\Program Files\Java\jre1.8.0_20\lib\ext\QTJava.zip` This Classpath specifies only one place that the interpreter should look for .class files – in the one listed location. You probably also want the interpreter to ALWAYS look in the current directory first, then elsewhere. To set this up, you need to edit the value of your Classpath environment variable, using steps similar to those followed to modify the value of your Path environment variable. In directory parlance, . indicates “the current directory”. You want to insert this in your list before the other specified location, so you should change the value to something like: ` .;C:\Program Files\Java\jre1.8.0_20\lib\ext\QTJava.zip` This tells the interpreter, first, search the current directory for .class files; if you don’t find them there, look in the second location. # Assignment #1c ## Hello World filenames: HelloWorld.java, HelloWorld.class (Many of the assignments provide instructions for writing your programs in Eclipse. Using Eclipse is not required. You can type your programs with a standard text editor, and compile from the command-line.) Write a simple text-based application to test your installed Eclipse environment. Write an application that will display the phrase "Hello world, from Eclipse" to your screen. First, open Eclipse. 1\. Using the Eclipse menu, select File, New, and Java Project. 2\. This will open the New Java Project window. In the Project name: textfield, enter the name of your project: `HelloWorld` (case-sensitive, no spaces) Click the Finish button. This will create your project. 3\. The Eclipse toolbar has a number of icons. One of these is a green circle with a white C (and a small plus sign in its top right corner). In the screen capture, it's just below the rap10 in the project path. This is the New Class icon. Click it to create a new class for your project. 4\. There are many options available when you create a new class. The first thing we want to do is name the class. In the Name: textfield, type HelloWorld (case-sensitive, no spaces) Check one of the checkboxes near the bottom: `public static void main(String[] args)` This is the standard (and required) method header for your main method. This is the first method that will be called when you run your program. We could type the method header ourselves, but by checking this checkbox, Eclipse will type if for us. Click the Finish button. Eclipse will create the file HelloWorld.java, and put it in your project's src folder. 5\. The screen capture to the right shows your initial project, complete with: \- class header \- main method header \- matching curly braces 6\. Type one line of code, inside your main method: `System.out.println("Hello world, from Eclipse.\n\n");` 7\. Click the Run icon, the green circle with a white arrow pointing to the right. Your output will appear on the Console, the wide area toward the bottom of the Eclipse window. Hopefully, your first program will run without errors! 8\. Outside Eclipse, find your HelloWorld.class file, in the workspace that you specified. In your "workspace" folder, you will find a separate folder for each project that you create, such as one named HelloWorld. The project folders will contain at least two subfolders: src (which contains .java source code files), and bin (which contains compiled byte code .class files). Look in the bin folder for HelloWorld.class. Upload HelloWorld.class to your mislab account, into your public\_html directory. Telnet to mislab.business.msstate.edu, log in to your account, and run your byte code in the mislab environment. `java HelloWorld` This demonstrates that your byte code is platform-independent. The same byte code will run in your Windows or Mac environment and in mislab's Linux environment. All you need is an appropriate (platform-dependent) JVM in the environment. The byte code is platform-independent; the JVM is platform-dependent. The program named "java" is the JVM on mislab. 9\. Upload your HelloWorld.java file to your mislab account, into your public\_html directory. (It will be in your project's src folder on your local computer.) Compile it. `javac HelloWorld.java` Run your new byte code. `java HelloWorld` This demonstrates that your source code is platform-independent. You can create your source code in a Windows, Mac, or Linux environment, then compile it into byte code in a different environment. All you need is an appropriate (platform-dependent) Java compiler in the environment. Your source code is platform-independent; the compiler itself is platform-dependent. "javac" is the compiler on mislab. # A Brief Linux Reference Guide ## Working with directories - `mkdir ` - make subdirectory with specified name - `rmdir ` - remove specified subdirectory - `cd ` - move down to specified subdirectory - `cd ..` - move up one directory level - `ls` - get a directory listing - `ls -l` - directory listing, long format (letter l) - `ls -al` - directory listing, including hidden files ## Working with files - `more ` - display the contents of the file, a page at a time (press <space> to go to next page, or <b> to back up to the previous page) - `chmod ` - set the permissions on <file> - `chown . ` - change the user.group owner of <file> - `cp .` - copy specified file to current directory - `cp ` - copy file <source> to the destination - `mv ` - rename the file from <old> to <new> - `mv ` - move the file <old> to the destination - `rm ` - remove the specified file - `rm *` - remove all files in current directory - `head ` - display the first 10 lines of <file> - `head -20 ` - display the first 20 lines of <file> - `tail ` - display the last 10 lines of <file> - `tail -20 ` - display the last 20 lines of <file> ## Administration - `man ` - display the manual for <command> - `passwd ` - change your account's password - `chfn` - change your account's full name - `top` - display all running processes - `kill ` - kill one of your processes - `ps -u ` - display all running processes for <user> ## Special files - `public_html` - directory in which all web pages should reside - `.profile` - account setup file (similar to autoexec.bat) - `.forward` - used to forward email to another email address # Assignment #2a ## DateTime filenames: DateTime.java, DateTime.class Create the text-based application DateTime.java. This program should instantiate a Date object, then use that object's toString() method to display the current date and time to “Standard Out”. Be sure to upload your platform-independent source code to your mislab account public\_html directory, and be sure to actually test your program on your mislab account. 1\. Use Eclipse or a text editor to create a project named DateTime. (The instructions here assume that you are using Eclipse, but you can certainly type your program using a text editor.) 2\. Within your project, create a class named DateTime. This class file should contain: \- a class header \- a main method header \- a statement to instantiate a Date object Instantiating a Date object (an instance of the Date class) in Java is exactly like instantiating one in Javascript. Use the “new” operator. Since Java is a strongly typed language, you must define your variable first, such as: ```Java Date myDate; myDate=new Date(); ``` This defines a variable named myDate, whose data type is Date (it is a Date object). It then uses the “new” operator to instantiate a Date object, and assigns that object to the variable myDate. \- a statement to call your Date object's toString() method to get a string representation of the Date object (and assign that string to a String variable) ```Java String dateString; dateString=myDate.toString(); ``` \- a statement to display the string ```Java System.out.println(dateString); ``` 4. You will notice that you have syntax errors – unresolved references – because the Date class is not in a standard package that is automatically available to your program. Before your class header, import the classes from the java.util package: ```Java import java.util.*; ``` 5. Run your program. As a side-effect, this will also create your .class file. Hopefully it will display the correct date and time on the Console. 6. Upload your DateTime.java file from this project to your mislab account. The file will be in the src subdirectory, under your project folder in your designated workspace. In your ftp program, drag just DateTime.java from the left (your computer) to your mislab public\_html directory. 7. ssh to mislab, log in, move to your public\_html directory, compile your program, and run your program to make sure it works. ` cd public_html` ` javac DateTime.java` ` java DateTime` # Assignment #2b
Throughout the semester, be sure to use the filenames that the assignments tell you to use. On mislab, store all files in your public\_html directory. Do not create any additional directories. Do everything you can to make the job of grading your work easier!
## Home Page
You must correctly set up your account on the mislab server, as explained in Assignment #1b, before you can complete this assignment.
filename: index.html Create a web page that will be used to grade your remaining assignments. This page will provide links to each of your remaining assignments. Be sure to name your file for this assignment index.html. Also, be sure to store the file in your public\_html directory. 1. Create your index.html. index.html should contain several anchor tags, providing a link to each of your assignments for the semester (provide links for assignments 1-14). Also provide links for exams 1, 2, 3, and 5. Finally, create a working email link in your links.html, so a grader can email you easily while looking at your assignments throughout the semester. Your links may be either text-based or image-based. 2. Set your link for assignment #1 to display your HelloWorld.java source code file. To do this, ssh to your mislab account, move to the public\_html directory, and copy lister.php to your account: ` cd public_html` ` cp /home/bis3523/resources/code/lister.php .` Don't forget the period at the end, which specifies the "destination" of your cp command – the current directory. Set the href of your anchor tag for assignment #1 to ```Java href='lister.php?HelloWorld.java' ``` Follow this procedure any time that you need to display the contents of a file rather than having the browser "render" the file. 3. Set your link for assignment #2 to display your DateTime.java source code file that you will create later in this assignment. ```Java href='lister.php?DateTime.java' ``` 4. Provide some sort of "Not available yet" page for your assignments 1-14 and exams 1, 2, 3, and 5 so your user doesn't get an error page when following those links. 5. Upload all of your required files to the public\_html directory on your mislab account. Test your page, using Firefox, from the Advanced Languages student page. Be sure to test each of your assignments in the environment in which it will be graded. If your assignment does not work under Firefox, from the Advanced Languages page, it does not work. Period. FOR EVERY ASSIGNMENT: Be sure to go to mislab.business.msstate.edu, to the BIS 3523 page, and to your page. Your Home Page should load automatically.
Reminder Don’t forget that each programming assignment is an individual assignment. These are not group projects. Do your own work. Do not look at anyone else’s code without that person’s explicit permission. YOU should type every single character in your programs.
# Assignment #3 ## Text-based Payroll Application Filenames: Payroll.java, Employee.java, Utility.java Create a project named Payroll. In this project, we will create two classes – Payroll and Employee – and use a third class that you can download from our course web site. Payroll will contain the logic of our payroll application. The Employee class will be a re-usable class that we can use to represent an Employee object. The Utility class contains several class methods that you will end up using throughout the semester. 1. Create your Employee class. Important note: Since this is not the class that represents the main functionality of our application, it will NOT have a main method. Don't check the checkbox for a main method. 2. Your Employee class needs one instance variable (property): public double payRate; 3. You need a constructor method so your application program can instantiate an Employee object. Your constructor should receive a double, which is this employee's payrate. The constructor needs to assign that parameter to your instance variable for more persistence. (Remember that the name of a constructor method must match the name of its class: Employee. Also, it is not allowed to specify a "return data type", not even "void"). ```Java public Employee(double thisPayRate) { this.payRate=thisPayRate; } ``` 4. You need a method named calculatePay that receives an int (hoursWorked) and returns a double (grossPay). This method should calculate the employee's grossPay (hoursWorked times payRate). ```Java public double calculatePay(int hoursWorked) { double grossPay=hoursWorked * this.payRate; return grossPay; } ``` 5. Create a class that will contain the main logic of your application. Name this class Payroll. 6. Initially, inside your main method define a hard-coded hoursWorked and payRate: ```Java int hoursWorked=40; double payRate=8.75; ``` 7. Inside your main method, instantiate an Employee object, passing payRate to the constructor method. Then call the calculatePay method of that Employee object (it's an instance method), passing hoursWorked as your argument, to calculate the gross pay. Display the gross pay to the screen. ```Java Employee employee=new Employee(payRate); double grossPay=employee.calculatePay(hoursWorked); System.out.println(grossPay); ``` Now, that's a pretty good start, but there are a number of things that you can now do: 8. Modify the program to accept both hoursWorked and payRate from the keyboard. One of our early course packet DOS-based programs uses a readInt method, something like: ```Java int hoursWorked=Utility.readInt(); ``` Utility.java is on our course web site. Download a copy of Utility.java. Open it in a text editor. Back in Eclipse, create a new class named Utility. Delete any automatic code that Eclipse puts in that file, and copy/paste the entire Utility.java code from your text editor into this new class in Eclipse. 9. You will, of course, want to display a prompt before reading the input. ```Java System.out.println("Hours worked?"); int hoursWorked=Utility.readInt(); ``` 10. Use Utility.readDouble to accept the payRate from the keyboard. 11. One of the reasons for defining the Employee class is that it separates the functionality of the Employee object from the functionality of your application program. The person who writes the application program doesn't need to know anything about calculating pay; he or she just needs to call the Employee class's calculatePay method. The person who maintains the Employee class needs to know how to calculate grossPay. Modify the Employee class's calculatePay method to pay time and a half for overtime. That is, if the employee works over 40 hours, pay 1.5 times the payRate for any hours over 40. Pretend that you are two different people (this will be easy if you actually believe that you ARE two different people). One of your personas is working on the application program, and your other persona (or one of your other personas) maintains the Employee class. You have just demonstrated that the application programmer doesn't need to know the inner workings of calculating gross pay. The application programmer didn't change his (or her, or its) application program; the other programmer changed the Employee class. The application programmer didn't have to recompile his program. As a matter of fact, the application programmer may not even know that anything has changed. But his program is working! This demonstrates encapsulation. All of the functionality of an Employee object is encapsulated in the Employee class. It also demonstrates the concept of the class's interface. All the application programmer needs to know is the interface with the Employee class: if there are any public properties, the application programmer may manipulate those directly. If there are any public methods, what do they receive? and what do they return? The application programmer does not need to know the inner workings of those methods. 12. You could add a flat tax rate as a property of the Employee class. ```Java private double taxRate=.10; ``` Now, if that is a flat taxRate, applied to all Employee objects evenly, does EACH Employee object need its own taxRate, or is there one taxRate for all Employee objects? Although either would work, it seems wasteful to have a separate copy of the value .10 for each Employee object when one copy would do, so you should change that line to: ```Java private static double taxRate=.10; ``` You could write a calculateTax method now. This method would receive a double (grossPay) and return a double (netPay). When you use taxRate in your calculations, use Employee.taxRate since taxRate is a class variable (non-static properties are called instance variables; static properties are called class variables). If you want to prevent the value of taxRate from being changed during the program, you can declare taxRate as "final". By convention, final variables are written in all upper case characters, using the underscore character to separate "logical words": ```Java private static final double TAX_RATE=.10; ``` 13. Try to think of some other things that you could add to this example. 14. Upload your .java files from this project (including Utility.java) to your mislab account. Your link to your assignment #3 (in your index.html) should display your Employee.java file. It's in the src subdirectory of your project. Be sure to test your page from http://mislab.business.msstate.edu to verify that your links work. # Assignment #4 ## Text-based Trivia Application Filenames: TextTrivia.java Write a text-based application which will list today's trivia events to the console. Ask the user for today's month and day (from the keyboard), then read the class's trivia file (two versions available from our course web site). Read the records, and if the month and day from the trivia event match the user's input, display the year and event to the console. Check for the following data entry errors: 1\. invalid month number (should be 1-12) 2\. invalid day number (minimum day number is 1; if month==1, 3, 5, 7, 8, 10, or 12, maximum day number is 31; if month==4, 6, 9, or 11, maximum day number is 30; if month==2, maximum day number is 29) Display the appropriate trivia events, plus a count of the number of events listed. The trivia file: Two versions of the trivia file are available on our private course web site: 1\. Trivia.dat contains variable-length, delimited fields (using a tab as the delimiter character). When you read a record from this file, you can break it apart using the String class's split() method. 2\. Trivia.fil contains fixed-length fields. You can extract individual fields from this record by using the String class's substring() method. # Assignment #5 ## There is no assignment #5 # Assignment #6 ## GUI Payroll Application Filenames: GUIPayroll.java, Employee.java, Utility.java This assignment re-uses the Employee class that you created in the previous assignment. You may also want to use the padString method from Utility.java for formatting some of your output. Hopefully, this assignment will help demonstrate how you can re-use an existing class (such as your Employee class) to build a system. Write a Java GUI application which performs payroll calculations, similar to your previous assignment. The layout of your application is up to you, but you can feel free to mimic the screen shown here. The captured screen shown there uses a 5-row, 2-column GridLayout which contains: - three Label objects - three TextField objects - three Button objects - one TextArea object The operation of this application should be fairly obvious. Your user is supposed to enter an employee name, hours worked, and a pay rate. When the user clicks the Calculate button, your program should instantiate an Employee object, then use methods of the Employee class to calculate the employee's pay. The TextArea should be cleared, and the employee's information should be shown in the TextArea. The Clear button clears all three TextFields, as well as the TextArea. The Quit button terminates the program and closes the window. 1. In Eclipse, create a project named GUIPayroll. 2. Create a class named GUIPayroll. This class should be a subclass of java.awt.Frame. This class will contain your application program logic. 3. The GUIPayroll class should contain a main method. 4. The GUIPayroll class should also contain a constructor method. ```Java public GUIPayroll() { } ``` 5. Your main method should do only one thing: instantiate a GUIPayroll object. ```Java new GUIPayroll(); ``` 6. The GUIPayroll constructor method should: - set your frame's title - set your frame's size - set up your desired layout manager - instantiate GUI objects and add them to the layout manager - register your class as the event listener for your buttons - make your frame visible Notes: - To respond to a button click, you need to: ```Java import java.awt.event.*; ``` implements ActionListener (in the class header) override the default actionPerformed method ```qowt-stl-Normal public void actionPerformed(ActionEvent e) { } ``` - Your logic that actually responds to button clicks (your event responder logic) goes in the actionPerformed method - To copy Employee.java from a previous project into this one, right-click or control-click on the old Employee.java file, select Copy, then Paste it into your new project. Note: Because telnet is a text-based program, you will not be able to telnet to your mislab account and run your GUI application. For grading, your teacher will download your files to his computer, and run it locally. Be sure to upload all required .java files from your project to your mislab account. # Assignment #7 ## Improved GUI Payroll Application Filenames: GUIPayroll.java, Employee.java, Utility.java Modify your GUIPayroll project to handle invalid user input in the (expected) numeric fields. Use a try/catch block when you try to get a primitive numeric representation of your String values from the TextFields. If you detect invalid input, change the text color in your TextArea to red. # Assignment #8a ## Setting up your own tomcat Server on mislab mislab runs the apache web server software. apache is open-source software, available for free from www.apache.org. Over 60% of the web servers on the internet run the apache web server software. apache does not support Java servlets by itself. To provide that support, mislab runs the tomcat server software (this is also open-source, free software). For class purposes, each student will run his or her own tomcat server. The following instructions explain how to get your tomcat server up and running. 1\. First, check your grades for this class, and look for your Assigned Tomcat Port Numbers. You will have two assigned port numbers: a primary port number, and a secondary port number. Write these numbers down for later use. 2\. Next, you need to edit one of your system startup files on your mislab account. “Hidden” files are not shown when you get a normal directory listing, such as with the command “ls -l”. To show “all” files, use the command: `ls -al` Telnet to your account, and get a listing of all files in your root directory (ls -al). You should see several files whose filenames begin with a period. These are hidden files; they are not normally shown when you get a directory listing (unless you include the “a” switch, of course). You need to edit the file named .profile. `pico .profile` Your .profile file contains commands that you want to have executed as part of your login process. For tomcat programming, you need to set the values of four environment variables. You can do this with the export command. You should see the following four lines in your .profile: ```shell export JAVA_HOME=/usr/local/jdk export CATALINA_HOME=/usr/local/tomcat export CATALINA_BASE=/home/bis3523/abc123/tomcat export CLASSPATH=.: /usr/local/tomcat/common/lib/servlet.jar: /usr/local/jdk/bin/mysql.jar ``` Modify the third of these lines to substitute your netid for abc123. Also make sure that your entire path specification is correct (make sure it is /home/bis3523, for instance). The commands that you type into your .profile are exactly like commands that you would type at the command line. At the command line, you could not press <Enter> in the middle of a command. Similarly, you cannot split any of these commands across multiple lines. Be sure to check your .profile for accuracy. Each command must be on a single line. These environment variables specify (1) the location of mislab’s Java installation, (2) mislab’s tomcat (catalina) installation, (3) your tomcat directory, and (4) locations (directories or files) to be searched for Java classes. 3\. You can create your own aliases for commands in your .profile file. For instance, if you want to type "dir" instead of "ls –l", you can include the following line in your .profile: ```shell alias dir="ls –l" ``` For your convenience, an alias to start your tomcat server, one to shutdown your tomcat server, and one to show all running tomcat servers have been created in your .profile file. ```shell alias starttom="/usr/local/tomcat/bin/startup.sh" alias stoptom="/usr/local/tomcat/bin/shutdown.sh" alias showtom="ps -f -C java" ``` You will be able to type starttom to start your tomcat server, stoptom to shut it down, and showtom to show all running tomcat servers. 4. Press Control-X to exit pico, saving your file. 5. Log out of your account, then log back in. The lines that you just inserted into your .profile file will be processed when you log back in (and every time you log in in the future). Any time that you edit your .profile, you need to log out, then log back in. The commands in your .profile are processed as part of the login process. 6. Under your root directory, make a subdirectory named tomcat: ` mkdir tomcat` 7. Change to your tomcat subdirectory: ` cd tomcat` 8. Copy all of the tomcat files from mislab's tomcat directory to your own tomcat subdirectory: ` cp -R /usr/local/tomcat/* .` (The -R switch indicates that all subdirectories should be copied, recursively. The period at the end specifies that the current directory is the destination to which files are to be copied.) 9. Get a directory listing. You should see several subdirectories, including: conf, logs, webapps, and work. Change to your conf subdirectory. ` cd conf` 10. The file server.xml is used to configure your tomcat server. You need to edit this file to specify your assigned port numbers. ` pico server.xml` (If you do not want to use pico, you could ftp server.xml down to your local computer, edit the file, then ftp it back to your mislab account.) On line 3, change `port=8085` to use your assigned secondary port number. (You can press Control-C to see the current line number in pico.) On line 15, change `port=8080` to use your assigned primary port number. 11. Exit pico, saving your edited file. 12. Start your tomcat server: ` starttom` You should get a message indicating the directories that your server is using. These should correspond to the environment variables that you set in your .profile. 13. Check to see if your tomcat server is running: ` showtom` ```qowt-stl-Normal conf> showtom UID PID PPID C STIME TTY TIME CMD rpearson 24611 1 13 11:00 pts/2 00:00:04 /usr/local/jdk/bin/java -Djava.u ``` You should see something like: (Note: There could be multiple tomcat servers running, since each student will run his or her own server.) 14. Get into your web browser and try to access your server. Go to the following URL: http://mislab.business.msstate.edu:8080 (Replace the 8080 with your assigned primary port number.) This should load the index.jsp file that is stored in your tomcat/webapps/ROOT directory. (You may have to try this more that once, since it takes a few moments for your tomcat server to actually get up and running. Its first response to a request may be slow, but subsequent responses will be fast.) 15. You should have the file counter.jsp in your tomcat/webapps/ROOT subdirectory. The .jsp filename extension indicates to the tomcat server that this is a java server page, meaning that it includes jsp code. Given your knowledge of Java, you can probably look at counter.jsp and determine to some extent what is going on in the page. When your tomcat server gets a request for this file, it (the server) translates the .jsp file into an actual java servlet. To see this in action, telnet to your account, and move to tomcat/work/Catalina/localhost/ROOT/org/apach/jsp. You will probably have two files in that directory: index\_jsp.java and index\_jsp.class. These two files were created when you accessed your index.jsp page. 16. In your browser, go to: http://mislab.business.msstate.edu:8080/counter.jsp (Replace the 8080 with your assigned primary port number.) You should see a page which displays the current date and time, followed by an access counter. 17. Now go back to your telnet session and get a new directory listing. You will see that your tomcat server translated your .jsp file into a .java file (counter\_jsp.java), then compiled that into a .class file. Your .class file generated the page that you see in the browser! 18. The first time you access counter.jsp with your browser, there will be a significant delay, because the .jsp file has to be translated into .java, then the .java file has to be compiled into byte code. On subsequent requests for the page, these steps can be skipped, so the desired page will load much more quickly. Note that any time that you shut down your server, or any time that you edit the .jsp file, Java code generation and compilation will need to occur again. One noticeable effect of this is that the next request for the page will, once again, be slow. Another noticeable effect is that your counter will be reinitialized. This counter will count correctly, as long as you don’t shut down your tomcat server and don’t edit your .jsp file. 19. If you want to do some quick experimentation, you can put your own .html files in your tomcat/webapps/ROOT directory and access them via your own assigned tomcat primary port number. 20. Now that you know that you can process a .jsp correctly, test a servlet. We want to make sure that you can compile a servlet, and that you can then run it from a web page. You should have the following two files: ` tomcat/webapps/ROOT/snooperServlet.html` ` tomcat/webapps/ROOT/WEB-INF/classes/SnooperServlet.java` Edit SnoooperServlet.html and change the default port number of 8080 to your primary tomcat port number (this is in the href attribute of an anchor tag). Also change the abc123 that you find in that attribute to your net id. Move to your "classes directory". If you are currently in your home directory, you can use one, or several, cd commands to move to your classes directory, such as: ` cd tomcat/webapps/ROOT/WEB-INF/classes` or ` cd tomcat` ` cd webapps` ` cd ROOT` ` cd WEB-INF` ` cd classes` 21. Get a directory listing, to be sure that you really have SnooperServlet.java. ` ls -l` 22. Compile SnooperServlet.java. ` javac SnooperServlet.java` If you get an error message such as: ` -bash: javac: command not found` then you have an error in the Path environment variable in your .profile. Since your .profile was pre-configured for you, you should not get this error message. If you have accidentally messed up your path, however, you could get this error. Your .profile should contain the following line: ` PATH=$PATH:$HOME/bin:/usr/sbin:/usr/local/jdk/bin` Since java is in /usr/local/jdk/bin on mislab, this value should point the operating system to the correct file. If you get an error message such as: ` SnooperServlet.java:10: package javax.servlet does not exist` or ` SnooperServlet.java:13: cannot resolve symbol` then you probably have an error in your classpath (also set in your .profile, but you typed this one). 23. Once you have worked the bugs out of your environment, you will successfully compile SnooperServlet.java. Get a directory listing, and make sure that you have a SnooperServlet.class. 24. In your web browser, go to: http://mislab.business.msstate.edu:8080/snooperServlet.html Click the anchor link. If you see a display of a lot of information, formatted in a table, you are doing great! 25. When you are finished, you can shut down your tomcat server, or you can leave it running to wait for requests. ` stoptom` # Assignment #8b ## DataEntry servlet Filenames: DataEntry.html, DataEntry.java Create an HTML form that requests data from the user. Submit that form data to a servlet. For output, display the user’s submitted data back to the user. For extra experience, also save the data in a server-based text file. 1. Create your HTML data entry form, and store it in your tomcat/webapps/ROOT directory. You can access it at: http://mislab.business.msstate.edu:8080/DataEntry.html (Of course, substitute your primary port number.) 2. Your form tag should refer to your servlet in its action attribute: ` /servlet/abc123.DataEntry` 3. In Eclipse, create a new Java project. Name it Servlets. You will not actually run your servlets in Eclipse, so we suggest that you simply use this one project for the rest of your Java programming assignments. Just create new classes as you need them, and keep them all in this project. You will upload them as needed from the project into your mislab account. 4. This project needs some non-standard classes that are not automatically included in an Eclipse project. Download the file servlet.jar from our course web site. This is a java archive file that contains several servlet-related classes. 5. In Eclipse, right-click (or control-click) on your project name, then select Properties. This will open the Properties Window. 6. In the Properties Window, select Java Build Path along the left, then click the Libraries tab. 7. Click the "Add External JARs" button, and add servlet.jar to your project. 8. Create a class named DataEntry. This class should be a subclass of HTTPServlet, not of java.lang.Object. Click the Browse button. In the pop-up window, start typing the word httpser. When you see the HTTPServlet class listed, select it as your superclass. 9. Eclipse will generate an import statement: ` import javax.servlet.http.HttpServlet;` We recommend changing this to: ` import javax.servlet.http.*;` 10. Add another import, for I/O exception handling: ` import java.io.*;` 11. Write a method that will be called automatically to respond to an HTTP get request: ```qowt-stl-Normal public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException { } ``` 12. Your servlet needs to send back a "doctype" indicator before it sends any other output. You can do this with your response parameter, which has a setContentType() method. response.setContentType("text/html"); 13. You can use your response parameter's getWriter() method to get a PrintWriter object, which you can use to send text back to the browser. ```qowt-stl-Normal PrintWriter out=response.getWriter(); out.println("This is a test."); ``` 14. Save your work in Eclipse, then upload your DataEntry.java file to tomcat/webapps/ROOT/WEB-INF/classes. 15. Telnet to your account and move to your classes directory. You need to compile your Java code on mislab, because tomcat does not yet support Java 1.8 byte code. mislab has Java compilers for Java 1.4, 1.5, 1.6, 1.7, and 1.8. In your classes directory, type: ` javac DataEntry.java` 16. Move to your tomcat/webapps/ROOT/WEB-INF directory. For security purposes, your tomcat server will not serve any servlet that is not listed in your web.xml file. Use pico to edit web.xml. You will see entries in the file for HelloWorldExample and SnooperServlet. You need to put an entry in for your DataEntry servlet. ```Java DataEntry DataEntry DataEntry *.DataEntry ``` Copy/paste in pico is a bit tricky, but here's how you do it. Move to the first <servlet> container for SnooperServlet. Press Shift-Control-6. At the bottom of the screen, you will see "\[ Mark Set \]". Arrow-down to highlight the lines you want to copy. Press Control-k. This will cut the highlight block, so immediately press Control-u to paste it right back where it was. Now you can Control-u again to paste it again, and have a copy that you can edit. Change every SnooperServlet to DataEntry. VERY IMPORTANT: Any mistake in this file will prevent your tomcat server from working. If you make any mistake in this file, you will probably get a blank screen response from your tomcat server when you try to access any page. 17. You will need to stop your tomcat server and start it again, so it will process your web.xml file. ` stoptom` ` starttom` 18. Modify your servlet to retrieve the submitted form data from your HTML form. If you have a form field named lastName, for instance, you can retrieve the form data with: ```Java String lastName=request.getParameter("lastName"); ``` Echo information back to the browser to verify that you can indeed retrieve the submitted form data. Remember that any time you edit your .java servlet, you must: - save your work in Eclipse (to generate a new .java file) - upload the .java file from your workspace to your classes folder - switch over to your mislab account (telnet) and compile the .java file - stop your tomcat server - start your tomcat server 19. If you can get one more step done, you will be in really good shape. Write the submitted data into a server-based file (the file will be in your classes folder). ```Java try { FileWriter file=new FileWriter("DataEntry.txt",true); file.write(lastName+"\t"+firstName+"\n"); file.close(); } catch(Exception e) { } ``` 20. In your index.html, change the href in the anchor tag for this assignment to request DataEntry.html. Unlike previous assignments, you will not display your Java source code now, because you now have a working web-based assignment. We want the DataEntry assignment to work, not simply display source code. # Assignment #9 ## Java Source Code Lister Filenames: ListFiles.java, ListSource.java Write a servlet which will display a directory listing of all of the .java files in your classes folder (on mislab). When the user clicks one of the listed file names, display the contents of that .java file. 1\. In Eclipse, you can use your Servlets project, and simply create two new classes in that project. You have already added servlet.jar to that project, so this will save you a step. 2\. Create a new class named ListFiles. It should be a subclass of HttpServlet. 3\. You will need two import statement. You need to import `javax.servlet.http.*` `java.io.*` 4\. You will need to write a `doGet()` method. 5\. Your` doGet()` method should set the contentType of your response to text/html. 6\. Since you will want to generate some output to the browser, you need to call your response object's `getWriter()` method: `PrintWriter out=response.getWriter();` 7\. You can instantiate a File object to get a listing of the files in the current directory. Once you get that File object, you can call its listFiles() method to get an array of file names. `File dir=new File(".");` `File[] filesList=dir.listFiles();` "." indicates "the current directory". 8. Now use a for loop to step through the elements of the filesList array. Process each element in the array (each element is a File object). You can determine whether a File object is a file or a directory by calling its `isFile()` method. You can get a File object's filename by calling its `getName()` method. Once you have a filename (a String object), you can use its matches() method to see if the filename ends with .java. ` if(filename.matches(".*\\.java"))` If the filename ends in .java, generate a line of HTML that includes an anchor tag. Clicking on the anchor tag should submit a request for your ListSource servlet, passing it the current filename. You want to generate something like: ` Test` 9. Update web.xml, in your WEB-INF folder, to provide support for both ListFiles and ListSource. 10. When you get this servlet running, it will display a list of the .java files in your classes folder, displaying them as anchor tags. 11. Now write `ListSource.java`. It should also be a subclass of `HttpServlet`. 12. `ListSource` should set the `contentType` of your response to text/plain (not text/html, because you don't want the browser to try to render this Java source code). 13. Retrieve the submitted file name. 14. Instantiate a FileReader object, then a BufferedReader object. 15. Loop, reading a record from the .java file, and displaying it to the browser (as plain text). 16. In your `index.html`, change the href in the anchor tag for this assignment to request your ListFiles servlet. # Assignment #10 ## Trivia Servlet Filenames: Trivia.html, Trivia.java In this assignment, you will write a servlet that reads records from a server-based trivia text file, and displays selected trivia events on the user’s browser. 1. Create an HTML page that provides two radio buttons – the user can get trivia events for: - the current date, or - a specified month and day. Use your HTML experience to provide a good user interface for this. 2. Write a servlet that will: - retrieve the radio button option - if the user selected "current date", get the current month and day - if the user specified a month and day, retrieve those from the form 3. Getting the current date in Java. You can use the GregorianCalendar class to get the current date and time. GregorianCalendar inherits some useful methods and constants from its direct superclass, Calendar. GregorianCalendar inherits a general-purpose accessor method named get, which receives a primitive int. It also inherits several constants that you can pass to specify what you want to “get”. To get the current day of the month, for instance, you can: GregorianCalendar calendar=new GregorianCalendar(); int day=calendar.get(Calendar.DAY\_OF\_MONTH); Make sure that you can get a numeric month and a numeric day for both options before you even think about reading the trivia file. 4. You can copy Trivia.fil into your classes directory: `cp /home/bis3523/resources/data/Trivia.fil .` Be sure to include the period at the end, which specifies the destination for the cp command. 5. Read the records from the trivia file, and display the events for the selected date. Generate good HTML. 6. In your index.html, change the href in the anchor tag for this assignment to Trivia.html. # Assignment #11 ## Servlet-based Survey System Filenames: Survey.html, Survey.java Create an HTML data entry form for some sort of data collection/survey system. Your survey should contain at least one set of radio buttons, so you can generate some counts and statistics (it's easy to count how many 1s, 2, and 3s people select from radio buttons; it's much more difficult to summarize free-form text). Write a servlet that retrieves the submitted form data, saves it into a server-based text file, and displays up-to-date survey results (counts, percentages, means, whatever makes sense for your survey). In your index.html, change the href in the anchor tag for this assignment to Survey.html. # Assignment #12 ## There is no assignment #12 # Assignment #13 ## JDBC Database Trivia Filenames: DatabaseTrivia.html, DatabaseTrivia.java Modify your earlier Trivia assignment to retrieve trivia events from mislab's Trivia mysql table. # Assignment #xx (not this one) ## States Database Query System Filenames: States.html, States.java Create an HTML form that the user can use to perform queries on the mislab States mysql table. You should provide the following options: 1\. Sort order: List states alphabetically (by state name), by population, by area, or by population density. In all cases, provide options to list in either ascending or descending order. 2\. Selection options: Provide a textfield for each of the four fields: state name, population, area, and population density. If the user enters any letters into the state name textfield, list states that begin with that string (if the user enters Mi, the list all states that begin with Mi; this search should be case-insensitive). If the user enters a number into any of the other three textfields, list all states that match that value or greater (treat the number as a minimum value). 3\. Display your output in a well-formatted table. # Assignment #14 ## AJAX Customer/Database Query System Filenames: CustomerList.java, CustomerQuery.java Write a servlet that lists all customers in the mislab mysql customer table. Your list should include only customer number and customer name, listed in a well-formatted table. Provide at least one additional cell to the right of the customer name in your table – you will display detail information for that customer via AJAX. Respond to clicking on a table row by submitting an AJAX request for that customer's information (submit a request for your CustomerQuery servlet). Display all information about that customer in the cell to the right of the customer name in your table. In your index.html, change the href in the anchor tag for this assignment to request your CustomerList servlet. # Notes # Tomcat notes `mislab.business.msstate:port/servlet/netid.servletName` Servlets go under `~/tomcat/webapps/ROOT/WEB-INF/classes`