Marco Monacelli
Snippets of the day: Convert from BSTR to CHAR array 
Monday, July 14, 2008, 09:12 PM
Posted by Administrator
SO: Microsoft Windows
Type: String Manipulation
Language: C++
Title: Convert from BSTR to CHAR array

BSTR is a unicode COM string, All the COM objects uses only this type of unicode string.
To convert this incompatibile string to standard ANSI C you can use this simple utils function.

char* strValue = _com_util::ConvertBSTRToString(bstrValue)

Where bstrValue are a BSTR string, and strValue are return value.

exists also the Char to BSTR utils function...

BSTR bstrValue = _com_util::ConvertStringToBSTR(strValue)
add comment ( 4 views )   |  permalink   |   ( 2.8 / 432 )
Snippets of the day: PL/SQL add a day to oracle date 
Monday, July 14, 2008, 06:40 AM
Posted by Administrator
With this little snippets i start the series of code snippets. For each snippest i reports the portability, type and languages.

SO: All support from Oracle
Type: DataBase
Language: PL\SQL
Title: add a day to oracle date

For add a day to oracle date you must simple add a interger to date for example.

select sysdate + 1 from dual;

increments one day the current system date.

To incremente a month you can use a function ADD_MONTHS

select ADD_MONTHS(sysdate,1) from dual;

this increments one months the system date are useful because add a day number of next month.

To add a year you can also use this

select sysdate + 365 from dual;



add comment ( 1 view )   |  permalink   |   ( 3 / 607 )
Come back from holiday 
Monday, July 7, 2008, 04:37 PM
Posted by Administrator
I'm glad to announce the imminent creation of c programming guide in collaboration with fsugitalia. The project requide 3/6 months of development....

I hope to announce soon the start of the work...
add comment   |  permalink   |   ( 3.9 / 247 )
Disk Performance benchmark 
Saturday, June 14, 2008, 10:25 AM
Posted by Administrator
I make a simple page when i insert a little sorce of disk bench.

On my test is clear the role of buffer size in I\O operation i execute the test whit file size of 218 MB. This file is copy on 1,0285 seconds on other file when i use a buffer size even the block size of filesystem.

The complete test is here
add comment   |  permalink   |   ( 2.8 / 335 )
The Question of the day 
Wednesday, June 4, 2008, 10:56 PM
Posted by Administrator
As judged important reflection in modern programming languages?

Personally I think it is very important.

I welcome comments
add comment ( 3 views )   |  permalink   |   ( 3 / 226 )

<<First <Back | 1 | 2 | 3 | Next> Last>>