Author: 永夜
-
Post Views: 94 In Go language concurrent programming, goroutine is the core of efficient concurrency, but the communication and synchronization between multiple goroutines is often a place for beginners to easily step on pits. This article will take ‘calculate the factorials of 1-200 and store them into Map’ as a case, and combine the problems encountered in the learning process,…
-
Post Views: 153 As a user who often needs to visit overseas websites (ChatGPT, Youtube, Google Translate, etc.), I have always wanted to achieve Wireguard’s ‘Domestic Website Direct, Foreign Website Tunneling’ function——Not only ensure the native speed of domestic web pages, but also stable access to overseas services, and at the same time avoid unnecessary traffic consumption caused by global…
-
Post Views: 102 RecentSelf-built WireGuard VPN, the original intention is to scientifically visit overseas websites, but found a headache: opening domestic websites is very slow, loading stuck, and even occasionally timed out. After investigation, it was found that all traffic (including domestic websites) was transferred through WireGuard VPN by default, and it naturally slowed down after a circle.The core requirements…
-
Post Views: 30 As the core feature of the Go language, Goroutine is the key to lightweight concurrency. It is lighter than traditional operating system threads and has lower creation cost. The default initial stack is only 2KB and supports dynamic expansion, which allows developers to easily achieve high concurrency programming. For beginners who are new to Go concurrency, understanding…
-
Post Views: 33 I recently wanted to add the function of the article to read on the blog. Add the historical pageview to the old article, and realize automatic counting of new visits at the same time, and there is no need to modify the core code of the theme, and do not rely on complex operations. After many times…
-
Post Views: 41 Interpret t Any constraint: Allows storage of any type.Explain the pointer structure of a unidirectional linked list.Constructor new:Shows how to initialize a generic node.
-
Post Views: 307 As a user who has long relied on VPN for overseas resource access and work communication, he has recently experienced the emergency situation of LetsVPN deactivated, from the alternative scheme to the final self-built Wireguard VPN It landed, stepped on a lot of pits in the process, and also accumulated reusable practical experience. This article will complete…
-
Post Views: 41 The background of the problem 2. The first pit: depend on download failure (502 bad gateway), you can refer to:GO TOUR slicing exercise to run the full record of the pit on the pit (from error report to successful operation) as shown in Figure 1 Error message: Error cause: Solution: 3. The second pit: the IDE still…
-
Post Views: 44 1. Reference:Optimization of List Interface Response Timeout . In Spatie\QueryBuilder , query SQL enforces index . achieve the following 2. The generated sql is as follows, in line with expectations. as shown in Figure 1