在北京举行的2006年中国互联网大会(网际网路大会)结束时发表了一份2006年中国博客调查报告,其中有几个数字 […]
英特尔的80颗浮点运算核心处理器
英特尔在2006年秋季IDF讲的内含80颗浮点运算核心的处理器,目前已经有原型机,并且以3.16Ghz的速度运 […]
SLE(Simple List Extensions)
SLE(Simple List Extensions)是微软RSS Team提出的一项xml扩充格式,可以在r […]
十个Blog应常更新的理由
十个Blog应常更新的理由 把自己的blog定位成多样化个人媒体,碰到度假或出差、生病,我自己的会采取预先打好 […]
微软在Vista的反盗版新机制与企业大量授权的变革
其实微软(Microsoft)在新作业系统Vista与其他未来软体要採用的反盗版新机制软体保护平台(Softw […]
反DRM运动与DRM的中文翻译
应用在多媒体与数位文本上的数位权利管理(Digital Rights Management;DRM),自由软体 […]
微软的免费网页空间服务OfficeLiveBasic
微软的Office Live Basic免费网页空间服务开跑一小段时间了,有兴趣的人可以买一个网域名称,试试看 […]
解析Atlas—微软的Ajax工具包
微软已经在进行一个版本Visual Stuido 的研发,其中一个重要的研究方向就是通过Ajax风格的编程在浏 […]
对DataGrid操作大全和精华
1、DataGrid动态模板列更新数据并且分页的例子 <a href=”http://www […]
如何设置增大IIS6的当前链接数
Question: I'm considering building a realtime ASP.N […]
关于session的详细解释
一、术语session 在我的经验里,session这个词被滥用的程度大概仅次于transaction,更 […]
用XMLHTTP Post/Get HTML页面时的中文乱码问题之完全Script解决方案
以前我曾经贴过一篇用XMLHTTP Post Form 的帖子,那里的代码中我Post E文的Value毫无问 […]
采集原理—采集技术篇—XMLHTTP
最近一段时间,采集很热门,从新闻小偷,到音乐小偷,到新闻采集,Flash采集,都有他的踪影,现在还有很多的人对 […]
献给学习XMLHTTP的朋友
今天看了chinahuman 的《用asp自动解析网页中的图片地址,并将其保存到本地服务器》,于是优化了这个程 […]
用XMLHTTP很好的一个例子
进入www.ting88.com的网站,把歌手专辑页面的URL复制到文本框中再提交就可以得到歌曲的下载路径,如 […]
XMLHTTP抓取远程数据的后期处理
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 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 |
<% hehe = Hello("http://mmsg.qq.com/cgi-bin/gddylist?Type=13&Sort=1&Page=3", "<html>", "</html>", ".*(<td width=""35%"" bgcolor=""#[dABCDE]{6}"">(.*)</td>)[. ]*", "<font style=""font-size:9pt;"" color=blue>$2</font><br>") response.Write hehe Function Hello(strUrl, strStart, strEnd, patrn, replStr) Str = GetBody(strUrl) Str = MyMid(Str, strStart, strEnd) Str = ReplaceTest(patrn, replStr, Str) Hello = Str End Function Function MyMid(Str, strstart, strend) If strstart = "" Then i = 0 Else i = InStr(Str, strstart) End If If strend = "" Then j = Len(Str) Else j = InStr(i, Str, strend) End If MyMid = Mid(Str, i, j - i + 1) End Function Function ReplaceTest(patrn, replStr, str1) Dim regEx, match, matches Set regEx = New RegExp regEx.Pattern = patrn regEx.IgnoreCase = True regEx.Global = True Set matches = regEx.Execute(str1) For Each match in matches ReplaceTest = ReplaceTest?Ex.Replace(Match.Value, replStr) Next End Function Function GetBody(Url) Set objXML = createObject("Microsoft.XMLHTTP") With objXML .Open "Get", Url, False, "", "" .SEnd GetBody = .ResponseBody End With GetBody = BytesToBstr(GetBody, "GB2312") Set objXML = Nothing End Function Function BytesToBstr(strBody, CodeBase) Set objStream = Server.createObject("Adodb.Stream") With objStream .Type = 1 .Mode = 3 .Open .Write strBody .Position = 0 .Type = 2 .Charset = CodeBase BytesToBstr = .ReadText .Close End With Set objStream = Nothing End Function %> |
[crayon-686839da02cd48 […]
XMLHTTP批量抓取远程资料
可以在此基础上结合正则表达式做成更好的效果,希望大家能分享一下Xmlhttp的session共享技术 [cra […]
防采集而不防搜索引擎策略
从前面的我讲的采集原理大家可以看出,绝大多数采集程序都是靠分析规则来进行采集的,如分析分页文件名规则、分析页面 […]
防采集策略
目前防采集的方法有很多种,先介绍一下常见防采集策略方法和它的弊端及采集对策: 一、判断一个IP在一定时间内对本 […]
说采集就大家一起来聊采集吧
采集原理: 采集程序的主要步骤如下: 一、获取被采集的页面的内容 二、从获取代码中提取所有用的数据 一、获取被 […]
论坛E-mail验正的正则表达式升级
今天拿到了传说中有1G大的Gmai,确实很好用速度极快,没有了传统的收件夹,取了代之的是labels ,用户自 […]
C#开发点滴:常用函数,处理方法
<strong>1. 打开新的窗口并传送参数:</strong> 传送参数: resp […]
发布ActiveX
1、如果需要创建cab文件,首先需要Cabarc或者Makecab,它们随着Cabinet SDK的安装就有了 […]
解读C#中的规则表达式
多少年来,许多的编程语言和工具都包含对规则表达式的支持,.NET基础类库中包含有一个名字空间和一系列可以充分发 […]
收集了一些表现层应用的例子
页面加载效果一:
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 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 |
<script type="text/javascript">// <![CDATA[ /******************************************************** * ProgressBar class * @author null * @param width - width of progress bar * @param height - height of progress bar * @param fgColor - fgColor of progress bar * @param bgColor - bgColor of progress bar * @param borderColor - borderColor of progress bar the rule is the same border-color of CSS /********************************************************/ function ProgressBar(width,height,fgColor,bgColor,borderColor){ if(borderColor==undefined){ bgColor = "threedlightshadow"; fgColor = "highlight"; borderColor = "buttonshadow window window buttonshadow"; } else if(borderColor==undefined&&fgColor==undefined&&bgColor==undefined){ bgColor = "threedlightshadow"; fgColor = "highlight"; borderColor = "buttonshadow window window buttonshadow"; } percent = 0.0; //initialize to zero fontSize = Math.ceil(height/2)+1; font_bt = "<table width=100% height=100% cellpadding=0 cellspacing=0 style='font:bold "+fontSize+"px Arial;color:"+bgColor+";text-align:center;vertical-align:center;'> <tr> <td>"+parseInt(percent*100)+" %</td> </tr> </table>"; font_ft = " <table width=100% height=100% cellpadding=0 cellspacing=0 style='font:bold "+fontSize+"px Arial;color:"+fgColor+";text-align:center;vertical-align:center;'> <tr> <td>"+parseInt(percent*100)+" %</td> </tr> </table>"; squares = ""; for(var i=0;;i++){ var left = width-2-i*(height/2+1); //alert(left); if(left>=height/2+1){ squares += "<span style='background-color:"+fgColor+";width:"+height/2+"px;height:"+(height-2)+";margin-right:1px;'></span>"; } else if(left>=1){ squares += "<span style='background-color:"+fgColor+";width:"+left+"px;height:"+(height-2)+";margin:0px;'></span>"; } else break; } //position:absolute; str = "<span id=progress_bg style='width:"+width+"px;height:"+height+"px;background-color:"+bgColor+";border:1px solid;border-color:"+borderColor+"'>"; //"+fgColor+" #transparent str += " <span id=progress_fg style='position:absolute;width:100%;height:100%;clip:rect(0,"+parseInt(percent*100)+"%,100%,0);background-color:"+fgColor+";font-size:0px;line-height:0px;'>"; str += squares; str += " </span>"; str += " <span id=progress_bt style='position:absolute;z-index:8;width:100%;height:100%;background-color:#transparent;clip:rect(0,"+parseInt(percent*100)+"%,100%,0);text-align:center;'>"; str += font_bt; str += " </span>"; str += " <span id=progress_ft style='position:absolute;z-index:9;width:100%;height:100%;background-color:#transparent;clip:rect(0,100%,100%,"+parseInt(percent*100)+"%);text-align:center;'>"; str += font_ft; str += " </span>"; str += "</span>"; document.write(str); function update(){ font_bt = " <table width=100% height=100% cellpadding=0 cellspacing=0 style='font:bold "+fontSize+"px Arial;color:"+bgColor+";text-align:center;vertical-align:center;'> <tr> <td>"+parseInt(percent*100)+" %</td> </tr> </table>"; font_ft = " <table width=100% height=100% cellpadding=0 cellspacing=0 style='font:bold "+fontSize+"px Arial;color:"+fgColor+";text-align:center;vertical-align:center;'> <tr> <td>"+parseInt(percent*100)+" %</td> </tr> </table>"; document.getElementById("progress_fg").style.clip='rect(0,'+parseInt(percent*100)+'%,100%,0)'; document.getElementById("progress_bt").style.clip='rect(0,'+parseInt(percent*100)+'%,100%,0)'; document.getElementById("progress_ft").style.clip='rect(0,100%,100%,'+parseInt(percent*100)+'%)'; document.getElementById("progress_bt").innerHTML=font_bt; document.getElementById("progress_ft").innerHTML=font_ft; } this.setModel=function(model){ percent = model; update(); } } /////////// Test for ProgressBar //////////// pb = new ProgressBar(153,18);//,"navy","#FFE4C4","#ff9900"); //document.write("Hello,ProgressBar"); //pb.setModel(50/100); function progress(v){ if (v >= 100){ pb.setModel(1.00); alert("Finished"); } else{ pb.setModel(v/100); window.setTimeout("progress("+(v+1)+")",Math.random()*Math.random()*500); } } progress(0); ///////////////// End Test /////////////////// // ]]></script> |
页面加载效果二 [cray […]