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
{ | |
"Items": [ | |
{ | |
"businessCount": 0, | |
"tenant_id": "4c1bebc0-d1ee-11e8-a8b3-d10ae38870ab", | |
"individualCount": 1, | |
"updatedAt": "2018-10-19T10:43:08.681Z", | |
"dashboardDate": "2018-10-01T00:00:00.000Z", | |
"_id": "c494ef90-d38b-11e8-b901-99c36a936ada", | |
"createdAt": "2018-10-19T10:43:08.681Z", |
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
{ | |
"id":null, | |
"TransactionId":1701, | |
"CustomerId":1, | |
"subTotal":1500, | |
"taxAmount":292.5, | |
"total":1792.5, | |
"discountAmount":0, | |
"amountRecieved":1792.5, | |
"friendlyName":null, |
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
function newReadAndUpload(){ | |
// Compute hash | |
var filename = path.join(__dirname, '/input.csv.gz'); | |
return hash(filename).then(hash=>{ | |
console.log("hash: " + hash); | |
// Generated signed url | |
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
var input = [[1, 3], [9,10], [13, 15]]; //input array | |
try { | |
// Iterate through array and complete series, i.e [1, 5] would generate [1, 5, 3, 4, 2] | |
input.forEach(tuple => { | |
if(tuple.length && tuple[0] != tuple[1]){ | |
// making sure the code works even when the tuple is not sorted. | |
var minimumValue = tuple[0] < tuple[1] ? tuple[0] : tuple[1]; | |
var maximumValue = tuple[0] > tuple[1] ? tuple[0] : tuple[1]; | |
// completing series by looping from first tuple - last tuple |
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
var input = [[1, 3], [9, 10], [13, 15], [4,14], [21,17], [2,7]]; | |
//output = [1,9,13], [1,9,14], [1,9,15] | |
//console.log(input[0][0]) | |
var allElements = [];//new Array(input.length); | |
var y = 0; | |
var z = 0; | |
for (var x = 0; x < input.length; x++){ | |
allElements.push(input[x][0]); |