Year: 2026
-
Post Views: 28 In Go language, errors are not an exception, but a value. By implementing the Error interface, we can create custom error types with rich context information. This article will combine Go Tour’s ‘exercise: errors’ exercise to explore how to implement a square root function that supports negative number detection, and reveal the ‘infinite recursion’ pit that is…
-
Post Views: 63 1. Background: Why do this environment In order to learn AI programming tools (such as Tongyi Spirit Code), I am going to implement a ‘Music Alarm Clock’ small project.Before starting coding, I set up a reusable python dev container development environment. 2. Description of the technology stack 3. Project catalog structure (core focus) music-alarm/├── .devcontainer/│ └── devcontainer.json├──…
-
Post Views: 53 1. When learning the ‘Comprehensive Spirit Code AI Coding Practical, AI Programmer User Guide’,I found the interface in the tutorial completely different from the one I currently use. There are two parallel windows in the tutorial: as shown in Figure 1 But in my current environment: as shown in Figure 2 So I have a few questions:…
-
Post Views: 63 Following the previous articleMaps word counting exercisesAfter this, another classic exercise in the introduction of Go language – using closure to implement the Fibonacci sequence generator. This question can not only consolidate the core usage of closed packages, but also deeply understand the characteristics of ‘function as the return value’ in the Go language. This article will…
-
Post Views: 62 1. What kind of passport do you have now? The application is: ordinary passport (private passport) 2. How to handle (the most recommended)✅ Method: online reservation + offline processing (mainstream) 3. The first step: make an appointment, WeChat applet: Immigration Bureau 12367, Chinese citizen service – on-site certificate appointment – choose to apply for an outlet. as…
-
Post Views: 115 As a basic exercise for the entry of Go language, the use of MAPS (mapping) is one of the key knowledge points, and word counting exercise is a classic case of consolidating MAPS usage. This article will record in detail the implementation process, core ideas, code analysis, and key knowledge points involved in the exercise. 1. Description…
-
Post Views: 114 The background When writing a technical blog with a WordPress block editor (Gutenberg), I often need to include multiple code blocks in one article, such as: SQL query (SQL) Go sample code (GO) PHP code (PHP) Description text (Text) Usually, an article will contain about 10 code blocks in combination. This kind of content was very stable…
-
Post Views: 89 Recently, when I was doing the slices practice of the official go to the go, I encountered a series of dependencies download and running errors, and after tossing, I finally succeeded in running through. I have sorted out the complete stepping process and solutions, hoping to help those who practice Go Tour locally like me, and avoid…
-
Post Views: 63 1. I found that readme.md is normal in VS code, but in github, the format is messed up. How to solve it? Figure 1, Figure 2 2. Reason: If there is no “` package, github will directly ‘flatten’; the title is not separated by blank lines, which does not meet the markdown specification. Reorganize into standard GitHub…
-
Post Views: 40 1. There are 10,000 parameters in the IN condition (the upper limit of the product needs to be 10,000), resulting in a long query time, and the interface response timeout. as shown in Figure 1 2. When the number of parameters of PLAT_ORDER_ID is reduced from 10000 to 5, the interface response does not time out, and…