Sekai 🌐 🗺

Sekai is the kanji for 世界, meaning “the world”. That’s a great word because of the scale it designates.

Cantonese vs Mandarin for Reading Tang Poems

Comparison using Du Mu's poem

This is a linkblog to a post on Discuss HK which claims how Mandarin (普通話) messes up the flat and oblique tones (平仄) of the regulate verse (近體詩) below. 《山行》 杜牧 遠上寒山石徑斜,白雲生處有人家。 停車坐愛楓林晚,霜葉紅於二月花。 Cantonese (粵語) Mandarin (普通話) 仄仄平平仄仄平 仄平平仄仄平平 平平仄仄平平仄 仄仄平平仄仄平 仄仄平平平仄平 平平平仄仄平平 平平仄仄平平仄 仄仄平平仄仄平 However, Kimery has checked the Mandarin pinyin (拼音) and (s)he doesn’t found such problem except for some characters with entering tone (入聲). [Read More]

Quels schémas à tester ?

Pour simuler les trajectoires d’une équation différentielle, le schéma le plus facile est l’un découvert par Euler. Cependant, en espérant mettre ce que j’ai vu au cours de ma licence en pratique, j’ai cherché un peu sur des méthodes numériques pour les EDS sur Google, et je suis tombé sur un article écrit par Brian D. Ewald. Les différences entre les schémas « forts » et « faibles » seraient-ils pertinents pour mon stage ? [Read More]

Borel Cantelli Exercise 2019

I intend to post this for a Borel-Cantelli lemma exercise on Math.SE.

The target event is ${\exists i_0 \in \Bbb{N} : \forall i \ge i_0, X_i = 1}$, whose complement is $${\forall i_0 \in \Bbb{N} : \exists i \ge i_0, X_i = 0} = \limsup_i {X_i = 0}.$$

To apply Borel-Cantelli, one has to determine whether $\sum_i P(X_i = 0)<+\infty$.

Mise à jour du template de lettre

Template de lettre en Xe$\LaTeX$

Contexte J’ai publié mon template de lettre en Xe$\LaTeX$ sur mon ancien blog (hébergé sur GitHub Pages) il y a trois ans. Problème et solution Après le changement de l’ordi portable, il me faut l’installation du pacquetage “texlive-lang-french” sur la nouvelle version d’Ubuntu. Sinon, une erreur du pacquetage Babel se surviendra. ! Package babel Error: Unknown option `frenchb'. Either you misspelled it (babel) or the language definition file frenchb.ldf was not foun d. [Read More]

Staticman Failure on Tsalikis' Site

Use Alternative Staticman API server

After reading Hugo Comments with Staticman on Kostas Tsalikis’ web site, I tried to leave the following comment. As far as I know, Staticman can be used only with GitHub, since it works as a GitHub bot. Obviously, not all static sites are saved in GitHub, and this may be a showstopper for someone using another service. Thanks to eduardoboucas/staticman#219, Staticman now supports GitLab. You may view my demo Hugo site on Framagit at https://staticman-gitlab-pages. [Read More]

Staticman Repo Setup Errors

Common Staticman Config Erorrs in Git repos

Background Idem to Staticman on Framagit. Besides, the build time for my Staticman + Beautiful Hugo demo on Framagit is half of that for the same project on Problem After the setup, it’s possible that the theme shows “Sorry! There’s an error during submission.” To get an insight into this error, one has to open Web Developer Tools → Network and select the row corresponding to the POST request sent to the Staticman API. [Read More]

Staticman's Encryption Mechanism

Verify encrypted content

Background Staticman’s documentation gives a link to the public key for the public Staticman instance. I’ve set up my own Staticman instance for testing Staticman’s native GitLab support. It’s a coincidence that the public Staticman instance has been hitting it’s API limit, as reported in Staticman issue 227. To help others, I’ve published the URL of my own Staticman instance, which is associated with the GitHub/GitLab user staticmanlab. As Node.js’s RSA library has been used in Staticman, I have the responsibility to publish the public RSA key for my Staticman instance. [Read More]

Staticman on Framagit

It’s a pity that some GitLab users have removed Staticman from their repo. I saw demand for Staticman from Framagit users. Therefore, after two days of testing, another API instance for Framagit has been created at (Edit: typo edited, please see my comment below.) The default GitLab base URL is set to “". To provide Staticman support for a self-hosted GitLab service, another Staticman API server has to be set up. [Read More]

Detect Missing EOF

While editing files on GitHub/Gitlab, missing an empty line at the bottom of a file in the buffer will result in no newline at the end of file. In the case of regular text files, this isn’t consistent with the POSIX standards. for file in `git ls-files`; do grep -Iq . $file && if ! newline_at_eof $file; then; else echo $file; fi done Fred has provided a shell script for detecting EOF on Stack Overflow. [Read More]