<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Tips</title><link>https://blog.shuaizhang.cc/en-us/tags/tips/</link><description>Posts gathered under this term.</description><generator>Hugo</generator><language>en-US</language><lastBuildDate>Sun, 09 Jun 2024 00:00:00 +0000</lastBuildDate><atom:link href="https://blog.shuaizhang.cc/en-us/tags/tips/index.xml" rel="self" type="application/rss+xml"/><item><title>Cache Docker Hub Images with Azure Container Registry</title><link>https://blog.shuaizhang.cc/en-us/posts/azure-container-registry-cache-dockerhub/</link><pubDate>Sun, 09 Jun 2024 00:00:00 +0000</pubDate><guid>https://blog.shuaizhang.cc/en-us/posts/azure-container-registry-cache-dockerhub/</guid><description>Describes how to configure artifact cache in Azure Container Registry, map Docker Hub and GHCR images to a private ACR namespace, and pull them with the Docker client.</description></item><item><title>Authenticating Users in a C# Command-Line App with MSAL and Web Account Manager</title><link>https://blog.shuaizhang.cc/en-us/posts/csharp-console-app-login-msal-wam/</link><pubDate>Tue, 04 Jun 2024 00:00:00 +0000</pubDate><guid>https://blog.shuaizhang.cc/en-us/posts/csharp-console-app-login-msal-wam/</guid><description>This post records how a C# console app combines MSAL and Web Account Manager to complete interactive sign-in and acquire the Access Token required to access protected APIs.</description></item><item><title>Adapting Custom HTTP Headers to OpenTelemetry in ASP.NET Core</title><link>https://blog.shuaizhang.cc/en-us/posts/aspnetcore-opentelemetry-adapt-custom-trace-id/</link><pubDate>Fri, 31 May 2024 00:00:00 +0000</pubDate><guid>https://blog.shuaizhang.cc/en-us/posts/aspnetcore-opentelemetry-adapt-custom-trace-id/</guid><description>Explains how to convert legacy X-Request-Id and X-Trace-Id request headers to W3C Trace Context in ASP.NET Core to integrate with OpenTelemetry tracing.</description></item><item><title>Make .NET Logger Print Scope as Structured Data</title><link>https://blog.shuaizhang.cc/en-us/posts/dotnet-structure-log-scope/</link><pubDate>Thu, 30 May 2024 00:00:00 +0000</pubDate><guid>https://blog.shuaizhang.cc/en-us/posts/dotnet-structure-log-scope/</guid><description>Microsoft.Extensions.Logging prints Scope as a string by default. This article shows you how to preserve structured output for Scope.</description></item><item><title>MSBuild Summary</title><link>https://blog.shuaizhang.cc/en-us/posts/msbuild-summary/</link><pubDate>Wed, 27 Jul 2022 00:00:00 +0000</pubDate><guid>https://blog.shuaizhang.cc/en-us/posts/msbuild-summary/</guid><description>A summary of MSBuild basic concepts and extension methods</description></item><item><title>A Summary of Intrusive Linked Lists in C++</title><link>https://blog.shuaizhang.cc/en-us/posts/instrusive-linked-list-summary/</link><pubDate>Sun, 05 Jun 2022 00:00:00 +0000</pubDate><guid>https://blog.shuaizhang.cc/en-us/posts/instrusive-linked-list-summary/</guid><description>Summarizing the main pros and cons of intrusive linked lists and a reference implementation in C++</description></item><item><title>Introduction to Distributed Systems</title><link>https://blog.shuaizhang.cc/en-us/posts/distributed-systems-101/</link><pubDate>Fri, 22 Mar 2019 00:00:00 +0000</pubDate><guid>https://blog.shuaizhang.cc/en-us/posts/distributed-systems-101/</guid><description>This article gives beginner readers an overview of the basic problems, common solutions, technical challenges, and learning directions for distributed systems.</description></item><item><title>Large-Scale Cluster Management and Operations Automation</title><link>https://blog.shuaizhang.cc/en-us/posts/cluster-management-and-devops/</link><pubDate>Wed, 29 Aug 2018 00:00:00 +0000</pubDate><guid>https://blog.shuaizhang.cc/en-us/posts/cluster-management-and-devops/</guid><description>This article discusses core issues in large-scale cluster operations automation, including automatic fault detection, automatic remediation, and safety.</description></item><item><title>CAP, ACID, What Can We Do?</title><link>https://blog.shuaizhang.cc/en-us/posts/cap-acid-what-can-we-do/</link><pubDate>Sun, 20 May 2018 00:00:00 +0000</pubDate><guid>https://blog.shuaizhang.cc/en-us/posts/cap-acid-what-can-we-do/</guid><description>Starting from the CAP theorem and ACID properties, this article discusses the trade-offs among consistency, availability, and transaction design in distributed storage systems.</description></item><item><title>A Practical Subset of C++ Features Used at Work</title><link>https://blog.shuaizhang.cc/en-us/posts/practical-cpp-subset/</link><pubDate>Mon, 09 Apr 2018 00:00:00 +0000</pubDate><guid>https://blog.shuaizhang.cc/en-us/posts/practical-cpp-subset/</guid><description>This article summarizes a practical subset of C++ features commonly used in systems programming, including recommendations on RAII, smart pointers, move semantics, and more.</description></item><item><title>Every Programmer Should Know Some Formal Proof</title><link>https://blog.shuaizhang.cc/en-us/posts/programmer-should-know-formal-verification/</link><pubDate>Fri, 06 Apr 2018 00:00:00 +0000</pubDate><guid>https://blog.shuaizhang.cc/en-us/posts/programmer-should-know-formal-verification/</guid><description>Using lower_bound as an example, this article explains how to derive and verify a binary search implementation with safety and liveness analysis and mathematical induction.</description></item><item><title>Looking at the Expressive Power of Different Programming Languages Through an Interview Question</title><link>https://blog.shuaizhang.cc/en-us/posts/different-programming-languages/</link><pubDate>Sun, 03 Aug 2014 00:00:00 +0000</pubDate><guid>https://blog.shuaizhang.cc/en-us/posts/different-programming-languages/</guid><description>Many people do not understand that different programming languages have different expressive power. That is why, after assembly language, we still needed higher-level programming languages. Now that software systems are becoming increasingly large, the insufficient expressive power of C and C++ is becoming more and more apparent. We should choose high-level programming languages to complete our tasks whenever possible, and use profiling where performance is needed, rather than choosing languages such as C/C++ from the outset.</description></item><item><title>Comparison of Several Methods for Checking Addition Overflow</title><link>https://blog.shuaizhang.cc/en-us/posts/check-overflow-continued/</link><pubDate>Thu, 20 Feb 2014 00:00:00 +0000</pubDate><guid>https://blog.shuaizhang.cc/en-us/posts/check-overflow-continued/</guid><description>In practice, it is sometimes necessary to detect in advance whether arithmetic overflow will occur. C# provides the checked keyword to solve this problem; how should C/C++ handle it? This article compares and analyzes several methods for checking addition overflow at the assembly-instruction level. Limited by the experimental environment and my own knowledge, the scope of this article is limited to the X86-64 architecture.</description></item><item><title>Checking Overflow with Inline Assembly</title><link>https://blog.shuaizhang.cc/en-us/posts/check-overflow-via-inline-asm/</link><pubDate>Mon, 28 Oct 2013 00:00:00 +0000</pubDate><guid>https://blog.shuaizhang.cc/en-us/posts/check-overflow-via-inline-asm/</guid><description>This question often comes up in interviews, and real-world projects also frequently need to address the same issue: how to determine whether an integer operation has overflowed. C# provides the checked keyword to handle this problem; in C, we can use inline assembly statements to check for overflow.</description></item><item><title>Use GhostScript to Export Specified Pages from a PDF as Clear PNG Files</title><link>https://blog.shuaizhang.cc/en-us/posts/export-pdf-using-ghostscript/</link><pubDate>Wed, 24 Jul 2013 00:00:00 +0000</pubDate><guid>https://blog.shuaizhang.cc/en-us/posts/export-pdf-using-ghostscript/</guid><description>Images exported from PDF files with ImageMagick are usually not clear enough. Because GhostScript can parse the underlying PDF data, it can produce clearer image files.</description></item><item><title>Reference Types in C++</title><link>https://blog.shuaizhang.cc/en-us/posts/reference-type-in-cpp/</link><pubDate>Fri, 23 Nov 2012 00:00:00 +0000</pubDate><guid>https://blog.shuaizhang.cc/en-us/posts/reference-type-in-cpp/</guid><description>This article discusses the meaning of reference types through a C++ written-test question, and how to define types with polymorphic behavior by disabling copying, providing a virtual destructor, and other techniques.</description></item></channel></rss>