180 likes | 293 Vues
This document outlines two distinct assignments. Firstly, it details the algorithm to verify whether three given numbers can form a triangle, including examples and considerations for efficiency and valid input. Secondly, it provides insights into the World Cyber Games competition taking place in Singapore, featuring various popular games, team dynamics, and participant demographics. This multifaceted approach enhances understanding of both mathematical algorithms and eSports competitions, encouraging interactive participation in both fields.
E N D
13 September Building a Web Page (cont.)
Triangle Assignment • Assignment: Given three numbers, determine if they could constitute a triangle • Examples 3,3,3 => yes 0,1,2 => no 1,1,2 => no -3,3,3 => no 1,3,3 => no 3,4,5 => yes
Solution Considerations • How many combinations do you need to check? • Are there ways to do less? • Make sure that you produce “yes” or “no” • Check for invalid numbers • Ask someone else to follow the algorithm for you
Resubmission • Whether you change it or not, please resubmit it as assignment 2 • Using Assignment rather than Digital Dropbox
World Cyber Games • Country competitions to compete in Singapore in November (www.worldcybergames.com) • Competition in 8 games: Counter-Strike, FIFA Soccer 2005, Need for Speed, StarCraft, WarCraft III, Warhammer 40k, Dead or Alive Ultimate, Halo 2 • Team competition • US competition • 183 men and 1 woman, aged 15 to 28 • 4,000 spectators over three days • Winning team, Team 3D, has manager (Craig Levine, founder) and sponsors (Intel and nVidia) • some players paid a regular living stipend and practice and play tournaments full time • How many of you are gamers? How serious? • Why the gender disparity NY Times, September 12 http://www.nytimes.com/2005/09/12/arts/12game.html
Back to HTML • Every page has • <html> </html> • <head> </head> • <body> </body>
Text Attributes • Effects • Bold <b> </b> • Italic <i> </i> • Underline <u> </u> • Alignment ALIGN=LEFT|RIGHT|CENTER|JUSTIFY • Attribute on paragraph, heading, … • Font <font> </font> with attributes • face • color • Size • More modern way of defining many attributes is a style sheet, which collects the information and let’s you reuse it • Let’s do formatting without Mozilla composer • Can use cheat sheet: http://werbach.com/barebones/download.html
Structural Components • Headings <h> </h> • Citations <cite> </cite> • Quotations <q> </q> • Why do you want this instead of just format? • Presentation – how it looks • Semantics – what it means
Lists and Tables • Regular text is a paragraph • Lists are more fixed formats • Ordered • Bulleted • <ul> <li> </li> </ul> • Unordered • Numbers or letters • <ol> <li> </li> </ul> • Definition • Terms and definitions • <dl> <dt> </dt> <dd> </dd> </dl> • Tables • Two dimensions • Format options • Headings
Tables • Need to define • Table <table> </table> • Row <tr> </tr> • Header (optional) <th> </th> • Data <td> </td> • Caption (optional) <caption> </caption> • Formatting • size • Borders • Can contain anything • Other tables • Pictures • …
Animation on a Computer • Let’s look at some animated clips • What did you see? • How many colors? • Motion? • Is sound the same?
Colors in HTML • What are the three primary colors? • HTML uses an RGB (Red-Green-Blue) definition • Values are 0-255. • (0,0,0) and (255,255,255) represent black and white. Which is which? • Mixing paint vs. mixing light • (0,0,0) = black; (255,255,255) = white
How to indicate colors • There are a set of predefined colors that you can use • Or you can write them out as rgb (200, 130, 125) • We’ll look at other formats later in the semester
Referencing Other Pieces • Access to pictures and links • Most common error • Need complete information for an external picture or link • Need to make sure local references are moved with the page
Retrieving information on a computer • Accessing local information • Accessing remote information • How does networking work?
Links • General model • Anchor to click on • Pointer to the page • Types • Internal • Page • Site • External
Pictures • Inserting with <img> tag • Positioning • Borders • Size