answers to homework 1

27
2004-2005 Academic Year, Spring Semester 2004-2005 Academic Year, Spring Semester Bilkent University - Faculty of Art, Bilkent University - Faculty of Art, Design and Architecture Design and Architecture Department of Communication and Design Department of Communication and Design CS 153 CS 153 Introduction to Introduction to Computing I Computing I Lesson 3 Lesson 3

Upload: amos-mcleod

Post on 02-Jan-2016

40 views

Category:

Documents


2 download

DESCRIPTION

2004-2005 Academic Year, Spring Semester Bilkent University - Faculty of Art, Design and Architecture Department of Communication and Design CS 153 Introduction to Computing I Lesson 3. Answers to Homework 1. Name 2 Peer to Peer networks. Edonkey Icq - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Answers to Homework 1

2004-2005 Academic Year, Spring Semester2004-2005 Academic Year, Spring SemesterBilkent University - Faculty of Art, Design and Bilkent University - Faculty of Art, Design and

ArchitectureArchitectureDepartment of Communication and DesignDepartment of Communication and Design

CS 153 Introduction CS 153 Introduction

to Computing Ito Computing I Lesson 3Lesson 3

Page 2: Answers to Homework 1

Answers to Homework 1Answers to Homework 11.1. Name 2 Peer to Peer networks.Name 2 Peer to Peer networks.

1.1. EdonkeyEdonkey2.2. IcqIcq

5.5. Send a e-mail to me with the topic “Homework Question 5” and your name and Send a e-mail to me with the topic “Homework Question 5” and your name and number at the body, of which I cannot see who you send the mail to. (so my number at the body, of which I cannot see who you send the mail to. (so my outlook will say Undisclosed recipients at to: field of the mail I receive.)outlook will say Undisclosed recipients at to: field of the mail I receive.)

1.1. You should use Bcc: field when sending the e-mail and leave To: and CC: fields empty.You should use Bcc: field when sending the e-mail and leave To: and CC: fields empty.6.6. Search and find five FTP Client Programs and a FTP Server program using your Search and find five FTP Client Programs and a FTP Server program using your

favorite web search engine. (Do not just take the list from your friends.)favorite web search engine. (Do not just take the list from your friends.)1.1. BulletProof FTP Client, FTP Voyager 11.2, AutoFTP Professional 4.4, FTP Navigator 7.4, BulletProof FTP Client, FTP Voyager 11.2, AutoFTP Professional 4.4, FTP Navigator 7.4,

BitKinex 2.4, Robo-FTP, AceFTP, AbleFTP, CuteFTP, CyDFTP...BitKinex 2.4, Robo-FTP, AceFTP, AbleFTP, CuteFTP, CyDFTP...2.2. Serv-UServ-U

7.7. Define the cycle of processing and state which computer hardware is used in the Define the cycle of processing and state which computer hardware is used in the cycle of processing. Which stages do we store data, if we don’t store the data cycle of processing. Which stages do we store data, if we don’t store the data what happens?what happens?

1.1. Input Input processing processing output. We store data in every stage and every intermediate stage. output. We store data in every stage and every intermediate stage. Because if we don’t store the data, it’s lost. For input: HDD, FDD, System memory; for Because if we don’t store the data, it’s lost. For input: HDD, FDD, System memory; for processing: Registers and Cache at processor; for output: system memory, memory of our processing: Registers and Cache at processor; for output: system memory, memory of our video card, HDD, FDD...video card, HDD, FDD...

8.8. Give two reasons why today we start to have 64 bit processors(i.e. Athlon 64, Give two reasons why today we start to have 64 bit processors(i.e. Athlon 64, Itanium). Wasn’t 32 bit processor (i.e. Pentium 4, Athlon XP) enough for todays Itanium). Wasn’t 32 bit processor (i.e. Pentium 4, Athlon XP) enough for todays computing needs?computing needs?

1.1. Most important reason is as 2^32 = 4 billion, memory of a computer is limited to 4GBs, Most important reason is as 2^32 = 4 billion, memory of a computer is limited to 4GBs, and this is limiting to have more memory. Another reason, with 64 bits we can move data and this is limiting to have more memory. Another reason, with 64 bits we can move data faster, 64 bits a time instead of 32...faster, 64 bits a time instead of 32...

9.9. What is a DVD and name and list the capacities of a DVD.What is a DVD and name and list the capacities of a DVD.1.1. Digital Versatile DiskDigital Versatile Disk, , Digital Video DiskDigital Video Disk. Single layer single side: ~ 4.7 GB, double layer . Single layer single side: ~ 4.7 GB, double layer

single side ~ 8.5GB, double layer dual side: ~ 17 GB<single side ~ 8.5GB, double layer dual side: ~ 17 GB<

Page 3: Answers to Homework 1

HTMLHTML

Hyper Text Markup LanguageHyper Text Markup Language A text containing small A text containing small markup markup

tagstags The markup tags tell the Web The markup tags tell the Web

browser browser how to displayhow to display the page. the page.

Page 4: Answers to Homework 1

HTML as a Markup HTML as a Markup LanguageLanguage

HTML has a set of rules:HTML has a set of rules: It’s tag based.It’s tag based.

A tag is opened by a “<“ followed by the tag A tag is opened by a “<“ followed by the tag name, optional parameters, and “>”, the name, optional parameters, and “>”, the content which tag marks, and then closing content which tag marks, and then closing of a tag comes with “</” tagname and “>”.of a tag comes with “</” tagname and “>”.

<tagname>content to be tagged</tagname><tagname>content to be tagged</tagname>

A tag can be empty:A tag can be empty:

<tagname /> <tagname />

Page 5: Answers to Homework 1

HTML as a Markup HTML as a Markup LanguageLanguage

Tags can contain tags:Tags can contain tags:

<tag1> content to <tag2>be <tag1> content to <tag2>be tagged</tag2></tag1>tagged</tag2></tag1>

If there is a tag inside another, the If there is a tag inside another, the lower tag should be closed before lower tag should be closed before higher:higher:

<tag1> content to <tag1> content to

<tag2>be tagged</tag2><tag2>be tagged</tag2>

</tag1></tag1>

<tag1> content to <tag1> content to <tag2>be <tag2>be

tagged</tag1>tagged</tag1></tag2></tag2>

Page 6: Answers to Homework 1

HTML as a Markup HTML as a Markup LanguageLanguage

A Tag may contain parameters, the A Tag may contain parameters, the order is not important:order is not important:

<tagname parameter1=123 <tagname parameter1=123 parameter2=“text” parameter2=“text” parameter3=‘another “text” here’> parameter3=‘another “text” here’> content to be tagged</tagname>content to be tagged</tagname>

<tagname parameter2=“text” <tagname parameter2=“text” parameter1=123 parameter3=‘another parameter1=123 parameter3=‘another “text” here’ />“text” here’ />

Page 7: Answers to Homework 1

HTML as a Markup HTML as a Markup LanguageLanguage

Number of spaces if more than 1 inside Number of spaces if more than 1 inside tags and in tags are not important.tags and in tags are not important.

< tagname > content< tagname > content

to be tagged</tagname>to be tagged</tagname> Same asSame as

<tagname> content to be <tagname> content to be tagged</tagname>tagged</tagname>

There is a space here!

Page 8: Answers to Homework 1

HTML is a Markup HTML is a Markup LanguageLanguage

You should write your HTML code layed out neatly!You should write your HTML code layed out neatly!

<tag1><tag1><tag2><tag2>

<tag3><tag3></tag3></tag3>

</tag2></tag2><tag4><tag4></tag4></tag4>

</tag1></tag1>

<tag1><tag2><tag3></tag3><tag1><tag2><tag3></tag3></tag2><tag4></tag4></tag1></tag2><tag4></tag4></tag1>

Page 9: Answers to Homework 1

General Structure of General Structure of HTMLHTML

Every HTML document starts with Every HTML document starts with htmlhtml tag. tag. An html tag should contain An html tag should contain headhead and and bodybody

tags.tags.<html><html>

<head><head>......</head></head><body><body>......</body></body>

</html></html>

Page 10: Answers to Homework 1

General Structure of General Structure of HTMLHTML

HeadHead tag only contains tags that define the page tag only contains tags that define the page itself. itself. HeadHead tag is the header of the html page. tag is the header of the html page. TITLE defines the document title, and is always TITLE defines the document title, and is always

needed.needed.<title>This is the title of the document.</title><title>This is the title of the document.</title> SCRIPT reserved for future use with scripting SCRIPT reserved for future use with scripting

languages. languages. If Javascript is used in the document it may go here.If Javascript is used in the document it may go here.

STYLE reserved for future use with style sheets. STYLE reserved for future use with style sheets. If you define styles for your document (see CSS).If you define styles for your document (see CSS).

META used to supply meta info as name/value pairs. META used to supply meta info as name/value pairs. LINK used to define relationships with other LINK used to define relationships with other

documents. documents. BASE used for base URL address of this document.BASE used for base URL address of this document. Also... {ISINDEX}Also... {ISINDEX}

Page 11: Answers to Homework 1

META TagMETA Tag These tags mainly used for search engines. These tags mainly used for search engines. Robots: Robots: YYou only need it if you DO NOT want your ou only need it if you DO NOT want your

pages indexed. pages indexed. <META NAME=“Robots” CONTENT=“NOINDEX”><META NAME=“Robots” CONTENT=“NOINDEX”> Description: Description: Description of your web page.Description of your web page.<META NAME=“Description” CONTENT=“A course <META NAME=“Description” CONTENT=“A course

about computers and introduction to HTML.”>about computers and introduction to HTML.”> Keywords:Keywords: Possible keywords for the content of Possible keywords for the content of

your web page.your web page.<META NAME=“Keywords” CONTENT=“Bilkent <META NAME=“Keywords” CONTENT=“Bilkent

University, HTML, Course, Tutorial”>University, HTML, Course, Tutorial”>

Page 12: Answers to Homework 1

Body TagBody Tag Body Tag contains what you will display to the user. Body Tag contains what you will display to the user.

May get content from May get content from headhead tag. tag. Parameters of Parameters of bodybody tag are: tag are:

bgcolorbgcolor: : Specifies the background color for the document Specifies the background color for the document body. body.

texttext: : Specifies the color used to stroke the document's text. Specifies the color used to stroke the document's text. linklink: : Specifies the color used to stroke the text for Specifies the color used to stroke the text for

unvisited hypertext links. unvisited hypertext links. vlinkvlink: : Specifies the color used to stroke the text for visited Specifies the color used to stroke the text for visited

hypertext links. hypertext links. alinkalink: : Specifies the highlight color used to stroke the text Specifies the highlight color used to stroke the text

for hypertext links at the moment the user clicks on the for hypertext links at the moment the user clicks on the link. link.

backgroundbackground: : Specifies a URL for an image that will be Specifies a URL for an image that will be used to tile the document background.used to tile the document background.

<body bgcolor=white text=black link=red vlink=maroon <body bgcolor=white text=black link=red vlink=maroon alink=fuchsia> alink=fuchsia>

Page 13: Answers to Homework 1

Some Named ColorsSome Named Colors

Page 14: Answers to Homework 1

sRGBsRGB Red Green Blue: values in hexadecimal Red Green Blue: values in hexadecimal

order. (0)order. (0)1616= 0, (1)= 0, (1)1616= 1 (2)= 1 (2)1616= 2 ... (9)= 2 ... (9)1616= 9, = 9, (A)(A)1616= 10, (B)= 10, (B)1616= 11, (C)= 11, (C)1616= 12, (D)= 12, (D)1616= 13, = 13, (E)(E)1616= 14, (F)= 14, (F)1616= 15; (10)= 15; (10)1616= 16, (11)= 16, (11)1616= = 17... (FF)17... (FF)1616= 255= 255

FF0000 = pure Red. (this means there are FF0000 = pure Red. (this means there are 255 levels from black to pure Red)255 levels from black to pure Red)

00FF00 = pure Green00FF00 = pure Green 0000FF = pure Blue.0000FF = pure Blue. 000000 = black000000 = black FFFFFF = whiteFFFFFF = white How many colors do we have in sRGB?How many colors do we have in sRGB?

Page 15: Answers to Homework 1

CommentsComments

<!-- Here goes a comment --><!-- Here goes a comment --> Comments should be used to Comments should be used to

describe sections, notes, ideas on describe sections, notes, ideas on the page... the page...

Will be discarded by the browser.Will be discarded by the browser.

Page 16: Answers to Homework 1

Some Examples to Start!Some Examples to Start!

<html><html>  <head>  <head>    <title> My First Page </title>    <title> My First Page </title>  </head>  </head>  <body>  <body>    This is my first page.    This is my first page.  </body>  </body></html> </html>

Page 17: Answers to Homework 1

HeadingsHeadings Optional Parameter “align” with values left | center | rightOptional Parameter “align” with values left | center | right<h1 align=“center”> ... </h1><h1 align=“center”> ... </h1>

<html><html>  <head>  <head>    <title> My First Page </title>    <title> My First Page </title>  </head>  </head>  <body>  <body>    This is my first page.    This is my first page.    <h1>This line is h1</h1>    <h1>This line is h1</h1>    <h2>This line is h2</h2>    <h2>This line is h2</h2>    <h3>This line is h3</h3>    <h3>This line is h3</h3>    <h4>This line is h4</h4>    <h4>This line is h4</h4>    <h5>This line is h5</h5>    <h5>This line is h5</h5>    <h6>This line is h6</h6>    <h6>This line is h6</h6>  </body>  </body></html> </html>

Page 18: Answers to Homework 1

AddressAddress

For giving an Address.For giving an Address.<address> <address> Computer Engineer<br> Computer Engineer<br> Sinan Uşşaklı<br> Sinan Uşşaklı<br> Engineering Department room 528, Engineering Department room 528,

Bilkent, Ankara<br> Bilkent, Ankara<br> Tel: +90 312 2904000Tel: +90 312 2904000</address></address>

Page 19: Answers to Homework 1

Line BreakLine Break

Used to force a line break. This is an Used to force a line break. This is an empty element so the end tag is empty element so the end tag is forbidden.forbidden.

<br><br>

OrOr

<br /><br />

Page 20: Answers to Homework 1

Block vs Text TagsBlock vs Text Tags

We will divide the HTML tags into We will divide the HTML tags into two groups.two groups. Block tagsBlock tags Text tagsText tags

Block level tags which cause paragraph Block level tags which cause paragraph breaks, and text level tags which don't.breaks, and text level tags which don't.

Page 21: Answers to Homework 1

Some Text Tags (more Some Text Tags (more will come)will come)

Font Style tags:Font Style tags: tttt teletype or monospaced text teletype or monospaced text ii italic text style italic text style bb bold text style bold text style uu underlined text style underlined text style s s strike-through text style strike-through text style bigbig places text in a large font places text in a large font smallsmall places text in a small font places text in a small font subsub places text in subscript style places text in subscript style supsup places text in superscript style places text in superscript style

Page 22: Answers to Homework 1

More ExamplesMore Examples

<html><html>  <head>  <head>    <title> My First Page </title>    <title> My First Page </title>  </head>  </head>  <body>  <body>    <h1>Welcome to My Page</h1>    <h1>Welcome to My Page</h1>    This is my first page.    This is my first page.  </body>  </body></html> </html>

Page 23: Answers to Homework 1

More ExamplesMore Examples <html><html>

  <head>  <head>    <title> My First Page </title>    <title> My First Page </title>  </head>  </head>  <body>  <body>        <h1>Welcome to My Page</h1><h1>Welcome to My Page</h1>    This is my first page.    This is my first page.        The major aim of the Department of The major aim of the Department of Communication and Design is to educate Communication and Design is to educate media professionals who are both media professionals who are both knowledgeable about global culture and art, knowledgeable about global culture and art, and competent in recent developments in and competent in recent developments in modern technology of communications, modern technology of communications, especially visual technologies. especially visual technologies.   </body>  </body></html> </html>

Page 24: Answers to Homework 1

Paragraph <p>, Line Paragraph <p>, Line Break <br>Break <br>

<html><html>  <head>  <head>    <title> My First Page </title>    <title> My First Page </title>  </head>  </head>  <body>  <body>        <h1>Welcome to My Page</h1><h1>Welcome to My Page</h1>        <p><p>This is my first page.This is my first page.</p></p>        <p><p>The major aim of the Department of The major aim of the Department of Communication and Design is toCommunication and Design is to<br><br> educate educate media professionals who are both knowledgeable media professionals who are both knowledgeable about globalabout global<br><br> culture and art, and competent culture and art, and competent in recent developments in modern technologyin recent developments in modern technology<br><br> of communications, especially visual of communications, especially visual technologies.technologies.</p> </p>   </body>  </body></html></html>

Page 25: Answers to Homework 1

Paragraph <p>Paragraph <p>

Used markup paragraphs.Used markup paragraphs. Optional parameter “align” with Optional parameter “align” with

values right | center | left | justifiedvalues right | center | left | justified

Page 26: Answers to Homework 1

More ExamplesMore Examples <html><html>

  <head>  <head>    <title> My First Page </title>    <title> My First Page </title>  </head>  </head>  <body>  <body>        <h1>Welcome to My Page</h1><h1>Welcome to My Page</h1>        <<p p align=center>align=center>This is my first page.</p>This is my first page.</p>    The major aim of the Department of     The major aim of the Department of Communication and Design is to<br> educate Communication and Design is to<br> educate media professionals who are both knowledgeable media professionals who are both knowledgeable about global<br> culture and art, and competent about global<br> culture and art, and competent in recent developments in modern in recent developments in modern technology<br> of communications, especially technology<br> of communications, especially visual technologies.visual technologies.   </body>  </body></html> </html>

Page 27: Answers to Homework 1

More Examples (bgcolor)More Examples (bgcolor) <html><html>

  <head>  <head>    <title> My First Page </title>    <title> My First Page </title>  </head>  </head>  <body   <body bgcolor="lightyellow"bgcolor="lightyellow">>        <h1>Welcome to My Page</h1><h1>Welcome to My Page</h1>    <p align=center>This is my first page.</p>    <p align=center>This is my first page.</p>    The major aim of the Department of     The major aim of the Department of Communication and Design is to<br> educate Communication and Design is to<br> educate media professionals who are both knowledgeable media professionals who are both knowledgeable about global<br> culture and art, and competent about global<br> culture and art, and competent in recent developments in modern in recent developments in modern technology<br> of communications, especially technology<br> of communications, especially visual technologies.visual technologies.   </body>  </body></html> </html>