首页
留言板
关于
三味的小站
世界上没有偶然,有的只是必然的结果。
累计撰写
64
篇文章
累计创建
14
个标签
累计收到
0
条评论
栏目
目 录
CONTENT
以下是
三味线
的文章
2020-04-27
Python发送邮件
#!/usr/bin/python # -*- coding: UTF-8 -*- import smtplib from email.mime.text import MIMEText from email.header import Header # 第三方 SMTP 服务 mail_host
2020-04-27
16
0
0
python
2020-03-27
js forEach中的continue,break
Lodash 中的 forEach 函数 var array = ["a", "b", "c", "d"]; _.forEach(array, function (item) { if (item == "a") { return true; // continue
2020-03-27
71
0
0
js
2020-02-09
js中写文件到远程共享文件夹(SmbFile|net use|mount.cifs)
重构代码时遇到的问题,原Java代码用的SmbFile及相关库,现在要改在js中实现; 1. Windows下可以使用net use命令 net use <local_dir> <remote_dir> <password> /user:<username> net use Z: \\10.3.3
2020-02-09
43
0
0
js
2020-01-14
PGSQL UPSERT使用
PG 9.5开始支持的特性,根据约束,存在则更新,不存在则插入; 使用某字段约束: INSERT INTO distributors (did, dname) VALUES (8, 'Anvil Distribution') ON CONFLICT (did) DO UPDATE SET dname
2020-01-14
12
0
0
sql
2020-01-03
CentOS连接Sql Server 驱动安装
一、使用微软的 Microsoft ODBC Driver for SQL Server sudo su #Download appropriate package for the OS version #Choose only ONE of the following, corresponding
2020-01-03
27
0
0
linux
2019-08-05
js 字符串作为函数运行
1. new Function var test = new Function("(function(){console.log('hello!')})()"); 会在外面再包一层函数,获取不到返回值: 2. eval var test = eval("(
2019-08-05
25
0
0
js
2019-07-17
QTableView文字换行
使用QStyledItemDelegate代理手动绘制文字 #ifndef MAINWINDOW_H #define MAINWINDOW_H #include <QMainWindow> #include <QStyledItemDelegate> class QTableView; clas
2019-07-17
39
0
0
Qt
2019-06-24
Qt Debug重定向到文本控件
Qt中可以将qDebug()输出的信息重定向通过窗口控件输出; 定义一个MsgHandlerWapper类用于转接消息: // msghandlerwapper.h #ifndef MSGHANDLERWAPPER_H #define MSGHANDLERWAPPER_H #include <QtC
2019-06-24
17
0
0
Qt
2019-06-20
QGraphicsItem中添加控件
1. 直接添加到Scene QGraphicsScene *scene = new QGraphicsScene; QLineEdit *lineEdit = new QLineEdit("Hello"); QGraphicsProxyWidget *proxy = scene->AddWidget
2019-06-20
20
0
0
Qt
2019-06-18
QGraphicsItem不响应mouseReleaseEvent的问题
直接重写鼠标事件,遇到的问题是:只响应press事件,而move和release事件不响应。 解决方式是将item设为selectable或movable。 //构造函数中 this->setFlag(QGraphicsItem::ItemIsSelectable); this->setAccept
2019-06-18
40
0
0
Qt
1
2
3
4
5
6
7