- Stores data elements based on an sequential, most commonly 0 based, index.
- Based on tuples (a finite ordered list of elements) from set theory.
- They are one of the oldest, most commonly used data structures.
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
var data = [[1,2,[3,4,[5,6]]],7]; | |
function flatten(array) { | |
var output = []; | |
array.forEach(function(value) { | |
if(value instanceof Array) { | |
output = output.concat(flatten(value)); | |
} else { | |
output.push(value) | |
} |
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
/** recursively search in the tree where the current value can be inserted */ | |
function find(value, node) { | |
if(node.value === undefined || node.value === value) { | |
return node; | |
} | |
if(node.value > value) { | |
return find(value, node.left); | |
} | |
return find(value, node.right); | |
} |
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
/** | |
* CSV Parser. Takes a string as input and returns | |
* an array of arrays (for each row). | |
* | |
* @param input String, CSV input | |
* @param options.delimiter String, single character used to separate fields. | |
* Defaults to null, if null, tries to guess it. | |
* @param doptions.quote String, single character used to quote non-simple fields. | |
* Defaults to "\"". | |
*/ |
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
# Rename local and remote branch | |
OLD_BRANCH=name_of_old_branch # Replace with the name of your old branch | |
NEW_BRANCH=name_of_new_branch # Replace with the name of the new branch | |
git checkout $OLD_BRANCH | |
git pull | |
git branch -m $OLD_BRANCH $NEW_BRANCH | |
git push origin :$OLD_BRANCH --no-verify | |
git push --set-upstream origin $NEW_BRANCH --no-verify | |
################################################################################################################## |
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
/* | |
replace XXX by the id of the file you want to download. You can add as many as you want | |
to get the ID, first get the share URL : | |
https://drive.google.com/file/d/1LHsdf3leinq1wCertnwFVGertertHrfB/view?usp=sharing | |
the id in this example is : | |
1LHsdf3leinq1wCertnwFVGertertHrfB | |
*/ | |
const https = require('https'); | |
[ | |
'XXX', |
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
{"lastUpload":"2019-12-05T09:59:36.024Z","extensionVersion":"v3.4.3"} |