Contact Information:Mr. Brennan
E-mail:JBrennan@isbos.org
Cell:(617) 872-2932
Skype ID:hwmath.jim

Trimester II Modular Programming

Agendas

DateTopics/Activities
Tuesday
March 29
    Starters
  • Collect Homework (finishing classwork from Friday)
  • Quiz
    Main Activity
  • Reengineer Gradebook / Assignment Struct
      Files
    1. District/School
    2. Student
    3. Teacher
    4. Assignment
    5. Grade
    6. Department
    7. Course
    8. Meeting Time
    9. Class Lists
  • Parameter Passing
    some options: link file, field command line arguments, record data
  • Forms, Programs, Database

    Assignments
  1. Image file project deliverable next Friday April 1
  2. Image file project class presentations on Tuesday April 5.
  3. Past Due Assignments (References):
Thursday
March 24
    Starters
  • Review homework fTOCgrades.c (Version 1 and 2)
  • Warm-up: Tracing programs, processing command line arguments
    Main Activity
  • Introduction to the Image Processing Project - investigating image file formats.
  • Design Considerations for a GradeBook Database System, how we go from a single incomplete file structure to an operational (online) grade book system.
  • Connections from the grade book system to any other relational system

    Assignments
  1. Be prepared for a quiz on any of the basic file operations
  2. Image file project deliverable next Friday April 1
  3. Image file project class presentations on Tuesday April 5.
  4. Past Due Assignments (References):
  5. Read your reference for fread, fopen, fclose, fwrite, fseek and ftell.
  6. Organize examples of fread, fopen, fclose, fwrite, fseek, ftell.
  7. Add a call to ftell to one of your programs that processes files of structures (Such as fTOCgrades.c)
  8. Be ready for a file processing quiz on Thursday or Friday
Friday
March 25
    Starters
  • Overview: "Assignment System"
    Main Activity
  • File Processing Lab 4 - creating an output file from command line data
    some options: link file, field command line arguments, record data

    Assignments
  1. Complete lab 4 - it will be collected twice,
    At the end of class today and form last time on Tuesday March 29 at 8:00. All programs must be available on the workspace I shared with you on Cloud 9.
  2. Be prepared for a quiz on any of the basic file operations
  3. Image file project deliverable next Friday April 1
  4. Image file project class presentations on Tuesday April 5.
  5. Past Due Assignments (References):
  6. Read your reference for fread, fopen, fclose, fwrite, fseek and ftell.
  7. Organize examples of fread, fopen, fclose, fwrite, fseek, ftell.
  8. Add a call to ftell to one of your programs that processes files of structures (Such as fTOCgrades.c)
  9. Be ready for a file processing quiz on Thursday or Friday
Thursday
March 24
    Starters
  • Review homework fTOCgrades.c (Version 1 and 2)
  • Warm-up: Tracing programs, processing command line arguments
    Main Activity
  • Introduction to the Image Processing Project - investigating image file formats.
  • Design Considerations for a GradeBook Database System, how we go from a single incomplete file structure to an operational (online) grade book system.
  • Connections from the grade book system to any other relational system

    Assignments
  1. Be prepared for a quiz on any of the basic file operations
  2. Image file project deliverable next Friday April 1
  3. Image file project class presentations on Tuesday April 5.
  4. Past Due Assignments (References):
  5. Read your reference for fread, fopen, fclose, fwrite, fseek and ftell.
  6. Organize examples of fread, fopen, fclose, fwrite, fseek, ftell.
  7. Add a call to ftell to one of your programs that processes files of structures (Such as fTOCgrades.c)
  8. Be ready for a file processing quiz on Thursday or Friday
Tuesday
March 22
    Starters
  • Review homework fgrades.c (Version 3 and 4)
    Main Activity
  • Introduction to file formats - beyond the file extensions
    Example Image File Formats
  • Gain additional experience using networked resources (handout)
  • Expand fgrades.c program continuing an introduction to file processing using C in a Linux environment. File processing documentation will be handed out, along with class assignment.

    Homework: Due Thursday
  1. Complete fTOCgrades.c versions 1 and 2
  2. References:
  3. Read your reference for fread, fopen, fclose, fwrite, fseek and ftell.
  4. Organize examples of fread, fopen, fclose, fwrite, fseek, ftell.
  5. Add a call to ftell to one of your programs that processes files of structures (Such as fTOCgrades.c)
  6. Be ready for a file processing quiz on Thursday or Friday
Friday
March 18
    Starters
  • Review homework fgrades.c (Version 1 and 2)
    Main Activity
  • Gain additional experience using networked resources (handout)
  • Expand fgrades.c program continuing an introduction to file processing using C in a Linux environment. File processing documentation will be handed out, along with class assignment.

    Homework: Due Tuesday
  1. Complete fgrades.c Version 3 if you were not able to complete it during class
  2. Complete fgrades.c Version 4 if you were not able to complete it during class
  3. Bookmark C references for fread, fopen, fclose, fwrite, fseek and ftell.
Thursday
March 17
    Starters
  • Review homework grades.c (ouch)
    Main Activity
  • Gain some experience using networked resources (handout)
  • Expand grades.c program to fgrades.c as an introduction to file processing using C in a Linux environment. File processing documentation will be handed out, along with class assignment.

    Homework: Due Friday
  1. Complete fgrades.c Version 1 if you were not able to complete it during class
  2. Complete fgrades.c Version 2 if you were not able to complete it during class
  3. Bookmark C references for fread, fopen, fclose, fwrite, fseek and ftell.
Tuesday
March 15
    Starters
  • Review homework status Tic-Tac-Toe Project
    Main Activity
  • Review Tic-Tac-Toe Status
  • Demo Tic-Tac-Toe game
  • Review structure of tic-tac-toe game
  • Introduce struct and typedef and enum Structures.pdf
  • Class work in the workspace I shared with you individually, create program gradebook.c
  • Use struct and typedef and enum from class, create a program that creates an array of up to 10 grade records and writes them to a file.

    Homework: Due Thursday
  1. Read through the Structures.pdf
    There are a few steps we didn't get to complete. The pdf has some examples and practice exercises.
  2. Use the workspace I shared with you individually, create program gradebook.c
  3. Complete the grades exercises
  4. (I suggest strongly that you read both of these web pages)
Friday
March 11
    Starters
  • Collect/Post Homework
    Main Activity
  • Assign components of tic-tac-toe game
    tic-tac-toe.pdf
  • Discuss project methodology/testing
  • Take notes and understand your responsibilities
    Homework:
  • Complete the programming and testing of your tic-tac-toe module
  • Complete testing of one other module assigned in class
  • You must add a comments to the project management discussion group tic-tac-toe class project
    1. First - when you have completed your module and you have tested it, and it is ready for someone else to test
    2. Second - when you have completed testing someone eles's code and have sent them a comment with the results. Update this as many times as needed until the module works. Keep us updated.
Thursday
March 10
    Starters
  • Do we really need a lecture (or speech) about the convert libraries?
    Main Activity
  • C Two-dimensional Arrays two-D-Arrays.pdf
  • Creating a multiplication table
    Summary:
  • Tic-tac-toe
    Homework:
  • Write an algorithm for playing tic-tac-toe and imagine all of the steps to implement a two-player game in C, using a command line interface. Consider how players will make moves, checking for legal moves, deciding when someone wins, what a board looks like, how in initialize it, how to print it out...what other considerations should a game include?
Tuesday
March 8
    Starters
  • Review grades and assignments
    Main Activity
  • Topic: HTML Links
    • To resources on other web sites
    • To resources on the same web site, other directories
    • To resources in the same directory
    • To resources in the same html page
  • Introduction to Client-Server form processing
  • Introduction to Objects
  • The Document Object Model
  • Introduction to JavaScript
    Homework:
  1. Review possible events on W3Schools.com>Events that can be processed using Javascript
Friday
March 4
    Starters
  • Another chance of tracing C programs to improve the C test grade
    Main Activity
  • Use the HTML form from Quiz #2 and connect it to mycalc.php
Thursday
March 3
    Starters
  • Review agenda for today
    Main Activity
  • Test C - Programming: command line arguments, tracing C programs
  • Quiz #2 HTML
    • Draw a screen to calculate values given two numbers
    • Supply the HTML to implement the calculator screen
    • Implement the HTML using a real form
      Homework:
    1. Complete HTML Quiz 2 for Homework
Tuesday
March 1
    Starters
  • HTML Quiz #1 corrections/incorrections
    Summary:
      Schedule:
    • C Test Thursday - command line arguments, tracing programs
    • Completing all work assignments from Trimester 2
    • HTML Quiz#2 - Thursday or Friday
    Homework:
  1. Create an html document that looks similar to My HTML Files
Thursday
February 25
    Starters
  • HTML Quiz #1
    Main Activity
  • HTML Form processing
  • Calling PHP programs
  • Form01.html - practice form calling prog0.php
    Summary:
  • Form elements: form, input types: text, checkbox, radio, subbit; textareas
    Homework:
  1. Create an html form that will call quad.php which will be provided.
  2. Your form should include text areas for a user to enter a, b, and c for a quadratic equation ax2 + bx + c
  3. Include a submit button
  4. Add other features that make the screen the way you would want any screen to look like for a real world application.
  5. This is due on Tuesday
Tuesday
February 23
    Starters
  • Networking topics, IP addresses, ports
    Main Activity
  • HTML Form processing
  • Calling PHP programs
  • Form01.html - practice form calling prog0.php
    Summary:
  • Form elements: form, input types: text, checkbox, radio, subbit; textareas
    Homework:
  1. Create an html form that will call quad.php which will be provided.
  2. Your form should include text areas for a user to enter a, b, and c for a quadratic equation ax2 + bx + c
  3. Include a submit button
  4. Add other features that make the screen the way you would want any screen to look like for a real world application.
  5. This is due on Thursday
Friday
February 12
    Starters
  • Outline todays activities - creating files
    Main Activity
  • Implement functions on prthtml.c
  • Test all functions of prthtml.c using a driver program
  • Update quad.c to accept a new parameter -h
      When a user specifies -h the quadratics program should send the output in html form, at a minimum this means:
    • Send the html header - with a title
    • send the body tag
    • send the output of the quadratic equation and the result - display the output nice - the way you would want to see it on a screen
    • send the end tag for body and html
    Summary:
  • Next steps for how the piece fit together
    Homework:
  1. Have a save vacation week - be smart at all times.
Thursday
February 11
    Starters
  • Preview of today's activities, homework that is due
    Summary:
  • Networking Concepts
    Homework:
  1. Complete HTML Lab-4 - all components.
Tuesday
February 9
    Starters
  • Review HTML Tags that we have used so far
    Main Activity
      Homework Check - verifying is_functions from my_lib_1.c
    • All of the functions should accept a string as a parameter
    • All of the functions should return a boolean variable, true or false
    • None of the functions should prompt the user for any values
    • my_lib_1.c should compile
    • You should have a driver program named test_my_code.c and it shoulc be compiled and linked with my_lib_1.o to create a program named ./testit
    • You should validate that each function should return true when it should, and return false when it should.
    • You have verified that your partners program also works exactly as stated above for all test case.
    • Turn in paper at the end of the period

    Summary:
  • Review command line arguments
    Homework:
    Due Thursday
    • Change your quad.c program as follows:
    • check for command line parameters -a to accepts a as a command line parameter.
    • check for command line parameters -b to accepts b as a command line parameter.
    • check for command line parameters -c to accepts c as a command line parameter.
    • If any command line parameters are entered by the user, then do not prompt the user for any values of a, b, or c.
    • The parameters for a, b, and c can be specified in any order, such as
      ./quad -a 1 -b 2 -c 4
      ./quad -b 2 -c 4 -a 1
    • Add another option -d which will display a list of all of the command line parameters that your program received; use any of the print_args functions you have seen or create a new one.
Thursday
February 4
    Starters
  • Return tests
  • Review Args assignment due next Tuesday
    Main Activity
  • HTML Day 2
  • Number Conversion Project corrections and responsibilites
    Summary:
  • Processing command line arguments
  • Using header files
    Homework:
  1. complete Args assignment - creating libraries to print command line arguments
  2. Fix the is_functions in your my_lib_1.c file and test them using a driver program named test_my_code.c complied as ./testit
Tuesday
February 2
    Starters
  • Introduction to Unit-2 Topics in C and HTML
    Summary:
  • Reviewing the list of HTML tags from today
    Homework:
  1. Complete todays C activity and HTML activity


C Programming

TOPIC: Key Concepts
Concept:1.Introduction to C Programming
TopicReference TypeReference Link
Simple main program Example circle.c
User-defined Identifiers
    What is a user-defined identifier?
    Answer: When we are naming variables and function and choosing our own names we are using user-defined identifiers. Sample variables that we have user are i, j, k, ch, str, ret and some function names that we have created include len, is_bool, bin2hex. Here are the rules for creating identifiers:
  1. Identifiers may contain only letters, numbers, and underscores.
    Commonly an identifier in all UPPERCASE letters will indicate a preprocessor identifier, such as PI, or a variables whose value does not change.
  2. An identifier can not begin with a digit (0-9).
  3. C has many reserved words that can not be identifiers, such as if, int, double, return.
  4. An identifier such as scanf, printf or other identifiers defined in the C standard library should not be redefined; they could be, but it is not good programming practice.
  5. As a guideline, keep identifier names shorter that 32 letters; some compilers may allow longer identifier names, others compilers may only use the first 31 letters for identifying unique identifiers which may lead to undesired consequences,
Using comments Example circle.c
Calculating the area of a circle Example circle.c
Cloud9 Introduction Lab-1.pdf
Integrated Development Environment (IDE) Example Lab-1.pdf
Tracing a program Example Tracing_C_Programs-1.docx
Example Tracing_C_Programs-2.docx
Concept:2.The Edit-Compile-Link-Execute Process
TopicReference TypeReference Link
Notes about the compile, link, execute process Tutorial, vocabulary to know about compiling and linking a prgram. File: Vocabulary-Creating-a-C-Program.pdf
Concept:3.The Preprocessor (#include, #define)
TopicReference TypeReference Link
Using a preprocessor variable Example circle.c
System Include File
<stdio.h>
Summary This is the most common include file; it contains declarations (prototypes) for the basic input and output functions and common C functions such as printf, scanf, and getch .
System Include File
<string.h>
Example string_functions.pdf
C Preprocessor Tutorial c_preprocessors.htm
C Preprocessor Tutorial gcc.gnu.org
System Include File
<stdbool.h>
Example mrb_lib_1.c
Concept:4.User Input and Output
TopicReference TypeReference Link
printf format strings Presentation by Example demo_vars.docx
Prompting the user for input Example circle.c
Reading real numbers (double) from the terminal Example (using scanf) circle.c
Concept:5.Variables
TopicReference TypeReference Link
C Variables Tutorial c_variables.htm
Declaring an array of characters Example string_functions.pdf
Declaring pointers to an array of characters Example echostring.pdf
Calculating the area of a circle Example circle.c
Type Casting Tutorial c_type_casting.htm
Declaring variables Presentation by Example demo_vars.docx
Declaring integer variables Presentation by Example demo_vars.docx
Declaring character variables Presentation by Example demo_vars.docx
Declaring variables for character arrays Presentation by Example demo_vars.docx
Declaring double variables Presentation by Example demo_vars.docx
Concept:6.Conditional Programming
TopicReference TypeReference Link
Nested If Statement Example string_functions.pdf
switch Statement Example string_functions.pdf
The switch Statement Presentation switchStatement.pdf
Nested if statement Example switchStatement.pdf
Concept:7.Loops
TopicReference TypeReference Link
for loop Example string_functions.pdf
for loop Example mrb_lib_1.c
for loop Example Tracing_C_Programs-2.docx
while Loop Example Tracing_C_Programs-1.docx
while loop Presentation by Example demo_vars.docx
Concept:8.Strings
TopicReference TypeReference Link
String Concatenation Description, examples, lab hints string_functions.pdf
Terminating the end of a string Exampleechostring.pdf
Functions returning a pointer to an array of characters (string) Definition, how toechostring.pdf
Display a string and each byte position (print_string)Examplemrb_lib_1.c
Function: strtok
Parsing strings using delimiters
Examplestrtok.pdf
Testing if a string contains all binary characters (is_binary)Examplemrb_lib_1.c
Testing individual string positions for specific valuesExamplestring_functions.pdf
strcat
Concatenating one string onto the end of another.
ExampleTracing_C_Programs-1.docx
Reversing a stringExampleTracing_C_Programs-1.docx
len function ExampleTracing_C_Programs-1.docx
Capitalize the first letter of every word in a string. Example Tracing_C_Programs-2.docx
Concept:9.Functions
TopicReference TypeReference Link
Functions Examples echostring.pdf
Returning a pointer to an array of characters (string) from a function Definition, how to echostring.pdf
malloc, Using Example echostring.pdf
Returning a Boolean value from a function Example mrb_lib_1.c
len function Example Tracing_C_Programs-1.docx
void function Example Tracing_C_Programs-1.docx
Concept:10.File Input and Output
TopicReference TypeReference Link
File I/O Topics have not yet been covered in C

Concept:11.Other References
TopicReference TypeReference Link
ASCII Chart Reference ASCII Chart

Concept:12.Testing
  • Unit Testing develops a test plan for individual program modules. Test data should execute each possible branch of program processing.
  • System Testing develops a test plan to exercise each program module.
  • Alpha Testing usually refers to system testing performed by the developers. Additional information.
  • Beta Testing usually refers to system testing by real users, but in a test enviornment not in a production environment. Additional information
  • Addional types of testing: Functional testing, non-functional testing, stess testing / load testing, change-related testing, time-based testing.Addional information

Activities
Lab 0 circle.c
  • Program Purpose: accepts the radius of a circle, calculates the area, and outputs the radius and the area
  • Demonstrates printf to send a prompt to the user
  • Demonstrates the use of scanf to read in the radius of a circle as a floating point number
  • Demonstrates double arithmetic
  • Demonstrates using printf to send a messages and double values to the user
  • Demonstrates using a #define variable constant (PI)
  • Lab 1 Instructions
Lab 1 Modular Programming: bin2dec()
    Objective: to create separately compiled modules and then link them together to create an executable file that will convert a binary string entered by the user to a decimal number
    Files:
  • mrb_lib_1.c
  • lab_1.c
  • Lab_1.pdf
Lab 2 Part I Building a Number Conversion Libary
    Creating my_lib_1.c
  • is_decimal()
  • is_octal()
  • is_hex()
  • You can move in is_binary() from previous work
  • Compiling, linking, and testing using a driver program
  • File: Lab_2_Part_1.pdf
Lab 2 Part II Building a Number Conversion Libary
    Adding in functions:
  • char *dec2bin(char s[])
  • char *hex2bin(char s[])
  • char *octal2bin(char s[])
  • Use program lab_2.c as a driver for Compiling, linking, and testing
  • File: Lab_2_Part_2.pdf
Numeric Conversion Project Turning Lab 2 into a Numeric Conversion Project
  • File: Lab_2.pdf
  • C module my_lib_1.c and header file my_lib_1.h
  • Partner 1 C module : my_lib_2.c and header file my_lib_2.h
  • Partner 2 C module : my_lib_3.c and header file my_lib_3.h
  • Creating a menu interface for converting beteen number systems
  • Creating a command-line interface for converting between number systems
Numeric Conversion Project Wrapping Up the Project
Exercises Tracing C Programs
Demonstration Declaring and using variables
  • Declaring variables, and providing an initial value
  • Using printf with multiple data types
  • Using logical operators (if statements)
  • How character arrays are terminated
  • File: demo_vars.docx
Demonstration Modular programming
    Topics
  • header files
  • object files
  • linkking object files
  • Keeping a list of functions that you have used
    File: Functions (handout) Additional blank forms
Demonstration echostring
    Tracing a program
  • using malloc to allocate memory to hold a string
  • passing arrays of character to a function
  • Returning a pointer (address) to a character array from a function
  • File: echostring.pdf
Presentation String Functions
Demonstration Command Line and Menu Interface
  • Demonstrating using a menu for the Numeric Conversion Project
  • Demonstrating the command line interface for the Numeric Conversion Project
  • Video: convert.wmv
Demonstration Sharing a Cloud9 Workspace
Presentation The switch Statement
Links to Resources Primary Site: HWMath.net/IBCS
Homework 1: is_binary and binary-2-decimal
    Write an algorithm using pseudocode or a flow chart that will :
    1. Prompt the user to enter a binary number (read this in as a string)
    2. Validate that the string the user typed in only contains 1s and 0s
    3. Outputs the decimal value of the string entered by the user.
        Examples:
      • Input: 110      Output: 6
      • Input: 0000000000000110      Output: 6
Homework 2: quad.c
    Write a C program to calculate the roots of a quadratic function
  • Create a new workspace on C9.io named projects
  • Add a new file named quad.c
      Write a program that will
    1. prompt the user for three integers a, b, and c representing a quadratic function ax2 + bx + c
    2. calculate the roots
    3. be sure to perform input validation, let the user know when there will be only one root (and tellthem the root) and display both resultes where there are two roots.
    4. This should be a conversion of your BASIC program or the one from the TI84.
    5. Add a loop to continue prompting the user until they enter -1 -1 -1 or some other way for them to tell you they want to end the program.
  • From the C9.io Window menu, select Share and share this with
    C9 username: mrbrennan or email: jbrennan@isbos.org
Homework #3 Complete the Numeric Conversion Program
  1. Work with your partner to complete the Menu Interface to the Convert Project
  2. Work with your partner to complete the command line interface to the Convert Project
  3. Make a complete list of C topics that have been covered during this project. Name at least 20 things that you have learned about C or that someone else would need to learn about C in order to complete this project. Have this list typed up and ready to turn in on Thursday Jabuary 21.
Homework #4 User-Defined Identifiers
Homework #5 Generating Random Numbers
  • Write a program to generate random numbers
  • Other tasks and questions to be answered for review and practice
  • File: HW-ProgReview01.pdf
Homework #6 C Programming Skills Inventory
C Quiz #1 Selected C Topics
C Quiz #2 Selected C Topic
C Quiz #3 User-Defined Identifiers
Quiz Tracing Programs
Test C Programming All topics covered so far
  • Declaring and using variables
  • Basic arithmetic operations
  • Creating and using functions
  • Basic console input and output operations
  • Basic control program structures (if, while, for, switch)
  • Writing algorithms using pseudo code/flow charts, converting them to C programs
  • The program generation process, edit, compile, link, execute
  • Basic program-operating system interaction
  • Question Bank for the C Test on Thursday (no longer available)

File List

File List


Linux

The Linux Operating System: Key Concepts
Concept:1.Compiling a program
  • gcc file1.c: Compiles source file file1.c and creates executable file a.out.
  • gcc -c file1.c: Compiles source file file1.c and creates an object file file1.o which is not an executable proram.
  • gcc file2.c file1.o: Compiles source file file2.c and links it with object file file1.o to create an executable file a.out.desc
Concept:2.Basic Linux Commands (group 1)
  • pwd: displays the name of the current working directory (print working directory)
  • ls: lists the files in the current directory
  • ls -l : list the files in the current directory - using the long list format that will include file permissions and data and time stamps.
  • ls -lrt: list the files in the current directory using the long list format (-l) and will display the names in reverse (-r) chronological order (-t)
  • ls *.c : list all of the files that end with .c
  • ps: process status: shows a list of running processes
  • mkdir backup: makes a directory named backup that will be a subdirectory of the current working directory.
  • cp *.c backup: copies all files that end with .c into a subdirectory named backup.
  • cd backup: changes the current working directory to a subdirectory named backup.
  • cd  .. : changes the current working directy to the parent of the current directory.
Concept:3.Basic Linux Commands (group 2)
  • cal: displays a calendar of the current month.
  • cat lab_1.c: displays the contents of file lab_1.c
  • clear: clears the current screen, brining the cursor to the top left of the window.
  • echo computer science: the echo command repeats its parameter to the console. In this case the output string "computer science" will be sent to the console, without the quotes.
  • env: Displays a list of environment variables that have been set for your session. This will include lists of directories to search when you issue a command, information about the terminal you are using, information about the bash shell you are using, and more information that supports your session.
  • history: displays a list of recently executed bash commands
  • more lab_1.c: displays the contents of file lab_1.c one page at a time
  • man more : displays the help page for the more command. man is short for manual, when you need help with a linux command, try using the man pages.
  • man man: displays the help page for the man command.
  • cp lab_1.c TestCopy.c
    mv TestCopy.c test_move.c: makes a copy of the file lab_1.c named TestCopy.c and then renames the copy to test_move.c.
Concept:4.Running a Program
  • ./a.out: executes program a.out which is located in your current working directory.
  • a.out: executes a program named a.out that is anywhere in your search path.
  • which a.out: displays the path name for a.out, this is good when you have a long search path and there could be more than one program with the same name. This command will tell you which program named a.out will be executed.
Concept:5.Lunix Command Group 3
    (taken from Linux Lab 2)
  • bash: Is one of the many command shells available in Linux, and the one used by the Cloud 9 Integrated Development Environment
  • sed: a stream editor, processes text editing on input files
  • cut: parses text input files based on field delimiters or character positions
  • wc: counts lines, words of a text file
  • head: displays the fist n lines of a text file, n = 10 by default
  • tail: displays the last n lines of a text file, n = 10 by default
  • sort: sorts the contents of a text file
  • uniq: removes duplicate lines from a sorted text file
  • hexdump: displays the hexadecimal values for the contents of an input file
  • od: displays the octal values for the contents of an input file

Activities
Homework #1
Linux Lab #1
Linux Commands
    Running basic Linux commands in the bash shell and recording output.
    Figuring out what Linix commands can do.
  • File: Linux_basic-1.pdf
Linux Lab #2 Using Linux Commands to process program output
    Using the following Linux commands:
  • bash
  • sed, grep
  • cut, tee, wc
  • head, tail, sort, uniq
  • hexdump, od
  • File: Linux-Lab-2.pdf
Reference Using the stream editor: sed
Assessment #1 Linux Quiz #1
Assessment #2 Linux Quiz #2
    Quiz using the following commands:
  • bash
  • sed, grep
  • cut, tee, wc
  • head, tail, sort, uniq
  • hexdump, od

File List

File List


HTML

TOPIC: Key Concepts
Basic HTMLDocument Structure
HTML Tags Example

<html>
<head>
<title>Title for top menu bar </title>
</head>
<body>
Main Content
</body>
Simple Content Formatting
HTML Tags   Example
  <h1>Header one</h1>    

Header one

 
  <h2>Header Two</h2>    

Header Two

 
  <h3>Header Three</h3>    

Header Three

 
  <h4>Header Four</h4>    

Header Four

 
  <h5>Header Five</h5>    
Header Five
 
  <h6>Header Six</h6>>    
Header Six
 
  Normal size text     Normal size text  
  <u>Underlined Text</u>     Underlined Text  
  <b>Text that is Bold</b> and text that is not bold   Text that is Bold and text that is not bold  
  <i>Text is italics </i>     Text is italics  
  A hard rule <hr> is a horizontal line    A hard rule
is a horizontal line  
The FONT tag The font tag can be used to set the color of text using the color option. Color may be specified using many defined text-colors such as red
HTML Tags   Example
<font color="red">This text will be red</font>
or may be specified using a tripple of rgb hex-pairs to specify an amount of red, green, and blue.
<font color="#5566AA">This as "55" red, "66" green, and "AA" blue </font>
This text will be red
or may be specified using a tripple of rgb hex-pairs to specify an amount of red, green, and blue.
This as "55" red, "66" green, and "AA" blue

The font tag can also be used to set size of the font, either to a more absolute pt size or a size relative to the default point size. tr>
HTML Tags   Example
This is a normal size font and this <font size=+2> text is +2 bigger</font>
This is a normal size font and this text is +2 bigger
This is a normal size font and this <font size=-2> text is -2 smaller</font>
This is a normal size font and this text is -2 smaller

The font tag has additional options; once you reach a certain point with HTML development you will want to use style sheets instead of many of the html tags.
Basic TABLEs A Table can be created using the <table> and </table> tags. Each row begins with <tr> and ends with a </tr> tag. Each row is made up of one or more columns using the <td> and </td> tags. This is an example of a one-row, two-column table:
HTML Tags   Example
<table border=1>
<tr><td>Row one, column 1</td>
     <td>Row one, column 2</td>
     </tr>
</table>
Row one, column 1 Row one, column 2


Table headers can be specified using <th> and </th> tags instead of <td> and </td> tags. Generaly the text between the <th> and </th> tags will be displayed as bold and centered. This is an example of a two-row, three-column table using table headings.
HTML Tags   Example
<table border=1>
<tr><th>Heading for Column 1</th>
      <th>Heading for Column 2</th>
     <th>Heading for Column 3<</th>
      </tr>
     <td>Data col two</td>
     <td>Data col three</td>
     </tr>
     <td>More data col two</td>
     <td>More data col three</td>
     </tr>
</table>
Heading for Column 1 Heading for Column 2 Heading for Column 3
Data col one Data col two Data col three
More data col one More data col two More data col three


There are additional table options, such as setting a table to have no border: <table border=0> or a thicker border <table border=4>.


Columns can be combined using the colspan=2 option, as shown below:
HTML Tags   Example
<table border=1>
<tr><th>Heading for Column 1</th>
      <th>Heading for Column 2 </th>
     <th>Heading for Column 3 </th>
      </tr>
<tr><td>Data col one</td>
     <td colspan=2>Data col two spanning into col 3 </td>
     </tr>
 <tr> td>More data col one</td>
     <td>More data col two</td>
     <td>More data col three</td>
     </tr>
</table>
Heading for Column 1 Heading for Column 2 Heading for Column 3
Data col one Data col two spanning into col 3
More data col one More data col two More data col three


Cells between rows can be combined using the rowspan option as shown below:
HTML Tags   Example
<table border=1>
<tr><th>Heading for Column 1</th>
      <th>Heading for Column 2</th>
     <th>Heading for Column 3</th>
      </tr>
<tr><td rowspan=2>Data col one
spanning into the next row.</td>
     <td>Data col two</td>
     <td>Data col three</td>
     </tr>
<tr><td>More data col two</td>
     <td>More data col three</td>
     </tr>
</table>
Heading for Column 1 Heading for Column 2 Heading for Column 3
Data col one
spanning into the next row.
Data col two Data col three
More data col two More data col three

Lists
Unordered Lists
HTML Tags   Example
<ul>Unordered List
    <li><b>item 1</b>: description 1
    <li><b>item 2</b>: description 2
    <li><b>item 3</b>: description 3
    <li><b>item 4</b>: description 4
    <li><b>item 5</b>: description 5
    </ul>
    Unordered List
  • item 1: description 1
  • item 2: description 2
  • item 3: description 3
  • item 4: description 4
  • item 5: description 5

Ordered Lists
HTML Tags   Example
<ul>Ordered List
    <li><b>item 1</b>: description 1
    <li><b>item 2</b>: description 2
    <li><b>item 3</b>: description 3
    <li><b>item 4</b>: description 4
    <li><b>item 5</b>: description 5
    </ol>
    Ordered List
  1. item 1: description 1
  2. item 2: description 2
  3. item 3: description 3
  4. item 4: description 4
  5. item 5: description 5
Basic Form Elements HTML forms collect data from the user and send the collected data to a web server, or perform another specified action. The main fields of the
tag are method=post or method=get and the action=action_to_perform. For example:
HTML Tags   Example
<form method=post action=prog0.php>
   details of a form
 <input type=submit>
 </form>
details of a form
When the user presses the submit button all form data will be sent to the server, where a program named prog0.php will be executed, and passed all of the fields send by the form. The web browser will send the data to the server as a list of name=value pairs. These are the most common types of form elements to collect user data. All <input> tags should use the name="fieldName" specification so that input will be passed to the form's action,
HTML Form Field Tags   Sample HTML   Example
Text field
Accepts a text string, the length of the textbox can be specified.
<input type=text size = 5>
Textarea
A multi-line Text Block where the size of the area can be specified and treated as one message field.
<textarea name="message" rows="5" cols="48" ></textarea>>
Submit Buttons
When a submit button is pressed the form will perform some action - usually the action that is specied by the <form action=program> field.
<input type="submit" value="Submit">
Radio Buttons
Radio buttons allow the user to make a single selection among multiple choices. When one radio button is selected it will un-select any previous selection. Radio buttons can be grouped by using the same name in the input tag and specifying different values.
<input type=radio name=size value="s">Small
<input type=radio name=size value="m">Medium
<input type=radio name=size value="l" checked>Large
<input type=radio name=size value="xl">XL
Small
Medium
Large
XL
Check Boxes
Check boxes are used to allow the user to make selections where the selection of one check-box is independent of selecting other check-boxes. Each input field is given its own name. Name=value pairs for checkboxes are usually sent to a server when the user checks the check-box.
<input type=checkbox name=pens value="yepper">Pens (2)
<input type=checkbox name=folder checked>Two-pocket Folder
Pens (2)
Two-pocket Folder
Pull-down Select Box
The <Select> input type provides the user with a pull-down list of available choices. The choice selected from the <option> field becomes the value of the select box. Only one item may be selected.
<select name=color>
<option value="White">White</option>
<option value="blue">Blue</option>
<option value="black">Black</option>
</select>

Pull-down Select Box with multiple selections
<select multiple > input type provides the user with a pull-down list of available choices and allows the user to selected one or more options.
<select name=otherCar[] multiple size=4>
<option value="mono"gt;Monogrammed Front</option>
<option value="name"gt;Last Name on Back</option>
<option value="strip"gt;Black Stipe on Sleves</option>
<option value="hood"gt;Hood</option>
<option value="vneck"gt;V-neck</option>
</select>
Basic Form Example
HTML Tags   Example
Sample HTML Form
<h2>Order your free School T-Shirt</h2>
<form action="/IBCS/T2/HTML/prog0.php" method="post">
<p><strong>Name:</strong><br>
<input type="text" name="user"></p>
<p><strong>Enter Shipping Information:</strong><br>
<textarea name="message" rows="5" cols="48" ></textarea>
</p>
Shirt Size:<br>
<input type=radio name=size value="s">Small
<input type=radio name=size value="m">Medium
<input type=radio name=size value="l" checked>Large
<input type=radio name=size value="xl">XL
<p>
Additional Items with Mascot:<br>
<input type=checkbox name=pens value="yepper">Pens (2)
<input type=checkbox name=folder checked>Two-pocket Folder
<br>
<p></p>Shirt Color
<select name=color>
<option value="White">White</option>
<option value="blue">Blue</option>
<option value="black">Black</option>
</select><p>
<p> Select additional options<br>
<select name=otherCar[] multiple size=4>
<option value="mono">Monogrammed Front</option>
<option value="name">Last Name on Back</option>
<option value="strip">Black Stipe on Sleves</option>
<option value="hood">Hood</option>
<option value="vneck">V-neck</option>
</select>
<br>
<input type="submit" value="Submit">
</form>
Sample HTML Form

Order your free School T-Shirt

Name:

Enter Shipping Information:

Shirt Size:
Small Medium Large XL

Additional Items with Mascot:
Pens (2) Two-pocket Folder

Shirt Color

Select additional options

Activities
Classwork activity Activity 1
  • step/part 1
  • step/part 2
  • step/part 3
Classwork activity Activity 2
  • step/part 1
  • step/part 2
  • step/part 3
Classwork activity Activity 3
  • step/part 1
  • step/part 2
  • step/part 3
Lab 1 LAB 1
  • step/part 1
  • step/part 2
  • step/part 3
Lab 2 LAB 2
  • step/part 1
  • step/part 2
  • step/part 3
Lab 3 LAB 3
  • step/part 1
  • step/part 2
  • step/part 3
Homework 1: Activity 1
  • step/part 1
  • step/part 2
  • step/part 3
Homework 2: Activity 2
  • step/part 1
  • step/part 2
  • step/part 3
Homework 3: Activity 3
  • step/part 1
  • step/part 2
  • step/part 3

File List

File List

    ../I2P is not a directory to be listed.


JavaScript


Networking


Term II Files