Sunday, September 13, 2015

Saturday, December 28, 2013

How to add source highlighting in Blogger

A lot of blogs on Blogger are about programming, computer engineering, computer science or other similar topics. While all these blogs require some form of source code highlighting, adding it to Blogger can be a little bit tricky. This is a short tutorial about how to add SyntaxHighlighter to your blog.

Saturday, August 17, 2013

Wednesday, July 11, 2012

Monday, July 2, 2012

How to use use AllJavadoc class from Weka

Weka framework has a useful tool to generate Javadoc for your classes. It uses information that you provided in the sources to generate appropriate Javadoc automatically. This helps to update Javadoc when you update sources.

Under the cut I'll describe how to use this tool.

Wednesday, June 20, 2012

How to ignore a class in JUnit tests

You may need to ignore a whole class in a test folder, or just a single test in a test case. To do it you should use @Ignore annotation.

This is how you should import it:


To ignore a whole class just add @Ignore annotation to it:

If you do it none of the tests in the ignored class will be called by JUnit. Optionaly you can add a text comment to an ignore annotation:

If you want to ignore only a single test you should write:

or alternatively with text comment:

The other way to ignore a test is to remove @Test annotation. But if you add @Ignore annotation to your test method, JUnit will report that some methods in your test set were ignored and this can be used as a remainder to fix it later.

That's all.
Good luck.

Tuesday, June 12, 2012

How to fix hg error "no tool found to merge"

Hello.

Sometimes merging your changes with changes of other people you may encounter a problem when hg cannot merge a file and displays the following error:

This often happens with binary files, but if it happens with a text file, you are in trouble, because you definitely do not want to merge big files by yourself.
Under the cut I'll show a simple solution for this.