上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 14 下一页
摘要: 测试使用两个xml文件。文件1.XML内容如下: <?xmlversion="1.0"encoding="ISO-8859-1"?><bookstore><book><titlelang="eng">HarryPotter</title><price>29.99</price><book><titlelang="eng">HarryPotter</title><price>29.99& 阅读全文
posted @ 2010-12-17 18:06 再快一点 阅读(306) 评论(0) 推荐(0) 编辑
摘要: static void Main(string[] args) { HttpWebResponse web = MySpider.GetResponse("http://localhost:1853/WebForm1.aspx"); DecompressGZip(web ); Console.ReadLine(); }public static MemoryStream DecompressGZip(HttpWebResponse res) {   //如果服务器使用了Transfer-Encoding:chunked缓冲输出,则只要服务器端Flush了,就会触发此方法,而不是等到服务器发送过 阅读全文
posted @ 2010-12-17 00:39 再快一点 阅读(3516) 评论(1) 推荐(0) 编辑
摘要: 在www.a.com下放SetCookie.ashx,内容如下:/// summary /// $codebehindclassname$ 的摘要说明 /// /summary [WebService(Namespace = "http://tempuri.org/")] [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] public class SetCookie : IHttpHandler { public void ProcessRequest(HttpContext context) { context 阅读全文
posted @ 2010-12-16 14:04 再快一点 阅读(1349) 评论(4) 推荐(0) 编辑
摘要: 传统方法如下:protected override void Render(HtmlTextWriter writer){string content = string.Empty; StringWriter stringWriter = new StringWriter(); HtmlTextWriter htmlWriter = new HtmlTextWriter(stringWriter); try { // 将当前页面的内容呈现到临时的 HtmlTextWriter 对象中 base.Render(htmlWriter); htmlWriter.Close(); // 得到当前页面 阅读全文
posted @ 2010-12-15 14:56 再快一点 阅读(8993) 评论(5) 推荐(4) 编辑
摘要: function Exec(funcName, arr, byResult) { if (byResult) { if (typeof funcName == "string") { if (window[funcName]) { //如果返回false或者没用返回值,则继续执行一次,知道返回true if (!window[funcName](arr)) { window.setTimeout(function() { Exec(funcName, arr, true) }, _interval); } } else { window.setTimeout(function() { Exec 阅读全文
posted @ 2010-12-01 12:08 再快一点 阅读(240) 评论(0) 推荐(0) 编辑
摘要: test.html如下:!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"htmlhead id="head" meta http-equiv="Content-Type" content="text/html; charset=utf-8" / titletest/title style type='text/css' img { border: 1px solid red; d 阅读全文
posted @ 2010-11-30 16:27 再快一点 阅读(598) 评论(0) 推荐(0) 编辑
摘要: 最近发现以前写的下面两个方法都有错误,default(string) 是null ,null is string 返回falsestatic class Extend { const string def = "dd"; public static T GetValue<T>(this DataRow dr, string name) { try { if (dr[name] == DBNull.Value) { object o = def; return (T)o; } else { return (T)dr[name]; } } catch (Argume 阅读全文
posted @ 2010-11-25 20:36 再快一点 阅读(351) 评论(1) 推荐(0) 编辑
摘要: create table products( pid int primary key, [no] varchar(100) unique not null, pname varchar(100), shijian timestamp)insert products select 1,'pro1','张三'insert products select 2,'pro2','李四'insert products select 3,'pro3','王五'insert products select 4,'pro4','赵六'insert products select 5,'pro5','楚七'ins 阅读全文
posted @ 2010-11-24 16:59 再快一点 阅读(263) 评论(0) 推荐(0) 编辑
摘要: main.cpp源码如下:#includeiostream/*如果没用extern "C"包含#include "My.h",编译器会报错*//*如果不用extern "C"包含#include "My.h",将My.c的后缀名改为cpp(My.cpp)也能编译成功*/ //extern "C"//{ #include "My.h"//}void main(){ Print();}My.h源码如下://如果在此处声明为extern "C" void Print(); 那么在main.cpp中也不需要用extern "C"包含#include "My.h"extern void Print 阅读全文
posted @ 2010-11-24 09:58 再快一点 阅读(347) 评论(0) 推荐(0) 编辑
摘要: !DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"htmlhead id="head"meta http-equiv="Content-Type" content="text/html; charset=utf-8" /title向上下左右不间断无缝滚动图片的效果(兼容火狐和IE)/titlestyle type='text/css' img{border:1px solid re 阅读全文
posted @ 2010-11-22 20:49 再快一点 阅读(1509) 评论(0) 推荐(0) 编辑
上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 14 下一页