Intuitively, Breadth-First Search (BFS) can find shortest distances from a source $latex s&s=4$ to any other reachable vertex. However, proving this intuition needs a bit hard work. After some searches, I found that there are two ideas to prove it. The two ideas both use induction to prove it. Both ideas require a bit long proof. …
Author Archives: czxttkl
How to migrate WordPress from one host from another?
WordPress really SUCK! It doesn´t provide a viable, simple and easy solution for export/import of your whole site. Here I am sharing how I managed to migrate my WordPress site from an old host to a new one. make sure Apache2, PHP, MySQL, and PHP MySQL extension work in perfect on your new host. Here …
Continue reading “How to migrate WordPress from one host from another?”
How to make contents wider in WordPress Theme?
It again proved how silly WordPress is: I can’t find any theme with wide content area. Why do we have to waste almost a third of page area in EVERY WordPress theme? I read many articles about how to make custom CSS to widen the content column but no magic happened. So I decided to modify …
Continue reading “How to make contents wider in WordPress Theme?”
How to connect to Ubuntu on Windows via Remote Desktop?
After searching on the Internet for a whole day back in Spring break, I finally found one video that is not junk. Mate Desktop looks elegant. I am really pissed off however when I found I can’t change mouse primary button in Mate. God bless fake left-hand user.
R sapply
Background In my memory, `sapply` is a function that takes a vector to consume and returns another vector as result. Today I am sharing a “bizarre” behavior of it. Later I will talk about the reason to account for this weird behavior. Details Let’s first look at the following line, from which I scratched …
如何删除Git历史记录里较大的文件?
背景 Git历史记录中,若不小心加入了较大的而无用的文件,很可能会让你的repository的size变得很大。Github和Bitbucket都分别对repository的大小做出了限制 (见https://help.github.com/articles/what-is-my-disk-quota/ 及https://confluence.atlassian.com/pages/viewpage.action;jsessionid=735235A3CE151FB6D4C518F3971FD524.node2?pageId=273877699)。那么如何在Git的历史记录中找出较大的文件并且删除它们呢?
Everything about Git
注释:本文中,中括号内参数表示可选参数,尖括号内参数表示必选参数。SHA-1值可以是commit的SHA-1值,HEAD[~|^]或者branch名字,因为HEAD和branch名字的SHA-1值都被git所记录。 一般规则 从远端代码仓库中下载项目 git clone 在master分支的基础上新建自己的branch,并跳到该branch上: git checkout -b [origin/master]
How is Logistic Regression designed?
背景 Logistic Regression是ML中再熟悉不过的Model了,它能基于数据X,得出生成binary label的概率: (在上式中,X仅有一个feature) 假设你出生在Logistic Regression被发明之前且在Normal Linear Regression被发明之后,现在让你设计一个Model来预测Binary的label——Y,使得这个Model能够基于观测数据X得出Y。你会怎么设计呢? (注:接下来我们都假设X仅有一个feature)