In your command-line run the following commands:
brew doctor
brew update
setup_placeholders = (function() { | |
$.support.placeholder = false; | |
test = document.createElement('input'); | |
if('placeholder' in test) { | |
$.support.placeholder = true; | |
return function() {} | |
} else { | |
return function(){ |
var q = require('q'); | |
var Schema = require('jugglingdb').Schema; | |
var schema = new Schema('postgres', { | |
database: 'woonketwong', | |
username: 'woonketwong' | |
}); | |
// The first argument to schema.define is the table | |
// and schema name. Do not use any capital letter | |
// in the table name because the database create table |
var HashTable = function() { | |
this._storage = []; | |
this._count = 0; | |
this._limit = 8; | |
} | |
HashTable.prototype.insert = function(key, value) { | |
//create an index for our storage location by passing it through our hashing function | |
var index = this.hashFunc(key, this._limit); |
function mapValues(obj, fn) { | |
return Object.keys(obj).reduce((result, key) => { | |
result[key] = fn(obj[key], key); | |
return result; | |
}, {}); | |
} | |
function pick(obj, fn) { | |
return Object.keys(obj).reduce((result, key) => { | |
if (fn(obj[key])) { |
In your command-line run the following commands:
brew doctor
brew update