0%

LoveLive！学园偶像祭（以下称SIF）是一款对无氪党相当友好的游戏。虽然无氪玩家不使用真金白银换取心资源，但是心在游戏中并不难获取，而且玩家在游戏中遇到的大部分问题都可以通过其他方式解决。

Evil，全称 Emulation vim layer。作为 emacs 的扩展插件，它可以模拟绝大多数 vim 的键位和指令。emacs 的功能和可扩展性远在 vim 之上，但键位设计导致其编辑速度无法与 vim 抗衡。evil mode 通过在 emacs 中模拟 vim 的方式解决了这一问题。

From time to time, you may need to execute some privileged commands in a shell script. While using sudo, you may want to either enter your password only once for a long running script, or execute the script without giving a password at all. This article will tell you how to do it in the right way.

## 首要原则

ssh to a remote server and run programs inside a terminal is not a big deal for major operating systems. However if the remote program requires graphics display, it will be a little bit tricky. macOS does have a powerful terminal that can automatically create an X window for the remote application. Windows could do that too, with some sort of hacking. Thanks to the great bash on windows, the effort to run remote X applications is now minimized. The detailed steps are shown below.

Blue Screen of Death (BSoD) is a famous but annoying symbol of windows operating system. It indicates that there are some fatal errors such that the system can't work safely. General applications don't have the ability to trigger the blue screen, so there should be something wrong with either hardware or drivers, if windows itself is not corrupted. In whatever case, you need to take actions because the blue screen will appear from time to time if the root cause is not found and properly handled.

So how to investigate the root cause of a blue screen failure?

《人类简史：从动物到上帝》是一本不同寻常的历史书。这本书中，我最欣赏的一点是，作者彻底放弃了一般历史学者的说教态度和马后炮的研究方法，承认历史的进程实际上受到诸多不确定性因素的影响，不存在什么“历史的必然”。我们常说要“以史为鉴”，就是要把握历史发展的一般规律，并以此来指导现在和未来的决策。不过，人类相信历史存在规律，并从历史事件中总结出一二三条，并不意味着历史有必然的一面，也不代表我们能看到事件发生的真正原因（想想学术界争论不休的各种观点），更不能说时过境迁，了解这些过去的故事对当下的情境能有怎样的帮助。就像今天没有人能断定希拉里或是川普一定可以当选美国总统，但等竞选结果公布之后，就会出现各种理论解释这一结果的成因。此外，在他们上任之前，我们也无从知晓美利坚是会变好还是变坏。研究历史规律，对这些最为实际的问题，往往是没有什么功用的。放弃了这种历史的功利心态，作者站在了超越人类的立场上，以极为宏大的视角描绘了人类数万年发展的基本脉络。这一点，足以让本书与众不同。

# 新的改变

Dynamic programming (DP) is a group of very useful algorithms to solve searching problems. In many cases, it is easy to realize that a particular problem can be solved in DP, but you may spend a lot of time on finding the iterative equations. Distinct Subsequences is one such problem.

Here is the description from leetcode.

Given a string S and a string T, count the number of distinct subsequences of T in S.

A subsequence of a string is a new string which is formed from the original string by deleting some (can be none) of the characters without disturbing the relative positions of the remaining characters. (ie, "ACE" is a subsequence of "ABCDE" while "AEC" is not).

Here is an example:
S = "rabbbit", T = "rabbit"

Return 3.

《樱花庄》并不算知名的神番，但如今细想起来，拿它来入宅真是合适不过。十多年前，我在电视里看过神作 EVA (《新世纪福音战士》), 但那时的我头脑中丝毫没有 ACG 的概念。上大学以来陆续看过少数几部动漫，印象比较深刻的也只有《秒速五厘米》了。很可惜《秒五》剧情太短，哭过就完了，没能让我一遍又一遍地回忆、反思，于是我又错失了一次入宅的机会。《樱花庄》并没有采用《秒五》的煽情策略，而是牢牢围绕一条主线展开：一群天才与凡人在樱花庄这个屋檐下生活。作为轻小说改编的作品，深入刻画人性并不是它的本意。那种有矛盾有尴尬，但又处处充满了爱与友善的气氛，才是动漫着重描写的。

## The Concept

Partial function is a function partially complete. As a transformer, it is a way to create new functions from existing functions, meanwhile adding your own things. It can be named whatever you want, but I call it partial to keep consistency with the concept.

Here is a typical implementation of partial function.

It seems to be pretty complex. This article will help you understand this function.