NVSDK_NGX_D3D12_Init failed, error code: -1160773631

-1160773631 = 0xBAD00001,

C:\ProgramData\NVIDIA Corporation\NVIDIA NGX SDK\1.1\Include\nvsdk_ngx.h

NVSDK_NGX_API NVSDK_NGX_Result  NVSDK_CONV NVSDK_NGX_D3D12_Init(unsigned long long InApplicationId, const wchar_t *InApplicationDataPath, ID3D12Device *InDevice, NVSDK_NGX_Version InSDKVersion = NVSDK_NGX_Version_API);

C:\ProgramData\NVIDIA Corporation\NVIDIA NGX SDK\1.1\Include\nvsdk_ngx_defs.h

enum NVSDK_NGX_Result
{
    NVSDK_NGX_Result_Success = 0x1,

    NVSDK_NGX_Result_Fail = 0xBAD00000,

    // Feature is not supported on current hardware
    NVSDK_NGX_Result_FAIL_FeatureNotSupported = NVSDK_NGX_Result_Fail | 1,
...

So, old boys, RIP.

Install ClickHouse

1
2
3
curl https://clickhouse.com/ | sh
sudo service clickhouse-server start
clickhouse-client

Qt code for connecting clickhouse is

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#include <QSqlDatabase>
#include <QSqlQuery>
#include <QSqlError>
 
int main(int argc, char *argv[])
{
	QSqlDatabase db = QSqlDatabase::addDatabase("QMYSQL");
	db.setHostName("192.168.22.129");
	db.setPort(9004);
	db.setDatabaseName("default");
	db.setUserName("default");
	db.setPassword("1");
	bool ok = db.open();
	if (!ok)
	{
		printf("error, %s\n", db.lastError().text().toStdString().c_str());
		return -1;
	}
	QSqlQuery query(db);
	query.exec("select * from Tst01;");
	while (query.next())
	{
		double price = query.value("Price").toDouble();
		QString name = query.value("Name").toString();
		printf("price:%f, name:%s\n", (float)price, name.toStdString().c_str());
	}
	return 0;
}

CMakeLists.txt

1
2
find_package(Qt5 COMPONENTS Core ... Sql ...)
target_link_libraries(exe_1 Qt::Core ... Qt::Sql ...)

Connection refused,

1
2
3
# /etc/clickhouse-server/config.xml
<listen_host>::</listen_host>
# sudo clickhouse restart

Dbeaver,

1
jdbc:clickhouse://192.168.22.129:8123

Python,

1
2
3
4
5
6
#pip install clickhouse_driver
from clickhouse_driver import Client
import pandas as pd
client = Client(host="192.168.22.129", port=9000, database="default", user="default", password="1")
table = client.query_dataframe("select * from Tst01;")
table.to_csv("d:\\aa.csv")

Sql,

1
TRUNCATE TABLE db.table;

refer to:
https://blog.csdn.net/csgarten/article/details/127439859
https://www.jianshu.com/p/aeb1053f4e96
https://github.com/ClickHouse/clickhouse-odbc/releases
https://blog.csdn.net/weixin_46076132/article/details/123462457
https://www.codenong.com/cs106775070/
https://blog.csdn.net/xiaoyw71/article/details/117692741