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
debounce = (delay, cancel) => (listener, wait) => { | |
let delayId | |
return function(...args) { | |
cancel(delayId) | |
return delayId = delay(() => listener.apply(this, args), wait) | |
} | |
} | |
debounceTimeout = debounce(setTimeout, clearTimeout) | |
debounceAnimationFrame = debounce(requestAnimationFrame, cancelAnimationFrame) |
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
request.onupgradeneeded = function(event) { | |
var db = event.target.result; | |
var upgradeTransaction = event.target.transaction; | |
var objectStore; | |
if (!db.objectStoreNames.contains("my-store")) { | |
objectStore = db.createObjectStore("my-store"); | |
} else { | |
objectStore = upgradeTransaction.objectStore('my-store'); | |
} |
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
<?php | |
/** | |
* A simple PHP BBCode Parser function | |
* | |
* @author Afsal Rahim | |
* @link http://digitcodes.com/create-simple-php-bbcode-parser-function/ | |
**/ | |
//BBCode Parser function |