Linkerzijkant

Zoeken

Zoek in dit item






Grote het script snippet Sticky


    [offline] Geplaatst op vrijdag 17 maart 2006 22:01

    Acties:


    Door: Aapje
    Admin
    Phfear zeh birdeh
    Afbeelding van Aapje
    Grote het script snippet Sticky
    http://the-baboon.nl/photos/anderemeuk/Junk/wp_B04490.jpg
    Het snippets lijstje
    • Bytes to PB/TB/GB/MB/kB transform script.
    Alle script snippets zijn vrij voor gebruik.
    Heb je nuttige snippets open en topic.
    Met [Snippet] in de titel.

    En ja de code tags verneuken het design :+

    "My software never has bugs, it just develops random features."


    [offline] Geplaatst op vrijdag 17 maart 2006 22:03

    Acties:


    Door: Aapje
    Admin
    Phfear zeh birdeh
    Afbeelding van Aapje

    code:
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    
    '--------------------------------------------------------------------------------------------
    '-------------------------- Bytes function (c) Aapje.
    '-------------------------- Creator: baboon@the-baboon.nl
    '-------------------------- Last edited: 17-03-06
    '--------------------------------------------------------------------------------------------
    Function ByteFormat(strByte)
     If strByte < 0 Then                       ByteFormat = "N/A"
      If (strByte / 1000000000000000) >= 1 and ByteFormat = "" Then ByteFormat = "<code><b>"  & Round(strByte / 1125899906842624, 2)  & "PB</b></code>"
     If (strByte / 1000000000000) >= 1 and ByteFormat = "" Then    ByteFormat = "<code><b>"  & Round(strByte / 1099511627776, 2)   & "TB</b></code>"
     If (strByte / 1000000000) >= 1 and ByteFormat = "" Then     ByteFormat = "<code><b>"  & Round(strByte / 1073741824, 2)    & "GB</b></code>"
     If (strByte / 1000000) >= 1 and ByteFormat = ""  Then     ByteFormat = "<code>"     & Round(strByte / 1048576, 2)       & "MB</code>"
     If (strByte / 1000) >= 1 and ByteFormat = ""  Then        ByteFormat = "<code>"     & Round(strByte / 1024, 2)        & "kB</code>"
     If ByteFormat = "" Then                     ByteFormat = "<code>"     & Round(strByte)            & "B</code>"
    End Function

    "My software never has bugs, it just develops random features."

Dit onderwerp heeft 1 reactie, en bestaat uit 1 pagina.
De laatste reactie is geplaatst op 17-03-2006 22:03.

Troep