自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(13)
  • 资源 (3)
  • 收藏
  • 关注

原创 重构-改善代码既有设计第一章的差代码c++实现,方便大家练习

```c++#include<iostream>#include<string>#include<vector>usingnamespacestd;classMovie{public:enumMOVETYPE{REGULAR,NEW_RELEASE,CHILDRENS};Movie()=default;...

2020-11-03 22:44:15 233

原创 python-docx设置表格填充底色以及切分单元格(仅使用python-docx)

本篇文件要解决什么python-docx我们常用于处理word,至于建立表格什么的,自行找别的教程.本篇仅仅解决两个问题某个单元格填充颜色的问题切分单元格的操作,以及如何消除,切分单元格的时候,多出来的边框问题两个网址:解决表格边框问题参考的,两个网址#https://stackoverflow.com/questions/33069697/how-to-setup-cell-bor...

2019-10-26 11:41:13 7631

原创 CMAKE初见

学习了几天cmake,其实cmake还是写的比较死的,没makefile那么灵活,但是相对也是好操作些,学习cmake其实就从案例入手最好参考网站link#指出最小支持的cmake版本cmake_minimum_required(VERSION 2.8)#指出工程名称,一般也是最终生成程序的名称project(DEMO4)# 这句话的意思是将DIR_SRC指代的所有源码都编译后...

2019-06-30 22:11:41 111

原创 c++11 条件变量

#include <iostream>#include <thread>#include <future>#include <condition_variable>#include <random>#include <queue>std::random_device rd;std::mt19937 mt(rd(...

2019-06-09 08:16:59 474

原创 二路并归排序

#include <iostream>void mergePartition(int alist[],int temp_list[],int as, int ae, int bs, int be);void mergeSort(int alist[],int start_index,int end_index){ if(start_index >= end_i...

2019-06-09 07:21:38 242

原创 python快排递归非递归

递归形式如下:alist = [3,1,2,9,0,7,4,8,5,6]def quickSort(alist,start,end): if start >= end: return index = start privior = alist[index] low = start hight = end #这个whil...

2019-05-30 10:13:29 1282

原创 给定一个std::string,如何令他以utf8的格式存进文本里面(利用qt)

bool saveXMLStringToFile(const std::string& file_path,const std::string &content){ QFile file(file_path.c_str()); if (!file.open(QIODevice::WriteOnly)) { return false; } // QByteArray...

2019-05-23 16:11:41 310

原创 Qt: cellWidget 如何获取 对应的 QtableWidget所在的行列

很多时候我们想通过cellwidget获取对应的QTableWidget的行列号,下面给一个简单的额demo:首先是CellWidget的代码cellwidget.h#pragma once#include <QWidget>#include <QPushButton>#include <QHBoxLayout>class CellWidget...

2019-05-08 15:35:10 5061 1

原创 通过委托在QTableView设置按钮

#pragma once#include <QItemDelegate>#include <QStyledItemDelegate>#include <QStyle>#include <QMessageBox>#include <QPushButton>#include <QApplication>#inclu...

2019-04-15 13:09:44 1442

原创 构造函数的写法

猜一下输出是啥?#include <iostream>class ConstructorChecker{ public: ConstructorChecker(int m) : _m(m) { std::cout << "this is construct in addr: " << (unsigned long)th...

2019-03-30 09:31:30 848

原创 利用Python3 读sqlite数据库

Python3 读sqlite数据库sqlite3_reader.py这个类主要是读取图层字段信息import sqlite3import reclass Sqlite3FieldInfo: #目前无法确定sqlite3数据库字段长度的获取有没有问题 def __init__(self): self.__fieldName = '' ...

2019-03-21 20:40:14 676

原创 thread,packaged_task,promise

Thread,Packaged_task,Promise 运用#include &lt;iostream&gt;#include &lt;future&gt;#include &lt;thread&gt;#include &lt;stdlib.h&gt;#include &lt;chrono&gt;int func(std::future&lt;int&gt; &amp;f

2019-03-12 01:13:44 136

原创 C++11如何通过std::uinque_lock和std::timed_mutex 使用try_lock_for

C++11如何通过std::uinque_lock和std::timed_mutex 使用try_lock_for关于mutex,我个人感觉在cnblogs上有一个写的比较好:link:其作者的github地址为:link:其实就是在unique_lock的构造函数加上std::defer_lock即可,然后在需要的地方加锁#include &lt;iostream&gt;#incl...

2019-03-05 23:04:14 1082

Unix环境编程中文清晰版

看不懂Unix网络编程的可以先看看这本书,熟悉一下Unix接口先。非扫描版,清晰版。

2015-06-12

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除