Programming

Extended Slices in Python

This is a reason why you should develop a program in Python. Python's syntax is one of the most simple and powerful grammar on the earth. I would like to introduce you to the extended slices.

>>> L = range(10)
>>> L
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]

This year is a good year for programmers around the world since there are several specific search engine dedicated to source code, especially open sources. I don't have much chance to try this kind of technology so I will talk about only the top two services: Krugle and .

How does IP to Country module work

I got a request to write a brief explanation how IP to Country module work. I supposed to provide a comprehensive documentation at howforge.com but there was no time to do that. The fact is that I completely forgot until got this reminder. Now I have decided to write something useful as his request.

One of todo in my mind (and maybe other content providers) is useful and comprehensive related links to somewhere automatically. To make it available in Drupal, I wrote Related Contents Block a while ago. Anyway, it only limited to only local contents. I hope to find better solution to make it more compresive. Eventually, I found .

I'm working on geographically distributed computing aka grid computing. Since there are so many resources on this planet, it would be beautiful to see them on the earth graphically. offers this kind of applications could be implemented in a few hours using or . All you need to know are pairs of latitude and longitude to identify where they are. Well, I also want to show the map in full-screen for easily navigating around the globe. In other words, it should resize itself according to browser size. Google doesn't tell me how to do it. Fortunately, I found it!

How to call XML-RPC in PHP

This is a brief tutorial for calling XML-RPC function in PHP. There are so many XML-RPC implementation in PHP but I will use XML-RPC for PHP 2.0 because it is purely written in PHP.

Let's go to the point. First of all, you have to create an XML-RPC client instance using xmlrpc_client().

$c = new xmlrpc_client('http://192.168.0.1:12345/RPC2');