Here is a chunk of Scala code for getting lat/lon coordinates of geographical locations (cities or villages) using the wonderful geonames.org webservice which allows to search for geo entities by name. The getCoords() method returns a triple of (resolved entity name, lat, lon). The countryCode parameter is optional and will limit the search [...]
The question persists and indeed grows whether the computer will make it easier or harder for human beings to know who they really are, to identify their real problems, to respond more fully to beauty, to place adequate value on life, and to make their world safer than it now is.
Norman Cousins, “The Poet [...]
This weekend the weather was not that great so I spent it at home. Also my laptop almost run out of disk space, so I decided to do something about it. I had 50 Gb of photos in my Picasa albums (it’s because I mostly shoot RAW, I guess) which I always wanted to archive [...]
If you use Subclipse, switching to another repository in a local working copy can be pain in the ass, because Subclipse (and I think svn itself) only allows to change the path of the repository if it’s still in the same repository. I had to change the path from http://.. to https://.. and couldn’t do [...]
John Resig released a port of the Processing language to JavaScript. The demos are very inspiring.
After 8 months of development of a new project with extensive use of Hibernate I can now tell about my experiences with it. In general, Hibernate is a very useful tool. It saves a lot of time, because you don’t have to write SQL queries. If you make changes, you usually don’t have to rewrite [...]
The CGVis project, our visualization tool for multidimensional data, is finally open-sourced. Hurrrah!
At the Grazer Linuxtage I liked most the Armin Ronacher’s talk about Werkzeug which is a Python library for building web applications that doesn’t limit you in the way you build your web app (like many of the existing frameworks do). Werkzeug is rather a handy set of tools [...]
I didn’t know that it’s so simple to make directory aliases on Windows 2000+. There is an undocumented utility for it: linkd.exe (part of Windows Server Resource Kit), which is roughly equivalent to ln -d in UNIX. So you can write:
LINKD Docs C:\Documents and Settings\Ilya\My Documents
And voila! You have now C:\Docs [...]
If you need to render a tree-like structure here’s a way of implementing recursion in JSP/JSTL:
${node.title} <div class="children"> <c:forEach var="node" items="${node.children}"> <c:set var="node" value="${node}" scope="request"/> <jsp:include page="node.jsp"/> </c:forEach> </div>
The tricky thing is that when you use jsp:include (and for recursion you have to use the dynamic inclusion), normally, you loose all the variables [...]
I needed to write a script which runs on the server, gets daily statistics from our rolling log files and sends them by email. The log is splitted into 64Mb files and the total size is limited by 1GB. I didn’t want to parse the whole gigabyte of logs, so I decided to start from [...]
If you make a web application that supports several languages with Spring you are definitely familiar with the handy locale resolvers Spring provides. Unfortunately, none of them allows to restrict the number of locales that can be set. We needed such restriction, because some of our database queries depended on the locale. So I wrote [...]
Few days ago we found out that passing in SQL parameters to a PreparedStatement can affect query optimization when we ran into a problem querying the database from our web app. We constantly got the following error from SQL Server: Adding a value to a ‘datetime’ column caused overflow. In the WHERE clause of the [...]

