717. 1-bit and 2-bit characters / 18 Sum of four / 22 bracket-generating
717. 1-bit and 2-bit characters [simple question] [daily question]
Idea:
Traverse the bits array from front to back. If the current element is 1, the second character, whether 10 or 11, starts with 1, so you can be sure that the current element and its next element form the second character, i+= 2 directly; The bits array has only 0 and 1. ...
Posted by simjay on Sun, 20 Feb 2022 16:52:06 +0100
JS super detailed introduction summary
(1) Conversion of data types
1, Introduction to data type conversion In the program, there are often inconsistent data types, and data type conversion is required if the expected results are not obtained 1. Transfer from other types to number 1.1 string type to number
console.log(Number('123')); //Convert string 123 to 123
1.2 integer: par ...
Posted by jpmoriarty on Sun, 20 Feb 2022 16:51:48 +0100
Node. JS learning 12 (Node.js server development, http protocol and http module)
1, Node JS server development
A complete website application is mainly composed of client and server. We can understand the server as a computer, which is mainly responsible for storing data and processing application logic. Use node JS to replace the traditional server-side language (such as Java, PHP language, etc.) to develop the serv ...
Posted by Channel5 on Sun, 20 Feb 2022 16:37:59 +0100
Chapter 3 STL - string container of common containers
3.1 string container
3.1.1 basic concept of string
essence
String is a c + + style string, and string is essentially a class
The difference between string and char *
char * is a pointerString is a class, which encapsulates char * inside. It is a container of char * type to manage this string
characteristic
string class encapsulates many me ...
Posted by james_kirk on Sun, 20 Feb 2022 16:36:19 +0100
23 design modes
This note is obtained from station B crazy God speaking Java
What is a design pattern
The significance of learning design patterns
GoF23
Seven principles of oop
(1) Opening and closing principle: a software entity should be open to expansion and closed to modification;
(2) Richter substitution principle: inheritance must ensure th ...
Posted by ashishsharma on Sun, 20 Feb 2022 16:26:20 +0100
BM3D algorithm semi solution with python code
1. Ideas
There are some similarities between BM3D and NLM algorithms. NLM has written before: go to
They all use the features of other regions of the image and the current block features to fuse into denoised image blocks. The main differences are as follows:
1. Search only within a fixed radi ...
Posted by mattachoo on Sun, 20 Feb 2022 16:25:39 +0100
Sorting and summarizing the most commonly used array operations in 12 kinds of JavaScript
7. Convert to array
Sometimes we have to convert some other data structures, such as sets or strings, into arrays.
Class array: function parameters, dom collection
Array.prototype.slice.call(arguments);Array.prototype.concat.apply([], arguments);
character string:
console.log('string'.split('')); // ["s", "t", "r", "i", "n", "g"]console.lo ...
Posted by brainardp on Sun, 20 Feb 2022 16:12:15 +0100
Something new about C++11~
Introduction to C++11
In 2003, the C + + Standard Committee submitted a Technical Corrigendum (TC1) so that the name of C++03 has replaced the name of C++98 as the latest C + + standard before C++11. However, TC1 mainly fixes the loopholes in the C++98 Standard, and the core part of the language has not been changed. Therefore, people h ...
Posted by n1tr0b on Sun, 20 Feb 2022 16:10:53 +0100
OkHttp source code analysis (builder mode, responsibility chain mode, main process)
Before analyzing the core processes of OkHttp and the core classes, let's clarify two concepts: one is the builder mode used by OkHttpClient and Request when they are created; The other is the interceptor mode responsible for response processing;
Analysis of builder mode of OkHttpClient/Request
Basic concepts
The builder (also known as the b ...
Posted by mass on Sun, 20 Feb 2022 16:10:10 +0100
Detailed explanation of eight sorts of sorting
1 sorting overview
Let's take a look at the relationship between the eight sorts:
1.1 insert sort
1.1.1 direct insertion sort
1.1.1.1 definition
Basic idea: in a group of numbers to be sorted, suppose the front (n-1), in which [n > = 2] numbers are already in good order. Now insert the nth number into the front ordinal number to ma ...
Posted by modulor on Sun, 20 Feb 2022 16:00:18 +0100