{"id":40,"date":"2007-08-21T16:06:40","date_gmt":"2007-08-21T08:06:40","guid":{"rendered":"http:\/\/www.cnmiss.cn\/?p=39"},"modified":"2010-12-02T06:31:46","modified_gmt":"2010-12-02T06:31:46","slug":"%e8%ae%a1%e7%ae%97%e6%96%87%e4%bb%b6%e4%b8%8b%e8%bd%bd%e6%97%b6%e9%97%b4","status":"publish","type":"post","link":"https:\/\/www.cnmiss.cn\/?p=40","title":{"rendered":"\u8ba1\u7b97\u6587\u4ef6\u4e0b\u8f7d\u65f6\u95f4"},"content":{"rendered":"<blockquote><p>&lt;%<br \/>Function DownloadTime(intFileSize, strModemType)<br \/>Dim TimeInSeconds, ModemSpeed, strDownloadTime, AppendString<br \/>Dim intYears, intWeeks, intDays<br \/>Dim intHours, intMinutes, intSeconds<br \/>intYears = 0<br \/>intWeeks = 0<br \/>intDays = 0<br \/>intHours = 0<br \/>intMinutes = 0<br \/>intSeconds = 0<br \/>strDownloadTime = &quot;&quot;<br \/>Select Case strModemType<br \/>Case &quot;Cable&quot;<br \/>  ModemSpeed = 400000<br \/>Case &quot;56kbps&quot;<br \/>  ModemSpeed = 7000<br \/>Case &quot;33.6kbps&quot;<br \/>  ModemSpeed = 4200<br \/>Case &quot;28.8kbps&quot;<br \/>  ModemSpeed = 3600<br \/>End Select<br \/>TimeInSeconds = int(intFileSize \/ ModemSpeed)<br \/>&#39;year maths added 1\/4 of a day. 1 exact orbit of the sub is 365.25 days.<br \/>If (Int(TimeInSeconds \/ 31471200) &lt;&gt; 0) Then intYears = Int(TimeInSeconds \/ 31449600)<br \/>If ((Int(TimeInSeconds \/ 604800) Mod 52) &lt;&gt; 0) Then intWeeks = Int(TimeInSeconds \/ 604800) Mod 52<br \/>If ((Int(TimeInSeconds \/ 86400) Mod 7) &lt;&gt; 0) Then intDays = Int(TimeInSeconds \/ 86400) Mod 7<br \/>If TimeInSeconds &gt;= 3600 Then intHours = Int(TimeInSeconds \/ 3600) Mod 24<br \/>If TimeInSeconds &gt;= 60 Then intMinutes = Int(TimeInSeconds \/ 60) Mod 60<br \/>If TimeInSeconds &gt;= 0 Then intSeconds = Int(TimeInSeconds) Mod 60<br \/>If intYears &lt;&gt; 0 Then<br \/>  If intYears = 1 Then AppendString = &quot;&quot; Else AppendString = &quot;s&quot;<br \/>  strDownloadTime = strDownloadTime &#038; intYears &#038; &quot; year&quot; &#038; AppendString &#038; &quot;, &quot;<br \/>End If<br \/>If intWeeks &lt;&gt; 0 Then<br \/>  If intWeeks = 1 Then AppendString = &quot;&quot; Else AppendString = &quot;s&quot;<br \/>  strDownloadTime = strDownloadTime &#038; intWeeks &#038; &quot; week&quot; &#038; AppendString &#038; &quot;, &quot;<br \/>End If<br \/>If intDays &lt;&gt; 0 Then<br \/>  If intDays = 1 Then AppendString = &quot;&quot; Else AppendString = &quot;s&quot;<br \/>  strDownloadTime = strDownloadTime &#038; intDays &#038; &quot; day&quot; &#038; AppendString &#038; &quot;, &quot;<br \/>End If<br \/>If intHours &lt;&gt; 0 Then<br \/>  If intHours = 1 Then AppendString = &quot;&quot; Else AppendString = &quot;s&quot;<br \/>  strDownloadTime = strDownloadTime &#038; intHours &#038; &quot; hour&quot; &#038; AppendString &#038; &quot;, &quot;<br \/>End If<br \/>If intMinutes &lt;&gt; 0 Then<br \/>  If intMinutes = 1 Then AppendString = &quot;&quot; Else AppendString = &quot;s&quot;<br \/>  strDownloadTime = strDownloadTime &#038; intMinutes &#038; &quot; minute&quot; &#038; AppendString<br \/>End If<br \/>If ((intYears = 0) And (intWeeks = 0) And (intDays = 0) And (intHours = 0)) Then<br \/>  If intSeconds = 1 Then AppendString = &quot;&quot; Else AppendString = &quot;s&quot;<br \/>  If intMinutes &gt; 0 Then<br \/>   strDownloadTime = strDownloadTime  &#038; &quot;, &quot; &#038; intSeconds &#038; &quot; second&quot; &#038; AppendString<br \/>  Else<br \/>   strDownloadTime = strDownloadTime &#038; intSeconds &#038; &quot; second&quot; &#038; AppendString<br \/>  End If<br \/>End If<br \/>DownloadTime = strDownloadTime<br \/>End Function<br \/>%&gt;<br \/>&lt;html&gt;<br \/>&lt;body&gt;<br \/>It is going to take about<br \/>&lt;%=DownloadTime(123456,Cable)%&gt; to download this file.<br \/>&lt;\/body&gt;<br \/>&lt;\/html&gt;<\/p><\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>&lt;%Function DownloadTime(intFileSize,  &hellip; <a href=\"https:\/\/www.cnmiss.cn\/?p=40\">\u7ee7\u7eed\u9605\u8bfb <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[13],"class_list":["post-40","post","type-post","status-publish","format-standard","hentry","category-xxbj","tag-asp"],"_links":{"self":[{"href":"https:\/\/www.cnmiss.cn\/index.php?rest_route=\/wp\/v2\/posts\/40","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.cnmiss.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.cnmiss.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.cnmiss.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.cnmiss.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=40"}],"version-history":[{"count":0,"href":"https:\/\/www.cnmiss.cn\/index.php?rest_route=\/wp\/v2\/posts\/40\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.cnmiss.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=40"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.cnmiss.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=40"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.cnmiss.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=40"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}