Development

How to display image field inline in Drupal

Drupal is one of the greatest CMS right now. It is possible to build a site in minutes and a few days for customization without changing single line of existing codes. That means upgrading is painless. CCK is very powerful for customizing existing content types such as blog to have inline image per node using image field. However, default behavior is to display the image separately. It is not nice so I have to customize myself.

How to make menu by pure CSS

I was asked to find a solution for making a horizontal dropdown menu in HTML. I don't know how to do it but I'm sure it is possible especially in Firefox. After searching in Google, I found a good tutorial.

How to set socket timeout in Python

BTQueue provides some functions regarding remote access, e.g., wget, wpost and scrape. Anyway, some urls are temporary or even permanent unavailable due to unpredictable reasons. It is necessary to set reasonable timeout for all operations including connect, send and receive.

How to join string professionally in Python

Python provides string module for manipulating given string efficiently including string.join. On the other hand, each string object has join method to act like the separator of given strings. However, I have just found another form of the join in Cookie.py in Python 2.5. For example, below codes are similar.

string.join(['a','b','c'],' ')
' '.join(['a','b','c'])

How to post HTTP request in Python

Once upon a time, I went to attend a conference. The organizer provided wifi access to all attendances which one has to login via web before using this free service. My problem was that I would like to use secure shell. I don't want to browse web. I don't need to start web browser just for logging in. So I wrote a simple and short python script to login automatically.

BTQueue 0.1.4 is coming soon

Eventually, BTQueue is coming very soon. In addition to later information regarding the change of core engine to BitTorrent 4.20.9, I have just created a new branch for changing the core engine to BitTorrent 5.0.7. I am pretty sure that it is possible to add priorities support in short period.