2022年2月23日
摘要: 多线程操作std::queue的例子: // // std::queue 必须使用 lock 保护,去掉lock_guard后会crash // void Test() { std::cout << "\n Test \n"; mutex mtx; queue<int> numQueue; bool 阅读全文
posted @ 2022-02-23 08:01 朱迎春 阅读(589) 评论(0) 推荐(0) 编辑
  2022年2月22日
摘要: 环境:Win10+VS2015+Qt5.9.8 C++代码: // 配置文件:可执行路径\config\main.ini,如果没有config子目录会自动创建 QSettings settings(QString("%1%2").arg(QCoreApplication::applicationDi 阅读全文
posted @ 2022-02-22 17:17 朱迎春 阅读(434) 评论(0) 推荐(0) 编辑
摘要: 环境:Win10, VS2015 新建项目|Visual C++|Win32|Win32控制台应用程序,附加选项:预编译头,不管是否选中,都会生成 stdafx.h,stdafx.cpp,其他源文件中也会有 #include "stdafx.h" 区别:项目|属性|C++|预编译头,一个是使用,一个 阅读全文
posted @ 2022-02-22 15:04 朱迎春 阅读(99) 评论(0) 推荐(0) 编辑
  2020年11月6日
摘要: using System; using System.ComponentModel; using System.Diagnostics; using System.Drawing; using System.IO; using System.Net; using System.Reflection; 阅读全文
posted @ 2020-11-06 06:31 朱迎春 阅读(239) 评论(0) 推荐(0) 编辑
  2020年9月9日
摘要: 本文以边缘检测为例,提供一个机器视觉原生算法的入门案例。效果如下图,左边是源图片,右边是检测结果: 基本思路:逐行扫描探测边缘;对每行的边缘位置做直线拟合;使用方差剔除缺损点。 边缘探测算法:使用类似【2, 2, 2, -2, -2, -2】的卷积算子,在边缘位置,卷积值最大,利用最大值两边的次大值 阅读全文
posted @ 2020-09-09 20:48 朱迎春 阅读(482) 评论(0) 推荐(0) 编辑
  2020年9月1日
摘要: 静态网页,使用JavaScript求解数独,直接上代码: <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; ch 阅读全文
posted @ 2020-09-01 20:40 朱迎春 阅读(323) 评论(0) 推荐(0) 编辑
  2018年9月25日
摘要: 总算搞清楚async/await了 阅读全文
posted @ 2018-09-25 17:18 朱迎春 阅读(2817) 评论(1) 推荐(1) 编辑
  2018年9月5日
摘要: 委托的Invoke是同步调用,等价于直接使用()来执行。 BeginInvoke是异步调用,BeginInvoke直接返回,EndInvoke阻塞直到委托执行结束。 下面这段代码可以很清晰的把这几个方法描述清楚: 阅读全文
posted @ 2018-09-05 17:33 朱迎春 阅读(463) 评论(0) 推荐(0) 编辑
摘要: Invoke BeginInvoke 阅读全文
posted @ 2018-09-05 15:27 朱迎春 阅读(373) 评论(0) 推荐(1) 编辑
  2018年6月5日
摘要: Win7下Git服务端搭建 阅读全文
posted @ 2018-06-05 22:52 朱迎春 阅读(325) 评论(0) 推荐(0) 编辑