Skip to content

Instantly share code, notes, and snippets.

@GeKorm
GeKorm / problem.js
Created February 3, 2024 00:23
Cool problem
async function run(elements) {
// ============
// your code here starts here
// We will insert at arbitrary indices in order to preserve result order
const results = Array.from({ length: TOTAL });
const requestPool = [];
let processed = 0;
for (const element of elements) {
const poolSize = requestPool.length;
if (poolSize >= MAX_INFLIGHT || processed >= TOTAL - MAX_INFLIGHT) {
@GeKorm
GeKorm / designer.html
Created July 31, 2014 11:57
designer
<link rel="import" href="../components/polymer/polymer.html">
<polymer-element name="my-element">
<template>
<style>
#core_header_panel {
border: 1px solid;
opacity: 0.7;
}