Java data structure (red-black tree) set collection HashSet HashSet three problems LinkedHashSetTreeSet TreeSet collection default rules sorting rules

Directory Data structure (red-black tree) red and black rules Red-black tree adding node rules set set summary HashSet Three problems with HashSet LinkedHashSet summary TreeSet TreeSet collection default rules Sorting rules (first sorting method) Method 2 practise Xiaolian Summarize Summary: How to choose when using collections Data structure (red-black tree) Red and black rules The […]

ProtoBuf compiles and generates Google.Protobuf.dll and Protoc.exe, and customizes the code generation rules

Article directory ProtoBuf basic introduction Import ProtoBuf locally Compile and get Google.Protobuf.dll Compile to get the Protoc.exe executable file CMake compiles ProtoBuf into Visual Studio basic configuration Resolve errors after Finish Error 1 and solution: googletest Error 2 and solution: abseil-cpp Visual Studio generates basic exe operations Use Protoc.exe to compile Proto files into C# […]

Practical data analysis | Association rules analysis – shopping cart analysis

Table of Contents 1. Data and analysis objects 2. Purpose and analysis tasks 3. Methods and Tools 4. Data reading 5. Data understanding 6. Data preprocessing 7. Generate frequent itemsets 8. Calculate correlation 9. Visualization 1. Data and analysis objects Dataset link: Online Retail.xlsx This data set records 541,909 online communication records from December 01, […]

Change the network card name to the traditional naming rule of CentOS6 in CentOS/RHEL7 environment

picture Introduction to CentOS/RHEL7 network card naming rules picture The traditional naming method of Linux server network cards is from eth0, eth1, eth2…. However, this number often does not necessarily correspond to the physical order of the network card interfaces. In regular mode, the server equipment we use may only have One network card. If […]

2. Sentinel basic application & current limiting rules (2)

2.2.1 What is Sentinel is an open-source, lightweight, high-availability flow control component for distributed service architectures developed by the Alibaba middleware team. It mainly uses traffic as the entry point to help users protect services from multiple dimensions such as flow control, circuit breaker degradation, and system load protection. stability. 2.2.2 Basic concepts ? Resources […]

JavaScript encapsulates form functions, validates rules, and then submits

<html> <head> <meta http-equiv=”Content-Type;charset=utf-8″/> <title>Function Curry</title> <style type=”text/css”> #user,#pwd {<!– –> color:red; font-size: 14px; } </style> </head> <body> <!– verify=”username|required” is the rule you want to add –> <form id=”form1″ method=”post” action=””> <input type=”text” name=”user” value=”” verify=”username|required” size=20/><span id=”user”></span> <br/> <input type=”password” name=”pwd” value=”” verify=”password|required” size=20/><span id=”pwd”></span> <br/> <input type=”button” name=”btn” value=”Submit”/> </form> <script type=”text/javascript”> […]

SpringCloud Gateway+Nacos, how to dynamically implement 1000+ routing rules?

Environment: SpringBoot2.7.12 + SpringCloud 2021.0.7 + Spring Cloud Alibaba 2021.0.4.0 1. Introduction What is Gateway? Spring Cloud Gateway is part of the Spring Cloud ecosystem and is a gateway server built with technologies such as Spring Framework 5, Spring Boot 2, and Project Reactor. It is mainly used to provide routing, load balancing, security, current […]

Calcite custom optimizer rules

1) Summary 1. Create CSVProjectRule and inherit RelRule a) Implement matching rules in the CSVProjectRule.Config interface Config DEFAULT = EMPTY .withOperandSupplier(b0 ->b0.operand(LogicalProject.class).anyInputs()) .as(Config.class); b) In the CSVProjectRule implementation class, if the rule is matched, conversion will be performed @Override public void onMatch(RelOptRuleCall call) { final LogicalProject project = call.rel(0); final RelNode converted = convert(project); if […]

When the verification rules need to change according to conditions, use computed (a certain field contains multiple objects that need to be verified)

Requirement description: Verification form 1. When the area is mainland China, the mobile phone number is required but the contact number is not required; otherwise, the opposite is true. 2. Each email address should conform to the correct email format; when the warehouse type is a virtual warehouse, the email address is required, and in […]