- 博客(22)
- 资源 (3)
- 收藏
- 关注
原创 template - 函数
参考https://zhuanlan.zhihu.com/p/362173165#include <iostream>#include <functional>template<typename F, typename... ARGS>auto myInvoke(F&& funObj, ARGS&&... args) -> decltype(std::forward<F>(funObj)(std::forw
2022-03-04 12:50:13
772
原创 c++ utf-8 gb2312互转
基于iconv实现//gbk2utf8.hpp#ifndef _GBK2UTF_8_H_#define _GBK2UTF_8_H_#include <iconv.h>#include <stdio.h>#include <malloc.h>#include <exception>#include <sstream>namespace hhfox { class transcode_error :public std::r
2021-06-09 10:47:18
940
原创 c++ 超时函数/重试函数包装
// utils.hpp : 此文件包含 "main" 函数。程序执行将在此处开始并结束。//#include <iostream>#include <map>#include <mutex>#include <functional>#include <future>#include <chrono>#include <iostream>#include <optional>#if _H
2021-05-26 15:40:00
1258
原创 c++ 单例模式
实现文件:// singleton.hpp#pragma once#include <exception>#include <type_traits>#include <thread>#include<mutex>#include <memory>template<typename T>class Singleton {public: template<typename... Args> stati
2021-05-26 15:31:19
214
原创 Mac 上搭建aarch64交叉编译环境
介绍参考网络上的一些文章,在mac 上成功编译出所需的的工具链。此工具链基本信息是:gcc:9.2.0 ,libc:2.23 ,linux3.10.108;cpu:armv8-a下载直接上链接:https://pan.baidu.com/s/13vicedwPa5w6IEqRPVYzfQ 密码:wskr使用方法直接将aarch64.dmg挂载到系统上,直接使用,不要将里面东西拷出来,因...
2020-02-11 12:54:17
3372
4
原创 glog使用
#include "widget.h"#include <QApplication>#include <QtWidgets>#include <glog/logging.h>using namespace google;void set_log_dir_1(const char *dst_folder) { google::SetLogDes...
2018-07-15 22:09:41
644
转载 Mac远程桌面 ubuntu16.04 unity
转自:https://www.cnblogs.com/nowgood/p/Macremotedesktop.html 待解决问题: 使用 vnc 远程桌面 ubunt16.04的自带桌面 unity 1.安装sudo apt-get install x11vnc 2.配置vnc密码x11vnc -storepasswd 3.启动vnc服务x11vnc -forever -sha...
2018-05-22 00:11:36
11528
原创 QLineEdit 搜索框
#ifndef SEARCHEDIT_H#define SEARCHEDIT_H#include <QLineEdit>#include <QStringList>#include <QStringListModel>#include <QCompleter>#include <QPushButton>#include &...
2018-04-03 17:39:56
1801
转载 windows 安装python2.7+pyqt5
参考:http://blog.sina.com.cn/s/blog_1351d06a40102wdhy.html https://www.cnblogs.com/rain124/p/6196053.html先安装setuptools下载地址:https://pypi.python.org/pypi/setuptools#downloads 将下载后的tar文...
2018-03-31 15:27:48
5203
1
转载 ubuntu16.04下fcitx无法在QT Creator输入中文解决办法
转自:https://www.cnblogs.com/liuxuzzz/p/6409294.html Qt creator无法用fcitx输入中文的原因是自己的plugins目录下没有fcitx的插件,所有只要把插件复制到里面就可以了。 需要的fcitx输入法插件文件:libfcitxplatforminputcontextplugin.so解决方法: 使用dpkg查找插件文件,fcit...
2018-03-29 11:04:46
895
转载 在Ubuntu中安装Oracle Java 8
参考:https://medium.com/coderscorner/installing-oracle-java-8-in-ubuntu-16-10-845507b13343 第1步:将Oracle的PPA(个人包档案)添加到您的源列表中,以便Ubuntu知道在哪里检查更新。使用add - apt - repository命令。sudo add-apt-repository ppa:web...
2018-03-09 15:43:45
1785
1
原创 ubuntu 安装使用glog
1.下载安装gloggit clone https://github.com/boboxxd/glog.git./autogen.sh && ./configure && make && sudo make install2.下载安装 gflagsgit clone https://github.com/gflags/gflagssu...
2018-03-09 09:39:32
14652
原创 在Qt 平台,对libssh的封装及简单使用
偶然在 https://stackoverflow.com/questions/5589971/how-to-easily-establish-an-ssh-connection-in-qt,上看到的,对我来说很好用。 作者原话是这样的: Here is an asynchronous ssh & scp "socket" I wrote for Qt that is cross pl...
2018-03-07 15:13:11
6436
11
转载 使用C++11的function/bind组件封装Thread以及回调函数的使用
转自:https://www.cnblogs.com/inevermore/p/4038498.html 现在我们采用C++11的function,将函数作为Thread类的成员,用户只需要将function对象传入线程即可,所以Thread的声明中,应该含有一个function成员变量。类的声明如下:#ifndef THREAD_H_#define THREAD_H_#inclu...
2018-03-06 13:49:25
663
原创 c++11,future使用代码片段
#include <iostream>#include <future>#include <thread>int main(){ // 使用 packaged_task std::packaged_task<int()> task([]() { std::cout << "packaged_tas...
2018-03-01 08:46:18
277
原创 c++11,获取时间信息及随机数
偶尔了解了下,现代c++里的时间操作,记下代码段如下:#include <ratio>#include <chrono>#include <iomanip>using namespace std::chrono;using namespace std;int main (){ using std::chrono::system_cloc...
2018-02-28 21:43:19
655
转载 Qt+libvlc
参考内容:http://blog.youkuaiyun.com/qq_24545821/article/details/72844583
2018-02-19 14:29:15
430
转载 ONVIF 学习
参考内容:http://blog.youkuaiyun.com/benkaoya/article/details/72424335
2018-02-19 14:16:46
262
转载 ubuntu的使用经验
ubuntu 修改时区及时间1.首先查看时区:swfsadmin @ swfsubuntu:〜$ date - R星期二,17年12月2013年 18:23:01 + 0800如果要修改时区,执行sudo tzselect2.选择区域:亚洲swfsadmin @ swfsubuntu:〜$ sudo tzselect[须藤]密码为swfsadmin:对不起,再试一次。[须藤]密码为swfs
2018-02-19 13:57:55
432
原创 cmake调用third_party库
Cmake Call third-party Lib[Cmake] https://cmake.org/cmake/help/v3.8/manual/cmake-buildsystem.7.html[Qt官方手册] http://doc.qt.io/qt-5/cmake-manual.htmlCmake 中调用Qt库 cmake_minimum_required(VERSIO...
2018-02-17 18:53:49
3884
转载 windows安装过程中,磁盘GPT格式,无法安装系统怎么办?
1.在系统提示无法安装的那一步,按住“shift+f10”,呼出“cmd”命令符2.输入:diskpart,回车进入diskpart3.输入:list disk,回车显示磁盘信息4.输入:clean,回车删除磁盘分区&格式化5.输入:convert mbr,回车将当前磁盘分区设置为Mbr形式6. 输入:create partition primary size = xxx,回车创建主分区大...
2016-09-21 09:40:23
9388
转载 Unix/Linux下C/C++开发技术概览
转自:http://blog.sina.com.cn/s/blog_50b8427f0101nc3l.html 1. 平台差异简介Windows和Unix是当前两大主流操作系统平台,基于C/C++的开发人员经常会面临这两个平台之间的移植的问题。Unix作为一个开发式的系统,其下有出现了很多个分支,包括Sun的Solaris、IBM的AIX、HP Unix、SCO Unix、Free BSD、苹果...
2016-08-05 08:22:17
600
libevent_v_vs2019_x64_release.rar
2020-06-29
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人