摘要: docker ubuntu18.04 使用cat查看中文正常,使用vim查看中文乱码。 解决此问题需要修改“/etc/profile”文件。 1、修改前查看本地使用的语言环境: locale 2、查看本地支持的语言环境: locale -a 3、然后将“/etc/profile”文件的结尾添加上“e 阅读全文
posted @ 2021-02-03 15:25 zebra_彬 阅读(475) 评论(0) 推荐(0) 编辑
摘要: 一、根据微软的产品号GUID,调用msi.dll class Program { static void Main(string[] args) { if (GetProcuct("{GUID}") == INSTALLSTATE.INSTALLSTATE_DEFAULT) { //操作 } } [ 阅读全文
posted @ 2021-01-08 14:46 zebra_彬 阅读(1347) 评论(0) 推荐(0) 编辑
摘要: const string KEY_64 = "HuidTeac";//注意了,是8个字符 const string IV_64 = "HuidTeac"; public static string Encode(string data) { byte[] byKey = System.Text.AS 阅读全文
posted @ 2020-11-11 09:40 zebra_彬 阅读(1399) 评论(0) 推荐(0) 编辑
摘要: Mat image = imread("D:/ju.jpg"); imshow("素材图", image); int bins = 256; //直条为256 int hist_size[] = { bins }; float range[] = { 0,256 }; const float* ra 阅读全文
posted @ 2020-09-28 15:50 zebra_彬 阅读(798) 评论(0) 推荐(0) 编辑
摘要: 模板是C++泛型编程的基础,一个模板就是一个创建类或者函数的蓝图或者公式。当使用一个vector这样的泛型类型,我们提供足够的信息,就可以将蓝图转换成特定的类或者函数。 假设我们编写一个函数来比较两个值。 int compare(const string &v1,const string &v2) 阅读全文
posted @ 2020-09-26 00:22 zebra_彬 阅读(285) 评论(0) 推荐(0) 编辑
摘要: 头文件: #pragma once #ifndef MD5_H #define MD5_H #include <string> #include <fstream> /* Type define */ typedef unsigned char byte; typedef unsigned int 阅读全文
posted @ 2020-09-14 10:58 zebra_彬 阅读(581) 评论(0) 推荐(1) 编辑
摘要: 双指针算法“接雨水” 链接:https://leetcode-cn.com/problems/trapping-rain-water/ 给定 n 个非负整数表示每个宽度为 1 的柱子的高度图,计算按此排列的柱子,下雨之后能接多少雨水。 上面是由数组 [0,1,0,2,1,0,1,3,2,1,2,1] 阅读全文
posted @ 2020-08-21 11:54 zebra_彬 阅读(415) 评论(0) 推荐(0) 编辑
摘要: 来自leecode做题时,发现的双指针用法,觉得挺有意思所以记录一下 链接:https://leetcode-cn.com/problems/3sum 题目: 给你一个包含 n 个整数的数组 nums,判断 nums 中是否存在三个元素 a,b,c ,使得 a + b + c = 0 ?请你找出所有 阅读全文
posted @ 2020-08-21 10:08 zebra_彬 阅读(936) 评论(0) 推荐(0) 编辑
摘要: 一、保存二进制 #include <iostream> #include <fstream> int main(){ float* output = new float[100](); ofstream fout("test.bin", ios::binary); fout.write((char 阅读全文
posted @ 2020-08-19 14:53 zebra_彬 阅读(1866) 评论(0) 推荐(0) 编辑
摘要: 一、获取项目//码云克隆git clone https://gitee.com/winlinvip/srs.oschina.git srs//githubgit clone https://github.com/ossrs/srs.git二、进入trrunkcd trunk三、编译./configu 阅读全文
posted @ 2020-08-18 23:56 zebra_彬 阅读(766) 评论(0) 推荐(0) 编辑