<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Movoin Studio</title>
	<atom:link href="http://www.movoin.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.movoin.com</link>
	<description>专注Web开发, Python和Php技术 &#38;&#38; 关注开源及移动应用</description>
	<lastBuildDate>Wed, 14 Dec 2011 04:02:54 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>笔记本共享本地连接为Wifi信号</title>
		<link>http://www.movoin.com/internet-to-wifi.html</link>
		<comments>http://www.movoin.com/internet-to-wifi.html#comments</comments>
		<pubDate>Mon, 04 Jul 2011 07:16:25 +0000</pubDate>
		<dc:creator>Allen</dc:creator>
				<category><![CDATA[技巧整理]]></category>
		<category><![CDATA[Wifi]]></category>

		<guid isPermaLink="false">http://www.movoin.com/?p=91</guid>
		<description><![CDATA[网上有很多类似标题的文章，大多是讲手机连接上电脑，让电脑通过手机上网，这个太贵了吧！！！现在谁家里没网线，至于那么干吗？ 其实我说这句话的时候，自己都觉得惭愧，因为我家就没网线，只有一个电信3G上网卡，100块包60个小时。PS：上个月还没用完，浪费了一半时间，伤不起呀！ 说明一下，这种方法可以适用范围有： 1，有线连接转Wifi信号； 2，3G上网信号转Wifi信号。 以上两种是我亲测的，3G上网环境是当我回到花场时用的；而有线连接环境是我在公司用的，公司的无线路由在另外的办公室，离我办公室很远，信号非常的差~~~ 步骤如下： 1，开始菜单中搜索cmd，最好把它发送到桌面快捷方式，因为需要用管理员权限。 2，用管理员权限打开cmd，输入第一条命令： netsh wlan set hostednetwork mode=allow 3，接着，就是下面这条命令： netsh wlan set hostednetwork ssid=AllenWifi key=1234567890 （ssid=Wifi连接名称 key=密码） 4，确定你笔记本上的无线网卡已经开启后，输入这条命令： netsh wlan start hostednetwork &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;> 华丽的分割线 < OK，到这里就已经算是完成了90%了。 5，点击右下角的网卡图标，打开“打开网络和共享中心”，如无意外，你应该可以看到你刚刚建立的“AllenWifi”和“本地连接”。如果看不到那下面的你就不用弄了，也不用来问我，因为我也闹不明白！ （此时你所看到的AllenWifi还是无Internet状态） 6，点击“本地连接” -> “属性” -> “共享”，在“家庭网络连接”中选择“AllenWifi”对应的适配器名称（如：无线网络连接 2），再勾选上面的复选框，确定。 此时回到“打开网络和共享中心”，你应该可以看到你的“AllenWifi”已经是Internet了。 打开你手机或用其它笔记本搜索一下网络试试吧！ 既然来了，也许你也会想看一下：看来这是个孤独的家伙！]]></description>
			<content:encoded><![CDATA[<p>网上有很多类似标题的文章，大多是讲手机连接上电脑，让电脑通过手机上网，这个太贵了吧！！！现在谁家里没网线，至于那么干吗？<br />
其实我说这句话的时候，自己都觉得惭愧，因为我家就没网线，只有一个电信3G上网卡，100块包60个小时。PS：上个月还没用完，浪费了一半时间，伤不起呀！</p>
<p>说明一下，这种方法可以适用范围有：</p>
<blockquote><p>
1，有线连接转Wifi信号；<br />
2，3G上网信号转Wifi信号。
</p></blockquote>
<p>以上两种是我亲测的，3G上网环境是当我回到花场时用的；而有线连接环境是我在公司用的，公司的无线路由在另外的办公室，离我办公室很远，信号非常的差~~~</p>
<p>步骤如下：</p>
<p>1，开始菜单中搜索cmd，最好把它发送到桌面快捷方式，因为需要用管理员权限。<br />
2，用管理员权限打开cmd，输入第一条命令：</p>
<pre name="code" class="sh_shell" linenum="off">netsh wlan set hostednetwork mode=allow</pre>
<p>3，接着，就是下面这条命令：</p>
<pre name="code" class="sh_shell" linenum="off">netsh wlan set hostednetwork ssid=AllenWifi key=1234567890</pre>
<p>（ssid=Wifi连接名称 key=密码）</p>
<p>4，确定你笔记本上的无线网卡已经开启后，输入这条命令：</p>
<pre name="code" class="sh_shell" linenum="off">netsh wlan start hostednetwork</pre>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;> 华丽的分割线 < OK，到这里就已经算是完成了90%了。</p>
<p>5，点击右下角的网卡图标，打开“打开网络和共享中心”，如无意外，你应该可以看到你刚刚建立的“AllenWifi”和“本地连接”。如果看不到那下面的你就不用弄了，也不用来问我，因为我也闹不明白！<br />
（此时你所看到的AllenWifi还是无Internet状态）</p>
<p>6，点击“本地连接” -> “属性” -> “共享”，在“家庭网络连接”中选择“AllenWifi”对应的适配器名称（如：无线网络连接 2），再勾选上面的复选框，确定。</p>
<p>此时回到“打开网络和共享中心”，你应该可以看到你的“AllenWifi”已经是Internet了。</p>
<p>打开你手机或用其它笔记本搜索一下网络试试吧！</p>
<script type="text/javascript" src="/wp-content/plugins/shjs-syntax-hiliter/shjs/lang/sh_shell.js"></script><script type="text/javascript" src="/wp-content/plugins/shjs-syntax-hiliter/shjs/lang/sh_shell.js"></script><script type="text/javascript" src="/wp-content/plugins/shjs-syntax-hiliter/shjs/lang/sh_shell.js"></script><h3  class="related_post_title">既然来了，也许你也会想看一下：</h3><ul class="related_post"><li>看来这是个孤独的家伙！</li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.movoin.com/internet-to-wifi.html/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>PHP抓取天气预报</title>
		<link>http://www.movoin.com/php-weather-class.html</link>
		<comments>http://www.movoin.com/php-weather-class.html#comments</comments>
		<pubDate>Fri, 06 May 2011 07:58:26 +0000</pubDate>
		<dc:creator>Allen</dc:creator>
				<category><![CDATA[程序开发]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[爬虫]]></category>

		<guid isPermaLink="false">http://www.movoin.com/?p=89</guid>
		<description><![CDATA[最近遇到个项目，客户非要加个天气预报功能，还提出要求最少显示三天。到网上找了很多挂件都无法找到满足要求的，这可让老夫如何是好~~~于是乎被逼无耐下，自己写了这个抓取类。 主要功能只是将所须省市的七天的天气抓取下来，目前我这个项目中应用了缓存，但因为是FLEA的缓存机制，所以把代码贴出来对不使用FLEA的同学完全没有帮助，所以就省了点代码。 关于缓存方面，我个人比较倾向于按你读取的天数来确定缓存时间，比如：你一次只显示今天和明天的，那抓取来的七天数据就可以使用六次，直到七天数据用完的时候才需要重新抓取。 如图： 这样处理缓存我个人觉得比较划算，呵呵。 [PS]: 贴代码是个辛苦活，记得以前有些几个网站是可以分享代码片段的，但忘了名字，有同学愿意告诉一下我吗？ 先上源码： &#60;?php class Model_Weather { private $_server = 'http://qq.ip138.com'; private $_ext = '.htm'; private $_province; private $_city; function __construct($province='guangdong', $city='zhongshan') { $this-&#62;_province = $province; $this-&#62;_city = $city; } function setServer($server) { $this-&#62;_server = $server; } function setProvince($province) { $this-&#62;_province = $province; } function setCity($city) { $this-&#62;_city = $city; [...]]]></description>
			<content:encoded><![CDATA[<p>最近遇到个项目，客户非要加个天气预报功能，还提出要求最少显示三天。到网上找了很多挂件都无法找到满足要求的，这可让老夫如何是好~~~于是乎被逼无耐下，自己写了这个抓取类。</p>
<p>主要功能只是将所须省市的七天的天气抓取下来，目前我这个项目中应用了缓存，但因为是FLEA的缓存机制，所以把代码贴出来对不使用FLEA的同学完全没有帮助，所以就省了点代码。</p>
<p>关于缓存方面，我个人比较倾向于按你读取的天数来确定缓存时间，比如：你一次只显示今天和明天的，那抓取来的七天数据就可以使用六次，直到七天数据用完的时候才需要重新抓取。</p>
<p>如图：<a href="http://www.movoin.com/wp-content/uploads/2011/05/cache.jpg"><img src="http://www.movoin.com/wp-content/uploads/2011/05/cache-300x125.jpg" alt="cache 300x125 PHP抓取天气预报" title="PHP抓取天气预报" width="300" height="125" class="alignnone size-medium wp-image-90" /></a></p>
<p>这样处理缓存我个人觉得比较划算，呵呵。</p>
<p>[PS]: <strong>贴代码是个辛苦活，记得以前有些几个网站是可以分享代码片段的，但忘了名字，有同学愿意告诉一下我吗？</strong></p>
<p><span id="more-89"></span><br />
<strong>先上源码：</strong></p>
<pre name="code" class="sh_php" linenum="off">&lt;?php
class Model_Weather
{
    private $_server = 'http://qq.ip138.com';
    private $_ext = '.htm';
    private $_province;
    private $_city;

    function __construct($province='guangdong', $city='zhongshan')
    {
        $this-&gt;_province = $province;
        $this-&gt;_city = $city;
    }

    function setServer($server)
    {
        $this-&gt;_server = $server;
    }

    function setProvince($province)
    {
        $this-&gt;_province = $province;
    }

    function setCity($city)
    {
        $this-&gt;_city = $city;
    }

    function setExt($ext)
    {
        $this-&gt;_ext = $ext;
    }

    function getPageLink()
    {
        return $this-&gt;_server . '/weather/' .
               $this-&gt;_province . '/' .
               $this-&gt;_city .
               $this-&gt;_ext;
    }

    function getIconLink($icon)
    {
        return $this-&gt;_server . $icon;
    }

    // 最好是使用缓存，不然比较废时。
    function fetch($display = 3)
    {
        $weather = $this-&gt;_fetch();

        for ($i=0; $i&lt;$display; $i++)
        {
            $return[] = $weather[$i];
        }

        return $return;
    }

    function _fetch()
    {
        $content = $this-&gt;fopen_url($this-&gt;getPageLink());
        $match = $this-&gt;find(&quot;&lt;table width=\&quot;700\&quot; borderColorDark=\&quot;#ffffff\&quot; borderColorLight=\&quot;#008000\&quot; border=\&quot;1\&quot; cellspacing=\&quot;0\&quot; cellpadding=\&quot;1\&quot; align=\&quot;center\&quot;&quot;, &quot;table&gt;&quot;, $content);

        $table = $this-&gt;findAll(&quot;&lt;tr&quot;, &quot;tr&gt;&quot;, $match);

        $dates = $this-&gt;getDate($table[0]);
        $icons = $this-&gt;getIcons($table[1]);
        $temperatures = $this-&gt;getTemperature($table[2]);

        foreach ($dates as $i =&gt; $date)
        {
            $return[$i] = array(
                'date' =&gt; explode(' ', $date),
                'icons' =&gt; $icons[$i],
                'temperature' =&gt; $temperatures[$i],
            );
        }

        return $return;
    }

    // 日期
    function getDate($table)
    {
        $dates = $this-&gt;findAll(&quot;&lt;th class=\&quot;tdc1\&quot; style=\&quot;white-space:nowrap;\&quot;&quot;, &quot;td&gt;&quot;, $table);
        return array_map('strip_tags', $dates);
    }

    // 天气图标及文字
    function getIcons($table)
    {
        $tds = $this-&gt;findAll(&quot;&lt;td&quot;, &quot;td&gt;&quot;, $table);

        array_shift($tds);
        foreach ($tds as $i =&gt; $td)
        {
            $t = explode('&lt;br/&gt;', $td);
            $r1 = &quot;/src=\&quot;(.*?)\&quot;/is&quot;;
            preg_match_all($r1, $t[0], $icons);
            $icon = array_map(array($this, 'getIconLink'), $icons[1]);
            $rows[$i] = array(
                'text' =&gt; strip_tags($t[1]),
                'images' =&gt; $icon
            );
        }

        return $rows;
    }

    // 气温
    function getTemperature($table)
    {
        $dates = $this-&gt;findAll(&quot;&lt;td&quot;, &quot;td&gt;&quot;, $table);
        array_shift($dates);
        return array_map('strip_tags', $dates);
    }

    function find($begin, $end, $content)
    {
        $match = '';
        $r = &quot;/{$begin}(.*?){$end}/is&quot;;
        preg_match($r, $content, $match);

        return $match[0];
    }

    function findAll($begin, $end, $content)
    {
        $matchs = '';
        $r = &quot;/{$begin}(.*?){$end}/is&quot;;
        preg_match_all($r, $content, $matchs);

        return $matchs[0];
    }

    function fopen_url($url)
    {
        if (function_exists('file_get_contents')) {
            $file_content = @file_get_contents($url);
        } elseif (ini_get('allow_url_fopen') &amp;&amp; ($file = @fopen($url, 'rb'))) {
            $i = 0;
            while (!feof($file) &amp;&amp; $i++ &lt; 1000) {
                $file_content .= strtolower(fread($file, 4096));
            }
            fclose($file);
        } elseif (function_exists('curl_init')) {
            $curl_handle = curl_init();
            curl_setopt($curl_handle, CURLOPT_URL, $url);
            curl_setopt($curl_handle, CURLOPT_CONNECTTIMEOUT,2);
            curl_setopt($curl_handle, CURLOPT_RETURNTRANSFER,1);
            curl_setopt($curl_handle, CURLOPT_FAILONERROR,1);
            curl_setopt($curl_handle, CURLOPT_USERAGENT, 'Trackback Spam Check'); //引用垃圾邮件检查
            $file_content = curl_exec($curl_handle);
            curl_close($curl_handle);
        } else {
            $file_content = '';
        }
        return iconv(&quot;gb2312&quot;, &quot;utf-8&quot;,$file_content);
    }

}
?&gt;</pre>
<p><strong>返回数据结构：</strong></p>
<pre name="code" class="sh_php" linenum="off">Array
(
    [0] => Array
        (
            [date] => Array
                (
                    [0] => 2011-5-6
                    [1] => 星期五
                )
            [icons] => Array
                (
                    [text] => 阴
                    [images] => Array
                        (
                            [0] => http://qq.ip138.com/image/b2.gif
                        )
                )
            [temperature] => 27℃～22℃
        )
    [1] => Array
        (
            [date] => Array
                (
                    [0] => 2011-5-7
                    [1] => 星期六
                )
            [icons] => Array
                (
                    [text] => 多云
                    [images] => Array
                        (
                            [0] => http://qq.ip138.com/image/b1.gif
                        )
                )
            [temperature] => 29℃～22℃
        )
    [2] => Array
        (
            [date] => Array
                (
                    [0] => 2011-5-8
                    [1] => 星期日
                )
            [icons] => Array
                (
                    [text] => 多云
                    [images] => Array
                        (
                            [0] => http://qq.ip138.com/image/b1.gif
                        )
                )
            [temperature] => 30℃～23℃
        )
    [3] => Array
        (
            [date] => Array
                (
                    [0] => 2011-5-9
                    [1] => 星期一
                )
            [icons] => Array
                (
                    [text] => 阵雨
                    [images] => Array
                        (
                            [0] => http://qq.ip138.com/image/b3.gif
                        )
                )
            [temperature] => 29℃～21℃
        )
    [4] => Array
        (
            [date] => Array
                (
                    [0] => 2011-5-10
                    [1] => 星期二
                )
            [icons] => Array
                (
                    [text] => 阵雨转多云
                    [images] => Array
                        (
                            [0] => http://qq.ip138.com/image/b3.gif
                            [1] => http://qq.ip138.com/image/b1.gif
                        )
                )
            [temperature] => 27℃～21℃
        )
    [5] => Array
        (
            [date] => Array
                (
                    [0] => 2011-5-11
                    [1] => 星期三
                )
            [icons] => Array
                (
                    [text] => 多云
                    [images] => Array
                        (
                            [0] => http://qq.ip138.com/image/b1.gif
                        )
                )
            [temperature] => 28℃～21℃
        )
    [6] => Array
        (
            [date] => Array
                (
                    [0] => 2011-5-12
                    [1] => 星期四
                )
            [icons] => Array
                (
                    [text] => 多云
                    [images] => Array
                        (
                            [0] => http://qq.ip138.com/image/b1.gif
                        )
                )
            [temperature] => 28℃
        )
)</pre>
<script type="text/javascript" src="/wp-content/plugins/shjs-syntax-hiliter/shjs/lang/sh_php.js"></script><script type="text/javascript" src="/wp-content/plugins/shjs-syntax-hiliter/shjs/lang/sh_php.js"></script><h3  class="related_post_title">既然来了，也许你也会想看一下：</h3><ul class="related_post"><li>2011/03/23 -- <a href="http://www.movoin.com/yii-framework-source-code-to-read-notes-1.html" title="Yii Framework 源码阅读笔记(述)">Yii Framework 源码阅读笔记(述)</a></li><li>2011/01/18 -- <a href="http://www.movoin.com/python-devel-spider.html" title="Python编写蜘蛛/爬虫">Python编写蜘蛛/爬虫</a></li><li>2010/12/09 -- <a href="http://www.movoin.com/fleaphp-in-php5-3.html" title="FLEAPHP运行在PHP5.3+上的报错的解决办法">FLEAPHP运行在PHP5.3+上的报错的解决办法</a></li><li>2010/11/24 -- <a href="http://www.movoin.com/my-confusion.html" title="我最近的困惑">我最近的困惑</a></li><li>2010/08/20 -- <a href="http://www.movoin.com/ckeditor-and-ckfinder-tips.html" title="CKEditor + CKFinder 整合笔记">CKEditor + CKFinder 整合笔记</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.movoin.com/php-weather-class.html/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Yii Framework 源码阅读笔记(述)</title>
		<link>http://www.movoin.com/yii-framework-source-code-to-read-notes-1.html</link>
		<comments>http://www.movoin.com/yii-framework-source-code-to-read-notes-1.html#comments</comments>
		<pubDate>Wed, 23 Mar 2011 08:58:39 +0000</pubDate>
		<dc:creator>Allen</dc:creator>
				<category><![CDATA[程序开发]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Yii]]></category>
		<category><![CDATA[框架]]></category>

		<guid isPermaLink="false">http://www.movoin.com/?p=87</guid>
		<description><![CDATA[做PHP也蛮多年了，一直对国产各类系统、平台的二次开发不太感冒，主要都在研究一些框架自制系统、开放平台等。 学习过CakePHP、CI、FleaPHP、QeePHP、ThinkPHP及Zend Framework，有些只是浅尝即止——指遇到一丁点不爽就放弃这个框架。 1. CI不用说，太简单了，框架风格让我不爽，虽然我也信奉&#8221;Simple is better&#8221;，但是也不等于可以&#8221;升级&#8221;成&#8221;Simple is Simple&#8221;吧，我需要较强的定制性，而不是在你的XXOO里打混。 2. CakePHP很帅气，也很好用，但由于种种原因没有继续尝试。 3. FleaPHP是我用的最久的一套框架，直到我用到需要修改框架源码才放弃。 4. QeePHP是我觉得比较杯具的一套框架，瘳老板在开始时说的噼里啪啦的，可到执行时就扑哧扑哧没下文了。对它最不满的是文档，也不喜欢其社区的氛围，可能是什么样的老大会培养出什么样的小弟吧，瘳老板没事就在phpchina上和ThinkPHP的谁谁谁干上几场。所以社区里的小弟们也一个个的在各种条件下讨论哪个框架更好，真是没完没了。 5. ThinkPHP只是看过文档及小部分源码，不喜欢这种方式来编程，不再言语了。 6. Zend Framework，很牛叉即使你不使用它也能够从分析其源码中得到非常大的收获，是一个PHP5的标准源码示例库，但要用它嘛~~~我要再考虑考虑，我一个项目加上所有文件不过2M，你的框架就XXOO，太乳酸了~~~ OK，放屁到此结束！ 其实尝试过的框架已经不记得有多少了，也不是一两百字就可以带过的，上面的就是个意思，全当放屁就行了，下面的才是正文。 知道Yii还是在Qeephp的社区，那时的我正在热切的期盼着QeePHP的诞生，在这个过程中老瘳突然做起了调查，主要是问大家喜欢什么样的文档手册，并给出了参考，参考的就是YiiFramework，真是无语。 开始时我也只是把注意力放在它的文档上，连跑个Demo都没试过。现在回想起来是多么的不应该呀，为了一团浮云而错过了驾驭一匹神马的机会。直到近期才抽时间去看源码，世界立即完全不同了。 Yii的文档做得很不错，但我觉得还是不够详尽，想要更好的学习还是要从源码开始。但了解框架的结构还是足够了，想要更深入的学习框架本身则需要读懂它的源码。 接下来就是动手(动眼)阅读代码了&#8230; {EOF} 既然来了，也许你也会想看一下：2010/12/09 -- FLEAPHP运行在PHP5.3+上的报错的解决办法2011/05/06 -- PHP抓取天气预报2010/11/24 -- 我最近的困惑2010/10/18 -- 手机应用的HTML5 JavaScript框架2010/09/07 -- 10款基于Html的移动应用开发框架2010/08/20 -- CKEditor + CKFinder 整合笔记]]></description>
			<content:encoded><![CDATA[<p>做PHP也蛮多年了，一直对国产各类系统、平台的二次开发不太感冒，主要都在研究一些框架自制系统、开放平台等。</p>
<p>学习过CakePHP、CI、FleaPHP、QeePHP、ThinkPHP及Zend Framework，有些只是浅尝即止——指遇到一丁点不爽就放弃这个框架。</p>
<p>1. CI不用说，太简单了，框架风格让我不爽，虽然我也信奉&#8221;Simple is better&#8221;，但是也不等于可以&#8221;升级&#8221;成&#8221;Simple is Simple&#8221;吧，我需要较强的定制性，而不是在你的XXOO里打混。<br />
2. CakePHP很帅气，也很好用，但由于种种原因没有继续尝试。<br />
3. FleaPHP是我用的最久的一套框架，直到我用到需要修改框架源码才放弃。<br />
4. QeePHP是我觉得比较杯具的一套框架，瘳老板在开始时说的噼里啪啦的，可到执行时就扑哧扑哧没下文了。对它最不满的是文档，也不喜欢其社区的氛围，可能是什么样的老大会培养出什么样的小弟吧，瘳老板没事就在phpchina上和ThinkPHP的谁谁谁干上几场。所以社区里的小弟们也一个个的在各种条件下讨论哪个框架更好，真是没完没了。<br />
5. ThinkPHP只是看过文档及小部分源码，不喜欢这种方式来编程，不再言语了。<br />
6. Zend Framework，很牛叉即使你不使用它也能够从分析其源码中得到非常大的收获，是一个PHP5的标准源码示例库，但要用它嘛~~~我要再考虑考虑，我一个项目加上所有文件不过2M，你的框架就XXOO，太乳酸了~~~</p>
<p>OK，放屁到此结束！</p>
<p>其实尝试过的框架已经不记得有多少了，也不是一两百字就可以带过的，上面的就是个意思，全当放屁就行了，下面的才是正文。</p>
<p>知道Yii还是在Qeephp的社区，那时的我正在热切的期盼着QeePHP的诞生，在这个过程中老瘳突然做起了调查，主要是问大家喜欢什么样的文档手册，并给出了参考，参考的就是YiiFramework，真是无语。</p>
<p>开始时我也只是把注意力放在它的文档上，连跑个Demo都没试过。现在回想起来是多么的不应该呀，为了一团浮云而错过了驾驭一匹神马的机会。直到近期才抽时间去看源码，世界立即完全不同了。</p>
<p>Yii的文档做得很不错，但我觉得还是不够详尽，想要更好的学习还是要从源码开始。但了解框架的结构还是足够了，想要更深入的学习框架本身则需要读懂它的源码。</p>
<p>接下来就是动手(动眼)阅读代码了&#8230;</p>
<p>{EOF}</p>
<h3  class="related_post_title">既然来了，也许你也会想看一下：</h3><ul class="related_post"><li>2010/12/09 -- <a href="http://www.movoin.com/fleaphp-in-php5-3.html" title="FLEAPHP运行在PHP5.3+上的报错的解决办法">FLEAPHP运行在PHP5.3+上的报错的解决办法</a></li><li>2011/05/06 -- <a href="http://www.movoin.com/php-weather-class.html" title="PHP抓取天气预报">PHP抓取天气预报</a></li><li>2010/11/24 -- <a href="http://www.movoin.com/my-confusion.html" title="我最近的困惑">我最近的困惑</a></li><li>2010/10/18 -- <a href="http://www.movoin.com/html5-javascript-framework-for-mobile-applications.html" title="手机应用的HTML5 JavaScript框架">手机应用的HTML5 JavaScript框架</a></li><li>2010/09/07 -- <a href="http://www.movoin.com/10-useful-frameworks-to-develop-html-based-webapps-for-touch-devices.html" title="10款基于Html的移动应用开发框架">10款基于Html的移动应用开发框架</a></li><li>2010/08/20 -- <a href="http://www.movoin.com/ckeditor-and-ckfinder-tips.html" title="CKEditor + CKFinder 整合笔记">CKEditor + CKFinder 整合笔记</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.movoin.com/yii-framework-source-code-to-read-notes-1.html/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Python编写蜘蛛/爬虫</title>
		<link>http://www.movoin.com/python-devel-spider.html</link>
		<comments>http://www.movoin.com/python-devel-spider.html#comments</comments>
		<pubDate>Tue, 18 Jan 2011 01:48:55 +0000</pubDate>
		<dc:creator>Allen</dc:creator>
				<category><![CDATA[程序开发]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[爬虫]]></category>

		<guid isPermaLink="false">http://www.movoin.com/?p=83</guid>
		<description><![CDATA[我目前住在女友家的花场（种花木的花木基地，空气清新并夹杂着混合了泥土味的阵阵猪屎气息，绝对的有益身心），只是美中不足的地方是，由于地方较为偏僻没办法上网。虽然可以通过无线3G上网，但是上网价格明显和工资水平不是一个级别，暂时不考虑。 再说，在花场大部分时间我都不需要用到网络，因为我会把需要用到网络的工作留在公司做，而不需要用到网络的工作才带回花场（比如：设计类、动画类、制作类等）。但有时设计也需要用到素材或是参考一下别的设计的时候，素材倒好办，买DVD或是到电驴上下载回来就行。可是参考设计这个就没有了，于是我就有了一个念头，就是写个爬虫把常用的一些界面设计全部下载到本机来。 非线程版本： #!/usr/bin/python # -*- coding: utf-8 -*- import os, sys import urllib import urllib2 import re from BeautifulSoup import BeautifulSoup import chardet import datetime get_charset = lambda html: chardet.detect(html) abspath = os.path.dirname(__file__) class FC(object): _base_url_ = None _list_params_ = None _urls_ = None _html_ = None _start_page_ = 1 _end_page_ = 1 _current_page_ [...]]]></description>
			<content:encoded><![CDATA[<blockquote><p>我目前住在女友家的花场（种花木的花木基地，空气清新并夹杂着混合了泥土味的阵阵猪屎气息，绝对的有益身心），只是美中不足的地方是，由于地方较为偏僻没办法上网。虽然可以通过无线3G上网，但是上网价格明显和工资水平不是一个级别，暂时不考虑。<br />
再说，在花场大部分时间我都不需要用到网络，因为我会把需要用到网络的工作留在公司做，而不需要用到网络的工作才带回花场（比如：设计类、动画类、制作类等）。但有时设计也需要用到素材或是参考一下别的设计的时候，素材倒好办，买DVD或是到电驴上下载回来就行。可是参考设计这个就没有了，于是我就有了一个念头，就是写个爬虫把常用的一些界面设计全部下载到本机来。</p></blockquote>
<p><span id="more-83"></span></p>
<h2>非线程版本：</h2>
<pre name="code" class="sh_python" linenum="off">#!/usr/bin/python
# -*- coding: utf-8 -*-

import os, sys
import urllib
import urllib2
import re

from BeautifulSoup import BeautifulSoup
import chardet

import datetime

get_charset = lambda html: chardet.detect(html)

abspath = os.path.dirname(__file__)

class FC(object):

    _base_url_ = None
    _list_params_ = None

    _urls_ = None
    _html_ = None

    _start_page_ = 1
    _end_page_ = 1
    _current_page_ = 1

    _soup = None

    _begin_time_ = None

    _download_dir_ = 'downloads/'
    _download_list_ = {}

    def __init__(self, base_url, list_param, set_end_page = None):
        """
        构造函数
        """
        self._begin_time_ = datetime.datetime.now()

        self.logging(u'开始运行...')

        (self._base_url_, self._list_params_) = (base_url, list_param)

        if set_end_page == None and set_end_page > 0:
            self.setEndPage()
        else:
            self._end_page_ = int(set_end_page)
            self.logging(u'手动设置列表分页总数为 %d 页...' % set_end_page)

        self.loadListPages()

    def __del__(self):
        """
        析构函数
        """
        self.logging(u'执行时间：%d 秒...' % (datetime.datetime.now() - self._begin_time_).seconds)
        self.logging(u'结束运行...')

    def nextPage(self):
        """
        当前页面递加 1
        """
        self._current_page_ = self._current_page_ + 1

    def setEndPage(self):
        """
        设置列表分页总数
        """
        self.logging(u'获得并设置列表分页总数...')

        html = self.fetchHtml(self.getFirstPageLink())

        pager = self._soup.find('td', attrs={'align': 'center', 'bgcolor': '#FFFFFF', 'class': 't14'}).renderContents()

        if pager:
            href = BeautifulSoup(pager).findAll('a')[-1]['href']

            try:
                count = re.search('\d{2}', href).group()
            except:
                self.logging('Can not fetch pages count!', 'ERROR')

            self._end_page_ = int(count)
        self.logging(u'总共 %d 页...' % self._end_page_)

    def loadListPages(self):
        """
        载入页面列表
        """
        self._urls_ = [(self._base_url_ + (self._list_params_ % i)) for i in range(self._start_page_, (self._end_page_ + 1))]

        self.logging(u'获得所有列表页面URL...')

    def getFirstPageLink(self):
        """
        获得第一页的链接
        """
        return self._base_url_ + (self._list_params_ % self._start_page_)

    def getPageLink(self, page):
        """
        获得页面链接
        """
        return self._base_url_ + page

    def fetchAll(self):
        """
        分析列表
        """
        self.logging(u'开始分析列表...')

        if self._urls_:
            for url in self._urls_:
                self.fetchListHtml(url)
                self.getImgList()
                self.logging(u'分析第 %d 页完成，执行时间：%d 秒...' % (self._current_page_, (datetime.datetime.now() - self._begin_time_).seconds))

                self.nextPage()

                self.logging(u'-----------------------------------------------', 'LINE')
        else:
            self.logging(u'列表堆栈为空，无法分析...', 'WAITTING')

        # 开始下载
        # if self._download_list_:
            # self.logging(u'开始下载图片...')

            # for title in self._download_list_.keys():
                # self.download(self._download_list_[title], title)

        # self.logging(u'下载完成...')

    def fetchListHtml(self, url):
        """
        获得列表页HTML
        """
        self._soup = None

        self.logging(u'开始采集第 %d 页的数据...' % self._current_page_)

        try:
            html = urllib.urlopen(url).read()
            self._soup = BeautifulSoup(html, fromEncoding='utf-8')
            self._html_ = self._soup.find('table',  attrs={'width': '96%', 'bgcolor': '#efefef', 'cellspacing': '0', 'cellpadding': '0', 'border': '0'}).prettify()
            self._html_ = self._encoding(self._html_)
        except:
            self.logging(u'采集 %s 的数据失败...' % url, 'WAITTING')

        html = None
        return self._html_

    def fetchHtml(self, url, is_prettify = True):
        """
        获得页面HTML
        """
        self._soup = None

        self.logging(u'抓取 %s 的数据...' % url)

        try:
            html = self.fetch(url)
            self._soup = BeautifulSoup(html, fromEncoding='utf-8')
            if is_prettify:
                self._html_ = self._soup.prettify()
                self._html_ = self._encoding(self._html_)
            else:
                self._html_ = self._soup
        except:
            self.logging(u'采集 %s 的数据失败...' % url, 'WAITTING')

        html = None
        return self._html_

    def fetch(self, url):
        """
        获取内容
        """
        try:
            opener = urllib2.build_opener(urllib2.HTTPHandler)
            opener.addheaders = [('User-agent', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; zh-CN; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3')]
            opener.addheaders = [('Referer', 'http://www.68design.net/')]
            urllib2.install_opener(opener)
            response = urllib2.urlopen(url)

            return response.read()
        except:
            self.logging(u'采集 %s 的数据失败...' % url, 'WAITTING')

    def getImgList(self):
        """
        获得图片列表
        """
        self.logging(u'开始获取第 %d 页的图片URL...' % self._current_page_)

        try:
            tables = self._soup.findAll('table', attrs={'width': '116', 'align': 'center', 'cellspacing': '0', 'cellpadding': '0', 'border': '0'})
        except:
            self.logging(u'获取失败...', 'WAITTING')

        if tables:
            self.logging(u'总共获得 %s 条地址' % len(tables))

            for table in tables:
                link = table.find('a', attrs={'class': 'a04'})['href']

                """
                获得列表中的图片
                """
                page = self.fetchHtml(self.getPageLink(link), False)

                try:
                    # 标题
                    title = page.find('td', attrs={'height': '65', 'align': 'center', 'valign': 'bottom', 'class': 't25'}).contents[0]
                    self.logging(u'获取图片标题为 [%s]...' % title)
                    # 分页
                    pagerSoup = page.find('td', attrs={'align': 'center', 'class': 't14', 'width': None, 'height': None})
                except:
                    self.logging(u'获取图片标题失败...', 'WAITTING')

                links = self.getImgsPager(pagerSoup)

                if links:
                   imgList = [self.getPageLink(link)] + [self._base_url_ + link for link in links]
                else:
                   imgList = [self.getPageLink(link)]

                self._download_list_[title] = self.getImgs(imgList)

    def getImgs(self, links):
        """
        获得页面中的图片
        """
        imgs = []

        if links:
            for link in links:
                page = self.fetchHtml(link, False)

                try:
                    imgs.append(page.find('img', attrs={'onload': 'resizepic(this)'})['src'])
                except:
                    self.logging(u'获取图片地址失败...', 'WAITTING')

        return imgs

    def getImgsPager(self, pager = None):
        """
        获得列表中图片的内容分页列表
        """
        if pager:
            # 清除重复链接(下一页，上一页，尾页)
            return [str(link['href']) for link in pager.findAll('a') if re.search('[\d{1|2}]', link.string)]

        return None

    def download(self, lists, title):
        """
        下载图片文件
        """
        path = os.path.join(abspath, self._download_dir_, title)

        if title:
            if os.path.exists(path) == False:
                os.mkdir(path)

        if lists:
            for url in lists:
                try:
                    data = self.fetch(url)
                except:
                    self.logging(u'图片 %s 无法下载...' % url, 'WAITTING')

                suffix = url[-3:]
                filename = 'image-' + str(lists.index(url) + 1) + '.' + suffix

                try:
                    f = file(os.path.join(path, filename), 'wb')
                    f.write(data)
                    f.close()

                    self.logging(u'写入 [%s] 文件完成...' % filename)
                except:
                    self.logging(u'写入 [%s] 文件失败...' % filename, 'WAITTING')

    def _encoding(self, html):
        """
        转换编码
        """
        charset = get_charset(html)
        if charset['encoding'] == 'utf-8':
            html = unicode(html, 'utf-8', 'ignore').encode('gbk', 'ignore')

        return html

    def logging(self, msg, type = 'INFO'):
        """
        输出格式化日志
        """
        print '[%s] - %s (%s)' % (type, msg, datetime.datetime.now())

def main():
    fc = FC('http://www.68design.net/Appreciate/Interface/', 'list-%d.html', 1)
    fc.fetchAll()

    #lists = fc.getImgs(['http://www.68design.net/Appreciate/Interface/55303-1.html'])
    #fc.download(lists, 'hello')

if __name__ == '__main__':
    main()
</pre>
<h2>说明：</h2>
<p><strong>此程序依赖的包有</strong>：</p>
<ul>
<li><strong>BeautifulSoup</strong> &#8211; <a rel="nofollow" href="http://www.crummy.com/software/BeautifulSoup/documentation.zh.html" class="broken_link">http://www.crummy.com/software/BeautifulSoup/documentation.zh.html</a></li>
<li><strong>chardet</strong> &#8211; <span class="removed_link" title="http://chardet.feedparser.org/download/">http://chardet.feedparser.org/download/</span></li>
</ul>
<h2>结语：</h2>
<p>我测试爬完第一页用了260秒+(WLAN), 56秒+(LAN)，看来无线网卡掉包的厉害呀~~~</p>
<p>写得不好，请别见笑~~~</p>
<h2>{PS}</h2>
<p>其实我还有一个多线程版本，比这个要快一点，但还是觉得不够好，想做成GUI的。<br />
最主要的原因是，设计图片共94页，每页30组, 每组按平均5张图片计算，每张图片按我爬第一页的平均SIZE: 500Kb计算，就这样也超过4G的数据，以我无线网卡的能力要下载4G估计是很痛苦的事情。<br />
所以，必须要减少分析页面的次数，并可以哪停下哪，以配合我的上班时间。</p>
<p>{OVER}</p>
<script type="text/javascript" src="/wp-content/plugins/shjs-syntax-hiliter/shjs/lang/sh_python.js"></script><h3  class="related_post_title">既然来了，也许你也会想看一下：</h3><ul class="related_post"><li>2011/05/06 -- <a href="http://www.movoin.com/php-weather-class.html" title="PHP抓取天气预报">PHP抓取天气预报</a></li><li>2010/12/29 -- <a href="http://www.movoin.com/install-webpy-in-win7.html" title="Win7下配置web.py(apache+mod_wsgi+MySQLdb)">Win7下配置web.py(apache+mod_wsgi+MySQLdb)</a></li><li>2010/10/15 -- <a href="http://www.movoin.com/pygtk-treeview-display-pixbuf.html" title="PyGTK中Treeview显示Pixbuf图标">PyGTK中Treeview显示Pixbuf图标</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.movoin.com/python-devel-spider.html/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>10款顶级jQuery插件推荐</title>
		<link>http://www.movoin.com/top-10-best-free-jquery-plugin.html</link>
		<comments>http://www.movoin.com/top-10-best-free-jquery-plugin.html#comments</comments>
		<pubDate>Mon, 17 Jan 2011 03:17:11 +0000</pubDate>
		<dc:creator>Allen</dc:creator>
				<category><![CDATA[前端开发]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[插件]]></category>

		<guid isPermaLink="false">http://www.movoin.com/?p=82</guid>
		<description><![CDATA[jQuery由美国人John Resig创建，至今已吸引了来自世界各地的众多javascript高手加入其team，包括来自德国的J&#246;rn Zaefferer，罗马尼亚的Stefan Petre等等。jQuery是继prototype之后又一个优秀的Javascrīpt框架。其宗旨是——WRITE LESS,DO MORE,写更少的代码,做更多的事情。 1) zAccordion – 看名字就知道它是一个手风琴插件，它可以将图片以手风琴的方式展示。 2) jQuery Tiles &#8211; 这个插件很酷，它也是一个幻灯片插件，与其它的不同，它会把你的图片以不同大小的广块来展示局部而不是全部，感觉很时尚，配上Lightbox效果更好一些，另外，方块的位置和大小都是随机的哦。 3) Zoomable Images Gallery &#8211; 这是一个可以把图片列表变成展示墙的简单插件，图片可以点击缩放，图片放大后的效果很Vista，呵呵。 4) Slidesjs &#8211; 一个超级简单的幻灯片插件，可以自动循环播放、图片过渡效果、图片预加载，自动生成分页等。 5) Dashboard &#8211; 可以让你自定义皮肤的控制台插件。 6) Scalable Menu with jQuery CSS3 &#8211; 很酷的菜单插件哦！ 7) Automatic jQuery Slider Noir Squares &#8211; WOW Slider是一个拥有惊人的视觉效果，jQuery的幻灯片专业定制工具。 8 ) Factcha &#8211; 很有趣的验证码服务，用jQuery实现，可以让你的用户远离那些无聊的输入数字、字母、汉字的验证码。 9) Capty &#8211; 这个插件可以为你的图片加上标题（我的文字描述可能比较无趣，但效果还是挺好的）。 [...]]]></description>
			<content:encoded><![CDATA[<p>jQuery由美国人John Resig创建，至今已吸引了来自世界各地的众多javascript高手加入其team，包括来自德国的J&ouml;rn Zaefferer，罗马尼亚的Stefan Petre等等。jQuery是继prototype之后又一个优秀的Javascrīpt框架。其宗旨是——WRITE LESS,DO MORE,写更少的代码,做更多的事情。<br />
<span id="more-82"></span><br />
1) <a rel="nofollow" href="http://www.armagost.com/zaccordion/"><strong>zAccordion</strong></a> – 看名字就知道它是一个手风琴插件，它可以将图片以手风琴的方式展示。<br />
<a rel="nofollow" href="http://www.armagost.com/zaccordion/"><img src="http://www.webdesignish.com/wp-content/uploads/2011/01/zaccordion-e1294831387848.jpg" title="10款顶级jQuery插件推荐" alt="zaccordion e1294831387848 10款顶级jQuery插件推荐" /></a></p>
<p></p>
<p>2) <a rel="nofollow" href="http://romanovian.com/blog/jquery-tiles/"><strong>jQuery Tiles</strong></a> &#8211; 这个插件很酷，它也是一个幻灯片插件，与其它的不同，它会把你的图片以不同大小的广块来展示局部而不是全部，感觉很时尚，配上Lightbox效果更好一些，另外，方块的位置和大小都是随机的哦。<br />
<a rel="nofollow" href="http://romanovian.com/blog/jquery-tiles"><img src="http://www.webdesignish.com/wp-content/uploads/2011/01/jQuery-Tiles.jpg" title="10款顶级jQuery插件推荐" alt="jQuery Tiles 10款顶级jQuery插件推荐" /></a></p>
<p></p>
<p>3) <a rel="nofollow" href="http://www.htmldrive.net/items/show/752/simple-Zoomable-Images-Gallery-Called-jPhotoGrid-with-jQuery.html"><strong>Zoomable Images Gallery</strong></a> &#8211; 这是一个可以把图片列表变成展示墙的简单插件，图片可以点击缩放，图片放大后的效果很Vista，呵呵。<br />
<a rel="nofollow" href="http://www.htmldrive.net/items/show/752/simple-Zoomable-Images-Gallery-Called-jPhotoGrid-with-jQuery.html"><img src="http://www.htmldrive.net/media/2010/11/24/1290583486.jpg" title="10款顶级jQuery插件推荐" alt="1290583486 10款顶级jQuery插件推荐" /></a></p>
<p></p>
<p>4) <span class="removed_link" title="http://slidesjs.com/"><strong>Slidesjs</strong></span> &#8211; 一个超级简单的幻灯片插件，可以自动循环播放、图片过渡效果、图片预加载，自动生成分页等。<br />
<span class="removed_link" title="http://slidesjs.com/"><img src="http://www.webdesignish.com/wp-content/uploads/2011/01/slide-plugin-e1294831843849.jpg" title="10款顶级jQuery插件推荐" alt="slide plugin e1294831843849 10款顶级jQuery插件推荐" /></span></p>
<p></p>
<p>5) <a rel="nofollow" href="http://www.gxdeveloperweb.com/dashboardplugin/demo/dashboard.html"><strong>Dashboard</strong></a> &#8211; 可以让你自定义皮肤的控制台插件。<br />
<a rel="nofollow" href="http://www.gxdeveloperweb.com/dashboardplugin/demo/dashboard.html"><img src="http://www.webdesignish.com/wp-content/uploads/2011/01/dashboard-e1294832228891.jpg" title="10款顶级jQuery插件推荐" alt="dashboard e1294832228891 10款顶级jQuery插件推荐" /></a></p>
<p></p>
<p>6) <a rel="nofollow" href="http://www.htmldrive.net/items/show/756/Scalable-Menu-with-jQuery-CSS3.html"><strong>Scalable Menu with jQuery CSS3</strong></a> &#8211; 很酷的菜单插件哦！<br />
<a rel="nofollow" href="http://www.htmldrive.net/items/show/756/Scalable-Menu-with-jQuery-CSS3.html"><img src="http://www.webdesignish.com/wp-content/uploads/2011/01/scalable-menu.jpg" title="10款顶级jQuery插件推荐" alt="scalable menu 10款顶级jQuery插件推荐" /></a></p>
<p></p>
<p>7) <a rel="nofollow" href="http://www.wowslider.com/automatic-jquery-slider-noir-squares-demo.html"><strong>Automatic jQuery Slider Noir Squares</strong></a> &#8211; WOW Slider是一个拥有惊人的视觉效果，jQuery的幻灯片专业定制工具。<br />
<a rel="nofollow" href="http://www.wowslider.com/automatic-jquery-slider-noir-squares-demo.html"><img src="http://www.webdesignish.com/wp-content/uploads/2011/01/jQuery-Slider-noir-Squares-e1294832707375.jpg" title="10款顶级jQuery插件推荐" alt="jQuery Slider noir Squares e1294832707375 10款顶级jQuery插件推荐" /></a></p>
<p></p>
<p>8 ) <span class="removed_link" title="http://demo.modernization.co.ke/factcha/rgstr/get_files.php#download_scripts"><strong>Factcha</strong></span> &#8211; 很有趣的验证码服务，用jQuery实现，可以让你的用户远离那些无聊的输入数字、字母、汉字的验证码。<br />
<span class="removed_link" title="http://demo.modernization.co.ke/factcha/rgstr/get_files.php#download_scripts"><img src="http://www.webdesignish.com/wp-content/uploads/2011/01/FACTCHA.jpg" title="10款顶级jQuery插件推荐" alt="FACTCHA 10款顶级jQuery插件推荐" /></span></p>
<p></p>
<p>9) <a rel="nofollow" href="http://www.wbotelhos.com/capty/"><strong>Capty</strong></a> &#8211; 这个插件可以为你的图片加上标题（我的文字描述可能比较无趣，但效果还是挺好的）。<br />
<a rel="nofollow" href="http://www.wbotelhos.com/capty/"><img src="http://www.webdesignish.com/wp-content/uploads/2011/01/jQuery-Capty.jpg" title="10款顶级jQuery插件推荐" alt="jQuery Capty 10款顶级jQuery插件推荐" /></a></p>
<p></p>
<p>10) <a rel="nofollow" href="http://jasonlau.biz/home/jquery/screw-a-jquery-plugin"><strong>Screw a jQuery Plugin</strong></a> &#8211; 这个要怎么形容呢，和LazyLoader有点小不同，应该和Google图片搜索的那种差不多的。<br />
<a rel="nofollow" href="http://jasonlau.biz/home/jquery/screw-a-jquery-plugin"><img src="http://www.webdesignish.com/wp-content/uploads/2011/01/Random-Photos-e1294833174708.jpg" title="10款顶级jQuery插件推荐" alt="Random Photos e1294833174708 10款顶级jQuery插件推荐" /></a></p>
<p></p>
<blockquote><p>结语：有些功能感觉上挺帅气，但是我语文能力有限不知道该如何描述，所以还是自己点开链接看看比较实际。</p></blockquote>
<h3  class="related_post_title">既然来了，也许你也会想看一下：</h3><ul class="related_post"><li>2010/09/09 -- <a href="http://www.movoin.com/the-best-jquery-lightbox-plugins.html" title="最佳jQuery插件(LightBox篇)">最佳jQuery插件(LightBox篇)</a></li><li>2010/09/01 -- <a href="http://www.movoin.com/my-jquery-plugins-toolbox.html" title="常用于后台开发的jQuery插件">常用于后台开发的jQuery插件</a></li><li>2010/09/07 -- <a href="http://www.movoin.com/10-useful-frameworks-to-develop-html-based-webapps-for-touch-devices.html" title="10款基于Html的移动应用开发框架">10款基于Html的移动应用开发框架</a></li><li>2010/08/19 -- <a href="http://www.movoin.com/fix-ie6-iframe-horizontal-scroll-bar.html" title="IE6中Iframe产生横向滚动条的解决办法">IE6中Iframe产生横向滚动条的解决办法</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.movoin.com/top-10-best-free-jquery-plugin.html/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>动开发者调查:2011年移动应用开发趋势</title>
		<link>http://www.movoin.com/urban-airship-2010-mobile-app-developer-survey-results.html</link>
		<comments>http://www.movoin.com/urban-airship-2010-mobile-app-developer-survey-results.html#comments</comments>
		<pubDate>Thu, 13 Jan 2011 00:59:24 +0000</pubDate>
		<dc:creator>Allen</dc:creator>
				<category><![CDATA[移动开发]]></category>
		<category><![CDATA[移动应用]]></category>

		<guid isPermaLink="false">http://www.movoin.com/?p=80</guid>
		<description><![CDATA[移动视界–波兰移动服务平台Urban Airship最近发布了他们的年终调查结果，为了推测移动引用开发领域的未来趋势，该项调查咨询了几百名开发者的努力方向和未来计划。 根据开发者的反馈，这项调查得出了一些惊人的结果。例如，到2011年iOS平台开发预计略有减少，从99.5%降低到90%，而Android平台开发则会有显著增长，从44%上升到74%。另一项有趣的数据显示，开发者将会提高使用应用程序内置购买的付费方式，预计从2010年的8%增加到2011年的31%。 开发平台的选择 这次调查涉及318个移动应用开发商，其中只有一半的开发商使用Urban Airship的移动平台。根据219名受访者反馈，2010年的开发者表示出明显的开发喜好，99.5%的受访者选择iOS，43.8%的受访者选择Android，11.0%的受访者选择黑莓位居第三。 但就开发者2011年的开发计划来看，调查结果有明显不同。221名受访者中，90%表示他们将为iOS平台开发，73.8选择了Android，22.2%选择黑莓，24.4%选择了Windows Phone 7。 移动应用收入来源 从2010年到2011年，移动应用的收入来源也有所转变。2010年主要的收入来源（47%）来直接付费下载。11%的收入来源源自广告，8%来自应用程序内置购买，0.3%来自程序升级，并且33.3%的受访开发者表示他们的应用程序没有赚钱。 然而，到2011年，直接下载付费的收入会下降，尽管这种付费方式仍是最大的收入来源（38%）。其他的收入来源包括广告（17%），应用程序内置购买（31%），程序升级（2%）都有所增加。只有13%的开发者表示他们的应用程序可能不赚钱。 64%的受访开发者认为，下载也可以用来作为应用程序成功的措施。60%的受访开发者在意应用程序的功能，44%的开发者在意收入，34%的开发者在意app Store排名，而4%的开发者在意应用程序的卸载率。 Urban Airship还对开发者是否使用推送通知等功能进行了调查，与获得更多调查结果，请猛击报告的完整版。 移动视界整理。 既然来了，也许你也会想看一下：2011/01/04 -- 35+手机及Web应用开发图标集2010/11/24 -- 我最近的困惑2010/10/18 -- 手机应用的HTML5 JavaScript框架2010/09/07 -- 10款基于Html的移动应用开发框架]]></description>
			<content:encoded><![CDATA[<p>移动视界–波兰移动服务平台<a rel="nofollow" href="http://urbanairship.com/">Urban Airship</a>最近发布了他们的年终调查结果，为了推测移动引用开发领域的未来趋势，该项调查咨询了几百名开发者的努力方向和未来计划。</p>
<p>根据开发者的反馈，这项调查得出了一些惊人的结果。例如，到2011年iOS平台开发预计略有减少，从99.5%降低到90%，而Android平台开发则会有显著增长，从44%上升到74%。另一项有趣的数据显示，开发者将会提高使用应用程序内置购买的付费方式，预计从2010年的8%增加到2011年的31%。<span id="more-80"></span></p>
<h4><strong>开发平台的选择</strong></h4>
<p>这次调查涉及318个移动应用开发商，其中只有一半的开发商使用Urban Airship的移动平台。根据219名受访者反馈，2010年的开发者表示出明显的开发喜好，99.5%的受访者选择iOS，43.8%的受访者选择Android，11.0%的受访者选择黑莓位居第三。</p>
<p>但就开发者2011年的开发计划来看，调查结果有明显不同。221名受访者中，90%表示他们将为iOS平台开发，73.8选择了Android，22.2%选择黑莓，24.4%选择了Windows Phone 7。</p>
<h4>移动应用收入来源</h4>
<p>从2010年到2011年，移动应用的收入来源也有所转变。2010年主要的收入来源（47%）来直接付费下载。11%的收入来源源自广告，8%来自应用程序内置购买，0.3%来自程序升级，并且33.3%的受访开发者表示他们的应用程序没有赚钱。</p>
<p>然而，到2011年，直接下载付费的收入会下降，尽管这种付费方式仍是最大的收入来源（38%）。其他的收入来源包括广告（17%），应用程序内置购买（31%），程序升级（2%）都有所增加。只有13%的开发者表示他们的应用程序可能不赚钱。</p>
<p>64%的受访开发者认为，下载也可以用来作为应用程序成功的措施。60%的受访开发者在意应用程序的功能，44%的开发者在意收入，34%的开发者在意app Store排名，而4%的开发者在意应用程序的卸载率。</p>
<p>Urban Airship还对开发者是否使用推送通知等功能进行了调查，与获得更多调查结果，请猛击报告的<a rel="nofollow" href="http://blog.urbanairship.com/blog/2011/01/06/urban-airship-2010-mobile-app-developer-survey-results/" class="broken_link">完整版</a>。</p>
<p><span class="removed_link" title="http://www.mstorez.com/">移动视界</span>整理。</p>
<h3  class="related_post_title">既然来了，也许你也会想看一下：</h3><ul class="related_post"><li>2011/01/04 -- <a href="http://www.movoin.com/free-mobile-web-application-development-icon-sets.html" title="35+手机及Web应用开发图标集">35+手机及Web应用开发图标集</a></li><li>2010/11/24 -- <a href="http://www.movoin.com/my-confusion.html" title="我最近的困惑">我最近的困惑</a></li><li>2010/10/18 -- <a href="http://www.movoin.com/html5-javascript-framework-for-mobile-applications.html" title="手机应用的HTML5 JavaScript框架">手机应用的HTML5 JavaScript框架</a></li><li>2010/09/07 -- <a href="http://www.movoin.com/10-useful-frameworks-to-develop-html-based-webapps-for-touch-devices.html" title="10款基于Html的移动应用开发框架">10款基于Html的移动应用开发框架</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.movoin.com/urban-airship-2010-mobile-app-developer-survey-results.html/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>35+手机及Web应用开发图标集</title>
		<link>http://www.movoin.com/free-mobile-web-application-development-icon-sets.html</link>
		<comments>http://www.movoin.com/free-mobile-web-application-development-icon-sets.html#comments</comments>
		<pubDate>Tue, 04 Jan 2011 10:09:10 +0000</pubDate>
		<dc:creator>Allen</dc:creator>
				<category><![CDATA[前端开发]]></category>
		<category><![CDATA[Icons]]></category>
		<category><![CDATA[移动应用]]></category>
		<category><![CDATA[资源]]></category>

		<guid isPermaLink="false">http://www.movoin.com/?p=79</guid>
		<description><![CDATA[目前移动应用程序开发是相当流行。当谈到应用程序开发时移动应用程序开发是顶级。移动应用程序开发确实有一个庞大而多汁的市场，因为现在每个人都使用手机。开发中的应用日益增加的利益创造了更好的和强大的移动应用的需求。人们习惯于添加新的应用程序到手机上。 人们使用手机而不是电脑和笔记本电脑，因为有时手机更方便。作为每一个开发人员都知道，使用手机应用程序图标集是一个很大的优势，使你开发的应用更具特色。 Fundamental Icons Web0.2ama Gallery Icons Mega Pack Ecqlipse 2 350 Mobile App Icons 108 Mono Icons: Huge Set of Minimal Icons Token 30 Free Vector Icons Icons Sweet The Android Developer Common Icon Set II Handset Icon Icons for iPhone &#38; iPad Apps Icons: Free iPhone Toolbar Icons 160 iphone Toolbar Icons (The [...]]]></description>
			<content:encoded><![CDATA[<p>目前移动应用程序开发是相当流行。当谈到应用程序开发时移动应用程序开发是顶级。移动应用程序开发确实有一个庞大而多汁的市场，因为现在每个人都使用手机。开发中的应用日益增加的利益创造了更好的和强大的移动应用的需求。人们习惯于添加新的应用程序到手机上。</p>
<p>人们使用手机而不是电脑和笔记本电脑，因为有时手机更方便。作为每一个开发人员都知道，使用手机应用程序图标集是一个很大的优势，使你开发的应用更具特色。<br />
<span id="more-79"></span></p>
<h4><a rel="nofollow" href="http://www.archetype-inc.com/yard/fundamentals/icons/" target="_blank">Fundamental Icons</a></h4>
<h4><a rel="nofollow" href="http://chrfb.deviantart.com/art/Web0-2ama-165156124" target="_blank">Web0.2ama</a></h4>
<h4><a rel="nofollow" href="http://georgeharrison.deviantart.com/art/Gallery-Icons-Mega-Pack-148021723" target="_blank">Gallery Icons Mega Pack</a></h4>
<h4><a rel="nofollow" href="http://chrfb.deviantart.com/art/quot-ecqlipse-2-quot-PNG-59941546" target="_blank">Ecqlipse 2</a></h4>
<h4><a rel="nofollow" href="http://yt458.deviantart.com/art/350-Mobile-App-Icons-181172058" target="_blank">350 Mobile App Icons</a></h4>
<h4><a rel="nofollow" href="http://www.tutorial9.net/resources/108-mono-icons-huge-set-of-minimal-icons/" target="_blank">108 Mono Icons: Huge Set of Minimal Icons</a></h4>
<h4><a rel="nofollow" href="http://brsev.deviantart.com/art/Token-128429570" target="_blank">Token</a></h4>
<h4><a rel="nofollow" href="http://www.dezinerfolio.com/freebie/30-free-vector-icons" target="_blank">30 Free Vector Icons</a></h4>
<h4><a rel="nofollow" href="http://www.iconsweets.com/" target="_blank">Icons Sweet</a></h4>
<h4><a rel="nofollow" href="http://www.glyfx.com/products/free_android2.html" target="_blank">The Android Developer Common Icon Set II</a></h4>
<h4><a rel="nofollow" href="http://ava1219.deviantart.com/art/handset-icon-155812620" target="_blank">Handset Icon</a></h4>
<h4><a rel="nofollow" href="http://glyphish.com/" target="_blank">Icons for iPhone &amp; iPad Apps</a></h4>
<h4><a rel="nofollow" href="http://www.pixelpressicons.com/?p=108" target="_blank">Icons: Free iPhone Toolbar Icons</a></h4>
<h4><a rel="nofollow" href="http://blog.twg.ca/2009/09/free-iphone-toolbar-icons/" target="_blank">160 iphone Toolbar Icons (The Working Group)</a></h4>
<h4><a rel="nofollow" href="http://app-bits.com/free-icons.html" target="_blank">iPhone Toolbar Icon Set (app-bits)</a></h4>
<h4><a rel="nofollow" href="http://www.glyfx.com/products/free_android2.html" target="_blank">Android Developer Common Icon Set II</a></h4>
<h4><a rel="nofollow" href="http://brsev.deviantart.com/art/Token-128429570" target="_blank">TOKEN Icon Set</a></h4>
<h4><a rel="nofollow" href="http://app-bits.com/free-icons.html" target="_blank">iPhone Toolbar Icon Set</a></h4>
<h4><a rel="nofollow" rel="bookmark" href="http://www.wpzoom.com/wpzoom/new-freebie-wpzoom-developer-icon-set-154-free-icons/" target="_blank">Developer Icon Set (154 free icons)</a></h4>
<h4><a rel="nofollow" href="http://iirojappinen.deviantart.com/art/iDroid-icons-for-Android-146955378" target="_blank">iDroid icons for Android</a></h4>
<h4><a rel="nofollow" href="http://bharathp666.deviantart.com/art/Android-Icons-Set-2-156602058" target="_blank">Android Icons Set 2</a></h4>
<h4><a rel="nofollow" href="http://bharathp666.deviantart.com/art/Android-Application-Icons-Set-150473477" target="_blank">Android Application Icons Set</a></h4>
<h4><a rel="nofollow" href="http://www.tutorial9.net/resources/nixus-icon-pack-60-beautiful-premium-icons-free/" target="_blank">NIXUS Icon Pack: 60 Beautiful Premium Icons</a></h4>
<h4><a rel="nofollow" href="http://prokofusha.deviantart.com/art/Basic-set-125164098" target="_blank">Basic set</a></h4>
<h4><span class="removed_link" title="http://lab.iirojappinen.com/idroid/">iDroid</span></h4>
<h4><a rel="nofollow" href="http://min.frexy.com/articles/category/milky/" target="_blank">Milky Icon Set</a></h4>
<h4><a rel="nofollow" href="http://valkyre.deviantart.com/art/Proxal-Icon-Set-v2-17102198" target="_blank">Proxal Icon Set v2</a></h4>
<h4><a rel="nofollow" href="http://dryicons.com/free-icons/preview/stickers-icon-set/" target="_blank">Stickers Icon Set</a></h4>
<h4><a rel="nofollow" href="http://www.tutorial9.net/resources/free-icon-pack-web-injection/" target="_blank">Web Injection</a></h4>
<h4><a rel="nofollow" href="http://sekkyumu.deviantart.com/art/Developpers-Icons-63052312" target="_blank">Developers Icons</a></h4>
<h4><a rel="nofollow" href="http://pixel-mixer.com/" target="_blank">pixel-mixer Basic set</a></h4>
<h4><a rel="nofollow" href="http://kyo-tux.deviantart.com/art/GiNUX-126818033" target="_blank">GiNUX</a></h4>
<h4><a rel="nofollow" href="http://www.icojoy.com/lj/free/onebit2/onebit2.zip" target="_blank">Onebit Free Icon Set 2</a></h4>
<h4><a rel="nofollow" href="http://www.graphicrating.com/2009/06/19/quartz-icon-pack/" target="_blank">Quartz Icon Pack</a></h4>
<h4><a rel="nofollow" href="http://www.fineicons.com/en/free-icons/credit-cards/" target="_blank">Credit Cards</a></h4>
<h4><a rel="nofollow" href="http://mattrich.deviantart.com/art/austerity-131866818" target="_blank">Austerity</a></h4>
<h4><a rel="nofollow" href="http://kawsone.deviantart.com/art/Dusk-132732427" target="_blank">Dusk</a></h4>
<h4><a rel="nofollow" href="http://kailoon.com/free-vector-icons-set-twitter-birdy-icon/" target="_blank">Free Vector Icons Set + Twitter Birdy Icon</a></h4>
<h4><a rel="nofollow" href="http://kyo-tux.deviantart.com/art/Alcohol-124978275" target="_blank">Alcohol</a></h4>
<h3  class="related_post_title">既然来了，也许你也会想看一下：</h3><ul class="related_post"><li>2011/01/13 -- <a href="http://www.movoin.com/urban-airship-2010-mobile-app-developer-survey-results.html" title="动开发者调查:2011年移动应用开发趋势">动开发者调查:2011年移动应用开发趋势</a></li><li>2010/11/24 -- <a href="http://www.movoin.com/my-confusion.html" title="我最近的困惑">我最近的困惑</a></li><li>2010/10/18 -- <a href="http://www.movoin.com/html5-javascript-framework-for-mobile-applications.html" title="手机应用的HTML5 JavaScript框架">手机应用的HTML5 JavaScript框架</a></li><li>2010/09/07 -- <a href="http://www.movoin.com/10-useful-frameworks-to-develop-html-based-webapps-for-touch-devices.html" title="10款基于Html的移动应用开发框架">10款基于Html的移动应用开发框架</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.movoin.com/free-mobile-web-application-development-icon-sets.html/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Win7下配置web.py(apache+mod_wsgi+MySQLdb)</title>
		<link>http://www.movoin.com/install-webpy-in-win7.html</link>
		<comments>http://www.movoin.com/install-webpy-in-win7.html#comments</comments>
		<pubDate>Wed, 29 Dec 2010 03:34:40 +0000</pubDate>
		<dc:creator>Allen</dc:creator>
				<category><![CDATA[程序开发]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Web.py]]></category>

		<guid isPermaLink="false">http://www.movoin.com/?p=77</guid>
		<description><![CDATA[Win7下配置web.py(apache+mod_wsgi+MySQLdb) 以前在Ubuntu下配置过好几次，很简单。现在却慑于Photoshop的&#8221;淫威&#8221;，使我不得不回到Windows下工作。不过还好Win7除了开关机慢一点以外，其它都还算是不错。为此我也可以使用更多优秀软件，如：Enterprise Architect等。 言归正传，其实整个配置过程挺简单，没有多复杂，主要是找对版本和方法。 配置环境 Win7 旗舰版 32位 Python 2.7 web.py 0.3.4 Apache 2.2 MySQL 5.1 mod_wsgi py27-3.3 MySQLdb py27-1.2.3 安装Python&#8230; 下载Python有些郁闷，因为{你懂的。。。此处省略3500字。。。}，所以需要使用IE代理下载。 安装后，你需要检查一下环境变量是否已添加，我安装时不是选择所有用户，所以Path中没有Python的路径，需要我在用户配置中添加了Path。 添加用户配置后，需要注销用户再登录才可以使用Path变量。 安装Apache&#038;MySQL&#8230; 我除了需要Python环境以外，还需要PHP环境。安装也没什么特别，网上可以找到很多相关的文章，Google一下吧{PS: Google时好时坏，太杯具了！此处再次省略3500字。。。}。 安装web.py&#8230; 从web.py官网上下载0.3.4稳定版，解压后执行：python setup.py install 一般情况下不会有啥问题{PS: 我在安装时错把 writing: xxxxxxx 看成了 warnting: xxxxxxx ，还着实让我紧张了一把}。 OK，测试一下先： # filename: code.py import web urls = ( '/(.*)', 'hello' ) app = web.application(urls, globals()) [...]]]></description>
			<content:encoded><![CDATA[<p>Win7下配置web.py(apache+mod_wsgi+MySQLdb)</p>
<p>以前在Ubuntu下配置过好几次，很简单。现在却慑于Photoshop的&#8221;淫威&#8221;，使我不得不回到Windows下工作。不过还好Win7除了开关机慢一点以外，其它都还算是不错。为此我也可以使用更多优秀软件，如：Enterprise Architect等。</p>
<p>言归正传，其实整个配置过程挺简单，没有多复杂，主要是找对版本和方法。</p>
<h2>配置环境</h2>
<ol>
<li>Win7 旗舰版 32位</li>
<li>Python 2.7</li>
<li>web.py 0.3.4</li>
<li>Apache 2.2</li>
<li>MySQL 5.1</li>
<li>mod_wsgi py27-3.3</li>
<li>MySQLdb py27-1.2.3</li>
</ol>
<p><span id="more-77"></span></p>
<p></p>
<h2>安装Python&#8230;</h2>
<p>下载Python有些郁闷，因为{你懂的。。。此处省略3500字。。。}，所以需要使用IE代理下载。</p>
<p>安装后，你需要检查一下环境变量是否已添加，我安装时不是选择所有用户，所以Path中没有Python的路径，需要我在用户配置中添加了Path。</p>
<p>添加用户配置后，需要注销用户再登录才可以使用Path变量。</p>
<p></p>
<h2>安装Apache&#038;MySQL&#8230;</h2>
<p>我除了需要Python环境以外，还需要PHP环境。安装也没什么特别，网上可以找到很多相关的文章，Google一下吧{PS: Google时好时坏，太杯具了！此处再次省略3500字。。。}。</p>
<p></p>
<h2>安装web.py&#8230;</h2>
<p>从web.py官网上下载0.3.4稳定版，解压后执行：python setup.py install</p>
<p>一般情况下不会有啥问题{PS: 我在安装时错把 writing: xxxxxxx 看成了 warnting: xxxxxxx ，还着实让我紧张了一把}。</p>
<p>OK，测试一下先：</p>
<pre name="code" class="sh_python" linenum="off"># filename: code.py

import web

urls = (
    '/(.*)', 'hello'
)

app = web.application(urls, globals())

class hello:
    def GET(self, name):
        if not name:
            name = 'World'
        return 'Hello, ' + name + '!'

if __name__ == "__main__":
    app.run()
</pre>
<p>从官网上Copy的，web.py示例代码，运行：python code.py 向世界 say hello！</p>
<p></p>
<h2>安装mod_wsgi&#8230;</h2>
<ol>
<li><strong>下载 mod_wsgi</strong>: <a rel="nofollow" href="http://code.google.com/p/modwsgi/downloads/detail?name=mod_wsgi-win32-ap22py27-3.3.so" ref="nofollow">http://code.google.com/p/modwsgi/downloads/detail?name=mod_wsgi-win32-ap22py27-3.3.so</a></li>
<li>将它解压后Copy到你的Apache模块目录中，$APACHE/modules</li>
<li>修改httpd.conf文件，添加代码 LoadModule wsgi_module modules/mod_wsgi.so # 下载后的文件名是：mod_wsgi-win32-ap22py27-3.3.so 重命名为：mod_wsgi.so 即可。</li>
<li>重启你的Apache</li>
</ol>
<p></p>
<h2>使用mod_wsgi&#8230;</h2>
<blockquote><p>官网上说：mod_wsgi offers many possible ways to expose a WSGI application in Apache&#8217;s URL hierarchy, but one simple way would be to add the following to your .htaccess:</p></blockquote>
<pre name="code" class="sh_xorg" linenum="off">
&lt;Files code.py&gt;
    SetHandler wsgi-script
    Options ExecCGI FollowSymLinks
&lt;/Files&gt;
</pre>
<p>意思是说：mod_wsgi 有很多配置方法，下面的方法是最简单的，只要在你的 .htaccess 文件里添加以下代码。确实够简单的，呵呵！</p>
<p>使用 mod_wsgi 需要在你的python代码里添加几句代码才可以，拿上面的示例代码为例：</p>
<pre name="code" class="sh_python" linenum="off"># filename: code.py

import web

urls = (
    '/(.*)', 'hello'
)

app = web.application(urls, globals(), autoreload=False)

class hello:
    def GET(self, name):
        if not name:
            name = 'World'
        return 'Hello, ' + name + '!'

if __name__ == "__main__":
    app.run()

application = app.wsgifunc()
</pre>
<p><strong>创建一个虚拟主机：</strong></p>
<pre name="code" class="sh_xorg" linenum="off">
&lt;VirtualHost *:80&gt;
    ServerName your-domain.com
    ServerAlias www.your-domain.com
    DocumentRoot &quot;E:/wwwroot/python/demo/&quot;

    &lt;Directory &quot;E:/wwwroot/python/demo&quot;&gt;
        Options FollowSymLinks IncludesNOEXEC Indexes
        AllowOverride all
        Order Deny,Allow
        Allow from all
    &lt;/Directory&gt;

    ErrorLog &quot;logs/your-domain-error.log&quot;
    CustomLog &quot;logs/your-domain-access.log&quot; combined

&lt;/VirtualHost&gt;
</pre>
<p>设置本机的hosts，127.0.0.1    www.your-domain.com</p>
<p>访问你的应用：http://www.your-domain.com/code.py/</p>
<p>更多内容请移步：http://webpy.org/install/#apachemodwsgi</p>
<p></p>
<h2>安装MySQLdb(mysql_python)&#8230;</h2>
<p>作者并没有提供win(py2.7)下的.exe安装文件，我使用的是 http://www.codegood.com/archives/129，在此对作者表示感谢！</p>
<p>{PS: 我用setup.py死活装不上去}</p>
<p>OK，import MySQLdb 试下，看看 MySQLdb.__version__ 输出的是否1.2.3?</p>
<p>{OVER}</p>
<script type="text/javascript" src="/wp-content/plugins/shjs-syntax-hiliter/shjs/lang/sh_python.js"></script><script type="text/javascript" src="/wp-content/plugins/shjs-syntax-hiliter/shjs/lang/sh_xorg.js"></script><script type="text/javascript" src="/wp-content/plugins/shjs-syntax-hiliter/shjs/lang/sh_python.js"></script><script type="text/javascript" src="/wp-content/plugins/shjs-syntax-hiliter/shjs/lang/sh_xorg.js"></script><h3  class="related_post_title">既然来了，也许你也会想看一下：</h3><ul class="related_post"><li>2011/01/18 -- <a href="http://www.movoin.com/python-devel-spider.html" title="Python编写蜘蛛/爬虫">Python编写蜘蛛/爬虫</a></li><li>2010/10/15 -- <a href="http://www.movoin.com/pygtk-treeview-display-pixbuf.html" title="PyGTK中Treeview显示Pixbuf图标">PyGTK中Treeview显示Pixbuf图标</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.movoin.com/install-webpy-in-win7.html/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>神奇的Html5</title>
		<link>http://www.movoin.com/amazing-things-with-html5.html</link>
		<comments>http://www.movoin.com/amazing-things-with-html5.html#comments</comments>
		<pubDate>Thu, 16 Dec 2010 02:59:28 +0000</pubDate>
		<dc:creator>Allen</dc:creator>
				<category><![CDATA[前端开发]]></category>
		<category><![CDATA[Css]]></category>
		<category><![CDATA[Html]]></category>

		<guid isPermaLink="false">http://www.movoin.com/?p=76</guid>
		<description><![CDATA[在Google Reader上看到几个让人难以置信的Html5网站，真是酷毙了~~~ The forthcoming HTML5 update to the 20 year old HyperText Markup Language promises to bring the “web” experience to a whole new level, allowing the browser to do more from both a visual and data perspective. Even though HTML5 is still a good distance away from being fully deployed, that hasn’t stopped many [...]]]></description>
			<content:encoded><![CDATA[<p>在Google Reader上看到几个让人难以置信的Html5网站，真是酷毙了~~~</p>
<blockquote><p>The forthcoming HTML5 update to the 20 year old HyperText Markup Language promises to bring the “web” experience to a whole new level, allowing the browser to do more from both a visual and data perspective. Even though HTML5 is still a good distance away from being fully deployed, that hasn’t stopped many developers from pushing it to the limits.</p>
<p>Check out these amazing websites which really give you a good idea as to the capabilities of HTML5 as a programming language, doing things in your web browser that were once only possible in an external program<span id="more-76"></span> or plugin. I’ve tested them in Chrome and they should all work in an HTML5 compliant browser such as Chrome, Firefox 4, Safari or IE9. They are demos and HTML5 is still a work in progress, so if you have problems viewing them you might want to try in another browser. Enjoy!</p></blockquote>
<p><a rel="nofollow" href="http://experiments.instrum3nt.com/markmahoney/ball/#" class="broken_link">Multiple Window Ball</a></p>
<p>一个可以在多个窗口滚动的球，酷吧！</p>
<p><img src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2010/11/ballwindow.png" alt="ballwindow 神奇的Html5"  title="神奇的Html5" /></p>
<p>下面这个更酷，酷到我没话说~~~</p>
<p><a rel="nofollow" href="http://www2.nihilogic.dk/labs/canvas_music_visualization/">Radiohead/HTML5 Mashup</a></p>
<p><img src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2010/11/radiohead.png" alt="radiohead 神奇的Html5"  title="神奇的Html5" /></p>
<h3  class="related_post_title">既然来了，也许你也会想看一下：</h3><ul class="related_post"><li>2010/09/07 -- <a href="http://www.movoin.com/10-useful-frameworks-to-develop-html-based-webapps-for-touch-devices.html" title="10款基于Html的移动应用开发框架">10款基于Html的移动应用开发框架</a></li><li>2010/08/19 -- <a href="http://www.movoin.com/fix-ie6-iframe-horizontal-scroll-bar.html" title="IE6中Iframe产生横向滚动条的解决办法">IE6中Iframe产生横向滚动条的解决办法</a></li><li>2010/10/18 -- <a href="http://www.movoin.com/html5-javascript-framework-for-mobile-applications.html" title="手机应用的HTML5 JavaScript框架">手机应用的HTML5 JavaScript框架</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.movoin.com/amazing-things-with-html5.html/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>FLEAPHP运行在PHP5.3+上的报错的解决办法</title>
		<link>http://www.movoin.com/fleaphp-in-php5-3.html</link>
		<comments>http://www.movoin.com/fleaphp-in-php5-3.html#comments</comments>
		<pubDate>Thu, 09 Dec 2010 08:08:42 +0000</pubDate>
		<dc:creator>Allen</dc:creator>
				<category><![CDATA[程序开发]]></category>
		<category><![CDATA[FLEAPHP]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[框架]]></category>

		<guid isPermaLink="false">http://www.movoin.com/?p=61</guid>
		<description><![CDATA[(注：本文所提到的解决办法只针对FLEAPHP本身。) 最常见的两个提示信息是： 1. Assigning the return value of new by reference is deprecated. 2. Function set_magic_quotes_runtime() is deprecated. 3. Notice: date_default_timezone_set() [function.date-default-timezone-set]: Timezone ID &#8216;Asia/ShangHai&#8217; is invalid in YOUR FLEA.PHP on line 834. 其实意思都差不多，就是某某方法或函数已经被废弃不再使用了。所以解决办法也很简单，那我就不用呗！呵呵。 解决第一个提示信息： 第一个提示信息是由于FLEA使用了大量的引用&#8221;=&#038;&#8221;，而这种方法已经被PHP5.3废弃了，因为默认已经是引用不是复制。如果想要复制则需要像这样：“$a = clone $b;”，详细请移步：http://php.net/manual/en/language.oop5.cloning.php 解决办法：用你的IDE或者是批量替换软件把所有文件的所有&#8221;=&#038;&#8221;替换为&#8221;=&#8221;就可以了。 解决第二个提示信息： 第二个提示信息是由于FLEA.php这个文件的887行，有个 set_magic_quotes_runtime(0); 它也被5.3废弃了，你可以选择直接去掉它，也可以像我这样： if (substr(PHP_VERSION, 2, 1) !== &#8217;3&#8242;) { set_magic_quotes_runtime(0); } 第三个提示信息其实明眼上看不出来，但是当我输出一个echo date_default_timezone_get [...]]]></description>
			<content:encoded><![CDATA[<p>(注：本文所提到的解决办法只针对FLEAPHP本身。)</p>
<p>最常见的两个提示信息是：</p>
<p>1. Assigning the return value of new by reference is deprecated.</p>
<p>2. Function set_magic_quotes_runtime() is deprecated.</p>
<p>3. Notice: date_default_timezone_set() [function.date-default-timezone-set]: Timezone ID &#8216;Asia/ShangHai&#8217; is invalid in YOUR FLEA.PHP on line 834.</p>
<p>其实意思都差不多，就是某某方法或函数已经被废弃不再使用了。所以解决办法也很简单，那我就不用呗！呵呵。<br />
<span id="more-61"></span><br />
解决第一个提示信息：</p>
<p>第一个提示信息是由于FLEA使用了大量的引用&#8221;=&#038;&#8221;，而这种方法已经被PHP5.3废弃了，因为默认已经是引用不是复制。如果想要复制则需要像这样：“$a = clone $b;”，详细请移步：http://php.net/manual/en/language.oop5.cloning.php</p>
<p>解决办法：用你的IDE或者是批量替换软件把所有文件的所有&#8221;=&#038;&#8221;替换为&#8221;=&#8221;就可以了。</p>
<p>解决第二个提示信息：</p>
<p>第二个提示信息是由于FLEA.php这个文件的887行，有个 set_magic_quotes_runtime(0); 它也被5.3废弃了，你可以选择直接去掉它，也可以像我这样：</p>
<p>if (substr(PHP_VERSION, 2, 1) !== &#8217;3&#8242;) {<br />
    set_magic_quotes_runtime(0);<br />
}</p>
<p>第三个提示信息其实明眼上看不出来，但是当我输出一个echo date_default_timezone_get ();的时候你就会发现，Asia/Chongqing与Asia/ShangHai的不同了，是的Shanghai而不是ShangHai，详细请移步：http://cn.php.net/manual/en/timezones.asia.php</p>
<p>OK，这样就搞掂了，其实FLEAPHP还是很不错的~~~</p>
<h3  class="related_post_title">既然来了，也许你也会想看一下：</h3><ul class="related_post"><li>2011/03/23 -- <a href="http://www.movoin.com/yii-framework-source-code-to-read-notes-1.html" title="Yii Framework 源码阅读笔记(述)">Yii Framework 源码阅读笔记(述)</a></li><li>2011/05/06 -- <a href="http://www.movoin.com/php-weather-class.html" title="PHP抓取天气预报">PHP抓取天气预报</a></li><li>2010/11/24 -- <a href="http://www.movoin.com/my-confusion.html" title="我最近的困惑">我最近的困惑</a></li><li>2010/10/18 -- <a href="http://www.movoin.com/html5-javascript-framework-for-mobile-applications.html" title="手机应用的HTML5 JavaScript框架">手机应用的HTML5 JavaScript框架</a></li><li>2010/09/07 -- <a href="http://www.movoin.com/10-useful-frameworks-to-develop-html-based-webapps-for-touch-devices.html" title="10款基于Html的移动应用开发框架">10款基于Html的移动应用开发框架</a></li><li>2010/08/20 -- <a href="http://www.movoin.com/ckeditor-and-ckfinder-tips.html" title="CKEditor + CKFinder 整合笔记">CKEditor + CKFinder 整合笔记</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.movoin.com/fleaphp-in-php5-3.html/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

