<?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>Dutor &#187; 麻烦</title>
	<atom:link href="http://www.dutor.net/index.php/tag/problems/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dutor.net</link>
	<description>熟读而精思，循序而渐进，厚积而薄发。</description>
	<lastBuildDate>Tue, 17 Jan 2012 14:44:19 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Grub无法识别USB键盘</title>
		<link>http://www.dutor.net/index.php/2010/07/grub-bios-usb-keyboard/</link>
		<comments>http://www.dutor.net/index.php/2010/07/grub-bios-usb-keyboard/#comments</comments>
		<pubDate>Sat, 03 Jul 2010 00:08:19 +0000</pubDate>
		<dc:creator>dutor</dc:creator>
				<category><![CDATA[尚未分类]]></category>
		<category><![CDATA[麻烦]]></category>

		<guid isPermaLink="false">http://www.dutor.net/?p=2332</guid>
		<description><![CDATA[　　我的台式机，以前用的键盘一直是PS/2接口的，前些天换了个USB口的。一直没发现问题，知道昨天想进Windows办点私事儿，才发觉在Grub里面，无法用键盘选择操作系统，只能进入默认的Linux。
　　起初怀疑是操作系统的驱动问题，但马上就排除了，因为Grub引导阶段，OS还没有降生呢！
　　接下来就是Grub了，但大名鼎鼎的Grub怎会不支持USB键盘呢。
　　最后需要考虑的就是BIOS了，键盘鼠标之类的简单硬件都由它来控制。进入BIOS，果然后USB Keyboard的使能选项，选择Enable，重启，问题解决了。
　　记住，还有个BIOS。]]></description>
			<content:encoded><![CDATA[<p>　　我的台式机，以前用的键盘一直是PS/2接口的，前些天换了个USB口的。一直没发现问题，知道昨天想进Windows办点私事儿，才发觉在Grub里面，无法用键盘选择操作系统，只能进入默认的Linux。<br />
　　起初怀疑是操作系统的驱动问题，但马上就排除了，因为Grub引导阶段，OS还没有降生呢！<br />
　　接下来就是Grub了，但大名鼎鼎的Grub怎会不支持USB键盘呢。<br />
　　最后需要考虑的就是BIOS了，键盘鼠标之类的简单硬件都由它来控制。进入BIOS，果然后USB Keyboard的使能选项，选择Enable，重启，问题解决了。<br />
　　记住，还有个BIOS。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dutor.net/index.php/2010/07/grub-bios-usb-keyboard/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Visual Studio中的Functional</title>
		<link>http://www.dutor.net/index.php/2010/04/visual-studio-functional/</link>
		<comments>http://www.dutor.net/index.php/2010/04/visual-studio-functional/#comments</comments>
		<pubDate>Sun, 18 Apr 2010 09:04:46 +0000</pubDate>
		<dc:creator>dutor</dc:creator>
				<category><![CDATA[之语言特性]]></category>
		<category><![CDATA[边走编程]]></category>
		<category><![CDATA[麻烦]]></category>

		<guid isPermaLink="false">http://www.dutor.net/?p=2149</guid>
		<description><![CDATA[　　今天在VS中遇到一个十分诡异的事情，先看下面这个简单的程序：
<pre lang="cpp" line="1">
class cmp
{
public:
	bool operator()(long long l, long long r)
	{
		//~ 此间内容可略去不看。
		//~ 如果l和r含有的digits完全相同则返回false,
		//~ 如125 vs. 512
		char tmp1[1024], tmp2[1024];
		sprintf(tmp1,"%ld",l);
		sprintf(tmp2,"%ld",r);
		sort(tmp1, tmp1+strlen(tmp1));
		sort(tmp2, tmp2+strlen(tmp2));
		if (!strcmp(tmp1, tmp2))
		{
			return false;
		}
		return true;
	}
};
</pre>
]]></description>
			<content:encoded><![CDATA[<p>　　今天在VS中遇到一个十分诡异的事情，先看下面这个简单的程序：</p>

<div class="wp_codebox"><table><tr id="p21491"><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
25
26
27
28
29
30
31
32
</pre></td><td class="code" id="p2149code1"><pre class="cpp" style="font-family:monospace;"><span style="color: #339900;">#include &lt;iostream&gt;</span>
<span style="color: #339900;">#include &lt;set&gt;</span>
<span style="color: #339900;">#include &lt;algorithm&gt;</span>
<span style="color: #0000ff;">using</span> <span style="color: #0000ff;">namespace</span> std<span style="color: #008080;">;</span>
<span style="color: #0000ff;">class</span> cmp
<span style="color: #008000;">&#123;</span>
<span style="color: #0000ff;">public</span><span style="color: #008080;">:</span>
	<span style="color: #0000ff;">bool</span> operator<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#40;</span><span style="color: #0000ff;">long</span> <span style="color: #0000ff;">long</span> l, <span style="color: #0000ff;">long</span> <span style="color: #0000ff;">long</span> r<span style="color: #008000;">&#41;</span>
	<span style="color: #008000;">&#123;</span>
		<span style="color: #666666;">//~ 此间内容可略去不看。</span>
		<span style="color: #666666;">//~ 如果l和r含有的digits完全相同则返回false,</span>
		<span style="color: #666666;">//~ 如125 vs. 512</span>
		<span style="color: #0000ff;">char</span> tmp1<span style="color: #008000;">&#91;</span><span style="color: #0000dd;">1024</span><span style="color: #008000;">&#93;</span>, tmp2<span style="color: #008000;">&#91;</span><span style="color: #0000dd;">1024</span><span style="color: #008000;">&#93;</span><span style="color: #008080;">;</span>
		<span style="color: #0000dd;">sprintf</span><span style="color: #008000;">&#40;</span>tmp1,<span style="color: #FF0000;">&quot;%ld&quot;</span>,l<span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
		<span style="color: #0000dd;">sprintf</span><span style="color: #008000;">&#40;</span>tmp2,<span style="color: #FF0000;">&quot;%ld&quot;</span>,r<span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
		sort<span style="color: #008000;">&#40;</span>tmp1, tmp1<span style="color: #000040;">+</span><span style="color: #0000dd;">strlen</span><span style="color: #008000;">&#40;</span>tmp1<span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
		sort<span style="color: #008000;">&#40;</span>tmp2, tmp2<span style="color: #000040;">+</span><span style="color: #0000dd;">strlen</span><span style="color: #008000;">&#40;</span>tmp2<span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
		<span style="color: #0000ff;">if</span> <span style="color: #008000;">&#40;</span><span style="color: #000040;">!</span><span style="color: #0000dd;">strcmp</span><span style="color: #008000;">&#40;</span>tmp1, tmp2<span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span>
		<span style="color: #008000;">&#123;</span>
			<span style="color: #0000ff;">return</span> <span style="color: #0000ff;">false</span><span style="color: #008080;">;</span>
		<span style="color: #008000;">&#125;</span>
		<span style="color: #0000ff;">return</span> <span style="color: #0000ff;">true</span><span style="color: #008080;">;</span>
	<span style="color: #008000;">&#125;</span>
<span style="color: #008000;">&#125;</span><span style="color: #008080;">;</span>
<span style="color: #0000ff;">int</span> main<span style="color: #008000;">&#40;</span><span style="color: #0000ff;">int</span> argc, <span style="color: #0000ff;">char</span><span style="color: #000040;">*</span> argv<span style="color: #008000;">&#91;</span><span style="color: #008000;">&#93;</span><span style="color: #008000;">&#41;</span>
<span style="color: #008000;">&#123;</span>
	set<span style="color: #000080;">&lt;</span><span style="color: #0000ff;">long</span> <span style="color: #0000ff;">long</span>,cmp <span style="color: #000080;">&gt;</span> Set<span style="color: #008080;">;</span>
	<span style="color: #0000ff;">int</span> a<span style="color: #008000;">&#91;</span><span style="color: #0000dd;">15</span><span style="color: #008000;">&#93;</span><span style="color: #008080;">;</span>
	Set.<span style="color: #007788;">insert</span><span style="color: #008000;">&#40;</span><span style="color: #0000dd;">1</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
	Set.<span style="color: #007788;">insert</span><span style="color: #008000;">&#40;</span><span style="color: #0000dd;">2</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span> <span style="color: #666666;">//~ 此处疯狂</span>
	<span style="color: #0000ff;">return</span> <span style="color: #0000dd;">0</span><span style="color: #008080;">;</span>
<span style="color: #008000;">&#125;</span></pre></td></tr></table></div>

<p>　　程序在这个地方跑偏了，弹出这么个东西</p>
<p><a href="http://www.dutor.net/index.php/2010/04/visual-studio-functional/vsnaocan/" rel="attachment wp-att-2150"><img src="http://www.dutor.net/wp-content/uploads/2010/04/vsnaocan.jpg" alt="" title="vsnaocan" width="377" height="244" class="aligncenter size-full wp-image-2150" /></a><br />
　　可是set的key_compare我一直都是这么用的啊。把程序拷到Linux下面用g++就一切正常。望达人指教。</p>
<h4>更新</h4>
<p>　　Johnny同学给的贴文中提到了，一个predicate对于任两个参数a,b不能返回<strong>两个true</strong>，即pred(a, b)和pred(b, a)不能同时返回true，这是strict weak规则决定的。代码为证：</p>

<div class="wp_codebox"><table><tr id="p21492"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
</pre></td><td class="code" id="p2149code2"><pre class="cpp" style="font-family:monospace;"><span style="color: #0000ff;">template</span><span style="color: #000080;">&lt;</span><span style="color: #0000ff;">class</span> _Pr, <span style="color: #0000ff;">class</span> _Ty1, <span style="color: #0000ff;">class</span> _Ty2<span style="color: #000080;">&gt;</span> <span style="color: #0000ff;">inline</span>
    <span style="color: #0000ff;">bool</span> __CLRCALL_OR_CDECL _Debug_lt_pred<span style="color: #008000;">&#40;</span>_Pr _Pred, _Ty1<span style="color: #000040;">&amp;</span> _Left, _Ty2<span style="color: #000040;">&amp;</span> _Right,
        <span style="color: #0000ff;">const</span> <span style="color: #0000ff;">wchar_t</span> <span style="color: #000040;">*</span>_Where, <span style="color: #0000ff;">unsigned</span> <span style="color: #0000ff;">int</span> _Line<span style="color: #008000;">&#41;</span>
    <span style="color: #008000;">&#123;</span>    <span style="color: #666666;">// test if _Pred(_Left, _Right)  and _Pred is strict weak ordering</span>
    <span style="color: #0000ff;">if</span> <span style="color: #008000;">&#40;</span><span style="color: #000040;">!</span>_Pred <span style="color: #008000;">&#40;</span>_Left, _Right<span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span>
        <span style="color: #0000ff;">return</span> <span style="color: #008000;">&#40;</span><span style="color: #0000ff;">false</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
    <span style="color: #0000ff;">else</span> <span style="color: #0000ff;">if</span> <span style="color: #008000;">&#40;</span>_Pred<span style="color: #008000;">&#40;</span>_Right, _Left<span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span>
        _DEBUG_ERROR2<span style="color: #008000;">&#40;</span><span style="color: #FF0000;">&quot;invalid operator&lt;&quot;</span>, _Where, _Line<span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
    <span style="color: #0000ff;">return</span> <span style="color: #008000;">&#40;</span><span style="color: #0000ff;">true</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
    <span style="color: #008000;">&#125;</span></pre></td></tr></table></div>

<p>　　即是说，在调试时（特指Visual Studio的debug模式），bool _Debug_lt_pred()模板函数会对pred(a, b)的返回结果进行检查。如果pred(a, b)返回false没有问题。但如果其返回true，那么_Debug_lt_pred还会对pred(b, a)进行检查，若也返回true就会触发assert（有上图为证）。<br />
　　对于本文最初的代码，为了通过的_Debug_lt_pred的检查，我可以：</p>

<div class="wp_codebox"><table><tr id="p21493"><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
</pre></td><td class="code" id="p2149code3"><pre class="cpp" style="font-family:monospace;"><span style="color: #0000ff;">class</span> cmp
<span style="color: #008000;">&#123;</span>
<span style="color: #0000ff;">public</span><span style="color: #008080;">:</span>
	<span style="color: #0000ff;">bool</span> operator<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#40;</span><span style="color: #0000ff;">long</span> <span style="color: #0000ff;">long</span> l, <span style="color: #0000ff;">long</span> <span style="color: #0000ff;">long</span> r<span style="color: #008000;">&#41;</span>
	<span style="color: #008000;">&#123;</span>
		<span style="color: #666666;">//~ ……</span>
		<span style="color: #0000ff;">if</span> <span style="color: #008000;">&#40;</span><span style="color: #000040;">!</span><span style="color: #0000dd;">strcmp</span><span style="color: #008000;">&#40;</span>tmp1, tmp2<span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span>
		<span style="color: #008000;">&#123;</span>
			<span style="color: #0000ff;">return</span> <span style="color: #0000ff;">false</span><span style="color: #008080;">;</span>
		<span style="color: #008000;">&#125;</span>
                <span style="color: #0000ff;">else</span>
		        <span style="color: #0000ff;">return</span> l <span style="color: #000080;">&lt;</span> r<span style="color: #008080;">;</span>
	<span style="color: #008000;">&#125;</span>
<span style="color: #008000;">&#125;</span><span style="color: #008080;">;</span></pre></td></tr></table></div>

<p>这样就保证了cmp::(long long, long long)不会返回<strong>&#8220;两个true&#8221;</strong>了</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dutor.net/index.php/2010/04/visual-studio-functional/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>初识Python</title>
		<link>http://www.dutor.net/index.php/2010/03/touch-python/</link>
		<comments>http://www.dutor.net/index.php/2010/03/touch-python/#comments</comments>
		<pubDate>Mon, 01 Mar 2010 08:56:05 +0000</pubDate>
		<dc:creator>dutor</dc:creator>
				<category><![CDATA[尚未分类]]></category>
		<category><![CDATA[GFW]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[麻烦]]></category>

		<guid isPermaLink="false">http://www.dutor.net/?p=1995</guid>
		<description><![CDATA[　　在家里闲着实在憋屈。想接触下Python，用我弱弱的手机找了个<a href="http://paper.sebug.net/python/" target="_blank">《Python简明教程》</a>大致地过了一遍。找了家网吧想下个Python安装程序练练手，结果发现<a href="http://www.python.org" target="_blank">Python.org</a>居然被墙了！幸好前几天殷殷给了一个翻墙用的包GAppProxy，马上就派上用场了。翻将过去，就看到那两条亲密无间的“蛇”了。

　　F**K！难道G*F*W连个编程语言都不放过？Python是个不和谐的语言？可能吧，上面的翻墙工具就是Python吐出来的。Python另一个被墙的理由就是Python.com了，这是一个不河蟹的网站，简直就是十分不和谐……

　　附上GAppProxy.rar。加压后运行gui.exe，设置代理服务器为127.0.0.1：8000（端口可以自己设定）。]]></description>
			<content:encoded><![CDATA[<p>　　在家里闲着实在憋屈。想接触下Python，用我弱弱的手机找了个<a href="http://paper.sebug.net/python/" target="_blank">《Python简明教程》</a>大致地过了一遍。找了家网吧想下个Python安装程序练练手，结果发现<a href="http://www.python.org" target="_blank">Python.org</a>居然被墙了！幸好前几天殷殷给了一个翻墙用的包GAppProxy，马上就派上用场了。翻将过去，就看到那两条亲密无间的“蛇”了。</p>
<p>　　F**K！难道G*F*W连个编程语言都不放过？Python是个不和谐的语言？可能吧，上面的翻墙工具就是Python吐出来的。Python另一个被墙的理由就是Python.com了，这是一个不河蟹的网站，简直就是十分不和谐……</p>
<p>　　附上<a href="http://dutor.googlecode.com/files/GAppProxy.rar">GAppProxy.rar</a>。加压后运行gui.exe，设置代理服务器为127.0.0.1：8000（端口可以自己设定）。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dutor.net/index.php/2010/03/touch-python/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>关闭关机时的响铃</title>
		<link>http://www.dutor.net/index.php/2009/04/shutdown-system-bells/</link>
		<comments>http://www.dutor.net/index.php/2009/04/shutdown-system-bells/#comments</comments>
		<pubDate>Wed, 29 Apr 2009 04:01:04 +0000</pubDate>
		<dc:creator>dutor</dc:creator>
				<category><![CDATA[Unix/Linux]]></category>
		<category><![CDATA[OS基础]]></category>
		<category><![CDATA[麻烦]]></category>

		<guid isPermaLink="false">http://www.dutor.net/?p=293</guid>
		<description><![CDATA[<blockquote>ubuntu每次关机时都会“嘀”的一声，在笔记本中则可能是“嘟嘟”的巨响，而且终端的操作也经常会发出这种声音，甚是难听！彻底解决的办法是禁用驱动系统喇叭的内存模块，在终端输入命令：</blockquote>

<pre lang="bash" >sudo modprobe -r pcspkr</pre>


<blockquote>或者：</blockquote>
<pre lang="bash" >sudo rmmod pcspkr</pre>
]]></description>
			<content:encoded><![CDATA[<blockquote><p>ubuntu每次关机时都会“嘀”的一声，在笔记本中则可能是“嘟嘟”的巨响，而且终端的操作也经常会发出这种声音，甚是难听！彻底解决的办法是禁用驱动系统喇叭的内存模块，在终端输入命令：</p></blockquote>

<div class="wp_codebox"><table><tr id="p2934"><td class="code" id="p293code4"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> modprobe <span style="color: #660033;">-r</span> pcspkr</pre></td></tr></table></div>

<blockquote><p>或者：</p></blockquote>

<div class="wp_codebox"><table><tr id="p2935"><td class="code" id="p293code5"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> rmmod pcspkr</pre></td></tr></table></div>

<p>[warning]This is <em>original</em> article, you could copy it freely with my site links!<br />此日志为dutor原创，您可以自由转载，添加原文链接我将万分感激！[/warning]</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dutor.net/index.php/2009/04/shutdown-system-bells/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The firefox restart problem</title>
		<link>http://www.dutor.net/index.php/2009/04/the-firefox-restart-problem/</link>
		<comments>http://www.dutor.net/index.php/2009/04/the-firefox-restart-problem/#comments</comments>
		<pubDate>Wed, 29 Apr 2009 03:49:12 +0000</pubDate>
		<dc:creator>dutor</dc:creator>
				<category><![CDATA[Unix/Linux]]></category>
		<category><![CDATA[程序应用]]></category>
		<category><![CDATA[麻烦]]></category>

		<guid isPermaLink="false">http://www.dutor.net/?p=291</guid>
		<description><![CDATA[<blockquote>Here I am in the contemporarily latest distribution of ubuntu 9.04. The problem showed up when I updated the firefox to the version 3.0.9, that firefox kept telling me to restart for an update in every tabs in terms of "your browser has been updated and needs to be restarted". While searching the solution online, I found this a bug of firefox, which is caused by a plugin. So I went to the menu: Tools>>Add-ons and disabled the plugin called "ubuntu firefox modification", then after I restarted the firefox, the trouble is gone. 
您的浏览器已经更新，需要重新启动。可能的解决办法：firefox的工具>>附加组件，关闭 Ubuntu Firefox Modification组件，重启浏览器即可。</blockquote>]]></description>
			<content:encoded><![CDATA[<blockquote><p>Here I am in the contemporarily latest distribution of ubuntu 9.04. The problem showed up when I updated the firefox to the version 3.0.9, that firefox kept telling me to restart for an update in every tabs in terms of &#8220;your browser has been updated and needs to be restarted&#8221;. While searching the solution online, I found this a bug of firefox, which is caused by a plugin. So I went to the menu: Tools>>Add-ons and disabled the plugin called &#8220;ubuntu firefox modification&#8221;, then after I restarted the firefox, the trouble is gone.<br />
您的浏览器已经更新，需要重新启动。可能的解决办法：firefox的工具>>附加组件，关闭 Ubuntu Firefox Modification组件，重启浏览器即可。</p></blockquote>
<p>[tip]Good luck buddy![/tip]<br />
[warning]This is <em>original</em> article, you could copy it freely with my site links!<br />此日志为dutor原创，您可以自由转载，添加原文链接我将万分感激！[/warning]</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dutor.net/index.php/2009/04/the-firefox-restart-problem/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ubuntu9.04编译安装显卡驱动</title>
		<link>http://www.dutor.net/index.php/2009/04/ubuntu904-compile-nvidia-display-drivers/</link>
		<comments>http://www.dutor.net/index.php/2009/04/ubuntu904-compile-nvidia-display-drivers/#comments</comments>
		<pubDate>Wed, 29 Apr 2009 01:10:36 +0000</pubDate>
		<dc:creator>dutor</dc:creator>
				<category><![CDATA[Unix/Linux]]></category>
		<category><![CDATA[配置]]></category>
		<category><![CDATA[麻烦]]></category>

		<guid isPermaLink="false">http://www.dutor.net/?p=283</guid>
		<description><![CDATA[<h5>安装前的准备</h5>


<blockquote>首先, 要知道你的显卡的型号, 并下载到相应的驱动程序. 我的显卡是集成的, nVidia Geforce 6100 nForce 405, 在nvidia的驱动<a href="http://http.download.nvidia.com/XFree86/Linux-x86/1.0-8762/README/appendix-a.html">支持列表</a>里面可以找到，同时在驱动<a href="http://www.nvidia.cn/Download/index.aspx?lang=cn">下载页面</a>搜索并下载到名如<em>NVIDIA-Linux-x86-180.51-pkg1.run</em></blockquote>




<blockquote>接着，安装编译驱动程序所需要的包： build-essential pkg-config xserver-xorg-dev libc-devsudo 等等。</blockquote>


<pre lang="bash">
$ sudo apt-get install  build-essential pkg-config xserver-xorg-dev libc-devsudo
</pre>]]></description>
			<content:encoded><![CDATA[<p>[warning]这里只讨论NVIDIA显卡[/warning]</p>
<h6>安装前的准备</h6>
<blockquote><p>首先, 要知道你的显卡的型号, 并下载到相应的驱动程序. 我的显卡是集成的, nVidia Geforce 6100 nForce 405, 在nvidia的驱动<a href="http://http.download.nvidia.com/XFree86/Linux-x86/1.0-8762/README/appendix-a.html">支持列表</a>里面可以找到，同时在驱动<a href="http://www.nvidia.cn/Download/index.aspx?lang=cn">下载页面</a>搜索并下载到名如<em>NVIDIA-Linux-x86-180.51-pkg1.run</em></p></blockquote>
<blockquote><p>接着，安装编译驱动程序所需要的包： build-essential pkg-config xserver-xorg-dev libc-devsudo 等等。</p></blockquote>

<div class="wp_codebox"><table><tr id="p2836"><td class="code" id="p283code6"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span>  build-essential pkg-config xserver-xorg-dev libc-devsudo</pre></td></tr></table></div>

<h6>开始安装</h6>
<blockquote><p>如果你当前是在桌面环境下，那么Ctrl+Alt+F5进入文本模式，输入用户名密码后，进入到驱动程序所在目录。运行：</p></blockquote>

<div class="wp_codebox"><table><tr id="p2837"><td class="code" id="p283code7"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">sh</span> NVIDIA-Linux-x86-<span style="color: #000000;">180.51</span>-pkg1.run</pre></td></tr></table></div>

<blockquote><p>如果提示错误，可以按照提示执行：</p></blockquote>

<div class="wp_codebox"><table><tr id="p2838"><td class="code" id="p283code8"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span>.X0-lock</pre></td></tr></table></div>

<blockquote><p>重新安装，安装过程中，</p>
<p>假如提示有旧驱动，询问是否删除旧驱动，选Yes；<br />
假如提示缺少某某模块（modules），询问是否上网下载，选no；<br />
假如提示编译模块，询问是否进行编译，选ok；<br />
假如提示将要修改Xorg.conf，询问是否答应，选Yes；<br />
接下来就是等待安装完成。 </p></blockquote>
<p><script type="text/javascript"><!--
google_ad_client = "pub-8781012522518994";
/* 468x15, chk_matlab */
google_ad_slot = "0885612183";
google_ad_width = 468;
google_ad_height = 15;
//-->
</script><br />
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
<h5>安装后简单的配置</h5>
<blockquote><p>Ctrl+Alt+F7回到桌面环境，重启，如果桌面分辨率仍然没有改善，则需要修改xorg.conf文件：</p></blockquote>

<div class="wp_codebox"><table><tr id="p2839"><td class="code" id="p283code9"><pre class="bash" style="font-family:monospace;"><span style="color: #007800;">$sudo</span> gedit <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>X11<span style="color: #000000; font-weight: bold;">/</span>xorg.conf</pre></td></tr></table></div>

<blockquote><p>找到形如</p></blockquote>

<div class="wp_codebox"><table><tr id="p28310"><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code" id="p283code10"><pre class="bash" style="font-family:monospace;">    SubSection     <span style="color: #ff0000;">&quot;Display&quot;</span>
        Depth       <span style="color: #000000;">24</span>
    EndSubSection</pre></td></tr></table></div>

<blockquote><p>的一段，修改成：</p></blockquote>

<div class="wp_codebox"><table><tr id="p28311"><td class="line_numbers"><pre>1
2
3
4
5
</pre></td><td class="code" id="p283code11"><pre class="bash" style="font-family:monospace;">    SubSection     <span style="color: #ff0000;">&quot;Display&quot;</span>
        Depth       <span style="color: #000000;">24</span>
        Modes  <span style="color: #ff0000;">&quot;1280x1024&quot;</span> <span style="color: #ff0000;">&quot;1280x960&quot;</span> <span style="color: #ff0000;">&quot;1152x864&quot;</span>
                   <span style="color: #ff0000;">&quot;1024x768&quot;</span> <span style="color: #ff0000;">&quot;832x624&quot;</span> <span style="color: #ff0000;">&quot;800x600&quot;</span> <span style="color: #ff0000;">&quot;720x400&quot;</span> <span style="color: #ff0000;">&quot;640x480&quot;</span>
    EndSubSection</pre></td></tr></table></div>

<blockquote><p>  Modes选项的第一个修改成你显示器适合的分辨率。保存、退出。重启你的桌面。不出意外的话，你的桌面应该是你想要的样子了。</p></blockquote>
<p>[tip]Good luck, buddy![/tip]<br />
[warning]This is <em>original</em> article, you could copy it freely with my site links!<br />此日志为dutor原创，您可以自由转载，添加原文链接我将万分感激！[/warning]</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dutor.net/index.php/2009/04/ubuntu904-compile-nvidia-display-drivers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cannot mount volume</title>
		<link>http://www.dutor.net/index.php/2009/04/cannot-mount-volume/</link>
		<comments>http://www.dutor.net/index.php/2009/04/cannot-mount-volume/#comments</comments>
		<pubDate>Tue, 28 Apr 2009 04:46:22 +0000</pubDate>
		<dc:creator>dutor</dc:creator>
				<category><![CDATA[Unix/Linux]]></category>
		<category><![CDATA[OS基础]]></category>
		<category><![CDATA[麻烦]]></category>

		<guid isPermaLink="false">http://www.dutor.net/?p=275</guid>
		<description><![CDATA[This phenomenon merely happens when your windows had been shutdown innormally or the USB device is unmounted innormally. To fix this problem, just do as the 'Details' tell you:
<pre lang="bash">sudo mount -t ntfs-3g /dev/sdb1 /media/yourvolume -o force</pre>
As the command complishes, you will make it when try mount the very volume another time. Good luck!]]></description>
			<content:encoded><![CDATA[<p>The following warning often appears in the ubuntu linux which is configurative with a windows system when you try to mount the ntfs volume. <img src="http://www.dutor.net/wp-content/uploads/2009/04/mount_warning.png" alt="mount_warning" title="mount_warning" width="378" height="450" class="aligncenter size-full wp-image-276" /><br />
This phenomenon merely happens when your windows had been shutdown innormally or the USB device is unmounted innormally. To fix this problem, just do as the &#8216;Details&#8217; tell you:</p>

<div class="wp_codebox"><table><tr id="p27512"><td class="code" id="p275code12"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">mount</span> <span style="color: #660033;">-t</span> ntfs-3g <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>sdb1 <span style="color: #000000; font-weight: bold;">/</span>media<span style="color: #000000; font-weight: bold;">/</span>yourvolume <span style="color: #660033;">-o</span> force</pre></td></tr></table></div>

<p>As the command complishes, you will make it when try mount the very volume another time. Good luck!<br />
[warning]This is <em>original</em> article, you could copy it freely with my site links!<br />此日志为dutor原创，您可以自由转载，添加原文链接我将万分感激！[/warning]</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dutor.net/index.php/2009/04/cannot-mount-volume/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

