[Qt, C++, SQL] – How to work with SQL in C++ and Qt

You can work with SQL queries in Qt and SQL in many different ways, here I will show you how I came up with a working method. To keep things simple, I am not going to use any UI to print or edit queries. It will be just source code and stdout, as a database engine I will use SQLite3.

After you created your project, edit project.pro and locate line:

QT       += core

Modify this line by adding `sql`:

QT       += core sql

Since now, when you compile your project, QtSql module will be linked to the project:

g++ -Wl,-O1 -Wl,-O1,--sort-common,--as-needed,-z,relro -o QtSql main.o   -lQt5Sql -lQt5Core -lpthread

Continue reading

[SQL] – Copy one table from one database to another and replace values in one of the columns

This blog is also available in .onion domain. Both blogs have different databases, DB users and passwords, different WordPress configurations, and as a result, they have different data in DB column.

After publishing a new post here, I do not want to manually copy posts from here to there and I want images from b.agilob.net to be available in .onion to avoid any clearnet connections. To do so, the content of each post must be scanned for ‘http://b.agilob.net/‘ and this string must be replaced with ‘http://agiloblulimjeqlq.onion/‘.

Continue reading

Use clang as default compiler for Qt projects

There are two ways to set clan as your default compiler in Qt-Creator. One way will set LLVM as default in Qt-Creator for you only and the other one will set LLVM as default for your project, so everyone cloning/forking your repo will use clang too. If you want clang as default only for you, go in Qt-Creator to Tools -> Options -> Build & Run -> Kits select your default kit, I have `Desktop` and set Compiler to CLang. Continue reading

Quick µBlock configuration in Firefox

If you are still using AdBlock+ or AdBlock Edge, it’s time to switch to µBlock.

It’s faster, consumes less memory, uses less CPU, it’s community driven, not developed by a company, doesn’t support white-listing, so only you decide what you want to block, and what is very important, it has a built-in list of filters (which is also built-in in AdBlock, but people don’t know about it).
Continue reading

Static code analysis in QtCreator with CppCheck

Just a simple tutorial to show you how to add static code analysis plugin in QtCreator on Liunx.
Start by downloading plugin dedicated to QtCreator from here.

Unpack .zip and you will get two directories which you have to copy to /usr/lib/qtcreator/plugins/. You can copy only libQtcCppcheck.so, if you don’t need Russian translation.

cp lib/qtcreator/plugins/libQtcCppcheck.so /usr/lib/qtcreator/plugins/

Continue reading

UI, UX and how users see world

Factors Measured in Usability Testing

The most common factors measured in usability testing include:

  • Effectiveness: a user’s ability to successfully use a website to find information and/or accomplish tasks
  • Efficiency: a user’s ability to quickly accomplish tasks with ease and without frustration
  • Satisfaction: how satisfied the user is with site
  • Error frequency and severity: how often users make errors while using the system, how serious the errors are, and how users recover from the errors
  • Memorability: a user’s ability to remember enough to use the site effectively after his or her first visit

Continue reading

Security, privacy and anonimity in Firefox

In this post gathered some information about several attacks that can be used to track, identity or deanonymize web-browser users in many ways. I will show you here how to protect yourself from those attacks. Information given here should be useful for many communities, for people who hate ads online, who don’t want to be tracked online and also, for Tor users. I should warn you now that the points listed below are used by me and the list was compiled to improve privacy and anonymity without braking most of web2.0 features.


1. Let’s start with the most basic privacy settings in Firefox. Firtst, go to Privacy settings (you can do it on many ways, on Linux, go Edit -> Preferences, or universal way just type “about:preferences” in address bar and select “Privacy”). There was much talk about the new Firefox option to disable third party cookies and a lot of people don’t like that feature because they can’t now earn money tracking you. So, tell sites, that you don’t want to be tracked and never accept third-party cookies. Other options are optional for now.

firefox privacy settings Continue reading

Tworzenie ukrytego serwisu w Tor na Linux

Tor_logo1Stawianie serwera w Tor jest bardzo proste, jednak niewiele osób wie jak to zrobić, wiele osób myśli, że używanie Tora jest jednoznaczne z byciem przestępcą lub handlem narkotykami. No cóż… jest w tym sporo racji, takie możliwości ukrywania swojej tożsamości daje sieć Tor.

W tym poradniku użyję serwera `nginx` i paczki `tor` dostępnej chyba w każdej dystrybucji Linuxa, więc nie powinno być problemu z ich instalacją. Domeny serwerów Tor charakteryzują się końcówką .onion, przykładem dobrej i znanej strony jest serwis noreason, zbierający wszelkiego typu dokumenty/książki, których rząd nie chce żebyś znał.

W tym poradniku pokażę, jak publikować prostą stronę HTLM w Torze. Jeśli potrzebujesz czegoś z PHP/Ruby/Python, odpowiednia konfiguracja serwera i nginxa należy do Ciebie.

Continue reading