08 2011 档案

摘要:from:http://blog.csdn.net/camel_flying/article/details/6056910一、长连接与短连接:长连接:client方与server方先建立连接,连接建立后不断开,然后再进行报文发送和接收。这种方式下由于通讯连接一直存在。此种方式常用于P2P通信。短连接:Client方与server每进行一次报文收发交易时才进行通讯连接,交易完毕后立即断开连接。此方式常用于一点对多点通讯。C/S通信。二、长连接与短连接的操作过程:短连接的操作步骤是:建立连接——数据传输——关闭连接...建立连接——数据传输——关闭连接长连接的操作步骤是:建立连接——数据传输.. 阅读全文
posted @ 2011-08-31 20:45 94cool 阅读(268) 评论(0) 推荐(0) 编辑
摘要:public object DeCompress(string fileName) { object obj = null; try { using (Stream source = File.OpenRead(fileName)) { using (Stream destination = new MemoryStream()) { using (GZipStream input = new GZipStream(source, CompressionMode.Decompress, true)) { byte[] bytes = new byte[4096]; int n; while ( 阅读全文
posted @ 2011-08-30 09:41 94cool 阅读(243) 评论(0) 推荐(0) 编辑
摘要:获取valueforeach (Student ss in stu.Values){ MessageBox.Show(ss.Name.ToString()); } ***********************************************获取keyforeach (string key in stu.Keys) { MessageBox.Show(key);} }****************获取key、valueforeach (KeyValuePair<string, Class1> a in cl) { if (a.Key == s1.Name) Mes 阅读全文
posted @ 2011-08-24 09:49 94cool 阅读(5094) 评论(0) 推荐(0) 编辑
摘要:生成:<?xml version="1.0" encoding="utf-8"?><CategoryList><Category ID="01"><MainCategory>XML</MainCategory><Description>This is a list my XML articles.</Description><Active>true</Active></Category></CategoryLi 阅读全文
posted @ 2011-08-24 09:39 94cool 阅读(185) 评论(0) 推荐(0) 编辑
摘要:from:http://developer.51cto.com/art/200908/144623.htm这是一个C#安装服务和卸载服务的类,有兴趣可以看一下.usingSystem; usingSystem.Runtime.InteropServices; namespaceEAE.MyServiceInstaller { classServiceInstaller { #regionPrivateVariables privatestring_servicePath; privatestring_serviceName; privatestring_serviceDisplayName; 阅读全文
posted @ 2011-08-15 20:47 94cool 阅读(381) 评论(0) 推荐(0) 编辑
摘要:函数原型说明AbortSystemShutDown终止使用InitiatezSystemShutdown函数启动系统AccessCheck服务器应用程序用该函数来控制验证客户对某对象的访问权限AccessCheckAndAuditAlarm执行一个访问验证并产生相应的查核消息,或确定某客户过程是否具有必要的特权AddAccessAllowedAce把一个允许访问的访问控制项ACE添加到访问控制表ACL上,并允许访问指定的安全标识符SIDAddAccessDeniedAce向访问控制表添ACL加一个被拒绝的访问控制项ACEAddAce向一个指定的访问控制表ACL增加一个或多个访问控制项ACEAd 阅读全文
posted @ 2011-08-15 20:45 94cool 阅读(410) 评论(0) 推荐(0) 编辑
摘要:internal class HexMath { private const int CRC_LEN = 2; // Table of CRC values for high-order byte private readonly byte[] _auchCRCHi = new byte[] { 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41, 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81, 0x40, 0x00, 0 阅读全文
posted @ 2011-08-11 22:39 94cool 阅读(563) 评论(0) 推荐(0) 编辑
摘要:public static string DownLoadFile(string fileURL) { StreamReader rdr = null; FileStream wrtr = null; string localFileName = string.Empty; try { HttpWebRequest req = (HttpWebRequest)WebRequest.Create(fileURL); req.Method = "GET"; HttpWebResponse resp = (HttpWebResponse)req.GetResponse(); lo 阅读全文
posted @ 2011-08-11 06:38 94cool 阅读(251) 评论(0) 推荐(0) 编辑
摘要:在VNISEdit中 按快捷键 Ctrl +F11 在配置页面中正确配置 编译器 路径 和帮助路径 阅读全文
posted @ 2011-08-04 11:50 94cool 阅读(1289) 评论(0) 推荐(0) 编辑
摘要:publicintAddSale(SaleModelmodel){intid=0;stringquery="select@@identity";stringsqlText=string.Format("insertintoSale(SCount,SumMoney,SUser,SJoinTime,Hide)values('{0}','{1}','{2}','{3}',0)",model.SCount,model.SumMoney,model.SUser,model.SJoinTime);//L 阅读全文
posted @ 2011-08-04 09:27 94cool 阅读(327) 评论(0) 推荐(0) 编辑
摘要:改变数据源:reportViewer1.LocalReport.Refresh();应该改为this.reportViewer1.RefreshReport();1.建立一个winform文件,一个rdlc报表文件2.在解决方案资源管理器内,对项目点击鼠标右键,添加新建项内的数据集3.选择新建的数据集点击工具集,拖动一个TableAdapter控件进入,添加SQL代码(添加的代码最好和手动绑定的SQL代码列一样)4.在rdlc文件内拖入一个表控件,把数据集内的字段拖入表内5.在winform内添加一个ReportViewer和一个button控件6.在ReportViewer控件上选择创建的r 阅读全文
posted @ 2011-08-03 16:26 94cool 阅读(396) 评论(0) 推荐(0) 编辑
摘要:1:没有主键的情形: Select identity(int,1,1) as iid,* into #tmp from TableName Select * from #tmp Drop table #tmp2:有主键的情形: Select (Select sum(1) from TableName where KeyField <= a.KeyField) as iid,* from TableName a order by iid 阅读全文
posted @ 2011-08-03 11:45 94cool 阅读(235) 评论(0) 推荐(0) 编辑
摘要:1:select * from Sale where format(SJoinTime,'yyyy-MM-dd')>=#2011-07-03# and format(SJoinTime,'yyyy-MM-dd')<=#2011-08-03#2:select * from Sale where SJoinTime>=#2011-07-03 00:00:00# and format(SJoinTime,'yyyy-MM-dd')<#2011-08-04 00:00:00#第一条语句要对SJoinTime进行格式话,如果数据量大 阅读全文
posted @ 2011-08-03 09:23 94cool 阅读(147) 评论(0) 推荐(0) 编辑
摘要:var xmlhttp;var tick=60000;function headtick(){ window.setTimeout(headtick,tick); var url="/Ajax/CheckHeadTickToken.aspx"; if(window.ActiveXObject) { xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } else if(window.XMLHttpRequest) { xmlhttp = new XMLHttpRequest(); } xmlhttp.ope 阅读全文
posted @ 2011-08-02 15:17 94cool 阅读(1505) 评论(0) 推荐(0) 编辑
摘要:protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { if (Request.QueryString["filename"] != null && Request.QueryString["path"] != null) { string filename = Request.QueryString["filename"]; string path = Request.QueryString["path"] 阅读全文
posted @ 2011-08-02 14:09 94cool 阅读(239) 评论(0) 推荐(0) 编辑
摘要:from:http://www.cnblogs.com/wangxiaosmile/archive/2010/10/27/1773802.html1) RDLC报表所需的4个DLL文件提取 RDLC报表文件部 署在客户端若要正常工作,需4个dll文件,分别是:Microsoft.ReportViewer.Common.dll、Microsoft.ReportViewer.ProcessingObjectModel.dll、Microsoft.ReportViewer.WebForms.dll和Microsoft.ReportViewer.WinForms.dll。通常情况,只要开发人员引用了R 阅读全文
posted @ 2011-08-02 08:16 94cool 阅读(1906) 评论(0) 推荐(0) 编辑
摘要:会员表:tbl_member /regtime注册日期按天统计:存储过程:create proc sp_tjmember@type intasDECLARE @BDATE datetimeDECLARE @EDATE datetimeSET @EDATE=convert(varchar,getdate(),23)if @type=1beginSET @BDATE=convert(varchar(7),getdate(),120)+'-01'--当月endelsebeginSET @BDATE=convert(varchar,dateadd(day,-30,getdate()), 阅读全文
posted @ 2011-08-01 17:27 94cool 阅读(188) 评论(0) 推荐(0) 编辑
摘要:usingSystem;usingSystem.Data;usingSystem.Configuration;usingSystem.Collections;usingSystem.Web;usingSystem.Web.Security;usingSystem.Web.UI;usingSystem.Web.UI.WebControls;usingSystem.Web.UI.WebControls.WebParts;usingSystem.Web.UI.HtmlControls;usingSystem.Web.Script.Serialization;publicpartialclassDef 阅读全文
posted @ 2011-08-01 16:42 94cool 阅读(210) 评论(0) 推荐(0) 编辑
摘要:防拷贝代码(加入BODY中即可,防止右键和CTRL+A)<bodyleftmargin=0topmargin=0oncontextmenu='returnfalse'ondragstart='returnfalse'onselectstart='returnfalse'onselect='document.selection.empty()'oncopy='document.selection.empty()'onbeforecopy='returnfalse'onmouseup='d 阅读全文
posted @ 2011-08-01 16:38 94cool 阅读(287) 评论(0) 推荐(0) 编辑
摘要:Firefox(火狐浏览器) 调试js设置步骤1: 安装插件在Firefox(火狐浏览器) 的菜单栏目中点“工具”-》“附加组件”-》找到“Firebug”组件,进行安装。或是从网上下个 firebug-1.2.0-fx.xpi 直接拖拽到 “附加组件” 的框内,即可安装。步骤2:呼出插件点击 右下角的那个爬虫标志 即可呼出Firebug 步骤3: 调试在 “DOM”里选中要调试的位置。并加上断点,即可调试 阅读全文
posted @ 2011-08-01 16:34 94cool 阅读(639) 评论(0) 推荐(0) 编辑
摘要:只要把 目录和文件的 的 “安全” 里面添加一个“Everyone” 用户即可。 阅读全文
posted @ 2011-08-01 16:33 94cool 阅读(268) 评论(0) 推荐(0) 编辑
摘要:from:http://blog.csdn.net/sgear/article/details/3521492这个编辑器是UTF-8编码的,如果你的网站整个是gb2312的,在打开页面时总出现“文本内容中发现无效字符“解决办法只有一种因为cuteEditor本身不能设置编码所以 web.config中编码方式改为UTF-8,<globalization responseHeaderEncoding="utf-8" fileEncoding="utf-8" requestEncoding="utf-8" responseEncod 阅读全文
posted @ 2011-08-01 16:32 94cool 阅读(181) 评论(0) 推荐(0) 编辑
摘要:from:http://blog.csdn.net/sgear/article/details/3596119CuteEditor 去除 样式 css 的问题CuteEditor 6.2 版本前默认是不对验证并去除的。在CuteEditor 6.2 版本默认是去掉<link href=".index.css" rel="stylesheet" type="text/css" /><style type="text/css">标签的解决办法:设置如下属性EnableStripLinkTagsC 阅读全文
posted @ 2011-08-01 16:31 94cool 阅读(197) 评论(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
点击右上角即可分享
微信分享提示