How to Develop Rich Text Terminal UI Application

1. The Development History of Terminal Terminal is the input and output equipment of computer system. For historical reasons, the concept of terminal is very confusing.The development of terminal has gone through three stages: character terminal, graphics terminal and network terminal. 1.1 Teletypewriter TTY(TeleTYpe) In the early days, because ...

Added by Ryaan on Thu, 29 Aug 2019 18:08:10 +0300

Bytom Dapp Development Notes: Dapp Demo Front-end Source Analysis

This chapter will focus on the dapp-demo provided by the original official, analysis of the front-end source code, analysis of the entire demo process, and then for the pits encountered in the development process, add some personal opinions and solutions. A Brief Description of Savings Dividend Contract To facilitate understanding, here is a br ...

Added by paragkalra on Wed, 28 Aug 2019 06:22:00 +0300

How to Use Reflection in Go Translation

Author: Jon Bodner | Address: Learning to Use Go Reflection What is Reflection In most cases, the use of variables, types and functions in Go is very simple. When you need a type, define it as follows: type Foo struct { A int B string } When you need a variable, define it as follows: var x Foo When you need a function, define it as follows: ...

Added by andrewpike2000 on Sun, 18 Aug 2019 12:08:32 +0300

Deep Understanding of Go-Garbage Recycling Mechanism

Go's GC has been criticized since it was born, but after introducing the three-color marker of v1.5 and the mixed writing barrier of v1.8, the normal GC has been shortened to about 10us, and has become very excellent. It's amazing. Let's explore the principle of Go's GC. Principle of Tricolor Marking Let's first look at a picture, and we will p ...

Added by nemo on Thu, 15 Aug 2019 17:14:37 +0300

Some Patterns of Channel in Go Learning

In addition to transferring data safely between goroutine s, after reading Concurrency in Go, I lament that channel has so many patterns to use. In my personal learning, I summarize the following common patterns. pipeline concept We take reptiles as an example. Generally, reptiles are divided into the following steps: Grab Page - > Parse Pag ...

Added by ExpertAlmost on Thu, 15 Aug 2019 17:04:02 +0300

Concurrency Control via context for Go Translations

Author: Sameer Ajmani | Address: blog.golang.org/context Translator's Preface The translation of the second official blog post is mainly about the context package for Go Concurrency Control. Overall, I think Previous It is the foundation and core of Go concurrency.context is a set of easy-to-use libraries developed for goroutine control on the ...

Added by phenley on Mon, 12 Aug 2019 06:14:02 +0300

Go-Error, defer, panic and recover y

6.1. Error The error interface under builtin package is used as error type in Go language Errors in the Go language are used as return values of methods/functions Customize error types //Learn_Go/main.go package main import ( "errors" "fmt" ) func demo(i,k int) (r int, e error) { if k == 0 { e = errors.New("The divisor c ...

Added by rh-penguin on Sat, 10 Aug 2019 10:50:44 +0300

go program debugging

Debugging program is a necessary skill of program ape. There are many ways to debug program, such as printing console output, checking logs, setting breakpoints, and using debug to do one-step tracking to debug. This article is mainly about go using debug. GDB introduceGDB is a powerful UNIX debugging tool released by GNU Open Source Organizati ...

Added by JohnnyBlaze on Sat, 10 Aug 2019 10:01:53 +0300

MySQL for Goang Fragmentation

MySQL is a commonly used relational database. This paper introduces how to operate MySQL database in go language. Go Manipulates MySQL Connect The database/sql package in Go language provides a wide range of interfaces to guarantee SQL or quasi-SQL databases, and does not provide specific database drivers. A database driver must be injected wh ...

Added by yhchan on Sat, 27 Jul 2019 12:09:48 +0300

day22, class encapsulation

Today's Content encapsulation Interface I. Packaging 1. What is encapsulation Encapsulation is the process of hiding complex, ugly and private details inside and providing a simple interface to the outside world. 2. Why to encapsulate for the society Encapsulation has two purposes: one is to ensure the security of key data, the other is to hi ...

Added by Craig79 on Fri, 26 Jul 2019 11:50:25 +0300