Fall Semester 2010

Office Hours


Fri Dec 10
Very basic Struts2 tutorial to get you started.

Tue Dec 07
Notes as written in class.

Here are three generic programs:

Copy the PHP code and change:

Adjust the printing to match the query.

Here's a simpler set of programs: one, two, three.

Fri Dec 03
Notes, as we wrote them in class today.

Thu Dec 02
Two chapters from a book also freely available from the publisher: one, two.

Here are two versions of a tutorial written by former A348 student Jimmy Denton.

Django installation steps (collection of slides)

Here's a Fall 2009 version of the same tutorial.

Here's the struts step of last time streamlined:
 1008  cd
 1011  mkdir struts
 1012  cd struts
 1013  ls
 1014  cp /l/www/classes/a348/sum2006/software/struts-2.0.14-all.zip .
 1015  unzip struts-2.0.14-all.zip
 1016  ls
 1017  quota -v
 1018  ls
 1019  cd struts-2.0.14/
 1020  ls

Mon Nov 30
Lecture notes as we wrote them in class today.

Tue Nov 23
This is how I completed the Chapter 3 project in the CakePHP book (code named: mooncake).

Fri Nov 19
Here's my 30 minute sketch of a deck distributing cards to two players.

Basic Java help in lab today.

Here's an example that you may find useful with the exam problem.

Another example (was given to you as reference yesterday).

Finally, check here under Tue Aug 10: a servlet. What does it do?

Thu Nov 18
Exam Five may continue tomorrow in lab.

Here are the steps for the first CakePHP project (more to come).

Wed Nov 17
Exam Five (last before the final) tomorrow in class.

You will need to write a JSP or a servlet from scratch.

It will be of choice what you develop (either JSP or servlet).

You will also have to put together (puzzle) a JSP or a servlet (the Flag Quiz).

We can discuss/adjust things in lab on Fri (if necessary).

Example developed last time:

Fri Nov 12
Lab Notes as developed in class.

Thu Nov 11
Exam Four in class today.

Tue Nov 09
The two scripts side by side:

See the difference (it's all a rearrangement of if statements).

Sat-Tue Nov 6-9
I almost finished the notes for this week's lab (CakePHP).

I am rewriting them now in a better format.

Fri Nov 05
The code we developed yesterday in class.

Today in lab:

Fri Oct 29
Install and run this program. Same about this one.

Some questions forthcoming regarding these programs.

Thu Oct 28
Install and run this program then carefully ponder how it works.

How would you implement something else in the same framework?

Tue Oct 26
Notes as we wrote them today in class.

Tue Oct 19
The practice exam and its solution.

Tue Oct 12
Compendium of useful information for the third exam.

Fri Oct 08
Today's notes as written in class.

The basic information about the exam on Thu is captured in this document.

Here's information on how you can write Hangman with server side state in CGI/Python.

Tue Oct 05
Here's the promised slides for Thursday's exam.

Grades for the exam taken today will be posted tomorrow.

Mon Oct 04
Appointment script loaded with two weeks worth of times available.

Fri Oct 01
The promised slides from lab today. Thanks to Jake for his help!

Side by side comparison of a development in CGI/Python and PHP.

Thu Sep 30
Study guide for Tue and Thu (with answers).

It covers the entire semester so use it selectively to prepare for next week.

Tue Sep 28
Code developed in class today available here.

Don't forget we have Exams One and Two next week.

Fri Sep 24
Slides for the lab today.

Thu Sep 23
Programs developed in class today:

Tue Sep 21
Notes for today

Older set of goals for where we are now.

Some notes that might be useful this week.

Fri Sep 17
Notes for today's lab.

(Add 219 to your Apache port number to obtain your MySQL port number.)

Wed Sep 15
What we did yesterday:
#!/usr/bin/python

print "Content-type: text/html\n"

d = { "jacohend" : "Jacob", \
      "dgerman"  : "Adrian", \
      "agmyers"  : "Andrew",  \
      "mkdavids" : "Mike",     \
      "dnate"    : "Dan",       \
      "cwheikki" : "Chris",      \
      "linji"    : "Jason",       \
      "jfarny"   : "Jake"          }

import random

users = ( "jacohend", "dgerman", "agmyers", \
          "linji", "mkdavids", "dnate",      \
          "cwheikki", "jfarny") 

picture = random.choice(users)
username = picture

name = d[username]

print """
  <img src="http://www.cs.indiana.edu/classes/c212/fall2010/images/%s.jpg"> <p>
  %s (%s) <p>
""" % (picture,name,username)
This was one program, and here's the second one:
#!/usr/bin/python

import cgitb
cgitb.enable()

import cgi
data = cgi.FieldStorage()

if data.has_key("index"):
  index = data["index"].value
  index = index + 1
else: index = 0

print "Content-type: text/html\n"

d = { "jacohend" : "Jacob", "dgerman" : "Adrian", "agmyers" : "Andrew", "mkdavids" : "Mike", "dnate" : "Dan", "cwheikki" : "Chris", "linji" : "Jason", "jfarny" : "Jake" }

import random

users = ( "jacohend", "dgerman", "agmyers", "linji", "mkdavids", "dnate", "cwheikki", "jfarny" ) 

picture = users[index]
username = picture
name = d[username]

print """
  <img src="http://www.cs.indiana.edu/classes/c212/fall2010/images/%s.jpg">

  <form>
    <input type="submit" name="action" value="previous" />
    <input type="submit" name="next" value="next" />
    <input type="hidden" name="index" value="%s" />
  </form>

  %s %s
""" % (picture, index, name, username)
The second one crashes on the addition of 1 to index (which is of type string).

We need to fix it and move on, like this.

Tue Sep 14
Here are some pictures:
Let's write three programs today:

  1. one that pulls out a random picture and shows it
  2. another one that displays one picture at a time, exhausting them in random order
  3. the other one that enhances the second by asking for the name and grading your answer

In the process let's remember:

Template:

Fri Sep 10
Here are the notes as developed in lab today.

Thu Sep 09
Notes as we developed them in class today.

Notes from Tue to be posted soon.

Tue Sep 07
Let's review Python by developing a simple Hangman game.

Here's how your development might proceed.

Fri Sep 03
Documentation about CGI/Python can be found here.

In lab today:

12001 12002 Davidsen , Michael Kennedy    , mkdavids, 9643
12003 12004 Farny    , Jacob C            , jfarny  , 9721
 8546  8646 German   , Dan-Adrian         , dgerman , 8346 
12007 12008 Heikkinen, Christopher William, cwheikki, 9648
12009 12010 Henderson, Jacob Michael      , jacohend, 9700  9919
12011 12012 Myers    , Andrew Glen        , agmyers, 9634  9853
12013 12014 Nate     , Dan Patrick        , dnate, 9694
12015 12016 Lin      , Jia-Sheng          , linji , 9991  10282

Thu Sep 02
Here's the list of students and ports.

Two things we will go over in class today:

Here's the text from which I gave you pages last time.

Here's our class description in the Registrar's pages.


Updated by Adrian German for A348/A548