2008年6月21日 星期六

創造價值,而不是分配大餅。 期末考_資傳_2008級_夜四技_忠班_49101109_林書玄

期末考_資傳_2008級_夜四技_忠班_49101109_林書玄 

 

1. 與時俱進

2. 二邊都應觀察才行進,行進間還是必須持續觀察

    地域性,如果在台灣,還是必須先看右手邊,再看左手邊,

    如果是雙向的,先進過的道路還是從右手邊來。

3. 最佳實務作業典範

4.  有人潮的地方就有錢潮

在好人落難的時候幫助他

在不花及自己時間之下,又可重覆利用(軟體人類)

不管好人或是小人,都應該受到表面上平等的對待。

     小人也是會記恨記恩,雖然他不會馬上或是在未來幫助你,

     但卻有可能在現在或未來害你。

     在公司裡,可能因為大小眼對待人,

     小人可能就會把你公司的情報帶給別人來,圖利自己,順便害你。

曾經有個君王,因宴請少了碗湯,而失去一個國家,卻因幫助好人

在失去一個國家的時候得救。

5. 多層次及多方位的思維模式

6. 軟體人類的興起

7. 教育人民,活到老學到老,不被淘汰的人,也等於多為一個國家的生產力。

    曾有一律師說,要讓一個國家衰弱,就是讓人民擁有更多的福利。

8. 創造價值,而不是分配大餅。

9. 題目:大學必學的技能,不管未來進入公司,或是自己創造公司,創造價值,都是必備的。

    Ans獨立思考,團隊合作


2008年6月17日 星期二

Digest of Hythiol-C Basic Research and Clinical Reports (沛體旺-C基礎與臨床文獻摘要集)[2008]



Digest of Hythiol-C Basic Research and Clinical Reports (沛體旺-C基礎與臨床文獻摘要集)[2008]


miTest_猜字高手_Click [2008-06-17-PM-09-59-31]

' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' '
' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' '
' ' ' ' ' ' ' ' ' ' ' ' '  [2008_06_17_PM_10_00_01]  ' ' ' ' ' ' ' ' ' ' ' ' ' '
' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' '
    Private Sub miTest_猜字高手_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles miTest_猜字高手.Click
        ' OK

        Dim H As New 猜字高手Y2008M06D17
        Dim T As String

        For i As Integer = 0 To 100
            T = InputBox("猜一個字")

            H.CheckThisWordToSeeIfItIsTheCorrectAnswer(T)

            If H.flagCorrectAnswerWasAlreadyFiguredOut Then
                Exit For
            End If
        Next

    End Sub ' miTest_猜字高手_Click

' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' '
' ' ' ' ' ' ' ' ' ' ' ' '  [2008_06_17_PM_10_00_01]  ' ' ' ' ' ' ' ' ' ' ' ' ' '
' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' '
' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' '

猜字高手Y2008M06D17 [2008-06-17-PM-09-57-59]

' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' '
' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' '
' ' ' ' ' ' ' ' ' ' ' ' '  [2008_06_17_PM_09_57_42]  ' ' ' ' ' ' ' ' ' ' ' ' ' '
' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' '
'
'     (程式用模組名稱) Code name of this module:
'           WJAtTSINT2008.猜字高手Y2008M06D17 [2008-06-17-PM-09-57-59]
'    
'     Version: 1.00.01
'     Last Updated: (2008 06 17 PM 09 56 00)

Public Class 猜字高手Y2008M06D17
    Private m_WordToGuess As String = "高手"
    Private m_字串建構員 As New 字串建構員
    Private m_flagCorrectAnswerWasAlreadyFiguredOut As Boolean = False

    Private Const pc_CongratulationPrefixString As String = "Hey! 嘿! You are so great!  You've figured out the mysterious word (神秘的文字)! Congratulation! 恭喜恭喜!"

    ' -   -   -   -   -   -   -   -   -   -   -   -   -
    ' -   -   -   -   -   -   -   -   -   -   -   -   -
    Private Function Do_GetStringInClipboard() As String
        ' (本段程式之目的) Purpose:
        '     Get the text content currently stored in system's clipboard.
        ' (本段程式是否已經在被使用中) In use: Yes
        ' (重要等級) Importance rating:  85%
        ' (再利用的可能性) Chances of reuse:  90%
        ' (程式撰寫的進度) Developing: 100% (Mandatory)
        ' (程式堪用的程度) Workable: 80% (Threshold at 80%)
        ' (程式的測試程度) Code tested: 80% (max 99%)
        ' - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        ' (修改程式的日期) Revision Date: (2005 09 01 PM 01 50 25)
        ' (修改程式的人員) Revised by: WeiJin Tang (湯偉晉)
        '     OK
        ' - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

        Dim myDataObject As System.Windows.Forms.IDataObject
        Dim T As String
        myDataObject = System.Windows.Forms.Clipboard.GetDataObject()

        ' Try to return Unicode Text first, if failed, then try to return ANSI Text
        If myDataObject.GetDataPresent(System.Windows.Forms.DataFormats.UnicodeText) Then
            T = myDataObject.GetData(System.Windows.Forms.DataFormats.UnicodeText)
        Else
            If myDataObject.GetDataPresent(System.Windows.Forms.DataFormats.Text) Then
                T = myDataObject.GetData(System.Windows.Forms.DataFormats.Text)
            Else
                T = String.Empty
            End If
        End If

        Return T

        ' Begin: Reusable code block (2005 09 01 PM 10 26 20)
        If myDataObject.GetDataPresent(System.Windows.Forms.DataFormats.Text) Then
            MsgBox("Clipboard content is compatible with data type [System.Windows.Forms.DataFormats.Text]")
        Else
            MsgBox("Clipboard content is    NOT      compatible with data type  [System.Windows.Forms.DataFormats.Text]")
        End If

        If myDataObject.GetDataPresent(System.Windows.Forms.DataFormats.UnicodeText) Then
            MsgBox("Clipboard content is compatible with data type [System.Windows.Forms.DataFormats.UnicodeText]")
        Else
            MsgBox("Clipboard content is    NOT      compatible with data type  [System.Windows.Forms.DataFormats.UnicodeText]")
        End If

        If myDataObject.GetDataPresent(System.Windows.Forms.DataFormats.WaveAudio) Then
            MsgBox("Clipboard content is compatible with data type [System.Windows.Forms.DataFormats.WaveAudio]")
        Else
            MsgBox("Clipboard content is    NOT      compatible with data type  [System.Windows.Forms.DataFormats.WaveAudio]")
        End If

        If myDataObject.GetDataPresent(System.Windows.Forms.DataFormats.Html) Then
            MsgBox("Clipboard content is compatible with data type [System.Windows.Forms.DataFormats.Html]")
        Else
            MsgBox("Clipboard content is    NOT      compatible with data type  [System.Windows.Forms.DataFormats.Html]")
        End If

        If myDataObject.GetDataPresent(System.Windows.Forms.DataFormats.Rtf) Then
            MsgBox("Clipboard content is compatible with data type [System.Windows.Forms.DataFormats.Rtf]")
        Else
            MsgBox("Clipboard content is    NOT      compatible with data type  [System.Windows.Forms.DataFormats.Rtf]")
        End If

        If myDataObject.GetDataPresent(System.Windows.Forms.DataFormats.Bitmap) Then
            MsgBox("Clipboard content is compatible with data type [System.Windows.Forms.DataFormats.Bitmap]")
        Else
            MsgBox("Clipboard content is    NOT      compatible with data type  [System.Windows.Forms.DataFormats.Bitmap]")
        End If

        If myDataObject.GetDataPresent(System.Windows.Forms.DataFormats.PenData) Then
            MsgBox("Clipboard content is compatible with data type [System.Windows.Forms.DataFormats.PenData]")
        Else
            MsgBox("Clipboard content is    NOT      compatible with data type  [System.Windows.Forms.DataFormats.PenData]")
        End If

        If myDataObject.GetDataPresent(System.Windows.Forms.DataFormats.StringFormat) Then
            MsgBox("Clipboard content is compatible with data type [System.Windows.Forms.DataFormats.StringFormat]")
        Else
            MsgBox("Clipboard content is    NOT      compatible with data type  [System.Windows.Forms.DataFormats.StringFormat]")
        End If

        If myDataObject.GetDataPresent(System.Windows.Forms.DataFormats.Serializable) Then
            MsgBox("Clipboard content is compatible with data type [System.Windows.Forms.DataFormats.Serializable]")
        Else
            MsgBox("Clipboard content is    NOT      compatible with data type  [System.Windows.Forms.DataFormats.Serializable]")
        End If

        If myDataObject.GetDataPresent(System.Windows.Forms.DataFormats.Riff) Then
            MsgBox("Clipboard content is compatible with data type [System.Windows.Forms.DataFormats.Riff]")
        Else
            MsgBox("Clipboard content is    NOT      compatible with data type  [System.Windows.Forms.DataFormats.Riff]")
        End If
        ' End:    Reusable code block (2005 09 01 PM 10 26 20)

    End Function ' Do_GetStringInClipboard
    ' -   -   -   -   -   -   -   -   -   -   -   -   -
    ' -   -   -   -   -   -   -   -   -   -   -   -   -
    Public Sub New()
        ' OK
        Dim T As String
        T = Me.Do_GetStringInClipboard

        ' remove white space chars on both ends
        T = T.Trim
        ' get the first 2 characters from text currently stored in Clipboard

        If T.Length >= 2 Then
            Me.m_WordToGuess = T.Substring(0, 2)
        Else
            ' use default value
        End If

        'MsgBox(Me.m_WordToGuess)

    End Sub ' New
    ' -   -   -   -   -   -   -   -   -   -   -   -   -
    ' -   -   -   -   -   -   -   -   -   -   -   -   -
    Public Sub CheckThisWordToSeeIfItIsTheCorrectAnswer(ByVal AnyWord As String)
        ' OK
        If AnyWord.ToUpper = Me.m_WordToGuess.ToUpper Then
            Me.m_flagCorrectAnswerWasAlreadyFiguredOut = True

            Me.m_字串建構員.從最後面接上這個字串(vbNewLine)
            Me.m_字串建構員.從最後面接上這個字串(vbNewLine)

            Me.m_字串建構員.從最後面接上這個字串(AnyWord)

            Me.m_字串建構員.從最後面接上這個字串(vbNewLine)
            Me.m_字串建構員.從最後面接上這個字串(vbNewLine)

            MsgBox(Me.pc_CongratulationPrefixString & Me.m_字串建構員.傳回你所管理的字串)
        Else
            ' store AnyWord if it is not the correct answerer
            Me.m_字串建構員.從最後面接上這個字串(AnyWord)
        End If
    End Sub ' CheckThisWordToSeeIfItIsTheCorrectAnswer
    ' -   -   -   -   -   -   -   -   -   -   -   -   -
    ' -   -   -   -   -   -   -   -   -   -   -   -   -
    Public ReadOnly Property flagCorrectAnswerWasAlreadyFiguredOut() As Boolean
        ' OK
        Get
            Return Me.m_flagCorrectAnswerWasAlreadyFiguredOut
        End Get
    End Property
    ' -   -   -   -   -   -   -   -   -   -   -   -   -
    ' -   -   -   -   -   -   -   -   -   -   -   -   -
End Class ' 猜字高手Y2008M06D17

' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' '
' ' ' ' ' ' ' ' ' ' ' ' '  [2008_06_17_PM_09_57_42]  ' ' ' ' ' ' ' ' ' ' ' ' ' '
' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' '
' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' '

2008年6月15日 星期日

SourceCodePublishingHelper [2008_06_15_PM_05_39_04]

' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' '
' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' '
' ' ' ' ' ' ' ' ' ' ' ' '  [2008_06_15_PM_05_39_04]  ' ' ' ' ' ' ' ' ' ' ' ' ' '
' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' '
'     SourceCodePublishingHelper_VBY2008M06 [2008-06-10-PM-09-56-52]
'     Version: 1.00.02
'     Last Updated: (2008 06 15 PM 05 36 04)
'     Version: 1.00.01
'     Last Updated: (2008 06 10 PM 09 56 14)

Imports System.Windows.Forms

Public Class SourceCodePublishingHelper_VBY2008M06

    Public Sub TreatClipboardContentAsVBSourceCodeAndMakeItReadyForPostingToBlogSpot()
        ' OK

        Dim T As String
        T = Me.Do_GetStringInClipboard()

        Dim SB As New System.Text.StringBuilder
        Dim T2 As String = "' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' '"
        Dim T3 As String = "' ' ' ' ' ' ' ' ' ' ' ' '  "
        Dim T4 As String = "  ' ' ' ' ' ' ' ' ' ' ' ' ' '"

        Dim TS As String
        TS = Me.Do_GetStandardTimeType02

        With SB
            .Append(T2)
            .Append(vbNewLine)
            .Append(T2)
            .Append(vbNewLine)
            .Append(T3 & TS & T4)
            .Append(vbNewLine)
            .Append(T2)
            .Append(vbNewLine)

            .Append(T)

            .Append(vbNewLine)
            .Append(T2)
            .Append(vbNewLine)
            .Append(T3 & TS & T4)
            .Append(vbNewLine)
            .Append(T2)
            .Append(vbNewLine)
            .Append(T2)
            .Append(vbNewLine)
        End With

        Me.Do_PasteStringToClipboard(SB.ToString)

    End Sub ' TreatClipboardContentAsVBSourceCodeAndMakeItReadyForPostingToBlogSpot

    Private Function Do_GetStringInClipboard() As String
        ' (本段程式之目的) Purpose:
        '     Get the text content currently stored in system's clipboard.
        ' (本段程式是否已經在被使用中) In use: Yes
        ' (重要等級) Importance rating:  85%
        ' (再利用的可能性) Chances of reuse:  90%
        ' (程式撰寫的進度) Developing: 100% (Mandatory)
        ' (程式堪用的程度) Workable: 80% (Threshold at 80%)
        ' (程式的測試程度) Code tested: 80% (max 99%)
        ' - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        ' (修改程式的日期) Revision Date: (2005 09 01 PM 01 50 25)
        ' (修改程式的人員) Revised by: WeiJin Tang (湯偉晉)
        '     OK
        ' - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

        Dim myDataObject As System.Windows.Forms.IDataObject
        Dim T As String
        myDataObject = System.Windows.Forms.Clipboard.GetDataObject()

        ' Try to return Unicode Text first, if failed, then try to return ANSI Text
        If myDataObject.GetDataPresent(System.Windows.Forms.DataFormats.UnicodeText) Then
            T = myDataObject.GetData(System.Windows.Forms.DataFormats.UnicodeText)
        Else
            If myDataObject.GetDataPresent(System.Windows.Forms.DataFormats.Text) Then
                T = myDataObject.GetData(System.Windows.Forms.DataFormats.Text)
            Else
                T = String.Empty
            End If
        End If

        Return T

        ' Begin: Reusable code block (2005 09 01 PM 10 26 20)
        If myDataObject.GetDataPresent(System.Windows.Forms.DataFormats.Text) Then
            MsgBox("Clipboard content is compatible with data type [System.Windows.Forms.DataFormats.Text]")
        Else
            MsgBox("Clipboard content is    NOT      compatible with data type  [System.Windows.Forms.DataFormats.Text]")
        End If

        If myDataObject.GetDataPresent(System.Windows.Forms.DataFormats.UnicodeText) Then
            MsgBox("Clipboard content is compatible with data type [System.Windows.Forms.DataFormats.UnicodeText]")
        Else
            MsgBox("Clipboard content is    NOT      compatible with data type  [System.Windows.Forms.DataFormats.UnicodeText]")
        End If

        If myDataObject.GetDataPresent(System.Windows.Forms.DataFormats.WaveAudio) Then
            MsgBox("Clipboard content is compatible with data type [System.Windows.Forms.DataFormats.WaveAudio]")
        Else
            MsgBox("Clipboard content is    NOT      compatible with data type  [System.Windows.Forms.DataFormats.WaveAudio]")
        End If

        If myDataObject.GetDataPresent(System.Windows.Forms.DataFormats.Html) Then
            MsgBox("Clipboard content is compatible with data type [System.Windows.Forms.DataFormats.Html]")
        Else
            MsgBox("Clipboard content is    NOT      compatible with data type  [System.Windows.Forms.DataFormats.Html]")
        End If

        If myDataObject.GetDataPresent(System.Windows.Forms.DataFormats.Rtf) Then
            MsgBox("Clipboard content is compatible with data type [System.Windows.Forms.DataFormats.Rtf]")
        Else
            MsgBox("Clipboard content is    NOT      compatible with data type  [System.Windows.Forms.DataFormats.Rtf]")
        End If

        If myDataObject.GetDataPresent(System.Windows.Forms.DataFormats.Bitmap) Then
            MsgBox("Clipboard content is compatible with data type [System.Windows.Forms.DataFormats.Bitmap]")
        Else
            MsgBox("Clipboard content is    NOT      compatible with data type  [System.Windows.Forms.DataFormats.Bitmap]")
        End If

        If myDataObject.GetDataPresent(System.Windows.Forms.DataFormats.PenData) Then
            MsgBox("Clipboard content is compatible with data type [System.Windows.Forms.DataFormats.PenData]")
        Else
            MsgBox("Clipboard content is    NOT      compatible with data type  [System.Windows.Forms.DataFormats.PenData]")
        End If

        If myDataObject.GetDataPresent(System.Windows.Forms.DataFormats.StringFormat) Then
            MsgBox("Clipboard content is compatible with data type [System.Windows.Forms.DataFormats.StringFormat]")
        Else
            MsgBox("Clipboard content is    NOT      compatible with data type  [System.Windows.Forms.DataFormats.StringFormat]")
        End If

        If myDataObject.GetDataPresent(System.Windows.Forms.DataFormats.Serializable) Then
            MsgBox("Clipboard content is compatible with data type [System.Windows.Forms.DataFormats.Serializable]")
        Else
            MsgBox("Clipboard content is    NOT      compatible with data type  [System.Windows.Forms.DataFormats.Serializable]")
        End If

        If myDataObject.GetDataPresent(System.Windows.Forms.DataFormats.Riff) Then
            MsgBox("Clipboard content is compatible with data type [System.Windows.Forms.DataFormats.Riff]")
        Else
            MsgBox("Clipboard content is    NOT      compatible with data type  [System.Windows.Forms.DataFormats.Riff]")
        End If
        ' End:    Reusable code block (2005 09 01 PM 10 26 20)

    End Function ' Do_GetStringInClipboard
    ' -   -   -   -   -   -   -   -   -   -   -   -   -
    ' -   -   -   -   -   -   -   -   -   -   -   -   -
    Private Function Do_GetStandardTimeStampWithYearMonthDayAndTime() As String
        ' (本段程式之目的) Purpose:
        '     Return a standard time stamp like the followings:
        '
        '           "(2003 07 28 AM 01 51 56)"
        '           "(2003 07 28 MM 12 51 56)"
        '           "(2003 07 28 PM 01 51 56)"
        '
        ' (本段程式是否已經在被使用中) In use: Yes
        ' (重要等級) Importance rating:  90%
        ' (再利用的可能性) Chances of reuse:  80%
        ' (程式撰寫的進度) Developing: 100%
        ' (程式堪用的程度) Workable: 80%
        ' (程式的測試程度) Code tested: 80%
        ' - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        ' (修改程式的日期) Revision Date: (2003 07 28 PM 01 49 20)
        ' (修改程式的人員) Revised by: WeiJin Tang (湯偉晉)
        '     OK
        '     Version: 1.00.02
        '     Last Updated: (2006 01 13 AM 01 39 50)
        '     Version: 1.00.01
        '     Last Updated: (2003 07 28 PM 01 49 20)
        ' - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

        ' Begin: 1.00.02 (2006 01 13 AM 01 40 03)

        Dim TimeStampWithYearMonthDayAndTime As String
        Dim ValueOfHour As Long

        Dim ThisMoment As Date
        ThisMoment = Now

        ValueOfHour = Hour(ThisMoment)

        Dim AM_MM_or_PM As String

        If ValueOfHour >= 0 And ValueOfHour < 12 Then
            AM_MM_or_PM = "AM"
        ElseIf ValueOfHour = 12 Then
            AM_MM_or_PM = "MM"
        Else
            AM_MM_or_PM = "PM"
            If ValueOfHour <> 12 Then
                ValueOfHour = ValueOfHour - 12
            End If
        End If

        Dim YearAsString As String
        YearAsString = ThisMoment.Year.ToString.PadLeft(4, Convert.ToChar("0"))
        Dim MonthAsString As String
        MonthAsString = ThisMoment.Month.ToString.PadLeft(2, Convert.ToChar("0"))
        Dim DayAsString As String
        DayAsString = ThisMoment.Day.ToString.PadLeft(2, Convert.ToChar("0"))

        Dim HourAsString As String
        HourAsString = ValueOfHour.ToString.PadLeft(2, Convert.ToChar("0"))

        Dim MinuteAsString As String
        MinuteAsString = ThisMoment.Minute.ToString.PadLeft(2, Convert.ToChar("0"))
        Dim SecondAsString As String
        SecondAsString = ThisMoment.Second.ToString.PadLeft(2, Convert.ToChar("0"))

        Dim SpaceChar As String = " "

        TimeStampWithYearMonthDayAndTime = "(" & YearAsString & SpaceChar & MonthAsString & SpaceChar & DayAsString & SpaceChar & AM_MM_or_PM & SpaceChar & HourAsString & SpaceChar & MinuteAsString & SpaceChar & SecondAsString & ")"

        Return TimeStampWithYearMonthDayAndTime

        ' End:    1.00.02 (2006 01 13 AM 01 40 03)

    End Function ' Do_GetStandardTimeStampWithYearMonthDayAndTime
    ' -   -   -   -   -   -   -   -   -   -   -   -   -
    ' -   -   -   -   -   -   -   -   -   -   -   -   -
    Private Function Do_GetStandardTimeType02() As String
        ' (本段程式之目的) Purpose:
        '     Return a standard time stamp like the followings:
        '
        '           "[2008_06_10_PM_09_28_21]"
        '
        ' (本段程式是否已經在被使用中) In use: Yes
        ' (重要等級) Importance rating:  90%
        ' (再利用的可能性) Chances of reuse:  80%
        ' (程式撰寫的進度) Developing: 100%
        ' (程式堪用的程度) Workable: 80%
        ' (程式的測試程度) Code tested: 80%
        ' - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        ' (修改程式的日期) Revision Date: (2008 06 10 PM 09 30 16)
        ' (修改程式的人員) Revised by: WeiJin Tang (湯偉晉)
        '     OK
        '     Version: 1.00.01
        '     Last Updated: (2008 06 10 PM 09 30 16)
        ' - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

        Dim T As String
        T = Me.Do_GetStandardTimeStampWithYearMonthDayAndTime
        T = T.Replace("(", "[")
        'T = T.Replace("-", "_")
        T = T.Replace(" ", "_")
        T = T.Replace(")", "]")

        Return T
    End Function
    ' -   -   -   -   -   -   -   -   -   -   -   -   -
    ' -   -   -   -   -   -   -   -   -   -   -   -   -
    Private Sub Do_PasteStringToClipboard(ByVal AnyString As String)
        ' (本段程式之目的) Purpose:
        '     Paste string to Clipboard.
        ' (本段程式是否已經在被使用中) In use: Yes
        ' (重要等級) Importance rating:  80%
        ' (再利用的可能性) Chances of reuse:  90%
        ' (程式撰寫的進度) Developing: 100% (Mandatory)
        ' (程式堪用的程度) Workable: 80% (Threshold at 80%)
        ' (程式的測試程度) Code tested: 80% (max 99%)
        ' - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        ' (修改程式的日期) Revision Date: (2004 12 06 PM 03 17 30)
        ' (修改程式的人員) Revised by: WeiJin Tang (湯偉晉)
        '     ok
        ' - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

        Clipboard.SetDataObject(AnyString, True)

    End Sub ' Do_PasteStringToClipboard
    ' -   -   -   -   -   -   -   -   -   -   -   -   -
    ' -   -   -   -   -   -   -   -   -   -   -   -   -
End Class ' SourceCodePublishingHelper_VBY2008M06

' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' '
' ' ' ' ' ' ' ' ' ' ' ' '  [2008_06_15_PM_05_39_04]  ' ' ' ' ' ' ' ' ' ' ' ' ' '
' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' '
' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' '

Test_字串建構員 [2008_06_15_PM_05_37_09]

' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' '
' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' '
' ' ' ' ' ' ' ' ' ' ' ' '  [2008_06_15_PM_05_37_09]  ' ' ' ' ' ' ' ' ' ' ' ' ' '
' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' '
    Private Sub miTest_字串建構員_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles miTest_字串建構員.Click
        ' OK
        Dim H As New 字串建構員

        H.從最後面接上這個字串("How")
        H.從最後面接上這個字串(" are")
        H.從最後面接上這個字串(" you?")

        Me.RichTextBox1.Text = H.傳回你所管理的字串
    End Sub ' miTest_字串建構員_Click

' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' '
' ' ' ' ' ' ' ' ' ' ' ' '  [2008_06_15_PM_05_37_09]  ' ' ' ' ' ' ' ' ' ' ' ' ' '
' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' '
' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' '

字串建構員 [2008_06_15_PM_05_16_31]

' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' '
' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' '
' ' ' ' ' ' ' ' ' ' ' ' '  [2008_06_15_PM_05_16_31]  ' ' ' ' ' ' ' ' ' ' ' ' ' '
' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' '
Public Class 字串建構員
    Private m_StringBuilder As System.Text.StringBuilder

    Public Sub 從最後面接上這個字串(ByVal 這個字串 As String)
        ' OK
        Me.SB.Append(這個字串)
    End Sub ' 從最後面接上這個字串

    Private ReadOnly Property SB() As System.Text.StringBuilder
        ' OK
        Get
            If Me.m_StringBuilder Is Nothing Then
                Me.m_StringBuilder = New System.Text.StringBuilder
            End If

            Return Me.m_StringBuilder
        End Get
    End Property

    Public Sub 清除您所管理的字串()
        ' OK
        Me.m_StringBuilder = Nothing
    End Sub ' 清除您所管理的字串

    Public Function 傳回你所管理的字串() As String
        ' OK
        Return Me.SB.ToString
    End Function

End Class ' 字串建構員

' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' '
' ' ' ' ' ' ' ' ' ' ' ' '  [2008_06_15_PM_05_16_31]  ' ' ' ' ' ' ' ' ' ' ' ' ' '
' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' '
' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' '

2008年6月14日 星期六

Result (2008 06 14 PM 04 12 23).PNG

Result (2008 06 14 PM 04 12 23).PNG
 

Demo how to use DataTable, DataGrid and …[2008_06_14_PM_03_12_58]

' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' '
' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' '
' ' ' ' ' ' ' ' ' ' ' ' '  [2008_06_14_PM_03_12_58]  ' ' ' ' ' ' ' ' ' ' ' ' ' '
' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' '
Public Class Form2
    Inherits System.Windows.Forms.Form

    ' Put the next line into the Declarations section.
    Private dataSet As DataSet

#Region " Windows Form 設計工具產生的程式碼 "

    Public Sub New()
        MyBase.New()

        '此為 Windows Form 設計工具所需的呼叫。
        InitializeComponent()

        '在 InitializeComponent() 呼叫之後加入所有的初始設定

    End Sub

    'Form 覆寫 Dispose 以清除元件清單。
    Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
        If disposing Then
            If Not (components Is Nothing) Then
                components.Dispose()
            End If
        End If
        MyBase.Dispose(disposing)
    End Sub

    '為 Windows Form 設計工具的必要項
    Private components As System.ComponentModel.IContainer

    '注意: 以下為 Windows Form 設計工具所需的程序
    '您可以使用 Windows Form 設計工具進行修改。
    '請勿使用程式碼編輯器來修改這些程序。
    Friend WithEvents DataGrid1 As System.Windows.Forms.DataGrid
    Friend WithEvents MainMenu1 As System.Windows.Forms.MainMenu
    Friend WithEvents MenuItem1 As System.Windows.Forms.MenuItem
    Friend WithEvents miTest01 As System.Windows.Forms.MenuItem
    Friend WithEvents miPublishSourceCode As System.Windows.Forms.MenuItem
    <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
        Me.DataGrid1 = New System.Windows.Forms.DataGrid
        Me.MainMenu1 = New System.Windows.Forms.MainMenu
        Me.MenuItem1 = New System.Windows.Forms.MenuItem
        Me.miTest01 = New System.Windows.Forms.MenuItem
        Me.miPublishSourceCode = New System.Windows.Forms.MenuItem
        CType(Me.DataGrid1, System.ComponentModel.ISupportInitialize).BeginInit()
        Me.SuspendLayout()
        '
        'DataGrid1
        '
        Me.DataGrid1.DataMember = ""
        Me.DataGrid1.Dock = System.Windows.Forms.DockStyle.Fill
        Me.DataGrid1.HeaderForeColor = System.Drawing.SystemColors.ControlText
        Me.DataGrid1.Location = New System.Drawing.Point(0, 0)
        Me.DataGrid1.Name = "DataGrid1"
        Me.DataGrid1.Size = New System.Drawing.Size(464, 445)
        Me.DataGrid1.TabIndex = 0
        '
        'MainMenu1
        '
        Me.MainMenu1.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.MenuItem1})
        '
        'MenuItem1
        '
        Me.MenuItem1.Index = 0
        Me.MenuItem1.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.miTest01, Me.miPublishSourceCode})
        Me.MenuItem1.Text = "Test"
        '
        'miTest01
        '
        Me.miTest01.Index = 0
        Me.miTest01.Text = "Test01"
        '
        'miPublishSourceCode
        '
        Me.miPublishSourceCode.Index = 1
        Me.miPublishSourceCode.Text = "Publish Source Code"
        '
        'Form1
        '
        Me.AutoScaleBaseSize = New System.Drawing.Size(5, 15)
        Me.ClientSize = New System.Drawing.Size(464, 445)
        Me.Controls.Add(Me.DataGrid1)
        Me.Menu = Me.MainMenu1
        Me.Name = "Form1"
        Me.Text = "Form1"
        CType(Me.DataGrid1, System.ComponentModel.ISupportInitialize).EndInit()
        Me.ResumeLayout(False)

    End Sub

#End Region

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

    End Sub


    Private Sub MakeDataTables()
        ' Run all of the functions.
        MakeParentTable()
        MakeChildTable()
        MakeDataRelation()
        BindToDataGrid()
    End Sub

    Private Sub MakeParentTable()
        ' Create a new DataTable.
        Dim table As DataTable = New DataTable("ParentTable")

        ' Declare variables for DataColumn and DataRow objects.
        Dim column As DataColumn
        Dim row As DataRow

        ' Create new DataColumn, set DataType, ColumnName
        ' and add to DataTable.   
        column = New DataColumn
        column.DataType = System.Type.GetType("System.Int32")
        column.ColumnName = "id"
        column.ReadOnly = True
        column.Unique = True

        ' Add the Column to the DataColumnCollection.
        table.Columns.Add(column)

        ' Create second column.
        column = New DataColumn
        column.DataType = System.Type.GetType("System.String")
        column.ColumnName = "ParentItem"
        column.AutoIncrement = False
        column.Caption = "ParentItem"
        column.ReadOnly = False
        column.Unique = False

        ' Add the column to the table.
        table.Columns.Add(column)

        ' Make the ID column the primary key column.
        Dim PrimaryKeyColumns(0) As DataColumn
        PrimaryKeyColumns(0) = table.Columns("id")
        table.PrimaryKey = PrimaryKeyColumns

        ' Instantiate the DataSet variable.
        dataSet = New DataSet

        ' Add the new DataTable to the DataSet.
        dataSet.Tables.Add(table)

        ' Create three new DataRow objects and add
        ' them to the DataTable
        Dim i As Integer
        For i = 0 To 2
            row = table.NewRow()
            row("id") = i
            row("ParentItem") = "ParentItem " + i.ToString()
            table.Rows.Add(row)
        Next i
    End Sub

    Private Sub MakeChildTable()
        ' Create a new DataTable.
        Dim table As DataTable = New DataTable("childTable")
        Dim column As DataColumn
        Dim row As DataRow

        ' Create first column and add to the DataTable.
        column = New DataColumn
        column.DataType = System.Type.GetType("System.Int32")
        column.ColumnName = "ChildID"
        column.AutoIncrement = True
        column.Caption = "ID"
        column.ReadOnly = True
        column.Unique = True

        ' Add the column to the DataColumnCollection.
        table.Columns.Add(column)

        ' Create second column.
        column = New DataColumn
        column.DataType = System.Type.GetType("System.String")
        column.ColumnName = "ChildItem"
        column.AutoIncrement = False
        column.Caption = "ChildItem"
        column.ReadOnly = False
        column.Unique = False
        table.Columns.Add(column)

        ' Create third column.
        column = New DataColumn
        column.DataType = System.Type.GetType("System.Int32")
        column.ColumnName = "ParentID"
        column.AutoIncrement = False
        column.Caption = "ParentID"
        column.ReadOnly = False
        column.Unique = False
        table.Columns.Add(column)

        dataSet.Tables.Add(table)

        ' Create three sets of DataRow objects, five rows each,
        ' and add to DataTable.
        Dim i As Integer
        For i = 0 To 4
            row = table.NewRow()
            row("childID") = i
            row("ChildItem") = "Item " + i.ToString()
            row("ParentID") = 0
            table.Rows.Add(row)
        Next i
        For i = 0 To 4
            row = table.NewRow()
            row("childID") = i + 5
            row("ChildItem") = "Item " + i.ToString()
            row("ParentID") = 1
            table.Rows.Add(row)
        Next i
        For i = 0 To 4
            row = table.NewRow()
            row("childID") = i + 10
            row("ChildItem") = "Item " + i.ToString()
            row("ParentID") = 2
            table.Rows.Add(row)
        Next i
    End Sub

    Private Sub MakeDataRelation()
        ' DataRelation requires two DataColumn
        ' (parent and child) and a name.
        Dim parentColumn As DataColumn = _
            dataSet.Tables("ParentTable").Columns("id")
        Dim childColumn As DataColumn = _
            dataSet.Tables("ChildTable").Columns("ParentID")
        Dim relation As DataRelation = New _
            DataRelation("parent2Child", parentColumn, childColumn)
        dataSet.Tables("ChildTable").ParentRelations.Add(relation)
    End Sub

    Private Sub BindToDataGrid()
        ' Instruct the DataGrid to bind to the DataSet, with the
        ' ParentTable as the topmost DataTable.
        DataGrid1.SetDataBinding(dataSet, "ParentTable")
    End Sub

    Private Sub miTest01_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles miTest01.Click
        Me.MakeDataTables()
        Me.MakeParentTable()
        Me.MakeChildTable()
        Me.MakeDataRelation()
        Me.BindToDataGrid()
    End Sub

    Private Sub miPublishSourceCode_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles miPublishSourceCode.Click
        Dim H As New SourceCodePublishingHelper_VBY2008M06

        H.TreatClipboardContentAsVBSourceCodeAndMakeItReadyForPostingToBlogSpot()

    End Sub
End Class

' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' '
' ' ' ' ' ' ' ' ' ' ' ' '  [2008_06_14_PM_03_12_58]  ' ' ' ' ' ' ' ' ' ' ' ' ' '
' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' '
' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' '

2008年6月10日 星期二

時間就是你的生命

2008-06-10
時間就是你的生命

Please remember that your time is very precious because it is actually your life. So, do make good use of your life.

by WeiJin Tang (
湯偉晉) on [2008-06-10]

SourceCodePublishingHelper_VBY2008M06 [2008-06-10-PM-09-56-52]

' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' '
' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' '
' ' ' ' ' ' ' ' ' ' ' ' '  [2008_06_10_PM_09_57_20]  ' ' ' ' ' ' ' ' ' ' ' ' ' '
' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' '
'     SourceCodePublishingHelper_VBY2008M06 [2008-06-10-PM-09-56-52]
'     Version: 1.00.01
'     Last Updated: (2008 06 10 PM 09 56 14)

Public Class SourceCodePublishingHelper_VBY2008M06

    Public Sub TreatClipboardContentAsVBSourceCodeAndMakeItReadyForPostingToBlogSpot()
        ' OK

        Dim T As String
        T = Me.Do_GetStringInClipboard()

        Dim SB As New System.Text.StringBuilder
        Dim T2 As String = "' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' '"
        Dim T3 As String = "' ' ' ' ' ' ' ' ' ' ' ' '  "
        Dim T4 As String = "  ' ' ' ' ' ' ' ' ' ' ' ' ' '"

        Dim TS As String
        TS = Me.Do_GetStandardTimeType02

        With SB
            .Append(T2)
            .Append(vbNewLine)
            .Append(T2)
            .Append(vbNewLine)
            .Append(T3 & TS & T4)
            .Append(vbNewLine)
            .Append(T2)
            .Append(vbNewLine)

            .Append(T)

            .Append(vbNewLine)
            .Append(T2)
            .Append(vbNewLine)
            .Append(T3 & TS & T4)
            .Append(vbNewLine)
            .Append(T2)
            .Append(vbNewLine)
            .Append(T2)
            .Append(vbNewLine)
        End With

        Me.Do_PasteStringToClipboard(SB.ToString)

    End Sub ' TreatClipboardContentAsVBSourceCodeAndMakeItReadyForPostingToBlogSpot

    Private Function Do_GetStringInClipboard() As String
        ' (本段程式之目的) Purpose:
        '     Get the text content currently stored in system's clipboard.
        ' (本段程式是否已經在被使用中) In use: Yes
        ' (重要等級) Importance rating:  85%
        ' (再利用的可能性) Chances of reuse:  90%
        ' (程式撰寫的進度) Developing: 100% (Mandatory)
        ' (程式堪用的程度) Workable: 80% (Threshold at 80%)
        ' (程式的測試程度) Code tested: 80% (max 99%)
        ' - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        ' (修改程式的日期) Revision Date: (2005 09 01 PM 01 50 25)
        ' (修改程式的人員) Revised by: WeiJin Tang (湯偉晉)
        '     OK
        ' - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

        Dim myDataObject As System.Windows.Forms.IDataObject
        Dim T As String
        myDataObject = System.Windows.Forms.Clipboard.GetDataObject()

        ' Try to return Unicode Text first, if failed, then try to return ANSI Text
        If myDataObject.GetDataPresent(System.Windows.Forms.DataFormats.UnicodeText) Then
            T = myDataObject.GetData(System.Windows.Forms.DataFormats.UnicodeText)
        Else
            If myDataObject.GetDataPresent(System.Windows.Forms.DataFormats.Text) Then
                T = myDataObject.GetData(System.Windows.Forms.DataFormats.Text)
            Else
                T = String.Empty
            End If
        End If

        Return T

        ' Begin: Reusable code block (2005 09 01 PM 10 26 20)
        If myDataObject.GetDataPresent(System.Windows.Forms.DataFormats.Text) Then
            MsgBox("Clipboard content is compatible with data type [System.Windows.Forms.DataFormats.Text]")
        Else
            MsgBox("Clipboard content is    NOT      compatible with data type  [System.Windows.Forms.DataFormats.Text]")
        End If

        If myDataObject.GetDataPresent(System.Windows.Forms.DataFormats.UnicodeText) Then
            MsgBox("Clipboard content is compatible with data type [System.Windows.Forms.DataFormats.UnicodeText]")
        Else
            MsgBox("Clipboard content is    NOT      compatible with data type  [System.Windows.Forms.DataFormats.UnicodeText]")
        End If

        If myDataObject.GetDataPresent(System.Windows.Forms.DataFormats.WaveAudio) Then
            MsgBox("Clipboard content is compatible with data type [System.Windows.Forms.DataFormats.WaveAudio]")
        Else
            MsgBox("Clipboard content is    NOT      compatible with data type  [System.Windows.Forms.DataFormats.WaveAudio]")
        End If

        If myDataObject.GetDataPresent(System.Windows.Forms.DataFormats.Html) Then
            MsgBox("Clipboard content is compatible with data type [System.Windows.Forms.DataFormats.Html]")
        Else
            MsgBox("Clipboard content is    NOT      compatible with data type  [System.Windows.Forms.DataFormats.Html]")
        End If

        If myDataObject.GetDataPresent(System.Windows.Forms.DataFormats.Rtf) Then
            MsgBox("Clipboard content is compatible with data type [System.Windows.Forms.DataFormats.Rtf]")
        Else
            MsgBox("Clipboard content is    NOT      compatible with data type  [System.Windows.Forms.DataFormats.Rtf]")
        End If

        If myDataObject.GetDataPresent(System.Windows.Forms.DataFormats.Bitmap) Then
            MsgBox("Clipboard content is compatible with data type [System.Windows.Forms.DataFormats.Bitmap]")
        Else
            MsgBox("Clipboard content is    NOT      compatible with data type  [System.Windows.Forms.DataFormats.Bitmap]")
        End If

        If myDataObject.GetDataPresent(System.Windows.Forms.DataFormats.PenData) Then
            MsgBox("Clipboard content is compatible with data type [System.Windows.Forms.DataFormats.PenData]")
        Else
            MsgBox("Clipboard content is    NOT      compatible with data type  [System.Windows.Forms.DataFormats.PenData]")
        End If

        If myDataObject.GetDataPresent(System.Windows.Forms.DataFormats.StringFormat) Then
            MsgBox("Clipboard content is compatible with data type [System.Windows.Forms.DataFormats.StringFormat]")
        Else
            MsgBox("Clipboard content is    NOT      compatible with data type  [System.Windows.Forms.DataFormats.StringFormat]")
        End If

        If myDataObject.GetDataPresent(System.Windows.Forms.DataFormats.Serializable) Then
            MsgBox("Clipboard content is compatible with data type [System.Windows.Forms.DataFormats.Serializable]")
        Else
            MsgBox("Clipboard content is    NOT      compatible with data type  [System.Windows.Forms.DataFormats.Serializable]")
        End If

        If myDataObject.GetDataPresent(System.Windows.Forms.DataFormats.Riff) Then
            MsgBox("Clipboard content is compatible with data type [System.Windows.Forms.DataFormats.Riff]")
        Else
            MsgBox("Clipboard content is    NOT      compatible with data type  [System.Windows.Forms.DataFormats.Riff]")
        End If
        ' End:    Reusable code block (2005 09 01 PM 10 26 20)

    End Function ' Do_GetStringInClipboard
    ' -   -   -   -   -   -   -   -   -   -   -   -   -
    ' -   -   -   -   -   -   -   -   -   -   -   -   -
    Private Function Do_GetStandardTimeStampWithYearMonthDayAndTime() As String
        ' (本段程式之目的) Purpose:
        '     Return a standard time stamp like the followings:
        '
        '           "(2003 07 28 AM 01 51 56)"
        '           "(2003 07 28 MM 12 51 56)"
        '           "(2003 07 28 PM 01 51 56)"
        '
        ' (本段程式是否已經在被使用中) In use: Yes
        ' (重要等級) Importance rating:  90%
        ' (再利用的可能性) Chances of reuse:  80%
        ' (程式撰寫的進度) Developing: 100%
        ' (程式堪用的程度) Workable: 80%
        ' (程式的測試程度) Code tested: 80%
        ' - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        ' (修改程式的日期) Revision Date: (2003 07 28 PM 01 49 20)
        ' (修改程式的人員) Revised by: WeiJin Tang (湯偉晉)
        '     OK
        '     Version: 1.00.02
        '     Last Updated: (2006 01 13 AM 01 39 50)
        '     Version: 1.00.01
        '     Last Updated: (2003 07 28 PM 01 49 20)
        ' - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

        ' Begin: 1.00.02 (2006 01 13 AM 01 40 03)

        Dim TimeStampWithYearMonthDayAndTime As String
        Dim ValueOfHour As Long

        Dim ThisMoment As Date
        ThisMoment = Now

        ValueOfHour = Hour(ThisMoment)

        Dim AM_MM_or_PM As String

        If ValueOfHour >= 0 And ValueOfHour < 12 Then
            AM_MM_or_PM = "AM"
        ElseIf ValueOfHour = 12 Then
            AM_MM_or_PM = "MM"
        Else
            AM_MM_or_PM = "PM"
            If ValueOfHour <> 12 Then
                ValueOfHour = ValueOfHour - 12
            End If
        End If

        Dim YearAsString As String
        YearAsString = ThisMoment.Year.ToString.PadLeft(4, Convert.ToChar("0"))
        Dim MonthAsString As String
        MonthAsString = ThisMoment.Month.ToString.PadLeft(2, Convert.ToChar("0"))
        Dim DayAsString As String
        DayAsString = ThisMoment.Day.ToString.PadLeft(2, Convert.ToChar("0"))

        Dim HourAsString As String
        HourAsString = ValueOfHour.ToString.PadLeft(2, Convert.ToChar("0"))

        Dim MinuteAsString As String
        MinuteAsString = ThisMoment.Minute.ToString.PadLeft(2, Convert.ToChar("0"))
        Dim SecondAsString As String
        SecondAsString = ThisMoment.Second.ToString.PadLeft(2, Convert.ToChar("0"))

        Dim SpaceChar As String = " "

        TimeStampWithYearMonthDayAndTime = "(" & YearAsString & SpaceChar & MonthAsString & SpaceChar & DayAsString & SpaceChar & AM_MM_or_PM & SpaceChar & HourAsString & SpaceChar & MinuteAsString & SpaceChar & SecondAsString & ")"

        Return TimeStampWithYearMonthDayAndTime

        ' End:    1.00.02 (2006 01 13 AM 01 40 03)

    End Function ' Do_GetStandardTimeStampWithYearMonthDayAndTime
    ' -   -   -   -   -   -   -   -   -   -   -   -   -
    ' -   -   -   -   -   -   -   -   -   -   -   -   -
    Private Function Do_GetStandardTimeType02() As String
        ' (本段程式之目的) Purpose:
        '     Return a standard time stamp like the followings:
        '
        '           "[2008_06_10_PM_09_28_21]"
        '
        ' (本段程式是否已經在被使用中) In use: Yes
        ' (重要等級) Importance rating:  90%
        ' (再利用的可能性) Chances of reuse:  80%
        ' (程式撰寫的進度) Developing: 100%
        ' (程式堪用的程度) Workable: 80%
        ' (程式的測試程度) Code tested: 80%
        ' - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        ' (修改程式的日期) Revision Date: (2008 06 10 PM 09 30 16)
        ' (修改程式的人員) Revised by: WeiJin Tang (湯偉晉)
        '     OK
        '     Version: 1.00.01
        '     Last Updated: (2008 06 10 PM 09 30 16)
        ' - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

        Dim T As String
        T = Me.Do_GetStandardTimeStampWithYearMonthDayAndTime
        T = T.Replace("(", "[")
        'T = T.Replace("-", "_")
        T = T.Replace(" ", "_")
        T = T.Replace(")", "]")

        Return T
    End Function
    ' -   -   -   -   -   -   -   -   -   -   -   -   -
    ' -   -   -   -   -   -   -   -   -   -   -   -   -
    Private Sub Do_PasteStringToClipboard(ByVal AnyString As String)
        ' (本段程式之目的) Purpose:
        '     Paste string to Clipboard.
        ' (本段程式是否已經在被使用中) In use: Yes
        ' (重要等級) Importance rating:  80%
        ' (再利用的可能性) Chances of reuse:  90%
        ' (程式撰寫的進度) Developing: 100% (Mandatory)
        ' (程式堪用的程度) Workable: 80% (Threshold at 80%)
        ' (程式的測試程度) Code tested: 80% (max 99%)
        ' - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        ' (修改程式的日期) Revision Date: (2004 12 06 PM 03 17 30)
        ' (修改程式的人員) Revised by: WeiJin Tang (湯偉晉)
        '     ok
        ' - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

        Clipboard.SetDataObject(AnyString, True)

    End Sub ' Do_PasteStringToClipboard
    ' -   -   -   -   -   -   -   -   -   -   -   -   -
    ' -   -   -   -   -   -   -   -   -   -   -   -   -
End Class ' SourceCodePublishingHelper_VBY2008M06

' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' '
' ' ' ' ' ' ' ' ' ' ' ' '  [2008_06_10_PM_09_57_20]  ' ' ' ' ' ' ' ' ' ' ' ' ' '
' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' '
' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' '