Hunter的大杂烩 技术学习笔记

2014-05-07

统计最近一个月outlook发件人vba

Filed under: 技术话题 — hunter @ 12:35 pm

Function getDateInt(dateStr) As Long

getDateInt = 0
pos1 = InStr(dateStr, “/”)
If pos1 > 0 Then
pos2 = InStr(pos1 + 1, dateStr, “/”)
If pos2 > 0 Then

yearInt = Left(dateStr, pos1 – 1)
monthInt = Mid(dateStr, pos1 + 1, pos2 – pos1 – 1)
dayInt = Right(dateStr, Len(dateStr) – pos2)
getDateInt = yearInt * 10000 + monthInt * 100 + dayInt

End If
End If
End Function

Sub MTest()
Dim BodyFile As String
Dim olMailItem As MailItem
Dim rMailItem As MailItem
Dim myComments As String
Dim myOlSel As Outlook.Selection

Dim subj As String
myComments = “___OK____: ”

Set myOlSel = Application.ActiveExplorer.Selection
For i = 1 To myOlSel.Count
Set olMailItem = myOlSel.Item(i)
Debug.Print olMailItem.CreationTime & “|” & olMailItem.SenderName & “|” & olMailItem.Subject
createDateTimeStr = olMailItem.CreationTime
pos = InStr(createDateTimeStr, ” “)
If pos > 0 Then
createDateStr = Left(createDateTimeStr, pos)
dateInt1 = getDateInt(createDateStr)
dateInt2 = getDateInt(“2014/4/7”)
If dateInt1 = 0 Then
Exit For
End If
If dateInt1 < dateInt2 Then Exit For End If 'If StrComp(createDateStr, "2014/4/7") < 0 Then ' Exit For 'End If End If Next Set rMailItem = Nothing Set olMailItem = Nothing End Sub

2013-12-16

dns大全

Filed under: 技术话题 — hunter @ 5:34 pm

从网上整理的,不保证能用

10.0.1.254
10.10.64.68
10.117.32.40
10.138.128.40
10.150.0.1
10.157.2.15
10.17.128.90
10.179.64.1
10.184.0.1
(more…)

2013-12-06

c#下繁简转换库

Filed under: 技术话题 — hunter @ 3:52 pm

转自:http://blog.kkbruce.net/2009/11/microsoft-visual-studio-international.html#.UqFslfQ9KWY注意,光装2.0是没有chineseconverter.dll的,如果只是需要繁简转换,可以直接到网上下载相关dll,在项目里引用

先看微軟的介紹:

Visual Studio International Feature Pack 2.0 擴充了先前 1.0 版的功能, 它提供了一組控制項和類別庫以幫助.NET開發人員建立符合國際化需求的應用程式。

跟我們之前介紹使用資源檔的方式不同,它提供的是控制項(Controls)和類別庫(Class Library)來幫助.NET開發人員處理各種亞洲語系上的的文字、字串處理工作。

而Visual Studio International Feature Pack 2.0是「擴充」之前1.0的功能,所以本身不含1.0的功能,如果想使用1.0提供的功能,可下載1.0進行安裝。

Microsoft Visual Studio International Pack 1.0 SR1
Microsoft Visual Studio International Feature Pack 2.0



(more…)

2013-11-28

查看已经安装的 Perl 模块

Filed under: 技术话题 — hunter @ 7:32 pm

from:http://www.chenjunlu.com/2011/07/querying-the-installed-modules-of-perl/

这里介绍两种方法来查看已经安装的 Perl 模块,其中第一种方法通过文件名后缀识别 Perl 模块,该方法列出了所有安装的 Perl 模块(包括 Perl 的核心模块),而第二种方法只是列举了系统上安装的 CPAN Perl 模块。

(more…)

2013-11-27

Openssh chroot之后…

Filed under: 技术话题 — hunter @ 8:53 pm

只能使用sftp login,ssh和scp 登录会挂住,估计是chroot directory下面找不到 /bin/sh等文件,费事去构建一个独立的chroot jail,如果只是为了备份,可以充分利用 sftp -b 参数,里面可以填入诸如:

(more…)

« Newer PostsOlder Posts »

Powered by WordPress