Year: 2026
-
Post Views: 44 1. When learning the official Go tutorial a Tour of Go, I encountered a very classic exercise:Implement a square root function sqrt(x). as shown in Figure 1 This exercise involves not only Go’s loops and functions, but also introduces a very important numerical calculation method:Newton iteration method (Newtons method). This article will demonstrate how to get from…
-
Post Views: 32 1. In VS Code Ctrl + S, the file is restored to the previous step, not the expected save file Before modification: After modification: After Ctrl + S : 2. Do a key check first, open the Visual Studio Code settings: press: Ctrl + , search: format on save to see if it is enabled: editor: format…
-
Post Views: 31 1. In VS Code, Go reports an error: Main redeclared in this block. The reason is that there are multiple main functions in the directory. as shown in Figure 1 2. Reorganize an exercise directory structure scheme of A Tour of Go to ensure that each exercise can run go run main.go independently, and there will be…
-
Post Views: 70 1. Reference:Install Hyperf under Docker in WSL-Ubuntu. Now startup fails:[ERROR]RedisException: Connection refused. as shown in Figure 1 2. The hyperf connection redis fails, and the high probability is caused by one of the following three (redis is not started / the address is wrong / the port is not connected). I am now in the local development…
-
Post Views: 107 Step 1: Create a local project directory in WSL (such as ~/wwwroot/hyperf-skeleton) 2. Modify the mount directory and adapt the path to the local directory. Reference:Hyperf official documentation development under Docker . 3. Create a project in the container, the creation of the project fails, and an error is reported: Your requirements could not be resolved to…
-
Post Views: 42 1. Reference: Build a RESTful API (go.dev) with Go and Ginhttps://go.dev/doc/tutorial/web-service-gin— Go official tutorial for building simple web services with GIN. 2. Install Go. Docker Compose One-click startup (refer to Hyperf project). I want to ‘write a good configuration, a command starts the entire development environment’, which is most convenient to use docker-compose.yml, which is almost the…
-
Post Views: 25 During the recent interview exchange, the interviewer asked me TiDB landing practice grasp the depth. In the 2014 PHP back-end research and development, I have deeply cultivated mysql high concurrency, big data table architecture evolution and performance optimization, from stand-alone tuning, master-slave copy, to sharding-jdbc/mycat The whole set of manual sub-bank sub-tables has been deeply implemented. Although…
-
Post Views: 26 1. The website interface is messed up, open the developer tool – network – all. Then refresh the web page and view the network request. The status of the found style file is: (shield: mixed-content). as shown in Figure 1 2. However, the URL of the CSS file with the status: (blocked:mixed-content) will be opened in a…