摘要: QuickSort AlgorithOne of the common problems in programming is to sort anarray of valuesin some order (ascending or descending).While there are many "standard" sorting algorithms, QuickSort is one of the fastest.Quicksort sorts by employing adivide and conquer strategyto divide a list into 阅读全文
posted @ 2013-04-28 23:21 IAmAProgrammer 阅读(1433) 评论(0) 推荐(0) 编辑
摘要: 1 RowOut: pByteArray; 2 RowIn : array[0..2400] of pByteArray; 3 4 RowOut := pByteArray(Bitmap0.Scanline[y]); 5 6 RowIn[xout] := pByteArray(Imagebits.Picture.Bitmap.Scanline[wout-1-xout]); 7 8 9 if RowIn[x*8+bitx][y div 8] and pu2[y mod 8] <> 0 then 10 11 if RowIn[x*8+bitx]^[y div 8] an... 阅读全文
posted @ 2013-04-28 18:38 IAmAProgrammer 阅读(390) 评论(0) 推荐(0) 编辑
摘要: /*The CRC calculation unit mainly consists of a single 32-bit data register, which:is used as an input register to enter new data in the CRC calculator(when writing into the register) holds the result of the previous CRC calculation(when reading the register)Each write operation into the data regist 阅读全文
posted @ 2013-04-28 18:36 IAmAProgrammer 阅读(5016) 评论(0) 推荐(0) 编辑
摘要: unit USBDeviceNotify;//USB Device arrival or removeinterfaceuses Windows, Messages, SysUtils, Classes, Forms;type PDevBroadcastHdr = ^DEV_BROADCAST_HDR; DEV_BROADCAST_HDR = packed record dbch_size: DWORD; dbch_devicetype: DWORD; dbch_reserved: DWORD; end; PDevBroadcastDev... 阅读全文
posted @ 2013-04-28 18:34 IAmAProgrammer 阅读(927) 评论(0) 推荐(0) 编辑
摘要: #ifndef _W25Q_H_#define _W25Q_H_/*The W25Q16BV array is organized into 8,192 programmable pages of 256-bytes each.Up to 256 bytes can be programmed at a time.Pages can be erased in groups of 16 (sector erase),groups of 128 (32KB block erase),groups of 256 (64KB block erase) orthe entire chip (chip e 阅读全文
posted @ 2013-04-28 18:32 IAmAProgrammer 阅读(3284) 评论(0) 推荐(0) 编辑
摘要: /* Define to prevent recursive inclusion -------------------------------------*/#ifndef __AT24_H#define __AT24_H#include <string.h>#include "hw_twi.h"#include "hw_def.h"/*AT24C02, 2K Bits SERIAL EEPROM:Internally organized with 32 pages of 8 bytes each,the 2K Bits requires 阅读全文
posted @ 2013-04-28 18:29 IAmAProgrammer 阅读(1635) 评论(0) 推荐(0) 编辑
摘要: move to www.csdn.net 阅读全文
posted @ 2013-04-28 17:47 IAmAProgrammer 阅读(161) 评论(0) 推荐(0) 编辑
摘要: http://marc.durdin.net/2011/10/comparing-tstringstream-vs-tstringlist.htmlThere are two methods widely used in Delphi code for reading and writing strings to/from streams with Delphi,that initially seem pretty similar in their behaviour. These areTStrings.SaveToStreamandTStringStream.SaveToStream (o 阅读全文
posted @ 2013-04-28 13:37 IAmAProgrammer 阅读(785) 评论(0) 推荐(0) 编辑