Many applications use connection/object pool. A program may require a IMAP connection pool and LDAP connection pool. One could easily implement a IMAP connection pool, then take the existing code and implement a LDAP connection pool. The program grows, and now there is a need for a pool of threads. So just take the IMAP connection pool and convert that to a pool of threads (Copy, paste, find, replace????). Need to make some changes to the pool implementation? Not a very easy task, since the code has been duplicated in many places. Re-inventing source code is not an intelligent approach in an object oriented environment which encourages re-usability. It seems to make more sense to implement a pool that can contain any arbitrary type rather than duplicating code. How does one do that? The answer is to use type parameterization, more commonly referred to as templates.
標簽: connection pool applications program
上傳時間: 2013-12-25
上傳用戶:playboys0
10?!队糜谧顑灮挠嬎阒悄堋?,Nirwan Ansali,Edwin Hou著,李軍,邊肇棋譯 清華大學出版社 1999年第一版 本書從討論組合優化中的基本問題——NP問題入手,系統地講述了近年來所發展起來的智能最優化的各種技術和方法,其中包括啟發式搜索、Hopfield神經網絡、模擬退火和隨機機、均場退火以及遺傳算法等;并在此基礎上,通過一些典型的應用問題,如旅行商問題、模式識別中的點模式匹配問題、通信和任務調度等問題進一步闡明以上一些基本方法怎樣用來解決這些原來具有NP性質的困難問題。本書是作者在美國新澤西州理工學院多年講授有關課程的基礎上寫成的。全書深入淺出,理論聯系實際。為幫助學生掌握基本概念,提高學習能動性,各章編寫了習題。本書可作為通信、計算機、控制各專業的高年級學生和研究生學習有關課程的教材。它對于廣大科研工作者也是一本很有實際價值的參考書。
標簽: 計算
上傳時間: 2014-01-26
上傳用戶:Shaikh
利用瀏覽器隱藏圖片 運行環境:XPSP2+IE6.0和TT;VC++ 6.0 注意事項:工程壓縮包中的convert\Release\convert.exe是示例程序。 在這個目錄中有兩個BMP文件,其中2.bmp是經過我用PhotoShop處理過的,用來做隱藏文件。1.bmp是正常顯示的文件。 運行程序后選擇輸出的圖片名若為3.bmp,直接雙擊a.htm就可以測試合成文件。否則需要修改a.htm中的文件名。
標簽: convertReleaseconvert 6.0 XPSP BMP
上傳時間: 2015-08-29
上傳用戶:hn891122
JavaGPS is a Java-only base library that enables access to GPS devices from within any Java application. Provides Java API, NMEA0183 parser, record and playback GPS log files, convert between earth dates and Gauss Krueger, GPS management GUI with map..
標簽: Java-only applicat JavaGPS enables
上傳時間: 2013-12-26
上傳用戶:aeiouetla
用遺傳算法解0/1背包問題,背包問題是著名的NP完備類困難問題,此處給出解法。
上傳時間: 2014-01-25
上傳用戶:caiiicc
英文資料。利用蟻群算法正反饋、并行計算的優點,將蟻群算法用于求解典型的NP-hard問題—旅行商問題。
上傳時間: 2015-10-16
上傳用戶:
編寫驅動程序工具: 使用Numega Stdio中的工具,SOURCE to Project Utilitity 點擊"開始"->程序->Numega DriverStdio->Tools->Source to DSP Convert 在SOURCE框中選擇你DDK的程序中的SOURCE文件,然后選擇VC6.0(or VC5.0),點擊Create ,你就可以在 VC中編譯了。
上傳時間: 2013-12-26
上傳用戶:天涯
0_1背包問題,回溯法解背包問題 0-l背包問題是子集選取問題。一般情況下,0-1背包問題是NP難題。0-1背包 問題的解空間可用子集樹表示。解0-1背包問題的回溯法與裝載問題的回溯法十分類 似。在搜索解空間樹時,只要其左兒子結點是一個可行結點,搜索就進入其左子樹。當 右子樹有可能包含最優解時才進入右子樹搜索。否則將右子樹剪去。設r是當前剩余 物品價值總和;cp是當前價值;bestp是當前最優價值。當cp+r≤bestp時,可剪去右 子樹。計算右子樹中解的上界的更好方法是將剩余物品依其單位重量價值排序,然后 依次裝入物品,直至裝不下時,再裝入該物品的一
上傳時間: 2014-01-17
上傳用戶:小碼農lz
This leon3 design is tailored to the Altera NiosII Startix2 Development board, with 16-bit DDR SDRAM and 2 Mbyte of SSRAM. As of this time, the DDR interface only works up to 120 MHz. At 130, DDR data can be read but not written. NOTE: the test bench cannot be simulated with DDR enabled because the Altera pads do not have the correct delay models. * How to program the flash prom with a FPGA programming file 1. Create a hex file of the programming file with Quartus. 2. Convert it to srecord and adjust the load address: objcopy --adjust-vma=0x800000 output_file.hexout -O srec fpga.srec 3. Program the flash memory using grmon: flash erase 0x800000 0xb00000 flash load fpga.srec
標簽: Development Startix2 tailored Altera
上傳時間: 2014-01-19
上傳用戶:chongcongying
麻省理工學院(MIT)的《算法導論》課程講義。 配套教材算法導論(Introduction to Algorithms)一書,全面地介紹了計算機算法。對每一個算法的分析既易于理解又十分有趣,并保持了數學嚴謹性。本書的設計目標全面,適用于多種用途。涵蓋的內容有:算法在計算中的作用,概率分析和隨機算法的介紹。本書專門討論了線性規劃,介紹了動態規劃的兩個應用,隨機化和線性規劃技術的近似算法等,還有有關遞歸求解、快速排序中用到的劃分方法與期望線性時間順序統計算法,以及對貪心算法元素的討論。本書還介紹了對強連通子圖算法正確性的證明,對哈密頓回路和子集求和問題的NP完全性的證明等內容。該書提供了900多個練習題和思考題以及敘述較為詳細的實例研究。 本講義可以作為原書的參考資料使用,使得您學習《算法導論》之過程如魚得水。
標簽: Introduction Algorithms MIT 算法
上傳時間: 2013-12-19
上傳用戶:宋桃子