1. # Nintendo Switch was Announced!

March 2017! Begin to save money~ The price maybe \$299.99, I can save \$60 each month! Till the end of March 2017, I will get \$300!

But, I have a problem...Can I buy one in origin price here? It may not on sale in China...maybe taobao is ...

2. # LeetCode: 235. Lowest Common Ancestor of a Binary Search Tree

The problem is here: https://leetcode.com/problems/lowest-common-ancestor-of-a-binary-search-tree/ . Using recursive function solve this fast, because of the nature of BST. For each node in BST, every node on left is smaller than root and every node on right. Therefore, the ancestor of two nodes in BST must be a ...

3. # LeetCode: 48. Rotate Image

The problem is Rotate Image. If I can use more space, just copy the number for original matrix to new matrix. And the rule of rotate 90 degrees is simple, using original y coordinate as new x coordinate, lenght minus x as new y. After copying to new matrix, copy ...

4. # Setup a proxy for MySQL server on Ubuntu located in intranet

I have a MySQL server instance running in office's intranet, which only can not be accessed from internet. Meanwhile, I have a proxy server as a gateway connected to both networks, and I therefore I could setup an MySQL proxy!

Fortunately, after searing on web, a program called `mysql-proxy ...`

5. # Update the firmware of my Samsung SC-05G to Android 6.0.1 Marshmallow

Update my Samsung S6 SC-05G to Android 6.0.1 Marshmallow! It's quite simple, just following this post: Samsung Galaxy S6 SC-05G 6.0.1 Marshmallow Firmware.

The steps as follows:

6. # Install MySQLdb in virtualenv on Ubuntu

I have install the python-mysqldb on my Ubuntu server, but a missing dependency message alerted when I run a program in virtualenv.

Then I do as this post and solved my problem:

```\$ sudo apt-get build-dep python-mysqldb
\$ source venv/bin/activate
(venv)\$ pip install MySQL-python
```

then everything works fine.

7. # Modify timezone and datetime on Ubuntu

Some configurations commands for Ubuntu server:

```\$ tzselect

# Since I'm in China, I select the Asia -> China -> Beijing Time
# The TZ='Asia/Shanghai'

# Update the localtime profile
\$ sudo cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime

# Update datetime by time center
\$ sudo ntpdate asia.pool.ntp.org

# Update the hardware ...```
8. # Install Jupyter Environment

In order to start my own work on data analysis into EDM, I need a development environment of Python Notebook. The process is quite simple:

Install the `virtualenv` and related packages:

```\$ sudo apt-get install python-virtualenv python-pip python-tk
```

Create a virtual environment for project:

```\$ cd ~/workspace
\$ virtualenv edm
\$ source edm/bin ...```
9. # Simple Jupyter Python Scripts

## Basic imports

Import these packages:

```import numpy as np
import matplotlib.pyplot as plt
```

Enable the inline display of graphs

```%pylab inline
```

## Shortcuts

Jupyter Notebook has two different keyboard input modes, which are similar to VIM. I prefer this!

10. # LeetCode: 125. Valid Palindrome

The problem is 125. Valid Palindrome. It's quite simple to make a simple one.

```class Solution(object):
def isPalindrome(self, s):
"""
:type s: str
:rtype: bool
"""
if s == '': return True

cs = 'abcdefghijklmnopqrstuvwxyz0123456789'
is_char = lambda c: c in cs
to_sstr = lambda s: ''.join([ c if is_char(c) else '' for c ...```