原创 C++ 複製構造和賦值的區別

還是三年前程序設計課上學的,晚上好好回憶一下

原创 C++常量指針與指針常量

常量指針:所指向地址上的數據是常量,所指向的數據不能變化,但是指向的地址可以變化 指針常量:所指向的地址是常量,而地址上的數據可以變化

原创 ssh 卡住...?

ssh 卡住時的小trick

原创 Effective C++ 閱讀筆記

terms abstract abstraction access access level access function adapter address-of operator aggregation fu

原创 leetcode Sudoku Solver

class Solution { public: int flip(int i){ int ret = 1 << i; ret = ~ret; return ret;

原创 leetcode Number of Islands

class Solution { public: const int dir[4][2] = {{-1,0},{1,0},{0,-1},{0,1}}; bool valid(int x, int y, int h,

原创 leetcode Set Matrix Zero

class Solution { public: void setZeroes(vector<vector<int> > &matrix) { int h = matrix.size();

原创 leetcode Reverse Linked List

/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNo

原创 leetcode Sort Colors

class Solution { public: void sortColors(int A[], int n) { int cntZero = 0, cntTwo = 0; for(int

原创 REST初體驗

轉載自 http://yuguo.us/weblog/php-rest-api/ 侵刪 表徵狀態轉移(英文:Representational State Transfer,簡稱REST)是Roy Fielding博士在2000年

原创 Responsive web design

design your sites with multiple screen sizes/resolutions in mind work under any platform, any browser size, any or

原创 leetcode Remove Duplicates From Sorted List

/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNo

原创 leetcode Restore IP Address

class Solution { public: inline int getlen(int digit){ return digit == 0 ? 1 : (((int)log10(digit)) + 1

原创 self-cultivation

what is recursion? repeat a process in a self-similar manner. in programming language For example, if two mirro

原创 mysql load data local infile error

常見load data錯誤參考: http://stackoverflow.com/questions/16285864/how-can-i-correct-mysql-load-error 點贊 收藏