2020年1月5日

摘要: ![](https://img2018.cnblogs.com/blog/253293/202001/253293-20200105085150417-86752388.png) ![](https://img2018.cnblogs.com/blog/253293/202001/253293-20200105085156436-1626841089.png) 阅读全文
posted @ 2020-01-05 08:52 beastplus 阅读(497) 评论(0) 推荐(0) 编辑

2015年9月2日

摘要: 项目用到Ftp,搜了下现有的类库System.Net.FtpClient 貌似比较不错。一开始用着还行,但是有个FtpServer下有8k多内容,列表需要很久(7、8s)才能刷新出来。翻源码吧,有两个地方可以改进FtpClient.cs 中public FtpListItem[] GetListin... 阅读全文
posted @ 2015-09-02 15:23 beastplus 阅读(307) 评论(0) 推荐(0) 编辑

2015年4月28日

摘要: 使用StreamWriterusing (var writer = new StreamWriter(File.Create(path))){ writer.WriteLine("sdf");} 跳出using后stream也释放了using (XmlWriter xw = XmlWriter... 阅读全文
posted @ 2015-04-28 11:11 beastplus 阅读(192) 评论(0) 推荐(0) 编辑

2015年3月12日

摘要: Linq排序很方便,如果能动态创建Expression再排序就更方便了。正序还是倒序排列var order = typeof(Enumerable).GetMember(direction == ListSortDirection.Ascending ? "OrderBy" : "OrderByDe... 阅读全文
posted @ 2015-03-12 10:35 beastplus 阅读(429) 评论(0) 推荐(0) 编辑

2014年11月11日

摘要: 还是那个该死的WebFrom项目,部分功能替换为MVC后感觉好多了,但是WebForm、MVC都有图片加载失败时显示提示图片的需求,并且统一在js中处理。问题来了,js中图片路径怎么处理呢?现场有可能部署为网站,也有可能为应用,再加上对路径的不了解,决定弄个IHttpHandler一劳永逸解决路径问... 阅读全文
posted @ 2014-11-11 11:25 beastplus 阅读(487) 评论(0) 推荐(0) 编辑

2014年6月4日

摘要: 最近维护公司一个烂项目.NET4.0 Asp.Net WebForm(在MVC5泛滥的今天还有用WebForm的(⊙o⊙)…)IE10、IE11下aspx中大表单提交不上去,报_DoPostBack未定义,IE9就没问题,调整了User-Agent,弄成9就没问题了。股沟之,发现股沟还是比百度好使h... 阅读全文
posted @ 2014-06-04 14:06 beastplus 阅读(199) 评论(0) 推荐(0) 编辑

2013年6月28日

摘要: 安装完Ubuntu改为中文,发现是中英文混搭的界面 sudoapt-get install $(check-language-support --language=zh_CN)更新语言包。Eclipse CDT下opengl 了一把,Debug时窗口居然是什么都没有的,只显示后面窗口的背景,把eclipse的调试断开后就正常了。解决办法把VMWare的3d加速打开。还是折腾opengl 在release下没法运行成功,显示glut failed to open display。解决在配置中添加变量$DISPLAY值为:0 看上去像是没找到显示器。 阅读全文
posted @ 2013-06-28 10:11 beastplus 阅读(183) 评论(0) 推荐(0) 编辑

2013年6月26日

摘要: 公司要做个跟设备打交道的web系统,需要java调用dll。搞java的同事说JNative看起来挺好使的,找俺帮忙调通。用的是1.3.1版本环境设置。JNative的调试信息需要打开才能更清楚些,要不总是说没加载库,跟没说一样。System.setProperty("jnative.debug", "true");如果调试信息里有System.LoadLibrary(),说明没有加载JNativeCpp.dll,指定全路径即可,双斜杠哦。System.setProperty("jnative.loadNative", "D 阅读全文
posted @ 2013-06-26 10:11 beastplus 阅读(3771) 评论(1) 推荐(0) 编辑

2013年6月14日

摘要: 最近一周分配了个任务,编辑配置,需要做成web的。要求有拖拽、旋转、选择多边形范围⊙﹏⊙。考虑到自己的烂jq,申请用SilverLight,居然可以用这个没娘的孩儿。Silverlight需要与MVC主项目通讯,无外乎是Get、Post,别的没用到。获取地址WebRequest创建时需要Uri,而且是绝对路径的,需要获取xap所在的地址。var scriptObject = HtmlPage.Window.GetProperty("location") as ScriptObject;var hostUrl = scriptObject.GetProperty(" 阅读全文
posted @ 2013-06-14 13:50 beastplus 阅读(897) 评论(0) 推荐(0) 编辑

2013年5月24日

摘要: .net 4.5中新增C#关键字async await长时间操作任务的福音。private async void Button_Click_1(object sender, RoutedEventArgs e){ var str= await this.WaitAsynchronouslyAsync(); MessageBox.Show(str);} public Task<string> WaitAsynchronouslyAsync(){ TaskCompletionSource<string> tcs = new TaskComp... 阅读全文
posted @ 2013-05-24 13:24 beastplus 阅读(449) 评论(0) 推荐(0) 编辑

导航