Host byte, network byte, observe directly through debugger
Throughout the history of computer development, there has been no unified standard for data storage. There are two commonly used rules for byte arrangement. For example, if the low-order bits of a multi-digit number are placed at smaller addresses and the high-order bits are placed at larger addresses, it is referred to as little-endian; conversely, it is called big-endian. In network applications, byte order is a factor that must be considered because different types of machines may adopt different standards, so they are all converted according to the network standard.
C11: sleep for vs yield
While reviewing the code, std::this_thread::yield() suddenly popped into my view, a syntax sugar from C11 that I’d used quite a bit, but hadn’t noticed before.
Linux Server, Reset MySQL Password
I had an idle Tencent Cloud server that was expiring at the end of the year and I hadn’t planned to renew it. So, I decided to deploy a MySQL database for development purposes. When reinstalling the system, I wanted to save time and chose a third-party image provided by Tencent Cloud, which already had MySQL installed. I thought the system should include a Readme file or similar documentation explaining the password and deployment path.
A Brief Overview of Automated Testing
The investment in testing for financial trading systems far exceeded that of other systems, with tedious test steps repeatedly executed and a low ROI. As projects and personnel changed, uncontrollable factors inevitably introduced, a common situation being the modification of a field output from Interface A impacting the results of Interface B. With each version release, risk also accumulated.
Theoretical Knowledge How to Measure the Value of Automation? An automation testing ROI = (Manual Execution Time) * (Number of Runs) / (Development Cost + Maintenance Cost) Which Features Should Be Automated?
Why Do We Need to Learn a New Language?
Starting from my academic years, I’ve been working with C++ for over ten years. So, why do I need to learn other programming languages?
Work experience: Lacking experience in elegant module design, C++ syntax is freeform. Learning other languages helps me guide the development of more elegant designs.
I often use them when writing some tools. The design principles for low-level libraries and business modules are also becoming clearer.
Visual Studio Compilation Character Set [Converted]
C++ cross-platform development. Commonly encountered on Chinese operating systems: error C2001 - constant contains a newline character.
Visual Studio cmake organizes the project compilation script, generating a temporary solution under the windows system for development. The reason for cross-platform compatibility is that the file encoding is chosen as utf-8.
The cited reference provides a detailed explanation of the causes of the problem from first principles.
Regarding encoding, MSVC has dedicated compilation options /source-charset and /execution-charset.
Quickly calculate folder size on the Windows platform
The Linux platform is very simple: du -sh * – just one line of code solves the problem. What about Windows? With many disks and a desire to clean up, with numerous files, the system’s built-in Resource Manager is too slow to calculate folder sizes, making you want to give up.
Everything For developers working on the windows platform, you probably haven’t personally used everything, and should at least have heard of it.
How to Copy Webpage Stylesheets (CSS): Element Inspector
Static blog themes, the mainstream is based on foreign templates, modified and adjusted without much consideration for Chinese content layout.
Main Text About half a month ago, I adjusted the blog’s stylesheet – as I’ve been developing backend services for many years, I’m a pure newbie in frontend. After struggling with it for half a day, the design wasn’t quite reasonable. Suddenly an idea struck me: I looked at the technical blogs I often read – infoq and OpenChina – and their layouts look really good.