自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(32)
  • 资源 (1)
  • 收藏
  • 关注

转载 fseek 在以字符串模式打开的文件中工作不正常

For streams opened in text mode, fseek and _fseeki64 have limited use, because carriage return-linefeed translations can cause fseek and _fseeki64 to produce unexpected results. The only fseek and _fs...

2019-01-17 09:53:44 282

转载 测网速

出处:https://stackoverflow.com/questions/20190456/determine-available-upload-download-bandwidthThere's no way to determine the absolute network capacity between two points on a regular network. The re...

2019-01-16 09:24:35 2758

转载 点击 QTableView,触发事件

Here is an example of how you can get a table cell's text when clicking on it.Suppose a QTableView defined in some MyClass class. You need to connect the clicked signal to your own MyClass::onTableC...

2019-01-15 10:24:06 8820 1

转载 How to use QueryPerformanceCounter? (c++,不使用 .Net)

出处:https://stackoverflow.com/questions/1739259/how-to-use-queryperformancecounter参考:https://docs.microsoft.com/zh-cn/windows/desktop/WmiSdk/accessing-performance-data-in-c--#example#include <w...

2019-01-15 10:20:21 148

原创 c++ 更新 performance counter 数据,错误码 87

ERROR_INVALID_PARAMETER87 (0x57)The parameter is incorrect.很可能是该送 ULONG 的送了 ULONGLONG,vise versa

2019-01-15 10:17:02 297

转载 设置共享内存大小 【windows】

是分 高位 低位 两个数字设定hMapFile = CreateFileMapping( INVALID_HANDLE_VALUE, // use paging file NULL, // default security PAGE_READWRI...

2019-01-15 10:15:08 3283

转载 QT 无法抓住异常

出处:https://stackoverflow.com/questions/40980171/qt5core-dll-crashingI've found that enabling /EHa (Structured Exception Handling) on the compiler solves my problem, as I can then use my default exce...

2019-01-15 10:13:37 3120 1

转载 C++ Windows - How to get process path from its PID

出处 https://stackoverflow.com/questions/1933113/c-windows-how-to-get-process-path-from-its-pid注意质疑(我也没试过): 1 most of modules turn to a failure in getting file path :( – jondinham Aug 29 '11 at 4...

2019-01-15 10:11:48 683

原创 通过进程名称,获取其路径

使用windows api#include <psapi.h>#include <tlhelp32.h>void get_process_file_path(DWORD process_id, char* path, int path_size){ HANDLE process = OpenProcess(PROCESS_QUERY_INFORMATI...

2019-01-15 10:09:17 1168

原创 获取磁盘的 总容量,空余容量,已用容量 【windows】

使用windows api输入:盘符字符串输出:磁盘容量float get_disk_spaces(const char drive_letter, float & total_space, float & used_space){ BOOL fResult; unsigned _int64 i64FreeBytesToCaller; uns...

2019-01-15 10:04:06 3913

转载 Qt5 escape spaces in path

There are two possible ways. You can either use escaped quotes (inserting the string between quotes) :QStringList arguments;QString str="\"/home/user/.wine/drive_c/users/user/Local Settings/LocalL...

2019-01-15 09:57:06 234

原创 QT 执行windows cmd 命令并读取结果

QProcess process;QString cmd = QString("\"") + path + QString("\"") + "rcfsctrl static-cfg --show";//QMessageBox::about(NULL, "Information", ("cmd: " + cmd)); process.start(cmd);process.

2019-01-15 09:45:22 6137 1

转载 Linux open() 一个函数,两个函数原型

open在手册中有两个函数原型, 如下所示:int open(const char *pathname, int flags);int open(const char *pathname, int flags, mode_t mode);这样的函数原型有些违背了我们的直觉。C语言是不支持函数重载的, 为什么open的系统调用可以有两个这样的open原型呢? 内核绝对不可能为这个功能

2018-01-08 15:57:57 2877 1

转载 阻塞 非阻塞

阻塞的系统调用是指, 当进行系统调用时, 除非出错(被信号打断也视为出错) , 进程将会一直陷入内核态直到调用完成。 非阻塞的系统调用是指无论I/O操作成功与否, 调用都会立刻返回

2018-01-08 15:47:28 139

转载 一种用 数组元素 指定 所调函数 的方法

typedef struct mgrHandler {  void            (*handler) (int *, OperationHdr *);} MgrHandler;===============================================================static MgrHandler mHandlers[] = {

2018-01-04 10:38:31 189

转载 SVN diff

http://svnbook.red-bean.com/en/1.6/svn.ref.svn.c.diff.htmlNamesvn diff (di) — This displays the differences between two revisions or paths.Synopsisdiff [-c M | -r N[:M]] [TARGET[@R

2018-01-02 09:41:21 417

转载 Linux 常用C函数

http://net.pku.edu.cn/~yhf/linux_c/

2018-01-02 09:40:12 330

转载 shell脚本报错:"[: =: unary operator expected"

shell脚本报错:"[: =: unary operator expected"    在匹配字符串相等时,我用了类似这样的语句:if [ $STATUS == "OK" ]; then     echo "OK"fi    在运行时出现了 [: =: unary operator expected 的错误,就一直找不到原因,尝试了删除等号两侧的空格和括号里的空格都不管用,最

2018-01-02 09:39:06 532

转载 The new SFCB broker fails to start with a SSL-related error: Failure setting ECDH curve name (secp22

# openssl ecparam -list_curves secp384r1 : NIST/SECG curve over a 384 bit prime field secp521r1 : NIST/SECG curve over a 521 bit prime field prime256v1: X9.62/SECG curve over a 256 bit prime fie

2018-01-02 09:37:26 284

转载 Linux Tutorial Posix Threads

http://www.yolinux.com/TUTORIALS/LinuxTutorialPosixThreads.html

2017-12-29 09:25:37 136

转载 /proc/[pid]/status

http://man7.org/linux/man-pages/man5/proc.5.html/proc/[pid]/status Provides much of the information in /proc/[pid]/stat and /proc/[pid]/statm in a format that's eas

2017-12-27 18:30:05 874

转载 automake,autoconf使用详解

18 Nov 09 automake,autoconf使用详解 本文地址: http://www.laruence.com/2009/11/18/1154.html文章转自: http://www.linuxcomputer.cn/作为Linux下的程序开发人员,大家一定都遇到过Makefile,用make命令来编译自己写的程序确实是很方便.一般情况下,大家都是手工

2017-12-01 11:11:16 115

转载 不论是 Basic Auth 还是 Digest Auth,都会有 Authorization 字段

GET /dir/index.html HTTP/1.0Host: localhostAuthorization: Digest username="Mufasa", realm="testrealm@host.com", nonce="dcd98b7102dd2f0e8b11d0f600bfb0c093",

2017-11-17 13:09:21 1066

转载 An example shows several CIM-XML extension headers

The example below shows several CIM-XML extension headers for a GetClass operation on the root/cimv2 namespaceM-POST /cimom HTTP/1.0Content-Type: text/xml;charset=UTF-8Accept: text/xml, ap

2017-11-17 13:07:56 152

转载 DMTF 关于 CIM-XML 的幻灯片介绍

https://members.dmtf.org/data/presentations/devcon02/JimDavis-IntroductiontoCIM-XML.pdf

2017-11-17 13:06:38 191

原创 一些软件的 Basic Auth 行为

一个 WBEM 在2003年的bugI'm trying to access the WBEM service of the CIMOM on the ESX Server 3i and all my requests end up with this error "(501) not implemented".https://communities.vmware.com/th

2017-11-17 13:01:00 208

转载 Linux 抓包

https://www.cnblogs.com/ggjucheng/archive/2012/01/14/2322659.htmltcpdump 与wiresharkWireshark(以前是ethereal)是Windows下非常简单易用的抓包工具。但在Linux下很难找到一个好用的图形化抓包工具。还好有Tcpdump。我们可以用Tcpdump + Wireshark 的

2017-11-17 12:52:49 4922

转载 安装 wbemcli

1 安装环境       建立自己的目录后,            wget http://vault.centos.org/6.0/os/x86_64/Packages/sblim-wbemcli-1.6.1-1.el6.x86_64.rpm              wget -r -np -nd --accept=sblim*.rpm http://vault.centos.or

2017-11-16 17:37:37 497

转载 [http 1.1] M-POST w3

5. Mandatory HTTP RequestsAn HTTP request is called a mandatory request if it includes at leastone mandatory extension declaration (using the Man or the C-Man headerfields). The method name of a m

2017-11-15 16:39:47 5805 2

转载 [http 1.1] M-POST

http://www.brainbell.com/tutors/XML/XML_Book_B/Sending_Messages_Using_M_POST.htmYou can restrict messages coming through a firewall or a proxy server by using the MPOST method instead of POST. M

2017-11-15 15:04:06 419

转载 Service Location Protocol SLP

https://www.ibm.com/developerworks/cn/linux/l-slp/服务发现(service discovery) 是在网络环境中发现必须使用的服务的能力。例如,如果要在网络上新安装一个桌面系统,应该如何对这个系统配置邮件服务器、缺省网关(用来对本机之外的连接进行路由)或可用打印机呢?通常,这些都是信息都要向系统管理员进行咨询,然后在每台机器上手工进

2017-11-13 16:34:27 588

转载 linux find string in files

http://blog.csdn.net/duguduchong/article/details/7716908查找目录下的所有文件中是否含有某个字符串 find .|xargs grep -ri "IBM" 查找目录下的所有文件中是否含有某个字符串,并且只打印出文件名 find .|xargs grep -ri "IBM" -l 1.正则表达式    (1

2017-11-13 14:12:44 589

PCA与LDA课件

关于PCA和LDA的课件,内容偏重LDA(Fisher Linear Discriminant)

2013-10-07

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除