上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 16 下一页
  2013年3月24日
摘要: C#委托及事件在C#中,委托(delegate)是一种引用类型,在其他语言中,与委托最接近的是函数指针,但委托不仅存储对方法入口点的引用,还存储对用于调用方法的对象实例的引用。简单的讲委托(delegate)是一种类型安全的函数指针,首先,看下面的示例程序,在C++中使用函数指针。首先,存在两个方法:分别用于求两个数的最大值和最小值。int Max(int x,int y){return x>y?x:y;}int Min(int x,int y){return x<y?x:y;< font=""></y?x:y;<>}上面两个函数的 阅读全文
posted @ 2013-03-24 17:01 洞幺人生 阅读(364) 评论(0) 推荐(0)
  2012年12月6日
摘要: http://blog.163.com/red_guitar@126/blog/static/117206128201123845276/思路,在模态窗口页面放一个影藏的iframe。 首先,我们新建一个模态窗口,在模态窗口a.aspx Java代码 <!DOCTYPEhtmlPUBLIC"-//W3C//DTDXHTML1.0Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <htmlxmlns="http://www.w3 阅读全文
posted @ 2012-12-06 14:05 洞幺人生 阅读(462) 评论(0) 推荐(0)
  2012年11月28日
摘要: C#编写Windows服务程序图文教程 Windows Service这一块并不复杂,但是注意事项太多了,网上资料也很凌乱,偶尔自己写也会丢三落四的。所以本文也就产生了,本文不会写复杂的东西,完全以基础应用的需求来写,所以不会对Windows Service写很深入。本文介绍了如何用C#创建、安装、启动、监控、卸载简单的Windows Service 的内容步骤和注意事项。一、创建一个Windows Service1)创建Windows Service项目2)对Service重命名将Service1重命名为你服务名称,这里我们命名为ServiceTest。二、创建服务安装程序1)添加安装程序. 阅读全文
posted @ 2012-11-28 09:51 洞幺人生 阅读(283) 评论(0) 推荐(0)
  2012年11月14日
摘要: 在 OnClientClick 中使用eval添加参数 <asp:LinkButton ID="DeleteButton" runat="server" CausesValidation="False" CommandName="Delete"OnClientClick='return confirm("Delete the datasource <%# Eval("Title") %>?");'Text="delete" 阅读全文
posted @ 2012-11-14 14:16 洞幺人生 阅读(547) 评论(0) 推荐(0)
  2012年11月12日
摘要: 已解决:无法连接到WMI提供程序。你没有权限或者该服务器无访问···我想用sql server做一个数据库的作业,主要是想用一下asp做个网页。首先需要安装sql server,刚开始以为是件很简单的事,在我的visual studio 2008的安装包里就有sql server 2005 express edition 的安装软件,直接安装就行了,哪知道后来的过程那叫一个艰辛啊…… 先安装sql server 2005(是英文版的),安装过程非常顺利。然后我想进入Server Configuration Manager(配置管理器),点击之后就出现了下面这个警告 阅读全文
posted @ 2012-11-12 11:04 洞幺人生 阅读(537) 评论(0) 推荐(0)
  2012年10月11日
摘要: 试用vs打开一个决绝方案时出错,如下图所示: 产生这个的原因其实也很简单,细心的读者如果打开这个文件的话,从列表中选择打开方式的时候就会发现项目文件的打开方式已经不是visual studio了,而是Micrisoft visual studio version selector.因此,解决的办法就是用visual studio打开,并且选择始终用它打开项目文件,下次就不会这样了。那么是什么情况导致项目文件的打开关联被篡改了呢?原因可能有很多,恐怕最普遍的原因莫过于安装SQLServer 2005数据库了。而我也正是每次安装完SQLServer 2005数据库后,出现这种情况。解决方法:右键点 阅读全文
posted @ 2012-10-11 15:59 洞幺人生 阅读(204) 评论(0) 推荐(0)
  2012年9月26日
摘要: using System;using System.Collections.Generic;using System.Text;using System.Security.Cryptography;namespace md5{ class Program { static void Main(string[] args) { Console.WriteLine(UserMd5("8")); Console.WriteLine(GetMd5Str("8")); } /**//// <summary> /// MD5 16位加密 /// < 阅读全文
posted @ 2012-09-26 15:08 洞幺人生 阅读(669) 评论(0) 推荐(0)
摘要: <connectionStrings> <add name="connstr" connectionString="Data Source=192.168.253.11;Initial Catalog=STRFID;User ID=sa;Password=unionsun;" providerName="System.Data.SqlClient"/> </connectionStrings> <appSettings> <add key="connstr" v 阅读全文
posted @ 2012-09-26 14:51 洞幺人生 阅读(253) 评论(0) 推荐(0)
摘要: C#:using System.Security;using System.Security.Cryptography;using System.Security.Authentication;static string UserMd5(string str) { string pwd = ""; MD5 md5 = MD5.Create();//实例化一个md5对像 // 加密后是一个字节类型的数组,这里要注意编码UTF8/Unicode等的选择 byte[] s = md5.ComputeHash(Encoding.UTF8.GetBytes(str)); // 通过使 阅读全文
posted @ 2012-09-26 14:48 洞幺人生 阅读(290) 评论(0) 推荐(0)
  2012年8月15日
摘要: 1.修改字段类型及长度alter table dt_origin modify (A varchar2(200));2.删除字段alter table table_name drop column col_name;3.添加字段alter table table_name add col_name datatype;4.创建表create table table_name( colname1 datatype [not null] [primary key],colname2 datatype , colname3 datatype) 阅读全文
posted @ 2012-08-15 16:01 洞幺人生 阅读(140) 评论(0) 推荐(0)
  2012年8月8日
摘要: public static System.Data.DataSet ExcelConnection(string filepath, string exName, string tableName, out string errmsg) { errmsg = ""; string strCon = ""; if (exName == ".xls") strCon = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + filepath + ";Extende 阅读全文
posted @ 2012-08-08 16:42 洞幺人生 阅读(465) 评论(0) 推荐(0)
  2012年5月29日
摘要: 今天早上我发现一个问题,当一个网页的地址最后面是一个#时(比如:http://www.baidu.com/go.asp#),执行:window.location.replace(window.location.href); 浏览器不刷新页面。经过测试: window.location.href = window.location.href; 浏览器也不刷新页面。经过测试:window.location.reload(); 浏览器会刷新页面。以前经过一些测试发现 window.location.replace(window.location.href); 比window.location.rel 阅读全文
posted @ 2012-05-29 16:29 洞幺人生 阅读(1806) 评论(0) 推荐(0)
  2012年4月23日
摘要: HTML:<script type="text/javascript"> var oldrow=null; var currentcolor=null; var oldcolor=null; function selectx(row) { if(oldrow!=null) { oldrow.style.backgroundColor=oldcolor; } row.style.backgroundColor='#99ccff'; oldrow=row; oldcolor = currentcolor; } </script> .cs: 阅读全文
posted @ 2012-04-23 10:26 洞幺人生 阅读(559) 评论(0) 推荐(0)
  2012年4月19日
摘要: protectedvoidbtnImport_Click(objectsender,EventArgse){if(FileUpload1.HasFile==false)//HasFile用来检查FileUpload是否有指定文件{Response.Write("<script>alert('请您选择Excel文件')</script>");return;//当无文件时,返回}stringIsXls=System.IO.Path.GetExtension(FileUpload1.FileName).ToString().ToLower( 阅读全文
posted @ 2012-04-19 17:32 洞幺人生 阅读(306) 评论(0) 推荐(0)
  2012年4月10日
摘要: location=location; location.assign(location) ; document.execCommand('Refresh');//最好用的一种 window.navigate(location); location.replace(location); document.URL=location.href; 阅读全文
posted @ 2012-04-10 17:06 洞幺人生 阅读(204) 评论(0) 推荐(0)
上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 16 下一页