Archive for the ‘Articles in English’ Category.

Excluding syntax for folder synchronization in Unreal Commander

Unreal Commander is one of the best file manager software which is free of charge. When you want to synchronize two directories with considering only the specified file types, you will need to define filter string. “*.*” means to compare all files; “*.txt” means to compare also the text file. However, how can you compare any file except for “*.exe”?

Easy! Just add a “|” before the file types you want to exclude as show in the following picture.

Continue reading ‘Excluding syntax for folder synchronization in Unreal Commander’ »

Selection of GUI toolkits

To select a toolkit for GUI programming is something like to select a bottle of wine. Only you know your favorites.  Here are mine.

1. For a program need various feature, like networking, fancy looking, I choose QT. It is cross-platform and can do almost anything for you, except for going to the cinema with you. It also provides a nice-looking IDE. However, you will feel sometime it is overkill for a simple task program.

2. A light-weight choice of GUI toolkit is FLTK. It is designed to be small and modular enough to be statically linked. In another word, light enough and easy distribution. It has been developed for many years, mature and stable.

Continue reading ‘Selection of GUI toolkits’ »

What do you see after Osama Bin Laden’s death

He, the most wanted one, was killed by US army yesterday. It’s said ‘Justice was finally done’.

I saw American people celebrated on squares and in stadiums, releasing their joy of killing an enemy or the fulfilled justice.

However, this made me think of a cycle of revenge. Now Americans killed their man. Now it is turn for their men to revenge, and this is anticipated (see the news).

Continue reading ‘What do you see after Osama Bin Laden’s death’ »

Wii video format

There are different information flying around on the internet about the supported video format. Even on the official Nintendo  website, the information is not fully clear. The reason I guess is related to the updating of the system. I’ll let you know the truth, after my own experiments.

Continue reading ‘Wii video format’ »

Python initial script for Qtiplot

OK, even after reading the handbook a few times, it is not very clear which python file is the initial script for Qtiplot. It is important to know if you want to extend Qtiplot with python. After checking all the default python files in the Qtiplot installation path, I found qtiplotrc.py should be the one, although a smarter guy would have realized this from its name. You could import your own Python module in this startup file and enjoy them right after entering Qtiplot.

History expansion in depth

History Expansion

History expansions introduce words from the history list into the input stream, making it easy to repeat commands, insert the arguments to a previous command into the current input line, or fix errors in previous commands quickly.

History expansion takes place in two parts. The first is to determine which line from the history list should be used during substitution. The second is to select portions of that line for inclusion into the current one.

Continue reading ‘History expansion in depth’ »

Animation with matplotlib

A demo program showing the way to make animation with matplotlib.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# A demo for animation with matplotlib
# Written by Ting Li (Dr.Ting.Li at gmail.com)
# 2010-09-10
# Ref: http://www.scipy.org/Cookbook/Matplotlib/Animations
import numpy as np
import time
import matplotlib
matplotlib.use('WXAgg') #before import pylab, choose the GUI backend
#It can also be done while calling this script from command line:
#>>> python animation.py -dWXAgg
#Other backends are: valid strings are ['ps', 'Qt4Agg', 'GTK', 'GTKAgg', 'svg',
# 'agg', 'cairo', 'MacOSX', 'GTKCairo', 'WXAgg', 'TkAgg', 'QtAgg', 'FltkAgg',
# 'pdf', 'CocoaAgg', 'emf', 'gdk', 'template', 'WX']
from pylab import *

ion() #a must, into interactive mode

 <a href="http://9rivers.linkka.com/2010/09/11/animation-with-matplotlib/#more-561" class="more-link"><small>Continue reading &#8216;Animation with matplotlib&#8217; &raquo;</small></a>

A Zotero style for ACS references with titles

Zotero, the must-have reference manager for scientists, supports various bibliography styles. This is benefited from the CSL (citation style language), which is an open XML standard for citations and bibliographies. Since Zotero is implemented as a Firefox addon, it naturally supports search and grab references from the internet, which is very convenient and better than some other stand-alone reference managers.

Zotero has a CSL editor. It can be invoked by entering “chrome://zotero/content/tools/csledit.xul” as the url in Firefox. Here has a step-by-step tutorial on how to create a new csl style. There is also a GUI program which can edit and create a CSL file, it is CSLedit.

Continue reading ‘A Zotero style for ACS references with titles’ »

Keyboard shortcut to insert euqations

I didn’t know this before I saw this post. The shortcut is ‘Alt+=’. That’s simple!

Uncompress tar to specific directory + Other tar/untar tricks

There is a ‘-C’ option allow you to do this. However, it can fail in some situation. There are also some posts online that report this option does not work. If you have that problem, maybe you could try the solution here.

Here is my experience, on Cygwin (I didn’t test this on other systems)

Continue reading ‘Uncompress tar to specific directory + Other tar/untar tricks’ »