摘要: 原理:https://blog.csdn.net/andrew57/article/details/79644442 1、直接使用libyuv库 libyuv::I420Scale 注意:要提前给原始YUV图像分配补边后内存,否则可能崩溃 2、自己实现,原始YUV保持原本的大小就可以 代码: 1 i 阅读全文
posted @ 2020-05-25 21:31 Zzz...y 阅读(971) 评论(0) 推荐(0) 编辑
摘要: 1 SSL_CTX* ctx = SSL_CTX_new(TLS_client_method()); 2 BIO *root = BIO_new_mem_buf(buf, dataLen); 3 X509 *certX = d2i_X509_bio(root, NULL); //DER格式 4 X5 阅读全文
posted @ 2019-10-31 16:08 Zzz...y 阅读(1897) 评论(4) 推荐(0) 编辑
摘要: root下修改/etc/profile 修改后重启一下 用上面的命令可以查看当前搜索路径 阅读全文
posted @ 2018-08-18 23:17 Zzz...y 阅读(612) 评论(0) 推荐(0) 编辑
摘要: 测试结果:客户端的数据总是发给最后一个打开的服务器 服务器代码:socket()->setsockopt()->bind()->recvfrom()/sendto() 客户端代码:socket()->sendto()/recvfrom() 阅读全文
posted @ 2018-08-18 14:26 Zzz...y 阅读(3423) 评论(0) 推荐(0) 编辑
摘要: You are given K eggs, and you have access to a building with N floors from 1 to N. Each egg is identical in function, and if an egg breaks, you cannot 阅读全文
posted @ 2018-08-13 15:21 Zzz...y 阅读(703) 评论(0) 推荐(0) 编辑
摘要: 1、服务器:server.h 2、账号密码管理:MyDataBase.h 3、demo:main.cpp 运行结果: 服务器:建立连接、连接数据库、接收并转发消息 客户端:连接服务器、发送并接收消息 完整源码:https://github.com/Zzzy14/Function/tree/maste 阅读全文
posted @ 2018-07-31 20:56 Zzz...y 阅读(331) 评论(0) 推荐(0) 编辑
摘要: C++中,迭代器的类型有五个,关系为: input_iterator_tag 对应 输入迭代器:只读。 output_iterator_tag 对应 输出迭代器:只写。 forward_iterator_tag 对应 向前迭代器 :只能一步一步前进。 bidirectional_iterator_t 阅读全文
posted @ 2018-07-26 19:33 Zzz...y 阅读(266) 评论(0) 推荐(0) 编辑
摘要: Implement a basic calculator to evaluate a simple expression string. The expression string contains only non-negative integers, +, -, *, / operators a 阅读全文
posted @ 2018-07-26 15:32 Zzz...y 阅读(364) 评论(0) 推荐(0) 编辑
摘要: There are a total of n courses you have to take, labeled from 0 to n-1. Some courses may have prerequisites, for example to take course 0 you have to 阅读全文
posted @ 2018-07-24 16:03 Zzz...y 阅读(799) 评论(0) 推荐(0) 编辑
摘要: C++ STL提供了 unordered_map,底层是用哈希表实现的,可以根据 key 搜索 对应的 value。 资料:http://www.cplusplus.com/reference/unordered_map/unordered_map/ 第一点,一般来说,特化一个unordered_m 阅读全文
posted @ 2018-07-17 09:44 Zzz...y 阅读(3286) 评论(0) 推荐(0) 编辑