Многие программисты не используют, обрабатывает много по шаблону из-за плохой поддержки компилятора до недавнего времени. Однако, в то время как шаблоны имели много проблем в первенстве, более новые компиляторы имеют намного лучшую поддержку. Я пишу код, который должен работать с GCC на Mac и Linux, а также Microsoft Visual C++ и только с GCC 4 и VC ++ 2005 они, компилятор поддерживал стандарт действительно хорошо.
Универсальное программирование через шаблоны не что-то, в чем Вы нуждаетесь все время, но определенно полезный код для имения на панели инструментов.
очевидные контейнерные классы в качестве примера, но шаблоны также полезны для многих других вещей. Два примера от моей собственной работы:
If your site returns an HTTP response header like this:
Accept-Ranges: bytes
the PDF reader will close the intitial connection after reading just a few KB of the document. It then requests sections of the document as required with the Range request header, e.g.:
Range: bytes=242107-244329, 8060-76128
An example of a URL that does this is http://www.ovationguitars.com/img/OVmanual.pdf .
If you don't return the Accept-Ranges header then the PDF document will be downloaded in a single request (e.g. http://manuals.info.apple.com/en/iphone_user_guide.pdf )
You can see the behavior of the PDF reader in IE using HttpWatch.
** Disclaimer: This answer was posted by Simtec Limited, the makers of HttpWatch **
My thoughts are that you are spot on: your plug-in can not (and should not) split PDF's into requests.
I have a web application which serves PDF files from a request (a single request) and displays in a plug-in. It displays the entire PDF without getting any more information.
Also, if you are looking for a HTTP sniffer you could try Fiddler. I have found this useful during web site debugging.