Skip to content

Category Archives: blog

Rendering QR codes to SVG

21-Nov-12

Had a hard time rendering a QR-code to SVG. Drawing simple rect-s didn’t work well, visible gaps appeared between bars. I looked for a SVG QR renderer, but apparently neither zxing nor other libraries have a gapless algorithm. There is an online renderer by Kerem Erkan that uses path tag, but the author is apparently […]

Now on free CDN

11-Apr-12

Thanks to Dreamhost, now running on CloudFlare CDN. WP Super Cache happily supports it. BTW CloudFlare got a free plan, and it’s easy to set up so that it doesn’t interfere: Add a cdn subdomain to your hosting; Add your domain to CloudFlare; On CloudFlare, disable CDN for all subdomains except for cdn. Set up […]

Couple of Grails tricks to remember: reload scaffolding and fieldValue formatting

14-Dec-10

Grails doesn’t reload scaffolding on-the-fly if you change local templates. But you can open a Groovy console inside application and run in it: org.codehaus.groovy.grails.scaffolding.view.     ScaffoldingViewResolver.scaffoldedViews.clear() In order to change default g:fieldValue formatting for, say, BigDecimal, have a CustomEditorRegistrar in your resources.groovy, and register custom PropertyEditor: registry.registerCustomEditor(BigDecimal.class, ‘myProperty’,     new OurBigDecimalEditor(BigDecimal.class))

Prim’s allgorithm in Groovy: inspired by Fortran and Java versions

18-Oct-10

A friend of mine defended Fortran against half-literate coders on an example of Prim’s allgorithm. Good pretext for another language comparison. Let’s see Groovy vs Java vs good old Fortran. Great Fortran implementation Great Java implementation by Bruno R. Preiss, P.Eng. and scientist. Some beginner’s C+ implementation (or is it just a link farm? Whatever). […]

Precise Redmine burndown chart

11-Oct-10

I’m thinking of precise Redmine burdown chart, which is not so simple. It has to build burdown chart for a given sprint (Version in Redmine). It has to account issues added to Version and removed from during the sprint. It, after all, has to account for what is considered “closed” status, which might be one […]

Self-update library for .NET using WiX: DotUpdater

03-Sep-09

Just published a library I created on one of past jobs out of Updater Application Block and WiX’s ClichThrough component. Please meet: DotUpdater It can auto-update an application, just create a RSS feed of updates and Windows Installer (MSI) binaries.

Link Taxonomy Terms to Views in Drupal

07-Aug-09

Imagine a task (actually, quite common), if you have: a nodes (articles, ads, whatever) taxonomy in Drupal, a taxonomy-based url path rewrites, like /monkeys/primates/homosapiens and want to show a block/page View with articles only from current path term (and, maybe, its subterms). It might be a hard time finding out the current term. One could […]

Diff a Micorosoft Office documents inder SVN?

13-Jul-09

In case you, like me, need to compare version of Office documents (under Windows), just know that TortoiseSVN got a pretty set of scripts for that. It works out of box! YES! You can compare Office documents just like plaintext files!. Just tried it and it worked. If you were afraid of trying, like me […]

Grails: mocking domain objects in unit tests

13-Jul-09

We’re trying Grails, Rails-like web application framework for Java. It’s fine, just that Groovy debugger support is, er, imperfect, even in the best Gruoovy IDE – IDEA. And, if you want to unit test, you won’t have fancy domain class methods addTo* – like Customer.addToOrders(). They’re generated by Grails on startup. In order to have […]

“Project Dependencies” of Visual Studio 2008 broken in MSBuild

20-Nov-08

Just dealt with another Visual Studio 2008 “feature”. You can specify all the necessary “Project Dependencies” in Visual Studio, but will get “CSC : error CS0006: Metadata file FooBar.dll could not be found“. Even if your csproj files have correct references to other solution projects, msbuild will fail. Maybe it appears only if project output […]

Algorithmic quiz: check a 3-braces expression

23-Oct-08

I just won a bet for $10 by solving a quiz:
Check the correctness of a braces, brackets and parentheses sequence. The solution should be of linear complexity (to say more, it’s 1-pass).
It’s basically solved in 15 lines, all others being auxiliary. Can you reproduce the algorithm?

IListSource.ContainsListCollection explained

09-Oct-08

Whenever you implement own datasource for .NET GUI binding, you’lll have the choice – whether to implement IList or IListSource. IListSource is a simplistic interface with two members: IList<T> GetList() and bool ContainsListCollection; MSDN help about IListSource.ContainsListCollection states it’s “indicating whether the collection is a collection of IList objects”. MSDN is not true here. If […]