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
$sheets = Excel::load($filename)->get(); | |
$firstSheet = $sheets->first(); | |
$header = $firstSheet->first(); | |
$data = $firstSheet->slice(1)->map(function ($row) use ($header) { | |
return $header->combine($row); | |
}); |
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
// playNote(440, 10) will play a 440 Hz sine wave for 10 seconds | |
// | |
// Don't forget that the browser requires some user interaction before | |
// calling the function, otherwise it will block audio output. | |
// | |
// Clicking on the web page once should be enough, though. | |
// | |
function playNote(freq, duration = 1) { | |
const context = new AudioContext(); | |
const oscillator = context.createOscillator(); |
OlderNewer