Tag Archives: windows

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.

Python error: syntax error: encoding problem: utf8

Python error: syntax error: encoding problem: utf8

Such as the title.
The first line reported an error, but I have checked the file code, it is indeed utf8.
At this point, use Notepad + + to open the file, and you can see the newline style of the file at the bottom right. (CR LF is windows style, LF is UNIX style)

so I found that the original. Py file is UNIX newline style, because I pulled it from GitHub, and the original author’s environment is probably UNIX.
So the. Py file can be converted to a Windows style line feed.

finish

Spring boot problem 1: error reporting life processing instructions for building a spring boot project

Operating environment

System: Windows 10

jdk:1.7

Development tool: Eclipse 4.6

Springboot version: 1.5.3
version

Build tool: Maven
0

Problems and their background

At the beginning of learning to build a spring boot project, the problems encountered.

After creating a new Maven project, add the pom.xml The file reported an error when adding the parent node (the content is as follows).

<parent>
<groupId> org.springframework.boot&lt ;/groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.4.2.RELEASE</version>
</parent>

The error information is as follows:

Error parsing lifecycle processing instructions

terms of settlement

According to the search results, two ideas are found

1. It is said that there is a problem with this version of eclipse, and the Maven plug-in needs to be updated.

2. It is said that there is a dependency conflict. You can clear the Maven warehouse and update it again.

The first method was tried, but it didn’t solve the problem. So we tried the second method to clear all the dependencies under. M2/repository/in the user’s home directory. Then, in eclipse, right-click the project — & gt; Maven — & gt; update project. After waiting for the update to complete, the error disappears automatically.

Error picture information:

Push failed Unable to access ‘https://github.com/‘: Failed to connect to github.com port 443: Timed

Remote push error to GitHub warehouse:

Push failed Unable to access ‘ https://github.com/ ‘: Failed to connect to github.com port 443: Timed out

terms of settlement:

Find the GitHub login Certificate in the certificate manager of the control panel and modify the account password.

You can also open it quickly through the CMD window, enter: rundll32.exe keymgr.dll ,KRShowKeyMgr

Failed to talk to init day

When using WSL in the morning, an error was reported:

root@PC0:/home/zhang# systemctl start ssh.service
System has not been booted with systemd as init system (PID 1). Can't operate.

This error report is easy to solve. The solution is to use Service :

root@PC0:/home/zhang# service ssh status
 * sshd is running

Then I try to shut down:

root@sidanzhang-PC0:/home/zhang# poweroff
System has not been booted with systemd as init system (PID 1). Can't operate.
Failed to talk to init daemon.

True pit, shut down all report wrong.
According to this answer: rebooting Ubuntu on windows without rebooting windows?- super user
the solution is to open a new window of PowerShell and run the command:

wsl --shutdown

If your win10 system has not been updated, the administrator can run the following command:

net stop LxssManager

When vivado2017 is started, the “error when launching” dialog box will pop up vivado.bat : Launcher time out”

If oxc000007b error occurs at this time, it is because 32bit DLL is used in 64 bit OS. It is generally caused by the wrong use of vcomp140.dll.

Slove problem:

    Enter https://cn.dll-files.com Search and download the required DLL (mainly its own system bit 32 / 64) and copy the DLL to the directory according to the instructions
    on 64 bit windows,
    the default path of 32-bit DLL file is C: (Windows) syswow64
    the default path of 64 bit DLL file is C: (Windows) system32 \
on 64 bit windows

Several common methods of inserting pictures into latex documents

zz from: http://hepg.sdu.edu.cn/Service/tips/latex/latexfig.html#top & http://liqunsun.spaces.live.com/Blog/cns!285A08B51269F219!109.entry

Generally, latex only supports inserting EPS (encapsulated postscript) format graphics files directly, so we should try to get EPS format files before inserting pictures into latex documents.

all kinds of application software under UNIX can output the results in PS format, Most software can also output EPS format. If the software can only output PS format but not EPS format results, it can be converted to EPS format by ps2epsi command. Please refer to man ps2epsi’s instructions. If the image file format is bitmap graphics file, it can be converted to PS or EPS format file by display and convert tools of image magic package. See man page and man page for details

instructions

the output of windows software becomes PS / EPS file: please refer to the

“How to convert the output of software in Windows system into PS and EPS files”

Description in the column

 

Inserting pictures into latex documents is realized by using some latex graphics processing macro commands. Many macro commands support inserting EPS format graphics files into latex documents

(1) Using the macro command of includegraphics (graphicx package)

First of all, you need to add the following in the file description of latex document:

/usepackage{graphicx}

Then, it is quoted in the place where the image needs to be inserted:
/ includegraphics [height = height] {image file name} or / includegraphics [width = width] {image file name}
where “height” and “width” refer to the height and width of the image to be printed, and the unit must be given, which can be centimeter (CM) or inch (in), The image file name in the above command refers to the file name of the image file to be inserted. The image must be in EPS format

When inserting a picture with the macro command includegraphics of the graphicx package, you can also rotate the picture by:
/ includegraphics [height = height] [angle = rotation angle] {picture file name}

The inserted graphics are usually in EPS, PDF, JPG, PNG and other formats. Suppose the name is fig, and put it in the same directory of your tex document.
1. First add a sentence / usepackage {graphicx}
in the introduction area. 2. If you want to insert an inline graphic, you can directly use
/ includegraphics [width = 5in] {fig},
without adding a suffix.
This width is my most commonly used option, which can also be changed to other options.
3. If you want to insert floating graphics, use
/ begin {figure} [htbp]
/ centering / includgraphics [width = 3.5in] {fig}
/ caption {something} / label{ fig:1 }
/ end {figure}
4. For EPS graphics, the compilation process is latex, dvips, ps2pdf.
for PDF JPG PNG graphics, the compilation process is pdflatex

Use the include graphics macro command (graphics package) to:

It is troublesome to insert pictures with graphics package

(2) Using psfig macro command

First of all, you need to add the following in the file description of latex document:

/usepackage{psfig}

Then, it is quoted in the place where the picture needs to be inserted:
/ psfig {figure = picture file name, height = height} or / psfig {figure = picture file name, width = width}
where “height” and “width” refer to the height and width of the picture you want to print, and the unit bit must be given, which can be centimeter (CM) or inch (in), The image file name in the above command refers to the file name of the image file to be inserted. The image must be in EPS format

(3) use the epsfig macro command

The usage of epsfig macro command is exactly the same as that of psfig. The specific method is as follows:
first, add the following in the file description of latex document:

/usepackage{epsfig}

Then reference where you want to insert the image:

/ epsfig {figure = picture file name, height = height} or / epsfig {figure = picture file name, width = width}

The “height” and “width” refer to the height and width of the picture you want to print. The unit must be given, which can be centimeter (CM) or inch (in). The height and width can also be in the above format

The image file name in the above command refers to the file name of the image file to be inserted, and the image must be in EPS format

        

(4) Using EpsF macro command

The usage of EpsF macro command is as follows: first, add the following in the file description of latex document:

/usepackage{epsf}

Then, you can refer to:
/ epsfxsize = width / epsffile {image file name} or / epsfysize = height / epsffile {image file name} where you want to insert the image

The “height” and “width” refer to the height and width of the image to be printed. The unit must be given, which can be centimeter (CM) or inch (in). The height and width can also be given in the above format, so that the length width ratio of the original image can be changed. The image file name in the above command refers to the file name of the image file to be inserted, and the image must be in EPS format

 

(5) Latex? Picture control command, position control

Latex controls the position of the image by adding an exclamation point to ignore the “aesthetic” standard.
/ begin {figure} [! HTB]
/ usepackage {float}
/ begin {figure} [H]
insert it into the corresponding position of your code.

1, insert the side-by-side subgraph
/ usepackage {subfigure}

/ begin {figure} [H]
/ centering
/ subfigure [subfigurecaption] {
/ label{ Fig.sub .1}
/includegraphics[width=0.4/textwidth]{ figurename.eps }}
/subfigure[SubfigureCaption]{
/label{ Fig.sub .2}
/includegraphics[width=0.4/textwidth]{ figurename.eps }}
/caption{MainfigureCaption}
/label{ Fig.lable }
/ end {figure}

2, control the image position
if you don’t like latex to automatically arrange the image position, you can use the float package, and then
use / begin {figure} [H].
/ usepackage {float}
1, insert JPG image
in the command line environment, use the command:
ebb figure.jpg
Generating bounding box file figure.bb .
Use the following command:
/ includegraphics [width = 0.8/textwidth]{ figure.jpg }
PDF texify can be directly compiled into PDF file.
2, insert BMP image
there is no way to insert BMP image directly. The current method is to use
gimp to convert BMP into JPG, and then insert it according to the above method. When converting, do not use windows built-in painter, as the image quality is lost too much. With gimp or
fastone image viewer, the JPG quality is the highest, and the image quality is better.
3, insert JPG and EPS images at the same time
the insert command remains unchanged. When compiling, it uses latex and dvi2pdf, and the
images in both formats can be displayed.
Insert EPS picture
use / includegraphics [options] {file} command to insert EPS picture. The following is the simplest example:
/ documentclass {article}
/ usepackage {graphicx}% using the graphicx package
/ begin {document}
/ includegraphics{ file.eps }% insert the picture, insert it according to the original size of the picture
/ end {document}
note:
(1) EPS file and Tex file are placed in the same folder, which can be called only by the file name, without writing the path.
(2) Pdflatex cannot be used at compile time, an error will occur. Even if there are no mistakes, you can’t see the diagram. We should use latex compilation to generate DVI, and then dvi2ps, ps2pdf can see the figure.
Use [options] to specify the image size:
/ includegraphics [width = 3in]{ file.eps }
set the image width to 3 inches, and the image height will be automatically scaled.
/includegraphics[width=/testwidth]{ file.eps }
set the image width to the text width.
/includegraphics[width=0.8/textwidth]{ file.eps }
set the image width to 0.8 times the text width
/ includegraphics [width = / testwidth-2.0in]{ file.eps }
set the image width to be 2 inches less than the text width.
Use [options] to specify the image rotation angle:
/ includegraphics [angle = 270]{ file.eps }
rotate the image 270 degrees.
The two options are used at the same time, separated by commas:
/ includegraphics [width = / testwidth, angle = 270]{ file.eps }

 

A few useful articles on graph problems in latex

Graphics and Colour with LaTeX 

Online guide to illustration and color use in latex

Figure’ing and picture’ing latex (PS format)

The method of inserting PS graph and xfig graph into latex

Using imported graphics in latex 2e (PS format)

The illustration in latex is discussed in detail, including basic concepts, file formats and their mutual conversion, related software, etc. in addition, how to replace the characters in PS format pictures with latex format characters is also discussed, so as to solve the problem that some application software can not use special characters such as Greek alphabet and complex mathematical formula expressions

Latex maths and graphics (PS format)

It is mainly about the method of inserting pictures and formulas into latex.

this paper introduces the method of inserting pictures and formulas into latex

About Visio to EPS

Many people are used to drawing with Visio (including me), but Visio can’t export EPS format, so they have to rely on third-party software. Save it as *. EMF format through Visio, and then open it with OpenOffice draw to export it to EPS format. When exporting, you need to select the open image, so that after exporting EPS, only the content of *. EMF image will be included, and there will be no large blank. But the EPS image exported by this method will be out of shape, for example, the straight line will often be intermittent, and the “computer” shape I added in Visio will also have inexplicable shadows. Or maybe I didn’t set it up.

There is another better solution, the EPS file exported is perfect. In other words, the Visio graphics are printed into PDF by acrobat printer, and then cut by gsview (gsview4.8). The specific process is as follows:

1 edit the image file and save it as PDF file

Install acrobat, print the edited picture as PDF file under Visio and word

 

2 to EPS file

Open PDF file in acobat and select Save as EPS file

 

3. Reduce EPS files

Open EPS file with gsview, select File — & gt; PS to EPS, select auto cut, and save it as another *. EPS file

Implementation of HTTPS file server based on nginx in win2012

Nginx and openssl: http://nginx.org/en/download.html

http://slproweb.com/products/Win32OpenSSL.html
Environment variable:
c:\ openssl-win64 \bin
th variable add %OPENSSL_HOME%

openssl genrsa -des3 -out xxx.key 1024
openssl req -new -key xxx.key -out xxx.csr
cp xxx.key xxx.key.org
openssl rsa -in xxx.key.org -out xxx.key
openssl x509 -req -days 365 -in xxx.csr -signkey xxx.key -out xxx.crt

Start nginx after modifying nginx.conf

server {
        listen       443 ssl;
        server_name  localhost;
		ssl_certificate      C://nginx-1.18.0//ssl//xxx.crt;
	    ssl_certificate_key  C://nginx-1.18.0//ssl//xxx.key;
        
		#charset koi8-r;

        #access_log  logs/host.access.log  main;

	    ssl_session_cache    shared:SSL:1m;
	    ssl_session_timeout  5m;
	
	    ssl_ciphers  HIGH:!aNULL:!MD5;
	    ssl_prefer_server_ciphers  on;

     location /update {
	        alias C:/hy-8000;
			allow all;
			autoindex on;

	        proxy_set_header   X-Real-IP            $remote_addr;
	        proxy_set_header   X-Forwarded-For  $proxy_add_x_forwarded_for;
	        proxy_set_header   Host                   $http_host;
	        proxy_set_header   X-NginX-Proxy    true;
	        proxy_set_header   Connection "";
	        proxy_http_version 1.1;
     }

Clion automatically adds add_ executable

CLion automatically adds add_executable
Install the C/C++ Single File Execution plugin, search for the C/C++ Single File Execution, find file-settings-plugins, and apply.
The preparations are complete. Next you can create a new C/ CPP file, enter the code, press Ctrl + Alt + Shift +E shortcut or right click in the code area and find Add Executable for Simple C/C++ File, then right click on the item area on the left and select Reload Cmake Project, select Auto-Reload so that it will automatically add to the executable after each right click on Add.

Mount windows NTFS partition under Linux

Mounting the Windows NTFS partition under Linux

How it works: Use the mount command to mount the partition under Windows into a directory under Linux.

1.uname -r View the current Linux kernel version.

2. Go to
http://www.linux-ntfs.org/ Download the same NTFS patch as the kernel version.

3. Install patch: RPM – the ivh kernel – the module – NTFS – 2. 7.0.x.x – x – 2.1.20-0. Rr. 4.10 i686. RPM

4. Use fdisk-l to view the partition information of the hard disk.

5.
5.
5.
5.
5.
5.

: mkdir/MNT /c corresponds to the C disk

mkdir/MNT /d corresponds to D disk

mkdir/MNT /e corresponds to e disk

6.mount -t NTFS /dev/xxx/MNT /x
6.mount -t NTFS /dev/xxx/MNT /x
6.mount -t NTFS /dev/xxx/MNT /x

: mount /dev/hda1/MNT /c

the mount -t NTFS/dev/hda5/MNT/d

the mount -t NTFS/dev/hda6/MNT/e