How to Fix Facebook Share No Thumbnail/Description Issue

Sometimes when you share a URL in Facebook you notice that there is no description or thumbnail image in the shared link. This happens mostly because there is no image and/or description in the URL you are trying to share. In order to find out what is missing from the URL’s contents that causes this issue, you can use Facebook’s Sharing Debugger Tool.

Continue reading “How to Fix Facebook Share No Thumbnail/Description Issue”

How to Build OpenCV 2.4.13 Static/Dynamic with MSVC2010

OpenCV 2.4.13 was released just a few days ago and as a tradition I had to check if a static build with Microsoft Visual C++ 2010 (MSVC2010) 32-bit produced any errors or not. Fortunately, everything went quite smoothly (except a few common warnings here and there) and I was able to successfully build it so if you need to build the latest OpenCV release statically using MSVC2010 you can follow the steps below:

Continue reading “How to Build OpenCV 2.4.13 Static/Dynamic with MSVC2010”

How to Reduce Your SQLite Database File Size Using Qt

Below is what I do for clearing and compressing my SQLite database files in Qt. Usually when you delete some entries from a SQLite database, it does not get deleted physically but instead it just gets marked as deleted and is not retrieved in queries. The good thing about this is that it works fast. But the obvious downside is the fact that the free space is not released. To release the space occupied by deleted files you need to do the following:

Continue reading “How to Reduce Your SQLite Database File Size Using Qt”

How to Split a QString by White Spaces

You need to use a QRegExp to achieve this. “\s” means any white space character and “+” means any number of that pattern. So you can use the following line to find any number of consecutive white spaces and split you string:

line.split(QRegExp("\s+"))