Skip to content

Instantly share code, notes, and snippets.

View clemens-tolboom's full-sized avatar

Clemens Tolboom clemens-tolboom

View GitHub Profile
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) {
robnyman / Create-open-IndexedDB-database.js
Created February 23, 2012 15:50
Create/open IndexedDB database
// 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.