Category: Code

C++ String to Int

In this post I will compare the following methods for parsing a string into an integer in C++: Manually atoi() strtol() sscanf() std::stoi (C++11 only) std::istringstream Boost.LexicalCast Boost.LexicalCast with C locale Boost.Spirit.Qi Boost.Coerce But first lets look at the requirements … Continue reading

Posted in Code

Improving hq2x with Alpha Support

Hqx is a family of pixel-art image scaling algorithms that can be used to scale an image by 2, 3 or 4 times. The results in general are very good, but the original algorithms do not handle images with an … Continue reading

Posted in Code

Disable indexing in XCode 4 for better performance

This is a neat trick that I learnt from Stack Overflow to significantly improve the performance and stability of XCode 4. Simply run the following and restart XCode 4: defaults write com.apple.dt.XCode IDEIndexDisable 1 RAM usage will drop significantly (I … Continue reading

Posted in Code

XCode 4 and Mac Mini RAM upgrade

If you’re an iOS developer, you’ve probably recently upgraded to XCode 4. If you’re like me and are using a cheap Mac Mini for your development, you may be struggling with performance issues. Fortunately there is a relatively cheap fix, … Continue reading

Posted in Code