Currently browsing

July 12, 2012

Unmanaged to Managed Type Translation Table

Unmanaged to Managed type translation table: C/C++ C# HANDLE, LPDWORD, LPVOID, void* IntPtr LPCTSTR, LPCTSTR, LPSTR, char* String [in], StringBuilder [in, out] const char*, Wchar_t*, LPWSTR String [in], StringBuilder [in, out] DWORD, unsigned long, Ulong UInt32, [MarshalAs(UnmanagedType.U4)] bool bool LP<struct> [In] ref <struct> SIZE_T uint LPDWORD out uint LPTSTR [Out] …

ISO 3166 Country Codes

ISO 3166 country codes are used in EMV cards within C8 (CRM Country Code) and 9F1A (Terminal Country Code) tags. Country                                          A 2 A 3 Country Code AALAND ISLANDS AX ALA 248 AFGHANISTAN AF AFG 4 ALBANIA AL ALB 8 ALGERIA DZ DZA 12 AMERICAN SAMOA AS ASM 16 ANDORRA …

SQL PerformanceTips

SQL PerformanceTips Specific Query Performance Tips Use EXPLAIN to profile the query execution plan Use Slow Query Log  Don’t use DISTINCT when you have or could use GROUP BY Insert performance Batch INSERT and REPLACE Use LOAD DATA instead of INSERT LIMIT m,n may not be as fast as it sounds. Learn …

Intelligent simple peripherals

Intelligent simple peripherals This week I once again wrote an interrupt service routine for a UART to do some serial communication. Actually I didn’t have to write a whole lot, because the receiver part had already been done by someone else, but the code for transmitting data under interrupt control …

Sum of two matrices using two dimensional array in C

Sum of two matrices using two dimensional array in C Matrix is the perfect example of two dimensional array. It has row and column. Row represents one dimension and column represents second dimension. For example matrix[4][5], it has 4 rows, each row consisting 5 elements i.e matrix[0] has 5 elements,    …

C Programming File Handling

C Programming: File Handling The console function like printf() and scanf() have been used for input/output .This scheme is adequate if the volume of data involved in not so large or it is not necessary to store the information for further use. However, many applications may require a large amount …