Author Archives: dmitriano

Dragging a link from a browser to a QML app

When a link is dragged from a browser on Window 10 platform it contains the page title, but they did not make it accessible in QML:

import QtQuick 2.15
import QtQuick.Controls 2.15

ApplicationWindow {
    visible: true
    width: 640
    height: 480
    title: qsTr("Scroll")
    id: root

    DropArea {
        id: dropArea;
        anchors.fill: parent
        onEntered: {
            root.color = "gray";
            drag.accept (Qt.LinkAction);

Running a Tron node on Ubuntu 20.04 WSL

Installed Java SDK:

sudo apt update
sudo apt install default-jdk
javac --version

Cloned the repository:

git clone

And found the following in wallet-cli\src\main\resources\config.conf:


The sum of signed and unsigned is unsigned in C++

#include <iostream>

template <typename T>
void PrintValue(T val)
    if constexpr (std::is_signed_v<T>)
        std::cout << "signed";
        std::cout << "unsigned";

    std::cout << std::endl << val << std::endl;

Installed Post Password Token WordPress plugin

When the user enters a page or post password WordPress sets wp_postpass_XXXX cookie:

Use chrome://settings/cookies/detail? to see the cookies in Google Chrome browser.


How I used OMNI USDT client on my home Windows machine

First, as a true C++ developer, I installed Ubuntu 18.04 and compiled omnicore from sources, but after that I realized that Windows omnicore-0.9.0 client can be downloaded and run directly on my Windows 10 machine.

I found omnicore-qt.exe in the unpacked files and run it:


A proper Ubuntu 18.04 installation for running Ethereum node

Create a Hyper-V machine with a disk that is large enough:

And install Ubuntu 18.04.


I did not receive a peak price from Binance

In my app I display prices that I receive from Binance STORJ/BTC trade stream (green color):


None of C++ compilers have heterogeneous lookup for unordered containers except MSVC

At 10/20/2020:

And std::vector is not constexpr yet:

And there is no text formatting also.



See C++20 library features compiler support.

Assignment a property of type function in QML

It is possible to do this in QML:

    property var refreshChart: function () {}

        refreshChart = function ()

Sample Binance API queries

Getting All Isolated Margin Symbols in PHP:

$api_key = "*****";
$secret = "*****";

$opt = [
    "http" => [
        "method" => "GET",
        "header" => "User-Agent: Mozilla/4.0 (compatible; PHP Binance API)\r\nX-MBX-APIKEY: {$api_key}\r\n"
$context = stream_context_create($opt);
$params['timestamp'] = number_format(microtime(true)*1000,0,'.','');
$query = http_build_query($params, '', '&');
$signature = hash_hmac('sha256', $query, $secret);
$endpoint = "{$query}&signature={$signature}";

$res = file_get_contents($endpoint, false, $context);
echo $res;