一個簡單的Java多線程的小例子。 a) Producer 生產(chǎn) String,并保存在 ArrayList 中。Consumer 消耗(讀出并顯 示)String,并把它從 ArrayList 中刪除。生產(chǎn)和消耗應(yīng)在 console有打印顯示。 b) 可指定生產(chǎn)者生產(chǎn)多少個數(shù)據(jù),也可以指定消費者消耗多少個數(shù)據(jù)。完成要求數(shù)據(jù) 的生產(chǎn)或消費以后,線程自動終止。(應(yīng)提供相應(yīng)的構(gòu)造函數(shù)來指定數(shù)據(jù)個數(shù)) c) 當(dāng)容器內(nèi)沒有數(shù)據(jù)時,Consumer 應(yīng)等待,等容器內(nèi)有新的數(shù)據(jù)后再次開始消費。
標(biāo)簽: Producer String Java 多線程
上傳時間: 2016-07-22
上傳用戶:yimoney
一個J2EE四層架構(gòu)的實例,采用jsp+javabean+sessionbean+entitybean做的,與大家共享: 1.開發(fā)環(huán)境用的jbuilder7.0+weblogic7.0+oracle9i(sqlserver2000) 2.sql語句如下: create table ejbAccounts (id varchar(15), bal float, type varchar(15)) 3.現(xiàn)在weblogic console下建立好數(shù)據(jù)源名:examples-dataSource-mssqlserverXAPool 4.可以用客戶端測試和網(wǎng)頁測試.
上傳時間: 2016-10-03
上傳用戶:zhouchang199
sms發(fā)送短信的程序,對于在linux環(huán)境下開發(fā)的人員很有用。 SMS-Dispatch is Linux console C++ program for SMS messages dispatch from preliminary prepared text file via circuit GSM phone in batch mode. Tested on Motorola C3xx phones. So you can create the report about users status for ex. and send it them as SMS.
上傳時間: 2014-08-30
上傳用戶:pkkkkp
sms發(fā)送短信的程序,可以在windows,和linux兩個環(huán)境下。 SMS-Dispatch is Linux console C++ program for SMS messages dispatch from preliminary prepared text file via circuit GSM phone in batch mode. Tested on Motorola C3xx phones. So you can create the report about users status for ex. and send it them as SMS.
上傳時間: 2013-12-23
上傳用戶:gdgzhym
a Java program that reads in the following values from the standard input device (i.e. Keyboard) and writes its result on the standard output device (i.e. console/Monitor): Inputs: A: the loan amount in dollars and cents (e.g. 150000.00). r: the net annual interest rate, expressed as an integer (e.g. 10 which means 10%) Y: the number of whole remaining years (for repayment) M: the number of remaining months Output: The program should calculate and output the amount of monthly repayments in dollars and cents as single value (e.g. $840.55)
標(biāo)簽: i.e. following the Keyboard
上傳時間: 2013-12-15
上傳用戶:米卡
使用Visual C++ 6.0開發(fā),純算法(不涉及進程和線程)模擬銀行家算法,測試通過,為我的操作系統(tǒng)實驗的雛形。console模式。
上傳時間: 2016-12-17
上傳用戶:cccole0605
自己編寫的String類,可以用于代替<string>中的string類。支持==、!=、<、>等比較運算符,=復(fù)制運算符,有多種構(gòu)造函數(shù),動態(tài)分配內(nèi)存,長度可變。容易轉(zhuǎn)換成char*類型,而且使用深拷貝,指針使用得當(dāng)。有常用的Index,Insert,Delete,Replace,SubString方法。而且源碼中給出了String類的一個小應(yīng)用。開發(fā)環(huán)境Visual C++ 6.0,測試程序為console模式。
上傳時間: 2014-01-05
上傳用戶:古谷仁美
用delphi編寫的my ie bar, ...console...IE_BAR...IETool...MouseHook
上傳時間: 2014-08-01
上傳用戶:來茴
SecureCRT 是高度可定制的終端仿真器,適用于 Internet 和 Intranet,支持 IPv6 標(biāo)準(zhǔn)。對于連接到運行 Windows、UNIX 和 VMS 的 遠程系統(tǒng)來說,SecureCRT 是理想的選擇。 主要特性: . 廣泛的終端仿真: VT100,VT102,VT220,ANSI,SCO ANSI,Xterm,Wyse 50/60, 和 Linux console 仿真(帶有 ANSI 顏色)。 . 優(yōu)秀的會話管理特性: 新的帶標(biāo)簽的用戶界面和 Activator 托盤工具,最小化桌面的雜亂。 會話設(shè)置可以保存在命名的會話中。 . 協(xié)議支持: 支持 SSH1,SSH2,Telnet,RLogin,Serial,和 TAPI 協(xié)議。 . Secure Shell: Secure Shell 加密登錄和會話數(shù)據(jù),包括以下支持: - 端口轉(zhuǎn)發(fā)使 TCP/IP 數(shù)據(jù)更安全 - 口令,公鑰,鍵盤交互和 Kerberos 驗證 - AES,Twofish,Blowfish,3DES,RC4,和 DES 加密 - X11 轉(zhuǎn)發(fā) . 文件傳輸工具: VCP 和 VSFTP 命令行公用程序讓使用 SFTP 的文件傳輸更安全。 . 腳本支持: 支持 VBScript 和 JScript 腳本語言。
上傳時間: 2013-12-19
上傳用戶:kikye
練習(xí)多任務(wù)實時操作系統(tǒng)下Task 調(diào)度、Task 間主要通信手段、I/O 子系統(tǒng)基本應(yīng)用 等內(nèi)容,并形成嵌入式實時應(yīng)用軟件的良好編程習(xí)慣。 內(nèi)容: 1. 創(chuàng)建多Task,為每個Task 創(chuàng)建私有的Message Queue,每個Task 只通過自己的私 有Message Queue 接收消息;Task 間消息通信通過向?qū)Ψ剿接蠱essage Queue 發(fā)送 消息完成。 2. Task1:管理Task。負責(zé)系統(tǒng)啟動時同步系統(tǒng)中其他Task 的啟動同步,利用信號量 的semFlush()完成。同時接收各Task 的告警信息,告警信息需編號以logmsg 方式 輸出。本task 負責(zé)系統(tǒng)結(jié)束時的Task 刪除處理。 3. Task2:console 命令行接收Task。接收并分析console 發(fā)來的命令行及參數(shù)。自行 設(shè)置5 種以上命令,并根據(jù)命令的內(nèi)容向Task3 發(fā)送激勵消息。同時實現(xiàn)系統(tǒng)退出 命令,使系統(tǒng)采用適當(dāng)方式安全退出。收到非法命令向Task1 告警。 4. Task3:console 輸出Task。接收需打印輸出的字串消息(命令),輸出到console。 收到長度為0 或超常字串向Task1 告警。 5. 在以下基本功能完成基礎(chǔ)上,自選擴展一項功能。
標(biāo)簽: Task 多任務(wù) 實時操作系統(tǒng) 子系統(tǒng)
上傳時間: 2017-06-11
上傳用戶:15736969615
蟲蟲下載站版權(quán)所有 京ICP備2021023401號-1