I hereby claim:
- I am thatonebro on github.
- I am thatonebro (https://keybase.io/thatonebro) on keybase.
- I have a public key ASCO6Mrm8wq7VAvWmILmFitEJYvL0lUJc0L4g99_KCZj3Qo
To claim this, I am signing this object:
| import { bench, group, run } from "mitata"; | |
| const ENTRIES = 100000; | |
| const OBJ_TEST = new Array(ENTRIES).fill(0).map((_) => ({ | |
| id: "Appointment.priority", | |
| path: "Appointment.priority", | |
| short: "Used to make informed decisions if needing to re-prioritize", | |
| definition: | |
| "The priority of the appointment. Can be used to make informed decisions if needing to re-prioritize appointments. (The iCal Standard specifies 0 as undefined, 1 as highest, 9 as lowest priority).", |
| const isPositionWithinBox = (point1, point2, coords) => { | |
| if (point1.x < coords.x && point2.x > coords.x && point1.y > coords.y && point2.y < coords.y) | |
| return true; | |
| return false; | |
| }; | |
| const getBoundingBox = (origin, width, height) => { | |
| const x1 = origin.x - width / 2; | |
| const y1 = origin.y + height / 2; | |
| const x2 = origin.x + width / 2; |
I hereby claim:
To claim this, I am signing this object:
| // Returns an array of two arrays, one will all resolved promises, and one with all rejected promises | |
| const robustPromiseAll = async (promises) => { | |
| // This is how we wrap a promise to prevent it from rejecting directly in the Promise.all and causing a short circuit | |
| const wrapPromise = async (promise) => { | |
| // We are trying to await the promise, and catching any rejections | |
| // We return an array, the first index being resolve, and the second being an error | |
| try { | |
| const result = await promise | |
| return [result] | |
| } catch (e) { |
| import "time" | |
| import "fmt" | |
| import "math/rand" | |
| func merge(arr []int, low int, center int, high int) { | |
| var i, j, k int | |
| leftLen := center - low + 1 | |
| rightLen := high - center |
| #include <ctime> | |
| #include <stdlib.h> | |
| #include <stdio.h> | |
| #include <Windows.h> | |
| using namespace std; | |
| void fillArray(int* , int); | |
| void printArray(int*, int); | |
| void merge(int*, int, int, int); |
| import random | |
| from timeit import Timer | |
| def merge(arr1, arr2): | |
| out = [] | |
| i = 0 | |
| j = 0 | |
| while i < len(arr1) and j < len(arr2): | |
| if arr1[i] > arr2[j]: | |
| out.append(arr1[i]) |
| RED = 'red' | |
| BLACK = 'black' | |
| class IterMixin(object): | |
| def __iter__(self): | |
| for attr, value in self.__dict__.iteritems(): | |
| yield attr, value | |
| class Tree: | |
| def __init__(self, root=None, nodes=set()): |