原创 size_t在printf的正確輸出方法

#if defined(_MSC_VER) #define JL_SIZE_T_SPECIFIER "%Iu" #define JL_SSIZE_T_SPECIFIER "%Id" #define JL_PTRDIFF_T_SPEC

原创 迷宮生成:Sidewinder算法

http://weblog.jamisbuck.org/2011/2/7/maze-generation-algorithm-recap #include <stdlib.h> #include <stdio.h> #define N

原创 windows下獲得磁盤分區信息

#define WIN32_LEAN_AND_MEAN #include <stdio.h> #include <stdlib.h> #include <windows.h> #include <winioctl.h> #ifndef

原创 amittai的B+tree1.12版本的dot輸出補丁

--- bpt.c 2013-10-15 07:54:12 +0800 +++ bpt1.c 2013-10-17 17:04:37 +0800 @@ -48,6 +48,7 @@ // #define WINDOWS #includ

原创 win32讀取raw扇區

#define WIN32_LEAN_AND_MEAN #include <stdio.h> #include <stdlib.h> #include <windows.h> #define BytesPerSector 512

原创 wdm驅動dbg輸出

頭文件定義輸出宏 #define PTDBG_TRACE_ROUTINES 0x00000001 #define PTDBG_TRACE_OPERATION_STATUS 0x00000002 #define

原创 ubuntu優化

1. for service http://www.360doc.com/content/11/0330/14/496343_105866732.shtml 2. for space install localepurge install

原创 cpuid調用示例

#include <stdio.h> #include <string.h> typedef unsigned int u32; /** * Ref arch/x86/include/asm/cpufeature.h */ /* I

原创 system thread

#include<ntddk.h> VOID WorkThread(IN PVOID pContext) { int i; for(i=0;i<5;i++) DbgPrint("I am %d\r\n", i+1);

原创 寫IRP返回的長度可能不是sectorsize的整數倍

返回的長度    》》》》  Irp->IoStatus.Information 0-1: W F7F42000 off=759200, len=400 *** Assertion failed: Length % SECTOR_S

原创 nullFilter

/* This is the main module of the nullFilter mini filter driver. It is a simple minifilter that registers itsel

原创 從dll生成.lib

需要工具dumpbin.exelib.exe 1. 查看DLL導出函數表DUMPBIN.EXE /EXPORTS ntdll.dll 輸出類似: ordinal hint RVA

原创 windows啓動停止服務

#include <windows.h> #include <stdio.h> #define ____DEVICE_BASENAME ("myfirst") // // Get system error message strin

原创 一道算法題:圓桌會議

Total Submission(s) : 179   Accepted Submission(s) : 122 Problem Description HDU ACM集訓隊的隊員在暑假集訓時經常要討論自己在做題中遇到的問題.每當面臨自己

原创 Printf %輸出格式

%d--輸出有符號十進制整數 %o --輸出無符號八進制整數 %x - 輸出無符號十六進制整數 %X –除了大寫字母使用'A'-'F'外同 %x %u - 輸出無符號十進制整數 %s – 輸出一個以C 中空字符NULL 結束的字符串 %c