Reha

Arzular yol yemeğim, maksadım yolum benim
Hedefim bilinmeyen, bilinmeyen yerim benim
Cebir’in hastalığından giderim sonsuza doğru
Bana sonsuz bile yetmez ki reha adım benim

Slow right-click context menu fix

I was facing this problem for a long time and even Microsoft support guys didn’t know why it was happening after messing with my PC using remote assistant many times. The problem persisted even after I upgraded to Windows 10. Anyway here is the fix to the slow right-click menu in my case:

Remove the following from the registry:

HKEY_CLASSES_ROOT\Directory\Background\shellex\ContextMenuHandlers\igfxcui

Taken from this link



Zihnim Acıyor

Hastalıkmış dediler, hiç olamazmiş dediler * Çaresi sakin olup bir nefes almak dediler
Deli ay gordu nefes aklına hiç gelmedi amma * Kafir olmak sonu sonzuzca yakılmak dediler
Kuklaci zihnini oynatti konuşturdu düşürdü * Gokyüzünden yaratan herkesi izler dediler
Başka dillerde konuştukları belli, o deli * Tapinaklarda senemlerle yok olmak dediler
Ey çiçek yüzlü bu şiirin sağı başka solu başka * Kafir olmak sonu sonzuzca yakılmak dediler

Handling Duplicate Records in SQL

This happens a lot (to me at least 🙂 ) so I decided to make a note here!

Following SQL script will allow you to SELECT duplicate records in a given table.

SELECT * FROM my_table WHERE some_field IN (SELECT some_field FROM my_table GROUP BY some_field HAVING COUNT(some_field) > 1)

This code actually finds all the records in a table named “my_table” which have the same value for a field (or column) named “some_field” in more than 1 records which is specified in the final clause COUNT(some_field) > 1

To delete (remove) duplicate records you only need to change “SELECT *” to “DELETE”.

DELETE FROM my_table WHERE some_field IN (SELECT some_field FROM my_table GROUP BY some_field HAVING COUNT(some_field) > 1)

Ses

O belanın eli her dem eteğinden çekerek gitme diyor
Sesi yüksek, kulağı kar, gözü kör, dur be diyor
Yüzüne bakma melek, durma, uzaklaş, sonu yok
Bırak arkanda, unut, git, sana yol gel be diyor

Add Administrator Level Privileges to Your Qt Program

Include the following in your project’s PRO file to have Administrator level privileges added to your program.

Following should be noted while using this:
1. This will only work if you are using a Microsoft Visual C++ compiler and Windows OS
2. Your OS might ask you for Administrator password or confirmation when you try to run your executable. This depends on how your OS is configured.
3. Qt Creator needs to be started as Administrator in order to run a program (for debugging) that has the following lines in its PRO file.

win32-msvc* {
    CONFIG += embed_manifest_exe
    QMAKE_LFLAGS_WINDOWS += $$quote( /MANIFESTUAC:\"level=\'requireAdministrator\' uiAccess=\'false\'\" )
}


How to build Qt 5.5 Static Libraries using any Microsoft Visual C++ Compiler

Following steps will help you with building Qt 5.5 Static Libraries with any MSVC Compiler. I have used MSVC2010 in this example but it should be the same for any compiler version from 2005 to 2015 (Visual Studio 2005 (8.0), VC++ 14.0)

Note that building Qt like this will remove all dependencies meaning there won’t be any need for MSVC dlls)

Continue reading “How to build Qt 5.5 Static Libraries using any Microsoft Visual C++ Compiler”

Introduction to Support Vector Machines OpenCV 3.0.0 Example (Working version)

Following is the slightly modified version of the example for “Introduction to Support Vector Machines” that is working with OpenCV v.3.0.0 (Current version on OpenCV website only works with version 2.4.X)

I assume that you have installed OpenCV 3.0.0 on your computer successfully and you know how to add library references etc. If you have any questions please put a comment or use the “Contact Me” page.

Continue reading “Introduction to Support Vector Machines OpenCV 3.0.0 Example (Working version)”

Add version information to your executables and libraries in Qt

Executable files have an embedded version information which can be found by checking their properties. It includes version number, comments, company info etc. As developer you sometimes need to leave a scratch on the EXE files you are providing to your customers in order to track what you have and what your customers have.

Continue reading “Add version information to your executables and libraries in Qt”

How to use Windows API in Qt (A simple example)

Qt is a cross-platform framework that encapsulates API across many Operating Systems but one always faces situations in which he/she needs to access and use OS specific capabilities. Windows API is a massive collection of interfaces that allow a programmer to use and include Windows features in their programs.  Below is a simple example on how to use Windows API in Qt.

Let’s say we want to use GetSystemTime function in our Qt program. Searching Google for “GetSystemTime API” you’ll get the API Documentation from MSDN website. Parameters and return type values should be obvious:

Continue reading “How to use Windows API in Qt (A simple example)”