This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Offline Web Applications course on Udacity : Grow with Google Application Course | |
//code is placed in the controller file - not in the service worker itself | |
IndexController.prototype._registerServiceWorker = function () { | |
if (!navigator.serviceWorker) return; //feature detection | |
var indexController = this; | |
navigator.serviceWorker.register('/sw.js').then(function (reg) { | |
//if no controller found - latest version is already loaded |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.js"></script> | |
</head> | |
<body> | |
<div id= "intro"> | |
<p> Our first introduction to data visualization </p> | |
</div> | |
<div id="viz"></div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import python | |
print "Hello World!" |