Submitted by gouki on 2011, September 5, 9:33 PM
先不说什么功能,只能说这种功能对我们来说太有用了。
refactor,这种重构,其实在ZS和NETBEANS 中效果并没有现在这个软件(phpstorm)那么明显。看看它的功能就知道了。
官方网址(http://blog.jetbrains.com/webide/2011/05/extract-function-method-refactoring-for-php/)说:
We are working hard on new features for PhpStorm 2.1, and the ‘Extract Function/Method’ refactoring for PHP is one of them. This feature has been available since the first PhpStorm 2.1 EAP(106.444), and we are looking forward for your feedback.

Picture 1b: Select an expression

Invoke the refactoring from the menu ‘Refactor -> Extract Method‘ or using a hotkey. The default hotkey is Ctrl+Alt+M for Windows/Linux and Cmd+Opt+M for Mac.
Depending on the context of the selected code fragment, ‘Extract method’ (the code fragment is inside a method) (Picture 2b) or ‘Extract Function’(the code fragment is inside a function or script) (Picture 2a).
Picture 2a: ‘Extract Function’ dialog

Picture 2b: ‘Extract Method’ dialog

Enter the name of the new function/method. Press OK.
Picture 3a: The code fragment is replaced with a function call statement

Picture 3b: The expression is replaced with a method call expression

Picture 4a: Definition of the extracted function

Picture 4b: Definition of the extracted method

Develop with pleasure!
------------
看完上面的内容,你是否觉 得,原来重构也可以这样简单?
Tags: phpstorm, refactor
Software | 评论:0
| 阅读:17020
Submitted by gouki on 2011, September 4, 9:33 PM
如果到facebook上关注一下yii framework的群组,会发现有人在介绍yiicookbook.org,里面是一本关于1.1的书。
然后去yii framework官方上搜索一下phpstorm,会发现同一个人在说自己用phpstorm,问phpstorm有没有什么支持。结果官网说暂时好象不支持。。。
然后再搜索了一下,发现在yii的官网有一个简单的例子在说如何让项目支持yii framework。看了一下,发现,大多数都用过,只有第一点,说是把yiilite.php过滤掉。这个其实很重要了,否则有些变量就会出现提示两次。
OK,来看官网的wiki吧:http://www.yiiframework.com/wiki/92/configuring-phpstorm-ide-for-yii
Code completion
- Exclude yiilite.php from index:
- File → Settings → IDE Settings → File Types.
- yiilite.php to Ignore files and folders.
- Exclude not used directories, specify resources.
- File → Settings → Project settings → Directories.
- Mark framework/cli/views, protected/runtime and assets as excluded.
- Mark website root as resource root.
- Specify path to your PHP.
- File → Settings → Project settings → PHP → PHP Home.
- If your project uses common Yii framework folder you need to include it.
- File → Settings → Project settings → PHP → PHP Home → Add.
- Specify a path to framework directory.
- If you are writing unit tests you can include PHPUnit to get code completion:
- File → Settings → Project settings → PHP → PHP Home → Add.
- Specify a path to PHPUnit.
- Complete code: Ctrl+Space.
- Show method arguments: Ctrl+Q.
Testing
You should install PHPUnit to run unit tests.
- PHPUnit.
- Follow official PHPUnit installation guide.
- In your IDE: Run → Edit configurations.
- Press "+".
- Name: anything.
- Test: depending on what do you want to test select an appropriate option. Specify path.
- Use XML configuration file: specifying path to phpunit.xml. Often it's path_to_your_webroot/protected/tests/phpunit.xml.
- To run tests use SHIFT+F10.
OK,现在这样就可以简单的支持yii framework了。只是phpstorm还是有点小问题,因为提示的时候不会显示phpdoc的信息。纠结,啥时候会有doc的提示呢?
Tags: phpstorm, yii, facebook
Software | 评论:0
| 阅读:24564
Submitted by gouki on 2011, August 20, 9:54 PM

OK,看我博客的人,可能会看到这个工具条了,嗯,我已经在网站的阅读时候启用了readability这个插件,如果不想看到文章左右的广告的用户,可以点击NOW看一下。当然如果你对文章有兴趣,你可以点击EMAIL发到邮箱。
更重要的是,如果你有kindle,你也可以尝试发送过去。(希望我转载的文章足够吸引人)
放心吧,不要以为很难,其实 你也可以拥有这样的功能。在你的页面上加上这样一段代码就OK了:
<div class="rdbWrapper" data-show-read="1" data-show-send-to-kindle="1" data-show-print="1" data-show-email="1" data-version="1"></div><script type="text/javascript"> (function() { var s = document.getElementsByTagName("script")[0], rdb = document.createElement("script"); rdb.type = "text/javascript"; rdb.async = true; rdb.src = document.location.protocol + "//www.readability.com/embed.js"; s.parentNode.insertBefore(rdb, s); })(); </script>
什么,复制代码无效?没关系,看这里:http://www.readability.com/publishers/tools
你可以自定义你要的样式啦
Tags: readability
Software | 评论:0
| 阅读:19309
Submitted by gouki on 2011, August 17, 3:50 PM
说实话,自从它到了腾讯后变成腾讯的软件后,我一直以为他就那样的死去了。
从很久以前,我就一直在用它,6.0给我带来的惊喜已经逐渐离我远去了。从6.0到6.5,从6.5到7.0,你以为你是玻璃渣?几年才出一个?
不过WEB mail这一块还是有更新的,所以我一直以为6.5不会再出新版了。所以我才觉得那样的意外。。。
http://fox.foxmail.com.cn/index.htm
官方有介绍了,这次的新版的界面超象outlook呀。而且也全面支持Exchange了

主要是由于一些计划任务在用,而且有时候从苹果里发出来的邮件中内嵌图片的,我居然用foxmail收下来是显示不了的。而又占用了空间,TNND,所以暂时我目前已经不在使用了
有兴趣的可以尝试一下下
Tags: foxmail, tencent, qq, 腾讯
Software | 评论:0
| 阅读:18435
Submitted by gouki on 2011, August 16, 11:34 PM
看上这个软件是因为NOOK下面读PDF还是会有点小问题,但EPUB对中文的默认支持又不好,真TMD纠结。
软件还没有试用,不过能够放出来,估计问题不会特别大
PDF to EPUB Converter是一个将PDF转换为EPUB格式的软件,有文本和图片两种转换模式,支持编辑EPUB信息,包括名称、作者、ISBN、发行商、图片 类别与注释等。EPUB是一种电子图书标准,其文字内容可以根据阅读设备的不同而以最佳阅读方式显示,iPad、iPhone、Android等均支持 EPUB图书。

软件有点大,这个链接可以下载:http://www.weste.net/download.php?a_k=XAsPAlIBCxBUXAxCEkMNTRlDHgYDAUoACQ4YAAgJA05UR0FPHVQMQT9HAAtXFURfEEINBgEFV1ZWWwdRUEMPEQgHCQRKCAkAHFBUBEgEAURbCwA%3D
当然,如果不行,你看到这个网址没,点进去搜索一下就OK了。
我只是纯备份,还没有测试(所以也不知道有没有病毒啊)
Tags: nook, epub
Software | 评论:0
| 阅读:17155