摘要: private void outPutExcel(System.Data.DataTable dt, System.Data.DataTable dt2) { if (dt == null) return; Excel.Application xlApp = new Excel.Application(); if (xlApp == null) { //clsLog.m_CreateErrorLog("无法创建Excel对象,可能计算机未安装Excel", "",... 阅读全文
posted @ 2013-09-22 17:37 zp_Alex 阅读(328) 评论(0) 推荐(1) 编辑
摘要: C#获取网页的验证码,并且显示在 picbox控件上view plaincopy to clipboardHttpWebRequest request = (HttpWebRequest)WebRequest.Create("http://127.0.0.1/pic/Default.aspx");request.Timeout = 20000;request.ServicePoint.ConnectionLimit = 100;request.ReadWriteTimeout = 30000;request.Method ="GET";HttpWebRe 阅读全文
posted @ 2013-08-04 17:56 zp_Alex 阅读(421) 评论(0) 推荐(0) 编辑
摘要: 1.有url获取到网页源代码: 1 using System.Web; 2 using System.IO; 3 using System.Net; 4 private void GetHtmlinfo(string PageUrl) 5 { 6 WebRequest request = WebRequest.Create(PageUrl); 7 WebResponse response = request.GetResponse(); 8 S... 阅读全文
posted @ 2013-08-04 17:53 zp_Alex 阅读(3454) 评论(0) 推荐(0) 编辑
摘要: HP大中华区总裁孙振耀退休感言 如果这篇文章分享给你了,你却没有读,继续走弯路的你不要怪我。 如果你看了这篇文章,只读了一半你就说没时间了,说明你已经是个“茫"人了。 如果你看完了,你觉得这篇文章只是讲讲大道理,说明你的人生阅历还不够,需要你把这篇文章珍藏,走出去碰几年壁,头破血流后再回来,再读,你就会感叹自己的年少无知。 如果你看完了,觉得很有道理,然后束之高阁,继续走进拥挤的地铁,依然用着自己昨日的观念来思考自己的未来,你的人生也将继续重复着昨日的状况。 如果你看完了,觉得那是一个过来人,对你的人生忠告,并且你也愿意用他告诉你的思想去指导自己今后的生活,对你来讲成功不是很难,难的 阅读全文
posted @ 2012-12-07 14:32 zp_Alex 阅读(3259) 评论(7) 推荐(8) 编辑
摘要: 获取多维数组的维数和行数1 int[,,] a =new int[10,11,12]; 2 Console.WriteLine(a.Length); // 1320 3 Console.WriteLine(a.GetLength(0)); // 10 4 Console.WriteLine(a.GetLength(1)); // 11 5 Console.WriteLine(a.GetLength(2)); // 12多维数组的声明:1 string[,] book_arr = new string[,] { { "English", "101" ... 阅读全文
posted @ 2012-10-24 17:59 zp_Alex 阅读(590) 评论(0) 推荐(0) 编辑
摘要: 1 private static XmlElement rootele; 2 private static XmlElement xmlele; 3 private static XmlNodeList nodelist; 4 private static XmlNode xmln; 5 private static void CreateNewXMLFile() 6 { 7 string[,] book_arr = new string[,] { { "English", "101... 阅读全文
posted @ 2012-10-24 17:55 zp_Alex 阅读(446) 评论(0) 推荐(0) 编辑
摘要: 1).(删除某一个指定的节点): 1 nodelist = xmldoc.SelectSingleNode("employees").ChildNodes; 2 foreach (XmlNode xn in nodelist) 3 { 4 //remove node by node's attribute 5 xmlele = (XmlElement)xn; 6 if (xmlele.GetAttribute("id") == ... 阅读全文
posted @ 2012-10-23 16:23 zp_Alex 阅读(4830) 评论(0) 推荐(0) 编辑
摘要: 已知XML文件如下(app.xml):<events> <title>Reading XML data!</title> <event> <date>sample date 1</date> <name>sample name 1</name> </event> <event> <date>sample date 2</date> <name>sample name 2</name> </event> <tes 阅读全文
posted @ 2012-10-19 22:39 zp_Alex 阅读(201) 评论(0) 推荐(0) 编辑
摘要: 所有 XML 元素都须有关闭标签在 HTML,经常会看到没有关闭标签的元素:<p>This is a paragraph<p>This is another paragraph在 XML 中,省略关闭标签是非法的。所有元素都必须有关闭标签:<p>This is a paragraph</p><p>This is another paragraph</p> 注释:您也许已经注意到 XML 声明没有关闭标签。这不是错误。声明不属于XML本身的组成部分。它不是 XML 元素,也不需要关闭标签。XML 标签对大小写敏感XML 元素 阅读全文
posted @ 2012-10-19 13:31 zp_Alex 阅读(261) 评论(0) 推荐(0) 编辑
摘要: IntroductionXML is everywhere. As a result, many of us find the need to work with XML and traditional text editors don't cut it. Some editors provide decent formatting (like Notepad++), but they don't provide a mechanism to examine the underlying data in the XML programmatically.PowerShell m 阅读全文
posted @ 2012-10-19 13:22 zp_Alex 阅读(327) 评论(0) 推荐(0) 编辑