自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(24)
  • 资源 (1)
  • 收藏
  • 关注

原创 git常用命令

摘录自https://www.jianshu.com/nb/34866270===============================工作区Working Directory-->暂存区Stage-->版本库Repository-->远程仓库RemoteGit命令:#初始化本地仓库git init#添加文件到本地仓库#第一步,add到缓冲区:git...

2019-11-27 13:19:09 178

原创 图像相关的基础知识

数字图像处理,刚萨雷斯, 第三版1. 图像的表示M行N列或者:2. 图像的插值a. 最近邻插值https://blog.csdn.net/Andrew659/article/details/4818988srcX=dstX* (srcWidth/dstWidth) , srcY = dstY * (srcHeight/dstHeight)计算位置时通过坐标...

2019-11-05 18:04:20 791

原创 STL容器分类

2019-11-03 10:11:56 343

转载 关于operator重载函数是作为成员函数还是friend函数的理解

转载自:https://stackoverflow.com/questions/2337213/return-value-of-operator-overloading-in-cOperator overloading : member function vs. non-member function?问题:I read that an overloaded opera...

2019-10-31 11:34:40 440

转载 关于operator运算符是返回值还是返回引用的理解

转载自:https://stackoverflow.com/questions/2337213/return-value-of-operator-overloading-in-creturn value of operator overloading in C++I have a question about the return value of operator overlo...

2019-10-31 11:24:54 669

转载 String类实现的一个简单Demo

一个简单的String类的实现,转载自:http://www.ccs.neu.edu/home/sbratus/com1101/mystring.txt//// myString is an (inefficient) implementation of a string class.// It's only purpose is to provide an example of...

2019-10-31 11:16:15 285

原创 C++ 11中使用条件变量和锁机制同步线程

摘自:C++ Concurrency in Action使用条件变量进行线程同步​#include <thread>#include <mutex>#include <iostream>#include <chrono>#include <condition_variable>#include <queue&...

2019-10-09 15:11:46 186

原创 auto_ptr, unique_ptr, shared_ptr的使用

https://www.geeksforgeeks.org/auto_ptr-unique_ptr-shared_ptr-weak_ptr-2/#include <memory>#include <iostream>class A{public: void show(void) { std::cout << "A:...

2019-10-09 12:58:52 120

原创 C++ Concurrency in Action 03 多线程时共享数据的管理

1.Race conditions 对资源竞争问题的处理最常用的就是锁机制 mutexes#include <iostream>#include <thread>#include <functional>#include <chrono>#include <mutex>#include <algorithm&g...

2019-10-05 12:26:44 92

原创 C++ Concurrency in Action 02 线程管理

定义std::thread对象:1. 函数方式#include <thread>void do_some_work();std::thread my_thread(do_some_work);2. 对象方式#include <iostream>#include <thread>class background_task{publ...

2019-09-29 17:41:00 162

原创 类型cast

1. static_caststatic_cast:This is used for the normal/ordinary type conversion. This is also the cast responsible for implicit type coersion and can also be called explicitly. You should use it in ...

2019-09-26 14:02:38 135

原创 C/C++编程注意事项

1. 防止头文件的重复包含#ifndef __TEST_H__#define __TEST_H__class Test{public: Test();};#endif // __TEST_H__否则会显示, 常见的error: redefinition of ‘class Test’ error: previous definition...

2019-09-10 20:06:41 614

原创 namespace中声明和定义C函数出现error: multiple definition of ...

定义一个C函数,如下//.h文件namespace Test{ class bird { public: void birdFly() { std::cout << "bird fly" << std::endl; } }; void birdDo(...

2019-09-04 15:23:55 622

转载 python基本语法

记录python的基本语法格式,便于快速查看主要是对vamei君的教程:https://www.cnblogs.com/vamei/tag/Python/default.html?page=4的一个摘要,感谢vamei的python教程,在此缅怀。1. 基本数据类型#basic data type#使用分数import fractionsa = 10print(a) #...

2019-08-30 17:43:49 155

翻译 Note of book Effective CPP 3rd Edition

Part 1: accustoming yourself to CPPItem1: 将C++视为多多语言的一个联合将C++视为四个子集:a. C语言部分: 包括C语言的的基础,比如语句块,声明,预处理,内建数据结构,数组,指针等。但还增加了C语言没有的函数模板,异常抛出,函数重载等。b. 面向对象的C++部分: 类(包含构造和析构),封装,集成,多态,虚函数(动态绑定)等。是面向对...

2019-08-26 16:24:37 275

翻译 基本的图像处理操作

1. Mask operation官网Mask操作的效果决定于其使用的Mask, 通過Mask在圖像上逐個像素的便利,得到當前像素的新的值.比如增强对比度(銳化)的:实现方法:void Sharpen(const cv::Mat& myImage, cv::Mat& Result){ CV_Assert(myImage.depth() == CV...

2019-08-20 18:36:25 276

原创 数据结构

树的分类:1.二叉树:如果不对其中的元素进行排序,则不利于查找2.二叉查找树(Binary Search Tree)节点按照一定的顺序排列:对于二叉查找树中的所有结点X, 它的左子树的所有项的值小于X中的项,而它的右子树中的所有项大于X中的项。查找效率更高,但因为根节点是固定的,所以受数据的分布规律影响会不平衡,造成复杂度的方差太大。比如可能会退化为成链表形式,比如一个二叉树...

2019-08-19 15:31:55 111

转载 opencv中访问Mat的三种方法

转载自官方教程 https://docs.opencv.org/master/db/da5/tutorial_how_to_scan_images.html官方给出的代码: https://github.com/opencv/opencv/blob/master/samples/cpp/tutorial_code/core/how_to_scan_images/how_to_scan_imag...

2019-08-15 08:56:43 854

原创 ubuntu下Qt Creator配置opencv

系统: ubuntu 16.04, opencv版本: 4.1.1opencv默认安装后的头文件在:库文件放在:Qt工程的pro配置:QT -= guiCONFIG += c++11 consoleCONFIG -= app_bundleCONFIG += C++11 //添加对C++11的支持# The following define makes...

2019-08-11 13:33:46 1191

原创 各种stream

1. ifstream和ofstream#include&lt;iostream&gt;#include&lt;fstream&gt;int main(){ //std::ofstream::in File open for reading //std::ofstream::out File open for writing //std::ofstream::binary ...

2018-10-31 00:33:00 272

转载 线程池

 转载自:https://blog.csdn.net/u013507368/article/details/48130151?utm_source=blogxgwz0 #pragma once#include &lt;iostream&gt;#include &lt;deque&gt;#include &lt;thread&gt;#include &lt;mutex&gt;...

2018-10-29 23:11:42 141

原创 条件变量

1#include&lt;iostream&gt;#include&lt;thread&gt;#include&lt;mutex&gt;#include&lt;condition_variable&gt;#include&lt;queue&gt;#include&lt;chrono&gt;std::mutex mtx;std::condition_variable conVa...

2018-10-23 23:34:29 115

原创 死锁示例

void print_one(){while(true){mtx_one.lock(); //这句执行结束的时候去锁住mtx_two,而mtx_two被thread_two锁住mtx_two.lock();std::cout &amp;amp;amp;amp;lt;&amp;amp;amp;amp;lt; “print_one” &amp;amp;amp;amp;lt;&amp;amp;amp;amp;lt; std::endl;mtx_two.unloc

2018-10-23 00:13:12 274

原创 anaconda jupyter默认启动目录更改

1.安装Anaconda后在Anaconda Prompt里启动Jupyter后发现在浏览器中的工作目录默认是C盘的用户目录。 可以先在终端里进入要工作的目录,然后再启动jupter. 如下图: 之后启动后就会在对应的目录。这个在其配置文件中添加路径没有成功,无论是用”/”还是”\”.## The directory to use for notebooks and kernels.#c.N

2018-01-02 13:44:40 2074

Accelerated C++中文版

经典的C++学习入门图书,不属于那种手册型的,不需要多解释。

2014-08-12

空空如也

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

TA关注的人

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