In your command-line run the following commands:
brew doctor
brew update
In your command-line run the following commands:
brew doctor
brew update
var LRUCache = function(capacity) { | |
this.hash = {}; | |
this.capacity = capacity; | |
this.counter = 0; | |
}; | |
LRUCache.prototype.get = function(key) { | |
const obj = this.hash[key]; | |
if (typeof obj === "undefined") { |
/* Setup */ | |
class Node { | |
left = null; | |
right = null; | |
constructor(val) { | |
this.val = val; | |
} | |
} | |
const A = new Node('A'); |
var str = '-¯-_'; | |
var i; | |
var j = 0; | |
document.title = ''; | |
setInterval(function(){ | |
document.title = document.title + str[j++]; | |
j = j % str.length; | |
i = i || 0; | |
i = ++i % (str.length * 5); | |
if (!i) document.title = ''; |
var numIslands = function(grid) { | |
let islands = 0; | |
for (let i = 0; i < grid.length; i++) { | |
for (let j = 0; j < grid[i].length; j++) { | |
if (grid[i][j] == 1) { | |
markRecur(i, j, grid); | |
islands++; | |
} | |
} | |
} |
document.querySelectorAll('audio').forEach((au) => { | |
const url = au.currentSrc; | |
fetch(url).then(r => r.blob()).then(obj => downloadAudio(obj)); | |
}) | |
function downloadAudio(blob) { | |
const ele = document.createElement('a'); | |
let counter = 0; | |
downloadAudio = function (blob) { |
function wrk() { | |
var blobURL = URL.createObjectURL(new Blob(['(', | |
function () { | |
for (let i = 0; i < 5000000000; i++) { } console.log(1000); | |
}.toString(), | |
')()'], { type: 'application/javascript' })); | |
const worker = new Worker(blobURL); |
// $container - css selector for nodes that need to be sorted | |
// $number - css selector for node with number | |
function sortElements($container, $number) { | |
const hash = new Map(); | |
const list = Array.from(document.querySelectorAll($container)); | |
for (let i = 0; i < list.length; i++) { | |
for (let j = i; j < list.length; j++) { | |
const element = list[i]; |