Finisky Garden

NLP, Software Engineering, Product Design

0%

I haven’t updated my blog in over a year. Not out of laziness, nor because I’ve fallen behind on technology. It’s more of a conviction: once AI became powerful enough, the value of technical blogs dropped significantly. People shifted from searching and reading to learning through direct conversations with AI. On top of that, AI-generated content floods social media the moment anything happens, making me feel there’s little point in writing after the fact. Blog traffic has plummeted over the past year, which further killed my motivation to spend hours crafting a post. I miss the days when every article was painstakingly typed out, word by word, over hours or even days.

AI tools have made remarkable progress in the past six months. As a heavy user, I want to talk about this: if agents are supposed to be our helpers, why do we feel more exhausted than ever?

When compiling a LaTeX document that uses a customized font in TeX Live on Windows, you might encounter the following error:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
kpathsea: Running mktextfm Fontin

The command name is F:\texlive\2025\bin\windows\mktextfm
name = Fontin, rootname = Fontin, pointsize =
mktexmf: empty or non-existent rootfile!

kpathsea: Running mktexmf Fontin.mf

The command name is F:\texlive\2025\bin\windows\mktexmf
Cannot find Fontin.mf.
kpathsea: Appending font creation commands to missfont.log.

kpathsea: Running mktextfm Fontin

The command name is F:\texlive\2025\bin\windows\mktextfm
name = Fontin, rootname = Fontin, pointsize =
mktexmf: empty or non-existent rootfile!

kpathsea: Running mktexmf Fontin.mf

The command name is F:\texlive\2025\bin\windows\mktexmf
Cannot find Fontin.mf.

This error occurs because the TeX system cannot find the necessary font files (specifically .mf or .tfm files) for Fontin, and fails to generate them. The weird part is that you have installed the font already.

MongoDB’s Aggregation Pipeline is a powerful tool for processing and analyzing data, suitable for both real-time queries and offline data analysis. It allows developers to use multiple stages to transform, filter, group, and sort data, enabling efficient execution of complex computations. This article will explore the basic concepts, application examples, performance analysis, and optimization strategies of the Aggregation Pipeline.

Today, when I opened Chrome, I suddenly received a prompt saying that SwitchyOmega “# This extension may soon no longer be supported because it doesn’t follow best practices for Chrome extensions.” It seems that the plugin was disabled after Chrome automatically updated. Another bad news: the Stylish plugin has also been rendered unusable for the same reason.

Moreover, the Chrome Web Store is inaccessible, preventing the installation of other extensions—deadlock.

The double-spending problem is a critical challenge in transaction systems, especially when managing account balances or funds. It occurs when a system allows the same funds to be spent multiple times due to concurrent operations or race conditions. In this article, we explore two approaches to resolving this issue using MongoDB: transaction-based handling and versioning-based handling.

This post is an in-depth discussion of the double-spending problem from the Building a Transaction System with MongoDB blog.

After a Windows Update, RDP on Windows 11 might stop working correctly. Symptoms include a black screen upon connection, no visible mouse or interface, and an automatic disconnection after about a minute. This forces users to return to the local machine to investigate the issue.

If you’ve ever struggled to set the correct timezone for your cron jobs on Ubuntu 22.04, you’re not alone. In this blog, we’ll walk you through a troubleshooting journey that highlights common pitfalls and the ultimate solution.

When working with Azure Virtual Machines (VMs), monitoring performance metrics is essential for ensuring optimal operation. A common scenario involves tracking the CPU Credits Remaining for a B-series burstable VM instance.

Typically, we use az vm monitor metrics tail to get the CPU Credits Remaining metric:

Transaction systems are at the heart of modern commerce and financial activities, spanning a wide range of scenarios from e-commerce order processing to real-time settlements in financial institutions. Such systems demand high concurrency handling, real-time data storage, and efficient retrieval capabilities, all while balancing data consistency and performance. As transaction data continues to grow in scale and complexity, traditional transaction system architectures often struggle to meet these challenges due to rigid table structures and limited horizontal scalability.

MongoDB, as a distributed document-oriented database, provides a modern solution for building complex and efficient transaction systems. With its flexible schema design, high throughput capabilities, and built-in transaction support, MongoDB addresses diverse business needs effectively.

Received a certificate renewal notification from Tencent Cloud, but when applying for a new certificate, I found out that Tencent Cloud no longer offers free one-year certificates:

Starting from April 25, 2024, the validity period of new free certificates issued by Tencent Cloud will be adjusted to 90 days.

Since I’ve always updated certificates manually, doing it every three months feels quite tedious. So, I decided to explore Certbot from Let’s Encrypt. My only concern was how to prove ownership of a subdomain. After trying it out, I realized this wasn’t an issue at all, as Certbot only issues certificates and doesn’t pose any threat to the website itself.

Here are the configuration steps for Certbot. In fact, it’s very simple and only requires running a few commands.

Nowadays, many popular apps incorporate social network features, such as Twitter, WhatsApp, and Facebook. These platforms need to scale to accommodate billions of users (graph nodes), which is no small feat. Building and maintaining a scalable social network infrastructure requires careful planning and strategic data modeling. In fact, specialized social networking applications like Facebook have dedicated teams focusing solely on optimizing their performance to the highest level. However, for smaller apps or startup projects looking to add social networking capabilities, creating a full team to handle such architecture is often impractical and unnecessary.

So, is it possible to build a high-performance, scalable social network using the right data modeling and storage solutions? The answer is yes. Early versions of Facebook used MySQL as the underlying storage to construct their social network, but today we have more advanced and efficient storage options available: MongoDB.

After upgrading packages in a conda env, talib cannot accept dataframe as input, the error message looks like TypeError: Argument 'xxx' has incorrect type (expected numpy.ndarray, got DataFrame):

1
2
3
4
5
6
Traceback (most recent call last):
  File "/data/1.py", line 7, in <module>
    df['SMA_5'] = ta.SMA(df['Close'], timeperiod=5)
  File "/data/miniconda3/envs/a/lib/python3.10/site-packages/talib/__init__.py", line 64, in wrapper
    result = func(*_args, **_kwds)
TypeError: Argument 'real' has incorrect type (expected numpy.ndarray, got DataFrame)

Most of the web search results are misleading, like changing the df into np array. Since the code works before updating packages, the problem should be package incompatibility issue.

Today, I encountered a strange issue in Windows 11 where the D drive was visible in the Disk Management tool but not in File Explorer. I searched online for many solutions, such as updating drivers in Device Manager, disabling and re-enabling the device, using diskpart to delete and recreate the partition, changing the volume label, changing the drive letter, etc., but none worked.

Problem Description

  • A new D drive, visible in diskmgmt.msc Disk Management, everything seemed normal. It could even be accessed in File Explorer (though the drive wasn’t displayed in the left sidebar).
  • The D drive could be used normally, such as via the command line.
  • Changing the drive letter to “E” or another letter made it visible in File Explorer, but switching it back to “D” caused it to disappear again.

Use az cli to query multiple fields of VM information. Here we need to use JMESPath language to implement it.

Typically, we will use az vm show to get the detailed VM information:

1
2
3
4
$ az vm show -g Linux -n alpha -d -o table
Name    ResourceGroup    PowerState    PublicIps     Fqdns    Location    Zones
------  ---------------  ------------  ------------  -------  ----------  -------
alpha   Linux            VM running    11.1.111.111           eastasia    1

In WinSCP, I found that when uploading file to the server, the file doesn’t have a temporary filename extension “.filepart”.

Enable temporary filename for all files in “Preferences -> Transfer -> Endurance” still does not work.

After upgrading Ubuntu 20.04 LTS to Ubuntu 22.04LTS, the server always freezes after ~10 minutes. All services are down, cannot ssh, connect to serial console but cannot input. However, this issue never happen before release upgrade.

Cannot believe that Word has such a bug: when tracking changes, wildcard replacement cannot correctly work.

I want to batch replace English parentheses with Chinese parentheses, so I use wildcard replacement:

1
2
3
Find What: \((*)\)
Options: Use Wildcards
Replace With: (\1)

For example, for “(abc)”, the expected result is “(abc)”, however, the result is “abc()”.

1
2
3
4
$ pip install torch==1.12.0
Defaulting to user installation because normal site-packages is not writeable
ERROR: Could not find a version that satisfies the requirement torch==1.12.0 (from versions: 1.0.0, 1.0.1, 1.0.1.post2, 1.1.0, 1.2.0, 1.3.0, 1.3.1, 1.4.0, 1.5.0, 1.5.1, 1.6.0, 1.7.0, 1.7.1, 1.8.0, 1.8.1, 1.9.0, 1.9.1, 1.10.0, 1.10.1, 1.10.2)
ERROR: No matching distribution found for torch==1.12.0

The root cause is that python version is too low (3.6). We need to upgrade python to a new version.

Recently I upgrade NexT theme to v8.14.1. The related post plugin hexo-related-popular-posts had been replaced by hexo-related-posts, which generates related posts by tf-idf algorithm. However, the compute cost is a little bit heavy if you have many posts. A good trade-off is enable this feature only for production environment. The plugin hexo-related-posts already takes this into account and use enable_env_name to disable its execution. Unfortunately, the document has typo so I takes some time to fix it.

So how to set environment variable in Hexo?

Short Answer$ hexo <command> --<env_key> env_value

The following secitons will illustrate how to enable related post on production.