Skip navigation

Author Archives: Danil Glinenko

Image manipulation in Java

Created a small and simple utility class for myself to be able to perform common operations on images in Java.
Using this class you can load and save images, you’re able to resize images maintaining aspect ratio, you’re able to save jpeg images with specified compression, you can rotate images to any given angle, you can also watermark images.
Hope it’ll save you some time.

Writing a SQL parser

Well… not exactly writing a parser but generating one.
For the task I’ve been working on recently I needed to have (inside my java code) a data model representing database tables, so I could perform data normalization according to it.
“CREATE TABLE” sql statement is a natural fit for representing the data model. The only thing I [...]

dbext.vim cheat sheet

I’ve created a cheat sheet for dbext Vim plugin. Hope somebody may find it useful.
About dbext:
While editing your SQL (and without leaving Vim) you can execute database commands, run queries, display results, and view database objects. dbext understands various programming languages, and can parse and prompt the user for [host] variables and execute the [...]

Today I had this nice idea…

I wanted to implement some simple persistence support for my objects that probably contain at most 5-7 fields and the total number of objects would be at most 20-30. I didn’t want to put database and ORM in place for such a small task.
So I thought I’m going to develop something like:

#persons.properties
name = John
lastName = [...]

Fun with parentheses

Oh… I almost forgot what fun it is to learn functional programming. During one of the semesters in university, we took “Functional programming” course. It was a new world of something that I hadn’t seen before, so unusual, so charming.
That new world of lists and operations on them was something “weird” because it wasn’t similar [...]