The C language is like a carving knife: simple, sharp, and extremely useful in
skilled hands. Like any sharp tool, C can injure people who don’t know how to handle it.
This paper shows some of the ways C can injure the unwary, and how to avoid injury.
Imperfect C++ Practical Solutions for Real-Life Programming
C++, although a marvelous language, isn t perfect. Matthew Wilson has been working with it for over a decade, and during that time he has found inherent limitations that require skillful workarounds. In this book, he doesn t just tell you what s wrong with C++, but offers practical techniques and tools for writing code that s more robust, flexible, efficient, and maintainable. He shows you how to tame C++ s complexity, cut through its vast array of paradigms, take back control over your code--and get far better results.
P3.20. Consider an analog signal xa (t) = sin (2πt), 0 ≤t≤ 1. It is sampled at Ts = 0.01, 0.05,
and 0.1 sec intervals to obtain x(n).
b) Reconstruct the analog signal ya (t) from the samples x(n) using the sinc interpolation
(use ∆ t = 0.001) and determine the frequency in ya (t) from your plot. (Ignore the end
effects.)
C) Reconstruct the analog signal ya (t) from the samples x (n) using the cubic spline
interpolation and determine the frequency in ya (t) from your plot. (Ignore the end effects.)
當許多編程人員從事這項工作但又不使用源代碼管理工具時,源代碼管理幾乎不可能進行。Visual SourceSafe是Visual Basic的企業版配備的一個工具,不過這個工具目的是為了保留一個內部應用版本,不向公眾發布(應當說明的是,M i c r o s o f t并沒有開發Visual SourceSafe,它是M i c r o s o f t公司買來的) 。雖然Visual SourceSafe有幫助文本可供參考,但該程序的一般運行情況和在生產環境中安裝 Visual SourceSafe的進程都沒有詳細的文字說明。另外,Visual SourceSafe像大多數M i c r o s o f t應用程序那樣經過了很好的修飾,它包含的許多功能特征和物理特征都不符合 Microsoft Wi n d o w s應用程序的標準。例如,Visual SourceSafe的三個組件之一(Visual SourceSafe Administrator)甚至連F i l e菜單都沒有。另外,許多程序的菜單項不是放在最合適的菜單上。在程序開發環境中實現Visual SourceSafe時存在的復雜性,加上它的非標準化外觀和文檔資料的不充分,使得許多人無法實現和使用 Visual SourceSafe。許多人甚至沒有試用 Vi s u a l S o u r c e S a f e的勇氣。我知道許多高水平技術人員無法啟動Visual SourceSafe并使之運行,其中有一位是管理控制系統項目師。盡管如此,Visual SourceSafe仍然不失為一個很好的工具,如果你花點時間將它安裝在你的小組工作環境中,你一定會為此而感到非常高興。在本章中我并不是為你提供一些指導原則來幫助你創建更好的代碼,我的目的是告訴你如何使用工具來大幅度減少管理大型項目和開發小組所需的資源量,這個工具能夠很容易處理在沒有某種集成式解決方案情況下幾乎無法處理的各種問題。
1.1 概述本章首先介紹客戶-服務器事務概念。我們從使用 U D P的客戶-服務器應用開始,這是最簡單的情形。接著我們編寫使用 T C P的客戶和服務器程序,并由此考察兩臺主機間交互的T C P / I P分組。然后我們使用T / T C P,證明利用T / T C P可以減少分組數,并給出為利用 T / T C P需要對兩端的源代碼所做的最少改動。接下來介紹了運行書中示例程序的測試網絡,并對分別使用 U D P、T C P和T / T C P的客戶-服務器應用程序進行了簡單的時間耗費比較。我們考察了一些使用 T C P的典型I n t e r n e t應用程序,看看如果兩端都支持 T / T C P,將需要做哪些修改。緊接著,簡要介紹了 I n t e r n e t協議族中事務協議的發展歷史,概略敘述了現有的 T / T C P實現。本書全文以及有關T / T C P的文獻中,事務一詞的含義都是指客戶向服務器發出一個請求,然后服務器對該請求作出應答。 I n t e r n e t中最常見的一個例子是,客戶向域名服務器 ( D N S )發出請求,查詢域名對應的 I P地址,然后域名服務器給出響應。本書中的事務這個術語并沒有數據庫中的事務那樣的含義:加鎖、兩步提交、回退,等等。TCP IP詳解 卷1協議 :http://dl.21ic.com/download/tcpip-288223.html TCP IP詳解 卷2實現 :http://dl.21ic.com/download/tcpip-288224.html TCPIP詳解卷三:TCP事務協議,HTTP,NNTP和UNIX域協議 :http://dl.21ic.com/download/tcpip-288225.html