04 2015 档案
摘要:使用QT编辑界面,其中带来很大方便的一点就是Qt中自带丰富的、种类齐全的类及其功能函数,程序员可以在编辑程序的过程中简单地直接调用。关于窗口关闭的操作,在这里指出常用的三个槽,即quit(),exit()以及close()。 首先说明窗口退出时,系统提示对话框的代码编辑。对主程序的退出,可以调用...
阅读全文
摘要:for(i=0;i<100;i++){int cnt; if(cnt == 0) { firstNum[0]=x; firstNum[1]=y; firstNum[2]=z; firstNum[3]=Q4; firstNum[4]...
阅读全文
摘要:相关函数:send, sendmsg, recv, recvfrom, socket头文件:#include #include 定义函数:int sendto(int s, const void * msg, int len, unsigned int flags, const structsoc...
阅读全文
摘要:看到一篇好文章,特地转载下来,很详细很全面,收藏之。原文地址:http://blog.21ic.com/user1/1425/archives/2009/64057.htmlQT多线程程序设计QT通过三种形式提供了对线程的支持。它们分别是,一、平台无关的线程类,二、线程安全的事件投递,三、跨线程的信...
阅读全文
摘要:原文网址:http://blog.chinaunix.net/uid-2270658-id-308160.html【【Windows】】【Windows: 头文件的区别】#include#include【Windows: 初始化的区别】WSADATAwsaData;WSAStartup(0x202,...
阅读全文
摘要:基于HHARM9-EDU的TCP/IP(UDP)协议的实现原文网址:http://blog.csdn.net/lhj0503/article/details/3323788摘要:嵌入式技术的发展日新月异,现如今,嵌入式设备已经广泛应用于各种网络,本文简要地说明一下如何实现PC与HHARM9-EDU之...
阅读全文
摘要:Interrupt intrDescription0A clock that runs at the resolution set by ClockPeriod()1Keyboard2Slave 8259 — you can't attach to this interrupt.3Com24Com1...
阅读全文
摘要:QNX是类unix系统。在c语言编程过程中,往往会用到delay或者sleep延时函数。两者之间在使用上有一定的区别!!!delay()是循环等待,该进程还在运行,占用处理器。 sleep()不同,它会被挂起,把处理器让给其他的进程。sleep()参数指定暂停时间,单位是s delay()参...
阅读全文
摘要:1.简介:在C语言中可以使用函数gettimeofday()函数来得到时间。它的精度可以达到微妙2.函数原型:#includeintgettimeofday(struct timeval*tv,struct timezone *tz )3.说明:gettimeofday()会把目前的时间用tv 结构...
阅读全文
摘要:#include int interruptID;const struct sigevent *intHandler (void *arg, int id){ ...}intmain (int argc, char **argv){ ... interruptID = Interr...
阅读全文
摘要:#include #include #include #include #include #define MAX 10pthread_t thread[2];pthread_mutex_t mut;int number=0,i;void *thread1(){while(1){number=i;pr...
阅读全文
摘要:原文网址:http://blog.csdn.net/daniellee_ustb/article/details/7841894 在操作系统中,对于中断的处理一直是一件麻烦事,其实主要是对操作系统的中断管理机制不熟悉。当中断产生时,内核去执行中断服务程序ISR,中断服务程序中要做尽量少的工作,以提高...
阅读全文
摘要:#include #include #include pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;int count = 0;void* function1( void* arg ){ int tmp = 0; while( 1 )...
阅读全文

浙公网安备 33010602011771号