数据结构 外文翻译 外文文献 英文文献

上传人:1666****666 文档编号:37710312 上传时间:2021-11-04 格式:DOC 页数:15 大小:67.02KB
收藏 版权申诉 举报 下载
数据结构 外文翻译 外文文献 英文文献_第1页
第1页 / 共15页
数据结构 外文翻译 外文文献 英文文献_第2页
第2页 / 共15页
数据结构 外文翻译 外文文献 英文文献_第3页
第3页 / 共15页
资源描述:

《数据结构 外文翻译 外文文献 英文文献》由会员分享,可在线阅读,更多相关《数据结构 外文翻译 外文文献 英文文献(15页珍藏版)》请在装配图网上搜索。

1、外文翻译原文Computer programming data structure is an important theoretical basis for the design, it is not only the core curriculum of computer disciplines, and has become a popular elective course other Polytechnic professional, so studied this course well and studied computer are closely related.一、the

2、concept of data structureComputer data structure is the foundation of science and technology professional classes, is the essential core curriculum. All computer system software and application software to use various types of data structures. Therefore, if we want to make better use of computers to

3、 solve practical problems, only to several computer programming languages are difficult to cope with the many complex issues. To the effective use of computers, give full play to computer performance, but also must learn and master relevant knowledge of data structure. A solid foundation of data str

4、ucture for learning other computer professional courses, such as operating systems, translation theory, database management systems, software engineering, artificial intelligence, etc. are very useful.二、why should learn from data structure?In the early development of computers, the use of computer d

5、esigned primarily to deal with terms. When we use the computer to solve a specific problem, the following general needs through several steps : the first is a specific problem of appropriate abstract mathematical models, and then design or choose a mathematical model of the algorithm,the final proce

6、dures for debugging, testing, until they have the ultimate answer. Since then the object is INTEGER, REAL, BOOLEAN, the procedures of the main designers of energy is focused on programming skills, without attention to the data structure. With the expansion of computer applications and development of

7、 software and hardware, the issue of non-terms increasing importance. According to statistics, Now dealing with the issue of non-occupancy of more than 90% of the machine time. Such issues involve more complex data structure, the relationships between data elements generally can not be described by

8、mathematical formula. Therefore, the key to solving such problems is no longer mathematical analysis and calculations, but to devise appropriate data structure, can effectively address the problem. Description of the terms of such non-mathematical model is not a mathematical equation, but such as ta

9、bles, trees, such as map data structure. Therefore, it can be said that data structure courses primarily designed to study the issue of non-value calculation procedures as a computer operations and the relationship between objects and their operating disciplines. The purpose of the study is to under

10、stand the structure of data for computer processing of the identity object to the practical problems involved in dealing with that subject at the computer out and deal with them. At the same time, through training algorithms to improve the thinking ability of students through procedures designed to

11、promote student skills integrated applications and professional qualities.三、the concepts and terminologySystematic study of knowledge in the data structure before some of the basic concepts and terminology to give a precise meaning. Data (Data) is the information carrier, it could be computer identi

12、fication, storage and processing. It is the computer processing of raw materials, a variety of data processing applications. Computer science, computer processing is the so-called data objects, which can be numerical data can be non - numerical data. Numerical data are integer, the actual number or

13、plural, mainly for engineering computing, scientific computing and commercial processing; Non - numerical data, including characters, text, graphics, images, voice and so on.Data elements (Data Element) is the basic unit of data. In different conditions, data elements can be called elements, nodes,

14、the peak, recording. For example, students information retrieval system table information, a record high, 8 Queens issue of a state tree, teaching programming issues such as a peak, known as a data element. Sometimes, a data from a number of data elements (Data Item), for example, the student inform

15、ation management system students each data element table is a student record. It includes students of the school, name, sex, nationality, date of birth, performance data items. These data items can be divided into two types : one called early such as student gender, origin, etc., these data were no

16、longer divided in data processing, the smallest units; Another called portfolio, the performance of students who, it can be divided into mathematics, physics, chemistry and other smaller items. Normally, in addressing the question of the practical application of each student is recorded as a basic u

17、nit for a visit and treatment.Data objects (Data Object) or data element type (Data Element Class) is the nature of the data elements with the same pool. In a specific issue, the data elements have the same nature (not necessarily equal value elements), belonging to the same data objects (data eleme

18、nt type), the data element is an example of such data elements. For example, traffic information systems in the transportation network, is a culmination of all the data elements category, peak a and B each represent an urban middle is the data elements of the two types of examples of the value of th

19、eir data elements a and B respectively. Data structure (Data Structure) refers to the mutual relationship that exists between one or more data elements together. In any case, between data elements will not be isolated in between them exist in one way or another, such as the relationship between the

20、data element structure. According to the data elements of the relationship between different characteristics, usually have the following four basic categories of the structure : 1 assembly structures. In the assembly structure, the relationship between data elements is belonging to the same pool. As

21、sembly elements relations is a very loose structure. 2 linear structures. The structure of the data elements exist between one-to-one relationship. 3 tree structure. The structure of the data elements exist between hierarchical relationship. 4graphics structure. The structure of the data elements of

22、 the relationship that existed between Duoduiduo, graphics structure also known as network structure.C+Builder programming experience一、Database programmingAnd the use of Delphi, Borland C+Builder BDE (Borland Database Engine) database interface, in particular its use BDE Administrator unified manage

23、ment database alias, the database operation has nothing to do with the location of the database documents, thus enabling database development easier operation. But in a database application procedures at the same time we have to release BDE, the database for some simple procedures may BDE than our o

24、wn design procedures big, but as the use of BDE InstallShield, add database alias is likely allocation failure. Therefore, we can use the following methods : still in the design stage procedure using BDE alias management database for debugging, but in procedures substantially (as in the main Chuangt

25、i OnCreate event processing function) to Table components DatabaseName attributes, such as the use of similar phrases as follows : Table1-DatabaseName = ExtractFilePath (Application-ExeName); Or Table1-DatabaseName = ExtractFilePath (Application-ExeName+ DB);Thus, no impact on the debugging phase, w

26、ill be issued if the application procedures Table1 document on the use of databases or their current catalogue DB virus, database procedures can be normal operation. You can even be a database to catalogue the documents in the form of character string Register (installed in the installation process)

27、, then the procedure in the acquisition of substantially from the catalogue of payrolls, Fuzhi DatabaseName attribute to be. Anyway, you do not need to install relatively large BDE forced users.二、the Registry visitAs in the design process we often required 9x/NT Windows Registry information visit, s

28、uch as retrieval of information procedures, preservation of information. Register write a subroutine to visit necessary. When the Register to visit, the library will be directly available without always some duplication operation. The following can be used to access cosmetic Licheng, the character s

29、tring type Jianzhi, and the retrieval of failure to return default value Default.#include int ReadIntFromReg(HKEY Root, AnsiString Key,AnsiString KeyName, int Default) int KeyValue;TRegistry *Registry = new TRegistry();Registry-RootKey = Root;Registry-OpenKey(Key, false);try KeyValue = Registry-Read

30、Integer(KeyName);catch(.) KeyValue = Default;delete Registry;return KeyValue;void SaveIntToReg(HKEY Root, AnsiString Key,AnsiString KeyName, int KeyValue) TRegistry *Registry = new TRegistry();Registry-RootKey = Root;Registry-OpenKey(Key, true);Registry-WriteInteger(KeyName, KeyValue);delete Registr

31、y;char *ReadStringFromReg(HKEY Root, AnsiString Key,AnsiString KeyName, char *Default) AnsiString KeyValue;TRegistry *Registry = new TRegistry();Registry-RootKey = Root;Registry-OpenKey(Key, false);try KeyValue = Registry-ReadString(KeyName);catch(.) KeyValue = (AnsiString)Default;delete Registry;re

32、turn KeyValue.c_str();void SaveStringToReg(HKEY Root, AnsiString Key, AnsiString KeyName, char *KeyValue) TRegistry *Registry = new TRegistry();Registry-RootKey = Root;Registry-OpenKey(Key, true);Registry-WriteString(KeyName, (AnsiString)KeyValue);delete Registry; We may use the following access met

33、hods (to Windows wallpaper documents) :AnsiString WallPaperFileName = ReadStringFromReg(HKEY_CURRENT_USER,Control PanelDesktop, Wallpaper, );三、show / hide icons task column Standard Windows applications generally operating in the mission mandate column on the chart shows, users can directly use the

34、mouse clicking column logo for the mission task cut over, but some applications do not use task column signs, such as the typical Office tools, There are also procedures that can be shown or hidden customization tasks column icon, such as Winamp. We can do the procedure, as long as access Windows Se

35、tWindowLong function can drive, as follows : / hidden task column chart : SetWindowLong (Application-Handle. GWL_EXSTYLE, WS_EX_TOOLWINDOW); / task column shows signs : SetWindowLong (Application-Handle. GWL_EXSTYLE, WS_EX_APPWINDOW);四、the establishment of a simple on windowA complete Windows applic

36、ations typically contain a on the window to show version information. We customized a dialog box as usual on the window of the on free customized window, indicates that more information, even including super links. If only show simple version information, Windows ShellAbout function shelf items have

37、 sufficient, following this line of code can be on Duihuakuang and is Windows standard on the Duihuakuang and procedures may show signs such as the use of resources and systems. ShellAbout (Handle, ( on +Application-Title+ #). C_str () ( n +Application-Title+ V1.0nn + 夏登城 版权所有!). C_str () Applicatio

38、n-Icon-Handle);五、the two methods to choice catalogueIn our applications, allowing users to choose the regular catalogue, such as software manufacturers, users choose catalogue. This involves catalogue option, we may use the following methods for users to choose one of the catalogue : 1, use SHBrowse

39、ForFolder and SHGetPathFromIDList function; Company affirms its function as follows : WINSHELLAPI LPITEMIDLIST WINAPI SHBrowseForFolder(LPBROWSEINFO lpbi); WINSHELLAPI BOOL WINAPI SHGetPathFromIDList(LPCITEMIDLIST pidl, LPSTR pszPath); LPBROWSEINFO和LPITEMIDLIST structure refer Win32 files. This meth

40、od of selecting catalogues available Windows desktop all available inventory, including networks of other computers sharing catalogue neighbors, but not the new catalogue. Li Cheng allows users to choose the following directory, the directory of choice Licheng return at all trails character string.#

41、include char *GetDir(char *DisplayName, HWND Owner) char dirMAX_PATH = ;BROWSEINFO *bi = new BROWSEINFO;bi-hwndOwner = Owner;bi-pidlRoot = NULL;bi-pszDisplayName = NULL;bi-lpszTitle = DisplayName;bi-ulFlags = BIF_RETURNONLYFSDIRS;bi-lpfn = NULL;bi-lParam = NULL;bi-iImage = 0;ITEMIDLIST *il = SHBrows

42、eForFolder(bi);if(il!=NULL) SHGetPathFromIDList(il, dir);delete bi;return dir;We can use the following list to be chosen from : AnsiString at Dir = (AnsiString) GetDir ( Please select catalogue : Handle);2, the use of SelectDirectory function. C+Builder the function SelectDirectory achievable catalo

43、gue of options, which showed that similar open / preserve Duihuakuang, but its advantage is to use / non-use keyboard input catalogue members, and allow the creation of new directories. Its original definition as follows : Extern package bool _fastcall SelectDirectory ( AnsiString &Directory, TSelec

44、tDirOpts Options, 103-116 HelpCtx); Licheng SelectDir allow you to choose the following directory : #include AnsiString SelectDir(AnsiString Dir) if(SelectDirectory(Dir, TSelectDirOpts() sdAllowCreate sdPerformCreate DatabaseName = ExtractFilePath(Application-ExeName);或 Table1-DatabaseName = Extract

45、FilePath(Application-ExeName+”DB”); 这样,对调试阶段没有什么影响,发布应用程序时只要将Table1使用的数据库文件放在当前目录或其“DB”子目录下,数据库程序即可正常运行。甚至您还可以将数据库文件所在目录以字符串形式写入注册表(可在安装程序中设置),然后在程序初始化时从注册表获取目录名,赋值给DatabaseName属性即可。无论怎样,您不必强迫用户安装相对庞大的BDE了。二、 注册表存取 在我们在设计Windows 9x/NT程序时经常需进行注册表信息的存取,如读取程序配置信息、保存配置信息等。写一个注册表存取子程序就很有必要。当需存取注册表时,直接调用此

46、子程序即可,而不必每次都重复一些操作。下面的例程可用来存取整型、字符串型键值,并可在读取失败时返回缺省值Default。 #include int ReadIntFromReg(HKEY Root, AnsiString Key,AnsiString KeyName, int Default) int KeyValue;TRegistry *Registry = new TRegistry();Registry-RootKey = Root;Registry-OpenKey(Key, false);try KeyValue = Registry-ReadInteger(KeyName);cat

47、ch(.) KeyValue = Default;delete Registry;return KeyValue;void SaveIntToReg(HKEY Root, AnsiString Key,AnsiString KeyName, int KeyValue) TRegistry *Registry = new TRegistry();Registry-RootKey = Root;Registry-OpenKey(Key, true);Registry-WriteInteger(KeyName, KeyValue);delete Registry;char *ReadStringFr

48、omReg(HKEY Root, AnsiString Key,AnsiString KeyName, char *Default) AnsiString KeyValue;TRegistry *Registry = new TRegistry();Registry-RootKey = Root;Registry-OpenKey(Key, false);try KeyValue = Registry-ReadString(KeyName);catch(.) KeyValue = (AnsiString)Default;delete Registry;return KeyValue.c_str(

49、);void SaveStringToReg(HKEY Root, AnsiString Key, AnsiString KeyName, char *KeyValue) TRegistry *Registry = new TRegistry();Registry-RootKey = Root;Registry-OpenKey(Key, true);Registry-WriteString(KeyName, (AnsiString)KeyValue);delete Registry; 我们可使用如下调用方法(获得Windows墙纸文件名): AnsiString WallPaperFileNa

50、me = ReadStringFromReg(HKEY_CURRENT_USER,Control PanelDesktop, Wallpaper, );三、 显示/隐藏任务栏图标 标准的Windows应用程序运行时一般都会在任务栏上显示任务图标,用户可直接用鼠标点击任务栏图标进行任务切换,但有些应用程序不使用任务栏图标,如典型的Office工具条,也有些程序可由用户定制显示方式显示或隐藏任务栏图标,如Winamp。我们的程序中也可以做到,只要调用Windows API函数SetWindowLong即可,如下: / 隐藏任务栏图标:SetWindowLong(Application-Handle

51、, GWL_EXSTYLE, WS_EX_TOOLWINDOW);/ 显示任务栏图标:SetWindowLong(Application-Handle,GWL_EXSTYLE, WS_EX_APPWINDOW);四、 建立简单的“关于”窗口 一个完整的Windows应用程序一般都包含一个“关于”窗口,用以显示版本信息等。通常我们是定制一个对话框作为“关于”窗口,当然这样的“关于”窗口可以自由定制,显示更多信息,甚至可包括超链接。但如只需显示简单版本信息等,Windows Shell Library 函数ShellAbout已足够了,下面这行代码就可以显示“关于”对话框,而且是Windows标准

52、的“关于”对话框,同时可显示程序图标和系统资源使用情况等。 ShellAbout(Handle, (关于+Application-Title+#).c_str(),(n+Application-Title+ V1.0nn+夏登城 版权所有!).c_str(),Application-Icon-Handle);五、 选择目录的两种方法 在我们的应用程序中经常需让用户选择目录,如杀毒软件中用户选择处理目录等。这就涉及目录的选择,我们可使用如下方法之一让用户选择目录: 1、 使用SHBrowseForFolder和SHGetPathFromIDList函数;其函数原形申明如下: WINSHELLAP

53、I LPITEMIDLIST WINAPI SHBrowseForFolder(LPBROWSEINFO lpbi); WINSHELLAPI BOOL WINAPI SHGetPathFromIDList(LPCITEMIDLIST pidl, LPSTR pszPath); LPBROWSEINFO和LPITEMIDLIST的结构请参考Win32文档。这种方法选取目录可获得Windows桌面下所有可用的目录,包括网络邻居中其它计算机的共享目录等,但不可新建目录。下面的例程可让用户选择目录,该例程返回指向所选择目录的全路径字符串。 #include char *GetDir(char *Di

54、splayName, HWND Owner) char dirMAX_PATH = ;BROWSEINFO *bi = new BROWSEINFO;bi-hwndOwner = Owner;bi-pidlRoot = NULL;bi-pszDisplayName = NULL;bi-lpszTitle = DisplayName;bi-ulFlags = BIF_RETURNONLYFSDIRS;bi-lpfn = NULL;bi-lParam = NULL;bi-iImage = 0;ITEMIDLIST *il = SHBrowseForFolder(bi);if(il!=NULL) S

55、HGetPathFromIDList(il, dir);delete bi;return dir;我们可作如下调用得到选择的目录名: AnsiString Dir = (AnsiString)GetDir(请选择目录:, Handle);2、 使用SelectDirectory函数。C+Builder提供的函数SelectDirectory可实现目录名的选择,它显示的是类似“打开”/“保存”的对话框,但其优点是可使用/不使用键盘输入目录名,并允许创建新目录。其原形定义如下: extern PACKAGE bool _fastcall SelectDirectory(AnsiString &Directory, TSelectDirOpts Options, int HelpCtx);下面的例程SelectDir允许您选择目录: #include AnsiString SelectDir(AnsiString Dir) if(SelectDirectory(Dir, TSelectDirOpts() sdA

展开阅读全文
温馨提示:
1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
2: 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
3.本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 装配图网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
关于我们 - 网站声明 - 网站地图 - 资源地图 - 友情链接 - 网站客服 - 联系我们

copyright@ 2023-2025  zhuangpeitu.com 装配图网版权所有   联系电话:18123376007

备案号:ICP2024067431-1 川公网安备51140202000466号


本站为文档C2C交易模式,即用户上传的文档直接被用户下载,本站只是中间服务平台,本站所有文档下载所得的收益归上传人(含作者)所有。装配图网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。若文档所含内容侵犯了您的版权或隐私,请立即通知装配图网,我们立即给予删除!