class.getResource () and ClassLoader.getResource How to fill in the parameters in ()

Class.getResource(String Name) : Find the resource under the same path as the current calling Class
For example, my current Class below the impl package, then the Class. The getResource () is located in path:/D:/learnSpringboot/basicJava/out/production/basicJava impl /
1. If the query resources are the same as the current classpath, they are all under the impl package
Class.getResource(” XXX. XXX “)
Class.getResource(” /impl/ xxx.xxx “)
ClassLoader.getResource(String Name) : Find the resource file in the root directory, i.e. “/” or the classpath directory
2. If the query resource is not at the same level as the current class
For example, my current class below the impl package, so this. GetResource () is located in path:/D:/learnSpringboot/basicJava/out/production/basicJava /,
I have to use the relative path notation
This getResource (” XXX/XXX. XXX “)
 
Reference blog: https://blog.csdn.net/qq_33591903/article/details/91444342
https://blog.csdn.net/zhangshk_/article/details/82704010

Datatable plug-in error: uncaught typeerror: cannot read property ‘style’ of undefined

DataTable plug-in: Uncaught TypeError: Cannot read property ‘style’ of undefined
DataTable plug-in: Uncaught TypeError: Cannot read property ‘style’ of undefined
The number of columns defined in the table does not match the number of entries in the aoColumns table
Page presentation (7 columns)

Return data (6 columns)

The difference between single equal sign and double equal sign EQ in shell script

The single and double equal signs are arithmetic operators. “-eq” is a relational operator
Single and double equals
Equivalence in the conditional expression “[]” can be used to compare strings to strings or to compare integers to integers.
In the arithmetic expression “(())”, the single equal sign is the assignment arithmetic operator, and the double equal sign is the equality arithmetic operator.
“-eq”
The equality operator ‘-eq’ cannot be used in the arithmetic expression ‘(())’. It can only be used for equality comparisons of integer Integers.

Linux Tomcat accessing files on the server

 
It took a long time for the IT novice to figure IT out, especially the first one, which he tried unsuccessfully for a long time, was to restart the Tomcat server
 
The first method is to modify the server.xml file in the conf directory
In & lt; Host> I’m going to add in the tag

< Context path=”/upload2″ reloadable=”true” docBase=”/test/t2″/>
Path is the path you type in the browser and DocBase is the actual path to your server folder
After the change, you need to cut back to the bin directory and restart Tomcat:
To shut down Tomcat./shutdown. Sh
Open the Tomcat./startup. Sh
 
FTP then forwards an image to the server’s /test/t2/ directory
In the browser through the URL access, preceded by the server public network IP or domain name

 
The second method: create a new configuration file in conf/Catalina/localhost (recommended)
In the/usr/local/tomcat/conf/Catalina/localhost (if the directory does not exist, create) to create a file ` upload. XML ‘
& lt; ?The XML version = “1.0” encoding = “utf-8”?>
< Context path=”/upload” reloadable=”true” docBase=”/home/admin”/>

br> N>
The fil>e and path values must be the same
This approach does not require a restart of the Tomcat server

Top35: pychar reports an error when connecting to MySQL server returns invalid timezone. Need to set ‘servertimezone’ property

Top35: Server returns invalid timezone. Need to set ‘ServerTimezone’ property.
Error content error cause solution

Content of the error

Error reason

Server returns invalid timezone. Need to set ‘ServerTimezone’ property.
The server returning an invalid time zone needs to set the ‘ServerTimeZone’ property.
reasons: MySQL driver jar package the default time zone was UTC
the UTC is the representative of a global standard time, but we use time is Beijing time zone that is east eight area, UTC eight hours ahead.
The solution
Joining together?ServerTimeZon =UTC