Week 10 Quiz 1 Review

Base Number Systems Base Binary 2 Octal 8 Decimal 10 Hexadecimal 16

‘42’ 101010 52 42 0x2a

Bitwise Operators & - AND 1100 &1010 1000

| - OR 0011 |1010 1011

^ - XOR 1010 ^1100 0110

~ - NOT ~(1010) = 0101

Asymptotic Runtime • Big O – Upper bound on runtime. – ‘Worst Case’

• Omega – Lower bound on runtime. – ‘Best Case’

• If a program takes 6n2 + 4n + 57 steps… – O(n2), we ignore constants, lower-order terms.

Stacks • First in, last out data structure. • Can ‘pop’ or ‘push’ things to the top of the stack.

Top

Queues • First in, first out data structure. • “Insert” and “Remove” operations.

Head

Tail

Trees • Trees consist of ‘branches’. struct branch { struct branch* left; int val; struct branc* right; }

Binary Search Tree A BST is a special tree such that: 1) Left ‘sub-tree’ of each node contains only lesser nodes. 2) Right ‘sub-tree’ of each node contains only greater nodes. 3) Left and right ‘sub-trees’ of each node are also binary search trees.

8

4

16

15

42

23

Binary Search Tree Lower bound on depth of tree is log(n).

8

16 4 8

16

42

15 4

15

42

23 23

Hash Tables • Consists of an array and a hash function. • Hash function maps input to an index in the associated array. • Allows us to check whether something is contained in a data structure without checking through the entire thing.

Hash Tables Good Hash Functions are: • Deterministic • Well-distributed

int xkcd_hash(char* word) { return 4; }

THIS IS BAD

Tries • Tree of Arrays • Fast Lookup, High Memory Use struct trie_node { struct trie_node* array[N]; bool checkbox; }

Tries

Tries Array

Checkbox F

T

F

First two elements are in an array. First represents the letter ‘a’. Second represents the letter ‘b’.

Checkbox indicates whether what we’ve looked at so far is in the data structure. “a”, “bb” are in this structure.

T

HTML • Hypertext Markup Language • Arranges and formats webpage content • ‘Tags’ enclose regions of page. – Each beginning tag has an ending tag. – In general, close most recently opened first.

• ‘Tags’ may have ‘attributes’. – Attributes are like parameters for a tag.

CSS • Cascading Style Sheets • Specifically used to format the appearance of elements of a webpage • May be included in a tag’s ‘style’ attribute, or included in a separate .css file

CSS • ‘style’ attributes allow for formatting of tag contents using CSS. • Examples: align: center font-size: small color: blue display: block

CSS • Can also define formatting in an external .css file which is linked in. Format Selector (name of tag) { declarations; }

PHP • PHP: PHP Hypertext Preprocessor • When accessed, dynamically generates a webpage which it then outputs to browser. • PHP code enclosed in tag.

PHP

C Compiled Strongly-typed

PHP Interpreted Loosely-typed

mySQL • SQL – Structured Query Language • Database software which allows us to store a collection of data as ‘entries’ containing a set of distinct ‘fields’ containing values. • Databases contains tables, which contain rows, which contain fields.

mySQL • INSERT – Insert a new entry.

• DELETE – Remove an existing entry.

• SELECT – Select one or more entries.

• UPDATE – Update the fields of an existing entry.

mySQL Don’t forget to escape user input inserted into query strings! “INSERT INTO students VALUE (‘’);”

Development of Interactivity • HTML – static web pages • PHP – dynamically generated web pages • Javascript – web pages with dynamic content

Javascript • Programming Language used in web design • Unlike PHP, executed client-side! • Javascript code is included in HTML passed to browser.

Javascript • Like CSS, may be included either within the HTML page or linked in from external .js file. • Linking in:

Javascript PHP

Javascript

Interpreted Loosely-typed Server-side execution Client-side execution

Document Object Model • Contents of web page represented in a structure called the Document Object Model. • We can access individual elements by Id in Javascript and get their contents! • Example: – name = document.getElementById(‘name’).value;

Development of Interactivity • HTML – static web pages • PHP – dynamically generated web pages • Javascript – web pages with dynamic content

• Ajax – dynamically load content from other pages

Ajax • Asynchronous Javascript and XML • Allows us to send requests to other pages for new content without reloading page!

Questions

?

This Was Section

Good luck and thanks for a great year.

Week 8 - index.xml

Fast Lookup, High Memory Use struct trie_node ... SQL – Structured Query Language. • Database software which ... Server-side execution Client-side execution ...

604KB Sizes 2 Downloads 260 Views

Recommend Documents

Week 8 - index.xml
Javascript. • Programming Language used in web design. • Unlike PHP, executed client-side! • Javascript code is included in HTML passed to browser.

Database Week 8 - godsonug
managed compute infrastructure capable of hosting end customer applications and billed by ... XaaS is quickly emerging as a term that is being readily recognized as services that were previously separated on either private or public ... Definition of

Database Week 8 - godsonug
database whereas DDBMS engine supports decentralized or distributed database platforms. ◦ Distributed databases bring the advantages of distributed computing to the database management domain. ◦ Distributed databases help us to do distributed com

Week 8 - CS50 CDN
PHP: PHP Hypertext Preprocessor. • When accessed, dynamically generates a webpage which it then outputs to browser. • PHP code enclosed in tag.

Database Week 8 - godsonug
managed compute infrastructure capable of hosting end customer applications and billed by consumption” ... Hybrid Clouds combine both public and private cloud models. With a Hybrid Cloud, service providers can utilize. 3rd party Cloud Providers in

Week 8 - index.xml
Big O – Upper bound on runtime. – 'Worst Case' ... First in, last out data structure. • Can 'pop' or ... Database software which allows us to store a collection of data ...

Challenges Week 8 -
Read In Defense of Food: An Eater's Manifesto by Michael Pollan. Spirituality ... Art Tour. Create and publish a guide for people to tour your favorite art in the city.

MCQ solution week 8.pdf
a) Root mean squared error (RMSE). b) Sum of squared error (SSE). c) Both A and B. d) None of the above. Answer. A. Which is the true assumptions that are made when building decision trees. a) The data can be described by features, such as the featur

Term 4 Week 8.pdf
Phone: 9533 3341 Fax: 9584 2672. [email protected]. www.stjriverwood.catholic.edu.au. Mary MacKillop. St Mary of the Cross. Australia's first ...

week 8 term 2 .pdf
There was a problem previewing this document. Retrying... Download. Connect more apps... Try one of the apps below to open or edit this item. week 8 term 2 .

Term 2 Week 8.pdf
Page 1 of 13. Newsletter : Term 2, Week 7, 22 June 2017. Welcome to New Students. Annika Zhao. Rajesh Freya. Term Dates 2017. Term 2. 1 May - Friday 7 July. Term 3. 24 July - Friday 29 Sep. Term 4. 16 Oct – Friday 15Dec. REMINDER: Any monies due th

week 8 term 3.pdf
stall or activity e.g donation that pays for the whitebait so all is profit,. donation for the equipment for the hair and beauty salon , please let. Chrissy in the school office know- [email protected] or ph. 4488339. • If you or your fami

Term 1 Week 8.pdf
St Joseph's Catholic Primary School. “Work and Pray”. Page 3 of 32. Term 1 Week 8.pdf. Term 1 Week 8.pdf. Open. Extract. Open with. Sign In. Main menu.

Term 2 Week 8.pdf
Have a good fortnight. Lynda Busuttil. Congratulations to Jordan Aquilina who received a Gold Medal in. his recent Karate Tournament. St Joseph's Catholic Primary School. “Work and Pray”. “Blessed are the merciful, for they obtain mercy.” Mat

Term 4 Week 8 Newsletter.pdf
will be deposited into your school banking account. with a Christmas theme. Prizes will be displayed at. School Banking in the Library on Wednesdays 8.15am.

Term 3 Week 8.pdf
mobile phones and instant access to the internet are part and parcel of. daily life for all ages, both at home and at school. Computers are a vital. and absolutely ...

Term 1 Week 8.pdf
Term 1 Week 8 Tuesday 21 March 2017 ... the New Zealand Order of Merit in the Queen's Birthday Honours, for services to education. .... Term 1 Week 8.pdf.

Term 2 Week 8.pdf
There was a problem previewing this document. Retrying... Download. Connect more apps... Try one of the apps below to open or edit this item. Term 2 Week 8.

Newsletter week 8.pdf
school donation? Absence TXT Line: 022 351 2655 Text child's first & last name, area, absence reason, sender's name. Hurricanes Visit Last Friday. Hurricanes.

Term 4 Week 8.pdf
Page 1 of 15. St Joseph's. Catholic Primary School. RIVERWOOD. Dear Parents and Caregivers. The end of the school year is fast approaching, yet the beginning of the. Church's liturgical year begins this Sunday with the first Sunday of. Advent. In the

NEWSLETTER - WEEK 2, TERM 2 Tuesday May 8
May 16, 2018 - Tennis—Program for K to Yr 3 : Primrose Park Tennis –David Chapman. 9908 2366. Double Dutch Skipping—Mark Saunders: Available for ...

Week 21 Rev 8 and 9.pdf
8:7)– a supernatural event, with hail and fire and blood that burns up. the green vegetation. i. 1/3 is significant. This is the antichrists-controlled domain.

St Patrick Newsletter Term 1 Week 8 - email.pdf
There was a problem previewing this document. Retrying... Download. Connect more apps... Try one of the apps below to open or edit this item. St Patrick ...

OFF WEEKLY TEAM STAND BY WEEK 8.pdf
OFF WEEKLY TEAM STAND BY WEEK 8.pdf. OFF WEEKLY TEAM STAND BY WEEK 8.pdf. Open. Extract. Open with. Sign In. Main menu.