Blog
-
Range Sum Query 2D
Problem URL: https://leetcode.com/problems/range-sum-query-2d-immutable/
Dynamic programming solution for matrix range sum queries
-
Find First and Last Position of Element in Sorted Array
Problem URL: https://leetcode.com/problems/find-first-and-last-position-of-element-in-sorted-array/
Essentially a binary search problem, searching for the start and end positions
-
Modifying the Parent Commit of a Historical Commit
Half a year ago, when merging the hotfix branch, the merge direction was reversed, causing the hotfix branch to become the new main branch. There was no solution at the time, but today I revisited the issue and attempted to fix it.
-
ArchLinux Configuration Guide
This is a navigation page that records my configuration process. You can follow the sequence or just search for specific information.
-
Playing NieR:Automata on Linux
This guide uses NieR:Automata running on Steam as an example, with Intel + Nvidia hardware platform.
Generally speaking, most Windows games can be run through wine.
This article is part of the ArchLinux Configuration Guide.
Of course, you can also read it separately.
-
Pacman Universal Configuration
Configuration file reference: Arch manual pages
You can directly copy and replace your pacman.conf file (remember to back up)
This article is part of the ArchLinux Configuration Guide.
Of course, you can also read it separately
-
Seamlessly Migrating from Firefox Stable to Developer Edition
Mozilla's Major Blunder: Certificate Expiration Renders Firefox Extensions Unusable Worldwide This morning Mozilla played a not-so-small joke on Firefox users worldwide. Many woke up to find all their browser extensions non-functional, including on mobile versions.
Thus, how to seamlessly transfer data became the primary goal.
First, back up Firefox's user data folder. On Linux, this is the
.mozillafolder in the user directory. -
WebSocket+TLS+CDN+Web: Deploying V2Ray with Apache2
Many online tutorials contain errors - this article aims to provide corrections and comprehensive guidance.
This article references official documentation, Plain Language Tutorial, Github issue, and https://ferrummagnus.com/2017/12/22/v2ray-websocket-tls-apache/, but you don't need to check them.
Prerequisites: You have a server running Apache2 with an established blog.
-
Python3 Download and Parse xml.gz Files
Scenario: Need to fetch a GZip-compressed XML file from the web and parse it using Python3.
Requirement: Want to parse the raw data directly without saving as a file first.
Common approach: First save as a file, then use Python3's gzip library to open and parse the file.
-
Load Balancing V2Ray Multi-Protocol Multi-Server Setup with HAProxy
V2Ray's built-in load balancing strategy only offers random selection, which is clearly insufficient for unstable networks.
ShadowSocks can use HAProxy for load balancing, but V2Ray supports multiple protocols, making this approach impractical.
We can leverage Docker's features to create a network that uses HAProxy for load balancing while automatically maintaining a list of available nodes (utilizing HAProxy's health check feature and V2Ray's Dokodemo-door).
NOTE: Almost all code in this article can be copied and used directly, but I strongly recommend reading the comments carefully.