摘要: 前景提要: 我想用ONVIF开发一个client,实现最简单的发现一个IPC摄像头,但是网上找了一圈感觉没有头绪,所以绝知此事要躬行,不管三七二十一,找一个教程开干。 (1)下载gsoap 官网下载就不要想了,能慢到怀疑人生,所以我是在git上下载的(git真的是个宝藏),在git上搜索gsoap_ 阅读全文
posted @ 2020-03-04 15:02 一只羊JAS 阅读(1137) 评论(0) 推荐(0) 编辑
摘要: hosts文件中增加一个IP-GIT地址的映射 比如192.168.100.100 gitlab.baidu.com 阅读全文
posted @ 2020-02-27 11:00 一只羊JAS 阅读(4836) 评论(3) 推荐(0) 编辑
摘要: .pro文件中增加如下语句 LIBS += -pthreadQMAKE_CXXFLAGS += -pthreadQMAKE_CXXFLAGS += -std=c++11 阅读全文
posted @ 2020-02-26 11:25 一只羊JAS 阅读(348) 评论(0) 推荐(0) 编辑
摘要: std::ifstream File;std::string filepath = "text.txt";File.open(filepath.c_str(), std::ifstream::out | std::ifstream::trunc );if (!File.is_open() || Fi 阅读全文
posted @ 2020-01-21 10:40 一只羊JAS 阅读(165) 评论(0) 推荐(0) 编辑
摘要: <fstream> int main() { std::string filename="mylog.txt"; remove(filename.c_str()); return 0; } 阅读全文
posted @ 2020-01-21 10:31 一只羊JAS 阅读(1154) 评论(0) 推荐(0) 编辑
摘要: 1/#include <fstream> std::ifstream::pos_type filesize(const char* filename) { std::ifstream in(filename, std::ifstream::ate | std::ifstream::binary); 阅读全文
posted @ 2020-01-21 09:56 一只羊JAS 阅读(883) 评论(0) 推荐(0) 编辑
摘要: #include <fstream> int main() { std::ifstream src("from.ogv", std::ios::binary); std::ofstream dst("to.ogv", std::ios::binary); dst << src.rdbuf(); } 阅读全文
posted @ 2020-01-21 09:54 一只羊JAS 阅读(288) 评论(0) 推荐(0) 编辑
摘要: 一般理解,一个类A会有一个对应的this指针,在类之中是可以使用this指针引用类成员的。 那么其他类中想要通过类A对象引用类A成员,怎么办呢?今天学到一个好方法,看下面 class A { public: static A& GetInstance() { static A m_instance; 阅读全文
posted @ 2020-01-17 10:32 一只羊JAS 阅读(2623) 评论(0) 推荐(0) 编辑
摘要: 先理解call和callback 通常我们写程序,是主动去调厂商或者其他人提供的API,这就是普通的API调用,翻译过来就是 call(我们主动) 那么如果是我们实现了函数的功能,但是需要厂商或者其他人来触发怎么办(我们被动)?比如检测设备状态变化,最好是有变化立即告诉我们才好,这时候回调函数就很理 阅读全文
posted @ 2020-01-16 16:38 一只羊JAS 阅读(1699) 评论(0) 推荐(0) 编辑
摘要: Linux下编译的时候遇到一个问题,就是提示 error: atomic: 没有那个文件或目录 执行的命令是gcc -o myCXXLog myCXXLog.c 经过网上搜索,解决方法有二 (1)不要使用gcc,使用g++ (2)命令增加 g++ -std=c++0x or g++ -std=c++ 阅读全文
posted @ 2019-12-20 15:29 一只羊JAS 阅读(1911) 评论(0) 推荐(0) 编辑