正在加载……
4s,5s店是什么意思?
Posted in 情感天地 on April 19, 2008 / 评论(1) »
经常在电视上看到说4S店,一直搞不懂是什么意思,想起来才搜索了一下
4S:英文单词销售(Sale)、维修(Srvices)、配件(Spare Parts)和信息反馈(Survey)
3S:英文单词销售(Sale)、维修(Srvices)、配件(Spare Parts)
增加反向链接的103个方法
Posted in 情感天地 on April 18, 2008 / 评论(0) »
网上看到的,比较长打包一下放在这里,要看的下载.

爱国-情结-北京奥运
Posted in 情感天地 on April 18, 2008 / 评论(0) »




AJAX in Zend Framework
Posted in LAMP on April 17, 2008 / 评论(0) »
Zend Framework 1.5 已经对 AJAX 有了不错的支持,使用上也很简单。主要涉及到的类是 Zend_Controller_Action_Helper_AjaxContext,这个类中的方法 initContext() 中通过判断 XHR 头来确定是否是 AJAX 调用:

<?php
/**
 * Initialize AJAX context switching
 *
 * Checks for XHR requests; if detected, attempts to perform context switch.
 * 
 * @param  string $format 
 * @return void
 */
public function initContext($format null)
{
    
$this->_currentContext null;

    if (!
$this->getRequest()->isXmlHttpRequest()) {
        return;
    }

    return 
parent::initContext($format);
}
?>

可以使用 ZF 默认的目录部署来写一个简单示例,目录结构如下:

application/
    controllers/
        IndexController.php
    models/
    views/
        scripts/
            index/
                index.phtml
                demo.ajax.phtml
        helpers/
        filters/
html/
    .htaccess
    index.php
    js/
        jquery.js

JavaScript 库使用 jQuery。需要写代码的文件是 IndexController.php、index.phtml 和 demo.ajax.phtml。IndexController.php 包含了 2 个 actions,一个是 index,一个是 demo。index 中有个按钮用于测试 AJAX 请求,而请求的目标则是 demo action。demo 对应的视图名字后缀使用了 .ajax.phtml,这是默认的设置。Front controller 的调用很简单:


<?php
require_once 'Zend/Controller/Front.php';
Zend_Controller_Front::getInstance()
    ->
setParam('useDefaultControllerAlways'true)
    ->
setControllerDirectory('../application/controllers')
    ->
dispatch();
?>


IndexController.php 在初始化的时候,需要初始化 AjaxContext Helper:


<?php
class IndexController extends Zend_Controller_Action
{
    public function 
init()
    {
        
$ajaxContext $this->_helper->getHelper('AjaxContext');
        
$ajaxContext->addActionContext('demo''html')                     ->initContext();
    }
    
    public function 
indexAction()
    {
    }
    
    public function 
demoAction()
    {
        
$this->view->hello 'Hello, world! ('.date('H:i:s').')';
    }
}


addActionContext('demo', 'html') 表明 demoAction 为 AJAX 调用的 action,格式为 html。除了 html 之外,还支持 xml、json 等。AJAX 请求时需要给请求的 url 加上 format=html 的 GET 参数。indexAction 对应的视图 index.phtml 代码如下:


<html>
<head>
<title>AJAX DEMO</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript" src="<?=$this->url()?>js/jquery.js"></script>
<script type="text/javascript">
$(document).ready(function(){
    $('#ajax_button').click(function(){ //#ajax_button 的 onclick 事件触发
        var url = '<?=$this->url(array('controller'=>'index','action'=>'demo'))?>'; //AJAX 请求的目标 URL
        $.get(url, {'format':'html'}, function(data){ //这里传递了 format=html 的 GET 参数
            $('#hello_message').html(data); //将 AJAX 返回的内容显示在 #hello_message 里边
        });
    });
});
</script>
</head>

<body>
<p><input type="button" id="ajax_button" value="AJAX Call" />
<p id="hello_message"><p>
</body>

</html>


demoAction 对应的视图 demo.ajax.phtml 内容很简单,只是输出 $hello:


<?=$this->hello?>

Zend Framework 还提供了 autocomplete(自动完成)AJAX 的 action helper:Zend_Controller_Action_Helper_AutoCompleteScriptaculousZend_Controller_Action_Helper_AutoCompleteDojo,一个是 for Scriptaculous 的,另一个是 for Dojo 的。
Picasa 2.7 for Linux正式版下载
Posted in LAMP on April 17, 2008 / 评论(0) »

Picasa 2.7 for Linux的上一版本是2.2,当前最新版本是2.7,功能升级显而易见了。
官方更新说明:
* Upload to Picasa Web Albums
Use the new “Web Album” button to post your best photos online to share with friends and family.
* Download from Picasa Web Albums
Download albums from Picasa Web Albums directly into Picasa using Firefox.
* Save edits to disk
Save edits, undo saves, and revert to the original file with ease. We’ve got batch saving too! Picasa will even match the jpeg quality of the original. Right-click on your saved files to try the new “locate original” feature.
* Folder hierarchy views
Browse through folders Explorer-style. Use the button at the top of your Albums List to try them out.
* Improvements to Import
Import into an existing folder- we know you’ve wanted this feature for a long time! We’ve made importing photos from your camera faster too.
* Better RAW support
Now you can work with RAW files from the Canon 30D, the Nikon D200, Adobe DNG files, and more.
* Internationalization Improvements
Enable support for non-english languages.
* Many other enhancements
Larger thumbnails, better caption editing, ability to configure the row of buttons, special “Starred Photos” album, search by ISO and focal length.

前几天发现Picasa 2.7 for Linux的beta版本不能上传图片,但这个正式版是没问题了:

上传图片:



软件界面:



制作个性拼贴:



下载Picasa 2.7 for Linux正式版:

.rpm包(适用于32位和64位的Red Hat/Fedora/Suse/Mandriva x86系统)
http://picasa.google.com/linux/thanks-rpm.html

32位的Ubuntu deb包:
http://picasa.google.com/linux/thanks-deb.html

64位的Ubuntu deb包:
http://picasa.google.com/linux/thanks-deb64.html

分页: 3/8 第一页 上页 1 2 3 4 5 6 7 8 下页 最后页 [ 显示模式: 摘要 | 列表 ]