|
Fall Semester 2002 |
Mon Dec 23
Sat-Sun Dec 21-22I have been reading the exams
... amd grading them and grades are going to be up soon.
Fri Dec 20
FINAL
EXAM today in Lindley 102 5-7pm.
Next semester I will be teaching a class on Networked Game Design with Java.
Here's a copy of the class web page in INSITE as of last week.
(Here's what was covered in this class last semester).
The two books used are:
The class has two goals:
The first goal is achieved using Petchel, the second using Friedl.
Note: the class also
meets with T580 (Interactive Storytelling and Computer Games Design, this is the writers'
class, ours is definitely for programmers,) one hour per week on Mondays. Students are
expected to create a multiplayer game (working alone or in teams, under the guidance of
an instructor) and present it at MIME 2003 in May.
Thu Dec 19(The help is in the explanation of the output).
Wed Dec 18
Apache takes its SOAP implementation to new heights.
Tue Dec 17
Date: Mon, 16 Dec 2002 11:58:24 -0500 (EST) From: Adrian German <dgerman@cs.indiana.edu> To: A348/A548 Fall 2002 Distribution List <dgerman@indiana.edu> Subject: A348/A548 Update (Re: [system #121] high server load (fwd)) Dear A348 Friends, The Tomcat stop/start process being so resource intensive it is not advisable that we all start and stop the servers at the same time (see message below). So what I am going to ask of you in anticipation of all our individual appointments this week would be to please choose a random hour and minute during the day and stop your Tomcat then and restart it five minutes later. When you come here for your individual appointment we will check it. But please make this change as soon as possible so everybody else can work. Thank you very much for your help (and attention to this matter). ... Adrian ---------- Forwarded message ---------- Date: Mon, 16 Dec 2002 09:37:10 -0500 (EST) From: Rob Henderson <robh> To: kmdaily@indiana.edu Cc: dgerman@cs.indiana.edu Subject: Re: [system #121] high server load Your request #121 was resolved by robh: It turns out this particular problem is likely due to the way students are using cron jobs on burrowww. It turns out that about 70 people are restarting their servers at the exact same time every hour (ie. every hour, on the hour) and that puts quite a load on the machine when all of these shutdown/restarts fire off at the same time. You may want to change your crontab so that it runs at a different time than on the hour (shutdown) and 2 minutes after the hour (startup) which is exactly what everyone else is doing. I went ahead and added some additional swap space that should help prevent the machine from running out of memory again. Adrian, I don't know that anything needs to be done this semester. However, in the future you should probably get students to pick random times to restart the server and also do it less frequently than every hour (like once per day). It looks like the tomcat restart process is quite resource intensive. Thanks! --Rob
Mon Dec 16
Text
of take-home final exam is final.
Fri-Sun Dec 13-15
Wed-Thu Dec 11-12Second Practical Exam is today, in lab.
Tue Dec 10
Take-home
final exam in the making.
Sat-Mon Dec 7-9Date: Mon, 9 Dec 2002 23:10:01 -0500 (EST) From: Adrian German <dgerman@cs.indiana.edu> To: A348 Fall2002 Distribution List <dgerman@indiana.edu> Subject: A348 Update There is a Practical this week. The task for the Practical is to set up your Tomcat for automatic stop/restart as shown in class on Thursday. Labs this week are supposed to help you achieve this. More details tomorrow (on the web site and in class). The assignment for this week's lab is to write up a document that summarizes MySQL access from CGI, PHP, and Java. The final exam will be take-home and will consist of a large set of questions to be posted tomorrow on the web site. You can turn the answers in next week, in person or on Fri 12/20 at the time of the Final Exam. A script will be installed shortly that will allow you to choose a time for a 10' individual appointment next week. The A348 web site will contain a link to this script, and it will be presented in class this week as well. The Lab Coordinators will stop grading on Friday. Make sure you clear your accounts with them by the end of the day on Thu this week so you can get all the credit you can get. ... Adrian
Fri Dec 6
Thu Dec 5A set of notes discussing the implementation of a MUD has also been posted.
Wed Dec 4
Notes)
that we need to do today:
cron
setclasspath.sh)
Also, I should install the scheduler script, for individual appointments on the projects.
Mon-Tue Dec 2-3
The exam is comprehensive and cumulative.
The list of questions for the Project will be posted on Class Notes web page on Wednesday. Turn your answers in person in written form, and include the URL of your project. The Final Exam is in class on Fri Dec 20 between 5pm-7pm. You need to turn in the answers to the Project questions before going into the Final Exam.
Topics for the last week of classes (Dec 9-13):
Topics for the week before the last (Dec 2-7):
Also, in an attempt to simplify software distribution I'm placing everything in
So you should find there everything that's needed regardless of the project./l/www/classes/a348-dger/fall2002/software
Mon Dec 2We started from a simple servlet:
import javax.servlet.http.*;
import javax.servlet.*;
import java.io.*;
public class One extends HttpServlet {
int count;
public void doGet(HttpServletRequest request,
HttpServletResponse response)
throws ServletException,
IOException {
response.setContentType("text/html");
PrintWriter out = response.getWriter();
count += 1;
out.println("Counter is: " + count);
}
}
easily and quickly transformed into a JSP:
<%!
int count;
%>
<%
count += 1;
%>
<html>
<head><title>My Page</title></head>
<body bgcolor="lightgrey">
Counter is now even bigger: <%= count %>
</body>
</html>
So we wrote a servlet for the portfolio
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
public class Port extends HttpServlet {
public void doGet(HttpServletRequest request,
HttpServletResponse response)
throws ServletException, IOException {
response.setContentType("text/html");
PrintWriter out = response.getWriter();
String url = request.getContextPath() + request.getServletPath();
String link1 = "<a href=\"" + url + "?pic=one\">One</a>",
link2 = "<a href=\"" + url + "?pic=two\">Two</a>",
link3 = "<a href=\"" + url + "?pic=thr\">Three</a>",
link4 = "<a href=\"" + url + "?pic=fou\">Four</a>";
String pic = "<img src=\"http://www.cc.columbia.edu/low3.gif\">";
String arg = request.getParameter("pic");
if (arg.equals("one")) { link1 = "One"; }
else if (arg.equals("two")) { link2 = "Two"; }
else if (arg.equals("thr")) { link3 = "Three"; }
else if (arg.equals("fou")) { link4 = "Four"; }
else { }
out.println(link1 + link2 + link3 + link4 + "<p>");
out.println(pic);
}
}
which was easily and immediately transformed into a JSP:
<%
String url = request.getContextPath() + request.getServletPath();
String link1 = "<a href=\"" + url + "?pic=one\">One</a>",
link2 = "<a href=\"" + url + "?pic=two\">Two</a>",
link3 = "<a href=\"" + url + "?pic=thr\">Three</a>",
link4 = "<a href=\"" + url + "?pic=fou\">Four</a>";
String pic = "<img src=\"http://www.cc.columbia.edu/low3.gif\">";
String arg = request.getParameter("pic");
if (arg == null) { } else {
if (arg.equals("one")) { link1 = "One"; }
else if (arg.equals("two")) { link2 = "Two"; }
else if (arg.equals("thr")) { link3 = "Three"; }
else if (arg.equals("fou")) { link4 = "Four"; }
else { }
}
%>
<html>
<head><title>My Page</title></head>
<body bgcolor="lightgrey">
<table>
<tr> <td> <%=link1%>
<td> <%=link2%>
<td> <%=link3%>
<td> <%=link4%>
<tr> <td colspan=4 align=center> <%=pic%>
</table>
</body>
</html>
With all this under our belt we easily wrote the following JSP:
<%
String bAlance = request.getParameter("balance");
String url = request.getContextPath() + request.getServletPath();
String arg = request.getParameter("arg");
int res;
int bal = 0;
int argument = 0;
try { bal = Integer.parseInt(bAlance); } catch (Exception e) { }
try { argument = Integer.parseInt(arg); } catch (Exception e) { }
res = argument + bal;
bAlance = res + "";
%>
<html>
<head><title>My Page</title></head>
<body bgcolor="lightgrey">
Accumulator is now: <%= bAlance %>
<form method="GET" action="<%= url %>">
Enter number <input type="text" name="arg">
<input type="hidden" name="balance" value="<%=bAlance%>">
</form>
</body>
</html>
without ever needing a servlet to start from.
Wed-Sun Nov 27-Dec 1
Happy Thanksgiving Break!
Tue Nov 26
Sat-Mon Nov 23-25
Fri Nov 22Here's a JSP we posted before and (I am sure) has passed unnoticed:
<% int count, right; String message = "Hello and welcome to the addition quiz!";
if (session.getAttribute("count") == null || request.getParameter("reset") != null) {
session.setAttribute("count", new Integer(0)); count = 0;
session.setAttribute("right", new Integer(0)); right = 0;
} else {
count = ((Integer)(session.getAttribute("count"))).intValue();
right = ((Integer)(session.getAttribute("right"))).intValue();
try {
if (Integer.parseInt(request.getParameter("answer")) == ((Integer)(session.getAttribute("answerKey"))).intValue())
right += 1;
else
right += 0;
} catch (Exception e) { }
count += 1;
message = right + " out of " + count;
if (count == 10) {
message = "Final result: " + message + ". New game started "; count = 0; right = 0;
} else
message = "Your performance thus far: " + message;
session.setAttribute("count", new Integer(count));
session.setAttribute("right", new Integer(right));
}
int one = (int) (Math.random() * 100 - 50),
two = (int) (Math.random() * 100 - 50);
session.setAttribute("answerKey", new Integer(one + two));
%>
<html>
<body>
<form action="<%=request.getContextPath() + request.getServletPath()%>">
<%=message%> <p>
Question <%=count+1%>. <%=one%> + <%=two%> = <input type="text" name="answer"> <p>
<input type="submit" value="Proceed"> <input type="submit" name="reset" value="Reset"> <p>
</form>
</body>
</html>
It is clean and compact, and a pleasure to study (I hope). (The long lines, you ask? I am really happy it's so easy to use them on the web.)
Thu Nov 21
Wed Nov 20
amazon.com
amazon should not know the card no. either!
amazon should be able to pass your card data to NGPM.
amazon should just send the encrypted data to NGPM.
amazon,
charge your account.)
amazon ships the book (to you).
Note that this includes some B2C but also some B2B.
Well, web services are simply made for that.
The difficulty here is that NGPM and amazon.com are two
different entities. Their programs have been developed by different people
with different technologies. Their integration must be done in a smooth and
reliable manner. You can't ever hope that perhaps everybody will be
using the same language, the same systems, the same type of servers, and the
same programming technologies. So elegant approaches like Java RMI are
doomed from
the start. So are any strongly coupled methodologies (CORBA, DCOM).
It's here where web services enter the stage.
As we are approaching the topic we need to maintain the same clinical attitude that we currently have.
Don't get too excited, don't get too depressed (or indifferent).
Relax.
Tue Nov 19This is where we stop developing lecture notes for this semester.
In the next weeks we will only focus on:
ClassPak
Really, the class notes are in their final stage now.
Mon Nov 18| Perhaps Mr. Borge will be coming to class one of these days.
We never know. (That would be twoderful, though).
Tomorrow's lecture: Help with Homework Five and Six. |
|
Fri-Sun Nov 15-17Homework Five due date pushed to Fri Nov 22 at the end of the day.
Thu Nov 14|
Minute papers from Tuesday ask about the name of the Jakarta project. Jakarta I suspect is named so because it offers Java server-side support. Java - Jakarta, you get the idea. Why was Java named Java even though the creator is from Canada originally? Apache is named so because NCSA's httpd was considered 'a patchy' server and Apache derived from it (through the removal of all bugs). So it's not that it's Native American or whatever but see the cartoon below. Hope this helps, let me know if you have more questions. | |
| Stop making fun of Apache! |
|
Here's the original announcement, from June 22, 1999.
``Sun Microsystems and the Apache Group have announced an agreement whereby Sun's Servlet and JavaServer Pages reference implementation source code will be made available from Apache under the open Apache license. This marks the first time that proprietary Java source code from Sun will enter the fully open development process of the Apache Group. This article covers the details of this unprecedented event.''This new project has been named Jakarta
Doesn't this read as if taken straight from
(Bullets everywhere.)
Wed Nov 13
Tue Nov 12
Also, good comment by David Mellinger: var url; in one of the functions discussed on Thursday
(that would be show)
completely eliminates the problems we experienced in Internet Explorer. Why is this relevant? Well, for one
thing this particular problem wouldn't have occurred in PHP. In that case we would have had to use
global to create the problem. This simply justifies the PHP point of view, and this
basically completes our discussion (and analysis) of Homework Four.
Mon Nov 11
I have to clean Lab Ten installation instructions as soon as possible. There
aren't probably many typos but those that are should not be there. And if there's
anything missing we should be adding it now.
Thanks to Matt Hottell for reminding me
of the conflict of names (url is taken in IE) in Lab Nine and that
tomcat needs to be unarchived with gnu's tar
(same with make at PHP).
And while I'm at it I could generate server.xml files for everybody.
Sat-Sun Nov 9-10http://registrar.indiana.edu/Calendars/102finex.html#schedule http://events.iu.edu/webevent.cgi?cmd=opencal&cal=cal22
Fri Nov 8
Thu Nov 7Local copy (place this in the context of the first Hangman lectures).
Wed Nov 6
Tue Nov 5
Mon Nov 4
Tomorrow we will describe the Javascript shopping cart.
Here are some useful Javascript links:
Sat-Sun Nov 2-3
<?
function get_book_cats($isbn) {
$conn = db_connect();
$query = "select dgerman_php_catboo.catid, catname
from dgerman_php_categories, dgerman_php_catboo
where '$isbn' = dgerman_php_catboo.isbn and
dgerman_php_categories.catid = dgerman_php_catboo.catid";
$result = @mysql_query($query);
if (! $result) return false;
$num_cats = @mysql_num_rows($result);
if ($num_cats == 0) return false;
$cat_array = array();
for (
$count = 0;
$row = @mysql_fetch_array($result);
$count++
)
$cat_array[$count] = $row;
if (! is_array($cat_array)) {
echo "No categories currently available. <br>";
}
foreach ($cat_array as $row) {
$url = "show_cat.php?catid=".($row["catid"]);
$title = $row["catname"];
do_html_url($url, $title);
}
}
?>
Also, a note: links in the notes to working versions of the prototypes may
not work because I have not had the time to re-install the code. But you can
do that. And we have done this consistently in class. So you should have a
fairly clear understanding of that too. (Except that for the code above one
needs a working demo, which I have now presented).
Wed-Fri Oct 30 - Nov 1
Tue Oct 29
Sat-Mon Oct 26-28Meanwhile you should keep working on the Reality Check part of the Midterm to have it finished by the due date.
Also, remember that there's now one more Project available:
But there are two more projects under development:
Expect both to be posted as soon as the grading is done.
Fri Oct 25
import java.io.*;
import java.util.*;
class Two {
public static void main(String[] args) throws IOException {
BufferedReader b =
new BufferedReader(new InputStreamReader(System.in));
String line;
int user, computer, pointsUser = 0, pointsComputer = 0;
String[] choices = { "stone", "scissors", "paper" };
Hashtable h = new Hashtable();
h.put("stone" , new Integer(0));
h.put("scissors", new Integer(1));
h.put("paper" , new Integer(2));
Object choice;
System.out.println("Hello and welcome to the game.");
do {
computer = (int)(Math.random() * choices.length);
System.out.println("*** The computer has chosen. ");
System.out.println("Now it's your turn.");
System.out.println("Paper, scissors, or stone...");
System.out.print("Which will it be? Type here: ");
line = b.readLine();
choice = h.get(line);
String message = "*** The computer's choice was: " + choices[computer];
if (choice == null) {
System.out.println("Sorry, this is not a valid choice.");
System.out.println("The computer has just scored one on you.");
System.out.println("Its choice was: " + choices[computer]);
pointsComputer += 1;
} else {
user = ((Integer)choice).intValue();
if ((user + 1) % 3 == computer) {
System.out.println("Very good.\n" + message);
System.out.println("***(So, you win.)***");
pointsUser += 1;
} else if ((computer + 1) % 3 == user) {
System.out.println("Too bad.\n" + message);
System.out.println("***(So, you lose.)***");
pointsComputer += 1;
} else {
System.out.println(message + "\n***(This game's a draw.)***");
}
System.out.println("The score is now: ");
System.out.println(" Computer: " + pointsComputer);
System.out.println(" You : " + pointsUser);
}
} while (true);
}
}
Please look at it and make a note of anything new in it.
Thu Oct 24Practical Exam is due today.
Wed Oct 23The Practical Exam is listed where the Lab for this week would have been.
Tue Oct 22
Grades
updated, tonight the Practical Exam is to be posted.
All (but one set of) lecture notes have been posted.
The only thing that remains to be posted is the Web Services project.
That may take one more weekend to be put together.
Here's the e-mail message of Sunday:
Date: Sun, 20 Oct 2002 22:40:28 -0500 (EST) From: Adrian German <dgerman@cs.indiana.edu> To: Undisclosed recipients: ; Subject: A348/A548 Fall2002 Projects Dear A348/A548 Friends, All but one (the very last one, for Dec 12) set of lecture notes have been posted and all projects (minus the Axis web services with WSDL and UDDI project to be described in the Dec 12 last set of notes) can be started now. The Axis set of notes might take me all of next week but I anticipate it to be fully posted by Oct 27. Also, for Axis and for everything server-side Java we need to install Tomcat (and that is described in the notes too) and so if you are eager to start, write to me and I will advise what to do between now and then. (Start by installing Tomcat, essentially). Please create a folder under protected and index it clearly on your main web page (Project). Place this message under Oct 20, and provide a brief answer on your web site to the following question(s): a) What Project have you chosen? Why? What do you need to get started? If you have started already where can I read about what you have done thus far? If you are actively working on your project, what part of it are you working on at this time? If you are stuck currently, what do you think you need to resume working on the project actively again? ... Adrian P.S. If you no longer need to be on this list please let me know and I will remove your username from my list. Thanks and all the best!
Mon Oct 21
Sun Oct 20Please check them and let us know if you see any problems.
Sat Oct 19Remember that there was a first version that we turned into this.<?
$acc = 0 + $acc + $arg;
?>
<html>
<body>
<table><tr><td> <a href="<?=$SCRIPT_NAME?>?arg=1&acc=<?=$acc?>">Add One</a>
<td> <a href="<?=$SCRIPT_NAME?>?arg=-1&acc=<?=$acc?>">SubOne</a>
<tr><td align=center colspan=2> <font size=+6><?=$acc?></font>
</table>
</body>
</html>
I might be posting the sessions version over the weekend.
Fri Oct 18
Thu Oct 17
Wed Oct 16
Tue Oct 15
Mon Oct 14
Sat-Sun Oct 12-13More to come soon.
Wed-Fri Oct 9-11
Tue Oct 8
Mon Oct 7
Sat-Sun Oct 5-6
Fri Oct 4MTWR 1-2pm LH201DI am going to change the page of office hours tonight accordingly.
Thu Oct 3
Wed Oct 21. An example of polymorphism:
class Player { }
class Center extends Player { }
class Guard extends Player { }
class Atlanta {
public static void main(String[] args) {
Player a = new Center();
Guard b = new Guard();
}
}
Imagine an array of Players: Centers, Guards, etc. 2. An example of dynamic method lookup:
class Horse {
void neigh() { System.out.println("Howdy."); }
int numberOfLegs = 4;
}
class Unicorn extends Horse {
Horn horn = new Horn();
void neigh() {
// super.neigh();
System.out.println("Bonjour.");
}
}
class Horn { }
The tester class is named after a famous playwright.
class Ionesco {
public static void main(String[] args) {
Unicorn b = new Unicorn();
b.neigh();
Horse a = new Horse();
a.neigh();
Horse c = new Unicorn(); // polymorphism
c.neigh();
// Unicorn d = new Horse();
}
}
His plays were famous for their able pursuit of the absurd.
Minute paper for the day was: why do they put bells on cows?
(Answer: their horns don't work).
Tue Oct 1Here's the breakdown as of that timestamp:
| Project | Count |
|---|---|
| Maintaining state with Perl/CGI and MySQL | 1 |
| PHP database access on the web. A shopping cart. | 4 |
| Client-side programming with Javascript. A shopping cart. | 3 |
| HTTP and Java networking: a network client, a web server, a simple browser. | - |
| Distributed processing with Java: Chat with RMI (Remote Method Invocation). | 2 |
| Web chat using HTTP and Java. Applet to servlet communication. | 2 |
| Web discussion forum with Java servlets, JDBC, XML, XSLT. | 5 |
| XML-RPC, SOAP and other distributed computing alternatives. | 1 |
| Axis and Web Services. WSDL and UDDI. | - |
| Other Project (please fill in the field in the question below). | 3 |
I will have more details in class today.
Mon Sep 30
Many thanks
to Tim for asking about the
QuizSite activity regarding the project. The activity is now indexed and we're ready
to collect your input. Personally I am looking forward to read it (the feedback). Please
follow these steps to provide the feedback: access QuizSite, choose
dgerman-A348, then select Project.
You will find three questions.
The first one is asking you to select one of listed topics for your projects.
(Other is listed as an option). The second question is asking for clarifications, and
the last one is trying to collect even more feedback.
Please try to offer this feedback as soon as you can so we can discuss it in class.
Sat-Sun Sep 28-29
And here's the main Java sources thus far:
Fri Sep 27
(Check the
list
of topics for which we have default projects).
Thu Sep 26
frilled.cs.indiana.edu%ls -l
total 1
-rw------- 1 dgerman 762 Sep 28 00:19 One.java
frilled.cs.indiana.edu%cat One.java
import java.awt.*;
class One {
public static void main(String[] args) {
int a = 2, b = a;
System.out.println("a = " + a + ", b = " + b);
System.out.println("Now we change a...");
a = 3;
System.out.println("a = " + a + ", b = " + b);
System.out.println("... and that does not change b!\n");
Rectangle p = new Rectangle(5, 5, 10, 10), q = p;
System.out.println("p is equal to " + p + ",\n and q = " + q);
System.out.println("Let's change p (p.translate(-2, 4))...");
p.translate(-2, 4);
System.out.println("p is equal to " + p + ",\n and q = " + q);
System.out.println("... and that changes q, too!\n");
System.out.println("That's the difference between reference and " +
"primitive types in Java.");
}
}
frilled.cs.indiana.edu%javac One.java
frilled.cs.indiana.edu%java One
a = 2, b = 2
Now we change a...
a = 3, b = 2
... and that does not change b!
p is equal to java.awt.Rectangle[x=5,y=5,width=10,height=10],
and q = java.awt.Rectangle[x=5,y=5,width=10,height=10]
Let's change p (p.translate(-2, 4))...
p is equal to java.awt.Rectangle[x=3,y=9,width=10,height=10],
and q = java.awt.Rectangle[x=3,y=9,width=10,height=10]
... and that changes q, too!
That's the difference between reference and primitive types in Java.
frilled.cs.indiana.edu%
Wed Sep 25
Tue Sep 24(That was the helper, and now the big one).#!/usr/bin/perl print chr(61), " ", hex(26), " ", chr(hex(26));
#!/usr/bin/perl
&header;
if ($ENV{"REQUEST_METHOD"} eq "POST") {
read(STDIN, $input, $ENV{"CONTENT_LENGTH"});
} elsif ($ENV{"REQUEST_METHOD"} eq "GET") {
$input = $ENV{"QUERY_STRING"};
} else { print "Sorry."; &trailer; exit; }
@pairs = split(/&/, $input);
foreach $pair (@pairs) {
($name, $value) = split(/=/, $pair);
$value =~ s/%(..)/chr(hex($1))/ge;
$in{$name} = $value;
print "***($name)*** goes with ***(", $in{$name}, ")***<br>";
}
$program = $ENV{"SCRIPT_NAME"};
print qq{ $input <p>
<form action=$program method=POST>
Argument: <input type="text" name="arg" size=8> <p>
Function: <select name="fun">
<option value="non"> Click me!
<option value="add"> Deposit
<option value="sub"> Withdraw
</select> <p>
When done push <input type="submit" value="Proceed">
</form>
};
&trailer;
sub header {
print "Content-type: text/html\n\n<html>" .
"<head><title>CGI Processor</title></head><body>";
}
sub trailer {
print "</body></html>";
}
Mon Sep 23
Sat-Sun Sep 21-22
Fri Sep 20
Thu Sep 19Second program first, that keeps state:
#!/usr/bin/perl
print qq{Content-type: text/html\n\n<html>
<head><title>One</title>
<body>};
$me = $ENV{"SCRIPT_NAME"};
$what = $ENV{"QUERY_STRING"};
$number = $what + 1;
print qq{
You have accessed this page $number times.
<a href="$me?$number">Add One</a>
};
print qq{</body></html};
Then the first one, that uses a menu:
#!/usr/bin/perl
print qq{Content-type: text/html\n\n<html>
<head><title>One</title>
<body>};
$me = $ENV{"SCRIPT_NAME"};
$what = $ENV{"QUERY_STRING"};
# print $me, "<br>\n$what<br>\n";
foreach $x (keys %ENV) {
if ($x eq $what) {
print qq{<font size=+3>$x</font>}, " --> ", $ENV{$x}, "<br>\n";
} else {
print qq{<a href="$me?$x">$x</a>}, "<br>\n";
}
}
print qq{</body></html};
Wed Sep 18
Grades
posted, please use the next 7-10 days to make adjustments.
Tue Sep 17#!/usr/bin/perl
$acc = 0;
print "Welcome to the ATM! Your balance is $acc.\n";
print "Type something: ";
while ($line = <STDIN>) {
if ($line =~ /^bye$/i) {
last;
}
if ($line =~ /^add (\d+)/) {
$arg = $1;
$acc = $acc + $arg;
print "Your balance now is: ", $acc, "\n";
} elsif ($line =~ /^sub (\d+)/) {
$arg = $1;
$acc = $acc - $arg;
print "Your balance now is: ", $acc, "\n";
} else {
print "Perhaps you want to do something else.\n";
}
print "Type something: ";
}
Remember you can also find it here (log in as lbird/dribl).
Mon Sep 16
Sat-Sun Sep 14-15
Fri Sep 13A348-1324 (includes A548 students). Minute papers will be posted soon, notes for next week.
Thu Sep 12A unix quiz has been posted for your practice in QuizSite.
Wed Sep 11
Tue Sep 10chmod 711 ~ before turning in Lab One. Sketch of this week's notes (lab, lecture) posted.
Complete schedule of office hours has been posted last night.
Mon Sep 9Date: Mon, 9 Sep 2002 18:56:59 -0500 (EST) From: Adrian German <dgerman@cs.indiana.edu> To: Undisclosed recipients: ; Subject: Welcome to A348/A548 Fall 2002 Distribution List Dear A348 and A548 Friends, Greetings, and welcome to the class distribution list! I will be using this list throughout the semester to send announcements, short reviews and updates. Everything that is sent to this list will also be posted on the web site, under the "What's New?" heading. But by using this list I hope to get information across faster, when needed. I expect to use this list up to once a week, for messages which are short, such as this one. If you have dropped the class, or if you do not want your username to be on this list please let me know and I will update the list right away (simply reply to this message). Thanks and let us know when we can be of help. ... Adrian P.S. Office hours will be posted on the web site tonight, all usernames are now listed and have been granted access to open burrowww accounts and ports have now been assigned to all the usernames enrolled or auditing associated with the class. (The Students page is not in alphabetical order, though).
Please send
an e-mail message to
dgerman@indiana.edu
if you
Sun Sep 8
Everybody now has a burrowww account and a port assigned.
Sat Sep 7Also note that the labs on Thursday are now (both) in Swain East 140 (SE140).
Fri Sep 6The necessary info is somewhere on that page.http://kb.indiana.edu/data/aelc.html
Thu Sep 5
Make-up Lab on Saturday 10am-noon in LH115 for Gan's section.
Hope to see you there!
Wed Sep 4
Tue Sep 3Here's a link to a (basically) complete set of notes, as last taught (Summer 2002).
Mon Sep 2A348/A548