2010年12月15日 星期三

Setup Hadoop with Clonezilla

This is a log that I used to install a Hadoop in Ubuntu, using with Clonezilla to quick install many computer.

2010年11月30日 星期二

雲端計算技術與應用研討會(六):作業系統與環境快速佈建工具 – DRBL 與 Clonezilla


雲端計算技術與應用研討會(五):Cloud OS – 雲端平台的基礎架構


    Trend Micro 進雲端是誤打誤撞的。起因是因為病毒碼運算,要從被動變成主動。變成主動後,伺服器卻變得複雜。又過了三年,不知不覺中,就有了雲端計術(可讓別人參考,不用再花三年來研究)。

    Cloud 不能 depend on infrastructure。

    Three parts: Virtualization, storage, and management.

    Open Source is better in Cloud Computing.



    Utility Computing - metered service as public utility, resources are ranted.

    On-Demand Computing - access to computing resources when become necessary rather than full time.  Flexibility.

    On-Demand Cluster Computing = On-Demand Computing + Utility Computing + Cluster Computing = Cloud Computing.

Introduced Phantom Cluster.

Use Phantom, you may dynamically manage cluster.

雲端計算技術與應用研討會(三):UniCloud: A Distributed Cloud Middleware


UniCloud → 大學雲


分三階段:virtual cluster → p2p connect → 最佳化

雲端計算技術與應用研討會(二):"Cloud SaaS/BaaS Enablement" 發展策略





而在商界和學界間有一道 Gap,而 Gap 的消除,需要兩邊再教育,才能減少。

雲端計算技術與應用研討會(一):The future in the cloud - 上雲端看未來

演講者:葉平,Google 台灣雲端計算主持人

    Cloud 的概念已經三年了,也成熟了。相較於過去的網路架構,Cloud 提供了 unlimited resources;所有的資源都是動態佈建的。

    在未來,人人手邊可能不只一機(手機→Pad→Laptop→TV→PC)。而網路就提供了一個方法讓各種資源來溝通。而在機體越來越小的情形下,Cloud Computing 就越來越重要。機體就可以使用網路,使用網路的計算資源;使得手機可以越做越小,而不失其運算能力。

2010年11月29日 星期一

Transfer file from Windows with SSH to Ubuntu

This will tell you how to transfer files from Windows to Ubuntu.

1) Download SSH client programs
    Here, I'm using Putty as the client of Windows side.  Download All binary is recommended.  We will use PSCP to transfer file.

2) Extract all putty binary to somewhere.  Add "C:/Path/To/All/Putty/Binary" to My Computer/Environment variable/Path .  So that we can use the command line to upload file.

3) Install ssh by typing:
sudo apt-get install ssh

4) Open cmd of the Windows, use following command to transfer file to Ubuntu computer
pscp [-r] <source file path> <name>@<IP><destination path from ~ >

2010年11月26日 星期五

Using wxWidgets with Code::Blocks, problem's about "Undefined reference to 'vtable for XXXX' "

According to this post, the reason of linking error " Undefined reference to 'vtable for XXXX' " is due to some of the virtual function is not written.  Especial from the inherent one.

But with Code::Blocks, there is another possibility that could leads the problem.  After some research, I discovered a quick to fix the problem, especially the problem is not cause from you but the library.

Code::blocks in Linux may automatically call some program to get config.  For example: run following on the terminal:

$wx-config --libs
-L/usr/local/lib -pthread   -lwx_gtk2u_xrc-2.9 -lwx_gtk2u_html-2.9 -lwx_gtk2u_qa-2.9 -lwx_gtk2u_adv-2.9 -lwx_gtk2u_core-2.9 -lwx_baseu_xml-2.9 -lwx_baseu_net-2.9 -lwx_baseu-2.9 

This is a result from my computer.  According to 'wx-config --help', the default output of this parameter is the basic, standard of the linkers.  In other word, some special library is not included.

Instead using 'wx-config --libs', you may try following:

$wx-cinfig --libs all
-L/usr/local/lib -pthread   -lwx_gtk2u_xrc-2.9 -lwx_gtk2u_stc-2.9 -lwx_gtk2u_richtext-2.9 -lwx_gtk2u_ribbon-2.9 -lwx_gtk2u_propgrid-2.9 -lwx_gtk2u_aui-2.9 -lwx_gtk2u_media-2.9 -lwx_gtk2u_html-2.9 -lwx_gtk2u_qa-2.9 -lwx_gtk2u_adv-2.9 -lwx_gtk2u_core-2.9 -lwx_baseu_xml-2.9 -lwx_baseu_net-2.9 -lwx_baseu-2.9 

Soon you may discovered that the number of the linker has increased.  This is the main reason that cause you mad.

To modify the setting, goto project properties... → Project build options → Linker Setting → Other linker options.

Change 'wx-config --libs' to 'wx-cinfig --libs all', and re-compile the project.

2010年11月25日 星期四

About wxMediaCtrl in wxWidgets

Recently, I was running on wxMediaCtrl to make a MetroLyricMaker

to use wxMediaCtrl, you must pass  --enable-mediactrl to ../configure.

You may also install libgstreamermm-0.10-dev to build the library

2010年10月29日 星期五

wxWidgets in CodeBlocks

wxWidgets has upgraded to 2.9, and I'm migrated from Dev-Cpp to Code::Blocks

Following is the way to setup the wxWidgets project in Code::Blocks

You should build your library with MSYS

1. Open a project

2. Go through Project / Properties...

3. Go to Project's build options...

4. In Compiler settings / #defines tab, we will add some information here.

4.1 Open MSYS, type wx-config --cppflags, and the terminal will popup like:

-I/usr/local/lib/wx/include/msw-unicode-2.9 -I/usr/local/include/wx-2.9 -D_LARGEFILE_SOURCE=unknown -DWXUSINGDLL -D__WXMSW__

4.2 Copy the this part to #defines

5. Go through Linker settings

5.1 For the Link libraries part, you just copy the file's path that end with .dll.a to here by click Edit button.  After testing, without this step, it still works.

5.2 For the other linker options, type wx-config --libs in MSYS, and the terminal will popup like:

-L/usr/local/lib   -Wl,--subsystem,windows -mwindows -lwx_mswu_xrc-2.9 -lwx_mswu_html-2.9 -lwx_mswu_qa-2.9 -lwx_mswu_adv-2.9 -lwx_mswu_core-2.9 -lwx_baseu_xml-2.9 -lwx_baseu_net-2.9 -lwx_baseu-2.9

Copy the this part to Other linker options

6. Goto Search directories

6.1 In compiler tab, add the directory path

mines are:


Note that there is always two paths there, former one for the library's setting (unicode? for example).  Later one is for other header files.

6.2 In Linker tab, add the directory path

mines is:


This is where the library place

2010年5月22日 星期六




可是在找過網路後,發現有 java.lang.ClassLoaderjava.net.URLClassLoader 可以用。


            URL url[] = new URL[1];
            url[0] = new URL("file:///pathTojar.jar");
            ClassLoader m_loader = new ClassLoader(url, ClassLoader.getSystemClassLoader());
            getContainerController().acceptNewAgent("test", (Agent)m_loader.loadClass("examples.hello.HelloWorldAgent").newInstance());
        } catch(Exception e) {


2010年5月11日 星期二

WallpaperTray is not working in Ubuntu 10.04 (Lucid)

WallpaperTray is a good Gnome applet that it altomatically search user defined directory and ramdomly change your Wallpaper.  But it seems that it do not have anyone to maintaince the project.  And in Ubuntu 10.04, it is not the default packet that you can select from the Synaptic.  But you can install by compiling the orginal code.  Here is how it works.

1), download the wallpaper-tray_0.5.5.orig.tar.gz from Here.

2), extract it to a folder.  For example, /home//wp_tray

3), open the command, change the folder to where it is extracted.
cd ~/wp_tray

4), type the following command
./configure  --prefix=/usr
Normally, it  will have some error.  That is because you have some packet that is not installed. (For example, the gnome-dev.)  The packet you lack of will show at the bottom of the console window, just scroll up a little, and you will see the list.  Open Synaptic and install all packet you need.  Until there is no error when you excute this command.

5), compile the source code by entering the following command
This will compile all the source code.  It may takes a while.

6), install WallpaperTray by the following command
sudo make install
This will copy all the binary file that just compiled to the proper location in your OS.

7), logout and login to refresh the gnome setting.  After that, you may select WallpaperTray as the old way.

Also note that there should have no error when excuting the commands upon.

You may also notice that there is the .deb file of WallpaperTray in here when you download the source code on step 1.  Why not just download the .deb file from one of the list?  The reason is simple.  Some of the packet it depands have updated, but the WallpaperTray project did not update.  When installing, it will say that you have no ... package installed, but the packet is the old packet.  And this is the reason that you can not install this applet directly from Synaptic.  However, we can't install from the .deb file, but we can re-compile the source code and link to the newer library, and the problem is solved.

Updating Ubuntu from 9.04(Jaunty) to 10.04(Lucid) with clean install (not update)

Since Ubuntu 9.10(karmic) have some issue with my external hard disk.  I stopped and wait until 10.04 release.  Here is how I update from 9.04 to 10.04 using clean install.

1), change the /home from ext3 to ext4.

2), format the root(/) to fat32 (using GParted in the Ubuntu Desktop version).

3), format the root(/) to ext4 (using GParted in the Ubuntu Desktop version).

4), install Ubuntu 10.04.

5), when install, choose where the root is install, and also set your /home partition as /home. (It will not format the /home, just for mount issue when startup.)

Note that on the step 2 and 3, it seems that it could directly format to ext4, or when install 10.04, it will format directly.  But as I tested on other disk, It did not success, and it shows that it cannot remove another operating system (that is, 9.04).  So I format the root to fat32, and than format back.  Another reason is that if you delete the partition and create a new partition, the partitioning table on the harddrive may not work as what you expected.  It may change from sda5 to sda9 (in my case).

2010年5月8日 星期六

Ubuntu flash 亂碼的問題



在 command line 下輸入
sudo gedit /etc/fonts/conf.d/49-sansserif.conf

然後將兩個「sans-serif」改成「sans serif」即可