• Rust programming video tutorial (Advanced) – 024_ 2 syntax of all modes 2


    Video address Headline address:https://www.ixigua.com/i677586170644791348…Station B address:https://www.bilibili.com/video/av81202308/ Source address GitHub address:https://github.com/anonymousGiga/learn_rus… Explanation content 1. Match byExample 1: let x = 5; match x { 1..=5 => println! (“one through five”), // that is, the range from 1 to 5 is matched _ => println!(“something else”), } Note: in the example, 1.. = 5 is equivalent to […]

  • RFC: Extensible UDT


    Extensible UDT (extensible UDT, uniformly called XUDT in this paper) is an extension based on simple UDT, which can be used to define the behavior that more UDTs may need. Sudt provides a basic core for issuing UDT on nervos CKB, while XUDT can be based on sudt to meet more potential needs, such as […]

  • [go language introduction series] (IX) these are written to understand how to use the interface


    [go language introduction series] previous articles: [go language introduction series] (VI) further exploration of functions [go language introduction series] (VII) how to use go? [go language introduction series] (VIII) is go language an object-oriented language? 1. Introduce examples If you have used object-oriented languages such as Java, you must be familiar with the concept of […]

  • PostgreSQL — table inheritance


    I’ve learned about PostgreSQL database in the past few days, from installation to simple use, but the following function still gives me a little surprise. Table inheritanceIn short, it is a structure that can transfer the columns and data of one table to another by inheritance, and the child table can have more columns than […]

  • Golang | takes you deep into the context


    preface First answer the previous articleA quick start contextThe doubts left in, whydefer cancelFunc()? func main() { parent := context.Background() for i := 0; i < 100; i++ { go doRequest(parent) } time.Sleep(time.Second * 10) } //Dorequest simulates a network request func doRequest(parent context.Context) { ctx, _ := context.WithTimeout(parent, time.Second*5) time.Sleep(time.Millisecond * 200) go func() […]

  • Redis learning notes (XV) sentinel (middle)


    Last  We simulated the construction of sentinel mode in a single machine. Next, let’s look at the implementation and work of sentinel mode. Why is it divided into two? Because the length is too long (lazy), this article mainly focuses on sentinel initialization and information exchange. The next article focuses on state check, sentinel leader […]

  • Redux Advanced Series 1: react + Redux project structure best practices


    React + Redux is the most frequently used technology stack in react ecology, but there have been many voices about how to organize the project structure of react + redux. This article will discuss the three most commonly used project structures and give personal best practices. 1. By type The type here refers to the […]

  • Explore a more complex query


    database structure Leave table structure name type id int start_leave_date date end_leave_date date frame ThinkPHP 5.1 demand Query the data of leave within the time intervalFor example, I want to query the data of leave from 2020-10-04 to 2020-10-08 Problem point How to query time interval data with time interval criteria? For example, I want […]

  • MySQL data manipulation language (DML)


    Data manipulation language (DML) Data manipulation language(data control language)DML。 DML mainly has the following common functions. increase Delete change insert delete update #Create database create database if not exists stu; #Use database use stu; #Create a table create table student( sid int primary key auto_increment, sname varchar(20) not null, sex varchar(10) )charset=utf8; The following operations […]

  • Golang executes the exec command


    Create object: cmd, err := exec.Command(“echo”, “show me”)   Execute command: cmd.Run()  // Run blocks the process until the command execution ends CMD. Start() / / start non blocking execution CMD. Wait() / / wait blocks the process and waits for the end of command execution. It is used with star   Set output: var […]

  • Foundation of glibc heap management mechanism


    Recently, I was studying the heap management mechanism under Linux, collected books and information on the network, sorted it out with my own understanding and made a record. If there is anything wrong, welcome to point out! Memory Allocator Common memory management mechanisms Dlmalloc: Universal allocator Ptmalloc2: glibc allocator, which inherits from dlmalloc and provides […]

  • Building electron app based on UMI — Packaging Optimization


    summary stayBuilding electron app based on UMI – from 0 to 1In, after packaging with webpack + electron builder, the volume of dist package generated is too large, which will affect the user experience when the application is downloaded or updated. Electron builder version The version of electron builder mentioned in this article is ^ […]