Access to XMLHttpRequest at http://localhost/api/login from origin http://localhost:8010 has been blocked by CORS policy: Response to preflight request doesnt pass access control check: NoAccess-Control-Allow-Origin header is present on the requested resource.```
1
Access to XMLHttpRequest at http://localhost/api/login from origin http://localhost:8010 has been blocked by CORS policy: Request header field content-type is not allowed by Access-Control-Allow-Headers in preflight response.
voidputX(int A[][2], int numA, int B[][2], int numB); voidputSum(int A[][2], int numA, int B[][2], int numB); intmain(){ int num1, num2; scanf("%d", &num1); int Arr1[num1][2]; for(int i = 0; i < num1; i++){ scanf("%d", &Arr1[i][0]); scanf("%d", &Arr1[i][1]); } scanf("%d", &num2); int Arr2[num2][2]; for(int i = 0; i < num2; i++){ scanf("%d", &Arr2[i][0]); scanf("%d", &Arr2[i][1]); } putX(Arr1, num1, Arr2, num2); putSum(Arr1, num1, Arr2, num2); return0; }
voidputX(int A[][2], int numA, int B[][2], int numB){ if(numA == 0 || numB == 0){ printf("0 0\n"); return; } int max = A[0][1] + B[0][1] + 1; int Arr[max]; for(int i = 0; i < max; i++){ Arr[i] = 0; } for(int i = 0; i < numA; i++){ for(int k = 0; k < numB; k++){ Arr[A[i][1] + B[k][1]] += A[i][0] * B[k][0]; } } int isNeedSpace = 0; for(int i = max -1; i > -1; i--){ if(Arr[i] == 0) continue; if(isNeedSpace){ printf(" "); } printf("%d %d", Arr[i], i); isNeedSpace = 1; } printf("\n"); return; }
intcompote(int a, int b){ if(a == b){ return0; }elseif( a > b){ return1; }else{ return-1; } }
>ERROR: Failed to download Chromium r588429! Set "PUPPETEER_SKIP_CHROMIUM_DOWNLOAD" env variable to skip download. { Error: EACCES: permission denied, mkdir '/data/wwwroot/example/dispa/node_modules/puppeteer/.local-chromium' errno: -13, code: 'EACCES', syscall: 'mkdir', path: '/data/wwwroot/example/dispa/node_modules/puppeteer/.local-chromium' } npm WARN dispa@1.0.0 No description npm WARN dispa@1.0.0 No repository field.
npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! puppeteer@1.8.0 install: `node install.js` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the puppeteer@1.8.0 install script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in: npm ERR! /root/.npm/_logs/2018-09-11T01_37_36_695Z-debug.log
node:30630) UnhandledPromiseRejectionWarning: Error: Failed to launch chrome! /data/wwwroot/example/dispa/node_modules/puppeteer/.local-chromium/linux-588429/chrome-linux/chrome: error while loading shared libraries: libasound.so.2: cannot open shared object file: No such file or directory
at onClose (/data/wwwroot/example/dispa/node_modules/puppeteer/lib/Launcher.js:333:14) at Interface.helper.addEventListener (/data/wwwroot/example/dispa/node_modules/puppeteer/lib/Launcher.js:322:50) at emitNone (events.js:111:20) at Interface.emit (events.js:208:7) at Interface.close (readline.js:368:8) at Socket.onend (readline.js:147:10) at emitNone (events.js:111:20) at Socket.emit (events.js:208:7) at endReadableNT (_stream_readable.js:1064:12) at _combinedTickCallback (internal/process/next_tick.js:138:11) (node:30630) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1) (node:30630) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
(node:32460) UnhandledPromiseRejectionWarning: Error: Failed to launch chrome! [0911/100703.525676:ERROR:zygote_host_impl_linux.cc(89)] Running as root without --no-sandbox is not supported. See https://crbug.com/638180.
at onClose (/data/wwwroot/example/dispa/node_modules/puppeteer/lib/Launcher.js:333:14) at Interface.helper.addEventListener (/data/wwwroot/example/dispa/node_modules/puppeteer/lib/Launcher.js:322:50) at emitNone (events.js:111:20) at Interface.emit (events.js:208:7) at Interface.close (readline.js:368:8) at Socket.onend (readline.js:147:10) at emitNone (events.js:111:20) at Socket.emit (events.js:208:7) at endReadableNT (_stream_readable.js:1064:12) at _combinedTickCallback (internal/process/next_tick.js:138:11) (node:32460) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1) (node:32460) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.