该程序运用线程的mutex控制数据流的锁定,实现Producer和consumer之间对buffer的合理有序的利用
上传时间: 2017-02-20
上传用户:duoshen1989
Reads/writes text as a character stream, buffering characters so as to provide for the efficient reading/writing of characters, arrays, and lines. The buffer size may be specified, or the default size may be used. The default is large enough for most purposes. In general, each read request made of a Reader causes a corresponding read request to be made of the underlying character or byte stream. It is therefore advisable to wrap a BufferedReader around any Reader whose read() operations may be costly, such as FileReaders and InputStreamReaders.
标签: characters character buffering efficient
上传时间: 2017-02-20
上传用户:cjl42111
环型队列函数,主要是ring buffer的管理模块,完成相关的操作。
上传时间: 2014-08-29
上传用户:ainimao
procedure senddata var i:integer commflg : Boolean begin commflg:=true for i:=1 to 8 do begin if not fcomm comml writecommdata(sendbutter,i) then begin Commflg=false break end end end (4) 接收数据 在编写基于串口的计算机工业测控时,通常需要由下位机向PC机发送数据以使PC机了解系统的测试数据或下位机的运行状态,并进而控制下位机的行为。利用Spcomm串口控件接收下位机发送的数据信息的示例代码如下: //事件驱动方式接收数据程序 procedure TForm1.CommlReceiveData(Sender:Tobject Buffer:Pointer bufferLength:Word) var receivedata:array of byte begin sleep(100) //等待100ms,保证接收到所有数据 move(buffef ,receivedata,bufferlength) //将接收缓存区中的数据转移到数组中 …… end (5) 关闭串口 在系统开发中,应注意在不使用串口时应及时关闭串口,释放系统资源,否则可能会影响系统的其它应用。关闭串口的代码如下: procedure TForm1.FormClose ( Sender TObj ect:var Action:TCIoseAction ) begin comml.StopComm end
标签: commflg procedure senddata integer
上传时间: 2014-01-26
上传用户:懒龙1988
cppcheck is a static C/C++ code analyzer that checks for memory leaks, mismatching allocation-deallocation, buffer overrun, and many more problems. Its goal is to produce no false positives.
标签: allocation-deallo mismatching cppcheck analyzer
上传时间: 2013-12-08
上传用户:Zxcvbnm
Face Recognition Library ======================== Advanced face recognition DLL using two functions : Train and Recognize. Uses neural net back propogation alogorithm with more AI tools added for imaging optimization. Library works great even for a low resolution web cam image and requires the user to align to a mirror frame on screen. Complete Source Code with Video capture and feature extraction kit for Registered Users. Please register here for only $299 with Source Code : http://www.research-lab.com/facerecognitionorder.htm (c) www.research-lab.com
标签: Recognition recognition Advanced Library
上传时间: 2017-04-25
上传用户:784533221
利用C#编写的一个关于SharpMap的例子,能够加载shapeFile图层,对图层叠加顺序进行调整,对图层属性进行设置,而且还实现了buffer和touches两个方法
上传时间: 2017-05-17
上传用户:wxhwjf
LZMA压缩解压算法,压缩解压函数接口入参出参都以Buffer形式; 代码为完整的工程,可运行,其中包括简单的举例。
上传时间: 2017-05-25
上传用户:yy541071797
Java 程序编码规范 所有的程序开发手册都包含了各种规则。一些习惯自由程序人员可能对这些规则很不适应,但是在多个开发人员共同写作的情况下,这些规则是必需的。这不仅仅是为了开发效率来考虑,而且也是为了后期维护考虑。 内容: 命名惯例 、Java文件样式 、代码编写格式 、程序编写 、编程技巧 、Swing 、调试 、性能 、可移植性 1) 命名规范 定义这个规范的目的是让项目中所有的文档都看起来像一个人写的,增加可读性,减少项目组中因为换人而带来的损失。(这些规范并不是一定要绝对遵守,但是一定要让程序有良好的可读性) l Package名:Package名应该都是由一个小写单词组成。 l Class名:Class名必须由大写字母开头而其他字母都小写的单词组成 l Class 变量名:变量名用一个小写字母开头。后面的单词用大写字母开头。 l Static Final 变量名:Static Final 变量名应该都大写,并且指出完整含义。 l 参数名:参数的名字必须和变量的命名规范一致。 l 数组名:数组应该总是用下面的方式来命名: byte[] buffer 而不是:byte buffer[] l 方法的参数:使用有意义的参数命名,如果可能的话,使用和要赋值的字段一样的名字:
上传时间: 2013-11-28
上传用户:lxm
Java 程序编码规范 所有的程序开发手册都包含了各种规则。一些习惯自由程序人员可能对这些规则很不适应,但是在多个开发人员共同写作的情况下,这些规则是必需的。这不仅仅是为了开发效率来考虑,而且也是为了后期维护考虑。 内容: 命名惯例 、Java文件样式 、代码编写格式 、程序编写 、编程技巧 、Swing 、调试 、性能 、可移植性 1) 命名规范 定义这个规范的目的是让项目中所有的文档都看起来像一个人写的,增加可读性,减少项目组中因为换人而带来的损失。(这些规范并不是一定要绝对遵守,但是一定要让程序有良好的可读性) l Package名:Package名应该都是由一个小写单词组成。 l Class名:Class名必须由大写字母开头而其他字母都小写的单词组成 l Class 变量名:变量名用一个小写字母开头。后面的单词用大写字母开头。 l Static Final 变量名:Static Final 变量名应该都大写,并且指出完整含义。 l 参数名:参数的名字必须和变量的命名规范一致。 l 数组名:数组应该总是用下面的方式来命名: byte[] buffer 而不是:byte buffer[] l 方法的参数:使用有意义的参数命名,如果可能的话,使用和要赋值的字段一样的名字:
上传时间: 2017-05-31
上传用户:zxc23456789