手机浏览 RSS 2.0 订阅 膘叔的简单人生 , 腾讯云RDS购买 | 超便宜的Vultr , 注册 | 登陆
浏览模式: 标准 | 列表Tag:chrome

nginx 的resolv.conf经常被自动清空

有时候,服务器上用的DNS其实并不是我想要的,有些DNS其实速度慢,而且解析更慢,更新也慢。所以这时候就想要换一个快一点的dns了。

第一个想到要改的是resolv.conf,在里面加入nameserver 114.114.114.114,但改完后,过一阵子看,却发现文件又空了。找了下资料,原来不能这样。。

直接改/etc/network/interface ,在里面加入:dns-nameservers 114.114.114.114 8.8.8.8

看好了,这里是dns开头,而且是复数。完了重启networking即可

参考:http://blog.jsdan.com/3743

因为上面是台湾网站,如果打不开,请看这个PDF:[ubuntu] 修改 resolv.pdf

Tags: nginx, resolv

QQ输入法 Mac 2.2发布:全新输入法引擎

QQ输入法是我目前用的最多的输入法。用的很舒服,至少问题不是特别多吧。默认的输入法问题太多了,五笔问题超大。所以就用了这个。。。嗯,从过去到现在就没有用过搜狗。不知道为什么,就是不喜欢。

有人这么介绍这次更新:

QQ输入法 Mac 2.2版更新啦,全新的输入法引擎+全新的词库,给您带来不一样的输入体验。新版输入法依旧坚持以简驭繁的路线,着重对输入法的核心组件:输入法引擎及词库,做了比较充分的优化,提升了输入体验。新版本另一个功能是完善了符号输入功能,根据港台用户使用繁体符号的特点,增加了繁体符号的种类,让输入繁体符号更加符合港台用户的习惯;

很多Mac平台 下的输入法都没有成对标点匹配功能,输入引号、书名号时都比较繁复,在2.2版中QQ输入法加入了成对标点匹配功能,让中文输入在Mac平台上又便捷一 些。

----这次最大的更新居然是大波罗的支持。

在人气网游Diablo3中,有用户反馈2.1版的输入法会不显示候选框,QQ输入法团队的开发同学,经过24小时的下载,瞬间就解决了这个问题,现在在Diablo中已经不用考验大家盲打的技术了,可以放手去击杀Diablo了。

QQ输入法 Mac2.2版新特性:

1. 更新输入法引擎,速度更快;

2. 超大词库,新词更全;

3. 成对标点自动匹配;

4. 解决在diablo3中候选区不显示的问题。

下载地址在这里:http://dl_dir.qq.com/invc/qqpinyin/QQInput_Mac_Setup_2_2_40_400.dmg

Tags: qq输入法

乱七八槽

闲在家里居然连博客也写的少了。嗯。是抄的少了。。。
所以记录点东西吧。。。
1、Yii的语言包。参考官网GUIDE中i18N的说明。如果要最方便的处理,那就是在config里设置language为zh_cn,这样所有的出错信息都是中文了(让我郁闷的是,好象主框架里的文件是GBK的?)如果中途需要变更语言,则直接在URL里加入?language=en_us之类的。关于localID,在i18N一章有介绍。如果是自己的程序中的语言包,那就是直接在/protected/messages目录下建立localID的目录,同时写入你的语言包分类的名称,比如我建了一个system.php,那么我在Yii里的调用就可能是如下的: Yii::t("system","要翻译的内容");第一个参数对应了文件,第二个就是语言包中的名字,可以有参数,可以很多。。。请查看手册

2、学着做PPT,发现WPS的模版库还是不错的,然后看到这个博客:http://blog.sina.com.cn/changshappt,觉得哇,好厉害啊。。。

3、前两天说我收藏了一些做WEB的小工具,其中就有配色方案的,如果需要可以去下载。当然现在我说的是在线版的,地址在这里:http://www.mb5u.com/tool/peise/。其实可以把它COPY到本地的,但我目前还是想着算了。。

4、做PPT的时候参考的文章之一:浅谈各浏览器的Javascript引擎。来自于http://blog.csdn.net/maco_wang/archive/2009/11/02/4758573.aspx,主要借鉴了以下的内容:

1、Chrome浏览器的V8 Javascript引擎,使包含大量Javascript的网页装载速度提高30%。
2、Opera宣布新JS引擎"Carakan" 速度提升2.5倍。
3、Firefox 3.5拥有一个全新的JavaScript引擎,叫做TraceMonkey,在该引擎上跑JS应用要比Firefox 3快到3-4倍。
4、safari浏览器新的js引擎squirrelfish非常快。
5、傲游浏览器3.0.3.3 alpha JS引擎升级,脚本执行速度提高9%。

心碎:pyscripter。。。

昨天说了一些关于python的编辑器的列表,当然是有一些IDE存在的,所以下载了一些,只是,让我失望的也有很多。比如这个pyscripter。。。
看截图,我很开心,好象挺不错的软件,但是下载回来后却发现无法运行。看了官方的CHM里面没有多介绍,只是说了一些:

PyScripter originally started as a lightweight IDE designed to to serve the purpose of providing a strong scripting solution for Delphi applications, complementing the excellent Python for Delphi (P4D) components.  However, and with the encouragement of the P4D creator Morgan Martinez and a few early users, it has now evolved into a full-featured stand-alone Python IDE.  It is built in Delphi using P4D and the SynEdit component but is extensible using Python scripts.  Currently, it is only available for Microsoft Windows operating systems and  features a modern user-interface. Being built in a compiled language is rather snappier than some of the other IDEs graphic  and provides an extensive blend of features that make it a productive Python development environment.


在无法清楚官方想说什么的时候,去了google code上看了一下,居然还真的看到了这句话:
If you are using a 64bit version of Windows note that PyScripter will only work if a 32bit version of Python is installed.
好吧,不管是怎么样的情况,反正我64位的win7是肯定无法运行了。。。。
现在正在下载其他的,准备一个个的测试:http://wiki.python.org/moin/PythonEditors#Windows-OnlyEditors

Tags: python, pyscripter

杂七杂八:editplus and netbeans

Editplus和netbeans是什么我想不用详细介绍了吧。一般做PHP开发的人,几乎都了解这两个玩意。
Editplus是韩国人开发的,Netbeans是Sun的产品。

先说Netbeans吧,嗯,他们的东西还算不错,只是让我们写PHP的人郁闷的是,它没有自动换行(line wrap),所幸,6.10开始,这个功能已经被加进去了。现在用6.10M1的版本都可以进行尝试,但在尝试前,请记住(扫描项目的时候,不要设置换行,否则80%的机率会让你的NB爆掉)。

官方这样解释:

XML/HTML代码
  1. Guys from editor infrastructure asked me to help him to test new editor infrastructure that brings up also line wrapping features. Probably you remembered that this feature was enabled during NetBeans 6.9 development, but because it introduced many problems and there wasn't time to stabilize it enough, it's not in NetBeans 6.9 available.   
  2.   
  3. We would like to stabilize the new infrastructure as much as possible before it will be switch on to be be available by default.You can enable the feature in development build through command line option: -J-Dorg.netbeans.editor.linewrap=true . Do it only with a development build, even if the optoin works in NetBeans 6.9, the new infrastructure is not stable enough there.  
  4.   
  5. So I would like to ask you, if you use a latest development build, run the build with the mentioned option. You can start NetBeans from command line with the option or place the option in the ${nb_dir}/etc/netbeans.conf file (add into netbeans_default_options).  
  6.   
  7. When you started NetBeans with this, there should be Line Wrapping option in the formatter.  
  8.  大小: 51.28 K
尺寸: 500 x 315
浏览: 1947 次
点击打开新窗口浏览全图 
  9. When you find out an issue with it, please report it in our Bugzilla. For such issue the product should be Editor, component Painting & Printing and please mark all reports with the status whiteboard: linewrap so we can easily track them. The tentative plan is to enable this again for M1 of NetBeans 6.10 but this all depends on the additional feedback and testing.  
所以昨天我换过了新版本进行了尝试。只是效果没有想象中的那样好。但,总比不能换行好。这是实际效果:

大小: 8.68 K
尺寸: 290 x 181
浏览: 1912 次
点击打开新窗口浏览全图

只是换行后多了一个回车显示着而且不能消失,看起来有点挫。。

接下来说Editplus,昨天晚上,乔大姐(HonestQiao,乔楚)兴冲冲的在群里说,Editplus支持PCRE的正则了,大家快更新啊,不更新会后悔的。。于是到官方看了一下changelog,然后进行了更新。

再接下来就测试,结果,让人大吃一斤的是,有很多正则条件输进去,立刻就把Editplus给爆了,比如:?\d、.*+?之类的,还有就是.*能够匹配一行,.*?一个也不能匹配。

不过简单的正则匹配还是没问题的(如果你升级了该版本,建议你在正则搜索前,先保存你的代码,否则可能会想哭但是哭不出来)

官方的changeLog: 'Use TR1 regular expression' option ('Preferences'->'General').

据说,最后乔大姐忍不住发邮件去鄙视那位开发者了。

Tags: editplus, netbeans

Records:171234