Many friends can't distinguish between "byte order" and "bit order"~
Reprinted from: Many friends can't distinguish between "byte order" and "bit order"~
Many friends can't distinguish between "byte order" and "bit order"~
yesterday
The following article comes from the last bug, the author bug bacteria
1. Parse byte order
1) In fact, man ...
Added by TheAngst on Tue, 14 Sep 2021 01:48:52 +0300
545-C + + multithreaded programming
C + + language level multi-threaded programming code can cross platform windows/linux/mac
Introduction to C + + multithreading
thread(Thread class)
mutex(mutex )
condition_variable(Communication between threads, condition variables)
Smart lock:
lock_quard
unique_lock
atomic Atomic type based on CAS The atomic type of the operation is thread ...
Added by swissmissflash on Sun, 12 Sep 2021 02:38:21 +0300
C + + container notes
C + + container
General characteristics
A basic feature of all containers is that it holds elements in "value" semantics.
That is, the container stores copies and copies of elements, not references.
Cost: high overhead and reduced performance.
resolvent:
1. Try to implement transfer construction and transfer assignment function ...
Added by lihman on Sat, 11 Sep 2021 22:54:58 +0300
Educational codeforces round 113 C. July meeting
https://codeforces.com/contest/1569/problem/C
Meaning:
n numbers. Every time it passes through a number, it will be - 1. If no number is continuously reduced twice when all numbers are reduced, such a sequence is called a good sequence. Find the number of all good sequences. The answer is mod998244353
Solution:
We can find that no matter wh ...
Added by EdN on Thu, 09 Sep 2021 23:02:19 +0300
Process communication -- mmap file memory mapping
Process communication - mmap file memory mapping
#include <sys/mman.h>
void *mmap(void *addr, size_t length, int prot, int flags,
int fd, off_t offset);
int munmap(void *addr, size_t length);
PROT_EXEC //Pages may be executed.
PROT_READ // Pages may be read.
PROT_WRITE // Pages may be written.
PROT_NONE // Pages may n ...
Added by Drace on Wed, 08 Sep 2021 21:08:43 +0300
2021-09-06 learning record of C++ Primer: Chapter 15
Chapter 15 object oriented programming
15.1 OOP: Overview
The core idea of Object-Oriented Programming is:
Data abstraction (Chapter 7)inheritDynamic binding
(1) Inherit
Base class: Quote, which means books sold at original price.
Derived class: Bulk_quote, which means books that can be sold at a discount.
These classes will contain ...
Added by $kevan on Tue, 07 Sep 2021 00:56:51 +0300
C + + Basics
Process oriented object-oriented
Development of C + + language
In 1979, Benjamin straw, the father of C + +, developed C with class c language with classes C language is a subset of C + + language. C + + language is an extension of C language C + + was officially named in 1983 In 1985, CFront1.0 was the first commercial C + + compiler 1987 ...
Added by hewzett on Mon, 06 Sep 2021 06:40:31 +0300
Write Windows dynamic wallpaper [Revision 1] (based on Windows10 desktop)
1, Miscellaneous words As a programming enthusiast, you may not be too optimistic about the standard static desktop. You may be amazed at the effect of WallpaperEngine. You may also want to make a personalized desktop beautification program. First, you should start with dynamic wallpaper. It was originally studied from the existing program, but ...
Added by canishk on Mon, 06 Sep 2021 00:17:02 +0300
Find prime (prime)
Trial division
prime number refers to a natural number that has no other factors except 1 and itself among natural numbers greater than 1. If a number
z
z
If z is a non prime number, there is
x
...
Added by jazappi on Sun, 05 Sep 2021 06:29:04 +0300
Common algorithm usage in C++ STL
0. What is "algorithm":
The < algorithm > header file defines a set of functions designed to be used on ranges of elements.
The so-called "element range" refers to the sequence of objects that can be accessed through iterators or pointers, such as arrays or some SLT containers. Note that the algorithm in < algorit ...
Added by kmaid on Sat, 04 Sep 2021 20:30:11 +0300