原创 Linux技巧:提高ssh連接速度

問題現象:     在遠程到linux服務器進行管理時,我們經常會用ssh來連接。     有時候在ssh 用戶名 主機IP 並輸入相應密碼後,很久才能連接上。 原因:     SSH服務默認配置了DNS反查。 解決方法:     需

原创 Windows 和 Linux 的IPC API對應表

原文出處:http://blog.csdn.net/zhengdy/article/details/5485472                                              Windows 和 Linu

原创 內存越界(累積篇)

下面使用代碼來說明這個問題。 int functiontest(char *pszParam, int nLen, int nID) { char szSQL[500]; sprintf(szSQL," Select * from tab

原创 預處理命令(#,##)

預處理命令 -------------------------------------------------------------------------------- #,##  # 和 ## 操作符是和#define宏使用的.

原创 遊戲外掛基本原理及實現

遊戲外掛已經深深地影響着衆多網絡遊戲玩家,今天在網上看到了一些關於遊戲外掛編寫的技術,於是轉載上供大家參考  原文出處:http://blog.csdn.net/weiqubo/article/details/7044206   1、

原创 動態創建一個與該 vector 對象大小一致的數組,把 vector 對象的所有元素複製給新數組_初學vector對象4

編寫程序由從標準輸入設備讀入的元素數據建立一個 int 型 vector 對象,然後動態創建一個與該 vector 對象大小一致的數組,把 vector 對象的所有元素複製給新數組。 #include <iostream> #inclu

原创 指向函數的指針_簡單運用

#include <iostream> #include <string> #include <cctype> #include <assert.h> using namespace std; #define NDEBG typede

原创 Ruby學習筆記_異常處理rescue

begin file = open("some_file") #如果文件打開失敗,用標準輸入代替。 rescue file = STDIN end begin # ... process the input ... r

原创 Ruby學習筆記_require,load

原文出處 http://rubyer.me/blog/689/ ●require,load用於包含文件;include,extend則用於包含模塊。 ●require加載文件一次,load加載文件多次。   當腳本A.rb使用了B.rb

原创 Ruby學習筆記_數組的處理array

arr=[4,5,6] print arr.join(","),"\n" #4,5,6 #print arr.join(", "),"\n" 意思是:將數組arr轉換成字符串輸出,用", "隔開每個元素,並且換行。 arr[4]="m

原创 Ruby學習筆記_public,protected,private

class Person def speak " protected:speak " end def laugh " private:laugh" end protected :speak private :la

原创 Ruby學習筆記_單元測試

require "test/unit" class BasicNumber def initialize(number) @number = number end def add(x) @number + x end

原创 Ruby學習筆記_super

class Person def talk(name) print "my name is #{name}" end end class Student < Person def talk(name) super p

原创 Modules and Mixins

文章出處: http://blog.163.com/digoal@126/blog/static/163877040201222712214285/ 在Ruby中class的superclass只能有一個, childclass可以有多

原创 Introduction to Sound Programming with ALSA

原文出處:http://www.linuxjournal.com/article/6735?page=0,0 ALSA stands for the Advanced Linux Sound Archit