23 design patterns -- simple factory pattern (python version)
Simple factory mode
In real life, primitive society is self-sufficient (without factories), small workshops in farming society (simple factories, folk wineries), industrial revolution assembly lines (factory methods, self production and self marketing), and modern industrial chain generation factories (Abstract factories, Foxconn). Our project ...
Added by catalinus on Tue, 15 Feb 2022 11:56:23 +0200
"Function object" in C + +
Function object
Concept of function object
Concept: ○ classes that overload function call operators, and their objects are often called function objects; ○ when the function object uses overloaded (), its behavior is similar to function call, so it is usually called imitation function;Essence: ○ function object (imitation function) is a ...
Added by huckfinne on Tue, 15 Feb 2022 11:45:57 +0200
Summary of setting up SSL secure connection between ODL and OVS
As the mainstream SDN controller at present, ODL has been used by major manufacturers. The SSL secure connection between ODL and OVS is rarely fully shared on domestic and foreign networks. Based on the practice of SSL secure connection (active connection and passive connection) between ODL and OVS, this paper comprehensively expounds the setti ...
Added by cyber_ghost on Tue, 15 Feb 2022 11:44:36 +0200
Deep understanding of redis -- cache avalanche / cache breakdown / cache penetration
1. Cache avalanche2. Buffer breakdown3. Cache penetration4. Summary 1. Cache avalancheHow does cache avalanche happen?1) The redis service directly hangs up, and redis crashes completely2) A large number of caches in redis expire at the same time, resulting in a large number of queries directly hitting mysqlsolve1.1) redis cache cluster achieve ...
Added by blackcow on Tue, 15 Feb 2022 11:24:34 +0200
Thinkpad T480 unlock BIOS hidden menu + modify whitelist + cfg lock
It is risky to brush BIOS, and the operation should be cautious. I am not responsible for any problemBIOS brushing is risky and requires careful operation. I am not responsible for any problemsBIOS # is risky and requires careful operation. I am not responsible for any problemsprefaceI'm not a professional, and I don't necessarily solve the pro ...
Added by ignace on Tue, 15 Feb 2022 11:22:19 +0200
llvm libLLVMCore source code analysis 01 - Type Class
Source path
llvm\include\llvm\IR\Type.h
llvm\include\llvm\IR\DerivedTypes.h
llvm type system
Llvm type system is one of the most important features of llvm IR. It is an important difference between llvm IR and ordinary three address code. It is the basis of a series of IR based optimization. Take the following source code as an example:
// ...
Added by hothientuan on Tue, 15 Feb 2022 11:22:46 +0200
day03 event advanced
1. Registration event (binding event)
① Overview
Adding an event to an element is called a registration event or a binding event. There are two ways to register events: traditional method and method listening registration method
Traditional registration method:
Use the event onclick starting with on <button οnclick="alert('hi~')">< ...
Added by NogDog on Tue, 15 Feb 2022 11:14:08 +0200
JUC study notes
JUC concurrent programming
What is JUC It refers to the abbreviation of these three packages in java
Small knowledge review
A process can have multiple threads, at least one java has two threads by default
main threadGC thread java itself cannot start the thread. It calls the local native method 6 states of threads public enum ...
Added by Duke555 on Tue, 15 Feb 2022 10:56:44 +0200
Niuke video summary 2 (brief introduction to Dutch flag problem, classic / random fast sorting, heap sorting and heap)
Niuke video summary 2
Double pointer problem
Task 1: sort left and right
Given an array arr and a number num, please put the number less than or equal to num on the left of the array and the number greater than num on the right of the array. Additional space complexity required
O
...
Added by jwbworks on Tue, 15 Feb 2022 10:53:39 +0200
Project practice, Redis cluster technology learning
2. Forget nodesBecause the nodes in the cluster constantly exchange node states with each other through the mission message, a robust mechanism is needed to make all nodes in the cluster forget the offline nodes. In other words, let other nodes no longer exchange Gossip messages with the nodes to be offline. Redis provides the cluster forget{do ...
Added by djr587 on Tue, 15 Feb 2022 10:41:29 +0200