Assuming an operation was completed n times in t units of time, how many operations on average were completed every p units of time?
If 2 operations were completed in 15 seconds then in 60 seconds (1 minute)...
2:15
8:60 <- ratio 4x more
The final formula is:
This file contains hidden or 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
| interface ObjectivePlayer { | |
| [player: string]: number | |
| } | |
| interface Objective { | |
| id: string, | |
| name?: string, | |
| display?: "list" | "sidebar" | "belowName", | |
| players?: ObjectivePlayer | |
| } |
This file contains hidden or 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
| Get-ChildItem . -filter "*" -Recurse | % {$_.fullname} |
This file contains hidden or 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 var cores = (() => { | |
| if (typeof process !== 'undefined' && process.release.name === 'node') { | |
| return require('os').cpus().length; | |
| } else if (typeof navigator !== 'undefined' && navigator.hardwareConcurrency !== 'undefined') { | |
| return navigator.hardwareConcurrency | |
| } else if (typeof window !== 'undefined') { | |
| console.log("Please use https://github.com/oftn-oswg/core-estimator") | |
| } | |
| })() |
This file contains hidden or 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 sass = new Sass(); | |
| const handleFiles = () => { | |
| Array.from(document.querySelectorAll(`style[type="text/sass"], style[type="text/scss"]`)).map(val => { | |
| sass.compile(val.innerHTML, { | |
| indentedSyntax: val.getAttribute("type") === "text/sass" | |
| }, ({ | |
| text | |
| }) => val.innerHTML = text); |
This file contains hidden or 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
| /* eslint-disable require-jsdoc */ | |
| (() => { | |
| function injectScript(src) { | |
| return new Promise((resolve, reject) => { | |
| const script = document.createElement("script") | |
| script.async = true | |
| script.src = src | |
| script.addEventListener("load", resolve) | |
| script.addEventListener("error", () => reject(new Error("Error loading script."))) | |
| script.addEventListener("abort", () => reject(new Error("Script loading aborted."))) |
This file contains hidden or 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 designMode = val => document.designMode = val === true ? "on" : "off" |
This file contains hidden or 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 sourceLang = "en" | |
| const targetLang = "id" | |
| const sourceText = "Hello" | |
| const translate = (sourceLang, targetLang, sourceText) => new Promise((resolve, reject) => { | |
| $.getJSON(`https://translate.googleapis.com/translate_a/single`, { | |
| client: "gtx", | |
| sl: sourceLang, | |
| tl: targetLang, | |
| dt: "t", |