HOWTO post C++ code in Wordpress

Development, Web March 30th, 2006

Generally speaking, Code Autoescape is the most popular plugin to quote source code in Wordpress, which has officially killed some competators. Just wrap the code within “code”block, the plugin would convert the HTML-reserved symbols for you. Unfortunately, it does not handle <<, >> well, while stream operation or template is essentail for the C++ program.

CodeColorizer is an online service that use old-styled HTML tags to auto escape the C++ source code to HTML, and you get free, mandatory bonus, syntax highlighting. However, the “smart” wordpress would eat some tag, so the whole style is messed up with unnecessary bold or italic style decoration.C++2HTML does the same job in advanced manner, The HTML code rendered is XHTML 1.1 compliant, and the users may tune the stylesheet to determine syntax highlight style. That is also the solution used in all C++ Style Study Note.

UPDATE: until recently, I found another Wordpress plugin: code snippet. This plugin claims that they can render more than 50 programming languages powered by GeSHi. I have to disable the WYSIWG editor in order to have more control of the raw HTML code.

I am a “Computer Killer”

Misc March 29th, 2006

I think this is the best conclusion to describe all these computer murder in 2006. Just after the funeral of Dell 700m, the eMachine T2482 also declared its death this morning.

Like the laptop, there is no signal on the monitor suddenly. And I could not boot this machine afterwards. Usually this is caused by the dust, so I clean the house carefully, unfortunately this seems not working this time.

I happened to push the CPU fan, and the computer booted, but one minute later, the screen became black as before. It looked like that I need to push the CPU tightly all the time to have the system run.

Currently, I am working on the Pentium-III machine. The playground may go offline these days. :-(

Playground is setup.

Web March 27th, 2006

The ECE Lab upgraded the computing fascilibites recently, and they dumped all the old computers in the hall way, free to pickup. Last week, I digged into them and managed to collect components from different computers and put them togeter for only one Dell OptiPlex workstation:

  • Pentium-III 1.0GHz
  • 512M PC133 SDRAM
  • 13G Harddisk
  • CD-Writer
  • Zip

I would like to setup this Linux box as my private playground for Zope 3 and Plone.

  • emerge Gentoo
  • emerge Zope, Plone
  • Setup the router to forward the port 80 to this linux box
  • Register one FreeDNS service, and leave the dynIP in the crontab.
  • In DreamHost “Domain Management” tab, forward “http://playground.kunxi.org” to “kunxi.mooo.com”.
  • Wait for about 2-3 hours, and direct your favorite to playground.kunxi.org.

Here is still one problem. Whenever playground.kunxi.org is accessed, it is eventually redirected to kunxi.mooo.com. Is any way to hide the intermediate dynamic domain?

Dead 700m, damn Dell …

Gentoo March 21st, 2006

It is quite sad to announce that I am obliged to stop maintaining Gentoo on 700m, since my Dell Inspiron 700m is dead. It just lost the power without any smoke, smell, and I could not power it on any more. It is highly probable the power module of the motherboard is burned.

  • The price to replace the out-of-warranty motherboard is: $300.
  • 3rd party service varies from $99 – $198 + H.S, depends on how many MOSFETs needs to replace.

It is a pity that I failed to replace the deficient motherboard during the warranty period. The technician of Dell just simply ignored my requests since most of the complaints are quite trivial, and all the symptoms are not easy to reproduce. And Dell’s attitude makes things ever worse.

Review: Kopete 0.11

Desktop March 21st, 2006

Kopete 0.11 is released with KDE 3.5. The most significant improvement is the WebCam support for MSN & Yahoo Messenger. In the Settings | Configure …, a new tab page named “Devices” emerges for the Video device configuration, like this:
Woody in WebCam
However, the video support is not so reliable, it may cause the kopete crash from time to time. It might be interesting to build the debug version of Kopete and locate the bug.

Update: Here is an encrypted MSN Messenger, it might be interesting to implement Kopete plugin as the the cipher/decipher filter for the traffic.