⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 intro.htm

📁 有基本了解的程序员或程序爱好者而做
💻 HTM
📖 第 1 页 / 共 2 页
字号:
Call me an anarchist, but when it comes to accessing technical information, I just don't believe that one size fits all. Not one size window, not one size font, not one size image, not one size file. Your window system and browser let you control the window and font sizes you see, but to gain greater control over the appearance and behavior of the material on this CD, you'll need to take advantage of its configuration options.The first thing you need to know is that each image on this CD is stored five times, each copy being a different size. As a general rule, the bigger the size of your screen and the higher the resolution of your graphics card, the larger the image you'll want to view. Of course, what really matters is what looks good to you. If you like tiny images on a big monitor, or if you prefer huge images on a small screen, you won't see me making a fuss. I'm the anarchist, remember? Furthermore, if your preference changes (at any time, for any reason), you can make an on-the-spot modification to how images are displayed. Your new preference will take effect immediately.To change the size of images displayed in text (i.e., outside the Navigation Area), select a different icon in the "Images" portion of the Navigation Area. Try it now to see how the following diagram changes. (The diagram itself shows the hierarchy of diagnostics classes in the standard C++ library. You'll find this diagram in Item 49 of Effective C++ and Item 12 of More Effective C++.)Similarly, you can adjust the size of the Navigation Area (including its associated images) by selecting different icons in the "Nav Size" portion of the Navigation Area but don't do it yet! When you change the size of the Navigation Area, your browser will reload this file, and you'll find yourself back at the top of the document instead of here looking at this paragraph. This "feature" is built into browsers, and there's no way around it. (We tried. Believe me, we tried.)Now that you know that changing the size of the Navigation Area will put you back at the top of the current document, go ahead and give the underlying JavaScript some exercise by playing with the size of the Navigation Area. Later, when I describe paragraph-specific bookmarking, you'll see how you can mark your place in a document so you can return to it easily.As I noted in my earlier discussion of your search options, there's a trade-off to be made between the size of an HTML File and the effectiveness of your browser's search command. This put me in a difficult position when designing the CD, because I didn't know what to optimize for. My solution was to kick the problem back to you. There are three copies of each book on this CD, each made up of files of different sizes. You thus have three choices for what I call the books' chunk size.Item-length chunking puts each Item in a separate file. The files are small, they load quickly, and they require little memory. Browser-based searches work on only a single Item at a time, however, so you'll probably employ alternative search options much of the time. Item-length chunking is the default.Chapter-length chunking puts each chapter in a separate file. Effective C++ has seven chapters, plus an additional chunk for each component of the book's "front matter" (dedication, preface, acknowledgments, etc.) and one for the book's Afterword. More Effective C++ has six chapters, plus a chunk for each front matter component, a chunk for Recommended Reading, and a chunk for its implementation of auto_ptr. The amount of material in each chunk varies, but most chunks hold enough to fill about 20-40 pages in the printed books.Book-length chunking has a single file for each book. It requires a certain degree of patience and a fair amount of RAM.To select your preferred chunk size, just click on the appropriate icon in the "Chunks" portion of the Navigation Area. You say it's not obvious which icon is appropriate? Just move your cursor over each icon and wait a moment. Your browser will then provide you with a short description of the icon's meaning. Depending on your browser, the description will appear either in the browser's status bar or as a pop-up "tool tip"-like window.Just as changing the size of the Navigation Area reloads files and puts you at the top of the current document (see above), changing your preferred book chunk size has a similar effect. However, if you change your preferred chunk size while inside a book, the page that's reloaded will be the book's table of contents, not the part of the book you're viewing. For example, if you're viewing Item 50 of Effective C++ and you change your chunk size setting, you'll find yourself back at the table of contents for Effective C++. In addition, the search applet will reinitialize itself the next time you perform a search. (All this reloading and reinitializing is necessary to make various links work the way they're supposed to, but I'll spare you the details. Suffice it to say we wouldn't inflict this on you if we knew of an easy way to avoid it.)Links and BookmarksThere are three kinds of links on this CD: links within a source of information (e.g., a link from one Item in Effective C++ to another Item in that same book), links between sources of information (e.g., from a magazine article to a book Item, from an Item in one book to an Item in the other book, or from a book to a magazine article), and links from the CD to sites on the Internet. Before following a link, it's often useful to know which of these three types you're confronting. This is particularly important when dealing with links to the Internet, as you probably don't want to follow them if you're working off-line.There's nothing special about links within a source of information; they look just like normal links in your browser. So if you see a link to Item 14 and you're reading More Effective C++, you can rest assured that that's a link to Item 14 of the same book. Links to a book Item from outside that book prepend "E" or "M" to the Item number, depending on the book the link goes to. Hence, any reference to Item E14 will take you to Item 14 of Effective C++, while any reference to Item M14 will take you to Item 14 of More Effective C++. The encoding doesn't get any more complicated than that, because links to magazine articles or this Introduction to the CD, etc., make their target explicit in the text making up the link.Links to Internet sites are preceded by the "" symbol. (You probably noticed this symbol preceding some links earlier in this file.) For example, here's a link to the web site for the Wildlife Preservation Trust International, a conservation organization whose work I admire and support. However, it doesn't go directly to that site. Internet addresses change too often for that. Instead, like all links from this CD to the Internet, it goes to the Addison-Wesley web site, where it's translated into the correct URL (to the best of AW's knowledge), and your browser is then automatically forwarded to the correct place in cyberspace. Going indirect via AW's web site for Internet links imposes a small performance penalty, but I think it's more than made up for by the fact that when a URL changes, all AW has to do is update its translation table, and your CD continues to work.The flip side to the links on the CD is your ability to create links into the material on the CD. For example, suppose you'd like to create links from your corporate coding guidelines to some of my books' Items. That's easy to do, because each Item in each copy of each book (see above for information on selecting a preferred chunk size) is preceded by an HTML anchor (i.e., <a> tag). Such anchors are not enough, however, because sometimes you'd like to link to material in the middle of an Item. Item M28 on Smart Pointers, for example, covers more than 20 pages in the printed book, so you might want to create a link that leads specifically to my discussion of how to emulate inheritance-based implicit type conversions among smart pointer types. I address that topic over halfway through the Item, and it's reasonable to want to jump directly to that discussion.To facilitate the creation of such links, each paragraph on this CD whether in a book, a magazine article, or a document such as this has an associated HTML anchor. (By "paragraph" here, I include Item titles, section headings, entries in tables of contents, etc.) That means you can create a link to any paragraph you like. To do it, however, you need to know the URL for each paragraph, and we've made getting that information easy.You've doubtless noticed the odd-looking symbol at the end of each paragraph in this document. Every paragraph on the CD ends with one, and each paragraph's is a link to the beginning of that paragraph. Clicking on a thus jumps you to the beginning of the paragraph. That's not really why it exists, however (although it does provide a convenient way to skim forward a few paragraphs at a time try it). Rather, it exists to make it easy to obtain the paragraph's unique URL.To discover the URL for a particular paragraph, move your cursor over that paragraph's , then use your browser to copy the corresponding URL to the clipboard. (In Netscape Navigator, you do this by right-clicking the and selecting "Copy Link Location." Using Internet Explorer, you right-click the and select "Copy Shortcut." If you're on a Mac, you click-hold rather than right-click.) Once the paragraph's URL is on the clipboard, you can paste it into other HTML documents, and shazaam! you're linked to the paragraph. Diagrams and code examples lack symbols, so to link to one of those, just link to the preceding paragraph.You'll need to use the symbols to create bookmarks, too, because your browser's standard bookmarking capability is, frankly, unreliable. That is, the usual "Add Bookmark" or "Add to Favorites" command will frequently not do what you want. The reasons for this are many and varied,2 but the bottom line is that use of your browser's standard bookmarking command can only lead to frustration and disappointment.Nonetheless, bookmarking is a crucial capability, so the CD supports an alternative mechanism that does work. When you move your cursor over a paragraph's , a textual identification of the paragraph will automatically appear. This text is the bookmark description that will be generated if you bookmark that paragraph. For example, if you move your cursor over the at the end of this paragraph, you'll see "CD Intro, P63" appear after the . (The "P63" indicates that this is the 63rd paragraph in this document.)If you're using Netscape Navigator, you bookmark a paragraph by right-clicking (or, on a Mac, click-holding) on the textual description following the paragraph's (not on the itself!), then selecting "Add Bookmark" from the resulting pop-up menu. If you're using Internet Explorer, you drag the paragraph description (the one that appears when you move your cursor over the paragraph's ) to your "Favorites" menu. Once you get used to it, you'll wish all web sites offered this kind of reliable, fine-grained control over bookmarking.Because links and bookmarks refer to specific files, they take no notice of your chunk size preference. As a result, if you're using Chapter-length chunking while viewing Effective C++ and you create a link to or set a bookmark at, say, the third paragraph of Item 44, following that link or jumping to that bookmark will always take you to a Chapter-length file, even if you've since switched to Item-length or Book-length chunking. Oh well.Annotating the CD (Sort Of)Wouldn't it be great if you could add your own comments to the material on this CD? Sure it would. Alas, the "RO" in "CD-ROM" stands for "Read-Only," so modifying the files on the disc is tough. Furthermore, most web browsers are just that, browsers. They view web pages, they don't edit them. Of course, if you've chosen to copy this CD to a hard drive and if your web browser offers editing capabilities, you can modify the files in any way you choose. Still, the fact remains that, generally speaking, annotating the CD borders on the impossible.I don't know how to cross that border, but here's one way to lean heavily against it. Create an HTML document containing the annotations you'd like to add to the CD. Using the paragraph-specific bookmarking capability described above, link each annotation to the paragraph to which it pertains. This is far from perfect, but it's better than nothing, and remember, those of us working on the CD are wrestling with a read-only medium and the constraints of the most popular browsers. Trust me when I tell you we're trying as hard as we can.Running Off a Hard DriveIf you'd prefer to access the material on this CD from a hard drive, all you need to do is copy the files over. Be sure to preserve the directory structure during the copy. You can then invoke your browser on the copy of INDEX.HTM on your hard drive, and everything will work as if you were running off the CD.AcknowledgmentsIf it takes a village to make a CD, among the more prominent villagers behind this disc are my colleagues at Addison-Wesley: Jason Jones, Marty Rabinowitz, John Wait, and Sarah Weaver. For months the five of us have debated design alternatives, wrestled with implementation difficulties, reviewed prototypes, plotted strategy, and otherwise laid siege to a project that too often resembled a fifty-headed hundred-handed monster. Others at AW contributed to the project, but Jason, Marty, John, and Sarah were there on the front lines every day 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -