commit 1cbb36adbb7b3c95028a1fa0f53d72f5a8ab811a Author: 程序员小墨 <2291200076@qq.com> Date: Sat Sep 24 20:55:17 2022 +0800 init diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b512c09 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +node_modules \ No newline at end of file diff --git a/index.js b/index.js new file mode 100644 index 0000000..5c6fb29 --- /dev/null +++ b/index.js @@ -0,0 +1,124 @@ +// const { createServer } = require('http') +const closeWithGrace = require('close-with-grace') +const dbPool = require('./src/db_pool') +const apiResult = require('./src/api_result') +const fs = require('fs'); + +const sqlFile = 'sql/sqls.sql'; + +console.log('Starting ...'); + +// const server = createServer(function (req, res) { +// if (closeWithGrace.closing) { +// res.statusCode = 503 +// res.setHeader('Connection', 'close') +// res.end('try again later') +// return +// } +// res.end('hello world') +// }) +// server.listen(3000) + +async function doQuery() { + try { + // from: https://love.163.com/webapp/special/answerbook/#/ask + let result = await apiResult.query({ + method: 'POST', + url: "https://love.163.com/open/api/activity/answerBook/generateResult", + timeout: 3000, + headers: { + "content-type": "application/x-www-form-urlencoded", + "user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36 Edg/105.0.1343.42", + "origin": "https://love.163.com", + "referer": "https://love.163.com/webapp/special/answerbook/", + }, + form: { + "resultPicUrl": "https://lovepicture.nosdn.127.net/-6910837894781852896?imageView" + } + }) + let resultJSON = JSON.parse(result); + // console.log(resultJSON); + let data = resultJSON.data.activityVo; + if (!!data.resultDetial) { + let sql = `INSERT INTO answer (wy_id, text) VALUES (${data.resultCode}, '${data.resultDetial}');`; + // console.log(data.resultCode, data.resultDetial, sql); + console.log(data.resultCode, data.resultDetial); + await dbPool.query(sql); + // appendFile(sql); + } + } catch (e) { + console.error(`[error] code: ${e.code}, message: ${e.message}`); + } +} + +async function sleep(ms) { + await new Promise(function (resolve, reject) { + setTimeout(resolve, ms); + }); +} + +let isExit = false; +async function main() { + for (let i = 0; i < 1000000; i++) { + if (isExit) return; + await doQuery(); + await sleep(2500); + } + dbPool.close(); +} +// main(); + +function appendFile(string) { + fs.appendFile('sqls.sql', `${string}\n`, (err) => { + if (err) { + console.log('出错') + } else { + console.log('追加内容') + } + }) +} + +// 答案转sql +function convertAnswerTxtToSql() { + let lines = fs.readFileSync('answer.txt', 'utf8').split(/[\n\r]/); + lines = Array.from(new Set(lines)).filter(s => !!s).map(s => { + return `INSERT INTO answer (wy_id, text) VALUES (NULL, '${s.replace('。', '')}');`; + }).sort(); + fs.writeFileSync('answer.sql', lines.join('\n')); +} +// convertAnswerTxtToSql(); + +// 去重 +function quchong() { + let lines = fs.readFileSync(sqlFile, 'utf8').split(/[\n\r]/); + lines = Array.from(new Set(lines)).filter(s => !!s).sort(); + fs.writeFileSync(sqlFile, lines.join('\n')); +} +// 执行SQL +async function readSQLAndExecute() { + let lines = fs.readFileSync(sqlFile, 'utf8').split(/[\n\r]/); + let count = 0; + let errCount = 0; + for (let i = 0; i < lines.length; i++) { + const sql = lines[i].trim(); + try { + await dbPool.query(sql); + } catch (err) { + errCount++; + // console.error(err); + } + console.log(`count: ${++count}, errCount: ${errCount}, total: ${lines.length}`); + await sleep(1); + } + console.log("done"); +} +quchong(); +readSQLAndExecute(); + +closeWithGrace({ delay: 1000 }, function (opts, cb) { + console.log(opts, 'closing') + isExit = true; + // server.close(cb) + dbPool.close(); +}) + diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..4882bb4 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,928 @@ +{ + "name": "answerbook", + "version": "1.0.0", + "lockfileVersion": 2, + "requires": true, + "packages": { + "": { + "name": "answerbook", + "version": "1.0.0", + "license": "ISC", + "dependencies": { + "close-with-grace": "^1.1.0", + "fs": "^0.0.1-security", + "mysql": "^2.18.1", + "request": "^2.88.2" + } + }, + "node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmmirror.com/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, + "node_modules/asn1": { + "version": "0.2.6", + "resolved": "https://registry.npmmirror.com/asn1/-/asn1-0.2.6.tgz", + "integrity": "sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ==", + "dependencies": { + "safer-buffer": "~2.1.0" + } + }, + "node_modules/assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmmirror.com/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw==", + "engines": { + "node": ">=0.8" + } + }, + "node_modules/asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmmirror.com/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" + }, + "node_modules/aws-sign2": { + "version": "0.7.0", + "resolved": "https://registry.npmmirror.com/aws-sign2/-/aws-sign2-0.7.0.tgz", + "integrity": "sha512-08kcGqnYf/YmjoRhfxyu+CLxBjUtHLXLXX/vUfx9l2LYzG3c1m61nrpyFUZI6zeS+Li/wWMMidD9KgrqtGq3mA==", + "engines": { + "node": "*" + } + }, + "node_modules/aws4": { + "version": "1.11.0", + "resolved": "https://registry.npmmirror.com/aws4/-/aws4-1.11.0.tgz", + "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==" + }, + "node_modules/bcrypt-pbkdf": { + "version": "1.0.2", + "resolved": "https://registry.npmmirror.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", + "integrity": "sha512-qeFIXtP4MSoi6NLqO12WfqARWWuCKi2Rn/9hJLEmtB5yTNr9DqFWkJRCf2qShWzPeAMRnOgCrq0sg/KLv5ES9w==", + "dependencies": { + "tweetnacl": "^0.14.3" + } + }, + "node_modules/bignumber.js": { + "version": "9.0.0", + "resolved": "https://registry.npmmirror.com/bignumber.js/-/bignumber.js-9.0.0.tgz", + "integrity": "sha512-t/OYhhJ2SD+YGBQcjY8GzzDHEk9f3nerxjtfa6tlMXfe7frs/WozhvCNoGvpM0P3bNf3Gq5ZRMlGr5f3r4/N8A==", + "engines": { + "node": "*" + } + }, + "node_modules/caseless": { + "version": "0.12.0", + "resolved": "https://registry.npmmirror.com/caseless/-/caseless-0.12.0.tgz", + "integrity": "sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==" + }, + "node_modules/close-with-grace": { + "version": "1.1.0", + "resolved": "https://registry.npmmirror.com/close-with-grace/-/close-with-grace-1.1.0.tgz", + "integrity": "sha512-6cCp71Y5tKw1o9sGVBOa9OwY4vJ+YoLpFcWiTt9YCBhYlcQi0z68EiiN9mJ6/401Za6TZ5YOZg012IHHZt15lw==" + }, + "node_modules/combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmmirror.com/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "dependencies": { + "delayed-stream": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/core-util-is": { + "version": "1.0.3", + "resolved": "https://registry.npmmirror.com/core-util-is/-/core-util-is-1.0.3.tgz", + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==" + }, + "node_modules/dashdash": { + "version": "1.14.1", + "resolved": "https://registry.npmmirror.com/dashdash/-/dashdash-1.14.1.tgz", + "integrity": "sha512-jRFi8UDGo6j+odZiEpjazZaWqEal3w/basFjQHQEwVtZJGDpxbH1MeYluwCS8Xq5wmLJooDlMgvVarmWfGM44g==", + "dependencies": { + "assert-plus": "^1.0.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmmirror.com/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/ecc-jsbn": { + "version": "0.1.2", + "resolved": "https://registry.npmmirror.com/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", + "integrity": "sha512-eh9O+hwRHNbG4BLTjEl3nw044CkGm5X6LoaCf7LPp7UU8Qrt47JYNi6nPX8xjW97TKGKm1ouctg0QSpZe9qrnw==", + "dependencies": { + "jsbn": "~0.1.0", + "safer-buffer": "^2.1.0" + } + }, + "node_modules/extend": { + "version": "3.0.2", + "resolved": "https://registry.npmmirror.com/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" + }, + "node_modules/extsprintf": { + "version": "1.3.0", + "resolved": "https://registry.npmmirror.com/extsprintf/-/extsprintf-1.3.0.tgz", + "integrity": "sha512-11Ndz7Nv+mvAC1j0ktTa7fAb0vLyGGX+rMHNBYQviQDGU0Hw7lhctJANqbPhu9nV9/izT/IntTgZ7Im/9LJs9g==", + "engines": [ + "node >=0.6.0" + ] + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmmirror.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" + }, + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmmirror.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==" + }, + "node_modules/forever-agent": { + "version": "0.6.1", + "resolved": "https://registry.npmmirror.com/forever-agent/-/forever-agent-0.6.1.tgz", + "integrity": "sha512-j0KLYPhm6zeac4lz3oJ3o65qvgQCcPubiyotZrXqEaG4hNagNYO8qdlUrX5vwqv9ohqeT/Z3j6+yW067yWWdUw==", + "engines": { + "node": "*" + } + }, + "node_modules/form-data": { + "version": "2.3.3", + "resolved": "https://registry.npmmirror.com/form-data/-/form-data-2.3.3.tgz", + "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 0.12" + } + }, + "node_modules/fs": { + "version": "0.0.1-security", + "resolved": "https://registry.npmmirror.com/fs/-/fs-0.0.1-security.tgz", + "integrity": "sha512-3XY9e1pP0CVEUCdj5BmfIZxRBTSDycnbqhIOGec9QYtmVH2fbLpj86CFWkrNOkt/Fvty4KZG5lTglL9j/gJ87w==" + }, + "node_modules/getpass": { + "version": "0.1.7", + "resolved": "https://registry.npmmirror.com/getpass/-/getpass-0.1.7.tgz", + "integrity": "sha512-0fzj9JxOLfJ+XGLhR8ze3unN0KZCgZwiSSDz168VERjK8Wl8kVSdcu2kspd4s4wtAa1y/qrVRiAA0WclVsu0ng==", + "dependencies": { + "assert-plus": "^1.0.0" + } + }, + "node_modules/har-schema": { + "version": "2.0.0", + "resolved": "https://registry.npmmirror.com/har-schema/-/har-schema-2.0.0.tgz", + "integrity": "sha512-Oqluz6zhGX8cyRaTQlFMPw80bSJVG2x/cFb8ZPhUILGgHka9SsokCCOQgpveePerqidZOrT14ipqfJb7ILcW5Q==", + "engines": { + "node": ">=4" + } + }, + "node_modules/har-validator": { + "version": "5.1.5", + "resolved": "https://registry.npmmirror.com/har-validator/-/har-validator-5.1.5.tgz", + "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==", + "deprecated": "this library is no longer supported", + "dependencies": { + "ajv": "^6.12.3", + "har-schema": "^2.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/http-signature": { + "version": "1.2.0", + "resolved": "https://registry.npmmirror.com/http-signature/-/http-signature-1.2.0.tgz", + "integrity": "sha512-CAbnr6Rz4CYQkLYUtSNXxQPUH2gK8f3iWexVlsnMeD+GjlsQ0Xsy1cOX+mN3dtxYomRy21CiOzU8Uhw6OwncEQ==", + "dependencies": { + "assert-plus": "^1.0.0", + "jsprim": "^1.2.2", + "sshpk": "^1.7.0" + }, + "engines": { + "node": ">=0.8", + "npm": ">=1.3.7" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmmirror.com/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "node_modules/is-typedarray": { + "version": "1.0.0", + "resolved": "https://registry.npmmirror.com/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==" + }, + "node_modules/isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmmirror.com/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==" + }, + "node_modules/isstream": { + "version": "0.1.2", + "resolved": "https://registry.npmmirror.com/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g==" + }, + "node_modules/jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmmirror.com/jsbn/-/jsbn-0.1.1.tgz", + "integrity": "sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg==" + }, + "node_modules/json-schema": { + "version": "0.4.0", + "resolved": "https://registry.npmmirror.com/json-schema/-/json-schema-0.4.0.tgz", + "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==" + }, + "node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmmirror.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" + }, + "node_modules/json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmmirror.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==" + }, + "node_modules/jsprim": { + "version": "1.4.2", + "resolved": "https://registry.npmmirror.com/jsprim/-/jsprim-1.4.2.tgz", + "integrity": "sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw==", + "dependencies": { + "assert-plus": "1.0.0", + "extsprintf": "1.3.0", + "json-schema": "0.4.0", + "verror": "1.10.0" + }, + "engines": { + "node": ">=0.6.0" + } + }, + "node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmmirror.com/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmmirror.com/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mysql": { + "version": "2.18.1", + "resolved": "https://registry.npmmirror.com/mysql/-/mysql-2.18.1.tgz", + "integrity": "sha512-Bca+gk2YWmqp2Uf6k5NFEurwY/0td0cpebAucFpY/3jhrwrVGuxU2uQFCHjU19SJfje0yQvi+rVWdq78hR5lig==", + "dependencies": { + "bignumber.js": "9.0.0", + "readable-stream": "2.3.7", + "safe-buffer": "5.1.2", + "sqlstring": "2.3.1" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/oauth-sign": { + "version": "0.9.0", + "resolved": "https://registry.npmmirror.com/oauth-sign/-/oauth-sign-0.9.0.tgz", + "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==", + "engines": { + "node": "*" + } + }, + "node_modules/performance-now": { + "version": "2.1.0", + "resolved": "https://registry.npmmirror.com/performance-now/-/performance-now-2.1.0.tgz", + "integrity": "sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow==" + }, + "node_modules/process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmmirror.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" + }, + "node_modules/psl": { + "version": "1.9.0", + "resolved": "https://registry.npmmirror.com/psl/-/psl-1.9.0.tgz", + "integrity": "sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==" + }, + "node_modules/punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmmirror.com/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "engines": { + "node": ">=6" + } + }, + "node_modules/qs": { + "version": "6.5.3", + "resolved": "https://registry.npmmirror.com/qs/-/qs-6.5.3.tgz", + "integrity": "sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==", + "engines": { + "node": ">=0.6" + } + }, + "node_modules/readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmmirror.com/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "node_modules/request": { + "version": "2.88.2", + "resolved": "https://registry.npmmirror.com/request/-/request-2.88.2.tgz", + "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==", + "deprecated": "request has been deprecated, see https://github.com/request/request/issues/3142", + "dependencies": { + "aws-sign2": "~0.7.0", + "aws4": "^1.8.0", + "caseless": "~0.12.0", + "combined-stream": "~1.0.6", + "extend": "~3.0.2", + "forever-agent": "~0.6.1", + "form-data": "~2.3.2", + "har-validator": "~5.1.3", + "http-signature": "~1.2.0", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "~2.1.19", + "oauth-sign": "~0.9.0", + "performance-now": "^2.1.0", + "qs": "~6.5.2", + "safe-buffer": "^5.1.2", + "tough-cookie": "~2.5.0", + "tunnel-agent": "^0.6.0", + "uuid": "^3.3.2" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmmirror.com/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmmirror.com/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + }, + "node_modules/sqlstring": { + "version": "2.3.1", + "resolved": "https://registry.npmmirror.com/sqlstring/-/sqlstring-2.3.1.tgz", + "integrity": "sha512-ooAzh/7dxIG5+uDik1z/Rd1vli0+38izZhGzSa34FwR7IbelPWCCKSNIl8jlL/F7ERvy8CB2jNeM1E9i9mXMAQ==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/sshpk": { + "version": "1.17.0", + "resolved": "https://registry.npmmirror.com/sshpk/-/sshpk-1.17.0.tgz", + "integrity": "sha512-/9HIEs1ZXGhSPE8X6Ccm7Nam1z8KcoCqPdI7ecm1N33EzAetWahvQWVqLZtaZQ+IDKX4IyA2o0gBzqIMkAagHQ==", + "dependencies": { + "asn1": "~0.2.3", + "assert-plus": "^1.0.0", + "bcrypt-pbkdf": "^1.0.0", + "dashdash": "^1.12.0", + "ecc-jsbn": "~0.1.1", + "getpass": "^0.1.1", + "jsbn": "~0.1.0", + "safer-buffer": "^2.0.2", + "tweetnacl": "~0.14.0" + }, + "bin": { + "sshpk-conv": "bin/sshpk-conv", + "sshpk-sign": "bin/sshpk-sign", + "sshpk-verify": "bin/sshpk-verify" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmmirror.com/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dependencies": { + "safe-buffer": "~5.1.0" + } + }, + "node_modules/tough-cookie": { + "version": "2.5.0", + "resolved": "https://registry.npmmirror.com/tough-cookie/-/tough-cookie-2.5.0.tgz", + "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", + "dependencies": { + "psl": "^1.1.28", + "punycode": "^2.1.1" + }, + "engines": { + "node": ">=0.8" + } + }, + "node_modules/tunnel-agent": { + "version": "0.6.0", + "resolved": "https://registry.npmmirror.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==", + "dependencies": { + "safe-buffer": "^5.0.1" + }, + "engines": { + "node": "*" + } + }, + "node_modules/tweetnacl": { + "version": "0.14.5", + "resolved": "https://registry.npmmirror.com/tweetnacl/-/tweetnacl-0.14.5.tgz", + "integrity": "sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA==" + }, + "node_modules/uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmmirror.com/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dependencies": { + "punycode": "^2.1.0" + } + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmmirror.com/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" + }, + "node_modules/uuid": { + "version": "3.4.0", + "resolved": "https://registry.npmmirror.com/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", + "deprecated": "Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.", + "bin": { + "uuid": "bin/uuid" + } + }, + "node_modules/verror": { + "version": "1.10.0", + "resolved": "https://registry.npmmirror.com/verror/-/verror-1.10.0.tgz", + "integrity": "sha512-ZZKSmDAEFOijERBLkmYfJ+vmk3w+7hOLYDNkRCuRuMJGEmqYNCNLyBBFwWKVMhfwaEF3WOd0Zlw86U/WC/+nYw==", + "engines": [ + "node >=0.6.0" + ], + "dependencies": { + "assert-plus": "^1.0.0", + "core-util-is": "1.0.2", + "extsprintf": "^1.2.0" + } + }, + "node_modules/verror/node_modules/core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmmirror.com/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ==" + } + }, + "dependencies": { + "ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmmirror.com/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "requires": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, + "asn1": { + "version": "0.2.6", + "resolved": "https://registry.npmmirror.com/asn1/-/asn1-0.2.6.tgz", + "integrity": "sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ==", + "requires": { + "safer-buffer": "~2.1.0" + } + }, + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmmirror.com/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw==" + }, + "asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmmirror.com/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" + }, + "aws-sign2": { + "version": "0.7.0", + "resolved": "https://registry.npmmirror.com/aws-sign2/-/aws-sign2-0.7.0.tgz", + "integrity": "sha512-08kcGqnYf/YmjoRhfxyu+CLxBjUtHLXLXX/vUfx9l2LYzG3c1m61nrpyFUZI6zeS+Li/wWMMidD9KgrqtGq3mA==" + }, + "aws4": { + "version": "1.11.0", + "resolved": "https://registry.npmmirror.com/aws4/-/aws4-1.11.0.tgz", + "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==" + }, + "bcrypt-pbkdf": { + "version": "1.0.2", + "resolved": "https://registry.npmmirror.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", + "integrity": "sha512-qeFIXtP4MSoi6NLqO12WfqARWWuCKi2Rn/9hJLEmtB5yTNr9DqFWkJRCf2qShWzPeAMRnOgCrq0sg/KLv5ES9w==", + "requires": { + "tweetnacl": "^0.14.3" + } + }, + "bignumber.js": { + "version": "9.0.0", + "resolved": "https://registry.npmmirror.com/bignumber.js/-/bignumber.js-9.0.0.tgz", + "integrity": "sha512-t/OYhhJ2SD+YGBQcjY8GzzDHEk9f3nerxjtfa6tlMXfe7frs/WozhvCNoGvpM0P3bNf3Gq5ZRMlGr5f3r4/N8A==" + }, + "caseless": { + "version": "0.12.0", + "resolved": "https://registry.npmmirror.com/caseless/-/caseless-0.12.0.tgz", + "integrity": "sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==" + }, + "close-with-grace": { + "version": "1.1.0", + "resolved": "https://registry.npmmirror.com/close-with-grace/-/close-with-grace-1.1.0.tgz", + "integrity": "sha512-6cCp71Y5tKw1o9sGVBOa9OwY4vJ+YoLpFcWiTt9YCBhYlcQi0z68EiiN9mJ6/401Za6TZ5YOZg012IHHZt15lw==" + }, + "combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmmirror.com/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "requires": { + "delayed-stream": "~1.0.0" + } + }, + "core-util-is": { + "version": "1.0.3", + "resolved": "https://registry.npmmirror.com/core-util-is/-/core-util-is-1.0.3.tgz", + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==" + }, + "dashdash": { + "version": "1.14.1", + "resolved": "https://registry.npmmirror.com/dashdash/-/dashdash-1.14.1.tgz", + "integrity": "sha512-jRFi8UDGo6j+odZiEpjazZaWqEal3w/basFjQHQEwVtZJGDpxbH1MeYluwCS8Xq5wmLJooDlMgvVarmWfGM44g==", + "requires": { + "assert-plus": "^1.0.0" + } + }, + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmmirror.com/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==" + }, + "ecc-jsbn": { + "version": "0.1.2", + "resolved": "https://registry.npmmirror.com/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", + "integrity": "sha512-eh9O+hwRHNbG4BLTjEl3nw044CkGm5X6LoaCf7LPp7UU8Qrt47JYNi6nPX8xjW97TKGKm1ouctg0QSpZe9qrnw==", + "requires": { + "jsbn": "~0.1.0", + "safer-buffer": "^2.1.0" + } + }, + "extend": { + "version": "3.0.2", + "resolved": "https://registry.npmmirror.com/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" + }, + "extsprintf": { + "version": "1.3.0", + "resolved": "https://registry.npmmirror.com/extsprintf/-/extsprintf-1.3.0.tgz", + "integrity": "sha512-11Ndz7Nv+mvAC1j0ktTa7fAb0vLyGGX+rMHNBYQviQDGU0Hw7lhctJANqbPhu9nV9/izT/IntTgZ7Im/9LJs9g==" + }, + "fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmmirror.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" + }, + "fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmmirror.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==" + }, + "forever-agent": { + "version": "0.6.1", + "resolved": "https://registry.npmmirror.com/forever-agent/-/forever-agent-0.6.1.tgz", + "integrity": "sha512-j0KLYPhm6zeac4lz3oJ3o65qvgQCcPubiyotZrXqEaG4hNagNYO8qdlUrX5vwqv9ohqeT/Z3j6+yW067yWWdUw==" + }, + "form-data": { + "version": "2.3.3", + "resolved": "https://registry.npmmirror.com/form-data/-/form-data-2.3.3.tgz", + "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" + } + }, + "fs": { + "version": "0.0.1-security", + "resolved": "https://registry.npmmirror.com/fs/-/fs-0.0.1-security.tgz", + "integrity": "sha512-3XY9e1pP0CVEUCdj5BmfIZxRBTSDycnbqhIOGec9QYtmVH2fbLpj86CFWkrNOkt/Fvty4KZG5lTglL9j/gJ87w==" + }, + "getpass": { + "version": "0.1.7", + "resolved": "https://registry.npmmirror.com/getpass/-/getpass-0.1.7.tgz", + "integrity": "sha512-0fzj9JxOLfJ+XGLhR8ze3unN0KZCgZwiSSDz168VERjK8Wl8kVSdcu2kspd4s4wtAa1y/qrVRiAA0WclVsu0ng==", + "requires": { + "assert-plus": "^1.0.0" + } + }, + "har-schema": { + "version": "2.0.0", + "resolved": "https://registry.npmmirror.com/har-schema/-/har-schema-2.0.0.tgz", + "integrity": "sha512-Oqluz6zhGX8cyRaTQlFMPw80bSJVG2x/cFb8ZPhUILGgHka9SsokCCOQgpveePerqidZOrT14ipqfJb7ILcW5Q==" + }, + "har-validator": { + "version": "5.1.5", + "resolved": "https://registry.npmmirror.com/har-validator/-/har-validator-5.1.5.tgz", + "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==", + "requires": { + "ajv": "^6.12.3", + "har-schema": "^2.0.0" + } + }, + "http-signature": { + "version": "1.2.0", + "resolved": "https://registry.npmmirror.com/http-signature/-/http-signature-1.2.0.tgz", + "integrity": "sha512-CAbnr6Rz4CYQkLYUtSNXxQPUH2gK8f3iWexVlsnMeD+GjlsQ0Xsy1cOX+mN3dtxYomRy21CiOzU8Uhw6OwncEQ==", + "requires": { + "assert-plus": "^1.0.0", + "jsprim": "^1.2.2", + "sshpk": "^1.7.0" + } + }, + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmmirror.com/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "is-typedarray": { + "version": "1.0.0", + "resolved": "https://registry.npmmirror.com/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==" + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmmirror.com/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==" + }, + "isstream": { + "version": "0.1.2", + "resolved": "https://registry.npmmirror.com/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g==" + }, + "jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmmirror.com/jsbn/-/jsbn-0.1.1.tgz", + "integrity": "sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg==" + }, + "json-schema": { + "version": "0.4.0", + "resolved": "https://registry.npmmirror.com/json-schema/-/json-schema-0.4.0.tgz", + "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==" + }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmmirror.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" + }, + "json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmmirror.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==" + }, + "jsprim": { + "version": "1.4.2", + "resolved": "https://registry.npmmirror.com/jsprim/-/jsprim-1.4.2.tgz", + "integrity": "sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw==", + "requires": { + "assert-plus": "1.0.0", + "extsprintf": "1.3.0", + "json-schema": "0.4.0", + "verror": "1.10.0" + } + }, + "mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmmirror.com/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==" + }, + "mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmmirror.com/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "requires": { + "mime-db": "1.52.0" + } + }, + "mysql": { + "version": "2.18.1", + "resolved": "https://registry.npmmirror.com/mysql/-/mysql-2.18.1.tgz", + "integrity": "sha512-Bca+gk2YWmqp2Uf6k5NFEurwY/0td0cpebAucFpY/3jhrwrVGuxU2uQFCHjU19SJfje0yQvi+rVWdq78hR5lig==", + "requires": { + "bignumber.js": "9.0.0", + "readable-stream": "2.3.7", + "safe-buffer": "5.1.2", + "sqlstring": "2.3.1" + } + }, + "oauth-sign": { + "version": "0.9.0", + "resolved": "https://registry.npmmirror.com/oauth-sign/-/oauth-sign-0.9.0.tgz", + "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==" + }, + "performance-now": { + "version": "2.1.0", + "resolved": "https://registry.npmmirror.com/performance-now/-/performance-now-2.1.0.tgz", + "integrity": "sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow==" + }, + "process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmmirror.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" + }, + "psl": { + "version": "1.9.0", + "resolved": "https://registry.npmmirror.com/psl/-/psl-1.9.0.tgz", + "integrity": "sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==" + }, + "punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmmirror.com/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" + }, + "qs": { + "version": "6.5.3", + "resolved": "https://registry.npmmirror.com/qs/-/qs-6.5.3.tgz", + "integrity": "sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==" + }, + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmmirror.com/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "request": { + "version": "2.88.2", + "resolved": "https://registry.npmmirror.com/request/-/request-2.88.2.tgz", + "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==", + "requires": { + "aws-sign2": "~0.7.0", + "aws4": "^1.8.0", + "caseless": "~0.12.0", + "combined-stream": "~1.0.6", + "extend": "~3.0.2", + "forever-agent": "~0.6.1", + "form-data": "~2.3.2", + "har-validator": "~5.1.3", + "http-signature": "~1.2.0", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "~2.1.19", + "oauth-sign": "~0.9.0", + "performance-now": "^2.1.0", + "qs": "~6.5.2", + "safe-buffer": "^5.1.2", + "tough-cookie": "~2.5.0", + "tunnel-agent": "^0.6.0", + "uuid": "^3.3.2" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmmirror.com/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + }, + "safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmmirror.com/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + }, + "sqlstring": { + "version": "2.3.1", + "resolved": "https://registry.npmmirror.com/sqlstring/-/sqlstring-2.3.1.tgz", + "integrity": "sha512-ooAzh/7dxIG5+uDik1z/Rd1vli0+38izZhGzSa34FwR7IbelPWCCKSNIl8jlL/F7ERvy8CB2jNeM1E9i9mXMAQ==" + }, + "sshpk": { + "version": "1.17.0", + "resolved": "https://registry.npmmirror.com/sshpk/-/sshpk-1.17.0.tgz", + "integrity": "sha512-/9HIEs1ZXGhSPE8X6Ccm7Nam1z8KcoCqPdI7ecm1N33EzAetWahvQWVqLZtaZQ+IDKX4IyA2o0gBzqIMkAagHQ==", + "requires": { + "asn1": "~0.2.3", + "assert-plus": "^1.0.0", + "bcrypt-pbkdf": "^1.0.0", + "dashdash": "^1.12.0", + "ecc-jsbn": "~0.1.1", + "getpass": "^0.1.1", + "jsbn": "~0.1.0", + "safer-buffer": "^2.0.2", + "tweetnacl": "~0.14.0" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmmirror.com/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "requires": { + "safe-buffer": "~5.1.0" + } + }, + "tough-cookie": { + "version": "2.5.0", + "resolved": "https://registry.npmmirror.com/tough-cookie/-/tough-cookie-2.5.0.tgz", + "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", + "requires": { + "psl": "^1.1.28", + "punycode": "^2.1.1" + } + }, + "tunnel-agent": { + "version": "0.6.0", + "resolved": "https://registry.npmmirror.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==", + "requires": { + "safe-buffer": "^5.0.1" + } + }, + "tweetnacl": { + "version": "0.14.5", + "resolved": "https://registry.npmmirror.com/tweetnacl/-/tweetnacl-0.14.5.tgz", + "integrity": "sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA==" + }, + "uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmmirror.com/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "requires": { + "punycode": "^2.1.0" + } + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmmirror.com/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" + }, + "uuid": { + "version": "3.4.0", + "resolved": "https://registry.npmmirror.com/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==" + }, + "verror": { + "version": "1.10.0", + "resolved": "https://registry.npmmirror.com/verror/-/verror-1.10.0.tgz", + "integrity": "sha512-ZZKSmDAEFOijERBLkmYfJ+vmk3w+7hOLYDNkRCuRuMJGEmqYNCNLyBBFwWKVMhfwaEF3WOd0Zlw86U/WC/+nYw==", + "requires": { + "assert-plus": "^1.0.0", + "core-util-is": "1.0.2", + "extsprintf": "^1.2.0" + }, + "dependencies": { + "core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmmirror.com/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ==" + } + } + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..9309bb4 --- /dev/null +++ b/package.json @@ -0,0 +1,17 @@ +{ + "name": "answerbook", + "version": "1.0.0", + "description": "答案之书", + "main": "index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "author": "coder-xiaomo", + "license": "ISC", + "dependencies": { + "close-with-grace": "^1.1.0", + "fs": "^0.0.1-security", + "mysql": "^2.18.1", + "request": "^2.88.2" + } +} diff --git a/sql/analysis.sql b/sql/analysis.sql new file mode 100644 index 0000000..08c0527 --- /dev/null +++ b/sql/analysis.sql @@ -0,0 +1,12 @@ +SELECT + total_count, + distinct_count, + total_count - distinct_count AS repeat_count +FROM + ( + SELECT + count(text) AS total_count, + count(DISTINCT text) AS distinct_count + FROM + `answer` + ) as tab \ No newline at end of file diff --git a/sql/answerbook.sql b/sql/answerbook.sql new file mode 100644 index 0000000..8fd2d79 --- /dev/null +++ b/sql/answerbook.sql @@ -0,0 +1,21 @@ +SET + FOREIGN_KEY_CHECKS = 0; + +CREATE DATABASE `answerbook` CHARACTER SET 'utf8mb4' COLLATE 'utf8mb4_german2_ci'; + +USE `answerbook`; + +-- ---------------------------- +-- Table structure for answer +-- ---------------------------- +DROP TABLE IF EXISTS `answer`; + +CREATE TABLE `answer` ( + `wy_id` int(11) DEFAULT NULL COMMENT '网易id', + `text` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '问题答案', + UNIQUE KEY `wy_id` (`wy_id`,`text`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC; + +SET + FOREIGN_KEY_CHECKS = 1; + diff --git a/sql/sqls.sql b/sql/sqls.sql new file mode 100644 index 0000000..bdee169 --- /dev/null +++ b/sql/sqls.sql @@ -0,0 +1,455 @@ +INSERT INTO answer (wy_id, text) VALUES (1003, '背叛'); +INSERT INTO answer (wy_id, text) VALUES (1010, '堕落'); +INSERT INTO answer (wy_id, text) VALUES (1017, '驾驭不了'); +INSERT INTO answer (wy_id, text) VALUES (1024, '别浪费时间'); +INSERT INTO answer (wy_id, text) VALUES (1031, '你大概会受点伤'); +INSERT INTO answer (wy_id, text) VALUES (1038, '一无所有'); +INSERT INTO answer (wy_id, text) VALUES (1045, '有点唐突'); +INSERT INTO answer (wy_id, text) VALUES (1052, '幼稚又可笑'); +INSERT INTO answer (wy_id, text) VALUES (1059, '背道而驰'); +INSERT INTO answer (wy_id, text) VALUES (1066, '无谓的徘徊'); +INSERT INTO answer (wy_id, text) VALUES (107, '现实很骨感'); +INSERT INTO answer (wy_id, text) VALUES (1073, '难分好坏'); +INSERT INTO answer (wy_id, text) VALUES (1080, '需要总结规律'); +INSERT INTO answer (wy_id, text) VALUES (1087, '平衡'); +INSERT INTO answer (wy_id, text) VALUES (1094, '值得喝一杯'); +INSERT INTO answer (wy_id, text) VALUES (1101, '空想家'); +INSERT INTO answer (wy_id, text) VALUES (1108, '一切都是徒劳'); +INSERT INTO answer (wy_id, text) VALUES (1115, '不要做梦了'); +INSERT INTO answer (wy_id, text) VALUES (1122, '苦的'); +INSERT INTO answer (wy_id, text) VALUES (1129, '可能会让你,泪流满面的'); +INSERT INTO answer (wy_id, text) VALUES (1136, '多余'); +INSERT INTO answer (wy_id, text) VALUES (114, '欲戴王冠,需承其重'); +INSERT INTO answer (wy_id, text) VALUES (1143, '永远不会愈合的伤口'); +INSERT INTO answer (wy_id, text) VALUES (1150, '做一个为什么的清单'); +INSERT INTO answer (wy_id, text) VALUES (1157, '花多点时间去决定'); +INSERT INTO answer (wy_id, text) VALUES (1164, '消除你自己的障碍'); +INSERT INTO answer (wy_id, text) VALUES (1171, '排好手头事情,的优先级'); +INSERT INTO answer (wy_id, text) VALUES (1178, '一笑置之'); +INSERT INTO answer (wy_id, text) VALUES (1185, '听听专家的意见'); +INSERT INTO answer (wy_id, text) VALUES (1192, '等待'); +INSERT INTO answer (wy_id, text) VALUES (1199, '且行且思'); +INSERT INTO answer (wy_id, text) VALUES (1206, '随心而行'); +INSERT INTO answer (wy_id, text) VALUES (121, '人生不如意,十有之十'); +INSERT INTO answer (wy_id, text) VALUES (1213, '离开老式的,解决方案'); +INSERT INTO answer (wy_id, text) VALUES (1220, '别忘了乐趣'); +INSERT INTO answer (wy_id, text) VALUES (1227, '大量的事需要努力'); +INSERT INTO answer (wy_id, text) VALUES (1234, '等待一下,更好的出价'); +INSERT INTO answer (wy_id, text) VALUES (1241, '寻找更多选择'); +INSERT INTO answer (wy_id, text) VALUES (1248, '坚毅沉着就会胜利'); +INSERT INTO answer (wy_id, text) VALUES (1255, '尚未成功,仍需努力'); +INSERT INTO answer (wy_id, text) VALUES (1262, '别忽视显而易见的'); +INSERT INTO answer (wy_id, text) VALUES (1269, '保密'); +INSERT INTO answer (wy_id, text) VALUES (1276, '保持开放的心态'); +INSERT INTO answer (wy_id, text) VALUES (128, '一场完美的悲剧'); +INSERT INTO answer (wy_id, text) VALUES (1283, '把问题交给投硬币'); +INSERT INTO answer (wy_id, text) VALUES (1290, '轮回'); +INSERT INTO answer (wy_id, text) VALUES (1297, '一年以后,无关紧要'); +INSERT INTO answer (wy_id, text) VALUES (1304, '当局者迷'); +INSERT INTO answer (wy_id, text) VALUES (1311, '忘掉它'); +INSERT INTO answer (wy_id, text) VALUES (1318, '放下手机'); +INSERT INTO answer (wy_id, text) VALUES (1325, '慢慢来'); +INSERT INTO answer (wy_id, text) VALUES (1332, '多回头看看'); +INSERT INTO answer (wy_id, text) VALUES (1339, '别钻牛角尖了'); +INSERT INTO answer (wy_id, text) VALUES (1346, '得不到的,永远在骚动'); +INSERT INTO answer (wy_id, text) VALUES (135, '寻寻觅觅'); +INSERT INTO answer (wy_id, text) VALUES (1353, '越困难越值得'); +INSERT INTO answer (wy_id, text) VALUES (1360, '静观其变'); +INSERT INTO answer (wy_id, text) VALUES (1367, '做好,面对意外的准备'); +INSERT INTO answer (wy_id, text) VALUES (1374, '走心就好'); +INSERT INTO answer (wy_id, text) VALUES (1381, '犹豫是必经的过程'); +INSERT INTO answer (wy_id, text) VALUES (1388, '要禁得起诱惑'); +INSERT INTO answer (wy_id, text) VALUES (1395, '你心里已有答案'); +INSERT INTO answer (wy_id, text) VALUES (1402, '随缘'); +INSERT INTO answer (wy_id, text) VALUES (1409, '不要饿着肚子,做重要决定'); +INSERT INTO answer (wy_id, text) VALUES (1416, '糖吃多了会傻,苦一点没关系'); +INSERT INTO answer (wy_id, text) VALUES (142, '本来无一物,何处惹尘埃'); +INSERT INTO answer (wy_id, text) VALUES (1423, '走,回家吃顿饭吧'); +INSERT INTO answer (wy_id, text) VALUES (1430, '其实什么都没有'); +INSERT INTO answer (wy_id, text) VALUES (1437, '好的坏的都是风景'); +INSERT INTO answer (wy_id, text) VALUES (1444, '那又怎样,那就这样'); +INSERT INTO answer (wy_id, text) VALUES (1451, '你不用最棒'); +INSERT INTO answer (wy_id, text) VALUES (1458, '你当然可以失败'); +INSERT INTO answer (wy_id, text) VALUES (1465, '别辜负了自己就好'); +INSERT INTO answer (wy_id, text) VALUES (1472, '挥手道别'); +INSERT INTO answer (wy_id, text) VALUES (1479, '失去的会以不同的方式归还于你'); +INSERT INTO answer (wy_id, text) VALUES (1486, '你的状态很不对'); +INSERT INTO answer (wy_id, text) VALUES (149, '坑总在那里,不来不去'); +INSERT INTO answer (wy_id, text) VALUES (1493, '你或许需要突破'); +INSERT INTO answer (wy_id, text) VALUES (1500, '这是个麻烦'); +INSERT INTO answer (wy_id, text) VALUES (1507, '能做的只有,把握现在'); +INSERT INTO answer (wy_id, text) VALUES (1514, '学会珍惜'); +INSERT INTO answer (wy_id, text) VALUES (1521, '改变心情'); +INSERT INTO answer (wy_id, text) VALUES (1528, '不合适'); +INSERT INTO answer (wy_id, text) VALUES (1535, '让自己开心一点'); +INSERT INTO answer (wy_id, text) VALUES (1542, '原点'); +INSERT INTO answer (wy_id, text) VALUES (1549, '终点'); +INSERT INTO answer (wy_id, text) VALUES (1556, '换一个方向'); +INSERT INTO answer (wy_id, text) VALUES (156, '上天关上一扇门,必将开启新的窗'); +INSERT INTO answer (wy_id, text) VALUES (1563, '放轻松,这很简单'); +INSERT INTO answer (wy_id, text) VALUES (1570, '也许会迟到'); +INSERT INTO answer (wy_id, text) VALUES (1577, '沉默是金'); +INSERT INTO answer (wy_id, text) VALUES (1584, '好像平凡了点'); +INSERT INTO answer (wy_id, text) VALUES (1591, '对自己好一点'); +INSERT INTO answer (wy_id, text) VALUES (1598, '复杂的事情简单做'); +INSERT INTO answer (wy_id, text) VALUES (1605, '彼岸'); +INSERT INTO answer (wy_id, text) VALUES (1612, '坚强'); +INSERT INTO answer (wy_id, text) VALUES (1619, '常是最后一把钥匙打开了神殿门'); +INSERT INTO answer (wy_id, text) VALUES (1626, '学会表达自己'); +INSERT INTO answer (wy_id, text) VALUES (163, '光明的'); +INSERT INTO answer (wy_id, text) VALUES (1633, '不要刻意压抑'); +INSERT INTO answer (wy_id, text) VALUES (1640, '背不动的就放下'); +INSERT INTO answer (wy_id, text) VALUES (1647, '不要怕'); +INSERT INTO answer (wy_id, text) VALUES (1654, '笑着活下去'); +INSERT INTO answer (wy_id, text) VALUES (1661, '回家'); +INSERT INTO answer (wy_id, text) VALUES (1668, '可能会是陌生的'); +INSERT INTO answer (wy_id, text) VALUES (1675, '重逢'); +INSERT INTO answer (wy_id, text) VALUES (1682, '一步之遥'); +INSERT INTO answer (wy_id, text) VALUES (1689, '时间有限'); +INSERT INTO answer (wy_id, text) VALUES (1696, '别迷失自我'); +INSERT INTO answer (wy_id, text) VALUES (170, '优秀'); +INSERT INTO answer (wy_id, text) VALUES (1703, '平平安安'); +INSERT INTO answer (wy_id, text) VALUES (1710, '挥别错的'); +INSERT INTO answer (wy_id, text) VALUES (1717, '很可能已成事实'); +INSERT INTO answer (wy_id, text) VALUES (1724, '用平淡的心态,去追求'); +INSERT INTO answer (wy_id, text) VALUES (1731, '控制自己的情绪'); +INSERT INTO answer (wy_id, text) VALUES (1738, '顺其自然'); +INSERT INTO answer (wy_id, text) VALUES (1745, '得不到别人的认同'); +INSERT INTO answer (wy_id, text) VALUES (1752, '试下改变'); +INSERT INTO answer (wy_id, text) VALUES (1759, '学会认错'); +INSERT INTO answer (wy_id, text) VALUES (1766, '没有什么是对的'); +INSERT INTO answer (wy_id, text) VALUES (177, '踽踽独行'); +INSERT INTO answer (wy_id, text) VALUES (1773, '多读一本书'); +INSERT INTO answer (wy_id, text) VALUES (1780, '差不多得了'); +INSERT INTO answer (wy_id, text) VALUES (1787, '留意左边'); +INSERT INTO answer (wy_id, text) VALUES (1794, '找回自己'); +INSERT INTO answer (wy_id, text) VALUES (1801, '欲速则不达'); +INSERT INTO answer (wy_id, text) VALUES (1808, '平凡之路'); +INSERT INTO answer (wy_id, text) VALUES (1815, '泡沫'); +INSERT INTO answer (wy_id, text) VALUES (1822, '远行'); +INSERT INTO answer (wy_id, text) VALUES (1829, '回头看看'); +INSERT INTO answer (wy_id, text) VALUES (1836, '迷人的危险'); +INSERT INTO answer (wy_id, text) VALUES (184, '看过大海就不会,在意池塘的是非'); +INSERT INTO answer (wy_id, text) VALUES (1843, '浪费光阴'); +INSERT INTO answer (wy_id, text) VALUES (1850, '再也不要见'); +INSERT INTO answer (wy_id, text) VALUES (1857, '戒掉过分的急躁'); +INSERT INTO answer (wy_id, text) VALUES (1864, '其实大家都知道'); +INSERT INTO answer (wy_id, text) VALUES (1871, '你好像舍不得'); +INSERT INTO answer (wy_id, text) VALUES (1878, '卑微的等待'); +INSERT INTO answer (wy_id, text) VALUES (1885, '你有必要傻一点'); +INSERT INTO answer (wy_id, text) VALUES (1892, '果断点离开'); +INSERT INTO answer (wy_id, text) VALUES (1899, '认真起来'); +INSERT INTO answer (wy_id, text) VALUES (1906, '充满未知的迷惑'); +INSERT INTO answer (wy_id, text) VALUES (191, '断舍离'); +INSERT INTO answer (wy_id, text) VALUES (1913, '不如忘掉这个问题'); +INSERT INTO answer (wy_id, text) VALUES (1920, '专注一点'); +INSERT INTO answer (wy_id, text) VALUES (1927, '殊途同归'); +INSERT INTO answer (wy_id, text) VALUES (1934, '捍卫它'); +INSERT INTO answer (wy_id, text) VALUES (1941, '藏在心里别说出来'); +INSERT INTO answer (wy_id, text) VALUES (1948, '面具戴久了,会变成另一个人'); +INSERT INTO answer (wy_id, text) VALUES (1955, '别压抑自己的天性'); +INSERT INTO answer (wy_id, text) VALUES (1962, '大哭一场会好受些'); +INSERT INTO answer (wy_id, text) VALUES (1969, '时间会告诉你一切'); +INSERT INTO answer (wy_id, text) VALUES (1976, '明天就会有,新鲜事发生'); +INSERT INTO answer (wy_id, text) VALUES (198, '认真起来'); +INSERT INTO answer (wy_id, text) VALUES (1983, '看缘分吧'); +INSERT INTO answer (wy_id, text) VALUES (1990, '才刚刚开始'); +INSERT INTO answer (wy_id, text) VALUES (1997, '不要把所有表情,都写在脸上'); +INSERT INTO answer (wy_id, text) VALUES (2004, '好像会很累'); +INSERT INTO answer (wy_id, text) VALUES (2011, '出门遇贵人'); +INSERT INTO answer (wy_id, text) VALUES (2018, '你需要的只是勇气'); +INSERT INTO answer (wy_id, text) VALUES (2025, '不甘心就,努力争取吧'); +INSERT INTO answer (wy_id, text) VALUES (2032, '需要加速些'); +INSERT INTO answer (wy_id, text) VALUES (2039, '等待下一个故事的发生'); +INSERT INTO answer (wy_id, text) VALUES (2046, '与其奋力挣扎,不如闭眼享受'); +INSERT INTO answer (wy_id, text) VALUES (205, '感恩,会越来越好'); +INSERT INTO answer (wy_id, text) VALUES (2053, '试着面对自己,真实的想法'); +INSERT INTO answer (wy_id, text) VALUES (2060, '愿意并且相信'); +INSERT INTO answer (wy_id, text) VALUES (2067, '隐忍'); +INSERT INTO answer (wy_id, text) VALUES (2074, '不要轻易去相信'); +INSERT INTO answer (wy_id, text) VALUES (2081, '留意身边的人和事'); +INSERT INTO answer (wy_id, text) VALUES (2088, '大概可能也许'); +INSERT INTO answer (wy_id, text) VALUES (2095, '可能意味着失去'); +INSERT INTO answer (wy_id, text) VALUES (2102, '看见的都不是真的'); +INSERT INTO answer (wy_id, text) VALUES (2109, '未来会变得,特别繁忙'); +INSERT INTO answer (wy_id, text) VALUES (2116, '别太沉迷'); +INSERT INTO answer (wy_id, text) VALUES (212, '喊不醒装睡的人的'); +INSERT INTO answer (wy_id, text) VALUES (2123, '珍惜身边人'); +INSERT INTO answer (wy_id, text) VALUES (2130, '别忘了初心'); +INSERT INTO answer (wy_id, text) VALUES (2137, '遵循智者的建议'); +INSERT INTO answer (wy_id, text) VALUES (2144, '问问你最好的朋友'); +INSERT INTO answer (wy_id, text) VALUES (2151, '下一页,才是你的人生答案'); +INSERT INTO answer (wy_id, text) VALUES (2158, '一个人安安静静,待一会儿'); +INSERT INTO answer (wy_id, text) VALUES (2165, '吃点东西,冷静一下'); +INSERT INTO answer (wy_id, text) VALUES (2172, '认清现实,再行动'); +INSERT INTO answer (wy_id, text) VALUES (2179, '克制'); +INSERT INTO answer (wy_id, text) VALUES (2186, '坚持才会有效果'); +INSERT INTO answer (wy_id, text) VALUES (219, '退一步海阔天空'); +INSERT INTO answer (wy_id, text) VALUES (2193, '不是所有的事儿,努力都有用'); +INSERT INTO answer (wy_id, text) VALUES (2200, '事情很快,会有变化的'); +INSERT INTO answer (wy_id, text) VALUES (2207, '可能有另一种情况'); +INSERT INTO answer (wy_id, text) VALUES (2214, '等你再年长几岁,可能会…'); +INSERT INTO answer (wy_id, text) VALUES (2221, '很多事会随着,时间好起来的'); +INSERT INTO answer (wy_id, text) VALUES (2228, '一切从头开始'); +INSERT INTO answer (wy_id, text) VALUES (2235, '时间是最好的回答'); +INSERT INTO answer (wy_id, text) VALUES (2242, '下次旅途中,你会找到答案'); +INSERT INTO answer (wy_id, text) VALUES (2249, '学会爱人'); +INSERT INTO answer (wy_id, text) VALUES (2256, '关注生活本身'); +INSERT INTO answer (wy_id, text) VALUES (226, '相见不如怀念'); +INSERT INTO answer (wy_id, text) VALUES (2263, '最重要的东西,是眼睛看不到的'); +INSERT INTO answer (wy_id, text) VALUES (2270, '分清哪些是真正,对你重要的'); +INSERT INTO answer (wy_id, text) VALUES (2277, '实际一点'); +INSERT INTO answer (wy_id, text) VALUES (2284, '分享是一种快乐'); +INSERT INTO answer (wy_id, text) VALUES (2291, '学会自我治愈'); +INSERT INTO answer (wy_id, text) VALUES (2298, '存在即合理'); +INSERT INTO answer (wy_id, text) VALUES (2305, '努力就有收获'); +INSERT INTO answer (wy_id, text) VALUES (233, '怀念不如向前'); +INSERT INTO answer (wy_id, text) VALUES (240, '何以解忧,唯有暴富'); +INSERT INTO answer (wy_id, text) VALUES (247, '白日梦?'); +INSERT INTO answer (wy_id, text) VALUES (254, '你在开玩笑吗'); +INSERT INTO answer (wy_id, text) VALUES (261, '别灰心人生总是,起起落落落落的'); +INSERT INTO answer (wy_id, text) VALUES (268, '所有事都会慢慢慢慢慢好起来的'); +INSERT INTO answer (wy_id, text) VALUES (275, '万丈高楼平地起,成功还得靠自己'); +INSERT INTO answer (wy_id, text) VALUES (282, '当上帝给你关上门,会顺便关上窗'); +INSERT INTO answer (wy_id, text) VALUES (289, 'emmm…,奇怪的问题'); +INSERT INTO answer (wy_id, text) VALUES (296, '今朝有酒,今朝醉'); +INSERT INTO answer (wy_id, text) VALUES (303, '越过山丘,无人等候'); +INSERT INTO answer (wy_id, text) VALUES (310, '亏本买卖'); +INSERT INTO answer (wy_id, text) VALUES (317, '尽人事,听天命'); +INSERT INTO answer (wy_id, text) VALUES (324, '明日曙光将四起'); +INSERT INTO answer (wy_id, text) VALUES (331, '能呼吸上空气,就是幸运的'); +INSERT INTO answer (wy_id, text) VALUES (338, '物是人非'); +INSERT INTO answer (wy_id, text) VALUES (345, '你颜值不够,本书拒绝回答'); +INSERT INTO answer (wy_id, text) VALUES (352, '需要一腔孤勇'); +INSERT INTO answer (wy_id, text) VALUES (359, '别指望所有人,理解你'); +INSERT INTO answer (wy_id, text) VALUES (366, '路见不平,绕道而行'); +INSERT INTO answer (wy_id, text) VALUES (373, '世事难如愿'); +INSERT INTO answer (wy_id, text) VALUES (380, '去看更多风景'); +INSERT INTO answer (wy_id, text) VALUES (387, '立一个小目标'); +INSERT INTO answer (wy_id, text) VALUES (394, '慢慢人生路,谁不错几步'); +INSERT INTO answer (wy_id, text) VALUES (401, '江湖险恶,不行就撤'); +INSERT INTO answer (wy_id, text) VALUES (408, '回到原点'); +INSERT INTO answer (wy_id, text) VALUES (415, '跟着感觉走'); +INSERT INTO answer (wy_id, text) VALUES (422, '一千年以后'); +INSERT INTO answer (wy_id, text) VALUES (429, '可能会迟到,但绝不会缺席'); +INSERT INTO answer (wy_id, text) VALUES (436, '吃得苦中苦,还是普通人'); +INSERT INTO answer (wy_id, text) VALUES (443, '心存善念'); +INSERT INTO answer (wy_id, text) VALUES (450, '自己选择的路,跪着也要走完'); +INSERT INTO answer (wy_id, text) VALUES (457, '无解'); +INSERT INTO answer (wy_id, text) VALUES (464, '分久必合'); +INSERT INTO answer (wy_id, text) VALUES (471, '合久必分'); +INSERT INTO answer (wy_id, text) VALUES (478, '这是机智的'); +INSERT INTO answer (wy_id, text) VALUES (485, '睡一觉再问'); +INSERT INTO answer (wy_id, text) VALUES (492, '看脸'); +INSERT INTO answer (wy_id, text) VALUES (499, '这就是命'); +INSERT INTO answer (wy_id, text) VALUES (506, '一场羁绊'); +INSERT INTO answer (wy_id, text) VALUES (513, '以丧治丧,以甜还甜'); +INSERT INTO answer (wy_id, text) VALUES (520, '世上无难事,只要肯放弃'); +INSERT INTO answer (wy_id, text) VALUES (527, '一直是个,幸运的人呢'); +INSERT INTO answer (wy_id, text) VALUES (534, '你只是有点寂寞'); +INSERT INTO answer (wy_id, text) VALUES (541, '当然'); +INSERT INTO answer (wy_id, text) VALUES (548, '是的'); +INSERT INTO answer (wy_id, text) VALUES (555, '同意'); +INSERT INTO answer (wy_id, text) VALUES (562, '去做吧'); +INSERT INTO answer (wy_id, text) VALUES (569, '为什么不'); +INSERT INTO answer (wy_id, text) VALUES (576, '可以有'); +INSERT INTO answer (wy_id, text) VALUES (583, '你认为是对的,就去做吧'); +INSERT INTO answer (wy_id, text) VALUES (590, '尽早去做'); +INSERT INTO answer (wy_id, text) VALUES (597, '主动点,可能会有好事发生'); +INSERT INTO answer (wy_id, text) VALUES (604, '请多点耐心'); +INSERT INTO answer (wy_id, text) VALUES (611, '它将会带来好运'); +INSERT INTO answer (wy_id, text) VALUES (618, '结果将会是积极的'); +INSERT INTO answer (wy_id, text) VALUES (625, '你不会失望'); +INSERT INTO answer (wy_id, text) VALUES (632, '谨慎的接近'); +INSERT INTO answer (wy_id, text) VALUES (639, '合作将会是,开锁的钥匙'); +INSERT INTO answer (wy_id, text) VALUES (646, '不如赌一把'); +INSERT INTO answer (wy_id, text) VALUES (653, '下这一注稳赢'); +INSERT INTO answer (wy_id, text) VALUES (660, '胜券在握'); +INSERT INTO answer (wy_id, text) VALUES (667, '无需担忧'); +INSERT INTO answer (wy_id, text) VALUES (674, '做个了断'); +INSERT INTO answer (wy_id, text) VALUES (681, '研究它,然后享受它'); +INSERT INTO answer (wy_id, text) VALUES (688, '尝试一下'); +INSERT INTO answer (wy_id, text) VALUES (695, '毫无疑问'); +INSERT INTO answer (wy_id, text) VALUES (702, '很高兴做了'); +INSERT INTO answer (wy_id, text) VALUES (709, '这是一次机会'); +INSERT INTO answer (wy_id, text) VALUES (716, '条条大路通罗马'); +INSERT INTO answer (wy_id, text) VALUES (723, '机不可失,失不再来'); +INSERT INTO answer (wy_id, text) VALUES (730, '不妨一试'); +INSERT INTO answer (wy_id, text) VALUES (737, '不要妥协'); +INSERT INTO answer (wy_id, text) VALUES (744, '也许有惊喜'); +INSERT INTO answer (wy_id, text) VALUES (751, '努力向前就可以了'); +INSERT INTO answer (wy_id, text) VALUES (758, '奇迹'); +INSERT INTO answer (wy_id, text) VALUES (765, '会是甜的'); +INSERT INTO answer (wy_id, text) VALUES (772, '爱'); +INSERT INTO answer (wy_id, text) VALUES (779, '要相信你很棒棒'); +INSERT INTO answer (wy_id, text) VALUES (786, '一切皆有可能'); +INSERT INTO answer (wy_id, text) VALUES (793, '必须努力奔跑起来'); +INSERT INTO answer (wy_id, text) VALUES (800, '放心,会有人陪着你'); +INSERT INTO answer (wy_id, text) VALUES (807, '也许会有好转'); +INSERT INTO answer (wy_id, text) VALUES (814, '会是完美的'); +INSERT INTO answer (wy_id, text) VALUES (821, '尽你最大的能力'); +INSERT INTO answer (wy_id, text) VALUES (828, '你很幸运'); +INSERT INTO answer (wy_id, text) VALUES (835, '该来的总会来'); +INSERT INTO answer (wy_id, text) VALUES (842, '就差一点点'); +INSERT INTO answer (wy_id, text) VALUES (849, '你将会后悔的'); +INSERT INTO answer (wy_id, text) VALUES (856, '绝对不要'); +INSERT INTO answer (wy_id, text) VALUES (863, '不要浪费时间'); +INSERT INTO answer (wy_id, text) VALUES (870, '这将是不明智的'); +INSERT INTO answer (wy_id, text) VALUES (877, '敲吧,门终究会开的'); +INSERT INTO answer (wy_id, text) VALUES (884, '不要指望它'); +INSERT INTO answer (wy_id, text) VALUES (891, '这将是一种,金钱的浪费'); +INSERT INTO answer (wy_id, text) VALUES (898, '可怕'); +INSERT INTO answer (wy_id, text) VALUES (905, '让它过去吧'); +INSERT INTO answer (wy_id, text) VALUES (912, '失去又不会死掉'); +INSERT INTO answer (wy_id, text) VALUES (919, '你无法掌控'); +INSERT INTO answer (wy_id, text) VALUES (926, '不要给别人添麻烦'); +INSERT INTO answer (wy_id, text) VALUES (933, '人生总是如此痛苦'); +INSERT INTO answer (wy_id, text) VALUES (940, '现在不是最好时机'); +INSERT INTO answer (wy_id, text) VALUES (947, '傻瓜才会这么想'); +INSERT INTO answer (wy_id, text) VALUES (954, '学会放弃'); +INSERT INTO answer (wy_id, text) VALUES (961, '有些话不说,对大家都好'); +INSERT INTO answer (wy_id, text) VALUES (968, '期待常会落空'); +INSERT INTO answer (wy_id, text) VALUES (975, '放手'); +INSERT INTO answer (wy_id, text) VALUES (982, '苦涩'); +INSERT INTO answer (wy_id, text) VALUES (989, '到此为止'); +INSERT INTO answer (wy_id, text) VALUES (996, '逆水行舟'); +INSERT INTO answer (wy_id, text) VALUES (NULL, '一定会有好结果的'); +INSERT INTO answer (wy_id, text) VALUES (NULL, '一笑了之'); +INSERT INTO answer (wy_id, text) VALUES (NULL, '万一错过,就没这个机会了'); +INSERT INTO answer (wy_id, text) VALUES (NULL, '三思而后行'); +INSERT INTO answer (wy_id, text) VALUES (NULL, '不'); +INSERT INTO answer (wy_id, text) VALUES (NULL, '不会后悔的'); +INSERT INTO answer (wy_id, text) VALUES (NULL, '不会失望的'); +INSERT INTO answer (wy_id, text) VALUES (NULL, '不作死就不会死'); +INSERT INTO answer (wy_id, text) VALUES (NULL, '不值得'); +INSERT INTO answer (wy_id, text) VALUES (NULL, '不然呢?'); +INSERT INTO answer (wy_id, text) VALUES (NULL, '不用担心'); +INSERT INTO answer (wy_id, text) VALUES (NULL, '不要做得过火了'); +INSERT INTO answer (wy_id, text) VALUES (NULL, '不要忽视自己的力量'); +INSERT INTO answer (wy_id, text) VALUES (NULL, '不要抱期望'); +INSERT INTO answer (wy_id, text) VALUES (NULL, '不要浪费你的时间了'); +INSERT INTO answer (wy_id, text) VALUES (NULL, '不要浪费精力'); +INSERT INTO answer (wy_id, text) VALUES (NULL, '不要纠结了'); +INSERT INTO answer (wy_id, text) VALUES (NULL, '不要自作多情'); +INSERT INTO answer (wy_id, text) VALUES (NULL, '与你无关'); +INSERT INTO answer (wy_id, text) VALUES (NULL, '为什么不呢?'); +INSERT INTO answer (wy_id, text) VALUES (NULL, '仔细想想再说'); +INSERT INTO answer (wy_id, text) VALUES (NULL, '以后再说'); +INSERT INTO answer (wy_id, text) VALUES (NULL, '休息一下就好了'); +INSERT INTO answer (wy_id, text) VALUES (NULL, '众所周知'); +INSERT INTO answer (wy_id, text) VALUES (NULL, '会付出代价'); +INSERT INTO answer (wy_id, text) VALUES (NULL, '会后悔的'); +INSERT INTO answer (wy_id, text) VALUES (NULL, '会失去自我'); +INSERT INTO answer (wy_id, text) VALUES (NULL, '会很不顺利'); +INSERT INTO answer (wy_id, text) VALUES (NULL, '会很顺利'); +INSERT INTO answer (wy_id, text) VALUES (NULL, '会感到庆幸'); +INSERT INTO answer (wy_id, text) VALUES (NULL, '会特别顺利'); +INSERT INTO answer (wy_id, text) VALUES (NULL, '你做什么都没用'); +INSERT INTO answer (wy_id, text) VALUES (NULL, '你在开玩笑吗?'); +INSERT INTO answer (wy_id, text) VALUES (NULL, '你将取得成功'); +INSERT INTO answer (wy_id, text) VALUES (NULL, '你心里已经有答案了'); +INSERT INTO answer (wy_id, text) VALUES (NULL, '你必须解决一些相关的问题'); +INSERT INTO answer (wy_id, text) VALUES (NULL, '你猜'); +INSERT INTO answer (wy_id, text) VALUES (NULL, '你说了算'); +INSERT INTO answer (wy_id, text) VALUES (NULL, '值得奋斗'); +INSERT INTO answer (wy_id, text) VALUES (NULL, '倾听你内心的声音'); +INSERT INTO answer (wy_id, text) VALUES (NULL, '做最坏的打算'); +INSERT INTO answer (wy_id, text) VALUES (NULL, '先做点别的'); +INSERT INTO answer (wy_id, text) VALUES (NULL, '全力以赴'); +INSERT INTO answer (wy_id, text) VALUES (NULL, '再等等看'); +INSERT INTO answer (wy_id, text) VALUES (NULL, '再过几年'); +INSERT INTO answer (wy_id, text) VALUES (NULL, '别太赶了'); +INSERT INTO answer (wy_id, text) VALUES (NULL, '别想了'); +INSERT INTO answer (wy_id, text) VALUES (NULL, '别瞎折腾了'); +INSERT INTO answer (wy_id, text) VALUES (NULL, '千万不能失败'); +INSERT INTO answer (wy_id, text) VALUES (NULL, '千万别信'); +INSERT INTO answer (wy_id, text) VALUES (NULL, '另择吉日'); +INSERT INTO answer (wy_id, text) VALUES (NULL, '只有一次机会'); +INSERT INTO answer (wy_id, text) VALUES (NULL, '听听专家的意见'); +INSERT INTO answer (wy_id, text) VALUES (NULL, '听听别人怎么说'); +INSERT INTO answer (wy_id, text) VALUES (NULL, '地点不合适'); +INSERT INTO answer (wy_id, text) VALUES (NULL, '大方一点'); +INSERT INTO answer (wy_id, text) VALUES (NULL, '大胆一点'); +INSERT INTO answer (wy_id, text) VALUES (NULL, '奇迹即将降临'); +INSERT INTO answer (wy_id, text) VALUES (NULL, '好运将会降临'); +INSERT INTO answer (wy_id, text) VALUES (NULL, '如你所愿'); +INSERT INTO answer (wy_id, text) VALUES (NULL, '学会妥协'); +INSERT INTO answer (wy_id, text) VALUES (NULL, '学会释然'); +INSERT INTO answer (wy_id, text) VALUES (NULL, '寻找机会就行'); +INSERT INTO answer (wy_id, text) VALUES (NULL, '尚待时日'); +INSERT INTO answer (wy_id, text) VALUES (NULL, '尽在掌握之中'); +INSERT INTO answer (wy_id, text) VALUES (NULL, '并非永恒'); +INSERT INTO answer (wy_id, text) VALUES (NULL, '当局者迷'); +INSERT INTO answer (wy_id, text) VALUES (NULL, '得真正地努力一下'); +INSERT INTO answer (wy_id, text) VALUES (NULL, '忽略了一件显而易见的事'); +INSERT INTO answer (wy_id, text) VALUES (NULL, '想得美'); +INSERT INTO answer (wy_id, text) VALUES (NULL, '想想有没有机会'); +INSERT INTO answer (wy_id, text) VALUES (NULL, '拭目以待'); +INSERT INTO answer (wy_id, text) VALUES (NULL, '换个角度想想'); +INSERT INTO answer (wy_id, text) VALUES (NULL, '放手'); +INSERT INTO answer (wy_id, text) VALUES (NULL, '放轻松点,慢慢来'); +INSERT INTO answer (wy_id, text) VALUES (NULL, '无法预测'); +INSERT INTO answer (wy_id, text) VALUES (NULL, '时机尚不成熟'); +INSERT INTO answer (wy_id, text) VALUES (NULL, '时机未到'); +INSERT INTO answer (wy_id, text) VALUES (NULL, '时间会证明一切'); +INSERT INTO answer (wy_id, text) VALUES (NULL, '最后一次机会'); +INSERT INTO answer (wy_id, text) VALUES (NULL, '有'); +INSERT INTO answer (wy_id, text) VALUES (NULL, '有可能'); +INSERT INTO answer (wy_id, text) VALUES (NULL, '木已成舟'); +INSERT INTO answer (wy_id, text) VALUES (NULL, '毫无疑问'); +INSERT INTO answer (wy_id, text) VALUES (NULL, '毫无道理'); +INSERT INTO answer (wy_id, text) VALUES (NULL, '没什么好结果'); +INSERT INTO answer (wy_id, text) VALUES (NULL, '没法保证'); +INSERT INTO answer (wy_id, text) VALUES (NULL, '没错'); +INSERT INTO answer (wy_id, text) VALUES (NULL, '注意细节'); +INSERT INTO answer (wy_id, text) VALUES (NULL, '现在你可以'); +INSERT INTO answer (wy_id, text) VALUES (NULL, '现在还说不清'); +INSERT INTO answer (wy_id, text) VALUES (NULL, '用尽一切办法去努力'); +INSERT INTO answer (wy_id, text) VALUES (NULL, '相信你最初的想法'); +INSERT INTO answer (wy_id, text) VALUES (NULL, '相信你的直觉'); +INSERT INTO answer (wy_id, text) VALUES (NULL, '省点力气吧'); +INSERT INTO answer (wy_id, text) VALUES (NULL, '眼光长远一点'); +INSERT INTO answer (wy_id, text) VALUES (NULL, '等等'); +INSERT INTO answer (wy_id, text) VALUES (NULL, '答案就在你身边'); +INSERT INTO answer (wy_id, text) VALUES (NULL, '管它呢'); +INSERT INTO answer (wy_id, text) VALUES (NULL, '结果会让你惊喜'); +INSERT INTO answer (wy_id, text) VALUES (NULL, '结果可能让人惊讶'); +INSERT INTO answer (wy_id, text) VALUES (NULL, '绝对不'); +INSERT INTO answer (wy_id, text) VALUES (NULL, '继续前进'); +INSERT INTO answer (wy_id, text) VALUES (NULL, '肯定的'); +INSERT INTO answer (wy_id, text) VALUES (NULL, '要主动'); +INSERT INTO answer (wy_id, text) VALUES (NULL, '要像UP一样学会等待'); +INSERT INTO answer (wy_id, text) VALUES (NULL, '要变通'); +INSERT INTO answer (wy_id, text) VALUES (NULL, '要抓住问题的关键'); +INSERT INTO answer (wy_id, text) VALUES (NULL, '要有点耐心'); +INSERT INTO answer (wy_id, text) VALUES (NULL, '要求不要太高'); +INSERT INTO answer (wy_id, text) VALUES (NULL, '要知足'); +INSERT INTO answer (wy_id, text) VALUES (NULL, '见好就收'); +INSERT INTO answer (wy_id, text) VALUES (NULL, '认清现实吧'); +INSERT INTO answer (wy_id, text) VALUES (NULL, '跟UP被白嫖视频一样'); +INSERT INTO answer (wy_id, text) VALUES (NULL, '车到山前必有路'); +INSERT INTO answer (wy_id, text) VALUES (NULL, '还有别的选择'); +INSERT INTO answer (wy_id, text) VALUES (NULL, '这不值得努力'); +INSERT INTO answer (wy_id, text) VALUES (NULL, '这不切实际'); +INSERT INTO answer (wy_id, text) VALUES (NULL, '这不可取'); +INSERT INTO answer (wy_id, text) VALUES (NULL, '这不是你想要的'); +INSERT INTO answer (wy_id, text) VALUES (NULL, '这件事会很麻烦'); +INSERT INTO answer (wy_id, text) VALUES (NULL, '这件事你说了不算'); +INSERT INTO answer (wy_id, text) VALUES (NULL, '这会影响你的形象'); +INSERT INTO answer (wy_id, text) VALUES (NULL, '这取决于你的行动'); +INSERT INTO answer (wy_id, text) VALUES (NULL, '这时候非常顺利'); +INSERT INTO answer (wy_id, text) VALUES (NULL, '这是在浪费金钱'); +INSERT INTO answer (wy_id, text) VALUES (NULL, '这是必然的,不要抗拒'); +INSERT INTO answer (wy_id, text) VALUES (NULL, '这是肯定的'); +INSERT INTO answer (wy_id, text) VALUES (NULL, '这没什么意义'); +INSERT INTO answer (wy_id, text) VALUES (NULL, '这种事情不要告诉别人'); +INSERT INTO answer (wy_id, text) VALUES (NULL, '这辈子都不可能'); +INSERT INTO answer (wy_id, text) VALUES (NULL, '这难以置信'); +INSERT INTO answer (wy_id, text) VALUES (NULL, '遇上方知有'); +INSERT INTO answer (wy_id, text) VALUES (NULL, '重新想想'); +INSERT INTO answer (wy_id, text) VALUES (NULL, '问问你的亲人'); +INSERT INTO answer (wy_id, text) VALUES (NULL, '问问自己,为什么要这么干'); +INSERT INTO answer (wy_id, text) VALUES (NULL, '障碍重重'); +INSERT INTO answer (wy_id, text) VALUES (NULL, '需要冒险'); +INSERT INTO answer (wy_id, text) VALUES (NULL, '需要合作'); +INSERT INTO answer (wy_id, text) VALUES (NULL, '顺其自然'); \ No newline at end of file diff --git a/sql/tmp_table.sql b/sql/tmp_table.sql new file mode 100644 index 0000000..751db34 --- /dev/null +++ b/sql/tmp_table.sql @@ -0,0 +1,3 @@ +-- CREATE TEMPORARY TABLE tmp_table SELECT distinct text FROM answer +drop table if exists tmp_table +CREATE TABLE tmp_table SELECT distinct text FROM answer order by text \ No newline at end of file diff --git a/src/api_result.js b/src/api_result.js new file mode 100644 index 0000000..9dea4fc --- /dev/null +++ b/src/api_result.js @@ -0,0 +1,26 @@ +const request = require('request'); + +// 请求 APi 接口 +async function query(opts) { + var return_data = await new Promise((resolve) => { + // console.log("opts", opts); + request(opts, (error, response, result) => { + // console.log("error, response, result", error, response, result); + // console.log("error, result", error, result); + if (!error && (response.statusCode == 200)) { + // 请求成功 + resolve(result); + } else { + // 请求失败 + console.log(`error is ${error}`); + resolve({}); + } + }); + }); + // console.log(`return_data is ${JSON.stringify(return_data)}`); + return return_data; +} + +module.exports = { + query: query, +} diff --git a/src/db.js b/src/db.js new file mode 100644 index 0000000..4d6e331 --- /dev/null +++ b/src/db.js @@ -0,0 +1,30 @@ +//引入MySQL +const mysql = require('mysql'); + +async function query(sql = "select * from answer;") { + //通过MySQL中方法创建链接对象 + var connection = mysql.createConnection({ + charset: 'utf8mb4', + host: 'localhost', + user: 'root', + password: 'root', + port: 3306, + database: 'answerbook' + }); + //开始连接 + connection.connect(); + //执行SQL语句 (添加、删除、更新、查询) + connection.query(sql, (err, result) => { + if (err) { + console.error('err', err); + return; + } + console.log('result', result); + }) + //最后需要关闭连接 + connection.end(); +} + +module.exports = { + query: query, +} \ No newline at end of file diff --git a/src/db_pool.js b/src/db_pool.js new file mode 100644 index 0000000..a20b937 --- /dev/null +++ b/src/db_pool.js @@ -0,0 +1,75 @@ +const mysql = require('mysql'); +const closeWithGrace = require('close-with-grace'); + +//创建数据库连接池 +let pool = mysql.createPool({ + connectionLimit: 10, //连接数量,默认是10 + charset: 'utf8mb4', + host: 'localhost', + user: 'root', + password: 'root', + port: 3306, + database: 'answerbook' +}); + +//从连接池中获取连接时,将触发该事件 +pool.on('acquire', function (conn) { + // console.log('获取连接', conn.threadId); +}); + +//在连接池中建立新连接时,将触发该事件 +pool.on('connection', function (conn) { + console.log('建立新连接', conn.threadId); +}); + +//等待可用连接时,将触发该事件 +pool.on('enqueue', function () { + console.log('等待可用连接'); +}); + +//当连接释放回池中时,触发该事件 +pool.on('release', function (conn) { + // console.log('连接被释放回池中', conn.threadId); +}); + + +async function query(sql = 'select * from answer') { + return await new Promise(function (resolve, reject) { + //pool.query()方法可以自动的帮我们在连接池中获取可用连接 + pool.query(sql, function (err, data) { + if (err) reject(err); + // console.log(data); + resolve(data); + }); + + // //当然我们也可以手动获取可用连接 + // pool.getConnection(function (err, conn) { + // if (err) { + // throw err; + // } + // conn.query('select * from `order`', function (err, data) { + // if (err) { + // throw err; + // } + // data.forEach(function (value) { + // console.log(value.id, value.order_id, value.user_id); + // }); + + // //连接用完之后,需要释放,重新放回连接池中。 + // //注意这里并没有销毁该连接,该连接仍然可用,但需要重新获取 + // conn.release(); + // }); + // }); + }); +} + +function close() { + pool.end(function (err) { + console.log('关闭连接池', err); + }); +} + +module.exports = { + query: query, + close: close, +} \ No newline at end of file