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 getFile(link, selected) { | |
var xhr = new XMLHttpRequest(); | |
xhr.open('POST', link, true); | |
xhr.setRequestHeader('Content-type', 'application/x-www-form-urlencoded'); | |
xhr.responseType = 'arraybuffer'; | |
xhr.onload = function () { | |
if (this.status === 200) { | |
formatDownload(this); | |
} | |
}; |
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
people = ['John', 'Amelia', 'Steph'] | |
units = (1..10).to_a | |
record = [] | |
# this is making our data | |
500.times do | |
record << { "#{people.sample}" => "#{units.sample}".to_i } | |
end | |
=begin |
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
years = [ | |
'2014', | |
'2015' | |
] | |
months = [ | |
'01', | |
'02', | |
'03', | |
'04', |