原创 Chapter 1 Arrays and Strings - 1.2

Problem:1.2 Write code to reverse a C-Style String. (C-String means that "

原创 phplist(及phpmailer)通過gmail發送郵件的配置方法

    一般來說,只要你使用的不是gmail郵箱,那麼利用phplist發送郵件只要按照《郵件羣發系統phplist的配置方法總結》配置就夠了。但若你如同我一樣不幸,必須使用gmail這種有ssl驗證的郵箱,那麼恭喜你,我的不幸現在已然成

原创 Chapter 1 Arrays and Strings - 1.6

Problem 1.6: Given an image represented by an NxN matrix, where each pixel in the image is 4 bytes, write a method to r

原创 Chapter 1 Arrays and Strings - 1.4

1.4 Write a method to decide if two strings are anagrams or not. This "easy" problem really taught me a lesson. Firstl

原创 Chapter 1 Arrays and Strings - 1.5

Problem 1.5: Write a method to replace all spaces in a string with '%20'. The first solution flashed into my mind takes

原创 Prologue

"Cracking the Coding Interview" is an amazing book. Students who found good jobs speak highly of it. To find a good

原创 關於學習基礎學科與培養編程能力的問答

有學姐即將去往UCSD讀CS的master,她本科是學EE的,正在提前補充知識。今天她向我請教了一些問題,我將我的回答貼在這,希望對其他人也有用。   問: 打擾又要請教下,你覺得編程能力的培養是需要按部就班系統學習操作系統、數據結構、算

原创 郵件羣發系統phplist的配置方法總結

    phplist是一個十分不錯的郵件羣發系統,讓我們可以很方便地羣發電子雜誌、小廣告(^_^)等。    最近幫一個老師搭建郵件羣發系統,用的就是phplist。但是網上關於搭建該系統的資料很零碎,需要費些功夫組合起來才行。而既然我

原创 Chapter 1 Arrays and Strings - 1.3

The statement of problem 1.3 is: Design an algorithm and write code to remove the duplicate characters in a string with

原创 Objective-C中init函數實現的相關研究

      今天在學習Objective-C時見到某初始化函數中有如下代碼:       self = [super init];     if(self){ // Initialize members     }     retur

原创 phplist發送帶附件郵件的設置

    phplist的最新版本中添加了發送附件的功能(我使用的是2.10.12),但在默認情況下此功能是關閉的。我們需要打開此功能,同時進行一些配置。步驟如下(windows環境下):       1.打開lists/config/co

原创 使用Cmake搭建Qt+VTK工程(順便推薦超好Cmake入門教程一本)

組內的項目要從MFC+OpenGL向Qt+VTK遷移。最近的任務是先把一個小模塊進行嘗試性遷移。 配置環境過程中發現Qt+VTK的項目配置起來十分麻煩,於是google之,發現使用CMake這個工具可以大大簡化我們的配置過程。可惜我從沒

原创 Chapter 1 Arrays and Strings - 1.1

This the first problem in the "Cracking the Coding Interview" book. The st

原创 易忘知識點——C++類的static數據成員

就要去實習了,迅速過第二遍《C++ Primer》,看到遺忘了的知識點就記在這了。   1.類的static數據成員的初始化不同於普通成員:static成員不是通過構造函數初始化的,而是在定義時進行初始化。即,除了在聲明類時聲明一次sta

原创 Objective-C中const常量是外連接的

    前幾天老師要求實現一個iphone上的“吃豆人”小遊戲,給一下午加一晚上的時間。由於粟的設計很合理,且沒有考慮太多、太複雜的情況(如 pacman 吃了 magic dot 後所有ghost的速度應該變慢),總體上沒遇到什麼太大