Skip to content

Instantly share code, notes, and snippets.


Clemens Tolboom clemens-tolboom

View GitHub Profile
robnyman / Create-open-IndexedDB-database.js
Created February 23, 2012 15:50
Create/open IndexedDB database
View Create-open-IndexedDB-database.js
// IndexedDB
window.indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB || window.OIndexedDB || window.msIndexedDB,
IDBTransaction = window.IDBTransaction || window.webkitIDBTransaction || window.OIDBTransaction || window.msIDBTransaction,
dbVersion = 1;
Note: The recommended way to do this is assigning it to window.indexedDB,
to avoid potential issues in the global scope when web browsers start
removing prefixes in their implementations.
View SampleGraphSort.php
use \Gliph\Graph\DirectedAdjacencyList;
use \Gliph\Traversal\DepthFirst;
$graph = new DirectedAdjacencyList();
foreach ($entity_list as $entity) {
if ($entity->has('embedded')) {
foreach ($entity->get('embedded') as $embedded) {