I hereby claim:
- I am mdciotti on github.
- I am mdciotti (https://keybase.io/mdciotti) on keybase.
- I have a public key whose fingerprint is 5B7A 9BBE C0E3 9EE3 322F 011C 8AC8 D94E 8A1C 957D
To claim this, I am signing this object:
| // NOTE: This is overkill. I wrote this and then quickly realized there is a better way to do it. See below. | |
| /** | |
| * https://tc39.es/ecma262/#leading-surrogate | |
| * @param {number} codeUnit | |
| */ | |
| function isLeadingSurrogate(codeUnit) { | |
| return 0xD800 <= codeUnit && codeUnit <=0xDBFF; | |
| } |
| /** | |
| * Simulates asynchronous data loading by wrapping setTimeout in a Promise. | |
| * @param {Number} ms the delay in milliseconds to wait before resolving | |
| * @param {any} data the data to resolve with | |
| * @returns {Promise} a promise that resolves with `data` in `ms` milliseconds | |
| */ | |
| async function asyncData(ms, data) { | |
| await new Promise(r => setTimeout(r, ms)); | |
| return data; | |
| } |
| // Recursive 1 | |
| int rFibNum(int a, int b, int n) | |
| { | |
| if (n == 1) | |
| return a; | |
| else if (n == 2) | |
| return b; | |
| else | |
| return rFibNum(a, b, n - 1) + rFibNum(a, b, n - 2); | |
| } |
| #import <stdio.h> | |
| #import <stdlib.h> | |
| #import <math.h> | |
| // Retuns the number of paths in a n*n (square) lattice | |
| // Paths can only move rightward or downward | |
| // Paths start at top left and end at bottom right | |
| // Receives an argument `n` which is the length of one side of the square lattice |
| require 'set' | |
| require 'json' | |
| class QueryHandler | |
| def initialize (indexPath, tagPath) | |
| index_get indexPath | |
| tags_get tagPath | |
| end | |
| def parse_json (path) |
| /* SEARCH QUERY BISON SOURCE */ | |
| %left '|' | |
| %left '&' '!' | |
| %left '(' ')' | |
| %start file | |
| %% |
| Number.prototype.toHex = function (padSize) { | |
| if (padSize == undefined) padsize = 1; | |
| var hex = this.toString(16).toUpperCase(); | |
| while (padSize > hex.length) { | |
| hex = "0" + hex; | |
| } | |
| return hex; | |
| }; | |
| String.prototype.toHex = function () { |
| function hash (s) { | |
| var h = 7; | |
| var letters = "acdegilmnoprstuw"; | |
| for (var i = 0; i < s.length; i++) { | |
| h = (h * 37 + letters.indexOf(s[i])); | |
| } | |
| return h; | |
| } |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| unsigned long long int reduce (unsigned long long int n) | |
| { | |
| unsigned long long int result, d; | |
| result = 1; | |
| while (n > 0) { |
I hereby claim:
To claim this, I am signing this object: