Mon, 2010-01-25 17:35

Singleton pattern for connect to databases.

Submitted by chatsiri on Mon, 2010-01-25 17:35.

Posted in | | | | chatsiri's blog | add new comment | quote | 163 reads »

Singleton concept for implemented configuration of code.C++ can
created instance of object after new driven class.

//main idea for create only one instace for config
//create instance
ConnectionDb &ConnectionDb::instance(){
if( !instance_ ){
instance_ = new ConnectByControlOne;
return *instance_;
}
}

Test source code after compiled Mongodb package for Linux.See below,It's show debug run by localhost.

From chatsiri.com

After write example code by Singleton concept.Code example [main],[connectiondb.cpp],[connectiondb.h]

From chatsiri.com

No one expect after play football with old friend( CPESRC'47 ).My
finger have symptom of broken bone.Doctor suggested splint of my
finger.Start time for splint my finger at January( New Year - -") to
February.It's not easy for touch-type for write code.This is end of time splint finger.

From chatsiri.com

Sat, 2009-12-12 18:19

Kaokor,Phetchabun,Thailand

Submitted by chatsiri on Sat, 2009-12-12 18:19.

Posted in | | | | | chatsiri's blog | add new comment | quote | 596 reads »

Kaokor,Phetchabun,Thailand

kaokor

The story.

Sun, 2009-11-15 17:22

New cruve learing of thread.

Submitted by chatsiri on Sun, 2009-11-15 17:22.

Posted in | | chatsiri's blog | add new comment | quote | 640 reads »

From chatsiri.com

Last week,I took with @supaket about "Thread".Once question ask "How did you manager thread?"."Pthread,It's POSIX thread for Linux.".POSIX thread,Intel Threading Building block,OpenMP,Clik++.What's share memory?What's ditribute memory...?