Using Python as the most powerful calculator
Once I was looking for “expression calculator”. The expression calculator is different from normal calculator like calc.exe, which cannot use variable freely as algebra. But the expression calculator, we can predefine a variable with a value, then evaluate the variables in algebraic expression. It is very useful. My favourite expression calculator is SpeedCrunch.
Then, recently, I want to test a math function in SpeedCrunch, but this is impossible, since expression calculator can only define the variable, but not define a function. I remembered the title of Python Tutorial, “Using Python as a Calculator”. Yes, expression calculator, with ability to define function, then Python will be the one.
Add another Google Search plugin to Linux Mint Firefox
When I run Firefox of Linux Mint, using the default Google Search from the search bar, it shows an old fashion search result. We can add search engine plugin manually. When we visit Facebook, Youtube, etc, there is a highlight on the search bar icon, click it we can add our own search engine. However, when we visit Google Search, it does not highlight the icon. Then, how?
- Visit searchplugins.net.
- Enter " http://www.google.com/#q=TEST " (without quotes) for Search URL
- Enter “My Google” (without quotes), or whatever name you want, but not the name already existed in Firefox search engines
- Click “Create Plugin”
- Then, you will see that your search bar icon is highlighted.
- Add the search engine plugin to your Firefox.
With that, we can use the new fashioned Google Search engine in Linux Mint.
Comic Downloader alpha stage
I wrote several Greasemonkey userscripts. However, the Javascript has its own limitation for security reason, especially when a website uses scripts from cross domain. As a result, Javascript cannot get the information, and my userscript fails to work. Therefore, I start another project, in order to solve the cross domain problem using Python, and targeted on Linux (Ubuntu).
The current development stage is alpha, and targeted only on one website, since the other websites I frequently visit still work with Greasemonkey userscript. The alpha stage of Comic Downloader is currently work in command-line. GUI feature will be added in future with PyGTK. Currently, the command-line is able to solve my problem for offline comic reading.
Running Mono (C#) pre-compiled by Linux in Windows
Finally, I success to run Mono with GTK# pre-compiled by Linux in Windows.
Firstly, make sure Windows is installed with
With the above installation, one can run the Mono application normally. I failed previously because I didn’t install GTK# for .NET.
However, when I run the application, there is a console window, which is annoyance. Thus, build the Mono application with
C, C++, Java, Python, Mono (C#)
Cross-platform programming language, is still a little bit far away from me. Recently, I ported Prayer Clock to other programming languages. One of the reasons is to learn more programming languages, another reason is trying to solve the cross-platform problem.
C and C++, my most preferred language(s), with the help of GTK+, can perform well in Windows and Linux. But I didn’t tried on Mac OS X. This is because it needs to be compiled on the OS, rather then cross-compilation. That is why, I ported it to Java before. Though Java claims be WORA (write once run anywhere), yet running in different OS might produce “some” problems, such as minimize to system tray in Linux. And, running on Mac OS X also does not minimize to the system tray as expected.
Blog about Linux Mint
There is quite a long time that I do not submit any post. Today, I would like to talk about my experience of using Linux Mint.
Ubuntu, the number 1 open source OS (based on what I know from DistroWatch.com), I used it and I liked it. Because it has about 37000 precompiled packages (Wikipedia). Ubuntu is based on Debian, one of the major distribution just like Red Hat. Then, number 2 is Linux Mint. Linux Mint is based on Ubuntu. That means, from Debian to Ubuntu, from Ubuntu to Linux Mint. One might think that, the parent is better than the child, just like C is better than C++. But if you try to use C++, then you might like it as you like C.
2010 in review
The stats helper monkeys at WordPress.com mulled over how this blog did in 2010, and here’s a high level summary of its overall blog health:

The Blog-Health-o-Meterâ„¢ reads This blog is on fire!.
Crunchy numbers

A helper monkey made this abstract painting, inspired by your stats.
A Boeing 747-400 passenger jet can hold 416 passengers. This blog was viewed about 2,100 times in 2010. That’s about 5 full 747s.
GMail HTML Basic Enhancement in Opera
I just found that Opera 10 can also use Greasemonkey script, but it is actually User JavaScript. Therefore, I tried to use GMail HTML Basic Enhancement. But failed. This is because one needs to enable User JavaScript on HTTPS protocol first.
To use the User JavaScript, first set the folder based on this article, and remember to restart.
Then, at the address bar enter “opera:config”, search for “User JavaScript on HTTPS”, enable it. Yeah!
How to extract zip file which contains filenames with SHIFT_JIS encoding in Ubuntu
If a zip file contains the filenames which are Japanese, the encoding normally is SHIFT_JIS especially Windows. To extract the files, normal “unzip” will not work. 7z is a good solution.
The following commands are done in terminal. Firstly, we need to change the LANG environment variable, because the default LANG is normally UTF-8. Since the filenames are SHIFT_JIS, which is not UTF-8, we need to change it.
[code language=“bash”]LANG=ja_JP # Don’t use UTF-8, use “export” if needed[/code]
Joomla : CakePHP = Windows : Linux GCC
The followings are only my personal opinions.
Joomla!, a very popular CMS (Content Management System). Easy to use, a lot of extensions, free to download. Yet, not all the extensions are free. Some are commercial extensions. Some commercial extensions allow you to download for limited days of trial. Easy to install, easy to use. A lot of people like it.
On the other hand, CakePHP, not a CMS but only a web application framework (I mentioned CakePHP in this post because this is the only web application framework I used, I haven’t tried about CodeIgniter or Ohloh). Comparing CakePHP with Joomla isn’t quite appropriate because they are not same category. But for me, both of them are PHP and used to develop websites.