<?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>VikinG</title>
	<atom:link href="http://www.vikingmute.com/feed" rel="self" type="application/rss+xml" />
	<link>http://www.vikingmute.com</link>
	<description>&#34;恨就恨出一个追求&#34; by 二手玫瑰</description>
	<lastBuildDate>Wed, 15 Feb 2012 09:28:53 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>自己写的jquery tooltip插件 &#8212; vtooltip</title>
		<link>http://www.vikingmute.com/archives/252</link>
		<comments>http://www.vikingmute.com/archives/252#comments</comments>
		<pubDate>Thu, 09 Feb 2012 09:58:10 +0000</pubDate>
		<dc:creator>VikinG</dc:creator>
				<category><![CDATA[JS]]></category>

		<guid isPermaLink="false">http://www.vikingmute.com/?p=252</guid>
		<description><![CDATA[Update:version 1.3 这几天做了一个比较大的更新 现在使用插件不需要引入任何图片了 小三角由css完成渲染 添加了两种风格 dark.css light.css 根据您的需要引入对应的css就可以了 这个小玩意儿是完全是在我好好使用github的第一个产物 Demo页也是在github pages里面生成的 前几天公司正好有这个需求 所以我就在github里面好好写了一下 效果请看   DEMO 现在jquery的tipsy插件也很多了 我这个插件支持这些基础的功能 支持四个方向显示tipsy（top,bottom,left,right） 支持三种方式显示数据（normal，ajax，jsonp） 异步获取数据会缓存数据 不会再请求一次 计划添加几种css3样式 可以供大家切换（已经完成） 计划添加自适应功能 当页面距下边距离太短的时候 自动切换到上方 使用方法 下载以后将下面的两个文件添加进页面(jquery.vtip.js, style.css)（可以修改css文件来自定义） 参数说明 var settings = { //four postions,top left,right bottom &#8230; <a href="http://www.vikingmute.com/archives/252">继续阅读 <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><em><strong>Update:version 1.3<br />
这几天做了一个比较大的更新 现在使用插件不需要引入任何图片了 小三角由css完成渲染 添加了两种风格 dark.css light.css 根据您的需要引入对应的css就可以了</strong></em></p>
<p><a href="http://www.vikingmute.com/wp-content/uploads/2012/02/11.png"><img class="aligncenter size-full wp-image-257" title="light风格vtooltip" src="http://www.vikingmute.com/wp-content/uploads/2012/02/11.png" alt="" width="266" height="121" /></a><br />
<a href="http://www.vikingmute.com/wp-content/uploads/2012/02/2.png"><img class="aligncenter size-full wp-image-258" title="dark风格vtooltip" src="http://www.vikingmute.com/wp-content/uploads/2012/02/2.png" alt="" width="231" height="113" /></a></p>
<p>这个小玩意儿是完全是在我好好使用github的第一个产物 Demo页也是在github pages里面生成的 前几天公司正好有这个需求 所以我就在github里面好好写了一下</p>
<p>效果请看  <a href="http://vikingmute.github.com/vtooltip/demo.html" target="_blank"> DEMO</a></p>
<p>现在jquery的tipsy插件也很多了 我这个插件支持这些基础的功能</p>
<ol>
<li>支持四个方向显示tipsy（top,bottom,left,right）</li>
<li>支持三种方式显示数据（normal，ajax，jsonp）</li>
<li>异步获取数据会缓存数据 不会再请求一次</li>
<li>计划添加几种css3样式 可以供大家切换（已经完成）</li>
<li>计划添加自适应功能 当页面距下边距离太短的时候 自动切换到上方</li>
</ol>
<p>使用方法<br />
下载以后将下面的两个文件添加进页面(jquery.vtip.js, style.css)（可以修改css文件来自定义）</p>
<p>参数说明</p>
<pre class="brush:jscript">var settings = {
	//four postions,top left,right bottom
	position:'bottom',
	//three ways:normal or ajax or jsonp
	method:'normal',
	//when method is ajax or jsonp, you need a url
	url:'',
	//when you need a custom message
	desc:'',
	//custom width&amp;height
	width:'auto',
	height:'auto'
}</pre>
<p>使用方法</p>
<pre class="brush:jscript">//直接显示链接的title
$('a').vtip();
//在右边显示自定义的信息
$('a').vtip({"desc":"Hey i am a custom tip","position":"right"});
//ajax方法 包含一个回调函数
$('#ajax').vtip({method:"ajax",url:"posts.php"},function(data,ele){
	//data代表服务器返回的数据 ele表示当前元素
	//code goes here

})</pre>
<p>配置简单 中意的可以在这里fork</p>
<p><a href="https://github.com/vikingmute/vtooltip" target="_blank">DOWNLOAD&amp;FORK</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.vikingmute.com/archives/252/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to set up a Github Pages?</title>
		<link>http://www.vikingmute.com/archives/247</link>
		<comments>http://www.vikingmute.com/archives/247#comments</comments>
		<pubDate>Wed, 01 Feb 2012 10:01:22 +0000</pubDate>
		<dc:creator>VikinG</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.vikingmute.com/?p=247</guid>
		<description><![CDATA[github有个特别实用的功能最近才知道，就是你在上面建立一个项目，他可以自动在上面按你的需要生成html页面，可以通过浏览器直接访问，原来我一些小东西的demo都是传到服务器上面，不仅麻烦 同步还是个问题，现在真是节省了我很多的时间。下面就是一个我项目自动生成的地址： http://vikingmute.github.com/vtooltip/ 下面我们就说说怎么样来生成  有两种方法 我推荐第二种直接用github提供的自动生成工具 将页面切换到你的项目首页 比如说https://github.com/vikingmute/vtooltip &#160; 然后点击这个admin按钮 然后勾选github pages的选项框 然后在弹出框里面点击 Automatic GitHub Page Generator 当这部分完成时 你就可以直接在浏览器里面看到你的页面了 这个就是地址格式http://{userid}.github.com/{project} 怎样修改这个页面的内容 只要在项目中checkout一个叫gh-pages的branch就可以了 $ cd Repos/ampere $ git fetch origin remote: Counting objects: 92, done. remote: Compressing objects: 100% (63/63), done. &#8230; <a href="http://www.vikingmute.com/archives/247">继续阅读 <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>github有个特别实用的功能最近才知道，就是你在上面建立一个项目，他可以自动在上面按你的需要生成html页面，可以通过浏览器直接访问，原来我一些小东西的demo都是传到服务器上面，不仅麻烦 同步还是个问题，现在真是节省了我很多的时间。下面就是一个我项目自动生成的地址：</p>
<p><a href="http://vikingmute.github.com/vtooltip/">http://vikingmute.github.com/vtooltip/</a></p>
<p>下面我们就说说怎么样来生成  有两种方法 我推荐第二种直接用github提供的自动生成工具</p>
<p>将页面切换到你的项目首页 比如说<a href="https://github.com/vikingmute/vtooltip">https://github.com/vikingmute/vtooltip</a></p>
<p>&nbsp;</p>
<p>然后点击这个admin按钮<img class="aligncenter" title="admin" src="http://pages.github.com/admin_button.png" alt="" width="359" height="174" /></p>
<p>然后勾选github pages的选项框<br />
<img class="aligncenter" title="github pages" src="http://pages.github.com/ghpages_checkbox.png" alt="" width="693" height="190" /></p>
<p>然后在弹出框里面点击 Automatic GitHub Page Generator</p>
<p>当这部分完成时 你就可以直接在浏览器里面看到你的页面了 这个就是地址格式http://{userid}.github.com/{project}</p>
<p>怎样修改这个页面的内容 只要在项目中checkout一个叫gh-pages的branch就可以了</p>
<blockquote><p>$ cd Repos/ampere<br />
$ git fetch origin<br />
remote: Counting objects: 92, done.<br />
remote: Compressing objects: 100% (63/63), done.<br />
remote: Total 68 (delta 41), reused 0 (delta 0)<br />
Unpacking objects: 100% (68/68), done.<br />
From git@github.com:tekkub/ampere<br />
* [new branch] gh-pages -&gt; origin/gh-pages<br />
$ git checkout -b gh-pages origin/gh-pages<br />
Branch gh-pages set up to track remote branch refs/remotes/origin/gh-pages.<br />
Switched to a new branch “gh-pages”</p></blockquote>
<p>现在你只要提交gh—pages这个分支就可以变化你demo的内容</p>
<blockquote><p>$ cd Repos/ampere<br />
//可以在分支和主库中转换<br />
$ git checkout master<br />
$ git checkout gh-pages<br />
//分支从主库更新（merge）<br />
$ git merge gh-pages</p></blockquote>
<p>更多帮助请看文档<br />
<a href="http://pages.github.com/" target="_blank">git基本操作 branch和merge</a></p>
<p><a href="http://pages.github.com/" target="_blank">Github pages文档</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.vikingmute.com/archives/247/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>可怜又可悲</title>
		<link>http://www.vikingmute.com/archives/244</link>
		<comments>http://www.vikingmute.com/archives/244#comments</comments>
		<pubDate>Tue, 17 Jan 2012 09:59:00 +0000</pubDate>
		<dc:creator>VikinG</dc:creator>
				<category><![CDATA[Life]]></category>

		<guid isPermaLink="false">http://www.vikingmute.com/?p=244</guid>
		<description><![CDATA[今年的开头都没写总结 展望之类的  其实当时心里面已经打好一千字的腹稿 但是提笔发现半个字都搞不出来  其实几个字就可以概括 ”去年 经常傻逼 今年 继续傻逼“ 傻逼是我的特性 如果你发现我突然有一天油头滑脑 懂得聪明了 那我真的就不是我了。 技术上这几天还行 一直在学点东西 写点东西 看点东西，在github上写东西感觉挺好的。 写了一个mousetip的插件 写了一个自动加广告触发的程序 vbooks还是没有怎么动手 看了几篇好文章 包括Javascript秘密花园 http://bonsaiden.github.com/JavaScript-Garden/zh 记了笔记。 这几天无聊的时候和鬼哥一起看了电视剧 《北京爱情故事》 里面有个叫是石小猛的傻逼和我很像 丫总是一副有梦想的样子 觉得自己挺牛逼的 有着卑微而脆弱的自尊 但是偏偏找了个牛逼媳妇儿  隔三差五的因为钱的事情吃个醋 发个火。 前几天看猪蹄蹄的微博上写了一句 “世间有多少姑娘为了自己男人那点可怜又可悲的自尊心而假装无生活自理能力，假装不喜欢帅哥和名牌，假装文盲，假装一碰就高潮……真是委屈了你们。” 发现这和我很像  和大部分男人都挺像 心里面总共5平米 一句话就能占三平米  容不得别人 尤其是自己的老婆 亲戚 &#8230; <a href="http://www.vikingmute.com/archives/244">继续阅读 <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>今年的开头都没写总结 展望之类的  其实当时心里面已经打好一千字的腹稿 但是提笔发现半个字都搞不出来  其实几个字就可以概括 ”去年 经常傻逼 今年 继续傻逼“ 傻逼是我的特性 如果你发现我突然有一天油头滑脑 懂得聪明了 那我真的就不是我了。</p>
<p>技术上这几天还行 一直在学点东西 写点东西 看点东西，在github上写东西感觉挺好的。 写了一个mousetip的插件 写了一个自动加广告触发的程序 vbooks还是没有怎么动手 看了几篇好文章 包括Javascript秘密花园 <a href="http://bonsaiden.github.com/JavaScript-Garden/zh">http://bonsaiden.github.com/JavaScript-Garden/zh</a> 记了笔记。</p>
<p>这几天无聊的时候和鬼哥一起看了电视剧 《北京爱情故事》 里面有个叫是石小猛的傻逼和我很像 丫总是一副有梦想的样子 觉得自己挺牛逼的 有着卑微而脆弱的自尊 但是偏偏找了个牛逼媳妇儿  隔三差五的因为钱的事情吃个醋 发个火。</p>
<p>前几天看猪蹄蹄的微博上写了一句</p>
<p><em>“世间有多少姑娘为了自己男人那点可怜又可悲的自尊心而假装无生活自理能力，假装不喜欢帅哥和名牌，假装文盲，假装一碰就高潮……真是委屈了你们。”</em></p>
<p>发现这和我很像  和大部分男人都挺像 心里面总共5平米 一句话就能占三平米  容不得别人 尤其是自己的老婆 亲戚 朋友比你强 一说到比你强的一点 就像嘴里吃了大粪似的  自尊心不能吃不能喝不能卖不能买 其实说白了还是钱的事 有钱了以后 驼背变挺直  阳痿变威猛 小四变姚明。</p>
<p>所以我还是多加淡定 打好篮球 努力学习+赚钱。  是的  这就是我2012年的计划</p>
]]></content:encoded>
			<wfw:commentRss>http://www.vikingmute.com/archives/244/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HTTP协议详解</title>
		<link>http://www.vikingmute.com/archives/238</link>
		<comments>http://www.vikingmute.com/archives/238#comments</comments>
		<pubDate>Wed, 04 Jan 2012 09:36:22 +0000</pubDate>
		<dc:creator>VikinG</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.vikingmute.com/?p=238</guid>
		<description><![CDATA[这几天要努力学习基础知识，在总结php curl的用法和ajax的基础的时候发现要好好总结一下http，在维基百科上把http协议好好看了看 http协议是www的基础，所以也肯定是web开发的最基础的东西，总结写在下面，有不太清楚的同学可以看看。 定义：超文本传输协议（HTTP，HyperText Transfer Protocol)是互联网上应用最为广泛的一种网络协议。所有的WWW文件都必须遵守这个标准。 工作流程： HTTP是一个客户端和服务器端请求和应答的标准（TCP）。客户端是终端用户，服务器端是网站。通过使用Web浏览器、网络爬虫或者其它的工具，客户端发起一个到服务器上指定端口（默认端口为80）的HTTP请求。（我们称这个客户端）叫用户代理（user agent）。应答的服务器上存储着（一些）资源，比如HTML文件和图像。（我们称）这个应答服务器为源服务器（origin server） 构成： HTTP有两个关键部分：一个是请求 Request（客户端），一个是响应Response（服务器端） Request Method：HTTP defines nine methods (sometimes referred to as “verbs”) indicating the desired action to be performed on the identified resource.HTTP请求总共有九种方法，包括（OPTIONS、GET、HEAD、POST、PUT、DELETE、TRACE） 详细的信息 参看 http://en.wikipedia.org/wiki/HTTP#Request_methods POST和GET的区别请察看我原来写的日志http://www.vikingmute.com/archives/100 HTTP Headers：HTTP &#8230; <a href="http://www.vikingmute.com/archives/238">继续阅读 <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>这几天要努力学习基础知识，在总结php curl的用法和ajax的基础的时候发现要好好总结一下http，在维基百科上把http协议好好看了看 http协议是www的基础，所以也肯定是web开发的最基础的东西，总结写在下面，有不太清楚的同学可以看看。</p>
<p>定义：超文本传输协议（HTTP，HyperText Transfer Protocol)是互联网上应用最为广泛的一种网络协议。所有的WWW文件都必须遵守这个标准。</p>
<p>工作流程：<br />
HTTP是一个客户端和服务器端请求和应答的标准（TCP）。客户端是终端用户，服务器端是网站。通过使用Web浏览器、网络爬虫或者其它的工具，客户端发起一个到服务器上指定端口（默认端口为80）的HTTP请求。（我们称这个客户端）叫用户代理（user agent）。应答的服务器上存储着（一些）资源，比如HTML文件和图像。（我们称）这个应答服务器为源服务器（origin server）</p>
<div id="attachment_239" class="wp-caption aligncenter" style="width: 722px"><a href="http://www.vikingmute.com/wp-content/uploads/2012/01/Screenshot-2012-01-04-162713.png"><img class="size-full wp-image-239" title="http过程" src="http://www.vikingmute.com/wp-content/uploads/2012/01/Screenshot-2012-01-04-162713.png" alt="http" width="712" height="477" /></a><p class="wp-caption-text">curl http过程</p></div>
<p><span id="more-238"></span><br />
构成：<br />
HTTP有两个关键部分：一个是请求 Request（客户端），一个是响应Response（服务器端）</p>
<p><strong>Request Method</strong>：HTTP defines nine methods (sometimes referred to as “verbs”) indicating the desired action to be performed on the identified resource.HTTP请求总共有九种方法，包括（OPTIONS、GET、HEAD、POST、PUT、DELETE、TRACE）<br />
详细的信息 参看<br />
<a title="http://en.wikipedia.org/wiki/HTTP#Request_methods" href="http://en.wikipedia.org/wiki/HTTP#Request_methods">http://en.wikipedia.org/wiki/HTTP#Request_methods</a><br />
POST和GET的区别请察看我原来写的日志<a title="http://www.vikingmute.com/archives/100" href="http://www.vikingmute.com/archives/100">http://www.vikingmute.com/archives/100</a></p>
<p><strong>HTTP Headers</strong>：HTTP header fields are components of the message header of requests and responses in the Hypertext Transfer Protocol (HTTP). They define the operating parameters of an HTTP transaction.HTTP头信息是HTTP请求和回应中附带的描述性的信息。他们定义了HTTP交互中的操作参数。<br />
Headers分为Request Headers和Response Headers两个的区别 下面两个个举一个例子。</p>
<div id="attachment_240" class="wp-caption aligncenter" style="width: 584px"><a href="http://www.vikingmute.com/wp-content/uploads/2012/01/Screenshot-2012-01-04-170704.png"><img class="size-full wp-image-240" title="http headers" src="http://www.vikingmute.com/wp-content/uploads/2012/01/Screenshot-2012-01-04-170704.png" alt="http headers" width="574" height="402" /></a><p class="wp-caption-text">HTTP headers</p></div>
<p>请看上面的图 这是wiki百科的请求和响应headers，举其中的两个例子<br />
Host： The domain name of the server (for virtual hosting), mandatory since HTTP/1.1 ：Host: en.wikipedia.org</p>
<p>Content-Type：The mime type of this content ： Content-Type: text/html; charset=utf-8</p>
<p>所有Headers的参考列表，请看<a title="http://en.wikipedia.org/wiki/List_of_HTTP_headers" href="http://en.wikipedia.org/wiki/List_of_HTTP_headers">http://en.wikipedia.org/wiki/List_of_HTTP_headers</a></p>
<p><strong>Status codes</strong>：In HTTP/1.0 and since, the first line of the HTTP response is called the status line and includes a numeric status code (such as “404&#8243;) and a textual reason phrase (such as “Not Found”). 在HTTP中，HTTP响应的第一行被称作状态行，包括一个状态码（比如404）和一个文字原因短语（比如“not found”）<br />
比如说： HTTP/1.1 302 Found</p>
<p>所有的状态码列表请参考：<a title="http://en.wikipedia.org/wiki/List_of_HTTP_status_codes" href="http://en.wikipedia.org/wiki/List_of_HTTP_status_codes">http://en.wikipedia.org/wiki/List_of_HTTP_status_codes</a></p>
<p>大体上就是这么多了，找这些资料 阅读和总结花了我大约2个多小时，累死了 不过也值了，搞清楚就最好了~</p>
<p>如果您想更深入的了解一些http的其他知识请看下面的参考</p>
<p><em>HTTP compression（HTTP压缩）：<a href="http://en.wikipedia.org/wiki/HTTP_compression">http://en.wikipedia.org/wiki/HTTP_compression</a></em></p>
<p>HTTPS（HTTP Secure）：<a href="http://en.wikipedia.org/wiki/HTTP_Secure">http://en.wikipedia.org/wiki/HTTP_Secure</a></p>
<p>HTTP Cookie：<a href="http://en.wikipedia.org/wiki/HTTP_cookie">http://en.wikipedia.org/wiki/HTTP_cookie</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.vikingmute.com/archives/238/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP处理csv文件 以及处理中文会遇到的问题</title>
		<link>http://www.vikingmute.com/archives/235</link>
		<comments>http://www.vikingmute.com/archives/235#comments</comments>
		<pubDate>Thu, 29 Dec 2011 09:37:00 +0000</pubDate>
		<dc:creator>VikinG</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.vikingmute.com/?p=235</guid>
		<description><![CDATA[今天要处理一个excel文件 其实用php的一个库PHPexcel那个库就可以 但是我懒得还要下个库 就把excel先转换成csv，因为php里面有内置的函数可以直接支持csv，但是处理中文的时候会遇到乱码或者中文缺失的问题 下面这段源代码就显示怎样读取数据并怎样添加到数组中 //页面用utf-8输出 避免乱码 header('Content-Type: text/html; charset=utf-8'); //设置地区 解决中文缺失的问题 setlocale(LC_ALL,'zh_CN.utf8'); //打开csv文件 if (($handle = fopen("sichuan.csv", "r")) !== FALSE) { $ads = array(); $id = 0; //处理数据 while (($data = fgetcsv($handle,1000,",")) !== FALSE) { $ads[$id]['id'] = $id; $ads[$id]['name'] &#8230; <a href="http://www.vikingmute.com/archives/235">继续阅读 <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>今天要处理一个excel文件 其实用php的一个库PHPexcel那个库就可以 但是我懒得还要下个库 就把excel先转换成csv，因为php里面有内置的函数可以直接支持csv，但是处理中文的时候会遇到乱码或者中文缺失的问题 下面这段源代码就显示怎样读取数据并怎样添加到数组中</p>
<pre class="brush:php">//页面用utf-8输出 避免乱码
header('Content-Type: text/html; charset=utf-8');
//设置地区 解决中文缺失的问题
setlocale(LC_ALL,'zh_CN.utf8');
//打开csv文件
if (($handle = fopen("sichuan.csv", "r")) !== FALSE) {
	$ads = array();
	$id = 0;
    //处理数据
    while (($data = fgetcsv($handle,1000,",")) !== FALSE) {
    	$ads[$id]['id'] = $id;
    	$ads[$id]['name'] = $data[5];
    	$ads[$id]['pdps'] = '';
    	$id++;
    }
    //可以处理成json
    $str = json_encode($ads);
    echo $str;
    fclose($handle);
}</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.vikingmute.com/archives/235/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>大作翻译&#8212;Interviewing the front-end engineer By Nicholas C. Zakas</title>
		<link>http://www.vikingmute.com/archives/233</link>
		<comments>http://www.vikingmute.com/archives/233#comments</comments>
		<pubDate>Wed, 28 Dec 2011 09:48:46 +0000</pubDate>
		<dc:creator>VikinG</dc:creator>
				<category><![CDATA[JS]]></category>

		<guid isPermaLink="false">http://www.vikingmute.com/?p=233</guid>
		<description><![CDATA[Nicholas Zakas是高效率javascript这本书的作者，这篇文章写的是怎样面试前端工程师 其实他里面提到了很多基础知识 也是我自己需要强化和巩固的 过一阵我会对里面每个提到的知识点做一个总结和提炼 每一个知识点写一篇博客 所以我在这里之翻译基础只是这一部分（好久不翻译了 肯定很差 以后可以让刘老板帮忙改进一下） 原文链接 基础知识 我们生活在一个通过互联网可以快速汲取知识的时代，但是 之了解一些知识的皮毛并不代表已经已经掌握了它们并可以熟练应用，我这里有一些基础的知识点，我希望所有的前端工程师都了然于胸。你不能在有时间限制的时候还需要每次都停下来上网去查。如果有些人面对这些问题说：我不知道 但是我可以上网去查。 听到这话 我立刻给他灭灯，下面就是这些基础，我希望所有前端er都可以不依靠外部的帮助掌握它们。 1.DOM结构 节点之间的相互关系 和 怎样从一个节点到下一个节点 2.DOM修改 怎样 增加 删除 克隆 移动 查找 节点 3.事件 怎样使用事件 在IE和标准dom下的事件对象的主要区别 4.XMLHttpRequest 是什么 怎样发起一个完整的XML请求 怎样检测其中的错误 5.Strict Mode 和 Quirks Mode &#8230; <a href="http://www.vikingmute.com/archives/233">继续阅读 <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Nicholas Zakas是高效率javascript这本书的作者，这篇文章写的是怎样面试前端工程师 其实他里面提到了很多基础知识 也是我自己需要强化和巩固的 过一阵我会对里面每个提到的知识点做一个总结和提炼 每一个知识点写一篇博客</p>
<p>所以我在这里之翻译基础只是这一部分（好久不翻译了 肯定很差 以后可以让刘老板帮忙改进一下）</p>
<p><a title="zakas" href="http://www.nczonline.net/blog/2010/01/05/interviewing-the-front-end-engineer/" target="_blank">原文链接</a></p>
<h2>基础知识</h2>
<p>我们生活在一个通过互联网可以快速汲取知识的时代，但是 之了解一些知识的皮毛并不代表已经已经掌握了它们并可以熟练应用，我这里有一些基础的知识点，我希望所有的前端工程师都了然于胸。你不能在有时间限制的时候还需要每次都停下来上网去查。如果有些人面对这些问题说：我不知道 但是我可以上网去查。 听到这话 我立刻给他灭灯，下面就是这些基础，我希望所有前端er都可以不依靠外部的帮助掌握它们。</p>
<p>1.<strong>DOM结构</strong> 节点之间的相互关系 和 怎样从一个节点到下一个节点<br />
2.<strong>DOM修改</strong> 怎样 增加 删除 克隆 移动 查找 节点<br />
3.<strong>事件</strong> 怎样使用事件 在IE和标准dom下的事件对象的主要区别<br />
4.<strong>XMLHttpRequest</strong> 是什么 怎样发起一个完整的XML请求 怎样检测其中的错误<br />
5.<strong>Strict Mode 和 Quirks Mode</strong> 怎样触发这两种格式 有什么区别<br />
6.<strong>The Box Model(盒模型)</strong> margin padding border怎样工作 还有在ie浏览器下会有什么问题<br />
7.<strong>Block vs Inline Elements(块级元素 内联元素)</strong> 有什么区别，怎样用css转换，对旁边的元素有什么影响<br />
8.<strong>浮动元素</strong> 怎样使用 会出现什么问题 怎样解决出现的问题<br />
9.<strong>JSON</strong> 是什么，为什么会使用他，怎样使用</p>
<p>重申一遍，这些知识点必须是你熟知的，我之前的问题都是要测试对在所有这些领域的知识水平。这个清单并不是非常的彻底，但是我相信这些都是你要成功于我们合作必备的技能和素质。</p>
<p>待续</p>
]]></content:encoded>
			<wfw:commentRss>http://www.vikingmute.com/archives/233/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>写的两个豆瓣的油猴脚本 &#8211; douban quickview 和douban live</title>
		<link>http://www.vikingmute.com/archives/227</link>
		<comments>http://www.vikingmute.com/archives/227#comments</comments>
		<pubDate>Wed, 14 Dec 2011 09:56:39 +0000</pubDate>
		<dc:creator>VikinG</dc:creator>
				<category><![CDATA[JS]]></category>

		<guid isPermaLink="false">http://www.vikingmute.com/?p=227</guid>
		<description><![CDATA[平时无聊的时候逛豆瓣发现有很多不方便的地方 有个叫豆瓣助手的东西又超级大 很不爽 所以写了两个常用的功能 第一个就是在豆瓣广播里面的图片 每次看都会跳到相册那一页 不方便 所以写了一个像微博可以放大 然后点击可以缩小的脚本 douban quickview 没有点击的时候 点击后  第二个是 小组看淫荡直播的时候直接看楼主的帖子 将其他灌水的帖子都隐藏 这个很方便实用 没有点击的时候 点击过后 下面的帖子只显示楼主的帖子 两个插件的下载地址： quickview ： http://userscripts.org/scripts/show/97647 live ：http://userscripts.org/scripts/show/118037]]></description>
			<content:encoded><![CDATA[<p>平时无聊的时候逛豆瓣发现有很多不方便的地方 有个叫豆瓣助手的东西又超级大 很不爽</p>
<p>所以写了两个常用的功能</p>
<p>第一个就是在豆瓣广播里面的图片 每次看都会跳到相册那一页 不方便 所以写了一个像微博可以放大 然后点击可以缩小的脚本 douban quickview</p>
<p>没有点击的时候</p>
<p><img class="aligncenter" title="没有点击的时候" src="http://img1.douban.com/view/note/large/public/p136406169-1.jpg" alt="" width="464" height="188" />点击后 <img class="aligncenter" title="点击后" src="http://img1.douban.com/view/note/large/public/p136406169-2.jpg" alt="" width="341" height="450" /></p>
<p>第二个是 小组看淫荡直播的时候直接看楼主的帖子 将其他灌水的帖子都隐藏 这个很方便实用</p>
<p>没有点击的时候<img class="aligncenter" title="没有点击" src="http://img1.douban.com/view/note/large/public/p188568507-1.jpg" alt="" width="400" height="150" /></p>
<p>点击过后</p>
<p><img class="aligncenter" title="点击后" src="http://img1.douban.com/view/note/large/public/p188568507-2.jpg" alt="" width="400" height="150" />下面的帖子只显示楼主的帖子</p>
<p>两个插件的下载地址：</p>
<p>quickview ： <a href="http://userscripts.org/scripts/show/97647">http://userscripts.org/scripts/show/97647</a></p>
<p>live ：<a href="http://userscripts.org/scripts/show/118037">http://userscripts.org/scripts/show/118037</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.vikingmute.com/archives/227/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP处理xml的方法</title>
		<link>http://www.vikingmute.com/archives/219</link>
		<comments>http://www.vikingmute.com/archives/219#comments</comments>
		<pubDate>Fri, 09 Dec 2011 10:12:48 +0000</pubDate>
		<dc:creator>VikinG</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.vikingmute.com/?p=219</guid>
		<description><![CDATA[好久不用php了 这几天用php做一个小东西 处理xml是一个很基本的常识  总结了一下 以后用的时候找起来方便 其实就是利用了一个php内置的方法simplexml_load_string();下面用直接上代码说的清楚，我用了dict.cn的辞典API，准备做一个简单的辞典小应用~ 嘻嘻 function object_to_array($object){ $result = array(); $object = is_object($object) ? get_object_vars($object) : $object; if(empty($object) &#124;&#124; (!is_object($object) &#38;&#38; !is_array($object))){ return false; } foreach ($object as $key =&#62; $val) { $val = (is_object($val) &#124;&#124; is_array($val)) ? &#8230; <a href="http://www.vikingmute.com/archives/219">继续阅读 <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>好久不用php了 这几天用php做一个小东西 处理xml是一个很基本的常识  总结了一下 以后用的时候找起来方便</p>
<p>其实就是利用了一个php内置的方法simplexml_load_string();下面用直接上代码说的清楚，我用了dict.cn的辞典API，准备做一个简单的辞典小应用~ 嘻嘻</p>
<pre class="brush:php">	function object_to_array($object){
        $result = array();
        $object = is_object($object) ? get_object_vars($object) : $object;
        if(empty($object) || (!is_object($object) &amp;&amp; !is_array($object))){
			return false;
		}
		foreach ($object as $key =&gt; $val) {
		    $val = (is_object($val) || is_array($val)) ? object_to_array($val) : $val;
		    if(is_numeric($val) || is_string($val))
    		{
				$val = mb_convert_encoding($val,"GB2312","UTF-8");
    		}
    		$result[$key] = $val;
        }
        return $result;
    }

        $word = $_GET['word'];
	$str = file_get_contents('http://api.dict.cn/ws.php?utf8=true&amp;q='.$word);
	$obj = simplexml_load_string($str);
	$arr = object_to_array($obj);
	var_dump($arr);</pre>
<p>过程就是先把字符串读过来 然后把字符串用内置方法转成对象 然后再把对象 用自定义的函数 转成数组<br />
我们来看一下他的结果把~</p>
<p><a href="http://www.vikingmute.com/wp-content/uploads/2011/12/xml.png"><img class="aligncenter size-full wp-image-220" title="xml" src="http://www.vikingmute.com/wp-content/uploads/2011/12/xml.png" alt="xml to array" width="750" height="387" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.vikingmute.com/archives/219/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>linux下面的编码转换</title>
		<link>http://www.vikingmute.com/archives/212</link>
		<comments>http://www.vikingmute.com/archives/212#comments</comments>
		<pubDate>Tue, 06 Dec 2011 03:51:49 +0000</pubDate>
		<dc:creator>VikinG</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.vikingmute.com/?p=212</guid>
		<description><![CDATA[由于最近工作中 同事从windows系统传给我的文件大多都是gbk编码的 每次用的时候都要转码 把转码的知识总结了一下 这张图显示了转码的过程 第一步 察看编码 发现乱码以后 要先看看目标文件是什么编码 有两种方法 vim对gb2312支持不太好 有时候显示为latin 不知道为什么 //使用enca来 这是很好很方便的 sudo apt-get install enca enca filename //使用vim vim filename :set fileencoding &#160; 第二步 发现编码了以后 开始转码 两种方法 enconv 和 iconv enconv比较方便 不用新建一个文件 //enconv enconv -L zh_CN &#8230; <a href="http://www.vikingmute.com/archives/212">继续阅读 <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>由于最近工作中 同事从windows系统传给我的文件大多都是gbk编码的 每次用的时候都要转码 把转码的知识总结了一下<br />
这张图显示了转码的过程<br />
<a href="http://www.vikingmute.com/wp-content/uploads/2011/12/enca.png"><img class="aligncenter size-full wp-image-213" title="linux file encoding" src="http://www.vikingmute.com/wp-content/uploads/2011/12/enca.png" alt="" width="647" height="184" /></a></p>
<p>第一步 察看编码 发现乱码以后 要先看看目标文件是什么编码 有两种方法<br />
vim对gb2312支持不太好 有时候显示为latin 不知道为什么</p>
<blockquote><p>//使用enca来 这是很好很方便的<br />
sudo apt-get install enca<br />
enca filename</p>
<p>//使用vim<br />
vim filename<br />
:set fileencoding</p></blockquote>
<p>&nbsp;</p>
<p>第二步 发现编码了以后 开始转码 两种方法 enconv 和 iconv<br />
enconv比较方便 不用新建一个文件</p>
<blockquote><p>//enconv<br />
enconv -L zh_CN -x UTF-8 filename</p>
<p>//iconv<br />
iconv -f GB2312 -t UTF-8 file1 -o file2</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.vikingmute.com/archives/212/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>自己写的焦点图插件 vslide</title>
		<link>http://www.vikingmute.com/archives/207</link>
		<comments>http://www.vikingmute.com/archives/207#comments</comments>
		<pubDate>Fri, 25 Nov 2011 10:08:50 +0000</pubDate>
		<dc:creator>VikinG</dc:creator>
				<category><![CDATA[JS]]></category>

		<guid isPermaLink="false">http://www.vikingmute.com/?p=207</guid>
		<description><![CDATA[其实早就写好了 一直放在那里 前几天往github里面又传了一个东西 发现还有这么个东西 改了改 就先放出来 一开始本来设想要加好几中动画效果的 后来想想先这样 越简单越好只要实现功能即可  使用也比较简单 现在动画效果只有一种向右滑动 本来设想添加了一个动画组件 里面有多种效果 根据用户需要来添加 效果请看   DEMO 用法 很简单 看下面说明 //两个参数 一个是数据 一个是配置参数 css可以自己按照喜好填写 //第一个是图片的数组 包括图片地址 链接 和下面的说明 var data =[{img:'1.jpg',link:'#',desc:'there you go bitch'}, {img:'2.jpg',link:'#',desc:'this is not cool'}, {img:'3.jpg',link:'#',desc:'under attack'}, &#8230; <a href="http://www.vikingmute.com/archives/207">继续阅读 <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>其实早就写好了 一直放在那里 前几天往github里面又传了一个东西 发现还有这么个东西 改了改 就先放出来 一开始本来设想要加好几中动画效果的 后来想想先这样 越简单越好只要实现功能即可  使用也比较简单 现在动画效果只有一种向右滑动 本来设想添加了一个动画组件 里面有多种效果 根据用户需要来添加</p>
<p>效果请看  <a href="http://vikingmute.com/demo/autoslide/demo.html" target="_blank"> DEMO</a></p>
<p>用法 很简单 看下面说明</p>
<pre class="brush:jscript">//两个参数 一个是数据 一个是配置参数 css可以自己按照喜好填写
//第一个是图片的数组 包括图片地址 链接 和下面的说明
var data =[{img:'1.jpg',link:'#',desc:'there you go bitch'},
{img:'2.jpg',link:'#',desc:'this is not cool'},
{img:'3.jpg',link:'#',desc:'under attack'},
{img:'4.jpg',link:'#',desc:'fuck this shit, fuck you all'},
{img:'http://www.wallcoo.com/flower/Amazing_Color_Flowers_2560x1600_II/wallpapers/1280x1024/Amazing_Flowers_Wallpapers_53.jpg',link:'#',desc:'u\'er going down bro'}
];

//默认的配置参数
var settings = {
		pagnation:true,//是否显示下面的页码
		autoPlay:true,//是否自动播放
		speed:3000,//播放速度
		event:'click',//切换事件
		height:327,//高度
		width:960//宽度
	}

//可以用你想要的配置覆盖他
var opts = {speed:2000,event:'mouseover'};

//最后~
$('.test2').vslide(opts,data);</pre>
<p>配置很简单 焦点图还算好用 中意的可以在这里fork</p>
<p><a href="https://github.com/vikingmute/autoslide" target="_blank">DOWNLOAD&amp;FORK</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.vikingmute.com/archives/207/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

