Thursday, December 18, 2014
Single-deckers on KMB 87K
A single-deck Volvo B7RLE (AVC56 RG7354) is seen KMB 87K today.
On another day, another Volvo B7RLE AVC27 (PH381) is also spotted.
How, even Scania K230UB also comes to serve 87K (ASC25 PB7069).
Monday, December 1, 2014
To find the files which appear in both file lists
This problem is always encountered in file processing, but in linux, the solution is really simple.
Firstly, sort the file lists
sort file_list_1 > sorted_list_1
sort file_list_2 > sorted_list_2
Then
comm -12 sorted_list_1 sorted_list_2
According to the help page of comm, what the operation is doing:
Usage: comm [OPTION]... FILE1 FILE2
Compare sorted files FILE1 and FILE2 line by line.
With no options, produce three-column output. Column one contains
lines unique to FILE1, column two contains lines unique to FILE2,
and column three contains lines common to both files.
-1 suppress column 1 (lines unique to FILE1)
-2 suppress column 2 (lines unique to FILE2)
-3 suppress column 3 (lines that appear in both files)
...
Wonderful.
Firstly, sort the file lists
sort file_list_1 > sorted_list_1
sort file_list_2 > sorted_list_2
Then
comm -12 sorted_list_1 sorted_list_2
According to the help page of comm, what the operation is doing:
Usage: comm [OPTION]... FILE1 FILE2
Compare sorted files FILE1 and FILE2 line by line.
With no options, produce three-column output. Column one contains
lines unique to FILE1, column two contains lines unique to FILE2,
and column three contains lines common to both files.
-1 suppress column 1 (lines unique to FILE1)
-2 suppress column 2 (lines unique to FILE2)
-3 suppress column 3 (lines that appear in both files)
...
Wonderful.
Monday, November 17, 2014
On running legacy audio driver (oss) on Fedora 20 (for running wavesurfer with alsa-oss)
wavesurfer (http://www.speech.kth.se/wavesurfer/) is a popular tool for speech scientists to perform speech analysis. However, it uses the old OSS driver for sound output.
Although there is alsa-oss for compatibility, alsa-oss has been obsoleted since Fedora 20 due to no maintainer.
Therefore, in order to make wavesurfer work again, at least play sound, we need to compile alsa-oss by ourselves.
Firstly install the necessary libraries. Since wavesurfer is 32-bit software, we also install the 32-bit version of the libraries.
sudo yum install alsa-lib-devel
sudo yum install alsa-lib-devel.i686
sudo yum install alsa-plugin-pulseaudio.i686
Download alsa-oss from
http://www.alsa-project.org/main/index.php/Download
and compiles
sudo ./configure
sudo make
sudo make install
And runs wavesurfer like this
aoss wavesurfer
Although there is alsa-oss for compatibility, alsa-oss has been obsoleted since Fedora 20 due to no maintainer.
Therefore, in order to make wavesurfer work again, at least play sound, we need to compile alsa-oss by ourselves.
Firstly install the necessary libraries. Since wavesurfer is 32-bit software, we also install the 32-bit version of the libraries.
sudo yum install alsa-lib-devel
sudo yum install alsa-lib-devel.i686
sudo yum install alsa-plugin-pulseaudio.i686
sudo yum install alsa-plugin-pulseaudio
Download alsa-oss from
http://www.alsa-project.org/main/index.php/Download
and compiles
sudo ./configure
sudo make
sudo make install
And runs wavesurfer like this
aoss wavesurfer
Wednesday, November 12, 2014
More on electric buses in CUHK
Finally, I took photos of all the two buses and took a ride on them. Honest speaking, in such a short ride (less than 5 minutes), it is hard to distinguish any performance difference between electric buses and conventional buses.
Wednesday, October 29, 2014
A meeting with Leyland Olympian Training Bus
Location:
赤泥坪
Tuesday, October 14, 2014
Electrical Bus in the Chinese University of Hong Kong
Wuzhoulong FDG6102EVG returns to CUHK for service. This is not a low-floor bus, but has air-conditioning.
Saturday, September 6, 2014
Installing the HTK Speech Recognition toolkit on 64-bit Ubuntu
When installing the HTK Speech Recognition toolkit on 64-bit Ubuntu, the following packages are needed.
sudo apt-get install libc6-dev-i386
sudo apt-get install libx11-dev:i386 libx11-dev
Then, just go
./configure
make all
sudo make install
sudo apt-get install libc6-dev-i386
sudo apt-get install libx11-dev:i386 libx11-dev
Then, just go
./configure
make all
sudo make install
Sunday, August 31, 2014
Solution to "Cannot display Asian (Chinese, Japanese, Korean) characters in Google Chrome title bar, address bar and tabs 解決 Google Chrome 用戶介面無法顯示中文問題
Works on Ubuntu 14.04
- Go to /etc/fonts/conf.d
- Remove any of the *.conf entries for the Google Droid font (in my case 65-droid-sans-fallback.conf 65-droid-sans-fonts.conf)
mv /etc/fonts/conf.d/65-droid-sans-fallback.conf /etc/fonts/conf.d/65-droid-sans-fallback.conf.oldmv /etc/fonts/conf.d/65-droid-sans-fonts.conf /etc/fonts/conf.d/65-droid-sans-fallback.conf.old - Update fontconfig fc-cache -f -r
Reference
Friday, August 29, 2014
To copy everything (including soft and hard symbolic links) with rsync, from remote host to local host, with linux
To copy everything (including soft and hard symbolic links) with rsync, from remote host to local host, with Linux
a -- include soft symbolic link
H -- include hard symbolic link
v -- verbose
z -- compression
rsync -azHv user@remotehost:/some/path/to/folder /some/local/destination
a -- include soft symbolic link
H -- include hard symbolic link
v -- verbose
z -- compression
Sunday, August 10, 2014
Leyland Albion EV55CL & EVK41L -- The last single-decker bus without air-conditioning of KMB
On an exhibition outside Hong Kong Museum of History
BM 248, running on 64K from Tai Po Train Station to Yuen Long
BM 248, running on 64K from Tai Po Train Station to Yuen Long
Labels:
hkbus,
hong kong history,
KMB,
Leyland,
non air-conditioned,
old bus,
singe-decker
More on Daimler A outside Hong Kong Museum of History (丹拿A型)
Monday, August 4, 2014
Volvo Olympian 10.5m Non-AC in Singapore
I took this photo on Summer 2011. This bus was serving route 91 in SBS. If my information is correct, the entire model has been retired.
Friday, June 27, 2014
往太平山的途上
我來到了羅東的竹林車站,登上了往林場的火車。
那是一輛蒸汽機車,後面還有綠色的車箱。
旁邊的機車還拉著木材。
火車開動了,
經過了一片片的蔥田,
經過了一個平交道,
終於來到了天送埤站。
遙望著背後的太平山。
車站還是六十年代的樣子,
宜蘭站天送埤的模型
竹林車站:羅東羅東林業文化園區
羅東火車站步行15分鐘
天送埤:宜蘭三星鄉
Location:
266台灣宜蘭縣三星鄉天送埤
Friday, June 6, 2014
An advertisement introducing Dennis Dart SLF from Kowloon Motor Bus in Hong Kong (1996-2014)
Dated back to 1996, this advertisement introduced the first type of wheel-chair accessible bus in Hong Kong, Dennis Dart SLF. Since then, the HK bus services had entered the era of wheel-chair accessible. Some of the first batch were sold to the bus company of Park Island. This batch begins to retire in 2014.
Wednesday, June 4, 2014
Secure Copy (scp) from remote site to local host
To copy file foo.txt from remote host to localhost during ssh session:
scp foo.txt username@ip_address:/some/remote/directory
scp foo.txt username@ip_address:/some/remote/directory
Monday, May 19, 2014
No dropbox after upgrading Ubuntu 14.04 LTS with KDE desktop?
1. Uninstall "nautilus-dropbox"
sudo apt-get remove nautilus-dropbox
2. Install the latest dropbox client from dropbox's page
https://www.dropbox.com/install?os=lnx
sudo apt-get remove nautilus-dropbox
2. Install the latest dropbox client from dropbox's page
https://www.dropbox.com/install?os=lnx
Monday, May 5, 2014
Patching vmware player 6 on kernel 3.13 (Ubuntu 14.04)
The vmnet module needs patch.
Just follow this link and worked.
http://ping8888.com/2013/12/13/vmware-modules-kernel-3-13/
Just follow this link and worked.
http://ping8888.com/2013/12/13/vmware-modules-kernel-3-13/
Monday, April 21, 2014
Subscribe to:
Posts (Atom)