2 Pages

Recitation 5

Course: CS 170, Fall 2008
School: Rutgers
Rating:
 
 
 
 
 

Word Count: 405

Document Preview

5) (Recitation Introduction to JavaScript TA: Wei Chen Email: weichen@cs.rutgers.edu Common mistakes in last assignment <head> and <h1> confused (heading). Only <title> is allowed in <head>. All other content goes in <body>, <title><h1>My page</h1></title> does not work as you might intend....

Register Now

Unformatted Document Excerpt

Coursehero >> New Jersey >> Rutgers >> CS 170

Course Hero has millions of student submitted documents similar to the one
below including study guides, practice problems, reference materials, practice exams, textbook help and tutor support.

Course Hero has millions of student submitted documents similar to the one below including study guides, practice problems, reference materials, practice exams, textbook help and tutor support.
5) (Recitation Introduction to JavaScript TA: Wei Chen Email: weichen@cs.rutgers.edu Common mistakes in last assignment <head> and <h1> confused (heading). Only <title> is allowed in <head>. All other content goes in <body>, <title><h1>My page</h1></title> does not work as you might intend. Tag nesting and missing closing tags <body> Tag redundancy e.g. multiple <body> tags, <h1><b>. Missing quotation marks. Please go to this URL: http://eden.rutgers.edu/~weichen/cs170/jssample/ Download "Example1.html", start from Example1.html by opening it with Notepad. There are some errors in this file; the corrected version is Example1-Corrected.html. Basic structure of HTML file with JavaScript code: <html> <head> <title>JavaScript in HTML </title> </head> <body> <script type= "text/javascript"> (JavaScript Code goes here) </script> </body> </html> In JavaScript Each statement ends with semicolon(;) JavaScript is case-sensitive. For example, var a is different from var A Error Console(click "tools" -> "error console") provided by Mozilla Firefox is a good tool for locating errors. Do NOT break lines of Java Script code. It is wrong to use HTML code within a script. It must appear inside a document.write() function. JavaScript Variables Numbers, such as 42 or 3.14159 Logical (Boolean) values, true either or false, e.g. b = (2>1) is equal to b = true; Strings, always surrounded by double quotes, such as "Howdy!" a = "123" is different from a = 123!! JavaScript Operators + operator When used with numbers, it adds two numbers. When used with strings, it concatenates two strings. Example of Concatenation VS. Addition var a = 123; var b = 123; var c = a + b; var a = "123" var b = "123" var c = a + b; c = 246 c = "123123" Three methods in JavaScript Alert Box SYNTAX : alert ("some text"); Prompt Box SYNTAX: prompt("sometext","defaultvalue"); JavaScript treats all input via the prompt() function as a string. You have to implicitly or explicitly convert to a number by performing an immediate multiplication with the input (e.g. 1*prompt(....)) or use the Number() function. var googles...

Find millions of documents on Course Hero - Study Guides, Lecture Notes, Reference Materials, Practice Exams and more. Course Hero has millions of course specific materials providing students with the best way to expand their education.

Below is a small sample set of documents:

Rutgers - CS - 170
(Recitation 7) JavaScript 3TA: Wei Chen Email: weichen@cs.rutgers.edu Office Hours: Mondays 3:00 - 4:00 pm, Hill 416, Busch Campus Lab Support Hours: Mondays 10:00 am noon, ARC, Busch Campus Please go to this URL: http:/eden.rutgers.edu/~weichen/cs
Rutgers - CS - 170
A bogus presentation!Presented by: (your_name)(title) e.g. Hello! (Enter some bulleted text) CS 170 Computer Applications For Business!(Your Name)2Some clip art (type something here) (add another image to the right)(Your Name)3
Rutgers - CS - 170
1. Important HTML tags and associated attributes&lt;body bgcolor = &quot;red&quot; background=&quot;bk1.jpg&quot;&gt;.&lt;/body&gt;&lt;head&gt;&lt;title&gt; This is a title &lt;/title&gt;&lt;/head&gt;&lt;p&gt;A paragraph.&lt;/p&gt;&lt;i&gt;Text&lt;/i&gt;&lt;u&gt;Text&lt;/u&gt;&lt;b&gt;Text&lt;/b&gt;&lt;font color = &quot;blue&quot;&gt;Text &lt;/font&gt; /Do no
Rutgers - CS - 170
Wei Chen's sample06/15/20091A 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16BCDEFGHIExample1-Payrool StatementMonthJanuary February March April May June July August Column Totals Mortgage rate 18.00%SalaryCommissionOvertime
Rutgers - CS - 170
A 1 2 3 4 Month 5 6 7 8 9 10 11 12 Column Totals 13 14 15 Mortgage rate 0.18 16BCDEFGHSalary 62000 31000 58500 13500 123400 180000 73000 43000CommissionOvertime 3200Mortgage PaymentPension FundTotal DeductionsTotal PayCS
Rutgers - CS - 170
Wei Chen's Flower Shop 6/15/2009 Flower Roses Roses Roses Lillies Tulips Narcissus Carnations Carnations Carnations Orchids Column Totals (use sum) Number of items with values (text and numbers) Number of items with numbers only Number of items with
Rutgers - CS - 170
(Your name)'s Flower Shop (Insert formula for today's date) Flower Roses Roses Roses Lillies Tulips Narcissus Carnations Carnations Carnations Orchids Column Totals (use sum) Number of items with values (text and numbers) Number of items with numbers
Rutgers - CS - 170
Example45 40 35 30 25 Bouquets in stock 20 15 10 7 5 0 Lillies Roses Tulips Carnations Roses Carnations Flower Column D Narcissus Orchids Roses Carnations 5 15 21 31 28 28 36 4496/15/2009 Flower Roses Lillies Tulips Carnations Carnations Roses O
Rutgers - CS - 170
today's date? Flower Roses Roses Roses Lillies Tulips Narcissus Carnations Carnations Carnations Orchids Column Totals (use sum) Median Maximum Minimum Number in Bouquet Price per bouquet 24 29.99 12 18.95 6 12.99 24 19.99 24 29.99 6 34.99 24 22.95 1
Washington - GEN - 351
Genome Sciences 351, Spring 2009 Problem Set #6 Due Wednesday May 271) On average, what percentage of genetic information do first cousins share? Show your reasoning.2) In a twin study investigating the heritability of thoughtful forehead wrinkli
Michigan - ME - 646
ME 646 23 Mar 2006Handout #HW11 Due 30 MarHomework 111. The Matlab files passivewalkingpow.m and onesteppwpow.m run a simulation of passive walking with powering for level ground. The active power is supplied by a push-off impulse prior to heels
Penn State - MKTG - 572
1995 7888 4320 000 000001 00023Copyright 2003 by The McGrawHill Companies, Inc. All rights reserved. C H A P T E R1995 7888 4320 000 000001 0002311Sampling: Theory, Designs, and Issues in Marketing Research1234 0001 897251 0000011-2C
Case Western - EECS - 245
Infrared Communications LabThis lab assignment assumes that the student knows about: Ohm's Law Voltage, Current and Resistance Operational Amplifiers (See Appendix I) The first part of the lab is to develop a model for electrical signals which pass
Macalester - GEOG - 261
Map A.1: The Administrative Boundaries within ChinaMap A.2: Physical Relief of ChinaMap A.3: The Transportation Network in 1997Map A.4: Population Density (number of persons per kilometer)Map A.5: Proportion of County Population of Working Ag
Macalester - GEOG - 261
Watersheds of Asia and OceaniaWater Resources eAtlasAS29 YangtzeLandcover ClassesForest Shrubland Savanna Grassland Permanent Wetland Cropland / Natural Vegetation Mosaic Urban / Industrial Barren Tundra Rivers Political Boundaries (Intl.) Poli
Macalester - GEOG - 261
Development of Sub-City Urban Indicators in China and GuatemalaFinal Report April 2002Virginia Commonwealth University Dr. Robert D. Rugg, Co-Project Director Dr. Weiping Wu, Co- Project Director Department of Urban Studies and Planning 812 West
Fayetteville State University - COP - 562105
1Syntax-Directed Translation Part IIChapter 5COP5621 Compiler Construction Copyright Robert van Engelen, Florida State University, 20052Translation Schemes using Marker NonterminalsNeed a stack! (for nested if-then)S if E { emit(iconst_0
Allan Hancock College - TDS - 540
User ManualTDS 520A, 524A, 540A, &amp; 544A Digitizing Oscilloscopes 070-8710-01Please check for change information at the rear of this manual. First Printing: July 1993 Revised: November 1993Instrument Serial Numbers Each instrument manufactured b
Allan Hancock College - TDS - 540
ReferenceTDS Family Digitizing Oscilloscopes (TDS 520A, 524A, 540A, 544A, 620A, 640A, &amp; 644A) 070-8711-02Displaying a Waveformto CH 1 Attach a probe to your1signal 2 and hook it up Press CH 1 buttonAcquisition Mode 3 AUTOSETPress4Adjust V
Allan Hancock College - TDS - 540
ReferenceFFT Applications for TDS OscilloscopesIntroductionThe ability to analyze the frequency domain with the Fast Fourier Transform (FFT) has opened up a whole new set of opportunities in digital oscilloscopes. However, the user needs to unde
Washington - CHEM - 238
Penn State - RXC - 122
THIS IS AN OLD HW ASSIGNMENT FOR 351! The good news is that it is not assigned. The other goods news is that you are responsible for it! Enjoy! You are hired to assess whether or not the yield curve serves as a &quot;good&quot; leading economic indicator for p
Kalamazoo - CS - 510
Growth Rates (in seconds) lg nn*10 20 30 40 50 60 70 80 90 100 1000 1100 1200 1300 1400 1500 1600 1700 20000 21000 22000 23000 24000 25000 26000 27000 28000*0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 05n*0 0 0 0 0 0 0
Washington - M - 307
r h bi h f HR c R sqap!b gb 8e db HB 9 A 7 53 0 U &amp; $ D aED`B%&quot; )9&amp; Y#%XW )A9 V#&quot; )('%#&quot;!TSCRQPI#&quot;)GF F H A B 9 A 7 53 0 &amp; $ D EDCB%&quot; @9&amp; 86%421 )('%#&quot;!
North-West Uni. - DECS - 452
KELLOGG SCHOOL OF MANAGEMENT Strategic Decision-MakingDECS-452 Week #10 Professor Bob WeberAttached are short model answers to all of the &quot;project&quot; questions. The graded projects will be returned at the start of our scheduled (but not actually hap
Penn State - BUB - 1975
Sheet1 STATE COLLEGE, PENNSYLVANIA DAILY WEATHER SUMMARY - Latest Complete Day [1200 UT - 1200 UT] -12/19/75High Temperature Low Temperature Mean Temperature Rain or Liquid Equivalent Snow and/or Ice Pellets Snow Depth23 Rank (1=Warmest, 80=Colde
Penn State - BUB - 1953
Sheet1 STATE COLLEGE, PENNSYLVANIA DAILY WEATHER SUMMARY - Latest Complete Day [Midnight - Midnight LT] -08/30/53High Temperature Low Temperature Mean Temperature Rain or Liquid Equivalent Snow and/or Ice Pellets Snow Depth: ::95 Rank (1=Warm
Penn State - BUB - 1942
Sheet1 STATE COLLEGE, PENNSYLVANIA DAILY WEATHER SUMMARY - Latest Complete Day [Midnight - Midnight LT] -11/06/42High Temperature Low Temperature Mean Temperature Rain or Liquid Equivalent Snow and/or Ice Pellets Snow Depth: ::54 Rank (1=Warm
Penn State - BUB - 1941
Sheet1 STATE COLLEGE, PENNSYLVANIA DAILY WEATHER SUMMARY - Latest Complete Day [Midnight - Midnight LT] -11/09/41High Temperature Low Temperature Mean Temperature Rain or Liquid Equivalent Snow and/or Ice Pellets Snow Depth: ::40 Rank (1=Warm
Penn State - BUB - 1950
Sheet1 STATE COLLEGE, PENNSYLVANIA DAILY WEATHER SUMMARY - Latest Complete Day [Midnight - Midnight LT] -11/05/50High Temperature Low Temperature Mean Temperature Rain or Liquid Equivalent Snow and/or Ice Pellets Snow Depth: ::45 Rank (1=Warm
Drexel - TJD - 382
Oboe q.=51 Harpq.=51 mp f Oh SOPRANOALTO are br - ig - htlyTENORHo -
Auburn - HORT - 3000
Light and Plant Pigments HORT 3000 Electromagnetic Spectrum Electromagnetic Spectrum Wavelength and Frequency Inversely proportional Higher frequency = higher energy Both indicate light qualityWavelength Physical Properties of Light Wave and
Auburn - HORT - 3000
Secondary Plant Metabolites Part I HORT 3000 Metabolism Sum of all chemical reactions in an organism Dynamic process Constant turnover of molecules Biosynthesis or construction is anabolic metabolism Anabolism Breakdown or degradation is cata
Auburn - HORT - 3000
Secondary Plant Metabolites Part II HORT 3000 Secondary Plant Metabolites Terpenes Glycosides Phenolics AlkaloidsSecondary Plant Metabolites Often a source of medicinesPhenolics Shikimic acid intermediate in aromatic amino acid production
Penn State - BUB - 1962
Sheet1 STATE COLLEGE, PENNSYLVANIA DAILY WEATHER SUMMARY - Latest Complete Day [1200 UT - 1200 UT] -02/26/62High Temperature Low Temperature Mean Temperature Rain or Liquid Equivalent Snow and/or Ice Pellets Snow Depth: ::34 Rank (1=Warmest,
Penn State - BUB - 1939
Sheet1 STATE COLLEGE, PENNSYLVANIA DAILY WEATHER SUMMARY - Latest Complete Day [Midnight - Midnight LT] -04/20/39High Temperature Low Temperature Mean Temperature Rain or Liquid Equivalent Snow and/or Ice Pellets Snow Depth48 Rank (1=Warmest, 44=
Penn State - BUB - 1953
Sheet1 STATE COLLEGE, PENNSYLVANIA DAILY WEATHER SUMMARY - Latest Complete Day [Midnight - Midnight LT] -09/06/53High Temperature Low Temperature Mean Temperature Rain or Liquid Equivalent Snow and/or Ice Pellets Snow Depth: ::63 Rank (1=Warm
Boise State - ENGLISH - 202
ENGL 202-4038Spring 2007 Addendum to the syllabus for teacher education studentsConceptual Framework: The Professional EducatorBoise State University strives to develop knowledgeable educators who integrate complex roles and dispositions in the s
Boise State - ENGLISH - 202
Citing Sources; Quoting and ParaphrasingDr. Russell Willerton English 202 Boise State University Documenting Research Part of being an ethical writer and worker is to give credit to your sources of information. Having a list of source
Cal Poly Pomona - CIS - 101
USING SIMNET IN CIS 101 (F07)Student InstructionsFirst Time Setup (One Time ONLY)1. To install SimNet software: Insert the CD-ROM and follow the installation wizard. When prompted for the school's SimNet home page, enter csupomona.simnetenterpri
ASU - PHY - 577
PHY577 Advanced Quantum Theory Instructor: Kevin Schmidt Office: PSF-334 Office Hours: 11:40-12:30, Wednesday and Friday Email: Kevin.Schmidt@asu.edu Telephone: (480) 965-8240 (office), (480) 820-5332 (home) Class web page: http:/phy.asu.edu/phy577-
ASU - PHY - 577
PHY577 Problem Set 4. Due November 7, 2008 1. Make up an exam. Give three problems on the topics we have covered. The problems should require 30 minutes or less by a reasonably well prepared student. You need to give enough information in the questio
ASU - PHY - 577
Notes on Analytic functions and contour integrationK.E. Schmidt Department of Physics Arizona State University Tempe, AZ 852871Analytic FunctionsA complex function f (z) = f (x, y), of a complex variable, z = x + iy, is analytic at the point z
ASU - PHY - 577
S-matrix NotesKevin E. Schmidt Department of Physics Arizona State University Tempe, AZ 85283The in and out states are given by the Lippmann-Schwinger Equations, 1 | = | + V | E - H0 i(1)where H = H0 +V , and H0 | = E | , and we write the o
ASU - PHY - 577
Dirac EquationKevin E. Schmidt Department of Physics Arizona State University Tempe, AZ 852831Many roads to the Dirac equationThe Dirac equation is the wave equation that is consistent with quantum mechanics, spin one-half, and special relativ
ASU - PHY - 577
Angular momentum addition and irreducible spherical tensorsKevin E. Schmidt Department of Physics Arizona State University Tempe, AZ 852831IntroductionSince spin 1/2 particles interact with a magnetic field, they must produce a magnetic field
Allan Hancock College - GEOS - 312
Trilobite Chart - GEOS312 20071Trilobite Chart - GEOS312 20072Trilobite Chart - GEOS312 20073Trilobite Chart - GEOS312 20074Trilobite Chart - GEOS312 20075Trilobite Chart - GEOS312 20076Trilobite Chart - GEOS312 20077Trilo
Cal Poly Pomona - CIS - 235
ObjectOriented Systems Analysis and Design with UML.C h a p t e r 1 2 D e s ig n in g t h e U s e r I n t e r f a c e D e s ig n in g t h e P r e s e n t a t io n L a y e r 2005 Prentice Hall121Learning Objectives Describe which
Cal Poly Pomona - CIS - 235
ObjectOriented Systems Analysis and Design with UMLC h a p t e r 1 4 M a n a g in g O b j e c t O r ie n t e d S y s t e m D e v e lo p m e n t 2005 Prentice Hall141Learning Objectives Discuss some of the reasons why information system
Cal Poly Pomona - CIS - 235
ObjectOriented Systems Analysis and Design with UML.P A R T O N E I n t r o d u c t io n t o I n f o r m a t io n S y s t e m D e v e lo p m e n t 2005 Prentice Hall11ObjectOriented Systems Analysis and Design with UML.C h a p t e
Cal Poly Pomona - CIS - 235
ObjectOriented Systems Analysis and Design with UML.P A R T O N E I n t r o d u c t io n t o I n f o r m a t io n S y s t e m D e v e lo p m e n t( co n t in u e d ) 2005 Prentice Hall21ObjectOriented Systems Analysis and Design with
Cal Poly Pomona - CIS - 235
Unified Modeling LanguageUML and the design of ObjectOriented Click to edit Master subtitle style Information Systems Dr. Koichiro Isshiki, Professor Computer Information Systems Japanese Engineer Randy Guthrie Microsoft 11About Your Inst
Cal Poly Pomona - CIS - 235
ObjectOriented TechnologyDr. Koichiro Isshiki Computer Information Department Cal Poly, Pomonakrisshiki@csupomona.eduDr. D.F.S.Dr. Koichiro Isshiki1OutlineIntroduction of OO Concepts q Introduction of UML q Using Nounsq Example 1: Elect
Penn State - METEO - 182
METEO 473: BootcampPROGRAMMING QUIZ 2The Rules: You have the entire class period to finish this quiz. You should be able to do all of the tasks if you understand all of the material presented in class to date. You can use any example codes we have
CSU Fullerton - IS - 282
PROPOSALSystem for Tracking Freelance Photographers and IllustratorsVictoria McCargarAssignment 2 IS-282 Analysis and Design of Information Systems UCLA Fall 20011Table of ContentsExecutive Summary .. 3 Introduction . 4 Mission Statement .
CSU Fullerton - IS - 282
Study of the ProposedGovernment Grants Portal_Center for Nonprofit ManagementLos Angeles, CaliforniaBy: Marcia Schmitz Presented to: Dr. Ed Pai Systems Analysis &amp; Design November 13, 2001 (Assignment 2)Table of Contents_Executive Summary
CSU Fullerton - IS - 282
Organizing more details IS 282 Edward Pai, Ph.D. 16 October 2001 Much of the material included in this lecture is from Essentials of Systems Analysis and Design First Edition, available: http:/cwx.prenhall.com/bookbind/pubbooks/ valacich/3 part
Charleston Law - MA - 536
MA 536Selected Answers and Hints, Exercises 41.2.The value matrix, scaled value matrix, and tables of concordance and discordance are shown below. Unscaled Values: A1 A2 A3 A4 A5 A6 A7 Scaled Values and Weights: A1 A2 A3 A4 A5 A6 A7 Weights
Charleston Law - MA - 536
When are Linear Evaluations Appropriate? The Two-Criterion Case Recall that an evaluation is a mapping V : A 6 with the interpretation that larger values of V(Ai) signify &quot;better&quot; alternatives Ai. Usually, V(Ai) = F(w, v(Ai), where F(@, @) is the ev
Charleston Law - MA - 536
MA 536: Exercises 5 1. Suppose that the Bisection Method is used to find a value function fj(@) for a positive criterion Qj, where the values of consequences on Qj fall between 5 and 25 (inclusive). You find the values of fj(5) = 0, fj(10) = 40, fj(1
Charleston Law - MA - 536
MA 536: Exercises 6 1. The table at the right reproduces an example from the Notes titled Separability. Recall that the preference ordering over the alternatives is A TM B TM C TM D TM E TM F TM G TM H. By finding all relevant conditional preference