Fixing Grub2 Theme Preview on Opensuse Tumbleweed

To use Grub2 theme preview on openSUSE, two environment variables needs to be overridden.

Making Score In URL

I’m excited to publish my new project, Score In URL, a simple, privacy-friendly, sheet music sharing service, where the entire content is encoded in the URL itself as a query parameter.

Sneaky Shift in Bach’s Preludio in Partita III

Preludio (Prelude in some version) is one of Bach’s best violin pieces. From measure 17 to 28, a bariolage among three strings brings us a sublime polyphonic experience, with only single notes played detaché.

Reading Steal Like an Artist

Summary A short, inspirational book about how to be a productive artist. The first few chapters are about imitation, the necessity of it, and how to evolve from there.

Test Md Page

When you are tweaking your blog, creating a new CSS rule, or making a new theme, it is not uncommon

Chinese Caramel Color

糖色: Chinese Caramel Color The iconic Chinese cuisine Red Braised Pork Belly has an appetizing, deep, brick-red color.

A Warm-up for Chords: Bowing Planes Exercise

Chord and Bowing Planes How do we roll a clean chord on the violin? Or, perhaps a better question: how do we consistently roll a clean chord?

Theme-less Hugo, Almost Pure HTML, Styled with MVP CSS

Theme-less Hugo As popular as theming is, I can’t help but feel unsatisfied by a plug-and-use theme made by someone else.


Inspirations My recipe is loosely adapted from this recipe, with sparks of inspiration collected from here and there. The Cream To me, the essence of tiramisu is mascarpone.

A New Way of Presenting Recipes and Chicken Abodo

Cooking for Engineers I bumped into a site called Cooking for Engineers today, and at the bottom of some recipes, they have this succinct table that summarizes the procedure in a refreshingly simple manner:

“And Then There Were None” Reading Notes

Summary The book was the execution of ten people, carried out on an isolated island. Ten people of very different backgrounds were invited, by various ruses, to come on to the island.

南蛮鸡肉三明治 Chicken Sandwich with Nanban Sauce

菜谱改编自 MASAの料理ABC1. 材料 /

“Pride and Prejudice” Reading Notes: Highlights and Annotations

Summary of Pride and Prejudice A young intelligent woman, Elizabeth, had a tendency to judge people quickly. Based on impressions and gossips, she deemed Mr.

Reading Notes on “The Adventure of Tom Sawyer”

An Overall Review Tom Sawyer is a kid living in a small town, under the caring of his aunt. He was a mischievous troublemaker both at school and at home.

A Constant Solution to Code-Fights Apple Boxes Problem

The Apple Boxes Problem The problem can be simply put: Input: $k$ Output: let $r$ be the sum of the square of each even integer no larger than $k$, and $y$ be that of the odd.

Count 1s in Range

在 codefights 上做到了一个很有意思的题。给你 a, b 两

Valid Number - By DFA

Introduction to the Problem The question asks the programmer to validate whether a string is a valid representation of a number.

Exceptional Control Flow

Overview A processor accesses a sequence of instructions when it operates. The transition from one to the next, is called control transfer.

Code Optimizations

An example: Transpose for i in rows for j in cols b[i][j] = a[j][i]However, it might be the case that we do not know the size at compilation time, so we cannot statically declare this 2D array.


Fractal naming: fractional dimension Definition: self-similar $$\to$ when zoomed in, look the same Types: Exactly self-similar Statistically self-similar Exactly Self-similar If zoomed in, there is no way to tell that we have zoomed in.

Gradient Detection Convolutions, Seam Carving, and Patch March

Gradient detection convolutions Square instead of rectangle: to avoid problems concerning diagonal usually 3 x 3 edge detection apply gradient detection convolution find where gradient appears / \ / \ / \ / \ | | | | _____________________________ <- at this line, the gradient is extreme ****************************** ****************************** ****************************** find maximum gradient points edge is perpendicular to gradients Segmentation: Intelligent Scissors INPUT: a set of points OUTPUT: find a path(curve) that is following edge as much as possible

Binary Search Tree implemented by C++

This is a simple implementation of binary search tree implemented by C++. Here are the methods of my BST: class Node { public: Node *left, *right, *parent; int key; }; class BST { private: Node *nil; public: BST(); Node* root(); // Traversals void inorder(); void inorderRec(Node*); void inorderIter(); void preOrder(); void preOrderRec(Node*); void postOrder(); void postOrderRec(Node*); // Search Operations Node* find(int); Node* minimum(Node*); Node* maximum(Node*); Node* successor(Node*); Node* predecessor(Node*); // Element Operation void insert(int); void insert(Node*); void remove(int); void remove(Node*); void transplant(Node*, Node*); bool empty(); };I will talk about some of the implementations.

Production of Sentences and Properties of Languages: Parsing Techniques Notes (2)

Generating Sentences sentence vs. sentential sentence all symbols belongs to terminals (a valid element of the language) sentential may contain non-terminals, an intermediate form during sentence production Example: For a language where $V_N = {P, Q} \land V_T = {a, b, c, d}$, a valid sentential would be $aP$; a valid sentence would be $ac$.

Generative Grammar and Four Types of Grammars: Parsing Techniques Notes (1)

Generative Grammar There are several views of defining a language. The computer science and formal linguistics perspective: terms definition Language a set of sentences Sentence a sequence of symbols Alphabet a set of all symbols The semantics - meaning - of a sentence is described by its tokens cooperating with its structure.