<?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>叶行骏</title>
	<atom:link href="http://www.yeahxj.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.yeahxj.com</link>
	<description>Front End Engineer</description>
	<lastBuildDate>Tue, 22 Jan 2013 14:53:54 +0000</lastBuildDate>
	<language>zh-CN</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5</generator>
		<item>
		<title>那些用JavaScript模拟的语言们[更新中]</title>
		<link>http://www.yeahxj.com/2013/01/22/use-javascript-simulate/</link>
		<comments>http://www.yeahxj.com/2013/01/22/use-javascript-simulate/#comments</comments>
		<pubDate>Tue, 22 Jan 2013 14:53:54 +0000</pubDate>
		<dc:creator>行骏</dc:creator>
				<category><![CDATA[前端事儿]]></category>

		<guid isPermaLink="false">http://www.yeahxj.com/?p=443</guid>
		<description><![CDATA[好久没写了，但愿今天不是另一个好久的开始&#8230; 好吧，收集一份那些用JavaScript模拟的语言们， [...]]]></description>
				<content:encoded><![CDATA[<p>好久没写了，但愿今天不是另一个好久的开始&#8230;<br />
好吧，收集一份那些用JavaScript模拟的语言们，持续关注，如果你又发现新的了，留言告诉我吧。</p>
<p><strong>RubyJS</strong></p>
<p>http://rubyjs.org/</p>
<p>RubyJS是一个基于JavaScript的Ruby库，使用JavaScript实现了Ruby中的所有方法。</p>
<p><strong>phpjs</strong></p>
<p>http://phpjs.hertzen.com/</p>
<p>PHP VM with JavaScript</p>
]]></content:encoded>
			<wfw:commentRss>http://www.yeahxj.com/2013/01/22/use-javascript-simulate/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>回车符 \r\n 在各个浏览器中无耻的表现</title>
		<link>http://www.yeahxj.com/2011/11/07/enter-code-for-all-browser/</link>
		<comments>http://www.yeahxj.com/2011/11/07/enter-code-for-all-browser/#comments</comments>
		<pubDate>Mon, 07 Nov 2011 11:32:46 +0000</pubDate>
		<dc:creator>行骏</dc:creator>
				<category><![CDATA[前端事儿]]></category>

		<guid isPermaLink="false">http://www.yeahxj.com/?p=387</guid>
		<description><![CDATA[先认识下回车符： 在计算机还没有出现之前，有一种叫做电传打字机（Teletype Model 33）的玩意，每 [...]]]></description>
				<content:encoded><![CDATA[<p>先认识下回车符：<br />
<a href="http://www.yeahxj.com/wp-content/uploads/ASR-33_21.jpg"><img src="http://www.yeahxj.com/wp-content/uploads/ASR-33_21.jpg" alt="" title="ASR-33_2" width="500" height="375" class="alignnone size-full wp-image-391" /></a><br />
在计算机还没有出现之前，有一种叫做电传打字机（Teletype Model 33）的玩意，每秒钟可以打10个字符。但是它有一个问题，就是打完一行换行的时候，要用去0.2秒，正好可以打两个字符。要是在这0.2秒里面，又有新的字符传过来，那么这个字符将丢失。</p>
<p>于是，研制人员想了个办法解决这个问题，就是在每行后面加两个表示结束的字符。一个叫做“回车”，告诉打字机把打印头定位在左边界；另一个叫做“换行”，告诉打字机把纸向下移一行。</p>
<p>这就是“换行”和“回车”的来历，从它们的英语名字上也可以看出一二。</p>
<p>后来，计算机发明了，这两个概念也就被般到了计算机上。那时，存储器很贵，一些科学家认为在每行结尾加两个字符太浪费了，加一个就可以。于是，就出现了分歧。</p>
<p>Unix系统里，每行结尾只有“<换行>”，即“\n”；Windows系统里面，每行结尾是“<换行><回车>”，即“\r\n”；Mac系统里，每行结尾是“<回车>”。一个直接后果是，Unix/Mac系统下的文件在Windows里打开的话，所有文字会变成一行；而Windows里的文件在Unix/Mac下打开的话，在每行的结尾可能会多出一个^M符号。<br />
<strong>【来自f2e.aliued】</strong></p>
<p>就是因为有这样分歧，回车在各个浏览器中的表现也不一致，这个很无耻。</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #00bbdd;">&lt;!DOCTYPE html&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">html</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">head</span>&gt;</span>
		<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">meta</span> <span style="color: #000066;">content</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;text/html; charset=utf-8&quot;</span> <span style="color: #000066;">http-equiv</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;Content-Type&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span>
		<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">title</span>&gt;</span>test<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">title</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">head</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">body</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">input</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;aa&quot;</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;hidden&quot;</span> <span style="color: #000066;">value</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">textarea</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;bb&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">textarea</span>&gt;</span> 
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">input</span> <span style="color: #000066;">id</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;cc&quot;</span> <span style="color: #000066;">type</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;hidden&quot;</span> <span style="color: #000066;">value</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">script</span>&gt;</span>
	var test = document.getElementById('bb');
	test.value = 'a\r\nb';	// test.value = 'a\nb';
	alert(encodeURIComponent(test.value));
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">script</span>&gt;</span>
	<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">body</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">html</span>&gt;</span></pre></td></tr></table></div>

<p>首先，在IE6,7,8中，还是比较坚持的，所有的回车都是\r\n。用encodeURIComponent出来都是%0D%0A<br />
在IE9中，就完全改了，但还是比较坚持的，所有回车都是\n。用encodeURIComponent出来都是%0A<br />
但是在FF或者Chrome中，对input type=&#8221;hidden&#8221; 的处理是不一样的，其如果value=&#8217;\r\n&#8217;,用encodeURIComponent出来是%0D%0A.其他全部都是%0A</p>
<p>这些问题在一些带回车的内容会处理处理起来比较头疼，特别是涉及到字符限制的。回车会计算成一个字符或者两个字符，处理起来需注意。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.yeahxj.com/2011/11/07/enter-code-for-all-browser/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>1988：我想和这个世界谈谈</title>
		<link>http://www.yeahxj.com/2011/02/27/1988-i-want-to-talk-with-the-world/</link>
		<comments>http://www.yeahxj.com/2011/02/27/1988-i-want-to-talk-with-the-world/#comments</comments>
		<pubDate>Sun, 27 Feb 2011 13:30:54 +0000</pubDate>
		<dc:creator>行骏</dc:creator>
				<category><![CDATA[我说我话]]></category>

		<guid isPermaLink="false">http://www.yeahxj.com/?p=375</guid>
		<description><![CDATA[其实这本书早就看完了，当时摘录了一些文字，不敢独藏，唯有共享。 &#8212;&#8212;&#8212;&# [...]]]></description>
				<content:encoded><![CDATA[<p><div id="attachment_376" class="wp-caption alignnone" style="width: 393px"><a href="http://www.yeahxj.com/wp-content/uploads/1988.jpg"><img src="http://www.yeahxj.com/wp-content/uploads/1988.jpg" alt="1988：我想和这个世界谈谈" title="1988" width="383" height="544" class="size-full wp-image-376" /></a><p class="wp-caption-text">1988：我想和这个世界谈谈</p></div><br />
<strong>其实这本书早就看完了，当时摘录了一些文字，不敢独藏，唯有共享。</strong><br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
孟孟瞪大眼睛，看着我，说，你知道么，如果当时这段视频能发出去，也许我早就红了。<br />
我看着她笑了。</p>
<p>“虚惊一场”这四个字是人世间最好的成语。</p>
<p>她以前还和外校生谈过一次恋爱，但后来人家甩了她，所以她就有防备，说不能让我太容易的得到她。这句话大致说明了她上一段恋爱的情况。</p>
<p>我说，也不知道。反正我还挺小心翼翼的，我是特别喜欢她，一点保留也没。掏心掏肺的。<br />
娜娜说，哦，那小弟弟有没有掏出来？<br />
我说，没有到那个地步。</p>
<p>终于轮到我冷笑，我说，做自己，多土的词，想生存下去，谁不都得察言观色，然后表演一番。</p>
<p>娜娜把照片还给我，说，我认得她，她就是孟欣童。<br />
我问娜娜，谁？（我特地翻回去看了前面章节）</p>
<p>只要我的孩子不干这个，就行了，我愿为她不干这个而被干死。</p>
<p>说道，你看现在，大早上的，你太勤奋了。<br />
她说，我知道了，先生，你要包夜么？<br />
我迟疑了一下，一看从窗帘外面透露出来的阳光，心想着还算什么包夜，这都是包日了。我礼貌地问道，包夜都能干什么啊。<br />
姗姗回答到，包日。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.yeahxj.com/2011/02/27/1988-i-want-to-talk-with-the-world/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>关于布局中基线对齐的说法</title>
		<link>http://www.yeahxj.com/2010/12/02/baseline/</link>
		<comments>http://www.yeahxj.com/2010/12/02/baseline/#comments</comments>
		<pubDate>Thu, 02 Dec 2010 14:04:01 +0000</pubDate>
		<dc:creator>行骏</dc:creator>
				<category><![CDATA[前端事儿]]></category>

		<guid isPermaLink="false">http://www.yeahxj.com/?p=354</guid>
		<description><![CDATA[这个起源于帮忙解决一个运营页面，这个悲剧啊，页面的布局就是下面这样的。 &#60;html&#62; &#60;he [...]]]></description>
				<content:encoded><![CDATA[<p>这个起源于帮忙解决一个运营页面，这个悲剧啊，页面的布局就是下面这样的。</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">html</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">head</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">title</span>&gt;</span>yeahxj<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">title</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">head</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">body</span>&gt;</span>
  <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">table</span> <span style="color: #000066;">cellpadding</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000066;">cellspacing</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000066;">border</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;0&quot;</span>&gt;</span>
    <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">tr</span>&gt;</span>
      <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">td</span>&gt;</span>
        <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">img</span> <span style="color: #000066;">width</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;728&quot;</span> <span style="color: #000066;">height</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;90&quot;</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://www.d2forum.org/d2/5/assets/img/d2_728x90.jpg&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span>
      <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">td</span>&gt;</span>
     <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">tr</span>&gt;</span>
    <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">tr</span>&gt;</span>
      <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">td</span>&gt;</span>
        <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">img</span> <span style="color: #000066;">width</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;728&quot;</span> <span style="color: #000066;">height</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;90&quot;</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://www.d2forum.org/d2/5/assets/img/d2_728x90.jpg&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span>
      <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">td</span>&gt;</span>
     <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">tr</span>&gt;</span>
  <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">table</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">body</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">html</span>&gt;</span></pre></td></tr></table></div>

<p>简单吧，简单不过了，甚至在我们页面中都鄙视这样的布局，但是不从这个角度出发，我们发现这挺怪异。<br />
<strong>Firefox，Chrome下挺好，而IE却会在两张图片中间出来一条白色的间隙。</strong><br />
我明明设置了cellpadding=&#8221;0&#8243; cellspacing=&#8221;0&#8243; border=&#8221;0&#8243;，奇怪了&#8230;<br />
网上查完，解决方法有二：<br />
1. td img {display: block;}<br />
2. td img {vertical-align: bottom;}</p>
<p>可是这是为什么呢？为什么这样设置就了可以了，这两个方法不就是把元素从inline变成了block，改变了垂直对其方式。<br />
后来慢慢baidu，baidu不行Google&#8230;发现vertical-align默认值是baseline。以此引出一个概念：<br />
<strong>基线对齐</strong><br />
<strong>所谓基线对齐，就是各种inline元素都保持其基线与其父元素的基线是对齐的。例如如果有图片的话，则图片的底端也会贴着父元素的基线。</strong><br />
基线这个东西还要从文字设计开始讲起，MD，这博客要写到神马时候啊。还是看代码吧。</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="html4strict" style="font-family:monospace;"><span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">html</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">head</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">title</span>&gt;</span>yeahxj<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">title</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">head</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">body</span>&gt;</span>
  <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">table</span> <span style="color: #000066;">cellpadding</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000066;">cellspacing</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;0&quot;</span> <span style="color: #000066;">border</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;0&quot;</span>&gt;</span>
    <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">tr</span>&gt;</span>
      <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">td</span>&gt;</span>
        aAg<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">img</span> <span style="color: #000066;">width</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;728&quot;</span> <span style="color: #000066;">height</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;90&quot;</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://www.d2forum.org/d2/5/assets/img/d2_728x90.jpg&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span>
      <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">td</span>&gt;</span>
     <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">tr</span>&gt;</span>
    <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">tr</span>&gt;</span>
      <span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">td</span>&gt;</span>
        Aga<span style="color: #009900;">&lt;<span style="color: #000000; font-weight: bold;">img</span> <span style="color: #000066;">width</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;728&quot;</span> <span style="color: #000066;">height</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;90&quot;</span> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://www.d2forum.org/d2/5/assets/img/d2_728x90.jpg&quot;</span> <span style="color: #66cc66;">/</span>&gt;</span>
      <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">td</span>&gt;</span>
     <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">tr</span>&gt;</span>
  <span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">table</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">body</span>&gt;</span>
<span style="color: #009900;">&lt;<span style="color: #66cc66;">/</span><span style="color: #000000; font-weight: bold;">html</span>&gt;</span></pre></td></tr></table></div>

<p>仔细看仔细看，看到没看到没，其实图片是和a这个字母的下沿对齐的，小时候学字母的时候就会有这条线，不过也有些小写的字母如gg是会超出基线的。所有大写字母都是底部基线对其的。<br />
这大部分已经说到了上面的问题，既然有基线对齐这回事情，那vertical-align必然和这个相关，一看vertical-align的值：baseline sub supper top text-top bottom text-bottom middle以及各种长度值（%，em，ex等等）MD，这博客要写到神马时候啊。还是自己看代码吧。</p>
<p>最后：其实非常多有关布局的情况都是和这个有关，写的不够系统，望有高人指点。欢迎参加D2。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.yeahxj.com/2010/12/02/baseline/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>更换域名了，从movinghorse.cn到yeahxj.com</title>
		<link>http://www.yeahxj.com/2010/10/26/change-domian/</link>
		<comments>http://www.yeahxj.com/2010/10/26/change-domian/#comments</comments>
		<pubDate>Tue, 26 Oct 2010 15:57:07 +0000</pubDate>
		<dc:creator>行骏</dc:creator>
				<category><![CDATA[我说我话]]></category>

		<guid isPermaLink="false">http://www.yeahxj.com/?p=344</guid>
		<description><![CDATA[终于换域名了，一直有这样的想法，舍不得实施。 今天万网把我的网址停止解析了，像我这样只知道分享技术，积累经验的 [...]]]></description>
				<content:encoded><![CDATA[<p>终于换域名了，一直有这样的想法，舍不得实施。</p>
<p>今天万网把我的网址停止解析了，像我这样只知道分享技术，积累经验的年轻小伙真的很不错了，积极为中国网络事业蓬勃发展做贡献的，结果还把我域名给停了。</p>
<p>好吧，我离开cn换成com的。从movinghorse.cn到<strong>yeahxj.com</strong>。</p>
<p><strong>yeahxj.com</strong>的由来很简单，就是叶行骏。</p>
<p>各位xdjm帮忙改下链接地址，原域名应该一个月之后会废弃，还有feed的地址也做修改。</p>
<p>最新的feed地址：<a href="view-source:http://www.yeahxj.com/feed/">http://www.yeahxj.com/feed/</a> 或者<a href="http://feeds.feedburner.com/yeahxj">http://feeds.feedburner.com/yeahxj</a> 推荐后者！</p>
]]></content:encoded>
			<wfw:commentRss>http://www.yeahxj.com/2010/10/26/change-domian/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>安装subversion-[学习笔记]</title>
		<link>http://www.yeahxj.com/2010/10/08/install-subversion/</link>
		<comments>http://www.yeahxj.com/2010/10/08/install-subversion/#comments</comments>
		<pubDate>Fri, 08 Oct 2010 14:18:59 +0000</pubDate>
		<dc:creator>行骏</dc:creator>
				<category><![CDATA[前端事儿]]></category>

		<guid isPermaLink="false">http://www.yeahxj.com/?p=341</guid>
		<description><![CDATA[subversion(简称svn)是近年来崛起的版本管理软件，是cvs的接班人。目前，绝大多数开源软件都使用s [...]]]></description>
				<content:encoded><![CDATA[<p>subversion(简称svn)是近年来崛起的版本管理软件，是cvs的接班人。目前，绝大多数开源软件都使用svn作为代码版本管理软件。<br />
subversion的官方网站是 http://subversion.tigris.org/<br />
Linux真TM的，完全不能以学习Windows的方式进行了，做过一遍下次很有可能要忘记了，额的神啊，请让我做些笔记吧，虽然这些对于高手来说非常简单。</p>
<p>安装的方法应该有四种：<br />
<strong>1. 下载源码，自己编译，安装。</strong>这种方法适合熟悉的用户，这里会遇到很多依赖没有安装的情况，要一个一个搞定，很是麻烦，而且需要很多的时间。当然也还是介绍下方法：<br />
$wget http://subversion.tigris.org/downloads/subversion-deps-1.6.12.tar.gz<br />
$wget http://subversion.tigris.org/downloads/subversion-1.6.12.tar.gz<br />
$$ tar xvzf subversion-1.6.12.tar.gz;tar xvzf subversion-deps-1.6.12.tar.gz;<br />
$ cd ~/subversion-1.6.12/<br />
$./configure<br />
$make clean<br />
$make<br />
$make install<br />
这只是大致步骤，中间出现的任何问题，自己想办法处理。</p>
<p><strong>2. 直接使用yum安装，这个应该是最方便的方法了。直接yum -y install subversion就OK了。</strong><br />
这里我遇到的问题，使用这个方法老是提示我老的版本已经是最新了，没法升级。而我看到的是使用的是http://mirrors.163.com/的。不知道是不是163的svn只有1.4的版本，望高手解答，如何修改不使用163的。</p>
<p><strong>3. 使用rpm包安装，这个相对也方便，但是也要处理依赖。</strong>rpm一种用于互联网下载包的打包及安装工具，它包含在某些Linux分发版中。它生成具有.RPM扩展名的文件。<br />
这里可以下载svn的rpm包：http://the.earth.li/pub/subversion/summersoft.fay.ar.us/pub/subversion/latest/1.6.13/rhel5/i386/<br />
按照我的经验，下载neon，sqlite，subversion，就可以了。然后如rpm subversion-1.6.13-1.i386.rpm等等。遇到要升级什么的，使用参数rpm -ivh sqlite-3.5.9-2.i386.rpm &#8211;replacefiles </p>
<p>rpm举几个例子：<br />
安装：# rpm -ivh subversion-1.6.13-1.i386.rpm<br />
卸载：# rpm -e subversion；强力卸载：# rpm -e subversion &#8211;nodeps<br />
升级：# rpm -Uvh subversion-1.6.13-1.i386.rpm</p>
<p>或许还可以直接拷贝目录吧，然后配置一下，这不就是Linux嘛，我没有试过。希望有高手可以指点。</p>
<p>期间还遇到一个非常复杂的问题，就是安装的时候subversion-1.6是依赖sqlite-3.4以上的，但是我的linux使用的是sqlite-3.3，所以需要升级sqlite。<br />
但是sqlite却删除不掉，因为很多东西依赖与他。</p>
<p>rpm -e sqlite-3.3.6-2<br />
error: Failed dependencies:<br />
        libsqlite3.so.0()(64bit) is needed by (installed) rpm-4.4.2-47.el5.x86_64<br />
        libsqlite3.so.0()(64bit) is needed by (installed) rpm-libs-4.4.2-47.el5.x86_64<br />
        libsqlite3.so.0()(64bit) is needed by (installed) yum-metadata-parser-1.0-8.fc6.x86_64<br />
        libsqlite3.so.0()(64bit) is needed by (installed) python-sqlite-1.1.7-1.2.1.x86_64<br />
        libsqlite3.so.0()(64bit) is needed by (installed) apr-util-1.2.7-6.x86_64</p>
<p>结果我一火，将这个文件删掉了<br />
rpm -e sqlite-3.3.6-2 &#8211;nodeps</p>
<p>这下完蛋了，出现了以下的错误：<br />
error while loading shared libraries: libsqlite3.so.0: cannot open shared object file: No such file or directory<br />
要安装sqlite，就需要rpm，而rpm又需要sqlite，死循环了。</p>
<p>解决办法是：<br />
在windows中下载了sqlite-3.3.6-2.rpm ，解压出libsqlite3.so.0.8.6放在linux系统中<br />
然后建一个链接：<br />
ln -s /usr/lib/libsqlite3.so.0.8.6 /usr/lib/libsqlite3.so.0</p>
<p>这样再次安装sqlite就可以了。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.yeahxj.com/2010/10/08/install-subversion/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>安装samba-[学习笔记]</title>
		<link>http://www.yeahxj.com/2010/08/23/installsamba/</link>
		<comments>http://www.yeahxj.com/2010/08/23/installsamba/#comments</comments>
		<pubDate>Mon, 23 Aug 2010 13:07:15 +0000</pubDate>
		<dc:creator>行骏</dc:creator>
				<category><![CDATA[前端事儿]]></category>

		<guid isPermaLink="false">http://www.yeahxj.com/?p=324</guid>
		<description><![CDATA[samba是Linux下的一个文件共享服务软件，属于必装软件。Linux命令这种东西真的需要记录，不想Wind [...]]]></description>
				<content:encoded><![CDATA[<p>samba是Linux下的一个文件共享服务软件，属于必装软件。Linux命令这种东西真的需要记录，不想Windows，装过一遍，有点印象，下次一般都能搞定，真TMD的Linux。这些操作对懂的人来说应该是很简单的，权当学习笔记。<br />
以下是RedHat和CentOS等的系统操作。<br />
<strong>1、# yum -y install samba</strong><br />
使用yum命令安装samba，加入-y参数，如遇询问自动选择y，全自动下载并安装samba，此过程需要一点时间。如果是Ubuntu的话用apt-get。</p>
<p><strong>2、# rpm -qa | grep samba</strong><br />
检查samba服务包的安装情况，会显示类似如下两个包：<br />
samba-common-3.0.33-3.7.el5_3.1    //服务器和客户端均需要的文件<br />
samba-3.0.33-3.7.el5_3.1                 //服务器端文件</p>
<p><strong>3、# whereis samba</strong><br />
由于是yum安装，可以用此命令查看samba安装位置，得到类似如下内容：<br />
samba: /etc/samba /usr/lib/samba /usr/share/samba /usr/share/man/man7/samba.7.gz</p>
<p><strong>4、# vi /etc/samba/smb.conf</strong><br />
根据步骤3得知smb.conf的位置，配置samba：<br />
（1）[global]        找到全局设置标签，在下面进行配置<br />
workgroup = MYGROUP       找到此行，改为workgroup = WORKGROUP，这里以 Windows XP 默认的“WORKGROUP”为例<br />
（2）配置最简单访问目录几个基本属性：<br />
[share]       windows客户端查看时看到的文件夹名<br />
path = /var/samba/share       共享目录位置，要系统中存在的目录，也可以配置完再创建<br />
read only = no<br />
public   = yes<br />
我在操作的时候觉得这些都没必要的。</p>
<p>5、给配置的共享目录设置权限：<br />
# mkdir /var/samba/share       如刚才配置的共享目录不存在则创建<br />
# chown -R nobody. /var/samba/share       设置共享目录归属为 nobody<br />
# chmod 777 /var/samba/share       将共享目录属性设置为 777</p>
<p><strong>6、# smbpasswd -a username</strong><br />
将linux系统已存在用户 username（例）加入到 Samba 用户数据库，windows访问samba共享目录时需要输入此用户名和密码。<br />
这步才是关键，加入这个用户之后好像会默认将这个用户的用户路径添加为共享目录。<br />
New SMB password:       在此输入密码<br />
Retype new SMB password:       重复密码</p>
<p><strong>7、# service smb start</strong><br />
由于是yum安装可用此命令启动samba。</p>
<p>8、打开你的Windows，使用\\IP就可以访问Linux的文件了。</p>
<p>恭喜！</p>
<p>无奈最近刚刚换了电脑，重装了系统，无图不能发。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.yeahxj.com/2010/08/23/installsamba/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>博客迁移，组织未变</title>
		<link>http://www.yeahxj.com/2010/08/07/blog-move/</link>
		<comments>http://www.yeahxj.com/2010/08/07/blog-move/#comments</comments>
		<pubDate>Sat, 07 Aug 2010 07:33:22 +0000</pubDate>
		<dc:creator>行骏</dc:creator>
				<category><![CDATA[前端事儿]]></category>

		<guid isPermaLink="false">http://www.yeahxj.com/?p=316</guid>
		<description><![CDATA[这可能是很简单的活儿，大师们肯定很不屑，但因为之前一直没干过，我想第一次，无论怎样，总是值得纪念的。 最早是从 [...]]]></description>
				<content:encoded><![CDATA[<p><a href="http://www.yeahxj.com/wp-content/uploads/made-in-china.jpg"><img src="http://www.yeahxj.com/wp-content/uploads/made-in-china.jpg" alt="made-in-china" title="made-in-china" width="600" height="221" class="size-full wp-image-317" /></a><br />
这可能是很简单的活儿，大师们肯定很不屑，但因为之前一直没干过，我想第一次，无论怎样，总是值得纪念的。</p>
<p>最早是从windows的主机迁移到Linux的，没其他的办法，只有FTP。<br />
现在是从Linux迁移到Linux，那就很方便了。</p>
<p>首先老空间导出Mysql：<br />
mysqldump -u 数据库用户名 -p 数据库名 > db.sql<br />
然后打包所有的文件：<br />
tar -czf backup.tar.gz *<br />
然后新空间wget获取包：<br />
wget -d 域名/backup.tar.gz backup.tar.gz<br />
解包：<br />
tar -xzvf backup.tar.gz<br />
导入mysql数据库：<br />
mysql -u 数据库用户名 -p 数据库名 < db.sql<br />
访问OK之后就可以去切换你的域名A记录了。<br />
据说用scp更加方便。</p>
<p>组织还是http://miao.in/，头目还是http://ooxx.me/，很不错，当然不仅仅是放博客了，年复一年！</p>
]]></content:encoded>
			<wfw:commentRss>http://www.yeahxj.com/2010/08/07/blog-move/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>innerHTML和cloneNode表现的很不好</title>
		<link>http://www.yeahxj.com/2010/07/09/innerhtml-clonenode-bad/</link>
		<comments>http://www.yeahxj.com/2010/07/09/innerhtml-clonenode-bad/#comments</comments>
		<pubDate>Fri, 09 Jul 2010 13:14:03 +0000</pubDate>
		<dc:creator>行骏</dc:creator>
				<category><![CDATA[前端事儿]]></category>
		<category><![CDATA[前端]]></category>

		<guid isPermaLink="false">http://www.yeahxj.com/?p=298</guid>
		<description><![CDATA[有时候需要把表单里的元素复制出来，这里有两个方法，一是先去innerHTML，然后在innerHTML到其他的 [...]]]></description>
				<content:encoded><![CDATA[<p>有时候需要把表单里的元素复制出来，这里有两个方法，一是先去innerHTML，然后在innerHTML到其他的地方；二是cloneNode(true)出来到其他地方，但是这个两个方法在各个浏览器仅仅是对普通的表单的元素都是支持不完善的，甚至IE自己的系列都有变化。</p>
<p>以下是支持列表，yes表示会把值复制出来，no表示不会。其实还有包括表单元素的自定义属性，事件等也是各有千秋，我实在是懒得列举。</p>
<table cellspacing="0" cellpadding="0" border="1">
<tr>
<td width="138">innerHTML</td>
<td width="72">IE6</td>
<td width="72">IE7</td>
<td width="72">IE8</td>
<td width="72">FF</td>
<td width="88">Chrome</td>
</tr>
<tr>
<td>input[text]</td>
<td>yes</td>
<td>yes</td>
<td>yes</td>
<td>no</td>
<td>no</td>
</tr>
<tr>
<td>input[checkbox]</td>
<td>yes</td>
<td>yes</td>
<td>no</td>
<td>no</td>
<td>no</td>
</tr>
<tr>
<td>input[radio]</td>
<td>yes</td>
<td>yes</td>
<td>no</td>
<td>no</td>
<td>no</td>
</tr>
<tr>
<td>select</td>
<td>yes</td>
<td>yes</td>
<td>yes</td>
<td>no</td>
<td>no</td>
</tr>
<tr>
<td>textarea</td>
<td>yes</td>
<td>yes</td>
<td>yes</td>
<td>no</td>
<td>no</td>
</tr>
</table>
</p>
<table cellspacing="0" cellpadding="0" border="1">
<tr>
<td width="138">cloneNode</td>
<td width="72">IE6</td>
<td width="72">IE7</td>
<td width="72">IE8</td>
<td width="72">FF</td>
<td width="88">Chrome</td>
</tr>
<tr>
<td>input[text]</td>
<td>yes</td>
<td>yes</td>
<td>yes</td>
<td>yes</td>
<td>yes</td>
</tr>
<tr>
<td>input[checkbox]</td>
<td>no</td>
<td>no</td>
<td>no</td>
<td>yes</td>
<td>yes</td>
</tr>
<tr>
<td>input[radio]</td>
<td>no</td>
<td>no</td>
<td>no</td>
<td>yes</td>
<td>yes</td>
</tr>
<tr>
<td>select</td>
<td>no</td>
<td>no</td>
<td>no</td>
<td>no</td>
<td>no</td>
</tr>
<tr>
<td>textarea</td>
<td>yes</td>
<td>yes</td>
<td>yes</td>
<td>no</td>
<td>no</td>
</tr>
</table>
<p>解决上面的最保险的方法是对每一个元素类似这样:</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #000066; font-weight: bold;">var</span> aClone <span style="color: #339933;">=</span> dClone.<span style="color: #660066;">getElementsByTagName</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'SELECT'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000066; font-weight: bold;">var</span> aSelect	 <span style="color: #339933;">=</span> dSelect.<span style="color: #660066;">getElementsByTagName</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'SELECT'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span> aClone.<span style="color: #660066;">length</span> <span style="color: #339933;">&gt;</span> <span style="color: #CC0000;">0</span> <span style="color: #339933;">&amp;&amp;</span> aClone.<span style="color: #660066;">length</span> <span style="color: #339933;">==</span> aSelect.<span style="color: #660066;">length</span> <span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
	<span style="color: #000066; font-weight: bold;">for</span><span style="color: #009900;">&#40;</span> <span style="color: #000066; font-weight: bold;">var</span> i <span style="color: #339933;">=</span> <span style="color: #CC0000;">0</span><span style="color: #339933;">,</span> len <span style="color: #339933;">=</span> aClone.<span style="color: #660066;">length</span><span style="color: #339933;">;</span> i <span style="color: #339933;">&lt;</span> len<span style="color: #339933;">;</span> i<span style="color: #339933;">++</span> <span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
		aClone<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">selectedIndex</span> <span style="color: #339933;">=</span> aSelect<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span>.<span style="color: #660066;">selectedIndex</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>随即，附送美图一张：<br />
<a href="http://www.yeahxj.com/wp-content/uploads/2010-outing.jpg"><img class="alignnone size-medium wp-image-301" title="2010-outing" src="http://www.yeahxj.com/wp-content/uploads/2010-outing-300x63.jpg" alt="" width="300" height="63" /></a><br />
点击小图看大图，这次outing最欢畅的就是住五星，很豪华很奢侈！</p>
]]></content:encoded>
			<wfw:commentRss>http://www.yeahxj.com/2010/07/09/innerhtml-clonenode-bad/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>北大民谣歌手邵夷贝，听小妮子哼哼唱唱</title>
		<link>http://www.yeahxj.com/2010/05/17/shaoxiaomao/</link>
		<comments>http://www.yeahxj.com/2010/05/17/shaoxiaomao/#comments</comments>
		<pubDate>Mon, 17 May 2010 15:33:14 +0000</pubDate>
		<dc:creator>行骏</dc:creator>
				<category><![CDATA[听我意淫]]></category>

		<guid isPermaLink="false">http://www.yeahxj.com/?p=290</guid>
		<description><![CDATA[简介：本名邵夷贝，昵称小毛。北京大学新闻系毕业。原创民谣歌手，独立音乐人。文字、绘画、戏剧创作者。 流派：民谣 [...]]]></description>
				<content:encoded><![CDATA[<p><a href="http://www.yeahxj.com/wp-content/uploads/p469435742.jpg"><img class="alignnone size-full wp-image-292" title="p469435742" src="http://www.yeahxj.com/wp-content/uploads/p469435742.jpg" alt="" width="300" height="450" /></a><a href="http://www.yeahxj.com/wp-content/uploads/W020090512523814355279.jpg"><img class="alignnone size-full wp-image-291" title="W020090512523814355279" src="http://www.yeahxj.com/wp-content/uploads/W020090512523814355279.jpg" alt="" width="390" height="322" /></a></p>
<p>简介：本名邵夷贝，昵称小毛。北京大学新闻系毕业。原创民谣歌手，独立音乐人。文字、绘画、戏剧创作者。<br />
流派：民谣/Folk<br />
风格：Indie 无力女声 民谣 Folk 大写实<br />
官方网址：<br />
微博：<a rel="nofollow" href="http://t.sina.com.cn/shaoyibei" target="_blank">http://t.sina.com.cn/shaoyibei</a><br />
博客：<a rel="nofollow" href="http://crazystar.blogcn.com/" target="_blank">http://crazystar.blogcn.com/</a><br />
小组：<a href="http://www.douban.com/group/165543/">http://www.douban.com/group/165543/</a><br />
qq 群：40189751/65753348/7441679<br />
邮箱：shaoyibei@gmail.com</p>
<p>只推荐两首：<br />
1.大龄文艺女青年之歌（淡定版）<br />
<embed src="http://www.xiami.com/widget/0_1769530668/singlePlayer.swf" type="application/x-shockwave-flash" width="257" height="33" wmode="transparent"></embed></p>
<p>D:<a href="http://www.divshare.com/download/11399714-799">http://www.divshare.com/download/11399714-799</a></p>
<p>2.现象2009<br />
<embed src="http://www.xiami.com/widget/0_1769526900/singlePlayer.swf" type="application/x-shockwave-flash" width="257" height="33" wmode="transparent"></embed></p>
<p>D:<a href="http://www.divshare.com/download/11399736-296">http://www.divshare.com/download/11399736-296</a></p>
<p>All-D：<a href="http://u.115.com/file/t0ac0f7fca" target="_blank">http://u.115.com/file/t0ac0f7fca</a> 过期了就自己Google吧！</p>
<p>&#8212;&#8212;&#8212;&#8211;开始独立见解了&#8212;&#8212;&#8212;&#8212;&#8212;</p>
<p>两首歌的歌词都非常有意思，希望喜欢的人能够认认真真听歌词。</p>
<p>听到此歌来源于同事<a href="http://alexux.com/" target="_blank">韩超</a>的分享，听后觉得自己也喜欢，听着听着觉得越来越喜欢，那怎么办？只能分享出来了！</p>
]]></content:encoded>
			<wfw:commentRss>http://www.yeahxj.com/2010/05/17/shaoxiaomao/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
	</channel>
</rss>
