原创 Single Number
class Solution { public: int singleNumber(int A[], int n) { int i, sum = 0; for( i = 0; i < n; i++
原创 python 背單詞
import sys import fileinput word_name = "" file_buf = "" file_object = "" word_dict = {} words = \ [ #1
原创 哈哈哈了啊
void program() { int entry_flag = 0; Symbol *p, *q; /* before parse insert read && write func */ p = insert_glob
原创 Linux內核優化之TCP相關參數
tcp_syn_retries:INTEGER默認值是5對於一個新建連接,內核要發送多少個SYN連接請求才決定放棄。不應該大於255,默認值是5,對應於180秒左右時間。(對於大負載而物理通信良好的網絡而言,這個值偏高,可修改爲2.這個
原创 計劃
這篇文章取名叫Build Your Programming Technical Skills,我實在不知道用中文怎麼翻譯,但我在寫的過程中,我覺得這很像一個打網遊做任務升級的一個過程,所以取名叫“技術練級攻略”,題目有點大,呵呵,這個標
原创 git rebase 使用詳解
rebase 圖示 merge rebase 總結 rebase 工作流 merge工作流 rebase 本地兩個分支 一個我的分支 test 一個主分支 master 現在我修改的部分要合併到 master
原创 save
#include <stdio.h> #include "lily.h" /* run this program using the console pauser or add your own getch, system("pause"
原创 文章標題
int get_token() { int c, len, i, max_word_len, state, token, flag, pause_line, pause_block; state = START;
原创 我的.Xmodmap文件
文件內容: clear lock clear control add control = Caps_Lock Control_L Control_Rkeycode 66 = Control_L Caps_Lock NoSymbol No
原创 linux下解決ctrl+l 清屏失效
bind -x '"\C-l": clear' 把這個寫到/etc/profile或者/etc/bash.bashrc裏頭 #example echo 'bind -x '"\C-l": clear'' >> /etc/profile s
原创 vpn登陸腳本
!/usr/bin/expect set timeout 30 set JMPHOST 10.111.1.1 set JMPPORT 10022 set JMPUSER user_name set PASSWORD “passwo
原创 N-Queens II
class Solution { public: #define N 30 int A[N] = {0}; int max; int sum; int canput( int k ) {
原创 Reverse Integer
class Solution { public: int reverse(int x) { int sum = 0; while( x ) { sum = sum * 10 +
原创 Roman to Integer
class Solution { public: int romanToInt(string s) { int flag = 1, num = 0; map<char,int> m;
原创 Climbing Stairs
這題是個斐波那契數列,規律很好找,不過dfs這題也可以解,就是不知道會不會TLE class Solution { public: int a[1000]; int climbStairs(int n) {