該程序運用線程的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