Tag:primitive

  • The runs Theorm and Lyndon tree study notes

    Time:2022-7-6

    definition \(\text{Runs}\): One\(\text{run}\)Is a triple\(\text{r}=(l,r,p)\), indicating\(s[l,r]\)The minimum period of is\(p\), and\([l,r]\)The interval is huge, which requires\(2p\leq r-l+1\)。 real number\(\frac{r-l+1}{p}\)be called\(r\)Index of.\(Runs(w)\)express\(w\)of\(runs\)Set,\(\rho(n)\)Indicates that the length is\(n\)The string of contains\(\text{runs}\)The maximum number of,\(\sigma(n)\)Indicates long\(n\)character string\(\text{runs}\)The maximum value of the sum of indices. \(\text{Lyndon Word}\): If a string\(s\)Satisfy any strict suffix\(t\)Both\(s, it is called about\(one of\(\text{Lyndon Word}\)。 In […]

  • Difference between JavaScript expansion operator and residual operator

    Time:2022-6-10

    JavaScript uses the symbol three dots (…) As residual operator and expansion operator, but the two operators are different. The main difference is that the remainder operator puts the rest of some specific values provided by the user into a JavaScript array, while the expansion operator expands the iteratable object into a single element. For […]

  • The interviewer asked me to use channel to realize the synchronization lock in the sync package. Did he deliberately embarrass me?

    Time:2022-6-4

    preface The go language provides two concurrency control methods: channel and sync package. Each method has its applicable scenario. Not all concurrency scenarios are suitable for channel application. Sometimes it is easier to use the synchronization primitive provided in the sync package. Today’s topic is purely to learn and master the powerful capabilities of channel […]

  • Analysis of golang package sync (I): sync Once

    Time:2022-5-26

    preface Go language provides a lot of support for synchronization (data synchronization and thread synchronization) in design, such as goroutine and channel synchronization primitives, which are available at the library level Sync: provides basic synchronization primitives (such as mutex, rwmutex, locker) and tool classes (once, waitgroup, cond, pool, map) Sync / atomic: provides atomic operations […]

  • Need to explain a lot of instructions every time? Using polardb-x vectorization engine

    Time:2021-8-3

    Introduction: vectorization engine has brought significant performance improvement to polardb-x expression calculation. introduce Polardb-x is a cloud native distributed database developed by Alibaba. It adopts a computing storage separation architecture, in which the computing node undertakes a large number of expression computing tasks. These expression calculations involve all aspects of SQL execution and have an […]

  • Chapter 1: pythagorean array (1)

    Time:2020-11-30

    Pythagoras theorem (Pythagorean theorem) indicates that the sum of the squares of the lengths of the two right angles of any right triangle is equal to the square of the length of the hypotenuse. It is expressed by formula a^2 + b^2 = c^2 The first question is whether there are infinitely many Pythagorean arrays […]

  • Why is custom cryptography primitives essential for development on the blockchain?

    Time:2020-11-21

    Blockchain is a new technology based on cryptography, economics and network science. For the general public, cryptography is not an easy subject to get close to, and even among the three disciplines mentioned above, we feel that the subject has the most sense of distance. However, friends living in the blockchain circle will often hear […]

  • Multithreading | rust learning notes

    Time:2020-11-7

    Author: Xie Jingwei, known as “brother Dao” in the world, has been an it veteran for 20 years, an expert in data communication network, and a telecom network architect. At present, he is the development director of netwarps. Dao GE has many years of practical experience in the fields of operating system, network programming, high […]

  • Kubernetes: Programming in yaml

    Time:2020-11-3

    Introduction:How to do performance test? Either it is completed by coding, writing a bunch of scripts and discarding them when they are used up; or they are based on the platform and carried out in the process defined by the platform. For the latter, due to the complexity of target scenarios, such as deploying specific […]

  • Python realizes self secure data structure

    Time:2020-5-1

    For multi process or multi thread access to shared data, it is often necessary to control the lock in the business layer to increase the brain load. Here, a general way is designed, and the lock operation is directly encapsulated in the data structure. Paste code directly #!/usr/bin/env python # encoding: utf-8 from multiprocessing import […]

  • Building automation system based on HTML5 canvas

    Time:2020-4-20

    Preface Building automation refers to the electrical equipment in buildings, such as elevators, pumps, fans, air conditioners, etc. its main working nature is strong electric drive. Generally, these devices are in an open working state, that is to say, they do not form a closed loop. As long as the power supply is connected, the […]

  • Collision test based on HTML5 and webgl

    Time:2020-3-22

    This is an example for users to learn on the official website written by the company’s God. At the beginning, I really didn’t know what it was doing. I just combined three shape elements together, and then I could rotate, enlarge and shrink the three figures at the same time. Click “animate” to let the […]