Warning: Declaration of LJXP_Walker_Category_Checklist::start_lvl(&$output, $depth, $args) should be compatible with Walker::start_lvl(&$output, $depth = 0, $args = Array) in /home/victorsergienko/victorsergienko.com/wp-content/plugins/lj-xp/lj-xp-options.php on line 796

Warning: Declaration of LJXP_Walker_Category_Checklist::end_lvl(&$output, $depth, $args) should be compatible with Walker::end_lvl(&$output, $depth = 0, $args = Array) in /home/victorsergienko/victorsergienko.com/wp-content/plugins/lj-xp/lj-xp-options.php on line 796

Warning: Declaration of LJXP_Walker_Category_Checklist::start_el(&$output, $category, $depth, $args) should be compatible with Walker::start_el(&$output, $object, $depth = 0, $args = Array, $current_object_id = 0) in /home/victorsergienko/victorsergienko.com/wp-content/plugins/lj-xp/lj-xp-options.php on line 796

Warning: Declaration of LJXP_Walker_Category_Checklist::end_el(&$output, $category, $depth, $args) should be compatible with Walker::end_el(&$output, $object, $depth = 0, $args = Array) in /home/victorsergienko/victorsergienko.com/wp-content/plugins/lj-xp/lj-xp-options.php on line 796

Warning: Cannot modify header information - headers already sent by (output started at /home/victorsergienko/victorsergienko.com/wp-content/plugins/lj-xp/lj-xp-options.php:796) in /home/victorsergienko/victorsergienko.com/wp-content/plugins/wp-super-cache/wp-cache-phase2.php on line 60
code name / blog
Skip to content

Category Archives: blog

Rendering QR codes to SVG


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


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


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


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


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


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


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?


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


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


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


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


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 […]