================================================================= Assignment #13 (REVIEW ONLY) - HTML and CSS (NOT FOR HAND IN) ================================================================= - Ian! D. Allen - idallen@idallen.ca - www.idallen.com This is a set of review questions only. It is not for hand in. Do not submit this assignment. It is only for review. 0. What is the date and room location of your CST8281 Final Exam? 1. Write the simplest IF statement (simplify the Boolean logic) for the following programming problem specification: A widjet is "stale" if TIME is more than 60 AND ACCESS is more than 100. A widjet is "risky" if it is NOT stale, AND TIME is more than 60. Call the notify() routine if the widjet is NOT risky. - Write down what the specifications say: stale = TIME > 60 && ACCESS > 100 risky = NOT stale && TIME > 60 NOT risky = NOT ( NOT stale && TIME > 60 ) - apply deMorgan: NOT risky = stale || TIME <= 60 - substitute for "stale": NOT risky = ( TIME > 60 && ACCESS > 100 ) || TIME <= 60 - Since NOT(TIME > 60) == (TIME <= 60) we can simplify: - The above is in Boolean form: a' = (bc) + b' - Distribute and rewrite as: a' = (b + b')(c + b') - Identity: a' = (1)(c + b') - Identity: a' = c + b' - Simplified result: NOT risky = ACCESS > 100 || TIME <= 60 ANSWER: if ( ACCESS > 100 || TIME <= 60 ) CALL notify() Without Boolean simplification, it would be this unreadable mess: if ( ! ( ! (TIME > 60 && ACCESS > 100) && TIME > 60 ) ) CALL notify(); CLS = "Course Linux Server" 2. What is the absolute Linux pathname of the CLS home directory for user abcd0001? ANSWER: /home/abcd0001 (usually - can be changed by sysadmin) 3. What is the absolute Linux pathname of the CLS public web directory for user abcd0001? ANSWER: /home/abcd0001/public_html/ (usually - can be changed by sysadmin) 4. You are using FTP or SFTP on a Windows computer. Your current Windows directory is C:\Windows and you connect using userid abcd0001 to the CLS. Give the "put" command that will copy a local file "foo.txt" from the "Temp" directory on your Windows "E:" drive to the CLS so that the following URL will display the contents of that file. Note the new file name: http://cst8281.idallen.ca:8080/~abcd0001/a10/bar.txt ANSWER: put E:\Temp\foo.txt public_html/a10/bar.txt (I assume the FTP connection connects to the abcd0001 home directory) 5. What is the absolute Linux pathname of the file accessed by this URL: http://cst8281.idallen.ca:8080/~abcd0001/a10/bar.txt ANSWER: /home/abcd0001/public_html/a10/bar.txt 6. Complete this URL to access the Linux file ~abcd0001/public_html/foo.txt http://cst8281.idallen.ca:8080/_______________________________ ANSWER: http://cst8281.idallen.ca:8080/~abcd0001/foo.txt 7. Generate the HTML for this table with a border: +-----------+ | one | two | |-----------| | me | you | |-----------| | chocolate | +-----------+ ANSWER:
one | two |
me | you |
chocolate |
has
as an ancestor. True/False: everyhas as an ancestor. True/False: every
has
as an ancestor. True/False: every has as an ancestor. True/False: every has as an ancestor. True/False: every tag is a descendant of . True/False: every tag is a descendant of . True/False: every tag is a descendant of . What is the difference between a block element and an inline element? Which type of element (block/inline) is?
Which type of element (block/inline) is ?
Which type of element (block/inline) is ?
Which type of element (block/inline) is More about me!?
Which type of element (block/inline) is ?
Which type of element (block/inline) is
?
Which type of element (block/inline) is
?
How would you avoid very narrow or very wide text columns?
see 300_css.txt
10. Convert each of these from deprecated old HTML to a CSS style= attribute:
(http://www.html.net/tutorials/css/lesson2.asp Method 1)
ANSWER:
11. Convert each of these from old HTML to a CSS
-----------------------------------------------------------------------
Many of the following questions apply to this incomplete HTML fragment.
Some questions apply to any HTML page.
My first styled page