tag:blogger.com,1999:blog-57008612662665946792024-03-05T11:31:03.057-08:00Ben Lau and Open SourceBen Lauhttp://www.blogger.com/profile/13549445374416989042noreply@blogger.comBlogger17125tag:blogger.com,1999:blog-5700861266266594679.post-75722378306214010172011-10-13T04:36:00.000-07:002011-10-13T04:36:13.178-07:00Good bye , Dennis M. Ritchie<pre>#include <stdio.h>
int main() {
printf("Good bye , Dennis M. Ritchie\n");
}
</pre>Ben Lauhttp://www.blogger.com/profile/13549445374416989042noreply@blogger.com0tag:blogger.com,1999:blog-5700861266266594679.post-10063199882655630372011-05-26T08:08:00.000-07:002011-05-26T08:08:57.869-07:00Getting Started with Bazaar - The slideHi,<br />
<br />
Recently I have conduct a training about Bazaar . Here is the slide. Enjoy it ;)<br />
<br />
<iframe src="https://docs.google.com/present/embed?id=ddrhj472_29dsw6bxg9" frameborder="0" width="410" height="342"></iframe>Ben Lauhttp://www.blogger.com/profile/13549445374416989042noreply@blogger.com0tag:blogger.com,1999:blog-5700861266266594679.post-72665013183234948992011-03-31T09:33:00.000-07:002011-03-31T09:33:00.285-07:00DQuest 0.2 is released<div class="gE iv gt"><table cellpadding="0" class="cf gJ"><tbody>
<tr><td class="gF gK"><table cellpadding="0" class="cf ix"><tbody>
<tr><td><br />
</td></tr>
</tbody></table></td><td class="gH"></td><td class="gH"><br />
</td></tr>
</tbody></table></div><div class="ii gt" id=":1o6"><div id=":1o3">Hi all,<br />
<br />
I would like to announce that the <a href="http://benlau.blog.opensource.hk/2010/10/dquest-orm-framework-for-qtsqlite.html">DQuest</a> 0.2 is released! The API is<br />
more powerful now!<br />
<br />
The changes:<br />
<br />
Feature enhancements:<br />
* Supported to create index<br />
* Supported to query for more complex rules<br />
* New utility class to create data model initial field<br />
<br />
Critial Changes:<br />
* The usage of DQWhere class is changed to adapt a faster way of<br />
usage. It is incompatible with 0.1.<br />
<br />
Detailed Changes:<br />
<br />
DQWhere<br />
* Deprecated &,| operator overloading and removed from code. It is<br />
replaced by && and ||<br />
* Changed the definition of constructor. The left operand pass to<br />
constructor is restricted to data model field only. It is not<br />
compatible with old code<br />
* Improved the operator overloading mechanism. It become a more<br />
powerful class<br />
* Supported to query by compare the value on different field. The<br />
following query become possible:<br />
- select * from table where field1 = field2<br />
* New supported operators: &&,||,+,-,*,/,<br />
%,equal,notEqual,between,in,<wbr></wbr>notIn,like,glob,is,isNot.<br />
<br />
<br />
DQ_DECLARE_MODEL<br />
* Supported private field<br />
<br />
DQIndex<br />
* A new class for sqlite indexing<br />
<br />
DQField<t><br />
* Supported bool and QStringList as the template type T<br />
* Added operator T() casting. It can be casted to T automatically.<br />
<br />
DQBaseField::get() / DQModelMetaInfo::value() - Added a new argument<br />
"convert"<br />
* It is true if the QVariant return should be converted to a type<br />
which is suitable for saving. It is designed for type like QStringList<br />
which is not supported by SQLite backend by default.<br />
<br />
DQConnection<br />
* Change this connection to be the default connection<br />
* operator == / !- compare is two connection share the same database<br />
<br />
DQSharedQuery<br />
* Added new function select() - Construct a new query object with<br />
only the fields assigned in result<br />
* Added new function orderBy() - Construct a new query object with<br />
required sorting order<br />
* Added new function setConnection() - Set the database connection<br />
<br />
DQStream<br />
* A new class, it provides a stream interface for reading and writing<br />
data model field<br />
<br />
DQListWriter<br />
* A new class, it is a utility class to create the content for DQList<br />
object with predefined field<br />
<br />
DQSharedList<br />
* Added new function save() - Save all the contained item to database<br />
</t></div></div><table cellpadding="0" class="cf gz" id=":1jy"><tbody>
<tr><td><div class="cKWzSc mD" role="button" tabindex="0"><img alt="" class="mL" src="https://mail.google.com/mail/images/cleardot.gif" /> <span class="mG">Reply</span></div></td><td><br />
</td><td><div class="XymfBd mD" role="button" tabindex="0"><img alt="" class="mI" src="https://mail.google.com/mail/images/cleardot.gif" /> <span class="mG">Forward</span></div></td><td><br />
</td><td><br />
</td><td class="io"><br />
</td><td class="io"><br />
</td><td class="io"><br />
</td><td class="io"><br />
</td></tr>
</tbody></table><br />
Project page: <a href="http://code.google.com/p/d-quest/">http://code.google.com/p/d-quest/</a>Ben Lauhttp://www.blogger.com/profile/13549445374416989042noreply@blogger.com0tag:blogger.com,1999:blog-5700861266266594679.post-34845656318034136772011-03-28T06:53:00.000-07:002011-03-28T06:53:45.207-07:00A tiny utility - QTestLib application runnerThe QTestLib framework, provided by Nokia, is a tool for unit testing Qt based applications and libraries. The framework is very easy to use and sutiable for TDD like development approach.<br />
<br />
To make a test program, you just have to create the an unit test project in Qt Creator.<br />
<br />
However, when the no. of test case growth, you may break down the test case into few different classes. But the code template generated by Qt Creator combined everything into a single source file. And it do not support to run multiple test classes.<br />
<br />
There have no a direct way to run all the test program in your project. You may have to spend extra time to reorganize the source file for this purpose. It is quite troublesome.<br />
<br />
In order to simplify the process, I have made a tiny utility class called TestRunner. It provides a mechanism to exeucte multiple test program without any change of the program's source code. The result for each test program will be recorded and combined to a summary report.<br />
<br />
<b>Example code: </b><br />
<br />
<blockquote><pre style="background: none repeat scroll 0% 0% rgb(255, 255, 255); color: black;"><span style="color: #004a43;">#</span><span style="color: #004a43;">include </span><span style="color: maroon;"><</span><span style="color: #40015a;">QtCore/QCoreApplication</span><span style="color: maroon;">></span>
<span style="color: #004a43;">#</span><span style="color: #004a43;">include </span><span style="color: maroon;">"</span><span style="color: #40015a;">testrunner.h</span><span style="color: maroon;">"</span>
<span style="color: maroon; font-weight: bold;">int</span> <span style="color: #400000;">main</span><span style="color: #808030;">(</span><span style="color: maroon; font-weight: bold;">int</span> argc<span style="color: #808030;">,</span> <span style="color: maroon; font-weight: bold;">char</span> <span style="color: #808030;">*</span>argv<span style="color: #808030;">[</span><span style="color: #808030;">]</span><span style="color: #808030;">)</span>
<span style="color: purple;">{</span>
QCoreApplication a<span style="color: #808030;">(</span>argc<span style="color: #808030;">,</span> argv<span style="color: #808030;">)</span><span style="color: purple;">;</span>
TestRunner runner<span style="color: purple;">;</span>
runner<span style="color: #808030;">.</span>run<span style="color: #808030;">(</span><span style="color: maroon;">"</span><span style="color: #0000e6;">../testa/tst_testa</span><span style="color: maroon;">"</span><span style="color: #808030;">)</span><span style="color: purple;">;</span>
runner<span style="color: #808030;">.</span>run<span style="color: #808030;">(</span><span style="color: maroon;">"</span><span style="color: #0000e6;">../testb/tst_testb</span><span style="color: maroon;">"</span><span style="color: #808030;">)</span><span style="color: purple;">;</span>
runner<span style="color: #808030;">.</span>run<span style="color: #808030;">(</span><span style="color: maroon;">"</span><span style="color: #0000e6;">../testc/tst_testc</span><span style="color: maroon;">"</span><span style="color: #808030;">)</span><span style="color: purple;">;</span> <span style="color: dimgrey;">// not existed test program</span>
runner<span style="color: #808030;">.</span>report<span style="color: #808030;">(</span><span style="color: #808030;">)</span><span style="color: purple;">;</span>
<span style="color: maroon; font-weight: bold;">return</span> <span style="color: #008c00;">0</span><span style="color: purple;">;</span>
<span style="color: purple;">}</span></pre></blockquote><b>Example output:</b><blockquote>********* Start testing of TestA *********<br />
Config: Using QTest library 4.7.2, Qt 4.7.2<br />
PASS : TestA::initTestCase()<br />
PASS : TestA::simple()<br />
FAIL! : TestA::fail() 'false' returned FALSE. ()<br />
Loc: [../../testrunner/testa/tst_testa.cpp(26)]<br />
PASS : TestA::cleanupTestCase()<br />
Totals: 3 passed, 1 failed, 0 skipped<br />
********* Finished testing of TestA *********<br />
********* Start testing of TestB *********<br />
Config: Using QTest library 4.7.2, Qt 4.7.2<br />
PASS : TestB::initTestCase()<br />
PASS : TestB::complex()<br />
PASS : TestB::cleanupTestCase()<br />
Totals: 3 passed, 0 failed, 0 skipped<br />
********* Finished testing of TestB *********<br />
FAIL! : Can not start "../testc/tst_testc" <br />
Totals: 6 passed, 2 failed, 0 skipped <br />
********* Finished testing ********* </blockquote><pre style="background: none repeat scroll 0% 0% rgb(255, 255, 255); color: black;"></pre>The TestRunner is a C++ class with only very simple interface to execute the binary built with QTestLib , but it will save your time for running all the test program developed. <br />
<br />
The code is licensed under new BSD.(Well.. It is almost meaningless as I don't think you will bundle the class with your binary application)<br />
<br />
The source code and example can be found at GitHub:<br />
<b></b><br />
<a href="https://github.com/benlau/testrunner">https://github.com/benlau/testrunner</a>Ben Lauhttp://www.blogger.com/profile/13549445374416989042noreply@blogger.com0tag:blogger.com,1999:blog-5700861266266594679.post-17850741641280921322011-03-20T05:21:00.001-07:002011-03-20T05:23:09.307-07:00Qt KeyringMy Qt keyring ;)<br />
<br />
<div class="separator" style="clear: both; text-align: center;"></div><div class="separator" style="clear: both; text-align: center;"></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhizvOJO5Ea_NmclwmOv60kETbqci-DwthCGUxifcFPH9vpjxx3fWX3-NKPRcgla5Z3tgkcGT33ugcpMJCgfeyn3AYrfoAVYod3cHXRnqDc6Ou0_HWmVHxJUqz_r34GJzy35rBBM2Os9Co/s1600/IMG_2601.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhizvOJO5Ea_NmclwmOv60kETbqci-DwthCGUxifcFPH9vpjxx3fWX3-NKPRcgla5Z3tgkcGT33ugcpMJCgfeyn3AYrfoAVYod3cHXRnqDc6Ou0_HWmVHxJUqz_r34GJzy35rBBM2Os9Co/s320/IMG_2601.JPG" width="320" /></a></div><br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEikhq74iWGTSA9rwdkv_xPHsarY8c30flVMspxHZkJl_LXDa1nqmO8ZXpzCYk06riY4Zp-QAjPzZKGnv0Q7y6dF6yRHsACUcqOxFitMpd4qO6wX7s24KrHf-IHcqTXW7qNRvMrwO2lA1AY/s1600/IMG_2602.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEikhq74iWGTSA9rwdkv_xPHsarY8c30flVMspxHZkJl_LXDa1nqmO8ZXpzCYk06riY4Zp-QAjPzZKGnv0Q7y6dF6yRHsACUcqOxFitMpd4qO6wX7s24KrHf-IHcqTXW7qNRvMrwO2lA1AY/s320/IMG_2602.JPG" width="320" /></a></div>Ben Lauhttp://www.blogger.com/profile/13549445374416989042noreply@blogger.com0tag:blogger.com,1999:blog-5700861266266594679.post-87445073727051787532010-10-04T16:58:00.000-07:002010-10-04T16:58:51.717-07:00DQuest , ORM framework for Qt/SqliteI have made a new OSS project for Qt and mobile. It is DQuest , a C++ ORM (Object-relational mapping) for Qt framework. It aims to provide a rapid development environment for application with database access. The database model declaration is very simple , just like other C++/Qt class. It is designed for mobile environment but also useful for desktop and embedded application that do not demand for maximized performance for database. <br />
<br />
It is getting more number of application use Sqlite for their data storage. However, writing data model in SQL is complicated . Usually it need to write two set of interface : One for C/C++ and other for Sql. The work load is duplicated, and debug is troublesome.<br />
<br />
<br />
With DQuest, you can declare a database model using C++ directly. Read / write access can be made through the C++ interface. You won't need to wbrite any SQL to gain the benefit of using Sqlite in your application.<br />
<br />
To declare your database model, you need to:<br />
<ul><li>Create a class that inherits DQModel</li>
<li>Added a DQ_MODEL macro to the class declaration</li>
<li>Design your database field by using DQField template type</li>
<li>Register your model with DQ_DECLARE_MODEL macro function. </li>
</ul><br />
Remarks: DQModel is not QObject based, (QObject is rarely used in DQuest) , therefore you don't need to write setter/getter for each database field. <br />
<br />
<b>Features</b><br />
<ul><li>Database model declaration and registration is simple.</li>
<ul><li>Declare model in C++/Qt way (p.s QObject is not used)</li>
<li>o Support model inheritance</li>
<li>o Foreign key - auto load entry </li>
</ul>
<li>Supported operations : create table , drop table , select , delete , insert , query the existence of table , ...</li>
<li>Support Sqlite - usable on mobile platform</li>
<li>Open source (New BSD license) </li>
<ul><ul></ul></ul></ul><br />
<b>Pending features</b><br />
<ul><li>Multiple database access</li>
<ul><li>The software design support to access multiple database , but it is not tested. </li>
</ul><li>Multi-threading</li>
<ul><li>The software design support multi-threading , but it is not tested. </li>
</ul></ul><br />
<b>Limitations</b><br />
<ul><li>DQuest is still in alpha stage. Use at your own risk.</li>
<li>Not all SQL statement and options are implemented , most of them can be added upon on user request. Please join the mailing list.</li>
<li>Not implemented operations : create trigger , create index</li>
<li>Not supported operations : join select </li>
</ul><b>Licensing</b><br />
<br />
DQuest source code is licensed under BSD license. You may use it for open source and closed source application , you just need to obey the requirement of BSD (e.g distribute the license agreement). Moreover, if you can inform us that your application is using DQuest. It can encourage developer to further develop the software. <br />
<br />
<b></b><br />
<b>Project Page: </b><br />
<a href="http://code.google.com/p/d-quest/">http://code.google.com/p/d-quest/</a><br />
<br />
<br />
<b>Mailing list:</b><br />
<a href="http://groups.google.com/group/dquest-dev">http://groups.google.com/group/dquest-dev</a><br />
<br />
<br />
<b>API Document</b><br />
<a href="http://d-quest.googlecode.com/svn/trunk/docs/annotated.html">http://d-quest.googlecode.com/svn/trunk/docs/annotated.html</a><br />
<br />
<br />
<br />
<b>Motivation:</b><br />
<br />
When I develop the 0.1 version of PenPen Sketchbook , the prototype of drawing interface only spend me few hours , and a working code is completed within two night. However, when I make the sqlite code , it a much longer time to develolop in compare with the drawing function. 60% of time spent on database code totally. I think it is non-sense for such a tiny project. Therefore , that inspired me to develop a C++ ORM for Qt and sqlite.Ben Lauhttp://www.blogger.com/profile/13549445374416989042noreply@blogger.com0tag:blogger.com,1999:blog-5700861266266594679.post-8256768839324290932009-08-12T09:30:00.000-07:002010-08-17T23:37:54.072-07:00Moblin Image Creator for Ubuntu 9.04Although MIC1 is deprecated and replaced by MIC2, I think it is still the best Ubuntu image customization tool. It is pity to throw it away. I would like to resume the development and extend it to build image for latest Ubuntu version like 9.04 . The first prototype is ready. It could build image for Ubuntu 9.04. The source code is available in my <a href="https://github.com/benlau/moblin-image-creator.jaunty/tree">github</a> account.<br />
<br />
<div style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi1nw0CJIRQURHw23MNBDm3z6jlSuqvFVehi8zhTrxm5YbpLBhL1ifYTgsQlHdmhNdKKDt67FqGB1aEugrMfXEiHEIwKnXWtVtTcTKH7TGsF_uykDK6a6ymG0njjFG6DvxtK4fS-8-I1hg/s1600-h/Screenshot-Moblin+Image+Creator.png" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"><img alt="" border="0" id="BLOGGER_PHOTO_ID_5369076241766845810" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi1nw0CJIRQURHw23MNBDm3z6jlSuqvFVehi8zhTrxm5YbpLBhL1ifYTgsQlHdmhNdKKDt67FqGB1aEugrMfXEiHEIwKnXWtVtTcTKH7TGsF_uykDK6a6ymG0njjFG6DvxtK4fS-8-I1hg/s320/Screenshot-Moblin+Image+Creator.png" style="cursor: pointer; display: block; height: 209px; margin: 0px auto 10px; text-align: center; width: 320px;" /></a><span style="font-size: 85%; font-style: italic;"></span></div><br />
Reference:<br />
<ul><li><a href="http://benlau-linux.blogspot.com/2008/08/moblin-image-creator-for-eeepc701.html">Moblin Image Creator for EeePC</a></li>
</ul>Ben Lauhttp://www.blogger.com/profile/13549445374416989042noreply@blogger.com3tag:blogger.com,1999:blog-5700861266266594679.post-67019340465407855892009-07-11T06:05:00.001-07:002009-07-11T06:11:28.661-07:00Backported Qt 4.5.2 and Qt Creator 1.1.0 to Ubuntu HardyThe Ubuntu hardy's official repository only support QT 4.4 , but I am now doing QT 4.5-based development on my X60 notebook with Ubuntu hardy. I have backported QT 4.5.2 and Qt Creator 1.1.0 from karmic to hardy. The packages has been pushed to Launchpad PPA. If you also need it , you may add the following lines to your /etc/apt/sources.list<br /><blockquote><br />deb http://ppa.launchpad.net/benlau/hardy-backport-qt/ubuntu hardy main<br />deb-src http://ppa.launchpad.net/benlau/hardy-backport-qt/ubuntu hardy main </blockquote><blockquote></blockquote>More packages from : <a href="https://launchpad.net/%7Ebenlau/+archive/hardy-backport-qt">hardy-backport-qt</a>Ben Lauhttp://www.blogger.com/profile/13549445374416989042noreply@blogger.com0tag:blogger.com,1999:blog-5700861266266594679.post-78671710924534828352009-04-20T22:41:00.000-07:002009-04-20T22:59:30.290-07:00Running OLPC 8.2 in VirtualBoxIt is well known that OLPC build 767 (8.2) can not be run in VirtalBox / VMWare due to the absent of 3Dnow instruction in the virtual machine. 3DNow is an extension to the x86 instruction developed by AMD. As VirtualBox / VMWare don't have any plan to support 3DNow instruction , it need to customize the OLPC image by ourself in order to run on those platform.<br /><br />The method is not available in wiki.laptop.org , therefore , I have to figure out by myself. And it is the result:<br /><br />(The instruction is not completed, because I am not familiar with Fedora. Please feel free to comment and suggest improve method. Soon it is ready , I will post to wiki.laptop.org )<br /><br /><span style="font-weight: bold;">Preparation</span>:<br /><ol><li>Follow the instruction <a href="http://wiki.laptop.org/go/VirtualBox">Virtual Box - OLPC</a><br /></li><ol><li>Download the ext3 image</li><li>Setup the Virtual Machine</li><li>Convert the ext3 image by using the "VBoxManage convertd" command </li></ol><li>Download Ubuntu Live Image (e.g 8.10)<br /></li></ol><span style="font-weight: bold;">Boot the virtual machine with the Ubuntu Live Image.</span><br /><br />1. Mount OLPCRoot by using the menu : Places -> OLPCRoot<br /><br />2. Open Terminal , run the command below:<br /><blockquote>mount -t none /dev /media/OLPC/dev -o bind<br />cp /etc/resolv.conf /media/OLPCRoot/etc/resolv.conf<br />chroot /media/OLPCRoot<br />mount /proc<br />mount /sys<br /></blockquote>3. Now you are under a chroot environment , you need to edit few files and install few packages:<br /><br />3.1 Edit /etc/yum.repos.d/fedora.repo<br /><br />Found the line "include=file:///etc/yum/olpc-exclude" and comment it<br /><br />3.2 Install standard kernel :<br /><blockquote>yum -y install yum-allowdowngrade<br /><br />yum --allow-downgrade -y install kernel.i686<br /></blockquote>3.3 Add the new kernel config to /boot/grub/grub.conf<br /><blockquote>title Standard Fedora Kernel<br /> root (hd0,0)<br /> kernel /boot/vmlinuz-2.6.25-14.fc9.i686 ro vga=0x317 video=vesafb:ypan sellinux=0 console=ttyS0,115200 console=tty0 emu<br /> initrd /boot/initrd-2.6.25-14.fc9.i686.img<br /></blockquote>3.4 Reboot the Virtual Machine , and remove the LiveCD iso image. Now VirtualBox should be able to boot OLPC 8.2<br /><br /><span style="font-weight: bold;">Known Issue</span>:<br /><ol><li>USB auto mount is working , but the mounted drive can not be shown in Journal<br /></li></ol>Ben Lauhttp://www.blogger.com/profile/13549445374416989042noreply@blogger.com0tag:blogger.com,1999:blog-5700861266266594679.post-51071398178693866392008-12-08T18:30:00.000-08:002008-12-08T18:36:32.908-08:00Ditz Commander 0.4 releasedDitz Commander is a simple GUI frontend for ditz (light weight distributed issue tracker).<br /><br />Project page : <a href="http://code.google.com/p/ditz-commander/">http://code.google.com/p/ditz-commander/</a><br /><br />ChangeLog (v.04):<br /><ul><li>Added "New" window button in toolbar to create new window of commander</li><li>Prompt dialog if the opened path is not a valid ditz repository to ask to run "ditz init" command</li><li>Refresh button is renamed to HTML button</li><li>Supported shortcut keys binding for toolbar items</li><li>Ctrl+N - Create new window</li><li>Ctrl+O - Open repository</li><li>Alt+Left - Go to previous page</li><li> Alt+Right - Go to next page</li><li> Ctrl+R - Reload page</li><li> Alt+Home - Go to the index page</li><li> Ctrl+Q - Quit</li></ul><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5IPrudUGQy3oP79DwR8iEK5Cl7NvGdFFm14w5UaGoogPBIHHl6FikySsjDo8NZ_R9tJUi2rxM0APiUfLYkBMpskrdSJb9sIdGhZDH3WvMx2VfZr8dvG6PwIPleazOYfoytgE8g8U_kZs/s1600-h/Screenshot-Ditz+Commander-v0.4.png"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 347px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5IPrudUGQy3oP79DwR8iEK5Cl7NvGdFFm14w5UaGoogPBIHHl6FikySsjDo8NZ_R9tJUi2rxM0APiUfLYkBMpskrdSJb9sIdGhZDH3WvMx2VfZr8dvG6PwIPleazOYfoytgE8g8U_kZs/s400/Screenshot-Ditz+Commander-v0.4.png" alt="" id="BLOGGER_PHOTO_ID_5277613556006775378" border="0" /></a>Ben Lauhttp://www.blogger.com/profile/13549445374416989042noreply@blogger.com0tag:blogger.com,1999:blog-5700861266266594679.post-30499626883634597752008-10-29T11:14:00.000-07:002008-10-29T11:16:12.849-07:00Ditz Commander 0.3 releasedProject page : <a href="http://code.google.com/p/ditz-commander/">http://code.google.com/p/ditz-commander/</a><br /><br />Changelog:<br /><ul><li>Added new Tool buttons : Go back & Go forward</li><li>Added extra command list for non-common command</li><li>Implemented commands : "add-release" , "add-component" , "set-component" , "Unassign" , "Stop" , "Raw Edit"</li><li>Added "Recently opened folder" menu</li><li>Raw Edit Command - Launch $EDITOR (default is vim) and open raw issue file</li><li>Bug Fix - It is now able to handle relative path as input argument of command "ditz-commander"</li><li>Change window title according to the current loading page</li></ul>Screenshot:<br /><br /><br /><table style="width:auto;"><tr><td><a href="http://picasaweb.google.com/lh/photo/PoMJEfg8U-tFkq_DtkxtlQ"><img src="http://lh4.ggpht.com/xbenlau/SQinX_YIsaI/AAAAAAAABgk/-PBLUBArKBc/s400/Screenshot-Ditz%20Commander%20Issue%20Tracker%20-%20Ditz%20Commander.png" /></a></td></tr><tr><td style="font-family:arial,sans-serif; font-size:11px; text-align:right">From <a href="http://picasaweb.google.com/xbenlau/Blog">Blog</a></td></tr></table>Ben Lauhttp://www.blogger.com/profile/13549445374416989042noreply@blogger.com0tag:blogger.com,1999:blog-5700861266266594679.post-10926430458120706122008-10-22T09:11:00.000-07:002008-10-22T09:17:39.728-07:00Ditz Commander<h3><a name="Features"></a></h3><p>Ditz Commander is a simple GUI frontend of <a href="http://ditz.rubyforge.org/">ditz</a> (light weight distributed issue tracker). </p><span style="font-weight: bold;">Features</span><br /><ul><li>Integrate HTML browser and terminal in a single UI window</li><li>Short cut to ditz commands like "add" , "edit" , "comment" and "html"</li><li>Auto determine the Issue ID of loading page for ditz commands like "edit" and "comment". No need to copy & page issue ID from HTML page.</li><li>A single "refresh" button to generate HTML document and refresh browser content</li></ul><span style="font-weight: bold;">Screenshot</span> (v0.2)<br /><div style="text-align: center;"><br /></div><table style="width: auto;"><tbody><tr align="center"><td><a href="http://picasaweb.google.com/lh/photo/TwfvzX8nUk2ZMrcMsv3OPw"><img src="http://lh5.ggpht.com/xbenlau/SP9NhG-5s_I/AAAAAAAABgE/tI37vaFEsjI/s400/Screenshot-Ditz%20Commander-1.png" /></a></td></tr></tbody></table><br />Project page : <a href="http://code.google.com/p/ditz-commander/">http://code.google.com/p/ditz-commander/</a>Ben Lauhttp://www.blogger.com/profile/13549445374416989042noreply@blogger.com0tag:blogger.com,1999:blog-5700861266266594679.post-6424034067342658742008-09-15T08:34:00.000-07:002008-09-15T08:53:25.294-07:00GStreamer pipeline description generatorrvtk-gst-pg is a GStreamer pipeline description generator that will be released togather with Rvtk 0.3. It is a GUI utility to generate GStreamer pipeline description for tools like gst-launch , ARToolkit-based applications , and any GStreamer based applications.<br /><br />It is getting more number of applications use GStreamer for video playing. That include few webcam applications (e.g. Cheese) and computer vision software (e.g. Lasertraq). Although they are working fine , they usually lack a user interface to tune camera parameter. User may only use default camera parameter unless they know how to construct GStreamer pipeline description, which is too complicated for end-user.<br /><br />Example of pipeline description:<br /><blockquote><span style="color: rgb(255, 0, 0);"># Capture image from a webcam with resolution of 320x240 and 30fps.</span><br /><br /><span style="color: rgb(255, 0, 0);">gst-launch-0.10 -v v4l2src name=source queue-size=2 ! video/x-raw-yuv,width=320,height=240,framerate=30/1 ! ffmpegcolorspace ! ximagesink</span><br /><br /><span style="color: rgb(255, 0, 0);"># Play a AVI file.</span><br /><span style="color: rgb(255, 0, 0);">gst-launch-0.10 filesrc location=video.avi ! decodebin ! ffmpegcolorspace ! ximagesink</span><br /></blockquote>The usage of rvtk-gst-pg is quite similar to zenity. It will display few Gtk+ dialogs , and return the user input to standard output for shell scripting:<br /><br /><blockquote><span style="color: rgb(204, 0, 0);">$ rvtk-gst-pg --help</span><br /><span style="color: rgb(204, 0, 0);">Usage:</span><br /><span style="color: rgb(204, 0, 0);">rvtk-gst-pg [OPTION...] [sink element]</span><br /><br /><span style="color: rgb(204, 0, 0);">Help Options:</span><br /><span style="color: rgb(204, 0, 0);">-?, --help Show help options</span><br /><span style="color: rgb(204, 0, 0);">--help-all Show all help options</span><br /><span style="color: rgb(204, 0, 0);">--help-gtk Show GTK+ Options</span><br /><br /><span style="color: rgb(204, 0, 0);">Application Options:</span><br /><span style="color: rgb(204, 0, 0);">-v, --var Export variable name</span><br /><span style="color: rgb(204, 0, 0);">--display=DISPLAY X display to use</span><br /></blockquote>Example script: play video from webcam or local media by gst-launch:<br /><br /><blockquote><span style="color: rgb(255, 0, 0);">PIPELINE=`rvtk-gst-pg xvimagesink`</span><br /><span style="color: rgb(255, 0, 0);">if [ ! -z "$PIPELINE" ]</span><br /><span style="color: rgb(255, 0, 0);">then</span><br /><span style="color: rgb(255, 0, 0);"> gst-launch $PIPELINE</span><br /><span style="color: rgb(255, 0, 0);">fi</span><br /></blockquote>Firstly, it will prompt a dialog to ask for the location of media source. The first tab contains the detected capture device list , another tab shows a file selection browser to choose their local media file.<br /><br /><div style="text-align: center;"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgfsVqHiEmxnTnEQQz9fudpK-TFZ7KcVhUV7Z_8eIYX7N12yQcOLKRbHle5QJhai6C93idQIEC0QcwmVHh8kX7UzCFRZ-Qn_s6elTnkzU3uLVcRCnM-w9MVJYNfzpxoa7G3sBTeZk7OpW8/s1600-h/normal_Screenshot-ConnectTo.png"><img style="cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgfsVqHiEmxnTnEQQz9fudpK-TFZ7KcVhUV7Z_8eIYX7N12yQcOLKRbHle5QJhai6C93idQIEC0QcwmVHh8kX7UzCFRZ-Qn_s6elTnkzU3uLVcRCnM-w9MVJYNfzpxoa7G3sBTeZk7OpW8/s320/normal_Screenshot-ConnectTo.png" alt="" id="BLOGGER_PHOTO_ID_5246272667417269778" border="0" /></a><br /></div><br />If a capture device is chosen , it will prompt another dialog for more options of capture device. That include the image format , resolution and FPS.<br /><div style="text-align: center;"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjPP5isu9jNMvI2oACsp3rNxeR262oUiMXHR9CqfRRwCNe-MYZ8t8-EfqCYIiA9R3iiacESPUr8qfUAHdU8jHKR86WSxcwlAtJgV_KoqHjPvJnl4AFfqDi4MbiTEWEaiVnBVZcJ-jHnUMU/s1600-h/Screenshot-Video+Tuning.png"><img style="cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjPP5isu9jNMvI2oACsp3rNxeR262oUiMXHR9CqfRRwCNe-MYZ8t8-EfqCYIiA9R3iiacESPUr8qfUAHdU8jHKR86WSxcwlAtJgV_KoqHjPvJnl4AFfqDi4MbiTEWEaiVnBVZcJ-jHnUMU/s320/Screenshot-Video+Tuning.png" alt="" id="BLOGGER_PHOTO_ID_5246272668819255746" border="0" /></a><br /></div><br />Finally , rvtk-gst-pg will print out the pipeline description according to the media chosen and the passed argument to standard output.<br /><br />Example video : rvtk-gst-pd + levelhead<br /><br /><object height="344" width="425"><param name="movie" value="http://www.youtube.com/v/ll42ELY5r2M&hl=en&fs=1"><param name="allowFullScreen" value="true"><embed src="http://www.youtube.com/v/ll42ELY5r2M&hl=en&fs=1" type="application/x-shockwave-flash" allowfullscreen="true" height="344" width="425"></embed></object><br /><br />Although Rvtk 0.3 is not released yet , the source of rvtk-gst-pg is already available in Launchpad: <a href="https://code.launchpad.net/rvtk">https://code.launchpad.net/rvtk</a>Ben Lauhttp://www.blogger.com/profile/13549445374416989042noreply@blogger.com1tag:blogger.com,1999:blog-5700861266266594679.post-32727281355804973062008-08-23T07:35:00.000-07:002008-08-23T07:45:13.855-07:00Realtime Video Toolkit (RVTK) - Release 0.2ChangeLog<br /><br /> * New GObjects:<br /> - RvtkMap, Associative container of GValue type<br /> - RvtkHal, Access to system resource<br /> - RvtkMedia, Abstraction class of media Source<br /> - RvtkFrame, Abstraction class of video frame<br /> - RvtkCapture, Video Capture Device<br /> - RvtkV4L2Frame, V4L2 Video Frame<br /> - RvtkV4L2Capture, V4L2 Capture Device<br /><br /> * New header: rvtk/rvtk.h<br /><br /> * Utilities:<br /> - rvtk-scan, Scan capture devices<br /> - rvtk-viewer, example camera viewer using RvtkFrame and RvtkCapture<br /><br /> * libv4l2<br /> - Fixed memory leark in v4l2CaptureRelease<br /> - Few API changed<br /><br /> * Added pkg-config scripts<br /> - rvtk.pc<br /> - rvtk-uninstalled.pc<br /> - rvtk-ui.pc<br /> - rvtk-ui-uninstalled.pc<br /><br /> * Document<br /> - Support for Devhelp<br /><br />TODO for Release 0.3<br /><ol><li>Deprecate all GOB code</li><li>Enrich the API of widget set.<br /></li></ol><div style="text-align: center;"><a href="http://code.google.com/p/rvtk/downloads/list"><span style="font-size:180%;">Download</span></a><br /></div>Ben Lauhttp://www.blogger.com/profile/13549445374416989042noreply@blogger.com0tag:blogger.com,1999:blog-5700861266266594679.post-51675777767381298632008-08-22T23:10:00.000-07:002008-08-22T23:22:28.962-07:00Linking OpenCV with ffmpeg 20080706The API of ffmpeg has been changed a lot , but the OpenCV package in Debian SID is not ready for the API changes. Another distribution like gentoo has already been fixed. Ubuntu is stilling using old version of ffmpeg , so it is also fine.<br /><br />But Debian SID has been migrated to newer version of ffmpeg , and quite a lot of packages are depended on that version. Therefore, it is very trouble to rollback ffmpeg version to old one , which just to make OpenCV works.<br /><br />In order to make Debian SID's OpenCV work with newer ffmpeg, I have submitted two patches for the issue. If you encounter similar problem like the one below, or OpenCV can not load AVI and image files. You probably need the patches:<br /><blockquote>Compiling an application and and then linking against libhighgui fails with:<br /><pre class="message">/usr/lib/libhighgui.so: undefined reference to `img_convert'<br />collect2: ld returned 1 exit status</pre></blockquote>The bug report and patches<br /><ul><li><a href="http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=490700"><span style="font-size:100%;"><span style="font-weight: bold;"></span>libhighgui-dev: Linking against libhighgui fails</span></a></li></ul><h1></h1>Ben Lauhttp://www.blogger.com/profile/13549445374416989042noreply@blogger.com0tag:blogger.com,1999:blog-5700861266266594679.post-78613360937835827412008-08-09T10:06:00.000-07:002009-08-15T10:16:01.137-07:00Moblin Image Creator for EeePC701I have extended the moblin-image-creator to build image for EeePC 701. The feature of the final image :<br /><ul><li>Support to generate Writable Live USB image that don't require to install</li><li>Using squashfs + unisonfs like the default Xandros's distribution. The system only use 1GB of disk space(can be even smaller). 2.6GB disk space leave for use.</li><li>Using linux-eeepc kernel from array.org which support madwifi and eeepc-acpi</li><li>Applied the changes from <a href="http://wiki.eeeuser.com/getting_ubuntu_8.04_to_work_perfectly" target="_blank">http://wiki.eeeuser.com/getting_ubuntu_ … _perfectly</a><br /></li></ul>EeePC 701 specific changes:<br /><ul><li>Make EeePC shut down properly</li><li>Enabling processor scaling</li><li>Wifi Hotkeys</li><li>Audio after suspend/resume</li></ul>EeePC 701 specific changes for gnome (based on the RiceeyTweak.sh ) :<br /><ul><li>Smaller toolbars icons</li><li>Disabling UI sounds</li><li>Fixing mute key</li><li>Fullscreen with <alt>-F11</alt></li><li>Setting suspend when closing lid, blank screen</li><li>Don't display battery warning</li><li>Unconstraining windows to the top of the screen</li></ul><br />As it is only an experimental release, I don't provide ISO/Image now(may provide later) . You may build your own image by using the moblin image creator. Furthur information:<br /><br /><a href="http://www.moblin.org/projects/projects_image-creator.php" target="_blank">http://www.moblin.org/projects/projects … reator.php</a><br /><br /><div style="text-align: center;"><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjXIhNoRhNem2AN7dIjoJfORRiy7KpXVxLGn9ZJxhsH-AQGw7b8nOwVr4eu7V_hc5Ugb_24h84ops3Klntgdn_jisnc7zLdXoXgmDHM5gX8I71sWChIYDaftb-jdy1xN2YqlC9IElMvuJc/s1600-h/Screenshot-Moblin+Image+Creator.png"><img style="cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjXIhNoRhNem2AN7dIjoJfORRiy7KpXVxLGn9ZJxhsH-AQGw7b8nOwVr4eu7V_hc5Ugb_24h84ops3Klntgdn_jisnc7zLdXoXgmDHM5gX8I71sWChIYDaftb-jdy1xN2YqlC9IElMvuJc/s320/Screenshot-Moblin+Image+Creator.png" alt="" id="BLOGGER_PHOTO_ID_5222459201858174642" border="0" /></a><br /></div><br />Instruction to get Moblin Image Creator for EeePC<br /><blockquote><div class="incqbox"><p></p><blockquote>git clone <a href="http://repo.or.cz/r/moblin-image-creator.eeepc.git" target="_blank">http://repo.or.cz/r/moblin-image-creator.eeepc.git</a><br />cd moblin-image-creator.eeepc.git<br />dpkg-buildpackage -rfakeroot -us -uc<br />sudo dpkg -i ../moblin-image-creator_0.45_all.deb</blockquote><p></p></div></blockquote><p>And then run :<br /><br /></p><blockquote><div class="incqbox"><p></p><blockquote>sudo image-creator</blockquote><p></p></div></blockquote><p>Steps.<br /></p><blockquote><div class="incqbox"><p>1. Create a platform project with type eeepc-i386-ubuntu-hardy-ppa<br />2. Create a target with fsets: eeepc-701-config and ubuntu-desktop . (You may also choose netbook-remix , but the default config for Gnome is not ready. Will add later)<br />3. Build image by press "Live RW USB" or "Install USB" button.<br />4. Press "Write USB Image" for the image generated.</p></div></blockquote><blockquote><div class="incqbox"><p>Default user name : ume<br />Default password : (empty, just press enter when it prompt for password)</p></div></blockquote><p>Customization:<br /><br />You may customize the image by press the "Terminal" button, it will create a chroot environment and you may install any package you want. I would suggest to remove "tracker" package from your image.<br /></p><blockquote><div class="incqbox"><p>apt-get remove tracker</p></div></blockquote><p><strong>Remark</strong><br /><br />Test your image with "Live RW USB" is safe , as it won't touch the SSD. But if you choice to create a "Install USB" image. It will format your SSD without any notice!</p><p><span style="font-weight: bold;">Related pots:</span></p><h3 class="post-title entry-title"> </h3><ul><li><a href="http://benlau-linux.blogspot.com/2009/08/moblin-image-creator-for-ubuntu-904.html">Moblin Image Creator for Ubuntu 9.04</a></li></ul><h3 class="post-title entry-title"> </h3> <em></em>Ben Lauhttp://www.blogger.com/profile/13549445374416989042noreply@blogger.com1tag:blogger.com,1999:blog-5700861266266594679.post-72812956625591925932008-07-26T09:18:00.000-07:002008-12-10T02:31:05.092-08:00Ubuntu Netbook Remix quick installation in EeePC platformIf you have tried to install Netbook remix in your EeePC , you probably know that after the installation of packages, it take few more steps to adjust gnome environment to fit for the UME launcher. In case that you need an extra account , or reinstall the system , you have to do it again.<br /><br />In order to simplify the process, I have made a package which did the configuration , so that you don't need to set gnome for netbook remix environment:<br /><br />Source code :<div class="incqbox"><p></p><blockquote>https://code.launchpad.net/~benlau/ubuntu-eeepc-config/trunk</blockquote><p></p><p></p></div><p>Installation (include netbook remix):<br /><br />Add the lines below into source list:<br /></p><p></p><blockquote>deb http://ppa.launchpad.net/netbook-remix-team/ubuntu hardy main<br />deb-src http://ppa.launchpad.net/netbook-remix-team/ubuntu hardy main<br />deb http://ppa.launchpad.net/benlau/ubuntu hardy main<span><span><br />deb-src http://ppa.launchpad.net/benlau/ubuntu hardy main</span></span></blockquote><span><span></span></span><p></p><blockquote><div class="incqbox"><blockquote></blockquote><p></p></div></blockquote><p>then<br /></p><p></p><blockquote>sudo apt-get update<br />sudo apt-get install go-home-applet human-netbook-theme maximus ume-launcher window-picker-applet eeepc-netbook-remix-config</blockquote><p></p><blockquote><div class="incqbox"><p></p></div></blockquote><p>Newly created account would use netbook remix environment automatically. For existing account , it take one more step to complete the installation . (<strong>Warning! It will delete gnome's bottom panel and remove all of the applet in your top panel</strong>)<br /><br />Type the following commands in your terminal:<br /></p><blockquote><div class="incqbox"><p>gconftool --recursive-unset /apps/panel<br />gconftool --recursive-unset /desktop/gnome/applications/window_manager</p></div></blockquote>Then restart gnome. Netbook remix will be running on your machine.<br /><br /><div style="text-align: center;"><a aiotarget="false" aiotitle="" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxBz3-4RabVTpPhjYmKEaIPZnxBciQJY6fkpOSfHNd16oxe6GqMEPfsR_AygWeH0p5YCi4d0X-VyQVsgnElG1bV8YyzBWFGruwJTtAT7zZh3IczFJ5Fg8QTFMlu_usbDw-kDfZKNwJA_w/s1600-h/Screenshot-Home.png"><img style="cursor: pointer;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxBz3-4RabVTpPhjYmKEaIPZnxBciQJY6fkpOSfHNd16oxe6GqMEPfsR_AygWeH0p5YCi4d0X-VyQVsgnElG1bV8YyzBWFGruwJTtAT7zZh3IczFJ5Fg8QTFMlu_usbDw-kDfZKNwJA_w/s320/Screenshot-Home.png" alt="" id="BLOGGER_PHOTO_ID_5227349657958927314" border="0" /></a><br /></div><br /><p>Reference:<br /><a href="http://forum.eeeuser.com/viewtopic.php?id=35526" target="_blank">http://forum.eeeuser.com/viewtopic.php?id=35526</a></p>Ben Lauhttp://www.blogger.com/profile/13549445374416989042noreply@blogger.com0