Code can be lovely!

20 April 2015

avconv is a utility that belongs to Libav project. Similar to its precedent ffmpeg, it supports lots of mainstream encoders and decoders. Here I just put some simple commands as a personal memo and a brief guide.

Install libav-tools via apt-get on your Debian/Ubuntu machines. Note on my Fedora laptop, there is no libav but only the original ffmpeg packages. The command-line options are fairly similar (sometimes even identical). In that case, you only need to substitute ffmpeg for avconv.

31 March 2015

I have worked on this book, Qt 5 Blueprints, since last September. It turns out to be one of greatest experience in my life. :) Now, before the end of March, I’m glad to announce the publication of Qt 5 Blueprints!

I’m sure lots of people out there want to learn how to code in Qt/C++ and/or Qt Quick/QML. Now, you can buy this book directly from Packt Pub, Amazon.co.uk, or Amazon.com, to start building truly cross-platform GUI applications. By cross-platform, I mean even mobile operating systems!

This book is for those developers who are familiar with C++ but not Qt. And because Qt is more like a C-style C++ framework, you don’t need to be an expert of C++. Only basic C++ knowledge is required. Moreover, this book also covers QML application development! For more details, please refer to the book page on Packt Pub.

At last but never the least, if you find any mistakes in the book, please let me know (by contacting Packt Pub). And I’ll do my best to provide following errata.

If it’s 1/1 or 1/2 or 2/2 or whatever, anyway, the first number must be greater than 0, then Firefox is already hardware accelerated. And you don’t need to take following procedures to force-enable it. Otherwise, let’s do a few modifications to force-enable the GPU acceleration in Firefox!

18 November 2014

I’ve been studying in Trinity College Dublin (TCD) for about two months. The master course is very intensive here, which reminds me of the the third undergraduate year in China.

To be honest, I did’t like mathematics at all, especialy those partial equations. What a headache! And how brave I am to study master in the School of Mathematics! Well, that misery was in the past. I mean the math is still difficult for me, it just somehow makes me interested. After all, it doesn’t count as a bad thing.

It’s true that some assignments are very easy. Meanwhile, there is always at least one problem that consumes a lot of time and efforts to figure it out. And that’s good for learning from my point of view. If it’s too easy, then it’s wasting time. While it’s pointless if it’s too hard. Thus, so far so good.

However, being a foreigner is not easy for me. House renting, bins collection service, GNIB card, re-entry visa, water charges application, etc. I even assembled my bed frame and the dining table along with four chairs! Those things will never happen if I stay in China. But that definitely enriches my life, in a way. :D Feels more independent now.

19 April 2014

I purchased an ODROID-U3 (Community Edition) from HardKernel a couple of days ago. It runs much faster than what I expected. Anyway, I’d love to share my experience related to this board. So, here we go. The first chapter: Resize partitions in the microSD card.

Requirement

A functional Linux* device (ODROID-U3 itself doesn’t count)

A microSD card reader

*: Other UNIX-like OS may do the work as well, but I didn’t test it.

Procedures

Let me write the procedures in advance.

Back up the data from microSD card partitions.

Using fdisk to modify the disk partition table.

Make new partitions

Restore the data

Why don’t we just use resize2fs? Because I need to enlarge the first partition whose format is vfat. So I have to move the second partition right, which means changing the second partition’s header. I don’t know how to manage that, so let us just go the old-fashioned way.