Hegwin.Me
The bitterest tears shed over graves are for words left unsaid and deeds left undone.
Home
Tools
WoW Battle Pet
Meow Etymons
About
Upgrade Ruby from 3.0 to 3.2
升级 Ruby 到 3.2
Ruby
Ruby on Rails
Nov 05, 2023
Now that Ruby 3.3 preview 2 has been released, I've been working on upgrading a 3.0 project to 3.2. I've encountered a few problems with upgrading from 3.0 to 3.2, so I'm going to try to organize them here, and hopefully they'll help. ## Bundled gems In Ruby 3.1, some libs went from being standard libraries to bundled gems, such...
Notes about Observer APIs in JavaScript
JavaScript 中的 Observer API
JavaScript
Sep 17, 2023
Recently, I need to implement a feature in a web page. The background is like this, we have a navigation bar at the top of the page that slides left and right, when the user scrolls down the page, we will add a class named active to the corresponding item in the navigation bar, when this active item is not...
Takeaways from Ruby Conf China 2023 Day 2
Ruby Conf China 2023 参会笔记 Day 2
Ruby
Ruby on Rails
AI
Aug 28, 2023
This year, AI is really a hot topic, from EverythingGPT to LLM, everyone is talking about this new technological change. At the two-day Ruby Conf China 2023, there were also three topics focusing on AI and LLM, which was very exciting. This post records what I learned on the second day of Ruby Conf. There were two speakers talking about...
Takeaways from Ruby Conf China 2023 Day 1
Ruby Conf China 2023 参会笔记 Day 1
Ruby on Rails
Ruby
Application Security
AI
Aug 27, 2023
Last weekend (August 19-20, 2023), Ruby Conf China was successfully held in Shanghai. This was the first time since COVID-19 that Ruby Conf was held offline - we've been waiting for it for three years. It's amazing that the venue was the same one we booked for Ruby Conf 2021 three years ago (JW Marriott at Tomorrow Square); Due to...
The Limits of Photolithography - Questions from reading The Future of Computing by Matz
光刻机的极限--读《代码的未来》产生的疑问
Hardware
Photolithography
Optics
Excerpt
May 09, 2023
I recently finished reading "The Future of Computing" by Yukihiro Matsumoto (Matz), a book published by Matz in 2012. Although ten years have passed since its publication, some of the technologies mentioned in the book have disappeared and some of the "future" has been realized, it is still a rewarding read in this era. The Future of Computing focuses on...
A Thought-Provoking Exploration of Aging and End-of-Life Care and A Review of Being Mortal by Atul Gawande
关于衰老与老年生活质量,以及《最好的告别》
Life
Aging
Book Review
Excerpt
Apr 06, 2023
You have to be prepared for "that", my father's doctor told me when he called me out of the hospital room alone. In May 2022, my father was hospitalized for a stroke, and I returned to his city to care for him for four months, the longest I had stayed in my hometown in over a decade. There were more...
Rotate cookies when upgrading to Rails 7
Rails 7升级过程中针对cookie一系列变化的应对策略
Ruby on Rails
Apr 02, 2023
Rails 7 brought a number of new features as well as breaking changes, which made the upgrade from 6.1 more troublesome than the previous one. Rails modified the default cookie serilaizer and the default encryption method, causing incompatibility between the old and new cookies, so the upgrade needs to be done in steps to ensure the best user experience. #...
On Reading the Prince and Comparison on Translation Services
关于阅读《君主论》和翻译工具的比较
English
Business Solution
Excerpt
Mar 30, 2023
Recently, I've been considering changing the cloud service provider of my cell phone, so I'm cleaning up my photo albums to reduce the cost of migration and to say "goodbye to the past" and "not to be burdened by memories". I found some screenshots left when I read the English version of The Prince in 2017. I can't exactly remember...
The Proof of Stirling's approximation
Stirling公式的证明
Math
Algorithm
Mar 09, 2023
When describing the time complexity of an algorithm, we often use Big O notation to describe the growth of computation with the size of the problem. For a factorial $n!$ of positive integers, this time complexity is $O(n)$ if a general recursive implementation is used, which represents a linear increase in computational effort as $n$ grows. When $n$ is large,...
The Proof of Wallis' formula
Wallis公式的证明
Math
Feb 23, 2023
I read a question on Zhihu "Is there a problem with a result containing 'π' but completely unrelated to the circle?", and I thought of Wallis' formula, which was proposed by John Wallis (1616-1703). The main application still lies in the proof of Sterling's formula. Although Wallis' formula itself seems to be an ordinary infinite product, but his result expresses...
Next Page >