This presentation is an HTML5 website
Press -> key to advance.
Zoom in/out: Ctrl or Command + +/-
Having issues seeing the presentation? Read the disclaimer
This presentation supports touch
Data to your users as it happens
Demo using http://pusherapp.com/
Note: Use this button if you also want to reset the permissions
dropZone.addEventListener("drop", function(e) {
e.preventDefault();
var files = event.dataTransfer.files;
for(var i = 0, file; file = files[i]; i++) {
var reader = new FileReader();
reader.onload = function(evt) {
var imgs = document.getElementById("images");
var img = document.createElement("img");
img.src = evt.target.result;
imgs.appendChild(img);
};
reader.readAsDataURL(file);
}
@-webkit-keyframes pulse {
0% { -webkit-transform: scale(1) rotate(5deg); }
50% { -webkit-transform: scale(1.5) rotate(-15deg); }
100% { -webkit-transform: scale(1) rotate(5deg); }
}
.container {
border: solid black 2px;
border-radius: 10px;
-webkit-box-shadow: #222 0px 0px 10px;
background: -webkit-gradient(radial, 64 64, 100, 25 25, 325, from(#00C1FC), to(#0E68CF))
}
.pulse {
-webkit-animation-direction: alternate;
-webkit-animation-duration: 2s;
-webkit-animation-iteration-count: infinite;
-webkit-animation-name: pulse;
-webkit-animation-timing-function: ease-in-out;
text-shadow: black 1px 1px 1px;
font-family: Lobster;
text-shadow: black 5px 5px 2px;
-webkit-transform-origin: 50% 0%;
}
Inspired by http://wdnuon.blogspot.com/2010/05/implementing-ibooks-page-curling-using.html
<?xml version="1.0" standalone="no"?> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> <svg width="100%" height="100%" version="1.1" xmlns="http://www.w3.org/2000/svg"> <rect width="300" height="100" style="fill:rgb(255,0,0); stroke-width:2;"/> </svg>
<html>
<body>
<svg>
<rect
width="300"
height="100"
style="fill:rgb(255,0,0); stroke-width:2;"/>
</svg>
</body>
</html>
Demo: http://3.ly/timer
Simply create a cache manifest file, linked from your HTML
<html manifest="timer.manifest>"
CACHE MANIFEST timer.html timer.css timer.js timer.png
AddType text/cache-manifest manifest
Overview: http://is.gd/cpUUP
main.js:
var worker = new Worker(‘extra_work.js');
worker.onmessage = function (event) { alert(event.data); };
extra_work.js:
postMessage(some_data);
Paint here
Difference
var db = window.openDatabase("Database Name", "1.0");
function createTable() {
db.transaction(function(tx) {
tx.executeSql("CREATE TABLE test (id INTEGER PRIMARY KEY ASC, text TEXT)",
[], function(tx) { log.innerHTML = 'test created!' }, onError);
});
}
db.transaction(function(tx) {
tx.executeSql("SELECT * FROM test", [], successCallback, errorCallback);
});
db.transaction(function(tx) {
tx.executeSql("INSERT INTO test (text) VALUES (?)", [document.querySelector('#todoitem').value],
function(tx, result) {
showRecords();
},
onError);
});
var db = indexedDB.open('tweets', 'Tweet store', false);
db.createObjectStore('tweets', 'id'); // 'id' is the key
db.createIndex('ByScreenname', 'tweets', 'screen_name', false);
var store = db.openObjectStore('tweets');
var objKey = store.put({id: 12345667, text: 'Hello World', screen_name: "Joe"});
var index = db.openIndex('ByScreenname');
var matching = index.get('Joe');
if (matching) {
report(matching.id, matching.screen_name, matching.text);
}