Author Archives: dmitriano

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:

Item
{
    property var refreshChart: function () {}

    Component.onCompleted:
    {
        refreshChart = function ()
        {
            console.log("Hello!")
        }
    }
}
(more…)

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 = "https://api.binance.com/sapi/v1/margin/isolated/allPairs?{$query}&signature={$signature}";

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

Brain collapsing rules in C++

Consider the declaration of a class that contains a lambda function or a reference to it:

#include <utility>

template <class Func>
struct Holder
{
    Holder(Func && func) : m_func(std::forward<Func>(func))
    {
    }

    Func m_func;
};

template <class Func>
auto MakeHolder(Func && func)
{
    return Holder<Func>(std::forward<Func>(func));
}
(more…)

Setting Google AdMob Seller information

There is a new Seller information option in Google AdMob that may affect the advertising revenue. I set it up in Google AdMob Console on Settings page as follows:

See some link about this.

My first experiment with a peak detection algorithm

Hi guys!

For those how are interested in what I am doing now I provided my app screenshots with ‘Find Peaks’ button that runs ZScore algorithm on a cryptocurrency market data (follow the this link for the algorithm source code in C++).

Honestly I am not quite enough understand yet how it works, because I run it first time today, but at least there is some correlation between input parameters and the results. The lesser the threshold and the longer the lag the lesser peaks are found. Increasing the influence also reduces the peak count.

(more…)

Publishing QT application in Apple App Store

I succeeded with building my app for iOS and my first step in publishing the app in App Store was opening generated .xcodeproj file in XCode, but XCode froze displaying rotating progress indicator and wait cursor.

(more…)

Mining Raven Coin (RVN) with KawPow on Windows 10

I run T-Rex miner as follows:

t-rex -a kawpow -o stratum+tcp://rvn.2miners.com:6060 -u <mywallet>.rigW -p x

and set the following parameters on my 1060 GTX 3GB card with MSI Afterburner:

(more…)

GeForce GTX 1060 cooler replacement

Gigabyte GTX 1060 cooler model is PLD09210S12HH DC 12V 0.40A and the size is 88mm:

(more…)

Auditing of Autonomous Oracle Database

Check if unified auditing is enabled:

SELECT VALUE FROM V$OPTION WHERE PARAMETER = 'Unified Auditing';

Check what options are enabled:

SELECT up.AUDIT_OPTION, uep.SUCCESS, uep.FAILURE from AUDIT_UNIFIED_ENABLED_POLICIES uep, AUDIT_UNIFIED_POLICIES up 
where uep.ENTITY_NAME = 'ALL USERS' and uep.ENABLED_OPTION='BY USER' and uep.POLICY_NAME = up.POLICY_NAME and up.AUDIT_OPTION_TYPE = 'STANDARD ACTION'
(more…)