![](https://img-blog.csdnimg.cn/20201014180756923.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
技术
文章平均质量分 73
笔墨遗迹
这个作者很懒,什么都没留下…
展开
-
Linux下如何校验用户名和密码(使用crypt函数)
#include <stdio.h>#include <unistd.h>#include <stdlib.h>#include <sys/types.h>#include <pwd.h>#include <shadow.h>#include <string.h>#define _XOPEN_SOURCE //using crypt function,we need define this// The原创 2021-03-03 13:49:46 · 1312 阅读 · 0 评论 -
为什么需要会话(session)和进程组(process group)?怎样安全的在后台运行程序?
WhatA process group is a collection of related processes which can all be signalled at once.A session is a collection of process groups, which are either attached to a single terminal device (known as the controlling terminal) or not attached to any term原创 2021-01-19 14:06:29 · 658 阅读 · 0 评论 -
Ubuntu 18.04 LNMP环境 搭建WordPress站点
搭建LNMP环境是什么?LNMP = linux + nginx + mysql + php-fpm。怎么安装?nginxsudo apt-get install nginxmysqlsudo apt-get install mysql-serverphp-fpmsudo apt-get install php-fpm php-mysqlsudo apt-get install php-gd php-curl搭建WordPress配置mysqlWordpress中需要使用到原创 2020-11-09 17:57:47 · 674 阅读 · 0 评论 -
Linux (syscall)系统调用& (mutex)锁的开销
环境采用虚拟机Intel® Core™ i5-3470 CPU @ 3.20GHzLinux Jimmy 4.4.0-31-generic #50~14.04.1-Ubuntu SMP Wed Jul 13 01:06:37 UTC 2016 i686 i686 i686 GNU/Linux目的测试系统调用、线程调度、进程调度等操作耗时。目的只是给出耗时在哪个量级的概念。数据操作耗时syscall600nsclock_gettime600nsmalloc(b原创 2020-09-03 17:25:08 · 693 阅读 · 0 评论 -
C++ 容器&Move&各种构造函数
目的研究在容器相关操作中,类的各种构造函数的调用时机。试验采用c++11编译#include <vector>#include <iostream>#include <algorithm>using namespace std;class A{private: int m_a;public: A(int a):m_a(a){cout << "Construct" << m_a << endl;}; A(co原创 2020-08-18 08:38:02 · 580 阅读 · 0 评论 -
从clock_gettime和gettimeofday开始谈linux下函数耗时计算
从clock_gettime和gettimeofday开始谈linux下函数耗时计算引言在OpenCV中有如下的两个函数用来获取当前时间。static long long getTickCount(void){#if defined _WIN32 || defined WINCE LARGE_INTEGER counter; QueryPerformanceCounter( &counter ); return (long long)counter.QuadPart原创 2020-08-07 14:50:57 · 4319 阅读 · 0 评论 -
OpenCV中为什么要实现InputArray和OutputArray
引言在使用OpenCV API 的时候,我们经常遇到如下形式的函数。那么究竟为什么要使用InputArray,OutputArray等类型的参数呢?void cv::transform(InputArray src, OutputArray dst, InputArray m) 经过我的分析,有以下三种好处:InputArray,OutputArray可以接收cv::Mat,std::Vector等类型的参数。InputArray,OutputArray可以以统一的接口来操作输入,输出参数。原创 2020-07-24 12:32:37 · 1214 阅读 · 0 评论 -
OpenCV编译全解析
some exampleswith cuda & python3 bindcmake \-D CMAKE_BUILD_TYPE=RELEASE \-D BUILD_EXAMPLES=OFF \-D BUILD_opencv_apps=OFF \-D BUILD_DOCS=OFF \-D BUILD_PERF_TESTS=OFF \-D BUILD_TESTS=OFF \-D WITH_CUDA=ON \-D CUDA_GENERATION=Pascal \-D ENABL原创 2020-07-03 13:28:08 · 802 阅读 · 0 评论 -
BSD LGPL GPL License综合使用
严格排序BSD < LGPL < GPL如果一个项目中即有BSD的库,也有LGPL的库,那么这个项目整体的限制是LGPL的。如果一个项目中既有LGPL的库,也有GPL的库,那么这个项目整体的限制是GPL的。也就是说,整体是以最严格的License来定的。说明拿opencv来举例,opencv是BSD的。但是opencv有使用到ffmpeg,ffmpeg是LGPL的。ffmp...原创 2019-11-12 08:59:08 · 1057 阅读 · 0 评论 -
ethtool修改永久修改eeprom(MAC)地址
背景项目中移植DM9621网卡的时候,发现eth网络接口正常出现,但是不能配置MAC地址。只要通过“ifconfig eth0 hw ether“”指令配置了MAC地址,就不再能够PING通其他主机。后分析发现内核驱动加载为cdc_ether,而不是dm9621。经分析发现应是我们自己做的硬件的eeprom内无配置内容,故dm9621芯片的工作模式不对。所以,我们需要刷写eeprom。工具刷...原创 2019-08-06 08:46:43 · 4759 阅读 · 0 评论 -
IMX6Q 升级交叉编译工具链从4.6到4.9.4
平台IMX6Q 32-bit Armv7 Cortex-A升级步骤下载对应的工具链工具链下载地址为https://www.linaro.org/downloads/。由于我的平台是Armv7a的,所以我选择下载了gcc-linaro-4.9.4-2017.01-i686_arm-linux-gnueabi工具链。在该网站上还可以下载目标板上的运行环境:sysroot-eglibc-li...原创 2019-04-19 11:05:15 · 1739 阅读 · 0 评论