- Dec 01 Thu 2011 16:12
-
檢查網頁死連
- Dec 01 Thu 2011 14:34
-
如何對 A Href 取其值
一段範例如下
<DT><H3 ADD_DATE="1312850481" LAST_MODIFIED="1319985361">書籤工具列</H3>
<DL><p>
<DT><H3 ADD_DATE="1312850481" LAST_MODIFIED="1319985363">Android___</H3>
<DL><p>
<DT><A HREF="http://gphonefans.net/forum-49-3.html" ADD_DATE="1310539680" LAST_MODIFIED="1319985346">Android 軟件及遊戲討論 - GPhonefans.net</A>
<DT><A HREF="http://www.soft4fun.net/website-recommand/10%E5%80%8B-android-%E5%85%8D%E8%B2%BB-app-%E4%B8%8B%E8%BC%89%E3%80%81%E4%BB%8B%E7%B4%B9%E7%B6%B2%E7%AB%99.htm" ADD_DATE="1310722061" LAST_MODIFIED="1319985346">10個 Android 免費 APP 下載、介紹網站 | 硬是要學</A>
<DT><A HREF="http://www.freewarelovers.com/android/category/system" ADD_DATE="1310740049" LAST_MODIFIED="1319985346">Android Freeware: Browse the SYSTEM category</A>
<DL><p>
<DT><H3 ADD_DATE="1312850481" LAST_MODIFIED="1319985363">Android___</H3>
<DL><p>
<DT><A HREF="http://gphonefans.net/forum-49-3.html" ADD_DATE="1310539680" LAST_MODIFIED="1319985346">Android 軟件及遊戲討論 - GPhonefans.net</A>
<DT><A HREF="http://www.soft4fun.net/website-recommand/10%E5%80%8B-android-%E5%85%8D%E8%B2%BB-app-%E4%B8%8B%E8%BC%89%E3%80%81%E4%BB%8B%E7%B4%B9%E7%B6%B2%E7%AB%99.htm" ADD_DATE="1310722061" LAST_MODIFIED="1319985346">10個 Android 免費 APP 下載、介紹網站 | 硬是要學</A>
<DT><A HREF="http://www.freewarelovers.com/android/category/system" ADD_DATE="1310740049" LAST_MODIFIED="1319985346">Android Freeware: Browse the SYSTEM category</A>
- Dec 01 Thu 2011 10:27
-
vb.net 如何換 皮膚(SKIN)
剛剛逛到 MSDN 搜尋到 一些參考資料
還不錯用喔
[Library][C#]USkin 視窗換膚函式庫
http://www.dotblogs.com.tw/larrynung/archive/2009/08/28/10301.aspx
還不錯用喔
[Library][C#]USkin 視窗換膚函式庫
http://www.dotblogs.com.tw/larrynung/archive/2009/08/28/10301.aspx
- Nov 30 Wed 2011 16:54
-
Flash 時鐘
- Nov 30 Wed 2011 16:22
-
HTTP GET/POST 調用方法 VB.NET
HTTP GET/POST 調用方法 VB.NET
'httpsend_get("http://www.zzip.com.cn/?id=12")
Function httpsend_get(ByVal geturl As String) As String
Dim myHttpWebRequest As System.Net.HttpWebRequest
Dim myHttpWebResponse As System.Net.HttpWebResponse
Try
Dim URL As String = geturl
Dim myUri As Uri = New Uri(geturl)
Dim myWebRequest As System.Net.WebRequest = System.Net.WebRequest.Create(URL)
myHttpWebRequest = CType(myWebRequest, System.Net.HttpWebRequest)
myHttpWebRequest.KeepAlive = True
myHttpWebRequest.Timeout = 300000
myHttpWebRequest.Method = "GET"
Dim myWebResponse As System.Net.WebResponse = myHttpWebRequest.GetResponse()
'獲得響應信息
myHttpWebResponse = CType(myWebResponse, System.Net.HttpWebResponse)
Dim iStatCode As Integer = CInt(myHttpWebResponse.StatusCode)
myHttpWebRequest = CType(myWebRequest, System.Net.HttpWebRequest)
myHttpWebResponse = CType(myWebResponse, System.Net.HttpWebResponse)
Dim myStream As System.IO.Stream = myHttpWebResponse.GetResponseStream()
Dim srReader As System.IO.StreamReader = New System.IO.StreamReader(myStream, System.Text.Encoding.Default)
Dim sTemp As String = srReader.ReadToEnd()
httpsend_get = sTemp
srReader.Close()
myStream.Close()
myWebResponse.Close()
myWebRequest.Abort()
Catch WebExcp As System.Net.WebException
'Response.Write(Replace(WebExcp.Message.ToString(), "The remote server returned an error: (500) Internal Server Error.", "服務器出現故障無法連接"))
httpsend_get = Replace(WebExcp.Message.ToString(), "The remote server returned an error: (500) Internal Server Error.", "服務器出現故障無法連接")
Catch ex As Exception
'Response.Write(ex.ToString())
httpsend_get = ex.ToString
End Try
End Function
'===========================================================================================
'HTTP請求/回應 _END
'===========================================================================================
'HTTP讀取
'HTTP 1.1 POST方式
'geturl=網址
'other=?號後面的參數
Function http_post(ByVal geturl As String, ByVal text As String) As String
Dim myHttpWebRequest As System.Net.HttpWebRequest
Dim myHttpWebResponse As System.Net.HttpWebResponse
Try
Dim URL As String = geturl
Dim myUri As Uri = New Uri(geturl)
Dim myWebRequest As System.Net.WebRequest = System.Net.WebRequest.Create(URL)
myHttpWebRequest = CType(myWebRequest, System.Net.HttpWebRequest)
myHttpWebRequest.KeepAlive = True
myHttpWebRequest.Timeout = 3000000
myHttpWebRequest.Method = "POST"
Dim postdata As String = URLEncoding(text)
Dim encoding As New System.Text.ASCIIEncoding
Dim byte1 As Byte() = encoding.GetBytes(postdata)
myHttpWebRequest.ContentType = "application/x-www-form-urlencoded"
myHttpWebRequest.ContentLength = postdata.Length
Dim newStream As System.IO.Stream = myHttpWebRequest.GetRequestStream()
newStream.Write(byte1, 0, byte1.Length)
newStream.Close()
Dim myWebResponse As System.Net.WebResponse = myHttpWebRequest.GetResponse()
myHttpWebResponse = CType(myWebResponse, System.Net.HttpWebResponse)
Dim iStatCode As Integer = CInt(myHttpWebResponse.StatusCode)
myHttpWebResponse = CType(myWebResponse, System.Net.HttpWebResponse)
Dim myStream As System.IO.Stream = myHttpWebResponse.GetResponseStream()
Dim srReader As System.IO.StreamReader = New System.IO.StreamReader(myStream, encoding.Default)
Dim sTemp As String = srReader.ReadToEnd()
http_post = sTemp
srReader.Close()
myStream.Close()
myWebResponse.Close()
myWebRequest.Abort()
Catch WebExcp As System.Net.WebException
http_post = Replace(WebExcp.Message.ToString(), "The remote server returned an error: (500) Internal Server Error.", "服務器出現故障無法連接")
Catch ex As Exception
http_post = ex.ToString()
End Try
End Function
'Unicode轉換
Function URLEncoding(ByVal vstrIn) As String
Dim strReturn As String
Dim i As Integer
Dim ThisChr As String
Dim innerCode As Integer
Dim Hight8 As Integer
Dim Low8 As Integer
strReturn = ""
For i = 1 To Len(vstrIn)
ThisChr = Mid(vstrIn, i, 1)
If Math.Abs(Asc(ThisChr)) < &HFF Then
strReturn = strReturn & ThisChr
Else
innerCode = Asc(ThisChr)
If innerCode < 0 Then
innerCode = innerCode + &H10000
End If
Hight8 = (innerCode And &HFF00) \ &HFF
Low8 = innerCode And &HFF
strReturn = strReturn & "%" & Hex(Hight8) & "%" & Hex(Low8)
End If
Next
URLEncoding = strReturn
strReturn = Nothing
i = Nothing
ThisChr = Nothing
innerCode = Nothing
Hight8 = Nothing
Low8 = Nothing
End Function
'反解 URLEncoding
Function UTF2GB(ByVal UTFStr)
Dim gbstr
Dim dig
For dig = 1 To Len(UTFStr)
If Mid(UTFStr, dig, 1) = "%" Then
If Len(UTFStr) >= dig + 8 Then
gbstr = gbstr & ConvChinese(Mid(UTFStr, dig, 9))
dig = dig + 8
Else
gbstr = gbstr & Mid(UTFStr, dig, 1)
End If
Else
gbstr = gbstr & Mid(UTFStr, dig, 1)
End If
Next
UTF2GB = gbstr
End Function
Function ConvChinese(ByVal x)
Dim A = Split(Mid(x, 2), "%")
Dim i = 0
Dim j = 0
Dim un_icode
Dim digs
For i = 0 To UBound(A)
A(i) = c16to2(A(i))
Next
For i = 0 To UBound(A) - 1
digs = InStr(A(i), "0")
un_icode = ""
For j = 1 To digs - 1
If j = 1 Then
A(i) = Right(A(i), Len(A(i)) - digs)
un_icode = un_icode & A(i)
Else
i = i + 1
A(i) = Right(A(i), Len(A(i)) - 2)
un_icode = un_icode & A(i)
End If
Next
If Len(c2to16(un_icode)) = 4 Then
ConvChinese = ConvChinese & ChrW(Int("&H" & c2to16(un_icode)))
Else
ConvChinese = ConvChinese & Chr(Int("&H" & c2to16(un_icode)))
End If
Next
End Function
Function c2to16(ByVal x)
Dim i = 1
For i = 1 To Len(x) Step 4
c2to16 = c2to16 & Hex(c2to10(Mid(x, i, 4)))
Next
End Function
Function c2to10(ByVal x)
c2to10 = 0
If x = "0" Then Exit Function
Dim i = 0
For i = 0 To Len(x) - 1
If Mid(x, Len(x) - i, 1) = "1" Then c2to10 = c2to10 + 2 ^ (i)
Next
End Function
Function c16to2(ByVal x)
Dim i = 0
Dim tempstr
For i = 1 To Len(Trim(x))
tempstr = c10to2(CInt(Int("&h" & Mid(x, i, 1))))
Do While Len(tempstr) < 4
tempstr = "0" & tempstr
Loop
c16to2 = c16to2 & tempstr
Next
End Function
Function c10to2(ByVal x)
Dim mysign = System.Math.Sign(x)
Dim tempnum
Dim i
x = System.Math.Abs(x)
Dim DigS = 1
Do
If x < 2 ^ DigS Then
Exit Do
Else
DigS = DigS + 1
End If
Loop
tempnum = x
i = 0
For i = DigS To 1 Step -1
If tempnum >= 2 ^ (i - 1) Then
tempnum = tempnum - 2 ^ (i - 1)
c10to2 = c10to2 & "1"
Else
c10to2 = c10to2 & "0"
End If
Next
If mysign = -1 Then c10to2 = "-" & c10to2
End Function
'httpsend_get("http://www.zzip.com.cn/?id=12")
Function httpsend_get(ByVal geturl As String) As String
Dim myHttpWebRequest As System.Net.HttpWebRequest
Dim myHttpWebResponse As System.Net.HttpWebResponse
Try
Dim URL As String = geturl
Dim myUri As Uri = New Uri(geturl)
Dim myWebRequest As System.Net.WebRequest = System.Net.WebRequest.Create(URL)
myHttpWebRequest = CType(myWebRequest, System.Net.HttpWebRequest)
myHttpWebRequest.KeepAlive = True
myHttpWebRequest.Timeout = 300000
myHttpWebRequest.Method = "GET"
Dim myWebResponse As System.Net.WebResponse = myHttpWebRequest.GetResponse()
'獲得響應信息
myHttpWebResponse = CType(myWebResponse, System.Net.HttpWebResponse)
Dim iStatCode As Integer = CInt(myHttpWebResponse.StatusCode)
myHttpWebRequest = CType(myWebRequest, System.Net.HttpWebRequest)
myHttpWebResponse = CType(myWebResponse, System.Net.HttpWebResponse)
Dim myStream As System.IO.Stream = myHttpWebResponse.GetResponseStream()
Dim srReader As System.IO.StreamReader = New System.IO.StreamReader(myStream, System.Text.Encoding.Default)
Dim sTemp As String = srReader.ReadToEnd()
httpsend_get = sTemp
srReader.Close()
myStream.Close()
myWebResponse.Close()
myWebRequest.Abort()
Catch WebExcp As System.Net.WebException
'Response.Write(Replace(WebExcp.Message.ToString(), "The remote server returned an error: (500) Internal Server Error.", "服務器出現故障無法連接"))
httpsend_get = Replace(WebExcp.Message.ToString(), "The remote server returned an error: (500) Internal Server Error.", "服務器出現故障無法連接")
Catch ex As Exception
'Response.Write(ex.ToString())
httpsend_get = ex.ToString
End Try
End Function
'===========================================================================================
'HTTP請求/回應 _END
'===========================================================================================
'HTTP讀取
'HTTP 1.1 POST方式
'geturl=網址
'other=?號後面的參數
Function http_post(ByVal geturl As String, ByVal text As String) As String
Dim myHttpWebRequest As System.Net.HttpWebRequest
Dim myHttpWebResponse As System.Net.HttpWebResponse
Try
Dim URL As String = geturl
Dim myUri As Uri = New Uri(geturl)
Dim myWebRequest As System.Net.WebRequest = System.Net.WebRequest.Create(URL)
myHttpWebRequest = CType(myWebRequest, System.Net.HttpWebRequest)
myHttpWebRequest.KeepAlive = True
myHttpWebRequest.Timeout = 3000000
myHttpWebRequest.Method = "POST"
Dim postdata As String = URLEncoding(text)
Dim encoding As New System.Text.ASCIIEncoding
Dim byte1 As Byte() = encoding.GetBytes(postdata)
myHttpWebRequest.ContentType = "application/x-www-form-urlencoded"
myHttpWebRequest.ContentLength = postdata.Length
Dim newStream As System.IO.Stream = myHttpWebRequest.GetRequestStream()
newStream.Write(byte1, 0, byte1.Length)
newStream.Close()
Dim myWebResponse As System.Net.WebResponse = myHttpWebRequest.GetResponse()
myHttpWebResponse = CType(myWebResponse, System.Net.HttpWebResponse)
Dim iStatCode As Integer = CInt(myHttpWebResponse.StatusCode)
myHttpWebResponse = CType(myWebResponse, System.Net.HttpWebResponse)
Dim myStream As System.IO.Stream = myHttpWebResponse.GetResponseStream()
Dim srReader As System.IO.StreamReader = New System.IO.StreamReader(myStream, encoding.Default)
Dim sTemp As String = srReader.ReadToEnd()
http_post = sTemp
srReader.Close()
myStream.Close()
myWebResponse.Close()
myWebRequest.Abort()
Catch WebExcp As System.Net.WebException
http_post = Replace(WebExcp.Message.ToString(), "The remote server returned an error: (500) Internal Server Error.", "服務器出現故障無法連接")
Catch ex As Exception
http_post = ex.ToString()
End Try
End Function
'Unicode轉換
Function URLEncoding(ByVal vstrIn) As String
Dim strReturn As String
Dim i As Integer
Dim ThisChr As String
Dim innerCode As Integer
Dim Hight8 As Integer
Dim Low8 As Integer
strReturn = ""
For i = 1 To Len(vstrIn)
ThisChr = Mid(vstrIn, i, 1)
If Math.Abs(Asc(ThisChr)) < &HFF Then
strReturn = strReturn & ThisChr
Else
innerCode = Asc(ThisChr)
If innerCode < 0 Then
innerCode = innerCode + &H10000
End If
Hight8 = (innerCode And &HFF00) \ &HFF
Low8 = innerCode And &HFF
strReturn = strReturn & "%" & Hex(Hight8) & "%" & Hex(Low8)
End If
Next
URLEncoding = strReturn
strReturn = Nothing
i = Nothing
ThisChr = Nothing
innerCode = Nothing
Hight8 = Nothing
Low8 = Nothing
End Function
'反解 URLEncoding
Function UTF2GB(ByVal UTFStr)
Dim gbstr
Dim dig
For dig = 1 To Len(UTFStr)
If Mid(UTFStr, dig, 1) = "%" Then
If Len(UTFStr) >= dig + 8 Then
gbstr = gbstr & ConvChinese(Mid(UTFStr, dig, 9))
dig = dig + 8
Else
gbstr = gbstr & Mid(UTFStr, dig, 1)
End If
Else
gbstr = gbstr & Mid(UTFStr, dig, 1)
End If
Next
UTF2GB = gbstr
End Function
Function ConvChinese(ByVal x)
Dim A = Split(Mid(x, 2), "%")
Dim i = 0
Dim j = 0
Dim un_icode
Dim digs
For i = 0 To UBound(A)
A(i) = c16to2(A(i))
Next
For i = 0 To UBound(A) - 1
digs = InStr(A(i), "0")
un_icode = ""
For j = 1 To digs - 1
If j = 1 Then
A(i) = Right(A(i), Len(A(i)) - digs)
un_icode = un_icode & A(i)
Else
i = i + 1
A(i) = Right(A(i), Len(A(i)) - 2)
un_icode = un_icode & A(i)
End If
Next
If Len(c2to16(un_icode)) = 4 Then
ConvChinese = ConvChinese & ChrW(Int("&H" & c2to16(un_icode)))
Else
ConvChinese = ConvChinese & Chr(Int("&H" & c2to16(un_icode)))
End If
Next
End Function
Function c2to16(ByVal x)
Dim i = 1
For i = 1 To Len(x) Step 4
c2to16 = c2to16 & Hex(c2to10(Mid(x, i, 4)))
Next
End Function
Function c2to10(ByVal x)
c2to10 = 0
If x = "0" Then Exit Function
Dim i = 0
For i = 0 To Len(x) - 1
If Mid(x, Len(x) - i, 1) = "1" Then c2to10 = c2to10 + 2 ^ (i)
Next
End Function
Function c16to2(ByVal x)
Dim i = 0
Dim tempstr
For i = 1 To Len(Trim(x))
tempstr = c10to2(CInt(Int("&h" & Mid(x, i, 1))))
Do While Len(tempstr) < 4
tempstr = "0" & tempstr
Loop
c16to2 = c16to2 & tempstr
Next
End Function
Function c10to2(ByVal x)
Dim mysign = System.Math.Sign(x)
Dim tempnum
Dim i
x = System.Math.Abs(x)
Dim DigS = 1
Do
If x < 2 ^ DigS Then
Exit Do
Else
DigS = DigS + 1
End If
Loop
tempnum = x
i = 0
For i = DigS To 1 Step -1
If tempnum >= 2 ^ (i - 1) Then
tempnum = tempnum - 2 ^ (i - 1)
c10to2 = c10to2 & "1"
Else
c10to2 = c10to2 & "0"
End If
Next
If mysign = -1 Then c10to2 = "-" & c10to2
End Function
- Nov 30 Wed 2011 08:28
-
接收 gmail 方式
本文轉
http://63.236.73.220/showpost.php?s=74a3f46cfed0f447c52f3435fa53bae1&p=3497640&postcount=9
Imports System
Imports System.Net.Sockets
Imports System.Text
Imports System.IO
Module POP3Message1
Dim Server As TcpClient
Dim NetStrm As NetworkStream
Dim RdStrm As StreamReader
Dim _Strm As Net.Security.SslStream
Public Function connect() As Integer
Dim POP3Account As String
POP3Account = "pop.gmail.com"
If POP3Account.Trim = "" Then Exit Function
Try
Server = New TcpClient(POP3Account.Trim, 995)
NetStrm = Server.GetStream
_Strm = New Net.Security.SslStream(Server.GetStream())
DirectCast(_Strm, Net.Security.SslStream).AuthenticateAsClient("pop.gmail.com")
RdStrm = New StreamReader(Server.GetStream)
Catch exc As Exception
MsgBox(exc.Message)
Exit Function
End Try
http://63.236.73.220/showpost.php?s=74a3f46cfed0f447c52f3435fa53bae1&p=3497640&postcount=9
Imports System
Imports System.Net.Sockets
Imports System.Text
Imports System.IO
Module POP3Message1
Dim Server As TcpClient
Dim NetStrm As NetworkStream
Dim RdStrm As StreamReader
Dim _Strm As Net.Security.SslStream
Public Function connect() As Integer
Dim POP3Account As String
POP3Account = "pop.gmail.com"
If POP3Account.Trim = "" Then Exit Function
Try
Server = New TcpClient(POP3Account.Trim, 995)
NetStrm = Server.GetStream
_Strm = New Net.Security.SslStream(Server.GetStream())
DirectCast(_Strm, Net.Security.SslStream).AuthenticateAsClient("pop.gmail.com")
RdStrm = New StreamReader(Server.GetStream)
Catch exc As Exception
MsgBox(exc.Message)
Exit Function
End Try
- Nov 29 Tue 2011 19:39
-
DataGridView 一個儲存格多行顯示
- Nov 28 Mon 2011 18:33
-
VB 網路資源
這邊以連結 為主
英文區
http://63.236.73.220/forumdisplay.php?s=74a3f46cfed0f447c52f3435fa53bae1&f=25
英文區
http://63.236.73.220/forumdisplay.php?s=74a3f46cfed0f447c52f3435fa53bae1&f=25
- Nov 24 Thu 2011 19:45
-
DataGridView新特色、常用操作 列操作 c# dataGridView1.Columns.Insert
DataGridView新特色、常用操作 列操作 c# dataGridView1.Columns.Insert
[推薦]DataGridView新特色、常用操作
1、自定義列 srxljl
Customize Cells and Columns in the Windows Forms DataGridView Control by Extending Their
Behavior and Appearance
Host Controls in Windows Forms DataGridView Cells
繼承 DataGridViewTextBoxCell 類生成新的Cell類,然後再繼承 DataGridViewColumn 生成新的Column類,並指定
CellTemplate為新的Cell類。新生成的Column便可以增加到DataGridView中去。
2、自動適應列寬 srxljl
Programmatically Resize Cells to Fit Content in the Windows Forms DataGridView Control
Samples:
[推薦]DataGridView新特色、常用操作
1、自定義列 srxljl
Customize Cells and Columns in the Windows Forms DataGridView Control by Extending Their
Behavior and Appearance
Host Controls in Windows Forms DataGridView Cells
繼承 DataGridViewTextBoxCell 類生成新的Cell類,然後再繼承 DataGridViewColumn 生成新的Column類,並指定
CellTemplate為新的Cell類。新生成的Column便可以增加到DataGridView中去。
2、自動適應列寬 srxljl
Programmatically Resize Cells to Fit Content in the Windows Forms DataGridView Control
Samples:
- Nov 16 Wed 2011 07:59
-
HTC desire Z 親身實驗 降版
本身手機 已經 OTA 2.3.3
本來 參考
http://lbear.pixnet.net/blog/post/29225516?comment_page=3
連第一關都過不了
本來 參考
http://lbear.pixnet.net/blog/post/29225516?comment_page=3
連第一關都過不了
- Nov 14 Mon 2011 21:05
-
【降級教程】適用於各版本HTC Desire Z在S-ON狀態下的降級

