- 博客(232)
- 资源 (3)
- 收藏
- 关注
原创 hi 平台 opencv4.8 交叉编译
参考文章 https://www.cnblogs.com/qq21497936/p/16051614.html。# OpenCV3.4.1+ffmpeg3.4.8交叉编译。# 配置交叉编译选项,直接指定 C 和 C++ 编译器。# 配置交叉编译选项,直接指定 C 和 C++ 编译器。# 不同版本的OpenCV3和ffmpeg有版本依赖。# 不同版本的FFmpeg和x264有对应关系。# 设置FFmpeg安装路径。# 编译并安装 FFmpeg。# # 编译并安装x264。# 设置x264安装路径。
2024-09-06 11:34:25
880
原创 opencv-4.8.0 Yes everything works with CUDA 12.3 and cuDNN 8.9.7.
opencv-4.8.0 + CUDA 12.3 + DNN 8.9.7 完美编译运行。
2024-08-23 19:59:03
484
1
原创 Python pip 阿里云 源
pip install -i https://mirrors.aliyun.com/pypi/simple --trusted-host mirrors.aliyun.com -r requirements.txt
2024-04-04 10:12:07
299
原创 docker-compose build
Docker群:在堆栈部署期间忽略docker中的“构建”配置文件 | 码农家园Docker swarm: 'build' configuration in docker compose file ignored during stack deployment
2021-10-11 14:10:41
778
原创 go mod 后 emacs godef 找不到定义。
># if running bash if [ -n "$BASH_VERSION" ]; then # include .bashrc if it exists if [ -f "$HOME/.bashrc" ]; then ...
2019-11-06 16:03:40
851
原创 rabbitMQ pika demo
python3 有兴趣可以跑下github: https://github.com/chujiangke/RabbitMQ_demo.git
2019-07-12 15:54:18
441
原创 undefined reference to
多个库文件链接顺序问题这种问题非常隐蔽,不仔细研究,可能会感到非常地莫名其妙。以第三个示例为测试代码,把链接库的顺序换一下,如下所示: $ gcc -o main main.c func.a test.a test.a(test.o): In function `test': test.c:(.text+0x13): undefined reference...
2019-03-15 19:43:39
1692
原创 cblas_sgemm 矩阵乘法
virtual vector<Feature> get_nbest(Feature & feature_obj, int n_top=10){ //debug_marix_get_max_use();; //debug_marix_head(10); MutexLockGuard lock(mutex_); // AutoWrite au...
2019-03-13 16:41:15
1040
转载 centos7.0 安装配置samba文件共享服务
centos 开启samba相对比ubuntu复杂些,有个鬼selinux的东西。参考下面链接成功的。https://blog.youkuaiyun.com/zyt110120/article/details/76213601
2018-05-29 12:45:02
493
原创 python 对象排序
class Student: def __init__(self, name, score): self.__name__ = name self.__score__ = score def get_score(self): return self.__score__ def get_name(self): ...
2018-03-21 13:36:35
2125
原创 emacs python开发环境搭建
1.安装ggtags M-x list-packages 搜索ggtags并安装install2.安装ctagsbrew install ctags2.安装global下载链接:http://www.gnu.org/software/global/download.html 2.1 编译% sh reconf.sh % ./configure --with-exuberant-ctags=...
2018-03-15 09:29:52
1228
原创 .SUFFIXES : .cpp .$(OBJEXT) .exe
.SUFFIXES 后缀自定义规则# From "Thinking in C++, 2nd Edition, Volume 1, # Annotated Solutions Guide" by Chuck Allison# At http://www.BruceEckel.com# (c)2001 MindView Inc. Copyright notice in Copyright.txt...
2018-03-02 17:06:30
1714
转载 适配器模式
我理解的适配器模式就是两套接口, 一套复用, 通过一个适配类调用新的类。适配器模式适配器模式(Adapter Pattern)是作为两个不兼容的接口之间的桥梁。这种类型的设计模式属于结构型模式,它结合了两个独立接口的功能。这种模式涉及到一个单一的类,该类负责加入独立的或不兼容的接口功能。举个真实的例子,读卡器是作为内存卡和笔记本之间的适配器。您将内存卡插入读卡器,再将读卡器插入笔记
2018-02-05 15:53:35
320
原创 建造者模式
建造者模式,具体url分析参考http://www.runoob.com/design-pattern/builder-pattern.htmlgithub:https://github.com/chujiangke/designpattern.git
2018-01-31 00:42:56
330
原创 单例模式
单例模式(Singleton Pattern)是 Java 中最简单的设计模式之一。这种类型的设计模式属于创建型模式,它提供了一种创建对象的最佳方式。这种模式涉及到一个单一的类,该类负责创建自己的对象,同时确保只有单个对象被创建。这个类提供了一种访问其唯一的对象的方式,可以直接访问,不需要实例化该类的对象。注意:1、单例类只能有一个实例。2、单例类必须自己创建自己的唯一实例
2018-01-27 20:19:11
415
原创 创建模式-抽象工厂模式
抽象工厂模式抽象工厂模式(Abstract Factory Pattern)是围绕一个超级工厂创建其他工厂。该超级工厂又称为其他工厂的工厂。这种类型的设计模式属于创建型模式,它提供了一种创建对象的最佳方式。在抽象工厂模式中,接口是负责创建一个相关对象的工厂,不需要显式指定它们的类。每个生成的工厂都能按照工厂模式提供对象。介绍意图:提供一个创建一系列相关或相互依赖对象的接口,而无需指
2018-01-25 21:57:03
429
原创 创建模式-工厂模式
工厂模式(Factory Pattern)是 Java 中最常用的设计模式之一。这种类型的设计模式属于创建型模式,它提供了一种创建对象的最佳方式。在工厂模式中,我们在创建对象时不会对客户端暴露创建逻辑,并且是通过使用一个共同的接口来指向新创建的对象。实现我们将创建一个 Shape 接口和实现 Shape 接口的实体类。下一步是定义工厂类 ShapeFactory。FactoryPatternDem...
2018-01-23 15:36:30
312
原创 python 网络 select
前言:最近写安卓手机客户端,要和后台通讯, python 写了个后台服务用于自测,感觉代码有通用性,发下吧。设计:分成三个部分, 报文设计,后台设计,后台测试用例。后台设计的比较挫,但是可以用。细节:报文部分//包头和包体:sizeof(Pkg)=16+msgLen+extLenstruct Pkg{ struct PkgHdr hdr; //包头,固定长度s
2017-12-08 17:03:30
384
原创 java json 简单例子
Map msgJson = new HashMap();if (isend == true) { msgJson.put("isend", 1);}else{ msgJson.put("isend", 0);}ObjectMapper mapper = new ObjectMapper();byte[] msgJsonByte = mapper.writeValueAsBytes(m
2017-12-08 16:45:35
438
原创 mysqld 5.7.19-0ubuntu0.16.04.1 ERROR 1045(28000):Access denied ......
mysqld 5.7.19-0ubuntu0.16.04.1mysql -u root -p 进入数据库是总是错误ERROR 1045(28000):Access denied ......1.修改MySQL配置文件,使得可以无密码登录mysqlemacs /etc/mysql/mysql.conf.d/mysqld.cnf在[mysqld]项下添加skip
2017-11-21 14:42:48
452
转载 Temporary failure in name resolution
File "/usr/local/lib/python2.7/dist-packages/pip-9.0.1-py2.7.egg/pip/_vendor/cachecontrol/adapter.py", line 47, in send resp = super(CacheControlAdapter, self).send(request, **kw) File "/usr/l
2017-08-07 13:56:11
980
翻译 python swig char*类型返回
%cstring_output_allocate does work with multiple parameters. It declares "If you see char **output as a parameter to any method, hide the parameter and return it as an additional output.Here's an ex
2017-08-04 11:45:04
1448
原创 utf-8 去掉中文标点符号
char* rm_punctuation(char *input){ char *punctuation_list=",。;:?"; /* 举例部分标点符号,请自行补充 */ char temp[1024] = {0x00}; for( int i = 0; i<strlen(input); i++ ) { printf("%d",i); printf("%c\n",input
2017-07-28 16:17:20
3160
原创 MD5 + BASE64加密 对音频部分md5两次
md5 = hashlib.md5()md5.update(audio_data)bodyMd5 = md5.digest()bodyMd5 = base64.b64encode(bodyMd5)print(len(bodyMd5))print("bodyMd5 -> %s" % (bodyMd5))对应java 代码 mdTemp = MessageDiges
2017-06-23 15:04:55
1187
原创 python __call__ 函数
class O: def __init__(self, *args, **kwargs): print "init" #super(O, self).__init__(*args, **kwargs) def __new__(cls, *args, **kwargs): print "new", cls #return
2017-06-19 10:02:33
383
转载 AttributeError: 'module' object has no attribute 'detect'
python源文件与关键字重名了。1. 命名py脚本时,不要与python预留字,模块名等相同2. 删除该库的.pyc文件(因为py脚本每次运行时均会生成.pyc文件;在已经生成.pyc文件的情况下,若代码不更新,运行时依旧会走pyc,所以要删除.pyc文件),重新运行代码;或者找一个可以运行代码的环境,拷贝替换当前机器的.pyc文件即可
2017-06-14 14:25:08
4013
1
转载 Makefile中 -I -L -l区别
原文链接 :http://blog.youkuaiyun.com/u011258240/article/details/52458195我们用gcc编译程序时,可能会用到“-I”(大写i),“-L”(大写l),“-l”(小写l)等参数,下面做个记录:例:gcc -o hello hello.c -I /home/hello/include -L /home/hello/lib -l
2017-05-26 20:29:21
861
原创 postgresql Connection to database failed: FATAL: no pg_hba.conf entry for host "10.129.195.161", us
Connection to database failed: FATAL: no pg_hba.conf entry for host "10.129.195.161", user "appexternal", database "insightdb", SSL off核心难点,遇到这个问题排查了很长时间没有相关文档:从两个方便排查:1 外部ip请求被拒绝。2 db
2016-09-26 12:24:52
3471
原创 emacs 安装auto-complete
emacs 安装auto-completeps: 大学就一直在玩emacs,自己也比较浮躁,emacs用的是走走停停的,工作UNIX 平台下多又把emacs用起来了。emacs + makefile 完全就是一个强大的IDE。今天发现emacs 安装auto-complete也蛮容易的。1下载 auto-complete LINUX/UNIX/OSX系统下载这个http
2015-09-08 01:23:57
1644
转载 shell 文件遍历
shell 文件遍历发现的一个脚本遍历文件的写的蛮不错的记录下。#!/bin/bashfunction ergodic(){for file in ` ls $1`do if [ -d $1"/"$file ] #如果 file存在且是一个目录则为真 then ergodic
2015-09-08 01:14:14
649
原创 pthread_create 用法多线程文件拷贝。
多线程文件拷贝。#include #include #include #include #include #include #include #include "restart.h"#define MAXNAME 80#define R_FLAGS O_RDONLY#define W_FLAGS (O_WRONLY | O_CREAT)#define W_PERMS
2015-09-08 01:07:44
807
转载 strtok
分解字符串为一组字符串。s为要分解的字符串,delim为分隔符字符串。首次调用时,s指向要分解的字符串,之后再次调用要把s设成NULL#include#includeusing namespace std;int main(){ char sentence[]="This is a sentence with 7 tokens"; cout
2015-05-12 23:26:46
754
转载 setenv getenv
Linux命令:setenv功能说明:查询或显示环境变量。语 法:setenv [变量名称][变量值]补充说明:setenv为tsch中查询或设置环境变量的指令。NAME setenv - change or add an environment variableSYNOPSIS #include int seten
2015-05-11 23:54:10
807
转载 getopt(分析命令行参数)
getopt(分析命令行参数) 相关函数表头文件 #include定义函数 int getopt(int argc,char * const argv[ ],const char * optstring);函数说明 getopt()用来分析命令行参数。参数argc和argv是由main()传递的参数个数和内容。参数opt
2015-05-11 23:37:03
637
原创 python 获得文件下文件的绝对目录
import os import string rootdir = os.getcwd() print('rootdir = ' + rootdir) for (dirpath, dirnames, filenames) in os.walk(rootdir): #print('dirpath = ' + dirpath) for dirna
2015-05-05 14:47:37
709
原创 写了 windows RC 资源多语言string 替换的程序,发出来看下。
#include #include #include #include #include #include // std::ifstream#include #include // std::cout#include // std::ifstreamusing namespace std;vector readfile1( char *
2015-04-21 19:07:45
908
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人