Posts

Showing posts from 2010

Xerces-C++: XML Parser for C++

Some useful links: Class Index:  http://xerces.apache.org/xerces-c/apiDocs-3/classes.html Processing XML with Java:  http://www.cafeconleche.org/books/xmljava/chapters/index.html Help you use Xerces-C++. Using DOM API:  http://xerces.apache.org/xerces-c/program-dom-3.html#UsingDOMAPI Always being used in Xerces-C++.

Data Conversions C++

How to: Convert Between Various String Types // -- Decimal Conversions // Decimal To Hex // Use _itoa( ) function and set radix to 16. In hexstring is 1e. char hexstring[10]; int number = 30; itoa( number, hexstring, 16); // Hex To Decimal char * hexstring= "ABCDEF"; char * p; int number = strtol(hexstring, &p,16); bool HexToDecimal (char* HexNumber, int& Number) { char* pStopString; Number = strtol (HexNumber, &pStopString, 16); return (bool)(Number != LONG_MAX); } // Decimal to time char *DecToTime(float fTime, char *szTime) { int nHrs, nMin, nSec; fTime *= 3600; nHrs = (int)fTime / 3600; nMin = (int)(fTime - nHrs * 3600) / 60; nSec = (int)(fTime - nHrs * 3600 - nMin * 60); wsprintf(szTime, "%02d.%02d.%02d Hrs.Min.Sec.", nHrs, nMin, nSec); return szTime; } // -- String Conversions // String to Hex // where string = your string and // 04 = length of your string and X = hex sscanf(string, %04X, &your_word16); // Hex to CString CS...

Setup SVN Local Repository - simple

Image
Create reposity folder. "C:\SVNRepository\new". Right click, select "TortoiseSVN\Create repository here". Select folder that you want to be a SVN folder. Using new folder is better, "D:\new". Create three folders: "trunk", "branches", "tags". Go back to parent and select "D:\new" folder. Right click, select "TortoiseSVN\Import...". On the "URL of repository:" editbox, type " file:///C:/SVNRepository/new ". Click "OK". Right click, select "SVN Checkout..." On the "URL of repository:" editbox, type " file:///C:/SVNRepository/new ". Click "OK". Then, click "Yes". If you used new folder, then copy all your files in it. Finally, select "D:\new". Right click, select "SVN Commit". Add all files and click "OK". Done. All your files are controlled by SVN. For more details, please refers to http://e7fe...