上一页 1 ··· 105 106 107 108 109 110 111 112 113 ··· 133 下一页
摘要: QProcess对象可以直接执行cmd的命令,但是ping操作是会阻塞的,所以需要在子线程里ping QProcess *tempCmd = new QProcess(); tempCmd->start(orderInfo); tempCmd->waitForFinished(1000);//阻塞等 阅读全文
posted @ 2017-06-23 11:28 朱小勇 阅读(2213) 评论(0) 推荐(0)
摘要: #define MB (1024 * 1024) MEMORYSTATUSEX statex; statex.dwLength = sizeof (statex); GlobalMemoryStatusEx (&statex); qDebug() << QStringLiteral("物理内存使用率 阅读全文
posted @ 2017-06-16 21:55 朱小勇 阅读(506) 评论(0) 推荐(0)
摘要: #include <time.h> srand(time(NULL) ); //生成种子,做一次否则随机数是递增和递减的 int b; b = rand()%20;//0-20的随机数,这里可以进入循环,产生真正随机数 阅读全文
posted @ 2017-06-16 21:53 朱小勇 阅读(217) 评论(0) 推荐(0)
摘要: 一、入门 1、下载源文件http://www.qcustomplot.com/; 2、把.cpp和.h放在工程目录下,并将cpp和h加入工程; 3、在.pro中:QT += printsupport; 4、在ui中添加一个Widget,右键提升为,输入:QCustomPlot,改变对象名称为cust 阅读全文
posted @ 2017-06-16 15:25 朱小勇 阅读(13865) 评论(0) 推荐(2)
摘要: 可以用open和fopen来打开文件,open偏底层,fopen来自于open更顶层。(根据公司某个项目看了源码用的open) #include <stdio.h>#include <windows.h>int main(void){ FILE *fp; char temp; char buf[10 阅读全文
posted @ 2017-06-15 11:27 朱小勇 阅读(1365) 评论(0) 推荐(0)
摘要: #include <QPropertyAnimation> #include <QDesktopWidget> //下坠 void MainWindow::on_pushButton_clicked() { QPropertyAnimation *pAnimation = new QProperty 阅读全文
posted @ 2017-06-15 10:52 朱小勇 阅读(372) 评论(0) 推荐(0)
摘要: 右键虚拟机,选择网络适配器,设置为桥接模式。然后关闭主机防火墙,ping就行了(一直ping是没有参数的) 阅读全文
posted @ 2017-06-14 16:52 朱小勇 阅读(504) 评论(0) 推荐(0)
摘要: Linux 下 的 cc 和 gcc Linux 下 的 cc 和 gcc 周银辉 在Linux下一会看到cc,另一会又看到gcc,感觉又点混乱的样子。它们是同一个东西么,有啥区别呢 一分为二地看: 首先,如果讨论范围在Unix和Linux之间,那么cc和gcc不是同一个东西。cc来自于Unix的c 阅读全文
posted @ 2017-06-13 13:29 朱小勇 阅读(4280) 评论(0) 推荐(0)
摘要: vim有三种状态: 命令模式、插入模式和底行模式,各模式的功能区分如下:1) 命令行模式vim打开某个文件默认就是命令行模式,控制屏幕光标的移动,字符、字或行的删除。2) 插入模式在命令行模式下按i,进入插入模式,此模式下做文字输入,按esc键可回到命令行模式。3) 底行模式将文件保存或退出vim, 阅读全文
posted @ 2017-06-13 11:11 朱小勇 阅读(343) 评论(0) 推荐(0)
摘要: 一、c语言 1、在当前目录下新建c文件 $:vim hello.c 2、按i进入编辑模式。按esc退出编辑模式,输入源代码 #include <stdio.h> int main(void) { printf("hello world"); return 0; } 退出编辑模式,按住shift+两次 阅读全文
posted @ 2017-06-13 10:45 朱小勇 阅读(8662) 评论(0) 推荐(0)
上一页 1 ··· 105 106 107 108 109 110 111 112 113 ··· 133 下一页