Monthly Archives: October 2009

Join sample on PostgreSQL

Here is a simple example that demonstrate usage of INNER, FULL, LEFT and RIGHT JOIN. Create 2 tablescreate table p1(pid integer, pname varchar(20));create table p2(pid integer, ptype varchar(10));insert some data into the tables.insert into p1(pid, pname) values(1,’p1′);insert into p1(pid, pname) … Continue reading

Posted in Database | Leave a comment

CORBA, COM and WebService

Compare aspects of CORBA and COM   CORBA COM WebService interface IDL IDL WSDL   Interface Repository typelib WSDL   POA ClassFactory     Active Object Map GIT, ROT   Locate the server Implementation Repository;IIOPInteroperable Object Reference (IOR) Registry UDDI … Continue reading

Posted in Uncategorized | Leave a comment

regex in eclipse

QuickREx provides a nice dialog to help user compose regex pattern, but it does not provide “replace” feature. Regex Util provides nice feature to displace “replaced” result, but it does not allow user to copy result into clipboard, just allows … Continue reading

Posted in regex | Leave a comment

custom deleter and shared_ptr

Custom deleter can be used to manage resource other than memory via shared_ptr. Here I elaborated some usage of custom deleter. #include <iostream>#include <boost/shared_ptr.hpp>#include <boost/bind.hpp>#include <list>using namespace std;class custom_deleter_demo{public:    custom_deleter_demo(int data):m_data(data){    }    void custom_deleter0()    {        std::cout << __FUNCTION__ << " … Continue reading

Posted in CPP | Leave a comment