linux&c++ R&D

programing is a pleasure!

2008年3月25日 #

a shortcut for linux( from linux journal )

     摘要:   阅读全文

posted @ 2008-03-25 19:21 丑石 阅读(484) | 评论 (0)编辑 收藏

2008年3月21日 #

10 things you should do to protect yourself on a public computer (from TechRepublic )

     摘要:   阅读全文

posted @ 2008-03-21 12:41 丑石 阅读(354) | 评论 (0)编辑 收藏

2008年3月20日 #

the tips of Yum

(1) when installing or updating the software by Yum, you maybe come across the unexpected exit from the Yum tools and then report some errors which indicate some incorrect Yum sources!  It  maybe result from some obsolete Yum sources,so you'd better delete these problematic sources from /etc/yum.conf or /etc/yum.repos.d/ .
(2)pub-key,some Yum sources need to authorize and you should find pub-key which belongs to the source and import  the pub-key:  rpm --import pub-key

posted @ 2008-03-20 14:22 丑石 阅读(115) | 评论 (0)编辑 收藏

2008年3月16日 #

Thinking recursively

First,Let's know the principle:
Recursive leap of faith-
When you try to understand a recursive program,you must be able to put the underlying details aside and focus instead on a single level of the operation. At that level,you are allowed to assume that any recursive call automatically gets the right answer as long as the arguments to that call are simpler than the original arguments in some respect.The psychological strategy-assuming that any simpler recursive call will work correctly-is called the recursive leap of faith!
The idea may be difficult to newers! Take an example for it:
We all know the Fibonacci function:
F(n)=F(n-1)+F(n-2)
Recursive implementation of the Fibonacci funtion:

int Fib(int n){
if (n<=1)
   
return n;
 
else
   
return Fib(n-1)+Fib(n-2);
}

 if n is 5,Fib(5) is computed by the sum of Fib(4) and Fib(3).
Applying the faith,you can assume that  the program correctly computes each of these values,without going through all the steps that Fib(4) and Fib(3) is computed!

posted @ 2008-03-16 18:54 丑石 阅读(153) | 评论 (0)编辑 收藏

2007年5月30日 #

Teach Yourself Programming in Ten Years

The article is worth reading,please refer to
http://www.norvig.com/21-days.html

posted @ 2007-05-30 21:46 丑石 阅读(231) | 评论 (0)编辑 收藏

separate-array-of-pointers technique

     摘要:   阅读全文

posted @ 2007-05-30 18:45 丑石 阅读(211) | 评论 (0)编辑 收藏

2007年5月15日 #

One size does not fit all

People who spout off one-size-fits-all rules presume to make your design decisions without knowing your requirements. They don't know where you're going but know how you should get there.
Don't trust an answer from someone who doesn't know the question.

posted @ 2007-05-15 13:57 丑石 阅读(174) | 评论 (0)编辑 收藏

How do you define a copy constructor or assignment operator for a class that contains a pointer to a (abstract) base class?

     摘要:   阅读全文

posted @ 2007-05-15 13:48 丑石 阅读(463) | 评论 (0)编辑 收藏

2007年5月11日 #

Understand decorator design pattern

     摘要: Understand decorator design pattern  阅读全文

posted @ 2007-05-11 21:38 丑石 阅读(363) | 评论 (0)编辑 收藏

2007年4月30日 #

How to limit instantialization?

     摘要: How to limit instantialization?
  阅读全文

posted @ 2007-04-30 16:44 丑石 阅读(256) | 评论 (0)编辑 收藏

仅列出标题  下一页

My Links

Blog Stats

News

常用链接

留言簿(1)

随笔分类(13)

随笔档案(17)

文章档案(1)

相册

收藏夹(1)

Friends' blog

useful sites

搜索

积分与排名

最新评论

阅读排行榜

评论排行榜