Setting OPENMODELICALIBRARY environment variable

I had difficulties to set OPENMODELICALIBRARY environment variable in Linux Ubuntu 10.10. The detail of the problem and the solution can be found in this post:
http://www.openmodelica.org/index.php/forum/topic?id=151

The solution is to use setEnvironmentVar(“varname”,”value”). There is also a getEnvironmentVar(“varname”) to extract. And we can check whether it is set using checkSettings().

Fixed watching flash video in ubuntu 10.10

I had difficulty watching Emmaus video lately, and also video in facebook. It shows only white region and nothing else. Strangely, I can watch youtube as usual. Then I checked my flash whether it’s working. The page from adobe shows I have flash installed. After much searching I suspect that it is because ubuntu use gnash for its flash, and not adobe’s version. I checked I have installed adobe flash, so the next thing I did was to use Adobe’s flash instead of gnash one. To do that, I went to terminal and check the update-alternatives version.

cd /etc/alternatives
ls *flash*

It shows The following files:

firefox-flashplugin
mozilla-flashplugin
xulrunner-flashplugin
xulrunner-addons-flashplugin

So now I run update-alternatives:

sudo update-alternatives --config firefox-flashplugin

And then I chose the adobe version as the default plugin. I did that with the others, but I am not sure whether it is needed. But now it works, I can watch the flash video again
 

Word 2007 not display equation properly for fraction

It’s very frustrating, but I finally managed to find the solution. I tried to enter an equation when writing for a journal, and this is what I got when I inserted a fraction. The denominator and the upper part of the numerator is not displayed.

The solution seems to be with the text wrapping rather than the equation or the image itself. To solve this problem, go to “Page Layout” -> “Position” button, and choose “More layout options”, and click “Top and Bottom”. This solves my problem, phew! (prefer LaTeX very much)

UPDATE: I found another solution that allows me to use “in-line with text” wrapping, and that is simply by setting the Style of that paragraph to “Normal”. It seems that the template that I used set the style in such a way that it covers the equation.

Creating 2D/multidimensional list in Python

I found a link that discusses on how to create multi-dimensional list in Python:
http://pyfaq.infogami.com/how-do-i-create-a-multidimensional-list/_comments/4jn5