140 likes | 231 Views
CS110: Computer Science and the Internet. Page Layout, SSI, Computers & Information Representation. Team accounts http ://cs.wellesley.edu/~cs110/students/ accounts.html Meet with client soon Meet with project advisor next week HW 3 get started (always protected) HW 1 and 2 (return).
E N D
CS110: Computer Science and the Internet Page Layout, SSI, Computers & Information Representation
Team accounts http://cs.wellesley.edu/~cs110/students/accounts.html • Meet with client soon • Meet with project advisor next week • HW 3 get started (always protected) • HW 1 and 2 (return)
Recap: two-column fixedlayout <body> <div id=“allcontent”> <header> . . . </header> <nav> . . . </nav> <div id=“main”> <div id=“intro”> . . . </div> <div id=“read”> . . . </div> <div class=“week”> . . . </div> <div class=“week”> . . . </div> </div> <footer> . . . </footer> </div> </body> nav { width: 150px; float: right; . . . } #allcontent{ width: 800px; margin: 0 auto; . . . } #main { width: 600px; . . . } Key CSS:
Create a two-column liquid layout http://cs.wellesley.edu/~cs110/ellen/amLit/fixedPage.html How does the page change as you shrink the window size? Using Firebug (later), edit the CSS rules to create a two-column liquid layoutthat spans the width of the window and has columns that change size as you shrink the window size Hint: the value of the width property can be specified as a percentage, e.g. width: 60%; Why use fixed vs. liquid layouts?
Use CSS Tables • http://cs.wellesley.edu/~cs110/scott/L05-page-layout/css-tables.html
Server Side Includes (SSI) Suppose we have the same code on lots of web pages: <html> <head> . . . </head> <body> <nav> . . . lots of hyperlinks . . . </nav> . . . </body> </html> <html> <head> . . . </head> <body> <nav> . . . lots of hyperlinks . . . </nav> . . . </body> </html> <html> <head> . . . </head> <body> <nav> . . . lots of hyperlinks . . . </nav> . . . </body> </html> . . . home.htmlmission.htmlmembers.html (1) Place code in a new file (2) include the new file in the HTML code: <body> <!--#include nav.part --> . . . (3) change filename extensions to .shtml <nav> . . . lots of hyperlinks . . . </nav> nav.part
Opening up the black box Fetch/execute cycle: • Fetch instructions from memory • Decode the instruction • Execute the instruction • Repeat!
Most questions • Binary, binary, binary
Binary numbers - bits & bytes 1 Byte = 8 bits, and then…
Binary numbers, exponential possibilities! • 1 bit • 2 bits • 3 bits • 4 bits • 5 • …… • 32 (IP address) • 128 (IPv6)
ASCII code ASCII code allows 256 “characters” to be represented UTF-8 encodes more than 1 million characters from the Unicode character set Line-endingsz
Create a two-column liquid layout http://cs.wellesley.edu/~cs110/ellen/amLit/fixedPage.html How does the page change as you shrink the window size? Using Firebug (later), edit the CSS rules to create a two-column liquid layoutthat spans the width of the window and has columns that change size as you shrink the window size Hint: the value of the width property can be specified as a percentage, e.g. width: 60%; Why use fixed vs. liquid layouts?