当前位置: 首页 > news >正文

学生个人网页设计主题/系统优化的意义

学生个人网页设计主题,系统优化的意义,python安卓app开发,轻量级开源cmsC 功能算法实现 文章目录C 功能算法实现前言一、基本功能总结前言 无 一、基本功能 C 真随机数生成方法 “秒”转换成“年月日时分秒”“秒”转“年月日时分秒” //上面链接中网络上的代码解出时间来有些问题,并且起始月份日期只能是1月1日,以下是我修…

C++ 功能算法实现


文章目录

  • C++ 功能算法实现
  • 前言
  • 一、基本功能
  • 总结


前言


一、基本功能

C++ 真随机数生成方法

  • “秒”转换成“年月日时分秒”
  • “秒”转“年月日时分秒”
//上面链接中网络上的代码解出时间来有些问题,并且起始月份日期只能是1月1日,以下是我修改后的代码int IfLeapYear(int year)
{return (((year%100!=0)&&(year%4==0)) || ((year%100==0)&&(year%400==0)));
}
string Second2Date_2(long long inputSecond)
{//秒数转换int year___d[2] = {365, 366};int year___s[2]     = {365*24*60*60,366*24*60*60};int month__d[2][12] = {{31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31},{31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}};int day____s = 24*60*60;int hour___s = 60*60;int minute_s = 60;//起始时间int start_year__ = 1996;int start_month_ = 9;int start_day___ = 29;int start_hour__ = 0;int start_minute = 0;int start_second = 0;int out_year__ = start_year__;int out_month_ = 1;int out_day___ = 1;int out_hour__ = 0;int out_minute = 0;long long out_second ;//获取初始秒long long tempSecond = inputSecond;//将 时:分:秒 转化为 00:00:00out_second = tempSecond + start_second+start_minute*minute_s+start_hour__*hour___s;//将月份转化为当年1月for(int i_mon=1;i_mon<start_month_;i_mon++){out_second += month__d[IfLeapYear(start_year__)][i_mon-1]*day____s;}//将日转化为当年1日out_second += (start_day___-1)*day____s;///以下时间基于 xxxx-01-01T00:00:00out_day___ = out_second / (long long)day____s;out_second = out_second % day____s;out_hour__ = out_second / hour___s;out_second = out_second % hour___s;out_minute = out_second / minute_s;out_second = out_second % minute_s;while(out_day___ >= year___d[IfLeapYear(out_year__)]) ///$$$$$$$$$$$$$$$${out_day___ -= year___d[IfLeapYear(out_year__)];out_year__++;}while(out_day___ >= month__d[IfLeapYear(out_year__)][out_month_-1]){out_day___ -= month__d[IfLeapYear(out_year__)][out_month_-1];out_month_++;}//cout<<out_year__<<"-"<<out_month_<<"-"<<out_day___<<"T"<<out_hour__<<":"<<out_minute<<":"<<out_second<<endl;char* out_C = (char*)malloc(sizeof(char)*1000);sprintf(out_C, "%04d-%02d-%02d %02d:%02d:%02d", out_year__, out_month_, out_day___, out_hour__, out_minute, out_second);//cout<<"****************"<<out_C<<endl;return out_C;
}
  • C++实现删除txt文件中的指定内容

  • 获取子字符串

tempStr = input_group_name.substr(iInLen+1,input_group_name.length()-iInLen-1);
  • C++复制剪切删除文件
  • C++打开文件夹
  • C++将变量名转换为字符串
  • 只使用位运算实现整数加减乘除
  • C++按照空格分割字符串
  • C++使用空格或者特定字符 分割字符串string
  • C++获取文件夹下所有文件的路径
  • 取整
ceil();//向上舍入为最接近的整数
floor();//向下舍入为最接近的整数
round();//对浮点数进行四舍五入

总结

http://www.jmfq.cn/news/4922947.html

相关文章:

  • 机加工如何用网站开发客户/微信crm客户管理系统
  • 网站建设亇金手指专业/宝鸡网站开发公司
  • 海口建设工程信息网站/搜索竞价托管
  • 潍坊市网站建设公司/北京百度seo
  • 二维码创意设计/被公司优化掉是什么意思
  • 网站建设项目的工作分解/seo软件推广
  • vps 网站发布/长沙建站seo公司
  • 如何对网站进行推广/新闻稿件代发平台
  • 济南网站开发企业/如何进行关键词分析
  • 沧州哪里可以做网站/免费域名注册永久
  • 湖南人文科技学院宿舍/网站优化策略分析论文
  • wordpress生成站点地图/东莞网站建设最牛
  • 电商商城网站建设方案/培训机构哪家好
  • ydblog wordpress/惠州seo排名收费
  • 安丘网站建设报价/电脑优化软件
  • 专门做批发的网站吗/企业查询信息平台
  • 网站制作关键技术/新网域名查询
  • 深圳网站建设开发/网站指数查询
  • 做网站怎么去找客户/房地产估价师考试
  • 电子pcb做兼职的网站/端点seo博客
  • 济南能源建设网站/营销型网站建设服务
  • 在国外做盗版电影网站吗/企业站seo价格
  • wordpress导出app/东莞seo优化公司
  • 网站开发人才/海外广告投放渠道
  • 网站建设合同鉴于甲方委托乙方/商城全网推广运营公司
  • 如何做拼多多商城官网站/广东省疫情最新
  • 什么样的笔记本电脑适合网站开发/网站域名注册
  • 给设计网站做图/百度站长工具
  • 广州网站推广找谁/百度免费推广网站
  • 电商网站 设计/现在做百度推广有用吗