University Convocation IT 3203 Introduction to Web Development Creating Objects Accessing Property Values

Size: px
Start display at page:

Download "University Convocation IT 3203 Introduction to Web Development Creating Objects Accessing Property Values"

Transcription

1 IT 3203 Introduction to Web Development JavaScript II Labeling Systems October 7 Notice: This session is being recorded. Copyright 2007 by Bob Brown University Convocation Tuesday, October 13, 11:00 12:15 AM Student Center Theatre Convocation Speaker: Dr. John Palfrey Speaking on Born Digital in a Network Society Professor at Harvard Law School Vice Dean for Library and Information Resources Co-author of Born Digital: Understanding the First Generation of Digital Natives and also Access Denied: The Practice and Politics of Internet Filtering Creating Objects The new operator creates an object with no properties: var mycar = new Object(); mycar.make = 'Ford'; mycar.model = 'Crown Victoria'; Objects can be nested mycar.engine = new Object; mycar.engine.hp = 200; Accessing Property Values Two equivalent ways: prop1 = mycar.make; prop2 = mycar["make"]; Prefer the first form. Access to properties that don t exist returns an undefined value. Deleting a Property The delete keyword: delete mycar.make; What s in an Object? The for-in operator iterates over the properties of an object: for (var aproperty in mycar){ document.write ("Name: " + aproperty + "; Value: " + mycar[aproperty] + "<br />\n");

2 The Result of for-in Name: make; Value: Ford Name: model; Value: Crown Victoria Name: engine; Value: [object Object] Arrays Arrays are objects with special functionality. Array elements can be: Primitives Objects (including other arrays!) Arrays have dynamic length Creating Arrays There are two ways to create an array With a constructor: var bobsarray = new Array(1, 2, "three"); var billsarray = new Array(100); Implicitly, with an element list var bettysarray = [1, 2, "three"]; Characteristics of Arrays Subscripts start at zero. bobsarray[7] = 132; Arrays have a length property; the length is the highest subscript plus one. The length property is writable! bettysarray.length = 1234; But don t! Only assigned elements occupy space Array Methods tostring: Creates a single string that is the concatenation of all the elements in an array, with comma separators. join: Like tostring, but with a specified separator. reverse: Reverses the order of the elements sort: Sorts the elements alphabetically Concat Concatenates new elements onto an existing array and returns a new array var bobsarray=['1', '2', '3']; bettysarray=['6', '7']; megansarray=bobsarray.concat(bettysarray,'4'); Will be: 1, 2, 3, 6, 7, 4

3 Slice Returns a contiguous subset of an array bobsarray = new Array(2,4,6,8,10); billsarray = bobsarray.slice(1,3) Will be: 4,6 A slice two elements long beginning at index 1. From the starting index, up to but not including the ending index. If there s no second parameter, the remainder of the array is copied. Push and Pop Add or remove elements at the end of an array. var reindeer=new Array('Dasher', 'Dancer', 'Donder', 'Blixem'); var lastdeer = reindeer.pop() lastdeer will be Blixem reindeer.push('rudolph'); Now Dasher, Dancer, Donder, Rudolph Donder is Dutch for thunder, so that other reindeer has to be named Blixem and not Blitzen. Shift and Unshift Add or remove elements at the beginning of an array; shift removes ( shifts out ) and unshift inserts. var reindeer=new Array('Dasher', 'Dancer', 'Donder', 'Blixem'); var firstdeer = reindeer.shift(); firstdeer is Dasher reindeer.unshift('rudolph'); Now Rudolph, Dancer, Donder, Blixem Multidimensional Arrays Implement multidimensional arrays as arrays of arrays. var threed = [[2,4,6], [1,3,5], [10,20,30]]; answer = threed[1][2]; answer becomes 5. Associative Arrays JavaScript arrays can use strings as subscripts to form an associative array, also called a hash. var ages = new Array(); ages["megan"] = 24; ages["bob"] = "sixty-harrummmph!" var niece_age = ages["megan"]; // becomes 24 var who = "Megan"; niece_age = ages[who]; // also 24 JavaScript Functions All JavaScript subprograms are functions. Defining a function: function name (params) {// body function myfunc(x) { rvalue = x * x; return rvalue; If no parameters needed, define with empty ( )

4 Functions and Statements If a function returns undefined, it is a stand-alone statement. Otherwise it can participate in expressions, including assignments a = b + myfunc(c); If no parameters are needed, call with empty ( ) Functions Must Be Defined Before Use Function definitions generally go in <head> Define functions before calling them: calls in <body> calls further down in <head> Local Variables var within a function definition creates a local variable. (Implicit definition does not.) Within the function, the local definition takes precedence over globals of the same name. var a=4, b=8; function myfunc() { var a = 0; a is local b = a; b is global Functions and Parameters Formal parameters in the function definition function myfunc(x, y) { x = x*x; return x + y/2; The two a s are not the same! The two b s are the same variable. Parameter Passing Formal parameters in the function definition Actual parameters in the function call function myfunc(x, y) {... z = myfunc(q, r); For primitives, formal parameters receive copies of actual parameters; call by value. For objects, formal parameters receive object references; call by name. Parameters and Side Effects Side effect: A function has a side-effect when it changes some variable outside itself. Generally, this is bad. Return a value instead. Side effects are impossible with primitive parameters, unless you modify a global variable. So, modifying global variables is generally bad. Side effects are possible and even likely when objects are passed as parameters.

5 The median Example Median: the middle of a list of elements odd: the value of the middle element even: mean of middle two One approach: use the sort method to sort the array. This has a side effect the array becomes sorted. Bad. Returning from a Function The return statement: returns to the caller passes a value (possibly undefined ) function sq(x) { return x*x; a = sq(2); // a becomes 4 If return is omitted, returns after last executable statement, passes back undefined Number and Type of Parameters JavaScript does no type checking of parameters (use typeof in your functions) JavaScript does not enforce correspondence between the number of formal parameters and the number of actual parameters. Too many actual parameters: excess ignored. Too few: the rest are undefined. The arguments[ ] Array A function s parameters are available in the arguments[ ] array. arguments.length is the number of parameters Can be used to write functions with: a variable number of parameters unnamed parameters Sort Revisited A caller to sort can supply a comparison function that understands the array contents. The function must return: a negative number if items already in order a positive number if a swap is needed zero if items are equal function num_order (a, b) { return a b; numberlist.sort(num_order) ; Reminder: Creating Objects The new operator creates an object with no properties. var mycar = new Object(); mycar.make = "Ford"; Objects can be nested mycar.engine = new Object(); mycar.engine.hp = 200;

6 JavaScript Constructors Constructors create and initialize properties of newlycreated objects. Every new expression must include a call to a constructor var mycar = new Object(); The constructor is named the same as the object being created. There are built-in constructors, e.g. Object Writing Constructors A constructor is a function, so you can write your own constructors. Constructor for a Car object: function Car (make, model, year) { this.make = make; this.model = model; this.year = year; this is a reference to the object being created var yourcar = new Car("Ford", "SVT", 2004); var mycar = new Car("Mazda", "RX-7", 1979); Writing Your Own Methods Methods are implemented as functions, so... write a function function display_car () {... then add function to the object in the constructor this.display = display_car; invoke the function through the object mycar.display(); Code for a Method function display_car() { for (var aproperty in this){ // Don't display methods if (typeof(this[aproperty])!= "function") { document.write (aproperty + "=" + this[aproperty] + "<br />\n"); // end of if // end of for // end of function display_car Methods in Constructors New constructor for a Car object: function Car (make, model, year) { this.make = make; this.model = model; this.year = year; this.display = display_car; The right side of the assignment is the name of the function, not a function call! More About Constructors and Objects Objects created by the same constructor have the same set of properties and methods, initially. properties can be added properties can be deleted There is no convenient way to determine whether two objects have the same set of properties or methods.

7 Labeling Systems Here is a Web Page Feedback in a conversation is immediate; Feedback when we converse via a Web site is at best delayed. What we call things (labels) are an important part of the conversation. Kinds of Labels Navigation system choices Contextual links Headings Index terms Labels Within Navigation Systems MIND & SPIRIT?!? Labels Within Navigation Systems Labels as Contextual Links

8 Labels as Headings Labels as Index Items About Iconic Labels How Jet Blue Fixed It Content Users Context Considerations in Designing Labels General Guidelines Narrow scope Labeling systems, not labels; consider: Style Presentation Syntax Granularity Comprehensiveness Audience

9 Sources of Labels Your current site Your competitors Controlled vocabularies, thesauri Search logs Creating Labeling Systems Content analysis Content authors Subject matter experts User advocates Users Usability testing Tuning and Tweaking Review the list Remove duplicates Resolve synonyms Review for consistency Plan ahead Questions

CSC Web Programming. Introduction to JavaScript

CSC Web Programming. Introduction to JavaScript CSC 242 - Web Programming Introduction to JavaScript JavaScript JavaScript is a client-side scripting language the code is executed by the web browser JavaScript is an embedded language it relies on its

More information

Introduction to Web Tech and Programming

Introduction to Web Tech and Programming Introduction to Web Tech and Programming Objects Objects Arrays JavaScript Objects Objects are an unordered collection of properties. Basically variables holding variables. Have the form name : value name

More information

Client-Side Web Technologies. JavaScript Part I

Client-Side Web Technologies. JavaScript Part I Client-Side Web Technologies JavaScript Part I JavaScript First appeared in 1996 in Netscape Navigator Main purpose was to handle input validation that was currently being done server-side Now a powerful

More information

Lecture 3: The Basics of JavaScript. Background. Needs for Programming Capability. Origin of JavaScript. Using Client-side JavaScript

Lecture 3: The Basics of JavaScript. Background. Needs for Programming Capability. Origin of JavaScript. Using Client-side JavaScript Lecture 3: The Basics of JavaScript Wendy Liu CSC309F Fall 2007 Background Origin and facts 1 2 Needs for Programming Capability XHTML and CSS allows the browser to passively display static content How

More information

JavaScript CS 4640 Programming Languages for Web Applications

JavaScript CS 4640 Programming Languages for Web Applications JavaScript CS 4640 Programming Languages for Web Applications 1 How HTML, CSS, and JS Fit Together {css} javascript() Content layer The HTML gives the page structure and adds semantics Presentation

More information

JavaScript CS 4640 Programming Languages for Web Applications

JavaScript CS 4640 Programming Languages for Web Applications JavaScript CS 4640 Programming Languages for Web Applications 1 How HTML, CSS, and JS Fit Together {css} javascript() Content layer The HTML gives the page structure and adds semantics Presentation

More information

JavaScript: Objects, Methods, Prototypes

JavaScript: Objects, Methods, Prototypes JavaScript: Objects, Methods, Prototypes Computer Science and Engineering College of Engineering The Ohio State University Lecture 22 What is an Object? Property: a key/value pair (aka "name"/value) Object:

More information

UNIT-III THE BASICS OF JAVASCRIPT

UNIT-III THE BASICS OF JAVASCRIPT UNIT-III THE BASICS OF JAVASCRIPT 3.1 Overview of Javascript 3.1.1 Origins Javascript which was originally developed at Netscape by Brendan Eich, was initially named Mocha but soon after was renamed LiveScript.

More information

JavaScript. History. Adding JavaScript to a page. CS144: Web Applications

JavaScript. History. Adding JavaScript to a page. CS144: Web Applications JavaScript Started as a simple script in a Web page that is interpreted and run by the browser Supported by most modern browsers Allows dynamic update of a web page More generally, allows running an arbitrary

More information

They grow as needed, and may be made to shrink. Officially, a Perl array is a variable whose value is a list.

They grow as needed, and may be made to shrink. Officially, a Perl array is a variable whose value is a list. Arrays Perl arrays store lists of scalar values, which may be of different types. They grow as needed, and may be made to shrink. Officially, a Perl array is a variable whose value is a list. A list literal

More information

Web Application Development

Web Application Development Web Application Development Produced by David Drohan (ddrohan@wit.ie) Department of Computing & Mathematics Waterford Institute of Technology http://www.wit.ie JavaScript JAVASCRIPT FUNDAMENTALS Agenda

More information

Chapter 4 Basics of JavaScript

Chapter 4 Basics of JavaScript Chapter 4 Basics of JavaScript JavaScript/EcmaScript References The official EcmaScript, third edition, specification http://www.ecma-international.org/publications/files/ecma-st/ecma-262.pdf A working

More information

CSCE 120: Learning To Code

CSCE 120: Learning To Code CSCE 120: Learning To Code Manipulating Data I Introduction This module is designed to get you started working with data by understanding and using variables and data types in JavaScript. It will also

More information

Basics of JavaScript. Last Week. Needs for Programming Capability. Browser as Development Platform. Using Client-side JavaScript. Origin of JavaScript

Basics of JavaScript. Last Week. Needs for Programming Capability. Browser as Development Platform. Using Client-side JavaScript. Origin of JavaScript Basics of JavaScript History of the Web XHTML CSS Last Week Nan Niu (nn@cs.toronto.edu) CSC309 -- Fall 2008 2 Needs for Programming Capability XHTML and CSS allows the browser to passively display static

More information

JavaScript. History. Adding JavaScript to a page. CS144: Web Applications

JavaScript. History. Adding JavaScript to a page. CS144: Web Applications JavaScript Started as a simple script in a Web page that is interpreted and run by the browser Supported by most modern browsers Allows dynamic update of a web page More generally, allows running an arbitrary

More information

Language Based isolation of Untrusted JavaScript

Language Based isolation of Untrusted JavaScript Dept. of Computer Science, Stanford University Joint work with Sergio Maffeis (Imperial College London) and John C. Mitchell (Stanford University) Outline 1 Motivation 2 Case Study : FBJS Design Attacks

More information

Computer Programming: C++

Computer Programming: C++ The Islamic University of Gaza Engineering Faculty Department of Computer Engineering Fall 2017 ECOM 2003 Muath i.alnabris Computer Programming: C++ Experiment #7 Arrays Part II Passing Array to a Function

More information

Python I. Some material adapted from Upenn cmpe391 slides and other sources

Python I. Some material adapted from Upenn cmpe391 slides and other sources Python I Some material adapted from Upenn cmpe391 slides and other sources Overview Names & Assignment Data types Sequences types: Lists, Tuples, and Strings Mutability Understanding Reference Semantics

More information

Language Reference Manual simplicity

Language Reference Manual simplicity Language Reference Manual simplicity Course: COMS S4115 Professor: Dr. Stephen Edwards TA: Graham Gobieski Date: July 20, 2016 Group members Rui Gu rg2970 Adam Hadar anh2130 Zachary Moffitt znm2104 Suzanna

More information

Announcements. My office hours are today in Gates 160 from 1PM-3PM. Programming Project 3 checkpoint due tomorrow night at 11:59PM.

Announcements. My office hours are today in Gates 160 from 1PM-3PM. Programming Project 3 checkpoint due tomorrow night at 11:59PM. IR Generation Announcements My office hours are today in Gates 160 from 1PM-3PM. Programming Project 3 checkpoint due tomorrow night at 11:59PM. This is a hard deadline and no late submissions will be

More information

COMP519 Web Programming Lecture 12: JavaScript (Part 3) Handouts

COMP519 Web Programming Lecture 12: JavaScript (Part 3) Handouts COMP519 Web Programming Lecture 12: JavaScript (Part 3) Handouts Ullrich Hustadt Department of Computer Science School of Electrical Engineering, Electronics, and Computer Science University of Liverpool

More information

Javascript Arrays, Object & Functions

Javascript Arrays, Object & Functions Javascript Arrays, Object & Functions Agenda Creating & Using Arrays Creating & Using Objects Creating & Using Functions 2 Creating & Using Arrays Arrays are a type of object that are ordered by the index

More information

Chapter 6 Introduction to Defining Classes

Chapter 6 Introduction to Defining Classes Introduction to Defining Classes Fundamentals of Java: AP Computer Science Essentials, 4th Edition 1 Objectives Design and implement a simple class from user requirements. Organize a program in terms of

More information

JAVASCRIPT AND JQUERY: AN INTRODUCTION (WEB PROGRAMMING, X452.1)

JAVASCRIPT AND JQUERY: AN INTRODUCTION (WEB PROGRAMMING, X452.1) Technology & Information Management Instructor: Michael Kremer, Ph.D. Class 4 Professional Program: Data Administration and Management JAVASCRIPT AND JQUERY: AN INTRODUCTION (WEB PROGRAMMING, X452.1) AGENDA

More information

Introduction to Visual Basic and Visual C++ Arithmetic Expression. Arithmetic Expression. Using Arithmetic Expression. Lesson 4.

Introduction to Visual Basic and Visual C++ Arithmetic Expression. Arithmetic Expression. Using Arithmetic Expression. Lesson 4. Introduction to Visual Basic and Visual C++ Arithmetic Expression Lesson 4 Calculation I154-1-A A @ Peter Lo 2010 1 I154-1-A A @ Peter Lo 2010 2 Arithmetic Expression Using Arithmetic Expression Calculations

More information

JAVASCRIPT AND JQUERY: AN INTRODUCTION (WEB PROGRAMMING, X452.1)

JAVASCRIPT AND JQUERY: AN INTRODUCTION (WEB PROGRAMMING, X452.1) Technology & Information Management Instructor: Michael Kremer, Ph.D. Class 2 Professional Program: Data Administration and Management JAVASCRIPT AND JQUERY: AN INTRODUCTION (WEB PROGRAMMING, X452.1) AGENDA

More information

Chapter 2 Using Data. Instructor s Manual Table of Contents. At a Glance. Overview. Objectives. Teaching Tips. Quick Quizzes. Class Discussion Topics

Chapter 2 Using Data. Instructor s Manual Table of Contents. At a Glance. Overview. Objectives. Teaching Tips. Quick Quizzes. Class Discussion Topics Java Programming, Sixth Edition 2-1 Chapter 2 Using Data At a Glance Instructor s Manual Table of Contents Overview Objectives Teaching Tips Quick Quizzes Class Discussion Topics Additional Projects Additional

More information

15.1 Origins and Uses of Ruby

15.1 Origins and Uses of Ruby 15.1 Origins and Uses of Ruby - Designed by Yukihiro Matsumoto; released in 1996 - Use spread rapidly in Japan - Use is now growing in part because of its use in Rails - A pure object-oriented purely interpreted

More information

IBE101: Introduction to Information Architecture. Hans Fredrik Nordhaug 2008

IBE101: Introduction to Information Architecture. Hans Fredrik Nordhaug 2008 IBE101: Introduction to Information Architecture Hans Fredrik Nordhaug 2008 Objectives Defining IA Practicing IA User Needs and Behaviors The anatomy of IA Organizations Systems Labelling Systems Navigation

More information

Administration. Classes. Objects Part II. Agenda. Review: Object References. Object Aliases. CS 99 Summer 2000 Michael Clarkson Lecture 7

Administration. Classes. Objects Part II. Agenda. Review: Object References. Object Aliases. CS 99 Summer 2000 Michael Clarkson Lecture 7 Administration Classes CS 99 Summer 2000 Michael Clarkson Lecture 7 Lab 7 due tomorrow Question: Lab 6.equals( SquareRoot )? Lab 8 posted today Prelim 2 in six days! Covers two weeks of material: lectures

More information

Introduction to JavaScript p. 1 JavaScript Myths p. 2 Versions of JavaScript p. 2 Client-Side JavaScript p. 3 JavaScript in Other Contexts p.

Introduction to JavaScript p. 1 JavaScript Myths p. 2 Versions of JavaScript p. 2 Client-Side JavaScript p. 3 JavaScript in Other Contexts p. Preface p. xiii Introduction to JavaScript p. 1 JavaScript Myths p. 2 Versions of JavaScript p. 2 Client-Side JavaScript p. 3 JavaScript in Other Contexts p. 5 Client-Side JavaScript: Executable Content

More information

More Perl. CS174 Chris Pollett Oct 25, 2006.

More Perl. CS174 Chris Pollett Oct 25, 2006. More Perl CS174 Chris Pollett Oct 25, 2006. Outline Loops Arrays Hashes Functions Selection Redux Last day we learned about how if-else works in Perl. Perl does not have a switch statement Like Javascript,

More information

Full file at

Full file at Java Programming, Fifth Edition 2-1 Chapter 2 Using Data within a Program At a Glance Instructor s Manual Table of Contents Overview Objectives Teaching Tips Quick Quizzes Class Discussion Topics Additional

More information

JavaScript. Training Offer for JavaScript Introduction JavaScript. JavaScript Objects

JavaScript. Training Offer for JavaScript Introduction JavaScript. JavaScript Objects JavaScript CAC Noida is an ISO 9001:2015 certified training center with professional experience that dates back to 2005. The vision is to provide professional education merging corporate culture globally

More information

How invariants help writing loops Author: Sander Kooijmans Document version: 1.0

How invariants help writing loops Author: Sander Kooijmans Document version: 1.0 How invariants help writing loops Author: Sander Kooijmans Document version: 1.0 Why this document? Did you ever feel frustrated because of a nasty bug in your code? Did you spend hours looking at the

More information

JavaScript Functions, Objects and Array

JavaScript Functions, Objects and Array JavaScript Functions, Objects and Array Defining a Function A definition starts with the word function. A name follows that must start with a letter or underscore, followed by any number of letters, digits,

More information

CSCI-GA Scripting Languages

CSCI-GA Scripting Languages CSCI-GA.3033.003 Scripting Languages 12/02/2013 OCaml 1 Acknowledgement The material on these slides is based on notes provided by Dexter Kozen. 2 About OCaml A functional programming language All computation

More information

JavaScript I VP R 1. Copyright 2006 Haim Levkowitz. Outline

JavaScript I VP R 1. Copyright 2006 Haim Levkowitz. Outline JavaScript I VP R 1 Outline Goals and Objectives Introduction JavaScript and Java Embedding JavaScript in XHTML Variables Statements Expressions and Operators Control Structures Code Execution Input and

More information

Santa s Reindeer Challenge - A solution using DMN and BPMN

Santa s Reindeer Challenge - A solution using DMN and BPMN Santa s Reindeer Challenge - A solution using DMN and BPMN Rob Parker, 11 Dec 2017 Problem The DMCommunity.org has created a Christmas challenge. The challenge is replicated below; Santa always leaves

More information

CGS 3066: Spring 2015 JavaScript Reference

CGS 3066: Spring 2015 JavaScript Reference CGS 3066: Spring 2015 JavaScript Reference Can also be used as a study guide. Only covers topics discussed in class. 1 Introduction JavaScript is a scripting language produced by Netscape for use within

More information

Chapter 2 Working with Data Types and Operators

Chapter 2 Working with Data Types and Operators JavaScript, Fourth Edition 2-1 Chapter 2 Working with Data Types and Operators At a Glance Instructor s Manual Table of Contents Overview Objectives Teaching Tips Quick Quizzes Class Discussion Topics

More information

RTL Reference 1. JVM. 2. Lexical Conventions

RTL Reference 1. JVM. 2. Lexical Conventions RTL Reference 1. JVM Record Transformation Language (RTL) runs on the JVM. Runtime support for operations on data types are all implemented in Java. This constrains the data types to be compatible to Java's

More information

JavaScript Lecture 2

JavaScript Lecture 2 JavaScript Lecture 2 Waterford Institute of Technology May 5, 2016 John Fitzgerald Waterford Institute of Technology, JavaScriptLecture 2 1/28 JavaScript Introduction Topics discussed this presentation

More information

Java How to Program, 10/e. Copyright by Pearson Education, Inc. All Rights Reserved.

Java How to Program, 10/e. Copyright by Pearson Education, Inc. All Rights Reserved. Java How to Program, 10/e Copyright 1992-2015 by Pearson Education, Inc. All Rights Reserved. Data structures Collections of related data items. Discussed in depth in Chapters 16 21. Array objects Data

More information

Assembler Language "Boot Camp" Part 2 - Instructions and Addressing. SHARE 118 in Atlanta Session March 12, 2012

Assembler Language Boot Camp Part 2 - Instructions and Addressing. SHARE 118 in Atlanta Session March 12, 2012 Assembler Language "Boot Camp" Part 2 - Instructions and Addressing SHARE 118 in Atlanta Session 10345 March 12, 2012 1 Introduction Who are we? John Ehrman, IBM Software Group Dan Greiner, IBM Systems

More information

The course is supplemented by numerous hands-on labs that help attendees reinforce their theoretical knowledge of the learned material.

The course is supplemented by numerous hands-on labs that help attendees reinforce their theoretical knowledge of the learned material. Lincoln Land Community College Capital City Training Center 130 West Mason Springfield, IL 62702 217-782-7436 www.llcc.edu/cctc WA2442 Introduction to JavaScript Objectives This intensive training course

More information

KLiC C++ Programming. (KLiC Certificate in C++ Programming)

KLiC C++ Programming. (KLiC Certificate in C++ Programming) KLiC C++ Programming (KLiC Certificate in C++ Programming) Turbo C Skills: Pre-requisite Knowledge and Skills, Inspire with C Programming, Checklist for Installation, The Programming Languages, The main

More information

Assembler Language "Boot Camp" Part 2 - Instructions and Addressing SHARE 116 in Anaheim February 28, 2011

Assembler Language Boot Camp Part 2 - Instructions and Addressing SHARE 116 in Anaheim February 28, 2011 Assembler Language "Boot Camp" Part 2 - Instructions and Addressing SHARE 116 in Anaheim February 28, 2011 Introduction Who are we? John Ehrman, IBM Software Group John Dravnieks, IBM Software Group Dan

More information

COMP284 Scripting Languages Lecture 15: JavaScript (Part 2) Handouts

COMP284 Scripting Languages Lecture 15: JavaScript (Part 2) Handouts COMP284 Scripting Languages Lecture 15: JavaScript (Part 2) Handouts Ullrich Hustadt Department of Computer Science School of Electrical Engineering, Electronics, and Computer Science University of Liverpool

More information

Decaf Language Reference Manual

Decaf Language Reference Manual Decaf Language Reference Manual C. R. Ramakrishnan Department of Computer Science SUNY at Stony Brook Stony Brook, NY 11794-4400 cram@cs.stonybrook.edu February 12, 2012 Decaf is a small object oriented

More information

YES User Guide Enrollment

YES User Guide Enrollment YES User Guide Enrollment Adding a Class to the Cart 1. On the student landing page, click Student Registration. 2. Use the drop down arrow to select the term. 3. Enter the subject area, course number,

More information

Web Programming and Design. MPT Junior Cycle Tutor: Tamara Demonstrators: Aaron, Marion, Hugh

Web Programming and Design. MPT Junior Cycle Tutor: Tamara Demonstrators: Aaron, Marion, Hugh Web Programming and Design MPT Junior Cycle Tutor: Tamara Demonstrators: Aaron, Marion, Hugh Plan for the next 5 weeks: Introduction to HTML tags, creating our template file Introduction to CSS and style

More information

Numbers Implicit This Static Methods and Fields Packages Access Modifiers Main Overloading Exceptions Etc.

Numbers Implicit This Static Methods and Fields Packages Access Modifiers Main Overloading Exceptions Etc. Numbers Implicit This Static Methods and Fields Packages Access Modifiers Main Overloading Exceptions Etc. 1 Integers Java s number system: byte an integer between -128 and 127 short an integer between

More information

JavaScript: Sort of a Big Deal,

JavaScript: Sort of a Big Deal, : Sort of a Big Deal, But Sort of Quirky... March 20, 2017 Lisp in C s Clothing (Crockford, 2001) Dynamically Typed: no static type annotations or type checks. C-Like Syntax: curly-braces, for, semicolons,

More information

A control expression must evaluate to a value that can be interpreted as true or false.

A control expression must evaluate to a value that can be interpreted as true or false. Control Statements Control Expressions A control expression must evaluate to a value that can be interpreted as true or false. How a control statement behaves depends on the value of its control expression.

More information

Building Java Programs

Building Java Programs Building Java Programs A Back to Basics Approach Stuart Reges I Marty Stepp University ofwashington Preface 3 Chapter 1 Introduction to Java Programming 25 1.1 Basic Computing Concepts 26 Why Programming?

More information

Pathologically Eclectic Rubbish Lister

Pathologically Eclectic Rubbish Lister Pathologically Eclectic Rubbish Lister 1 Perl Design Philosophy Author: Reuben Francis Cornel perl is an acronym for Practical Extraction and Report Language. But I guess the title is a rough translation

More information

Learning Language. Reference Manual. George Liao (gkl2104) Joseanibal Colon Ramos (jc2373) Stephen Robinson (sar2120) Huabiao Xu(hx2104)

Learning Language. Reference Manual. George Liao (gkl2104) Joseanibal Colon Ramos (jc2373) Stephen Robinson (sar2120) Huabiao Xu(hx2104) Learning Language Reference Manual 1 George Liao (gkl2104) Joseanibal Colon Ramos (jc2373) Stephen Robinson (sar2120) Huabiao Xu(hx2104) A. Introduction Learning Language is a programming language designed

More information

\n is used in a string to indicate the newline character. An expression produces data. The simplest expression

\n is used in a string to indicate the newline character. An expression produces data. The simplest expression Chapter 1 Summary Comments are indicated by a hash sign # (also known as the pound or number sign). Text to the right of the hash sign is ignored. (But, hash loses its special meaning if it is part of

More information

Absolute C++ Walter Savitch

Absolute C++ Walter Savitch Absolute C++ sixth edition Walter Savitch Global edition This page intentionally left blank Absolute C++, Global Edition Cover Title Page Copyright Page Preface Acknowledgments Brief Contents Contents

More information

C++ (Non for C Programmer) (BT307) 40 Hours

C++ (Non for C Programmer) (BT307) 40 Hours C++ (Non for C Programmer) (BT307) 40 Hours Overview C++ is undoubtedly one of the most widely used programming language for implementing object-oriented systems. The C++ language is based on the popular

More information

Chapter 3: Operators, Expressions and Type Conversion

Chapter 3: Operators, Expressions and Type Conversion 101 Chapter 3 Operators, Expressions and Type Conversion Chapter 3: Operators, Expressions and Type Conversion Objectives To use basic arithmetic operators. To use increment and decrement operators. To

More information

The PCAT Programming Language Reference Manual

The PCAT Programming Language Reference Manual The PCAT Programming Language Reference Manual Andrew Tolmach and Jingke Li Dept. of Computer Science Portland State University September 27, 1995 (revised October 15, 2002) 1 Introduction The PCAT language

More information

Continuing Education Course #192 Web-Based Programming For Engineers - Part 3

Continuing Education Course #192 Web-Based Programming For Engineers - Part 3 1 of 5 Continuing Education Course #192 Web-Based Programming For Engineers - Part 3 1. What is the value of x at the end of this JavaScript script? var x = 5; var y = 2; if (x > y) x = x + y; else x =

More information

3 The Building Blocks: Data Types, Literals, and Variables

3 The Building Blocks: Data Types, Literals, and Variables chapter 3 The Building Blocks: Data Types, Literals, and Variables 3.1 Data Types A program can do many things, including calculations, sorting names, preparing phone lists, displaying images, validating

More information

Getting to Know InfoTables

Getting to Know InfoTables Getting to Know InfoTables The InfoTable is an often used and sometimes misunderstood data structure in the Thingworx platform. Many Service calls use InfoTables as input parameters and output return values

More information

How to Work with a Reference Answer Set

How to Work with a Reference Answer Set How to Work with a Reference Answer Set Easily identify and isolate references of interest Quickly retrieve relevant information from the world s largest, publicly available reference database for chemistry

More information

Perl Scripting. Students Will Learn. Course Description. Duration: 4 Days. Price: $2295

Perl Scripting. Students Will Learn. Course Description. Duration: 4 Days. Price: $2295 Perl Scripting Duration: 4 Days Price: $2295 Discounts: We offer multiple discount options. Click here for more info. Delivery Options: Attend face-to-face in the classroom, remote-live or on-demand streaming.

More information

Setting Up Your Public Profile

Setting Up Your Public Profile CHAPTER 3 These topics provide information that enable you to understand and set up your public profile: Understanding Your Public Profile, page 3-1 Privacy Options, page 3-8 Preferred Contact Method,

More information

Query Studio Training Guide Cognos 8 February 2010 DRAFT. Arkansas Public School Computer Network 101 East Capitol, Suite 101 Little Rock, AR 72201

Query Studio Training Guide Cognos 8 February 2010 DRAFT. Arkansas Public School Computer Network 101 East Capitol, Suite 101 Little Rock, AR 72201 Query Studio Training Guide Cognos 8 February 2010 DRAFT Arkansas Public School Computer Network 101 East Capitol, Suite 101 Little Rock, AR 72201 2 Table of Contents Accessing Cognos Query Studio... 5

More information

Using Lists (Arrays) Notes

Using Lists (Arrays) Notes Using Lists (Arrays) Notes - 27.11.16 Array/List = a data structure that allows for multiplied items or elements to be stored using just one variable name. Each element in a list is accessed using an index

More information

JavaScript Basics. Mendel Rosenblum. CS142 Lecture Notes - JavaScript Basics

JavaScript Basics. Mendel Rosenblum. CS142 Lecture Notes - JavaScript Basics JavaScript Basics Mendel Rosenblum 1 What is JavaScript? From Wikipedia:... high-level, dynamic, untyped, and interpreted programming language... is prototype-based with first-class functions,... supporting

More information

Java Primer 1: Types, Classes and Operators

Java Primer 1: Types, Classes and Operators Java Primer 1 3/18/14 Presentation for use with the textbook Data Structures and Algorithms in Java, 6th edition, by M. T. Goodrich, R. Tamassia, and M. H. Goldwasser, Wiley, 2014 Java Primer 1: Types,

More information

GIS 4653/5653: Spatial Programming and GIS. More Python: Statements, Types, Functions, Modules, Classes

GIS 4653/5653: Spatial Programming and GIS. More Python: Statements, Types, Functions, Modules, Classes GIS 4653/5653: Spatial Programming and GIS More Python: Statements, Types, Functions, Modules, Classes Statement Syntax The if-elif-else statement Indentation and and colons are important Parentheses and

More information

Chapter 9. Subprograms

Chapter 9. Subprograms Chapter 9 Subprograms Chapter 9 Topics Introduction Fundamentals of Subprograms Design Issues for Subprograms Local Referencing Environments Parameter-Passing Methods Parameters That Are Subprograms Calling

More information

Software Design and Analysis for Engineers

Software Design and Analysis for Engineers Software Design and Analysis for Engineers by Dr. Lesley Shannon Email: lshannon@ensc.sfu.ca Course Website: http://www.ensc.sfu.ca/~lshannon/courses/ensc251 Simon Fraser University Slide Set: 9 Date:

More information

JavaScript: More Syntax

JavaScript: More Syntax JavaScript: More Syntax CISC 282 October 23, 2018 null and undefined What s the difference? null is synonymous with nothing i.e., no value, nothing there undefined is synonymous with the unknown i.e.,

More information

Oracle Database: SQL and PL/SQL Fundamentals NEW

Oracle Database: SQL and PL/SQL Fundamentals NEW Oracle Database: SQL and PL/SQL Fundamentals NEW Duration: 5 Days What you will learn This Oracle Database: SQL and PL/SQL Fundamentals training delivers the fundamentals of SQL and PL/SQL along with the

More information

Node.js Training JavaScript. Richard richardrodger.com

Node.js Training JavaScript. Richard richardrodger.com Node.js Training JavaScript Richard Rodger @rjrodger richardrodger.com richard.rodger@nearform.com A New Look at JavaScript Embracing JavaScript JavaScript Data Structures JavaScript Functions Functional

More information

Produced by. App Development & Modelling. BSc in Applied Computing. Eamonn de Leastar

Produced by. App Development & Modelling. BSc in Applied Computing. Eamonn de Leastar App Development & Modelling BSc in Applied Computing Produced by Eamonn de Leastar (edeleastar@wit.ie) Department of Computing, Maths & Physics Waterford Institute of Technology http://www.wit.ie http://elearning.wit.ie

More information

4.1 Overview of JavaScript

4.1 Overview of JavaScript 4.1 Overview of JavaScript - Originally developed by Netscape by Brendan Eich, as LiveScript - Became a joint venture of Netscape and Sun in 1995, renamed JavaScript - Now standardized by the European

More information

Getting Started with Cisco Pulse

Getting Started with Cisco Pulse CHAPTER 2 These topics describe what you need know when initially logging into Cisco Pulse. Client and Browser Requirements, page 2-1 Logging Into Cisco Pulse, page 2-2 Getting Familiar with Your Home

More information

Such JavaScript Very Wow

Such JavaScript Very Wow Such JavaScript Very Wow Lecture 9 CGS 3066 Fall 2016 October 20, 2016 JavaScript Numbers JavaScript numbers can be written with, or without decimals. Extra large or extra small numbers can be written

More information

COMS 3101 Programming Languages: Perl. Lecture 2

COMS 3101 Programming Languages: Perl. Lecture 2 COMS 3101 Programming Languages: Perl Lecture 2 Fall 2013 Instructor: Ilia Vovsha http://www.cs.columbia.edu/~vovsha/coms3101/perl Lecture Outline Control Flow (continued) Input / Output Subroutines Concepts:

More information

Contents. Jairo Pava COMS W4115 June 28, 2013 LEARN: Language Reference Manual

Contents. Jairo Pava COMS W4115 June 28, 2013 LEARN: Language Reference Manual Jairo Pava COMS W4115 June 28, 2013 LEARN: Language Reference Manual Contents 1 Introduction...2 2 Lexical Conventions...2 3 Types...3 4 Syntax...3 5 Expressions...4 6 Declarations...8 7 Statements...9

More information

Oracle Database: SQL and PL/SQL Fundamentals Ed 2

Oracle Database: SQL and PL/SQL Fundamentals Ed 2 Oracle University Contact Us: Local: 1800 103 4775 Intl: +91 80 67863102 Oracle Database: SQL and PL/SQL Fundamentals Ed 2 Duration: 5 Days What you will learn This Oracle Database: SQL and PL/SQL Fundamentals

More information

Chapter 4 Defining Classes I

Chapter 4 Defining Classes I Chapter 4 Defining Classes I This chapter introduces the idea that students can create their own classes and therefore their own objects. Introduced is the idea of methods and instance variables as the

More information

JScript Reference. Contents

JScript Reference. Contents JScript Reference Contents Exploring the JScript Language JScript Example Altium Designer and Borland Delphi Run Time Libraries Server Processes JScript Source Files PRJSCR, JS and DFM files About JScript

More information

Hands-On Perl Scripting and CGI Programming

Hands-On Perl Scripting and CGI Programming Hands-On Course Description This hands on Perl programming course provides a thorough introduction to the Perl programming language, teaching attendees how to develop and maintain portable scripts useful

More information

PERL Scripting - Course Contents

PERL Scripting - Course Contents PERL Scripting - Course Contents Day - 1 Introduction to PERL Comments Reading from Standard Input Writing to Standard Output Scalar Variables Numbers and Strings Use of Single Quotes and Double Quotes

More information

Chapter 7. - FORTRAN I control statements were based directly on IBM 704 hardware

Chapter 7. - FORTRAN I control statements were based directly on IBM 704 hardware Levels of Control Flow: 1. Within expressions 2. Among program units 3. Among program statements Evolution: - FORTRAN I control statements were based directly on IBM 704 hardware - Much research and argument

More information

Review the Agenda with the participants

Review the Agenda with the participants Review the Agenda with the participants Read through the Learning Objectives with the participants Read through the slide using the mouse to advance the slide text; the slide will build one bullet at a

More information

Sprite an animation manipulation language Language Reference Manual

Sprite an animation manipulation language Language Reference Manual Sprite an animation manipulation language Language Reference Manual Team Leader Dave Smith Team Members Dan Benamy John Morales Monica Ranadive Table of Contents A. Introduction...3 B. Lexical Conventions...3

More information

Lesson Plan. Preparation

Lesson Plan. Preparation Math Practicum in Information Technology Lesson Plan Performance Objective Upon completion of this lesson, each student will be able to convert between different numbering systems and correctly write mathematical

More information

Oracle Database 11g: SQL and PL/SQL Fundamentals

Oracle Database 11g: SQL and PL/SQL Fundamentals Oracle University Contact Us: +33 (0) 1 57 60 20 81 Oracle Database 11g: SQL and PL/SQL Fundamentals Duration: 5 Days What you will learn In this course, students learn the fundamentals of SQL and PL/SQL

More information

Microsoft Visual Basic 2005: Reloaded

Microsoft Visual Basic 2005: Reloaded Microsoft Visual Basic 2005: Reloaded Second Edition Chapter 3 Variables, Constants, Methods, and Calculations Objectives After studying this chapter, you should be able to: Declare variables and named

More information

FRAC: Language Reference Manual

FRAC: Language Reference Manual FRAC: Language Reference Manual Justin Chiang jc4127 Kunal Kamath kak2211 Calvin Li ctl2124 Anne Zhang az2350 1. Introduction FRAC is a domain-specific programming language that enables the programmer

More information

Computer Programming II Python

Computer Programming II Python EXAM INFORMATION Items 32 Points 33 Prerequisites SECONDARY MATH I COMPUTER PROGRAMMING I Grade Level 10-12 Course Length ONE YEAR DESCRIPTION This is an advanced course in computer programming/software

More information

CSE 12 Week Eight, Lecture One

CSE 12 Week Eight, Lecture One CSE 12 Week Eight, Lecture One Heap: (The data structure, not the memory area) - A binary tree with properties: - 1. Parent s are greater than s. o the heap order - 2. Nodes are inserted so that tree is

More information

Draw a diagram of an empty circular queue and describe it to the reader.

Draw a diagram of an empty circular queue and describe it to the reader. 1020_1030_testquestions.text Wed Sep 10 10:40:46 2014 1 1983/84 COSC1020/30 Tests >>> The following was given to students. >>> Students can have a good idea of test questions by examining and trying the

More information