Make statistics according to the annual / monthly / daily data, and fill in 0 for the empty data
Let me show you what the requirements are like:
Display the data of each node according to the time interval to form a curve.
My first method is to use mysql functions:
SELECT
@a :=@a + 1 AS `index`,
DATE_FORMAT(ADDDATE( #{startDate} ,INTERVAL @a DAY),'%Y-%m-%d') AS date
FROM
mysql.help_topic,(SELECT @a:=-1) ...
Posted on Wed, 20 Oct 2021 16:49:36 -0400 by Trafalger
Java se note exception mechanism
Java exception mechanism
In an ideal situation, our program will run according to our ideas. It is reasonable that there will be no problems. However, the code is not necessarily perfect after actual writing. There may be situations we have not considered. If these situations can get an error result normally, it is OK, but what if they directl ...
Posted on Wed, 20 Oct 2021 16:42:31 -0400 by public-image
hibernate Association
1, One to many configuration and lazy loading query
1. One to many
1.1 association refers to the reference relationship between classes.
If class A is associated with class B, the referenced class B will be defined as an attribute of class A.
1.2. One to many association:
For example: orders and order items. An order has multiple order ite ...
Posted on Wed, 20 Oct 2021 16:34:07 -0400 by chandler
Introduction and deployment of kvm virtualization
1. Introduction to virtualization
Virtualization is the foundation of cloud computing. In short, virtualization enables multiple virtual machines to run on a physical server. Virtual machines share CPU, memory and IO hardware resources of physical machines, but logically, virtual machines are isolated from each other.
The physical machine ...
Posted on Wed, 20 Oct 2021 16:31:37 -0400 by TMX
MemCached data cache - database (improve efficiency)
MemCached cache operation
When a Web project is running, it usually needs to read and write from the database. With the increase of the amount of operation data and the concentration of visits, the load of the database increases, the database response slows down and the website access speed slows down. Memcached is used to solve these problems ...
Posted on Wed, 20 Oct 2021 16:22:21 -0400 by Tiger99
Optimization of Bert as service
1, Service deployment
PyZMQ is implemented in Python using zeroMQ, which provides a lightweight and fast messaging implementation. A simple example of using C/S messaging is as follows:
import zmq
import zmq.decorators as zmqd
@zmqd.socket(zmq.PUSH)
def send(sock):
sock.bind('tcp://*:5555')
sock.send(b'hello')
# in another process ...
Posted on Wed, 20 Oct 2021 16:19:34 -0400 by spasm37
Implementation of Spring AOP asynchronous operation and Cache operation (PROJECT04_DAY03_01)
5. Implementation of spring AOP asynchronous operation
5.1 asynchronous scenario analysis
In the process of developing the system, the performance of the system is usually considered. An important idea to improve the system performance is to change "serial" to "parallel". Speaking of "parallelism" is naturally in ...
Posted on Wed, 20 Oct 2021 16:10:32 -0400 by sigmon
React - React component
Introduction to React components
The component is a first-class citizen of React. Using React means using the componentComponent represents some functions in a pageCombine multiple components to achieve complete page functionsFeatures: reusable, independent and composable
How components are created
1. Function creation component
Function co ...
Posted on Wed, 20 Oct 2021 15:59:58 -0400 by alwaysinit
Iterator pattern of design pattern
Iterator mode
definition Provides a method to sequentially access the elements of an aggregate object without exposing the internal representation of the object. In short, different types of objects may require different traversal methods. We assign an iterator to each type of object, and finally combine multiple iterators into one Main soluti ...
Posted on Wed, 20 Oct 2021 15:55:16 -0400 by ajar
Python standard library: os
os, as its name implies, is the standard library related to the operating system. Such as files, directories, executing system commands, etc.
1. Import module
os is a python standard library module. It can be installed with Python without separate installation and can be imported directly.
import os
2. path sub module
When it comes ...
Posted on Wed, 20 Oct 2021 15:36:36 -0400 by clairence