自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(100)
  • 资源 (7)
  • 收藏
  • 关注

原创 基于 Echarts + Golang gin 实现的动态实时可视化数据大屏展示范例一

参考这个案例https://blog.csdn.net/lildkdkdkjf/article/details/106571356,手痒,改成Golang版:)先看效果图:看起来和Python版的一模一样:)实现原理:前端Echarts实现:https://echarts.apache.org/zh/index.html后台Golang实现,用https://github.com/gin-gonic/gin启动一个http服务,加载页面。再用https://github.com/zs

2020-06-23 19:40:37 4398 5

原创 Golang实现最简单https服务器,免费申请https证书

package mainimport ( "fmt" "net/http")func handler(w http.ResponseWriter, r *http.Request) { // fmt.Fprintf(w, // "Hi, This is an example of https service in golang!") w.Header().Set("Content-Type", "text/plain") w.Write([]byte("This is an exa.

2021-04-09 09:53:53 740

原创 利用谷歌翻译把ini配置信息翻译成想要的语言

代码仓库https://github.com/6550523/TranslateIni把[demo]demo1 = "Go is an open source programming language that makes it easy to build simple, reliable, and efficient software. "demo2 = "Python can be easy to pick up whether you're a first time programm.

2020-11-04 14:57:41 508

原创 beego查内存泄漏方法get memprof

开启调试功能,修改配置文件app.conf:EnableAdmin = trueAdminAddr = "0.0.0.0"AdminPort = 8088访问管理页面:http://your ip:8088/点击菜单:get memprof,提示create heap profile mem-948.memprof ,说明内存信息文件生成成功执行go tool pprof your_app mem-948.memprof,输入svg命令,如果提示dot未安装,则在https://gra

2020-10-13 10:54:50 906

原创 go-echarts编译成功,页面空白的问题

修改源码github.com\go-echarts\go-echarts\charts\base.goAssetsHost string `default:"https://go-echarts.github.io/go-echarts-assets/assets/"`改成:AssetsHost string `default:"/assets/"`在你的工程目录里增加\assets和\assets\themes文件夹放入文件:https://download.csdn.net/do

2020-09-29 16:39:06 365

原创 发邮件SendEmail精简成一个函数,各种开发语言都可调用

把Golang版github.com/jordan-wright/email发邮件的库做成dll动态库,精简成一个函数SendEmail即可发邮件,各种开发语言都可调用。代码已开源:https://github.com/6550523/EmailDllC++调用发邮件范例:#include "stdafx.h"#include <stdio.h>#include <stdlib.h>#include <Windows.h>#define ERR_LE.

2020-09-19 11:13:34 523 1

原创 读写Excel的动态库版本2,供各种开发语言调用,不需安装Office

之前写了个读写Excel的动态库,接口较少。换了个新版本,采用的https://github.com/360EntSecGroup-Skylar/excelize,接口更丰富,可以写入图片。代码已开源https://github.com/6550523/ExcelDll2C++读写Excel范例:#include "stdafx.h"#include <Windows.h>#define ERR_LEN 1024#define TEXT_LEN 32767#ifdef _W

2020-09-14 15:28:31 257

原创 读写Excel的动态库,供各种开发语言调用,不需安装Office

C++读写Excel的常用方法是ODBC,前提条件是你得先找个Office,安装excel。如果没安装怎么办?所以就找到https://github.com/tealeg/xlsx这个Go语言开发的库,把常用接口改装成dll,各种开发语言都可调用。代码已开源https://github.com/6550523/ExcelDllC++读写Excel范例:#include "stdafx.h"#include <stdio.h>#include <stdlib.h>#

2020-09-09 18:20:14 504

原创 Golang读写xlsx(不能读写xls)的库:github.com/tealeg/xlsx

读取:package mainimport( "fmt" "github.com/tealeg/xlsx")var ( inFile = "1.xlsx")func main(){ // 打开文件 xlFile, err := xlsx.OpenFile(inFile) if err != nil { fmt.Println(err.Error()) return } // 遍历sheet页读取

2020-09-09 11:36:19 2966

原创 C++ 获取程序所在路径GetModuleFileName,并设置为当前路径SetCurrentDirectory

#include "stdafx.h"#include <string>#include <iostream>#include <atlconv.h>int main(){ TCHAR TPath[MAX_PATH]; DWORD dwRet; dwRet = GetModuleFileName(NULL, TPath, MAX_PATH); USES_CONVERSION; std::string StrExe = ...

2020-09-09 10:51:52 414

原创 ddns-go0.0.4发布,简单好用的DDNS动态域名工具

https://github.com/jeessy2/ddns-go/releases下载可执行程序,以windows为例,直接双击ddns-go.exe。浏览器打开http://127.0.0.1:9876/以阿里云为例,购买了itgcs.tech域名。在https://ram.console.aliyun.com/manage/ak创建访问密钥,填入。Domains里填入你想要的域名,例如blog.itgcs.tech。系统会自动在阿里域名解析里帮你把blog.itgcs.tech解析.

2020-09-02 18:09:10 1614

原创 C++ 简易 HttpServer HttpClient 亲测好用

https://github.com/tashaxing/CppHttpDemo采用mongoose这个库来实现基本的httpserver和httpclient功能编译环境:win10,vs2015, C++11 (支持跨平台)文件列表:├─common ├─mongoose.h └─mongoose.c├─httpclient ├─http_client.h ├─http_client.cpp └─main.cpp└─httpserver

2020-08-25 16:43:17 484

原创 Windows下 Golang 交叉编译批处理

写个bat文件,内容如下:SET CGO_ENABLED=0SET GOOS=linuxSET GOARCH=amd64go build -o netbus64 main.goSET CGO_ENABLED=0SET GOOS=linuxSET GOARCH=386go build -o netbus32 main.goSET CGO_ENABLED=0SET GOOS=windowsSET GOARCH=amd64go build -o netbus64.exe main.g

2020-08-05 17:42:32 408

原创 Webstrot官网的4套物联网管理仪表模板

WebStrut Admin是一款专业的物联网管理仪表模板,设计简洁明了。它是用Bootstrap 4和Bootstrap 3框架、HTML5和CSS3、媒体查询构建的完全响应的管理仪表板模板。它拥有大量可重用的UI组件集合,并与最新的JQuery插件集成在一起。它可以用于所有类型的Web应用程序,如网站的网站,自定义管理面板,应用程序后端,CMS或CRM。官网:http://www.webstrot.com/html/webstrotadmin/下面这4套物联网管理后台模板就是基于Webstrot

2020-08-05 17:07:46 824 2

原创 C++ IHTMLDocument2 HTML转图片

HBITMAP CreateImage(IHTMLDocument2 *pDoc){ IHTMLElement *pElement = (IHTMLElement *)NULL; IHTMLElementRender *pRender = (IHTMLElementRender *)NULL; if (pDoc == (IHTMLDocument2 *)NULL) return NULL; pDoc->get_body(&pElement); if (pElement .

2020-07-31 17:00:39 871

原创 MFC CExplorer1或WebBrowser里调用javaSript

不关心返回值IHTMLDocument2* pDocument; IHTMLWindow2* pWindow; //获得 html 的 Document 节点HRESULT hr = GetDHtmlDocument(&pDocument);//获得 Document 的窗口节点pDocument->get_parentWindow(&pWindow); VARIANT ret; ret.vt = VT_EMPTY;pWindow->execScript(A

2020-07-30 15:39:04 484

原创 C++使用SQLite范例

https://blog.csdn.net/xionglifei2014/article/details/80665636

2020-07-29 14:11:10 174

原创 std::string 没有字符串格式化format,那就造一个

std::string std_string_format(std::string & _str, const char * _Format, ...) { std::string tmp; va_list marker = NULL; va_start(marker, _Format); size_t num_of_chars = _vscprintf(_Format, marker); if (num_of_chars > tmp.capacity()) { tmp..

2020-07-29 09:59:42 493

原创 C++ ATL宏转换各种格式的字符串

A2WUSES_CONVERSION;CString tmpStr;char*LineChar="char* to wchar*";const WCHAR * cLineChar = A2W(LineChar);tmpStr=cLineChar;W2AUSES_CONVERSION;CString tmpStr;WCHAR LineChar="wchar* to char*";const char* cLineChar = A2W(LineChar);A2TUSES_

2020-07-28 09:09:34 257

原创 C++ utf-8转unicode转ascii

//UTF-8转Unicode std::wstring Utf82Unicode(const std::string& utf8string){ int widesize = ::MultiByteToWideChar(CP_UTF8, 0, utf8string.c_str(), -1, NULL, 0); if (widesize == ERROR_NO_UNICODE_TRANSLATION){ throw std::exception("Invalid .

2020-07-28 08:56:26 1301

原创 浮点数float32、float64高精度表示金额问题

package mainimport ( "fmt" "strconv" "math/big" "github.com/shopspring/decimal")func main() { //32位浮点,错误 var a1,b1,c1 float32 a1 = 1.69 b1 = 1.7 c1 = a1*b1 fmt.Println(c1) //64位浮点,错误 var a2,b2,c2 float64.

2020-07-24 10:19:09 975

原创 Golang x509: certificate signed by unknown authority 问题

方法一,使用匹配的证书方法:rootCA := `*.pem 文件的内容`roots := x509.NewCertPool()ok := roots.AppendCertsFromPEM([]byte(rootCA))if !ok { panic("failed to parse root certificate")}client = &http.Client{ Transport: &http.Transport{ TLSClientConfig:

2020-07-20 18:37:57 4728

原创 Golang限制N个并发同时运行

package mainimport ( "fmt" "sync" "time")var wg sync.WaitGroupfunc main() { var wg sync.WaitGroup sem := make(chan struct{}, 2) // 最多允许2个并发同时执行 taskNum := 10 for i := 0; i < taskNum; i++ { wg.Add(1) .

2020-07-13 11:23:11 675

原创 C++版:一个.h文件实现的读写ini文件

文件在此下载:使用范例 // simple demonstration CSimpleIniA ini; ini.SetUnicode(); SI_Error rc = ini.LoadFile("example.ini"); if (rc < 0) { /* handle error */ }; ASSERT_EQ(rc, SI_OK); const char* pv; pv = ini.GetValue("section", "key", "default"); A

2020-07-09 17:03:02 500

原创 基于 Echarts + Golang gin 实现的动态实时可视化数据大屏展示范例二

参考这个案例https://blog.csdn.net/lildkdkdkjf/article/details/106783264,手痒,改成Golang版:)先看效果图:看起来和Python版的一模一样:)实现原理:前端Echarts实现:https://echarts.apache.org/zh/index.html,前端就不贴了,参考Python版或在最后的网盘地址里下载。后台Golang实现,用https://github.com/gin-gonic/gin启动一个http服

2020-07-08 10:01:55 1571

原创 Python OpenCV第十四课:人脸检测

本文介绍OpenCV的人脸检测技术,使用的是HaarCascade分类器。HaarCascade分类器可以检测人脸在图片中的位置或者表情等。已定义好的HaarCascade数据在这里下载https://github.com/opencv/opencv/tree/master/data先看代码:import cv2image = cv2.imread("./1.jpg")face_cascade = cv2.CascadeClassifier("haarcascade_frontalface

2020-07-07 15:11:23 334

原创 自建web服务器的省钱方案

现在家家都有宽带,但是没有公网ip,想要自建web服务就得要个公网ip,所以就买个最便宜的云主机吧。如果需要备案,那就用阿里的云主机https://www.aliyun.com/minisite/goods?userCode=ml5rtaz8,如果不需要备案,那就找个最便宜的国外主机:https://virmach.com/,最便宜的linux主机才1美元/月,可以用支付宝支付。下面是配置方法:1:下载最新版的https://github.com/fatedier/frp/releases,frp

2020-07-03 16:10:17 371

原创 Golang实现的Windows版supervisord

#win-supervisorWindows版的supervisord,基于https://github.com/smartlink-ventures/win-supervisor修改的实现原理:注册Windows服务,监控进程名称。任务列表里没有找到就开启一个进程。##编译配置方法运行gobuild编译出win-supervisor.exe修改winsupervisor.conf,范例:[program:win32calc.exe]Name=win32calc.ex...

2020-07-03 11:52:19 2498

原创 Golang 两个发邮件的库,send email 亲测好用

package main import ( "github.com/jordan-wright/email" "net/smtp" "net/textproto")func main() { e := &email.Email { To: []string{"[email protected]"}, From: "[email protected]", Subject: "Email Send Test 8888", Text: []byte.

2020-07-01 09:54:41 3868

原创 Python OpenCV第十三课:图片颜色空间

请先看颜色空间介绍:https://blog.csdn.net/jiang_ming_/article/details/82534722OpenCV支持超过150种颜色空间,下面方法列出所有支持的方法:import cv2 as cvflags = [i for i in dir(cv) if i.startswith('COLOR_')]print( flags )执行结果:['COLOR_BAYER_BG2BGR', 'COLOR_BAYER_BG2BGRA', 'COLOR_B

2020-06-30 10:33:52 188

原创 Python OpenCV第十二课:图片按位操作

可以对图片按位操作,包括和AND、与OR、非NOT和异或XOR。当要提取图像的任何部分、定义和使用非矩形ROI等时,它们将非常有用。下面我们将看到一个如何更改图片特定区域的示例。看完整代码:import cv2import numpy as npimg1 = np.zeros((300, 300), dtype="uint8")cv2.rectangle(img1, (100, 100), (250, 250), 255, -1)cv2.imshow("Image 1", img1)im

2020-06-30 10:12:49 253

原创 Python OpenCV第十一课:图片混合

根据OpenCV文档图片混合就是图片做加法,给图片赋予不同的权重,从而给人一种混合或透明的感觉。 图片按以下公式添加:变量范围,您可以在一个图像到另一个图像之间执行一个很酷的转换。这里我把两张图片混合到一起。一张图片权重0.7,另一张图片权重0.3。调用cv2.addWeighted()就是执行了上面的公式。看完整的代码:import cv2img1 = cv2.imread("1.tif")img2 = cv2.imread("2.tif")dist = c...

2020-06-30 10:00:43 213

原创 Golang两款编辑器:Goland 2020 和国产的LiteIDE

Goland 2020:http://www.opdown.com/soft/220835.html国产的LiteIDE:http://liteide.org/cn/

2020-06-28 13:59:39 1258

原创 Python OpenCV第十课:对图片算术运算

OpenCV可以对图片进行加、减、乘运算,详细内容请参考官方文档Arithmetic Operations on Images先看范例:import cv2img1 = cv2.imread("1.tif")img2 = cv2.imread("2.tif")add = img1 + img2subtraction = img1 - img2add1 = cv2.add(img1, img2)print(add1)sub2 = cv2.subtract(img1, img2)

2020-06-22 17:42:11 167

原创 Python怎么自建ip代理池

先找个免费代理的网站https://www.kuaidaili.com/free/inha/,再爬所有的ip。因为网站本身就会防爬虫,所以就用刚获取到的ip逐个尝试是否可用,找到可用ip后,就用这个ip代理继续爬下一页。#!/usr/bin/env python#-*- coding:utf-8 -*-import requestsfrom bs4 import BeautifulSoupimport pymysqlimport timeglobal ip_numip_num = 1

2020-06-19 17:07:47 259

原创 解决ModuleNotFoundError: No module named bs4

pip install -i https://pypi.tuna.tsinghua.edu.cn/simple beautifulsoup4

2020-06-19 16:46:02 496

原创 MFC MoveWindow后控件不见了

确定MoveWindow后控件没有跑到窗口外面去,不知为何显示不了。执行:GetDlgItem(IDC_STATIC_1)->InvalidateRect(rect);Invalidate();就好了。

2020-06-16 18:08:48 730

原创 MFC 所有控件大小随窗口大小变化而变化

.h里定义:CPoint oldPoint;OnInitDialog里添加:CRect rect;   GetClientRect(&rect); / / get the client area size oldPoint. X= rect.right - rect.left ;  oldPoint.y= rect.bottom - rect.top ;响应WM_ SIZE消息:if(nType==SIZE_RESTORED || nType==SIZE_MA.

2020-06-16 17:58:42 452

原创 C++ 解析Json的库 jsoncpp

源码在这https://github.com/open-source-parsers/jsoncpp安装CMake:https://cmake.org/download/在jsoncpp\src\lib_json目录执行:cmake .创建了vs工程。编辑jsoncpp_lib:复制jsoncpp.lib到自己的工程目录:在include这个目录:使用方法:#include <json\json.h>#pragma comment(lib,.

2020-06-15 09:35:42 173

原创 C++ 图片、文件转base64编码

不要用这个版本https://github.com/hopzebordah/base64encoder/blob/master/encode.cpp有坑,会死在result[i] = '=';可以用这个版本https://blog.csdn.net/qq_31681017/article/details/93161285亲测好用#include "stdafx.h"#include <Windows.h>#include <iostream>#include &..

2020-06-15 09:08:14 1651

go-echarts允许需要的文件assets.zip

go-echarts运行需要的几个文件被墙,解压放到本地工程目录即可,在代码http.HandleFunc("/", handler)上面加一行http.Handle("/assets/", http.StripPrefix("/assets/", http.FileServer(http.Dir("./assets"))))

2020-09-29

SimpleIni.h

C++版:一个.h文件实现的读写ini文件,Windows,Linux亲测好用,使用方法https://blog.csdn.net/QQ6550523/article/details/107232973

2020-07-09

win-supervisor.zip

Windows版的supervisord 参看https://blog.csdn.net/QQ6550523/article/details/107102748

2020-07-03

C++解析XML.zip

C++解析XML,使用方法https://blog.csdn.net/QQ6550523/article/details/106728964

2020-06-13

GifCam.zip

免费截屏工具,生成gif动图,或导出成AVI文件。来源https://gifcam.en.softonic.com/

2020-06-13

HTTPClient.zip

C++ HttpClient亲测好用,使用方法https://blog.csdn.net/QQ6550523/article/details/106728695

2020-06-13

helloproj .zip

Pydroid安装包以及Android开发Python代码范例,博文地址https://blog.csdn.net/QQ6550523/article/details/106100861

2020-05-13

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除