上一页 1 ··· 6 7 8 9 10 11 12 下一页
摘要: 可以利用 Win32 API 来控制 Console 窗口的 最大化 或 最小化。废话不多说见以下代码: [DllImport("user32.dll", SetLastError = true)] [return: MarshalAs(UnmanagedType.Bool)] private static extern bool SetWindowPos( IntPtr hWnd, IntPtr hWndInsertAfter, int x, int y, int cx, ... 阅读全文
posted @ 2014-03-04 23:46 cnkker.com 阅读(699) 评论(0) 推荐(0)
摘要: winows8.1或winows7 64bit安装Itunes 64bit 11.1.3 无法打开一直停止工作的解决办法系统环境变量里的Path追加;C:\program files (x86)\common files\apple\apple application support\;我的情况是弹出调试窗口然后自动关闭的,加上这个好了。 阅读全文
posted @ 2013-12-25 21:21 cnkker.com 阅读(237) 评论(0) 推荐(0)
摘要: 运用Linq,将List 转换为 Dictionary即:List ToDictionary废话不说,看代码:示例代码:按照性别分类class Program { public class Student { public string Name { get; set; } public int Age { get; set; } public int Sex { get; set; } } static void Main(string[] args... 阅读全文
posted @ 2013-08-29 10:29 cnkker.com 阅读(1063) 评论(0) 推荐(0)
摘要: static DateTime pay_end(DateTime cur_date){DateTime start_date = DateTime.Parse("1999-05-03"); int time_diff = (cur_date - start_date).Days; int pay_periods = (int)(time_diff / 14.0D); if (Math.Ceiling(time_diff / 14.0D) == 0)return start_date.AddDays(pay_periods * 14); return start_date.A 阅读全文
posted @ 2013-08-07 16:08 cnkker.com 阅读(216) 评论(0) 推荐(0)
摘要: 运用linq查找所有重复的元素 阅读全文
posted @ 2013-07-25 14:00 cnkker.com 阅读(451) 评论(1) 推荐(0)
摘要: 什么是Keep-Alive模式? 我们知道HTTP协议采用“请求-应答”模式,当使用普通模式,即非KeepAlive模式时,每个请求/应答客户和服务器都要新建一个连接,完成 之后立即断开连接(HTTP协议为无连接的协议);当使用Keep-Alive模式(又称持久连接、连接重用)时,Keep-Alive功能使客户端到服 务器端的连接持续有效,当出现对服务器的后继请求时,Keep-Alive功能避免了建立或者重新建立连接。 http 1.0中默认是关闭的,需要在http头加入"Connection: Keep-Alive",才能启用Keep-Alive;http 1.1中默认启用Keep-Alive,如果加入"Connection: close ",才关闭。目前大部分浏览器都是用http1.1协议,也就是说默认都会发起Keep-Alive的连接请求了,所以是否能完成一个完整的Keep- Alive连接就看服务器设置情况。 阅读全文
posted @ 2013-07-18 10:23 cnkker.com 阅读(861) 评论(0) 推荐(0)
摘要: 测试中发现Double类型需要#0.00 小数点精度为后2位,并且多余部分不需要四舍五入,直接截断用字符串处理也可以,但是比较麻烦这里给出一种思路:double a = 9999.999;a = Math.Floor(a * 100) / 100;//取二位小数,9999.99Console.WriteLine(a); 阅读全文
posted @ 2013-06-27 14:27 cnkker.com 阅读(959) 评论(0) 推荐(1)
摘要: 本文主要快速教会初学者如何配置log4net,并且快速运用到实际项目中!节省时间,代码可以100%通过编译。 阅读全文
posted @ 2013-01-31 15:33 cnkker.com 阅读(526) 评论(0) 推荐(1)
摘要: EF Power Tool 参数错误 HRESULT:0x80070057 (E_INVALIDARG)) 解决办法从EF4.1开始引入了Code First的开发模式,并提供了工具Entity Framework Power Tool,用于从数据库生成Code First风格的代码。最近在使用这个工具的时候遇到一个参数错误(0×80070057)的问题:测试的过程中发现如果数据库不是本地的就会出这个错误。根据这条思路,从连接属性入手解决:点击高级,修改 Persist Security Info 为 True。测试OK转载:http://blog.bossma.cn/databas 阅读全文
posted @ 2012-11-15 16:47 cnkker.com 阅读(1348) 评论(5) 推荐(0)
摘要: WinForm 实现主程序(exe)与其关联类库(*.dll)分开存放开发环境:Microsoft Windows 7 SP1Microsoft.NET Framework 4.0 (x64)Microsoft Visual Studio 20101. 首先,App.config:<?xmlversion="1.0"encoding="utf-8"?><configuration><runtime><gcConcurrentenabled="true"/><assemblyBind 阅读全文
posted @ 2012-11-12 09:50 cnkker.com 阅读(437) 评论(0) 推荐(0)
上一页 1 ··· 6 7 8 9 10 11 12 下一页