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
/* Simple and fast generation of RFC4122 UUIDS. */ | |
(function(root, factory) { | |
'use strict'; | |
root.uuid = factory(); | |
})(window, function() { | |
var byteToHex = []; | |
for (var i=0; i<256; ++i) { | |
byteToHex[i] = (i + 0x100).toString(16).substr(1); |
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
/** | |
* @description Simple hashing for JS objects | |
* @author Gabriel Dewes at 9 nov, 2016 | |
*/ | |
Object.prototype.hashify = function(obj, len) { | |
obj = obj || this; | |
len = len || 2; | |
var i, j, r=[]; | |
for (i=0; i<len; i++) { | |
r.push(i*268803292); |
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
// javac BinaryTree.java | |
// java BinaryTree | |
/** | |
* Created by Dewes on 13/09/2016. | |
*/ | |
public class BinaryTree { | |
// Nosso nó pai | |
private Node node; |
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
/** | |
* @description Implementação de uma árvore binária de busca em JavaScript. | |
* @author Gabriel Dewes at 13 oct, 2016 | |
*/ | |
/** | |
* @constructor | |
*/ | |
function BinaryTree() { | |
/** |
NewerOlder