Lab Assignments

Lab 3

Find a number consisting of 9 digits in which each of the digits from 1 to 9 appears only once. This number must also satisfy these divisibility requirements:

  1. The number should be divisible by 9.
  2. If the rightmost digit is removed, the remaining number should be divisible by 8.
  3. If the rightmost digit of the new number is removed, the remaining number should be divisible by 7.
  4. And so on, until there's only one digit (which will necessarily be divisible by 1).

Lab 2

In this assignment you are to create a Shell Script that executes via a CGI call. To do so, create a file named 'ParseQueryString' in your CGI-BIN directory with the following contents:

#!/bin/bash
echo "Content-type: text/html"
echo ""

echo "<HTML><HEAD><TITLE>test page"
echo "</TITLE></HEAD><BODY style='font-size: 20px;'>"
echo "Hello there, there current date and time is: $(date)"
echo "<p>"
echo "You passed in the following Query String: <span style='font-weight: bold; color: blue;'> $QUERY_STRING </span>"
echo "</p>"
echo "</BODY>"
echo "</HTML>"

Next, create a homework5 directory in your public_html directory. Then, setup the Website contained in this zip file. An example of what your site should look like can be found here.

Finally, submit form data from the site that you just setup. Pay close attention to the output of the shell script. Notice that the Query String is a parameter/value pair separated by an equal sign. In this assignment you are to parse the parameter name and value from the Query String and display the requested results. The results will be pulled from your MySQL database. To do this, you must submit all form data to your personal 'ParseQueryString' script (not the script located under /~acervantes/).

Your output should be formatted using XHTML tags. Consider using pre-formatted text when displaying results from a query.


Submit your ParseQueryString script along with any other scripts that you used to generate the output specified to CSNS. Also, include an Assignments.html file that links directly to your working index.html page on the CS1 server.

For example, if your username is cs345s35 you would create the following Assignments.html file:

<html>
<head>
<title>CS345 Assignments - John Doe</title>
</head>
<body>
<a href="http://cs1.calstatela.edu:8280/~cs345s35/homework5/">Homework 5</a>
</body>
</html>

May 15, 2010 - 11:00am

Lab 1

Throughout the quarter I may need to contact you regarding assignment updates, class meetings, and other important subject matter. To do so I will send out e-mails as well as post updates to our Class Website. To facilitate the e-mail contact you are required to submit a valid e-mail address to the Class Roster Website. This should be an e-mail address that you check regularly.

The Class Roster Website also allows you to specify whether you would like to be included in a distributed class roster. If so, you have the option of including your e-mail address and/or telephone number. Note that only the students who opt to include their information on the list will receive a copy of the course roster. Students who do not wish to include their information will not receive a copy. The copy will not be available for download via the Course Website. Instead, it will be distributed via e-mail. You are not required to participate in the class roster, but you are required to completely fill out the form. All fields are required unless otherwise specified.


Grading

(10 pts) - Class Roster

April 3, 2010 - 1:00PM

Announcements

NOTE Announcements regarding lab assignments will appear here.