原创 Ruby啓動exe

將exe所在路徑目錄添加到系統path ruby腳本 system(‘run.exe’) system 帶參數啓動

原创 NSIS 多語言國際化

首先導入 英文 簡體中文 !insertmacro MUI_LANGUAGE "English" !insertmacro MUI_LANGUAGE "SimpChinese" 定義國際化字段 LangString DESC_C

原创 Qt WebEngine Debugging and Profiling

控制檯記錄 在Qt WebEngine中執行的JavaScript可以使用Chrome控制檯API將信息記錄到控制檯。日誌消息將轉發到日誌js 記錄類別中的 Qt日誌記錄工具。但是,默認情況下僅打印警告和致命消息。要更改此設置,您

原创 讀取Nvidia驅動版本號

Solution 1 讀取註冊表信息,不可取。很多電腦的註冊表信息丟失不全。 Solution 2 通過dxgi讀取顯卡版本號。在臺式機上正常,雙顯卡的筆記本電腦端,由於默認的顯卡爲核顯,所以讀取的爲核顯版本號。 Solution

原创 Qt ALT+F4響應

#include <QDebug> //MainWindow:public QMainWindow bool MainWindow::nativeEvent(const QByteArray &eventType, void *mes

原创 OpenCV裁剪圖片

std::string path = "D:/timg.jpg"; IplImage* pSrc = cvLoadImage(path.c_str(),1); CvSize size= cvSize(pSrc

原创 OpenCV圖片格式轉化

#include <opencv2/opencv.hpp> cv::Mat img = cv::imread("D:/satara_night_16k.hdr"); cv::imwrite("D:/satara_night_

原创 (Qt) 獲取Nvidia driver Version 驅動版本

#define _WIN32_DCOM #include <iostream> using namespace std; #include <comdef.h> #include <Wbemidl.h> #include <strin

原创 (Qt) 獲取系統詳細版本號 OS Build

直接通過調用管道命令行,但是會有一個黑框(控制檯)閃過 #include <stdlib.h> #include <stdio.h> #include <iostream> using namespace std ; // 描述:e

原创 Qt---打印系統時間,毫秒級

//獲取當前時間 QDateTime current_date_time = QDateTime::currentDateTime(); QString current_date = current_date_time

原创 CString 轉換爲LPWSTR

(LPWSTR)(LPCWSTR)(cmdLine.c_str()) //1、通過MultiByteToWideChar函數轉換 MultiByteToWideChar函數是將多字節轉換爲寬字節的一個API函數,它的原型如

原创 string 字符串替換

void StringReplace(string &str, string srcSubStr, string decSubStr) { int iPos = 0; while (str.find(srcSubStr

原创 C++字符串處理 和 std::transform

例子: char exchange(char c) { if (c <= 'Z' && c >= 'A') c = tolower(c); else if (c >= 'a' && c <= 'z') c = toup

原创 std::string 去除前後空格

void trimString(std::string & str ) { int s = str.find_first_not_of(" "); int e = str.find_last_not_of(" ");