自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(30)
  • 资源 (23)
  • 收藏
  • 关注

原创 git简明教程-半小时从入门到精通

Doc下载:https://download.csdn.net/download/qccz123456/10567652参考文献:https://www.yiibai.com/git/https://www.liaoxuefeng.com/wiki/0013739516305929606dd18361248578c67b8067c8c017b000Linux安装git:sudo a...

2018-05-09 09:56:00 1443

原创 C++基础之设计模式-观察者模式

#include <string>#include <iostream>#include <list> class Observer{public: Observer() {} virtual ~Observer() {} virtual void Update() {}};class Subject{public: Subject...

2018-05-29 14:54:55 138

原创 C++基础之局部变量返回问题

局部变量被回收后不能返回引用,但通过new/malloc等方式在栈上创建的实例可以返回引用。#include <iostream>#include <string>typedef struct m_MyStruct{ std::string str; int i;}MyStruct;MyStruct& fun(){ MySt...

2018-05-29 10:20:28 217

原创 C++基础之overload/override/redefine

overload重载;override重写/覆盖;redefine重定义/隐藏一、重载(overload)    指函数名相同,但是它的参数表列个数或顺序,类型不同。并且不能靠返回类型来判断。(1)相同的范围(在同一个作用域中) ;(2)函数名字相同;(3)参数不同;(4)virtual关键字可有可无。(5)返回值可以不同;二、重写(也称为覆盖override)    是指派...

2018-05-25 10:12:23 532

原创 Tips

(1)           精确precision是重复测量的结果非常聚合,离散度很小;     准确accuracy是测量值非常接近实际值;     精确的测量未必准确,准确的测量也未必精确。...

2018-05-22 20:55:37 114

原创 C++应用之libusb-(5)libusb热插拔事件

#include <stdlib.h>#include <stdio.h>#include "libusb.h"int done = 0;libusb_device_handle *handle = NULL;static int LIBUSB_CALL hotplug_callback(libusb_context *ctx, libusb_device ...

2018-05-22 16:19:24 5067 2

原创 C++应用之libusb-(4)libusb获取usb详细描述

#include <stdio.h>#include <string.h>#include "libusb.h"#if defined(_MSC_VER) && (_MSC_VER < 1900)#define snprintf _snprintf#endifint verbose = 0;static void print_end...

2018-05-22 16:17:04 5074 1

原创 C++应用之libusb-(3)libusb简单使用

#include <stdio.h>#include "libusb.h"static void print_devs(libusb_device **devs){ libusb_device *dev; int i = 0, j = 0; uint8_t path[8]; while ((dev = devs[i++]) != NULL) { struct ...

2018-05-22 16:14:29 2704

转载 C++应用之libusb-(2)libusb说明

Introduction: libusb is an open source library that allows you to communicate with USB devices from userspace. For more info, see Their MainPage.In their documentation, they suggest you to read the us...

2018-05-22 16:11:35 2520

转载 C++应用之libusb-(1)usb协议介绍

USB通用串行总线,协议向下兼容:    USB1.0/1.1(low/full speed),传输速率最大为12Mbps    USB2.0(high speed),传输速率最大480Mbps    USB3.0(super speed),传输速率最大5Gbps1 描述符(description)    一个USB接口可以兼容多种设备,如U盘、上网卡和复合设备等,还可以将一个插上后的设备虚拟出多...

2018-05-22 16:09:45 5388

原创 C++应用之boost解析命令行参数

#include <iostream> #include <boost/program_options.hpp>#include <boost/exception/diagnostic_information.hpp>int main(int argc, char*argv[]){ int level; boost::prog...

2018-05-21 13:46:15 1591

原创 C++应用之libgit2

通过我们在命令行终端中操作git库,进行版本控制。目前令人惊喜的是git居然有api可供外部开发人员使用,使用libgit2进行开发自定义的git功能了,牛!官网:https://libgit2.github.com/,C、C#、Python、Qt等开发语言都支持;环境配置,编译和连接:https://libgit2.github.com/docs/guides/build-and-link/可供...

2018-05-17 19:57:31 2391

原创 C++基础之std-先stringstream后cout

通常我们会看到在cout之前会采用stringstream,而不是直接输出。 std::stringstream ss_1; ss_1 << "this is "; ss_1 << "test.\n"; std::cout << ss_1.str() << std::endl;如下实验后发现,其实直接cout的时间使用更...

2018-05-17 10:27:57 2066

原创 WinSCP之Windows与Linux之间传输文件

方法:WinSCP+ OpenSSH(1)Linux上安装openssh-server    1.  sudo apt-get update    2. sudo apt-getinstall openssh-server    3. sudo ps -e |grep ssh        -->回车-->有sshd,说明ssh服务已经启动        如果没有启动,输入"sudo ...

2018-05-17 09:24:45 1051 1

原创 WinSCP之Windows与Windows之间传输文件

参考文献:https://winscp.net/eng/docs/guide_windows_openssh_server方法:WinSCP+ OpenSSH(1)在需要远程访问的windows电脑上安装OpenSSH的server:具体步骤如下:           1.  访问https://github.com/PowerShell/Win32-OpenSSH/releases,下载PC对应...

2018-05-17 09:22:14 50778 17

原创 C++基础之std-tuple

类模板std :: tuple是一个固定大小的异构值集合。 这是std :: pair的泛化。http://zh.cppreference.com/w/cpp/utility/tuple#include <tuple>#include <iostream>#include <string>#include <stdexcept>std::t...

2018-05-16 14:23:02 239

转载 python基础之if __name__ == '__main__':

When your script is run by passing it as a command to the Python interpreter,python myscript.pyall of the code that is at indentation level 0 gets executed. Functions and classes that are defined are,...

2018-05-16 11:07:15 191

原创 C++基础之std-sleep/clock

#include <iostream>#include <chrono>#include <thread>int main(void){ auto start = std::chrono::high_resolution_clock::now(); std::this_thread::sleep_for(std::chrono::mil...

2018-05-15 16:48:01 2575

原创 工具之git补丁操作

情况说明:        当你有两个repo:repo1和repo2,并且你在repo1中对代码进行了修改,现在想把repo1的修改添加到repo2中,但总不会一个一个手动修改吧,git就提供了打补丁的工具,将改进的部分进行增删。操作如下:        1.先在repo1中checkout到修改后的branch,再修改提交commit,而后format-patch生成补丁,并将目录中的0001-...

2018-05-15 15:07:28 681

原创 工具之git重命名branch

1. 本地分支重命名(还没有推送到远程)git branch -m oldBranchName newBranchName2. 远程分支重命名 (已经推送远程-假设本地分支和远程对应分支名称相同)a. 重命名远程分支对应的本地分支git branch -m oldBranchName newBranchNameb. 删除远程分支git push --delete origin oldBranc...

2018-05-15 13:40:32 2980

转载 C++基础之类型转换

C风格的强制类型转换(Type Cast)很简单,不管什么类型的转换统统是:TYPE b = (TYPE)a。C++风格的类型转换提供了4种类型转换操作符来应对不同场合的应用。const_cast,字面上理解就是去const属性。static_cast,命名上理解是静态类型转换。如int转换成char。dynamic_cast,命名上理解是动态类型转换。如子类和父类之间的多态类型转换。reinte...

2018-05-15 09:41:25 129

转载 C++应用之单元测试框架Google Test

转载:http://www.cnblogs.com/coderzh/archive/2009/04/06/1426755.html       前段时间学习和了解了下Google的开源C++单元测试框架Google Test,简称gtest,非常的不错。 我们原来使用的是自己实现的一套单元测试框架,在使用过程中,发现越来越多使用不便之处,而这样不便之处,gtest恰恰很好的解决了。其实gtest本...

2018-05-11 16:40:39 158

原创 C++应用之HAL层文件逻辑

    HAL层是硬件抽象层,指的意思就是说调用该层的api是和平台无关的,在不同的平台都能调用成功。所有我们需要对不同平台的实现进行一层封装,就HAL层。以下是文件逻辑实现:/*HAL_logic |__ HAL_logic.sh |__ HAL_logic |__ HAL_logic.vcxproj |__ main.cpp ...

2018-05-11 10:54:01 1920

原创 C++基础之std-vector/list/deque/set/map

一般来说,当你不关心你正在使用什么类型的顺序容器时使用vector,但如果你在容器中的任何地方进行了很多插入或擦除操作,而非只在末尾,那就使用list。 或者如果你需要随机访问,那么你会想要vector,而不是list。 http://www.cs.northwestern.edu/~riesbeck/programming/c++/stl-summary.htmlContainer Types:...

2018-05-10 19:13:16 192

原创 C++基础之std-lock_guard/unique_lock/condition_variable[notify/wait]

C++11的标准库中有lock这个概念,其中主要是到std::lock_guard和std::unique_lock这两把锁,unique_lock 与lock_guard都能实现自动加锁与解锁功能,但是unique_lock要比lock_guard更灵活,但是更灵活的代价是占用空间相对更大一点且相对更慢一点。unique_lock相对lock_guard更灵活的地方在于:在等待中的线程,在等待期...

2018-05-10 18:37:51 1142

原创 C++应用之Boost库-filesystem

#include <iostream>#include<boost/filesystem.hpp> int main(){ boost::filesystem::path path("/test/test1"); //初始化 boost::filesystem::path old_cpath = boost::filesystem::current...

2018-05-09 16:27:45 1187

原创 C++基础之设计模式-单例模式

参考文献:(1) https://blog.csdn.net/liang19890820/article/details/61615495(2) https://zh.wikipedia.org/wiki/%E5%8D%95%E4%BE%8B%E6%A8%A1%E5%BC%8F//设计模式之单例模式:目的是使得类的一个对象在系统中只有唯一实例#include <iostream>...

2018-05-09 15:44:58 273

原创 C++基础之友元

友元函数:在本类中使用friend声明外部的函数,则该外部函数就能访问本类中的private/protected成员。友元类:在本类中使用friend声明外部的类,则该外部类就能访问本类中private/protected成员。友元关系没有继承性:B类是A类的友元,C类继承A类,则B不能直接访问C中私有或保护成员。友元关系没有传递性:B类是A类的友元,C类是B类的友元,则C不能直接访问A中私有或保...

2018-05-09 14:06:35 147

原创 工具之NuGet库管理

使用VS中的NuGet可以方便的管理库,比如Boost、openssl等,就不需要去网上下载安装了,使用方便,(1)首先在VS中安装NuGet,Tools->Extensionsand Updates…,Online搜索nuget,安装即可。(2)使用NuGet库管理器安装需要的库。(3)就能在你的代码中使用这些库了。#include <iostream>#include &l...

2018-05-08 18:31:31 905

原创 股票之分红股知识点与实践

原著:csdn的qccz123456股票中每天有哪些公司分红都在这个网址上:http://stock.pingan.com/rongzirongquan/yewucanshu/quanyi/fenhongsongguzhuanzeng/index.shtml上海证券交易所官网及已经在上交所上市的股票:http://www.sse.com.cn/assortment/stock/list/share...

2018-05-05 11:12:01 673

StateMachine sample code

StateMachine sample code StateMachine sample code StateMachine sample code

2018-07-27

makefile简明教程

makefile简明教程 makefile简明教程 makefile简明教程

2018-07-27

google C++命名约定

google C++命名约定 google C++命名约定 google C++命名约定

2018-07-27

Debugging OpenCL Kernels on GPU

Debugging OpenCL Kernels on GPU Debugging OpenCL Kernels on GPU

2018-07-27

Intel Code Builder for OpenCL API for Microsoft Visual Studio

Intel Code Builder for OpenCL API for Microsoft Visual Studio

2018-07-27

opencl-1.x-latest英文版

opencl-1.x-latest英文版opencl-1.x-latest英文版opencl-1.x-latest英文版

2018-07-27

OpenCL48_CN编程规范

OpenCL48_CN编程规范OpenCL48_CN编程规范OpenCL48_CN编程规范

2018-07-27

python教程

python教程python教程python教程python教程python教程

2018-07-27

vim教程 

vim教程vim教程vim教程vim教程vim教程vim教程vim教程vim教程vim教程

2018-07-27

robot operate system

robot operate systemrobot operate systemrobot operate systemrobot operate system

2018-07-27

camera parameter introduction and control method

camera parameter introduction and control method camera parameter introduction and control method

2018-07-27

camera 3A 算法

camera 3Acamera 3Acamera 3Acamera 3Acamera 3Acamera 3A

2018-07-27

video for linux 2 总结

v4l2总结v4l2总结v4l2总结v4l2总结v4l2总结v4l2总结v4l2总结v4l2总结

2018-07-27

State Machine Design in C++ word

State Machine Design in C++State Machine Design in C++

2018-07-27

State Machine Design in C++

State Machine Design in C++State Machine Design in C++State Machine Design in C++

2018-07-27

git基础与提高

git基础与提高,学习git的知识,学习git的知识,学习git的知识

2018-07-27

Intel_Media_Developers_Guide

Intel_Media_Developers_Guide 利用intelMediaSDK开发Media相关的codex等

2018-07-27

docker全文档

docker全文档docker全文档docker全文档docker全文档docker全文档

2018-07-17

docker学习教程

docker学习教程docker学习教程docker学习教程docker学习教程

2018-07-17

ffmpeg+SDL简单播放器

ffmpeg+SDL简单播放器实现,C++,音视频解码+显示+同步

2018-07-16

ffmpeg中文教程及重点注释

ffmpeg中文教程及重点注释,说明了大多数常用的命令行功能。

2018-07-13

空空如也

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

TA关注的人

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