<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Kernel2Heart技术交流</title>
	<atom:link href="http://www.kernel2heart.com/topics/technique/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.kernel2heart.com</link>
	<description>一个人的内心里,究竟隐藏了什么呢?</description>
	<lastBuildDate>Sun, 29 Aug 2010 13:31:57 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
<atom:link rel="hub" href="http://pubsubhubbub.appspot.com"/><atom:link rel="hub" href="http://superfeedr.com/hubbub"/>		<item>
		<title>C#获取本机CPU、内存信息类</title>
		<link>http://www.kernel2heart.com/2010/08/c-sharp-get-pc-cpu-memory-class/</link>
		<comments>http://www.kernel2heart.com/2010/08/c-sharp-get-pc-cpu-memory-class/#comments</comments>
		<pubDate>Thu, 26 Aug 2010 13:27:53 +0000</pubDate>
		<dc:creator>janxin</dc:creator>
				<category><![CDATA[技术交流]]></category>
		<category><![CDATA[C++]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.kernel2heart.com/2010/08/c-sharp-get-pc-cpu-memory-class/</guid>
		<description><![CDATA[代码写的很烂，多多包涵就是了，用起来感觉还可以，需要几个using： using System.Runtime.InteropServices; using System.Management; 其中System.Management需要手工添加，发布时，需要附带System.Management.dll。 public class SystemInfo &#123; &#160; &#91;StructLayout&#40;LayoutKind.Sequential&#41;&#93; private struct MEMORY_INFO &#123; public uint dwLength; public uint dwMemoryLoad; public uint dwTotalPhys; public uint dwAvailPhys; public uint dwTotalPageFile; public uint dwAvailPageFile; public uint dwTotalVirtual; public uint dwAvailVirtual; &#125; &#160; &#91;DllImport&#40;&#34;kernel32&#34;&#41;&#93; private static extern void GlobalMemoryStatus&#40;ref MEMORY_INFO meminfo&#41;; &#160; private int m_ProcessorCount = [...]]]></description>
			<content:encoded><![CDATA[<p>代码写的很烂，多多包涵就是了，用起来感觉还可以，需要几个using：</p>

<div class="wp_syntax"><div class="code"><pre class="csharp" style="font-family:monospace;"><span style="color: #0600FF;">using</span> <span style="color: #008080;">System.Runtime.InteropServices</span><span style="color: #008000;">;</span>
<span style="color: #0600FF;">using</span> <span style="color: #008080;">System.Management</span><span style="color: #008000;">;</span></pre></div></div>

<p>其中System.Management需要手工添加，发布时，需要附带System.Management.dll。</p>
<p><span id="more-461"></span></p>

<div class="wp_syntax"><div class="code"><pre class="csharp" style="font-family:monospace;">    <span style="color: #0600FF;">public</span> <span style="color: #FF0000;">class</span> SystemInfo
    <span style="color: #000000;">&#123;</span>
&nbsp;
        <span style="color: #000000;">&#91;</span>StructLayout<span style="color: #000000;">&#40;</span>LayoutKind.<span style="color: #0000FF;">Sequential</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#93;</span>
        <span style="color: #0600FF;">private</span> <span style="color: #FF0000;">struct</span> MEMORY_INFO
        <span style="color: #000000;">&#123;</span>
            <span style="color: #0600FF;">public</span> <span style="color: #FF0000;">uint</span> dwLength<span style="color: #008000;">;</span>
            <span style="color: #0600FF;">public</span> <span style="color: #FF0000;">uint</span> dwMemoryLoad<span style="color: #008000;">;</span>
            <span style="color: #0600FF;">public</span> <span style="color: #FF0000;">uint</span> dwTotalPhys<span style="color: #008000;">;</span>
            <span style="color: #0600FF;">public</span> <span style="color: #FF0000;">uint</span> dwAvailPhys<span style="color: #008000;">;</span>
            <span style="color: #0600FF;">public</span> <span style="color: #FF0000;">uint</span> dwTotalPageFile<span style="color: #008000;">;</span>
            <span style="color: #0600FF;">public</span> <span style="color: #FF0000;">uint</span> dwAvailPageFile<span style="color: #008000;">;</span>
            <span style="color: #0600FF;">public</span> <span style="color: #FF0000;">uint</span> dwTotalVirtual<span style="color: #008000;">;</span>
            <span style="color: #0600FF;">public</span> <span style="color: #FF0000;">uint</span> dwAvailVirtual<span style="color: #008000;">;</span>
        <span style="color: #000000;">&#125;</span>
&nbsp;
        <span style="color: #000000;">&#91;</span>DllImport<span style="color: #000000;">&#40;</span><span style="color: #666666;">&quot;kernel32&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#93;</span>
        <span style="color: #0600FF;">private</span> <span style="color: #0600FF;">static</span> <span style="color: #0600FF;">extern</span> <span style="color: #0600FF;">void</span> GlobalMemoryStatus<span style="color: #000000;">&#40;</span><span style="color: #0600FF;">ref</span>  MEMORY_INFO meminfo<span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span> 
&nbsp;
        <span style="color: #0600FF;">private</span> <span style="color: #FF0000;">int</span> m_ProcessorCount <span style="color: #008000;">=</span> <span style="color: #FF0000;">0</span><span style="color: #008000;">;</span>   <span style="color: #008080; font-style: italic;">//CPU个数</span>
        <span style="color: #0600FF;">private</span> PerformanceCounter pcCpuLoad<span style="color: #008000;">;</span>   <span style="color: #008080; font-style: italic;">//CPU计数器</span>
        <span style="color: #0600FF;">private</span> <span style="color: #FF0000;">long</span> m_PhysicalMemory <span style="color: #008000;">=</span> <span style="color: #FF0000;">0</span><span style="color: #008000;">;</span>   <span style="color: #008080; font-style: italic;">//物理内存</span>
&nbsp;
        <span style="color: #008080;">#region 构造函数</span>
        <span style="color: #0600FF;">public</span> SystemInfo<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>
        <span style="color: #000000;">&#123;</span>
            <span style="color: #008080; font-style: italic;">//初始化CPU计数器</span>
            pcCpuLoad <span style="color: #008000;">=</span> <span style="color: #008000;">new</span> PerformanceCounter<span style="color: #000000;">&#40;</span><span style="color: #666666;">&quot;Processor&quot;</span>, <span style="color: #666666;">&quot;% Processor Time&quot;</span>, <span style="color: #666666;">&quot;_Total&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
            pcCpuLoad.<span style="color: #0000FF;">MachineName</span> <span style="color: #008000;">=</span> <span style="color: #666666;">&quot;.&quot;</span><span style="color: #008000;">;</span>
            pcCpuLoad.<span style="color: #0000FF;">NextValue</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
&nbsp;
            <span style="color: #008080; font-style: italic;">//CPU个数</span>
            m_ProcessorCount <span style="color: #008000;">=</span> Environment.<span style="color: #0000FF;">ProcessorCount</span><span style="color: #008000;">;</span>
&nbsp;
            <span style="color: #008080; font-style: italic;">//获得物理内存</span>
            ManagementClass mc <span style="color: #008000;">=</span> <span style="color: #008000;">new</span> ManagementClass<span style="color: #000000;">&#40;</span><span style="color: #666666;">&quot;Win32_ComputerSystem&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
            ManagementObjectCollection moc <span style="color: #008000;">=</span> mc.<span style="color: #0000FF;">GetInstances</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
            <span style="color: #0600FF;">foreach</span> <span style="color: #000000;">&#40;</span>ManagementObject mo <span style="color: #0600FF;">in</span> moc<span style="color: #000000;">&#41;</span>
            <span style="color: #000000;">&#123;</span>
                <span style="color: #0600FF;">if</span> <span style="color: #000000;">&#40;</span>mo<span style="color: #000000;">&#91;</span><span style="color: #666666;">&quot;TotalPhysicalMemory&quot;</span><span style="color: #000000;">&#93;</span> <span style="color: #008000;">!=</span> <span style="color: #0600FF;">null</span><span style="color: #000000;">&#41;</span>
                <span style="color: #000000;">&#123;</span>
                    m_PhysicalMemory <span style="color: #008000;">=</span> <span style="color: #FF0000;">long</span>.<span style="color: #0000FF;">Parse</span><span style="color: #000000;">&#40;</span>mo<span style="color: #000000;">&#91;</span><span style="color: #666666;">&quot;TotalPhysicalMemory&quot;</span><span style="color: #000000;">&#93;</span>.<span style="color: #0000FF;">ToString</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
                <span style="color: #000000;">&#125;</span>
            <span style="color: #000000;">&#125;</span>
        <span style="color: #000000;">&#125;</span>
        <span style="color: #008080;">#endregion</span>
&nbsp;
        <span style="color: #008080;">#region CPU个数</span>
        <span style="color: #008080; font-style: italic;">///</span>
&nbsp;
        <span style="color: #008080; font-style: italic;">/// 获取CPU个数</span>
        <span style="color: #008080; font-style: italic;">/// </span>
&nbsp;
        <span style="color: #0600FF;">public</span> <span style="color: #FF0000;">int</span> ProcessorCount
        <span style="color: #000000;">&#123;</span>
            get
            <span style="color: #000000;">&#123;</span>
                <span style="color: #0600FF;">return</span> m_ProcessorCount<span style="color: #008000;">;</span>
            <span style="color: #000000;">&#125;</span>
        <span style="color: #000000;">&#125;</span>
        <span style="color: #008080;">#endregion</span>
&nbsp;
        <span style="color: #008080;">#region CPU占用率</span>
        <span style="color: #008080; font-style: italic;">///</span>
&nbsp;
        <span style="color: #008080; font-style: italic;">/// 获取CPU占用率</span>
        <span style="color: #008080; font-style: italic;">/// </span>
&nbsp;
        <span style="color: #0600FF;">public</span> <span style="color: #FF0000;">float</span> CpuLoad
        <span style="color: #000000;">&#123;</span>
            get
            <span style="color: #000000;">&#123;</span>
                <span style="color: #0600FF;">return</span> pcCpuLoad.<span style="color: #0000FF;">NextValue</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
            <span style="color: #000000;">&#125;</span>
        <span style="color: #000000;">&#125;</span>
        <span style="color: #008080;">#endregion</span>
&nbsp;
        <span style="color: #008080;">#region 可用内存</span>
        <span style="color: #008080; font-style: italic;">///</span>
&nbsp;
        <span style="color: #008080; font-style: italic;">/// 获取可用内存</span>
        <span style="color: #008080; font-style: italic;">/// </span>
&nbsp;
        <span style="color: #0600FF;">public</span> <span style="color: #FF0000;">long</span> MemoryAvailable
        <span style="color: #000000;">&#123;</span>
            get
            <span style="color: #000000;">&#123;</span>
                <span style="color: #FF0000;">long</span> availablebytes <span style="color: #008000;">=</span> <span style="color: #FF0000;">0</span><span style="color: #008000;">;</span>
                ManagementClass mos <span style="color: #008000;">=</span> <span style="color: #008000;">new</span> ManagementClass<span style="color: #000000;">&#40;</span><span style="color: #666666;">&quot;Win32_OperatingSystem&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
                <span style="color: #0600FF;">foreach</span> <span style="color: #000000;">&#40;</span>ManagementObject mo <span style="color: #0600FF;">in</span> mos.<span style="color: #0000FF;">GetInstances</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>
                <span style="color: #000000;">&#123;</span>
                    <span style="color: #0600FF;">if</span> <span style="color: #000000;">&#40;</span>mo<span style="color: #000000;">&#91;</span><span style="color: #666666;">&quot;FreePhysicalMemory&quot;</span><span style="color: #000000;">&#93;</span> <span style="color: #008000;">!=</span> <span style="color: #0600FF;">null</span><span style="color: #000000;">&#41;</span>
                    <span style="color: #000000;">&#123;</span>
                        availablebytes <span style="color: #008000;">=</span> <span style="color: #FF0000;">1024</span> <span style="color: #008000;">*</span> <span style="color: #FF0000;">long</span>.<span style="color: #0000FF;">Parse</span><span style="color: #000000;">&#40;</span>mo<span style="color: #000000;">&#91;</span><span style="color: #666666;">&quot;FreePhysicalMemory&quot;</span><span style="color: #000000;">&#93;</span>.<span style="color: #0000FF;">ToString</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
                    <span style="color: #000000;">&#125;</span>
                <span style="color: #000000;">&#125;</span>
                <span style="color: #0600FF;">return</span> <span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span>availablebytes <span style="color: #008000;">/</span> <span style="color: #FF0000;">1024</span><span style="color: #000000;">&#41;</span> <span style="color: #008000;">/</span> <span style="color: #FF0000;">1024</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
            <span style="color: #000000;">&#125;</span>
        <span style="color: #000000;">&#125;</span>
        <span style="color: #008080;">#endregion</span>
&nbsp;
        <span style="color: #008080;">#region 物理内存</span>
        <span style="color: #008080; font-style: italic;">///</span>
&nbsp;
        <span style="color: #008080; font-style: italic;">/// 获取物理内存</span>
        <span style="color: #008080; font-style: italic;">/// </span>
&nbsp;
        <span style="color: #0600FF;">public</span> <span style="color: #FF0000;">int</span> PhysicalMemory
        <span style="color: #000000;">&#123;</span>
            get
            <span style="color: #000000;">&#123;</span>
                <span style="color: #FF0000;">double</span> temp <span style="color: #008000;">=</span> Math.<span style="color: #0000FF;">Round</span><span style="color: #000000;">&#40;</span><span style="color: #FF0000;">float</span>.<span style="color: #0000FF;">Parse</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span>m_PhysicalMemory <span style="color: #008000;">/</span> <span style="color: #FF0000;">1024</span><span style="color: #000000;">&#41;</span> <span style="color: #008000;">/</span> <span style="color: #FF0000;">1024</span><span style="color: #000000;">&#41;</span>.<span style="color: #0000FF;">ToString</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span> <span style="color: #008000;">/</span> <span style="color: #FF0000;">1024</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
                <span style="color: #0600FF;">return</span> <span style="color: #FF0000;">int</span>.<span style="color: #0000FF;">Parse</span><span style="color: #000000;">&#40;</span>temp.<span style="color: #0000FF;">ToString</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
            <span style="color: #000000;">&#125;</span>
        <span style="color: #000000;">&#125;</span>
        <span style="color: #008080;">#endregion</span>
&nbsp;
        <span style="color: #008080;">#region 物理内存占用率</span>
        <span style="color: #008080; font-style: italic;">///</span>
&nbsp;
        <span style="color: #008080; font-style: italic;">/// 获取物理内存占用率</span>
        <span style="color: #008080; font-style: italic;">/// </span>
&nbsp;
        <span style="color: #0600FF;">public</span> <span style="color: #FF0000;">uint</span> PhysicalMemoryLoad
        <span style="color: #000000;">&#123;</span>
            get
            <span style="color: #000000;">&#123;</span>
                MEMORY_INFO MemInfo <span style="color: #008000;">=</span> <span style="color: #008000;">new</span> MEMORY_INFO<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
                GlobalMemoryStatus<span style="color: #000000;">&#40;</span><span style="color: #0600FF;">ref</span>  MemInfo<span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
                <span style="color: #0600FF;">return</span> MemInfo.<span style="color: #0000FF;">dwMemoryLoad</span><span style="color: #008000;">;</span>
            <span style="color: #000000;">&#125;</span>
        <span style="color: #000000;">&#125;</span>
        <span style="color: #008080;">#endregion</span>
    <span style="color: #000000;">&#125;</span></pre></div></div>

<p><script type='text/javascript'>
alimama_pid='mm_14356979_2041853_8949568';
alimama_type='g';
alimama_tks={};
alimama_tks.style_i=2;
alimama_tks.lg_i=1;
alimama_tks.w_i=572;
alimama_tks.h_i=69;
alimama_tks.btn_i=1;
alimama_tks.txt_s='';
alimama_tks.hot_i=1;
alimama_tks.hc_c='#0065FF';
alimama_tks.cid_i=0;
alimama_tks.t_i=1
</script><br />
<script type='text/javascript' src='http://a.alimama.cn/inf.js'></script><br />
<h3>相关文章</h3>
<ul class="related_posts">
<li><a href="http://www.kernel2heart.com/2010/06/how-to-add-links-to-web-by-greasemonkey/" title="如何使用GreaseMonkey给页面添加超链接" rel="bookmark inlinks">如何使用GreaseMonkey给页面添加超链接</a><span class="count">( 5 )</span></li>
<li><a href="http://www.kernel2heart.com/2009/10/powerful-plugin-greasemonkey/" title="GreaseMonkey的应用真是强大" rel="bookmark inlinks">GreaseMonkey的应用真是强大</a><span class="count">( 8 )</span></li>
<li><a href="http://www.kernel2heart.com/2009/10/five-open-source-licenses-comparison/" title="[ZT]五种开源协议的比较(BSD,Apache,GPL,LGPL,MIT)" rel="bookmark inlinks">[ZT]五种开源协议的比较(BSD,Apache,GPL,LGPL,MIT)</a><span class="count">( 2 )</span></li>
<li><a href="http://www.kernel2heart.com/2009/08/new-album-download-tool/" title="新的相册下载工具酝酿中" rel="bookmark inlinks">新的相册下载工具酝酿中</a><span class="count">( 10 )</span></li>
<li><a href="http://www.kernel2heart.com/2009/07/security-enhancements-in-the-crt/" title="一个小细节：Security Enhancements in the CRT" rel="bookmark inlinks">一个小细节：Security Enhancements in the CRT</a><span class="count">( 2 )</span></li>
<li><a href="http://www.kernel2heart.com/2010/01/%e6%a7%8b%e5%bb%baiphone%e9%96%8b%e7%99%bc%e5%b9%b3%e8%87%ba/" title="構建iPhone開發平臺" rel="bookmark inlinks">構建iPhone開發平臺</a><span class="count">( 2 )</span></li>
<li><a href="http://www.kernel2heart.com/2009/09/csharp-winform-effect/" title="C#中實現窗體的淡入淡出" rel="bookmark inlinks">C#中實現窗體的淡入淡出</a><span class="count">( 2 )</span></li>
<li><a href="http://www.kernel2heart.com/2010/01/win7-android-install-avd/" title="Win7下Android無法找到AVD的解決辦法" rel="bookmark inlinks">Win7下Android無法找到AVD的解決辦法</a><span class="count">( 8 )</span></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.kernel2heart.com/2010/08/c-sharp-get-pc-cpu-memory-class/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>一个有趣的禁止复制代码</title>
		<link>http://www.kernel2heart.com/2010/07/a-clipboard-hijack-code/</link>
		<comments>http://www.kernel2heart.com/2010/07/a-clipboard-hijack-code/#comments</comments>
		<pubDate>Wed, 28 Jul 2010 07:05:32 +0000</pubDate>
		<dc:creator>janxin</dc:creator>
				<category><![CDATA[技术交流]]></category>
		<category><![CDATA[Script]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://www.kernel2heart.com/2010/07/%e4%b8%80%e4%b8%aa%e6%9c%89%e8%b6%a3%e7%9a%84%e7%a6%81%e6%ad%a2%e5%a4%8d%e5%88%b6%e4%bb%a3%e7%a0%81/</guid>
		<description><![CDATA[其实是clipboard hijacking技术罢了。 主要内容是在content-min中：]]></description>
			<content:encoded><![CDATA[<p>其实是clipboard hijacking技术罢了。</p>
<p> <span id="more-450"></span>  主要内容是在content-min中： <</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
</pre></td><td class="code"><pre class="javascript" style="font-family:monospace;">KISSY.<span style="color: #660066;">ready</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span> <span style="color: #009900;">&#40;</span>c<span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
    <span style="color: #003366; font-weight: bold;">var</span> i <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;textarea&quot;</span><span style="color: #339933;">,</span> b <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;<span style="color: #000099; font-weight: bold;">\u</span>7981<span style="color: #000099; font-weight: bold;">\u</span>6b62copy!&quot;</span><span style="color: #339933;">,</span> g <span style="color: #339933;">=</span> c.<span style="color: #660066;">Event</span><span style="color: #339933;">,</span> f <span style="color: #339933;">=</span> document<span style="color: #339933;">,</span> d <span style="color: #339933;">=</span> f.<span style="color: #660066;">body</span><span style="color: #339933;">,</span> h <span style="color: #339933;">=</span> c.<span style="color: #660066;">DOM</span><span style="color: #339933;">,</span> e <span style="color: #339933;">=</span> c.<span style="color: #660066;">Node</span><span style="color: #339933;">,</span> 
    a <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> e<span style="color: #009900;">&#40;</span>d.<span style="color: #660066;">appendChild</span><span style="color: #009900;">&#40;</span>h.<span style="color: #660066;">create</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;&lt;&quot;</span> <span style="color: #339933;">+</span> i <span style="color: #339933;">+</span> <span style="color: #3366CC;">' style=&quot;position:absolute;left:-9999px;&quot;&gt;'</span> <span style="color: #339933;">+</span> b <span style="color: #339933;">+</span> <span style="color: #3366CC;">&quot;&lt;/&quot;</span> <span style="color: #339933;">+</span> i <span style="color: #339933;">+</span> <span style="color: #3366CC;">&quot;&gt;&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    g.<span style="color: #660066;">on</span><span style="color: #009900;">&#40;</span>document<span style="color: #339933;">,</span> <span style="color: #3366CC;">&quot;contextmenu&quot;</span><span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">function</span> <span style="color: #009900;">&#40;</span>j<span style="color: #009900;">&#41;</span>
    <span style="color: #009900;">&#123;</span>
        j.<span style="color: #660066;">halt</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
    <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    g.<span style="color: #660066;">on</span><span style="color: #009900;">&#40;</span>document<span style="color: #339933;">,</span> <span style="color: #3366CC;">&quot;keydown&quot;</span><span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">function</span> <span style="color: #009900;">&#40;</span>l<span style="color: #009900;">&#41;</span>
    <span style="color: #009900;">&#123;</span>
        <span style="color: #003366; font-weight: bold;">var</span> m <span style="color: #339933;">=</span> l.<span style="color: #660066;">keyCode</span><span style="color: #339933;">;</span>
        <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>m <span style="color: #339933;">===</span> <span style="color: #CC0000;">67</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #009900;">&#40;</span>l.<span style="color: #660066;">ctrlKey</span> <span style="color: #339933;">||</span> l.<span style="color: #660066;">metaKey</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
        <span style="color: #009900;">&#123;</span>
            <span style="color: #003366; font-weight: bold;">var</span> j <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> c.<span style="color: #660066;">Selection</span><span style="color: #009900;">&#40;</span>f<span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> k <span style="color: #339933;">=</span> j.<span style="color: #660066;">getRanges</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#91;</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
            a<span style="color: #009900;">&#91;</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#93;</span>.<span style="color: #000066;">focus</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            a<span style="color: #009900;">&#91;</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#93;</span>.<span style="color: #660066;">select</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            setTimeout<span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span> <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
            <span style="color: #009900;">&#123;</span>
                k.<span style="color: #660066;">select</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
            <span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span> <span style="color: #CC0000;">0</span><span style="color: #009900;">&#41;</span>
        <span style="color: #009900;">&#125;</span>
    <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    d.<span style="color: #660066;">appendChild</span><span style="color: #009900;">&#40;</span>document.<span style="color: #660066;">createTextNode</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;<span style="color: #000099; font-weight: bold;">\u</span>6211<span style="color: #000099; font-weight: bold;">\u</span>662f<span style="color: #000099; font-weight: bold;">\u</span>5185<span style="color: #000099; font-weight: bold;">\u</span>5bb9<span style="color: #000099; font-weight: bold;">\u</span>ff0c<span style="color: #000099; font-weight: bold;">\u</span>4f60<span style="color: #000099; font-weight: bold;">\u</span>53ef<span style="color: #000099; font-weight: bold;">\u</span>4ee5copy<span style="color: #000099; font-weight: bold;">\u</span>6211<span style="color: #000099; font-weight: bold;">\u</span>770b<span style="color: #000099; font-weight: bold;">\u</span>770b<span style="color: #000099; font-weight: bold;">\u</span>ff01&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>适用于所有浏览器，google Docs也是使用的这种技术。<br />
例子可以在<a href="http://lite-ext.googlecode.com/svn/trunk/lite-ext/playground/no-copy/no-copy.html" target="_blank">http://lite-ext.googlecode.com/svn/trunk/lite-ext/playground/no-copy/no-copy.html</a>找到<br />
<h3>相关文章</h3>
<ul class="related_posts">
<li><a href="http://www.kernel2heart.com/2010/05/why-360safe-attacks-kingsoft/" title="江湖波澜：360缘何紧咬金山不放" rel="bookmark inlinks">江湖波澜：360缘何紧咬金山不放</a><span class="count">( 2 )</span></li>
<li><a href="http://www.kernel2heart.com/2009/07/ollydbg-script-for-unpack-conficker-worm-b/" title="分享：一个unpack conficker worm的脚本" rel="bookmark inlinks">分享：一个unpack conficker worm的脚本</a><span class="count">( 0 )</span></li>
<li><a href="http://www.kernel2heart.com/2009/07/security-enhancements-in-the-crt/" title="一个小细节：Security Enhancements in the CRT" rel="bookmark inlinks">一个小细节：Security Enhancements in the CRT</a><span class="count">( 2 )</span></li>
<li><a href="http://www.kernel2heart.com/2009/07/about-scan-rootkit-outside-of-vm/" title="虚拟机之外的rootkit检测思考" rel="bookmark inlinks">虚拟机之外的rootkit检测思考</a><span class="count">( 2 )</span></li>
<li><a href="http://www.kernel2heart.com/2009/10/powerful-plugin-greasemonkey/" title="GreaseMonkey的应用真是强大" rel="bookmark inlinks">GreaseMonkey的应用真是强大</a><span class="count">( 8 )</span></li>
<li><a href="http://www.kernel2heart.com/2009/12/ida-5-5-with-hex-rays-download/" title="ida5.5侧漏进行时" rel="bookmark inlinks">ida5.5侧漏进行时</a><span class="count">( 10 )</span></li>
<li><a href="http://www.kernel2heart.com/2010/06/how-to-add-links-to-web-by-greasemonkey/" title="如何使用GreaseMonkey给页面添加超链接" rel="bookmark inlinks">如何使用GreaseMonkey给页面添加超链接</a><span class="count">( 5 )</span></li>
<li><a href="http://www.kernel2heart.com/2009/08/email-attacks-from-web/" title="web安全----漫谈邮件服务安全威胁" rel="bookmark inlinks">web安全&#8212;-漫谈邮件服务安全威胁</a><span class="count">( 8 )</span></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.kernel2heart.com/2010/07/a-clipboard-hijack-code/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>如何使用GreaseMonkey给页面添加超链接</title>
		<link>http://www.kernel2heart.com/2010/06/how-to-add-links-to-web-by-greasemonkey/</link>
		<comments>http://www.kernel2heart.com/2010/06/how-to-add-links-to-web-by-greasemonkey/#comments</comments>
		<pubDate>Mon, 28 Jun 2010 10:00:35 +0000</pubDate>
		<dc:creator>janxin</dc:creator>
				<category><![CDATA[技术交流]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[GreaseMonkey]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Script]]></category>

		<guid isPermaLink="false">http://www.kernel2heart.com/2010/06/how-to-add-links-to-web-by-greasemonkey/</guid>
		<description><![CDATA[GreaseMonkey是个很强大的软件，无论是在Firefox还是Chrome上的表现，都无疑是出众的。之前写过一篇关于GreaseMonkey的文章，但是一直时间不多，没有继续研究下去。 这次打算做一个某知名网站的辅助工具（平时还是firefox用得多，chrome是偶尔用下，不过理论上Firefox和Chrome都是兼容的），所以就把GreaseMonkey又上手了一下。 比如我们要在某一页面添加一个借口，比如说：显示楼主。通过对页面结构的观察（我是用的是Firebug，总之自己习惯的工具就好），发现可以在一个id名为“thread_nav_lef”的Div上添加一个链接。这个Div的结构大致如下： 1 2 3 4 5 6 7 8 9 10 &#60;div id=&#34;thread_nav_left&#34;&#62; &#60;ul&#62; &#160; &#60;li&#62;&#60;a onclick=&#34;Post.reply(&#38;#39;0&#38;#39;);&#34; href=&#34;#sub&#34;&#62;快速回复&#60;/a&#62;&#60;/li&#62; &#160; &#60;li&#62;&#60;a title=&#34;切换到经典版&#34; onclick=&#34;Page.changeVersion(2);return false;&#34; href=&#34;#&#34;&#62;切换到经典版&#60;/a&#62;&#60;/li&#62; &#160; &#60;/ul&#62; &#160; &#60;/div&#62; 这样可以这样写： 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 var init = function&#40;&#41; &#123; var [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.kernel2heart.com/labels/greasemonkey/" class="st_tag internal_tag" rel="tag" title="Posts tagged with GreaseMonkey">GreaseMonkey</a>是个很强大的软件，无论是在Firefox还是Chrome上的表现，都无疑是出众的。之前写过<a href="http://www.kernel2heart.com/2009/10/powerful-plugin-greasemonkey/" target="_blank">一篇关于GreaseMonkey的文章</a>，但是一直时间不多，没有继续研究下去。</p>
<p>这次打算做一个某知名网站的辅助工具（平时还是firefox用得多，chrome是偶尔用下，不过理论上Firefox和Chrome都是兼容的），所以就把<a href="http://www.kernel2heart.com/labels/greasemonkey/" class="st_tag internal_tag" rel="tag" title="Posts tagged with GreaseMonkey">GreaseMonkey</a>又上手了一下。</p>
<p> <span id="more-430"></span>
<p>比如我们要在某一页面添加一个借口，比如说：显示楼主。通过对页面结构的观察（我是用的是Firebug，总之自己习惯的工具就好），发现可以在一个id名为“thread_nav_lef”的Div上添加一个链接。这个Div的结构大致如下：</p>
<blockquote>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
</pre></td><td class="code"><pre class="javascript" style="font-family:monospace;">    <span style="color: #339933;">&lt;</span>div id<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;thread_nav_left&quot;</span><span style="color: #339933;">&gt;</span>
            <span style="color: #339933;">&lt;</span>ul<span style="color: #339933;">&gt;</span>
&nbsp;
                 <span style="color: #339933;">&lt;</span>li<span style="color: #339933;">&gt;&lt;</span>a onclick<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;Post.reply(&amp;#39;0&amp;#39;);&quot;</span> href<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;#sub&quot;</span><span style="color: #339933;">&gt;</span>快速回复<span style="color: #339933;">&lt;/</span>a<span style="color: #339933;">&gt;&lt;/</span>li<span style="color: #339933;">&gt;</span>
&nbsp;
                 <span style="color: #339933;">&lt;</span>li<span style="color: #339933;">&gt;&lt;</span>a title<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;切换到经典版&quot;</span> onclick<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;Page.changeVersion(2);return false;&quot;</span> href<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;#&quot;</span><span style="color: #339933;">&gt;</span>切换到经典版<span style="color: #339933;">&lt;/</span>a<span style="color: #339933;">&gt;&lt;/</span>li<span style="color: #339933;">&gt;</span>
&nbsp;
            <span style="color: #339933;">&lt;/</span>ul<span style="color: #339933;">&gt;</span>
&nbsp;
        <span style="color: #339933;">&lt;/</span>div<span style="color: #339933;">&gt;</span></pre></td></tr></table></div>

</blockquote>
<p>这样可以这样写：</p>
<blockquote>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
</pre></td><td class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">var</span> init <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> 
        <span style="color: #003366; font-weight: bold;">var</span> showButton <span style="color: #339933;">=</span> document.<span style="color: #660066;">getElementById</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'thread_nav_left'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">childNodes</span><span style="color: #009900;">&#91;</span><span style="color: #CC0000;">1</span><span style="color: #009900;">&#93;</span>.<span style="color: #660066;">childNodes</span><span style="color: #009900;">&#91;</span><span style="color: #CC0000;">2</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span><span style="color: #006600; font-style: italic;">//为什么第二个是2？因为2比较美观，第一个格式有点乱…. </span>
&nbsp;
        <span style="color: #003366; font-weight: bold;">var</span> flli <span style="color: #339933;">=</span> document.<span style="color: #660066;">createElement</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'li'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
&nbsp;
        <span style="color: #003366; font-weight: bold;">var</span> fllink <span style="color: #339933;">=</span> document.<span style="color: #660066;">createElement</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'a'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
&nbsp;
        fllink.<span style="color: #660066;">href</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">'javascript:void(0);'</span><span style="color: #339933;">;</span> 
&nbsp;
        fllink.<span style="color: #660066;">innerHTML</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">'只看楼主'</span><span style="color: #339933;">;</span> 
&nbsp;
        flli.<span style="color: #660066;">appendChild</span><span style="color: #009900;">&#40;</span>fllink<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
&nbsp;
        fllink.<span style="color: #660066;">addEventListener</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'click'</span><span style="color: #339933;">,</span> filter<span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #006600; font-style: italic;">// Filter是个函数，当点击时会执行Filter函数 </span>
&nbsp;
        showButton.<span style="color: #660066;">parentNode</span>.<span style="color: #660066;">insertBefore</span><span style="color: #009900;">&#40;</span>flli<span style="color: #339933;">,</span> showButton.<span style="color: #660066;">nextSibling</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
&nbsp;
    <span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

</blockquote>
<p>nextSibling是一个插入到指定节点之后的方法，如果插入指定节点之前，可以选择去掉nextSibling。</p>
<p>效果大致如下：快速回复   只看楼主  切换到经典版</p>
<h3>相关文章</h3>
<ul class="related_posts">
<li><a href="http://www.kernel2heart.com/2010/08/c-sharp-get-pc-cpu-memory-class/" title="C#获取本机CPU、内存信息类" rel="bookmark inlinks">C#获取本机CPU、内存信息类</a><span class="count">( 5 )</span></li>
<li><a href="http://www.kernel2heart.com/2010/07/a-clipboard-hijack-code/" title="一个有趣的禁止复制代码" rel="bookmark inlinks">一个有趣的禁止复制代码</a><span class="count">( 10 )</span></li>
<li><a href="http://www.kernel2heart.com/2009/09/csharp-winform-effect/" title="C#中實現窗體的淡入淡出" rel="bookmark inlinks">C#中實現窗體的淡入淡出</a><span class="count">( 2 )</span></li>
<li><a href="http://www.kernel2heart.com/2009/10/new-gae-proxy/" title="新的GAE代理软件酝酿中" rel="bookmark inlinks">新的GAE代理软件酝酿中</a><span class="count">( 29 )</span></li>
<li><a href="http://www.kernel2heart.com/2009/07/ollydbg-script-for-unpack-conficker-worm-b/" title="分享：一个unpack conficker worm的脚本" rel="bookmark inlinks">分享：一个unpack conficker worm的脚本</a><span class="count">( 0 )</span></li>
<li><a href="http://www.kernel2heart.com/2009/07/firefox-3-5-released/" title="Firefox 3.5 Released" rel="bookmark inlinks">Firefox 3.5 Released</a><span class="count">( 2 )</span></li>
<li><a href="http://www.kernel2heart.com/2009/07/security-enhancements-in-the-crt/" title="一个小细节：Security Enhancements in the CRT" rel="bookmark inlinks">一个小细节：Security Enhancements in the CRT</a><span class="count">( 2 )</span></li>
<li><a href="http://www.kernel2heart.com/2009/10/new-sync-plugin-weave/" title="用于替代Xmarks的Firefox同步扩展：Weave" rel="bookmark inlinks">用于替代Xmarks的Firefox同步扩展：Weave</a><span class="count">( 5 )</span></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.kernel2heart.com/2010/06/how-to-add-links-to-web-by-greasemonkey/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>蛋疼物：7-zip美化图标组(For 32-bit)</title>
		<link>http://www.kernel2heart.com/2010/05/7-zip-icon-set-for-x86/</link>
		<comments>http://www.kernel2heart.com/2010/05/7-zip-icon-set-for-x86/#comments</comments>
		<pubDate>Tue, 25 May 2010 03:24:52 +0000</pubDate>
		<dc:creator>janxin</dc:creator>
				<category><![CDATA[技术交流]]></category>
		<category><![CDATA[Theme]]></category>
		<category><![CDATA[美化]]></category>

		<guid isPermaLink="false">http://www.kernel2heart.com/2010/05/7-zip-icon-set-for-x86/</guid>
		<description><![CDATA[之前用过一段时间的7-zip，但是7-zip的图标实在是太过猥琐。Sparanoid释出Iconset之后也一直没有再更新这个图标和嵌入式DLL。因此让我等习惯使用美化图标的7-zip用户顿时失去了前进的动力。在换回一段时间的WinRAR后，本人不甘寂寞，打算折腾回7-zip，苦于一直没什么好的美化，因此只好自己亲自动手，自己DIY。 不知道7-zip这个软件是做什么的同学请参见百科介绍。 7-Zip Icon Set Version 2 Fixed 此图标系列是Sparanoid释出的Iconset，我个人将其凑合了一下，用以适应现在7-zip的33种文件关联。 版权所有：Sparanoid。&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 点击下载：易盘&#160;&#160;&#160; u115（推荐） 安装说明：7-zip需安装在“X:\program files”目录下，其中X指Windows的安装盘，一般默认为C。解压缩下载的安装包至X:\program files\7-Zip目录下，运行icons-install.reg进行安装。注销或者重启电脑后，美化图标生效。 卸载说明：运行icons-uninstall.reg，。注销或者重启电脑后，卸载完成。 如果感觉这种方式比较复杂，难以理解，可以选择下载美化过的7z.dll文件。点击这里下载7zDLL压缩包。(备份U115下载)替换安装目录下对应文件即可。 Tango Icon For 7-zip Tango是一套开放的图标，因此做了一套7-zip的图标，其实大部分的图标还是一致的。美观性不如7-Zip Icon Set Version 2 Fixed，不过也是相当不错的图标。另外，不像7-Zip Icon Set Version 2 Fixed一样有大图标…… 下载地址：易盘&#160;&#160;&#160; u115(推荐) 安装方法与卸载方法同上，不提供修改过的7zDLL下载。 相关文章 更换了新的theme( 16 ) Windows 7正式发布鸟，送上主题一个( 18 )]]></description>
			<content:encoded><![CDATA[<p>之前用过一段时间的7-zip，但是7-zip的图标实在是太过猥琐。<a href="https://sparanoid.com/project/7-zip-icon-set-2-give-away/" target="_blank">Sparanoid释出Iconset</a>之后也一直没有再更新这个图标和嵌入式DLL。因此让我等习惯使用美化图标的7-zip用户顿时失去了前进的动力。在换回一段时间的WinRAR后，本人不甘寂寞，打算折腾回7-zip，苦于一直没什么好的美化，因此只好自己亲自动手，自己DIY。</p>
<p>不知道7-zip这个软件是做什么的同学请参见<a href="http://baike.baidu.com/view/31493.htm" target="_blank">百科介绍</a>。</p>
<p> <span id="more-410"></span><br />
<h1><strong>7-Zip Icon Set Version 2 Fixed</strong></h1>
<p>此图标系列是Sparanoid释出的Iconset，我个人将其凑合了一下，用以适应现在7-zip的33种文件关联。</p>
<p align="center"><img src="http://api.photoshop.com/home_78979dcfb22048a4946f11f9628cef3e/adobe-px-assets/e5411825e5ae49f6be13f464f44390a1" width="400" height="400" /></p>
<p>版权所有：<a href="https://sparanoid.com/" target="_blank">Sparanoid</a>。&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 点击下载：<a href="http://www.163pan.com/files/507000h0x.html" target="_blank">易盘</a>&#160;&#160;&#160; <a href="http://u.115.com/file/f5c0a734f3" target="_blank">u115</a>（推荐）</p>
<p>安装说明：7-zip需安装在“X:\program files”目录下，其中X指<a href="http://www.kernel2heart.com/labels/windows/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Windows">Windows</a>的安装盘，一般默认为C。解压缩下载的安装包至X:\program files\7-Zip目录下，运行icons-install.reg进行安装。注销或者重启电脑后，美化图标生效。</p>
<p>卸载说明：运行icons-uninstall.reg，。注销或者重启电脑后，卸载完成。</p>
<p>如果感觉这种方式比较复杂，难以理解，可以选择下载美化过的7z.dll文件。点击这里<a href="http://www.163pan.com/files/507000h0v.html" target="_blank">下载7zDLL压缩包</a>。(<a href="http://u.115.com/file/f5e4f771b3" target="_blank">备份U115下载</a>)替换安装目录下对应文件即可。</p>
<h1><strong>Tango Icon For 7-zip</strong></h1>
<p>Tango是一套开放的图标，因此做了一套7-zip的图标，其实大部分的图标还是一致的。美观性不如7-Zip Icon Set Version 2 Fixed，不过也是相当不错的图标。另外，不像7-Zip Icon Set Version 2 Fixed一样有大图标……</p>
<p align="center"><img src="http://api.photoshop.com/home_78979dcfb22048a4946f11f9628cef3e/adobe-px-assets/d787a4abe836401ea009880802152979" width="521" height="368" /></p>
<p> 下载地址：<a href="http://www.163pan.com/files/507000h0z.html" target="_blank">易盘</a>&#160;&#160;&#160; <a href="http://u.115.com/file/f53bc9b7b2" target="_blank">u115</a>(推荐)
<p>安装方法与卸载方法同上，不提供修改过的7zDLL下载。</p>
<h3>相关文章</h3>
<ul class="related_posts">
<li><a href="http://www.kernel2heart.com/2009/10/windows7-released/" title="Windows 7正式发布鸟，送上主题一个" rel="bookmark inlinks">Windows 7正式发布鸟，送上主题一个</a><span class="count">( 18 )</span></li>
<li><a href="http://www.kernel2heart.com/2009/08/change-theme/" title="更换了新的theme" rel="bookmark inlinks">更换了新的theme</a><span class="count">( 16 )</span></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.kernel2heart.com/2010/05/7-zip-icon-set-for-x86/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Win7下Android無法找到AVD的解決辦法</title>
		<link>http://www.kernel2heart.com/2010/01/win7-android-install-avd/</link>
		<comments>http://www.kernel2heart.com/2010/01/win7-android-install-avd/#comments</comments>
		<pubDate>Fri, 15 Jan 2010 11:28:09 +0000</pubDate>
		<dc:creator>janxin</dc:creator>
				<category><![CDATA[技术交流]]></category>
		<category><![CDATA[Android]]></category>
		<category><![CDATA[Android SDK]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.kernel2heart.com/2010/01/win7-android-install-avd/</guid>
		<description><![CDATA[典型的表現是：可以正常安裝AVD，創建虛擬設備，但是調試時出現如下錯誤： Automatic Target Mode: Preferred AVD &#8216;avd1.5&#8242; is not available. Launching new emulator. Launching a new emulator with Virtual Device &#8216;avd1.5&#8242; emulator: ERROR: unknown virtual device name: &#8216;avd1.5&#8242; emulator: could not find virtual device named &#8216;avd1.5&#8242; 最后发现在Android Virtual Devices Manager中创建avd，创建后avd的存放路径是“D:\.android”，因为我的XP系统默认文件的路径都修改过所以“C: \Documents and Settings\Administrator”改成了“D:”，既然Eclipse提示它找不到avd，是不是跟这个有关系呢，我试了试将 “.android”这个文件放到“C:\Documents and Settings\Administrator”下，最后可以正常运行了。 相关文章 [ZT]五种开源协议的比较(BSD,Apache,GPL,LGPL,MIT)( 2 ) C#获取本机CPU、内存信息类( 5 ) 如何使用GreaseMonkey给页面添加超链接( 5 [...]]]></description>
			<content:encoded><![CDATA[<p>典型的表現是：可以正常安裝AVD，創建虛擬設備，但是調試時出現如下錯誤：</p>
<blockquote><p>Automatic Target Mode: Preferred AVD &#8216;avd1.5&#8242; is not available. Launching new emulator.</p>
<p>Launching a new emulator with Virtual Device &#8216;avd1.5&#8242;</p>
<p>emulator: ERROR: unknown virtual device name: &#8216;avd1.5&#8242;</p>
<p>emulator: could not find virtual device named &#8216;avd1.5&#8242;</p>
</blockquote>
<p>最后发现在<a href="http://www.kernel2heart.com/labels/android/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Android">Android</a> Virtual Devices Manager中创建avd，创建后avd的存放路径是“D:\.<a href="http://www.kernel2heart.com/labels/android/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Android">android</a>”，因为我的XP系统默认文件的路径都修改过所以“C: \Documents and Settings\Administrator”改成了“D:”，既然Eclipse提示它找不到avd，是不是跟这个有关系呢，我试了试将 “.<a href="http://www.kernel2heart.com/labels/android/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Android">android</a>”这个文件放到“C:\Documents and Settings\Administrator”下，最后可以正常运行了。</p>
<h3>相关文章</h3>
<ul class="related_posts">
<li><a href="http://www.kernel2heart.com/2010/06/how-to-add-links-to-web-by-greasemonkey/" title="如何使用GreaseMonkey给页面添加超链接" rel="bookmark inlinks">如何使用GreaseMonkey给页面添加超链接</a><span class="count">( 5 )</span></li>
<li><a href="http://www.kernel2heart.com/2009/08/new-album-download-tool/" title="新的相册下载工具酝酿中" rel="bookmark inlinks">新的相册下载工具酝酿中</a><span class="count">( 10 )</span></li>
<li><a href="http://www.kernel2heart.com/2009/10/five-open-source-licenses-comparison/" title="[ZT]五种开源协议的比较(BSD,Apache,GPL,LGPL,MIT)" rel="bookmark inlinks">[ZT]五种开源协议的比较(BSD,Apache,GPL,LGPL,MIT)</a><span class="count">( 2 )</span></li>
<li><a href="http://www.kernel2heart.com/2009/10/powerful-plugin-greasemonkey/" title="GreaseMonkey的应用真是强大" rel="bookmark inlinks">GreaseMonkey的应用真是强大</a><span class="count">( 8 )</span></li>
<li><a href="http://www.kernel2heart.com/2010/01/%e6%a7%8b%e5%bb%baiphone%e9%96%8b%e7%99%bc%e5%b9%b3%e8%87%ba/" title="構建iPhone開發平臺" rel="bookmark inlinks">構建iPhone開發平臺</a><span class="count">( 2 )</span></li>
<li><a href="http://www.kernel2heart.com/2009/09/csharp-winform-effect/" title="C#中實現窗體的淡入淡出" rel="bookmark inlinks">C#中實現窗體的淡入淡出</a><span class="count">( 2 )</span></li>
<li><a href="http://www.kernel2heart.com/2009/07/security-enhancements-in-the-crt/" title="一个小细节：Security Enhancements in the CRT" rel="bookmark inlinks">一个小细节：Security Enhancements in the CRT</a><span class="count">( 2 )</span></li>
<li><a href="http://www.kernel2heart.com/2010/08/c-sharp-get-pc-cpu-memory-class/" title="C#获取本机CPU、内存信息类" rel="bookmark inlinks">C#获取本机CPU、内存信息类</a><span class="count">( 5 )</span></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.kernel2heart.com/2010/01/win7-android-install-avd/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>構建iPhone開發平臺</title>
		<link>http://www.kernel2heart.com/2010/01/%e6%a7%8b%e5%bb%baiphone%e9%96%8b%e7%99%bc%e5%b9%b3%e8%87%ba/</link>
		<comments>http://www.kernel2heart.com/2010/01/%e6%a7%8b%e5%bb%baiphone%e9%96%8b%e7%99%bc%e5%b9%b3%e8%87%ba/#comments</comments>
		<pubDate>Thu, 14 Jan 2010 11:13:04 +0000</pubDate>
		<dc:creator>janxin</dc:creator>
				<category><![CDATA[技术交流]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[iPhone SDK]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.kernel2heart.com/2010/01/%e6%a7%8b%e5%bb%baiphone%e9%96%8b%e7%99%bc%e5%b9%b3%e8%87%ba/</guid>
		<description><![CDATA[算是作為我學習iPhone開發的一個基本開篇，第一個文章當然是環境的搭建了。大致的環境，相信你在看很多相關參考書的時候都應噶提到了。首先最好有一台MAC機，這個不一定代表你一定要有Macbook什麽的，但是建議你有一台安裝有OS X snow leopard系統的電腦（比如我現在使用的就是OSX for PC）。當然10.5的系統也是可以的，但是SDK的版本明顯要低一些的。不過如果你打算真正打算做商務開發，這個是無所謂的。 除了一台安裝了OSX10.5系統以上的電腦，還需要有一個Apple developer ID。這個有一個值得注意的是，千萬不要使用自己的iTunes帳戶註冊Developer帳戶，因為這樣很容易導致帳戶的審核變慢。我的兩個iTunes帳戶就是過了一個月了仍舊在審核當中，不過換了一個沒有註冊過的gmail郵箱，第二天就可以下載工具了。 Developer帳戶的作用很大，通過這個帳戶，你可以輕鬆下載iPhone開發工具Xcode with iPhone SDK和一些甚至關於Object-C的書籍，這些都是免費的，不過是英文的。如果你想在app store發佈你的應用，還需要一個價值$99的授權，不過我作為個人開發者，也不打算出售軟件了。 其他的就是關於xcode的安裝了，這個沒有什麽難度的，相對Win下安裝來說省事了很多。下載的編程軟體是一個dmg影像，雙擊就可以加載，然後選擇第二個安裝選項安裝，安裝正常之後可以在搜索中查找xcode就可以打開Xcode了。 編寫一個軟體更是簡單啦，相信用過Visual Studio什麽的童鞋應該很快就可以上手了，選擇創建一個iPhone程序，有很多，可以以後研究一下使用。我了的第一個iPhone應用程式：HelloWord（萬能程式啊，iPhone可以零代碼實現的，只是拖放了幾個控件。），等書來了之後可以繼續研究一下。 相关文章 一个小细节：Security Enhancements in the CRT( 2 ) 无责任实测：联通66元学生3G套餐( 9 ) 吐槽：iPhone系统的兼容性真是糟糕( 6 ) GreaseMonkey的应用真是强大( 8 ) [圖多殺貓]iPhone首款國產Gal Demo:Sumreen試玩( 15 ) C#获取本机CPU、内存信息类( 5 ) 新的GAE代理软件酝酿中( 29 ) [ZT]五种开源协议的比较(BSD,Apache,GPL,LGPL,MIT)( 2 )]]></description>
			<content:encoded><![CDATA[<p>算是作為我學習<a href="http://www.kernel2heart.com/labels/iphone/" class="st_tag internal_tag" rel="tag" title="Posts tagged with iPhone">iPhone</a>開發的一個基本開篇，第一個文章當然是環境的搭建了。大致的環境，相信你在看很多相關參考書的時候都應噶提到了。首先最好有一台MAC機，這個不一定代表你一定要有Macbook什麽的，但是建議你有一台安裝有OS X snow leopard系統的電腦（比如我現在使用的就是OSX for PC）。當然10.5的系統也是可以的，但是SDK的版本明顯要低一些的。不過如果你打算真正打算做商務開發，這個是無所謂的。</p>
<p> <span id="more-339"></span>
<p>除了一台安裝了OSX10.5系統以上的電腦，還需要有一個Apple developer ID。這個有一個值得注意的是，<strong><font color="#ff0000">千萬不要使用自己的iTunes帳戶註冊Developer帳戶</font></strong>，因為這樣很容易導致帳戶的審核變慢。我的兩個iTunes帳戶就是過了一個月了仍舊在審核當中，不過換了一個沒有註冊過的gmail郵箱，第二天就可以下載工具了。</p>
<p>Developer帳戶的作用很大，通過這個帳戶，你可以輕鬆下載<a href="http://www.kernel2heart.com/labels/iphone/" class="st_tag internal_tag" rel="tag" title="Posts tagged with iPhone">iPhone</a>開發工具Xcode with <a href="http://www.kernel2heart.com/labels/iphone-sdk/" class="st_tag internal_tag" rel="tag" title="Posts tagged with iPhone SDK">iPhone SDK</a>和一些甚至關於Object-C的書籍，這些都是免費的，不過是英文的。如果你想在app store發佈你的應用，還需要一個價值$99的授權，不過我作為個人開發者，也不打算出售軟件了。</p>
<p>其他的就是關於xcode的安裝了，這個沒有什麽難度的，相對Win下安裝來說省事了很多。下載的編程軟體是一個dmg影像，雙擊就可以加載，然後選擇第二個安裝選項安裝，安裝正常之後可以在搜索中查找xcode就可以打開Xcode了。</p>
<p>編寫一個軟體更是簡單啦，相信用過Visual Studio什麽的童鞋應該很快就可以上手了，選擇創建一個<a href="http://www.kernel2heart.com/labels/iphone/" class="st_tag internal_tag" rel="tag" title="Posts tagged with iPhone">iPhone</a>程序，有很多，可以以後研究一下使用。我了的第一個<a href="http://www.kernel2heart.com/labels/iphone/" class="st_tag internal_tag" rel="tag" title="Posts tagged with iPhone">iPhone</a>應用程式：HelloWord（萬能程式啊，<a href="http://www.kernel2heart.com/labels/iphone/" class="st_tag internal_tag" rel="tag" title="Posts tagged with iPhone">iPhone</a>可以零代碼實現的，只是拖放了幾個控件。），等書來了之後可以繼續研究一下。</p>
<h3>相关文章</h3>
<ul class="related_posts">
<li><a href="http://www.kernel2heart.com/2009/09/unicom-3g-network-for-student/" title="无责任实测：联通66元学生3G套餐" rel="bookmark inlinks">无责任实测：联通66元学生3G套餐</a><span class="count">( 9 )</span></li>
<li><a href="http://www.kernel2heart.com/2009/07/security-enhancements-in-the-crt/" title="一个小细节：Security Enhancements in the CRT" rel="bookmark inlinks">一个小细节：Security Enhancements in the CRT</a><span class="count">( 2 )</span></li>
<li><a href="http://www.kernel2heart.com/2009/10/powerful-plugin-greasemonkey/" title="GreaseMonkey的应用真是强大" rel="bookmark inlinks">GreaseMonkey的应用真是强大</a><span class="count">( 8 )</span></li>
<li><a href="http://www.kernel2heart.com/2009/08/new-album-download-tool/" title="新的相册下载工具酝酿中" rel="bookmark inlinks">新的相册下载工具酝酿中</a><span class="count">( 10 )</span></li>
<li><a href="http://www.kernel2heart.com/2009/09/faq-about-iphone-3gs/" title="有关iPhone的一些FAQ" rel="bookmark inlinks">有关iPhone的一些FAQ</a><span class="count">( 0 )</span></li>
<li><a href="http://www.kernel2heart.com/2010/08/c-sharp-get-pc-cpu-memory-class/" title="C#获取本机CPU、内存信息类" rel="bookmark inlinks">C#获取本机CPU、内存信息类</a><span class="count">( 5 )</span></li>
<li><a href="http://www.kernel2heart.com/2009/10/five-open-source-licenses-comparison/" title="[ZT]五种开源协议的比较(BSD,Apache,GPL,LGPL,MIT)" rel="bookmark inlinks">[ZT]五种开源协议的比较(BSD,Apache,GPL,LGPL,MIT)</a><span class="count">( 2 )</span></li>
<li><a href="http://www.kernel2heart.com/2009/12/first-chinese-iphone-galgame-sumreen-demo/" title="[圖多殺貓]iPhone首款國產Gal Demo:Sumreen試玩" rel="bookmark inlinks">[圖多殺貓]iPhone首款國產Gal Demo:Sumreen試玩</a><span class="count">( 15 )</span></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.kernel2heart.com/2010/01/%e6%a7%8b%e5%bb%baiphone%e9%96%8b%e7%99%bc%e5%b9%b3%e8%87%ba/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>在WordPress嵌入弹幕播放器</title>
		<link>http://www.kernel2heart.com/2009/12/insert-nicovideo-player-into-wordpress/</link>
		<comments>http://www.kernel2heart.com/2009/12/insert-nicovideo-player-into-wordpress/#comments</comments>
		<pubDate>Mon, 07 Dec 2009 10:25:29 +0000</pubDate>
		<dc:creator>janxin</dc:creator>
				<category><![CDATA[技术交流]]></category>
		<category><![CDATA[Video]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://www.kernel2heart.com/2009/12/insert-nicovideo-player-into-wordpress/</guid>
		<description><![CDATA[首先抱歉一下，虽然网址上写的是nicovideo player，其实最初是打算嵌入Acfun.cn的视频进blog里的，但是Acfun的代码写的太过于复杂了（很多JS处理的东西，嵌入的时候写的东西多……想了想，Acfun也太容易服务器无响应了……）就换了Mikufans的嵌入了。Mikufans的核心是PADPlayer，有兴趣的可以参考下Google Code上的开源项目。做了一些优化，可以当做Acfun的替代站点。 嵌入的时候可以使用以下代码（请右键查看网页源代码）： 这样的话会截除掉侧边的评论栏，一般不会影响观看和弹幕评论，具体代码可以右键查看一下网页的源代码，不知道为什么我的WLW不能自动转义字符了，导致我的代码放进来就是直接的嵌入效果，好吧，也无所谓，大家看看就好了，这个就是实际的嵌入效果。 测试AcFun： 相关文章 comodo提供dns解析服务( 12 ) 无责任实测：联通66元学生3G套餐( 9 ) The Lonely Island( 2 ) 推荐一个系列视频( 4 ) 感觉Twitter最近越来越不稳定了( 12 ) [技术宅的胜利]婚礼自弹自唱FUWAFUWA TIME( 2 ) web安全&#8212;-漫谈邮件服务安全威胁( 8 )]]></description>
			<content:encoded><![CDATA[<p>首先抱歉一下，虽然网址上写的是nicovideo player，其实最初是打算嵌入<a href="http://www.acfun.cn">Acfun.cn</a>的视频进blog里的，但是Acfun的代码写的太过于复杂了（很多JS处理的东西，嵌入的时候写的东西多……想了想，Acfun也太容易服务器无响应了……）就换了Mikufans的嵌入了。<a href="http://mikufans.cn">Mikufans</a>的核心是<a href="http://hi.baidu.com/tamatamaki">PADPlayer</a>，有兴趣的可以参考下Google Code上的<a href="http://projectanotherdisplayer.googlecode.com/files/source-all-in-one.7z">开源项目</a>。做了一些优化，可以当做Acfun的替代站点。</p>
<p><span id="more-287"></span></p>
<p>嵌入的时候可以使用以下代码（请右键查看网页源代码）：</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="516" height="448" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="flashvars" value="vid=26114307" /><param name="src" value="http://mikufans.cn/PADplayer.swf" /><param name="allowfullscreen" value="true" /><param name="quality" value="high" /><embed type="application/x-shockwave-flash" width="516" height="448" src="http://mikufans.cn/PADplayer.swf" quality="high" allowfullscreen="true" flashvars="vid=26114307"></embed></object></p>
<p>这样的话会截除掉侧边的评论栏，一般不会影响观看和弹幕评论，具体代码可以右键查看一下网页的源代码，不知道为什么我的WLW不能自动转义字符了，导致我的代码放进来就是直接的嵌入效果，好吧，也无所谓，大家看看就好了，这个就是实际的嵌入效果。</p>
<p>测试AcFun：<br /> <br />
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="448" height="516" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="src" value="http://www.acfun.cn/newflvplayer/player.swf?id=26298940&amp;type=video&amp;sort=new" /><param name="allowfullscreen" value="true" /><param name="quality" value="high" /><embed type="application/x-shockwave-flash" width="448" height="516" src="http://www.acfun.cn/newflvplayer/player.swf?id=26298940&amp;type=video&amp;sort=new" quality="high" allowfullscreen="true"></embed></object><br />
<h3>相关文章</h3>
<ul class="related_posts">
<li><a href="http://www.kernel2heart.com/2009/07/a-list-of-web-teach-video/" title="推荐一个系列视频" rel="bookmark inlinks">推荐一个系列视频</a><span class="count">( 4 )</span></li>
<li><a href="http://www.kernel2heart.com/2009/09/unicom-3g-network-for-student/" title="无责任实测：联通66元学生3G套餐" rel="bookmark inlinks">无责任实测：联通66元学生3G套餐</a><span class="count">( 9 )</span></li>
<li><a href="http://www.kernel2heart.com/2009/07/the-lonely-island/" title="The Lonely Island" rel="bookmark inlinks">The Lonely Island</a><span class="count">( 2 )</span></li>
<li><a href="http://www.kernel2heart.com/2009/09/comodo-supply-dns-server/" title="comodo提供dns解析服务" rel="bookmark inlinks">comodo提供dns解析服务</a><span class="count">( 12 )</span></li>
<li><a href="http://www.kernel2heart.com/2010/05/chinese-otaku-fuwafuwa-time/" title="[技术宅的胜利]婚礼自弹自唱FUWAFUWA TIME" rel="bookmark inlinks">[技术宅的胜利]婚礼自弹自唱FUWAFUWA TIME</a><span class="count">( 2 )</span></li>
<li><a href="http://www.kernel2heart.com/2009/10/twitter-is-not-stable-anymore/" title="感觉Twitter最近越来越不稳定了" rel="bookmark inlinks">感觉Twitter最近越来越不稳定了</a><span class="count">( 12 )</span></li>
<li><a href="http://www.kernel2heart.com/2009/08/email-attacks-from-web/" title="web安全----漫谈邮件服务安全威胁" rel="bookmark inlinks">web安全&#8212;-漫谈邮件服务安全威胁</a><span class="count">( 8 )</span></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.kernel2heart.com/2009/12/insert-nicovideo-player-into-wordpress/feed/</wfw:commentRss>
		<slash:comments>18</slash:comments>
		</item>
		<item>
		<title>PP加速器与Win7桌面冲突</title>
		<link>http://www.kernel2heart.com/2009/10/ppva-not-compatible-with-windows7/</link>
		<comments>http://www.kernel2heart.com/2009/10/ppva-not-compatible-with-windows7/#comments</comments>
		<pubDate>Sat, 24 Oct 2009 09:21:56 +0000</pubDate>
		<dc:creator>janxin</dc:creator>
				<category><![CDATA[技术交流]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://www.kernel2heart.com/2009/10/ppva-not-compatible-with-windows7/</guid>
		<description><![CDATA[PP加速器这个软件其实对我这种带宽有限的人来说，还是相当有作用的。同时它可以十分方便的合成多个视频文件，所以之前一直在使用它。不过最近发现左面的图标和程序会出现不停刷新，抖动和假死的现象，给玩游戏什么的造成了极大影响。 经过一段时间的研究发现，罪恶的根源来自于PP加速器和一些相关的注册表设置，可以参照下面的方法解决以上现象： 首先，请卸载PP加速器，打开注册表编辑器（WinKey+R，也可以在开始菜单的搜索框中），输入regedit，打开。查找注册表一下位置的键值： HKEY_USERS\.DEFAULT\Control Panel\Desktop\下的 HungAppTimeOut WaitToKillAppTimeOut HKEY_USERS\.DEFAULT\Control Panel\Desktop\HKEY_CURRENT_USER\Control Panel\Desktop\下的 HungAppTimeOut WaitToKillAppTimeOut WaitToKillServiceTimeOut 找到以下键值之后，删除，重新启动电脑，应该就不会出现问题了。如果还有问题，请完整卸载PPLive后重新尝试。 相关文章 如何成功安装Windows Live Essentials 4 Beta( 0 ) Windows 7正式发布鸟，送上主题一个( 18 )]]></description>
			<content:encoded><![CDATA[<p>PP加速器这个软件其实对我这种带宽有限的人来说，还是相当有作用的。同时它可以十分方便的合成多个视频文件，所以之前一直在使用它。不过最近发现左面的图标和程序会出现不停刷新，抖动和假死的现象，给玩游戏什么的造成了极大影响。</p>
<p> <span id="more-266"></span>
</p>
<p>经过一段时间的研究发现，罪恶的根源来自于PP加速器和一些相关的注册表设置，可以参照下面的方法解决以上现象：</p>
<p>首先，请卸载PP加速器，打开注册表编辑器（WinKey+R，也可以在开始菜单的搜索框中），输入regedit，打开。查找注册表一下位置的键值：</p>
<blockquote><p>HKEY_USERS\.DEFAULT\Control Panel\Desktop\下的</p>
<p>HungAppTimeOut</p>
<p> WaitToKillAppTimeOut     </p></blockquote>
<p></p>
<blockquote><p>HKEY_USERS\.DEFAULT\Control Panel\Desktop\HKEY_CURRENT_USER\Control Panel\Desktop\下的</p>
<p>HungAppTimeOut</p>
<p>WaitToKillAppTimeOut</p>
<p>WaitToKillServiceTimeOut</p>
</blockquote>
<p>找到以下键值之后，删除，重新启动电脑，应该就不会出现问题了。如果还有问题，请完整卸载PPLive后重新尝试。</p>
<h3>相关文章</h3>
<ul class="related_posts">
<li><a href="http://www.kernel2heart.com/2010/06/how-to-install-windows-live-essentials-4-beta/" title="如何成功安装Windows Live Essentials 4 Beta" rel="bookmark inlinks">如何成功安装Windows Live Essentials 4 Beta</a><span class="count">( 0 )</span></li>
<li><a href="http://www.kernel2heart.com/2009/10/windows7-released/" title="Windows 7正式发布鸟，送上主题一个" rel="bookmark inlinks">Windows 7正式发布鸟，送上主题一个</a><span class="count">( 18 )</span></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.kernel2heart.com/2009/10/ppva-not-compatible-with-windows7/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>GreaseMonkey的应用真是强大</title>
		<link>http://www.kernel2heart.com/2009/10/powerful-plugin-greasemonkey/</link>
		<comments>http://www.kernel2heart.com/2009/10/powerful-plugin-greasemonkey/#comments</comments>
		<pubDate>Fri, 23 Oct 2009 10:34:28 +0000</pubDate>
		<dc:creator>janxin</dc:creator>
				<category><![CDATA[技术交流]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[GreaseMonkey]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Script]]></category>

		<guid isPermaLink="false">http://www.kernel2heart.com/2009/10/powerful-plugin-greasemonkey/</guid>
		<description><![CDATA[今天无聊，想去下一个漫画来看，本来嘛，想着FX这么强大，一定有相关的扩展了，搜索了一番，失望而归。如果你晓得什么在看图的时候可以自动下载指定网址序列下图片的插件，也欢迎指教！ 好吧，事实上我打算写的东西也不在这个里面，仅仅只是一些简单的GM应用而已。 首先推荐一本入门教程，非常不错，像我这样的脚本白痴都可以看的懂的：《深入浅出Greasemonkey》。在里面也有很多很简单，但是却非常实用的例子，为快速上手GreaseMonkey脚本编写提供了非常方便的指南。 在参阅该教程几页之后，我也可以写一个清爽页面的脚本啦： 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 // ==UserScript== // @name 百度贴吧侧边栏广告去除器 // @namespace http://www.kernel2heart.com // @description 去除百度贴吧侧边栏广告，免广告功能请配合Adblock Plua使用 // @include http://tieba.baidu.com/* // @author 灰机要考研 // @version 0.01 /* @reason * 支持去除普通百度贴吧侧边栏广告 * 横幅flash和图片广告请使用Adblock plus去除 @end*/ // ==/UserScript== &#160; var adSidebar [...]]]></description>
			<content:encoded><![CDATA[<p>今天无聊，想去下一个漫画来看，本来嘛，想着FX这么强大，一定有相关的扩展了，搜索了一番，失望而归。如果你晓得什么<strong><font color="#ff0000">在看图的时候可以自动下载指定网址序列下图片的插件</font></strong>，也欢迎指教！</p>
<p>   <span id="more-261"></span>
<p>好吧，事实上我打算写的东西也不在这个里面，仅仅只是一些简单的GM应用而已。</p>
<p>首先推荐一本入门教程，非常不错，像我这样的脚本白痴都可以看的懂的：《<a href="http://www.firefox.net.cn/dig/" target="_blank">深入浅出Greasemonkey</a>》。在里面也有很多很简单，但是却非常实用的例子，为快速上手<a href="http://www.kernel2heart.com/labels/greasemonkey/" class="st_tag internal_tag" rel="tag" title="Posts tagged with GreaseMonkey">GreaseMonkey</a>脚本编写提供了非常方便的指南。</p>
<p>在参阅该教程几页之后，我也可以写一个清爽页面的脚本啦：</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
</pre></td><td class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #006600; font-style: italic;">// ==UserScript==</span>
<span style="color: #006600; font-style: italic;">// @name           百度贴吧侧边栏广告去除器</span>
<span style="color: #006600; font-style: italic;">// @namespace      http://www.kernel2heart.com</span>
<span style="color: #006600; font-style: italic;">// @description    去除百度贴吧侧边栏广告，免广告功能请配合Adblock Plua使用</span>
<span style="color: #006600; font-style: italic;">// @include        http://tieba.baidu.com/*</span>
<span style="color: #006600; font-style: italic;">// @author         灰机要考研</span>
<span style="color: #006600; font-style: italic;">// @version        0.01</span>
<span style="color: #006600; font-style: italic;">/* @reason
* 支持去除普通百度贴吧侧边栏广告
* 横幅flash和图片广告请使用Adblock plus去除
@end*/</span>
<span style="color: #006600; font-style: italic;">// ==/UserScript==</span>
&nbsp;
<span style="color: #003366; font-weight: bold;">var</span> adSidebar <span style="color: #339933;">=</span> document.<span style="color: #660066;">getElementById</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'rightAd'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>adSidebar<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    adSidebar.<span style="color: #660066;">parentNode</span>.<span style="color: #660066;">removeChild</span><span style="color: #009900;">&#40;</span>adSidebar<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>如果比较感兴趣如何实现这些功能的，可以参见《<a href="http://www.firefox.net.cn/dig/" target="_blank">深入浅出Greasemonkey</a>》。GM的功能在处理网页时实在是太强大了，通过<a href="http://www.kernel2heart.com/labels/greasemonkey/" class="st_tag internal_tag" rel="tag" title="Posts tagged with GreaseMonkey">GreaseMonkey</a>就可以轻松操纵网页的任意内容了，不过可惜的是，就我的使用经验来说，好像GM需要等待页面载入完成之后才会执行脚本，这样的话，比如载入去广告脚本的时候，广告还是会一闪而过的，算是一个缺点吧。</p>
<p>我是一个JS苦手，其实在去除其他广告时也有其他措施的，例如一个Div广告具有class=sponsoredlink属性，且唯一，可以这样获得：</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
</pre></td><td class="code"><pre class="javascript" style="font-family:monospace;">thisDiv <span style="color: #339933;">=</span> document.<span style="color: #660066;">evaluate</span><span style="color: #009900;">&#40;</span>
    <span style="color: #3366CC;">&quot;//div[@class='sponsoredlink']&quot;</span><span style="color: #339933;">,</span>
    document<span style="color: #339933;">,</span>
    <span style="color: #003366; font-weight: bold;">null</span><span style="color: #339933;">,</span>
    XPathResult.<span style="color: #660066;">UNORDERED_NODE_SNAPSHOT_TYPE</span><span style="color: #339933;">,</span>
    <span style="color: #003366; font-weight: bold;">null</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>如果属性不唯一的话，会返回元素组，如果RemoveChild的时候，会对所有元素进行操作。</p>
<p>有其他问题，欢迎一起交流，GM脚本的编写我才刚刚开始看，如果你有兴趣，我们可以一起学习。</p>
<h3>相关文章</h3>
<ul class="related_posts">
<li><a href="http://www.kernel2heart.com/2010/08/c-sharp-get-pc-cpu-memory-class/" title="C#获取本机CPU、内存信息类" rel="bookmark inlinks">C#获取本机CPU、内存信息类</a><span class="count">( 5 )</span></li>
<li><a href="http://www.kernel2heart.com/2009/07/security-enhancements-in-the-crt/" title="一个小细节：Security Enhancements in the CRT" rel="bookmark inlinks">一个小细节：Security Enhancements in the CRT</a><span class="count">( 2 )</span></li>
<li><a href="http://www.kernel2heart.com/2009/10/five-open-source-licenses-comparison/" title="[ZT]五种开源协议的比较(BSD,Apache,GPL,LGPL,MIT)" rel="bookmark inlinks">[ZT]五种开源协议的比较(BSD,Apache,GPL,LGPL,MIT)</a><span class="count">( 2 )</span></li>
<li><a href="http://www.kernel2heart.com/2009/10/new-gae-proxy/" title="新的GAE代理软件酝酿中" rel="bookmark inlinks">新的GAE代理软件酝酿中</a><span class="count">( 29 )</span></li>
<li><a href="http://www.kernel2heart.com/2010/07/a-clipboard-hijack-code/" title="一个有趣的禁止复制代码" rel="bookmark inlinks">一个有趣的禁止复制代码</a><span class="count">( 10 )</span></li>
<li><a href="http://www.kernel2heart.com/2010/01/%e6%a7%8b%e5%bb%baiphone%e9%96%8b%e7%99%bc%e5%b9%b3%e8%87%ba/" title="構建iPhone開發平臺" rel="bookmark inlinks">構建iPhone開發平臺</a><span class="count">( 2 )</span></li>
<li><a href="http://www.kernel2heart.com/2010/06/how-to-add-links-to-web-by-greasemonkey/" title="如何使用GreaseMonkey给页面添加超链接" rel="bookmark inlinks">如何使用GreaseMonkey给页面添加超链接</a><span class="count">( 5 )</span></li>
<li><a href="http://www.kernel2heart.com/2009/09/csharp-winform-effect/" title="C#中實現窗體的淡入淡出" rel="bookmark inlinks">C#中實現窗體的淡入淡出</a><span class="count">( 2 )</span></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.kernel2heart.com/2009/10/powerful-plugin-greasemonkey/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Firefox Portable安装插件</title>
		<link>http://www.kernel2heart.com/2009/10/how-to-install-plugins-into-firefox-portable/</link>
		<comments>http://www.kernel2heart.com/2009/10/how-to-install-plugins-into-firefox-portable/#comments</comments>
		<pubDate>Wed, 14 Oct 2009 05:03:00 +0000</pubDate>
		<dc:creator>janxin</dc:creator>
				<category><![CDATA[技术交流]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[Plugins]]></category>

		<guid isPermaLink="false">http://www.kernel2heart.com/2009/10/how-to-install-plugins-into-firefox-portable/</guid>
		<description><![CDATA[首先，你要區分清楚什麼是Firefox的擴展，什麼是Firefox的插件： 插件通常是第三方应用程序提供给firefox使用的二进制文件。也就是说第三方应用程序把相关功能编译成了二进制的机器指令提供给各类浏览器，方便它们调用。 windows下的firefox插件通常是dll格式，例如，Adobe提供给firefox的插件“Adobe shockwave flash”则使其能显示网页中嵌入的flash。 扩展通常是扩展开发者为了修改或者增强firefox本身的功能而提供的一种打包格式。它通常由包含功能代码的js脚本、包含界面的xul文件以及包含皮肤的css文件和各种图像文件组成。少数特定平台下的扩展可能还会附带一些二进制文件。扩展的格式都是xpi后缀的。常见的扩展有noscript、adblock plus等。 援引自：http://www.firefox.net.cn/forum/viewtopic.php?t=25314 之所以會提到給Firefox Portable添加插件是因為我在安裝WMP插件的時候發現Firefox Portable程序不能正確識別通過安裝方式安裝的WMP for Firefox，這就給我看一些視頻趙成了困擾。本著研究精神，我分析了一下Firefox Portable插件的安裝方法。 如果你沒興趣看分析，可以直接跳到安裝步驟中去，中間基本屬於廢話。 Firefox本身的插件識別方法 Firefox本身在識別插件的時候利用了註冊表查找註冊了的插件列表，其目錄保存在註冊表中的以下項目中： HKEY_CURRENT_USER\Software\MozillaPlugins HKEY_LOCAL_MACHINE\SOFTWARE\MozillaPlugins 並且更新至Data數據文件的Pluginreg.dat文件中。經過觀察發現HKEY_LOCAL_MACHINE\SOFTWARE\MozillaPlugins保存了絕大部分的插件，以公司名和版本號命名，非常容易識別。在普通版Firefox安裝WMP等插件時，會自動創建對應的註冊表項目，並且把對應的文件拷貝到Plugins目錄下對應文件。例如WMP插件安裝時會安裝np-mswmp.dll、WMP Firefox Plugin License.rtf和WMP Firefox Plugin RelNotes.txt三個文件。其中np-mswmp.dll才是最核心的文件。 如何為Firefox Portable安裝插件 最初我把問題考慮的太過複雜，實際上，如果想要安裝插件到Firefox Portable，僅僅需要將對應插件的DLL文件拷貝到Firefox Portable安裝目錄下的Data\Plugins目錄下，Firefox Portable會自動識別對應的插件並使用了。 已安裝WMP for firefox為例，提取DLL文件np-mswmp.dll，拷貝到Firefox Portable安裝目錄下的Data\Plugins目錄下之後，重啟Firefox，就可以自動識別對應的插件了。 &#160; 文中提到的WMP插件下載：brsbox &#124; vDisk 相关文章 [警告]Comment Digg插件与Sample Tags插件存在兼容性问题( 0 ) Hello world！( 0 ) 原来做一个网站如此复杂( 0 ) 如何使用GreaseMonkey给页面添加超链接( 5 [...]]]></description>
			<content:encoded><![CDATA[<p>首先，你要區分清楚什麼是Firefox的擴展，什麼是Firefox的插件：</p>
<blockquote><p><strong><font color="#ff0000">插件</font></strong>通常是第三方应用程序提供给firefox使用的二进制文件。也就是说第三方应用程序把相关功能编译成了二进制的机器指令提供给各类浏览器，方便它们调用。 <a href="http://www.kernel2heart.com/labels/windows/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Windows">windows</a>下的firefox插件通常是dll格式，例如，Adobe提供给firefox的插件“Adobe shockwave flash”则使其能显示网页中嵌入的flash。</p>
<p><strong><font color="#ff0000">扩展</font></strong>通常是扩展开发者为了修改或者增强firefox本身的功能而提供的一种打包格式。它通常由包含功能代码的js脚本、包含界面的xul文件以及包含皮肤的css文件和各种图像文件组成。少数特定平台下的扩展可能还会附带一些二进制文件。扩展的格式都是xpi后缀的。常见的扩展有noscript、adblock plus等。 </p>
<p>援引自：<a title="http://www.firefox.net.cn/forum/viewtopic.php?t=25314" href="http://www.firefox.net.cn/forum/viewtopic.php?t=25314">http://www.firefox.net.cn/forum/viewtopic.php?t=25314</a></p>
</blockquote>
<p>之所以會提到給Firefox Portable添加插件是因為我在安裝WMP插件的時候發現Firefox Portable程序不能正確識別通過安裝方式安裝的WMP for Firefox，這就給我看一些視頻趙成了困擾。本著研究精神，我分析了一下Firefox Portable插件的安裝方法。</p>
<p> <span id="more-240"></span>
</p>
<p>如果你沒興趣看分析，可以直接跳到安裝步驟中去，中間基本屬於廢話。</p>
<h2>Firefox本身的插件識別方法</h2>
<p>Firefox本身在識別插件的時候利用了註冊表查找註冊了的插件列表，其目錄保存在註冊表中的以下項目中：</p>
<blockquote><p>HKEY_CURRENT_USER\Software\MozillaPlugins</p>
<p>HKEY_LOCAL_MACHINE\SOFTWARE\MozillaPlugins</p>
</blockquote>
<p>並且更新至Data數據文件的Pluginreg.dat文件中。經過觀察發現HKEY_LOCAL_MACHINE\SOFTWARE\MozillaPlugins保存了絕大部分的插件，以公司名和版本號命名，非常容易識別。在普通版Firefox安裝WMP等插件時，會自動創建對應的註冊表項目，並且把對應的文件拷貝到<a href="http://www.kernel2heart.com/labels/plugins/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Plugins">Plugins</a>目錄下對應文件。例如WMP插件安裝時會安裝np-mswmp.dll、WMP Firefox Plugin License.rtf和WMP Firefox Plugin RelNotes.txt三個文件。其中np-mswmp.dll才是最核心的文件。</p>
<h2>如何為Firefox Portable安裝插件</h2>
<p>最初我把問題考慮的太過複雜，實際上，如果想要安裝插件到Firefox Portable，僅僅需要將對應插件的DLL文件拷貝到Firefox Portable安裝目錄下的Data\<a href="http://www.kernel2heart.com/labels/plugins/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Plugins">Plugins</a>目錄下，Firefox Portable會自動識別對應的插件並使用了。</p>
<p>已安裝WMP for firefox為例，提取DLL文件np-mswmp.dll，拷貝到Firefox Portable安裝目錄下的Data\<a href="http://www.kernel2heart.com/labels/plugins/" class="st_tag internal_tag" rel="tag" title="Posts tagged with Plugins">Plugins</a>目錄下之後，重啟Firefox，就可以自動識別對應的插件了。</p>
<p>&#160;</p>
<p>文中提到的WMP插件下載：<a href="http://www.brsbox.com/filebox/down/fc/856f9d5ee34968a1859513767190a5ad" target="_blank">brsbox</a> | <a href="http://www.vdisk.cn/down/index/3770269A3170/np-mswmp.zip.html" target="_blank">vDisk</a></p>
<h3>相关文章</h3>
<ul class="related_posts">
<li><a href="http://www.kernel2heart.com/2009/06/comment-digg-can-not-work-with-sample-tags/" title="[警告]Comment Digg插件与Sample Tags插件存在兼容性问题" rel="bookmark inlinks">[警告]Comment Digg插件与Sample Tags插件存在兼容性问题</a><span class="count">( 0 )</span></li>
<li><a href="http://www.kernel2heart.com/2009/10/powerful-plugin-greasemonkey/" title="GreaseMonkey的应用真是强大" rel="bookmark inlinks">GreaseMonkey的应用真是强大</a><span class="count">( 8 )</span></li>
<li><a href="http://www.kernel2heart.com/2009/06/it-is-hard-to-build-a-website/" title="原来做一个网站如此复杂" rel="bookmark inlinks">原来做一个网站如此复杂</a><span class="count">( 0 )</span></li>
<li><a href="http://www.kernel2heart.com/2009/06/hello-world/" title="Hello world！" rel="bookmark inlinks">Hello world！</a><span class="count">( 0 )</span></li>
<li><a href="http://www.kernel2heart.com/2009/10/new-sync-plugin-weave/" title="用于替代Xmarks的Firefox同步扩展：Weave" rel="bookmark inlinks">用于替代Xmarks的Firefox同步扩展：Weave</a><span class="count">( 5 )</span></li>
<li><a href="http://www.kernel2heart.com/2009/07/firefox-3-5-released/" title="Firefox 3.5 Released" rel="bookmark inlinks">Firefox 3.5 Released</a><span class="count">( 2 )</span></li>
<li><a href="http://www.kernel2heart.com/2009/09/let-us-kill-ie6/" title="Let us kill IE6" rel="bookmark inlinks">Let us kill IE6</a><span class="count">( 13 )</span></li>
<li><a href="http://www.kernel2heart.com/2010/06/how-to-add-links-to-web-by-greasemonkey/" title="如何使用GreaseMonkey给页面添加超链接" rel="bookmark inlinks">如何使用GreaseMonkey给页面添加超链接</a><span class="count">( 5 )</span></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.kernel2heart.com/2009/10/how-to-install-plugins-into-firefox-portable/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>
