Tag:Recipient

  • Should the method be declared on T or * t

    Time:2021-10-11

    Friendly tips: This article takes about 3 minutes and 49 seconds to read. Please give more advice on the shortcomings. Thank you for reading. Subscribe to this site Should methods be declared on T or * t – David In go, for any type T, there is a type * t, which is the result […]

  • Rust programming video tutorial (Advanced) – 017_ 1 messaging 1

    Time:2021-10-7

    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. One of the main tools for implementing message passing concurrency in rust is the channel. The channel consists of two parts, one is the sender and the other is the receiver. The sender is used to send messages and the receiver is […]

  • Understanding distributed consensus algorithms

    Time:2021-9-22

    Starting with rocketmq supporting automatic failover Before rocketmq version 4.5, rocketmq only had a master / slave deployment mode. There was one master in a group of brokers and there were zero to multiple slaves. The slave synchronized the master’s data through synchronous replication or asynchronous replication. Master / slave deployment mode provides certain high […]

  • [go language introduction series] (VII) how to use go?

    Time:2021-9-20

    [go language introduction series] previous articles: [go language introduction series] (IV) use of map [go language introduction series] (V) the use of pointers and structures [go language introduction series] (VI) further exploration of functions This paper introduces the use of go language method. 1. Declaration If you have used an object-oriented language, such as Java, […]

  • Simple application of redis

    Time:2021-9-14

    Spring boot integrates redis //Import dependency <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-redis</artifactId> </dependency> //File configuration spring: redis: host: 127.0.0.1 port: 6379 password: root //Write your own redistemplate package com.shuaikb.config; import com.fasterxml.jackson.annotation.JsonAutoDetect; import com.fasterxml.jackson.annotation.PropertyAccessor; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.jsontype.impl.LaissezFaireSubTypeValidator; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.data.redis.connection.RedisConnectionFactory; import org.springframework.data.redis.core.RedisTemplate; import org.springframework.data.redis.serializer.Jackson2JsonRedisSerializer; import org.springframework.data.redis.serializer.StringRedisSerializer; @Configuration public class RedisConfig { @Bean public RedisTemplate<String, Object> […]

  • Go quick start 04 | functions: what are the differences between functions and methods?

    Time:2021-9-8

    Functions and methods are the first step towards code reuse and multi person collaborative development. Through the function, the development task can be divided into small units, which can be reused by other units, so as to improve the development efficiency and reduce the code coincidence. In addition, the ready-made functions have been fully tested […]

  • Things about the golang | method set

    Time:2021-9-8

    The value of type can also call the method of the pointer receiver! Those who learn some knowledge about methods in golang must have known itMethod setThe concept of method set must be familiar to the above figure. The method set is defined as follows: Rules: The method set of a value of type contains […]

  • Kick you into the go language gate! Beginners must read, 10000 words long text, it is recommended to collect!

    Time:2021-8-28

    @[toc] Hello, I’m clean! Part I: kick you into the door of go language! I. the foundation is not firm and the earth is shaking 1. First example: Hello World package main import “fmt” func main(){ fmt.Println(“Hello World”) } First line package mainIt represents which package the current file belongs to. Package is the keyword […]

  • Practical application of responsibility chain model

    Time:2021-7-31

    Responsibility chain model The chain of responsibility pattern creates a chain of receiver objects for requests。This mode gives the type of request and decouples the sender and receiver of the request。This type of design pattern belongs to behavioral pattern。In this pattern, each recipient usually contains a reference to another recipient。If an object cannot process the […]

  • Design pattern learning 16 (Java implementation) — command mode

    Time:2021-7-26

    Write in front Take notes on learning design patterns Improve the flexible use of design patterns Learning address https://www.bilibili.com/vide… https://www.bilibili.com/vide… Reference articles http://c.biancheng.net/view/1… Project source codehttps://gitee.com/zhuang-kang/DesignPattern 18. Command mode 18.1 definition and characteristics of command mode The command mode is defined as follows:Encapsulating a request as an object separates the responsibility of issuing the request […]

  • Go quick start 05 struct and interface: what functions do structs and interfaces implement?

    Time:2021-5-6

    structural morphology Structure definition A structure is an aggregation type, which can contain any type of values. These values are members of the structure defined by us, also known as fields. In go language, to customize a structure, you need to use the keyword combination of type and struct.A structure type named person is defined […]

  • Method value and method expression usage of go

    Time:2021-4-23

    The explanation of this part in the manual is not very detailed and clear. After several examples, I summarize the usage of this part. Method expression: to put it simply, it is actually the assignment of a method object to a variable. There are two ways to use it: 1) Method value: implicitly call the […]