三味的小站

Archives

2020 / 05

PGSQL中可使用COPY命令来导入/导出数据,这里以CSV文件为例。 导出数据 SQL Shell执行: COPY table_name (col1,col2,col3) TO 'path_name.csv' CSV HEADER; 如果表格使用了分表,需使用select获取数据: COPY (s

2020 / 04

2020-04-27

#!/usr/bin/python # -*- coding: UTF-8 -*- import smtplib from email.mime.text import MIMEText from email.header import Header # 第三方 SMTP 服务 mail_host

2020 / 03

Lodash 中的 forEach 函数 var array = ["a", "b", "c", "d"]; _.forEach(array, function (item) { if (item == "a") { return true; // continue

2020 / 02

重构代码时遇到的问题,原Java代码用的SmbFile及相关库,现在要改在js中实现; 1. Windows下可以使用net use命令 net use <local_dir> <remote_dir> <password> /user:<username> net use Z: \\10.3.3

2020 / 01

2020-01-14

PG 9.5开始支持的特性,根据约束,存在则更新,不存在则插入; 使用某字段约束: INSERT INTO distributors (did, dname) VALUES (8, 'Anvil Distribution') ON CONFLICT (did) DO UPDATE SET dname
一、使用微软的 Microsoft ODBC Driver for SQL Server sudo su #Download appropriate package for the OS version #Choose only ONE of the following, corresponding

2019 / 08

1. new Function var test = new Function("(function(){console.log('hello!')})()"); 会在外面再包一层函数,获取不到返回值: 2. eval var test = eval("(

2019 / 07

使用QStyledItemDelegate代理手动绘制文字 #ifndef MAINWINDOW_H #define MAINWINDOW_H #include <QMainWindow> #include <QStyledItemDelegate> class QTableView; clas

2019 / 06

Qt中可以将qDebug()输出的信息重定向通过窗口控件输出; 定义一个MsgHandlerWapper类用于转接消息: // msghandlerwapper.h #ifndef MSGHANDLERWAPPER_H #define MSGHANDLERWAPPER_H #include <QtC
1. 直接添加到Scene QGraphicsScene *scene = new QGraphicsScene; QLineEdit *lineEdit = new QLineEdit("Hello"); QGraphicsProxyWidget *proxy = scene->AddWidget
Previous Next