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
| const io = require('socket.io-client'); | |
| const socket = io('http://localhost:3000', { | |
| transportOptions: { | |
| polling: { | |
| extraHeaders: { | |
| 'Authorization': 'Bearer abc', | |
| }, | |
| }, | |
| }, |
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 midi = require('midi'); | |
| var input = new midi.input(); | |
| console.log(input.getPortCount()); | |
| console.log(input.getPortName(1)); | |
| // | |
| input.openPort(0); | |
| input.ignoreTypes(false, false, false); | |
| // | |
| input.on('message', function(deltaTime, message) { | |
| midiMessageReceived(message); |
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
| <!doctype html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <title>Get percentage loaded from image</title> | |
| <script type="text/javascript"> | |
| Image.prototype.onChangeSize; | |
| Image.prototype.load = function(url){ | |
| var _this = this, | |
| req = ((XMLHttpRequest) ? new XMLHttpRequest() : new ActiveXObject("Microsoft.XMLHTTP")); |
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
| <?php | |
| /** | |
| * Convert a comma separated file into an associated array. | |
| * The first row should contain the array keys. | |
| * | |
| * Example: | |
| * | |
| * @param string $filename Path to the CSV file | |
| * @param string $delimiter The separator used in the file | |
| * @return array |