摘要:
先上效果,可以翻译句子和单词,可以中译英和英译中。文末有下载链接。 主要代码如下,其中需要在百度翻译api申请的id和秘钥,标准版完全免费 百度翻译开放平台 (baidu.com)https://api.fanyi.baidu.com/ using... 阅读全文
摘要:
目录 1遵循 c + + 相关的编码标准和习惯用法以防止缺陷。 1.1 CodeWizard 1.2 代码检查工具 PC-Lint 2. 使用语言机制、开发环境和相关工具来防止和发现内存缺陷 2.1使用断言尽早暴露内存缺陷 2.2使用 c 运行时库检查内存泄... 阅读全文
摘要:
目录 1 Eigen 2 Blaze 3 Armadillo 4 Blitz 5 IT++ 6 Dlib 7 Ublas 8 Xtensor 9 MKL 1 Eigen Eigen is versatile. It supports all matrix ... 阅读全文
摘要:
1 图像分割定义和方法分类 图像分割就是指把图像分成各具特性的区域并提取出感兴趣目标的技术和过程。这里特性可以是灰度、颜色、纹理等,目标可以对应单个区域,也可以对应多个区域。图像分割多年来一直得到人们的高度重视,至今已提出了上千种各种类型的分割算法,而且近年来... 阅读全文
摘要:
数据格式如下 前四行为基本信息,读取时跨过去,输出时按k,j,i的循环顺序 #coding=utf-8import numpy as npimport pyvista as pvimport matplotlib.pyplot as pltimport ma... 阅读全文
摘要:
1、创建模板形式的矩阵数据容器 #pragma once#include #include #include using namespace std;template class Model2D {public: Model2D() {}; Mod... 阅读全文
摘要:
3.4.0 和3.4.2版本的matplotlib存在严重的内存泄露问题,比如下面的代码 import numpy as npfrom matplotlib import pyplot as pltimport gcdef plot(dat,i): plt.f... 阅读全文
摘要:
通过递归的方式获取文件夹内指定后缀类型所有文件的行数,用于统计代码行数 import osdef getFileNames(path, list_name, postfx): for file in os.listdir(path): fi... 阅读全文
摘要:
小小的二维矩阵,用到了模板、智能指针,列表等 #include #include #include using namespace std;templateclass Array2D {public: Array2D() {}; Array2D(... 阅读全文
摘要:
很多几何对象的相交判断都可以转化为三角形与直线的相交判断 #include #include #include #include class vec3 {public: float x, y, z; float dot(const vec3& b... 阅读全文