Tag Archives: editor

Vscode automatically formats the code when an error is reported

Use default

Prettier vscode save code auto format plug-in used by vscode
select formatonsave in vscode settings or modify it in setting.json

"editor.formatOnSave": true,

Use eslint for automatic formatting

Sometimes your front-end project uses eslint, which has automatic formatting configuration. We want to use the project’s own eslint configuration. We can use the format of eslint when saving automatically.

Let’s install the eslint plug-in first

Then set it in vscode

"editor.codeActionsOnSave": {
        "source.fixAll.eslint": true
 }

Add this configuration. In this way, the eslint configuration of the project itself will be used when saving.

After modifying the Tomcat configuration file in development, the modified configuration file will be automatically restored after ecplise starts Tomcat

The causes of the problem are as follows:


The reason is that when Tomcat is added in eclipse, eclipse will automatically store the Tomcat configuration file. When the Tomcat server starts in eclipse, it will replace the original Tomcat configuration file with its stored Tomcat configuration file.


resolvent:


1. Set ecplise to cancel the automatic publishing function

    in ecplise, select window preferences server launching to cancel automatically publishing Wen starting servers and click OK to finish operation

    2. In ecplise project, there is a server project, a Tomcat VX. X server at localhost config, in which there are configuration files to modify the files directly. When Tomcat is republished, it will use the configuration files here to cover the files in conf under Tomcat

SLAMBook2 in ch3 code run fatal error: Eigen/Core: No such file or directory

1. First determine whether you have installed eigen3

If not, use the following command to install:

sudo apt-get install libeigen3-dev

2. The installation directory is inconsistent with the directory specified in cmakelists.txt

The default installation directory in cmakelists.txt is as follows:

modify it to the correct path

the final running success is as follows:

[Solved] KEIL MDK Warning: “no browse info for symbol in this context”

If there is no Chinese path, enter   Option for target-> ouput-> Cancel the check of browse information, click rebuild all target files to recompile all the files, re check the check of browse information, re check the check of browse information, and recompile all the files, the perfect solution, you can go to define happily!!!

About WLW (Windows Live Writer): “unable to connect to your log service: invalid server response” solution

The following error occurred while configuring the blog’s WLW (Windows Live Writer) service: “unable to connect to your log service: invalid server response – received response from the log server blogger.getUsersBlogs Method’s response is invalid: invalid response document returned from XMLRPC server. Please try to resolve the problem and try again. ”

Document the solution:

Windows Live Writer (hereinafter referred to as WLW) is a very convenient blog offline editor launched by Microsoft. Recently, I want to use it to update the blog, but there are many problems in the configuration. Please record here for more friends to see.

First of all, to use WLW in WordPress, you must enable the XML-RPC publishing protocol. This protocol is enabled by default in WordPress versions after 3.5. If it is a version before 3.5, you need to find the xml-prc protocol under the “Settings – & gt; composition” menu, and then open it.

After the service is started, configure the parameters according to the regulations and wait for the link. The result is “unable to connect to your log service: invalid response from the server – the response received from the log server is invalid” blogger.getUsersBlogs Method’s response is invalid: invalid response document returned from XMLRPC server. Please try to resolve the problem and try again. ” This is a mistake.

The cause of this problem is very simple – this is due to a bug in WordPress itself. Under UTF-8 encoding, XML RPC returns an incorrect format and lacks three bytes.

Find the reason and solve it

    Step 1: find class- IXR.php The second step is to open and edit the class- IXR.php File, and then find the statement [$length = strlen ($XML);] to replace [$length = strlen ($XML) + 3;], and the problem is solved!

Note: please back up the original file before editing

OK, restart WLW to link. Is that ok?

OK, the problem was solved successfully~~

Solve rstudio software error: fatal error error system error 5 (access denied) problem, pro test effective

1. Error reporting:

2. Error report: because the current system user name is in Chinese, there is a garbled code when reading the path, which cannot be recognized.

3. Solution: modify the values of the current user’s environment variables temp and TMP. Change the variable value to a path without Chinese name.

4. Restart rsudio software: the software can be used normally.

There was a problem with the editor ‘vi’


There was a problem with the editor ‘vi’


submitted the code through git commit-m 'modify message' in the project. It was found that the modify message submitted was not accurate, so I wanted to modify it. Use the git commit -amend command to modify modify message. After editing the message in vim, the w+q exits with an error and the 0 message1 fails to save,
2
The error message is:






error: There was a problem with the editor 'vi'.
Please supply the message using either -m or -F option.


Solutions:







git config --global core.editor /usr/bin/vim

Amend git commit --amend is OK this time.
Reference:

http://tooky.co.uk/there-was-a-problem-with-the-editor-vi-git-on-mac-os-x/