User and group basic knowledge of Linux file attributes

root               😡                  :0                  :0                  :root                  :/root                  :/bin/bash Account Name: Account Password: Account UID: Account Group GID: User Description: User Home Directory: Shell Interpreter   Small conclusion: 1.useraddAdding users will change /etc/passwd, /etc/shadow, /etc/group, /etc/gshadow 2.passwdSetting the password for the user will change the /etc/shadow 3.groupaddAdding user groups will change /etc/group, /etc/gshadow   last View user logi...

Class DriverManager

1 /**Managing a collection of JDBC driven basic services 2 Note: The implementation of the new DataSource interface in the new JDBC 2.0 API provides another way to link data sources. 3 The object of using DataSource is the preferred solution. 4 */ 5 public class DriverManager { 6 7 // Register the JDBC driver collection. 8 private final static CopyOnWriteArrayList<DriverInfo> registeredDrivers = new CopyOnWriteArrayList<>(); 9 10 /** 11 Initialize JDBC driver by checking jdcb.properties loading 12 */ 13 static { 14 loadIniti...

Class XMLMapperBuilder

The categories involved include: MapperBuilderAssistant:MapperThe file parsing auxiliary class includes methods for parsing various nodes. BaseBuilder:XMLMapperBuilderWith the parent class of the MapperBuilder Assistant, three properties are saved: Configuration, TypeAlias Registry, and TypeHandlerRegistry. TypeAliasRegistry:Alias correspond to each other, preserving information about strings and classes, such as String. TypeHandlerRegistry:Correspondence between registered java.lang and java.sql type Configuration:MapperAfter parsing the node, it stores the parsed attribute informa...

design_model(8)composite

1.Combinatorial pattern A group of similar objects is combined according to a tree structure, and then a unified method is provided to access the corresponding objects, thus ignoring the differences between objects and object sets. 2.Example public interface Workfile { public abstract void KillVirus(); } public class Floder implements Workfile { @Override public void KillVirus() { } } class ImageFloder implements Workfile { @Override public void KillVirus() { } } public class CompositeHandler { private ArrayList<Workfile> f1 = new ArrayList<&g...

design_model(7)bridge

1.Bridging mode Based on the minimal design principle of classes, different classes take on different responsibilities by using encapsulation, aggregation, and inheritance behaviors. Its main feature is to separate the abstraction from the implementation so that the parts remain independent.Sex and coping with their functional expansion. 2.Example public interface Brand { } public class Huasuo implements Brand{ } public interface Computer { } public class Desktop implements Computer{  private Brand brand;   public Desktop(Brand brand) { super(); this.br...

Wuhan University OJ 622. Symmetrical

Description          Cyy likes something symmetrical, and Han Move likes something circular. Han Move gave you a circular string whose length is N, i.e. the i-th character of the string is the neighbor of the ( (i-1) mod N )-th character and ( (i+1) mod N )-th character.            As Cyy likes something symmetrical, you want to find out whether this string can be symmetrical. There’s an operation for you to make the string symmetrical. This operation is called “disconnect”. You can use “disconnect” only once to break the link between any two neighbor characters, makin...

Summary of Python—10

Because I taught myself Python while I was at work, once I got busy, Python would put it away for two days, but I forgot what I learned two days later. Today, summarize the various startup methods of Python. My document path: ——-    1Open the CMD where the file is located and tap directly in the command line.python Filename.Py (with.Py file suffix),It can output results directly.      Note: this opens the path directly. The filename.Py is not found.   2Open the CMD where the file is, and on the command line, tap directly: python, first enter the python interaction mo...

Regular expression check amount

An arbitrary positive number, not exceeding two decimal places.  /^(([1-9][0-9]*)|(([0]\.\d{0,2}|[1-9][0-9]*\.\d{0,2})))$/ If you want to confirm integer numbers,Change the above * to {1, n}. When n is equal to 12, the above expression indicates that the integer digit cannot exceed 13. The above ensures that no spaces, no English and special characters are allowed.