如何用ASP计算下载一个文件需要多长时间?

see7di 2006-04-22 06:08:19
如题
在线等待
...全文
88 3 打赏 收藏 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
see7di 2006-04-22
  • 打赏
  • 举报
回复
谢谢,楼上的朋友
deninghe 2006-04-22
  • 打赏
  • 举报
回复
Mark
www_7di_net 2006-04-22
  • 打赏
  • 举报
回复
<%
Function DownloadTime(intFileSize, strModemType)
Dim TimeInSeconds, ModemSpeed, strDownloadTime, AppendString
Dim intYears, intWeeks, intDays
Dim intHours, intMinutes, intSeconds
intYears = 0
intWeeks = 0
intDays = 0
intHours = 0
intMinutes = 0
intSeconds = 0
strDownloadTime = ""
Select Case strModemType
Case "Cable"
ModemSpeed = 400000
Case "56kbps"
ModemSpeed = 7000
Case "33.6kbps"
ModemSpeed = 4200
Case "28.8kbps"
ModemSpeed = 3600
End Select
TimeInSeconds = int(intFileSize / ModemSpeed)
'year maths added 1/4 of a day. 1 exact orbit of the sub is 365.25 days.
If (Int(TimeInSeconds / 31471200) <> 0) Then intYears = Int(TimeInSeconds / 31449600)
If ((Int(TimeInSeconds / 604800) Mod 52) <> 0) Then intWeeks = Int(TimeInSeconds / 604800) Mod 52
If ((Int(TimeInSeconds / 86400) Mod 7) <> 0) Then intDays = Int(TimeInSeconds / 86400) Mod 7
If TimeInSeconds >= 3600 Then intHours = Int(TimeInSeconds / 3600) Mod 24
If TimeInSeconds >= 60 Then intMinutes = Int(TimeInSeconds / 60) Mod 60
If TimeInSeconds >= 0 Then intSeconds = Int(TimeInSeconds) Mod 60
If intYears <> 0 Then
If intYears = 1 Then AppendString = "" Else AppendString = "s"
strDownloadTime = strDownloadTime & intYears & " year" & AppendString & ", "
End If
If intWeeks <> 0 Then
If intWeeks = 1 Then AppendString = "" Else AppendString = "s"
strDownloadTime = strDownloadTime & intWeeks & " week" & AppendString & ", "
End If
If intDays <> 0 Then
If intDays = 1 Then AppendString = "" Else AppendString = "s"
strDownloadTime = strDownloadTime & intDays & " day" & AppendString & ", "
End If
If intHours <> 0 Then
If intHours = 1 Then AppendString = "" Else AppendString = "s"
strDownloadTime = strDownloadTime & intHours & " hour" & AppendString & ", "
End If
If intMinutes <> 0 Then
If intMinutes = 1 Then AppendString = "" Else AppendString = "s"
strDownloadTime = strDownloadTime & intMinutes & " minute" & AppendString
End If
If ((intYears = 0) And (intWeeks = 0) And (intDays = 0) And (intHours = 0)) Then
If intSeconds = 1 Then AppendString = "" Else AppendString = "s"
If intMinutes > 0 Then
strDownloadTime = strDownloadTime & ", " & intSeconds & " second" & AppendString
Else
strDownloadTime = strDownloadTime & intSeconds & " second" & AppendString
End If
End If
DownloadTime = strDownloadTime
End Function
%>
<html>
<body>
It is going to take about
<%=DownloadTime(123456,Cable)%> to download this file.
</body>
</html>
摘 要 高校学生岗位实习是实践教学体系的核心环节,传统实习管理模式依赖线下纸质操作与人工沟通,存在信息不对称、审批效率低下、实习过程监管困难、数据统计繁琐等诸多痛点,难以适配学生、企业、学校三方的移动化办公与管理需求。为解决上述问题,本文设计并实现了一套基于微信小程序的学生岗位实习管理系统,系统采用前后端分离架构,前端以微信小程序原生框架为基础,结合 Vant Weapp 组件库搭建交互界面,后端基于 Spring Boot 框架开发,搭配 MyBatis-Plus 实现数据库操作,以 MySQL 作为核心数据存储载体,Redis 完成缓存优化,同时通过 WebSocket 实现实时交互功能,HTTPS 保障数据传输安全。系统围绕学生、教师、学校管理员、企业四类核心用户搭建功能模块,覆盖实习岗位对接、实习过程管理、实习评价反馈、数据统计分析等实习全流程,实现了实习申请线上化、考勤打卡智能化、审批指导便捷化、数据管理可视化。经设计与实现,该系统能够消除三方信息壁垒,提升实习管理的效率与规范性,有效规避虚假实习、放羊式实习等问题,同时依托微信生态的高普及率,实现零下载安装的轻量化使用体验,降低系统推广与使用门槛。此外,系统所沉淀的实习数据可为高校优化实践教学安排、调整人才培养方案提供量化支撑,兼具实用性与教学指导价值。 关键词:学生岗位实习系统;SpringBoot框架;Java技术;微信小程序;MySQL

28,402

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧