[redis] redis quick start (Intensive)
1, Basic command
1. Switch database (select)
redis has 16 databases by default, and the 0 database is used by default
Command for switching data: select number
localhost:6379> select 2
OK # Switching succeeded
localhost:6379[2]> # 6379 [2] represents the third database
2. set and get methods
Command 1: set ...
Posted by Tomz on Fri, 19 Nov 2021 13:18:23 -0800
linux privilege maintenance (partial)
Modify permissions:
Add Account:
Add normal users:
useradd guest;echo 'guest:123456'|chpasswd
Add root user (mentioned above)
echo "test:advwtv/9yU5yQ:0:0:,,,:/root:/bin/bash" >>/etc/passwd
Account: test
Password: password@123
It's easy to add an account to maintain permissions.
Defense method:
Query Privileged User Privi ...
Posted by bubbadawg on Fri, 19 Nov 2021 12:48:45 -0800
LeetCode notes_ 391. Perfect rectangle
Title Description
Give you an array of rectangles, where rectangles[i] = [xi, yi, ai, bi] represents a rectangle with parallel coordinate axes. The lower left vertex of the rectangle is (xi, yi) and the upper right vertex is (ai, bi).
Returns true if all rectangles together exactly cover a rectangular area; Otherwise, false is returned.
...
Posted by Baumusu on Fri, 19 Nov 2021 12:41:53 -0800
Android realizes the effect of immersive status bar
What is the status bar:
It refers to the top left of the mobile phone, showing China Mobile, security guards, power, network speed, etc. at the top of the mobile phone. The drop-down will display the notification bar.
Let me show you a picture Immersive status bar:
Simply put, the status bar will change color adaptively according to the mob ...
Posted by scarface222 on Fri, 19 Nov 2021 12:36:34 -0800
[C language] an easy-to-use circular queue and use example (AT framework taking EC200/600 as an example)
1. Preface
Previous: https://blog.csdn.net/ylc0919/article/details/111050124 It's been ten months since I said I would send the second generation framework. It's hard to have time to summarize the harvest during this period. After writing the first generation AT queue, I have many ideas. For example, can one AT queue manage multiple AT mod ...
Posted by webtailor on Fri, 19 Nov 2021 12:14:48 -0800
Getting started with Python -- object oriented
Basic overview of object oriented
Object oriented programming (OOP): more extensible and readable. Object oriented programming encapsulates data and operation data into objects. The way of organizing code and data is closer to human thinking and improves programming efficiency.python supports many programming paradigms such as object-oriented, ...
Posted by superman on Fri, 19 Nov 2021 12:14:19 -0800
Send event (SSE) streams using the servers of Node and Koa
When you want to update your Web application in real time, you can rely on old-fashioned periodic polling or try some modern technology with push function. Your first impulse may be to use WebSockets . However, if you only want to receive data from the server, you can use Server Sent Events.
Traditionally, web pages ...
Posted by trrobnett on Fri, 19 Nov 2021 12:04:47 -0800
Netty's responsibility chain model filter chain implementation source code analysis
2021SC@SDUSC
Let's analyze the details of outbound data propagation. Let's start with the write method of ChannelOutboundHandlerAdapter:
public void write(ChannelHandlerContext ctx, Object msg, ChannelPromise promise) throws Exception {
ctx.write(msg, promise);
}
If you want to implement your own business processing logic, ...
Posted by alexszilagyi on Fri, 19 Nov 2021 11:45:54 -0800
Why does the HashMap under the high parallel distribution have a dead cycle
preface
the deadlock problem in the case of HashMap concurrency exists in jdk 1.7 and before. jdk 1.8 has been repaired by adding loHead and loTail. Although it has been repaired, if concurrency is involved, it is generally recommended to use CurrentHashMap instead of HashMap to ensure that thread safety problems will not o ...
Posted by DeadFly on Fri, 19 Nov 2021 11:36:14 -0800
Knowledge system of Web front end development engineer_ 24_JavaScript core
1, ES5 (ECMAScript version 5)
1. Add a function in the array
Judgment function
every() is used to judge whether all elements in an array meet the requirements. The format is as follows:
var Judgment result=array.every(
function(Current element value n,Current subscript i,Current array ...
Posted by jcanker on Fri, 19 Nov 2021 11:33:57 -0800