原创 urb

本文轉載自:https://blog.csdn.net/u012719256/article/details/53156373   一、概念介紹 urb用作usb總線和usb設備驅動之間的數據傳輸,可以理解爲一個notifer,由從設備發

原创 c#中toolTip使用方法

使用方法        在窗口加載函數進行設置    // Set up the delays for the ToolTip.             toolTip1.AutoPopDelay = 5000;            

原创 shell編程中,單引號,雙引號,各種括號的區別

一、單引號和雙引號 首先,單引號和雙引號,都是爲了解決中間有空格的問題。 因爲空格在linux中時作爲一個很典型的分隔符,比如string1=this is astring,這樣執行就會報錯。爲了避免這個問題,因此就產生了單引號和雙引號。

原创 [Linux]shell 變量$*, $#, $?, $!, $1,$2,..., $n的含義

$$:shell本身的PID $!:shell最後運行的後臺PID $?:最後運行的命令的結束代碼(返回值) $-:使用set命令設定的flag一覽 $*:所有參數列表,如"$*"用「"」括起來的情況、以"$1 $2 … $n"的形式輸出

原创 colorDialog使用方法

         //禁止使用自定義顏色             colorDialog1.AllowFullOpen = true;             //提供自己給定的顏色             colorDialog1.C

原创 Android動態添加控件

啓動主界面的三種方法 第一種方法 this.setContentView(R.layout.activity_main); 第二種方法 this.setContentView(this.getLayoutInflater().infla

原创 JSON字符串轉換成Java實體類(POJO)

http://www.bejson.com/json2javapojo/

原创 pthread_cond_wait

pthread_cond_wait(&cond, &mutex); 在等待的時候會解鎖(阻塞之後,解鎖mutex給別的線程), 喚醒後加鎖。

原创 線程生產者和消費者

#include <stdio.h> #include <unistd.h> #include <stdlib.h> #include <sys/types.h> #include <sys/stat.h> #include <stri

原创 C#事件

using System; namespace ConsoleApplication6 { class Program { public delegate void InformHandle(

原创 c++操作redis

使用redis參考自:https://blog.csdn.net/zwz1984/article/details/54890785 如何安裝動態庫參考自:https://www.cnblogs.com/cthon/p/9357464.ht

原创 C語言連接MYSQL數據庫

1、初始化 MYSQL*mysql = mysql_init(NULL); 描述 分配或初始化與mysql_real_connect()相適應的MYSQL對象。如果mysql是NULL指針,該函數將分配、初始化、並返回新對象。否則,

原创 如何自定義控件

新建類 #include "light.h" #include <QPainter> #include <QMouseEvent> #include <QDebug> light::light(QWidget *parent) : QW

原创 共享內存

實驗要求:創建兩個進程,在A進程中創建一個共享內存,並向其寫入數據,通過B進程從共享內存中讀取數據。 chm_com.h函數 #define TEXT_SZ 2048 struct shared_use_st { int w