UI Implementation. John Jannotti. Mar 21, /course/cs0320/www/docs/lectures/ John Jannotti (cs32) UI Implementation Mar 21, / 26

Size: px
Start display at page:

Download "UI Implementation. John Jannotti. Mar 21, /course/cs0320/www/docs/lectures/ John Jannotti (cs32) UI Implementation Mar 21, / 26"

Transcription

1 UI Implementation John Jannotti /course/cs0320/www/docs/lectures/ Mar 21, 2017 John Jannotti (cs32) UI Implementation Mar 21, / 26

2 Announcements If you won t see/work with your partner over Spring Break, plan enough so you can work independently. Tomorrow is TA application deadline. Consider applying for CS33. CS queer, trans, and questioning mixer. Thursday 4pm, CIT 316. Mosaic+ info session tomorrow for pre-orientation facilitators. Jonathan Powell <jonathan_powell@brown.edu> John Jannotti (cs32) UI Implementation Mar 21, / 26

3 Two topics today How can you cleanly add functionality to HTML/JS frontends? We ll spend some time on Javascript itself. Then we ll figure out how to use and create functionality as jquery plugins. What goes into drawing a abstract model to a canvas? Mostly mapping abstract coordinates to screen coordinates. A bit about color, event handlers, etc. John Jannotti (cs32) UI Implementation Mar 21, / 26

4 Javascript Javascript looks a lot like Java. Javascript even sounds a lot like Java. But there are many differences, and the similarities were marketing choices. Fortunately, JS is still pretty nice. Just different. One downside, JS doesn t impose much structure. So you have to do it. Another: A lot of dark corners Best book: JavaScript: The Good Parts by Douglas Crockford On his webpage, you can find many worthwhile videos and other resources (like jslint). John Jannotti (cs32) UI Implementation Mar 21, / 26

5 Javascript (can be) OO, but different. In Java, methods are found by considering the class (and superclasses) of an object. In Javascript, there are only objects, not classes. But object fields can be functions, so you end up with syntax that looks just like Java s method invocation. 1 > c a t = { 2 t a l k : f u n c t i o n ( ) { c o n s o l e. l o g ( meow ) ; } 3 } 4 { t a l k : [ F u n c t i o n ] } 5 > c a t. t a l k ( ) 6 meow (Using node as a convenient command-line js interpreter.) John Jannotti (cs32) UI Implementation Mar 21, / 26

6 Prototypes So how does inheritance work? Objects have Prototypes, not classes. Field lookup proceeds through prototypes. The prototype can be set explicitly (Don t do that.) Even for built in types. (Don t ever do that.) 1 > a = {a1 : 1, a2 : 2, a3 : 3} 2 { a1 : 1, a2 : 2, a3 : 3 } 3 > b = Object. c r e a t e ( a ) ; 4 {} 5 > b. b1 = > b 8 { b1 : 1 } 9 > b. a2 0 2 John Jannotti (cs32) UI Implementation Mar 21, / 26

7 Constructors Protoypes are normally set automatically by constructors. Any function can be a constructor, by invoking with new. 1 > f u n c t i o n Point ( x, y ) { 2 t h i s. x = x ; 3 t h i s. y = y ; 4 } 5 u n d e f i n e d 6 > pt = Point ( 1, 3 ) ; 7 u n d e f i n e d 8 > [ x, y ] 9 [ 1, 3 ] 0 > pt = new Point ( 4, 5 ) ; 1 { x : 4, y : 5 } 2 > pt. x 3 4 TimeJohn tojannotti talk about (cs32) this. UI Implementation Mar 21, / 26

8 this is not what you think it is In Javascript, this must be used explicitly. Further, this should be thought of as context and is set a few ways. During object construction with new, this is a fresh object. Globally it begins set to some root object. window in browsers. Most Java-like: When a function is invoked through an object. f.apply, and f.call are used to invoke f with a specific this. f.bind(o) produces a new function, like f(), but where this will be o When browsers invoke event handlers, this is set to the DOM object. Most confusing: this is not set to an object, X, just because you call a function that you got by saying: const f = X.m; John Jannotti (cs32) UI Implementation Mar 21, / 26

9 More about new new F() allocates a new object, and sets this to it. F() is conventionally crafted to set up properties on this. By convention, name the function with capitals. Think of it as a class. 1 f u n c t i o n Point ( x, y ) { 2 t h i s. x = x ; 3 t h i s. y = y ; 4 t h i s. manhattan = f u n c t i o n ( pt ) { 5 r e t u r n Math. abs ( t h i s. x pt. x ) + Math. abs ( t h i s. y pt. 6 } 7 } John Jannotti (cs32) UI Implementation Mar 21, / 26

10 Back to prototypes The previous slide is creating a new manhattan function for every Point created. When new is used, the prototype field of the function is set up as the prototype of the new object. So Point() s prototype can be the one place where a single manhattan function object is created. 1 f u n c t i o n Point ( x, y ) { 2 t h i s. x = x ; 3 t h i s. y = y ; 4 } 5 Point. p r o t o t y p e. manhattan = f u n c t i o n ( pt ) { 6 r e t u r n Math. abs ( t h i s. x pt. x ) + Math. abs ( t h i s. y pt. y ) 7 } John Jannotti (cs32) UI Implementation Mar 21, / 26

11 In Ecmascript 6 1 c l a s s Point { 2 c o n s t r u c t o r ( x, y ) { 3 t h i s. x = x ; 4 t h i s. y = y ; 5 } 6 manhattan ( pt ) { 7 r e t u r n Math. abs ( t h i s. x pt. x ) + Math. abs ( t h i s. y pt. 8 } 9 } This is syntactic sugar for the previous slide. Use it. You ll cut down on your cognitive load. John Jannotti (cs32) UI Implementation Mar 21, / 26

12 So it all works out Taken together, these constructs make a perfectly servicable language. You can build abstract data types with as much or as little data hiding as you prefer. Mostly, follow conventions and ignore the machinery, like those proposed by Crockford. Actually, go all the way to es6 unless you have a reason you can t. John Jannotti (cs32) UI Implementation Mar 21, / 26

13 Javascript mistakes Which of these will do what it intends, without error? $ is jquery. 1 c l a s s P o i n t { 2 c o n s t r u c t o r ( x, y ) { t h i s. x = x ; t h i s. y = y ; } 3 d i s t a n c e ( p o i n t ) { / use t h i s. x, t h i s. y, pt. x, pt. y / } 4 d i s t a n c e ( l i n e ) { / use t h i s, l i n e. s t a r t, l i n e. end / } 5 } 6 c l a s s Counter { 7 c o n s t r u c t o r ( ) { t h i s. v a l u e = 0 ; } 8 add ( ) { t h i s. v a l u e ++; } 9 } 0 l e t c t r = new Counter ( ) ; A) Lines 1-5 B) $( #link ).click(alert( clicked )) C) Lines 6-10, then: $( #link ).click(ctr.add) D) const a = [4,2,3]; a.sort(); alert("two: "+a[0]); E) $( #message ).style.color = #FF2200 ; John Jannotti (cs32) UI Implementation Mar 21, / 26

14 The next layer of convention jquery, and its plugins consitute another set of conventions. They make it easier to combine functionality from many sources to operate on DOM objects. Calendar widgets, color pickers, fancy scrolling, etc. Each plugin is tidy with respect to namespace pollution. Each adds to the set of functions that can be called on jquery results. Each functions in a similar way. John Jannotti (cs32) UI Implementation Mar 21, / 26

15 Example: Date picker from jquery UI jquery UI is a single plugin that offers many new functions. To use: Include the css and js for the plugin (and jquery itself) Create the DOM object to operate on. Invoke the plugin (possibly onload ) 1 < s c r i p t> 2 $ ( f u n c t i o n ( ) { 3 $ ( #d a t e p i c k e r ). d a t e p i c k e r ( ) ; 4 } ) ; 5 </ s c r i p t> 6 <p>date : <i n p u t type= t e x t i d= d a t e p i c k e r ></p> John Jannotti (cs32) UI Implementation Mar 21, / 26

16 Example: Autocorrect Consider the multiple inputs design question from Autocorrect. Maybe you d like to make your autocorrect into a jquery plugin. Think about how you ll keep track of which of several text boxes might be in action. Follow conventions to keep code tidy. John Jannotti (cs32) UI Implementation Mar 21, / 26

17 autocorrect.js 1 ( f u n c t i o n ( $ ) { 2 // v a r s h e r e a r e scope by the I I F E 3 v a r p r i v a t e V a r i a b l e = 2 ; 4 5 $. f n. a u t o c o r r e c t = f u n c t i o n ( ) { 6 r e t u r n t h i s. each ( f u n c t i o n ( t e x t b o x ) { 7 t e x t b o x. on ( keyup change, f u n c t i o n ( ) { 8 $. get ( / a p i / s u g g e s t ). done ( f u n c t i o n ( data ) { 9 // I n s e r t the s u g g e s t i o n s i n t o the DOM. 0 data = JSON. p a r s e ( data ) ; 1 f o r ( v a r i = 0 ; i < data. l e n g t h ; i ++) { 2 // use t h i s to l o c a t e the t e x t b o x 3 } 4 } ) ; 5 } ) ; 6 } ) ; John Jannotti (cs32) UI Implementation Mar 21, / 26

18 Moving on to free form interfaces jquery is mostly about HTML, CSS, and the DOM. For the most flexibility, you might need to use canvas. Introduced in a Lab, canvas is about totally free drawing. You ll want to use it for Maps. If you have a geometric model (say, roads) Maybe you fetch details (roads in view) with AJAX. Lines are based on latitude, longitude end points. How do you translate them for drawing in canvas? John Jannotti (cs32) UI Implementation Mar 21, / 26

19 The X Window System X moves all drawing code into X Server. (which is local!) Isolates processes, as an OS kernel. Clients can only draw in their window. Communication with server is network-transparent. Application is an event-loop. Squint, and you can see HTML+JS and web backend as similar. John Jannotti (cs32) UI Implementation Mar 21, / 26

20 Drawing Basics Device Coordinates Pixels 0,0 in upper left (Why?) Pixels can be 1, 8, 24, 32 bits These days, in HTML/CSS a pixel (px) is not a device pixel. Provide finest control The UI looks exactly as you draw it. Most toolkits provide access to this level, but used sparingly. Often called a canvas (as it is in HTML) John Jannotti (cs32) UI Implementation Mar 21, / 26

21 Coordinate Transformations Translation: (x+u, y+v) Moved everything by (u,v) If you want to set the origin in the middle. Scaling: (Ax, By) Everything is scaled. Used to map (0-1, 0-1) to an arbitrary window. Reflection: (-x, y) or (x, -y) Map y coordinate so up is positive. Rotation (x cos θ + y sin θ, x sin θ + y cos θ) Rotation around the origin of θ, degrees. How will you draw Latitude / Longitude features? Remember that 1 latitude 1 longitude. John Jannotti (cs32) UI Implementation Mar 21, / 26

22 Expressing transforms with matrices Notice that most of those transforms are just multiplication. So they compose nicely. Matrix-vector multiplication is great notation. But what about translation? John Jannotti (cs32) UI Implementation Mar 21, / 26

23 Expressing transforms with matrices Notice that most of those transforms are just multiplication. So they compose nicely. Matrix-vector multiplication is great notation. But what about translation? An extra (unity) dimension allows translation. Express the input as (x, y, 1) and multiply by a 3x3 matrix. John Jannotti (cs32) UI Implementation Mar 21, / 26

24 Colors Red-green-blue (RGB) color model (in hex) for each #rrggbb format Don t like that? rgb(128, 256, 45) works fine in HTML/CSS. RGBA color model adds alpha channel transparency rgba(128, 128, 128, 0.5) half see through gray Blends with what is underneath HSL/HSLA color model Useful for information visualization Closer to human intuition hsl(120, 100%, 50%), hsla(120, 80%, 75%, 0.3); Choose a nice, consistent palette. Lots of sites to help. Need chart colors? Don t reach for Red, Green, Blue. John Jannotti (cs32) UI Implementation Mar 21, / 26

25 Layout Management Control the assembly in a composite Handle window size changes Simple layouts Grids, sequential, box Complex layouts Gridbag layout Spring layout Browser: tables, style-sheets Can be the most painful part of setting up a UI. Some things in CSS are easy, some are hard. Sorry. Handling resize is tricky, some designs punt with static layouts. Testing is tricky what constitutes a unit test? We won t hate you for using tables sparingly. Look into flexbox if you re ambitious. John Jannotti (cs32) UI Implementation Mar 21, / 26

26 Modern GUI Programming Inverted control structure Normally your program has control In a GUI application, the GUI has control Calls your program as needed Takes a little getting used to Two phase process Set up the interface by defining widgets Register callbacks for actions Start the user interface Handle events as callbacks John Jannotti (cs32) UI Implementation Mar 21, / 26

27 Callback Handling Callback is passed an Event object How to handle multiple events Multiple callback objects Callback object looks at event JS callbacks also have this set appropriately. Callback hints Avoid long-running callbacks. Javascript runs in a single thread. Web workers can get around that limitation. You don t have to use anonymous functions! But if you do, use arrow functions. John Jannotti (cs32) UI Implementation Mar 21, / 26

Announcements. John Jannotti (cs32) Design Patterns Feb 13, / 1

Announcements. John Jannotti (cs32) Design Patterns Feb 13, / 1 Announcements We ll code review Stars on Thursday. Volunteer your code by emailing me. Lab this week covers Ajax/Javascript. Interactive UIs. No lab (or lab hours) next week. Submit a group project idea

More information

Course Announcements. John Jannotti (cs32) Scope, Collections & Generics Feb 8, / 1

Course Announcements. John Jannotti (cs32) Scope, Collections & Generics Feb 8, / 1 Course Announcements Stars is due tomorrow. Stars grades should be out by next Monday. Javascript lab out today. How you make interactive webby GUIs. Today we re going to cover a bit of a hodge podge.

More information

Course Announcements. Bacon is due next Monday. Next lab is about drawing UIs. Today s lecture will help thinking about your DB interface.

Course Announcements. Bacon is due next Monday. Next lab is about drawing UIs. Today s lecture will help thinking about your DB interface. Course Announcements Bacon is due next Monday. Today s lecture will help thinking about your DB interface. Next lab is about drawing UIs. John Jannotti (cs32) ORMs Mar 9, 2017 1 / 24 ORMs John Jannotti

More information

Latches. October 13, 2003 Latches 1

Latches. October 13, 2003 Latches 1 Latches The second part of CS231 focuses on sequential circuits, where we add memory to the hardware that we ve already seen. Our schedule will be very similar to before: We first show how primitive memory

More information

Vectors. Vector Practice Problems: Odd-numbered problems from

Vectors. Vector Practice Problems: Odd-numbered problems from Vectors Vector Practice Problems: Odd-numbered problems from 3.1-3.21 After today, you should be able to: Understand vector notation Use basic trigonometry in order to find the x and y components of a

More information

Announcements Monday, September 18

Announcements Monday, September 18 Announcements Monday, September 18 WeBWorK 1.4, 1.5 are due on Wednesday at 11:59pm. The first midterm is on this Friday, September 22. Midterms happen during recitation. The exam covers through 1.5. About

More information

Lab 2: Static Response, Cantilevered Beam

Lab 2: Static Response, Cantilevered Beam Contents 1 Lab 2: Static Response, Cantilevered Beam 3 1.1 Objectives.......................................... 3 1.2 Scalars, Vectors and Matrices (Allen Downey)...................... 3 1.2.1 Attribution.....................................

More information

TheFourierTransformAndItsApplications-Lecture28

TheFourierTransformAndItsApplications-Lecture28 TheFourierTransformAndItsApplications-Lecture28 Instructor (Brad Osgood):All right. Let me remind you of the exam information as I said last time. I also sent out an announcement to the class this morning

More information

MA 1128: Lecture 08 03/02/2018. Linear Equations from Graphs And Linear Inequalities

MA 1128: Lecture 08 03/02/2018. Linear Equations from Graphs And Linear Inequalities MA 1128: Lecture 08 03/02/2018 Linear Equations from Graphs And Linear Inequalities Linear Equations from Graphs Given a line, we would like to be able to come up with an equation for it. I ll go over

More information

AMS 132: Discussion Section 2

AMS 132: Discussion Section 2 Prof. David Draper Department of Applied Mathematics and Statistics University of California, Santa Cruz AMS 132: Discussion Section 2 All computer operations in this course will be described for the Windows

More information

Chemical Applications of Symmetry and Group Theory Prof. Manabendra Chandra Department of Chemistry Indian Institute of Technology, Kanpur.

Chemical Applications of Symmetry and Group Theory Prof. Manabendra Chandra Department of Chemistry Indian Institute of Technology, Kanpur. Chemical Applications of Symmetry and Group Theory Prof. Manabendra Chandra Department of Chemistry Indian Institute of Technology, Kanpur Lecture 08 Hello and welcome to the day 3 of the second week of

More information

The Gram-Schmidt Process

The Gram-Schmidt Process The Gram-Schmidt Process How and Why it Works This is intended as a complement to 5.4 in our textbook. I assume you have read that section, so I will not repeat the definitions it gives. Our goal is to

More information

Final Review Sheet. B = (1, 1 + 3x, 1 + x 2 ) then 2 + 3x + 6x 2

Final Review Sheet. B = (1, 1 + 3x, 1 + x 2 ) then 2 + 3x + 6x 2 Final Review Sheet The final will cover Sections Chapters 1,2,3 and 4, as well as sections 5.1-5.4, 6.1-6.2 and 7.1-7.3 from chapters 5,6 and 7. This is essentially all material covered this term. Watch

More information

Conditional probabilities and graphical models

Conditional probabilities and graphical models Conditional probabilities and graphical models Thomas Mailund Bioinformatics Research Centre (BiRC), Aarhus University Probability theory allows us to describe uncertainty in the processes we model within

More information

1 Trees. Listing 1: Node with two child reference. public class ptwochildnode { protected Object data ; protected ptwochildnode l e f t, r i g h t ;

1 Trees. Listing 1: Node with two child reference. public class ptwochildnode { protected Object data ; protected ptwochildnode l e f t, r i g h t ; 1 Trees The next major set of data structures belongs to what s called Trees. They are called that, because if you try to visualize the structure, it kind of looks like a tree (root, branches, and leafs).

More information

MURA Office hours Thurs at 12-1pm in CIT 546 Contact for more info.

MURA Office hours Thurs at 12-1pm in CIT 546 Contact for more info. Course Announcements Lecture capture has begun, available from Lectures page. First two and a half weeks are packed. Testing lab done, HTML started, and Stars due next Friday. Department has a lot of student

More information

Lab 8 Impulse and Momentum

Lab 8 Impulse and Momentum b Lab 8 Impulse and Momentum What You Need To Know: The Physics There are many concepts in physics that are defined purely by an equation and not by a description. In some cases, this is a source of much

More information

PHYSICS 15a, Fall 2006 SPEED OF SOUND LAB Due: Tuesday, November 14

PHYSICS 15a, Fall 2006 SPEED OF SOUND LAB Due: Tuesday, November 14 PHYSICS 15a, Fall 2006 SPEED OF SOUND LAB Due: Tuesday, November 14 GENERAL INFO The goal of this lab is to determine the speed of sound in air, by making measurements and taking into consideration the

More information

Bézier Curves and Splines

Bézier Curves and Splines CS-C3100 Computer Graphics Bézier Curves and Splines Majority of slides from Frédo Durand vectorportal.com CS-C3100 Fall 2017 Lehtinen Before We Begin Anything on your mind concerning Assignment 1? CS-C3100

More information

Tou has been released!

Tou has been released! Tou has been released! Shoot- em-up, heavy use of collision detection Much more open-ended than previous projects Easier than previous projects if you work smart Should help those of you combating the

More information

Math (P)Review Part I:

Math (P)Review Part I: Lecture 1: Math (P)Review Part I: Linear Algebra Computer Graphics CMU 15-462/15-662, Fall 2017 Homework 0.0 (Due Monday!) Exercises will be a bit harder / more rigorous than what you will do for the rest

More information

DYNAMIC PORTRAYAL AND DIRECT LOCATION METHOD FOR

DYNAMIC PORTRAYAL AND DIRECT LOCATION METHOD FOR DYNAMIC PORTRAYAL AND DIRECT LOCATION METHOD FOR NEW GEOGRAPHIC INFORMATION PROCESSING WEB SERVICE Hiroyuki Ohno, Norishige Kubo, Noriyuki Takakuwa Hidenori Fujimura, Takayuki Ishizeki Geographical Survey

More information

Sequential Logic (3.1 and is a long difficult section you really should read!)

Sequential Logic (3.1 and is a long difficult section you really should read!) EECS 270, Fall 2014, Lecture 6 Page 1 of 8 Sequential Logic (3.1 and 3.2. 3.2 is a long difficult section you really should read!) One thing we have carefully avoided so far is feedback all of our signals

More information

Maps performance tips On server: Maintain DB connections, prepared statements (per thread/request!)

Maps performance tips On server: Maintain DB connections, prepared statements (per thread/request!) Announcements Maps performance tips On server: Maintain DB connections, prepared statements (per thread/request!) Use Spark.before, Spark.after to open and close. Use ThreadLocal, or pass the connection

More information

PROFESSOR: WELCOME BACK TO THE LAST LECTURE OF THE SEMESTER. PLANNING TO DO TODAY WAS FINISH THE BOOK. FINISH SECTION 6.5

PROFESSOR: WELCOME BACK TO THE LAST LECTURE OF THE SEMESTER. PLANNING TO DO TODAY WAS FINISH THE BOOK. FINISH SECTION 6.5 1 MATH 16A LECTURE. DECEMBER 9, 2008. PROFESSOR: WELCOME BACK TO THE LAST LECTURE OF THE SEMESTER. I HOPE YOU ALL WILL MISS IT AS MUCH AS I DO. SO WHAT I WAS PLANNING TO DO TODAY WAS FINISH THE BOOK. FINISH

More information

The Haar Wavelet Transform: Compression and. Reconstruction

The Haar Wavelet Transform: Compression and. Reconstruction The Haar Wavelet Transform: Compression and Damien Adams and Halsey Patterson December 14, 2006 Abstract The Haar Wavelet Transformation is a simple form of compression involved in averaging and differencing

More information

Double Integrals using Riemann Sums

Double Integrals using Riemann Sums Double Integrals using Riemann Sums Introduction and Goals: The goal of this lab is to become more familiar with Riemann sums both as a definition for the double integral and as an approximation method

More information

MATH 308 COURSE SUMMARY

MATH 308 COURSE SUMMARY MATH 308 COURSE SUMMARY Approximately a third of the exam cover the material from the first two midterms, that is, chapter 6 and the first six sections of chapter 7. The rest of the exam will cover the

More information

8. TRANSFORMING TOOL #1 (the Addition Property of Equality)

8. TRANSFORMING TOOL #1 (the Addition Property of Equality) 8 TRANSFORMING TOOL #1 (the Addition Property of Equality) sentences that look different, but always have the same truth values What can you DO to a sentence that will make it LOOK different, but not change

More information

Solution to Proof Questions from September 1st

Solution to Proof Questions from September 1st Solution to Proof Questions from September 1st Olena Bormashenko September 4, 2011 What is a proof? A proof is an airtight logical argument that proves a certain statement in general. In a sense, it s

More information

Understanding Exponents Eric Rasmusen September 18, 2018

Understanding Exponents Eric Rasmusen September 18, 2018 Understanding Exponents Eric Rasmusen September 18, 2018 These notes are rather long, but mathematics often has the perverse feature that if someone writes a long explanation, the reader can read it much

More information

PHYSICS 220 LAB #3: STATIC EQUILIBRIUM FORCES

PHYSICS 220 LAB #3: STATIC EQUILIBRIUM FORCES Lab Section M / T / W / Th /24 pts Name: Partners: PHYSICS 220 LAB #3: STATIC EQUILIBRIUM FORCES OBJECTIVES 1. To verify the conditions for static equilibrium. 2. To get practice at finding components

More information

30. TRANSFORMING TOOL #1 (the Addition Property of Equality)

30. TRANSFORMING TOOL #1 (the Addition Property of Equality) 30 TRANSFORMING TOOL #1 (the Addition Property of Equality) sentences that look different, but always have the same truth values What can you DO to a sentence that will make it LOOK different, but not

More information

Math 5a Reading Assignments for Sections

Math 5a Reading Assignments for Sections Math 5a Reading Assignments for Sections 4.1 4.5 Due Dates for Reading Assignments Note: There will be a very short online reading quiz (WebWork) on each reading assignment due one hour before class on

More information

Readings and Exercises

Readings and Exercises Nebraska Wesleyan University Math 4800: Research Experience Section 1 Spring 02016 Readings and Exercises Tuesday, January 19 Section 1 Exercise 1 Section 2 Exercise 1, 4ce Thursday, January 21 Section

More information

MATH 310, REVIEW SHEET 2

MATH 310, REVIEW SHEET 2 MATH 310, REVIEW SHEET 2 These notes are a very short summary of the key topics in the book (and follow the book pretty closely). You should be familiar with everything on here, but it s not comprehensive,

More information

Please bring the task to your first physics lesson and hand it to the teacher.

Please bring the task to your first physics lesson and hand it to the teacher. Pre-enrolment task for 2014 entry Physics Why do I need to complete a pre-enrolment task? This bridging pack serves a number of purposes. It gives you practice in some of the important skills you will

More information

Ordinary Differential Equations Prof. A. K. Nandakumaran Department of Mathematics Indian Institute of Science Bangalore

Ordinary Differential Equations Prof. A. K. Nandakumaran Department of Mathematics Indian Institute of Science Bangalore Ordinary Differential Equations Prof. A. K. Nandakumaran Department of Mathematics Indian Institute of Science Bangalore Module - 3 Lecture - 10 First Order Linear Equations (Refer Slide Time: 00:33) Welcome

More information

Chemical Applications of Symmetry and Group Theory Prof. Manabendra Chandra Department of Chemistry Indian Institute of Technology, Kanpur

Chemical Applications of Symmetry and Group Theory Prof. Manabendra Chandra Department of Chemistry Indian Institute of Technology, Kanpur Chemical Applications of Symmetry and Group Theory Prof. Manabendra Chandra Department of Chemistry Indian Institute of Technology, Kanpur Lecture - 09 Hello, welcome to the day 4 of our second week of

More information

PHY2048 Physics with Calculus I

PHY2048 Physics with Calculus I PHY2048 Physics with Calculus I Section 584761 Prof. Douglas H. Laurence Exam 1 (Chapters 2 6) February 14, 2018 Name: Solutions 1 Instructions: This exam is composed of 10 multiple choice questions and

More information

Advanced Structural Analysis Prof. Devdas Menon Department of Civil Engineering Indian Institute of Technology, Madras

Advanced Structural Analysis Prof. Devdas Menon Department of Civil Engineering Indian Institute of Technology, Madras Advanced Structural Analysis Prof. Devdas Menon Department of Civil Engineering Indian Institute of Technology, Madras Module No. # 5.4 Lecture No. # 30 Matrix Analysis of Beams and Grids (Refer Slide

More information

CHAPTER 7: TECHNIQUES OF INTEGRATION

CHAPTER 7: TECHNIQUES OF INTEGRATION CHAPTER 7: TECHNIQUES OF INTEGRATION DAVID GLICKENSTEIN. Introduction This semester we will be looking deep into the recesses of calculus. Some of the main topics will be: Integration: we will learn how

More information

How to Make or Plot a Graph or Chart in Excel

How to Make or Plot a Graph or Chart in Excel This is a complete video tutorial on How to Make or Plot a Graph or Chart in Excel. To make complex chart like Gantt Chart, you have know the basic principles of making a chart. Though I have used Excel

More information

Physics 212E Spring 2004 Classical and Modern Physics. Computer Exercise #2

Physics 212E Spring 2004 Classical and Modern Physics. Computer Exercise #2 Physics 212E Spring 2004 Classical and Modern Physics Chowdary Computer Exercise #2 Launch Mathematica by clicking on the Start menu (lower left hand corner of the screen); from there go up to Science

More information

You don t have to look too deeply to see how chemistry affects your life.

You don t have to look too deeply to see how chemistry affects your life. Chapter 1: Page 0 Chapter 1: Page 1 You don t have to look too deeply to see how chemistry affects your life. Every breath you take, every meal you eat, everything has something to do with the interaction

More information

Vectors Year 12 Term 1

Vectors Year 12 Term 1 Vectors Year 12 Term 1 1 Vectors - A Vector has Two properties Magnitude and Direction - A vector is usually denoted in bold, like vector a, or a, or many others. In 2D - a = xı + yȷ - a = x, y - where,

More information

Using web-based Java pplane applet to graph solutions of systems of differential equations

Using web-based Java pplane applet to graph solutions of systems of differential equations Using web-based Java pplane applet to graph solutions of systems of differential equations Our class project for MA 341 involves using computer tools to analyse solutions of differential equations. This

More information

VPython Class 2: Functions, Fields, and the dreaded ˆr

VPython Class 2: Functions, Fields, and the dreaded ˆr Physics 212E Classical and Modern Physics Spring 2016 1. Introduction VPython Class 2: Functions, Fields, and the dreaded ˆr In our study of electric fields, we start with a single point charge source

More information

CSE370 HW6 Solutions (Winter 2010)

CSE370 HW6 Solutions (Winter 2010) SE370 HW6 Solutions (Winter 2010) 1. L2e, 6.10 For this problem we are given a blank waveform with clock and input and asked to draw out the how different flip-flops and latches would behave. LK a) b)

More information

Students will explore Stellarium, an open-source planetarium and astronomical visualization software.

Students will explore Stellarium, an open-source planetarium and astronomical visualization software. page 22 STELLARIUM* OBJECTIVE: Students will explore, an open-source planetarium and astronomical visualization software. BACKGROUND & ACKNOWLEDGEMENTS This lab was generously provided by the Red Rocks

More information

A Series Transformations

A Series Transformations .3 Constructing Rotations We re halfway through the transformations and our next one, the rotation, gives a congruent image just like the reflection did. Just remember that a series of transformations

More information

AN ALGEBRA PRIMER WITH A VIEW TOWARD CURVES OVER FINITE FIELDS

AN ALGEBRA PRIMER WITH A VIEW TOWARD CURVES OVER FINITE FIELDS AN ALGEBRA PRIMER WITH A VIEW TOWARD CURVES OVER FINITE FIELDS The integers are the set 1. Groups, Rings, and Fields: Basic Examples Z := {..., 3, 2, 1, 0, 1, 2, 3,...}, and we can add, subtract, and multiply

More information

Vectors Part 1: Two Dimensions

Vectors Part 1: Two Dimensions Vectors Part 1: Two Dimensions Last modified: 20/02/2018 Links Scalars Vectors Definition Notation Polar Form Compass Directions Basic Vector Maths Multiply a Vector by a Scalar Unit Vectors Example Vectors

More information

Projectile Motion. v a = -9.8 m/s 2. Good practice problems in book: 3.23, 3.25, 3.27, 3.29, 3.31, 3.33, 3.43, 3.47, 3.51, 3.53, 3.

Projectile Motion. v a = -9.8 m/s 2. Good practice problems in book: 3.23, 3.25, 3.27, 3.29, 3.31, 3.33, 3.43, 3.47, 3.51, 3.53, 3. v a = -9.8 m/s 2 A projectile is anything experiencing free-fall, particularly in two dimensions. 3.23, 3.25, 3.27, 3.29, 3.31, 3.33, 3.43, 3.47, 3.51, 3.53, 3.55 Projectile Motion Good practice problems

More information

Linear Algebra, Summer 2011, pt. 2

Linear Algebra, Summer 2011, pt. 2 Linear Algebra, Summer 2, pt. 2 June 8, 2 Contents Inverses. 2 Vector Spaces. 3 2. Examples of vector spaces..................... 3 2.2 The column space......................... 6 2.3 The null space...........................

More information

Math Week 1 notes

Math Week 1 notes Math 2270-004 Week notes We will not necessarily finish the material from a given day's notes on that day. Or on an amazing day we may get farther than I've predicted. We may also add or subtract some

More information

This format is the result of tinkering with a mixed lecture format for 3 terms. As such, it is still a work in progress and we will discuss

This format is the result of tinkering with a mixed lecture format for 3 terms. As such, it is still a work in progress and we will discuss Version 1, August 2016 1 This format is the result of tinkering with a mixed lecture format for 3 terms. As such, it is still a work in progress and we will discuss adaptations both to the general format

More information

Multiple Representations: Equations to Tables and Graphs Transcript

Multiple Representations: Equations to Tables and Graphs Transcript Algebra l Teacher: It s good to see you again. Last time we talked about multiple representations. If we could, I would like to continue and discuss the subtle differences of multiple representations between

More information

Distances in R 3. Last time we figured out the (parametric) equation of a line and the (scalar) equation of a plane:

Distances in R 3. Last time we figured out the (parametric) equation of a line and the (scalar) equation of a plane: Distances in R 3 Last time we figured out the (parametric) equation of a line and the (scalar) equation of a plane: Definition: The equation of a line through point P(x 0, y 0, z 0 ) with directional vector

More information

Lab 2 Worksheet. Problems. Problem 1: Geometry and Linear Equations

Lab 2 Worksheet. Problems. Problem 1: Geometry and Linear Equations Lab 2 Worksheet Problems Problem : Geometry and Linear Equations Linear algebra is, first and foremost, the study of systems of linear equations. You are going to encounter linear systems frequently in

More information

DEKDIV: A Linked-Data-Driven Web Portal for Learning Analytics Data Enrichment, Interactive Visualization, and Knowledge Discovery

DEKDIV: A Linked-Data-Driven Web Portal for Learning Analytics Data Enrichment, Interactive Visualization, and Knowledge Discovery DEKDIV: A Linked-Data-Driven Web Portal for Learning Analytics Data Enrichment, Interactive Visualization, and Knowledge Discovery Yingjie Hu, Grant McKenzie, Jiue-An Yang, Song Gao, Amin Abdalla, and

More information

Lab 8 Impulse and Momentum

Lab 8 Impulse and Momentum b Lab 8 Impulse and Momentum Physics 211 Lab What You Need To Know: The Physics Today we will deal with two physical concepts: impulse and momentum. For both, it turns out to be harder to say what they

More information

Math101, Sections 2 and 3, Spring 2008 Review Sheet for Exam #2:

Math101, Sections 2 and 3, Spring 2008 Review Sheet for Exam #2: Math101, Sections 2 and 3, Spring 2008 Review Sheet for Exam #2: 03 17 08 3 All about lines 3.1 The Rectangular Coordinate System Know how to plot points in the rectangular coordinate system. Know the

More information

MITOCW watch?v=vjzv6wjttnc

MITOCW watch?v=vjzv6wjttnc MITOCW watch?v=vjzv6wjttnc PROFESSOR: We just saw some random variables come up in the bigger number game. And we're going to be talking now about random variables, just formally what they are and their

More information

Physics 351 Wednesday, January 10, 2018

Physics 351 Wednesday, January 10, 2018 Physics 351 Wednesday, January 10, 2018 Chapers 1 5 mostly review freshman physics, so we ll go through them very quickly in the first few days of class. Read Chapters 1+2 for Friday. Read Chapter 3 (momentum

More information

Algebra. Here are a couple of warnings to my students who may be here to get a copy of what happened on a day that you missed.

Algebra. Here are a couple of warnings to my students who may be here to get a copy of what happened on a day that you missed. This document was written and copyrighted by Paul Dawkins. Use of this document and its online version is governed by the Terms and Conditions of Use located at. The online version of this document is

More information

Trouble-Shooting Coordinate System Problems

Trouble-Shooting Coordinate System Problems Trouble-Shooting Coordinate System Problems Written by Barbara M. Parmenter, revised 2/25/2014 OVERVIEW OF THE EXERCISE... 1 COPYING THE MAP PROJECTION EXERCISE FOLDER TO YOUR H: DRIVE OR DESKTOP... 2

More information

An Intuitive Introduction to Motivic Homotopy Theory Vladimir Voevodsky

An Intuitive Introduction to Motivic Homotopy Theory Vladimir Voevodsky What follows is Vladimir Voevodsky s snapshot of his Fields Medal work on motivic homotopy, plus a little philosophy and from my point of view the main fun of doing mathematics Voevodsky (2002). Voevodsky

More information

MITOCW ocw f99-lec01_300k

MITOCW ocw f99-lec01_300k MITOCW ocw-18.06-f99-lec01_300k Hi. This is the first lecture in MIT's course 18.06, linear algebra, and I'm Gilbert Strang. The text for the course is this book, Introduction to Linear Algebra. And the

More information

Motion II. Goals and Introduction

Motion II. Goals and Introduction Motion II Goals and Introduction As you have probably already seen in lecture or homework, and if you ve performed the experiment Motion I, it is important to develop a strong understanding of how to model

More information

Structural Induction

Structural Induction Structural Induction In this lecture we ll extend the applicability of induction to many universes, ones where we can define certain kinds of objects by induction, in addition to proving their properties

More information

Math 416, Spring 2010 Coordinate systems and Change of Basis February 16, 2010 COORDINATE SYSTEMS AND CHANGE OF BASIS. 1.

Math 416, Spring 2010 Coordinate systems and Change of Basis February 16, 2010 COORDINATE SYSTEMS AND CHANGE OF BASIS. 1. Math 46 Spring Coordinate systems and Change of asis February 6 COORDINAE SYSEMS AND CHANGE OF ASIS Announcements Don t forget that we have a quiz on hursday and test coming up the following hursday Finishing

More information

3 Fields, Elementary Matrices and Calculating Inverses

3 Fields, Elementary Matrices and Calculating Inverses 3 Fields, Elementary Matrices and Calculating Inverses 3. Fields So far we have worked with matrices whose entries are real numbers (and systems of equations whose coefficients and solutions are real numbers).

More information

Welcome to IB Math - Standard Level Year 2

Welcome to IB Math - Standard Level Year 2 Welcome to IB Math - Standard Level Year 2 Why math? Not So Some things to know: Good HW Good HW Good HW www.aleimath.blogspot.com Example 1. Lots of info at Example Example 2. HW yup. You know you love

More information

4th year Project demo presentation

4th year Project demo presentation 4th year Project demo presentation Colm Ó héigeartaigh CASE4-99387212 coheig-case4@computing.dcu.ie 4th year Project demo presentation p. 1/23 Table of Contents An Introduction to Quantum Computing The

More information

Linear algebra and differential equations (Math 54): Lecture 10

Linear algebra and differential equations (Math 54): Lecture 10 Linear algebra and differential equations (Math 54): Lecture 10 Vivek Shende February 24, 2016 Hello and welcome to class! As you may have observed, your usual professor isn t here today. He ll be back

More information

Mathematica Project 3

Mathematica Project 3 Mathematica Project 3 Name: Section: Date: On your class s Sakai site, your instructor has placed 5 Mathematica notebooks. Please use the following table to determine which file you should select based

More information

Please read this introductory material carefully; it covers topics you might not yet have seen in class.

Please read this introductory material carefully; it covers topics you might not yet have seen in class. b Lab Physics 211 Lab 10 Torque What You Need To Know: Please read this introductory material carefully; it covers topics you might not yet have seen in class. F (a) (b) FIGURE 1 Forces acting on an object

More information

Welcome to Physics 211! General Physics I

Welcome to Physics 211! General Physics I Welcome to Physics 211! General Physics I Physics 211 Fall 2015 Lecture 01-1 1 Physics 215 Honors & Majors Are you interested in becoming a physics major? Do you have a strong background in physics and

More information

Trouble-Shooting Coordinate System Problems

Trouble-Shooting Coordinate System Problems Trouble-Shooting Coordinate System Problems Written by Barbara M. Parmenter. Revised on October 2, 2018 OVERVIEW OF THE EXERCISE... 1 COPYING THE MAP PROJECTION EXERCISE FOLDER TO YOUR H: DRIVE OR DESKTOP...

More information

Quadratic Equations Part I

Quadratic Equations Part I Quadratic Equations Part I Before proceeding with this section we should note that the topic of solving quadratic equations will be covered in two sections. This is done for the benefit of those viewing

More information

rethinking software design by analyzing state

rethinking software design by analyzing state rethinking software design state by analyzing Daniel Jackson Workshop Honoring Shmuel Katz Technion Dec 19, 2013 three puzzles three puzzles why are formal methods not widely used? great advances, successful

More information

( )( b + c) = ab + ac, but it can also be ( )( a) = ba + ca. Let s use the distributive property on a couple of

( )( b + c) = ab + ac, but it can also be ( )( a) = ba + ca. Let s use the distributive property on a couple of Factoring Review for Algebra II The saddest thing about not doing well in Algebra II is that almost any math teacher can tell you going into it what s going to trip you up. One of the first things they

More information

Welcome to IB Math - Standard Level Year 2.

Welcome to IB Math - Standard Level Year 2. Welcome to IB Math - Standard Level Year 2 Why math? Some things to know: www.aleimath.blogspot.com 1. Lots of info at 2. HW yup. You know you love it! Be prepared to present. Notebook all work is in it.

More information

Comp 11 Lectures. Mike Shah. July 26, Tufts University. Mike Shah (Tufts University) Comp 11 Lectures July 26, / 40

Comp 11 Lectures. Mike Shah. July 26, Tufts University. Mike Shah (Tufts University) Comp 11 Lectures July 26, / 40 Comp 11 Lectures Mike Shah Tufts University July 26, 2017 Mike Shah (Tufts University) Comp 11 Lectures July 26, 2017 1 / 40 Please do not distribute or host these slides without prior permission. Mike

More information

NovaToast SmartVision Project Requirements

NovaToast SmartVision Project Requirements NovaToast SmartVision Project Requirements Jacob Anderson William Chen Christopher Kim Jonathan Simozar Brian Wan Revision History v1.0: Initial creation of the document and first draft. v1.1 (2/9): Added

More information

CS Lecture 19: Logic To Truth through Proof. Prof. Clarkson Fall Today s music: Theme from Sherlock

CS Lecture 19: Logic To Truth through Proof. Prof. Clarkson Fall Today s music: Theme from Sherlock CS 3110 Lecture 19: Logic To Truth through Proof Prof. Clarkson Fall 2014 Today s music: Theme from Sherlock Review Current topic: How to reason about correctness of code Last week: informal arguments

More information

CHAPTER 1: Functions

CHAPTER 1: Functions CHAPTER 1: Functions 1.1: Functions 1.2: Graphs of Functions 1.3: Basic Graphs and Symmetry 1.4: Transformations 1.5: Piecewise-Defined Functions; Limits and Continuity in Calculus 1.6: Combining Functions

More information

Math 110 Professor Ken Ribet

Math 110 Professor Ken Ribet Math 110 Professor Ken Ribet Linear Algebra Spring, 2005 January 20, 2005 A psychologist named Nalini Ambady gave students three 10-second soundless videotapes of a teacher lecturing. Then she asked the

More information

ACCESS TO SCIENCE, ENGINEERING AND AGRICULTURE: MATHEMATICS 1 MATH00030 SEMESTER / Lines and Their Equations

ACCESS TO SCIENCE, ENGINEERING AND AGRICULTURE: MATHEMATICS 1 MATH00030 SEMESTER / Lines and Their Equations ACCESS TO SCIENCE, ENGINEERING AND AGRICULTURE: MATHEMATICS 1 MATH00030 SEMESTER 1 017/018 DR. ANTHONY BROWN. Lines and Their Equations.1. Slope of a Line and its y-intercept. In Euclidean geometry (where

More information

PageRank: The Math-y Version (Or, What To Do When You Can t Tear Up Little Pieces of Paper)

PageRank: The Math-y Version (Or, What To Do When You Can t Tear Up Little Pieces of Paper) PageRank: The Math-y Version (Or, What To Do When You Can t Tear Up Little Pieces of Paper) In class, we saw this graph, with each node representing people who are following each other on Twitter: Our

More information

Getting Started with Communications Engineering

Getting Started with Communications Engineering 1 Linear algebra is the algebra of linear equations: the term linear being used in the same sense as in linear functions, such as: which is the equation of a straight line. y ax c (0.1) Of course, if we

More information

A (Mostly) Correctly Formatted Sample Lab Report. Brett A. McGuire Lab Partner: Microsoft Windows Section AB2

A (Mostly) Correctly Formatted Sample Lab Report. Brett A. McGuire Lab Partner: Microsoft Windows Section AB2 A (Mostly) Correctly Formatted Sample Lab Report Brett A. McGuire Lab Partner: Microsoft Windows Section AB2 August 26, 2008 Abstract Your abstract should not be indented and be single-spaced. Abstracts

More information

Regression, part II. I. What does it all mean? A) Notice that so far all we ve done is math.

Regression, part II. I. What does it all mean? A) Notice that so far all we ve done is math. Regression, part II I. What does it all mean? A) Notice that so far all we ve done is math. 1) One can calculate the Least Squares Regression Line for anything, regardless of any assumptions. 2) But, if

More information

Homework 5: Sampling and Geometry

Homework 5: Sampling and Geometry Homework 5: Sampling and Geometry Introduction to Computer Graphics and Imaging (Summer 2012), Stanford University Due Monday, August 6, 11:59pm You ll notice that this problem set is a few more pages

More information

Designing Information Devices and Systems I Fall 2018 Lecture Notes Note Introduction to Linear Algebra the EECS Way

Designing Information Devices and Systems I Fall 2018 Lecture Notes Note Introduction to Linear Algebra the EECS Way EECS 16A Designing Information Devices and Systems I Fall 018 Lecture Notes Note 1 1.1 Introduction to Linear Algebra the EECS Way In this note, we will teach the basics of linear algebra and relate it

More information

Math Lecture 3 Notes

Math Lecture 3 Notes Math 1010 - Lecture 3 Notes Dylan Zwick Fall 2009 1 Operations with Real Numbers In our last lecture we covered some basic operations with real numbers like addition, subtraction and multiplication. This

More information

ECEN 651: Microprogrammed Control of Digital Systems Department of Electrical and Computer Engineering Texas A&M University

ECEN 651: Microprogrammed Control of Digital Systems Department of Electrical and Computer Engineering Texas A&M University ECEN 651: Microprogrammed Control of Digital Systems Department of Electrical and Computer Engineering Texas A&M University Prof. Mi Lu TA: Ehsan Rohani Laboratory Exercise #4 MIPS Assembly and Simulation

More information

MATERIAL MECHANICS, SE2126 COMPUTER LAB 4 MICRO MECHANICS. E E v E E E E E v E E + + = m f f. f f

MATERIAL MECHANICS, SE2126 COMPUTER LAB 4 MICRO MECHANICS. E E v E E E E E v E E + + = m f f. f f MATRIAL MCHANICS, S226 COMPUTR LAB 4 MICRO MCHANICS 2 2 2 f m f f m T m f m f f m v v + + = + PART A SPHRICAL PARTICL INCLUSION Consider a solid granular material, a so called particle composite, shown

More information

Cosmic Ray Detector Software

Cosmic Ray Detector Software Cosmic Ray Detector Software Studying cosmic rays has never been easier Matthew Jones Purdue University 2012 QuarkNet Summer Workshop 1 Brief History First cosmic ray detector built at Purdue in about

More information