标签为 搜索 的存档

这个问题已经困扰了很长时间了,一直没有着手去解决,今天加完班,抽时间仔细检查了下,在开机的时候打开任务管理器,发现是一个SYSTEM用户名的svchost.exe进程在开机的时候连续长时间的占用CPU(大约一分钟)资源。于是运行Process Explorer查看该svchost.exe进程的线程,其中一个ntdll.dll!rtlallocateheap+0x18c线程占用了99%的CPU资源,系统几乎拖不动了,而且在恢复正常以后还会时常占用99%的CPU资源。

于是baidu了一下这个ntdll.dll!rtlallocateheap+0x18c什么结果都没有返回,鄙视一下baidu。转到google搜索,找到了一些英文社区,其中大部分都是讨论在打开windows update页面的时候这个svchost.exe的线程会占用大量的CPU资源,导致系统运行缓慢。根据讨论的一些内容,基本上可以确认这个ntdll.dll!rtlallocateheap+0x18c的线程属于自动更新服务的一部分,于是运行services.msc找到自动个更新服务Automatic Updates将其禁用,开机就没有再出现过ntdll.dll!rtlallocateheap+0x18c线程占用大量CPU资源的问题,并且svchost.exe进程的内存占用率下降了约2/3,因此可以看出windows xp的自动更新所需要花费的资源是相当大的。

因为自动更新所下载的文件都是缓存在这个svchost.exe中的,因此随着自动更新的时间越长,这个进程所占用的内存资源越大(我曾经见过101MB的占用),直到更新完全下载完毕,并且安装完成,资源才会被释放。由于自动更新所需要的时间往往很长,在每次开机的时候自动更新会继续工作并且尝试连接到服务器进行断点续传,所以导致开机的时候svchost.exe

打开article.asp文件,搜索到

<!– TB Spam –>
<script type=”text/javascript”>
var tb_url_text = “<%=theCache.settings["baseURL"]+”trackback.asp?id=”+theArticle.id%>&key=<%=func.HTMLEncode(theCache.settings["trackbackcode"])%>”;
</script>
<!– TB Spam –>

在其上一行插入下面的搜索代码:

<!– Search Google Start –>
<center>
<form method=”get” action=”http://www.google.cn/custom” target=”google_window”>
<tr><td nowrap=”nowrap” valign=”top” align=”left” height=”32″>
<img src=”http://www.google.com/logos/Logo_25wht.gif” border=”0″ alt=”Google Search” align=”middle”></img>
<input type=”text” name=”q” value=”<%=func.HTMLEncode(theArticle.title)%>” class=”text search-field” style=”width: 68%” /></input>
<input type=”submit” name=”sa” value=”<%=lang["search"]%>” class=”button” /></input>
<input type=”hidden” name=”client” value=”pub-9928792648942112″></input>
<input type=”hidden” name=”forid” value=”1″></input>
<input type=”hidden” name=”hl” value=”zh-CN”></input>
<input type=hidden value=UTF-8 name=ie></input>
<input type=hidden value=UTF-8 name=oe></input>
<input type=hidden value=zh-CN name=hl></input></form>
</td></tr>
</form>
</center>
<!– Search Google End –>

<!– Search Baidu Start –>
<div align=”center”>
<form action=”http://www.baidu.com/baidu” target=”_blank”>
<img src=”http://img.baidu.com/search/img/baidulogo_clarity_80_29.gif” border=”0″ alt=”Baidu Search” align=”middle”></img>
<input type=”text” name=”word” value=”<%=func.HTMLEncode(theArticle.title)%>” class=”text search-field” style=”width: 68%” /></input>
<input type=”submit” name=”sa” value=”<%=lang["search"]%>” class=”button” /></input>
<input type=hidden name=”tn” value=sale925></input>
<input type=hidden value=UTF-8 name=ie></input>
<input type=hidden value=UTF-8 name=oe></input>
<input type=hidden value=zh-CN name=hl></input></form>
</div>
<!– Search Baidu End –>

保存后就可以实现我现在使用的效果!

google ADsense设置代码

都说可以通过google adsense挣钱,不知道真假,估计与网站的浏览量或流量有关系吧,至少我目前还达不到这种规模,不过还是可以先装上用用,也方便自己找东西吗?贴子设成隐藏的,给自己留个备用参考,也省得别人说我给自己做广告。

1、google adsense 搜索模块(AdSense for Search)
在页面的适当位置放置下面的代码即可实现google搜索功能.
[code]
<!-- Search Google -->
<form method="get" action="http://www.google.com/custom" target="google_window">
<table >
<tr><td nowrap="nowrap" valign="top" align="left" height="32">
<input type="text" name="q" size="15" maxlength="255" value="www.sale925.cn" ></input>
<input type="submit" name="sa" value="Google" class="button" ></input>
<input type="hidden" name="client" value="pub-9928792648942112"></input>
<input type="hidden" name="forid" value="1"></input>
<input type="hidden" name="channel" value="1752202669"></input>
<input type="hidden" name="ie" value="GB2312"></input>
<input type="hidden" name="oe" value="GB2312"></input>
<input type="hidden" name="cof" ></input>
<input type="hidden" name="hl" value="zh-CN"></input>
</td></tr></table>
</form>
<!-- Search Google -->
[/code]

2、google adsense的页面广告功能( AdSense for Content)
在你想加入广告的页面位置处放置下面的代码即可实现google广告功能.本广告的显示大小为468*60的格式。
[code]<script type="text/javascript"><!--
google_ad_client = "pub-9928792648942112";
google_ad_width = 468;
google_ad_height = 60;
google_ad_format = "468x60_as";
google_ad_type = "image";
google_ad_channel = "";
google_ui_features = "rc:10";
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
[/code]

记得在安装完这个版本之初,在发表日志的时候便发现首行的空格不起作用,这样排版很不方便,于是在网上找下下,从∽生活笔谈∽那里找到这解决的办法,很完美的方法,转贴如下:

✲ 首先打开 class/UBBcode.asp 搜索到:

// List

✲ 在其上一行插入:

str=str.replace(/\[space\]/ig,’  ’);

✲ 接着打开“edit.asp”搜索到:

“Insert Subscript” /></a>

✲ 替换成

“Insert Subscript” /></a> <a href=”javascript:space()”><img src=”<%=theCache.settings["imageFolder"]%>/ubbcode/bb_space.gif” alt=”Insert SBC case space” /></a>

✲ 最后打开 messageform.js 在最后面插入:

function space() {
var txtarea = document.inputform.message;
if (txtarea.createTextRange && txtarea.caretPos) {
var caretPos = txtarea.caretPos;
caretPos.text = caretPos.text.charAt(caretPos.text.length – 1) == ‘ ‘ ? ‘ ‘ : ”;
txtarea.focus();
} else {
txtarea.value += ”;
txtarea.focus();
}
}

✲ 还需要把下面的图放入相应“风格(styles)”的 images/ubbcode 文件夹内,注意保存的文件名称为:bb_space.gif
http://www.a-boss.com/blog/styles/coffee/images/ubbcode/bb_space.gif