├── .github └── ISSUE_TEMPLATE │ ├── bug_report.md │ └── feature_request.md ├── .gitignore ├── .travis.yml ├── CONTRIBUTING.md ├── Gruntfile.js ├── LICENSE ├── README.md ├── mysql-import.js ├── package-lock.json ├── package.json ├── src ├── header.js ├── importer.js └── parser.js └── test ├── SQLDumpGenerator.js ├── broken_dump_files ├── dump.sql ├── dump_1.sql └── dumplink.sql ├── memory-stress-test.js ├── sample_dump_files ├── more_sample_files │ ├── not_sql.txt │ ├── test4.sql │ └── test5.sql ├── test.sql ├── test2.sql ├── test3.sql └── test4.sql ├── test-helpers.js └── test.js /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Describe the bug** 11 | A clear and concise description of what the bug is. 12 | 13 | **Code To Reproduce** 14 | Show your code! 15 | 16 | ```js 17 | const Importer = require('mysql-import'); 18 | // Your code here... 19 | ``` 20 | 21 | **Expected behavior** 22 | A clear and concise description of what you expected to happen. 23 | 24 | **Screenshots** 25 | If applicable, add screenshots to help explain your problem. 26 | 27 | **Additional context** 28 | Add any other context about the problem here. 29 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Is your feature request related to a problem? Please describe.** 11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 12 | 13 | **Describe the solution you'd like** 14 | A clear and concise description of what you want to happen. 15 | 16 | **Describe alternatives you've considered** 17 | A clear and concise description of any alternative solutions or features you've considered. 18 | 19 | **Additional context** 20 | Add any other context or screenshots about the feature request here. 21 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /nbproject/ 2 | /node_modules/ 3 | /package-lock.js 4 | /coverage/ 5 | /.nyc_output/ 6 | /test/large_dump.sql -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - "node" 4 | services: 5 | - mysql 6 | after_success: npm run coverage -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 |

2 | 3 |

4 | 5 | # Contributing 6 | 7 | Wanna contribute? That's awesome! I work full-time and when I'm not working I'm a full-time single dad, so your contributions are welcomed and **greatly** appreciated! You don't have to speak to me before submitting a Pull Request, but please create an issue explaining the problem (if there isn't one already) before submitting a PR. 8 | 9 | ### How to contribute 10 | 11 | - **Copy (Fork) the repository** 12 | 1. Fork the repository by clicking on the [*Fork*](https://help.github.com/en/articles/fork-a-repo) button in the upper-right corner of the repo page. 13 | 2. Clone your forked copy of the repo to your computer: `git clone ` 14 | 3. Open and install the package: `cd && npm install` 15 | - **Make your changes** 16 | 1. Changes are to be made in the project's `/src` directory. 17 | 2. If necessary, update the readme to explain any usage changes. 18 | 3. Run `npm run build` to build the project. 19 | - **Test your contributions** 20 | 1. In `/test/test.js` update the username and password variables at the top so it can connect to your local MySQL instance. 21 | 2. Run `npm run test` to run the tests. If all the tests pass you may submit your PR. 22 | - **Submitting your Contribution (Pull Request)** 23 | 1. Revert any changes made to the `test.js` file. This is important. You'll be publishing private info and you'll break the coverage tests if you commit changes to this file . 24 | 2. Commit your changes. Use a descriptive commit message. `git commit -m ""` 25 | 3. Push your commits back to GitHub. `git push` 26 | 4. Go back to my original repository and click on the button that says [*Create Pull Request*](https://help.github.com/en/articles/creating-a-pull-request-from-a-fork). 27 | 5. Leave a descriptive explanation of your changes and submit the PR. 28 | 29 | ### Code Congruency 30 | 31 | Please keep the code congruent and consistent. 32 | 33 | - Use tabs instead of spaces to indent. 34 | - Indent properly. 35 | - Curlies on the same line. 36 | 37 | ---- 38 | 39 |
Thank you for your contributions!
40 | -------------------------------------------------------------------------------- /Gruntfile.js: -------------------------------------------------------------------------------- 1 | 2 | module.exports = function(grunt) { 3 | 4 | var pkg = grunt.file.readJSON('package.json'); 5 | pkg.version = pkg.version.split("."); 6 | var subversion = pkg.version.pop(); 7 | subversion++; 8 | pkg.version.push(subversion); 9 | pkg.version = pkg.version.join("."); 10 | grunt.file.write('package.json', JSON.stringify(pkg, null, 2)); 11 | 12 | console.log("---------------------------------------"); 13 | console.log(" Building mysql-import Version "+pkg.version); 14 | console.log("---------------------------------------"); 15 | 16 | grunt.initConfig({ 17 | pkg: pkg, 18 | concat: { 19 | options: { 20 | banner: '/**\n * <%= pkg.name %> - v<%= pkg.version %>' + 21 | '\n * <%= pkg.description %>' + 22 | '\n * @author <%= pkg.author %>' + 23 | '\n * @website <%= pkg.homepage %>' + 24 | '\n * @license <%= pkg.license %>' + 25 | '\n */\n\n' 26 | }, 27 | dist: { 28 | src: [ 29 | 'src/header.js', 30 | 'src/importer.js', 31 | 'src/parser.js' 32 | ], 33 | dest: 'mysql-import.js', 34 | }, 35 | }, 36 | 'string-replace': { 37 | source: { 38 | files: { 39 | "mysql-import.js": "mysql-import.js" 40 | }, 41 | options: { 42 | replacements: [{ 43 | pattern: /{{ VERSION }}/g, 44 | replacement: '<%= pkg.version %>' 45 | }] 46 | } 47 | }, 48 | readme: { 49 | files: { 50 | "README.md": "README.md" 51 | }, 52 | options: { 53 | replacements: [{ 54 | pattern: /\d+\.\d+\.\d+/g, 55 | replacement: '<%= pkg.version %>' 56 | }] 57 | } 58 | } 59 | } 60 | }); 61 | 62 | grunt.loadNpmTasks('grunt-contrib-concat'); 63 | grunt.loadNpmTasks('grunt-string-replace'); 64 | 65 | grunt.registerTask('default', [ 66 | 'concat', 67 | 'string-replace' 68 | ]); 69 | 70 | }; -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2018 Rob Parham 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 4 | 5 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 6 | 7 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 8 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 |

4 | 5 |

6 | 7 | *Version 5.1.1* ([NPM](https://www.npmjs.com/package/mysql-import)) ([Github](https://github.com/Pamblam/mysql-import/)) 8 | 9 | [![Build Status](https://api.travis-ci.org/Pamblam/mysql-import.svg?branch=master)](https://travis-ci.org/Pamblam/mysql-import/) [![Coverage Status](https://coveralls.io/repos/github/Pamblam/mysql-import/badge.svg?branch=master)](https://coveralls.io/github/Pamblam/mysql-import?branch=master) 10 | 11 | Import MySQL files with Node! 12 | 13 | ## Table of Contents 14 | 15 | - [Install](#install) 16 | - [TLDR (Example)](#tldr) 17 | - [Methods](#methods) 18 | - [`constructor`](#new-importerhost-user-password-database) 19 | - [`importer.getImported()`](#importerprototypegetimported) 20 | - [`importer.setEncoding(encoding)`](#importerprototypesetencodingencoding) 21 | - [`importer.use(database)`](#importerprototypeusedatabase) 22 | - [`importer.import(...input)`](#importerprototypeimportinput) 23 | - [`importer.disconnect(graceful=true)`](#importerprototypedisconnectgracefultrue) 24 | - [`importer.onProgress(callback)`](#importerprototypeonprogresscallback) 25 | - [`importer.onDumpCompleted(callback)`](#importerprototypeondumpcompletedcallback) 26 | - [Contributing](#contributing) 27 | 28 | ## Install 29 | via [NPM](https://www.npmjs.com/package/mysql-import): 30 | ``` 31 | $ npm install --save-dev mysql-import 32 | ``` 33 | Via [Github](https://github.com/Pamblam/mysql-import/): 34 | ``` 35 | git clone https://github.com/Pamblam/mysql-import.git 36 | ``` 37 | 38 | ## TLDR: 39 | 40 | ```js 41 | const host = 'localhost'; 42 | const user = 'root'; 43 | const password = 'password'; 44 | const database = 'mydb'; 45 | 46 | const Importer = require('mysql-import'); 47 | const importer = new Importer({host, user, password, database}); 48 | 49 | importer.onProgress(progress=>{ 50 | var percent = Math.floor(progress.bytes_processed / progress.total_bytes * 10000) / 100; 51 | console.log(`${percent}% Completed`); 52 | }); 53 | 54 | importer.import('path/to/dump.sql').then(()=>{ 55 | var files_imported = importer.getImported(); 56 | console.log(`${files_imported.length} SQL file(s) imported.`); 57 | }).catch(err=>{ 58 | console.error(err); 59 | }); 60 | ``` 61 | ## Methods 62 | 63 | ### `new Importer({host, user, password[, database, port, ssl]})` 64 | 65 | The constructor requires an object with a `host`, `user`, and `password` parameter. Passing in a database parameter is optional. Any of the parameters [listed here](https://github.com/mysqljs/mysql#connection-options) will work as well. 66 | 67 | ### `Importer.prototype.getImported()` 68 | 69 | Get an array of files imported. 70 | 71 | ### `Importer.prototype.setEncoding(encoding)` 72 | 73 | Set the encoding to use when reading import files. Supported arguments are: `utf8`, `ucs2`, `utf16le`, `latin1`, `ascii`, `base64`, or `hex`. 74 | 75 | ### `Importer.prototype.use(database)` 76 | 77 | Set or change the database to import to. 78 | 79 | ### `Importer.prototype.onProgress(callback)` 80 | 81 | Set a callback to be called as the importer processes chunks of the dump file. Callback is provided an object with the following properties: 82 | 83 | - `total_files`: The total files in the queue. 84 | - `file_no`: The number of the current dump file in the queue. 85 | - `bytes_processed`: The number of bytes of the file processed. 86 | - `total_bytes`: The size of the dump file. 87 | - `file_path`: The full path to the dump file. 88 | 89 | ### `Importer.prototype.onDumpCompleted(callback)` 90 | 91 | Set a callback to be called after each dump file has completed processing. Callback is provided an object with the following properties: 92 | 93 | - `total_files`: The total files in the queue. 94 | - `file_no`: The number of the current dump file in the queue. 95 | - `file_path`: The full path to the dump file. 96 | - `error`: If there was an error, the error object; if no errors, this will be `null`. 97 | 98 | ### `Importer.prototype.import(...input)` 99 | 100 | Import an `.sql` file or files into the database. This method will take... 101 | 102 | - Any number of paths to individual `.sql` files. 103 | ``` 104 | importer.import('path/to/dump1.sql', 'path/to/dum2.sql') 105 | ``` 106 | - Any number of paths that contain any number of `.sql` files. 107 | ``` 108 | importer.import('path/to/mysqldumps/') 109 | ``` 110 | - Any number of arrays containing either of the above. 111 | ``` 112 | importer.import(['path/to/dump.sql', 'path/to/dumps/']) 113 | ``` 114 | - Any combination of any of the above. 115 | 116 | ### `Importer.prototype.disconnect(graceful=true)` 117 | 118 | Disconnects the connection. If `graceful` is switched to false it will force close any connections. This is called automatically after files are imported so typically *this method should never be required*. 119 | 120 | ## Contributing 121 | 122 | Contributions are more than welcome! Please check out the [Contributing Guidelines](https://github.com/Pamblam/mysql-import/blob/master/CONTRIBUTING.md) for this project. 123 | -------------------------------------------------------------------------------- /mysql-import.js: -------------------------------------------------------------------------------- 1 | /** 2 | * mysql-import - v5.1.1 3 | * Import .sql into a MySQL database with Node. 4 | * @author Rob Parham 5 | * @website https://github.com/pamblam/mysql-import#readme 6 | * @license MIT 7 | */ 8 | 9 | 'use strict'; 10 | 11 | const mysql = require('mysql2'); 12 | const fs = require('fs'); 13 | const path = require("path"); 14 | const stream = require('stream'); 15 | 16 | 17 | /** 18 | * mysql-import - Importer class 19 | * @version 5.1.1 20 | * https://github.com/Pamblam/mysql-import 21 | */ 22 | 23 | class Importer{ 24 | 25 | /** 26 | * new Importer(settings) 27 | * @param {host, user, password[, database]} settings - login credentials 28 | */ 29 | constructor(settings){ 30 | this._connection_settings = settings; 31 | this._conn = null; 32 | this._encoding = 'utf8'; 33 | this._imported = []; 34 | this._progressCB = ()=>{}; 35 | this._dumpCompletedCB = ()=>{}; 36 | this._total_files = 0; 37 | this._current_file_no = 0; 38 | } 39 | 40 | /** 41 | * Get an array of the imported files 42 | * @returns {Array} 43 | */ 44 | getImported(){ 45 | return this._imported.slice(0); 46 | } 47 | 48 | /** 49 | * Set the encoding to be used for reading the dump files. 50 | * @param string - encoding type to be used. 51 | * @throws {Error} - if unsupported encoding type. 52 | * @returns {undefined} 53 | */ 54 | setEncoding(encoding){ 55 | var supported_encodings = [ 56 | 'utf8', 57 | 'ucs2', 58 | 'utf16le', 59 | 'latin1', 60 | 'ascii', 61 | 'base64', 62 | 'hex' 63 | ]; 64 | if(!supported_encodings.includes(encoding)){ 65 | throw new Error("Unsupported encoding: "+encoding); 66 | } 67 | this._encoding = encoding; 68 | } 69 | 70 | /** 71 | * Set or change the database to be used 72 | * @param string - database name 73 | * @returns {Promise} 74 | */ 75 | use(database){ 76 | return new Promise((resolve, reject)=>{ 77 | if(!this._conn){ 78 | this._connection_settings.database = database; 79 | resolve(); 80 | return; 81 | } 82 | this._conn.changeUser({database}, err=>{ 83 | if (err){ 84 | reject(err); 85 | }else{ 86 | resolve(); 87 | } 88 | }); 89 | }); 90 | } 91 | 92 | /** 93 | * Set a progress callback 94 | * @param {Function} cb - Callback function is called whenever a chunk of 95 | * the stream is read. It is provided an object with the folling properties: 96 | * - total_files: The total files in the queue. 97 | * - file_no: The number of the current dump file in the queue. 98 | * - bytes_processed: The number of bytes of the file processed. 99 | * - total_bytes: The size of the dump file. 100 | * - file_path: The full path to the dump file. 101 | * @returns {undefined} 102 | */ 103 | onProgress(cb){ 104 | if(typeof cb !== 'function') return; 105 | this._progressCB = cb; 106 | } 107 | 108 | /** 109 | * Set a progress callback 110 | * @param {Function} cb - Callback function is called whenever a dump 111 | * file has finished processing. 112 | * - total_files: The total files in the queue. 113 | * - file_no: The number of the current dump file in the queue. 114 | * - file_path: The full path to the dump file. 115 | * @returns {undefined} 116 | */ 117 | onDumpCompleted(cb){ 118 | if(typeof cb !== 'function') return; 119 | this._dumpCompletedCB = cb; 120 | } 121 | 122 | /** 123 | * Import (an) .sql file(s). 124 | * @param string|array input - files or paths to scan for .sql files 125 | * @returns {Promise} 126 | */ 127 | import(...input){ 128 | return new Promise(async (resolve, reject)=>{ 129 | try{ 130 | await this._connect(); 131 | var files = await this._getSQLFilePaths(...input); 132 | this._total_files = files.length; 133 | this._current_file_no = 0; 134 | 135 | var error = null; 136 | 137 | 138 | 139 | for(let i=0; i{ 142 | this._current_file_no++; 143 | if(error){ 144 | next(); 145 | return; 146 | } 147 | this._importSingleFile(file).then(()=>{ 148 | next(); 149 | }).catch(err=>{ 150 | error = err; 151 | next(); 152 | }); 153 | }); 154 | } 155 | 156 | if(error) throw error; 157 | await this.disconnect(); 158 | resolve(); 159 | }catch(err){ 160 | reject(err); 161 | } 162 | }); 163 | }; 164 | 165 | /** 166 | * Disconnect mysql. This is done automatically, so shouldn't need to be manually called. 167 | * @param bool graceful - force close? 168 | * @returns {Promise} 169 | */ 170 | disconnect(graceful=true){ 171 | return new Promise((resolve, reject)=>{ 172 | if(!this._conn){ 173 | resolve(); 174 | return; 175 | } 176 | if(graceful){ 177 | this._conn.end(err=>{ 178 | if(err){ 179 | reject(err); 180 | return; 181 | } 182 | this._conn = null; 183 | resolve(); 184 | }); 185 | }else{ 186 | this._conn.destroy(); 187 | resolve(); 188 | } 189 | }); 190 | } 191 | 192 | //////////////////////////////////////////////////////////////////////////// 193 | // Private methods ///////////////////////////////////////////////////////// 194 | //////////////////////////////////////////////////////////////////////////// 195 | 196 | /** 197 | * Import a single .sql file into the database 198 | * @param {object} fileObj - Object containing the following properties: 199 | * - file: The full path to the file 200 | * - size: The size of the file in bytes 201 | * @returns {Promise} 202 | */ 203 | _importSingleFile(fileObj){ 204 | return new Promise((resolve, reject)=>{ 205 | 206 | var parser = new queryParser({ 207 | db_connection: this._conn, 208 | encoding: this._encoding, 209 | onProgress: (progress) => { 210 | this._progressCB({ 211 | total_files: this._total_files, 212 | file_no: this._current_file_no, 213 | bytes_processed: progress, 214 | total_bytes: fileObj.size, 215 | file_path: fileObj.file 216 | }); 217 | } 218 | }); 219 | 220 | const dumpCompletedCB = (err) => this._dumpCompletedCB({ 221 | total_files: this._total_files, 222 | file_no: this._current_file_no, 223 | file_path: fileObj.file, 224 | error: err 225 | }); 226 | 227 | parser.on('finish', ()=>{ 228 | this._imported.push(fileObj.file); 229 | dumpCompletedCB(null); 230 | resolve(); 231 | }); 232 | 233 | 234 | parser.on('error', (err)=>{ 235 | dumpCompletedCB(err); 236 | reject(err); 237 | }); 238 | 239 | var readerStream = fs.createReadStream(fileObj.file); 240 | readerStream.setEncoding(this._encoding); 241 | 242 | /* istanbul ignore next */ 243 | readerStream.on('error', (err)=>{ 244 | dumpCompletedCB(err); 245 | reject(err); 246 | }); 247 | 248 | readerStream.pipe(parser); 249 | }); 250 | } 251 | 252 | /** 253 | * Connect to the mysql server 254 | * @returns {Promise} 255 | */ 256 | _connect(){ 257 | return new Promise((resolve, reject)=>{ 258 | if(this._conn){ 259 | resolve(this._conn); 260 | return; 261 | } 262 | var connection = mysql.createConnection(this._connection_settings); 263 | connection.connect(err=>{ 264 | if (err){ 265 | reject(err); 266 | }else{ 267 | this._conn = connection; 268 | resolve(); 269 | } 270 | }); 271 | }); 272 | } 273 | 274 | /** 275 | * Check if a file exists 276 | * @param string filepath 277 | * @returns {Promise} 278 | */ 279 | _fileExists(filepath){ 280 | return new Promise((resolve, reject)=>{ 281 | fs.access(filepath, fs.F_OK, err=>{ 282 | if(err){ 283 | reject(err); 284 | }else{ 285 | resolve(); 286 | } 287 | }); 288 | }); 289 | } 290 | 291 | /** 292 | * Get filetype information 293 | * @param string filepath 294 | * @returns {Promise} 295 | */ 296 | _statFile(filepath){ 297 | return new Promise((resolve, reject)=>{ 298 | fs.lstat(filepath, (err, stat)=>{ 299 | if(err){ 300 | reject(err); 301 | }else{ 302 | resolve(stat); 303 | } 304 | }); 305 | }); 306 | } 307 | 308 | /** 309 | * Read contents of a directory 310 | * @param string filepath 311 | * @returns {Promise} 312 | */ 313 | _readDir(filepath){ 314 | return new Promise((resolve, reject)=>{ 315 | fs.readdir(filepath, (err, files)=>{ 316 | if(err){ 317 | reject(err); 318 | }else{ 319 | resolve(files); 320 | } 321 | }); 322 | }); 323 | } 324 | 325 | /** 326 | * Parses the input argument(s) for Importer.import into an array sql files. 327 | * @param strings|array paths 328 | * @returns {Promise} 329 | */ 330 | _getSQLFilePaths(...paths){ 331 | return new Promise(async (resolve, reject)=>{ 332 | var full_paths = []; 333 | var error = null; 334 | paths = [].concat.apply([], paths); // flatten array of paths 335 | 336 | for(let i=0; i{ 339 | if(error){ 340 | next(); 341 | return; 342 | } 343 | try{ 344 | await this._fileExists(filepath); 345 | var stat = await this._statFile(filepath); 346 | if(stat.isFile()){ 347 | if(filepath.toLowerCase().substring(filepath.length-4) === '.sql'){ 348 | full_paths.push({ 349 | file: path.resolve(filepath), 350 | size: stat.size 351 | }); 352 | } 353 | next(); 354 | }else if(stat.isDirectory()){ 355 | var more_paths = await this._readDir(filepath); 356 | more_paths = more_paths.map(p=>path.join(filepath, p)); 357 | var sql_files = await this._getSQLFilePaths(...more_paths); 358 | full_paths.push(...sql_files); 359 | next(); 360 | }else{ 361 | /* istanbul ignore next */ 362 | next(); 363 | } 364 | }catch(err){ 365 | error = err; 366 | next(); 367 | } 368 | }); 369 | } 370 | 371 | if(error){ 372 | reject(error); 373 | }else{ 374 | resolve(full_paths); 375 | } 376 | }); 377 | } 378 | 379 | } 380 | 381 | /** 382 | * Build version number 383 | */ 384 | Importer.version = '5.1.1'; 385 | 386 | module.exports = Importer; 387 | 388 | 389 | class queryParser extends stream.Writable{ 390 | 391 | constructor(options){ 392 | /* istanbul ignore next */ 393 | options = options || {}; 394 | super(options); 395 | 396 | // The number of bytes processed so far 397 | this.processed_size = 0; 398 | 399 | // The progress callback 400 | this.onProgress = options.onProgress || (() => {}); 401 | 402 | // the encoding of the file being read 403 | this.encoding = options.encoding || 'utf8'; 404 | 405 | // the encoding of the database connection 406 | this.db_connection = options.db_connection; 407 | 408 | // The quote type (' or ") if the parser 409 | // is currently inside of a quote, else false 410 | this.quoteType = false; 411 | 412 | // An array of chars representing the substring 413 | // the is currently being parsed 414 | this.buffer = []; 415 | 416 | // Is the current char escaped 417 | this.escaped = false; 418 | 419 | // The string that denotes the end of a query 420 | this.delimiter = ';'; 421 | 422 | // Are we currently seeking new delimiter 423 | this.seekingDelimiter = false; 424 | 425 | } 426 | 427 | //////////////////////////////////////////////////////////////////////////// 428 | // "Private" methods" ////////////////////////////////////////////////////// 429 | //////////////////////////////////////////////////////////////////////////// 430 | 431 | // handle piped data 432 | async _write(chunk, enc, next) { 433 | var query; 434 | chunk = chunk.toString(this.encoding); 435 | var error = null; 436 | for (let i = 0; i < chunk.length; i++) { 437 | let char = chunk[i]; 438 | query = this.parseChar(char); 439 | try{ 440 | if(query) await this.executeQuery(query); 441 | }catch(e){ 442 | error = e; 443 | break; 444 | } 445 | } 446 | this.processed_size += chunk.length; 447 | this.onProgress(this.processed_size); 448 | next(error); 449 | } 450 | 451 | // Execute a query, return a Promise 452 | executeQuery(query){ 453 | return new Promise((resolve, reject)=>{ 454 | this.db_connection.query(query, err=>{ 455 | if (err){ 456 | reject(err); 457 | }else{ 458 | resolve(); 459 | } 460 | }); 461 | }); 462 | } 463 | 464 | // Parse the next char in the string 465 | // return a full query if one is detected after parsing this char 466 | // else return false. 467 | parseChar(char){ 468 | this.checkEscapeChar(); 469 | this.buffer.push(char); 470 | this.checkNewDelimiter(char); 471 | this.checkQuote(char); 472 | return this.checkEndOfQuery(); 473 | } 474 | 475 | // Check if the current char has been escaped 476 | // and update this.escaped 477 | checkEscapeChar(){ 478 | if(!this.buffer.length) return; 479 | if(this.buffer[this.buffer.length - 1] === "\\"){ 480 | this.escaped = !this.escaped; 481 | }else{ 482 | this.escaped = false; 483 | } 484 | } 485 | 486 | // Check to see if a new delimiter is being assigned 487 | checkNewDelimiter(char){ 488 | var buffer_str = this.buffer.join('').toLowerCase().trim(); 489 | if(buffer_str === 'delimiter' && !this.quoteType){ 490 | this.seekingDelimiter = true; 491 | this.buffer = []; 492 | }else{ 493 | var isNewLine = char === "\n" || char === "\r"; 494 | if(isNewLine && this.seekingDelimiter){ 495 | this.seekingDelimiter = false; 496 | this.delimiter = this.buffer.join('').trim(); 497 | this.buffer = []; 498 | } 499 | } 500 | } 501 | 502 | // Check if the current char is a quote 503 | checkQuote(char){ 504 | var isQuote = (char === '"' || char === "'") && !this.escaped; 505 | if (isQuote && this.quoteType === char){ 506 | this.quoteType = false; 507 | }else if(isQuote && !this.quoteType){ 508 | this.quoteType = char; 509 | } 510 | } 511 | 512 | // Check if we're at the end of the query 513 | // return the query if so, else return false; 514 | checkEndOfQuery(){ 515 | if(this.seekingDelimiter){ 516 | return false; 517 | } 518 | 519 | var query = false; 520 | var demiliterFound = false; 521 | if(!this.quoteType && this.buffer.length >= this.delimiter.length){ 522 | demiliterFound = this.buffer.slice(-this.delimiter.length).join('') === this.delimiter; 523 | } 524 | 525 | if (demiliterFound) { 526 | // trim the delimiter off the end 527 | this.buffer.splice(-this.delimiter.length, this.delimiter.length); 528 | query = this.buffer.join('').trim(); 529 | this.buffer = []; 530 | } 531 | 532 | return query; 533 | } 534 | } 535 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "author": "Rob Parham", 3 | "bugs": { 4 | "url": "https://github.com/pamblam/mysql-import/issues" 5 | }, 6 | "deprecated": false, 7 | "description": "Import .sql into a MySQL database with Node.", 8 | "devDependencies": { 9 | "chai": "^4.2.0", 10 | "coveralls": "^3.0.9", 11 | "grunt": "^1.0.4", 12 | "grunt-contrib-concat": "^1.0.1", 13 | "grunt-string-replace": "^1.3.1", 14 | "mocha": "^7.1.0", 15 | "nyc": "^15.0.0" 16 | }, 17 | "engines": { 18 | "node": ">5.0.0" 19 | }, 20 | "homepage": "https://github.com/pamblam/mysql-import#readme", 21 | "keywords": [ 22 | "nodejs", 23 | "mysql", 24 | "textfiles", 25 | "import", 26 | "sql" 27 | ], 28 | "license": "MIT", 29 | "main": "mysql-import.js", 30 | "name": "mysql-import", 31 | "repository": { 32 | "type": "git", 33 | "url": "git+https://github.com/pamblam/mysql-import.git" 34 | }, 35 | "scripts": { 36 | "build": "grunt", 37 | "test": "node_modules/.bin/nyc --reporter=html --reporter=text node_modules/.bin/mocha ./test/test.js --timeout 15000", 38 | "memory-test": "node_modules/.bin/mocha ./test/memory-stress-test.js --timeout 0", 39 | "coverage": "nyc report --reporter=text-lcov | coveralls" 40 | }, 41 | "version": "5.1.1", 42 | "dependencies": { 43 | "mysql2": "^2.3.3" 44 | } 45 | } -------------------------------------------------------------------------------- /src/header.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const mysql = require('mysql2'); 4 | const fs = require('fs'); 5 | const path = require("path"); 6 | const stream = require('stream'); 7 | -------------------------------------------------------------------------------- /src/importer.js: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * mysql-import - Importer class 4 | * @version {{ VERSION }} 5 | * https://github.com/Pamblam/mysql-import 6 | */ 7 | 8 | class Importer{ 9 | 10 | /** 11 | * new Importer(settings) 12 | * @param {host, user, password[, database]} settings - login credentials 13 | */ 14 | constructor(settings){ 15 | this._connection_settings = settings; 16 | this._conn = null; 17 | this._encoding = 'utf8'; 18 | this._imported = []; 19 | this._progressCB = ()=>{}; 20 | this._dumpCompletedCB = ()=>{}; 21 | this._total_files = 0; 22 | this._current_file_no = 0; 23 | } 24 | 25 | /** 26 | * Get an array of the imported files 27 | * @returns {Array} 28 | */ 29 | getImported(){ 30 | return this._imported.slice(0); 31 | } 32 | 33 | /** 34 | * Set the encoding to be used for reading the dump files. 35 | * @param string - encoding type to be used. 36 | * @throws {Error} - if unsupported encoding type. 37 | * @returns {undefined} 38 | */ 39 | setEncoding(encoding){ 40 | var supported_encodings = [ 41 | 'utf8', 42 | 'ucs2', 43 | 'utf16le', 44 | 'latin1', 45 | 'ascii', 46 | 'base64', 47 | 'hex' 48 | ]; 49 | if(!supported_encodings.includes(encoding)){ 50 | throw new Error("Unsupported encoding: "+encoding); 51 | } 52 | this._encoding = encoding; 53 | } 54 | 55 | /** 56 | * Set or change the database to be used 57 | * @param string - database name 58 | * @returns {Promise} 59 | */ 60 | use(database){ 61 | return new Promise((resolve, reject)=>{ 62 | if(!this._conn){ 63 | this._connection_settings.database = database; 64 | resolve(); 65 | return; 66 | } 67 | this._conn.changeUser({database}, err=>{ 68 | if (err){ 69 | reject(err); 70 | }else{ 71 | resolve(); 72 | } 73 | }); 74 | }); 75 | } 76 | 77 | /** 78 | * Set a progress callback 79 | * @param {Function} cb - Callback function is called whenever a chunk of 80 | * the stream is read. It is provided an object with the folling properties: 81 | * - total_files: The total files in the queue. 82 | * - file_no: The number of the current dump file in the queue. 83 | * - bytes_processed: The number of bytes of the file processed. 84 | * - total_bytes: The size of the dump file. 85 | * - file_path: The full path to the dump file. 86 | * @returns {undefined} 87 | */ 88 | onProgress(cb){ 89 | if(typeof cb !== 'function') return; 90 | this._progressCB = cb; 91 | } 92 | 93 | /** 94 | * Set a progress callback 95 | * @param {Function} cb - Callback function is called whenever a dump 96 | * file has finished processing. 97 | * - total_files: The total files in the queue. 98 | * - file_no: The number of the current dump file in the queue. 99 | * - file_path: The full path to the dump file. 100 | * @returns {undefined} 101 | */ 102 | onDumpCompleted(cb){ 103 | if(typeof cb !== 'function') return; 104 | this._dumpCompletedCB = cb; 105 | } 106 | 107 | /** 108 | * Import (an) .sql file(s). 109 | * @param string|array input - files or paths to scan for .sql files 110 | * @returns {Promise} 111 | */ 112 | import(...input){ 113 | return new Promise(async (resolve, reject)=>{ 114 | try{ 115 | await this._connect(); 116 | var files = await this._getSQLFilePaths(...input); 117 | this._total_files = files.length; 118 | this._current_file_no = 0; 119 | 120 | var error = null; 121 | 122 | 123 | 124 | for(let i=0; i{ 127 | this._current_file_no++; 128 | if(error){ 129 | next(); 130 | return; 131 | } 132 | this._importSingleFile(file).then(()=>{ 133 | next(); 134 | }).catch(err=>{ 135 | error = err; 136 | next(); 137 | }); 138 | }); 139 | } 140 | 141 | if(error) throw error; 142 | await this.disconnect(); 143 | resolve(); 144 | }catch(err){ 145 | reject(err); 146 | } 147 | }); 148 | }; 149 | 150 | /** 151 | * Disconnect mysql. This is done automatically, so shouldn't need to be manually called. 152 | * @param bool graceful - force close? 153 | * @returns {Promise} 154 | */ 155 | disconnect(graceful=true){ 156 | return new Promise((resolve, reject)=>{ 157 | if(!this._conn){ 158 | resolve(); 159 | return; 160 | } 161 | if(graceful){ 162 | this._conn.end(err=>{ 163 | if(err){ 164 | reject(err); 165 | return; 166 | } 167 | this._conn = null; 168 | resolve(); 169 | }); 170 | }else{ 171 | this._conn.destroy(); 172 | resolve(); 173 | } 174 | }); 175 | } 176 | 177 | //////////////////////////////////////////////////////////////////////////// 178 | // Private methods ///////////////////////////////////////////////////////// 179 | //////////////////////////////////////////////////////////////////////////// 180 | 181 | /** 182 | * Import a single .sql file into the database 183 | * @param {object} fileObj - Object containing the following properties: 184 | * - file: The full path to the file 185 | * - size: The size of the file in bytes 186 | * @returns {Promise} 187 | */ 188 | _importSingleFile(fileObj){ 189 | return new Promise((resolve, reject)=>{ 190 | 191 | var parser = new queryParser({ 192 | db_connection: this._conn, 193 | encoding: this._encoding, 194 | onProgress: (progress) => { 195 | this._progressCB({ 196 | total_files: this._total_files, 197 | file_no: this._current_file_no, 198 | bytes_processed: progress, 199 | total_bytes: fileObj.size, 200 | file_path: fileObj.file 201 | }); 202 | } 203 | }); 204 | 205 | const dumpCompletedCB = (err) => this._dumpCompletedCB({ 206 | total_files: this._total_files, 207 | file_no: this._current_file_no, 208 | file_path: fileObj.file, 209 | error: err 210 | }); 211 | 212 | parser.on('finish', ()=>{ 213 | this._imported.push(fileObj.file); 214 | dumpCompletedCB(null); 215 | resolve(); 216 | }); 217 | 218 | 219 | parser.on('error', (err)=>{ 220 | dumpCompletedCB(err); 221 | reject(err); 222 | }); 223 | 224 | var readerStream = fs.createReadStream(fileObj.file); 225 | readerStream.setEncoding(this._encoding); 226 | 227 | /* istanbul ignore next */ 228 | readerStream.on('error', (err)=>{ 229 | dumpCompletedCB(err); 230 | reject(err); 231 | }); 232 | 233 | readerStream.pipe(parser); 234 | }); 235 | } 236 | 237 | /** 238 | * Connect to the mysql server 239 | * @returns {Promise} 240 | */ 241 | _connect(){ 242 | return new Promise((resolve, reject)=>{ 243 | if(this._conn){ 244 | resolve(this._conn); 245 | return; 246 | } 247 | var connection = mysql.createConnection(this._connection_settings); 248 | connection.connect(err=>{ 249 | if (err){ 250 | reject(err); 251 | }else{ 252 | this._conn = connection; 253 | resolve(); 254 | } 255 | }); 256 | }); 257 | } 258 | 259 | /** 260 | * Check if a file exists 261 | * @param string filepath 262 | * @returns {Promise} 263 | */ 264 | _fileExists(filepath){ 265 | return new Promise((resolve, reject)=>{ 266 | fs.access(filepath, fs.F_OK, err=>{ 267 | if(err){ 268 | reject(err); 269 | }else{ 270 | resolve(); 271 | } 272 | }); 273 | }); 274 | } 275 | 276 | /** 277 | * Get filetype information 278 | * @param string filepath 279 | * @returns {Promise} 280 | */ 281 | _statFile(filepath){ 282 | return new Promise((resolve, reject)=>{ 283 | fs.lstat(filepath, (err, stat)=>{ 284 | if(err){ 285 | reject(err); 286 | }else{ 287 | resolve(stat); 288 | } 289 | }); 290 | }); 291 | } 292 | 293 | /** 294 | * Read contents of a directory 295 | * @param string filepath 296 | * @returns {Promise} 297 | */ 298 | _readDir(filepath){ 299 | return new Promise((resolve, reject)=>{ 300 | fs.readdir(filepath, (err, files)=>{ 301 | if(err){ 302 | reject(err); 303 | }else{ 304 | resolve(files); 305 | } 306 | }); 307 | }); 308 | } 309 | 310 | /** 311 | * Parses the input argument(s) for Importer.import into an array sql files. 312 | * @param strings|array paths 313 | * @returns {Promise} 314 | */ 315 | _getSQLFilePaths(...paths){ 316 | return new Promise(async (resolve, reject)=>{ 317 | var full_paths = []; 318 | var error = null; 319 | paths = [].concat.apply([], paths); // flatten array of paths 320 | 321 | for(let i=0; i{ 324 | if(error){ 325 | next(); 326 | return; 327 | } 328 | try{ 329 | await this._fileExists(filepath); 330 | var stat = await this._statFile(filepath); 331 | if(stat.isFile()){ 332 | if(filepath.toLowerCase().substring(filepath.length-4) === '.sql'){ 333 | full_paths.push({ 334 | file: path.resolve(filepath), 335 | size: stat.size 336 | }); 337 | } 338 | next(); 339 | }else if(stat.isDirectory()){ 340 | var more_paths = await this._readDir(filepath); 341 | more_paths = more_paths.map(p=>path.join(filepath, p)); 342 | var sql_files = await this._getSQLFilePaths(...more_paths); 343 | full_paths.push(...sql_files); 344 | next(); 345 | }else{ 346 | /* istanbul ignore next */ 347 | next(); 348 | } 349 | }catch(err){ 350 | error = err; 351 | next(); 352 | } 353 | }); 354 | } 355 | 356 | if(error){ 357 | reject(error); 358 | }else{ 359 | resolve(full_paths); 360 | } 361 | }); 362 | } 363 | 364 | } 365 | 366 | /** 367 | * Build version number 368 | */ 369 | Importer.version = '{{ VERSION }}'; 370 | 371 | module.exports = Importer; 372 | -------------------------------------------------------------------------------- /src/parser.js: -------------------------------------------------------------------------------- 1 | 2 | class queryParser extends stream.Writable{ 3 | 4 | constructor(options){ 5 | /* istanbul ignore next */ 6 | options = options || {}; 7 | super(options); 8 | 9 | // The number of bytes processed so far 10 | this.processed_size = 0; 11 | 12 | // The progress callback 13 | this.onProgress = options.onProgress || (() => {}); 14 | 15 | // the encoding of the file being read 16 | this.encoding = options.encoding || 'utf8'; 17 | 18 | // the encoding of the database connection 19 | this.db_connection = options.db_connection; 20 | 21 | // The quote type (' or ") if the parser 22 | // is currently inside of a quote, else false 23 | this.quoteType = false; 24 | 25 | // An array of chars representing the substring 26 | // the is currently being parsed 27 | this.buffer = []; 28 | 29 | // Is the current char escaped 30 | this.escaped = false; 31 | 32 | // The string that denotes the end of a query 33 | this.delimiter = ';'; 34 | 35 | // Are we currently seeking new delimiter 36 | this.seekingDelimiter = false; 37 | 38 | } 39 | 40 | //////////////////////////////////////////////////////////////////////////// 41 | // "Private" methods" ////////////////////////////////////////////////////// 42 | //////////////////////////////////////////////////////////////////////////// 43 | 44 | // handle piped data 45 | async _write(chunk, enc, next) { 46 | var query; 47 | chunk = chunk.toString(this.encoding); 48 | var error = null; 49 | for (let i = 0; i < chunk.length; i++) { 50 | let char = chunk[i]; 51 | query = this.parseChar(char); 52 | try{ 53 | if(query) await this.executeQuery(query); 54 | }catch(e){ 55 | error = e; 56 | break; 57 | } 58 | } 59 | this.processed_size += chunk.length; 60 | this.onProgress(this.processed_size); 61 | next(error); 62 | } 63 | 64 | // Execute a query, return a Promise 65 | executeQuery(query){ 66 | return new Promise((resolve, reject)=>{ 67 | this.db_connection.query(query, err=>{ 68 | if (err){ 69 | reject(err); 70 | }else{ 71 | resolve(); 72 | } 73 | }); 74 | }); 75 | } 76 | 77 | // Parse the next char in the string 78 | // return a full query if one is detected after parsing this char 79 | // else return false. 80 | parseChar(char){ 81 | this.checkEscapeChar(); 82 | this.buffer.push(char); 83 | this.checkNewDelimiter(char); 84 | this.checkQuote(char); 85 | return this.checkEndOfQuery(); 86 | } 87 | 88 | // Check if the current char has been escaped 89 | // and update this.escaped 90 | checkEscapeChar(){ 91 | if(!this.buffer.length) return; 92 | if(this.buffer[this.buffer.length - 1] === "\\"){ 93 | this.escaped = !this.escaped; 94 | }else{ 95 | this.escaped = false; 96 | } 97 | } 98 | 99 | // Check to see if a new delimiter is being assigned 100 | checkNewDelimiter(char){ 101 | var buffer_str = this.buffer.join('').toLowerCase().trim(); 102 | if(buffer_str === 'delimiter' && !this.quoteType){ 103 | this.seekingDelimiter = true; 104 | this.buffer = []; 105 | }else{ 106 | var isNewLine = char === "\n" || char === "\r"; 107 | if(isNewLine && this.seekingDelimiter){ 108 | this.seekingDelimiter = false; 109 | this.delimiter = this.buffer.join('').trim(); 110 | this.buffer = []; 111 | } 112 | } 113 | } 114 | 115 | // Check if the current char is a quote 116 | checkQuote(char){ 117 | var isQuote = (char === '"' || char === "'") && !this.escaped; 118 | if (isQuote && this.quoteType === char){ 119 | this.quoteType = false; 120 | }else if(isQuote && !this.quoteType){ 121 | this.quoteType = char; 122 | } 123 | } 124 | 125 | // Check if we're at the end of the query 126 | // return the query if so, else return false; 127 | checkEndOfQuery(){ 128 | if(this.seekingDelimiter){ 129 | return false; 130 | } 131 | 132 | var query = false; 133 | var demiliterFound = false; 134 | if(!this.quoteType && this.buffer.length >= this.delimiter.length){ 135 | demiliterFound = this.buffer.slice(-this.delimiter.length).join('') === this.delimiter; 136 | } 137 | 138 | if (demiliterFound) { 139 | // trim the delimiter off the end 140 | this.buffer.splice(-this.delimiter.length, this.delimiter.length); 141 | query = this.buffer.join('').trim(); 142 | this.buffer = []; 143 | } 144 | 145 | return query; 146 | } 147 | } 148 | -------------------------------------------------------------------------------- /test/SQLDumpGenerator.js: -------------------------------------------------------------------------------- 1 | 2 | const crypto = require("crypto"); 3 | const fs = require('fs'); 4 | 5 | 6 | class SQLDumpGenerator{ 7 | constructor(target_bytes, filepath){ 8 | this.total_bytes = 0; 9 | this.target_bytes = target_bytes; 10 | this.pct = 0; 11 | this.target_file = filepath; 12 | this.start_time = new Date().getTime(); 13 | this.stream = fs.createWriteStream(this.target_file, {flags: 'w'}); 14 | this.stream.on('error', console.error); 15 | } 16 | 17 | async init(){ 18 | const interval = setInterval(()=>this.updateProgress(), 1000); 19 | await this.write("CREATE TABLE `sample_table` (`id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(250) NOT NULL, `age` int(11) NOT NULL, `date` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`id`));\n"); 20 | while(this.total_bytes < this.target_bytes){ 21 | await this.write("INSERT INTO `sample_table` (`name`, `age`) VALUES ('"+this.randName()+"', '"+this.randAge()+"');\n"); 22 | } 23 | this.stream.end(); 24 | clearInterval(interval); 25 | this.updateProgress(); 26 | } 27 | 28 | write(str){ 29 | return new Promise(resolve => { 30 | this.total_bytes += Buffer.byteLength(str, 'utf8'); 31 | this.stream.write(str, resolve); 32 | }); 33 | } 34 | 35 | output(str, overwrite_line=false){ 36 | if(overwrite_line){ 37 | process.stdout.clearLine(); 38 | process.stdout.cursorTo(0); 39 | } 40 | process.stdout.write(str); 41 | } 42 | 43 | updateProgress(){ 44 | const pct = Math.min(100, Math.floor(this.total_bytes / this.target_bytes * 10000)/100); 45 | const elapsed_time = new Date().getTime() - this.start_time; 46 | const ms_per_byte = elapsed_time / this.total_bytes; 47 | const message = pct === 100 ? 48 | pct+"% complete in "+this.formatElapsed(elapsed_time)+".": 49 | pct+"% complete, "+this.formatElapsed(ms_per_byte * (this.target_bytes - this.total_bytes))+" remaining."; 50 | this.output(message, true); 51 | } 52 | 53 | randName(){ 54 | return crypto.randomBytes(16).toString("hex"); 55 | } 56 | 57 | randAge(){ 58 | return Math.floor(Math.random() * (95 - 18 + 1)) + 18; 59 | } 60 | 61 | formatElapsed (millis){ 62 | var minutes = Math.floor(millis / 60000); 63 | var seconds = ((millis % 60000) / 1000).toFixed(0); 64 | return minutes + ":" + (seconds < 10 ? '0' : '') + seconds; 65 | } 66 | 67 | } 68 | 69 | module.exports = SQLDumpGenerator; 70 | 71 | //(async function main(){ 72 | // const generator = new SQLDumpGenerator(2.5 * 1e+9, 'large_dump.sql'); 73 | // await generator.init(); 74 | // console.log("\nDump created: ", generator.target_file); 75 | //})(); -------------------------------------------------------------------------------- /test/broken_dump_files/dump.sql: -------------------------------------------------------------------------------- 1 | 2 | import nothing into nowhere; 3 | import !@#$ into mytable; -------------------------------------------------------------------------------- /test/broken_dump_files/dump_1.sql: -------------------------------------------------------------------------------- 1 | 2 | import nothing into nowhere; 3 | import !@#$ into mytable; -------------------------------------------------------------------------------- /test/broken_dump_files/dumplink.sql: -------------------------------------------------------------------------------- 1 | dump.sql -------------------------------------------------------------------------------- /test/memory-stress-test.js: -------------------------------------------------------------------------------- 1 | /** 2 | * These tests are for testing memory and efficiency. They are long-running tests 3 | * and should not be considered for code-coverage purposes. 4 | */ 5 | 6 | // SET THESE FOR LOCAL TESTING ONLY! 7 | // RESET THEM TO '' BEFORE COMMITING CHANGES! 8 | const mysql_host = ''; 9 | const mysql_user = ''; 10 | const mysql_pass = ''; 11 | 12 | const fs = require('fs'); 13 | const expect = require('chai').expect; 14 | const path = require('path'); 15 | const {errorHandler,query,mysqlConnect,createTestDB,destroyTestDB,closeConnection} = require('./test-helpers.js'); 16 | 17 | var config = { 18 | host: mysql_host || '127.0.0.1', 19 | user: mysql_user || 'root', 20 | password: mysql_pass || '', 21 | database: 'mysql-import-test-db-1' 22 | }; 23 | 24 | mysqlConnect(config); 25 | 26 | const MySQLImport = require('../mysql-import.js'); 27 | const SQLDumpGenerator = require('./SQLDumpGenerator.js'); 28 | const importer = new MySQLImport(config); 29 | 30 | const start_time = new Date(); 31 | importer.onProgress(progress=>{ 32 | var actual_pct = progress.bytes_processed / progress.total_bytes * 100; 33 | 34 | var time_so_far = (new Date()) - start_time; 35 | var total_time = time_so_far * 100 / actual_pct; 36 | var remaining_time = total_time - time_so_far; 37 | var date = new Date(0); 38 | date.setSeconds(remaining_time / 1000); 39 | var timeString = date.toISOString().substr(11, 8); 40 | 41 | var percent = Math.floor(actual_pct * 100) / 100; 42 | var filename = progress.file_path.split("/").pop(); 43 | 44 | if(process.stdout.isTTY){ 45 | process.stdout.clearLine(); 46 | process.stdout.cursorTo(0); 47 | process.stdout.write(`Processing ${filename} - ${percent}% Complete, about ${timeString} remaining.`); 48 | }else{ 49 | console.log(`Processing ${filename} - ${percent}% Complete, about ${timeString} remaining.`); 50 | } 51 | 52 | }); 53 | 54 | 55 | var big_dump_file = path.join(__dirname, 'large_dump.sql'); 56 | 57 | describe('Running Memory Tests', ()=>{ 58 | 59 | before(async function(){ 60 | this.timeout(0); 61 | if(!fs.existsSync(big_dump_file)){ 62 | console.log("generating new large dump file."); 63 | const generator = new SQLDumpGenerator(2.5 * 1e+9, big_dump_file); 64 | await generator.init(); 65 | }else{ 66 | console.log("Using pre-generated dump file."); 67 | } 68 | importer.setEncoding('utf8'); 69 | await createTestDB('mysql-import-test-db-1'); 70 | }); 71 | 72 | it('Import large dataset', async function(){ 73 | this.timeout(0); 74 | await importer.import(big_dump_file); 75 | var tables = await query("SHOW TABLES;"); 76 | expect(tables.length).to.equal(3); 77 | }); 78 | 79 | }); -------------------------------------------------------------------------------- /test/sample_dump_files/more_sample_files/not_sql.txt: -------------------------------------------------------------------------------- 1 | select * from notarealtable; 2 | select anything form nowhere; 3 | insert wetwilly into ear; -------------------------------------------------------------------------------- /test/sample_dump_files/more_sample_files/test4.sql: -------------------------------------------------------------------------------- 1 | 2 | CREATE TABLE IF NOT EXISTS `test_table_4` ( 3 | `id` int(11) NOT NULL AUTO_INCREMENT, 4 | `somestr` VARCHAR(8) NOT NULL, 5 | PRIMARY KEY (`id`) 6 | ) ENGINE=InnoDB AUTO_INCREMENT=1; 7 | 8 | INSERT INTO `test_table_4` (`somestr`) VALUES ('a'); 9 | INSERT INTO `test_table_4` (`somestr`) VALUES ('b'); 10 | INSERT INTO `test_table_4` (`somestr`) VALUES ('c'); 11 | INSERT INTO `test_table_4` (`somestr`) VALUES ('d'); 12 | INSERT INTO `test_table_4` (`somestr`) VALUES ('e'); -------------------------------------------------------------------------------- /test/sample_dump_files/more_sample_files/test5.sql: -------------------------------------------------------------------------------- 1 | 2 | 3 | CREATE TABLE IF NOT EXISTS `test_table_5` ( 4 | `id` int(11) NOT NULL AUTO_INCREMENT, 5 | `somestr` VARCHAR(8) NOT NULL, 6 | PRIMARY KEY (`id`) 7 | ) ENGINE=InnoDB AUTO_INCREMENT=1; 8 | 9 | INSERT INTO `test_table_5` (`somestr`) VALUES ('a'); 10 | INSERT INTO `test_table_5` (`somestr`) VALUES ('b'); 11 | INSERT INTO `test_table_5` (`somestr`) VALUES ('c'); 12 | INSERT INTO `test_table_5` (`somestr`) VALUES ('d'); 13 | INSERT INTO `test_table_5` (`somestr`) VALUES ('e'); -------------------------------------------------------------------------------- /test/sample_dump_files/test.sql: -------------------------------------------------------------------------------- 1 | 2 | DELIMITER && 3 | 4 | CREATE TABLE IF NOT EXISTS `importtest` ( 5 | `id` int(11) NOT NULL AUTO_INCREMENT, 6 | `doc` varchar(10000) NOT NULL, 7 | `classid` int(11) DEFAULT NULL, 8 | PRIMARY KEY (`id`) 9 | ) ENGINE=InnoDB AUTO_INCREMENT=979 DEFAULT CHARSET=utf8&& 10 | 11 | DELIMITER ; 12 | 13 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (1,'I made this free tool for learning JavaScript (it\'s like Duolingo for learning to code)',NULL); 14 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (2,'Assign function return value to object property',NULL); 15 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (3,'',NULL); 16 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (4,'',NULL); 17 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (5,'The fastest testing framework I ever used',NULL); 18 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (6,'this.cos is not a function',NULL); 19 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (7,'Trying to make divs light up while holding modifier keys and it works unless I press Alt, then everything breaks',NULL); 20 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (8,'How Greensock should be implemented on section elements?',NULL); 21 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (9,'Three.js & 3D interactive animations: a tutorial',NULL); 22 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (10,'Updating Javascript object array element values',NULL); 23 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (11,'No idea why its not working.',NULL); 24 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (12,'How to call a function after another function (which has multiple conditional ajax requests)',NULL); 25 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (13,'What are the best books, podcasts, websites or other resources to learn modern JavaScript as a beginner?',NULL); 26 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (14,'Var x = function(){some code} vs var x = some code',NULL); 27 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (15,'Make function run only once',NULL); 28 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (16,'Why Caching is Important for React Users',NULL); 29 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (17,'Javascripts Loops and Iterations Completely Explained 11 - [JavaScript C...',NULL); 30 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (18,'Legal question "about hosting answ;ers in repo" on sites lik;e leetcode?',NULL); 31 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (19,'Expand Bootstrap collapsible at POST event in Express',NULL); 32 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (20,'What are the nastiest, trickiest, JavaScript questions you can think of?',NULL); 33 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (21,'Im trying to get my head around prototypal inheritance in JS. Could someone help me out please?',NULL); 34 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (22,'speedrun',NULL); 35 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (23,'Where have I got it wrong?',NULL); 36 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (24,'03. Hello World | JavaScript',NULL); 37 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (25,'aside from MDN, where are good resources for learning WebGL and Canvas? Will even accept paid content',NULL); 38 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (26,'What is wrong with this js exercise?',NULL); 39 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (27,'help with this w3 schools example on conditions',NULL); 40 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (28,'Help with clone Array of Object correctly.',NULL); 41 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (29,'A beginners question on React actions--is an action basically an object literal with two properties (`type` and `payloadPropertyName`) which describes a change to an application\'s state, whereas a reducer actually performs that change to the application\'s state?',NULL); 42 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (30,'How would I code the following?',NULL); 43 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (31,'Create new div element an add it to a position before the .split() of a text',NULL); 44 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (32,'Need help with a Khan Academy challenge',NULL); 45 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (33,'I need some guidance on what else to learn before my coding bootcamp starts in 3 weeks. I have been studying for almost 3 months now.',NULL); 46 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (34,'Scrimba is a powerful new way of learning code. Play around with the instructors code any time, right in the player.',NULL); 47 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (35,'What are an alternative to !important in React.js material-ui?',NULL); 48 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (36,'D3 Project Not Rendering',NULL); 49 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (37,'What does this error mean?',NULL); 50 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (38,'Some Help with a Basic Binary to String and Vice Versa Function',NULL); 51 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (39,'Why Doesnt this code Work? (React Native)',NULL); 52 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (40,'Learn code on the road',NULL); 53 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (41,'[functional programming] passing parameters through in ramda',NULL); 54 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (42,'Detect input and print the percentage \'correct\'',NULL); 55 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (43,'Making a quiz in JavaScript',NULL); 56 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (44,'Hints for median filter (canvas) implementation?',NULL); 57 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (45,'Undefined check doesn\'t work',NULL); 58 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (46,'Learn HTML, CSS and Javascript',NULL); 59 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (47,'(Jest) How do I test this code?',NULL); 60 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (48,'Functions in JavaScript Explained 10 - [Javascript Course]',NULL); 61 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (49,'Best first framework to learn?',NULL); 62 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (50,'javascript online or should I take a college class?',NULL); 63 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (51,'The secret to being a top developer is building things! Here’s a list of fun apps to build! —Part II',NULL); 64 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (52,'[Review-Request][X-Post /r/learnprogramming] random quote api - first project after long time',NULL); 65 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (53,'How do i fill a array like this?',NULL); 66 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (54,'How would you write this snippet',NULL); 67 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (55,'Not always sure about the usefulness of testing',NULL); 68 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (56,'alternatives to setInterval()',NULL); 69 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (57,'01. Introduction | JavaScript',NULL); 70 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (58,'[React] How can I make my component stateless (or should I bother?)',NULL); 71 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (59,'What is your biggest challenge in trying to learn Functional Programming? (x-post from ruby)',NULL); 72 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (60,'Please critique my code',NULL); 73 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (61,'Trying to turn text links into hyperlinks on custom chrome extension',NULL); 74 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (62,'Script doesnt automatically run when page loads',NULL); 75 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (63,'I do not get why they call it closure, all I see is normal lexical scope look-up',NULL); 76 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (64,'I cannot export jQuery correctly; testing Node.js with mocha and chai',NULL); 77 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (65,'How can I get jQuery \".on()\" in Vanilla JS?',NULL); 78 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (66,'Initializing the same variable multiple times. When is it bad practice?',NULL); 79 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (67,'Looking for a free/cheap video series that teaches ES6 from the start',NULL); 80 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (68,'Resolve promise map within promise map',NULL); 81 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (69,'02. JSFiddle | JavaScript',NULL); 82 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (70,'How to make attractive movie catalogue',NULL); 83 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (71,'Help with little Angular 5 TODO app',NULL); 84 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (72,'ANGULAR 5 ECOMMERCE – SETTING UP YOUR APPLICATION',NULL); 85 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (73,'Introduction To ES6: A Free 23-Part Course',NULL); 86 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (74,'if , elseif, else coditional statment (boolean logic in Javascript) 09 ...',NULL); 87 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (75,'What am I doing wrong in this axios.get request?',NULL); 88 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (76,'[Help] Want to send variable from js to a php file.',NULL); 89 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (77,'Get value of button when clicked',NULL); 90 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (78,'Anyone want to start the course Practical Javascript with me?',NULL); 91 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (79,'[Help] I want to center two divs at the top of a larger div that they are in. How should I go about that?',NULL); 92 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (80,'My function running too soon?',NULL); 93 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (81,'Good libraries for creating graph theory applets?',NULL); 94 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (82,'Is it feasible to do this with Javascript?',NULL); 95 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (83,'Script To Move Image From Left To Right Doesn\'t Work',NULL); 96 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (84,'CSS error with node',NULL); 97 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (85,'Adding properties inside a method call',NULL); 98 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (86,'IHNIWID S1 • E10 - VueX Actions with JSON Server',NULL); 99 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (87,'Getting callback return value',NULL); 100 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (88,'Split lines by
tag and get the lines that start with a number.',NULL); 101 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (89,'Can you use clipboard.js to copy the contents of a div that\'s invisible? ?',NULL); 102 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (90,'Need help hiding an element after a timer runs out.',NULL); 103 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (91,'How should I test my serverless app?',NULL); 104 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (92,'Instantiating a user-defined object with \"new\".',NULL); 105 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (93,'Where to learn neat coding style',NULL); 106 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (94,'jQuery event listener won\'t trigger',NULL); 107 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (95,'variable is not incrementing in if else statement',NULL); 108 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (96,'Do I need JS to achieve this?',NULL); 109 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (97,'Javascript help required : Spreadsheet',NULL); 110 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (98,'JSConsole',NULL); 111 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (99,'Free 4 month web-development program for anyone who wants to start a career in tech.',NULL); 112 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (100,'Confused about Symbol/Symbol.iterator',NULL); 113 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (101,'Need help with a script, details within.',NULL); 114 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (102,'Need help understanding this function with a ternary operator!',NULL); 115 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (103,'Master the World of Angular – Issue #1',NULL); 116 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (104,'True and false js question',NULL); 117 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (105,'Learning javascript for me - Then Now and Later',NULL); 118 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (106,'How do you go about using a server-side library?',NULL); 119 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (107,'D3 courses, Where to start? v5 courses?',NULL); 120 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (108,'How to reference variable in object',NULL); 121 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (109,'Possible to detect subclassing @ class definitions?',NULL); 122 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (110,'Is it possible to animate an algorithm in a web app without using Javascript?',NULL); 123 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (111,'workbox V3 service-worker doesnt registering with react webpack',NULL); 124 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (112,'What is an efficient method of adding beta features to an existing application?',NULL); 125 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (113,'I started an explainer series on my Instagram account. Maybe you find it helpful.',NULL); 126 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (114,'How do I make a regex of words case insensitive?',NULL); 127 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (115,'Front-End Developer Handbook 2018 - Learn the entire JavaScript, CSS and HTML development practice!',NULL); 128 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (116,'Learn JavaScript in 25 minutes...',NULL); 129 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (117,'My form\'s \'reset\' button does not clear a drop down menu created with JS Bootstrap Dropdown. How to troubleshoot?',NULL); 130 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (118,'Variable in setInterval changing faster than the setInterval is set to at 1 second',NULL); 131 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (119,'Having issue with dynamic items and events',NULL); 132 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (120,'Another Dice Roller',NULL); 133 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (121,'NPM Auto-Updater Not Working?',NULL); 134 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (122,'\'cheerio\' and web scraping',NULL); 135 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (123,'Where can I find people to mentor?',NULL); 136 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (124,'Looking for afforable parttime online or offline (Amsterdam, Netherlands) learning bootcamps/programs/courses with weekly assignments (homework)',NULL); 137 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (125,'Javascript - Transforming simple data object into array of array of objects depending on condition',NULL); 138 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (126,'Generate 4 random numbers',NULL); 139 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (127,'Disable click event when link is clicked',NULL); 140 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (128,'Codewars & Codefights — thoughts?',NULL); 141 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (129,'ES6 Classes',NULL); 142 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (130,'learning javascript just a simple question',NULL); 143 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (131,'JS class for recipe',NULL); 144 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (132,'Can someone help me figure out why I keep getting reference errors?',NULL); 145 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (133,'[JQuery] getting 404 but images still load',NULL); 146 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (134,'[jQuery] What does .dropdown() do to a selector?',NULL); 147 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (135,'React native post request.',NULL); 148 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (136,'React Native Tutorial - Build an Instagram Clone',NULL); 149 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (137,'I assume I need recursion for this collapsible menu?',NULL); 150 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (138,'routing problems using node and express',NULL); 151 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (139,'Top Crazy JavaScript Interview Questions.',NULL); 152 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (140,'Dungeon Generator with images',NULL); 153 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (141,'What is shimming the console object?',NULL); 154 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (142,'[Question] Resolving nested promise mapseries',NULL); 155 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (143,'react.JS giving variables to component',NULL); 156 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (144,'I need help with a logic sort of thing',NULL); 157 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (145,'Join our JS study group on Slack!',NULL); 158 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (146,'Ways of creating new elements, adding text and attributes in vanilla JavaScript',NULL); 159 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (147,'Rotating Banner - need help!',NULL); 160 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (148,'Fatih Acet: The growth of Vue.js is phenomenal ',NULL); 161 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (149,'Vue + API vs PHP + Vue on templates',NULL); 162 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (150,'map, filter, reduce help',NULL); 163 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (151,'Help me understand the syntax in this simple for loop',NULL); 164 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (152,'Redux-Saga 101',NULL); 165 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (153,'How do you authenticate with firebase (react)?',NULL); 166 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (154,'Adding an If statement to check for hotkey press?',NULL); 167 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (155,'Mimicking Bootstrap’s Collapse with Vanilla Javascript',NULL); 168 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (156,'Top JavaScript Frontend Package Managers',NULL); 169 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (157,'You know what we need here? Syntactic highlighting.',NULL); 170 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (158,'Questions regarding testing React components with Enzyme and Jest.',NULL); 171 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (159,'function to change selected div color is showing error on parsing the backgroundColor',NULL); 172 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (160,'[Mod approved] Run simple JavaScript apps from your device, no server required',NULL); 173 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (161,'OOJS- question about links and best practice, single file *classes* or multi?',NULL); 174 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (162,'What\'s the best book or online course to learn the ES5 / ES6 / ES2017 aka the new JavaScript?',NULL); 175 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (163,'Critique my code',NULL); 176 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (164,'Stuck on issues, looking for a class or program',NULL); 177 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (165,'Help improve my solution to a binary tree problem (Learning about recursion and time complexity)',NULL); 178 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (166,'getElementsByTag is missing one of the tags',NULL); 179 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (167,'Function doesnt seem to run after completion of ajax request',NULL); 180 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (168,'How to run a single application multiple times with different configuration files',NULL); 181 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (169,'I am a beginner in JavaScript and I\'ve made a Pokemon website.',NULL); 182 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (170,'When are variables placed in quotes, and why?',NULL); 183 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (171,'I wrote an article on Progressive Web Apps and how to make your Web App a PWA',NULL); 184 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (172,'How do you resize text?',NULL); 185 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (173,'Way To Learn Basics In a Month',NULL); 186 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (174,'Retna.Ai developer Brad Ito shares his insights on Vue.js',NULL); 187 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (175,'Maintaining a Culture Of Learning @AppsFlyer',NULL); 188 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (176,'Want to learn JavaScript? Here\'s a free, full-length course',NULL); 189 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (177,'Why does variable++ not work?',NULL); 190 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (178,'WatchAndCode Javascript Course Honest Review (free and paid content)',NULL); 191 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (179,'How can I incorporate CSS into my Javascript Firefox Addon?',NULL); 192 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (180,'Github student pack web dev courses',NULL); 193 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (181,'Imperative and Declarative Code',NULL); 194 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (182,'Why is it impossible to do console.log(Array(3).map(empty => empty = \"fruit\"));',NULL); 195 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (183,'I am just starting out with JavaScript and I\'ve already made my first project! D&D Dice Roller!',NULL); 196 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (184,'I built a simple React-Redux app that fetches data from Reddit API',NULL); 197 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (185,'Best way to prepare for an interview for someone new to JavaScript?',NULL); 198 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (186,'Top 5 mistakes THAT DEVELOPPERS MAKE IN JAVASCRIPT',NULL); 199 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (187,'Best JS mobile learning app for intermediate learner?',NULL); 200 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (188,'Using the date/time inside if statements',NULL); 201 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (189,'Traversing the DOM with JavaScript',NULL); 202 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (190,'Am I mutating the Array object?',NULL); 203 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (191,'JavaScript Top 10 Open Source of the Month (v.Apr 2018)',NULL); 204 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (192,'How to obscure an email from web scraping?',NULL); 205 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (193,'Simple loop help. Count from x-y increase by z',NULL); 206 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (194,'Adobe Javascript help',NULL); 207 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (195,'getting button id from onclick and saving it',NULL); 208 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (196,'How to create HTML5 game engine',NULL); 209 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (197,'Stuck on a Java case problem',NULL); 210 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (198,'Difference between nightmare, codeceptjs, electronjs, phantomjs, jasmine/mocha,',NULL); 211 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (199,'Introduction to JavaScript - Free 24-part course',NULL); 212 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (200,'Hide after show() completes in jQuery',NULL); 213 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (201,'Advice for building admin panel',NULL); 214 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (202,'Booking form',NULL); 215 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (203,'What\'s a good book to go along with Eloquent Javascript?',NULL); 216 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (204,'Trying to get a circle to follow my mouse, end up getting a snake instead. Can I get some help?',NULL); 217 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (205,'Looping through an array to match objects based on date key value pair',NULL); 218 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (206,'Can anyone advise a good set of exercises for javascript.',NULL); 219 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (207,'Best way to do three state logic?',NULL); 220 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (208,'Function to change css and then change it back with delayed time is broken.',NULL); 221 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (209,'Confused as to how to create my object',NULL); 222 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (210,'How can I change the scale of an axis using Chart.js?',NULL); 223 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (211,'Any resources on writing a TSR console program?',NULL); 224 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (212,'quick question about ||',NULL); 225 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (213,'Why do I get a TypeError: not a function?',NULL); 226 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (214,'Is CodeAcademy the way to go?',NULL); 227 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (215,'How to apply/target javascript to all elements?',NULL); 228 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (216,'\"Consindering that...\" in JavaScript?',NULL); 229 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (217,'String Split w/ regex not working as expected.',NULL); 230 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (218,'Software is eating JS training',NULL); 231 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (219,'change an element style when it\'s between certain percentage of the viewport',NULL); 232 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (220,'XY coordinate plot survey using p5.js?',NULL); 233 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (221,'What are the best free resources for learning plain Javascript?',NULL); 234 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (222,'For security, I want links to my website to be a bookmarklet that (without the browser knowing its signed) downloads js files and (as js function) verifies their digital-signature before using',NULL); 235 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (223,'Some basic tips for JavaScript Beginners | Tips and Tricks',NULL); 236 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (224,'In your opinion/experience: best online/interactive Javascript course for beginners',NULL); 237 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (225,'[ROUTER] Trouble when using method replace() to change the route',NULL); 238 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (226,'Build ReactJS and Redux Applications from Scratch',NULL); 239 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (227,'Help needed Drag and Drop Pure JS',NULL); 240 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (228,'Why JavaScript has Closures? in-depth look',NULL); 241 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (229,'Can someone explain to me how this program is working please?',NULL); 242 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (230,'Need a library to make a Shopping Cart',NULL); 243 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (231,'Explain \'this\' behavior',NULL); 244 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (232,'Help with AJAX and json.',NULL); 245 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (233,'Truly understanding Async/Await',NULL); 246 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (234,'Video explaining promises for beginners',NULL); 247 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (235,'Loading a large object is slow. Are there alternatives?',NULL); 248 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (236,'Slick slickGoTo stops working with PJAX',NULL); 249 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (237,'4 buttons - one text, how to change the color of the text according to the colour of the button?',NULL); 250 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (238,'Getting up and Running with Express in a Jiffy',NULL); 251 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (239,'Production/Dist JS pattern',NULL); 252 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (240,'How to sum values from different functions into another function?',NULL); 253 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (241,'Trying to understand the Javascript Module Pattern.',NULL); 254 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (242,'Why isnt my immediately invoked function working after going to the next month in my js calendar?',NULL); 255 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (243,'Can anyone recommend any specific JS flash card sets?',NULL); 256 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (244,'Trying to get value from a dropdown list, apply arithmetic, then output...',NULL); 257 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (245,'My journey from Node to Go',NULL); 258 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (246,'Unlocking the JavaScript Code Interview (an Interviewer Perspective)',NULL); 259 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (247,'How to escape async/await hell',NULL); 260 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (248,'Splitting a Reddit API JSON title into two separately styled text bodies.',NULL); 261 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (249,'Iterating through JSON',NULL); 262 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (250,'Need advice regarding password-security and SOAP',NULL); 263 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (251,'Filtering JSON to build selection boxes',NULL); 264 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (252,'Need some help with setting up yarn',NULL); 265 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (253,'fetch - cors/no-cors',NULL); 266 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (254,'Registering event handler by assigning its name to event property',NULL); 267 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (255,'UserInput (prompt) WTF???',NULL); 268 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (256,'How to call function by reload or resize',NULL); 269 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (257,'Random Number Generator [HowTo]',NULL); 270 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (258,'List Processing with map, filter, and reduce',NULL); 271 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (259,'Reload page and resubmit form without prompt',NULL); 272 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (260,'Javascript Khan Academy',NULL); 273 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (261,'how can i write this to cycle between pictures?',NULL); 274 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (262,'Recreate Scheduler HTML',NULL); 275 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (263,'Understand Java in Hindi | Guaranteed you will understand structure of a programme after watching this !',NULL); 276 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (264,'How to editing function to change color based off a percent',NULL); 277 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (265,'Scoping a possible beginner Firefox Extension',NULL); 278 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (266,'Feedback and recommendations on react ssr',NULL); 279 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (267,'10 Useful JavaScript Form Validation Libraries, Beginner Should Know',NULL); 280 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (268,'Free 10-part D3.js course',NULL); 281 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (269,'[HELP] Is there a way to target an GlobalEventHandlers.oninput to a id?',NULL); 282 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (270,'[HELP] Assertion failed. Why?',NULL); 283 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (271,'[HELP]Add a text on a last line in a textarea',NULL); 284 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (272,'Send data between 2 computers',NULL); 285 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (273,'How do I create a new cell in the second column of an HTML table and output text to it?',NULL); 286 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (274,'Making Small Slack Application - 2 Part Blog Post',NULL); 287 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (275,'Adding linebreak when appending text with JSON',NULL); 288 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (276,'Es6 modules explained',NULL); 289 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (277,'Implementing collision detection in JavaScript',NULL); 290 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (278,'Help with detecting URL change in an \'app\'',NULL); 291 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (279,'What am I missing about this callback?',NULL); 292 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (280,'Best paid online trainings for Javascript if money is not an issue',NULL); 293 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (281,'Please Help! Looking for guides on setting up bootstrap.',NULL); 294 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (282,'Default Exporting - How to Distinguish When Importing?',NULL); 295 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (283,'Request : lessons on planning out code.',NULL); 296 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (284,'Problem trying to sort my mock',NULL); 297 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (285,'Create react app with express',NULL); 298 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (286,'Need help with Input field suggestions',NULL); 299 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (287,'How to choose an editor for JavaScript',NULL); 300 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (288,'What is a callback?',NULL); 301 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (289,'Need help with onClick',NULL); 302 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (290,'Lost in IF',NULL); 303 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (291,'Any tips? Thx ❤',NULL); 304 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (292,'Help with JavaScript',NULL); 305 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (293,'taking a web applications course and need help with javascript requirement for first project.',NULL); 306 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (294,'Help returning data from https GET request?',NULL); 307 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (295,'To everyone currently enrolled at a college: don\'t forget to get your Github student developer pack. It contains a free domain name, digital ocean credit and much more.',NULL); 308 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (296,'Help with Google Chart column colors',NULL); 309 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (297,'Why does context.measureText.width give different values for different text that takes up the same width?',NULL); 310 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (298,'Quick question about mongo db architecture',NULL); 311 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (299,'I made a succinct overview reference for ES6 features and syntax (with 1:1 ES5 comparisons)',NULL); 312 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (300,'Learn React.js in 5 minutes',NULL); 313 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (301,'Function won\'t activate on click',NULL); 314 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (302,'Iterating over an object: how would you do it?',NULL); 315 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (303,'Multistep Form HELP - How do I find out WHICH button started the next step?',NULL); 316 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (304,'Free course for anyone, who is new to React or wants to strengthen their React skills, by building a real world React application.',NULL); 317 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (305,'Check box based on selection',NULL); 318 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (306,'working on a little to add a css class to a menu but need a little help',NULL); 319 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (307,'I made a super basic react tutorial on codepen, would like some feedback please',NULL); 320 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (308,'Any good advice for getting feedback on projects for self learning?',NULL); 321 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (309,'Get IMG alt, paste it into textarea and send it.',NULL); 322 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (310,'Feedback Request - First Web App - Portfolio Rebalancer',NULL); 323 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (311,'Javascript for beginners in 2 minutes #6 - Data types',NULL); 324 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (312,'Form validation error',NULL); 325 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (313,'Help? Here are the instructions and my code pic in the comments.',NULL); 326 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (314,'Need some details about freeCodeCamp\'s monthly donation.',NULL); 327 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (315,'Animation',NULL); 328 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (316,'Can I use a while loop with if statements in this way?',NULL); 329 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (317,'Anyone know good sites to learn JS?',NULL); 330 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (318,'I\'m confused by this behavior of javascript arrays',NULL); 331 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (319,'An array holding objects with names that are equal to my html id’s is selecting those id’s',NULL); 332 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (320,'Why isn\'t my hit() function working?',NULL); 333 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (321,'Beginner looking for JS exercises to improve skills.',NULL); 334 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (322,'Dynamically add a class depending on field state',NULL); 335 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (323,'ES6 In Depth: Arrow functions – Mozilla Hacks - the Web developer blog',NULL); 336 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (324,'Acrobat Javascript Help for Fields',NULL); 337 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (325,'how would I use html canvas to create a click-n-drag skill tree?',NULL); 338 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (326,'Array of Objects',NULL); 339 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (327,'Problem regarding getting elements from input and form tags in html',NULL); 340 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (328,'Learn D3.js in 5 minutes',NULL); 341 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (329,'Question about string literals',NULL); 342 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (330,'Why are cards sometimes being added twice in my Blackjack game?',NULL); 343 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (331,'What we learnt when we tried to do MongoDB Clustering.',NULL); 344 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (332,'I ❤ #javascript: Is Math broken in JS?',NULL); 345 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (333,'What is the best way to create an image from an HTML element?',NULL); 346 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (334,'JavaScript Tutor Needed',NULL); 347 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (335,'Help needed! Select2 - JS/jQuery',NULL); 348 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (336,'Transitioning div is not working on second click to move back',NULL); 349 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (337,'Which \'this\' rule applies here?',NULL); 350 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (338,'Download file after paying with PayPal button',NULL); 351 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (339,'[help] how to use a for loop to display an image depending on a position in an index?',NULL); 352 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (340,'How to add array values together? (javascript/codestudio)',NULL); 353 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (341,'[Question] Chrome intervening against document.write(), but I\'m not on 2G Mobile. Solutions?',NULL); 354 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (342,'jQuery-> to Angular-TS.',NULL); 355 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (343,'Please help: simple for experienced javaScript users.',NULL); 356 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (344,'I\'m sick and tired of mental masturbation and get rich quick schemes. I want to finally learn programming/javascript. Is my learn programming/javascript roadmap viable?',NULL); 357 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (345,'I recently learned to implement MVC pattern with ES6 class [No more spaghetti code] Part 1',NULL); 358 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (346,'How to actually apply JS',NULL); 359 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (347,'Is It Possible to Create a Pivot Table with Linked Measures to the Data Source?',NULL); 360 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (348,'Objects and functions',NULL); 361 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (349,'jQuery enable checkbox',NULL); 362 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (350,'Object Functions & Attributes - Help!',NULL); 363 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (351,'How can I transform a function with closure into a generator',NULL); 364 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (352,'Fetch Help',NULL); 365 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (353,'Need assistance debugging a small Express JS api',NULL); 366 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (354,'\' vs \"',NULL); 367 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (355,'Udacity vs Treehouse degrees?',NULL); 368 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (356,'Can someone explain how the computer reads this piece of code',NULL); 369 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (357,'For Arrays what is the difference between Class methods and Prototype methods?',NULL); 370 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (358,'\"list.forEach(function(item) {//code})\" vs \"for (item in list)\"?',NULL); 371 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (359,'Noob \"how to\" question',NULL); 372 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (360,'How do you concatenate JSX elements with string in React.js?',NULL); 373 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (361,'Help with Form Validation',NULL); 374 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (362,'[Updated] Here is the Fitbit API + JavaScript OAuth 2.0 Web tutorial STEP by STEP Guide!',NULL); 375 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (363,'Whats Wrong with This code I need help.',NULL); 376 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (364,'18 React things you probably want to know about',NULL); 377 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (365,'Nested Loop Iteration and Splicing',NULL); 378 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (366,'Express.static setup not working correctly...',NULL); 379 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (367,'Acrobat XI: Format fields that has a certain prefix in it\'s name.',NULL); 380 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (368,'challenge me',NULL); 381 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (369,'Your Favorite Courses for Learning Javascript and React?',NULL); 382 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (370,'Explanation request of how some and every methods work when nested in filter array method.',NULL); 383 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (371,'[HELP] Textbox to update multiple divs text.',NULL); 384 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (372,'Question on JavaScript and Wordpress Themes',NULL); 385 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (373,'Examples of some new features in ECMAScript 2016, 2017 and 2018',NULL); 386 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (374,'JavaScript Top 10 Articles for the Past Month-v.Apr 2018',NULL); 387 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (375,'Need help with promises? arrays? I really am so confused.',NULL); 388 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (376,'Fullstack Vue: The Complete Guide to Vue.js',NULL); 389 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (377,'In snoowrap reddit api library how do I loop through comments for a submission?',NULL); 390 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (378,'Could you please participate in my survey?',NULL); 391 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (379,'JavaScript project for beginners: modular multiplication around a circle with HTML canvas',NULL); 392 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (380,'Where to start with js for experienced programmer',NULL); 393 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (381,'Is there a JS equivalent to C#\'s DownloadString()',NULL); 394 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (382,'Problem with an object key',NULL); 395 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (383,'Why do so many people suggest learning JavaScript first instead of Python or Java?',NULL); 396 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (384,'EventListener refreshing itself',NULL); 397 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (385,'A quick but complete guide to IndexedDB and storing data in browsers',NULL); 398 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (386,'Why isn\'t my removeCard() function working?',NULL); 399 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (387,'How to pass function argument as string and variable in same function',NULL); 400 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (388,'I just finished Practical JavaScript',NULL); 401 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (389,'Script to insert data into template/mask',NULL); 402 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (390,'Converting an array of objects to one object functionally?',NULL); 403 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (391,'Can\'t find the right way to autofil an input. Any help out there?',NULL); 404 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (392,'How do I use an API?',NULL); 405 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (393,'Functions: named and default arguments?',NULL); 406 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (394,'mongoDB update issue.',NULL); 407 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (395,'Can We Code Without Comments?',NULL); 408 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (396,'A C++ developer struggling with some simple JavaScript code. Any help?',NULL); 409 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (397,'Promise returned is ignored( puppeteer script in combination with electron)',NULL); 410 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (398,'JS IDE - Complete Beginner Question',NULL); 411 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (399,'Help with If statement with multiple \"and\" and \"or\" conditions',NULL); 412 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (400,'FronEndMasters free week!',NULL); 413 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (401,'A free course to learn ECMAScript2015',NULL); 414 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (402,'Best way to store/compress and store a huge array/string?',NULL); 415 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (403,'\'this\' keyword, full guide.',NULL); 416 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (404,'How come this speech synthesis example isn\'t working?',NULL); 417 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (405,'What to know from JS as a front-end designer guy?',NULL); 418 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (406,'I\'m having a difficult time understanding/learning JSON and Ajax',NULL); 419 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (407,'Having some issues with Chart.js: chart loads with dummy (initialized) data when page loads, only loads correct data after calling a function twice',NULL); 420 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (408,'Array Help',NULL); 421 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (409,'Help with understanding Promise',NULL); 422 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (410,'a fetch jsonp polyfill',NULL); 423 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (411,'Learning about API, async await',NULL); 424 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (412,'Help with .change in Java Script',NULL); 425 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (413,'Best way to learn JS for a beginner?',NULL); 426 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (414,'Building a movie suggestion app that suggests movies based on the weather outside.',NULL); 427 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (415,'Help understanding Promise.all([]).then() behavior',NULL); 428 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (416,'i tested 40+ \'blank new tab\' chrome tab extensions, and while they did basically the same things, the memory usage was different',NULL); 429 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (417,'Function works when I set var = number, but when I set it equal to anything else, it NaN.',NULL); 430 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (418,'Connecting to a Meteor window',NULL); 431 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (419,'Problems manipulating json to a datatable using getJSON',NULL); 432 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (420,'Can I write a program in Javascript that could run outside of a browser?',NULL); 433 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (421,'The ultimate learning resource for Vue developers.',NULL); 434 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (422,'New Project, looking for code feedback!',NULL); 435 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (423,'13 Noteworthy Points from Google’s JavaScript Style Guide',NULL); 436 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (424,'Last minute coding help',NULL); 437 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (425,'Node & Express Tutorial - Reddit Clone Site',NULL); 438 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (426,'How to code atari breakout google image style - Part 2 ❗️❗️TRY OUT THE SCRIPT LINKED IN THE DESCRIPTION❗️❗️ May be enhance it.',NULL); 439 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (427,'The Complete Guide to Node.js Developer Course',NULL); 440 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (428,'How Do You Add a CSS class on scroll with Vanilla JavaScript',NULL); 441 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (429,'Struggling with an ajax call inside a for loop',NULL); 442 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (430,'Color/highlight specific strings (Angular)',NULL); 443 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (431,'Protecting endpoints in node.',NULL); 444 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (432,'Integer array \"pass by reference\" into function isn\'t effected by slice.',NULL); 445 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (433,'create UI for puppeteer automation script ?',NULL); 446 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (434,'JavaScript help',NULL); 447 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (435,'I don\'t understand the output my yahoo finance api is returning when requesting current price (noob)',NULL); 448 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (436,'How can I access a nested objects for my simple Blackjack game?',NULL); 449 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (437,'Don\'t know how to connect a
box to my program',NULL); 450 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (438,'My First Script without a tutorial looking for feedback',NULL); 451 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (439,'Facts probably you didn\'t Known about TypeScript the Future of JavaScript',NULL); 452 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (440,'Build a node page asynchronsly..how to do this?',NULL); 453 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (441,'Help understanding index of functions',NULL); 454 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (442,'Project ideas for a newbie in programming.',NULL); 455 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (443,'Images not referenced correctly in production build? (webpack xpost)',NULL); 456 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (444,'browerify has trouble with the net package',NULL); 457 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (445,'Trouble understanding the logic of mouseevent.screenY/screenX and a magic factor of 1.25',NULL); 458 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (446,'I\'m trying to figure out how a block of code works. Any help would be appreciated.',NULL); 459 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (447,'Using Javascript to retrieve a different order of search results from the Bing Search API.',NULL); 460 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (448,'What should I do before applying for a job that requires knowledge about stack that I don\'t have commercial experience with?',NULL); 461 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (449,'What is POSTBACK in jQuery ?',NULL); 462 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (450,'Mastering Web Applications',NULL); 463 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (451,'Question about rAF (requestAnimationFrame)',NULL); 464 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (452,'How to Promisify the SpeechSynthesis API',NULL); 465 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (453,'Javascript mouseMoved Function',NULL); 466 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (454,'Add Class and Attribute Issue',NULL); 467 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (455,'Good resources for JavaScript learning',NULL); 468 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (456,'How to understand this replace()method?',NULL); 469 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (457,'How to deal with NPM packages',NULL); 470 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (458,'JavaScript: Learn key value iteration',NULL); 471 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (459,'GetElementsByClassName vs QuerySelectorAll',NULL); 472 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (460,'Copy/Paste from my site to another site',NULL); 473 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (461,'help with highcharts',NULL); 474 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (462,'For loop will display all products from an API but not their images. What am I doing wrong?',NULL); 475 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (463,'Unexpected token ? -What is the \"replacement sign for ?\"',NULL); 476 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (464,'How to read environment variables in Node.js?',NULL); 477 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (465,'What\'s the best way to loop through a multidimensional array or a multidimensional object or an object containing several arrays?',NULL); 478 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (466,'Angular 2(or 4) and NodeJS-The Complete Guide to MEAN Stack',NULL); 479 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (467,'Unit testing in JavaScript (Node.js with Mocha)',NULL); 480 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (468,'Learning Javascript, need help with Functions/ string!! s',NULL); 481 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (469,'Javascript Accordion',NULL); 482 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (470,'Writing a function that modifies an object\'s prototype',NULL); 483 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (471,'Javascript Accordion help needed',NULL); 484 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (472,'I can\'t get the code to work through html.',NULL); 485 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (473,'XML parsing -> How do you search for parent element with certain child attribute?',NULL); 486 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (474,'A css game framework suitable for mobile phone h5 development',NULL); 487 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (475,'Learn Programming, Web Development, Networking, Hacking, Etc For Free',NULL); 488 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (476,'Trying to learn Javascript',NULL); 489 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (477,'Duo learning',NULL); 490 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (478,'How do I create a while loop that exits once a page is found to exist (ie. doesn\'t 404 or refuse connection)',NULL); 491 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (479,'JavaScript automation',NULL); 492 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (480,'Javascript/HTML5 question',NULL); 493 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (481,'Promise/Callback Hybrid Question',NULL); 494 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (482,'Need some help figuring this out - axios/fetch request not working',NULL); 495 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (483,'ReactJS Dynamic JSON based form tutorial for beginners.',NULL); 496 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (484,'JavaScript in 14 minutes',NULL); 497 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (485,'Javascript autoclicker',NULL); 498 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (486,'Is there someone here with some patience that would walk step by step with me through a problem i am having trouble with',NULL); 499 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (487,'Function composition',NULL); 500 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (488,'[NodeJS] Trying to run a script with args from another script which is run by package.json..',NULL); 501 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (489,'Having trouble creating new elements',NULL); 502 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (490,'New to javascript, want to get the text from a input to the parameters of a function and then result to textarea.',NULL); 503 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (491,'How do I figure out how to create the slideToggle jquery effect by hand from scratch with plain javascript?',NULL); 504 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (492,'How I can get the value and/or text of Dropdown from csv or excel?',NULL); 505 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (493,'The JavaScript Learning Landscape in 2018',NULL); 506 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (494,'1 [Storybook] error at storybook `onChange is not a function` when using the action addon',NULL); 507 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (495,'Join the free, live, online, React bootcamp',NULL); 508 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (496,'21 Javascript Lessons for beginners',NULL); 509 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (497,'\"Database\" of information for a javascript game?',NULL); 510 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (498,'Maintaining scroll position with React',NULL); 511 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (499,'How to get random pictures that have corresponding text with them on a website?',NULL); 512 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (500,'JavaScript drag and drop tutorial without using any library.',NULL); 513 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (501,'Is there a better/faster way to create a whole portion of HTML elements to display returned JSON data?',NULL); 514 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (502,'What do you think of this Full Stack Curriculum? The videos I am publishing will be part of this.',NULL); 515 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (503,'console/command-line in on a web page',NULL); 516 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (504,'How do I prevent a calculation that gets a random value from an array from returning undefined?',NULL); 517 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (505,'querySelectorAll -> targetting',NULL); 518 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (506,'Using innerText with variables',NULL); 519 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (507,'Vanilla JavaScript Todo App for beginners. 3 parts published so far. See the evolution here.',NULL); 520 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (508,'Humble Book Bundle: Makerspace by No Starch Press (Partner)',NULL); 521 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (509,'Needing help with a web page with a complex set of rules for hiding and showing different elements on a page.',NULL); 522 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (510,'IHNIWID S1 • E8 - Vue Component Testing',NULL); 523 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (511,'Help make link (text node) disappear',NULL); 524 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (512,'Here is a list of javascript exercises on String that will help you build logic and write your own methods.',NULL); 525 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (513,'Is there a easy free way to host my html and javascript project? Everything I\'ve looked at so far seems to assume a CS degree!',NULL); 526 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (514,'Most important DOM events/handlers?',NULL); 527 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (515,'Intro to React Native - Calculator App',NULL); 528 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (516,'How do I get faster at javascript.',NULL); 529 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (517,'Any help with this Script?',NULL); 530 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (518,'Accessing an object inside an array inside an object.',NULL); 531 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (519,'Functions and Local Variables',NULL); 532 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (520,'Building live Bitcoin graph',NULL); 533 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (521,'How do I make a variable change when I change it in a different function?',NULL); 534 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (522,'Node list for each',NULL); 535 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (523,'How do I sort my comments/replies/replies to replies data properly',NULL); 536 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (524,'Problems with fetch()',NULL); 537 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (525,'Learn Firebase Querying, Sorting and Filtering Database with JS',NULL); 538 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (526,'Sorting list alphabetically works but also error',NULL); 539 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (527,'[Video] ES6 Class Syntax',NULL); 540 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (528,'Echo JS - a poor man\'s r/learnjavascript alternative',NULL); 541 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (529,'Declarative Javascript Question',NULL); 542 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (530,'How can I recreate the click effect and hover effect in this interactive music video using javascript?',NULL); 543 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (531,'JSON vs XML vs .JS for storing and fetching data?',NULL); 544 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (532,'*nix equivalent of wscript?',NULL); 545 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (533,'How to setup Modernizr.js',NULL); 546 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (534,'Learn how to create your own npm modules and use them.',NULL); 547 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (535,'Learn jQuery for Total Noobs: 100% Free JavaScript and jQuery Course by Scotch.io (3 courses, 50 lessons, 4.5 hours!)',NULL); 548 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (536,'ES6 Destructuring can fix Oscars Best Picture Mix-ups ',NULL); 549 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (537,'Interactive story with JavaScript',NULL); 550 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (538,'[Help] Grunt - Setting common properties for all Targets in Grunt Config',NULL); 551 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (539,'How much time to devote to vanilla JS if the goal is React?',NULL); 552 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (540,'New 5 minute function',NULL); 553 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (541,'could use some help with a recursive palindrome function.',NULL); 554 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (542,'Question about Eclipse and Javascript',NULL); 555 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (543,'[Help] I\'m trying to create 6 textboxes made from , top 3 serve as input, bottom 3 serve as the output. Three input textboxes read 3 numbers',NULL); 556 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (544,'Improving page performance with Chrome DevTools',NULL); 557 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (545,'Is it worth spending time becoming familiar with jQuery in 2018?',NULL); 558 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (546,'A Database of JavaScript Resources - Curated by Developers (2018)',NULL); 559 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (547,'Connected cars ',NULL); 560 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (548,'2018 Trends: Popular JavaScript Frameworks on GitHub',NULL); 561 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (549,'NodeJS modules not running? Can anyone help?',NULL); 562 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (550,'A webpage to output JSON from another site.',NULL); 563 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (551,'JavaScript Top 10 Open Source Projects-v.Mar 2018',NULL); 564 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (552,'Issue looping through an HTMLCollection with a for loop?',NULL); 565 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (553,'How do I reuse my own Code?',NULL); 566 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (554,'What does if (!window[\'YTConfig\']) check?',NULL); 567 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (555,'Question about React Props',NULL); 568 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (556,'How do I use a variable from a function in the scope of that functions prototype?',NULL); 569 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (557,'Help creating a function for an array.map method to determine whether or not a character is alphabet!',NULL); 570 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (558,'Connecting to an external API (React/Express-related)',NULL); 571 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (559,'Is there something like Quokka.js for Sublime?',NULL); 572 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (560,'Looking for a tutorial on setting up a new project',NULL); 573 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (561,'How to learn reduce function?',NULL); 574 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (562,'OAuth, wherefore art thou?',NULL); 575 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (563,'Which CodeAcademy Link?',NULL); 576 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (564,'GraphQL vs SQL when starting out',NULL); 577 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (565,'Getting Started With The Web MIDI API',NULL); 578 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (566,'Function constructor vs Object.create',NULL); 579 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (567,'Is it possible in JSON, to not have to write strings in one line?',NULL); 580 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (568,'Only do something if all iterations of a for loop return false',NULL); 581 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (569,'I was curious about `typeof null` being \'object\', so I investigated a very early version of JavaScript to explore the bug',NULL); 582 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (570,'Guide to Galaxy, curated, worthy and up-to-date links/reading list for ITCS-Coding/Algorithm/SoftwareArchitecture/AI.',NULL); 583 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (571,'I made a userscript to hide the chat icon in the navbar. Using the Mutation Observer API to keep it hidden. It all works this time!',NULL); 584 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (572,'Which framework for UI and desktop apps?',NULL); 585 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (573,'[Code Review] Need a kind soul to review my first web app for why it\'s glitching (5-10 minutes)',NULL); 586 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (574,'Split an array into groups of n length (Free Code Camp)',NULL); 587 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (575,'Breaking out of for loop when a certain if-statement returns true',NULL); 588 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (576,'Should I store text in XML files for web games?',NULL); 589 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (577,'could you recommend a good js learning source you\'ve tried? have already tried a a few but they were too hard/confusing',NULL); 590 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (578,'A Simple Guide to Taking a Web Page Offline, using Service Workers',NULL); 591 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (579,'I\'m trying to figure out why this page refreshes after a contact form submit',NULL); 592 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (580,'Why isn\'t my marker showing on my custom google maps?',NULL); 593 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (581,'does anyone know what the hell is going on in this code ?',NULL); 594 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (582,'Best book for beginner?',NULL); 595 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (583,'Different ways of writing a constructor',NULL); 596 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (584,'Handpicked collection of vscode extensions for Front-End development.',NULL); 597 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (585,'I made a simple bookmarklet for sorting results by upvotes on Hacker News. It also teaches some new es6 concepts.',NULL); 598 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (586,'How do I add a prototype function to an event listener?',NULL); 599 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (587,'How to arrange scripts in a JavaScript file',NULL); 600 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (588,'Making a cost calculator: problem with decimals',NULL); 601 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (589,'About FB comments',NULL); 602 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (590,'React JS and Redux – Mastering Web Apps',NULL); 603 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (591,'else if (not good at JS go to reddit and pray)',NULL); 604 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (592,'How I learned web development online and make $90/hr more than I did 2 years ago.',NULL); 605 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (593,'Looking for participants to answer questions related to scope in JS. Win a 15€ amazon gift card. (academic study)',NULL); 606 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (594,'Excellent article about what you can focus on to become an outstanding developer',NULL); 607 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (595,'Is there an svg version of canvas?',NULL); 608 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (596,'My HTML file has an element which calls a function when clicked. Then that function cannot access a global variable.',NULL); 609 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (597,'Can someone explain to me like a two year old what this mess does and how I would make sense code like this?',NULL); 610 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (598,'html2canvas keeps drawing the same image even when background-image is changed',NULL); 611 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (599,'Why am I able to hit github api from codepen without CORS error ?',NULL); 612 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (600,'Nested an if statement within a while loop. If that statement is true, I need the while loop to restart. Is leaving it blank the right thing to do, or should I use continue?',NULL); 613 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (601,'DeepThinkJS Machine Learning Algorithms Library',NULL); 614 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (602,'Super Annoying thing with Firefox -_- (:hover)',NULL); 615 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (603,'Inspired by turbotax',NULL); 616 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (604,'Class method called within class constructor?',NULL); 617 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (605,'HTML+ javascript',NULL); 618 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (606,'1st time web scraping with nightmare.js',NULL); 619 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (607,'[React] What is this thing called?',NULL); 620 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (608,'Side Effects Management with Redux-Saga',NULL); 621 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (609,'Bootstrap& Material Design templates stash - GitHub Open source',NULL); 622 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (610,'Contributing to GitHub projects with vanilla JavaScript...',NULL); 623 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (611,'Next step: Node, Electron, NW?',NULL); 624 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (612,'Investigating JavaScript casting behavior and why `0 <= null` returns true',NULL); 625 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (613,'What are the best ways to share information between modules?',NULL); 626 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (614,'Top 3 JavaScript Online Courses',NULL); 627 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (615,'Beginner practice project for callback functions',NULL); 628 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (616,'Best ORM and SQL database to learn for Express.js / employability?',NULL); 629 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (617,'Apps',NULL); 630 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (618,'Comparison of two arrays using JavaScript',NULL); 631 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (619,'Help with changing text color.',NULL); 632 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (620,'Math operators & functions in JavaScript',NULL); 633 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (621,'Authorization Bearer in Node',NULL); 634 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (622,'My loops show the same value from my array. Help me, please.',NULL); 635 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (623,'You know JavaScript basics... now what?',NULL); 636 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (624,'Need help understanding Functions and Parameters and when to use them',NULL); 637 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (625,'How can I make HTML 5 titles unwalkable ?',NULL); 638 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (626,'Three different ways to check Palindrome in JavaScript using reduce and spread operator',NULL); 639 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (627,'Changing font in Visual Studio Code',NULL); 640 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (628,'Rounding and formatting for price calculations',NULL); 641 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (629,'Easier way to create objects with dynamic keys ',NULL); 642 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (630,'SpeakJS – A Discord server for all things JavaScript (with ~4000 members)',NULL); 643 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (631,'Code works in VanillaJS but not JQuery',NULL); 644 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (632,'.filter in double arrays',NULL); 645 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (633,'Functions syntax',NULL); 646 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (634,'Help printing a JSON object into a table',NULL); 647 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (635,'Structuring JavaScript projects for testability',NULL); 648 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (636,'Front-End Resources for Back-End Thinker',NULL); 649 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (637,'Need some help with Check for Palindromes exercise.',NULL); 650 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (638,'Why does this code work the way it does?',NULL); 651 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (639,'When creating a Object, can the key be an integer without quotes? Does it matter?',NULL); 652 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (640,'How do you get the number 123 out of this object using one line of JavaScript?',NULL); 653 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (641,'Autocomplete on chrome console',NULL); 654 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (642,'My simple converter isn\'t working: help',NULL); 655 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (643,'Trying to answer a job app question on JS vs Node..',NULL); 656 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (644,'(Question) Onclick copy to clipboard',NULL); 657 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (645,'How JavaScript works: the rendering engine and tips to optimize its performance',NULL); 658 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (646,'Struggling all day with toggling 75 unique elements, send help!',NULL); 659 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (647,'We\'ve released our templates as an open source!',NULL); 660 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (648,'Creating a simple trivia game',NULL); 661 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (649,'How to code atari breakout google image style - Part 1 (javascript game tutorial)',NULL); 662 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (650,'Help with require',NULL); 663 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (651,'Can\'t get return from fetch api and json_encode PHP output',NULL); 664 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (652,'Best (clean) Audio Player',NULL); 665 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (653,'Navbar scrolling menu does not working. What to do?',NULL); 666 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (654,'Static vs Dynamically bound functions.',NULL); 667 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (655,'Why won\'t my program display an alert box?',NULL); 668 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (656,'Starting to understand jquery',NULL); 669 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (657,'Problem/exercise sets for learning map filter reduce foreach?',NULL); 670 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (658,'A way around using a looop',NULL); 671 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (659,'Creating a new array from a multidimensional array?',NULL); 672 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (660,'I need to add a widget to my website that would show image which url is stored in json and is changed every day',NULL); 673 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (661,'How is my canvas getting tainted?',NULL); 674 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (662,'TypeScript — JavaScript with superpowers',NULL); 675 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (663,'Create Entire ReactJS and Redux Applications from Scratch',NULL); 676 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (664,'Beginner here: If id like to learn how to build a decent website, start with HTML5 or JavaScript?',NULL); 677 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (665,'using .slice in event handler in react?',NULL); 678 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (666,'what does it mean for a language to support ODBC/JDBC and does javascript qualify here?',NULL); 679 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (667,'Read and Write JSON File',NULL); 680 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (668,'Effectively find option(s) in a dropdown list?',NULL); 681 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (669,'Trying to learn how to wield spam clicking code',NULL); 682 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (670,'5 minute functions: First video in my new series. (Access Url Get Data)',NULL); 683 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (671,'sessionStorage question',NULL); 684 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (672,'Changing buttons on navbar by scrolling',NULL); 685 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (673,'React Native Tutorial - Calculator',NULL); 686 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (674,'Street Fighter 2 car smackdown, in Vue.js',NULL); 687 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (675,'Object.prototype.constructor. (...) .prototype.constructor I can type \'.prototype.constructor\' infinitely many times and output : function Object() { [native code] } is still the same. Why it doesn\'t ends? I was expecting null',NULL); 688 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (676,'Are you looking for an efficient markdown editor? Please use Mark Text',NULL); 689 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (677,'var iCanDoArrays=false',NULL); 690 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (678,'file.xhr?',NULL); 691 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (679,'Object of function? Which is best practice in this case?',NULL); 692 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (680,'JavaScript scope with simple walk through',NULL); 693 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (681,'JSON for...in loop returns keys only?',NULL); 694 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (682,'New to testing and none of the tutorials/examples show testing a complex thunk.',NULL); 695 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (683,'New syntax?',NULL); 696 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (684,'[Help needed] Any ideas why this jquery code doesn\'t work?',NULL); 697 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (685,'Help me on let vs var',NULL); 698 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (686,'If you wanna practice on some real interview questions and check your answers give a try to this repo',NULL); 699 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (687,'Trying to understand moving multiple elements.',NULL); 700 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (688,'Comparing an Array to an Array (scalar values only)',NULL); 701 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (689,'How do I use an on \'keyup\' event?',NULL); 702 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (690,'How can I center a ``.col-md-x``div element in HTML Page in jQuery ?',NULL); 703 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (691,'why does this countdown function not work that is almost identical to my other countdown function that works.',NULL); 704 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (692,'The simplest css animation library, it is very suitable for beginners',NULL); 705 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (693,'Javascript Tutorial 2018 [#17] - Accessing the DOM',NULL); 706 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (694,'Frontend+ Weekly №8: SwiftNIO, Custom Vue Router, React Time Slicing and Suspense API',NULL); 707 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (695,'Does it matter what order I learn JavaScript, html, or css in?',NULL); 708 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (696,'why cant i run the changes i make in this sourcecode?',NULL); 709 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (697,'Measuring performance and debugging React Native apps',NULL); 710 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (698,'Extract Table Data',NULL); 711 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (699,'Twit/NPM Twitter Bot',NULL); 712 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (700,'Code differences relevance',NULL); 713 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (701,'How to check for attached event to DOM element?',NULL); 714 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (702,'Selecting Table Element - Help',NULL); 715 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (703,'Component re-rendering/\'transitionend\' called incrementally one more time each event.',NULL); 716 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (704,'ES7 - Are there any changes to the Canvas object or interesting getImageData changes?',NULL); 717 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (705,'Getting A Programming Job As A Self-Taught Developer [From Someone Who Has Done It]',NULL); 718 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (706,'Beginner baffled and enraged at NPM install/Jquery plugins.',NULL); 719 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (707,'combining scroll with many if statements that change the same div',NULL); 720 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (708,'Javascript Tutorial 2018 [#16] - Loops (For loops & more)',NULL); 721 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (709,'Best guide for animating particles?',NULL); 722 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (710,'Help with Promises and returning values.',NULL); 723 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (711,'What is Javascript?',NULL); 724 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (712,'Creating object property with array values from the DOM?',NULL); 725 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (713,'Shall I use `WeakMap` over `Map`?',NULL); 726 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (714,'Type of music when coding',NULL); 727 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (715,'How to improve this piece of code? It doesn\'t seem very DRY to me.',NULL); 728 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (716,'[Help]One running Javascript over multiple HTML pages',NULL); 729 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (717,'Javascript Tutorial 2018 [#15] - Functions & IIFE',NULL); 730 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (718,'Jake Archibald: In The Loop - JSConf.Asia 2018',NULL); 731 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (719,'How do I make a copy of a function and be able to change its change its parameters and add lines of code to it?',NULL); 732 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (720,'Looking for a fasttrack to firefox webextensions',NULL); 733 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (721,'Struggling with local storage stringify',NULL); 734 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (722,'Finding non jQuery results on google?',NULL); 735 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (723,'Perform a certain action if an item is not in an array',NULL); 736 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (724,'Need JavaScript equivalent of the Python code',NULL); 737 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (725,'can\'t parse json from a server',NULL); 738 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (726,'Example to illustrate functional programming compared to OOP?',NULL); 739 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (727,'I recently learned how to do CRUD operations with Firebase with vanilla javascript...I wanted to share with you all...',NULL); 740 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (728,'Type Error: X is not a function',NULL); 741 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (729,'Looking for additional JS resources and advice',NULL); 742 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (730,'Just started learning JS need some help',NULL); 743 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (731,'Javascript Tutorial 2018 [#14] - Switch Statements',NULL); 744 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (732,'trippy phyllotaxis in Javascript (may cause seizures)',NULL); 745 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (733,'Explain it like I\'m Five: Boolean if statement',NULL); 746 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (734,'Need help with node.js and callbacks for DB I/O',NULL); 747 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (735,'New to Javascript',NULL); 748 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (736,'[Help] Calling a function in a function in a function?',NULL); 749 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (737,'My Review of freeCodeCamp',NULL); 750 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (738,'Button vs Input',NULL); 751 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (739,'Why won\'t my charts work?',NULL); 752 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (740,'Some Javascript questions...',NULL); 753 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (741,'My \"senior\" dev told me to use var instead of let as let is old and depricated. Is it really so?',NULL); 754 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (742,'Anyone wanna help help a JS boot camp student out?',NULL); 755 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (743,'Noob in the worst way, transitioning Army and headed to a Javascript coding immersive in a few weeks. Can you help me set up my Windows laptop?',NULL); 756 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (744,'FCC, OP, or ?',NULL); 757 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (745,'Shared mutable state: How could it create problems here?',NULL); 758 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (746,'Bouncing between multiple positions in tween.js',NULL); 759 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (747,'I made a userscript to hide the chat icon in the bar on the right with username, mail icon etc. Would love some critique / advice on how to make it better and less hacky.',NULL); 760 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (748,'Turns out javascript is my kryptonite...',NULL); 761 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (749,'Need to get the results of a firebase query into a array',NULL); 762 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (750,'Recursion',NULL); 763 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (751,'Which direction to move?',NULL); 764 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (752,'Smooth scroll to an element, .scrollTop gives me 0',NULL); 765 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (753,'CodeWars Kata Scramblies',NULL); 766 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (754,'Super simple javascript tool function set',NULL); 767 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (755,'How can I add a class to my navbar when the users scroll distance is greater than 0?',NULL); 768 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (756,'Validate a digit that not the first or last digit',NULL); 769 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (757,'Having a very hard time with a very simple, single function chrome extension. I\'m trying to close the currently opened tab on extension click, but it doesn\'t do anything. Any insight is greatly appreciated.',NULL); 770 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (758,'JavaScript Top 10 Articles for the Past Month-v.Mar 2018',NULL); 771 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (759,'How to make a function stop after an if statement is true?',NULL); 772 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (760,'Help needed with counting generated numbers',NULL); 773 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (761,'A toddlers guide to memory leaks in Javascript',NULL); 774 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (762,'What are some nice-looking/elegant websites I can learn from as case studies in my goal to becoming a good front-end developer?',NULL); 775 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (763,'Is there anyway I can get all the Geeksforgeeks.org code solutions in JavaScript? :(',NULL); 776 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (764,'Declaring variables',NULL); 777 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (765,'Button type declaration',NULL); 778 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (766,'Any good instagram accounts you recommend with good JS tips and tricks?',NULL); 779 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (767,'Finding cool little projects, then improving them, is a great way to improve your skills.',NULL); 780 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (768,'Hiding element with JS',NULL); 781 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (769,'Help with For...of loop',NULL); 782 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (770,'Open source game frameworks',NULL); 783 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (771,'Using sql.js with TypeScript',NULL); 784 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (772,'Need help with converting some Pure cSS into styled-components',NULL); 785 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (773,'What\'s going on with my fizzbuzz code?',NULL); 786 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (774,'Scope Question',NULL); 787 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (775,'Restrict access to file path with NodeJS and Express.',NULL); 788 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (776,'Why won\'t my toggle work?',NULL); 789 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (777,'How do i learn Jacascript??? Panicking',NULL); 790 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (778,'Resources for amateurs?',NULL); 791 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (779,'Portland, OR Area JavaScript friends?',NULL); 792 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (780,'Help with my code for closures!',NULL); 793 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (781,'How do I get the value of a html string number from a javascript query selector?',NULL); 794 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (782,'Frontend+ Weekly No.7: WebAssembly architecture for Go, React Suspense, Redesigning Redux',NULL); 795 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (783,'Javascript Tutorial 2018 [#13] - If Statements & Ternary Operator',NULL); 796 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (784,'Ajax 500 error in jquery.min - send/ajax',NULL); 797 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (785,'Why is a String considered an object?',NULL); 798 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (786,'Why does my function parameter keep showing up as undefined in a function inside of anothers function scope?',NULL); 799 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (787,'Unable to retrieve message via window.eventListener.',NULL); 800 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (788,'print odd pages',NULL); 801 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (789,'Javascript Tutorial 2018 [#11] - Object Literals',NULL); 802 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (790,'Audio API - count the number of audio samples between finger-nails tapping on the desk.',NULL); 803 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (791,'Looking for ways to test my (beginner) JS knowledge',NULL); 804 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (792,'What does putting two minuses in front of a variable mean?',NULL); 805 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (793,'Anyone know how one would recreate this hover over effect?',NULL); 806 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (794,'Javascript Tutorial 2018 [#12] - Dates // the Date Object',NULL); 807 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (795,'(This time I tried to turn down the loud music ',NULL); 808 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (796,'Displaying img src and alt text on hover',NULL); 809 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (797,'Under the hood with Event Handlers',NULL); 810 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (798,'How to share the sum of values of the form to a PHP script',NULL); 811 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (799,'return function VS. function then returning',NULL); 812 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (800,'Looking to learn Javascript with someone?',NULL); 813 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (801,'Functions and Undefined',NULL); 814 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (802,'Implemented jquery slideToggle method in my site, but I want to know how to make it from plain javascript by hand from scratch?',NULL); 815 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (803,'Regular expressions look kinda scary, but they\'re not so bad. I wrote this intro for absolute beginners showing how to validate a zip code.',NULL); 816 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (804,'Get object value from an array in JSON',NULL); 817 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (805,'nodemon and indexedDB',NULL); 818 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (806,'Create beautiful tooltips with Popper.js/Tooltip.js',NULL); 819 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (807,'Is making a thing ( for example a long data table ) with a scroll up and down easy? I\'m asking about the scrolling thing.',NULL); 820 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (808,'please help... i am stuck on a for loop that iterates through json data and returns google api weighted locations. its been weeks now and im broken.',NULL); 821 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (809,'Error: Unhandled Rejection (TypeError): Cannot read property \'setState\' of undefined ~50 line! Why? How to fix?',NULL); 822 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (810,'7 Useful JavaScript Hacks for better Coding - Tips to Web Developers',NULL); 823 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (811,'Is it possible to use D3 reusable with DC.js crossfiltering',NULL); 824 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (812,'Good way to format numbers? Specific details inside',NULL); 825 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (813,'Learning Node.js',NULL); 826 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (814,'User input that is editable',NULL); 827 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (815,'Javascript News Recap February',NULL); 828 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (816,'Doubt with Object.prototype',NULL); 829 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (817,'Javascript Tutorial 2018 [#10] - Arrays / Array Methods',NULL); 830 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (818,'Machine Learning From Scratch: The Perceptron Model',NULL); 831 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (819,'JavaScript to open a URL automatically',NULL); 832 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (820,'Can someone explain to me why you would ever use Promise.resolve() or Promise.reject() ?',NULL); 833 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (821,'translate the coordinates to CSS fixed positioning in pixels',NULL); 834 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (822,'Trouble with multiple radio buttons',NULL); 835 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (823,'JavaScript to change active Navbar Link',NULL); 836 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (824,'I want to build a JS library with only helper functions for just one data type. Any resources on creating a library you recommend?',NULL); 837 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (825,'What is the best way to use javascript libraries with Webpack?',NULL); 838 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (826,'Set Background to Reddit Image',NULL); 839 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (827,'Return question',NULL); 840 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (828,'Javascript Debugging Like a PRO',NULL); 841 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (829,'Angular 2(or 4) and NodeJS-The Practical MEAN Stack Guide',NULL); 842 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (830,'If statement for resume function keeps resetting time or not moving time',NULL); 843 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (831,'Javascript Tutorial 2018 [#8] - Strings and Concatenation in Javascript',NULL); 844 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (832,'How much can JavaScript really do?',NULL); 845 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (833,'Is there any way to speed up this simple script ?',NULL); 846 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (834,'Help with javascript on a website - how does it know if javascript is enabled?',NULL); 847 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (835,'trying to understand the flow of this script.',NULL); 848 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (836,'Hilariously Weird Twitter Bot Tutorial Series Using JavaScript',NULL); 849 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (837,'is there a JavaScript to change the style of the object the onClick is placed in?',NULL); 850 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (838,'BlocklikeJS Tutorial Ep. 2 - Creating Stages & Backdrops',NULL); 851 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (839,'Event Bus',NULL); 852 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (840,'Project feedback. I\'m concerned about my JS code',NULL); 853 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (841,'Observer update problem in MVC',NULL); 854 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (842,'Using multiple assignment operators in one statement; bad idea?',NULL); 855 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (843,'[Question] How can I attach an object to a Select Option and transfer that data?',NULL); 856 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (844,'JavaScript Array Trees: Copy, Map, and Filter',NULL); 857 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (845,'Javascript geo redirect stopped working',NULL); 858 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (846,'Problem with Combining Multiple Numbers into an Array',NULL); 859 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (847,'Quick Start to ESLint',NULL); 860 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (848,'How to convert a nested array to an object',NULL); 861 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (849,'Help me please fix password bug :3',NULL); 862 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (850,'How to do feature detection for datalist appearance?',NULL); 863 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (851,'Beginner-why is this happening in my script ?',NULL); 864 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (852,'Managing types across front and backend',NULL); 865 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (853,'Using Javascript to pull text from carousel panel to use as nav link',NULL); 866 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (854,'Javascript Tutorial 2018 [#6] - Converting Datatypes in ES6 Javascript',NULL); 867 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (855,'Learning other frameworks at the same time as learning pure JS',NULL); 868 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (856,'Hi everyone, I’m trying to create an integrated google calendar but I’m not sure how to inserted the element from the google calendar properties correctly into my html code. I was wondering if anyone could help.',NULL); 869 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (857,'Would someone that has experience with Node.js and EJS and working with the Google Maps API take a look at my stack overflow question regarding a google map that will not render?',NULL); 870 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (858,'getting proper project relative paths',NULL); 871 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (859,'Executing the else statement in a for loop only once ?',NULL); 872 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (860,'How can I know the value of return of a function?',NULL); 873 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (861,'Creating Promise from Scratch - Help Needed',NULL); 874 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (862,'Need help with small function',NULL); 875 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (863,'The UX and interactivity from this catalog system is awesome: can we figure out how it\'s done, what tools do they use?',NULL); 876 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (864,'Making my project accessible',NULL); 877 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (865,'Finding projects to contribute to in Github for a beginner',NULL); 878 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (866,'When I make a copy of my constructor with new, it automatically starts, how do I stop this.',NULL); 879 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (867,'Question about when code gets executed',NULL); 880 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (868,'JavaScript Cost Calculator',NULL); 881 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (869,'Help me regain my interest/motivation?',NULL); 882 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (870,'JavaScript beginners',NULL); 883 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (871,'Any JavaScript book suggestions?',NULL); 884 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (872,'Decouple Business Logic using Async Generators',NULL); 885 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (873,'Offer to help you with JavaScript in Marrakesch',NULL); 886 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (874,'pause function for countdown function not pausing with if statement',NULL); 887 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (875,'Newbie to Javascript - Help making a button that draws text on a canvas?',NULL); 888 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (876,'Microservices with Docker, Flask, and React',NULL); 889 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (877,'Javascript for beginners in 2 minutes #4 - Objects (part 2)',NULL); 890 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (878,'best way to turn my JS webapp into a mobile app ?',NULL); 891 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (879,'FCC: Understanding filter() challenge',NULL); 892 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (880,'Converting json to csv (node.js csvtojson)',NULL); 893 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (881,'Developer learning styles & JavaScript — A chat with creator of Vue.js Evan You',NULL); 894 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (882,'Personal/Work Project, some suggestions for libraries would be great!',NULL); 895 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (883,'I am using a bootstrap for a Login popup - and including the script is breaking my original CSS which can\'t be overridden with !important;',NULL); 896 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (884,'Learn higher-order components in a beginner-friendly way',NULL); 897 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (885,'Small group to discuss learning JavaScript together',NULL); 898 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (886,'Need help on how to learn this language.',NULL); 899 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (887,'[Question] So I started learning javascript in codecademy and was wondering, how do I start making my programs? What do I download? (please remember when answering that I literally am about 3% through the online course, so I\'ll probably need an explanation of everything) Thank you so much!',NULL); 900 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (888,'Factorialize a number in JavaScript (interactive screencast)',NULL); 901 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (889,'My time countdown function keep repeating the current time to countdown.',NULL); 902 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (890,'What are good possibly small JS libraries/modules to read quality code?',NULL); 903 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (891,'Help with assigning a price range to a keyword',NULL); 904 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (892,'Javascript 2017 Rising Stars',NULL); 905 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (893,'API that simply returns flight departure and arrival times?',NULL); 906 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (894,'What are the best free Javascript courses on Coursera, Edx,etc',NULL); 907 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (895,'Need help, Javascript and Lists.',NULL); 908 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (896,'How to pass an integer along with a button click to my \"changePage\" function?',NULL); 909 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (897,'Load HTML file from different directory',NULL); 910 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (898,'For loop don\'t get everything when changing className',NULL); 911 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (899,'Frontend+ Weekly No.6: Webpack 4.0.0, Securing Your GraphQL API, Why Decentralization Matters',NULL); 912 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (900,'Is it possible to get these timers to keep counting?',NULL); 913 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (901,'Why is my text not appending an new li?',NULL); 914 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (902,'Reselecting a DOM element passed as an argument to function with jQuery',NULL); 915 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (903,'\"Improper\" use of new - problems with this?',NULL); 916 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (904,'Setting the source attribute of an image with JavaScript issue',NULL); 917 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (905,'Four months into Javascript and stuck on the basics. Logic problem.',NULL); 918 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (906,'Tools I wish I had known about when I started coding: Revisited',NULL); 919 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (907,'onscroll many times in the same page from different divs',NULL); 920 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (908,'Handling expiry dates for user subscription (Node, Express and MongoDB)',NULL); 921 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (909,'Learning: Pushing through or moving foward?',NULL); 922 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (910,'Frontend Developer Notes: Give life to After Effects Wiggle Path via D3.js and svg',NULL); 923 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (911,'jQuery UI draggable, trying to avoid objects from ever overlapping.',NULL); 924 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (912,'application/octet-stream and sending files',NULL); 925 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (913,'Methods with getters?',NULL); 926 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (914,'Adding an event listener to multiple elements? \"Uncaught TypeError: element.addEventListener is not a function\"',NULL); 927 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (915,'Length undefined. Parsing JSON.',NULL); 928 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (916,'struggling with basic javascript',NULL); 929 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (917,'How to check if a div contains an image ?',NULL); 930 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (918,'Ejs best practices at new company.',NULL); 931 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (919,'Understanding promise order.',NULL); 932 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (920,'Question on `Promise.finally()` API',NULL); 933 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (921,'Promises explained thoroughly with practical examples and easy to read language.',NULL); 934 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (922,'Looking for some advice and or insights on which path should I go about a project',NULL); 935 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (923,'Why is this coming back as undefined?',NULL); 936 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (924,'Is there a legally standard way of copyrighting my code?',NULL); 937 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (925,'openDatabase always creates a new database instead of reading the existing one',NULL); 938 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (926,'Microsoft JScript compilation error',NULL); 939 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (927,'Any Libraries that let you do symmetric non-secure but condense \"encryption\"?',NULL); 940 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (928,'JavaScript Top 10 Open Source Projects-v.Feb 2018',NULL); 941 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (929,'I am creating a web development guide for complete beginners using the Chrome console. I would love feedback from both beginners and experience developers.',NULL); 942 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (930,'Oldschool fire effect in 20 lines of code - easy tutorial',NULL); 943 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (931,'I still don\'t get this factorizing stuff... specific problem I am looking at',NULL); 944 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (932,'Learn Javascript By Creating A Basic Server & API',NULL); 945 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (933,'How can I remove the leading zero from a number like 0.530?',NULL); 946 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (934,'TypeScript - Function generic types as a call signature of an object literal type? Not understanding how this works.',NULL); 947 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (935,'In theory wouldn\'t clean asynchronous VanillaJS be advantageous compared to running code is a virtual Dom like React.',NULL); 948 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (936,'Having trouble with copying to clipboard action',NULL); 949 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (937,'CORS issue with Vuejs app + Nodejs API',NULL); 950 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (938,'Async Await Promise All Array Destructuring - Dale Jefferson',NULL); 951 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (939,'jest - how to \'properly\' write your describe/test functions?',NULL); 952 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (940,'Help: How can I create a GPA calc using javascript and html',NULL); 953 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (941,'Weird thing happening with local storage.',NULL); 954 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (942,'Help to understand Promise.resolve with promise as an argument.',NULL); 955 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (943,'Plenty of else if statements, is there a shorter way ?',NULL); 956 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (944,'Clarifying the Difference between the \'__proto__\' and \'prototype\' property of objects.',NULL); 957 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (945,'Callback function hangs in separate file Q promise chain',NULL); 958 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (946,'Getting started with Node.js debugging in VS Code',NULL); 959 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (947,'Learn JavaScript By Creating A Library For A Deck Of Cards',NULL); 960 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (948,'So, Colt Steele is teaching me jQuery',NULL); 961 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (949,'Tutorial on How to create a Login/Signup Form which can be switched on Tabs using Plain JavaScript.',NULL); 962 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (950,'Frontend Developer Love Conference Talks - NEW VIDEOS daily | Gerard Sans | Evan You | Sarah Drasner | Chopin Brothers | nuxt.js | vuejs | angular | react.js',NULL); 963 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (951,'Overcoming JavaScript blockade',NULL); 964 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (952,'What are some really neat things you can do with JS without using a backend?',NULL); 965 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (953,'Hiding Columns in a HTML table',NULL); 966 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (954,'Assistance and Feedback',NULL); 967 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (955,'3rd promise is getting called without waiting for 2nd promise to finish. (code inside)',NULL); 968 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (956,'I am searching for a short introduction into JavaScript',NULL); 969 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (957,'Tutorial for a CountDown Timer using Plain JavaScript. Hoping it might be helpful for you :)',NULL); 970 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (958,'Help with Oauth2 and webtokens',NULL); 971 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (959,'DB2 Query error in Node',NULL); 972 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (960,'How to inject API_KEY dynamically for Google Maps API?',NULL); 973 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (961,'Defining a varialbe based on a condition',NULL); 974 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (962,'How can I dynamically create React component from a string?',NULL); 975 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (963,'IHNIWID S1 • E6 - Data Restructuring and the Deep Cloning Dilemma',NULL); 976 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (964,'Moving the character across HTML 5 canvas, it works but not smooth at all.',NULL); 977 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (965,'Trying to reach into a .txt file, grab the date that\'s there and count down to it.',NULL); 978 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (966,'Tutorial on how to build Circular graphs and charts for website dashboards built with CSS and JS.',NULL); 979 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (967,'How to simulate and test Local storage and cookies stored? (Development stage)',NULL); 980 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (968,'Javascript for beginners in 2 minutes #3 - Objects (part 1)',NULL); 981 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (969,'Suggestions for intermediate javascript project',NULL); 982 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (970,'Hello Name project',NULL); 983 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (971,'Does The Entire JavaScript Language in a Single Image Show Anything Insightful Or Helpful?',NULL); 984 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (972,'First 100 sign ups get free access to paid training!',NULL); 985 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (973,'Trim spaces from multidimensional array',NULL); 986 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (974,'Is it possible to see the control flow of my scripts?',NULL); 987 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (975,'We post free, weekly JavaScript & web development tutorials on our Youtube channel. Please subscribe if you like.',NULL); 988 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (976,'Why am I learning javascript? Just so I can use frameworks like angular and react?',NULL); 989 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (977,'How to start with Angular?',NULL); 990 | INSERT INTO `importtest` (`id`,`doc`,`classid`) VALUES (978,'I am trying to create a simple coin toss simulation using canon.js + three.js. The coin always lands on the thin edge. What am I doing wrong?',NULL); 991 | 992 | 993 | 994 | CREATE TABLE IF NOT EXISTS `emptytable` ( 995 | `id` int(11) NOT NULL AUTO_INCREMENT, 996 | PRIMARY KEY (`id`) 997 | ) ENGINE=InnoDB AUTO_INCREMENT=1; 998 | -------------------------------------------------------------------------------- /test/sample_dump_files/test2.sql: -------------------------------------------------------------------------------- 1 | 2 | 3 | CREATE TABLE IF NOT EXISTS `test_table_2` ( 4 | `id` int(11) NOT NULL AUTO_INCREMENT, 5 | `somestr` VARCHAR(8) NOT NULL, 6 | PRIMARY KEY (`id`) 7 | ) ENGINE=InnoDB AUTO_INCREMENT=1; 8 | 9 | INSERT INTO `test_table_2` (`somestr`) VALUES ('a'); 10 | INSERT INTO `test_table_2` (`somestr`) VALUES ('b'); 11 | INSERT INTO `test_table_2` (`somestr`) VALUES ('c'); 12 | INSERT INTO `test_table_2` (`somestr`) VALUES ('d'); 13 | INSERT INTO `test_table_2` (`somestr`) VALUES ('e'); -------------------------------------------------------------------------------- /test/sample_dump_files/test3.sql: -------------------------------------------------------------------------------- 1 | 2 | CREATE TABLE IF NOT EXISTS `test_table_3` ( 3 | `id` int(11) NOT NULL AUTO_INCREMENT, 4 | `somestr` VARCHAR(8) NOT NULL, 5 | PRIMARY KEY (`id`) 6 | ) ENGINE=InnoDB AUTO_INCREMENT=1; 7 | 8 | INSERT INTO `test_table_3` (`somestr`) VALUES ('a'); 9 | INSERT INTO `test_table_3` (`somestr`) VALUES ('b'); 10 | INSERT INTO `test_table_3` (`somestr`) VALUES ('c'); 11 | INSERT INTO `test_table_3` (`somestr`) VALUES ('d'); 12 | INSERT INTO `test_table_3` (`somestr`) VALUES ('e'); -------------------------------------------------------------------------------- /test/sample_dump_files/test4.sql: -------------------------------------------------------------------------------- 1 | DELIMITER ;; 2 | CREATE FUNCTION `testfunc`() RETURNS VARCHAR(36) 3 | BEGIN 4 | RETURN UUID(); 5 | END ;; 6 | DELIMITER ; 7 | -------------------------------------------------------------------------------- /test/test-helpers.js: -------------------------------------------------------------------------------- 1 | const mysql = require('mysql2'); 2 | 3 | var con; 4 | var log_bin_trust_function_creators; 5 | 6 | /** 7 | * Handle Errors and kill the test script. 8 | * @param {Error} err 9 | * @returns {undefined} 10 | */ 11 | function errorHandler(err){ 12 | console.log("\n\nsomething went wrong: ", err.message); 13 | console.error(err); 14 | process.exit(1); 15 | } 16 | 17 | /** 18 | * Run a query 19 | * @param {type} sql 20 | * @returns {Promise} 21 | */ 22 | function query(sql){ 23 | return new Promise(done=>{ 24 | con.query(sql, (err, result)=>{ 25 | if(err) errorHandler(err); 26 | else done(result); 27 | }); 28 | }); 29 | } 30 | 31 | /** 32 | * Create a fresh MySQL connection 33 | * @param {config object} config 34 | * @returns {Connection} 35 | */ 36 | async function mysqlConnect(config){ 37 | con = mysql.createConnection({ 38 | host: config.host, 39 | user: config.user, 40 | password: config.password 41 | }); 42 | var res = await query("SHOW GLOBAL VARIABLES LIKE 'log_bin_trust_function_creators';"); 43 | log_bin_trust_function_creators = res[0].Value 44 | await query("SET GLOBAL log_bin_trust_function_creators = 1;"); 45 | } 46 | 47 | /** 48 | * Create a database to test with 49 | * @returns {undefined} 50 | */ 51 | async function createTestDB(db){ 52 | await query("DROP DATABASE IF EXISTS `"+db+"`;"); 53 | await query("CREATE DATABASE `"+db+"`;"); 54 | } 55 | 56 | /** 57 | * Destroy the testing DB 58 | * @returns {undefined} 59 | */ 60 | async function destroyTestDB(db){ 61 | await query("DROP DATABASE IF EXISTS `"+db+"`;"); 62 | } 63 | 64 | async function closeConnection(){ 65 | await query("SET GLOBAL log_bin_trust_function_creators = '"+log_bin_trust_function_creators+"';"); 66 | con.end(); 67 | } 68 | 69 | module.exports = { 70 | errorHandler, 71 | query, 72 | mysqlConnect, 73 | createTestDB, 74 | destroyTestDB, 75 | closeConnection 76 | }; -------------------------------------------------------------------------------- /test/test.js: -------------------------------------------------------------------------------- 1 | // SET THESE FOR LOCAL TESTING ONLY! 2 | // RESET THEM TO '' BEFORE COMMITING CHANGES! 3 | const mysql_host = '127.0.0.1'; 4 | const mysql_user = 'root'; 5 | const mysql_pass = 'bijoux22'; 6 | 7 | const expect = require('chai').expect; 8 | const {errorHandler,query,mysqlConnect,createTestDB,destroyTestDB,closeConnection} = require('./test-helpers.js'); 9 | 10 | var config = { 11 | host: mysql_host || '127.0.0.1', 12 | user: mysql_user || 'root', 13 | password: mysql_pass || '', 14 | database: 'mysql-import-test-db-1' 15 | }; 16 | 17 | var fs, MySQLImport, importer, start_time; 18 | 19 | describe('Running All Tests', ()=>{ 20 | 21 | before(async function(){ 22 | 23 | start_time = new Date(); 24 | 25 | await mysqlConnect(config); 26 | 27 | fs = require('fs'); 28 | MySQLImport = require('../mysql-import.js'); 29 | importer = new MySQLImport(config); 30 | 31 | // For coverage 32 | importer.onProgress('Not a function'); 33 | importer.onDumpCompleted('Not a function'); 34 | 35 | importer.onProgress(progress=>{ 36 | var percent = Math.floor(progress.bytes_processed / progress.total_bytes * 10000) / 100; 37 | var filename = progress.file_path.split("/").pop(); 38 | var message = `\tFile ${progress.file_no} of ${progress.total_files}: `+ 39 | `processing ${filename} - ${percent}% Complete`; 40 | if(process.stdout.isTTY){ 41 | process.stdout.clearLine(); 42 | process.stdout.cursorTo(0); 43 | process.stdout.write(message); 44 | }else{ 45 | console.log(message); 46 | } 47 | 48 | }); 49 | 50 | importer.onDumpCompleted(status=>{ 51 | var filename = status.file_path.split("/").pop(); 52 | var message; 53 | if(status.error){ 54 | message = `\tFile ${status.file_no} of ${status.total_files}: `+ 55 | `Was not processed.\n`; 56 | }else{ 57 | message = `\tFile ${status.file_no} of ${status.total_files}: `+ 58 | `Completed processing ${filename}\n`; 59 | } 60 | if(process.stdout.isTTY){ 61 | process.stdout.clearLine(); 62 | process.stdout.cursorTo(0); 63 | process.stdout.write(message); 64 | }else{ 65 | console.log(message); 66 | } 67 | }); 68 | 69 | importer.setEncoding('utf8'); 70 | 71 | await createTestDB('mysql-import-test-db-1'); 72 | await createTestDB('mysql-import-test-db-2'); 73 | query("USE `mysql-import-test-db-1`"); 74 | await importer.import(__dirname+'/sample_dump_files/test.sql'); 75 | }); 76 | 77 | after(async ()=>{ 78 | await destroyTestDB('mysql-import-test-db-1'); 79 | await destroyTestDB('mysql-import-test-db-2'); 80 | await closeConnection(); 81 | console.log(`All tests completed in ${(new Date() - start_time)/1000} seconds.`); 82 | }); 83 | 84 | it('Import two tables', async ()=>{ 85 | var tables = await query("SHOW TABLES;"); 86 | expect(tables.length).to.equal(2); 87 | }); 88 | 89 | it('978 Rows Imported Into Test DB', async ()=>{ 90 | var rows = await query("SELECT * FROM `importtest`;"); 91 | expect(rows.length).to.equal(978); 92 | }); 93 | 94 | it('5 Rows With Semicolons Imported Into Test DB', async ()=>{ 95 | var rows = await query('SELECT * FROM `importtest` WHERE `doc` LIKE "%;%";'); 96 | expect(rows.length).to.equal(5); 97 | }); 98 | 99 | it('Reuse Importer', async ()=>{ 100 | await importer.import(__dirname+'/sample_dump_files/test2.sql'); 101 | var tables = await query("SHOW TABLES;"); 102 | expect(tables.length).to.equal(3); 103 | }); 104 | 105 | it('5 Rows Inserted in 2nd Table', async ()=>{ 106 | var rows = await query("SELECT * FROM `test_table_2`;"); 107 | expect(rows.length).to.equal(5); 108 | }); 109 | 110 | it('Import Array, Directory', async ()=>{ 111 | await importer.import( 112 | __dirname+'/sample_dump_files/test3.sql', 113 | __dirname+'/sample_dump_files/more_sample_files/' 114 | ); 115 | var tables = await query("SHOW TABLES;"); 116 | expect(tables.length).to.equal(6); 117 | }); 118 | 119 | it('Change database', async ()=>{ 120 | query("USE `mysql-import-test-db-2`;"); 121 | importer.use('mysql-import-test-db-2'); 122 | await importer.import(__dirname+'/sample_dump_files/'); 123 | var tables = await query("SHOW TABLES;"); 124 | expect(tables.length).to.equal(6); 125 | }); 126 | 127 | it('Test imported', async ()=>{ 128 | var files = importer.getImported(); 129 | expect(files.length).to.equal(11); 130 | }); 131 | 132 | it('Test imported function', async ()=>{ 133 | var funcs = await query("SHOW FUNCTION STATUS LIKE 'testfunc';"); 134 | expect(funcs.length).to.equal(1); 135 | }); 136 | 137 | it('Test unsupported encoding', ()=>{ 138 | var error; 139 | try{ 140 | importer.setEncoding("#we&%"); 141 | }catch(e){ 142 | error = e; 143 | } 144 | expect(typeof error).to.equal("object"); 145 | }); 146 | 147 | it('Test manually connecting', async ()=>{ 148 | var host = config.host; 149 | var error = null; 150 | try{ 151 | importer._connection_settings.host = "#$%^"; 152 | await importer._connect(); 153 | }catch(e){ 154 | error = e; 155 | importer._connection_settings.host = host; 156 | } 157 | expect(typeof error).to.equal("object"); 158 | }); 159 | 160 | it('Test live DB change', async ()=>{ 161 | await importer._connect(); 162 | await importer._connect(); // a second time time, intentionally 163 | await importer.use('mysql-import-test-db-1'); // should work with no problems 164 | var error; 165 | try{ 166 | await importer.use('mysql-import-test-#$%'); 167 | }catch(e){ 168 | error = e; 169 | } 170 | try{ await importer.disconnect(true); }catch(e){} 171 | expect(typeof error).to.equal("object"); 172 | }); 173 | 174 | it('Single file error handling', async ()=>{ 175 | var error; 176 | try{ 177 | await importer.importSingleFile("@#$"); 178 | }catch(e){ 179 | error = e; 180 | } 181 | expect(typeof error).to.equal("object"); 182 | }); 183 | 184 | it('Test fake sql file.', async ()=>{ 185 | var fake_sql_file = __dirname+"/sample_dump_files/more_sample_files/not_sql.txt"; 186 | var error; 187 | try{ 188 | await importer.importSingleFile(fake_sql_file); 189 | }catch(e){ 190 | error = e; 191 | } 192 | expect(typeof error).to.equal("object"); 193 | }); 194 | 195 | it('Test importing broken file.', async ()=>{ 196 | var fake_sql_file = __dirname+"/broken_dump_files/dump.sql"; 197 | var fake_sql_file2 = __dirname+"/broken_dump_files/dump_1.sql"; 198 | var error; 199 | try{ 200 | await importer.import(fake_sql_file, fake_sql_file2); 201 | }catch(e){ 202 | error = e; 203 | } 204 | expect(typeof error).to.equal("object"); 205 | }); 206 | 207 | it('Test diconnect function.', async ()=>{ 208 | try{ 209 | importer._conn = false; 210 | await importer.disconnect(); 211 | await importer._connect(); 212 | await importer.disconnect(false); 213 | }catch(e){} 214 | }); 215 | 216 | it('Test fileExist method.', async ()=>{ 217 | var error; 218 | try{ 219 | await importer._fileExists('!@#$'); 220 | }catch(e){ 221 | error = e; 222 | } 223 | expect(typeof error).to.equal("object"); 224 | }); 225 | 226 | it('Test statFile method.', async ()=>{ 227 | var error; 228 | try{ 229 | await importer._statFile('!@#$'); 230 | }catch(e){ 231 | error = e; 232 | } 233 | expect(typeof error).to.equal("object"); 234 | }); 235 | 236 | it('Test readDir method.', async ()=>{ 237 | var error; 238 | try{ 239 | await importer._readDir('!@#$'); 240 | }catch(e){ 241 | error = e; 242 | } 243 | expect(typeof error).to.equal("object"); 244 | }); 245 | 246 | it('Testing path parser.', async ()=>{ 247 | var error; 248 | try{ 249 | await importer._getSQLFilePaths('!@#$', '$%^#^', __dirname+"/broken_dump_files"); 250 | }catch(e){ 251 | error = e; 252 | } 253 | expect(typeof error).to.equal("object"); 254 | }); 255 | 256 | }); 257 | 258 | --------------------------------------------------------------------------------