91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

資源簡介

在軟件的生命周期中,維護的花費通常占很大的比例,且幾乎所有的軟件,在其整個生命周期中,開發人員和維護人員都不盡相同。編碼規范可以改善軟件的可讀性,使程序員盡快而徹底地理解代碼;同時,編碼規范還可以提高程序代碼的安全性和可維護性,提高軟件開發的生產效率,所以,編碼規范對于程序員而言至關重要。 為使開發項目中所有的JAVA程序代碼的風格保持一致,增加代碼的可讀性,便于維護及內部交流,使JAVA程序開發人員養成良好的編碼習慣,有必要對JAVA程序的代碼編碼風格做統一的規范約束。本文檔定義了我公司軟件開發過程中使用的開發語言的編碼規范,指導軟件開發人員在進行項目開發過程中提高代碼質量、統一編碼要求。

資源截圖

代碼片段和文件信息

#include“GetInfo.h“
#define?space(s)?(s?==?‘?‘?||?s?==?‘\n‘?||?s?==?‘\t‘)
#define??SkipComment while?(?(?c?=?getc(f)?)?!=?‘\n‘?)
void?GetInfo::getname()
{???
char?Buffer[1000];
char?Fn[100];
int?AttCeiling=100;
int?ClassCeiling=100;
int ValCeiling;
filename.copy(Fnfilename.length());
Fn[filename.length()]=NULL;
????strcat_s(Fn“.names“);
if?(?!?(?Nf?=?fopen(Fn?“r“)?)?)?
Error(0?Fn?““);
ClassName?=?(string?*)?calloc(ClassCeiling?sizeof(string));
do
????{
????ReadName(Nf?Buffer);
????if?(?++MaxClassNo?>=?ClassCeiling)
????{
????????ClassCeiling?+=?100;
????????ClassName?=?(string?*)?realloc(ClassName?ClassCeiling*sizeof(string));
????}
????ClassName[MaxClassNo]=string(Buffer);
????}
????while?(?Delimiter?==?‘‘?);
/*??Get?attribute?and?attribute?value?names?from?names?file??*/
????AttName?=?(string?*)?calloc(AttCeiling?sizeof(string));
MaxAttValNo?=?(short?*)?calloc(AttCeiling?sizeof(short));
AttValName?=?(string?**)?calloc(AttCeiling?sizeof(string?*));
????SpecialStatus?=?(char?*)?malloc(AttCeiling);
????while?(?ReadName(Nf?Buffer)?)
????{
????if?(?Delimiter?!=?‘:‘?)?
Error(1?Buffer?““);
????????if?(?++MaxAttNo?>=?AttCeiling?)//擴大空間
????{
????????AttCeiling?+=?100;
????????AttName?=?(string?*)?realloc(AttName?AttCeiling*sizeof(string));
????????MaxAttValNo?=?(short?*)?realloc(MaxAttValNo?AttCeiling*sizeof(short));
????????AttValName?=?(string?**)?realloc(AttValName?AttCeiling*sizeof(string?*));
????????SpecialStatus?=?(char?*)?realloc(SpecialStatus?AttCeiling);
????}
????AttName[MaxAttNo]?=?string(Buffer);
????SpecialStatus[MaxAttNo]?=?0;
????MaxAttValNo[MaxAttNo]?=?0;
????ValCeiling?=?100;
????AttValName[MaxAttNo]?=?(string?*)?calloc(ValCeiling?sizeof(string));
????do
????{
????????if?(?!?(?ReadName(Nf?Buffer)?)?)?
Error(2?AttName[MaxAttNo]?““);
????????if?(?++MaxAttValNo[MaxAttNo]?>=?ValCeiling?)
????????{
????????ValCeiling?+=?100;
????????AttValName[MaxAttNo]?=(string?*)?realloc(AttValName[MaxAttNo]?ValCeiling*sizeof(string));
????????}
????????????AttValName[MaxAttNo][MaxAttValNo[MaxAttNo]]?=?string(Buffer);
????}while?(?Delimiter?==?‘‘?);
????if?(?MaxAttValNo[MaxAttNo]?==?1?)
????{
????????/*??Check?for?special?treatment??*/
????????if?(!strcmp(Buffer?“continuous“)?)
????????{
MaxContAttNo++;
}
?????????else
????????{
?????/*??Cannot?have?only?one?discrete?value?for?an?attribute??*/
?????????Error(3?AttName[MaxAttNo]?““);
????????}
????????MaxAttValNo[MaxAttNo]?=?0;
????}
????else?if?(?MaxAttValNo[MaxAttNo]?>?MaxDiscrValNo?)?
MaxDiscrValNo?=?MaxAttValNo[MaxAttNo];
????}
????fclose(Nf);
}
void???GetInfo::Error(int?n?string?s1?string?s2)
/*??-----??*/
{
????cout<<“ERROR:??“;
????switch(n)
????{
case?0:?cout<<“cannot?open?file?“< break;

case?1: cout<<“colon?expected?after?attribute?name?“< break;

case?2: cout<<“unexpected?EOF?while?reading?attribute?“<

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----

?????文件??????81920??2009-05-22?22:28??naive?Bayes\debug\naive?Bayes.exe

?????文件?????471384??2009-05-22?22:28??naive?Bayes\debug\naive?Bayes.ilk

?????文件?????568320??2009-05-22?22:28??naive?Bayes\debug\naive?Bayes.pdb

?????文件????????410??2009-05-22?22:06??naive?Bayes\naive?Bayes\buycom.data

?????文件????????114??2009-05-22?22:09??naive?Bayes\naive?Bayes\buycom.names

?????文件?????????23??2009-05-22?21:42??naive?Bayes\naive?Bayes\buytest.data

?????文件???????6986??2009-05-22?22:28??naive?Bayes\naive?Bayes\Debug\BuildLog.htm

?????文件??????82303??2009-05-22?16:05??naive?Bayes\naive?Bayes\Debug\GetInfo.obj

?????文件??????26312??2009-05-22?17:12??naive?Bayes\naive?Bayes\Debug\GetModel.obj

?????文件??????32343??2009-05-22?22:28??naive?Bayes\naive?Bayes\Debug\main.obj

?????文件?????????69??2009-05-22?22:28??naive?Bayes\naive?Bayes\Debug\mt.dep

?????文件????????403??2009-05-18?10:45??naive?Bayes\naive?Bayes\Debug\naive?Bayes.exe.embed.manifest

?????文件????????468??2009-05-18?10:45??naive?Bayes\naive?Bayes\Debug\naive?Bayes.exe.embed.manifest.res

?????文件????????385??2009-05-22?22:28??naive?Bayes\naive?Bayes\Debug\naive?Bayes.exe.intermediate.manifest

?????文件??????78205??2009-05-22?22:25??naive?Bayes\naive?Bayes\Debug\PredictClass.obj

?????文件?????248832??2009-05-22?22:28??naive?Bayes\naive?Bayes\Debug\vc80.idb

?????文件?????208896??2009-05-22?22:28??naive?Bayes\naive?Bayes\Debug\vc80.pdb

?????文件??????13506??2009-05-22?10:27??naive?Bayes\naive?Bayes\GetInfo.cpp

?????文件???????2622??2009-05-22?10:26??naive?Bayes\naive?Bayes\GetInfo.h

?????文件???????1177??2009-05-22?14:28??naive?Bayes\naive?Bayes\GetModel.cpp

?????文件????????401??2009-05-22?17:12??naive?Bayes\naive?Bayes\GetModel.h

?????文件????????415??2009-05-22?22:06??naive?Bayes\naive?Bayes\golf.data

?????文件????????118??2009-05-22?22:06??naive?Bayes\naive?Bayes\golf.names

?????文件????????169??2009-05-22?20:00??naive?Bayes\naive?Bayes\golftest.data

?????文件???????1879??2009-05-22?22:28??naive?Bayes\naive?Bayes\main.cpp

?????文件???????4436??2009-05-22?14:28??naive?Bayes\naive?Bayes\naive?Bayes.vcproj

?????文件???????1427??2009-05-22?22:29??naive?Bayes\naive?Bayes\naive?Bayes.vcproj.TATIN-9F882E67B.lzl.user

?????文件????????202??2009-05-19?10:03??naive?Bayes\naive?Bayes\naive.h

?????文件???????8104??2009-05-22?22:25??naive?Bayes\naive?Bayes\PredictClass.cpp

?????文件???????1285??2009-05-22?22:24??naive?Bayes\naive?Bayes\PredictClass.h

............此處省略12個文件信息

評論

共有 條評論