- 博客(49)
- 资源 (1)
- 问答 (1)
- 收藏
- 关注
原创 taskset绑定linux下CPU核心调度
taskset -p 0x01 10056表示PID为10056的进程只能在第1个核心上运行taskset -p 0x08 10056表示PID为10056的进程只能在第4个核心上运行taskset -p 0x0c 10056表示PID为10056的进程只能在第3和第4个核心上运行...
2020-01-13 16:51:46
600
原创 图像的RGB与HSV
HSV(Hue, Saturation, Value)是根据颜色的直观特性由A. R. Smith在1978年创建的一种颜色空间, 也称六角锥体模型(Hexcone Model)。这个模型中颜色的参数分别是:色调(H),饱和度(S),明度(V)。色调H用角度度量,取值范围为0°~360°,从红色开始按逆时针方向计算,红色为0°,绿色为120°,蓝色为240°。它们的补色是:黄色为60°,青色...
2019-11-23 15:03:28
2925
原创 YUV420P与YUVJ420P
转自:AV_PIX_FMT_YUV420P与AV_PIX_FMT_YUVJ420P定义下面是两者在ffmpeg中的定义AV_PIX_FMT_YUV420P, ///< planar YUV 4:2:0, 12bpp, (1 Cr & Cb sample per 2x2 Y samples)AV_PIX_FMT_YUVJ420P, ///< planar YUV ...
2019-10-08 14:20:00
11876
原创 RuyiStudio项目在编译后无法正常执行
安装好Ruyi Studio,踩了两天坑。1、在RuyiStudio中运行Release无任何反应,如下图一2、在RuyiStudio中运行Debug报错,如图二3、在CMD中运行Release报错,如图三解决过程:1、检查项目环境是否为指定目录:在Ruyi Studio中选中项目,右键->Properties->C/C++ Build->Environment:...
2019-09-03 11:27:38
1481
1
原创 caffe_windows1.0扩展upsample层
报错缺少upsample层:google.protobuf.text_format.ParseError: 2622:5 : Message type "caffe.LayerParameter" has no field named "upsample_param".扩展方式如下,基于caffe_windows,版本1.0:1、修改D:\caffe-windows\src\caffe\p...
2019-09-02 16:27:19
1278
4
原创 Anaconda3的python3.5安装opencv3.4
Anaconda版本:conda --versionconda 4.5.11在https://www.lfd.uci.edu/~gohlke/pythonlibs/#opencv下载对应的opencv版本。Anaconda3默认安装python3.6,而我是手工将python版本降低到3.5。虽然在环境变量中指定了path到D:\Anaconda3\envs\py35。但打开CMD执行:...
2019-09-02 13:55:14
721
原创 C++11笔记五
一,右值及右值引用 C++11中所有的值,必属于左值、将亡值、纯右值三者之一,将亡值和纯右值,都属于右值。 1、左值是指表达式结束后依然存在的持久对象; 2、右值是指表达式结束时就不存在的临时对象; 1)将亡值,C++11新增,与右值引用相关的表达式,比如:将要被移动的对象、T&&函数返回值、std::move返回值和转换为T&am...
2019-07-31 13:16:56
321
转载 程序在内存中的分布
转自:https://www.cnblogs.com/share-happy-everyday/p/9371910.html代码段(.text),也称为文本段(Text Segment),存放着程序的机器码和只读数据,可执行指令就是从这里取得。如果可能,系统会安排好相同程序的多个运行实体共享这些实例代码。这个段在内存中一般被标记为只读,任何对该区的写操作都会导致段错误(Segmentati...
2019-07-30 14:47:22
160
转载 SHELL中检查字符串是否为空
摘自:https://www.runoob.com/linux/linux-shell-basic-operators.html字符串比较是否为null这里:#!/bin/basha=""if[-n $a ]then echo "-n $a : 字符串长度不为 0"else echo "-n $a : 字符串长度为 0"fi输出结果为:-n :字符串...
2019-07-30 11:38:33
1291
转载 SHELL中的中括号用法总结
摘自:https://www.runoob.com/w3cnote/shell-summary-brackets.htmlShell 里面的中括号(包括单中括号与双中括号)可用于一些条件的测试:算术比较, 比如一个变量是否为0,[ $var -eq 0 ]。 文件属性测试,比如一个文件是否存在,[ -e $var ], 是否是目录,[ -d $var ]。 字符串比较, 比如两...
2019-07-30 11:38:00
201
转载 SHELL处理字符串
摘自:https://www.runoob.com/linux/linux-shell-variable.html假设有变量 var=http://www.aaa.com/123.htm1. # 号截取,删除左边字符,保留右边字符。echo ${var#*//}其中 var 是变量名,# 号是运算符,*// 表示从左边开始删除第一个 // 号及左边的所有字符即删除...
2019-07-30 11:37:13
306
转载 通过变长模版参数创建一个模版参数类型都是std::vector<T>的tuple
链接:https://www.zhihu.com/question/38949490/answer/78918985template <typename ...Types>struct store{};template <>struct store<>{ using type = std::tuple<>;};t...
2019-07-30 11:36:24
327
原创 ubuntu16下QT中使用SVN
先安装svn:sudo apt install subversion在QT工具-》选项-》版本控制-》subversion:检出项目,在新建项目时,选择subversion checkout:如果在工具中看不到subversion,关闭QTCreator重启一次。如果提交代码时报错:svn Server SSL certificate ver...
2019-07-30 11:35:41
1008
1
原创 make install安装过程
gzdlw@ubuntu:~/sqlite-autoconf-3280000$ sudo make installmake[1]: Entering directory '/home/tools/sqlite-autoconf-3280000' /bin/mkdir -p '/usr/local/lib' /bin/sh ./libtool --mode=install /usr/bi...
2019-07-30 11:33:48
2169
原创 关于子线程释放的时机
void test() { ThreadRunner mThread("test"); int mCount = 1; mThread.start([&mCount] { mCount++; printf("thread run...%d\n", mCount); std::chrono::milliseconds sleepDuration(2000); std:...
2019-07-30 11:26:37
234
原创 声明slots函数报错:fatal error LNK1120
private: Ui::AcConsoleClass ui;};通常在头文件中声明的函数,VS会提示自动补全cpp中的实现。 但这次vs没有提示补全 buttonConnectClick函数,编译报错:1>moc_AcConsole.obj : error LNK2019: 无法解析的外部符号 "private: void __cdecl AcConsole::buttonConnectClick(void)" (?buttonConnectC
2019-05-16 13:54:17
609
原创 基于iptables的防火墙依赖环境
后python setup.py install 安装模块:pip install netfilterqueue 如果报错:Traceback (most recent call last): File "IPWall.py", line 4, in <module> from netfilterqueue import NetfilterQueueImportError: libnetfilter_que
2019-05-09 17:52:01
391
原创 C++11笔记四
:for_each/find_if/sort/partition/remove_if等,使用方便;#include <iostream>#include <string> using namespace std;template <typename T>int funcAdd(T t1, T t2) { return t1 + t2;}template <typena
2019-04-30 16:48:01
155
原创 C++11应用:对象池
class ObjectPool{ template <typename... Args> using Constructor = std::function<std::shared_ptr<T>(Args...)>;public: ~ObjectPool() { destructedFlag = true; } // 默认创建多少个对象 template <typ
2019-04-29 00:00:42
237
原创 C++11应用:规范日志打印
cast<std::chrono::milliseconds>(std::chrono::system_clock::now()); auto tmpNow=std::chrono::duration_cast<std::chrono::milliseconds>(tpNow.time_since_epoch()); uint64_t milli = tmpNow.count(); milli += (uint64_t)8
2019-04-28 14:27:06
457
原创 C++11应用:单例模式
=(const Singleton&) {}; static T* mInstance; public: template <typename... Args> // 创建单例 static T* Instance(Args&&... args) { if (mInstance == nullptr) { mInstance = new T(std::forward<A
2019-04-28 14:22:09
145
原创 linux下执行shell
open(sysCommand, "r")) == NULL) { MY_LOGE("---runCommand error...\n"); return -1; } if(result==NULL||readLen==0) { MY_LOGE("---runCommand not need result...\n"); pclose(fp); return 0;
2019-04-26 17:49:50
167
原创 linux C++守护进程保障启动其它程序
;#include<sys/stat.h>#include<stdio.h>#include<stdlib.h>#include<time.h>#include<fcntl.h>#include<string.h>#include<termios.h>#include <
2019-04-26 17:37:55
2551
原创 C++11笔记三
ase {private: int age = 10; std::string tostring; // 必须要全局变量public: MyBase() { cout << "MyBase construct..." << endl; } operator const char*() { tostring = "toString:" + std::to_
2019-04-24 19:08:30
150
原创 C++11笔记二
) { num=n; }//普通构造函数private: int num;};class Test2{public: explicit Test2(int n) { num=n; }//explicit(显式)构造函数private: int num;};int main(){ Test1 t1=12;//隐式调用其构造函数,成功 Test2 t2
2019-04-23 18:44:36
149
原创 C++11笔记一
0000;short anotherNum{largeNum }; // error! Amend typesint anotherNum{largeNum}; // OK!float someFloat{largeNum}; // error! An int may be narrowedfloat someFloat{500000}; //OK! 500000 can be accomodated 二,C++11引入了固定宽度的整形,能够以位为单位指定整数的宽度。这些类型为i
2019-04-22 18:09:32
144
原创 resin4在eclipse中的非插件启动
aucho.com/ns/resin/core"> <log name="" level="info" path="stdout:"/> <cluster id=""> <root-directory>D:\resin-4.0.29\webapps&
2019-04-10 14:03:11
196
原创 unique_ptr+char*
string>("abcde"); cout << "bbc2:" << bbc2->data() << endl;
2019-01-27 12:51:49
2168
原创 c++11格式化打印日志
_point_cast<std::chrono::milliseconds>(std::chrono::system_clock::now()); auto tmp=std::chrono::duration_cast<std::chrono::milliseconds>(tp.time_since_epoch()); std::time_t timestamp = tmp.count(); return timestam
2019-01-11 23:21:48
2138
原创 c++11获取当前linux系统时间并格式化毫秒级
system_clock::now()); auto tmp=std::chrono::duration_cast<std::chrono::milliseconds>(tp.time_since_epoch()); std::time_t timestamp = tmp.count(); return timestamp;}std::tm* gettm(uint64_t timestamp){ uint64_t milli =
2019-01-11 12:49:21
3256
请教一个查询联查SQL的写法。
2011-03-02
TA创建的收藏夹 TA关注的收藏夹
TA关注的人