yxzl.dev Technical Blog and Notes

website·Indexed 32 days ago

https://blog.yxzl.dev/

A personal knowledge base and technical blog featuring lecture notes for Linear Algebra (NYU Shanghai MATH-SHU 140), competitive programming solutions from Luogu and LOJ, and guides on cloud deployment, frontend development (Vuepress, Algolia), and system administration (Linux, Nginx, MySQL, PostgreSQL).

Tokens
68.7K
Snippets
247
Records
397
Agent score
58%

What's inside yxzl.dev

  1. Overview of JetBrains Fleet core features

    JetBrains Fleet is designed as a lightweight, multi-language editor with the following core pillars:

    • Intelligent: Supports code completion via the LSP (Language Server Protocol), allowing it to integrate completion services from non-IDE vendors.
    • Distributed: Capable of connecting to remote servers for coding, reducing local storage requirements (similar to VS Code's remote capabilities).
    • Collaborative: Supports multi-user real-time collaborative editing, similar to online office suites.
    • Multi-language: A single editor capable of handling multiple programming languages, avoiding the need for separate IDE installations for different languages.
  2. Overview of SSL certificate auto-deployment tool

    This Python project automates the process of uploading SSL certificates to mainstream cloud service products. It is designed as a supplement to certificate issuance tools like acme.sh, focusing specifically on the deployment phase rather than the application phase. Currently supported providers and products include:

    • Aliyun: CDN, DCDN, Video Live
    • Tencent Cloud: CDN, API Gateway
    • DogeCloud: CDN
  3. Overview of Azure DevOps as a Git Repository Alternative

    Azure DevOps serves as a viable alternative to GitHub and Gitee for version control, particularly for individual developers or small teams. Key advantages include:

    • No limits on the number of repositories or total storage space.
    • High stability and accessibility in the Asia-Pacific region (East Asia servers).
    • Support for both public and private repositories.
    • Team collaboration panels.

    Caveats:

    • Free tier supports up to 5 collaborators per project.
    • The interface is in English.
    • Public repositories lack some open-source features like Issues, making it more suitable for private version control than for hosting large open-source communities.
  4. Understand Go slice length vs capacity

    In Go, a slice is a descriptor for a contiguous segment of an underlying array. It consists of three fields:

    1. A pointer to the underlying array.
    2. A length (len): The number of elements currently contained in the slice.
    3. A capacity (cap): The total number of elements the underlying array can hold, starting from the slice's first element.

    Key constraints:

    • You cannot access elements beyond the current length of the slice, even if the capacity is larger. Attempting to do so (e.g., s[index] where index >= len(s)) will cause a runtime panic: index out of range.
    • To utilize the remaining capacity, use the built-in append() function.
  5. Understand Linear Equations and Linear Systems

    A linear equation in variables $x_1, \dots, x_n$ is defined as $a_1x_1 + a_2x_2 + \dots + a_nx_n = b$, where $b$ and the coefficients $a_i$ are real or complex numbers. A linear system is a collection of one or more such equations involving the same variables.

    Key properties of linear systems:

    • Solution: An ordered list of numbers that makes every equation in the system true.
    • Consistency: A system is 'consistent' if it has at least one solution; otherwise, it is 'inconsistent'.
    • Equivalence: Two systems are equivalent if they share the same solution set.
    • Possible Solution Counts: A system can have no solution, exactly one solution, or infinitely many solutions.
  6. GitHub Copilot supported IDEs and languages

    GitHub Copilot is an AI-powered code completion plugin that generates code based on natural language descriptions (e.g., function descriptions). It is compatible with Visual Studio Code and the JetBrains suite of IDEs. While it supports nearly all programming languages, it is noted to have particularly strong adaptation for Python, JavaScript, TypeScript, and Go.
  7. Understand the KMP Border (Failure Function) concept

    A 'border' of a string $s$ is a substring $t$ that is both a prefix and a suffix of $s$, but is not equal to $s$ itself. The KMP algorithm relies on finding the length of the longest border for every prefix of the pattern string.

    When a mismatch occurs at position $q$ in the pattern, the algorithm looks at the longest border of the string ending at $q-1$. This allows the pattern to be shifted to the right by (matched_length - border_length), effectively skipping characters that are guaranteed to match based on the symmetry of the pattern.

  8. Understand WeChat PC client database file structure in the Msg directory

    The WeChat PC client stores its data in SQLite databases located at .../WeChat Files/wxid_xxxxxxxx/Msg. To analyze this data, the files must first be decrypted. Most 'chat record data' follows a structure similar to the data found in the Multi folder.
  9. Interpret the determinant geometrically

    The determinant of a square matrix $A$ represents the scaling factor of the linear transformation it represents.

    • Volume Scaling: The absolute value $|\text{det}(A)|$ represents how much the volume of a unit cube in $\mathbb{R}^n$ is scaled. If $\text{det}(A) = 0$, the transformation collapses the space into a lower dimension (volume becomes zero).
    • 2D Area: For a 2x2 matrix, $|\text{det}(A)|$ is the area of the parallelogram formed by the column vectors of $A$.
    • 3D Volume: For a 3x3 matrix, $|\text{det}(A)|$ is the volume of the parallelepiped formed by the column vectors of $A$.
  10. Understand the WeChat PC 'Multi' folder database structure

    The Multi folder contains the core chat and media databases for the WeChat PC client. Due to size constraints, these databases are often split into multiple files. There are three primary database types in this folder: FTSMSG (search indices), MediaMSG (voice messages), and MSG (core chat records).
  11. Understand the difference between `npm start` and `node app.js`

    Running node app.js is a direct way to execute a specific JavaScript file using the Node.js runtime. In contrast, npm start is an npm script defined in the package.json file. When you run npm start, npm looks for the start script under the scripts object in package.json and executes the command associated with it. In many Express.js projects generated by express-generator, npm start is mapped to node ./bin/www, where bin/www serves as the actual entry point that configures the HTTP server and port before loading the application logic from app.js.
  12. Understand JWT structure and signing process

    A JSON Web Token (JWT) consists of three parts separated by dots (.): Header, Payload, and Signature. The Header contains metadata (e.g., algorithm alg), and the Payload contains business data. The Signature ensures the token has not been tampered with.

    For the HS256 algorithm, the signature is generated by Base64Url encoding the header and payload, joining them with a dot, and then applying an HMAC-SHA256 hash using a secret key.

    HMACSHA256(base64UrlEncode(header) + "." + base64UrlEncode(payload), secret)