在使用 Delphi 编写程序时,经常需要直接使用浏览器打开一个 URL,简单的方法是用 ShellExecute,例如:
ShellExecute(Application.Handle, 'open', PChar(url), nil, nil, SW_SHOW);
这种方法的缺点是:不会重新创建浏览器实例(就是说不会打开新的浏览器窗口),从而导致先前正在浏览的网页被当前 URL 网页替换掉。虽然可以通过浏览器的“后退”按钮回去,但还是觉得不爽!
(more…)
[25-May-2004] PHP 4.3.7RC1 has been released for testing. This is the first release candidate and should have a very low number of problems and/or bugs. Nevertheless, please download and test it as much as possible on real-life applications to uncover any remaining issues.
List of changes can be found in the NEWS file.
Migrating from PHP 4 to PHP 5
1. Welcome
2. Objectmodel in PHP 4
3. Objectmodel in PHP 5
4. Clone
5. Clone
6. Casting Objects
7. Casting Objects
8. Comparing Objects
9. Comparing Objects
10. Compatibility Mode
11. Assigning to $this
12. get_class()
13. E_STRICT
14. var vs. public
15. Automagic Objects
16. Signatures
17. Command Line Interface
18. Changes in MySQL
19. array_merge()
20. strrpos() and strripos()
21. Questions
22. Resources
2001 年的写作,读后别有一番滋味~
Introduction
William Opdyke's 1992 Doctoral Thesis "Refactoring Object-Oriented Frameworks" identified eight categories that all refactorings fall into. Martin Fowler's book, "Refactoring—Improving the Design of Existing Code"identifies 72 specific refactoring patterns, each of which involve programmer activity in one or more of Opdyke's eight categories. This article is about one specific refactoring pattern, on page 370 in Fowler's book, that Fowler named Separate Domain From Presentation.
No nontrivial project is perfect. Thus, every nontrivial program can always be improved. And, we're not very good if we can't spot places where we think improvements could be made. Of course, whether those improvements should be made, given time and money constraints, is an entirely different issue. However, we should always be able to spot candidates for improvement. After all, hindsight is much easier than foresight.
When I look back on past projects that I have worked on and ask myself where improvements could be made, and then I prioritize those improvements and categorize them, the top of the list has always been domain separation issues. Thus, the single biggest problem in every past project I've worked on has been the lack of an adequate separation of presentation code from domain code. In every case, the single suggestion that would have had the biggest impact on project quality, would have been to more fully separate the presentation from the domain. In other words, every past project has suffered significantly from a lack of proper and complete separation.
This problem is not language specific, as the following poor examples from Objective-C, C++, Java, and Smalltalk illustrate. Even though the languages for each project were different, the projects shared a common set of mistakes: If we can learn to avoid these mistakes, we will create systems that are simpler and easier to change and reuse.
阅读原文
很不错的程序,可用来查询 man、info、perldoc 等。在自己机器上装了一个,phpMan 的 project 主页,作者 chedong 的 BLOG。