yxzlwz (异想之旅)

website·Indexed 32 days ago

https://yxzl.dev

A personal knowledge base and blog featuring technical articles on algorithms, frontend and backend development, cloud services, and informatics competitions. The site includes academic lecture notes for Linear Algebra (NYU Shanghai MATH-SHU 140), Python experiments, and essays on various social and rhetorical topics.

Tokens
69.1K
Snippets
248
Records
398
Agent score
65%

What's inside yxzlwz

  1. 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
  2. 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.
  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 the interaction between Backend, Celery, and Judge components

    The system uses a decoupled architecture to handle code submissions, ensuring data isolation and scalability. The Backend is the only component that interacts directly with the user. The Judge (评测端) is isolated from the database to ensure security and allow for distributed deployment.

    Workflow for code submission:

    1. Backend: Creates an evaluation task in RabbitMQ when a user submits code.
    2. Celery: Retrieves the task from RabbitMQ and forwards the task information to the Judge via WebSocket.
    3. Judge: Executes the code and sends real-time return data for each test point back to Celery via WebSocket.
    4. Celery: Saves user output files to the path defined by the SUBMISSION_ROOT configuration for later user retrieval.
    5. Judge: After all test points are processed, the Judge calculates the total score and status for each test point and sends them to Celery.
    6. Celery: Stores the final results in the database.
  5. 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.
  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 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.
  8. Understand the P vs NP problem

    The P = NP question asks whether every problem whose solution can be verified in polynomial time (NP) can also be solved in polynomial time (P). While intuition suggests P is a subset of NP, the equality of the two remains a fundamental open question in computer science.
  9. 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.
  10. 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.
  11. 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)