Posts

How to Program Your Robot Car into a Goalkeeper?

· β˜• 12 min read
Programing a robot car can bring a lot of fun. In this post, we are going to discuss how to program a robot car into a goalkeeper: watching the ball, moving to the ball, kicking it, returning to the start point and waiting for the next ball, keeping itself in the field... What's more, we will walk through the system states and transition between states above these subtasks, and principles and methods below these subtasks.

Walk around Strange HTML Video Tag Behavior in Wechat

· β˜• 2 min read
In some Wechat built-in browser, video tag in your website always surprisingly goes fullscreen automatically, leaving document flow left below, with "related videos" suggestions at the end of your video.

Hugo i18n Automatic Language Redirection

· β˜• 3 min read
Hugo has really neat support for i18n. Unfortunately, it does not provide a straitforward way to redirect your visitors automatically according to their web browser language preferences. The good news is that Hugo authors leave a open window for solving this problem.

PostgreSQL Date and Time Data Types Explained

· β˜• 9 min read
PostgreSQL provides five datetime data types, including timestamp/timestamp with time zone, date, time, interval and time range(tsrange, tstzrange, daterange). This article briefs them, talks about gotchas and recommendations like why not store every datetime in UTC.

Why My Content Served by PWA Service Worker Not Updating?

· β˜• 4 min read
Your PWA website console log keeps saying: 'New content is available; please refresh.' But refreshing just does not seem to work - old content and the log both stick. Here are some ways to fix it, along with a brief explanation on why it happens.