Udacity cs101: Building a Search Engine. Extracting a Link
|
|
|
- Cori Stokes
- 10 years ago
- Views:
Transcription
1 Udacity cs101: Building a Search Engine Unit 1: How to get started: your first program Extracting a Link Introducing the Web Crawler (Video: Web Crawler)... 2 Quiz (Video: First Quiz)...2 Programming (Video: Programming)... 2 Quiz (Video: What is a Programming Language)...3 Getting Started with Python Programming...3 Quiz (Video: First Programming Quiz)...4 Programming Languages (Video: Would_You_Rather)...4 Grammar (Video: Grammar)... 4 Quiz (Video: Eat Quiz)...5 Python Grammar for Arithmetic Expressions (Video: Python Expressions)...6 Quiz (Video: Python Expressions)...7 Quiz (Video: Speed of Light)...7 Admiral Grace Hopper ( ) (Video: Grace Hopper)...9 Variables (Video: Variables)... 9 Quiz (Video: Variables) Variables Can Vary (Video: Variables Can Vary) Quiz (Video: Varying Variables Quiz 1) Quiz (Video: Varying Variables Quiz 2) Quiz (Video: Spirit Age) Strings (Video: Strings) Quiz (Video: Valid Strings) August Ada King (Video: Ada) Quiz (Video: Hello!!!) Using Operators on Strings (Video: Strings and Numbers) Indexing Strings (Video: Indexing Strings) Quiz (Video: Same Value) Selecting Sub-Sequences from String (Video: Selecting Sub-Sequences) Quiz (Video: Capital Udacity) Quiz (Video: Understanding Selection) Finding Strings in Strings (Video: Finding Strings in Strings) Quiz (Video: Testing) Quiz (Video: Testing) Using find with Numbers (Video: Finding with Numbers) Quiz (Video: Finding with Numbers Quiz) Extracting Links (Video: Extracting Links) Quiz (Video: Extracting Links) Quiz (Video: Final Quiz)
2 Introducing the Web Crawler (Video: Web Crawler) A web crawler is a program that collects content from the web. A web crawler finds web pages by starting from a seed page and following links to find other pages, and following links from the other pages it finds, and continuing to follow links until it has found many web pages. Here is the process that a web crawler follows: Start from one preselected page. We call the starting page the "seed" page. Extract all the links on that page. (This is the part we will work on in this unit and Unit 2.) Follow each of those links to find new pages. Extract all the links from all of the new pages found. Follow each of those links to find new pages. Extract all the links from all of the new pages found. This keeps going as long as there are new pages to find, or until it is stopped. In this unit we will be writing a program to extract the first link from a given web page. In Unit 2, we will figure out how to extract all the links on a web page. In Unit 3, we will figure out how to keep the crawl going over many pages. Quiz (Video: First Quiz) What is the goal of Unit 1? a. Get started programming. b. Learn important computers science concepts. c. Write code to extract a link from a web page. d. Write code to rank web pages. Programming (Video: Programming) A computer is a machine that can execute a program. With the right program, a computer can do any mechanical computation you can imagine. A program describes a very precise sequence of steps. Since the computer is just a machine, the program must give the steps in a way that can be executed mechanically. That is, the program can be followed without any thought. A programming language is a language designed for producing computer programs. A good programming language makes it easy for humans to read and write programs that can be executed by a computer. Python is a programming language. The programs that we write in the Python language will be the input to the Python interpreter, which is a program that runs on the computer. The Python interpreter reads our programs and executes them by following the rules of the Python language. 2
3 Quiz (Video: What is a Programming Language) What is a programming language? a. a language designed to be executed by computers b. a language designed for describing programs c. a language designed to be written by humans, and executed by computers d. a language designed to be read by humans, and written by computers e. a language designed to be read and written by humans, and executed by computers Getting Started with Python Programming We have provided a way for you to run Python programs using your web browser. You do not need to install any extra programs to do this. There are two parts to the Python programming environment you will see in your web browser: 1. The top part is an editor, where you can write and edit code. 2. The bottom part is an output window, where you can see the results of running your code. To try running your code, click the "Run" button avoid the editor. We can see the value of something in Python by using print like this: print 3 prints out the value 3. The expression after the print can be any value Python expression. Here are some examples: addition 2-1 subtraction 2 * 6 multiplication 3
4 We can compose expressions to make more complicated expressions like, 52 * * 9 We can also use parentheses to group expressions: (52 * 3) + (12 * 9) is different from 52 * (3 + 12) * 9 For example, this code prints out the the number of hours in a day: print 365 * 24 * 60 * 60 Quiz (Video: First Programming Quiz) Write a Python program that prints out the number of minutes in seven weeks. You should enter your program in the editor window (top part), and then click "Run" to see the output in the bottom part. Programming Languages (Video: Would_You_Rather) Why do we need to invent and learn new languages, like Python, to program computers, rather than using natural languages like English or Mandarin? There are many reasons why a designed language like Python is better for writing programs than a natural language like English. One problem with natural languages is that they are ambiguous. Hence, not everyone will interpret the same phrase the same way. To program computers, it is important that we know exactly what our programs mean, and that the computer will run them with the meaning we intended. Another problem with natural language is that they are very verbose. To say something with the level of precision needed for a computer to be able to follow it mechanically would require an awful lot of writing. We want our programs to be short so it is less work to write them, and so that it is easier to read and understand them. Grammar (Video: Grammar) Compared to a natural language, like English, programming languages like Python adhere to a strict grammatical structure. In English, even if a phrase is written or spoken incorrectly, it can still be understood with the help of context or other cues. On the other hand, in a programming language like Python, the code must match the language grammar exactly. The Python interpreter has no idea what to do with input that is not in the Python language, so it produces an error. 4
5 Basic English Grammar Rules: Sentence Subject Verb Object Subject Noun Object Noun Verb Eat Verb Like Noun I Noun Python Noun Cookies When programming language grammar is not followed the interpreter will return a "SyntaxError" message. This means that the structure of the code is inconsistent with the rules of the programming language. Backus-Naur Form (Video: Backus-Naur_Form) The notation we used to describe the grammar is known as Bakus-Naur Form. It was introduced in the 1950s by John Backus, the lead designer of the Fortran programming language at IBM. The purpose of Bakus-Naur Form is to describe a programming language in a simple and concise manner. The structure of this form is: <Non-Terminal> replacement The replacement can be any sequence of zero or more non-terminals or terminals. Terminals never appear on the left side of a rule. Once you get to a terminal there is nothing else you can replace it with. Here is an example showing to derive a sentence by following the replacement rules: Sentence Subject Verb Object Noun Verb Object I Verb Object I Like Object I Like Noun I Like Python The important thing about a replacement grammar is that we can describe an infinitely large language with a small set of precise rules. Quiz (Video: Eat Quiz) 5
6 Which of these sentences can be produced from this grammar, starting from sentence? a. Python Eat Cookies b. Python Eat Python c. I Like Eat Python Grammar for Arithmetic Expressions (Video: Python Expressions) An expression is something that has a value. Here are some examples of expressions in Python: * 7 * 24 * 60 Here is one of the rules of the Python grammar for making expressions: Expression Expression Operator Expression The Expression non-terminal that appears on the left side can be replaced by an Expression, followed by an Operator, followed by another Expression. For example, is an Expression Operator Expression. The interesting thing about this rule is that it has Expresison on both the left and right sides! This looks circular, and would be, except we also have other rules for Expresison that do not include Expression on the right side. This is an example of a recursive definition. To make a good recursive definition you need at least two rules: 1. A rule to that defines something in terms of itself. Expression Expression Operator Expression 2. A rule to that defines that thing in terms of something else that we already know. Expression Number Recursive definitions are a very powerful idea in computer science. They allow us to define infinitely many things using a few simple rules. We will talk about this a lot more in Unit 6. Here are some of the Python grammar rules for arithmetic expressions: Expression Expression Operator Expression Expression Number Operator + Operator * Number 0, 1,... 6
7 Here is an example derivation using this grammar: Expression Expression Operator Expression Expression + Expression Expression + Number Expression + 1 Expression Operator Expression + 1 Number Operator Expression Operator Expression * Expression * Expression Operator Expression * Number Operator Expression * 3 Operator Expression * 3 * Expression * 3 * Number * 3 * (Note: the example here is slightly different than the one in the video. The 3+3 expression has been changed to 3*3, since the precedence rules in Python would have grouped 2 * as (2 * 3) , so it would not be interpreted as shown in the derivation.) We need to add one more rule to our expression grammar to be able to produce all of the expressions we have used so far: Expression (Expression) Quiz (Video: Python Expressions) Which of the following are valid Python expressions that can be produced starting from Expression? There may be more than one. a. 3 b. ((3) c. (1 * (2 * (3 * 4))) d e. (((7))) Quiz (Video: Speed of Light) Write Python code to print out how far light travels in centimeters after one nanosecond using the multiplication operator. The speed of light is meters per second. One meter is 100 centimeters. One nanosecond is one billionth (1/ ) of a second. The reason for computing this is because the distance light travels in a nanosecond really matters in computing! A typical computer today executes billions of steps every second. The processor I am 7
8 using is a 2.7 GHz processor. The GHz means gigahertz which is a billion cycles per second. So, the computer executes cycles per second. You can think of each cycle as executing a very small instruction step. If you are using a Mac, you can see how fast your processor is by selecting the Apple menu and choosing About this Mac. If you are using a Windows 7 machine, open the Control Panel and select System and Security, then under System select View amount of RAM and processor speed. We can compute how far light travels in the time it takes for the computer to complete one cycle: print * 100 * 1.0/ *1/ This is approximately 3/4 of the length of a dollar bill. A processor is the part of the computer that carries out the steps specified in a computer program. Sometimes people call the processor the "central processing unit" or CPU. A processor has to be small to execute programs quickly. If your computer's processor were any larger than the size of a dollar bill, then you couldn't even send light from one end of the processor to the other before finishing the execution of a single step in a program. 8
9 Admiral Grace Hopper ( ) (Video: Grace Hopper) Grace Hopper was a pioneer in computing who was known for walking around with nanosticks. Nanosticks are pieces of wire that are the length light travels in a nanosecond, about 30 cm. Hopper wrote one of the first programming languages, COBOL, which was for a long time the world's most widely used programming language. Hopper built the first compiler. A compiler is a program that takes as input a program in a programming language easy for humans to write and outputs a program in another language that is easier for computers to execute. The difference between a compiler and an interpreter like Python is that a compiler does all the work at once and runs a new program, whereas, the interpreter converts the source code one step at a time as the program runs. When Grace Hopper started building the first compiler, most people did not believe it was possible for a computer program to produce other computer programs: "Nobody believed that I had a running compiler and nobody would touch it. They told me computers could only do arithmetic." Variables (Video: Variables) A variable is a name refers to a value. In Python, we can use any sequence of letters and numbers and underscores (_) we want to make a variable name, so long as it does not start with a number. Here are some examples of valid variable names: processor_speed n Dorina item73 To introduce a new variable, we use an assignment statement: Name = Expression After executing an assignment expression, the name refers to the value of the expression on the right side of the assignment: speed_of_light = We can use the variable name anywhere we want and it means the same things as the value it refers to. Here is an expression using the name to print out the speed of light in centimeters: print speed_of_light * 100 9
10 You can create new variables to keep track of values in programs. Here is an expression to find the length of the nanostick in centimeters: speed_of_light = billionth = 1.0 / nanostick = speed_of_light * billionth * 100 print nanostick Quiz (Video: Variables) Given the variables defined below, write Python code that prints out the distance, in meters, that light travels in one processor cycle. We use the hash mark (#) to introduce a comment. After the hash, we can write anything we want. The rest of the line is treated as a comment. The comment is not interpreted by the Python interpreter, but it is useful for humans reading the code. Compute this by dividing the speed of light by the number of cycles per second. speed_of_light = # meters per second cycles_per_second = # 2.7GHz Variables Can Vary (Video: Variables Can Vary) The value a variable refers to can change. When a variable name is used, it always refers to the last value assigned to that variable. For example, we can change the value of cycles_per_second. Suppose we have a faster processor: speed_of_light = # meters per second cycles_per_second = # 2.7GHz cycle_distance = speed_of_light / cycles_per_second cycle_per_second = # 2.8 GHz print cycle_distance cycle_distance = speed_of_light/ cycles_per_second print cycle_distance Since the value that a variable refers to can change, the same exact expression can have different values at the different times it is executed. 10
11 This gets more interesting when we use the same variable on both sides of an assignment. The right side is evaluated first, using the current value of the variable. Then the assignment is done using that value. In the following expressions, the value of days changes from 49 to 48 and then to 47 as the expression changes: days = 7 * 7 # after the assignment, days refers to 49 days = 48 # after the assignment, days refers to 48 days = days - 1 # after the assignment, days refers to 47 days = days - 1 # after the assignment, days refers to 46 It is important to remember that although we use = for assignment it does not mean equality. You should think of the = sign in Python as an arrow,, showing that the value the right side evaluates to is being assigned to the variable name on the left side. Quiz (Video: Varying Variables Quiz 1) What is the value of hours after running this code: a. 9 b. 10 c. 18 d. 20 e. 22 f. Error hours = 9 hours = hours + 1 hours = hours * 2 Quiz (Video: Varying Variables Quiz 2) What is the value of seconds after running this code: a. 0 b. 60 c. 120 d. Error minutes = minutes + 1 seconds = minutes * 60 For Python to be able to output a result, we need to always define a variable by assigning a value to it before using it. minutes = 30 minutes = minutes +1 seconds + minutes * 60 print seconds
12 Quiz (Video: Spirit Age) Write Python code that defines the variable age to be your age in years, and then prints out the number of days you have been alive. If you don't want to use your real age, feel free to use your age in spirit instead. age = 26 days_per_year = 365 days_alive = age * days_per_year print days_alive 9490 Strings (Video: Strings) A string is a sequence of characters surrounded by quotes; either single or double. 'I am a string!' The only requirement is that the string must start and end with the same kind of quote. "I prefer double quotes!" This allows you to include quotes inside of quotes as a character in the string. "I'm happy I started with a double quote!" Using the interpreter, notice how the color of the input changes before and after you put quotes on both sides of the string. What happens when you do not include any quotes: print Hello Without the quotes, Python reads Hello as a variable that is undefined: NameError: name 'Hello' is not defined As we saw above, Python will not print an undefined variable, which is why we get the name error. Quiz (Video: Valid Strings) Which of the following are valid strings in Python? a. "Ada" b. 'Ada" c. "Ada d. Ada e. '"Ada' 12
13 August Ada King (Video: Ada) August Ada King, Countess of Lovelace, , was arguably the world's first computer programmer. Grace Hopper wasn't the first person to think about using computers to do things other than arithmetic, but Ada probably was. In her 1843 notes on programming the Analytical Engine, she writes: It might act upon other things besides number, were objects found whose mutual fundamental relations could be expressed by those of the abstract science of operations, and which should be also susceptible of adaptations to the action of the operating notation and mechanism of the engine The It King is referring to is the Analytical Engine, a mechanical programmable computer that Charles Babbage designed. Although he did not succeed in building it in the 1840s, he did have a design for it, which Ada was thinking about programming to compose music. Quiz (Video: Hello!!!) Define a variable, name, and assign to it a string that is your name. Using Operators on Strings (Video: Strings and Numbers) We can also use the plus operator (+) on strings, but it has a different meaning from when it is used on numbers. With string, plus means concatenation. <string> + <string> outputs the concatenation of the two strings Try concatenating the string 'Hello' to name. You can create a space between the strings by adding a space to one of the strings. You can also continue to add strings as many times as you need. name = 'Dave' print 'Hello ' + name + '!' + '!' + '!' Hello Dave!!! However, you cannot use the plus operator to combine strings and integers, as in the case of: print 'My name is ' + 9 When you run this program you should see an error message like this: TypeError: cannot concatenate 'str' and 'int' objects. It is a bit surprising that you can multiply strings and integers! print '!' * 12!!!!!!!!!!!! This program multiplies the string by the integer to return 12 exclamation points! 13
14 Indexing Strings (Video: Indexing Strings) When you want to select sub-sequences from a string, it is called indexing. Use the square brackets [] to specify which part of the string you want to select. <string>[<expression>] For example, if we have the string 'udacity' and we want to select the character in the zero position (that is, the first character), we would write: 'udacity'[0] The positions in a string are numbered starting with 0, so this evaluates to'u'. Indexing strings is the most useful when the string is given using a variable: 'udacity'[0] 0 'udacity'[1 +1 ] 'a' name = 'Dave' name[0] 'D' When you use negative numbers in the index it starts counting from the back of the string: or, name = 'Dave' print name[-1] e name='dave' print name[-2] v When you try to index a character in a position where there is none, Python produces an error indicating that the index is out of range: name = 'Dave' print name[4] IndexError: string index out of range 14
15 Quiz (Video: Same Value) Given the variable, s = '<any string>' which of these pairs are two things with the exact same value? a. s[3], s[1+1+1] b. s[0], (s+s)[0] c. s[0] + s[1], s[0+1] d. s[1], (s + 'ity') [1] e. s[-1], (s + s)[-1] Selecting Sub-Sequences from String (Video: Selecting Sub-Sequences) You can select a sub-sequence of a string by designating a starting position and an end position. Python reads the characters positions starting at 0, so that if we consider the string 'udacity' that has 7 characters, there are 6 positions with 'u' being in the 0 position. Examples: <string>[<expression>] a one-character string <string>[<start expression>:<stop expression>] a string that is a sub-sequence of the characters in the string, from the start position up to the character before the stop position. If the start expression is missing, the sub-sequence starts from the beginning of the string; if the stop expression is missing, the sub-sequence goes to the end of the string. word = 'assume' print word[3] u print word[4:6] me print word[4:] me print word[:2] as print word[:] assume Quiz (Video: Capital Udacity) Write Python code that prints out Udacity (with a capital U), given the definition s = 'audacity' 15
16 Quiz (Video: Understanding Selection) For any string, s= '<any string>' which of these is always equivalent to s: a. s[:] b. s + s[0:-1 +1] c. s[0:] d. s[:-1] e. s[:3] + s[3:] Finding Strings in Strings (Video: Finding Strings in Strings) The find method is a built in operation, or method, provided by Python, that operates on strings. The output of find is the position of the string where the specified sub-string is found. <search string>.find(<target string>) If the target string is not found anywhere in the search string, then the output will be -1. Here are some examples (try them yourself in the interpreter): pythagoras = 'There is geometry in the humming of the strings, there is music in the spacing of the spheres. ' print pythagoras.find('string') 40 print pythagoras[40:] strings, there is music in the spacing of the spheres. print pythagoras.find('t') 0 print pythagoras.find('sphere') 86 print pythagoras[86:] spheres print pythagoras.find('algebra') -1 Quiz (Video: Testing) Which of the following evaluate to -1: a. 'test'.find('t') b. "test".find('st') c. "Test".find('te') d. 'west'.find('test') 16
17 Quiz (Video: Testing) For any string, s = '<any string>' which of the following always has the value 0? a. s.find(s) b. s.find('s') c. 's'.find('s') d. s.find('') e. s.find(s + '!!!') +1 Using find with Numbers (Video: Finding with Numbers) In addition to passing in a target string to find, we can also pass in a number: <search string>.find(<target string>, <number>) The number input is the position in the search string where find will start looking for the target string. So, the output is a number giving the position of the first occurrence of the target string in the search string at or after the number input position. If there is no occurrence at or after that position, the output is -1. For example: danton = "De l'audace, encore de l'audace, toujours de l'audace." print danton.find('audace') 5 print danton.find('audace', 0) 5 print danton.find('audace', 5) 5 print danton.find('audace', 6) 25 print danton.find('audace', 25) 25 print danton.find('audace', 48) 47 17
18 Quiz (Video: Finding with Numbers Quiz) For any variables s and t that are strings, and i that is a number: s = '<any string>' t = '<any string>' i = <any number> which of these are equivalent to s.find(t,i): a. s[i: ].find(t) b. s.find(t)[ :i] c. s[i: ].find(t) + i d. s[i: ].find(t[i: ]) Extracting Links (Video: Extracting Links) A web page is really just a long string of characters. Your browser renders the web page in a way that looks more attractive than just the string of characters. You can view the string of characters for any web page in your browser. How to do this depends on the browser you are using. For Chrome and Firefox, right-click anywhere on the page that is not a link and select "View Page Source". For Internet Explorer, right-click and select "View Source". Here's what this looks like in Chrome: Select View Page Source from the menu. 18
19 The raw string for the web page pops up in a new window: For our web crawler, the important thing is to find the links to other web pages in the page. We can find those links by looking for the anchor tags that match this structure: <a href="<url>"> For example, here is a link to the News/Blag page: <a href= To build our crawler, for each web page we want to find all the link target URLs on the page. We want to keep track of them and follow them to find more content on the web. For this unit, we will do the first step which is to extract the first target URL from the page. In Unit 2, we will see how to keep going to get all the link targets, and in Unit 3, we will see how to keep track of them to be able to crawl the target pages. For now, our goal is to take the text from a web request and find the first link target in that text. We can do this by finding the anchor tag, <a href=", and then extract from that tag the URL that is found between the double quotes. We will assume that with the page's contents in a variable, page. 19
20 Quiz (Video: Extracting Links) Write Python code that initializes the variable start_link to be the value of the position where the first '<a href=' occurs in the string page refers to. Quiz (Video: Final Quiz) Write Python code that assigns to the variable url a string that is the value of the first URL that appears in a link tag in the string page. For the example page used in the test code, your code should end up with url having the value ' page = <contents of a web page> start_link = page.find('<a href= ') [ your code here ] print url Yay! You did it and are off to a great start! You've learned about programs, variables, expressions, and strings, and a well on your way to building a web crawler. Next unit, we will learn some big ideas in computer science that will make this code more useful and enable us to get all the links on the page, not just the first one. 20
University of Hull Department of Computer Science. Wrestling with Python Week 01 Playing with Python
Introduction Welcome to our Python sessions. University of Hull Department of Computer Science Wrestling with Python Week 01 Playing with Python Vsn. 1.0 Rob Miles 2013 Please follow the instructions carefully.
Python Loops and String Manipulation
WEEK TWO Python Loops and String Manipulation Last week, we showed you some basic Python programming and gave you some intriguing problems to solve. But it is hard to do anything really exciting until
Python Lists and Loops
WEEK THREE Python Lists and Loops You ve made it to Week 3, well done! Most programs need to keep track of a list (or collection) of things (e.g. names) at one time or another, and this week we ll show
How to register and use our Chat System
How to register and use our Chat System Why this document? We have a very good chat system and easy to use when you are set up, but getting registered and into the system can be a bit complicated. If you
We will learn the Python programming language. Why? Because it is easy to learn and many people write programs in Python so we can share.
LING115 Lecture Note Session #4 Python (1) 1. Introduction As we have seen in previous sessions, we can use Linux shell commands to do simple text processing. We now know, for example, how to count words.
Introduction to Python
WEEK ONE Introduction to Python Python is such a simple language to learn that we can throw away the manual and start with an example. Traditionally, the first program to write in any programming language
First Bytes Programming Lab 2
First Bytes Programming Lab 2 This lab is available online at www.cs.utexas.edu/users/scottm/firstbytes. Introduction: In this lab you will investigate the properties of colors and how they are displayed
COMSC 100 Programming Exercises, For SP15
COMSC 100 Programming Exercises, For SP15 Programming is fun! Click HERE to see why. This set of exercises is designed for you to try out programming for yourself. Who knows maybe you ll be inspired to
A Programming Language for Mechanical Translation Victor H. Yngve, Massachusetts Institute of Technology, Cambridge, Massachusetts
[Mechanical Translation, vol.5, no.1, July 1958; pp. 25-41] A Programming Language for Mechanical Translation Victor H. Yngve, Massachusetts Institute of Technology, Cambridge, Massachusetts A notational
How To Login To Webex Online
Getting Prepared for Your Online Course! This document will let you know what to expect and walk you through a Test Login One of our top priorities is to meet your demand for high quality, easy to use,
Exercise 4 Learning Python language fundamentals
Exercise 4 Learning Python language fundamentals Work with numbers Python can be used as a powerful calculator. Practicing math calculations in Python will help you not only perform these tasks, but also
CS 1133, LAB 2: FUNCTIONS AND TESTING http://www.cs.cornell.edu/courses/cs1133/2015fa/labs/lab02.pdf
CS 1133, LAB 2: FUNCTIONS AND TESTING http://www.cs.cornell.edu/courses/cs1133/2015fa/labs/lab02.pdf First Name: Last Name: NetID: The purpose of this lab is to help you to better understand functions:
The programming language C. sws1 1
The programming language C sws1 1 The programming language C invented by Dennis Ritchie in early 1970s who used it to write the first Hello World program C was used to write UNIX Standardised as K&C (Kernighan
Programming in Access VBA
PART I Programming in Access VBA In this part, you will learn all about how Visual Basic for Applications (VBA) works for Access 2010. A number of new VBA features have been incorporated into the 2010
Welcome to Math 19500 Video Lessons. Stanley Ocken. Department of Mathematics The City College of New York Fall 2013
Welcome to Math 19500 Video Lessons Prof. Department of Mathematics The City College of New York Fall 2013 An important feature of the following Beamer slide presentations is that you, the reader, move
Part 1 Foundations of object orientation
OFWJ_C01.QXD 2/3/06 2:14 pm Page 1 Part 1 Foundations of object orientation OFWJ_C01.QXD 2/3/06 2:14 pm Page 2 1 OFWJ_C01.QXD 2/3/06 2:14 pm Page 3 CHAPTER 1 Objects and classes Main concepts discussed
Lexical analysis FORMAL LANGUAGES AND COMPILERS. Floriano Scioscia. Formal Languages and Compilers A.Y. 2015/2016
Master s Degree Course in Computer Engineering Formal Languages FORMAL LANGUAGES AND COMPILERS Lexical analysis Floriano Scioscia 1 Introductive terminological distinction Lexical string or lexeme = meaningful
Hands-on Exercise 1: VBA Coding Basics
Hands-on Exercise 1: VBA Coding Basics This exercise introduces the basics of coding in Access VBA. The concepts you will practise in this exercise are essential for successfully completing subsequent
Lab 4.4 Secret Messages: Indexing, Arrays, and Iteration
Lab 4.4 Secret Messages: Indexing, Arrays, and Iteration This JavaScript lab (the last of the series) focuses on indexing, arrays, and iteration, but it also provides another context for practicing with
EVALUATING ACADEMIC READINESS FOR APPRENTICESHIP TRAINING Revised For ACCESS TO APPRENTICESHIP
EVALUATING ACADEMIC READINESS FOR APPRENTICESHIP TRAINING For ACCESS TO APPRENTICESHIP MATHEMATICS SKILL OPERATIONS WITH INTEGERS AN ACADEMIC SKILLS MANUAL for The Precision Machining And Tooling Trades
Beginning to Program Python
COMP1021 Introduction to Computer Science Beginning to Program Python David Rossiter Outcomes After completing this presentation, you are expected to be able to: 1. Use Python code to do simple text input
Parsing Technology and its role in Legacy Modernization. A Metaware White Paper
Parsing Technology and its role in Legacy Modernization A Metaware White Paper 1 INTRODUCTION In the two last decades there has been an explosion of interest in software tools that can automate key tasks
CS 106 Introduction to Computer Science I
CS 106 Introduction to Computer Science I 01 / 21 / 2014 Instructor: Michael Eckmann Today s Topics Introduction Homework assignment Review the syllabus Review the policies on academic dishonesty and improper
G563 Quantitative Paleontology. SQL databases. An introduction. Department of Geological Sciences Indiana University. (c) 2012, P.
SQL databases An introduction AMP: Apache, mysql, PHP This installations installs the Apache webserver, the PHP scripting language, and the mysql database on your computer: Apache: runs in the background
Module 2 Cloud Computing
1 of 9 07/07/2011 17:12 Module 2 Cloud Computing Module 2 Cloud Computing "Spending on IT cloud services will triple in the next 5 years, reaching $42 billion worlwide." In cloud computing, the word "cloud"
Retrieving Data Using the SQL SELECT Statement. Copyright 2006, Oracle. All rights reserved.
Retrieving Data Using the SQL SELECT Statement Objectives After completing this lesson, you should be able to do the following: List the capabilities of SQL SELECT statements Execute a basic SELECT statement
The first program: Little Crab
CHAPTER 2 The first program: Little Crab topics: concepts: writing code: movement, turning, reacting to the screen edges source code, method call, parameter, sequence, if-statement In the previous chapter,
Programming LEGO NXT Robots using NXC
Programming LEGO NXT Robots using NXC This text programming language derived from C language is bended together with IDE BricxCC on standard firmware LEGO Mindstorms. This can be very convenient for those,
Eucalyptus 3.4.2 User Console Guide
Eucalyptus 3.4.2 User Console Guide 2014-02-23 Eucalyptus Systems Eucalyptus Contents 2 Contents User Console Overview...4 Install the Eucalyptus User Console...5 Install on Centos / RHEL 6.3...5 Configure
An Introduction to Computer Science and Computer Organization Comp 150 Fall 2008
An Introduction to Computer Science and Computer Organization Comp 150 Fall 2008 Computer Science the study of algorithms, including Their formal and mathematical properties Their hardware realizations
SEO Overview. Introduction
Introduction This guide addresses a number of separate issues which are involved in Search Engine Optimisation (SEO) - the art of ensuring that your pages rank well in the "organic listings" [Wikipedia]
COMP 356 Programming Language Structures Notes for Chapter 4 of Concepts of Programming Languages Scanning and Parsing
COMP 356 Programming Language Structures Notes for Chapter 4 of Concepts of Programming Languages Scanning and Parsing The scanner (or lexical analyzer) of a compiler processes the source program, recognizing
2 The first program: Little Crab
2 The first program: Little Crab topics: concepts: writing code: movement, turning, reacting to the screen edges source code, method call, parameter, sequence, if statement In the previous chapter, we
FAQS. You can schedule a WebEx session ahead or start it instantly in your choice of ways:
FAQS What is WebEx? WebEx is an easy way to exchange ideas and information with anyone, anywhere. It combines real-time desktop sharing with phone conferencing, so everyone sees the same thing as you talk.
Mail Merge Tutorial (for Word 2003-2007) By Allison King Spring 2007 (updated Fall 2007)
Mail Merge Tutorial (for Word 2003-2007) By Allison King Spring 2007 (updated Fall 2007) What is mail merge? You've probably heard it mentioned around the office or at an interview (especially for a temp
Exercise 1: Python Language Basics
Exercise 1: Python Language Basics In this exercise we will cover the basic principles of the Python language. All languages have a standard set of functionality including the ability to comment code,
Outline. hardware components programming environments. installing Python executing Python code. decimal and binary notations running Sage
Outline 1 Computer Architecture hardware components programming environments 2 Getting Started with Python installing Python executing Python code 3 Number Systems decimal and binary notations running
what operations can it perform? how does it perform them? on what kind of data? where are instructions and data stored?
Inside the CPU how does the CPU work? what operations can it perform? how does it perform them? on what kind of data? where are instructions and data stored? some short, boring programs to illustrate the
LEARNING TO PROGRAM WITH PYTHON. Richard L. Halterman
LEARNING TO PROGRAM WITH PYTHON Richard L. Halterman Copyright 2011 Richard L. Halterman. All rights reserved. i Contents 1 The Context of Software Development 1 1.1 Software............................................
Part I. The Picture class
CS 161 LAB 5 This lab will have two parts. In the first part, we will create a class to automate the drawing of the robot from the second lab. For the second part, we will begin a ClunkyCalculator class
Using Audacity to Podcast: University Classroom Version Dr. Marshall Jones Riley College of Education, Winthrop University
Using Audacity to Podcast: University Classroom Version Dr. Marshall Jones Riley College of Education, Winthrop University Audacity is available for the Mac and PC. It is free. (That s right, FREE!) You
>print "hello" [a command in the Python programming language]
What Is Programming? Programming is the process of writing the code of computer programs. A program is just a sequence of instructions that a computer is able to read and execute, to make something happen.
JavaScript: Introduction to Scripting. 2008 Pearson Education, Inc. All rights reserved.
1 6 JavaScript: Introduction to Scripting 2 Comment is free, but facts are sacred. C. P. Scott The creditor hath a better memory than the debtor. James Howell When faced with a decision, I always ask,
Jenesis Software - Podcast Episode 3
Jenesis Software - Podcast Episode 3 Welcome to Episode 3. This is Benny speaking, and I'm with- Eddie. Chuck. Today we'll be addressing system requirements. We will also be talking about some monitor
Computational Mathematics with Python
Boolean Arrays Classes Computational Mathematics with Python Basics Olivier Verdier and Claus Führer 2009-03-24 Olivier Verdier and Claus Führer Computational Mathematics with Python 2009-03-24 1 / 40
MEAP Edition Manning Early Access Program Hello! ios Development version 14
MEAP Edition Manning Early Access Program Hello! ios Development version 14 Copyright 2013 Manning Publications For more information on this and other Manning titles go to www.manning.com brief contents
Google Apps for Education: The Basics
Google Apps for Education: The Basics You will learn how to get started with Google Drive by uploading and converting documents. You will also learn how to share your documents with others. Plus learn
Hypercosm. Studio. www.hypercosm.com
Hypercosm Studio www.hypercosm.com Hypercosm Studio Guide 3 Revision: November 2005 Copyright 2005 Hypercosm LLC All rights reserved. Hypercosm, OMAR, Hypercosm 3D Player, and Hypercosm Studio are trademarks
Informatica e Sistemi in Tempo Reale
Informatica e Sistemi in Tempo Reale Introduction to C programming Giuseppe Lipari http://retis.sssup.it/~lipari Scuola Superiore Sant Anna Pisa October 25, 2010 G. Lipari (Scuola Superiore Sant Anna)
E-Learning Online Course. Teacher s Manual. Created by Focus School Software. for. Monte Vista Christian School
E-Learning Online Course Teacher s Manual Created by Focus School Software for Monte Vista Christian School Focus/SIS e-learning Online Course Manual for Teachers 1 Contents Disclaimer... 1 Portal... 2
6 3 4 9 = 6 10 + 3 10 + 4 10 + 9 10
Lesson The Binary Number System. Why Binary? The number system that you are familiar with, that you use every day, is the decimal number system, also commonly referred to as the base- system. When you
Understanding class definitions
OFWJ_C02.QXD 2/3/06 2:28 pm Page 17 CHAPTER 2 Understanding class definitions Main concepts discussed in this chapter: fields methods (accessor, mutator) constructors assignment and conditional statement
High-Level Programming Languages. Nell Dale & John Lewis (adaptation by Michael Goldwasser)
High-Level Programming Languages Nell Dale & John Lewis (adaptation by Michael Goldwasser) Low-Level Languages What are disadvantages of low-level languages? (e.g., machine code or assembly code) Programming
CSCE 110 Programming I Basics of Python: Variables, Expressions, and Input/Output
CSCE 110 Programming Basics of Python: Variables, Expressions, and nput/output Dr. Tiffani L. Williams Department of Computer Science and Engineering Texas A&M University Fall 2011 Python Python was developed
Introduction to Python
Caltech/LEAD Summer 2012 Computer Science Lecture 2: July 10, 2012 Introduction to Python The Python shell Outline Python as a calculator Arithmetic expressions Operator precedence Variables and assignment
Unit 1 Number Sense. In this unit, students will study repeating decimals, percents, fractions, decimals, and proportions.
Unit 1 Number Sense In this unit, students will study repeating decimals, percents, fractions, decimals, and proportions. BLM Three Types of Percent Problems (p L-34) is a summary BLM for the material
>> My name is Danielle Anguiano and I am a tutor of the Writing Center which is just outside these doors within the Student Learning Center.
>> My name is Danielle Anguiano and I am a tutor of the Writing Center which is just outside these doors within the Student Learning Center. Have any of you been to the Writing Center before? A couple
Moving from CS 61A Scheme to CS 61B Java
Moving from CS 61A Scheme to CS 61B Java Introduction Java is an object-oriented language. This document describes some of the differences between object-oriented programming in Scheme (which we hope you
1 Installing and Running Python
March 16, 2006 Linguist's Guide to Python http://zacharski.org/books/python-for-linguists/ 1 Installing and Running Python Python is available for free for most computer platforms including Microsoft Windows,
Pseudo code Tutorial and Exercises Teacher s Version
Pseudo code Tutorial and Exercises Teacher s Version Pseudo-code is an informal way to express the design of a computer program or an algorithm in 1.45. The aim is to get the idea quickly and also easy
What to Expect on the Compass
What to Expect on the Compass What is the Compass? COMPASS is a set of untimed computer adaptive tests created by the American College Test (ACT) Program. Because COMPASS tests are "computer adaptive,"
Square Roots and Other Radicals
Radicals - Definition Radicals, or roots, are the opposite operation of applying exponents. A power can be undone with a radical and a radical can be undone with a power. For example, if you square 2,
Java CPD (I) Frans Coenen Department of Computer Science
Java CPD (I) Frans Coenen Department of Computer Science Content Session 1, 12:45-14:30 (First Java Programme, Inheritance, Arithmetic) Session 2, 14:45-16:45 (Input and Programme Constructs) Materials
a) What is the major difference between a program that runs under a virtual machine vs. one that does not?
CS109 Midterm Exam, Total = 100 Points Name: Please write neatly and show as much of your work as possible for partial credit. Scan through all problems first, and attack the easiest problems first. Use
Databases in Microsoft Access David M. Marcovitz, Ph.D.
Databases in Microsoft Access David M. Marcovitz, Ph.D. Introduction Schools have been using integrated programs, such as Microsoft Works and Claris/AppleWorks, for many years to fulfill word processing,
Triggers & Actions 10
Triggers & Actions 10 CHAPTER Introduction Triggers and actions are the building blocks that you can use to create interactivity and custom features. Once you understand how these building blocks work,
Chapter 2: Elements of Java
Chapter 2: Elements of Java Basic components of a Java program Primitive data types Arithmetic expressions Type casting. The String type (introduction) Basic I/O statements Importing packages. 1 Introduction
Personal Portfolios on Blackboard
Personal Portfolios on Blackboard This handout has four parts: 1. Creating Personal Portfolios p. 2-11 2. Creating Personal Artifacts p. 12-17 3. Sharing Personal Portfolios p. 18-22 4. Downloading Personal
Computational Mathematics with Python
Numerical Analysis, Lund University, 2011 1 Computational Mathematics with Python Chapter 1: Basics Numerical Analysis, Lund University Claus Führer, Jan Erik Solem, Olivier Verdier, Tony Stillfjord Spring
CS 40 Computing for the Web
CS 40 Computing for the Web Art Lee January 20, 2015 Announcements Course web on Sakai Homework assignments submit them on Sakai Email me the survey: See the Announcements page on the course web for instructions
Browser Settings for Optimal Site Performance
1 Browser Settings for Optimal Site Performance With the constant upgrades to browsers and to City National s systems, an occasional problem may develop with your browser and our program compatibility.
Computational Mathematics with Python
Computational Mathematics with Python Basics Claus Führer, Jan Erik Solem, Olivier Verdier Spring 2010 Claus Führer, Jan Erik Solem, Olivier Verdier Computational Mathematics with Python Spring 2010 1
CS 100 Introduction to Computer Science Lab 1 - Playing with Python Due September 21/23, 11:55 PM
CS 100 Introduction to Computer Science Lab 1 - Playing with Python Due September 21/23, 11:55 PM First, a word about due dates. If you are in the Tuesday lab section, your assignment is due Monday night
Katy Young s Guide to... Twitter
21/08/13 Step by step guide followed by advanced techniques guide INTRODUCTION Twitter is a social media platform where users tweet content. It s culture is open and encourages users to tweet without needing
AFTER EFFECTS FOR FLASH FLASH FOR AFTER EFFECTS
and Adobe Press. For ordering information, CHAPTER please EXCERPT visit www.peachpit.com/aeflashcs4 AFTER EFFECTS FOR FLASH FLASH FOR AFTER EFFECTS DYNAMIC ANIMATION AND VIDEO WITH ADOBE AFTER EFFECTS
Translators Handbook
Translators Handbook I. Getting Started with MotaWord What is a cloud-based system? Translator Registration Process Translator Compensation III. Lead Translators Duties IV. Proofreaders V. Translating
WA2099 Introduction to Java using RAD 8.0 EVALUATION ONLY. Student Labs. Web Age Solutions Inc.
WA2099 Introduction to Java using RAD 8.0 Student Labs Web Age Solutions Inc. 1 Table of Contents Lab 1 - The HelloWorld Class...3 Lab 2 - Refining The HelloWorld Class...20 Lab 3 - The Arithmetic Class...25
Objectives. Python Programming: An Introduction to Computer Science. Lab 01. What we ll learn in this class
Python Programming: An Introduction to Computer Science Chapter 1 Computers and Programs Objectives Introduction to the class Why we program and what that means Introduction to the Python programming language
Database trends: XML data storage
Database trends: XML data storage UC Santa Cruz CMPS 10 Introduction to Computer Science www.soe.ucsc.edu/classes/cmps010/spring11 [email protected] 25 April 2011 DRC Students If any student in the class
Ch. 10 Software Development. (Computer Programming)
Ch. 10 Software Development (Computer Programming) 1 Definitions Software or Program Instructions that tell the computer what to do Programmer Someone who writes computer programs 2 Instruction Set A vocabulary
Best Practices for WordPress and SEO
Best Practices for WordPress and SEO Original Presentation This presentation was originally given by live, by John Pratt of JTPratt Media to the Wordpress Ann Arbor Meetup Group On January 26th, 2011 Presentation
EKT150 Introduction to Computer Programming. Wk1-Introduction to Computer and Computer Program
EKT150 Introduction to Computer Programming Wk1-Introduction to Computer and Computer Program A Brief Look At Computer Computer is a device that receives input, stores and processes data, and provides
Tips for writing good use cases.
Transforming software and systems delivery White paper May 2008 Tips for writing good use cases. James Heumann, Requirements Evangelist, IBM Rational Software Page 2 Contents 2 Introduction 2 Understanding
VHDL Test Bench Tutorial
University of Pennsylvania Department of Electrical and Systems Engineering ESE171 - Digital Design Laboratory VHDL Test Bench Tutorial Purpose The goal of this tutorial is to demonstrate how to automate
JetBrains ReSharper 2.0 Overview Introduction ReSharper is undoubtedly the most intelligent add-in to Visual Studio.NET 2003 and 2005. It greatly increases the productivity of C# and ASP.NET developers,
Email Basics. For more information on the Library and programs, visit www.bcpls.org BCPLS 08/10/2010 PEMA
Email Basics Email, short for Electronic Mail, consists of messages which are sent and received using the Internet. There are many different email services available that allow you to create an email account
CRM Navigation Guide. Department of Developmental Disabilities. June, 2015
CRM Navigation Guide Department of Developmental Disabilities June, 2015 1. Introduction Welcome to the LOC Tool which was developed using Microsoft Dynamics CRM 2013. Over the past several years CRM (Customer
Formal Languages and Automata Theory - Regular Expressions and Finite Automata -
Formal Languages and Automata Theory - Regular Expressions and Finite Automata - Samarjit Chakraborty Computer Engineering and Networks Laboratory Swiss Federal Institute of Technology (ETH) Zürich March
Table 1 summarizes the requirements for desktop computers running the Participant Application and the myat&t utility.
SYSTEM REQUIREMENTS Participant Application and myat&t Table 1 summarizes the requirements for desktop computers running the Participant Application and the myat&t utility. End-user Computer for Participant
DTD Tutorial. About the tutorial. Tutorial
About the tutorial Tutorial Simply Easy Learning 2 About the tutorial DTD Tutorial XML Document Type Declaration commonly known as DTD is a way to describe precisely the XML language. DTDs check the validity
The 2010 British Informatics Olympiad
Time allowed: 3 hours The 2010 British Informatics Olympiad Instructions You should write a program for part (a) of each question, and produce written answers to the remaining parts. Programs may be used
Systems Dynamics Using Vensim Personal Learning Edition (PLE) Download Vensim PLE at http://vensim.com/freedownload.html
Systems Dynamics Using Personal Learning Edition (PLE) Download PLE at http://vensim.com/freedownload.html Quick Start Tutorial Preliminaries PLE is software designed for modeling one or more quantities
3 Improving the Crab more sophisticated programming
3 Improving the Crab more sophisticated programming topics: concepts: random behavior, keyboard control, sound dot notation, random numbers, defining methods, comments In the previous chapter, we looked
This Unit: Floating Point Arithmetic. CIS 371 Computer Organization and Design. Readings. Floating Point (FP) Numbers
This Unit: Floating Point Arithmetic CIS 371 Computer Organization and Design Unit 7: Floating Point App App App System software Mem CPU I/O Formats Precision and range IEEE 754 standard Operations Addition
Creating Calculated Fields in Access Queries and Reports
Creating Calculated Fields in Access Queries and Reports Access 2000 has a tool called the Expression Builder that makes it relatively easy to create new fields that calculate other existing numeric fields
How to Edit Your Website
How to Edit Your Website A guide to using your Content Management System Overview 2 Accessing the CMS 2 Choosing Your Language 2 Resetting Your Password 3 Sites 4 Favorites 4 Pages 5 Creating Pages 5 Managing
SAIT TDC ORIENTATION PACKAGE
SAIT TDC ORIENTATION PACKAGE System Requirements ----------------------------------------------------------------------------------------------------------- 2 Getting Started --------------------------------------------------------------------------------------------------------------------
