Stop writing tool classes by yourself, Spring Boot has all the built-in tool classes you need! !

Assertion An assertion is a logical judgment that checks for something that shouldn’t happen The Assert keyword was introduced in JDK1.4 and can be turned on through the JVM parameter -enableassertions SpringBoot provides the Assert assertion tool class, which is usually used for data validity checking. //Requires parameter object to be non-null (Not Null), otherwise […]

◢Django self-written paging and usage

Table of Contents 1. Set the paging style and display it to the browser 2. Simulate page number 3. Generate paging 4. Data display 5. Previous pageNext page 6. Database data paging 7. Package paging 8. Use encapsulated paging After building the app, set the path path(‘in2/’, views.in2), view def in2(request): , HTML: in2.html 1. […]

[Linux Process Control (3)] Process Program Replacement–How to implement a bash interpreter yourself?

Blogger CSDN homepage:Hangdian Code Farmer-NEO ? ?Column classification:Linux from entry to proficiency? ? Code Warehouse: NEO’s Learning Diary ? Follow meTeach you more operating system knowledge ? Process program replacement 1 Introduction 2. Understanding of exec series functions 3. execl series functions 4. execv series functions 5. Usage scenarios of program replacement 6. Implement a […]

[PyQt] (self-made class) handles mouse click logic

I wrote a class that I think is pretty good to simplify the mouse information in mousePressEvent, mouseMoveEvent and mouseReleaseEvent. The functions include the following: Current mouse status, including left/middle/right mouse button and click/double-click/lift Mouse anti-shake (only when the mouse has moved beyond a certain level), the sensitivity can be set; Mouse long press (triggered […]

Comprehensive understanding of self in Python

For students who are new to Python, self is often seen in classes. So, what is self? This has to start with object orientation. Python has been an object-oriented language from the beginning. It is easy to create classes and objects in Python. For example, the following code snippet: defines aclassEmployee #!/usr/bin/python # -*- coding: […]

18 | How to develop a big data SQL engine yourself?

Starting today, we have entered the third module of the column, and let’s take a look at the practical process of big data development. When learning a technology, it is always difficult to passively accept it as a learner. But if you look at it from the perspective of a developer, many things will suddenly […]

[Allwinner H616 uses the standard library to complete the self-made serial port library (implemented in separate files) orangepi zero2 (open source)].md update: 23/11/07

Article directory Note when playing with H616: Linux kernel version 5.16 and above, you need to manually configure the i2c-3 uart5 driver Configuration example When compiling by files, each file must be compiled together (separated by spaces) Example: ggc a.c b.c b.h -lpthread -lxxx..; Common commands View driver files View kernel detection information/hardware Use the […]

Assert and CommUtils throw exceptions (self-recorded)

Assert Assert.notNull(vo, “The loan information is empty”); Assert.notBlank(vo.getLoanId(), “The loan number is blank”); Assert.notEmpty(busiLoanApplyDto.getCustId(), “The customer number is empty!”); Assert.notNull(busiLoanApplyDto.getApplyTerm(), “The loan term is null!”); Assert.isTrue(0 != busiLoanApplyDto.getApplyTerm(), “The loan term is empty!”); Assert.notNull(busiLoanApplyDto.getLoanAmount(), “The loan amount is null!”); Assert.notEmpty(busiLoanApplyDto.getLoanCode(), “The loan application number is empty”); CommUtils (self-created class) String validate = ValidationUtils.validate(signMemberInitDto); if (CommUtils.isNotEmpty(validate)){ […]