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
const dictionary = { | |
"one": 1, | |
"two": 2, | |
"three": 3, | |
"four": 4, | |
"five": 5, | |
"six": 6, | |
"seven": 7, | |
"eight": 8, | |
"nine": 9, |
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
function getRandomInt(min, max) { | |
min = Math.ceil(min); | |
max = Math.floor(max); | |
return Math.floor(Math.random() * (max - min + 1)) + min; | |
} | |
function roll20() { | |
return getRandomInt(1, 20); | |
} |
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
const Ops = { | |
CREATE: "CREATE", | |
UPDATE: "UPDATE", | |
DELETE: "DELETE", | |
KEEP: "KEEP" | |
}; | |
function constructTree(dom) { | |
if (dom.nodeType === document.TEXT_NODE) { | |
return dom.textContent; |
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
export function createElement(tagName, options, ...children) { | |
// If the "tagName" is a function, we assume it is a custom element and delegate element creation to it. | |
// Otherwise, we create a new Element ourselves. | |
const isCustomElement = typeof tagName === 'function' | |
const element = isCustomElement ? tagName(options) : document.createElement(tagName) | |
if (!options) { | |
return element | |
} |
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
// feynman algorithm: | |
// - Write down a problem about [subject] | |
// - Think very hard | |
// - Write down the answer | |
// study: | |
// - For each [chapter] in [class]: | |
// - Write down the three most important things in [chapter] | |
// - For each [subject] in [chapter]: |
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
#include <stdio.h> | |
#include <stdlib.h> | |
using namespace std; | |
int compare(const void *a, const void *b) | |
{ | |
return *(int*)a - *(int*)b; | |
} |
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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <iostream> | |
#include <fstream> | |
#include <string> | |
using namespace std; | |
struct node | |
{ | |
int key; |
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
$(window).load(function () { | |
var $container = $('.items'); | |
$container.imagesLoaded(function () { | |
$container.isotope({ | |
itemSelector: '.item-small' | |
}); | |
}); | |
}); |
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
var elements = ["Am", "Ar", "As", "At", "Au", "B", "Ba", "Be", "Bh", "Bi", "Bk", "Br", "C", "Ca", "Cd", "Ce", "Cf", "Cl", "Cm", "Co", "Cn", "Cr", "Cs", "Cu", "Db", "Ds", "Dy", "Er", "Es", "Eu", "F", "Fe", "Fm", "Fr", "Ga", "Gd", "Ge", "H", "He", "Hf", "Hg", "Ho", "Hs", "I", "In", "Ir", "K", "Kr", "La", "Li", "Lr", "Lu", "Md", "Mg", "Mn", "Mo", "Mt", "N", "Na", "Nb", "Nd", "Ne", "Ni", "No", "Np", "O", "Os", "P", "Pa", "Pb", "Pd", "Pm", "Po", "Pr", "Pt", "Pu", "Ra", "Rb", "Re", "Rf", "Rg", "Rh", "Rn", "Ru", "S", "Sb", "Sc", "Se", "Sg", "Si", "Sm", "Sn", "Sr", "Ta", "Tb", "Tc", "Te", "Th", "Ti", "Tl", "Tm", "U", "Uu", "Uu", "Uu", "Uu", "Uu", "Uu", "Uu", "Uu", "V", "W", "Xe", "Y", "Yb", "Zn"]; |
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
hgg |
NewerOlder