随笔 - 850  文章 - 37  评论 - 173  阅读 - 287万
06 2012 档案
Unable to convert MySQL date/time value to System.DateTime 解决方案 转
摘要:Unable to convert MySQL date/time value to System.DateTime 解决方案这个问题发生在MySQL数据里面有Date类型数据,在C#中查询出来时候时间的类型不一致而导致!网上看了一下,找到有两种解决方案:1、在连接字符串中加入“Allow Zero Datetime=True”; con = new MySqlConnection("server=localhost;database=test;CharSet=gb2312;pooling=false;port=3306;UId=root;Pwd=pwd;Allow Zero Dat 阅读全文
posted @ 2012-06-27 10:07 武胜-阿伟 阅读(6117) 评论(4) 推荐(3) 编辑
DockPanel Suite更新到2.6了
摘要:DockPanel Suite Development Has Moved!DockPanel Suite is now being actively developed on GitHub:http://github.com/dockpanelsuiteThe latest binaries are available on the download page:http://github.com/dockpanelsuite/dockpanelsuite/downloads 阅读全文
posted @ 2012-06-25 16:18 武胜-阿伟 阅读(558) 评论(0) 推荐(1) 编辑
Use Custom Events from your WCF ServiceHost http://www.codeproject.com/Tips/150702/Use-Custom-Events-from-your-WCF-ServiceHost
摘要:While working on an article for CodeProject, I happened on a requirement to create a WCF service using NamedPipe binding. The client application (a Windows Service) would be sending periodic messages, and if the sever (a SysTray application) was listening, it would insert those messages into a ListB 阅读全文
posted @ 2012-06-10 09:07 武胜-阿伟 阅读(491) 评论(0) 推荐(0) 编辑
利用ICSharpCode.SharpZipLib.dll实现简单加解压 转
摘要:利用ICSharpCode.SharpZipLib.dll实现简单加解压本文主要提供了一个利用ICSharpCode.SharpZipLib.dll实现简单加解压的功能类,ICSharpCode.SharpZipLib.dll可以从http://www.icsharpcode.net/OpenSource/SharpZipLib/取得。因为现阶段只需要对文件夹进行压缩,所以提供接口的功能并不全面,以后有空或有需要的时候会进行扩充。usingSystem;usingSystem.Collections.Generic;usingSystem.Text;usingICSharpCode.Sharp 阅读全文
posted @ 2012-06-08 11:45 武胜-阿伟 阅读(2917) 评论(0) 推荐(0) 编辑
XML 转义字符
摘要:转义字符不合法的XML字符必须被替换为相应的实体。 如果在XML文档中使用类似"<" 的字符, 那么解析器将会出现错误,因为解析器会认为这是一个新元素的开始。所以不应该象下面那样书写代码:<message>if salary < 1000 then</message>为了避免出现这种情况,必须将字符"<" 转换成实体,象下面这样:<message>if salary &lt; 1000 then</message>下面是五个在XML文档中预定义好的实体:&lt;<小于 阅读全文
posted @ 2012-06-08 11:44 武胜-阿伟 阅读(228) 评论(0) 推荐(0) 编辑
C#根据字符串获取对应类型(Type) 转
摘要:C#根据字符串获取对应类型(Type)publicstaticTypeGetTypeByString(stringtype){switch(type.ToLower()){case"bool":returnType.GetType("System.Boolean",true,true);case"byte":returnType.GetType("System.Byte",true,true);case"sbyte":returnType.GetType("System.SByte&q 阅读全文
posted @ 2012-06-08 11:43 武胜-阿伟 阅读(14581) 评论(1) 推荐(0) 编辑
Using Nini .NET Configuration Library
摘要:When developing a desktop application, there will be times when you want to store settings for your program. A database is one option, but on Windows, you might just wish to have your settings stored in an INI file. One way to work with an INI file in C# is with the Nini Library. This makes it quite 阅读全文
posted @ 2012-06-08 09:54 武胜-阿伟 阅读(416) 评论(0) 推荐(0) 编辑
解决MySQL CPU占用100%的经验总结 转
摘要:解决MySQL CPU占用100%的经验总结 朋友主机 (Windows 2003 + IIS + PHP + MySQL) 近来 MySQL 服务进程 (MySQLd-nt.exe) CPU 占用率总为 100% 高居不下。此主机有10个左右的 database,分别给十个网站调用。据朋友测试,导致 MySQLd-nt.exe CPU 占用奇高的是网站A,一旦在 IIS 中将此网站停止服务,CPU 占用就降下来了。一启用,则马上上升。 MySQL CPU 占用 100% 的解决过程 今天早上仔细检查了一下。目前此网站的七日平均日 IP 为2000,PageView 为 3万左右。网站A... 阅读全文
posted @ 2012-06-08 09:52 武胜-阿伟 阅读(493) 评论(0) 推荐(0) 编辑
DataSet用法详细 转
摘要:DataSet用法详细一、特点介绍1、处理脱机数据,在多层应用程序中很有用。2、可以在任何时候查看DataSet中任意行的内容,允许修改查询结果的方法。3、处理分级数据4、缓存更改5、XML的完整性:DataSet对象和XML文档几乎是可互换的。二、使用介绍1、创建DataSet对象:DataSetds = new DataSet("DataSetName");2、查看调用SqlDataAdapter.Fill创建的结构da.Fill(ds,"Orders");DataTabletbl = ds.Table[0];foreach(DataColumnco 阅读全文
posted @ 2012-06-08 09:47 武胜-阿伟 阅读(50085) 评论(2) 推荐(8) 编辑
AppConfigHelper
摘要:using System;using System.Collections.Generic;using System.Configuration;using System.Text;using log4net;namespace xt { public class AppConfigHelper { private static ILog log = LogManager.GetLogger(typeof (AppConfigHelper)); public static int? Get(string key, int? defaultValue) { string s = Configu. 阅读全文
posted @ 2012-06-06 18:40 武胜-阿伟 阅读(473) 评论(0) 推荐(0) 编辑

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

点击右上角即可分享
微信分享提示