CSC 290A, Spring 2009: Example programs
This page holds example programs, to give you an idea of the course context.
Source code: The source code is currently under
svn and can be checked out from /p/compiler/repos/dingweb. The programs are written in Ruby.
Show IP address
shows the IP address of the client computer.
- The program has 15 lines of code.
Web-based hashtable
-
http://betaweb.csug.rochester.edu/cs290/dingweb/show-my-ip-address.cgi
allows anyone to insert key and value pairs from one computer and retrieve them from any other computer. The usage is as follows
- to insert: http://betaweb.csug.rochester.edu/cs290/dingweb/hashtable.cgi?k=key&v=val
- to query: http://betaweb.csug.rochester.edu/cs290/dingweb/hashtable.cgi?k=key
- The program has 159 lines of code. The core is about 40 lines, and the rest is producing timing information such as the date/time of the insertion and the oldest entry in the table.
- The table has a maximal size. Oldest entries are removed if the table becomes too large. Don't store anything that you cannot afford to lose!