This file contains hidden or 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
function Queue() { | |
this.reset(); | |
} | |
Queue.prototype.dequeue = function () { | |
if (this.empty() !== true) { | |
this.length -= 1; | |
return this.items.shift(); | |
} | |
return undefined; |
This file contains hidden or 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
function Deque() { | |
this.reset(); | |
} | |
Deque.prototype.pop = Stack.prototype.pop; | |
Deque.prototype.push = Stack.prototype.push; | |
Deque.prototype.dequeue = Queue.prototype.dequeue; | |
Deque.prototype.enqueue = Queue.prototype.enqueue; | |
Deque.prototype.empty = Stack.prototype.empty; | |
Deque.prototype.reset = Stack.prototype.reset; |
This file contains hidden or 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
#!/bin/bash | |
# CouchDB install script | |
# For installing from SVN source | |
# Before running make sure CouchDB is not running | |
# Clean up old CouchDB files | |
find /usr/local -name \*couch* | xargs rm -rf | |
# Build |
NewerOlder