從空格(ASCII碼32)到~(ASCII碼126)。表內的第一行與表頭相同,下面的每一行都與上一行的內容相同,只是字符相左移動了一個位置。這樣,下一行的最后一個字符與上一行的第一個字符相同。
為了進行文本編碼,可以任意選擇一個字符串,稱之為編碼字符串,也就是常說的密鑰。為解釋編碼方法,我們假設密鑰是Walrus,待編碼的文本(即常說的明文)是:
Meet me in St. Louis
我們在待編碼的文本之上重復書寫上述密鑰,使得其長度與待編碼文本相同:
WalrusWalrusWalrusWa
Meet me in St. Louis
從上述兩行文本中按列對應方式依次提取一個字符,可得到多個字符對:WM、ae、le等,這些字符對可用作上表的索引。這樣,依次以這些字符對作為索引可從上表查到一系列字符,這些字符就構成了文本編碼,即常說的密文。例如,第W行第M列隊應得字符是%,因此編碼的第一個字符就是%;第a行第e列對應的字符是G;第l行第e列對應的是R。依次進行上述查找操作,可以得到完整的密文
%Grgua=aVauGLol?eiAU
進行相反的操作就可對該文本解碼。
編寫編碼/解碼程序,可以對文本文件或鍵盤輸入的字符串進行編碼/解碼,在選擇編碼解碼后,需要提示用戶輸入密鑰。
This code detects memory leaks in embedded VC++ almost the same way crtdbg does in VC++. At the end of program execution it will display in the debug window if there were any memory leaks and how the memory looks so you can identify where your memory leak occurred. It will display in the debug window a message saying no memory leaks detected if there are no memory leaks. Similar to what crtdbg.h does in VC++. The code detects memory leaks generated with calls to new and delete operators in C++. The code doesn t detect memory leaks generated with C functions: malloc, calloc, free, but that can be done in the future. Let me know and I will program it.
This book isn t for uber-programmers who already have all the answers. If you think that J2EE does everything that you need it to do and you can make it sing, this book is not for you. Believe me, there are already enough books out there for you.
MFC Black Book
Introduction:
Are you an MFC programmer? Good. There are two types of MFC programmers. What kind are you? The first kind are the good programmers who write programs that conform to the way MFC wants you to do things. The second bunch are wild-eyed anarchists who insist on getting things done their way. Me, I’m in the second group. If you are in the same boat (or would like to be) this book is for you.
This book won’t teach you MFC—not in the traditional sense. You should pick it up with a good understanding of basic MFC programming and a desire to do things differently. This isn’t a Scribble tutorial (although I will review some fundamentals in the first chapter). You will learn how to wring every drop from your MFC programs. You’ll discover how to use, abuse, and abandon the document/view architecture. If you’ve ever wanted custom archives, you’ll find that, too.