Array subscript -N is outside array bounds warning in GCC11

Consider the code below with UB:

template <class Derived>
class A

    Derived * get() { return static_cast<Derived *>(this);}


    int m_a;

class B

    double m_b;

class X : public B, public A<X>

    int m_x;

int main()
    A<X> a;
    std::cout << a.get();
    return 0;

Disabling power button on Windows 10

When you mistakenly press power button your Windows 10 machine surprisingly shuts down. Switch it off with the following steps:


Compiling Awl on Ubuntu 18 and 20 with GCC 11

Below I provided the instruction on how to build Awl on Ubuntu 18 and 20.

On Ubuntu 18 you do an extra step to install CMake version >= 3.12:

wget -O - 2>/dev/null | sudo apt-key add -
sudo apt-add-repository 'deb bionic main'
sudo apt update

Then do the following steps on both Ubuntu 18 and 20:

sudo apt install cmake
cmake --version

Earned 50$ with some unknown coins on Binance

Coins FIS, BADGER and TORN did 3x, 2x and 2x respectively and I earned 50$ with my trading bot:


Multi-Processor in Visual Studio

It is /MP:


Investigating how to find the candles on a price chart

The basic idea is to calculate the difference with 10 minutes (600 seconds) moving and the current price, for example.



A bit burned out graphics card

GPU on my GTX 1060 3GB burned out a bit:


We’ll never get our Sparks

Below I provided my dialog with Binance support:

what about sparks?
I mean should I expect them?

Can I know is this previous question or something else please ?

no, it is about Spark airdrop
I held XRP on December 2020

Kindly wait please, we will check and get back to you as soon as possible.

Upon checking, this airdrop of Spark tokens has not been sent yet, please follow our official announcements about this airdrop,
once we will distribute it, we will post official announcement here

Is there anything else I can assist you?

is there some planned date when we'll get some Sparks?

For now have to wait for the announcement since we don't have any planned date.

ok, thanks

Built my QT app for Android with API level 30 (Android 11)

New Android App Bundle and target API level requirements in 2021:

Starting August 2021, new apps will be required to target API level 30 (Android 11) and use the Android App Bundle publishing format. Starting November 2021, all app updates will be required to target API level 30 (Android 11). Apps with a download size of more than 150 MB are now supported by Play Asset Delivery and Play Feature Delivery.

I updated the manifest manually as follows:

<?xml version="1.0"?>
<manifest package="net.geographx.LinesGame" xmlns:android="" android:versionName="2.5.30" android:versionCode="161" android:installLocation="auto">
    <uses-sdk android:minSdkVersion="21" android:targetSdkVersion="30"/>

C++ tasks from Yandex

Task 1

At an interview I was asked how to by a given vector of integers build resulting vector containing the products of all the elements except current. Below I provided my solution in C++:

#include <vector>
#include <iostream>

using V = std::vector<int>;

V func(const V& v)
    V result;

    int product = 1;

    for (size_t pos = 0; pos != v.size(); ++pos)
        result[pos] = product;

        int a = v[pos];
        product *= a;