GWT 1.3 Release Candidate is 100% Open Source

Posted on 13th December 2006 by Nio in 程序人生

GWT 1.3 Release Candidate is 100% Open Source

Today is quite a milestone for Google Web Toolkit: with the GWT 1.3 Release Candidate, our team is very happy to announce that all of GWT is open source under the Apache 2.0 license. There's a lot to say, but let's start with our mission:

"To radically improve the web experience for users by enabling developers to use existing Java tools to build no-compromise AJAX for any modern browser."

Prototype based Tooltip

Posted on 7th December 2006 by Nio in AJAX, JavaScript, 程序人生

昨天需要在项目中使用 JavaScript 的 Tooltip,在网上找了很多,但都不太好用,大多数都用到了 document.write(),而且是在 window.init 的时候对所有的 tooltips 进行初始化,当使用 AJAX 的时候,这些就不能正常工作了,所以最后决定还是自己写一个简单的基于 Prototype 的 Tooltip,以后有需要的话再增加一些功能、效果。

Requirements:
Prototype 1.5.0_rc1. You can download it from the Prototype web site.

Download:
Tooltip 0.1.0

Demo:
Click here to see online demo.

Usage:
1. Insert the following lines into section in your html file:


<script type="text/javascript" src="prototype.js"></script>
<script type="text/javascript" src="tooltip.js"></script>

2. Define a cool css for tooltip, for example:


<style type="text/css">
#tooltip {
    background-color: #ffffcc;
    color: #000000; 
    padding: 4px; 
    border: 1px solid gray; 
    text-align: left; 
    cursor: default;
    opacity: 0.85;
    z-index: 10000;
}
</style>

3. Create a new Tooltip instance for your tooltip source html element:


<div id="mytip">Move mouse over here!</div>
 <script type="text/javascript">new Tooltip({element:"mytip", text:"Tooltip message.<br/>You can use HTML tags here."});</script>

And you can set the width of tooltip box by passing "width" parameter. For example:


new Tooltip({element:"mytip", text:"Tooltip message.<br/>You can use HTML tags here.", width:250});

Don't hesitate to comment if you have any questions.

PHP&MORE 第七期发布

Posted on 6th December 2006 by Nio in 程序人生

本期主要是围绕 PHP/MySQL/Apache 的加速、优化文章。
目录如下:

  • PHP & Memcached (Nio)
  • 使用 memcached 实现对象的自动缓存 (cid73)
  • XCache: 加速你的 PHP (Static)
  • 扩展 PHP (Ben)
  • MySQL 集群技术简介 (叶金荣)
  • LAMP 系统优化实例分析 (Dalamar)
  • Subversion PHP Binding (sirtoozee)

点击此处下载!

vol7.gif

PECL :: uploadprogress

Posted on 5th December 2006 by Nio in AJAX, 程序人生

uploadprogress 已经正式放入 PECL 了,早些时候是在作者的 blog 上,叫做“Upload Progress Meter”。从名字上估计大家都能知道这是用于上传文件时,通过 AJAX 方式获取文件信息,然后在浏览器中显示上传进度条的。可以在此处看到 demo。不过这个扩展只能用于 PHP 5.2 或以上版本。