![](https://img-blog.csdnimg.cn/20201014180756919.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
编程笔记
白丰
这个作者很懒,什么都没留下…
展开
-
python 3.8 发送邮件
# coding: utf-8import smtplibfrom email.mime.text import MIMETextfrom email.header import Headerimport ssl# 第三方 SMTP 服务mail_host="smtp.office365.com" #设置服务器mail_user="xxxx@office2016.com" #用户名mail_pass="xxxxx" #口令 sender = "xxxx@office20原创 2021-10-26 21:03:03 · 371 阅读 · 0 评论 -
QString类转换的精度处理,double类数字转换为qstring类
double类数字转换为qstring类会发生精度下降(尽管直觉上是降级转换,对吧?)我百思不得其解,它会自动的,把double类用科学计数法表示,这相当于直接修改了支付串的值我用以下方法解决double r;qstring s;s=QString("%1").arg(r, 0, 'f', 9);//保持有效数字,"%1"表示double数,'f'不用科学计数法//这种方法会使得当小数点不足九位时,以0补全 if(s.contains('.',Qt::CaseInsens原创 2020-09-08 10:55:04 · 1707 阅读 · 0 评论 -
QString类串去除数字
在使用QT写实习代码的时候,csdn上有各种好用的小代码(虽然大多是转载)我想要实现对一个qstrin类的字符串去除其中数字,没发现有成品,这里搞一个const QString num="0123456789";//这里仅储存用于读取的字符串,所以用const while (1) { i=tmp.size(); for(int j=0;j<=9;j++) {原创 2020-09-08 10:43:47 · 1478 阅读 · 1 评论