原创 c++ vector 結構體使用 單例模式 觀察者模式簡單使用

#include <iostream> #include <algorithm> #include <functional> #include <vector> #include <mutex> using namespace std;

原创 ubuntu18.04 安裝python2.7.6

apt-get install   安裝openssl wget http://artfiles.org/openssl.org/source/old/1.0.1/openssl-1.0.1f.tar.gz tar xf openssl-

原创 OpenWRT 編譯固件(帶usb攝像頭相關驅動)與燒寫固件,獲取圖像數據並用Qt顯示,添加開機自啓,添加自己寫的驅動或者應用

我購買的是無涯的MT7688A開發板,所以以它來介紹,但是發現基本OpenWRT的編譯固件套路是一樣的,所以應該通用。 1.下載官網源碼 2.編譯源碼 (1)./scripts/feeds update -a (2)./scripts/f

原创 Qt Quick 鍵盤操作

main.cpp #include <QGuiApplication> #include <QQmlApplicationEngine> #include <QQuickView> int main(int argc, char *

原创 Python tkinter 所以控件的簡單使用

from tkinter import * import tkinter.messagebox from tkinter import filedialog from tkinter import colorchooser import

原创 QThread 創建線程、關閉線程

代碼如題: #include <QCoreApplication> #include <QThread> #include <QDebug> class MyThread : public QThread { public: v

原创 QGraphicsView 的使用

1.QGraphicsView 顯示圖片,並進行放大縮小,在圖片上畫點並連接,源碼路徑 https://download.csdn.net/download/yuchunhai321/11644487 2.QGraphicsView 顯示

原创 boost_thread 創建線程與關閉線程

如題,代碼如下: #include <iostream> #include <boost/thread.hpp> #include <boost/bind.hpp> using namespace std; class BoostT

原创 Windows下Qt用7z解壓、7za壓縮tar文件

7z --help 7-Zip [64] 16.02 : Copyright (c) 1999-2016 Igor Pavlov : 2016-05-21 p7zip Version 16.02 (locale=utf8,Utf16=o

原创 c++ 類內使用線程pthread std::thread

#include <iostream> #include <pthread.h> using namespace std; class Test { public: Test(); void print();

原创 qt mysql數據庫的第一次使用記錄

Windows端: 1.安裝mysql注意事項(mysql-installer-community-5.5.50.0.msi): (1)注意qt編譯的是32位還是64位,需安裝對應位數的mysql, (2)安裝目錄中不可以有空格,否則編譯

原创 ubuntu16.04 安裝VS Code

根據網上找到的方法,未嘗試 cat /etc/issue 版本是:Ubuntu 16.04 LTS \n \l 然後只需要做,順序執行這四條命令: sudo add-apt-repository ppa:ubuntu-deskto

原创 Qt刪除文件夾及文件夾下的文件夾

//刪除文件夾 bool DelDir(const QString &path) { if (path.isEmpty()){ return false; } QDir dir(pat

原创 QT yuyv轉rgb程序

測試可以使用  int convert_yuv_to_rgb_pixel(int y, int u, int v) { unsigned int pixel32 = 0; unsigned char *pixel = (

原创 C++ 編寫類似mjpg-streamer ,利用linux v4l2 獲取usb攝像頭圖像通過服務器發送jpeg圖片,網頁可以查看

c++編寫服務器,利用的mongoose源碼,具體程序如下: //mongoose.h // Copyright (c) 2004-2013 Sergey Lyubka <[email protected]> // Copyright