This article talked about how I applied for my J-1 waiver from a third country. As this article mainly involves concepts and organisations related to China, it is written in
Telegram is a growing platform of instant messaging which has gained great popularity in the past few years. With its openness and superior user-friendliness, it has attracted a lot of users, along with spammers.
While I was trying to look for if I am eligible for H-1B visa petition. I wasn’t able to find much information online on this matter, as most Australians would use E-3 visa to work in the U.S. instead of H-1B. Since I have found it out finally, I thought it’d be good to share it here as well, in case anyone else may also need it. TL;DR:
在 macOS 和 Android 平台实现音乐库中的自定义排序
macOS と Android での音楽ライブラリーのカスタムソート順
Custom sort order in music libraries is a rather rare need. Most major languages use phonograms in their scripts, where the natural sort order is more or less identical to what is seen in Unicode (probably after some normalizations). On the other hand, languages using logograms (logosyllabic scripts, mainly Chinese characters in our context) does not have their characters sorted in their primary natural (usually phonetic) order in Unicode.
This causes a problem where a list of text sorted in Unicode code point order can be odd and difficult to look up from in these languages. Custom sort order in music libraries is thus useful when you have songs in one of these languages, or even a mix of them.
As this article involves mainly with concepts common among Chinese and Japanese language users, this article is also written in
Telegram is a popular IM platform that is famous for its openness. A lot of applications are being discovered with their public Bot API and User API. Exposed as an HTTP interface, the Bot API is more popular on Telegram, but to interact with a bot, we still need to expose its User API, which is using an original protocol named MTProto. Below is my simple code snipped that sends a message to a bot and mark its first reply as read, using Pyrogram — a Python wrapping of MTProto.
Ultimate Fields is a WordPress plugin that add custom fields to existing post types, both built-in and custom. It’s the only free plugin I found that can add a repeating field (field with arbitrary number of items. However, this plugin has not been updated for almost a year, and there’s a bug where repeater fields cannot be written using REST API.
reStructuredText (reST) is a markup language that is popular in the Python developers community. reST is the standard markup language for
docutils, Sphinx documentation generator, and the Python Package Index (PyPI). However, reST by now is still not popular enough. Most translation platforms, including Crowdin which I’m using now for EH Forwarder Bot, have no support to reST documents.
Sphinx has provided a plug-in
sphinx-intl, which extract strings from reST documents and compile into GNU
gettext message catalog template (.pot) files, and build new documents with translated strings in other languages. GNU
gettext formats are widely accepted by translation platforms, making our life much easier. This would work out-of-box if you are generating HTML or PDF documentations, but not so simple if you want a reST output.
When I started refactoring EFB Telegram Master Channel (ETM) for 2.0 updates, I was investigating ways to organize code into different files in a decent manner. In this article I’d like to talk about the strategy I used, comparing to another codebase I was reading back then,