Saturday, 11 December 2010

Biomathematics I taught

I had the wonderful opportunity to assist in a biomathematics class.

Most of the Mathematica notebooks are interactive.

It features:
  • A simple linear model of the blood cell lifecycle
  • Linear models for describing population growth: models of Lesli and Levkovitz
  • Linear regression along with an example
  • Simple DNA mutation models: models of Kimura and Jack-Cantor

Rendering Fractal Flames with Mathematica

Here is a project of mine from last summer. It's about rendering Fractal Flames using Mathematica.



Saturday, 13 November 2010

Comparison of e-book formats

I am deeply interested in ebook formats and their natural diversity. Thus, I really liked this article at wikipedia, which discusses quite a few formats in some adequate detail.

Evolution of mobile web standards

I find this image at wikipedia on the evolution of mobile web standards really instructive.

Thursday, 11 November 2010

Html_escape, a.k.a h doesn't escape single quotes

One should always use double quotes for specifying html attributes, if the attribute content comes from outside, as the html_escape helper escapes only double quotes. In other words:

HTML_ESCAPE = { '&' => '&', '>' => '>', '<' => '<', '"' => '"' }

Sunday, 7 November 2010

Digest::MD5.hexdigest produces wrong hash in Rails

I forgot to require the file 'digest/md5', and instead of barking out loud, rails just gave me some wrong hash value. So, shouldn't forget this line, if using MD5:
require 'digest/md5'
 

Friday, 22 October 2010

Prototype + jQuery != trouble

Having to use both Prototype and jQuery in a web app is something quite probable to happen. Trouble comes when both libraries share the global dollar-sign function. There is a remedy: Using jQuery with Other Libraries

Thursday, 21 October 2010

Rails 3: errors.add_to_base

According to the official doc errors.add_to_base has been deprecated in Rails 3 and one should use errors.[:base] << "Msg"

Wednesday, 20 October 2010

Rails 3 escapes every string in <%= %>, so some HTML/Javascript might not work

Rails 3 escapes every string in a <%= %> automatically, i.e. applying the h() helper to it, so there might be some trouble with some hard-coded text constants:

Tuesday, 19 October 2010

A Reader implementation for Java Mobile that supporting more encodings

Java Mobile all in all supports ASCII and UTF-8.
AlbiteStreamReader provides the ability to read characters from other encodings.

java.util.zip for Java Mobile

Well, as I've been working on my ebook reader for the java mobile platform, and had decided upon having ePub as the standard book format for it, I bumped into the problem of decompressing zip files in Java Mobile. Well, thanks to the guys from GNU (and, respectively, their Classpath project) and some minor modifications from me, I've assembled a working version of java.util.zip for Java Mobile.

Random reading for Java Mobile

The lack of the RandomAccessFile class in J2ME's File API is quite a trouble when implementing something more advanced. It's especially true, if one needs to read some binary file in a non-linear fashion. To remedy this I wrote the AlbiteRandomReadingFile API that implements some similar functionality.

Monday, 18 October 2010

Everything seems to be deprecated in Rails 3

I've just built my Rails 2 app, and then it turned out the hosting provider had upgraded to Rails 3 and had dropped Rails 2 support completely.