摘要: 通过'http://tool.bitefu.net/jiari/?d=20210815获取最近一天工作日,此API反回0表示工作日,1表示周末,2表示假期 //workday.js import fetch from 'node-fetch' const URL = 'http://tool.bit 阅读全文
posted @ 2021-08-15 10:16 joe62 阅读(134) 评论(0) 推荐(0) 编辑
摘要: 利用System.Drawing.ImageAnimator类实现GIF图标显示 定时器设置为300毫秒 阅读全文
posted @ 2017-05-20 15:21 joe62 阅读(708) 评论(0) 推荐(0) 编辑
摘要: 用微软的EF6访问MySQL报错,只好自己直接访问数据库了 阅读全文
posted @ 2016-01-15 15:49 joe62 阅读(441) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2014-09-21 16:23 joe62 阅读(147) 评论(0) 推荐(0) 编辑
摘要: Hyper-v下安装测试环境:CentOS 6.5, 默认的Python 2.6, web2py主机Win8.1问题:远程管理显示“管理因不安全通道而关闭”,只能访问网页,不能进入管理界面。找了n多方法,不得门道,最后在stackoverflow找到可行的方法如下:# openssl genrsa ... 阅读全文
posted @ 2014-07-23 23:10 joe62 阅读(1876) 评论(0) 推荐(0) 编辑
摘要: 程序升级为.NET 4.0后,在程序中使用dynamic时出现下列错误错误5预定义的类型“Microsoft.CSharp.RuntimeBinder.Binder”未定义或未导入错误4找不到编译动态表达式所需的一个或多个类型。引用Microsoft.Csharp.dll后可解决此问题。 阅读全文
posted @ 2014-06-30 15:08 joe62 阅读(361) 评论(0) 推荐(0) 编辑
摘要: WPF MVVM实用入门 阅读全文
posted @ 2014-04-18 18:06 joe62 阅读(622) 评论(0) 推荐(0) 编辑
摘要: 工具:LinqPad要求:关键字过滤,时间过滤,分页。(fromeinEventLogsjoinlinEventsone.Eventidequalsl.EventIDwherel.NeedACK==1&&e.EventTime>DateTime.Parse("2012-08-0511:14:52")&&e.EventTime<DateTime.Parse("2012-08-0611:14:52")&&e.Descript.Contains("A1")orderbye.Even 阅读全文
posted @ 2012-08-06 13:13 joe62 阅读(231) 评论(0) 推荐(0) 编辑
摘要: 在单元测试时,通过反射获取对象的属性值。ToString 1privatestaticstringOutMessage(objectlab)2{3Typet=lab.GetType();4StringBuildersb=newStringBuilder();5foreach(varpint.GetProperties())6{7if(p.DeclaringType.Namespace==t.Namespace)8{9stringvalue=p.GetValue(lab,null).ToString();10if(string.IsNullOrEmpty(value))11continue;12 阅读全文
posted @ 2012-08-05 12:50 joe62 阅读(505) 评论(0) 推荐(0) 编辑
摘要: 原来Mock可以这样子用。1. 接口ISerialPort public interface ISerialPort { string PortName { get; } int BaudRate { get; } int DataBits { get; } Parity Party { get; } StopBits StopBits { get; } int BytesToRead { get; } bool IsOpen { get; } void Open(); ... 阅读全文
posted @ 2012-03-12 22:14 joe62 阅读(597) 评论(0) 推荐(0) 编辑