随笔分类 - Code Snippets
This page contains various code snippets that really don't belong anywhere else.
Delphi 版本的获取PDF页数算法--PDF Page Count Algorithm(Delphi source code)
摘要:It's not often that you can't find coding examples on the internet to do basic programming tasks, so I was surprised when I couldn't find code to determine the page count of PDF documents.
I've had to return to my old hacking ways (ie 'hacking' in its original sense). I visited my favorite hacking website - www.wotsit.org, downloaded the PDF document specifications and got coding.
It didn't take too long to construct a reasonably efficient algorithm which does what I want. I've
阅读全文
DateDiff in c#(转载:DateDiff 方法在C#中的实现)
摘要:This article explains how a DateDiff function can be implemented in C#
DateDiff function is a very powerful global method available in VB .Net.
Unfortunately this function for reasons known only to Microsoft, is not available in C#.
DateDiff 在VB.Net中是一个非常有用的方法,很遗憾C#中却没有这个方法,那么我们实现一个。
阅读全文
A VB module to merge PDFs to One,Need full version Acrobat
摘要:一个利用Acrobat SDK合并PDF的VB Module
阅读全文
Returns the mime type associated with the extension
摘要:/// /// Returns the mime type associated with the extension /// /// Extension of the file type. Eg. ".pdf" /// String.Empty if not found public string GetMimeType(string extension) { string mimeT...
阅读全文
Exports datatable to CSV or Excel format
摘要:导出datatable为CSV或者XlS格式
阅读全文