This Gist was automatically created by Carbide, a free online programming environment.
This file contains 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
0eNrsvV9vJUmS5fdVEvkkATcH4f/d+3EHAvQiaCE96GG20MjKZFUTm8VMMZnTagzquyvi8pKXxesW9/yM3bsrqF9qppnkCXNzM3MP9xPH/uP9z19+3Hy7v717+PPPX7/+1/d/+o/zT76//9O//Qf4he3fvt99/Pbh4euHX+9vP2//+/95/6ewLIf3fzv+398P7z/+/P3rlx8PNx+23/x2e/fr+z893P+4Oby//fT17hHw++2vdx+/bH/98LdvN+//9P724ea394f3dx9/2/7Xz7e/frj5cvPp4f7204dvX7/cvF9hb+8+32zP+v1w9e+///bxy5cPXz7+9u3FH0bhD+8/fv54/+Jv0u8/Hd7f3D3cPtzePFp+/B9/+/Pdj99+vrlfrZk98/D+29fv6598vTv550P+l3J00If6L+X3zY5XMFGCuYaSJJRRrsBkCSYs18wpmm/qE0yew9SdsLhEO2GVdQ7XaLtbf/n2GHT/8T5s/7m/+fxyGrcIbi+euf3v0LdJ//X+5uZO+dXV5Pd3N7e//uXnrz/utxhph9APYfw0GUojQ+Ejqa/NW17/YJhDk/72Yqz1EJbZQLs09ddmfkgoKV2BCQtxe/o7RFDQIyjMIygcYpw5NgQylsrHcjnv2RzM9HcvRrO6P+RDTNPhaIWvXouUIJa+q6GSiXuHw73htcvKqx/Eavtb+uPLCQiHUA6xHmKbzkEhYw6LY9D5tZnNHuPsdy+HlKcjqeLKdTWcGlu6LJjuWLreUu/Hqx+krtf72d9O6n3qU88PvrK9bYl+FSTxtfWDLOIC2MQVMR7SdJmPC1r+jOiJgS1/Fkx0rH4kuV8HTkx2cs9+d7pgDGPBiMmx/oHRXMz9Tjme/u6s+q5TEOt0NJktf9YUF7b6WTDVsfi9aRlIl7X+jz/IC1goJLTJUrKG2iFPt7GxeZZG4pLJAv7KZnsvqf3xbMA5TEfb4fJpxdFgL8XW2+yCXootlPDq5f4ykOMJoRkIkb1WW4Yk+Fpt4WTm3W19mOI |
This file contains 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
module.exports = function(source, map) { | |
this.callback( | |
null, | |
source.replace(/console\.log\(.*\);?\n/g, ''), | |
map | |
); | |
}; |
This file contains 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
module.exports = function(source, map) { | |
this.callback(null, source, map); | |
}; |
This list is meant to be a both a quick guide and reference for further research into these topics. It's basically a summary of that comp sci course you never took or forgot about, so there's no way it can cover everything in depth. It also will be available as a gist on Github for everyone to edit and add to.
###Array ####Definition:
- Stores data elements based on an sequential, most commonly 0 based, index.
- Based on tuples from set theory.
I hereby claim:
- I am yashdalfthegray on github.
- I am yashdalfthegray (https://keybase.io/yashdalfthegray) on keybase.
- I have a public key whose fingerprint is BA65 D2BC 59E6 B38B E8FC A1A4 1912 79C6 65A3 2E46
To claim this, I am signing this object:
This file contains 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
function binarySearch(array, target) { | |
var min = 0; | |
var max = array.length-1; | |
var guess; | |
while(max >= min) { | |
guess = Math.floor((max + min)/2); | |
if(array[guess] === target) { | |
return target; | |
} else if (array[guess] < target) { |
This file contains 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
<string name="reminder_schedule_monday">Mon</string> | |
<string name="reminder_schedule_tuesday">Tue</string> | |
<string name="reminder_schedule_wednesday">Wed</string> | |
<string name="reminder_schedule_thursday">Thu</string> | |
<string name="reminder_schedule_friday">Fri</string> | |
<string name="reminder_schedule_saturday">Sat</string> | |
<string name="reminder_schedule_sunday">Sun</string> |
This file contains 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
import * as locators from "./locator"; | |
export function isClassNameLocator(object: any): object is locators.IClassNameLocator { | |
return 'className' in object; | |
} | |
export function isCssLocator(object: any): object is locators.ICssLocator { | |
return 'css' in object; | |
} |
This file contains 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
module.exports = (array, lowerBound, upperBound) => { | |
var partialSum = ((array.length + 1) * (lowerBound + upperBound)) / 2; | |
var sum = array.reduce((acc, i) => { return acc + i; }, 0); | |
return partialSum - sum; | |
}; |
NewerOlder