{"id":269,"date":"2017-04-27T12:47:10","date_gmt":"2017-04-27T12:47:10","guid":{"rendered":"http:\/\/www.bartlettpublishing.com\/site\/?p=269"},"modified":"2017-04-30T20:31:44","modified_gmt":"2017-04-30T20:31:44","slug":"spring-2017-week-12-class-notes","status":"publish","type":"post","link":"https:\/\/www.bartlettpublishing.com\/site\/2017\/04\/27\/spring-2017-week-12-class-notes\/","title":{"rendered":"Spring 2017 \u2013 Week 12 Class Notes"},"content":{"rendered":"<p>We are getting towards the end &#8211; keep up the good work!  <\/p>\n<p><b>Programming<\/b><\/p>\n<p>This week we worked with Google Maps API to put a marker on a map, and do things when the marker is clicked on.  We learned a bit about API keys, and that certain APIs require generating a key to verify who is using their system.  We talked about JavaScript vs. web (XMLHttpRequest) APIs.  We also discussed the &#8220;defer&#8221; keyword in a script tag for running a script <b>after<\/b> the HTML page is processed by the browser.  The getting started guide for Google Maps is <a href=\"https:\/\/developers.google.com\/maps\/documentation\/javascript\/tutorial\">here<\/a>.  It is very similar to the program that we did in class, but it is all in one file.<\/p>\n<p>Also check out their tutorial on <a href=\"https:\/\/developers.google.com\/maps\/documentation\/javascript\/adding-a-google-map\">Adding a Marker to a map<\/a>.<\/p>\n<p>The Google API key we used for class is <br \/><tt>AIzaSyC7GVgqtLehWpNQ6-0ryq3BsDjHu3d8DSI<\/tt> <br \/> and if you missed class or used one of our computers, you can retype the code we finished with by looking at the images below:<\/p>\n<div>\n<a href=\"http:\/\/www-internal.bartlettpublishing.com\/site\/wp-content\/uploads\/2017\/04\/Screen-Shot-2017-04-27-at-7.41.42-AM.png\" target=\"_blank\"><img src=\"http:\/\/www-internal.bartlettpublishing.com\/site\/wp-content\/uploads\/2017\/04\/Screen-Shot-2017-04-27-at-7.41.42-AM-300x86.png\" alt=\"\" width=\"150\" class=\"alignleft\" \/><\/a><\/p>\n<p><a href=\"http:\/\/www-internal.bartlettpublishing.com\/site\/wp-content\/uploads\/2017\/04\/Screen-Shot-2017-04-27-at-7.41.14-AM.png\" target=\"_blank\"><img src=\"http:\/\/www-internal.bartlettpublishing.com\/site\/wp-content\/uploads\/2017\/04\/Screen-Shot-2017-04-27-at-7.41.14-AM-300x216.png\" alt=\"\" width=\"150\" class=\"alignleft\" \/><\/a>\n<\/div>\n<div style=\"clear: both\"><\/div>\n<p>Note that if you type this in and you get the error &#8220;Oops something went wrong&#8221; instead of your map, that means you typed in the API key wrong when loading that Google Maps Javascript.<\/p>\n<p>Homework:<\/p>\n<ol>\n<li>Add another marker to the map.  Additionally, you should try to put the data in an array, and read the data in a loop.<\/li>\n<li>Keep working on your carts!  I have seen many of you making good headway.  Bring your current versions to class and we will keep working on them, or send me an email!<\/li>\n<\/ol>\n<p><b>Electronics<\/b><\/p>\n<p><b>UPDATE &#8211; the new chapter has been added<\/b>.  The chapter is chapter 26, &#8220;Amplifying Power with Transistors&#8221;.  Note that older chapters have been renumbered because I added an intro chapter on units.<\/p>\n<p>This week we covered a little bit more about frequency response for capacitors and inductors, the basics of reactance and impedance, and what a resonant frequency is.  We also started talking about transistors.  My goal is to have the transistor chapter done for you by Saturday.  There is a transistor chapter in the book right now, but it is incomplete and probably not very readable.  I will update here when the new version is in.  Homework will be for the transistor chapter.<\/p>\n<p><b>Calculus<\/b><\/p>\n<p><b>UPDATE<\/b> &#8211; the new chapter is ready.  Download it and it is chapter 29.<\/p>\n<p>There was no calculus this week.  I will try to get your chapter done shortly.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>We are getting towards the end &#8211; keep up the good work! Programming This week we worked with Google Maps API to put a marker on a map, and do things when the marker is clicked on. We learned a &hellip; <a href=\"https:\/\/www.bartlettpublishing.com\/site\/2017\/04\/27\/spring-2017-week-12-class-notes\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"spay_email":""},"categories":[6],"tags":[],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/www.bartlettpublishing.com\/site\/wp-json\/wp\/v2\/posts\/269"}],"collection":[{"href":"https:\/\/www.bartlettpublishing.com\/site\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.bartlettpublishing.com\/site\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.bartlettpublishing.com\/site\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.bartlettpublishing.com\/site\/wp-json\/wp\/v2\/comments?post=269"}],"version-history":[{"count":9,"href":"https:\/\/www.bartlettpublishing.com\/site\/wp-json\/wp\/v2\/posts\/269\/revisions"}],"predecessor-version":[{"id":273,"href":"https:\/\/www.bartlettpublishing.com\/site\/wp-json\/wp\/v2\/posts\/269\/revisions\/273"}],"wp:attachment":[{"href":"https:\/\/www.bartlettpublishing.com\/site\/wp-json\/wp\/v2\/media?parent=269"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.bartlettpublishing.com\/site\/wp-json\/wp\/v2\/categories?post=269"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.bartlettpublishing.com\/site\/wp-json\/wp\/v2\/tags?post=269"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}