Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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


Ïà¹ØÎĵµ£º

VB ×Ö·û´®´¦Àíº¯Êý¼¯

·ÖÀࣺVBѧϰ ×ֺţº ´ó´ó  ÖÐÖР СС mid(×Ö·û´®£¬´ÓµÚ¼¸¸ö¿ªÊ¼£¬³¤¶È)  ÔÚ[×Ö·û´®]ÖÐ[´ÓµÚ¼¸¸ö¿ªÊ¼]È¡³ö[³¤¶È¸ö×Ö·û´®]   
ÀýÈç mid("СÐÀÎÞµÐ",1,3) Ôò·µ»Ø "СÐÀÎÞ"   
instr(´ÓµÚ¼¸¸ö¿ªÊ¼,×Ö·û´®1,×Ö·û´®2) ´Ó¹æ¶¨µÄλÖÿªÊ¼²éÕÒ£¬·µ»Ø×Ö·û´®2ÔÚ×Ö·û´®1Öе ......

VB ¶ÁÖ¸¶¨ÐÐ

http://zhidao.baidu.com/question/81532606.html
VB ¶ÁÖ¸¶¨ÐÐ
ÐüÉÍ·Ö£º10 - ½â¾öʱ¼ä£º2009-1-20 11:41
vbÖÐÈçºÎ¶Áȡָ¶¨ÐеÄÄÚÈÝ£¬´°ÌåÉÏÓÐÁ½¸ö±êÇ©£¬ÎļþÔÚC:\A.TXT,Ëĸö°´Å¥£¬µ¥»÷µÚÒ»¸ö£¬¶ÁÎļþµÄµÚÒ»Ðе½±êǩһ£¬µÚ¶þÐе½±êÇ©¶þ£»µ¥»÷µÚ¶þ¸ö°´Å¥£¬µÚÈýÐе½±êǩһ£¬µÚËÄÐе½±êÇ©¶þ£»ÒÔ´ËÀàÍÆ£¬Ð»Ð»
ÌáÎÊÕߣº im ......

VBÉè¼Æ¶¯»­Ê±ÖÓ

 VBÉè¼Æ¶¯»­Ê±ÖÓ
³ÌÐòÃû£ºSec-Time.vbp
³ÌÐòÀà±ð£ºÍêÕûµÄVB³ÌÐò
¹¦ÄÜ£ºÏÔʾһ¸ö¶¯»­Ê±ÖÓ£¬¸ÃʱÕëËæ×ÅÿһÃë¶ø¶¯Ì¬±ä»¯¡£
³ÌÐò˵Ã÷
1£®ÈçºÎ»­Ê±ÖÓ±íÅÌÉϵÄËùÓÐÖ±ÏßÔªËØ£¿
ÓÃLoadÃüÁÁ¢Ô­Ê¼Line¿ØÖƵÄ14¸ö¿½±´£¨ÒòΪ±íÅÌÓÐ12¸öµãºÍʱ¡¢·Ö¡¢Ãë¹²15¸öLine£©£¬¸Ã¿ØÖÆÊý×éÿһ¸öʵÀýµÄ¶Ëµã×ø±êÊôÐÔÉèÖÃΪÿÌõÏßÔÚʱ ......

vb³£ÓÃ×Ö·û´®´¦Àíº¯Êý

1. ASC(X)£¬Chr(X)£º×ª»»×Ö·û×Ö·ûÂë   
[¸ñʽ]£º   
P=Asc(X) ·µ»Ø×Ö·û´®XµÄµÚÒ»¸ö×Ö·ûµÄ×Ö·ûÂë   
P=Chr(X) ·µ»Ø×Ö·ûÂëµÈÓÚXµÄ×Ö·û   
[·¶Àý]£º   
(1)P=Chr(65)   
‘ Êä³ö×Ö·ûA,ÒòΪAµÄASCIIÂëµÈÓÚ65   ......

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ºÅ