Skip to main content
Personal WeChat access ChatGPT to become a chat robot

Summary

This year ChatGPT is in a mess, and a large number of experts say that programmers will be replaced by AI, and AI will rule humans. Although I think it's a bit exaggerated, it doesn't have a big impact on me for the time being, but since there are new things coming out, I still have to play with them, so as not to be eliminated slowly when I get really old. So I registered an openai account. There are many specific registration steps on the Internet. I will post a few links below for your reference. Then it happened that I kept a VPS in the United States, which I basically didn’t use very much, and occasionally used it to climb over the wall. The VPS service provider is Linode, which is not expensive. It costs $10 a month. There is a link below. If you need it, you can register and play. And I have a WeChat account, which is simply used to connect to ChatGPT as a chat robot, so that I can ask questions without going over the wall. Let's talk about the specific process and related information.


Mr.ChenAbout 6 minarticleGoLangChatGPTWechat
Solve the problem that the subprojects of the Gradle parent project cannot obtain the properties of the subproject

Summary

Recently, I have been tossing about the unified management of Gradle's dependency versions, which is really a pitfall step by step. At the beginning, we turned to ChatGPT to provide two plug-ins, one is java-platform and the other is io.spring.dependency-management. I chose to use java-platform , but various attempts resulted in errors. If you are interested, you can take a look at the examples on the official website.
https://docs.gradle.org/current/userguide/java_platform_plugin.html


Mr.ChenAbout 2 minarticleJavaGradle
Remember a SpringBoot graceful shutdown failure problem

Summary

Recently, the production environment EKS (Elastic Kubernetes Service) occasionally has the problem of POD being forcibly killed.

The project is the SpringBoot framework, which starts graceful shutdown and configures a shutdown duration of 120 seconds. Since it was forcibly killed, it must be because the application was not stopped normally within 120 seconds.


Mr.ChenAbout 3 minarticleJavaSpring Boot
Web Performance Testing Metrics

Performance

Partial overview of web performance testing Generally speaking, the processing of a web request includes the following steps:

(1) The client sends a request
(2) The web server receives the request and processes it;
(3) The web server obtains data from the DB;
(4) The webserver generates the user's object (page) and returns it to the user. The time from the start to the last byte of the request sent to the client is called the response time (the third step is not included in each request processing).


Mr.ChenAbout 8 minarticleJavaperformance
Java Language Coding Specification

1 Scope

This specification specifies rules and recommendations for typography, annotation, naming, encoding, and JTEST when programming in the Java language.
This specification applies to products and projects programmed using the Java language.

2. Normative references


Mr.ChenAbout 22 minarticleJava
Disruptor Details

1. Background

1. Source

Disruptor is a high-performance queue developed by LMAX, a British foreign exchange trading company. The original intention of the research and development is to solve the delay problem of the internal memory queue, rather than the distributed queue. The single thread of the system developed based on Disruptor can support 6 million orders per second. After giving a speech at QCon in 2010, it gained the attention of the industry.


Mr.ChenAbout 13 minarticleJavaDisruptor
Paste pictures when editing markdown in vscode

​​​​

Recently, I am using vuepress to make my own blog. I usually write code in IDEA except for Java, and other languages ​​are written in vscode. I saw on the Internet that it is possible to quickly add pictures through plug-ins, so I found it in the plug-in library. Next, there are two popular plug-ins, Markdown Image and Paste Image, because Markdown Image ranks first (although the download volume is not as high as Paste Image), so Markdown Image is installed first, but follow the instructions, no matter what I can't paste it, and pressing the Shift + Alt + V shortcut keys has no response at all.
After various attempts, I found that vscode cannot directly copy and paste files with Ctrl + C and Ctrl + V from the windows explorer. It must be copied and pasted by dragging and dropping. I asked ChatGPT specifically, and it actually told me that vscode supports copying and pasting with Ctrl + C and Ctrl + V, and that my vscode has no permissions. After all kinds of tossing, I finally found a more reasonable answer. The copy and paste of vscode can only be operated in the same workplace, and cannot be copied and pasted with the operating system.
Since Markdown Image is not available, we can only try to install Paste Image. After installation, press Ctrl + Alt + V shortcut keys, and it prompts There is not a image in clipboard., still can't paste the picture, but it is better than Markdown Image, at least there is a prompt message.
Then it was tossing again. This time, instead of copying the picture file directly, it was successful by taking a screenshot, but the file was saved to the current directory of the md file, and the date and time were used as the file name, which is not very friendly. Finally, the following plug-in configuration is modified, and the image file is saved to the assets\MD file name directory.


Mr.ChenAbout 1 minarticleVSCode
Solve the problem of vscode running stuck

​​​​

Recently, I am using vuepress to make my own blog. I opened vscode, which has been dusty for a long time, but found a problem. Every time I switch to other applications and then switch back to vscode, it will freeze for a few seconds, which greatly reduces the user experience.
I opened the task manager and looked at it, and found that the CPU usage reached 100%. At first I thought that the CPU of the laptop was too low, and I planned to see if my ThinkPad T480 could upgrade the CPU, but the Internet said that the CPU of the T480 is a blade design, and most people cannot replace it.
Then I googled the reason why vscode is slow. The first search result said that there were too many plug-ins installed, which caused the slowness, but this is not easy to troubleshoot.
Then look at the second search result, vscode running stuck solution, really solved the problem, the specific operation is as follows:


Mr.ChenLess than 1 minutearticleVSCode