• Algorithm (6) – differential array


    Differential array Problem background If you are given an array containing 50 million elements, and then there will be frequent interval modification operations, what is frequent interval modification operations? For example, add 1 to each number from the first number to the 10th million, and this operation is frequent. What should you do now? It’s […]

  • Tree array and its application


    1. Principle of tree array In programming, we need to maintain the prefix and s of a one-dimensional array, let s [i] = a [1] + a [2] +… + a [i]. If we modify the value of any element a [i], the related prefix and s [i], s [i + 1],…, s [n] will […]

  • Leetcode 1109 flight reservation statistics


    subject here you are   n   Flights, numbered from 1 to n. There is a flight reservation form   Bookings, table No   i   Reservation records   bookings[i] = [firsti, lasti, seatsi]   Means from firstI   Seatsi is booked on each flight to lasti (including firstI and lasti)   Seats. Please return […]

  • 36-Endpoint Slices


    Endpoint Slices FEATURE STATE: Kubernetes v1.16 alpha Endpoint Slices provide a simple way to track network endpoints within a Kubernetes cluster. They offer a more scalable and extensible alternative to Endpoints. Endpoint sliceProvides a simple way to track network endpoints in a kubernetes cluster. They provide a more scalable and scalable endpoint alternative. Endpoint Slice […]

  • Interpretation of the official blog: react18 is really coming


    At 1 a.m. on the 9th,ReactOfficial blog releasev18Latest progress. Three official messages In the blog post of react18 work plan, the official brought three messages. v18Work is already in progress and will be the next major release Createdv18Working group, let community experts, developers and library authors try it firstv18It is pre compatible with many libraries […]

  • Tree array summary


    Tree array summary preface In the past three weeks, I mainly reviewed the line segment tree and tree array.However, the line segment tree can’t write after a black problem of pressure position collapses. On a whim, I decided to write a summary of the review content during this period.The konjaku has limited strength. Please understand […]

  • How does golang flip any string containing Chinese numbers, English letters and so on


    Problem description Flip containsChinese, numbers, English lettersAny string such as Example Input: “he Shi l FA lo, world. + – * boundary, 6” Output: “6, boundary * – +. World, ol hair l division eh” Golang implementation package main import “fmt” func reverseString(s string) string { //Converts a string to a slice of type Rune […]

  • Is it more expensive to copy large slices than small slices


    Problem description Is it more expensive to copy large slices than small slices? answer No, the cost of copying all slices is the same. If you look at the source code, it’s clear: type slice struct { array unsafe.Pointer len int cap int } Because there are three fields (one) at the bottom of the […]

  • “Free and open source” file upload of crudapi background management system of front-end spa project based on Vue and Quasar (10)


    File upload of front-end spa project based on Vue and Quasar (10) review Through the introduction of the data import (IX) of the front-end spa project based on Vue and Quasar in the previous article, the batch import function of business data is realized. This paper mainly introduces the contents related to file upload. brief […]

  • Golang two go processes print a slice in turn


    catalogue Problem Description: Golang implementation: Two channels are used for judgment only be careful Two channels are used to pass values Li peiguan blog Problem Description: Two go processes print a slice in turn. Golang implementation: Two channels are used for judgment only package main import ( “fmt” “sync” ) //Two go processes print a […]

  • Go brush 1.0 every Monday


    Series articles: Channel practical application, this is enough! Go brush 1.0 every Monday The picture was taken on January 2, 2021, Zhoushan Dongji island. As I said, I will brush the questions according to the labels. Brush four to five questions for each category and divide it into two articles, the first basic question and […]

  • Elasticsearch7.6.2 – rest complex query


    Then, in the previous article, query complex query is performed must This relationship, equivalent to and, must be satisfied at the same time    should This relationship is equivalent to or. Just meet one   Three pieces of data were found here must_not   must_ Not quite so! So one piece of data is found […]