Category: Essays

  • Prevent 'Zone.Identifier' Files from Appearing in WSL2

    When using Windows Subsystem for Linux 2, we access our Linux file system using Windows Explorer. When we copying and pasting files, might notice addition files like 'xxx Zone.Identifier‘.

    The 'Zone.Identifier' file is a Windows Attachment Manager feature that stores security information about files. However, since WSL2 uses an ext4 file system, Windows cannot store ADS natively. Instead, it creates a visible 'Zone.Identifier' file in the same directory.

    1. Delete Existing Files

    If you already have 'Zone.Identifier' files in your WSL2 directories, use one of the following methods to remove them.

    find ~/[Your Path] -name "*:Zone.Identifier" -delete
    Bash

    2. Disable Windows from Generating 'Zone.Identifier'

    If you frequently access WSL2 files from Windows and want to permanently stop Windows from attaching 'Zone.Identifier', you can disable this feature via Group Policy or Registry Editor.

    Press Win + R, type gpedit.msc, and hit Enter.

    Configuration → Administrative Templates → Windows Components → Attachment Manager
    User Configuration→ Administrative Templates→ Windows Components→ Attachment Manager(In Chinese)

    EnableDo not preserve zone information in file attachments

  • [Leetcode]4 Mar. 2025. Count Trailing Zeros in Factorial

    Description:

    Given an integer $n$ , return the number of trailing zeros in $n!$ (n factorial).

    Factorial is defined as:
    $$
    n! = n \times (n – 1) \times (n – 2) \times \dots \times 3 \times 2 \times 1
    $$

    Examples:

    Example 1:
    Input: n = 3
    Output: 0
    Explanation: 3! = 6, which has no trailing zeros.

    Example 2:
    Input: n = 5
    Output: 1
    Explanation: 5! = 120, which has one trailing zero.

    Example 3:
    Input: n = 0
    Output: 0

    Constraints:

    • $0 \leq n \leq 10^4$

    class Solution {
    public:
        int trailingZeroes(int n) {
            int count;
            while(n >= 5){
                n = n / 5;
                count += n;
            }
            return count;
        }
    };
    
    /*
    ## Counting 5 as a factor.
    
    We Need To Determine how many times "10" appears as a factor in the product.
    
    10 is formed by multiplying 2 & 5, we can only count 5 as a factor.
    
    For example:
    - 3! = 3*2*1 = 6 -> +0
    - 5! = 5*4*3*2*1 = 120 -> +1
    - 10! = 10*9*...*3*2*1 = 3628800 -> +2
    */
    C++

  • Typst is a semi-finished product.

    Typst is a semi-finished product.

  • pbrt is so complicated

    pbrt is so complicated

  • Casa雜誌2018-2025全合集PDF免費

    Casa Magazine 2018-2025 Full Collection PDF Free

    Casa Magazine 2021-2024 Complete Collection PDF Free Download

    Download

  • 回了趟老家(更新中)

    Back to my hometown (updating)

    First of all, Happy New Year to you, my friend!

    Everything around me seems to be changing too fast.

    In the blink of an eye, my childhood friend in my hometown is about to become a father.

    Before I knew it, I was being pushed around by all kinds of things.

    For example, I would drive my childhood friend to a place dozens of kilometers away to buy a van.

    My childhood friend is my neighbor in my hometown.

    Over the years, we could only see each other during the holidays.

    Although we don't meet often, we can always open our hearts and chat every time. It's true friendship.

    Their family runs a dance troupe, similar to a country music festival.

    There are performances basically every day of the year.

    My childhood friend was in charge of driving and playing drums, and occasionally helped with playing the electronic keyboard.

    This is actually their family business. His mother was very popular when she was young. She was a singer and had a very famous nickname, Wuchuan Songstress. His father is a guitarist and keyboardist.

    It's just that every day is spent in singing and quarreling. His parents have bad tempers and often quarrel.

    I remember when he was a child, probably in the second grade of elementary school. His parents went out to perform and left him alone at home overnight. He slept on the steps next to my building. He was found and woken up by his neighbor the next day.

    Speaking of country music festivals, to put it bluntly, it is just a group of good-looking and well-built young girls dancing on the stage in various villages. The audience is basically the elderly, left-behind children, and some single men.

    My childhood friend’s original words were, “Countryside dance troupes are just vulgar performances.”

    It is said that in the early years, in some villages, there were people with bad intentions who did bad things, such as peeping in the dressing room at the back, touching the dancing girls, etc. There were even cases of people making dirty jokes and asking to dance together.

    Maybe the situation has improved in the past two years, but it's about the same.

    People who work in this industry are used to it and it's not surprising.

    I have been there in person, but that time it was in the village of my hometown, and it was considered to be well-educated.

    My childhood friend started doing this business about four years ago.

    The stage is permanent, but the dancers come and go.

    This year a new dancing girl came, and I fell in love with her at first sight.

    This is my childhood friend’s first love.

    A few days ago, my childhood friend told me seriously that his girlfriend was pregnant and asked me what to do.

    My childhood friend and I have another playmate from childhood who studies medicine. We call him "Master".

    The master does not recommend giving birth to the child. First of all, the age is too young. My childhood friend is only 21 years old, and the girl is about the same. Education, economy, quality of life, and medical care are all very important. In addition, I am not married yet. If I want to give birth to the child, I will get married this year. Everything happened too fast.

    Having written this, I am getting ready to drive to take my childhood friend to buy a van.

    It's a rare opportunity to have some free time, so take a few days to relax.

    给朋友买了些小熊虫周边

    Bought some small toys for my friends.

  • 真三国无双起源 貂蝉mod

    Dynasty Warriors Origins Diao Chan mod

    How to use:UnzipJust put it in the root directory. Use the default costume. If you want to change back to the original character, just delete the dll.

  • 读书随笔《1984》

    Reading Essay "1984"

    The novel 1984 portrays a suffocating, dystopian society where totalitarianism is taken to the extreme. In this world, omnipresent telescreens monitor your every move; familial bonds are devoid of affection; and the perpetual “foreign war” keeps the masses trapped in the lowest tiers of Maslow’s hierarchy of needs. The populace lives in a constant state of wartime fear, ensnared in an invisible cage. The ruling Party uses Newspeak to imprison thought and restrict expression. Any spark of dissenting ideas is swiftly extinguished by the ever-present Thought Police, leading to inevitable arrest and confinement in the infamous "Ministry of Love." Yet, under such oppression, the masses do not perceive their situation as dire; instead, they consider their lives happy and fulfilling.

    The protagonist, Winston, works at the Ministry of Truth, revising historical records, newspapers, and literary works to align with Party doctrine. Over time, he begins to question Big Brother's rule. He secretly purchases a diary from the black market and records his thoughts, meeting with Julia, who shares his doubts, in a secluded room without a telescreen. However, the reality is inescapable—Big Brother is always watching. No relationship can be trusted; friends, family, and lovers might all be informants.

    In 1984, the ruling Party maintains its grip through the most meticulous form of thought control. To break the historical cycle and prevent the middle class from replacing the upper class, the Party deliberately suppresses social progress, promotes asceticism, severs connections with the outside world, and creates an information divide. Without an external point of reference, people remain oblivious to their true circumstances, resigned to their fate.

    Closing the book, I realize that no one is infallible—stubbornness and self-righteousness can be indistinguishable from controlled thought. The truth, in fact, is often simple; perhaps it has already become intertwined with lies, blurring the line between reality and deception. Trapped in a web of interests and human nature, most people are unable to discern the truth and can only drift along, passively enduring.

    In the end, would you rather be a contented pig or a suffering Socrates?

en_USEN