Author Archives: Robins

java.lang.NoSuchMethodError Quote: javax.servlet.com Yeah. HttpServletRequest.isAsyncStarted ()Z

When developing jetty 9 embedded system, it starts normally, but when browsing the page, an error is reported as follows:

java.lang.NoSuchMethodError : javax.servlet.http . HttpServletRequest.isAsyncStarted () Z
reason: jetty 9 relies on servlet API version 3. X. if other third-party open source libraries in the project implicitly rely on servlet API version 2. X, this error will be reported.
Reprinted: https://www.cnblogs.com/yjmyzz/p/5090990.html

Parsing double quotation marks with JSON

Parse a JSON data:

{“manifest”:{ Version:“3.0”}}

If you look carefully, this string is not in the normal JSON format. Version lacks double quotation marks. It should be:

{“manifest”:{ “Version”: “3.0”}}

Reprinted: https://www.cnblogs.com/afluy/p/4023838.html

If used

JSONObject mainfestObject.getJSONObject (“manifest”);

This method analysis will report an error, but if you use

String mainfestStr = object.optString (“manifest”, “”);

JSONObject mainfestObject = new JSONObject(mainfestStr);

The above method is successful!

Eclipse flash back does not open the problem

At first, I saw more than n solutions on the Internet. Unfortunately, I tried them all, but none of them solved my problem. Later, I tossed around and deleted the. Eclipse (click eclipse) in my C disk. After that, I rerun eclipse. After a while, I can start eclipse normally. Through this warning, I can’t quit eclipse abnormally

NuxtSe rverError:Request failed With status code 500 my solution and thinking

catalog

1、 Source of the problem

2、 Solutions

3、 Solutions

4、 Summary


1、 Source of the problem

Usually using nuxt and deploying it online are normal, and occasionally 500 errors are reported one day;

Nuxt.js The operation ( NPM run dev ) reported the following error:

The server error log is as follows:

0|qiu  |  ERROR  Request failed with status code 500                           20:17:14
0|qiu  |   at createError (node_modules/axios/lib/core/createError.js:16:15)
0|qiu  |   at settle (node_modules/axios/lib/core/settle.js:18:12)
0|qiu  |   at IncomingMessage.handleStreamEnd (node_modules/axios/lib/adapters/http.js:201:11)
0|qiu  |   at IncomingMessage.emit (events.js:187:15)
0|qiu  |   at IncomingMessage.EventEmitter.emit (domain.js:441:20)
0|qiu  |   at endReadableNT (_stream_readable.js:1094:12)
0|qiu  |   at process._tickCallback (internal/process/next_tick.js:63:19)

2、 Solutions

500 status code: server internal error, unable to complete the request.

Generally speaking, this problem occurs when the server code fails

So the problem lies in the back end, check the interface

3、 Solutions

Annotate the code one by one, and find an interface error in the page, so that the problem can be solved after the back-end correction;

The error of the request interface is as follows (PHP in the background)

 

It’s a clumsy way to comment the code one by one. If you can, you can directly look at the network of the console to see the interface in error;


4、 Summary

because Nuxt.js It is a framework for server-side rendering. As long as an interface in the page reports an error and the server returns an error, the front-end display page will crash;

And an interface error, nuxt only returns 500 errors, can’t directly locate the problem, need to check one by one, hope nuxt is more and more powerful

 

The wechat app I developed (online):
if you are interested, you can have a look at it and pay close attention to it with one click. Thank you ~
1. Xiaolv depression Test Assistant (wechat APP): a completely free and ad free depression self-test app, which collects questionnaires from global authorities and provides them to you for free. There are novel score records and posters to share, You can see and learn!

Xiaolv depression test assistant

Import win32API; importerror: DLL load failed: the specified program was not found

Error information

(venv) D:\pyvenv_xlwings64\venv>pip list
Package    Version
---------- -------
comtypes   1.1.7
pip        19.2.3
PyQt5      5.13.1
PyQt5-sip  4.19.19
pywin32    225
setuptools 41.2.0
wheel      0.33.6
xlwings    0.15.3

(venv) D:\pyvenv_xlwings64\venv>python
Python 3.6.5 |Anaconda, Inc.| (default, Mar 29 2018, 13:32:41) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import xlwings
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "D:\pyvenv_xlwings64\venv\lib\site-packages\xlwings\__init__.py", line 42, in <module>
    from . import _xlwindows as xlplatform
  File "D:\pyvenv_xlwings64\venv\lib\site-packages\xlwings\_xlwindows.py", line 10, in <module>
    import win32api
ImportError: DLL load failed: The specified program could not be found.
>>>

Cause of the problem

There is a problem with the new version 224 and 225. Just go back to version 223

(venv) D:\pyvenv_xlwings64\venv>pip install pywin32==223
Collecting pywin32==223
  Downloading https://files.pythonhosted.org/packages/9f/9d/f4b2170e8ff5d825cd4398856fee88f6c70c60bce0aa8411ed17c1e1b21f/pywin32-223-cp36-cp36m-win_amd64.whl (9.0MB)
     |████████████████████████████████| 9.0MB 218kB/s
Installing collected packages: pywin32
Successfully installed pywin32-223

(venv) D:\pyvenv_xlwings64\venv>
(venv) D:\pyvenv_xlwings64\venv>
(venv) D:\pyvenv_xlwings64\venv>
(venv) D:\pyvenv_xlwings64\venv>pip list
Package    Version
---------- -------
comtypes   1.1.7
pip        19.2.3
PyQt5      5.13.1
PyQt5-sip  4.19.19
pywin32    223
setuptools 41.2.0
wheel      0.33.6
xlwings    0.15.3

(venv) D:\pyvenv_xlwings64\venv>python
Python 3.6.5 |Anaconda, Inc.| (default, Mar 29 2018, 13:32:41) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import xlwings
>>> 

Conda Install Library Error: failed with initial frozen solve. Retrying with flexible solve.

Error in CONDA installation Library:

conda install keras
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.

Solution:

conda config --set channel_priority flexible

Then it’s running normally

conda install keras
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: done

## Package Plan ##

  environment location: E:\Apps\Anaconda3

  added/updated specs:
    - keras


The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    tensorflow-base-1.15.0     |mkl_py37h190a33d_0        36.2 MB
    ------------------------------------------------------------
                                           Total:        36.2 MB

The following NEW packages will be INSTALLED:

  keras              pkgs/main/win-64::keras-2.2.4-0
  keras-base         pkgs/main/win-64::keras-base-2.2.4-py37_0

The following packages will be DOWNGRADED:

  tensorflow                       2.0.0-mkl_py37he1bbcac_0 --> 1.15.0-mkl_py37h3789bd0_0
  tensorflow-base                  2.0.0-mkl_py37hd1d5974_0 --> 1.15.0-mkl_py37h190a33d_0
  tensorflow-estima~                     2.0.0-pyh2649769_0 --> 1.15.1-pyh2649769_0


Proceed ([y]/n)?y


After looking at the installation process, it seems that keras is based on tensorflow 1.5…

Then I gave up keras, refactored the code, and used the tensorflow.keras Instead of keras. Most of keras are in tensorflow.keras Have, some can’t directly correspond to their own online search on the line.

Plugin is too old, please update to a more recent version, or set ANDROID_DAILY_OVERRIDE environment

Error:
Plugin is too old, please update to a more recent version, or set ANDROID_DAILY_OVERRIDE environment variable to “fa35b67976287d3da3af2aeff1d760df30957c4c”


Shotscreen


Solution
Main project build.gradle file modification

classpath 'com.android.tools.build:gradle:2.0.0-alpha3'

To:

classpath 'com.android.tools.build:gradle:2+'

Or go to the website http://tools.android.com/tech-docs/new-build-system Get the latest gradle version

[solution] build vins and orb-slam based on opencv4

Scheme for regular substitution via VScode.
When encountering an incorrect version of OpenCV

    1. Find.

(find_package\(OpenCV).*

    1. Replace:

$1 REQUIRED)

    1. CV_GRAY2RGB
    1. Find:

CV_(.*GRAY[^)]*)

Replace:

cv::COLOR_$1

    1. CV_AA
  1. Replace:

CV_AA

    1. Replace:

cv::LINE_AA

    1. CV_CALIB_*
    1. Replace:

CV_(CALIB[^ ,)]*)

    1. Replace:

cv::$1

    1. CV_LOAD_IMAGE_UNCHANGED、CV_LOAD_IMAGE_GRAYSCALE
    1. Find:

CV_LOAD_IMAGE_([^ )]*)

    1. Replace:

cv::IMREAD_$1

    1. Most other issues, just add the header file
      1. chessboard.cc Error
      No such file or directory

#include<opencv/cv.h>

#include <opencv2/imgproc/imgproc_c.h>
#include <opencv2/highgui/highgui_c.h>

[solution] install opencv3 with opencv4

Step 1: Download opencv download, the source code compilation package of opencv3. Step 2: when cmake, enter: cmake - D cmake_ INSTALL_ PREFIX=/home/username/opencv3 -D CMAKE_ BUILD_ TYPE="Rlease" -D OPENCV_ GENERATE_ Pkgconfig = on.. Step 3: compile and install

    make
    make install

Step 4: configure the environment

    sudo vi  /etc/ld.so.conf.d/opencv.conf
    input: /home/username/opencv3/lib

Step 5: configure bashrc
VI ~ /. Bashrc , and add:

    #opencv-3.4.12
    export PKG_CONFIG_PATH=${PKG_CONFIG_PATH}:/home/username/opencv3/lib/pkgconfig
    export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:./home/username/opencv3/lib

After saving, enter source ~ /. Bashrc
at this time, PKG config — modversion opencv will display 3.4.12, and opencv4 will display 4.2.0

Step 6: use opencv3
to edit CMakeLists.txt Before find (openCV required) , enter: set (cmake)_ PREFIX_ PATH "/home/username/opencv3")

Sublime text 3 does not support Chinese/[decode error – output not UTF-8] solution

Baidu in the online solution to others, found that the need for the following two steps can be achieved, but most of the methods are only the first step.

Step 1:

Open packages in the installation folder of sublime text and find the Python.sublime -Package, open with decompression software, modify the files inside Python.sublime -Build, add “encoding”: “cp936”

    {
      "cmd": ["C:/Python33/python.exe", "-u", "$file"],
      "file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)",
      "selector": "source.python",
      "encoding": "cp936"//Add the line, followed by a comma if there is content below
    }

Step 2:

Pythonioencoding is added to the system variable, and UTF-8 is filled in the value

      On the desktop, right-click on Computer and select Properties, select Advanced System Settings, select the Advanced tab, select Environment Variables

      Restart sublime text2.