<?xml version="1.0" encoding="utf-8"?>
<feed xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xml:lang="en-us" xmlns="http://www.w3.org/2005/Atom">
  <title>Hubro.net</title>
  <link rel="alternate" type="text/html" href="http://www.hubro.net/" />
  <link rel="self" href="http://www.hubro.net/SyndicationService.asmx/GetAtom" />
  <icon>favicon.ico</icon>
  <updated>2009-10-16T15:13:10.21875+08:00</updated>
  <author>
    <name>Hubro.net</name>
  </author>
  <subtitle />
  <id>http://www.hubro.net/</id>
  <generator uri="http://www.dasblog.net" version="2.0.7180.0">DasBlog</generator>
  <entry>
    <title>动态加载JS方法</title>
    <link rel="alternate" type="text/html" href="http://www.hubro.net/2009/10/16/%e5%8a%a8%e6%80%81%e5%8a%a0%e8%bd%bdJS%e6%96%b9%e6%b3%95.aspx" />
    <id>http://www.hubro.net/PermaLink,guid,21a31ea1-8b13-46c9-ac2e-4ba81fd2545a.aspx</id>
    <published>2009-10-16T15:13:10.21875+08:00</published>
    <updated>2009-10-16T15:13:10.21875+08:00</updated>
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <pre>
          <span style="FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">
            <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">var</span> sHTML=<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"&lt;input
type=button onclick="</span><span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">+</span><span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"go2()"</span><span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">+</span><span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"
value='Click Me'&gt;&lt;BR&gt;"</span><span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">var</span> sScript='&lt;SCRIPT
DEFER&gt;' sScript <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span> sScript <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">+</span> '<span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">function</span> go2(){
alert(<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"Hello
from inserted script."</span>) }' sScript <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">=</span> sScript <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">+</span> '&lt;/script' <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">+</span> '&gt;'; <span style="FONT-SIZE: 11px; COLOR: blue; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">var</span> ScriptDiv=document.getElementById(<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"ScriptDiv"</span>);
alert(ScriptDiv) ScriptDiv.insertAdjacentHTML(<span style="FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4">"afterBegin"</span>,sHTML <span style="FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent">+</span> sScript);</span>
        </pre>
        <img width="0" height="0" src="http://www.hubro.net/aggbug.ashx?id=21a31ea1-8b13-46c9-ac2e-4ba81fd2545a" />
      </div>
    </content>
  </entry>
  <entry>
    <title>读多个版面也不是不可能</title>
    <link rel="alternate" type="text/html" href="http://www.hubro.net/2009/09/24/%e8%af%bb%e5%a4%9a%e4%b8%aa%e7%89%88%e9%9d%a2%e4%b9%9f%e4%b8%8d%e6%98%af%e4%b8%8d%e5%8f%af%e8%83%bd.aspx" />
    <id>http://www.hubro.net/PermaLink,guid,1da98cb1-b0d7-428d-9e22-8c0ee842e1da.aspx</id>
    <published>2009-09-24T22:37:17.3125+08:00</published>
    <updated>2009-09-24T22:37:17.3125+08:00</updated>
    <category term="小程序" label="小程序" scheme="http://www.hubro.net/CategoryView,category,%e5%b0%8f%e7%a8%8b%e5%ba%8f.aspx" />
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
        </p>
        <p>
一般论坛多个版面代码基本上也是一样的,放在一起又有何不可
</p>
        <p>
          <img src="http://www.hubro.net/content/binary/42342342.jpg" border="0" />
        </p>
        <p>
          <img src="http://www.hubro.net/content/binary/23242143.jpg" border="0" />
        </p>
        <img width="0" height="0" src="http://www.hubro.net/aggbug.ashx?id=1da98cb1-b0d7-428d-9e22-8c0ee842e1da" />
      </div>
    </content>
  </entry>
  <entry>
    <title>更名为ForumReader(论坛阅读器)</title>
    <link rel="alternate" type="text/html" href="http://www.hubro.net/2009/06/19/%e6%9b%b4%e5%90%8d%e4%b8%baForumReader%e8%ae%ba%e5%9d%9b%e9%98%85%e8%af%bb%e5%99%a8.aspx" />
    <id>http://www.hubro.net/PermaLink,guid,a4d10e1b-eefb-4c3e-9af6-7e5db17d696e.aspx</id>
    <published>2009-06-19T23:02:01.4375+08:00</published>
    <updated>2009-06-19T23:02:01.4375+08:00</updated>
    <category term="小程序" label="小程序" scheme="http://www.hubro.net/CategoryView,category,%e5%b0%8f%e7%a8%8b%e5%ba%8f.aspx" />
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
断断续续修改,最后结果如下
</p>
        <ul>
          <li>
列表不再是一个了,可以同时多个</li>
          <li>
修改了事件委托,TAB加上了状态图标,GIF怎么不动?</li>
          <li>
针对CSDN的贴子回复增加了IFRAM读取,能在CSDN回贴了</li>
          <li>
可以重复登录了,针对的是登录页有登录判断过的论坛</li>
          <li>
程序集名改为ForumReader</li>
          <li>
增加了一个说明<a href="http://www.hubro.net/ForumReader">http://www.hubro.net/ForumReader</a></li>
        </ul>
        <p>
          <img src="http://www.hubro.net/ForumReader/list.jpg" />
        </p>
        <img width="0" height="0" src="http://www.hubro.net/aggbug.ashx?id=a4d10e1b-eefb-4c3e-9af6-7e5db17d696e" />
      </div>
    </content>
  </entry>
  <entry>
    <title>集合编辑器</title>
    <link rel="alternate" type="text/html" href="http://www.hubro.net/2009/04/30/%e9%9b%86%e5%90%88%e7%bc%96%e8%be%91%e5%99%a8.aspx" />
    <id>http://www.hubro.net/PermaLink,guid,8f16e406-cfff-4731-b1a1-cb950793678a.aspx</id>
    <published>2009-04-30T21:38:58.375+08:00</published>
    <updated>2009-06-19T13:53:28.65625+08:00</updated>
    <category term="小程序" label="小程序" scheme="http://www.hubro.net/CategoryView,category,%e5%b0%8f%e7%a8%8b%e5%ba%8f.aspx" />
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
在.NET的属性编辑器PropertyGrid里,如果这个属性是一个集合,那么,.NET会给你一个集合编辑器窗口,很好用的东西,但是,这个东西不是继承Form或UserControl,没法像控件一样拿出来用,而是作为属性的注解,代理生成的窗体,具体情况没仔细看
</p>
        <p>
          <img src="http://www.hubro.net/content/binary/PropertyGrid.gif" border="0" />
        </p>
        <p>
搜了搜,找不到这样的控件,自已写个,原理也简单,关键是这个泛型集合赋值取值问题
</p>
        <p>
集合采用ILIST传入传出,类的属性加上和用ProPertyGrid一样的注解,基本上实现了所需要的功能
</p>
        <p>
最终效果
</p>
        <img src="http://www.hubro.net/content/binary/PropertyGridControl.gif" />
        <p>
具体实例在这里
</p>
        <a href="http://www.hubro.net/content/binary/WebBrowse.zip">WebBrowse.zip</a>
        <img width="0" height="0" src="http://www.hubro.net/aggbug.ashx?id=8f16e406-cfff-4731-b1a1-cb950793678a" />
      </div>
    </content>
  </entry>
  <entry>
    <title>HTTPREQUEST丢失COOKIE的问题</title>
    <link rel="alternate" type="text/html" href="http://www.hubro.net/2009/04/26/HTTPREQUEST%e4%b8%a2%e5%a4%b1COOKIE%e7%9a%84%e9%97%ae%e9%a2%98.aspx" />
    <id>http://www.hubro.net/PermaLink,guid,ec5cd117-aa62-4425-a52e-77271f32b4ed.aspx</id>
    <published>2009-04-26T21:39:45.859375+08:00</published>
    <updated>2009-04-26T21:39:45.859375+08:00</updated>
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
HTTPREQUEST请求时,如果响应的页面作了转向,那么,本该在第一次页面返回的COOKIE因为这次跳转丢失了,它可能认为是两次请求,返回了第二个页面的COOKIE,多数情况我们不关心它是否跳转,只需取得结果就行
</p>
        <p>
HTTPREQUEST只有一个属性和重定向有关AllowAutoRedirect,是否自动转向,默认是TRUE,设为FALSE,它就不会自动转向了,并且返回一个异常,返回的状态代码为302(转向),所以可以用这个来处理,设为不自动重定向,取得正常返回的COOKIE,完成后,要取得返回的结果,只能再请求一次它将要转向的URL了
</p>
        <img width="0" height="0" src="http://www.hubro.net/aggbug.ashx?id=ec5cd117-aa62-4425-a52e-77271f32b4ed" />
      </div>
    </content>
  </entry>
  <entry>
    <title>HttpRequest实现登录</title>
    <link rel="alternate" type="text/html" href="http://www.hubro.net/2009/04/12/HttpRequest%e5%ae%9e%e7%8e%b0%e7%99%bb%e5%bd%95.aspx" />
    <id>http://www.hubro.net/PermaLink,guid,72de94ad-dd22-4ad4-b9ea-709af1d5dd50.aspx</id>
    <published>2009-04-12T09:35:08.609+08:00</published>
    <updated>2009-04-12T09:35:40.828125+08:00</updated>
    <category term="小程序" label="小程序" scheme="http://www.hubro.net/CategoryView,category,%e5%b0%8f%e7%a8%8b%e5%ba%8f.aspx" />
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
          <a href="http://www.hubro.net/2009/02/27/%e8%87%aa%e5%88%b6%e8%ae%ba%e5%9d%9b%e6%96%87%e6%9c%ac%e6%b5%8f%e8%a7%88%e5%99%a8.aspx">论坛文本浏览器</a>加上了登录功能,能访问需要登录的地址,WINFORM登陆WEB其实是就是POST一系列参数到登陆地址,再取到返回的COOKIE
</p>
        <p>
POST一个地址很简单,直接用HttpRequest请求就行了,加上一些参数,普通的基于HTTP处理的页面比如ASP,PHP直接POST过去就接收了,但ASPX基于事件的WEB就有点麻烦,ASPX在表单页会生成一个HIDDEN,__VIEWSTATE,里面记录了当前表单的一些信息,提交后会用这个对POST过去的信息验证,要到什么程度?试过好多次后发现,所有表单项都需要验证,这样看来,要POST到ASPX页就要读出这个页所有表单项的值了,在完成所有工作后发现,我的程序还是没有正确提交到ASPX页,仔细检查手动生成的GET参数发现,INPUT
TYPE=IMAGE的表单项会生成两个参数,IMAGE.X,IMAGE.Y,只有把这两个参数带上才能成功,并且,这个值也能乱写,保证有这个参数就行了,这个应该是表示坐标的,验证这个很无理
</p>
        <p>
多数登录有验证图片,读这个图片也有点麻烦,有的是用JS生成的HTTP代码加上图片,还好借助WEBBROWSE控件能返回经过浏览器处理的HTML代码
</p>
        <p>
完成了正确POST信息后就是处理返回的COOKIE了,原理也很简单,POST后,读取返回的COOKIE,下次请求时再附加上这个COOKIE,这个COOKIE能反复使用,为了能在下次不用再次点登录,把它序列化保存起来,下次请求时,附加上这个COOKIE
</p>
        <p>
到止,这个程序比较完美了,虽然是自已专用
</p>
        <img width="0" height="0" src="http://www.hubro.net/aggbug.ashx?id=72de94ad-dd22-4ad4-b9ea-709af1d5dd50" />
      </div>
    </content>
  </entry>
  <entry>
    <title>自制论坛文本浏览器</title>
    <link rel="alternate" type="text/html" href="http://www.hubro.net/2009/02/27/%e8%87%aa%e5%88%b6%e8%ae%ba%e5%9d%9b%e6%96%87%e6%9c%ac%e6%b5%8f%e8%a7%88%e5%99%a8.aspx" />
    <id>http://www.hubro.net/PermaLink,guid,a5a7bba6-35ed-49b1-95f7-da80876c6ef5.aspx</id>
    <published>2009-02-27T15:26:53.703+08:00</published>
    <updated>2009-06-19T13:53:52.84375+08:00</updated>
    <category term="小程序" label="小程序" scheme="http://www.hubro.net/CategoryView,category,%e5%b0%8f%e7%a8%8b%e5%ba%8f.aspx" />
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
现在论坛花里胡哨,上班时间看不方便,咋把它整成黑白的
</p>
        <p>
写了一个小程序,从论坛匹配出贴子列表,再按链接打开贴子,贴子也经过处理,去掉样式,图片,背景色,文字颜色 
</p>
        <p>
显示的贴子
</p>
        <p>
[img,600]http://www.hubro.net/content/binary/pic1.jpg[/img] 
</p>
        <p>
读出来的列表
</p>
        <p>
[img,600]http://www.hubro.net/content/binary/pic2.jpg[/img] 
</p>
        <p>
字段和匹配设置
</p>
        <p>
[img,600]http://www.hubro.net/content/binary/pic3.jpg[/img]
</p>
        <p>
增加了多配置,字段编辑 
</p>
        <p>
[img]http://www.hubro.net/content/binary/pic4.jpg[/img] 
</p>
        <p>
运行环境,.NET2.0
</p>
        <a href="http://www.hubro.net/content/binary/WebBrowse.zip">WebBrowse.zip (26.95 KB)</a>
        <img width="0" height="0" src="http://www.hubro.net/aggbug.ashx?id=a5a7bba6-35ed-49b1-95f7-da80876c6ef5" />
      </div>
    </content>
  </entry>
  <entry>
    <title>正则测试工具</title>
    <link rel="alternate" type="text/html" href="http://www.hubro.net/2008/09/11/%e6%ad%a3%e5%88%99%e6%b5%8b%e8%af%95%e5%b7%a5%e5%85%b7.aspx" />
    <id>http://www.hubro.net/PermaLink,guid,ab811eff-7de5-4324-a121-f9926ae500ff.aspx</id>
    <published>2008-09-11T15:46:18.609+08:00</published>
    <updated>2008-09-13T01:16:44.875+08:00</updated>
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
能把里面的匹配项用不同颜色表示出来,效果如下图
</p>
        <p>
[img,600]/content/binary/regexp_01.jpg[/img]
</p>
        <p>
地址
</p>
        <p>
          <a href="http://www.hubro.net/regexp.aspx">http://www.hubro.net/regexp.aspx</a>
        </p>
        <img width="0" height="0" src="http://www.hubro.net/aggbug.ashx?id=ab811eff-7de5-4324-a121-f9926ae500ff" />
      </div>
    </content>
  </entry>
  <entry>
    <title>我为宁者馨。宁为我者爱。人博者为泽。人静者为仪。</title>
    <link rel="alternate" type="text/html" href="http://www.hubro.net/2008/07/13/%e6%88%91%e4%b8%ba%e5%ae%81%e8%80%85%e9%a6%a8%e5%ae%81%e4%b8%ba%e6%88%91%e8%80%85%e7%88%b1%e4%ba%ba%e5%8d%9a%e8%80%85%e4%b8%ba%e6%b3%bd%e4%ba%ba%e9%9d%99%e8%80%85%e4%b8%ba%e4%bb%aa.aspx" />
    <id>http://www.hubro.net/PermaLink,guid,26d60cbc-d7be-4a82-a389-d8710fc7136d.aspx</id>
    <published>2008-07-13T17:23:21.375+08:00</published>
    <updated>2008-07-13T17:23:21.375+08:00</updated>
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
我为宁者馨。宁为我者爱。人博者为泽。人静者为仪。
</p>
        <img width="0" height="0" src="http://www.hubro.net/aggbug.ashx?id=26d60cbc-d7be-4a82-a389-d8710fc7136d" />
      </div>
    </content>
  </entry>
  <entry>
    <title>五笔编码查询</title>
    <link rel="alternate" type="text/html" href="http://www.hubro.net/2008/06/18/%e4%ba%94%e7%ac%94%e7%bc%96%e7%a0%81%e6%9f%a5%e8%af%a2.aspx" />
    <id>http://www.hubro.net/PermaLink,guid,9b542303-b0dd-46ec-b94b-82f213b641d6.aspx</id>
    <published>2008-06-18T17:05:50.078125+08:00</published>
    <updated>2008-06-18T17:05:50.078125+08:00</updated>
    <content type="xhtml">
      <div xmlns="http://www.w3.org/1999/xhtml">
        <p>
        </p>
        <p>
没有找到好用的五笔编码查询工具,自已写个!-_
</p>
        <p>
版本为86版编码,只找到了一个单字的库,没法准确查两字词组,运行环境.NET2.0
</p>
        <p>
          <img src="http://www.hubro.net/content/binary/wbcx.jpg" border="0" />
        </p>
        <p>
          <a href="http://www.hubro.net/content/binary/WBSC.zip">WBSC.zip (398.92 KB)</a>
        </p>
        <img width="0" height="0" src="http://www.hubro.net/aggbug.ashx?id=9b542303-b0dd-46ec-b94b-82f213b641d6" />
      </div>
    </content>
  </entry>
</feed>