![]() |
![]() Fall Semester 2010 |
Fri Dec 10
Tue Dec 07Here 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
Thu Dec 02Here 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
Tue Nov 23
Fri Nov 19Basic 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 18Here are the steps for the first CakePHP project (more to come).
Wed Nov 17You 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
Thu Nov 11
Tue Nov 09
See the difference (it's all a rearrangement of if statements).
Sat-Tue Nov 6-9I am rewriting them now in a better format.
Fri Nov 05Today in lab:
Fri Oct 29Some questions forthcoming regarding these programs.
Thu Oct 28How would you implement something else in the same framework?
Tue Oct 26
Tue Oct 19
Tue Oct 12
Fri Oct 08The 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 05Grades for the exam taken today will be posted tomorrow.
Mon Oct 04
Appointment script loaded with two weeks worth of times available.
Fri Oct 01Side by side comparison of a development in CGI/Python and PHP.
Thu Sep 30It covers the entire semester so use it selectively to prepare for next week.
Tue Sep 28Don't forget we have Exams One and Two next week.
Fri Sep 24
Thu Sep 23
Tue Sep 21Older set of goals for where we are now.
Some notes that might be useful this week.
Fri Sep 17(Add 219 to your Apache port number to obtain your MySQL port number.)
Wed Sep 15#!/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 14Let's write three programs today:![]()
![]()
![]()
![]()
![]()
![]()
![]()
In the process let's remember:
Template:
Fri Sep 10
Thu Sep 09Notes from Tue to be posted soon.
Tue Sep 07Here's how your development might proceed.
Fri Sep 03In 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 02Two 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.