SnailShell

# Posts

2022-08-06
Fixing Grub2 Theme Preview on Opensuse Tumbleweed

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

2022-07-29
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.

2022-07-22
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é.

2022-07-17

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.

2022-07-06
Test Md Page

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

2022-02-02
Chinese Caramel Color

2022-01-31
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?

2022-01-12
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.

2022-01-09
Tiramisu

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.

2022-01-05
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:

2021-02-24
“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.

2020-02-21

2019-09-17
“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.

2019-06-23

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.

2017-01-06
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.

2017-01-06
Count 1s in Range

2016-11-27
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.

2016-11-15
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.

2016-11-08
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.

2016-11-08
Fractals

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. 2016-11-03 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 2016-02-27 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. 2016-02-26 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\$.

2016-02-24
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.