<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-7448595285512004494</id><updated>2024-09-12T10:28:36.634+08:00</updated><category term="VPS"/><category term="Lifestyle"/><category term="Ubuntu"/><category term="WordPress"/><category term="Apple"/><category term="JAVA"/><category term="MacBookPro"/><category term="Mac"/><category term="Android"/><category term="SSH"/><category term="eclipse"/><category term="Windows"/><category term="nginx"/><category term="Fedora"/><category term="google"/><category term="linux"/><category term="mauritius"/><category term="photonvps"/><category term="云存储"/><category term="毛里求斯"/><category term="流水账"/><category term="Firefox"/><category term="Javascript"/><category term="admob"/><category term="ads"/><category term="buyvm"/><category term="cloudflare"/><category term="dropbox"/><category term="ip"/><category term="mbp"/><category term="ubuntu 10.10"/><category term="world cup"/><category term="快捷键"/><category term="端口"/><category term="2012"/><category term="Amazon"/><category term="Chrome"/><category term="Chrome Sniffer"/><category term="GBK"/><category term="GDP"/><category term="Mac MINI"/><category term="MarsEdit"/><category term="Mysql"/><category term="PPStream"/><category term="UTF-8"/><category term="adsense"/><category term="app inventor"/><category term="backup"/><category term="chocolat"/><category term="console"/><category term="editor"/><category term="ejb"/><category term="email"/><category term="emeseme"/><category term="extjs3"/><category term="face detection"/><category term="feed"/><category term="feedsky"/><category term="finder"/><category term="gfw"/><category term="git"/><category term="github"/><category term="gnome"/><category term="gstm"/><category term="gtalk"/><category term="helios"/><category term="hero"/><category term="holland"/><category term="i18n"/><category term="ios"/><category term="iphone"/><category term="javaeye"/><category term="jni"/><category term="keyword"/><category term="livecd"/><category term="lveyo"/><category term="mp3"/><category term="mplayerx"/><category term="msn"/><category term="nuffnang"/><category term="opencv"/><category term="openvpn"/><category term="permgen"/><category term="ping"/><category term="plugin"/><category term="ppa"/><category term="pt高清"/><category term="python"/><category term="sendmail"/><category term="seo"/><category term="shell"/><category term="subversive"/><category term="svn"/><category term="terminator"/><category term="tips"/><category term="tomcat"/><category term="ubunt"/><category term="urlrewrite"/><category term="xcode"/><category term="免费"/><category term="共享"/><category term="关键词"/><category term="博客"/><category term="命令行"/><category term="在线"/><category term="域名"/><category term="备份"/><category term="字幕"/><category term="安全"/><category term="安装"/><category term="广告"/><category term="总结"/><category term="技巧"/><category term="文件编码"/><category term="电驴搜索"/><category term="硬件"/><category term="硬盘灯"/><category term="窗口"/><category term="翻墙"/><category term="视频"/><category term="设置"/><category term="试用"/><category term="语言"/><category term="连接池"/><category term="邮件"/><category term="错误"/><category term="驱动"/><title type='text'>~LVEYO EYES~</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://lveyoeyes.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7448595285512004494/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://lveyoeyes.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/7448595285512004494/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>103</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-7448595285512004494.post-5293952161568776920</id><published>2013-02-05T22:12:00.000+08:00</published><updated>2014-05-08T14:19:32.395+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="extjs3"/><category scheme="http://www.blogger.com/atom/ns#" term="Javascript"/><title type='text'>改进EXTJS的maxlength设置</title><content type='html'>在写Extjs3的时候，发现textfield输入框的maxlength设置之后不能限制输入的长度，只能在输入超出maxlength之后给出错误提示。&lt;br/&gt;Google之后，发现可以把下段代码放入程序，一起加载就可以解决这个问题。&lt;br/&gt;&lt;br/&gt;&lt;pre class=&quot;brush:javascript&quot;&gt;&lt;br/&gt;// To fix the maxlength property&lt;br/&gt;// if the textfield sets {maxlength} property, it cannot be inputted more than {maxlength} characters.&lt;br/&gt;// before fixing, the textfield can be inputted any amount of characters. When it lose focus, the validation messages will show.&lt;br/&gt;Ext.form.TextField.prototype.size = 255;&lt;br/&gt;Ext.form.TextField.prototype.initValue = function()&lt;br/&gt;{&lt;br/&gt;    if(this.value !== undefined){&lt;br/&gt;        this.setValue(this.value);&lt;br/&gt;    }else if(this.el.dom.value.length &gt; 0){&lt;br/&gt;        this.setValue(this.el.dom.value);&lt;br/&gt;    }&lt;br/&gt;    this.el.dom.size = this.size;&lt;br/&gt;    if (!isNaN(this.maxLength) &amp;&amp; (this.maxLength *1) &gt; 0 &amp;&amp; (this.maxLength != Number.MAX_VALUE)) {&lt;br/&gt;        this.el.dom.maxLength = this.maxLength *1;&lt;br/&gt;    }&lt;br/&gt;};&lt;br/&gt;&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://lveyoeyes.blogspot.com/feeds/5293952161568776920/comments/default' title='博文评论'/><link rel='replies' type='text/html' href='http://lveyoeyes.blogspot.com/2013/02/extjsmaxlength.html#comment-form' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7448595285512004494/posts/default/5293952161568776920'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7448595285512004494/posts/default/5293952161568776920'/><link rel='alternate' type='text/html' href='http://lveyoeyes.blogspot.com/2013/02/extjsmaxlength.html' title='改进EXTJS的maxlength设置'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7448595285512004494.post-7023128298511965167</id><published>2013-01-24T23:53:00.000+08:00</published><updated>2014-05-08T14:19:32.386+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="buyvm"/><category scheme="http://www.blogger.com/atom/ns#" term="photonvps"/><category scheme="http://www.blogger.com/atom/ns#" term="VPS"/><title type='text'>Buyvm.net的VPS主机DNS失效的问题</title><content type='html'>用这个VPS好长时间了，总体赶紧buyvm的主机越来越稳定，前两天机房搬迁，系统升级，服务断断续续的不稳定，恢复之后发现之前用的SSH代理不能用了，可以登录上，但是什么网页都不能访问。查看bitvise日志发现有错误：&lt;br/&gt;&lt;pre&gt;client connection closed before completion of protocol&lt;/pre&gt;&lt;br/&gt;问题原因：SSH 转发后系统DNS无法解析域名&lt;br/&gt;解决办法：SSH登录到VPS修改DNS，添加GOOGLE的DNS到文件/etc/resolve.cnof&lt;br/&gt;&lt;pre&gt;&lt;br/&gt;nameserver 8.8.8.8&lt;br/&gt;&lt;/pre&gt;&lt;br/&gt;&lt;br/&gt;重启网络&lt;br/&gt;&lt;pre&gt;&lt;br/&gt;/etc/init.d/netword restart&lt;br/&gt;&lt;/pre&gt;&lt;br/&gt;&lt;br/&gt;我发现不能用reboot重启VPS，重启之后/etc/resolve.conf文件又变回原来的配置。&lt;br/&gt;&lt;br/&gt;特此推荐更稳定的&lt;a href=&quot;http://t.cn/zY79IPo&quot; target=&quot;_blank&quot;&gt;PhotonVPS&lt;/a&gt;，价格便宜，配置也不错。&lt;br/&gt;&lt;br/&gt;[ad#bottom banner of pages]</content><link rel='replies' type='application/atom+xml' href='http://lveyoeyes.blogspot.com/feeds/7023128298511965167/comments/default' title='博文评论'/><link rel='replies' type='text/html' href='http://lveyoeyes.blogspot.com/2013/01/buyvmnetvpsdns.html#comment-form' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7448595285512004494/posts/default/7023128298511965167'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7448595285512004494/posts/default/7023128298511965167'/><link rel='alternate' type='text/html' href='http://lveyoeyes.blogspot.com/2013/01/buyvmnetvpsdns.html' title='Buyvm.net的VPS主机DNS失效的问题'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7448595285512004494.post-662586369550616610</id><published>2013-01-06T23:06:00.000+08:00</published><updated>2014-05-08T14:19:32.312+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="feed"/><category scheme="http://www.blogger.com/atom/ns#" term="nginx"/><category scheme="http://www.blogger.com/atom/ns#" term="VPS"/><category scheme="http://www.blogger.com/atom/ns#" term="WordPress"/><title type='text'>FeedSky绑定域名失效</title><content type='html'>在FeedSky上绑定的域名feed.lveyo.com的订阅地址已经失效很久了，FeedSky的DNS服务器的问题，久久得不到解决。&lt;br/&gt;&lt;br/&gt;今天有时间，就决定把feed.lveyo.com域名指定到lveyo.com/feed目录上，放弃FeedSky.&lt;br/&gt;&lt;br/&gt;首先在域名设置里DNS Manager里，原来Feed的那条记录删除掉。再添加一条A记录指向自己WordPress服务器的IP地址。&lt;br/&gt;&lt;br/&gt;然后登录WordPress服务器，修改Nginx的设置，添加如下设置：&lt;br/&gt;&lt;pre&gt;server {&lt;br/&gt;        listen 80;&lt;br/&gt;        server_name feed.lveyo.com;&lt;br/&gt;        rewrite ^(.*) http://lveyo.com/feed permanent;&lt;br/&gt;}&lt;/pre&gt;&lt;br/&gt;根据自己的域名将配置文件的域名替换之后，等待DNS生效就可以了。&lt;br/&gt;&lt;br/&gt;[ad#bottom banner of pages]</content><link rel='replies' type='application/atom+xml' href='http://lveyoeyes.blogspot.com/feeds/662586369550616610/comments/default' title='博文评论'/><link rel='replies' type='text/html' href='http://lveyoeyes.blogspot.com/2013/01/feedsky.html#comment-form' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7448595285512004494/posts/default/662586369550616610'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7448595285512004494/posts/default/662586369550616610'/><link rel='alternate' type='text/html' href='http://lveyoeyes.blogspot.com/2013/01/feedsky.html' title='FeedSky绑定域名失效'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7448595285512004494.post-8757888695129236619</id><published>2012-12-31T22:23:00.000+08:00</published><updated>2014-05-08T14:19:32.302+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="2012"/><category scheme="http://www.blogger.com/atom/ns#" term="Lifestyle"/><category scheme="http://www.blogger.com/atom/ns#" term="关键词"/><category scheme="http://www.blogger.com/atom/ns#" term="总结"/><title type='text'>2012，我的年度关键词</title><content type='html'>外企：屡次被拒百度之后，进入一家外企，行业老二，待遇尚可。私企，国企，外企都混过了，各有所长，下一个会是什么呢？&lt;br/&gt;&lt;br/&gt;自由行1：年中去了一次欧洲，体验了德国的地铁和火车，当然还有啤酒，捷克人民的友善，我想留下来不回中国，但是签证到期了，我丫不得不回到天朝。世界人民都大团结了，又何必分这么清楚呢，反正中国是欢迎外国人来定居的。&lt;br/&gt;&lt;br/&gt;自由行2：为了躲避年终的寒冷并且迎接世界末日的到来，12月20日凌晨飞往新加坡避寒，新加坡没有想象中的好，环球影城是个很欢喜的地方。顺便还去了印尼的民丹岛，海边度假村，骑着大象穿越了雨林，这宠物就是有点大，要不我也养一只。&lt;br/&gt;&lt;br/&gt;家庭：添加了两位新成员，一个乱尿尿拉不屎还猛吃，另一个胆小如鼠天天趴暖气。其中还包括客串人物：李小六，毛豆，猪咖啡。&lt;br/&gt;&lt;br/&gt;违章：作为曾经的业内人士，我还是没有躲过电子眼，限号被抓了一次，我已经很注意的没走大路，绕小路，还是被拍到了，我怀疑是流动哨干的，明年的交规更严了，还是得注意了。&lt;br/&gt;&lt;br/&gt;专业：从WEB开发转向了企业应用开发，其实我还是喜欢做WEB。所以现在的工作重点是偏前端的javascript和CSS，当然Java还是不能放下。不知2年后会是怎样，心里没底，中年危机提前了。&lt;br/&gt;&lt;br/&gt;转变：读万卷书不如行万里路，本来我也不看书，就趁现在有时间有精力，多出去走走，钱花完了可以再挣，时间过了就没了。&lt;br/&gt;&lt;br/&gt;发展：保持学习，不能被淘汰。自我发展自我完善才是硬道理。&lt;br/&gt;&lt;br/&gt;SSD：给去年买的Macbook Pro换上了SSD和16G内存，秒开，看来SSD真的很牛逼。牛逼感满足之后，每天还是用来看视频，浏览网页，别无他用。&lt;br/&gt;&lt;br/&gt;Iphone：等了又等，Iphone5终于发布了，我买了Iphone4S，原因是Iphone4S便宜了，Iphone5掉漆了。&lt;br/&gt;&lt;br/&gt;投资：延续2011年的失败，我就操这件事情。&lt;br/&gt;&lt;br/&gt;玛雅人：你们说话有谱吗？付责任吗？世界末日没来，我的钱花完了，还得保持苦逼的赚钱模式。&lt;br/&gt;&lt;br/&gt;感谢：这一年中帮助过我的人，坑过我的人。&lt;br/&gt;&lt;br/&gt;此BLOG：一年中很少更新，很少写，微博也用的很少，大多的时间都是在看，其中一部分还献给了1024的CL。&lt;br/&gt;&lt;br/&gt;2013：末日元年，希望会更好。。</content><link rel='replies' type='application/atom+xml' href='http://lveyoeyes.blogspot.com/feeds/8757888695129236619/comments/default' title='博文评论'/><link rel='replies' type='text/html' href='http://lveyoeyes.blogspot.com/2012/12/2012.html#comment-form' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7448595285512004494/posts/default/8757888695129236619'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7448595285512004494/posts/default/8757888695129236619'/><link rel='alternate' type='text/html' href='http://lveyoeyes.blogspot.com/2012/12/2012.html' title='2012，我的年度关键词'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7448595285512004494.post-847288037458951775</id><published>2012-08-23T21:38:00.000+08:00</published><updated>2014-05-08T14:19:32.228+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ejb"/><category scheme="http://www.blogger.com/atom/ns#" term="JAVA"/><title type='text'>EJB事务注解TransactionAttribute说明</title><content type='html'>在 Java EE 的应用开发中，事务的应用是必不可少的，同时由于方法调用的原因，比如方法 A 调用方法 B 的时候。如果方法 A 在事务环境中运行，那么方法 B 是否也要在事务中运行呢，方法 B 是要和方法 A 在同一个事务中运行还是新开起一个事物呢？等等。要弄清楚这些问题，就要牵涉到事务传播属性的问题，EJB 中针对不同的的情况提供了下面六种不同的事物传播属性：&lt;br/&gt;&lt;br/&gt;&lt;strong&gt;Required&lt;/strong&gt;：用该属性标注的方法或组件总是在事务中运行。如果客户端已经在事务中，则在原事务中运行；如果没有事务，则开启一个新事务，在其中运行。&lt;br/&gt;&lt;br/&gt;&lt;strong&gt;Requires_New&lt;/strong&gt;：方法或组件总是在新开启的事务中运行。如果客户端已经在事务中，则首先将原事务挂起，然后新开启一个事务，在其中运行，新事务结束之后，原来事务从挂起点继续执行；如果没有事务，则开启一个新事务，在其中运行。&lt;br/&gt;&lt;br/&gt;&lt;strong&gt;Supports&lt;/strong&gt;：和 Required 属性的不同点是，在没有事务的环境中不会开启一个新事务；如果存在事务的话则加入其中运行，这点和 Reuqired 相同。&lt;br/&gt;&lt;br/&gt;&lt;strong&gt;Not_Supported&lt;/strong&gt;：如果事务已经存在的情况下，则原来的事务要挂起，然后调用标注该属性的方法或组件，调用结束之后，继续原来的事务；无事务环境中调用的时候，不开启新事务，这点和 Supports 相同。&lt;br/&gt;&lt;br/&gt;&lt;strong&gt;Mandatory&lt;/strong&gt;：调用标注该属性的方法或组件的客户端，必须已经在事务中，如果不在事务中则会抛出异常；如果已经在事务中，则加入原来事务运行。和 Required 不同的是，该属性不会自动开启新的事务；&lt;br/&gt;&lt;br/&gt;&lt;strong&gt;Never&lt;/strong&gt;：用 Never 属性标注的方法或组件，不能在事务中运行。如果调用该方法或组件的客户端已经在事务中，则抛出异常。</content><link rel='replies' type='application/atom+xml' href='http://lveyoeyes.blogspot.com/feeds/847288037458951775/comments/default' title='博文评论'/><link rel='replies' type='text/html' href='http://lveyoeyes.blogspot.com/2012/08/ejbtransactionattribute.html#comment-form' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7448595285512004494/posts/default/847288037458951775'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7448595285512004494/posts/default/847288037458951775'/><link rel='alternate' type='text/html' href='http://lveyoeyes.blogspot.com/2012/08/ejbtransactionattribute.html' title='EJB事务注解TransactionAttribute说明'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7448595285512004494.post-2228314161354596496</id><published>2012-04-02T07:44:00.000+08:00</published><updated>2014-05-08T14:19:32.203+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Apple"/><category scheme="http://www.blogger.com/atom/ns#" term="ios"/><category scheme="http://www.blogger.com/atom/ns#" term="iphone"/><category scheme="http://www.blogger.com/atom/ns#" term="Mac"/><title type='text'>愚人节，我的第一个iOS app</title><content type='html'>今天是愚人节，为了纪念这个特殊的日子，我写了平生第一个原创的iOS程序。&lt;br/&gt;&lt;br/&gt;&lt;a href=&quot;http://lveyo.com/wp-content/uploads/2012/04/girl1.png&quot;&gt;&lt;img src=&quot;http://lveyo.com/wp-content/uploads/2012/04/girl1.png&quot; alt=&quot;&quot; title=&quot;girl1&quot; width=&quot;320&quot; height=&quot;480&quot; class=&quot;aligncenter size-full wp-image-450&quot; /&gt;&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;点了某个部位之后。。。。&lt;br/&gt;&lt;br/&gt;&lt;a href=&quot;http://lveyo.com/wp-content/uploads/2012/04/girl2.png&quot;&gt;&lt;img src=&quot;http://lveyo.com/wp-content/uploads/2012/04/girl2.png&quot; alt=&quot;&quot; title=&quot;girl2&quot; width=&quot;320&quot; height=&quot;480&quot; class=&quot;aligncenter size-full wp-image-451&quot; /&gt;&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://lveyoeyes.blogspot.com/feeds/2228314161354596496/comments/default' title='博文评论'/><link rel='replies' type='text/html' href='http://lveyoeyes.blogspot.com/2012/04/ios-app.html#comment-form' title='2 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7448595285512004494/posts/default/2228314161354596496'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7448595285512004494/posts/default/2228314161354596496'/><link rel='alternate' type='text/html' href='http://lveyoeyes.blogspot.com/2012/04/ios-app.html' title='愚人节，我的第一个iOS app'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7448595285512004494.post-1109943522341487754</id><published>2012-02-29T19:03:00.000+08:00</published><updated>2014-05-08T14:19:32.129+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="dropbox"/><category scheme="http://www.blogger.com/atom/ns#" term="Lifestyle"/><category scheme="http://www.blogger.com/atom/ns#" term="云存储"/><title type='text'>一款Dropbox的替代品Comodo Online Storage</title><content type='html'>随着Dropbox的成功，各式网盘层出不穷，但国内的产品都怀疑存在信息不安全的问题，所以还一直使用Dropbox。&lt;br/&gt;&lt;br/&gt;Comodo应该都不陌生，出品免费防火墙和杀毒软件，进来Comodo又推出了一款以安全为主打的云存储产品Comodo Online Storage。现在注册有免费的5G空间，邀请朋友注册还有200M的奖励，最多到10G的免费空间。&lt;br/&gt;&lt;br/&gt;下载客户端之后，当用户点住文件拖动的时候，就会出现一个半透明的窗口，可以将要上传的文件拖到小窗口里就可以方便的上传文件了。当不用的时候，小窗口会自动消失。&lt;br/&gt;&lt;br/&gt;在Dropbox国内访问比较困难的情况下，大家也可以考虑这款产品，毕竟安全性胜过国内的云存储产品。&lt;br/&gt;&lt;br/&gt;注册链接为：http://goo.gl/8dEee</content><link rel='replies' type='application/atom+xml' href='http://lveyoeyes.blogspot.com/feeds/1109943522341487754/comments/default' title='博文评论'/><link rel='replies' type='text/html' href='http://lveyoeyes.blogspot.com/2012/02/dropboxcomodo-online-storage.html#comment-form' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7448595285512004494/posts/default/1109943522341487754'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7448595285512004494/posts/default/1109943522341487754'/><link rel='alternate' type='text/html' href='http://lveyoeyes.blogspot.com/2012/02/dropboxcomodo-online-storage.html' title='一款Dropbox的替代品Comodo Online Storage'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7448595285512004494.post-4427225016159064772</id><published>2012-02-04T23:38:00.000+08:00</published><updated>2014-05-08T14:19:32.120+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Apple"/><category scheme="http://www.blogger.com/atom/ns#" term="git"/><category scheme="http://www.blogger.com/atom/ns#" term="github"/><category scheme="http://www.blogger.com/atom/ns#" term="ip"/><category scheme="http://www.blogger.com/atom/ns#" term="Mac"/><category scheme="http://www.blogger.com/atom/ns#" term="MacBookPro"/><category scheme="http://www.blogger.com/atom/ns#" term="xcode"/><title type='text'>我的第一个mac app</title><content type='html'>买了MBP很久了，一直觉得Objective-C的语法很怪，就没有写过mac程序，春节假期闲着没事干，就学习一下Objective-C和Xcode，准备试试mac和iphone开发，先写一个显示外网IP的小程序，熟悉一下Objective-C和Xcode。&lt;br/&gt;&lt;a href=&quot;http://lveyo.com/wp-content/uploads/2012/02/ipshow.png&quot;&gt;&lt;img class=&quot;aligncenter size-full wp-image-444&quot; title=&quot;ipshow&quot; src=&quot;http://lveyo.com/wp-content/uploads/2012/02/ipshow.png&quot; alt=&quot;ip show app&quot; width=&quot;476&quot; height=&quot;258&quot; /&gt;&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;源代码使用github托管，也顺便熟悉一了一下github的使用，参考：&lt;a href=&quot;http://goo.gl/HEvds&quot; title=&quot;http://goo.gl/HEvds&quot; target=&quot;_blank&quot;&gt;http://goo.gl/HEvds&lt;/a&gt;，设置好Xcode的git环境，使用起来很方便。&lt;br/&gt;&lt;br/&gt;github地址：&lt;a href=&quot;https://github.com/lveyo/IpShow&quot; title=&quot;https://github.com/lveyo/IpShow&quot; target=&quot;_blank&quot;&gt;https://github.com/lveyo/IpShow&lt;/a&gt;&lt;br/&gt;app下载地址：&lt;a href=&quot;https://github.com/downloads/lveyo/IpShow/IP%20Show.zip&quot; title=&quot;https://github.com/downloads/lveyo/IpShow/IP Show.zip&quot; target=&quot;_blank&quot;&gt;https://github.com/downloads/lveyo/IpShow/IP Show.zip&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://lveyoeyes.blogspot.com/feeds/4427225016159064772/comments/default' title='博文评论'/><link rel='replies' type='text/html' href='http://lveyoeyes.blogspot.com/2012/02/mac-app.html#comment-form' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7448595285512004494/posts/default/4427225016159064772'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7448595285512004494/posts/default/4427225016159064772'/><link rel='alternate' type='text/html' href='http://lveyoeyes.blogspot.com/2012/02/mac-app.html' title='我的第一个mac app'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7448595285512004494.post-3113207299819162629</id><published>2012-01-31T21:00:00.000+08:00</published><updated>2014-05-08T14:19:32.046+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="JAVA"/><category scheme="http://www.blogger.com/atom/ns#" term="tomcat"/><category scheme="http://www.blogger.com/atom/ns#" term="连接池"/><title type='text'>Tomcat 7 的新JDBC连接池的使用说明</title><content type='html'>Tomcat 7 的JDBC连接池实现类为&lt;code&gt;org.apache.tomcat.jdbc.pool&lt;/code&gt;，作为替换&lt;code&gt;commons-dbcp&lt;/code&gt;的方案。&lt;br/&gt;&lt;br/&gt;替换&lt;code&gt;commons-dbcp&lt;/code&gt;的原因如下：&lt;br/&gt;&lt;ol&gt;&lt;br/&gt;	&lt;li&gt;&lt;code&gt;commons-dbcp&lt;/code&gt;是单线程的，为了线程安全，就要琐住整个连接池，查询验证阶段也要琐住整个连接池。&lt;/li&gt;&lt;br/&gt;	&lt;li&gt;&lt;code&gt;commons-dbcp&lt;/code&gt;速度慢，性能差，多CPU的环境下单线程运行，不支持高并发，在JAVA 6中也不能解决速度和并发的问题。&lt;/li&gt;&lt;br/&gt;	&lt;li&gt;&lt;code&gt;commons-dbcp&lt;/code&gt;实现复杂，超过60个类。&lt;code&gt;tomcat-jdbc-pool&lt;/code&gt;核心只有8个类，修改更加简单，只需运行连接池本身，易测试。&lt;/li&gt;&lt;br/&gt;	&lt;li&gt;&lt;code&gt;commons-dbcp&lt;/code&gt;应用静态接口，就意味着并不能用JDK 1.6编译它，在JDK 1.6/1.7中运行时，即使驱动程序支持，所有没有实现的方法也都会抛出&lt;code&gt;NoSuchMethodException&lt;/code&gt;异常。&lt;/li&gt;&lt;br/&gt;	&lt;li&gt;&lt;code&gt;commons-dbcp&lt;/code&gt;几乎停滞，很少更新。&lt;/li&gt;&lt;br/&gt;	&lt;li&gt;作为一个连接池的简单实现不值得重写超过60个类。&lt;/li&gt;&lt;br/&gt;	&lt;li&gt;Tomcat jdbc连接池实现了一个&lt;code&gt;commons-dbcp&lt;/code&gt;没有的公平算法，并且比&lt;code&gt;commons-dbcp&lt;/code&gt;性能更好。&lt;/li&gt;&lt;br/&gt;	&lt;li&gt;Tomcat jdbc连接池实现了异步获取连接，也不需增加额外的线程。&lt;/li&gt;&lt;br/&gt;	&lt;li&gt;Tomcat jdbc连接池是一个Tomcat的模块，依赖于Tomcat JULI(Tomcat日志框架)&lt;/li&gt;&lt;br/&gt;	&lt;li&gt;使用&lt;code&gt;javax.sql.PooledConnection&lt;/code&gt;接口获取连接。&lt;/li&gt;&lt;br/&gt;	&lt;li&gt;饥饿算法。如果连接池空了，同时一个线程要获得连接，当一个连接返回到连接池，连接池会将正确的线程唤醒。&lt;/li&gt;&lt;br/&gt;&lt;/ol&gt;&lt;br/&gt;除了&lt;code&gt;commons-dbcp&lt;/code&gt;连接池，还有其它可以选择的方案，如&lt;code&gt;c3p0&lt;/code&gt;,&lt;code&gt;bonecp&lt;/code&gt;等,与这些连接池实现相比，Tomcat jdbc pool更突出的功能体现在：&lt;br/&gt;&lt;ol&gt;&lt;br/&gt;	&lt;li&gt;支持多核系统，提供更好的高并发性能。&lt;/li&gt;&lt;br/&gt;	&lt;li&gt;接口动态实现，运行时环境支持&lt;code&gt;java.sql&lt;/code&gt;和&lt;code&gt;javax.sql&lt;/code&gt;接口，可以使用低版本JDK编译。&lt;/li&gt;&lt;br/&gt;	&lt;li&gt;无需每次使用连接时都验证连接，可以在获取或返回连接时验证，不用比设置的间隔时间更频繁。&lt;/li&gt;&lt;br/&gt;	&lt;li&gt;当数据库连接建立时，一个可设置的查询将运行一次。这对保持连接建立整个时间中的会话十分有用。&lt;/li&gt;&lt;br/&gt;	&lt;li&gt;可以自定义拦截器增强功能。可定义拦截器来收集查询统计，缓存会话状态，重新连接，重新查询，缓存查询结果等。&lt;/li&gt;&lt;br/&gt;	&lt;li&gt;高性能&lt;/li&gt;&lt;br/&gt;	&lt;li&gt;极其简单，由于非常简单的实现，源程序行数和文件数很少，相比c3p0的200多个源程序文件，Tomcat jdbc只有8个核心源文件，关于连接池的部分只有4个文件。这样更容易追溯和修改Bug。减少复杂性就是起初开发的一个焦点。&lt;/li&gt;&lt;br/&gt;	&lt;li&gt;异步获取连接，可将连接请求形成队列，系统返回&lt;code&gt;Future&amp;lt;Connection&amp;gt;&lt;/code&gt;&lt;/li&gt;&lt;br/&gt;	&lt;li&gt;更好的空闲连接处理，应用更优化的算法调整连接池大小和连接的释放。&lt;/li&gt;&lt;br/&gt;	&lt;li&gt;用户来决定当连接池满了在什么时刻释放连接，或者直接设置一个超时的阀值。&lt;/li&gt;&lt;br/&gt;	&lt;li&gt;释放连接定时器将会在查询时重置。允许一个使用很长时间的连接不超时。这个功能由&lt;code&gt;ResetAbandonedTimer&lt;/code&gt;完成。&lt;/li&gt;&lt;br/&gt;	&lt;li&gt;在连接一定长时间后关闭连接。时间与返回连接池的时间相似。&lt;/li&gt;&lt;br/&gt;	&lt;li&gt;当连接要被释放时，将得到JMX通知并且记录整个日志。这和&lt;code&gt;removeAbandonedTimeout&lt;/code&gt;相似，但是只输出信息，不做任何操作。使用&lt;code&gt;suspectTimeout&lt;/code&gt;属性完成设置。&lt;/li&gt;&lt;br/&gt;	&lt;li&gt;可以从&lt;code&gt;java.sql.Driver&lt;/code&gt;，&lt;code&gt;javax.sql.DataSource&lt;/code&gt;或者&lt;code&gt;javax.sql.XADataSource&lt;/code&gt;中取得连接，使用&lt;code&gt;dataSource&lt;/code&gt;和&lt;code&gt;dataSourceJNDI&lt;/code&gt;属性完成。&lt;/li&gt;&lt;br/&gt;	&lt;li&gt;支持XA连接。&lt;/li&gt;&lt;br/&gt;&lt;/ol&gt;&lt;br/&gt;&lt;h2&gt;如何使用&lt;/h2&gt;&lt;br/&gt;&lt;ul&gt;&lt;br/&gt;	&lt;li&gt;单独使用&lt;/li&gt;&lt;br/&gt;&lt;/ul&gt;&lt;br/&gt;&lt;pre class=&quot;brush:java&quot;&gt;import java.sql.Connection;&lt;br/&gt;import java.sql.ResultSet;&lt;br/&gt;import java.sql.Statement;&lt;br/&gt;&lt;br/&gt;import org.apache.tomcat.jdbc.pool.DataSource;&lt;br/&gt;import org.apache.tomcat.jdbc.pool.PoolProperties;&lt;br/&gt;&lt;br/&gt;public class SimplePOJOExample {&lt;br/&gt;&lt;br/&gt;	public static void main(String[] args) throws Exception {&lt;br/&gt;        PoolProperties p = new PoolProperties();&lt;br/&gt;        p.setUrl(&quot;jdbc:mysql://localhost:3306/mysql&quot;);&lt;br/&gt;        p.setDriverClassName(&quot;com.mysql.jdbc.Driver&quot;);&lt;br/&gt;        p.setUsername(&quot;root&quot;);&lt;br/&gt;        p.setPassword(&quot;password&quot;);&lt;br/&gt;        p.setJmxEnabled(true);&lt;br/&gt;        p.setTestWhileIdle(false);&lt;br/&gt;        p.setTestOnBorrow(true);&lt;br/&gt;        p.setValidationQuery(&quot;SELECT 1&quot;);&lt;br/&gt;        p.setTestOnReturn(false);&lt;br/&gt;        p.setValidationInterval(30000);&lt;br/&gt;        p.setTimeBetweenEvictionRunsMillis(30000);&lt;br/&gt;        p.setMaxActive(100);&lt;br/&gt;        p.setInitialSize(10);&lt;br/&gt;        p.setMaxWait(10000);&lt;br/&gt;        p.setRemoveAbandonedTimeout(60);&lt;br/&gt;        p.setMinEvictableIdleTimeMillis(30000);&lt;br/&gt;        p.setMinIdle(10);&lt;br/&gt;        p.setLogAbandoned(true);&lt;br/&gt;        p.setRemoveAbandoned(true);&lt;br/&gt;        p.setJdbcInterceptors(&quot;org.apache.tomcat.jdbc.pool.interceptor.ConnectionState;&quot;+&lt;br/&gt;                  &quot;org.apache.tomcat.jdbc.pool.interceptor.StatementFinalizer&quot;);&lt;br/&gt;        DataSource datasource = new DataSource();&lt;br/&gt;        datasource.setPoolProperties(p);&lt;br/&gt;&lt;br/&gt;        Connection con = null;&lt;br/&gt;        try {&lt;br/&gt;            con = datasource.getConnection();&lt;br/&gt;            Statement st = con.createStatement();&lt;br/&gt;            ResultSet rs = st.executeQuery(&quot;select * from user&quot;);&lt;br/&gt;            int cnt = 1;&lt;br/&gt;            while (rs.next()) {&lt;br/&gt;                System.out.println((cnt++)+&quot;. Host:&quot; +rs.getString(&quot;Host&quot;)+&lt;br/&gt;                &quot; User:&quot;+rs.getString(&quot;User&quot;)+&quot; Password:&quot;+rs.getString(&quot;Password&quot;));&lt;br/&gt;            }&lt;br/&gt;            rs.close();&lt;br/&gt;            st.close();&lt;br/&gt;        } finally {&lt;br/&gt;            if (con!=null) try {con.close();}catch (Exception ignore) {}&lt;br/&gt;        }&lt;br/&gt;    }&lt;br/&gt;&lt;br/&gt;}&lt;/pre&gt;&lt;br/&gt;&lt;ul&gt;&lt;br/&gt;	&lt;li&gt;作为数据源在Tomcat中使用&lt;/li&gt;&lt;br/&gt;&lt;/ul&gt;&lt;br/&gt;&lt;pre class=&quot;brush:xml&quot;&gt;&lt;br/&gt;&lt;Resource name=&quot;jdbc/TestDB&quot;&lt;br/&gt;              auth=&quot;Container&quot;&lt;br/&gt;              type=&quot;javax.sql.DataSource&quot;&lt;br/&gt;              factory=&quot;org.apache.tomcat.jdbc.pool.DataSourceFactory&quot;&lt;br/&gt;              testWhileIdle=&quot;true&quot;&lt;br/&gt;              testOnBorrow=&quot;true&quot;&lt;br/&gt;              testOnReturn=&quot;false&quot;&lt;br/&gt;              validationQuery=&quot;SELECT 1&quot;&lt;br/&gt;              validationInterval=&quot;30000&quot;&lt;br/&gt;              timeBetweenEvictionRunsMillis=&quot;30000&quot;&lt;br/&gt;              maxActive=&quot;100&quot;&lt;br/&gt;              minIdle=&quot;10&quot;&lt;br/&gt;              maxWait=&quot;10000&quot;&lt;br/&gt;              initialSize=&quot;10&quot;&lt;br/&gt;              removeAbandonedTimeout=&quot;60&quot;&lt;br/&gt;              removeAbandoned=&quot;true&quot;&lt;br/&gt;              logAbandoned=&quot;true&quot;&lt;br/&gt;              minEvictableIdleTimeMillis=&quot;30000&quot;&lt;br/&gt;              jmxEnabled=&quot;true&quot;&lt;br/&gt;              jdbcInterceptors=&lt;br/&gt;&quot;org.apache.tomcat.jdbc.pool.interceptor.ConnectionState;org.apache.tomcat.jdbc.pool.interceptor.StatementFinalizer&quot;&lt;br/&gt;              username=&quot;root&quot;&lt;br/&gt;              password=&quot;password&quot;&lt;br/&gt;              driverClassName=&quot;com.mysql.jdbc.Driver&quot;&lt;br/&gt;              url=&quot;jdbc:mysql://localhost:3306/mysql&quot;/&gt;&lt;br/&gt;&lt;/pre&gt;&lt;br/&gt;&lt;ul&gt;&lt;br/&gt;	&lt;li&gt;异步获取连接1.必须将&lt;code&gt;fairQueue&lt;/code&gt;设置为&lt;code&gt;true&lt;/code&gt;&lt;br/&gt;2.必须将数据源转换为&lt;code&gt;org.apache.tomcat.jdbc.pool.DataSource&lt;/code&gt;&lt;/li&gt;&lt;br/&gt;&lt;/ul&gt;&lt;br/&gt;&lt;pre class=&quot;brush:java&quot;&gt;Connection con = null;&lt;br/&gt;try {&lt;br/&gt;    Future future = datasource.getConnectionAsync();&lt;br/&gt;    while (!future.isDone()) {&lt;br/&gt;      	System.out.println(&quot;Connection is not yet available. Do some background work&quot;);&lt;br/&gt;    	try {&lt;br/&gt;        	Thread.sleep(100); //simulate work&lt;br/&gt;        }catch (InterruptedException x) {&lt;br/&gt;            Thread.currentThread().interrupted();&lt;br/&gt;        }&lt;br/&gt;    }&lt;br/&gt;con = future.get(); //should return instantly&lt;br/&gt;Statement st = con.createStatement();&lt;br/&gt;ResultSet rs = st.executeQuery(&quot;select * from user&quot;);&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://lveyoeyes.blogspot.com/feeds/3113207299819162629/comments/default' title='博文评论'/><link rel='replies' type='text/html' href='http://lveyoeyes.blogspot.com/2012/01/tomcat-7-jdbc.html#comment-form' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7448595285512004494/posts/default/3113207299819162629'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7448595285512004494/posts/default/3113207299819162629'/><link rel='alternate' type='text/html' href='http://lveyoeyes.blogspot.com/2012/01/tomcat-7-jdbc.html' title='Tomcat 7 的新JDBC连接池的使用说明'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7448595285512004494.post-4479671748048198773</id><published>2011-12-21T23:35:00.000+08:00</published><updated>2014-05-08T14:19:32.037+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="console"/><category scheme="http://www.blogger.com/atom/ns#" term="eclipse"/><category scheme="http://www.blogger.com/atom/ns#" term="JAVA"/><category scheme="http://www.blogger.com/atom/ns#" term="语言"/><title type='text'>修改Eclipse Console的默认语言</title><content type='html'>在用Eclipse开发Web程序的时候，启动Tomcat后，Console里输出的信息会自动翻译成操作系统的语言，在中文操作系统中，中英文混杂输出，看着很别扭。&lt;br/&gt;在Eclipse里添加一个JRE调用时的参数就可以修正这个问题。&lt;br/&gt;选择Window &gt; Preferences &gt; Java &gt; Installed JREs &gt; 默认 JRE &gt; Edit&lt;br/&gt;[caption id=&quot;&quot; align=&quot;aligncenter&quot; width=&quot;608&quot; caption=&quot;修改Eclipse console的语言&quot;]&lt;img alt=&quot;修改Eclipse console的语言&quot; src=&quot;http://pic.yupoo.com/lveyo/BBLTKsDB/medish.jpg&quot; title=&quot;修改Eclipse console的语言&quot; width=&quot;608&quot; height=&quot;640&quot; /&gt;[/caption]&lt;br/&gt;再次运行，Console里就清净多了。</content><link rel='replies' type='application/atom+xml' href='http://lveyoeyes.blogspot.com/feeds/4479671748048198773/comments/default' title='博文评论'/><link rel='replies' type='text/html' href='http://lveyoeyes.blogspot.com/2011/12/eclipse-console.html#comment-form' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7448595285512004494/posts/default/4479671748048198773'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7448595285512004494/posts/default/4479671748048198773'/><link rel='alternate' type='text/html' href='http://lveyoeyes.blogspot.com/2011/12/eclipse-console.html' title='修改Eclipse Console的默认语言'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7448595285512004494.post-379502888254655179</id><published>2011-10-09T19:07:00.000+08:00</published><updated>2014-05-08T14:19:31.962+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Fedora"/><category scheme="http://www.blogger.com/atom/ns#" term="gstm"/><category scheme="http://www.blogger.com/atom/ns#" term="SSH"/><category scheme="http://www.blogger.com/atom/ns#" term="VPS"/><title type='text'>Fedora 15编译安装gSTM</title><content type='html'>gSTM是Linux下一款非常好的图形化SSH管理工具，在Ubuntu中直接apt就可以安装最新版本，在Fedora 15中只能安装1.1版本的rpm包，在 http://sourceforge.net/projects/gstm/ 下载最新的1.2版本的源码make的时候会报错误：&lt;br/&gt;&lt;pre class=&quot;brush:shell&quot;&gt;/usr/bin/ld: conffile.o: undefined reference to symbol ‘xmlTextWriterEndElement@@LIBXML2_2.6.0′&lt;br/&gt;/usr/bin/ld: note: ‘xmlTextWriterEndElement@@LIBXML2_2.6.0′ is defined in DSO /usr/lib/libxml2.so.2 so try adding it to the linker command line&lt;br/&gt;/usr/lib/libxml2.so.2: could not read symbols: Invalid operation&lt;/pre&gt;&lt;br/&gt;&lt;br/&gt;出现这个问题的原因在Fedora官方Wiki有说明。&lt;br/&gt;https://fedoraproject.org/wiki/UnderstandingDSOLinkChange &lt;br/&gt;&lt;br/&gt;下面给出解决方法：&lt;br/&gt;1. 将下载的源码解压&lt;br/&gt;&lt;pre class=&quot;brush:shell&quot;&gt;tar xf gstm-1.2.tar.gz&lt;br/&gt;cd gstm-1.2/&lt;/pre&gt;&lt;br/&gt;2.configure&lt;br/&gt;&lt;pre class=&quot;brush:shell&quot;&gt;./configure&lt;/pre&gt;&lt;br/&gt;3.编辑Makefile&lt;br/&gt;打开Makefile文件&lt;br/&gt;&lt;pre class=&quot;brush:shell&quot;&gt;vim src/Makefile&lt;/pre&gt;&lt;br/&gt;找到gstm_LDADD，在末尾加入-lxml2 -lX11，整体命令为：&lt;br/&gt;&lt;pre class=&quot;brush:shell&quot;&gt;gstm_LDADD = -pthread -lgnomeui-2 -lSM -lICE -lbonoboui-2 -lgnomevfs-2 -lgnomecanvas-2 -lgnome-2 -lpopt&lt;br/&gt; -lbonobo-2 -lbonobo-activation -lORBit-2 -lart_lgpl_2 -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0&lt;br/&gt;-lpangoft2-1.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lpng12 -lm -lcairo -lpango-1.0 -lfreetype -lfontconfig&lt;br/&gt; -lgconf-2 -lgmodule-2.0 -lgobject-2.0 -lgthread-2.0 -lrt -lglib-2.0 -lxml2 -lX11  $(INTLLIBS)&lt;/pre&gt;&lt;br/&gt;4.编译安装&lt;br/&gt;&lt;pre class=&quot;brush:shell&quot;&gt;&lt;br/&gt;make&lt;br/&gt;sudo make install&lt;br/&gt;&lt;/pre&gt;&lt;br/&gt;&lt;br/&gt;结束之后就可以在application中找到gSTM了，这个软件对于在国内的linux用户非常有用，你们懂的。[ad#bottom banner of pages]</content><link rel='replies' type='application/atom+xml' href='http://lveyoeyes.blogspot.com/feeds/379502888254655179/comments/default' title='博文评论'/><link rel='replies' type='text/html' href='http://lveyoeyes.blogspot.com/2011/10/fedora-15gstm.html#comment-form' title='1 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7448595285512004494/posts/default/379502888254655179'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7448595285512004494/posts/default/379502888254655179'/><link rel='alternate' type='text/html' href='http://lveyoeyes.blogspot.com/2011/10/fedora-15gstm.html' title='Fedora 15编译安装gSTM'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7448595285512004494.post-8090945624233061179</id><published>2011-10-09T18:38:00.000+08:00</published><updated>2014-05-08T14:19:31.952+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="email"/><category scheme="http://www.blogger.com/atom/ns#" term="VPS"/><category scheme="http://www.blogger.com/atom/ns#" term="WordPress"/><category scheme="http://www.blogger.com/atom/ns#" term="邮件"/><title type='text'>修改WordPress默认发送邮件地址</title><content type='html'>要修改WordPress默认发送邮件地址和名称只需要简单的修改一下functions.php文件就可以，打开functions.php文件，在文件尾加入下面的代码就可以了。&lt;br/&gt;&lt;pre class=&quot;brush:php&quot;&gt;add_filter(&#39;wp_mail_from&#39;, &#39;new_mail_from&#39;);&lt;br/&gt;add_filter(&#39;wp_mail_from_name&#39;, &#39;new_mail_from_name&#39;);&lt;br/&gt;&lt;br/&gt;function new_mail_from($old) {&lt;br/&gt; return &quot;Your Email Address&quot;;&lt;br/&gt;}&lt;br/&gt;function new_mail_from_name($old) {&lt;br/&gt; return &#39;Your Blog Name&#39;;&lt;br/&gt;}&lt;/pre&gt;&lt;br/&gt;别忘记将第5行和第8行的邮件地址和名称改为自己需要的。</content><link rel='replies' type='application/atom+xml' href='http://lveyoeyes.blogspot.com/feeds/8090945624233061179/comments/default' title='博文评论'/><link rel='replies' type='text/html' href='http://lveyoeyes.blogspot.com/2011/10/wordpress.html#comment-form' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7448595285512004494/posts/default/8090945624233061179'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7448595285512004494/posts/default/8090945624233061179'/><link rel='alternate' type='text/html' href='http://lveyoeyes.blogspot.com/2011/10/wordpress.html' title='修改WordPress默认发送邮件地址'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7448595285512004494.post-7684126713815801237</id><published>2011-09-30T17:26:00.000+08:00</published><updated>2014-05-08T14:19:31.878+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Fedora"/><category scheme="http://www.blogger.com/atom/ns#" term="安装"/><category scheme="http://www.blogger.com/atom/ns#" term="设置"/><title type='text'>Fedora 15安装之后需要做的设置</title><content type='html'>利用Fedora 15的live CD安装好Fedora之后，还需要安装一些软，并且做一些基本的设置，才能满足日常应用。&lt;br/&gt;&lt;br/&gt;1.安装yum-fastestmirror插件，让yum安装软件时自动搜索最快的镜像站点。&lt;br/&gt;&lt;pre class=&quot;brush:bash&quot;&gt;sudo yum install yum-fastestmirror&lt;/pre&gt;&lt;br/&gt;2.升级系统&lt;br/&gt;&lt;pre class=&quot;brush:bash&quot;&gt;sudo yum update&lt;/pre&gt;&lt;br/&gt;3.安装rpmfusion源，就可以用yum安装一些第三方的软件了。&lt;pre class=&quot;brush:shell&quot;&gt;&lt;br/&gt;sudo yum localinstall --nogpgcheck http://mirrors.163.com/rpmfusion/free/fedora/rpmfusion-free-release-stable.noarch.rpm http://mirrors.163.com/rpmfusion/nonfree/fedora/rpmfusion-nonfree-release-stable.noarch.rpm&lt;/pre&gt;&lt;br/&gt;4.安装小熊猫ailurus，一款类似ubuntu下ubuntu-tweak的软件。&lt;br/&gt;&lt;pre class=&quot;brush:shell&quot;&gt;sudo wget http://homerxing.fedorapeople.org/ailurus.repo -O /etc/yum.repos.d/ailurus.repo&lt;br/&gt;sudo yum install ailurus&lt;br/&gt;sudo yum makecache&lt;/pre&gt;&lt;br/&gt;5.安装google chrome&lt;br/&gt;到http://chrome.google.com/ 下载对应版本的Chrome，安装就可以了。&lt;br/&gt;6.安装Flash&lt;br/&gt;到Adobe网站下载之后解压，然后运行：&lt;br/&gt;&lt;pre class=&quot;brush:shell&quot;&gt;&lt;br/&gt;sudo mv libflashplayer.so /usr/lib64/mozilla/plugins/&lt;/pre&gt;&lt;br/&gt;7.安装其他软件&lt;br/&gt;安装gnome-tweak-tool,可以对Gnome做一些设置&lt;br/&gt;&lt;pre class=&quot;brush:shell&quot;&gt;&lt;br/&gt;sudo yum install gnome-tweak-tool&lt;/pre&gt;&lt;br/&gt;安装Gnome插件&lt;br/&gt;&lt;pre class=&quot;brush:shell&quot;&gt;&lt;br/&gt;#增加关机的菜单&lt;br/&gt;sudo yum install gnome-shell-extensions-alternative-status-menu&lt;br/&gt;#更改系统Alt+Tab切换窗口的显示方式&lt;br/&gt;sudo yum install gnome-shell-extensions-alternate-tab&lt;br/&gt;#在任务栏里加入快速打开文件夹的按钮&lt;br/&gt;sudo yum install gnome-shell-extensions-places-menu&lt;br/&gt;&lt;/pre&gt;&lt;br/&gt;桌面右键打开终端&lt;br/&gt;&lt;pre class=&quot;brush:shell&quot;&gt;&lt;br/&gt;sudo yum install nautilus-open-terminal&lt;/pre&gt;&lt;br/&gt;安装音频解码器，MP#，avi等其他媒体格式编码器和MPlayer&lt;br/&gt;&lt;pre class=&quot;brush:shell&quot;&gt;&lt;br/&gt;sudo yum install ffmpeg ffmpeg-libs gstreamer-ffmpeg libmatrosca xvidcore libdvdread libdvdnav lsdvd&lt;br/&gt;sudo yum install gstreamer-plugins-good gstreamer-plugins-bad gstreamer-plugins-ugly&lt;br/&gt;sudo yum install mplayer smplayer&lt;br/&gt;&lt;/pre&gt;&lt;br/&gt;安装unrar&lt;br/&gt;&lt;pre class=&quot;brush:shell&quot;&gt;&lt;br/&gt;sudo yum install unrar&lt;/pre&gt;&lt;br/&gt;8.解决乱码问题&lt;br/&gt;播放器音乐标签乱码&lt;br/&gt;网上的方法大都是说把mp格式的文件的tag用以下命令转换：mid3iconv -e gbk *.mp3。这样操作之后虽然linux下的乱码解决了，但是在windows下又会出现乱码。&lt;br/&gt;比较完美的方法是修改环境变量，以root身份修改/etc/profile文件：&lt;br/&gt;在文件最后加入下面两行&lt;br/&gt;&lt;pre class=&quot;brush:shell&quot;&gt;&lt;br/&gt;export GST_ID3_TAG_ENCODING=GBK:UTF-8:GB18030&lt;br/&gt;export GST_ID3V2_TAG_ENCODING=GBK:UTF-8:GB18030&lt;/pre&gt;&lt;br/&gt;注销后重新导入歌曲信息即可解决乱码。&lt;br/&gt;gedit打开文件乱码&lt;br/&gt;由于编码格式的不同fedora打开windows下的文本文件经常会出现乱码。&lt;br/&gt;网上的解决办法通常都是通过/etc/sysconfig/i18n文件修改环境变量来达到目的，这里的方法不许要这样做。&lt;br/&gt;方法一：&lt;br/&gt;终端输入命令：&lt;br/&gt;&lt;pre class=&quot;brush:shell&quot;&gt;&lt;br/&gt;gsettings set org.gnome.gedit.preferences.encodings auto-detected &quot;[&#39;UTF-8&#39;, &#39;GB18030&#39;, &#39;GB2312&#39;, &#39;GBK&#39;, &#39;BIG5&#39;, &#39;CURRENT&#39;, &#39;UTF-16&#39;]&quot;&lt;br/&gt;gsettings set org.gnome.gedit.preferences.encodings shown-in-menu &quot;[&#39;UTF-8&#39;, &#39;GB18030&#39;, &#39;GB2312&#39;, &#39;GBK&#39;, &#39;BIG5&#39;, &#39;CURRENT&#39;, &#39;UTF-16&#39;]&quot;&lt;/pre&gt;&lt;br/&gt;方法二：&lt;br/&gt;安装dconf-editor（gconf-editor的升级版）：&lt;br/&gt;终端中输入命令：&lt;br/&gt;&lt;pre class=&quot;brush:shell&quot;&gt;sudo yum install dconf-tools&lt;/pre&gt;&lt;br/&gt;终端中输入命令：&lt;br/&gt;&lt;pre class=&quot;brush:shell&quot;&gt;dconf-editor&lt;/pre&gt;&lt;br/&gt;依次点开-&gt;org-&gt;gnome-&gt;gedit-&gt;preferences-&gt;encodings&lt;br/&gt;在auto-detected的value项中加入&#39;GB18030&#39;, 写在第二位；&lt;br/&gt;在shown-in-menu的value项中加入&#39;GB18030&#39;, 写在第二位。&lt;br/&gt;9.安装Faenza图标集&lt;br/&gt;在终端中输入命令：&lt;br/&gt;&lt;pre class=&quot;brush:shell&quot;&gt;sudo yum install faenza-icon-theme&lt;/pre&gt;&lt;br/&gt;安装Faenza图标集。&lt;br/&gt;安装完毕之后，使用gnome3-tweak-tool启用主题，在interface栏中的Icon Theme项中选Faenza即可。</content><link rel='replies' type='application/atom+xml' href='http://lveyoeyes.blogspot.com/feeds/7684126713815801237/comments/default' title='博文评论'/><link rel='replies' type='text/html' href='http://lveyoeyes.blogspot.com/2011/09/fedora-15.html#comment-form' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7448595285512004494/posts/default/7684126713815801237'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7448595285512004494/posts/default/7684126713815801237'/><link rel='alternate' type='text/html' href='http://lveyoeyes.blogspot.com/2011/09/fedora-15.html' title='Fedora 15安装之后需要做的设置'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7448595285512004494.post-2124168947373590241</id><published>2011-09-30T06:59:00.000+08:00</published><updated>2014-05-08T14:19:31.868+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Apple"/><category scheme="http://www.blogger.com/atom/ns#" term="chocolat"/><category scheme="http://www.blogger.com/atom/ns#" term="editor"/><category scheme="http://www.blogger.com/atom/ns#" term="Mac"/><category scheme="http://www.blogger.com/atom/ns#" term="试用"/><title type='text'>MacOSX文本编辑器--Chocolat</title><content type='html'>今天收到Chocolat的测试邀请，立刻下载试用，清爽的界面，支持很多种编程语言的关键字高亮显示，窗口分割，标签页，色彩主题等功能。界面和MacVim非常相似，非常适合对Vim试用不熟的人，而且支持很多种编程语言的模板，还可以在线下载，如果正式版推出的时候也是免费的，那一定会有很多开发者选择Chocolat。&lt;br/&gt;&lt;img alt=&quot;&quot; src=&quot;http://pic.yupoo.com/lveyo/BpbYDOIi/medium.jpg&quot; title=&quot;Chocolat text editor&quot; class=&quot;aligncenter&quot; width=&quot;500&quot; height=&quot;398&quot; /&gt;&lt;br/&gt;Chocolat目前还是在内部测试阶段，大家可以登陆Chocolat的网站&lt;a href=&quot;http://chocolatapp.com/&quot; title=&quot;http://chocolatapp.com/&quot; target=&quot;_blank&quot;&gt;http://chocolatapp.com/&lt;/a&gt;申请试用。[ad#bottom banner of pages]</content><link rel='replies' type='application/atom+xml' href='http://lveyoeyes.blogspot.com/feeds/2124168947373590241/comments/default' title='博文评论'/><link rel='replies' type='text/html' href='http://lveyoeyes.blogspot.com/2011/09/macosx-chocolat.html#comment-form' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7448595285512004494/posts/default/2124168947373590241'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7448595285512004494/posts/default/2124168947373590241'/><link rel='alternate' type='text/html' href='http://lveyoeyes.blogspot.com/2011/09/macosx-chocolat.html' title='MacOSX文本编辑器--Chocolat'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7448595285512004494.post-621480225245318761</id><published>2011-09-22T22:46:00.000+08:00</published><updated>2014-05-08T14:19:31.794+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Fedora"/><category scheme="http://www.blogger.com/atom/ns#" term="gnome"/><category scheme="http://www.blogger.com/atom/ns#" term="linux"/><title type='text'>安装Fedora 15体验Gnome3</title><content type='html'>以前一直用Ubuntu的，但是Ubuntu11.04没有上Gnome 3, 而同时推出的Fedora 15启用了Gnome 3，为了体验一下Gnome 3把Ubuntu换成了Fedora 15.&lt;br/&gt;&lt;br/&gt;&lt;img alt=&quot;&quot; src=&quot;http://pic.yupoo.com/lveyo/BnWgh3m6/medium.jpg&quot; title=&quot;Gnome 3 on Fedora 15&quot; class=&quot;aligncenter&quot; width=&quot;500&quot; height=&quot;313&quot; /&gt;&lt;br/&gt;&lt;br/&gt;安装之后感觉还是有些像MAC，Google了一些安装之后需要做的设置，安装了ailurus（小熊猫）一个类似于ubuntu tweak的软件，可以安装软件并对系统做简单的设置，还加入了RpmFusion的软件库，安装各种软件还是很方便的。</content><link rel='replies' type='application/atom+xml' href='http://lveyoeyes.blogspot.com/feeds/621480225245318761/comments/default' title='博文评论'/><link rel='replies' type='text/html' href='http://lveyoeyes.blogspot.com/2011/09/fedora-15gnome3.html#comment-form' title='1 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7448595285512004494/posts/default/621480225245318761'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7448595285512004494/posts/default/621480225245318761'/><link rel='alternate' type='text/html' href='http://lveyoeyes.blogspot.com/2011/09/fedora-15gnome3.html' title='安装Fedora 15体验Gnome3'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7448595285512004494.post-3120831429484514167</id><published>2011-09-17T09:05:00.000+08:00</published><updated>2014-05-08T14:19:31.777+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ads"/><category scheme="http://www.blogger.com/atom/ns#" term="adsense"/><category scheme="http://www.blogger.com/atom/ns#" term="nuffnang"/><category scheme="http://www.blogger.com/atom/ns#" term="WordPress"/><title type='text'>体验拿福能广告</title><content type='html'>新发现一个博客广告提供商，正在举办一个千人挑战的活动，可以获得现金奖励啊。&lt;br/&gt;Google Adsense的收成也不是很好，最近还有好多博主的号被封了，大家可以试试拿福能这个广告。&lt;br/&gt;本页为广告测试页，给大家看看显示效果：&lt;br/&gt;&lt;!-- nuffnang --&gt;&lt;br/&gt;&lt;script type=&quot;text/javascript&quot;&gt; &lt;br/&gt;nuffnang_bid = &quot;9e63e8f4f60deb34c5780752e5d5023a&quot;;&lt;br/&gt;&lt;/script&gt;&lt;br/&gt;&lt;script type=&quot;text/javascript&quot; src=&quot;http://synad2.nuffnang.com.cn/j.js&quot;&gt;&lt;/script&gt;&lt;br/&gt;&lt;!-- nuffnang--&gt;&lt;br/&gt;活动的连接：&lt;a href=&quot;http://www.nuffnang.com.cn/blog/2011/05/23/challenge-1000&quot; title=&quot;http://www.nuffnang.com.cn/blog/2011/05/23/challenge-1000&quot; target=&quot;_blank&quot;&gt;http://www.nuffnang.com.cn/blog/2011/05/23/challenge-1000&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://lveyoeyes.blogspot.com/feeds/3120831429484514167/comments/default' title='博文评论'/><link rel='replies' type='text/html' href='http://lveyoeyes.blogspot.com/2011/09/blog-post_17.html#comment-form' title='1 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7448595285512004494/posts/default/3120831429484514167'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7448595285512004494/posts/default/3120831429484514167'/><link rel='alternate' type='text/html' href='http://lveyoeyes.blogspot.com/2011/09/blog-post_17.html' title='体验拿福能广告'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7448595285512004494.post-1549800702914004440</id><published>2011-09-16T23:43:00.000+08:00</published><updated>2014-05-08T14:19:31.703+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ads"/><category scheme="http://www.blogger.com/atom/ns#" term="apple"/><category scheme="http://www.blogger.com/atom/ns#" term="mp3"/><title type='text'>收集十首经典的苹果广告歌曲</title><content type='html'>乔布斯不仅是一个传奇的营销者，事实证明他听音乐也很有品位。与TBWA媒体艺术工作室长期合作下，苹果公司在过去的十年中通过 iPod, iPhone, iPad 和MacBook Air 的广告发布，引领并推动了独立、流行和摇滚音乐的潮流。这里是 Advertising Age评出的10大最难忘的歌曲。&lt;br/&gt;&lt;br/&gt;1、Black Eyed Peas: “Hey Mama”(iPod 3G/2004)&lt;br/&gt;这不仅是TBWA“Silhouettes”系列的起点，同时也确立了黑眼豆豆的地位。&lt;br/&gt;&lt;br/&gt;2、Jet: “Are You Gonna Be My Girl?”(iPod 3G)&lt;br/&gt;&lt;br/&gt;3、U2: “Vertigo”(Special-Edition iPod/2004)&lt;br/&gt;这支广告歌曲来自U2“How To Dismantle An Atomic Bomb”的一首单曲。“Vertigo”同时成为了U2在过去7年中最火的歌曲。&lt;br/&gt;&lt;br/&gt;4、The Caesars: “Jerk It Out”(iPod Shuffle/2005)&lt;br/&gt;&lt;br/&gt;5、Daft Punk: “Technologic”(iPod/2005)&lt;br/&gt;&lt;br/&gt;6、Feist: “1 2 3 4″(iPod Nano/2007)&lt;br/&gt;此广告的发布将加拿大民间流行歌手Feist推向主流音乐道路。&lt;br/&gt;&lt;br/&gt;7、Ting Tings: “Shut Up And Let Me Go”(iPod/2008)&lt;br/&gt;Ting Tings 的第一首广告歌曲 。之后“Great DJ”、“That’s Not My Name”、“We’re Not The Loud”等热曲相继发售。&lt;br/&gt;&lt;br/&gt;8、Yael Naim: “New Soul”(MacBook Air/2008)&lt;br/&gt;名不见经传的法国籍以色列创作歌手的新歌“New Soul”被用作于MacBook Air广告歌后，小妮子知名度迅速升温。&lt;br/&gt;&lt;br/&gt;9、Chairlift: “Bruises”(iPod Nano-Chromatic/2008&lt;br/&gt;或许这是苹果广告里最奇怪的歌曲之一，但同时也是最好的之一。&lt;br/&gt;&lt;br/&gt;10、Chilly Gonzales: “Never Stop”(iPad/2010)&lt;br/&gt;&lt;br/&gt;为了当苹果的死粉，特地google了这些歌曲的MP3，共享在&lt;a href=&quot;http://db.tt/DARMRne&quot; target=&quot;_blank&quot;&gt;Dropbox&lt;/a&gt;里，需要的请把邮件地址留在评论里。&lt;br/&gt;&lt;br/&gt;如果Dropbox访问困难，也可以访问我的&lt;a href=&#39;http://account.everbox.com/signup/lveyo&#39; target=&#39;_blank&#39;&gt;Everbox&lt;/a&gt;共享盘&lt;a href=&quot;http://www.everbox.com/f/yrMa74RAg5EPCyvOWY1YzqKmYk&quot; target=&quot;_blank&quot;&gt;http://www.everbox.com/f/yrMa74RAg5EPCyvOWY1YzqKmYk&lt;/a&gt;，选择转存到网盘，在国内的下载速度还是很快的。[ad#bottom banner of pages]</content><link rel='replies' type='application/atom+xml' href='http://lveyoeyes.blogspot.com/feeds/1549800702914004440/comments/default' title='博文评论'/><link rel='replies' type='text/html' href='http://lveyoeyes.blogspot.com/2011/09/blog-post.html#comment-form' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7448595285512004494/posts/default/1549800702914004440'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7448595285512004494/posts/default/1549800702914004440'/><link rel='alternate' type='text/html' href='http://lveyoeyes.blogspot.com/2011/09/blog-post.html' title='收集十首经典的苹果广告歌曲'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7448595285512004494.post-3515863465686945354</id><published>2011-08-13T07:47:00.000+08:00</published><updated>2014-05-08T14:19:31.693+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="cloudflare"/><category scheme="http://www.blogger.com/atom/ns#" term="plugin"/><category scheme="http://www.blogger.com/atom/ns#" term="VPS"/><category scheme="http://www.blogger.com/atom/ns#" term="WordPress"/><title type='text'>CloudFlare的Wordpress插件</title><content type='html'>Wordpress的博客用CloudFlare加速后，如果有人在博客留言，那么Wordpress记录的留言者的IP地址不是真实的浏览者的IP地址，而是CloudFlare的反向代理服务器的IP地址。为了解决这个问题，CloudFlare发布了一个Wordpress的插件，下载地址为：&lt;a href=&quot;http://wordpress.org/extend/plugins/cloudflare/installation/&quot; title=&quot;CloudFlare Wordpress Plugin&quot; target=&quot;_blank&quot;&gt;CloudFlare Wordpress Plugin&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;安装并启用之后，就可以正常的取到源IP地址了。分析代码发现，CloudFlare会将访问请求添加一个名称为HTTP_CF_CONNECTING_IP的Http头，这个值就是真是的源IP地址了。&lt;br/&gt;&lt;br/&gt;这个插件还有一个优化数据库的功能，其实就是在Mysql数据库中对每个表运行OPTIMIZE TABLE和ANALYZE TABLE。CloudFlare建议每两个月运行一次优化，并要注意在访问量低的时候运行，运行时用户只能浏览不能提交任何信息。[ad#bottom banner of pages]</content><link rel='replies' type='application/atom+xml' href='http://lveyoeyes.blogspot.com/feeds/3515863465686945354/comments/default' title='博文评论'/><link rel='replies' type='text/html' href='http://lveyoeyes.blogspot.com/2011/08/cloudflarewordpress.html#comment-form' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7448595285512004494/posts/default/3515863465686945354'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7448595285512004494/posts/default/3515863465686945354'/><link rel='alternate' type='text/html' href='http://lveyoeyes.blogspot.com/2011/08/cloudflarewordpress.html' title='CloudFlare的Wordpress插件'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7448595285512004494.post-4951980246688791891</id><published>2011-08-12T06:19:00.000+08:00</published><updated>2014-05-08T14:19:31.618+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Apple"/><category scheme="http://www.blogger.com/atom/ns#" term="Mac"/><category scheme="http://www.blogger.com/atom/ns#" term="Mac MINI"/><category scheme="http://www.blogger.com/atom/ns#" term="MacBookPro"/><category scheme="http://www.blogger.com/atom/ns#" term="mplayerx"/><category scheme="http://www.blogger.com/atom/ns#" term="python"/><category scheme="http://www.blogger.com/atom/ns#" term="Ubuntu"/><category scheme="http://www.blogger.com/atom/ns#" term="字幕"/><category scheme="http://www.blogger.com/atom/ns#" term="视频"/><title type='text'>用Python去掉字幕文件中的字体标志</title><content type='html'>MplayerX是MAC OS X下很流行的视频播放软件，能够自动加载同视频文件同名的srt字幕文件并且能够正常的显示中文字幕。但是从射手等字幕网站下载的字幕文件中，有的带有类似{\fn微软雅黑\fs7\c&amp;C0C0C0\3c&amp;000000}格式的字体标志，MplayerX并不识别这些字体标志，只能按照原样显示出来，字幕很坑爹，乱七八糟的不好看。&lt;br/&gt;用python可以很轻松的把这些字体标志都去掉，程序代码为：&lt;br/&gt;&lt;pre class=&quot;brush:python&quot;&gt;&lt;br/&gt;#! /usr/bin/env python&lt;br/&gt;import re,codecs,sys&lt;br/&gt;&lt;br/&gt;def remove(srcfilename, desfilename):&lt;br/&gt;    src = codecs.open(srcfilename,&#39;r&#39;,&#39;utf-16&#39;)&lt;br/&gt;    des = codecs.open(desfilename,&#39;w&#39;,&#39;utf-16&#39;)&lt;br/&gt;    strinfo = re.compile(&#39;[\{\S*\}]&#39;)&lt;br/&gt;    for line in src:&lt;br/&gt;        #des.write(line)&lt;br/&gt;        #print line&lt;br/&gt;        des.write( re.sub(&#39;^\{.*\}&#39;,&#39;&#39;, line) )&lt;br/&gt;    src.close()&lt;br/&gt;    des.close()&lt;br/&gt;&lt;br/&gt;if __name__ == &#39;__main__&#39;:&lt;br/&gt;    remove(sys.argv[1],sys.argv[2])&lt;br/&gt;&lt;/pre&gt;&lt;br/&gt;&lt;br/&gt;在MAC下直接运行这个命令&lt;br/&gt;&lt;pre class=&quot;brush:shell&quot;&gt;&lt;br/&gt;chmod +x ./parse.py&lt;br/&gt;./parse.py 原字幕文件 新字幕文件&lt;br/&gt;&lt;/pre&gt;[ad#bottom banner of pages]</content><link rel='replies' type='application/atom+xml' href='http://lveyoeyes.blogspot.com/feeds/4951980246688791891/comments/default' title='博文评论'/><link rel='replies' type='text/html' href='http://lveyoeyes.blogspot.com/2011/08/python.html#comment-form' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7448595285512004494/posts/default/4951980246688791891'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7448595285512004494/posts/default/4951980246688791891'/><link rel='alternate' type='text/html' href='http://lveyoeyes.blogspot.com/2011/08/python.html' title='用Python去掉字幕文件中的字体标志'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7448595285512004494.post-7763229235868083848</id><published>2011-08-09T07:26:00.000+08:00</published><updated>2014-05-08T14:19:31.609+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="cloudflare"/><category scheme="http://www.blogger.com/atom/ns#" term="feedsky"/><category scheme="http://www.blogger.com/atom/ns#" term="ip"/><category scheme="http://www.blogger.com/atom/ns#" term="VPS"/><category scheme="http://www.blogger.com/atom/ns#" term="WordPress"/><title type='text'>当Cloudflare遇上Feedsky</title><content type='html'>&lt;a href=&quot;http://www.cloudflare.com&quot; target=&quot;_blank&quot;&gt;Cloudflare&lt;/a&gt;是免费的CDN服务，我的这个网站&lt;a href=&quot;http://lveyo.com&quot;&gt;lveyo.com&lt;/a&gt;就用了这个服务，速度还算稳定。这个服务还可以屏蔽掉一些攻击，并且可以提供一些简单的访问统计，对于个人博客非常有用，希望能一直免费。&lt;br/&gt;&lt;a href=&quot;http://www.feedsky.com&quot; target=&quot;_blank&quot;&gt;Feedsky&lt;/a&gt;也是国内比较有名的Feed服务提供商，一般都会单独配置一个域名提供自己博客的RSS订阅，例如&lt;a href=&quot;http://feed.lveyo.com&quot; target=&quot;_blank&quot;&gt;feed.lveyo.com&lt;/a&gt;。但是网站通过Cloudflare缓存之后，Feedsky的蜘蛛会被Cloudflare作为危险请求而拒绝掉，这时订阅Feed的用户就不能及时更新了。&lt;br/&gt;为了解决这个问题，就要在Cloudflare的白名单中把Feedsky的IP地址加入，之后Feed就可以及时更新了。&lt;br/&gt;具体方法是：&lt;br/&gt;登录Cloudflare，选择Dashboards--&gt;Thread Control，在Trust List里加入IP地址：61.4.177.*&lt;br/&gt;[ad#Single page bottom]</content><link rel='replies' type='application/atom+xml' href='http://lveyoeyes.blogspot.com/feeds/7763229235868083848/comments/default' title='博文评论'/><link rel='replies' type='text/html' href='http://lveyoeyes.blogspot.com/2011/08/cloudflarefeedsky.html#comment-form' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7448595285512004494/posts/default/7763229235868083848'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7448595285512004494/posts/default/7763229235868083848'/><link rel='alternate' type='text/html' href='http://lveyoeyes.blogspot.com/2011/08/cloudflarefeedsky.html' title='当Cloudflare遇上Feedsky'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7448595285512004494.post-1682854240282130755</id><published>2011-07-29T06:46:00.000+08:00</published><updated>2014-05-08T14:19:31.535+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Lifestyle"/><category scheme="http://www.blogger.com/atom/ns#" term="mauritius"/><category scheme="http://www.blogger.com/atom/ns#" term="毛里求斯"/><category scheme="http://www.blogger.com/atom/ns#" term="流水账"/><title type='text'>毛里求斯之行（三）</title><content type='html'>早上吃饱喝足之后，准备去毛里求斯的首都路易港去转转，顺便采购一些当地的特产。我们通过酒店前台叫了一辆出租车，往返路易刚并且在路易港等待2个小时一共1500卢比。出租车飞快地在小路上穿梭，路两旁都是甘蔗地，看来这里真的是盛产甘蔗制作的各种各样的糖。&lt;br/&gt;出租车司机顺路带我们去了一个所谓得免税店，里面全是山寨货，我们转了一圈就出来了。经过大概30分钟的车程，我们到达了毛里求斯第一大城市路易港。&lt;br/&gt;&lt;a title=&quot;毛里求斯&quot; href=&quot;http://www.yupoo.com/photos/lveyo/81845585/&quot; target=&quot;_blank&quot;&gt;&lt;img class=&quot;aligncenter&quot; src=&quot;http://pic.yupoo.com/lveyo/BdrdoUVO/medium.jpg&quot; alt=&quot;毛里求斯&quot; width=&quot;500&quot; height=&quot;333&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br/&gt;毛里求斯著名的大帆船，当然还有手工制作的帆船模型也很有名，非常细致，我在一个卖手工帆船的小店，老板要用一个80多公分长得手工木帆船换我的手机，我很是心动，大木帆船很精致，做工很细致，但我只是买了一个小一点的木帆船，没有用手机换，老板很失望，哈哈。&lt;br/&gt;在纪念品商店买了一些冰箱贴，大概7，80卢比一个，也不便宜。但是比毛里求斯机场便宜的多，要买纪念品的话还是别在机场买，这里随便一个地方都比机场便宜又好。&lt;br/&gt;2个小时，对感受一个城市的气氛真的有些短。我们随便转了转时间就过去了，仓促的拍了些照片，天很蓝，水也很蓝，很美，很向往。&lt;br/&gt;&lt;a href=&quot;http://www.yupoo.com/photos/lveyo/81845586/&quot; title=&quot;毛里求斯&quot; target=&quot;_blank&quot;&gt;&lt;img class=&quot;aligncenter&quot; src=&quot;http://pic.yupoo.com/lveyo/Bdrdp6XS/medium.jpg&quot; alt=&quot;毛里求斯&quot; width=&quot;500&quot; height=&quot;333&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br/&gt;&lt;a href=&quot;http://www.yupoo.com/photos/lveyo/82023951/&quot; title=&quot;毛里求斯&quot; target=&quot;_blank&quot;&gt;&lt;img class=&quot;aligncenter&quot; src=&quot;http://pic.yupoo.com/lveyo/BfBImmt9/medium.jpg&quot; alt=&quot;毛里求斯&quot; width=&quot;333&quot; height=&quot;500&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br/&gt;&lt;a href=&quot;http://www.yupoo.com/photos/lveyo/82023952/&quot; title=&quot;毛里求斯&quot; target=&quot;_blank&quot;&gt;&lt;img class=&quot;aligncenter&quot; src=&quot;http://pic.yupoo.com/lveyo/BfBInoHX/medium.jpg&quot; alt=&quot;毛里求斯&quot; width=&quot;500&quot; height=&quot;375&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br/&gt;&lt;a href=&quot;http://www.yupoo.com/photos/lveyo/82023953/&quot; title=&quot;毛里求斯&quot; target=&quot;_blank&quot;&gt;&lt;img class=&quot;aligncenter&quot; src=&quot;http://pic.yupoo.com/lveyo/BfBIozOW/medium.jpg&quot; alt=&quot;毛里求斯&quot; width=&quot;500&quot; height=&quot;333&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br/&gt;[ad#bottom banner of pages]</content><link rel='replies' type='application/atom+xml' href='http://lveyoeyes.blogspot.com/feeds/1682854240282130755/comments/default' title='博文评论'/><link rel='replies' type='text/html' href='http://lveyoeyes.blogspot.com/2011/07/blog-post_29.html#comment-form' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7448595285512004494/posts/default/1682854240282130755'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7448595285512004494/posts/default/1682854240282130755'/><link rel='alternate' type='text/html' href='http://lveyoeyes.blogspot.com/2011/07/blog-post_29.html' title='毛里求斯之行（三）'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7448595285512004494.post-6817959193328657290</id><published>2011-07-18T07:36:00.000+08:00</published><updated>2014-05-08T14:19:31.515+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Lifestyle"/><category scheme="http://www.blogger.com/atom/ns#" term="mauritius"/><category scheme="http://www.blogger.com/atom/ns#" term="毛里求斯"/><category scheme="http://www.blogger.com/atom/ns#" term="流水账"/><title type='text'>毛里求斯之行（二）</title><content type='html'>在毛里求斯的第一个早晨，天亮的很早，我也醒的很早，来到阳台看到寂静的海，简直舒坦极了。&lt;br/&gt;&lt;a href=&quot;http://www.yupoo.com/photos/lveyo/81888599/&quot; title=&quot;毛里求斯&quot; target=&quot;_blank&quot;&gt;&lt;img class=&quot;aligncenter&quot; src=&quot;http://pic.yupoo.com/lveyo/BdWgyGZA/medium.jpg&quot; alt=&quot;毛里求斯&quot; width=&quot;500&quot; height=&quot;333&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;&lt;a href=&quot;http://www.yupoo.com/photos/lveyo/81888601/&quot; title=&quot;毛里求斯&quot; target=&quot;_blank&quot;&gt;&lt;img class=&quot;aligncenter&quot; src=&quot;http://pic.yupoo.com/lveyo/BdWgzNxA/medium.jpg&quot; alt=&quot;毛里求斯&quot; width=&quot;500&quot; height=&quot;333&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;接下来我们就在村子里转了装，充满了新鲜感，非洲的热情和岛国的惬意体现的淋漓尽致。在阳台就能看到的海边泳池，满眼的蓝色，海水，天空，白云，海天一色，这种美景伤不起啊。&lt;br/&gt;&lt;br/&gt;&lt;a href=&quot;http://www.yupoo.com/photos/lveyo/81845579/&quot; title=&quot;毛里求斯&quot; target=&quot;_blank&quot;&gt;&lt;img class=&quot;aligncenter&quot; src=&quot;http://pic.yupoo.com/lveyo/BdrdnEcf/medium.jpg&quot; alt=&quot;毛里求斯&quot; width=&quot;500&quot; height=&quot;333&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;&lt;a href=&quot;http://www.yupoo.com/photos/lveyo/81845576/&quot; title=&quot;毛里求斯&quot; target=&quot;_blank&quot;&gt;&lt;img class=&quot;aligncenter&quot; src=&quot;http://pic.yupoo.com/lveyo/Bdrdn6Kl/medium.jpg&quot; alt=&quot;毛里求斯&quot; width=&quot;500&quot; height=&quot;333&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;在Club Med Albion里有各种运动设施可以玩，高尔夫、足球、射箭、网球、空中飞人，当然还有海上运动，浮潜，帆船，独木舟都可以玩，由于来这里度假的人很少，各个项目都可以很随意的玩。在岛国，沙滩和海浪当然是必不可少的。村子里的沙滩虽然不大，但是很干净，沙滩和礁石交接，景色很漂亮。&lt;br/&gt;&lt;a href=&quot;http://www.yupoo.com/photos/lveyo/81845568/&quot; title=&quot;毛里求斯&quot; target=&quot;_blank&quot;&gt;&lt;img class=&quot;aligncenter&quot; src=&quot;http://pic.yupoo.com/lveyo/BdrdlreM/medium.jpg&quot; alt=&quot;毛里求斯&quot; width=&quot;500&quot; height=&quot;333&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br/&gt;&lt;a href=&quot;http://www.yupoo.com/photos/lveyo/81853167/&quot; title=&quot;毛里求斯&quot; target=&quot;_blank&quot;&gt;&lt;img class=&quot;aligncenter&quot; src=&quot;http://pic.yupoo.com/lveyo/BdxDP0yz/medium.jpg&quot; alt=&quot;毛里求斯&quot; width=&quot;500&quot; height=&quot;375&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br/&gt;村子很大，刚来的两天有的时候还是会迷路，幸亏有路牌，还有非常方便的电瓶车，我们也遇到了那个会说“胡锦涛”的小黑司机。&lt;br/&gt;&lt;a href=&quot;http://www.yupoo.com/photos/lveyo/81889196/&quot; title=&quot;毛里求斯&quot; target=&quot;_blank&quot;&gt;&lt;img class=&quot;aligncenter&quot; src=&quot;http://pic.yupoo.com/lveyo/BdWBwzpQ/medium.jpg&quot; alt=&quot;毛里求斯&quot; width=&quot;500&quot; height=&quot;333&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br/&gt;村子里植物很多，各种树各种花，还有蜗牛和猴子，当然还有猫。&lt;br/&gt;&lt;a href=&quot;http://www.yupoo.com/photos/lveyo/81845543/&quot; title=&quot;毛里求斯&quot; target=&quot;_blank&quot;&gt;&lt;img class=&quot;aligncenter&quot; src=&quot;http://pic.yupoo.com/lveyo/BdrdfP3t/medium.jpg&quot; alt=&quot;毛里求斯&quot; width=&quot;500&quot; height=&quot;114&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br/&gt;&lt;a href=&quot;http://www.yupoo.com/photos/lveyo/81845545/&quot; title=&quot;毛里求斯&quot; target=&quot;_blank&quot;&gt;&lt;img class=&quot;aligncenter&quot; src=&quot;http://pic.yupoo.com/lveyo/BdrdgR39/medium.jpg&quot; alt=&quot;毛里求斯&quot; width=&quot;500&quot; height=&quot;333&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br/&gt;&lt;a href=&quot;http://www.yupoo.com/photos/lveyo/81845574/&quot; title=&quot;毛里求斯&quot; target=&quot;_blank&quot;&gt;&lt;img class=&quot;aligncenter&quot; src=&quot;http://pic.yupoo.com/lveyo/BdrdmJJi/medium.jpg&quot; alt=&quot;毛里求斯&quot; width=&quot;333&quot; height=&quot;500&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br/&gt;&lt;a href=&quot;http://www.yupoo.com/photos/lveyo/81889479/&quot; title=&quot;毛里求斯&quot; target=&quot;_blank&quot;&gt;&lt;img class=&quot;aligncenter&quot; src=&quot;http://pic.yupoo.com/lveyo/BdWHHHNX/medium.jpg&quot; alt=&quot;毛里求斯&quot; width=&quot;500&quot; height=&quot;333&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br/&gt;&lt;a href=&quot;http://www.yupoo.com/photos/lveyo/81889480/&quot; title=&quot;毛里求斯&quot; target=&quot;_blank&quot;&gt;&lt;img class=&quot;aligncenter&quot; src=&quot;http://pic.yupoo.com/lveyo/BdWHJoui/medium.jpg&quot; alt=&quot;毛里求斯&quot; width=&quot;500&quot; height=&quot;375&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br/&gt;&lt;a href=&quot;http://www.yupoo.com/photos/lveyo/81889482/&quot; title=&quot;毛里求斯&quot; target=&quot;_blank&quot;&gt;&lt;img class=&quot;aligncenter&quot; src=&quot;http://pic.yupoo.com/lveyo/BdWHLxy4/medium.jpg&quot; alt=&quot;毛里求斯&quot; width=&quot;500&quot; height=&quot;375&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br/&gt;[ad#Single page bottom]</content><link rel='replies' type='application/atom+xml' href='http://lveyoeyes.blogspot.com/feeds/6817959193328657290/comments/default' title='博文评论'/><link rel='replies' type='text/html' href='http://lveyoeyes.blogspot.com/2011/07/blog-post_18.html#comment-form' title='1 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7448595285512004494/posts/default/6817959193328657290'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7448595285512004494/posts/default/6817959193328657290'/><link rel='alternate' type='text/html' href='http://lveyoeyes.blogspot.com/2011/07/blog-post_18.html' title='毛里求斯之行（二）'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7448595285512004494.post-2593710141446406762</id><published>2011-07-16T07:28:00.000+08:00</published><updated>2014-05-08T14:19:31.441+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Lifestyle"/><category scheme="http://www.blogger.com/atom/ns#" term="mauritius"/><category scheme="http://www.blogger.com/atom/ns#" term="毛里求斯"/><category scheme="http://www.blogger.com/atom/ns#" term="流水账"/><title type='text'>毛里求斯之行（一）</title><content type='html'>经过将近10个小时的飞行我们到达了毛里求斯机场，机场很小，排队入境的人很多，办理入境手续的时候需要出示酒店的预定单，我们预定的d&#39;Albion Club Med，只需要对入境检查的人说club med就可以了。顺利取到行李之后，我们找到了来接机的人员，把行李给他们之后，我又在机场兑换了一些当地的钱卢比，机场有很多换钱的窗口，每个窗口都挂着一个外汇兑换的牌价牌，美元一般都是1比27左右，欧元是1比39左右，随便选择一个，私下还可以讨价还价一下，提高几毛钱。由于club med里的消费都是按照卢比计算的，所以你如果想在club med或者其它地方消费最好多换一些卢比，在酒店换钱的汇率会比机场低一些。&lt;br/&gt;&lt;br/&gt;在经过50分钟左右的车程，我们到达了d&#39;Albion Club Med，接待我们的是一位台湾G.O，我们简单的认识了一下就带我们来到了我们的房间。&lt;br/&gt;&lt;a title=&quot;房间&quot; href=&quot;http://www.yupoo.com/photos/lveyo/81862066/&quot; target=&quot;_blank&quot;&gt;&lt;img class=&quot;aligncenter&quot; src=&quot;http://pic.yupoo.com/lveyo/BdDwhjqg/medium.jpg&quot; alt=&quot;房间&quot; width=&quot;500&quot; height=&quot;333&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br/&gt;&lt;a href=&quot;http://www.yupoo.com/photos/lveyo/81862065/&quot; title=&quot;房间&quot; target=&quot;_blank&quot;&gt;&lt;img class=&quot;aligncenter&quot; src=&quot;http://pic.yupoo.com/lveyo/BdDwgbx1/medium.jpg&quot; alt=&quot;房间&quot; width=&quot;500&quot; height=&quot;333&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br/&gt;房间非常大，打开窗帘就是一片海景，梦幻般的感觉，旅途劳顿顿时消失。&lt;br/&gt;&lt;a href=&quot;http://www.yupoo.com/photos/lveyo/81845542/&quot; title=&quot;海景&quot; target=&quot;_blank&quot;&gt;&lt;img class=&quot;aligncenter&quot; src=&quot;http://pic.yupoo.com/lveyo/Bdrdg3ug/medium.jpg&quot; alt=&quot;海景&quot; width=&quot;500&quot; height=&quot;333&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br/&gt;安顿妥当之后已经是当地时间晚上8点左右了，正好是开饭的时间，我们就速速的来到了主餐厅，享用我们来毛里求斯的第一顿自助餐，迷迷糊糊的吃完，一看手机上的北京时间已经是凌晨了，我们拖着疲惫的身体，回房间伴随着海浪声洗洗睡了。&lt;br/&gt;&lt;a href=&quot;http://www.yupoo.com/photos/lveyo/81862394/&quot; title=&quot;草莓熊&quot; target=&quot;_blank&quot;&gt;&lt;img class=&quot;aligncenter&quot; src=&quot;http://pic.yupoo.com/lveyo/BdDGnaqF/medium.jpg&quot; alt=&quot;草莓熊&quot; width=&quot;500&quot; height=&quot;375&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br/&gt;[ad#bottom banner of pages]</content><link rel='replies' type='application/atom+xml' href='http://lveyoeyes.blogspot.com/feeds/2593710141446406762/comments/default' title='博文评论'/><link rel='replies' type='text/html' href='http://lveyoeyes.blogspot.com/2011/07/blog-post.html#comment-form' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7448595285512004494/posts/default/2593710141446406762'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7448595285512004494/posts/default/2593710141446406762'/><link rel='alternate' type='text/html' href='http://lveyoeyes.blogspot.com/2011/07/blog-post.html' title='毛里求斯之行（一）'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7448595285512004494.post-8193254081252465258</id><published>2011-06-24T18:53:00.000+08:00</published><updated>2014-05-08T14:19:31.427+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="linux"/><category scheme="http://www.blogger.com/atom/ns#" term="Ubuntu"/><category scheme="http://www.blogger.com/atom/ns#" term="VPS"/><category scheme="http://www.blogger.com/atom/ns#" term="命令行"/><category scheme="http://www.blogger.com/atom/ns#" term="技巧"/><title type='text'>linux命令行的小技巧</title><content type='html'>在linux的命令行操作中，有很多非常有效的小技巧可以应用到日常的操作中，取得事半功倍的效果，下面就介绍几个小技巧。&lt;br/&gt;&lt;pre class=&quot;brush:bash&quot;&gt;&lt;br/&gt;$ mv thisisareallylongfilename{,.txt}&lt;br/&gt;&lt;/pre&gt;&lt;br/&gt;这个命令将把“thisisareallylongfilename”这个文件改名成“thisisareallylongfilename.txt”，这样就可以不用把这个长文件名打两遍了，虽然在shell中有tab按键可以自动填补文件名，这个小技巧看来不是很有用，但在shell脚本中还是非常有用的。&lt;br/&gt;&lt;pre class=&quot;brush:bash&quot;&gt;&lt;br/&gt;$ mv foo.{jpeg,jpg}&lt;br/&gt;&lt;/pre&gt;&lt;br/&gt;这个命令将把foo.jpeg改名为foo.jpg。&lt;br/&gt;&lt;br/&gt;shell中的一些扩展字符也经常被忽视，比如需要输入上个命令的所有字符，就可以用!!来实现：&lt;br/&gt;&lt;pre class=&quot;brush:bash&quot;&gt;&lt;br/&gt;$ ~/foo.sh&lt;br/&gt;&lt;br/&gt;-bash: /home/lveyo/foo.sh: Permission denied&lt;br/&gt;&lt;br/&gt;$ sh !!&lt;br/&gt;&lt;br/&gt;sh ~/foo.sh&lt;br/&gt;&lt;/pre&gt;&lt;br/&gt;&lt;br/&gt;还有其他的一些用法：&lt;br/&gt;&lt;br/&gt;!* 将代替上一个命令的所有参数，(!! 是整条命令和所有参数)&lt;br/&gt;!$ 上一条命令的最后一个参数&lt;br/&gt;!:3  上一条命令的第3个参数&lt;br/&gt;&lt;br/&gt;例如：&lt;br/&gt;&lt;pre class=&quot;brush:bash&quot;&gt;&lt;br/&gt;$ ls /tmp/somedir&lt;br/&gt;&lt;br/&gt;ls: cannot access /tmp/somedir: No such file or directory&lt;br/&gt;&lt;br/&gt;$ mkdir -p !*&lt;br/&gt;&lt;br/&gt;mkdir -p /tmp/somedir&lt;br/&gt;&lt;br/&gt;$ touch 1 2 3&lt;br/&gt;&lt;br/&gt;$ cp !:2 /tmp/somedir&lt;br/&gt;&lt;br/&gt;cp 2 /tmp/somedir&lt;br/&gt;&lt;/pre&gt;&lt;br/&gt;这几个小tips希望对大家有帮助，提高对命令行操作的兴趣，走进命令行才是走进真正的linux世界。&lt;br/&gt;[ad#bottom banner of pages]</content><link rel='replies' type='application/atom+xml' href='http://lveyoeyes.blogspot.com/feeds/8193254081252465258/comments/default' title='博文评论'/><link rel='replies' type='text/html' href='http://lveyoeyes.blogspot.com/2011/06/linux.html#comment-form' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7448595285512004494/posts/default/8193254081252465258'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7448595285512004494/posts/default/8193254081252465258'/><link rel='alternate' type='text/html' href='http://lveyoeyes.blogspot.com/2011/06/linux.html' title='linux命令行的小技巧'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7448595285512004494.post-7057675244653980130</id><published>2011-05-05T08:35:00.000+08:00</published><updated>2014-05-08T14:19:31.353+08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="admob"/><category scheme="http://www.blogger.com/atom/ns#" term="Android"/><category scheme="http://www.blogger.com/atom/ns#" term="google"/><category scheme="http://www.blogger.com/atom/ns#" term="广告"/><title type='text'>在Android程序中加入Google AdMob (二)</title><content type='html'>上一篇文章介绍了如何在Java代码中加入AdView的对象，在程序中显示Google AdMob的广告。一般情况下Android程序都是用XML文件描述软件界面的，这篇文章就介绍一下如何在XML文件中加入Google AdMob的广告。&lt;br/&gt;&lt;br/&gt;在XML文件中加入AdView主要有下面4个步骤：&lt;br/&gt;&lt;ul&gt;&lt;br/&gt;&lt;li&gt;将AdMob的SDK JAR文件加入到项目&lt;/li&gt;&lt;br/&gt;&lt;li&gt;在res/layout/main.xml文件中定义一个com.google.ads.AdView&lt;/li&gt;&lt;br/&gt;&lt;li&gt;在res/values/attrs.xml文件中定义adSize枚举类型和adUnit属性&lt;/li&gt;&lt;br/&gt;&lt;li&gt;运行时将AdView作为资源查找到并请求广告内容&lt;/li&gt;&lt;br/&gt;&lt;/ul&gt;&lt;br/&gt;&lt;br/&gt;1. 将AdMob的SDK JAR文件加入到项目，上篇文章中已经介绍过，在此略过。&lt;br/&gt;&lt;br/&gt;2. 定义一个com.google.ads.AdView&lt;br/&gt;修改res/layout/main.xml文件，加入AdView的定义，并设置属性值。&lt;br/&gt;&lt;pre class=&quot;brush:xml&gt;&lt;br/&gt;&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;&lt;br/&gt;&lt;LinearLayout xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;&lt;br/&gt;              xmlns:ads=&quot;http://schemas.android.com/apk/res/com.google.example&quot;&lt;br/&gt;              android:orientation=&quot;vertical&quot;&lt;br/&gt;              android:layout_width=&quot;fill_parent&quot;&lt;br/&gt;              android:layout_height=&quot;fill_parent&quot;&gt;&lt;br/&gt;  &lt;com.google.ads.AdView android:id=&quot;@+id/adView&quot;&lt;br/&gt;                         android:layout_width=&quot;wrap_content&quot;&lt;br/&gt;                         android:layout_height=&quot;wrap_content&quot;&lt;br/&gt;                         ads:adUnitId=&quot;MY_AD_UNIT_ID&quot;&lt;br/&gt;                         ads:adSize=&quot;BANNER&quot;/&gt;&lt;br/&gt;&lt;/LinearLayout&gt;&lt;/pre&gt;&lt;br/&gt;将XML文件中的MY_AD_UNIT_ID替换为你的publisher ID，同时不要忘记的是要把ads的名字空间加入到文件中，以便adUnitId和adSize的属性可用。&lt;br/&gt;&lt;br/&gt;3. 定义adSize和adUnitId&lt;br/&gt;在res/values/attrs.xml文件中定义adSize和adUnitId。&lt;br/&gt;&lt;pre class=&quot;brush:xml&quot;&gt;&lt;br/&gt;&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;&lt;br/&gt;&lt;resources&gt;&lt;br/&gt;  &lt;declare-styleable name=&quot;com.google.ads.AdView&quot;&gt;&lt;br/&gt;      &lt;attr name=&quot;adSize&quot;&gt;&lt;br/&gt;          &lt;enum name=&quot;BANNER&quot; value=&quot;1&quot;/&gt;&lt;br/&gt;          &lt;enum name=&quot;IAB_MRECT&quot; value=&quot;2&quot;/&gt;&lt;br/&gt;          &lt;enum name=&quot;IAB_BANNER&quot; value=&quot;3&quot;/&gt;&lt;br/&gt;          &lt;enum name=&quot;IAB_LEADERBOARD&quot; value=&quot;4&quot;/&gt;&lt;br/&gt;      &lt;/attr&gt;&lt;br/&gt;      &lt;attr name=&quot;adUnitId&quot; format=&quot;string&quot;/&gt;&lt;br/&gt;  &lt;/declare-styleable&gt;&lt;br/&gt;&lt;/resources&gt;&lt;/pre&gt;&lt;br/&gt;&lt;br/&gt;4. 查找并显示广告&lt;br/&gt;在XML文件不能做的事情就是让AdView加载一个AdRequest。要在Java中完成这步，要通过findViewById找到AdView之后调用loadAd方法就可以显示广告了。&lt;br/&gt;&lt;pre class=&quot;brush:java&quot;&gt;import com.google.ads.*;&lt;br/&gt;&lt;br/&gt;public class BannerExample extends Activity {&lt;br/&gt;  @Override&lt;br/&gt;  public void onCreate(Bundle savedInstanceState) {&lt;br/&gt;    super.onCreate(savedInstanceState);&lt;br/&gt;    setContentView(R.layout.main);&lt;br/&gt;&lt;br/&gt;    // Look up the AdView as a resource and load a request.&lt;br/&gt;    AdView adView = (AdView)this.findViewById(R.id.adView);&lt;br/&gt;    adView.loadAd(new AdRequest());&lt;br/&gt;  }&lt;br/&gt;}&lt;/pre&gt;&lt;br/&gt;&lt;br/&gt;运行这个项目就可以看到广告了。同时也不要忘记修改AndroidManifest.xml文件，将AdActivity和权限加入到配置文件中。[ad#bottom banner of pages]</content><link rel='replies' type='application/atom+xml' href='http://lveyoeyes.blogspot.com/feeds/7057675244653980130/comments/default' title='博文评论'/><link rel='replies' type='text/html' href='http://lveyoeyes.blogspot.com/2011/05/androidgoogle-admob_5.html#comment-form' title='4 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7448595285512004494/posts/default/7057675244653980130'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7448595285512004494/posts/default/7057675244653980130'/><link rel='alternate' type='text/html' href='http://lveyoeyes.blogspot.com/2011/05/androidgoogle-admob_5.html' title='在Android程序中加入Google AdMob (二)'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry></feed>