- 博客(22)
- 资源 (16)
- 收藏
- 关注
原创 C++纯虚函数&析构&继承示例
阅读本示例,请持怀疑的态度!本示例可直接运行。 /* 阅读本示例,请持怀疑的态度! *********************************************************** ** 接口继承:纯虚函数;实现类,可以是虚函数,也可以是普通函数 ** 类继承:有虚函数, 普通函数, ** 虚函数的多态, ** 普通函数的隐藏调用:基类和派生类的同名方法 ** 建议:子类的函数名称尽可能不要与基类的同名,没事别显摆!!! ********************************
2022-11-11 18:50:14
572
原创 C,大小端字符转int, 字节交换
记录前人,方便自己查看, 运行结果: //功能:对各个字(2B)的两个字节,进行位置交换操作。 void swap_word(unsigned char *pArray, int nWords) { unsigned char *cc = pArray, c0; int i; for (i = 0; i < nWords; i ++)// Swap every two bytes { c0 = *cc; *cc = *(cc +
2021-10-20 18:35:21
520
原创 crc8高位在左低位在右,使用时请注意高低位顺序
小结前人的成果 :原码 /* Return CRC-8 of the data, using x^8 + x^2 + x + 1 polynomial. A * table-based algorithm would be faster, but for only a few bytes it isn't * worth the code size. */ uint8_t Crc8(const void* vptr, int len) { const uint8_t *data = (uint
2021-07-21 10:25:36
848
原创 linux c 获取指定目录下所有文件
示例代码, 直接可用, 码民各根据文件类型需求修改 #include <stdio.h> #include <stdlib.h> #include <string.h> #include <dirent.h> #include <unistd.h> //char *p_path="/home/joshua/00Work/india"; //readFileList(p_path); //文件类型如下: //enum //{ /
2021-07-20 11:12:23
847
原创 Linux C 获取系统控制台数据
小结: 有时候是需要从linux的控制台获取想要的数据,下面是总结前人加上亲自测试可用 void get_md5sum() { char out_buf[1024]; 这两个BUF要一样大 memset(out_buf, 0x00, sizeof(out_buf)); //示例: 获取md5sum pic.jpg 较验文件码, e0bac 90024 4b89c 7d5c7 8a38b 35341 8b get_system_console_return_value("md5sum pic.jp
2021-07-20 11:04:41
856
转载 QML QComboBox find 使用注意点
问题描述: 当初始页面加载时, 在ComboxBox内部使用find函数,得到index= -1 ,必须在组件加载完成后方可.如下图:正解 这个问题很多年前就有了, 要么百度光顾着赚钱了, 要么就是国内的程序员偷懒, 我承认我也懒! ...
2021-07-13 11:05:32
516
原创 excel与datebase sqlserver互转数据
参照http://blog.csdn.net/bard_j/article/details/6711661 小结:exec sp_configure 'show advanced options',1 --------一定不能少, reconfigure exec sp_configure 'Ad Hoc Distributed Queries',1 reconfigure go ...
2019-12-10 11:13:57
263
原创 C_异或值_CRC
感谢牛人,历史总结 //从$到*号所有char的异或 int gps_xor_comparative_test(char * charGPS ) { //char a[]="$GPRMC,054041.000,A,1855.597600,N,07309.914880,E,0.00,143.39,250319,,,A*6F"; char * char_gps = charGPS; ...
2019-12-10 11:09:36
371
原创 C 时区转换
只能精确到分 void gpstime_to_india(int& year, int& month, int& day, int& hour,int &min) { hour += 5; min +=30; //india time zone if(min>=60){ hour+=1; min-=60; }...
2019-12-10 11:06:38
687
原创 linux c 获取终端光标的坐标
参考资料 http://www.linuxquestions.org/questions/programming-9/get-cursor-position-in-c-947833/ #include <unistd.h> #include <fcntl.h> #include <termios.h> #include <errno.h> #d...
2019-12-10 11:00:35
1547
原创 Linux下,获取或设置鼠标坐标
ubuntu,感谢牛人 //---------------------------- #include <sys/types.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <ctype.h> #include <stdarg.h>...
2019-12-10 10:56:16
2022
3
原创 C 鼠标操作:相对位移
感谢牛人,历史总结 #include <stdlib.h> #include <stdio.h> #include <unistd.h> #include <linux/input.h> #include <fcntl.h> #include <sys/time.h> #include <sys/types.h>...
2019-12-10 10:54:20
506
原创 C#枚举操作: 使用反射获取枚举名称,值,转成Array
历史,归纳总结 enum enu { a = 7, b = 9, c = 3, d = 4 }; 1.使用反射 foreach (var v in typeof(enu).GetFields()) { if (v.FieldType.IsEnum == true) { Console.WriteLi...
2019-12-10 10:48:51
625
原创 javascript_单选复选框_字符串左右空格_防止非法SQL注入
历史整理,感谢牛人 /**单选复选框 */ function checkboxSingleSelected() { //获取触发事件的对象 var event_object = window.event.srcElement; if (event_object.checked) { ...
2019-12-10 10:43:29
114
原创 IE 调用 Adobe 直接打印 PDFpdf.html
IE 调用 Adobe 直接打印 PDFpdf.html 与 test.pdf 放在同一目录 感谢牛人 <html> <head></head> <body> <a href="javascript:PDF1.printWithDialog();">print</a> <object classid="clsid:...
2019-12-10 10:40:01
1711
原创 C# thread 存取数据
小知识点分享: 静态变量 private static string ConnectionName= "CurrnetConnection"; public void StartTransation() { //set current connection and transaction to current thread Thread.SetData(Thread.GetName...
2019-12-10 10:35:21
439
C, C++读取 DICOM & DICONDE 图像数据
2022-02-26
LiveImageInQML-main.zip
2021-10-12
用QT QML 实现的MODBUS_郎汉德PLC_Master主机代码
2021-07-20
rabbitvcs_0.16.orig.tar.gz
2019-08-08
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅