<?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"
	>

<channel>
	<title>Cun Zhang's Blog</title>
	<atom:link href="http://blog.4message.net/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.4message.net</link>
	<description>Math Software,Related</description>
	<pubDate>Thu, 27 Nov 2008 10:53:40 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.3</generator>
	<language>en</language>
			<item>
		<title>VNC  use SSH tunnel on Debian</title>
		<link>http://blog.4message.net/2008/11/06/vnc-use-ssh-tunnel-on-debian.html</link>
		<comments>http://blog.4message.net/2008/11/06/vnc-use-ssh-tunnel-on-debian.html#comments</comments>
		<pubDate>Thu, 06 Nov 2008 11:07:34 +0000</pubDate>
		<dc:creator>Cun Zhang</dc:creator>
		
		<category><![CDATA[Linux]]></category>

		<category><![CDATA[Debian]]></category>

		<category><![CDATA[ssh]]></category>

		<category><![CDATA[vnc]]></category>

		<guid isPermaLink="false">http://blog.4message.net/?p=656</guid>
		<description><![CDATA[
 Install SSH server and VNC server:
apt-get install ssh  vnc4server

SSH server configuration
See My past post SSH login without password
VNC server configuration
cunzhang@node31:~$ cat .vnc/xstartup
#!/bin/sh# Uncomment the following two lines for normal desktop:
# unset SESSION_MANAGER
# exec /etc/X11/xinit/xinitrc[ -x /etc/vnc/xstartup ] &#38;&#38; exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] &#38;&#38; xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &#38;
x-terminal-emulator -geometry 80&#215;24+10+10 -ls [...]]]></description>
			<content:encoded><![CDATA[<ol>
<li> Install SSH server and VNC server:
<p style="padding-left: 60px;">apt-get install ssh  vnc4server</p>
</li>
<li>SSH server configuration<br />
See My past post <a href="http://blog.4message.net/2008/04/24/ssh-login-without-passwordssh-login-without-password.html" target="_blank">SSH login without password</a></li>
<li>VNC server configuration<br />
cunzhang@node31:~$ cat .vnc/xstartup</p>
<p style="padding-left: 60px;">#!/bin/sh# Uncomment the following two lines for normal desktop:<br />
# unset SESSION_MANAGER<br />
# exec /etc/X11/xinit/xinitrc[ -x /etc/vnc/xstartup ] &amp;&amp; exec /etc/vnc/xstartup<br />
[ -r $HOME/.Xresources ] &amp;&amp; xrdb $HOME/.Xresources<br />
xsetroot -solid grey<br />
vncconfig -iconic &amp;<br />
x-terminal-emulator -geometry 80&#215;24+10+10 -ls -title &#8220;$VNCDESKTOP Desktop&#8221; &amp;<br />
#x-window-manager &amp;<br />
xfce4-session&amp;</p>
<p>cunzhang@node31:~$ cat /etc/xinetd.d/xvncserver
</p>
<p style="padding-left: 60px;">service vnc-1024&#215;768x24<br />
{<br />
protocal = tcp<br />
socket_type = stream<br />
wait = no<br />
user = nobody<br />
servr = /usr/bin/Xvnc<br />
server_args = -inetd -query localhost -localhost -once -geometry 102&#215;768 -depth 24<br />
port = 5901<br />
}</p>
</li>
<li>SSH client Installation and configuration<br />
I use Windows and <a href="http://sshwindows.sourceforge.net/">OpenSSH</a>. Download OpenSSH and install the client.And download the pub key from the remote server.</li>
<li>VNC viewer Installation<br />
I use <a href="http://www.tightvnc.com/ ">TightVNC</a> viewer.Install it with the default cofiguration.</li>
<li>Create a batch file to use SSH  tunnel to connect the server.
<p style="padding-left: 60px;">ssh -l cunzhang 192.168.1.1 vnc4server :1 -localhost<br />
ssh -l cunzhang 192.168.1.1 -L 5901:127.0.0.1:5901<br />
ssh -l cunzhang 192.168.1.1 vnc4server -kill :1</p>
</li>
<li>Run This batch file and open the TightVNC viewer, input 127.0.0.1:1,then input password.</li>
</ol>
<p>Now You&#8217;r working in the remote desktop.<br />
Reference:</p>
<ol>
<li><a href="http://www.ubuntu.org.tw/modules/newbb/viewtopic.php?post_id=1615">http://osric-life.blogspot.com/2007/09/vnc-server-on-debian.html</a></li>
<li><a href="http://hi.baidu.com/tekjian/blog/item/fe0955ec1a2b28d2b21cb179.html">http://hi.baidu.com/tekjian/blog/item/fe0955ec1a2b28d2b21cb179.html</a></li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://blog.4message.net/2008/11/06/vnc-use-ssh-tunnel-on-debian.html/feed</wfw:commentRss>
		</item>
		<item>
		<title>你的名字会被记多久？</title>
		<link>http://blog.4message.net/2008/10/16/%e4%bd%a0%e7%9a%84%e5%90%8d%e5%ad%97%e6%9c%83%e8%a2%ab%e8%a8%98%e5%a4%9a%e4%b9%85%ef%bc%9f.html</link>
		<comments>http://blog.4message.net/2008/10/16/%e4%bd%a0%e7%9a%84%e5%90%8d%e5%ad%97%e6%9c%83%e8%a2%ab%e8%a8%98%e5%a4%9a%e4%b9%85%ef%bc%9f.html#comments</comments>
		<pubDate>Thu, 16 Oct 2008 11:29:57 +0000</pubDate>
		<dc:creator>Cun Zhang</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.4message.net/?p=644</guid>
		<description><![CDATA[昨天在听经济之声安然主持的财富星空，听到的故事。
那个晚上的影片好像是南斯拉夫的《桥》。他正要走进电影院，一个青年拦住了他。
那个青年看上去很焦急，说：“这位大哥，售票处已经买不到票了，您能把手中的票卖给我吗？”他一愣，有些为难。他问：“你没有问过别人？”“问过许多人，他们都……”青年的脸色有些黯然，“要不是为了母亲，我也不会麻烦您的……”“你母亲？”“是的，我们从乡下来，我想领着母亲看一场电影。”
就因为青年的孝心，那天他毅然把票给了青年，没要一分钱。青年除了千恩万谢，还郑重地要了他的名字。
这是纷繁的生活中极为普通的一个场景。十多年了，他几乎都把这件事忘记了。有一天，他走在街上，有一个人轻轻地喊他的名字。他一看，站在他面前的是一个笑容满面的中年人。他极力在脑海中搜索着这个面孔，但脑海中一片空白。
中年人说：“大哥，您还记得十几年前您给我的那张电影票吗？那一年，我从乡下来，给母亲看病。母亲病得很重，我怕母亲不能活着从手术台上下来，就想领着母亲看一场电影。那天，多少人都拒绝了我。只有您，慷慨地把票给了我。您知道吗，我母亲手术后又活了一年。那一年里，每当她幸福地说到‘我在城里看过一场电影’这句话的时候，我就在心里用感激一遍一遍地默念着您的名字。是的，大哥，这么多年了，我一直忘不了……”
这是朋友的父亲在一次吃饭时给我们讲的一个故事。就在那次酒席上，他颇有感慨地说：“我就做了那么一点事，却让一个素昧平生的人记住了我的名字，而且一记就是这么多年。说真的，他喊出我名字那一刻，我还是觉出了一种无法言说的幸福。我是说，你们以后的路还很长，你能把自己的名字留在别人的脑海里多长时间呢？”
一语惊心。是啊，这个世界上，有许多人的名字已经被时光的风吹得无影无踪了，而另一些名字，因为爱——爱的付出与施与，却在风中成了不倒的丰碑。
在纸上盲目地追问人生的意义之前，你在心底里问过自己这样一个问题吗：
我的名字被谁记住了，他们会记多久？
]]></description>
			<content:encoded><![CDATA[<p><span style="font-size: medium; color: #ff0000;">昨天在听经济之声安然主持的财富星空，听到的故事。</span><em></em><br />
那个晚上的影片好像是南斯拉夫的《桥》。他正要走进电影院，一个青年拦住了他。<br />
那个青年看上去很焦急，说：“这位大哥，售票处已经买不到票了，您能把手中的票卖给我吗？”他一愣，有些为难。他问：“你没有问过别人？”“问过许多人，他们都……”青年的脸色有些黯然，“要不是为了母亲，我也不会麻烦您的……”“你母亲？”“是的，我们从乡下来，我想领着母亲看一场电影。”<br />
就因为青年的孝心，那天他毅然把票给了青年，没要一分钱。青年除了千恩万谢，还郑重地要了他的名字。<br />
这是纷繁的生活中极为普通的一个场景。十多年了，他几乎都把这件事忘记了。有一天，他走在街上，有一个人轻轻地喊他的名字。他一看，站在他面前的是一个笑容满面的中年人。他极力在脑海中搜索着这个面孔，但脑海中一片空白。<br />
中年人说：“大哥，您还记得十几年前您给我的那张电影票吗？那一年，我从乡下来，给母亲看病。母亲病得很重，我怕母亲不能活着从手术台上下来，就想领着母亲看一场电影。那天，多少人都拒绝了我。只有您，慷慨地把票给了我。您知道吗，我母亲手术后又活了一年。那一年里，每当她幸福地说到‘我在城里看过一场电影’这句话的时候，我就在心里用感激一遍一遍地默念着您的名字。是的，大哥，这么多年了，我一直忘不了……”<br />
这是朋友的父亲在一次吃饭时给我们讲的一个故事。就在那次酒席上，他颇有感慨地说：“我就做了那么一点事，却让一个素昧平生的人记住了我的名字，而且一记就是这么多年。说真的，他喊出我名字那一刻，我还是觉出了一种无法言说的幸福。我是说，你们以后的路还很长，你能把自己的名字留在别人的脑海里多长时间呢？”<br />
一语惊心。是啊，这个世界上，有许多人的名字已经被时光的风吹得无影无踪了，而另一些名字，因为爱——爱的付出与施与，却在风中成了不倒的丰碑。<br />
在纸上盲目地追问人生的意义之前，你在心底里问过自己这样一个问题吗：<br />
我的名字被谁记住了，他们会记多久？</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.4message.net/2008/10/16/%e4%bd%a0%e7%9a%84%e5%90%8d%e5%ad%97%e6%9c%83%e8%a2%ab%e8%a8%98%e5%a4%9a%e4%b9%85%ef%bc%9f.html/feed</wfw:commentRss>
		</item>
		<item>
		<title>Chatzilla Shortcut On Desktop</title>
		<link>http://blog.4message.net/2008/10/05/chatzilla-shortcut-on-desktop.html</link>
		<comments>http://blog.4message.net/2008/10/05/chatzilla-shortcut-on-desktop.html#comments</comments>
		<pubDate>Sun, 05 Oct 2008 14:30:36 +0000</pubDate>
		<dc:creator>Cun Zhang</dc:creator>
		
		<category><![CDATA[Windows]]></category>

		<category><![CDATA[chatzilla]]></category>

		<category><![CDATA[firefox]]></category>

		<guid isPermaLink="false">http://blog.4message.net/?p=638</guid>
		<description><![CDATA[Most times, I just want to use chatzilla to connect irc server without  Firefox browser opened. I googled and found a solution:
1.Create a shortcut for Firefox on the desktop, and rename it to &#8220;Chatzilla&#8221;
2. Change the target to &#8220;D:\Program Files\Mozilla Firefox\firefox.exe&#8221; -chrome chrome://chatzilla/content/chatzilla.xul
Deletion Reason: Using the above shortcut, you can start Chatzilla,but chatzilla auto-connect URLs [...]]]></description>
			<content:encoded><![CDATA[<p>Most times, I just want to use chatzilla to connect irc server without  Firefox browser opened. I googled and found a solution:</p>
<p>1.Create a shortcut for Firefox on the desktop, and rename it to &#8220;Chatzilla&#8221;</p>
<p>2. <del datetime="2008-10-08T08:39:36+00:00">Change the target to <span style="color: #ff0000;">&#8220;D:\Program Files\Mozilla Firefox\firefox.exe&#8221; -chrome chrome://chatzilla/content/chatzilla.xul</span></del><br />
<span style="text-decoration: underline;">Deletion Reason: Using the above shortcut, you can start Chatzilla,but chatzilla auto-connect URLs can&#8217;t work.</span><br />
Change the target to <span style="color: #ff0000;">&#8220;D:\Program Files\Mozilla Firefox\firefox.exe&#8221; -chat</span></p>
<p>Now  Double click the &#8220;Chatzilla&#8221; shortcut, you will open chatzilla without firefox browser opening.</p>
<p>Reference</p>
<p>[1]Firefox&#8217;s  Command line arguments</p>
<p>http://kb.mozillazine.org/Command_line_arguments</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.4message.net/2008/10/05/chatzilla-shortcut-on-desktop.html/feed</wfw:commentRss>
		</item>
		<item>
		<title>Start Matlab from console under Unix/Linx</title>
		<link>http://blog.4message.net/2008/10/03/start-matlab-from-console-under-unixlinx.html</link>
		<comments>http://blog.4message.net/2008/10/03/start-matlab-from-console-under-unixlinx.html#comments</comments>
		<pubDate>Fri, 03 Oct 2008 13:48:54 +0000</pubDate>
		<dc:creator>Cun Zhang</dc:creator>
		
		<category><![CDATA[Linux]]></category>

		<category><![CDATA[Math]]></category>

		<category><![CDATA[linux]]></category>

		<category><![CDATA[matlab]]></category>

		<guid isPermaLink="false">http://blog.4message.net/?p=636</guid>
		<description><![CDATA[Under Unix/Linux, you can run matlab without GUI,which always is so usefully for me.
For me, I run Matlab programs for long time in a remote server. If a Matlab  GUI is opened ,I can&#8217;t disconnect the remote server. But when I run Matlab without GUI, I can do it with screen command.
Here is a example:
cunzhang@node31:~$ [...]]]></description>
			<content:encoded><![CDATA[<p>Under Unix/Linux, you can run matlab without GUI,which always is so usefully for me.</p>
<p>For me, I run Matlab programs for long time in a remote server. If a Matlab  GUI is opened ,I can&#8217;t disconnect the remote server. But when I run Matlab without GUI, I can do it with screen command.</p>
<p>Here is a example:</p>
<p style="padding-left: 30px;">cunzhang@node31:~$ screen -S a</p>
<p>Then enter a visual terminal</p>
<p style="padding-left: 30px;">cunzhang@node31:~$matlab -nodisplay -r  myprogram</p>
<p>Now you can disconnect your remote server.If you want to see whether your program is done, just run command</p>
<p style="padding-left: 30px;">cunzhang@node31:~$ screen -r a</p>
<p style="padding-left: 30px;">
<p>For more information, please see:</p>
<p>1. <a href="http://www.gnu.org/software/screen/">GNU screen&#8217;s homepage</a></p>
<p>2. http://gentoo-wiki.com/TIP_Using_screen</p>
<p>3. http://sunsite.ualberta.ca/Documentation/Gnu/screen-3.9.4/html_chapter/screen_toc.html</p>
<p>4. <a href="www.mathworks.com/access/helpdesk/help/techdoc/ref/matlabunix.html">matlab function reference</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.4message.net/2008/10/03/start-matlab-from-console-under-unixlinx.html/feed</wfw:commentRss>
		</item>
		<item>
		<title>foxyproxy custom path problem&#8217;s solution</title>
		<link>http://blog.4message.net/2008/10/03/foxyproxy-custom-path-problems-solution.html</link>
		<comments>http://blog.4message.net/2008/10/03/foxyproxy-custom-path-problems-solution.html#comments</comments>
		<pubDate>Fri, 03 Oct 2008 13:12:25 +0000</pubDate>
		<dc:creator>Cun Zhang</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[firefox]]></category>

		<category><![CDATA[foxyproxy]]></category>

		<guid isPermaLink="false">http://blog.4message.net/?p=633</guid>
		<description><![CDATA[Here is the solution from foxyproxy FAQ:
I moved my Firefox profile to another PC or another path. Now FoxyProxy doesn&#8217;t work. How to fix?
You must edit the profile&#8217;s preferences. In Firefox, type about:config in the address bar. Enter extensions.foxyproxy.settings as a filter. If the preference doesn&#8217;t exist, create it as a new string (open the [...]]]></description>
			<content:encoded><![CDATA[<p>Here is the solution from <a href="http://foxyproxy.mozdev.org/faq.html#top">foxyproxy FAQ</a>:</p>
<p style="padding-left: 30px;">I <a href="http://www.mozilla.org/support/firefox/profile#move">moved my Firefox profile</a> to another PC or another path. Now FoxyProxy doesn&#8217;t work. How to fix?</p>
<div class="showing" style="padding-left: 30px;">You must edit the profile&#8217;s <a href="http://www.mozilla.org/support/firefox/edit">preferences</a>. In Firefox, type <strong>about:config</strong> in the address bar. Enter <strong>extensions.foxyproxy.settings</strong> as a filter. If the preference doesn&#8217;t exist, create it as a new string (open the context menu (right-click) on any existing preference, go to the New menu, and select String). Enter <strong>extensions.foxyproxy.settings</strong> for the preference name. For the value of the string, enter the location of foxyproxy.xml in the form: <strong>file:///c:/path/to/file/foxyproxy.xml</strong>. For example: <strong>file:///C:/Documents%20and%20Settings/<br />
EricJung/ Application%20Data/Mozilla/Firefox/Profiles/<br />
r0yrkjob.prod/foxyproxy.xml</strong>. Note that the path must be URL-encoded (e.g., space becoems %20). You can <a href="http://www.w3schools.com/tags/ref_urlencode.asp">use this URL encoding calculator</a> to easily URL encode a path.</p>
<p>For Linux and Mac operating systems, exclude the drive letter; e.g. <strong>file:///home/ejung/foxyproxy.xml</strong>.</p>
<p>If you are using <a href="http://portableapps.com/apps/internet/firefox_portable">Portable Firefox</a>, the value of <strong>extensions.foxyproxy.settings</strong> should be a single space (&#8221; &#8220;). This tells FoxyProxy to look for foxyproxy.xml in the profile directory of the current drive. This is important because the drive letter of a USB drive can change.</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.4message.net/2008/10/03/foxyproxy-custom-path-problems-solution.html/feed</wfw:commentRss>
		</item>
		<item>
		<title>Auto-Sending Mail Under GNU/Linux</title>
		<link>http://blog.4message.net/2008/09/13/auto-sending-mail-under-gnulinux.html</link>
		<comments>http://blog.4message.net/2008/09/13/auto-sending-mail-under-gnulinux.html#comments</comments>
		<pubDate>Sat, 13 Sep 2008 09:08:26 +0000</pubDate>
		<dc:creator>Cun Zhang</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[msmtp]]></category>

		<category><![CDATA[mutt]]></category>

		<guid isPermaLink="false">http://blog.4message.net/archives/630</guid>
		<description><![CDATA[Recently I&#8217;m running a matlab program which may need several days. And I don&#8217;t hope to login remote host  many times to see whether  it is done, which is  a bad thing for me.
I hope when it&#8217;s done  there will be a mail for me. A mail client is working on my PC all [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I&#8217;m running a matlab program which may need several days. And I don&#8217;t hope to login remote host  many times to see whether  it is done, which is  a bad thing for me.</p>
<p>I hope when it&#8217;s done  there will be a mail for me. A mail client is working on my PC all the time, so I can see it.</p>
<p>I asked google if there is a solution for my problem. And I found it in many pages with the same content. And I can&#8217;t find who is the author for it. So bad!</p>
<p>The Solution:</p>
<p>You should install mutt and msmtp, and configure them right, and add your auto-sending scipt(I written it by bash) to cron.</p>
<p>And Debian GNU/Linux, it&#8217;s so easy.</p>
<p>Install mutt and msmtp via apt-get command:</p>
<blockquote><p>sudo apt-get install mutt msmtp</p></blockquote>
<p>The following is my configuration(you need replace user and domain.com to your mail account and server):</p>
<blockquote><p> cunzhang@node31:~$ cat .msmtprc</p>
<blockquote><p> #user@domain.com<br />
account usr@domain.com<br />
host smtp.domain.com<br />
from usr@domain.com<br />
tls on<br />
auth on<br />
user usr@domain.com<br />
password ****</p></blockquote>
<p>cunzhang@node31:~$ cat .muttrc</p>
<blockquote><p>set folder=&#8221;~/.mail&#8221;<br />
set mbox=&#8221;~/.mail/inbox&#8221;<br />
set mbox_type=maildir<br />
set record=&#8221;~/.mail/sent&#8221;</p>
<p>set sendmail=&#8221;/usr/bin/msmtp -a usr@domain.com&#8221;<br />
set realname=&#8221;cunzhang&#8221;<br />
set use_from=yes<br />
set editor=&#8221;vim&#8221;</p></blockquote>
<p>Then test whether it works.Mine works fine.</p></blockquote>
<blockquote><p>I write a bash script to detect matlab&#8217;s process and send email to me when the process is gone. Add it to crontab which makes that script run 1 time  every2 hours.</p></blockquote>
<blockquote><p> For more information, please see <a href="http://www.mutt.org">mutt</a>, <a href="http://msmtp.sourceforge.net">msmtp</a> and <a href="http://www.debian-administration.org/articles/56">crontab</a>.</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://blog.4message.net/2008/09/13/auto-sending-mail-under-gnulinux.html/feed</wfw:commentRss>
		</item>
		<item>
		<title>TexLive Installation  via install-tl</title>
		<link>http://blog.4message.net/2008/08/26/texlive-installation-via-install-tl.html</link>
		<comments>http://blog.4message.net/2008/08/26/texlive-installation-via-install-tl.html#comments</comments>
		<pubDate>Tue, 26 Aug 2008 12:52:21 +0000</pubDate>
		<dc:creator>Cun Zhang</dc:creator>
		
		<category><![CDATA[latex]]></category>

		<category><![CDATA[install-tl]]></category>

		<category><![CDATA[linux]]></category>

		<category><![CDATA[TexLive]]></category>

		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://blog.4message.net/archives/629</guid>
		<description><![CDATA[Recently The new version of TexLive has supported net installation.It&#8217;s Great!
This is a simple installation tutorial fro TexLive installation under Windows:
1. download install-tl.zip(OR install-tl-unx.tar.gz if you use Unix/Linux).
it is under the directory CTAN/systems/texlive/tlnet/tldev/  of CTAN mirror.
2.use 7-zip unzip this file, and enter that direatory.
3. Run install-tl.bat, and change these packages which you hope to install.Then [...]]]></description>
			<content:encoded><![CDATA[<p>Recently The new version of TexLive has supported net installation.It&#8217;s Great!</p>
<p>This is a simple installation tutorial fro TexLive installation under Windows:</p>
<p>1. download <a href="ftp://ftp.tsinghua.edu.cn/mirror/CTAN/systems/texlive/tlnet/tldev/install-tl.zip" class="file">install-tl.zip</a>(OR <a href="ftp://ftp.tsinghua.edu.cn/mirror/CTAN/systems/texlive/tlnet/tldev/install-tl-unx.tar.gz" class="file">install-tl-unx.tar.gz</a> if you use Unix/Linux).</p>
<p>it is under the directory CTAN/systems/texlive/tlnet/tldev/  of CTAN mirror.</p>
<p>2.use 7-zip unzip this file, and enter that direatory.</p>
<p>3. Run install-tl.bat, and change these packages which you hope to install.Then All&#8217;s OK.</p>
<p>What I need to mention is : Default,install-tl.bat will choose a mirror randomly.For me,it is so slow.</p>
<p>To use custom mirror, just need to run</p>
<blockquote><p> install-tl <strong><a name="item__2dlocation_url_7cpath"></a></strong><strong>-location </strong><a name="item__2dlocation_url_7cpath"></a><a href="ftp://ftp.tsinghua.edu.cn/mirror/CTAN/systems/texlive/tlnet/tldev">ftp://ftp.tsinghua.edu.cn/mirror/CTAN/systems/texlive/tlnet/tldev</a></p></blockquote>
<p>For more information,please run</p>
<blockquote><p> install-tl <strong><a name="item__2dlocation_url_7cpath"></a></strong><strong>-help</strong></p></blockquote>
<p>OR visit</p>
<blockquote><p>http://tug.org/texlive/doc/install-tl.html</p></blockquote>
<p><strike>So I edit install-tl.pm,change the CTAN mirror to a fast mirror for me.And it is easy, just open it under a text editor,</strike></p>
<p><strike>replace</strike></p>
<blockquote><p><strike>$TeXLiveURL = $location = TeXLive::TLUtils::give_ctan_mirror();</strike></p></blockquote>
<p><strike>by</strike></p>
<blockquote><p><strike>    #$TeXLiveURL = $location = TeXLive::TLUtils::give_ctan_mirror();<br />
$TeXLiveURL = $location =&#8221;<a href="ftp://ftp.tsinghua.edu.cn/mirror/CTAN/systems/texlive/tlnet/tldev">ftp://ftp.tsinghua.edu.cn/mirror/CTAN/systems/texlive/tlnet/tldev</a>&#8220;;</strike></p></blockquote>
<p><strike>you can change <a href="ftp://ftp.tsinghua.edu.cn/mirror/CTAN/systems/texlive/tlnet/tldev">ftp://ftp.tsinghua.edu.cn/mirror/CTAN/</a> to your favorit CTAN mirror.</strike></p>
<p>That&#8217;s ALL!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.4message.net/2008/08/26/texlive-installation-via-install-tl.html/feed</wfw:commentRss>
		</item>
		<item>
		<title>save plot into tex format in Octave</title>
		<link>http://blog.4message.net/2008/06/09/save-plot-into-tex-format-in-octave.html</link>
		<comments>http://blog.4message.net/2008/06/09/save-plot-into-tex-format-in-octave.html#comments</comments>
		<pubDate>Mon, 09 Jun 2008 09:17:35 +0000</pubDate>
		<dc:creator>Cun Zhang</dc:creator>
		
		<category><![CDATA[Math]]></category>

		<category><![CDATA[latex]]></category>

		<category><![CDATA[Octave]]></category>

		<category><![CDATA[print]]></category>

		<category><![CDATA[tex]]></category>

		<guid isPermaLink="false">http://blog.4message.net/archives/628</guid>
		<description><![CDATA[The print command in Octave is so useful! It can save plot into so many format, especially tex which can be used into these articles which are written by tex.
Another use for me is to make  program(mfile,which plot so many plots)  automatization become true.
e.g.
for i=0:2
x=[i:0.01:i+2]*pi;
plot(x,sin(x));
file=[num2str(i) '.jpg'];
print(file, &#8216;-djpeg&#8217; );
end
close
Save these code into a mfile(e.g, a.m) ,then [...]]]></description>
			<content:encoded><![CDATA[<p>The <em>print</em> command in Octave is so useful! It can save plot into so many format, especially tex which can be used into these articles which are written by tex.</p>
<p>Another use for me is to make  program(mfile,which plot so many plots)  automatization become true.</p>
<p>e.g.</p>
<blockquote><p>for i=0:2</p>
<blockquote><p>x=[i:0.01:i+2]*pi;</p>
<p>plot(x,sin(x));</p>
<p>file=[num2str(i) '.jpg'];</p>
<p>print(file, &#8216;-djpeg&#8217; );</p></blockquote>
<p>end</p>
<p>close</p></blockquote>
<p>Save these code into a mfile(e.g, a.m) ,then at the console,run the command:</p>
<blockquote><p>octave a.m</p></blockquote>
<p>Another way is to run a.m in Octave console.</p>
<p>Is it amazing? If it be useful for you, please tell me <img src='http://4message.net/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.4message.net/2008/06/09/save-plot-into-tex-format-in-octave.html/feed</wfw:commentRss>
		</item>
		<item>
		<title>data save/load in Octave(From Octave&#8217;s Manual)</title>
		<link>http://blog.4message.net/2008/06/09/data-saveload-in-octavefrom-octaves-manual.html</link>
		<comments>http://blog.4message.net/2008/06/09/data-saveload-in-octavefrom-octaves-manual.html#comments</comments>
		<pubDate>Mon, 09 Jun 2008 08:58:43 +0000</pubDate>
		<dc:creator>Cun Zhang</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[load]]></category>

		<category><![CDATA[Octave]]></category>

		<category><![CDATA[save]]></category>

		<guid isPermaLink="false">http://blog.4message.net/archives/627</guid>
		<description><![CDATA[ The save and load commands allow data to be written to and read from disk files in various formats.  The default format of files written by the save command can be controlled using the functions default_save_options and save_precision.
As an example the following code creates a 3-by-3 matrix and saves it to the file `myfile.mat&#8216;.
 [...]]]></description>
			<content:encoded><![CDATA[<p> The <code>save</code> and <code>load</code> commands allow data to be written to and read from disk files in various formats.  The default format of files written by the <code>save</code> command can be controlled using the functions <code>default_save_options</code> and <code>save_precision</code>.</p>
<p>As an example the following code creates a 3-by-3 matrix and saves it to the file `<samp><span class="samp">myfile.mat</span></samp>&#8216;.</p>
<pre class="example">     A = [ 1:3; 4:6; 7:9 ];
     save myfile.mat A</pre>
<p>Once one or more variables have been saved to a file, they can be read into memory using the <code>load</code> command.</p>
<pre class="example">     load myfile.mat
     A
          -| A =
          -|
          -|    1   2   3
          -|    4   5   6
          -|    7   8   9</pre>
<p><a name="doc_002dsave"></a></p>
<p class="defun"> — Command: <strong>save</strong><var> options file v1 v2 <small class="dots">&#8230;</small><a name="index-save-680"></a></var></p>
<blockquote><p>Save the named variables <var>v1</var>, <var>v2</var>, <small class="dots">&#8230;</small>, in the file <var>file</var>.  The special filename `<samp><span class="samp">-</span></samp>&#8216; can be used to write the output to your terminal.  If no variable names are listed, Octave saves all the variables in the current scope.  Valid options for the <code>save</code> command are listed in the following table.  Options that modify the output format override the format specified by <code>default_save_options</code>.</p>
<p>If save is invoked using the functional form</p>
<pre class="example">          save ("-option1", ..., "file", "v1", ...)</pre>
<p class="noindent">then the <var>options</var>, <var>file</var>, and variable name arguments (<var>v1</var>, <small class="dots">&#8230;</small>) must be specified as character strings.</p>
<dl>
<dt><code>-ascii</code></dt>
<dd>Save a single matrix in a text file.
</dd>
<dt><code>-binary</code></dt>
<dd>Save the data in Octave&#8217;s binary data format.
</dd>
<dt><code>-float-binary</code></dt>
<dd>Save the data in Octave&#8217;s binary data format but only using single precision.  You should use this format only if you know that all the values to be saved can be represented in single precision.
</dd>
<dt><code>-V7</code></dt>
<dt><code>-v7</code></dt>
<dt><code>-7</code></dt>
<dt><code>-mat7-binary</code></dt>
<dd>Save the data in <span class="sc">Matlab</span>&#8217;s v7 binary data format.
</dd>
<dt><code>-V6</code></dt>
<dt><code>-v6</code></dt>
<dt><code>-6</code></dt>
<dt><code>-mat</code></dt>
<dt><code>-mat-binary</code></dt>
<dd>Save the data in <span class="sc">Matlab</span>&#8217;s v6 binary data format.
</dd>
<dt><code>-V4</code></dt>
<dt><code>-v4</code></dt>
<dt><code>-4</code></dt>
<dt><code>-mat4-binary</code></dt>
<dd>Save the data in the binary format written by <span class="sc">Matlab</span> version 4.
</dd>
<dt><code>-hdf5</code></dt>
<dd>Save the data in HDF5 format.  (HDF5 is a free, portable binary format developed by the National Center for Supercomputing Applications at the University of Illinois.)
</dd>
<dt><code>-float-hdf5</code></dt>
<dd>Save the data in HDF5 format but only using single precision.  You should use this format only if you know that all the values to be saved can be represented in single precision.
</dd>
<dt><code>-zip</code></dt>
<dt><code>-z</code></dt>
<dd>Use the gzip algorithm to compress the file. This works equally on files that are compressed with gzip outside of octave, and gzip can equally be used to convert the files for backward compatibility.  </dd>
</dl>
<p>The list of variables to save may include wildcard patterns containing the following special characters:</p>
<dl>
<dt><code>?</code></dt>
<dd>Match any single character.
</dd>
<dt><code>*</code></dt>
<dd>Match zero or more characters.
</dd>
<dt><code>[ </code><var>list</var><code> ]</code></dt>
<dd>Match the list of characters specified by <var>list</var>.  If the first character is <code>!</code> or <code>^</code>, match all characters except those specified by <var>list</var>.  For example, the pattern `<samp><span class="samp">[a-zA-Z]</span></samp>&#8216; will match all lower and upper case alphabetic characters.
</dd>
<dt><code>-text</code></dt>
<dd>Save the data in Octave&#8217;s text data format.  </dd>
</dl>
<p>Except when using the <span class="sc">Matlab</span> binary data file format, saving global variables also saves the global status of the variable, so that if it is restored at a later time using `<samp><span class="samp">load</span></samp>&#8216;, it will be restored as a global variable.</p>
<p>The command</p>
<pre class="example">          save -binary data a b*</pre>
<p class="noindent">saves the variable `<samp><span class="samp">a</span></samp>&#8216; and all variables beginning with `<samp><span class="samp">b</span></samp>&#8216; to the file <samp><span class="file">data</span></samp> in Octave&#8217;s binary format.</p>
</blockquote>
<p><a name="doc_002dload"></a></p>
<p>— Command: <strong>load</strong><var> options file v1 v2 <small class="dots">&#8230;</small><a name="index-load-681"></a></var><br />
Load the named variables <var>v1</var>, <var>v2</var>, <small class="dots">&#8230;</small>, from the file <var>file</var>.  As with <code>save</code>, you may specify a list of variables and <code>load</code> will only extract those variables with names that match.  For example, to restore the variables saved in the file <samp><span class="file">data</span></samp>, use the command</p>
<pre class="example">          load data</pre>
<p>If load is invoked using the functional form</p>
<pre class="example">          load ("-option1", ..., "file", "v1", ...)</pre>
</p>
<p class="noindent">then the <var>options</var>, <var>file</var>, and variable name arguments (<var>v1</var>, <small class="dots">&#8230;</small>) must be specified as character strings.</p>
<p>If a variable that is not marked as global is loaded from a file when a global symbol with the same name already exists, it is loaded in the global symbol table.  Also, if a variable is marked as global in a file and a local symbol exists, the local symbol is moved to the global symbol table and given the value from the file.  Since it seems that both of these cases are likely to be the result of some sort of error, they will generate warnings.</p>
<p>If invoked with a single output argument, Octave returns data instead of inserting variables in the symbol table.  If the data file contains only numbers (TAB- or space-delimited columns), a matrix of values is returned.  Otherwise, <code>load</code> returns a structure with members  corresponding to the names of the variables in the file.</p>
<p>The <code>load</code> command can read data stored in Octave&#8217;s text and binary formats, and <span class="sc">Matlab</span>&#8217;s binary format.  It will automatically detect the type of file and do conversion from different floating point formats (currently only IEEE big and little endian, though other formats may added in the future).</p>
<p>Valid options for <code>load</code> are listed in the following table.</p>
<dl>
<dt><code>-force</code></dt>
<dd>The `<samp><span class="samp">-force</span></samp>&#8216; option is accepted but ignored for backward compatibility. Octave now overwrites variables currently in memory with the same name as those found in the file.
</dd>
<dt><code>-ascii</code></dt>
<dd>Force Octave to assume the file contains columns of numbers in text format without any header or other information.  Data in the file will be loaded as a single numeric matrix with the name of the variable derived from the name of the file.
</dd>
<dt><code>-binary</code></dt>
<dd>Force Octave to assume the file is in Octave&#8217;s binary format.
</dd>
<dt><code>-mat</code></dt>
<dt><code>-mat-binary</code></dt>
<dt><code>-6</code></dt>
<dt><code>-v6</code></dt>
<dt><code>-7</code></dt>
<dt><code>-v7</code></dt>
<dd>Force Octave to assume the file is in <span class="sc">Matlab</span>&#8217;s version 6 or 7 binary format.
</dd>
<dt><code>-V4</code></dt>
<dt><code>-v4</code></dt>
<dt><code>-4</code></dt>
<dt><code>-mat4-binary</code></dt>
<dd>Force Octave to assume the file is in the binary format written by <span class="sc">Matlab</span> version 4.
</dd>
<dt><code>-hdf5</code></dt>
<dd>Force Octave to assume the file is in HDF5 format.  (HDF5 is a free, portable binary format developed by the National Center for Supercomputing Applications at the University of Illinois.)  Note that Octave can read HDF5 files not created by itself, but may skip some datasets in formats that it cannot support.
</dd>
<dt><code>-import</code></dt>
<dd>The `<samp><span class="samp">-import</span></samp>&#8216; is accepted but ignored for backward compatibility.  Octave can now support multi-dimensional HDF data and automatically modifies variable names if they are invalid Octave identifiers.
</dd>
<dt><code>-text</code></dt>
<dd>Force Octave to assume the file is in Octave&#8217;s text format.  </dd>
</dl>
<p> From: <a href="http://math.4message.net/octave3/interpreter/Simple-File-I_002fO.html#Simple-File-I_002fO">Octave&#8217;s Manual</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.4message.net/2008/06/09/data-saveload-in-octavefrom-octaves-manual.html/feed</wfw:commentRss>
		</item>
		<item>
		<title>Debian Nvidia driver installation  with kernel 2.6.25(Xen)</title>
		<link>http://blog.4message.net/2008/06/03/debian-nvidia-driver-installation-with-kernel-2625xen.html</link>
		<comments>http://blog.4message.net/2008/06/03/debian-nvidia-driver-installation-with-kernel-2625xen.html#comments</comments>
		<pubDate>Tue, 03 Jun 2008 09:17:42 +0000</pubDate>
		<dc:creator>Cun Zhang</dc:creator>
		
		<category><![CDATA[Linux]]></category>

		<category><![CDATA[Debian]]></category>

		<category><![CDATA[kernel]]></category>

		<category><![CDATA[nv]]></category>

		<category><![CDATA[xen]]></category>

		<guid isPermaLink="false">http://blog.4message.net/archives/626</guid>
		<description><![CDATA[Now I use Debian Sid with kernel 2.6.25 which xen support is built in. For this reason the nvidia driver can&#8217;t be installed.
1. download nvidia driver
I use Nvidia Geforce MX 4000, so I should download NVIDIA-Linux-x86-96.43.05-pkg1.run driver
2. patch a diff file for kernel 2.6.25
download NVIDIA_kernel-96.43.05-2290218.diff.txt  
Then run
# sh /path/to/NVIDIA-Linux-x86-96.43.05-pkg1.run  &#8211;apply-patch NVIDIA_kernel-96.43.05-2290218.diff.txt
#export IGNORE_XEN_PRESENCE=1
# sh [...]]]></description>
			<content:encoded><![CDATA[<p>Now I use Debian Sid with kernel 2.6.25 which xen support is built in. For this reason the nvidia driver can&#8217;t be installed.</p>
<p>1. download nvidia driver</p>
<p>I use Nvidia Geforce MX 4000, so I should download <a href="http://us.download.nvidia.com/XFree86/Linux-x86/173.14.05/NVIDIA-Linux-x86-173.14.05-pkg1.run" title="NVIDIA-Linux-x86-173.14.05-pkg1">NVIDIA-Linux-x86-96.43.05-pkg1.run</a> driver</p>
<p>2. patch a diff file for kernel 2.6.25</p>
<p>download <a href="http://www.nvnews.net/vbulletin/attachment.php?attachmentid=30770&amp;d=1205875938">NVIDIA_kernel-96.43.05-2290218.diff.txt</a>  </p>
<p>Then run</p>
<blockquote><p># sh /path/to/NVIDIA-Linux-x86-96.43.05-pkg1.run  &#8211;apply-patch NVIDIA_kernel-96.43.05-2290218.diff.txt</p>
<p>#export IGNORE_XEN_PRESENCE=1<br />
# sh NVIDIA-Linux-x86-96.43.05-pkg1-custom.run</p></blockquote>
<p>Now the nvidia graphics driver is installed successfully.</p>
<p>Here are two good article about this subject.</p>
<p>1. http://www.nvnews.net/vbulletin/showthread.php?t=110088</p>
<p>2. http://blog.creonfx.com/linux/how-to-install-nvidia-driver-on-2625-2-debian-kernel-with-xen</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.4message.net/2008/06/03/debian-nvidia-driver-installation-with-kernel-2625xen.html/feed</wfw:commentRss>
		</item>
	</channel>
</rss>
