Arc Bookmark Export

Recently, I've been thinking about switching back to Edge browser from Arc. Naturally, changing browsers requires migrating usage history data from Arc, with bookmarks (or "Pined Tabs" as Arc calls them) being the most important. However, after searching around, I couldn't find an export option. A quick search revealed that the Arc browser, which uses the Chromium engine, indeed lacks a bookmark export feature (The shame of Arc browser's user experience: unable to export saved websites)...

LeetCode: Make a Square with the Same Color

Problem source: 3127. Make a Square with the Same Color difficulty: easy You are given a 2D matrix grid of size 3 x 3 consisting only of characters 'B' and 'W'. Character 'W' represents the white color, and character 'B' represents the black color. Your task is to change the color of at most one cell so that the matrix has a 2 x 2 square where all cells are of the same color. Return true if it is possible to create a 2 x 2 square of the same color, otherwise, return false. Constraints: grid.length == 3 ``grid[i].length == 3` grid[i][j] is either 'W' or 'B'. Solution The problem can be transformed into determining whether there exists a 2 * 2 matrix within a 3 * 3 matrix that contains 3 or 4 identical elements. Given that the matrix is only 3 * 3, it can be directly divided into 4 blocks, and we can simply check whether any of these 4 blocks meet the condition.

Core Competitiveness

A few days ago, I took a vacation and went home, and arranged to meet up with an old classmate who works in the railway system. We had a lot to talk about. The railway department, a traditional state-owned enterprise, doesn't seem much different from the unit system in terms of work. Although there are indeed professional aspects to the job, the core elements seem to be party building and publicity. All these things sound very interesting to someone like me who works in the volatile internet industry. Many of the so-called stereotypes about the system are, to some extent, quite reasonable. The most memorable part of our conversation was about work and promotion. I asked my classmate out of curiosity, "What growth and gains have you achieved over the years of working? Or what would you say is your core competitiveness when it comes to promotions or job-hopping?" The point of my question was to understand what skills my classmate has acquired and improved in his work, what he possesses that others don't, or what he has that others also have.

Reading Notes on 'Glucose Revolution'

Douban: Glucose Revolution

Core: To control and slow down the emergence of blood sugar peaks, it is necessary to maintain a steady blood sugar level and reduce large fluctuations

Dangers

  • Glycation and inflammation
  • Damage to the liver and pancreas

Some small tips

  • Eating order: vegetables, protein and fat, and finally carbohydrates
  • Drinking a little vinegar before or during meals can help
  • Simple exercise after eating can inhibit the appearance of blood sugar peaks
  • Put on a coat: Mixing some protein and fat when eating carbohydrates can also help

Follow Authentication

This message is used to verify that this feed (feedId:55149012216215581) belongs to me (userId:44921828138427392). Join me in enjoying the next generation information browser https://follow.is. This message is used to verify that this feed (feedId:66862106362323968) belongs to me (userId:44921828138427392). Join me in enjoying the next generation information browser https://follow.is.

Reading Notes on 'The Psychology of Money'

Some excerpts and notes from reading "The Psychology of Money: Timeless lessons on wealth, greed, and happiness"

Knowing is not the same as doing

Financial success is not a hard science, but a soft skill - how you do it is more important than how much knowledge you have.

An individual investor's willingness to take risks depends on early personal experiences. What determines the outcome in investing is not intelligence, not education or experience, but the time and place where a person is born - purely luck factors.

Remove Copyright Information from Copied Content in Apple Books

Recently, I've been reading on Apple Books on my computer. The experience is decent, but there's one annoying aspect when taking notes: When you copy content from a book, Books automatically adds quotation marks and appends copyright information. This can't be removed through citation settings, which means that every time you paste a note, you have to manually delete this extra information. It's quite a hassle.

"If there is evidence that allocating empty sets can harm performance, it can be avoided by repeatedly returning the same immutable empty set, because immutable objects can be freely shared (Item 17). The following code does just that"

Excerpt From effective java 3rd Chinese edition wizardforcel This material may be protected by copyright.

Vue3 Slot

In Vue components can set a slot tag in the template, which is used to pass some content when using this component to replace the slot.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
<FancyButton>
  Click me! <!-- slot content -->
</FancyButton>

<button class="fancy-btn">
  <slot></slot> <!-- slot outlet -->
</button>

// final output
<button class="fancy-btn">Click me!</button>

Hugo English Content Appears on Chinese Pages

After setting up my English blog, I accidentally noticed English content tags appearing on the tag pages during an update yesterday. Initially, I thought there was an issue with the logic of generating the tag pages. The variable used for generation was $.Site.Taxonomies.tags, which seemed to have no issues. I thought about various filtering methods, but none seemed to solve the problem.

Setting up My English Blog By Hugo

A few days ago, I came across something quite infuriating on Twitter: A blog post written by a user I follow was translated into English and reposted on Medium, garnering a significant number of views, as well as thoughtful and heartfelt comments from users. I've often seen articles from English-speaking communities translated into Chinese and repurposed as content farms, but this was the first time I'd seen the reverse—Chinese content translated into English for reposting. It was even more frustrating to see. The blogger quickly reported the user who had reposted the translated article, and tried translating some of his own blog posts into English with the help of ChatGPT and posting them on Reddit. The response was very positive, with one post even topping the channel. As someone whose work is always related to internationalization,…

Rethinking Investment

After reading some of Meng Yan's views on value investing in my senior year, I started consciously considering the matter of investment. Since 2019, I have been regularly investing in domestic funds, from initially buying index funds to track overall development, to later choosing some highly-rated aggressive funds for better returns, my investment philosophy began to gradually shift. However, no matter how I chose, it couldn't resist the overall environment and trend. When the entire domestic market was in poor shape, the choice was essentially meaningless. Coupled with the discovery of various oddities, I became more clearly aware that the domestic stock and investment market is a joke. Why did I gradually lose faith in long-term value investing? In my understanding, value investing is essentially using money to support and accompany a company's growth, and then to gain a portion of the value from this growth. The essence of the stock market should be to help companies raise funds for better development and growth.

2023 Annual Record

Last weekend, I had the idea of writing an annual summary. After creating a new file and dictating a lot of content, it felt like I was pouring out my own thoughts, something that could only be written for my own eyes. So, I set it aside for a week and chose to create a new file to rewrite a version that could be published. This year is actually an important milestone, marking the transition from being a student to a worker. The changes in identity, role, and environment have brought me a lot of thoughts and ideas. However, I don't have much time to work on a regular basis, and many ideas that pop up in my mind may not be thought through, or they might be forgotten because I didn't record them. So, I decided to take this opportunity of writing an annual record to summarize some thoughts.

Advent of Code 2023: Day5

The specific problem can be seen here A simple summary description is: Given some integer inputs as seeds, and some mappings (list list (dst, src, length)), if a seed falls in the range [src, src + length], it is mapped to (dst + seed - src). The question is to find the minimum value among the seeds after several mappings. Brute Force with F# A very intuitive idea when seeing the problem is to scan all mappings for each input seed, get a final seed, and find the minimum value from it. Part1 is easily passed, but when it comes to part2, each pair of seeds represents all seeds in the range [seed1, seed1 + seed2], adding up to more than 19.8 billion seeds. At first, I wrote a brute force simulation in F#, but it was interrupted after running for a while, possibly because there were too many seeds.

Embracing AI with the Arc Browser

Despite my previous criticisms of the Arc browser in my usage notes, its unique features and aesthetic appeal are quite attractive to me. Hence, I often find myself switching my default browser to Arc on my computer. Overall, the user experience is quite good, except for the fact that the extension status is not visible and needs to be invoked from the menu when needed. After this switch and update to the Arc browser, I noticed that there's a new AI tab in the settings called Max, which seems quite interesting. Based on a quick look at this settings page, it has the following main features: Ask questions based on the current page content Generate a preview of the link content based on AI Use AI to intelligently name the title of the open tab and the downloaded file Invoke ChatGPT to ask questions After trying it out, I think the idea is quite good, but there is still room for further improvement.

How to Publish a Gradle Project to Maven Central Repository

How can you publish the output of a completed gradle project to the Maven Central Repository, so that everyone can benefit from your work? Last week, I went through the process and published a simple clipboard operation project I wrote. I found it a bit complicated, the process was long, and with gradle, the updates are too fast and compatibility is poor. This makes the documents found online somewhat inconsistent. What's worse, even the official gradle publishing tutorial from Sonatype is inconsistent with the latest gradle8 version. Therefore, I could only refer to the process inside, and the details had to be figured out by myself.