• ## Data structure — generalization structure of tree

Time：2021-1-13

Huffman tree https://www.cnblogs.com/smile… Related concepts 1、The weight of leaf node(weight) is a meaningful numerical quantity given to leaf nodes. 2. Let a binary tree have n weighted leaf nodes. The sum of the product of the path length from the root node to each leaf node and the weight of the corresponding leaf node is […]

• ## Segment tree of data structure

Time：2021-1-2

Segment tree What is a segment tree Line segment tree, similar to interval tree, is aComplete binary treeIt stores a line segment (a subarray in the array) in each node, which is mainly used to efficiently solve the dynamic query problem of continuous interval. Due to the characteristics of binary structure, it can basically keep […]

• ## Shadow effect in canvas visualization

Time：2021-1-2

Shadow effect in canvas visualization Wedge In a previous rail transit visualization project, many drawing skills were used. You can refer to the previous article《Drawing large screen project effect of rail transit with canvas shadow function and double line technique》 The track in the renderings has both external and internal luminous effects. External luminous effect […]

• ## The number of effective triangles

Time：2020-12-21

Topic address (611. Number of effective triangles) https://leetcode-cn.com/probl… Title Description Given an array containing nonnegative integers, your task is to count the number of triples that can form the three sides of a triangle. Example 1: Input: [2,2,3,4] Output: 3 Explanation: The effective combination is: 2,3,4 (use the first 2) 2,3,4 (use second 2) 2,2,3 […]

• ## CSP-S-2020

Time：2020-11-15

CSP-S-2020 T1 Julian day Give the highest respect (kowtow) to the T1 author. T2 Zoo Give some numbers, guarantee\(x∈[1,2^k-1]\)And different from each other, some conditions are given if there are numbers\(x\)The first\(ai\)Bit is\(1\)Then you have to choose the item\(bi\)，\(bi\)They are different. How many numbers are there\(y\)Satisfaction does not exist\(x=y\)And add\(y\)Post selected\(b\)unchanged. It is easy to […]

• ## Data structure — extended structure of tree

Time：2020-11-9

Huffman tree https://www.cnblogs.com/smile… Related concepts 1、Weights of leaf nodes(weight) is a significant numerical value given to leaf nodes. 2. Let a binary tree have n weighted leaf nodes. The sum of the product of the path length from the root node to each leaf node and the weight of the corresponding leaf node is calledWeighted […]

• ## Canvas draws dot segments

Time：2020-7-13

Recently, a guy met a demand, the customer needs to draw dot style lines. The general effect is as follows: Idea 1: calculate and fill in with arc He realized an idea himself and asked me if I had a better idea. First of all, let’s see how his idea is implemented. The code is […]

• ## Is the Bezier curve really that slippery? Use facts to explore

Time：2020-7-4

preface Many partners who love design and development, including senior three, usually encounter the word “smooth transition” or “Bezier curve” when learning drawing, post editing, web design, modeling, etc. For example, it has appeared in these places: PSPen tool in Adobe (not only here, but most Adobe software) PRIn and out key frame and interpolation […]

• ## Understanding PHP array index from a ring Perspective

Time：2020-3-2

( array \$array , int \$offset [, int \$length = NULL [, bool \$preserve_keys = false ]] ) : array Array_slice() is a function that takes a segment from an array. It needs to pass some integer numbers to indicate which segment in the target array the user needs. When the second parameter\$offset, and the […]

• ## Nginx topic (2): load balancing strategy and configuration of nginx

Time：2020-1-24

This paper introduces the load balancing strategy of nginx, the principle of consistent hash distribution, and the removal and recovery configuration of common fault nodes. Article source: Yixin Institute of Technology & Technical sharing of Yixin payment and settlement team phase I – details of nginx by Zhou Heng, senior technical manager of eight party […]

• ## What is the world matrix in cocos creator

Time：2019-12-10

What is the world matrix in cocos creator 1. (matrix) what is matrix and what is its use Matrix a magical existence? Is the meaning of the values in the development process scratching your ears and scratching your cheeks? Today, we’re going to break the mystery. Due to the large amount of content, the “worldmatrix” […]

• ## D3.js make line animation and editor

Time：2019-11-24

This is an original article. The original address is https://www.cnblogs.com/eagle1098/p/11431679.html Line animation editor The effect is shown above.This project is mainly made of d3.jsv4, which is divided into two parts. One is the actual display of the line animation, the other is the manager using the mouse to edit the line page. For d3.js how […]