当前位置: 首页 > 编程日记 > 正文

miniz库简介及使用

miniz:Google开源库,它是单一的C源文件,紧缩/膨胀压缩库,使用zlib兼容API,ZIP归档读写,PNG写方式。关于miniz的更详细介绍可以参考:https://code.google.com/archive/p/miniz/

miniz.c is a lossless, high performance data compression library in a single source file that implements the zlib(RFC 1950) and Deflate(RFC 1951) compressed data format specification standards.

miniz.c also contains simple to use functions for writing .PNG format image files and reading/writing/appending .ZIP format archives.

从https://github.com/richgel999/miniz下载源代码,也可以从google下载:https://code.google.com/archive/p/miniz/downloads。

测试miniz的使用,新建miniz_Test控制台工程,测试代码(来源于源代码中的example*.c文件)如下:

#include "funset.hpp"
#include "../../src/miniz/miniz.c"typedef unsigned char uint8;
typedef unsigned short uint16;
typedef unsigned int uint;#define my_max(a,b) (((a) > (b)) ? (a) : (b))
#define my_min(a,b) (((a) < (b)) ? (a) : (b))#define BUF_SIZE (1024 * 1024)// Demonstrates miniz.c's compress() and uncompress() functions (same as zlib's),
// also a crude decompressor fuzzy test.
int test_miniz_1()
{// The string to compress.static const char *s_pStr = "Good morning Dr. Chandra. This is Hal. I am ready for my first lesson." \"Good morning Dr. Chandra. This is Hal. I am ready for my first lesson." \"Good morning Dr. Chandra. This is Hal. I am ready for my first lesson." \"Good morning Dr. Chandra. This is Hal. I am ready for my first lesson." \"Good morning Dr. Chandra. This is Hal. I am ready for my first lesson." \"Good morning Dr. Chandra. This is Hal. I am ready for my first lesson." \"Good morning Dr. Chandra. This is Hal. I am ready for my first lesson.";uint step = 0;int cmp_status;uLong src_len = (uLong)strlen(s_pStr);uLong cmp_len = compressBound(src_len);uLong uncomp_len = src_len;uint8 *pCmp, *pUncomp;uint total_succeeded = 0;printf("miniz.c version: %s\n", MZ_VERSION);do {// Allocate buffers to hold compressed and uncompressed data.pCmp = (mz_uint8 *)malloc((size_t)cmp_len);pUncomp = (mz_uint8 *)malloc((size_t)src_len);if ((!pCmp) || (!pUncomp)) {printf("Out of memory!\n");return EXIT_FAILURE;}// Compress the string.cmp_status = compress(pCmp, &cmp_len, (const unsigned char *)s_pStr, src_len);if (cmp_status != Z_OK) {printf("compress() failed!\n");free(pCmp);free(pUncomp);return EXIT_FAILURE;}printf("Compressed from %u to %u bytes\n", (mz_uint32)src_len, (mz_uint32)cmp_len);if (step) {// Purposely corrupt the compressed data if fuzzy testing (this is a very crude fuzzy test).uint n = 1 + (rand() % 3);while (n--) {uint i = rand() % cmp_len;pCmp[i] ^= (rand() & 0xFF);}}// Decompress.cmp_status = uncompress(pUncomp, &uncomp_len, pCmp, cmp_len);total_succeeded += (cmp_status == Z_OK);if (step) {printf("Simple fuzzy test: step %u total_succeeded: %u\n", step, total_succeeded);} else {if (cmp_status != Z_OK) {printf("uncompress failed!\n");free(pCmp);free(pUncomp);return EXIT_FAILURE;}printf("Decompressed from %u to %u bytes\n", (mz_uint32)cmp_len, (mz_uint32)uncomp_len);// Ensure uncompress() returned the expected data.if ((uncomp_len != src_len) || (memcmp(pUncomp, s_pStr, (size_t)src_len))) {printf("Decompression failed!\n");free(pCmp);free(pUncomp);return EXIT_FAILURE;}}free(pCmp);free(pUncomp);step++;// Keep on fuzzy testing if there's a non-empty command line.} while (step <= 2);printf("Success.\n");return EXIT_SUCCESS;
}// Demonstration of miniz.c's ZIP archive API's. Adds a bunch of filesto test.zip,
// dumps file stat info on each file in the archive, then extracts a single file into memory.
int test_miniz_2()
{// The string to compress.static const char *s_pTest_str ="MISSION CONTROL I wouldn't worry too much about the computer. First of all, there is still a chance that he is right, despite your tests, and" \"if it should happen again, we suggest eliminating this possibility by allowing the unit to remain in place and seeing whether or not it" \"actually fails. If the computer should turn out to be wrong, the situation is still not alarming. The type of obsessional error he may be" \"guilty of is not unknown among the latest generation of HAL 9000 computers. It has almost always revolved around a single detail, such as" \"the one you have described, and it has never interfered with the integrity or reliability of the computer's performance in other areas." \"No one is certain of the cause of this kind of malfunctioning. It may be over-programming, but it could also be any number of reasons. In any" \"event, it is somewhat analogous to human neurotic behavior. Does this answer your query?  Zero-five-three-Zero, MC, transmission concluded.";static const char *s_pComment = "This is a comment";int i, sort_iter;mz_bool status;size_t uncomp_size;mz_zip_archive zip_archive;void *p;const int N = 5; //50;char data[2048];char archive_filename[64];static const char *s_Test_archive_filename = "E:/GitCode/Messy_Test/testdata/miniz2.zip";assert((strlen(s_pTest_str) + 64) < sizeof(data));printf("miniz.c version: %s\n", MZ_VERSION);// Delete the test archive, so it doesn't keep growing as we run this testremove(s_Test_archive_filename);// Append a bunch of text files to the test archivefor (i = (N - 1); i >= 0; --i) {sprintf(archive_filename, "%u.txt", i);sprintf(data, "%u %s %u", (N - 1) - i, s_pTest_str, i);// Add a new file to the archive. Note this is an IN-PLACE operation, so if it fails your archive is probably hosed (its central directory may not be complete) but it should be recoverable using zip -F or -FF. So use caution with this guy.// A more robust way to add a file to an archive would be to read it into memory, perform the operation, then write a new archive out to a temp file and then delete/rename the files.// Or, write a new archive to disk to a temp file, then delete/rename the files. For this test this API is fine.status = mz_zip_add_mem_to_archive_file_in_place(s_Test_archive_filename, archive_filename, data, strlen(data) + 1, s_pComment, (uint16)strlen(s_pComment), MZ_BEST_COMPRESSION);if (!status) {printf("mz_zip_add_mem_to_archive_file_in_place failed!\n");return EXIT_FAILURE;}}// Add a directory entry for testingstatus = mz_zip_add_mem_to_archive_file_in_place(s_Test_archive_filename, "directory/", NULL, 0, "no comment", (uint16)strlen("no comment"), MZ_BEST_COMPRESSION);if (!status) {printf("mz_zip_add_mem_to_archive_file_in_place failed!\n");return EXIT_FAILURE;}// Now try to open the archive.memset(&zip_archive, 0, sizeof(zip_archive));status = mz_zip_reader_init_file(&zip_archive, s_Test_archive_filename, 0);if (!status) {printf("mz_zip_reader_init_file() failed!\n");return EXIT_FAILURE;}// Get and print information about each file in the archive.for (i = 0; i < (int)mz_zip_reader_get_num_files(&zip_archive); i++) {mz_zip_archive_file_stat file_stat;if (!mz_zip_reader_file_stat(&zip_archive, i, &file_stat)) {printf("mz_zip_reader_file_stat() failed!\n");mz_zip_reader_end(&zip_archive);return EXIT_FAILURE;}printf("Filename: \"%s\", Comment: \"%s\", Uncompressed size: %u, Compressed size: %u, Is Dir: %u\n", file_stat.m_filename, file_stat.m_comment, (uint)file_stat.m_uncomp_size, (uint)file_stat.m_comp_size, mz_zip_reader_is_file_a_directory(&zip_archive, i));if (!strcmp(file_stat.m_filename, "directory/")) {if (!mz_zip_reader_is_file_a_directory(&zip_archive, i)) {printf("mz_zip_reader_is_file_a_directory() didn't return the expected results!\n");mz_zip_reader_end(&zip_archive);return EXIT_FAILURE;}}}// Close the archive, freeing any resources it was usingmz_zip_reader_end(&zip_archive);// Now verify the compressed datafor (sort_iter = 0; sort_iter < 2; sort_iter++) {memset(&zip_archive, 0, sizeof(zip_archive));status = mz_zip_reader_init_file(&zip_archive, s_Test_archive_filename, sort_iter ? MZ_ZIP_FLAG_DO_NOT_SORT_CENTRAL_DIRECTORY : 0);if (!status) {printf("mz_zip_reader_init_file() failed!\n");return EXIT_FAILURE;}for (i = 0; i < N; i++) {sprintf(archive_filename, "%u.txt", i);sprintf(data, "%u %s %u", (N - 1) - i, s_pTest_str, i);// Try to extract all the files to the heap.p = mz_zip_reader_extract_file_to_heap(&zip_archive, archive_filename, &uncomp_size, 0);if (!p) {printf("mz_zip_reader_extract_file_to_heap() failed!\n");mz_zip_reader_end(&zip_archive);return EXIT_FAILURE;}// Make sure the extraction really succeeded.if ((uncomp_size != (strlen(data) + 1)) || (memcmp(p, data, strlen(data)))) {printf("mz_zip_reader_extract_file_to_heap() failed to extract the proper data\n");mz_free(p);mz_zip_reader_end(&zip_archive);return EXIT_FAILURE;}printf("Successfully extracted file \"%s\", size %u\n", archive_filename, (uint)uncomp_size);printf("File data: \"%s\"\n", (const char *)p);// We're done.mz_free(p);}// Close the archive, freeing any resources it was usingmz_zip_reader_end(&zip_archive);}printf("Success.\n");return EXIT_SUCCESS;
}// Demonstrates how to use miniz.c's deflate() and inflate() functions for simple file compression.
// Command line tool for file compression/decompression.
int test_miniz_3()
{static uint8 s_inbuf[BUF_SIZE];static uint8 s_outbuf[BUF_SIZE];const char *pMode;FILE *pInfile, *pOutfile;uint infile_size;int level = Z_BEST_COMPRESSION;z_stream stream;int p = 1;const char *pSrc_filename;const char *pDst_filename;long file_loc;printf("miniz.c version: %s\n", MZ_VERSION);int argc = 5;char* argv[5] {"", "-l5", "c", "E:/GitCode/Messy_Test/testdata/infile.zip", "E:/GitCode/Messy_Test/testdata/outfile_compress.zip"};//char* argv[5] {"", "-l5", "d", "E:/GitCode/Messy_Test/testdata/outfile_compress.zip", "E:/GitCode/Messy_Test/testdata/outfile_decompress.zip"};if (argc < 4) {printf("Usage: example3 [options] [mode:c or d] infile outfile\n");printf("\nModes:\n");printf("c - Compresses file infile to a zlib stream in file outfile\n");printf("d - Decompress zlib stream in file infile to file outfile\n");printf("\nOptions:\n");printf("-l[0-10] - Compression level, higher values are slower.\n");return EXIT_FAILURE;}while ((p < argc) && (argv[p][0] == '-')) {switch (argv[p][1]) {case 'l': {level = atoi(&argv[1][2]);if ((level < 0) || (level > 10)) {printf("Invalid level!\n");return EXIT_FAILURE;}break;}default: {printf("Invalid option: %s\n", argv[p]);return EXIT_FAILURE;}}p++;}if ((argc - p) < 3) {printf("Must specify mode, input filename, and output filename after options!\n");return EXIT_FAILURE;} else if ((argc - p) > 3) {printf("Too many filenames!\n");return EXIT_FAILURE;}pMode = argv[p++];if (!strchr("cCdD", pMode[0])) {printf("Invalid mode!\n");return EXIT_FAILURE;}pSrc_filename = argv[p++];pDst_filename = argv[p++];printf("Mode: %c, Level: %u\nInput File: \"%s\"\nOutput File: \"%s\"\n", pMode[0], level, pSrc_filename, pDst_filename);// Open input file.pInfile = fopen(pSrc_filename, "rb");if (!pInfile) {printf("Failed opening input file!\n");return EXIT_FAILURE;}// Determine input file's size.fseek(pInfile, 0, SEEK_END);file_loc = ftell(pInfile);fseek(pInfile, 0, SEEK_SET);if ((file_loc < 0) || (file_loc > INT_MAX)) {// This is not a limitation of miniz or tinfl, but this example.printf("File is too large to be processed by this example.\n");return EXIT_FAILURE;}infile_size = (uint)file_loc;// Open output file.pOutfile = fopen(pDst_filename, "wb");if (!pOutfile) {printf("Failed opening output file!\n");return EXIT_FAILURE;}printf("Input file size: %u\n", infile_size);// Init the z_streammemset(&stream, 0, sizeof(stream));stream.next_in = s_inbuf;stream.avail_in = 0;stream.next_out = s_outbuf;stream.avail_out = BUF_SIZE;if ((pMode[0] == 'c') || (pMode[0] == 'C')) {// Compression.uint infile_remaining = infile_size;if (deflateInit(&stream, level) != Z_OK) {printf("deflateInit() failed!\n");return EXIT_FAILURE;}for (;;) {int status;if (!stream.avail_in) {// Input buffer is empty, so read more bytes from input file.uint n = my_min(BUF_SIZE, infile_remaining);if (fread(s_inbuf, 1, n, pInfile) != n) {printf("Failed reading from input file!\n");return EXIT_FAILURE;}stream.next_in = s_inbuf;stream.avail_in = n;infile_remaining -= n;//printf("Input bytes remaining: %u\n", infile_remaining);}status = deflate(&stream, infile_remaining ? Z_NO_FLUSH : Z_FINISH);if ((status == Z_STREAM_END) || (!stream.avail_out)) {// Output buffer is full, or compression is done, so write buffer to output file.uint n = BUF_SIZE - stream.avail_out;if (fwrite(s_outbuf, 1, n, pOutfile) != n) {printf("Failed writing to output file!\n");return EXIT_FAILURE;}stream.next_out = s_outbuf;stream.avail_out = BUF_SIZE;}if (status == Z_STREAM_END)break;else if (status != Z_OK) {printf("deflate() failed with status %i!\n", status);return EXIT_FAILURE;}}if (deflateEnd(&stream) != Z_OK) {printf("deflateEnd() failed!\n");return EXIT_FAILURE;}} else if ((pMode[0] == 'd') || (pMode[0] == 'D')) {// Decompression.uint infile_remaining = infile_size;if (inflateInit(&stream)) {printf("inflateInit() failed!\n");return EXIT_FAILURE;}for (;;) {int status;if (!stream.avail_in) {// Input buffer is empty, so read more bytes from input file.uint n = my_min(BUF_SIZE, infile_remaining);if (fread(s_inbuf, 1, n, pInfile) != n) {printf("Failed reading from input file!\n");return EXIT_FAILURE;}stream.next_in = s_inbuf;stream.avail_in = n;infile_remaining -= n;}status = inflate(&stream, Z_SYNC_FLUSH);if ((status == Z_STREAM_END) || (!stream.avail_out)) {// Output buffer is full, or decompression is done, so write buffer to output file.uint n = BUF_SIZE - stream.avail_out;if (fwrite(s_outbuf, 1, n, pOutfile) != n) {printf("Failed writing to output file!\n");return EXIT_FAILURE;}stream.next_out = s_outbuf;stream.avail_out = BUF_SIZE;}if (status == Z_STREAM_END)break;else if (status != Z_OK) {printf("inflate() failed with status %i!\n", status);return EXIT_FAILURE;}}if (inflateEnd(&stream) != Z_OK) {printf("inflateEnd() failed!\n");return EXIT_FAILURE;}} else {printf("Invalid mode!\n");return EXIT_FAILURE;}fclose(pInfile);if (EOF == fclose(pOutfile)) {printf("Failed writing to output file!\n");return EXIT_FAILURE;}printf("Total input bytes: %u\n", (mz_uint32)stream.total_in);printf("Total output bytes: %u\n", (mz_uint32)stream.total_out);printf("Success.\n");return EXIT_SUCCESS;
}// Uses tinfl.c to decompress a zlib stream in memory to an output file
int test_miniz_4()
{// need include "tinfl.c", conflict with "miniz.c"// reference: example4.creturn 0;
}// Demonstrates how to use miniz.c's low-level tdefl_compress() and tinfl_inflate() API's for simple file to file compression/decompression.
// The low-level API's are the fastest, make no use of dynamic memory allocation, and are the most flexible functions exposed by miniz.c.
int test_miniz_5()
{// reference: example5.c// conflict with other examples(1/2/3)return 0;
}// Demonstrates how to miniz's PNG writer func
int test_miniz_6()
{// reference: example6.c// conflict with other examples(1/2/3)return 0;
}

GitHub: https://github.com/fengbingchun/Messy_Test

相关文章:

iOS之runtime详解api(三)

第一篇我们讲了关于Class和Category的api&#xff0c;第二篇讲了关于Method的api&#xff0c;这一篇来讲关于Ivar和Property。 4.objc_ivar or Ivar 首先&#xff0c;我们还是先找到能打印出Ivar信息的函数&#xff1a; const char * _Nullable ivar_getName(Ivar _Nonnull v) …

亚马逊首席科学家李沐「实训营」国内独家直播,马上报名 !

开学了&#xff0c;别人家的学校都开始人工智能专业的学习之旅了&#xff0c;你呢&#xff1f;近年来&#xff0c;国内外顶尖科技企业的 AI 人才抢夺战愈演愈烈。华为开出200万年薪吸引 AI 人才&#xff0c;今年又有 35 所高校新增人工智能本科专业&#xff0c;众多新生即将开展…

人脸检测库libfacedetection介绍

libfacedetection是于仕琪老师放到GitHub上的二进制库&#xff0c;没有源码&#xff0c;它的License是MIT&#xff0c;可以商用。目前只提供了windows 32和64位的release动态库&#xff0c;主页为https://github.com/ShiqiYu/libfacedetection&#xff0c;采用的算法好像是Mult…

倒计时1天 | 2019 AI ProCon报名通道即将关闭(附参会指南)

2019年9月5-7日&#xff0c;面向AI技术人的年度盛会—— 2019 AI开发者大会 AI ProCon&#xff0c;震撼来袭&#xff01;2018 年由 CSDN 成功举办 AI 开发者大会一年之后&#xff0c;全球 AI 市场正发生着巨大的变化。顶尖科技企业和创新力量不断地进行着技术的更迭和应用的推…

法院判决:优步无罪,无人车安全员可能面临过失杀人控诉

据路透社报道&#xff0c;负责优步无人车在亚利桑那州致人死亡事件调查的律师事务所发布公开信宣布&#xff0c;优步在事故中“不承担刑事责任”&#xff0c;但是当时在车上的安全员Rafaela Vasquez要接受进一步调查&#xff0c;可能面临车辆过失杀人罪指控。2018年3月&#xf…

09 Storage Structure and Relationships

目标&#xff1a;存储结构&#xff1a;Segments分类&#xff1a;Extents介绍&#xff1a;Blocks介绍&#xff1a;转载于:https://blog.51cto.com/eread/1333894

边界框的回归策略搞不懂?算法太多分不清?看这篇就够了

作者 | fivetrees来源 | https://zhuanlan.zhihu.com/p/76477248本文已由作者授权&#xff0c;未经允许&#xff0c;不得二次转载【导读】目标检测包括目标分类和目标定位 2 个任务&#xff0c;目标定位一般是用一个矩形的边界框来框出物体所在的位置&#xff0c;关于边界框的回…

人脸识别引擎SeetaFaceEngine简介及在windows7 vs2013下的编译

SeetaFaceEngine是开源的C人脸识别引擎&#xff0c;无需第三方库&#xff0c;它是由中科院计算所山世光老师团队研发。它的License是BSD-2.SeetaFaceEngine库包括三个模块&#xff1a;人脸检测(detection)、面部特征点定位(alignment)、人脸特征提取与比对(identification)。人…

当移动数据分析需求遇到Quick BI

我叫洞幺&#xff0c;是一名大型婚恋网站“我在这等你”的资深老员工&#xff0c;虽然在公司五六年&#xff0c;还在一线搬砖。“我在这等你”成立15年&#xff0c;目前积累注册用户高达2亿多&#xff0c;在我们网站成功牵手的用户达2千多万。目前我们的公司在CEO的英名带领下&…

为什么选择数据分析师这个职业?

我为什么选择做数据分析师&#xff1f; 我大学专业是物流管理&#xff0c;学习内容偏向于管理学和经济学&#xff0c;但其实最感兴趣的还是心理学&#xff0c;即人在各种刺激下反应的机制以及原理。做数据分析师&#xff0c;某种意义上是对群体行为的研究和量化&#xff0c;两者…

人脸识别引擎SeetaFaceEngine中Detection模块使用的测试代码

人脸识别引擎SeetaFaceEngine中Detection模块用于人脸检测&#xff0c;以下是测试代码&#xff1a;int test_detection() {std::vector<std::string> images{ "1.jpg", "2.jpg", "3.jpg", "4.jpeg", "5.jpeg", "…

基于Pygame写的翻译方法

发布时间&#xff1a;2018-11-01技术&#xff1a;pygameeasygui概述 实现一个翻译功能&#xff0c;中英文的互相转换。并可以播放翻译后的内容。 翻译接口调用的是百度翻译的api接口。详细 代码下载&#xff1a;http://www.demodashi.com/demo/14326.html 一、需求分析 使用pyg…

冠军奖3万元!CSDN×易观算法大赛开赛啦

伴随着5G、物联网与大数据形成的后互联网格局的逐步形成&#xff0c;日益多样化的用户触点、庞杂的行为数据和沉重的业务体量也给我们的数据资产管理带来了不容忽视的挑战。为了建立更加精准的数据挖掘形式和更加智能的机器学习算法&#xff0c;对不断生成的用户行为事件和各类…

快速把web项目部署到weblogic上

weblogic简介 BEA WebLogic是用于开发、集成、部署和管理大型分布式Web应用、网络应用和数据库应 用的Java应用服务器。将Java的动态功能和Java Enterprise标准的安全性引入大型网络应用的开发、集成、部署和管理之中。 BEA WebLogic Server拥有处理关键Web应用系统问题所需的性…

使GDAL库支持中文路径或中文文件名的处理方法

之前生成的gdal 2.1.1动态库&#xff0c;在通过命令行执行时&#xff0c;遇到有中文路径或中文图像名时&#xff0c;GDALOpen函数不能正确的被调用&#xff0c;如下图&#xff1a;解决方法&#xff1a;1. 在所有使用GDALAllRegister();语句后面加上一句CPLSetConfigOption…

创新工场论文入选NeurIPS 2019,研发最强“AI蒙汗药”

9月4日&#xff0c;被誉为机器学习和神经网络领域的顶级会议之一的 NeurIPS 2019 揭晓收录论文名单&#xff0c;创新工场人工智能工程院的论文《Learning to Confuse: Generating Training Time Adversarial Data with Auto-Encoder》被接收在列。这篇论文围绕现阶段人工智能系…

Flutter环境搭建(Windows)

SDK获取 去官方网站下载最新的安装包 &#xff0c;或者在Github中的Flutter项目去 下载 。 将下载的安装包解压 注意&#xff1a;不要将Flutter安装到高权限路径&#xff0c;例如 C:\Program Files\ 配置环境变量&#xff0c;在Path中添加flutter\bin的全路径(如&#xff1a;D…

Android在eoe分享一篇推荐开发组件或者框架的文章

http://www.eoeandroid.com/thread-311194-1-1.html y4078275315 主题 62 帖子 352 e币实习版主 积分314发消息电梯直达楼主 回复 发表于 2013-11-7 09:58:45 | 只看该作者 |只看大图 34本帖最后由 y407827531 于 2013-11-28 15:07 编辑感谢版主推荐&#xff0c;本贴会持续更新…

如何打造高质量的机器学习数据集?这份超详指南不可错过

作者 | 周岩&#xff0c;夕小瑶&#xff0c;霍华德&#xff0c;留德华叫兽转载自知乎博主『运筹OR帷幄』导读&#xff1a;随着计算机行业的发展&#xff0c;人工智能和数据科学近几年成为了学术和工业界关注的热点。特别是这些年人工智能的发展日新月异&#xff0c;每天都有新的…

人脸识别引擎SeetaFaceEngine中Alignment模块使用的测试代码

人脸识别引擎SeetaFaceEngine中Alignment模块用于检测人脸关键点&#xff0c;包括5个点&#xff0c;两个眼的中心、鼻尖、两个嘴角&#xff0c;以下是测试代码&#xff1a;int test_alignment() {std::vector<std::string> images{ "1.jpg", "2.jpg"…

微软宣布 Win10 设备数突破8亿,距离10亿还远吗?

开发四年只会写业务代码&#xff0c;分布式高并发都不会还做程序员&#xff1f; >>> 微软高管 Yusuf Mehdi 昨天在推特发布了一条推文&#xff0c;宣布运行 Windows 10 的设备数已突破 8 亿&#xff0c;比半年前增加了 1 亿。 根据之前的报道&#xff0c;两个月前 W…

领导者必须学会做的十件事情

在这个世界上你可以逃避很多事情并且仍然能够获得成功&#xff0c;但是有些事情你根本就无法走捷径。商业领导者们并不存在于真空之中。成功总是与竞争有关。你可能拥有伟大的产品、服务、概念、战略、团队等等&#xff0c;如果它不能从某种程度上超越竞争对手&#xff0c;这对…

人脸识别引擎SeetaFaceEngine中Identification模块使用的测试代码

人脸识别引擎SeetaFaceEngine中Identification模块用于比较两幅人脸图像的相似度&#xff0c;以下是测试代码&#xff1a;int test_recognize() {const std::string path_images{ "E:/GitCode/Face_Test/testdata/recognization/" };seeta::FaceDetection detector(&…

李沐亲授加州大学伯克利分校深度学习课程移师中国,现场资料新鲜出炉

2019 年 9 月 5 日&#xff0c;AI ProCon 2019 在北京长城饭店正式拉开帷幕。大会的第一天&#xff0c;以亚马逊首席科学家李沐面对面亲自授课完美开启&#xff01;“大神”&#xff0c;是很多人对李沐的印象。除了是亚马逊首席科学家李&#xff0c;李沐还拥有多重身份&#xf…

对Python课的看法

学习Python已经有两周的时间了&#xff0c;我是计算机专业的学生&#xff0c;我抱着可以多了解一种语言的想法报了Python的选修课&#xff0c;从第一次听肖老师的课开始&#xff0c;我便感受到一种好久没有感受到的课堂氛围&#xff0c;感觉十分舒服&#xff0c;不再是那种高中…

维护学习的一点体会与看法

学习维护的知识也有2个月了&#xff0c;对于知识的学习也有一定的看法。接下来我就说一下我对学习的看法。首先&#xff0c;你要学会自学&#xff0c;无论是看书还是上网查资料&#xff0c;维护的知识很多很杂&#xff0c;想要人一下子来教是不可能。只能是自己慢慢的学。其次&…

Dlib简介及在windows7 vs2013编译过程

Dlib是一个C库&#xff0c;包含了许多机器学习算法。它是跨平台的&#xff0c;可以应用在Windows、Linux、Mac、embedded devices、mobile phones等。它的License是Boost Software License 1.0&#xff0c;可以商用。Dlib的主要特点可以参考官方网站&#xff1a;http://dlib.ne…

六大主题报告,四大技术专题,AI开发者大会首日精华内容全回顾

9月6-7日&#xff0c;2019中国AI开发者大会&#xff08;AI ProCon 2019&#xff09; 在北京拉开帷幕。本次大会由新一代人工智能产业技术创新战略联盟&#xff08;AITISA&#xff09;指导&#xff0c;鹏城实验室、北京智源人工智能研究院支持&#xff0c;专业中文IT技术社区CSD…

Git安装配置(Linux)

使用yum安装Git yum install git -y 编译安装 # 安装依赖关系 yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel # 编译安装 tar -zxf git-2.0.0.tar.gz cd git-2.0.0 make configure ./configure --prefix/usr make make install 配置Git…