| Profil de OnegaOnegaBlogListesRéseau | Aide |
Onegawww.fruitfruit.com |
15 décembre build boost 1.41 on ubuntu karmicDownload 7zip Then run unzip command: /usr/bin/p7zip -d boost_1_41_0.7z ~/Downloads/boost_1_41_0/tools/jam/src$ chmod u+x build.sh ~/Downloads/boost_1_41_0/tools/jam/src$ ./build.sh ~/Downloads/boost_1_41_0$ tools/jam/src/bin.linuxx86/bjam --without-mpi stage --build-type=complete --layout=versioned Install latest GCC on ubuntu karmicg++ is not found on ubuntu karmic, "apt-get install ..." can't find packages, and the following commands worked anyway. wget http://mirrors.163.com/ubuntu/pool/main/g/gcc-4.4/cpp-4.4_4.4.2-5ubuntu1_i386.deb wget http://mirrors.163.com/ubuntu/pool/main/g/gcc-4.4/g++-4.4_4.4.2-5ubuntu1_i386.deb wget http://mirrors.163.com/ubuntu/pool/main/g/gcc-4.4/gcc-4.4-base_4.4.2-5ubuntu1_i386.deb wget http://mirrors.163.com/ubuntu/pool/main/g/gcc-4.4/gcc-4.4-doc_4.4.2-5ubuntu1_all.deb wget http://mirrors.163.com/ubuntu/pool/main/g/gcc-4.4/gcc-4.4-multilib_4.4.2-5ubuntu1_i386.deb wget http://mirrors.163.com/ubuntu/pool/main/g/gcc-4.4/gcc-4.4_4.4.2-5ubuntu1_i386.deb wget http://mirrors.163.com/ubuntu/pool/main/g/gcc-4.4/libstdc++6_4.4.2-5ubuntu1_i386.deb wget http://mirrors.163.com/ubuntu/pool/main/g/gcc-4.4/libstdc++6-4.4-dev_4.4.2-5ubuntu1_i386.deb wget http://mirrors.163.com/ubuntu/pool/main/g/gcc-4.4/lib64gcc1_4.4.2-5ubuntu1_i386.deb wget http://mirrors.163.com/ubuntu/pool/main/g/gcc-4.4/lib64gomp1_4.4.2-5ubuntu1_i386.deb wget http://mirrors.163.com/ubuntu/pool/main/g/gcc-4.4/libgcc1_4.4.2-5ubuntu1_i386.deb wget http://mirrors.163.com/ubuntu/pool/main/g/gcc-4.4/libgomp1_4.4.2-5ubuntu1_i386.deb wget http://mirrors.163.com/ubuntu/pool/main/e/eglibc/libc6-i686_2.10.2-2ubuntu2_i386.deb wget http://mirrors.163.com/ubuntu/pool/main/e/eglibc/libc6-dev-amd64_2.10.2-2ubuntu2_i386.deb wget http://mirrors.163.com/ubuntu/pool/main/e/eglibc/libc6-amd64_2.10.2-2ubuntu2_i386.deb wget http://mirrors.163.com/ubuntu/pool/main/e/eglibc/libc6-dev_2.10.2-2ubuntu2_i386.deb wget http://mirrors.163.com/ubuntu/pool/main/e/eglibc/libc6_2.10.2-2ubuntu2_i386.deb wget http://mirrors.163.com/ubuntu/pool/main/e/eglibc/libc-bin_2.10.2-2ubuntu2_i386.deb wget http://mirrors.163.com/ubuntu/pool/main/e/eglibc/libc-dev-bin_2.10.2-2ubuntu2_i386.deb wget http://mirrors.163.com/ubuntu/pool/main/g/gcc-4.4/lib64stdc++6-4.4-dbg_4.4.2-5ubuntu1_i386.deb wget http://mirrors.163.com/ubuntu/pool/main/g/gcc-4.4/lib64stdc++6_4.4.2-5ubuntu1_i386.deb wget http://mirrors.163.com/ubuntu/pool/main/c/cloog-ppl/libcloog-ppl-dev_0.15.7-1_i386.deb wget http://mirrors.163.com/ubuntu/pool/universe/p/ppl/libppl0.10-dev_0.10-2_i386.deb wget http://mirrors.163.com/ubuntu/pool/main/c/cloog-ppl/libcloog-ppl0_0.15.7-1_i386.deb wget http://mirrors.163.com/ubuntu/pool/main/g/gmp/libgmp3-dev_4.3.1+dfsg-3_i386.deb wget http://mirrors.163.com/ubuntu/pool/main/g/gmp/libgmp3c2_4.3.1+dfsg-3_i386.deb wget http://mirrors.163.com/ubuntu/pool/main/g/gmp/libgmpxx4ldbl_4.3.1+dfsg-3_i386.deb sudo dpkg -i libc-bin_2.10.2-2ubuntu2_i386.deb sudo dpkg -i libgcc1_4.4.2-5ubuntu1_i386.deb libc6_2.10.2-2ubuntu2_i386.deb sudo dpkg -i libc-dev-bin_2.10.2-2ubuntu2_i386.deb sudo dpkg -i lib64gcc1_4.4.2-5ubuntu1_i386.deb lib64gomp1_4.4.2-5ubuntu1_i386.deb libgcc1_4.4.2-5ubuntu1_i386.deb libgomp1_4.4.2-5ubuntu1_i386.deb libc6-i686_2.10.2-2ubuntu2_i386.deb libc6-dev-amd64_2.10.2-2ubuntu2_i386.deb libc6-amd64_2.10.2-2ubuntu2_i386.deb libc6-dev_2.10.2-2ubuntu2_i386.deb sudo dpkg -i cpp-4.4_4.4.2-5ubuntu1_i386.deb g++-4.4_4.4.2-5ubuntu1_i386.deb gcc-4.4-base_4.4.2-5ubuntu1_i386.deb gcc-4.4-doc_4.4.2-5ubuntu1_all.deb gcc-4.4-multilib_4.4.2-5ubuntu1_i386.deb gcc-4.4_4.4.2-5ubuntu1_i386.deb libstdc++6_4.4.2-5ubuntu1_i386.deb libstdc++6-4.4-dev_4.4.2-5ubuntu1_i386.deb libstdc++6-4.4-dev_4.4.2-5ubuntu1_i386.deb sudo dpkg -i g++-4.4_4.4.2-5ubuntu1_i386.deb sudo dpkg -i lib64stdc++6_4.4.2-5ubuntu1_i386.deb sudo dpkg -i libcloog-ppl-dev_0.15.7-1_i386.deb libppl0.10-dev_0.10-2_i386.deb libcloog-ppl0_0.15.7-1_i386.deb libgmp3-dev_4.3.1+dfsg-3_i386.deb libgmp3c2_4.3.1+dfsg-3_i386.deb libgmpxx4ldbl_4.3.1+dfsg-3_i386.deb wget http://mirrors.163.com/ubuntu/pool/main/g/gcc-4.4/libgcc1-dbg_4.4.2-5ubuntu1_i386.deb wget http://mirrors.163.com/ubuntu/pool/main/g/gcc-4.4/libstdc++6-4.4-dbg_4.4.2-5ubuntu1_i386.deb sudo dpkg -i libgcc1-dbg_4.4.2-5ubuntu1_i386.deb libstdc++6-4.4-dbg_4.4.2-5ubuntu1_i386.deb wget http://mirrors.163.com/ubuntu/pool/main/g/gcc-4.4/g++-4.4-multilib_4.4.2-5ubuntu1_i386.deb wget http://mirrors.163.com/ubuntu/pool/main/g/gcc-4.4/lib64stdc++6-4.4-dbg_4.4.2-5ubuntu1_i386.deb wget http://mirrors.163.com/ubuntu/pool/main/g/gcc-4.4/libgcc1-dbg_4.4.2-5ubuntu1_i386.deb wget http://mirrors.163.com/ubuntu/pool/main/g/gcc-4.4/lib64gcc1-dbg_4.4.2-5ubuntu1_i386.deb sudo dpkg -i g++-4.4-multilib_4.4.2-5ubuntu1_i386.deb lib64stdc++6-4.4-dbg_4.4.2-5ubuntu1_i386.deb libgcc1-dbg_4.4.2-5ubuntu1_i386.deb lib64gcc1-dbg_4.4.2-5ubuntu1_i386.deb show gcc version: dpkg --list | grep gcc create a link with name g++ from g++-4.4: ln /usr/bin/g++-4.4 /usr/bin/g++ 14 décembre ubuntu 9.10 experience Installed ubuntu 9.10 on laptop. The installation package is an iso file for CD-image, then I have to record it via InfraRecorder to write to DVD-R/W since a commercial software refused to write CD-image into DVD. The installation process is simple. I have to change my wireless router settings to allow it broadcast so that ubuntu can connect to it successfully. Firefox hung up the system when I clicked eclipse download link - first system cold reset. Open jre-6u17-linux-i586.bin via Archive Manager leads to second system hang up and cold reset. It took me days to find out the right guide (Sun Java JRE) to install JRE. unpack eclipse-cpp-galileo-SR1-linux-gtk.tar.gz and install it according to this post (Install Eclipse Galileo (3.5) on Ubuntu Jaunty (9.04)). it can't create new C++ project - no effect after hit "Next" or "Finish" button, no error message too. Some people posted a workaround - Problems with Eclipse buttons in Ubuntu 9.10. Another GUI hang up: click on "Go" menu of "File Browser", Drop down menu of "Edit" was transparently drawn on screen and then the whole screen lock up. Although mouse is still active, but "Ctrl+Alt+Backspace" and "Ctrl+Alt+F1" do not work. 12 décembre Web Technologies in Desktop ApplicationMost desktop application are developed in single language like C++, or Java, but sometimes integrating with other languages like script and XML/XSL also has prominent advantages:
10 décembre Layout managers
WinMgr A Simple C++ Layout Manager EasySize - Dialog resizing in no time! 9 décembre suspicious file c:\temp\Perflib_Perfdata_5d4.datuse handle.exe to find out the process that opens it: C:\tools\sysinternals>handle Perflib_Perfdata_5d4.dat Handle v3.42 jqs.exe pid: 1492 100: C:\temp\Perflib_Perfdata_5d4.dat
Then use procexp.exe to examine process of PID 1492, which turns out to be C:\Program Files\Java\jre6\bin\jqs.exeWebBrowser in Desktop ApplicationIE is using Asynchronous Pluggable Protocol to support customized protocol. Here are some reference materials: Custom Hyperlinks Using Asynchronous Pluggable Protocols Usage: It can be implemented in a desktop application to display complex content to user. WebBrowser is a powerful representation control, but it is not convenient to setup a web server to feed the content within a desktop application framework. Then a new protocol can be created to implement a rich client application that takes advantage of powerful layout capability of html without the burden of http server. Another technique is using DHTML event handling to interactive with webbrowser: Simple VC++ DHTML Hooking Technique 8 décembre py2exeI have written a wxPython script to create a GUI prototype for review, but it is not convenient to ask user installing python. Fortunately py2exe is able to rescue. Install py2exe, create setup.py according to the Tutorial.Run the following command: D:\test\python>c:\Python26\python.exe setup.py py2exe got error: error: MSVCP90.dll: No such file or directory copy C:\Program Files\Microsoft Visual Studio 9.0\vc\redist\x86\Microsoft.VC90.CRT\msvcp90.dll to D:\test\python\msvcp90.dll and run above command again, now it successfully build python script as Windows executable under D:\test\python\dist. There are a bunch of files, but it is better than installing python on user’s machine. 3 décembre Using MinGWDownloaded MinGW-5.1.6.exe and installed to default location, then downloaded and installed gcc 4.4.0: gcc-core-4.4.0-mingw32-bin.tar.gz After this, g++ operator-test.cpp -o a.exe output nothing in console window, also does not product output file. “g++ –v” confirmed that I was using 4.4.0. At last, I found gcc-4.4.0-mingw32-notes.txt and followed its instruction to install other [required] components: GMP Runtime [REQUIRED] libiconv Runtime [REQUIRED] MPFR Runtime [REQUIRED] POSIX Threads for Win32 Runtime [REQUIRED] 30 novembre why do I use allocaalloca function allocates memory from stack, thus is much faster than heap and is released automatically when function exit. At first look it like like declare a char array, but the difference is that you can only declare array of fixed size on stack, but you can get variable size memory (although limited by available stack size) via alloca. #include <windows.h> void test_with_std_exception() } } 17 novembre std::stack, std::queue and std::priority_queueThe interesting fact is that std::queue and std::priority_queue has different interface – std::queue has front(), but std::priority_queue has top(). #include <stack> template<typename ContainerType> void main() std::queue<char, std::list<char> > myqueue; //std::priority_queue<char, std::deque<char> > mypqueue; } exception in ctoroperator new return NULL if ctor throw exception, this will leads to resource leak, and other possible problem like lock is not released. // ctor.cpp : test throw exception in ctor. #define _CRTDBG_MAP_ALLOC class CtorWithException class TestCtorWithException int _tmain(int argc, _TCHAR* argv[]) boost.program_options crashA program linking with libboost_program_options-vc90-mt-gd-1_35.lib crashed at desc.add_options(), but the release version worked. At last it turned out to be due to mixed usage of debug version CRT and release version CRT – the program in trouble linked to some release version library in its debug build. The interesting fact is that VC++ 2008 does not complain during compilation, but boost.program_options raised obscure run-time error. 27 octobre Join sample on PostgreSQLHere is a simple example that demonstrate usage of INNER, FULL, LEFT and RIGHT JOIN. Create 2 tables
inner join is implicit. The following two produce the same result. select * from p1,p2 where p1.pid=p2.pid;
select * from p1 left join p2 on p1.pid=p2.pid;
1;"p1";1;"t1"
CORBA, COM and WebServiceCompare aspects of CORBA and COM
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|