Table of Contents 1. Representation of keys 1.1 Numerical conflict problem 1.2 Identifier management 2.3 Identifier management solution 2.4 How to pass string type as template parameter? 2.5 String literals 2.6 The trouble with strings as VarTypeDict keys 2.7 Use class (or structure) name as key 2. Brief performance analysis of VarTypeDict 3. Use std::tuple […]
Tag: policy
ASP.NET Core policy authorization and ABP authorization
Policy authorization in ASP.NET Core First let’s create a WebAPI application. Then introduce the Microsoft.AspNetCore.Authentication.JwtBearer package. Strategy In the ConfigureServices method of the Startup class, the form of adding a policy is as follows: services.AddAuthorization(options => { options.AddPolicy(“AtLeast21”, policy => policy.Requirements.Add(new MinimumAgeRequirement(21))); }); Here we go step by step. services.AddAuthorization is used to add authorization […]
Centos7 SSH login security policy
Article directory 1. Public key login 1. Create public key and secret key through SecureCRT Generate public key Apply to SecureCRT and server 2. Create public key and secret key through Windows 10 Generate public key Applied to SecureCRT and other terminals and servers 2. Change the SSH port, cancel SSH password login, and only […]
[Front-end] How to solve the single sign-on problem in the context of the same-origin policy?
What is the same origin policy? Same origin policy is a security policy proposed by netScape. It is the core and most basic security function of the browser. If the same origin policy is missing, the browser will be very vulnerable. Vulnerable to XSS, CSFR and other attacks. The specific performance is that before the […]
Linux modifies scheduling policy and priority
1. Overview of Linux scheduling strategies The kernel’s default scheduling algorithm is the cycle time sharing strategy (SCHED_OTHER or SCHED_NORMAL). The real-time scheduling strategy is divided into two types: SCHED_RR and SCHED_FIFO. In the Linux system, these two scheduling strategies have 99 priorities, and their priority values range from 1 (low Priority) ~ 99 (high […]
HarmonyOS multi-audio playback concurrency policy and audio management analysis
Audio interruption strategy Multi-audio concurrency, that is, multiple audio streams are played at the same time. In this scenario, if the system is not controlled, multiple audio streams will be mixed and played, which will easily make users feel noisy and cause a bad user experience. In order to solve this problem, the system presets […]
A062-Firewall security configuration-Configuring Iptables firewall policy
Experimental steps: [Teaching Resource Category] Serial number Category Tick√ 1 Learning Resources √ 2 Individual soldier mode competition question resources 3 Group competition question resources [Teaching resource name] Firewall security configuration – configure security settings iptables firewall policy [Teaching Resource Classification] First level category Second level categories Tick√ 1.Safety standards laws and regulations Industry Standard […]
Redis delete expired key policy
Article directory Preface Expiration time of key in Redis Use the EXPIRE command to set the expiration time (seconds) when creating the key Use the EXPIREAT command to set a precise expiration time (unix timestamp) Use the PEXPIRE command to set the expiration time (milliseconds) Use the PEXPIREAT command to set millisecond-precise expiration time Set […]
[Android] [AOSP] LMK process priority policy
1. What is LMK In AOSP, Low Memory Killer (LMK) is a memory management mechanism that determines which processes should be killed to release memory based on the priority of the process. This mechanism is implemented through a kernel task (kswapd), which continuously scans memory usage and triggers the LMK mechanism when memory is insufficient. […]
SQLAlchemy related table deletion policy settings
Table of Contents SQLAlchemy association table Common cascading options foreign key SQLAlchemy related table SQLAlchemy is a Python ORM (Object Relational Mapping) library that allows you to use classes in Python to represent tables in the database, making database operations more convenient. In SQLAlchemy, you can use association tables to define relationships between two tables, […]