SED是一种在线的、非交互式的编辑器,它一次处理一行内容。和awk类似,差别在于,sed简单,对列处理的功能要差一些,awk的功能复杂,对列处理的功能比较强。Sed主要用来自动编辑一个或多个文件;简化对文件的反复操作; 编写转换程序等。 命令格式 先准备一个文件 [root@slave ~]# he ...
分类:
其他好文 时间:
2020-02-27 21:01:22
阅读次数:
84
1、头文件 #include<QFile> #include<QFileDialog> #include<QDataStream> 2、写代码前工作 在ui界面拖入2个button按钮和1个textEdit,如下图所示,并分别添加button的槽函数 3、读文件 1 void MyWidget::o ...
分类:
其他好文 时间:
2020-02-27 19:10:40
阅读次数:
73
浏览器同源策略 host (域名或IP地址, 如果是IP地址则可以看做是一个根域名), 子域名, 端口, 协议 (http, https) 比如,mail.example.com和calendar.example.com是example.com的两个子域,子域名也被包含在同源策略中. 在浏览器中 < ...
分类:
其他好文 时间:
2020-02-27 19:06:29
阅读次数:
66
在windosw 编程中,常用到LPCWSTR 变量,QT中最常用到QString,下面提供QString和LPCWSTR 相互转换的方法 LPWSTR 转换成QString 1 LPCWSTR str; 2 QString :: fromStdWString(str); 1 LPCWSTR lpc ...
分类:
其他好文 时间:
2020-02-27 16:23:33
阅读次数:
71
QPixmap转为Image: 1 QPixmap pixmap; 2 pixmap.load("../Image/1.jpg"); 3 QImage tempImage = pixmap.toImage(); QImage转为QPixmap: 1 QImage image; 2 image.loa ...
分类:
其他好文 时间:
2020-02-27 15:53:17
阅读次数:
56
Given an unsorted array of integers, find the length of the longest consecutive elements sequence.Your algorithm should run in O(n) complexity.Example... ...
分类:
其他好文 时间:
2020-02-27 11:41:45
阅读次数:
73
var vm = new Vue({ el: '#example', data: { message: 'Hello' }, computed: { // 计算属性的 getter reversedMessage: function () { // `this` 指向 vm 实例 return th ...
分类:
移动开发 时间:
2020-02-27 11:39:54
阅读次数:
140
1、头文件 #include<QScreen> 2、代码 QScreen *screen = QGuiApplication::primaryScreen (); QRect screenRect = screen->availableVirtualGeometry(); resize(screen ...
分类:
其他好文 时间:
2020-02-27 09:15:13
阅读次数:
142
如上所示,第一张图片有边框和背景,第二张图片没有边框和背景,只要在构造函数中添加如下代码即可: setWindowFlags(Qt::FramelessWindowHint); //去边框 setAttribute(Qt::WA_TranslucentBackground); //背景透明 ...
分类:
其他好文 时间:
2020-02-27 01:13:23
阅读次数:
107
1 """ 2 Given a string S and a string T, find the minimum window in S which will contain all the characters in T in complexity O(n). 3 Example: 4 Inpu ...