Sekai 🌐 🗺

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

My Intended Trigo Answer

The Math.SE question $2\cos(2x) - 2\sin(x) = 0$ has attracted several answers from high-rep users.

I am expanding @rhombic's comment into an answer.

\[ \begin{aligned} 2\cos(2x)-2\sin(x)&=0 \\ 2 - 4\sin^2(x)-2\sin(x)&=0 \\ 2\sin^2(x)+\sin(x) - 1&=0 \\ (2 \sin(x) - 1)(\sin(x) +1) &= 0 \\ \sin(x) = \frac12 \text{ or } \sin(x) &= -1 \\ x = \frac{\pi}{6}, \frac{5\pi}{6} \text{ (rejected) or } & \frac{3\pi}{2} \text{ (rejected)} \end{aligned} \]

Improved Integration of Hugo and $\KaTeX$

Problem There’s no custom $\KaTeX$ macro in local preview since I’ve merged some recent commits from the upstream of this blog’s theme, in particular, Beautiful Hugo’s pull requests #246 and #255, which allowed self-hosting the theme’s static JS, CSS and font files. This self-hosted option is particularly useful in case of slow response from Cloudflare’s CDN. Even they do appear on the public GitLab site, the final rendered Markdown + $\TeX$ code would be succumb to syntax errors due to their absence in the preview process. [Read More]
KaTeX  Mmark  Hugo 

JavaScript Copy Button

Goal To create a copy button for my Math.SE comment template in order to save the trouble of copying and pasting. My first attempt I put the boilerplate inside a Markdown codeblock to prevent them from getting interpreted by Hugo’s Markdown parser. Under each codeblock, I placed the copy button. Comment boilerplate goes here ... 📝 Another comment boilerplate goes here ... 📝 … My page’s original layout [Read More]

My Dual Answer

Update: The question has been reopened. I intended to answer 김종현's problem on Math.SE. However, the programs in the question body aren't typeset in MathJax. As a result, I downvoted and closed this question because found it unclear. From the proposed dual, it seems that I shouldn't interpret the primal as a linear program. Anyways, without further clarifications from OP, I found no reason to look at this further. [Read More]

Finite Population Sampling without Replacement

Personal note of finite population sampling

First moment Population: \( \Omega = \{ x_1, \dots, x_N \} \) Collection of $n$-samples: \(\mathcal{S} = \{ s \in \Omega^n \mid \forall i,j \in s, i \ne j \} \) Collection of $n$-samples containing $x$: \( \mathcal{S}_x = \{ s \in \mathcal{S} \mid x \in s \} \) Observe that \( |\mathcal{S}_x| = \binom{N-1}{n-1} \). Let population mean be zero. $\mu = 0$, i.e. \( \sum_{i = 1}^N x_i = 0 \) [Read More]

Replacing Deprecated Hugo Syntax in Blog Theme

Fixing Beautiful Hugo issue #261

Problem Since the recent Hugo upgrade to v0.55.3, the following messages popped up after each local site regeneration with hugo server. WARN 2019/04/24 18:07:00 Page's .URL is deprecated and will be removed in a futu re release. Use .Permalink or .RelPermalink. If what you want is the front matte r URL value, use .Params.url. WARN 2019/04/24 18:07:00 Page's .Hugo is deprecated and will be removed in a fut ure release. Use the global hugo function. [Read More]

Julia Rcall Installation

Rcall.jl build failure due to missing dependencies

Problem During the installation of RCall.jl, the package wasn’t successfully built due to a missing variable $R_HOME. $ julia -q julia> Pkg.add("RCall") Resolving package versions... Installed WinReg ─ v0.3.1 Installed RCall ── v0.13.2 Updating `~/.julia/environments/v1.0/Project.toml` [6f49c342] + RCall v0.13.2 Updating `~/.julia/environments/v1.0/Manifest.toml` [6f49c342] + RCall v0.13.2 [1b915085] + WinReg v0.3.1 Building RCall → `~/.julia/packages/RCall/ffM0W/deps/build.log` ┌ Error: Error building `RCall`: │ ERROR: LoadError: R_HOME is not a directory. │ Stacktrace: │ [1] error(::String) at . [Read More]
Julia  RCall  R 

Xubuntu Screen Enlargement

Tonight, the screen of Xubuntu suddenly enlarged and blurred. Typing “xubuntu screen display enlarged” on Google, I’ve learnt that the <Alt> key and the mouse scroll wheel can enlarge/minify screen display from Ubuntu Forums.


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]