Monthly Archives: June 2011

Java: Loading a SVG into a BufferedImage

Unfortunately Java does not support SVG by default. But there is a great Apache Project aiming just for this purpose called batik. Although the reference and documentation is pretty well, it does not cover loading an SVG and just saving … Continue reading

Posted in Java | Tagged , , , , | 1 Comment

HOWTO: Using JUnit with Eclipse with git hooks

This HOWTO shows using the git pre-commit hook to auto-run all JUnit tests before committing. This can be useful if you have a strict policy that no commit should fail the unit-test suite or if you just want to make … Continue reading

Posted in Java | Tagged , , , , , , | Leave a comment

Java needs operator overloading

I like Java but I can’t understand why it still doesn’t have operator overloading. Everyday operator overloading Every Java object has two (and more) methods: String toString(): Returns a string representation of the object. boolean equals(Object obj): Indicates whether some … Continue reading

Posted in Java | Tagged , , | 4 Comments

Be careful when using post-increment++

Have a look at the following code to see a sample (dangerous) use of the post increment operator (i++). #include <iostream>   class A { public: A() { i=0; f(i++); } void f(int p) { std::cout << "p=" << p … Continue reading

Posted in C++ | Tagged , , , , | Leave a comment

Should we really trust Apple?

The latest news is all about the Cloud. I’d like to quote one of my favorite Linux developers: Personally I trust some cloud services but only because those companies have never betrayed my trust. But Apple? Should we really trust … Continue reading

Posted in Uncategorized | Tagged , , , | Leave a comment

git’s missing features

Git is probably one of the best innovations (regarding Software Development) of the last 5 years. Although it was a really difficult to use software at the beginning, its usability has improved. But it still lacks some features (and some … Continue reading

Posted in git, Uncategorized | Tagged , , , , | Leave a comment

String to int argc, char** argv

I’ve recently needed a simple command line string parser, which does some basic things. Nothing special. It’s not 100% compatible with Linux or Windows, but should work for most cases. What it does: parsing std::string to std::vector parsing std::string to … Continue reading

Posted in C++ | Tagged , , , , , | Leave a comment

CommandLineToArgvW weirdness

Windows has a really weird behaviour for CommandLineToArgvW or it’s directly argc/argv parsing. If you have a command line string with multiple ” in a row, it’s count is divided by three. So for example foo”"”bar is encoded to foo”bar. … Continue reading

Posted in C, C++, Coding | Tagged , , , | Leave a comment