易截截图软件、单文件、免安装、纯绿色、仅160KB

一小段关键词分析代码(VB)

帮朋友改的一小段关键词分析代码; 含两个单词复合计数
Private Function CollectWords() As Dictionary(Of String, Integer)
'Create a new dictionary
Dim table As New Dictionary(Of String, Integer)
'Prompt for the user
Console.WriteLine(
"Enter a line : ")
'Get the user's input
Dim input As String = Console.ReadLine()
'Split the line and make an array of words
Dim words As String() = input.Split()
Dim wordPrev As String = ""
'Search the array
For Each word In words
'We can get the lowercase, not necessary here
Dim wordKey As String = word.ToLower()
'If the dictionay contains the words
If table.ContainsKey(wordKey) Then
'increment
table(wordKey) = table(wordKey) + 1
Else
'add a new word with a count of 1 in the dictionary
table.Add(wordKey, 1)
End If
Dim wordKey2 As String = (wordPrev + " " + word).ToLower()
If wordPrev <> "" Then
If table.ContainsKey(wordKey2) Then
'increment
table(wordKey2) = table(wordKey2) + 1
Else
'add a new word with a count of 1 in the dictionary
table.Add(wordKey2, 1)
End If
End If
wordPrev = word
Next
Return table
End Function


相关文档:

Asp.net 文件上传(Vb.net版)

在Asp.net中实现文件的上传功能,是非常简单的一件事情,只需要利用微软提供的FileUpload控件即可轻松实现。
LargeFileUpload.aspx代码如下
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="LargeFileUpload.aspx.vb"
    Inherits="LargeFileUpload" %>
<!DOCTYPE html PUBLIC "-//W3C/ ......

VB能记录中文的键盘记录

http://hi.baidu.com/qwestw/blog/item/a8b41663eb7fca690d33fa46.html
能记录到中文,缺点是不能记录到Ctrl,shift,alt,capslock,home,del,pageUP,pageDown等件的按下状态。
vb6代码如下:
Private Sub Form_Load()
WM_HXWDLLWX_HOOKKEY = RegisterWindowMessage("WM_HXWDLLWX_HOOKKEY")
PrevWndProc = SetWind ......

vb常用字符串处理函数

1. ASC(X),Chr(X):转换字符字符码   
[格式]:   
P=Asc(X) 返回字符串X的第一个字符的字符码   
P=Chr(X) 返回字符码等于X的字符   
[范例]:   
(1)P=Chr(65)   
‘ 输出字符A,因为A的ASCII码等于65   ......

vb 创建快捷方式 兼容vista XP

'创建快捷方式,兼容vista
'要把vb6stkit.DLL放到程序目录
'敖士伟 09-10-27
'只对“桌面”和“开启”有效,其它还没做
'=========开启外部同步程序定义开始
Const SYNCHRONIZE = &H100000
Const INFINITE = &HFFFF 'Wait forever
Const WAIT_OBJECT_0 = 0 'The state of the spe ......

VB加解密代码

 Function crypt(Action As String, Key As String, Src As String) As String
'Action
'  E encrypts, D decrypts,
'Key is a unique string needed to en/decrypt (either
'  hardcode or setup something for the user to enter.
'Src is the string to be en/decrypted.
On Error GoTo errHandl ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号