Sekai 🌐 πŸ—Ί

Sekai is the kanji for δΈ–η•Œ, meaning “the world”. That’s a great word because of the scale it designates.

Package Versioning for Julia Projects

Resolved GLM installation error

Update: Thanks to JuliaRegistries/General#647, the version cap of the package Distributions has now been removed, so that one can directly install the package GLM along with Distributions v0.19.2. Background I’m reading the book Statistics with Julia, which makes use of GLM. Problem I encountered the following error, which I posted in the issue GLM.jl#311. (v1.1) pkg> add GLM Resolving package versions... ERROR: Unsatisfiable requirements detected for package GLM [38e38edf]: GLM [38e38edf] log: β”œβ”€possible versions are: [0. [Read More]
Julia  GLM 

Insensitive Laptop Touchpad

Log of my Ubuntu Tweak config

Problem The touchpad on my new Ubuntu 18.04 LTS laptop was frozen. Toogling πŸ–± with <Fn>-<F4> didn’t worked. Attempt Logout: didn’t work at all Reboot: worked most of the time Partial solution After changing the Mouse Click Emulation in Keyboard & Mouse in Ubuntu Tweak from the default “Fingers” (2 fingers for right click; 3 fingers for middle click) to “Area” (Right/middle click determined by clicked area), one might have to wait for next reboot. [Read More]

Juno Installation 2019

Log of system-wide config

Goal To install Juno for convenient development in Julia. Problem After Juno installation, I received the following error. Analysis From the error message, the system had tried to find an executable file julia, which would then be executed by the shell /bin/sh. Nonetheless, it’s absent from the system’s environment $PATH, so Juno couldn’t find it. I’ve only changed my $PATH in ZSHRC, which is user-specific. Solution This Stack Overflow question about $PATH setting on *nix has provided various solution. [Read More]
Juno  Atom  Julia 

Conditional Batch File Editing

Adopted Mmark for Math Posts

Problem During the adoption of Mmark for math posts on this blog, I had to insert markup: mmark at the last line of front matter of the source file of each math post. Seek help I separated this into two SO questions Sed conditional match and execute command with offset, and A question about AWK multiple line recognition. Solution From #1., I learnt the use of variables in AWK scripts. [Read More]
awk  sed  Mmark 

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. [Read More]