<?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>精東·博客 &#187; 程序开发</title>
	<atom:link href="http://www.wemvc.com/category/development/feed" rel="self" type="application/rss+xml" />
	<link>http://www.wemvc.com</link>
	<description>男人的胸怀是委屈撑大的。</description>
	<lastBuildDate>Sun, 29 Aug 2010 04:21:16 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Magento再度发力－使用程序模型（Model）创建商品</title>
		<link>http://www.wemvc.com/1441.html</link>
		<comments>http://www.wemvc.com/1441.html#comments</comments>
		<pubDate>Fri, 27 Aug 2010 15:44:59 +0000</pubDate>
		<dc:creator>精东</dc:creator>
				<category><![CDATA[Magento]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Zend Framework]]></category>

		<guid isPermaLink="false">http://www.wemvc.com/?p=1441</guid>
		<description><![CDATA[我们的业务有个需求是从另一个库中导出数据，然后同步到Magento数据库中。之前同事研究过模拟post提交的方式，可以成功，但是速度很慢。后来同事研究过dataflow导入，发现父子商品无法关联。今晚我要使用模型去创建父子关联商品，此篇文章介绍如何创建父商品、创建子商品及如何关联父子商品。
作者：精东
转载请留名
一、第一个目标，创建父商品。
首先我打段原始数据：

Array
&#40;
    &#91;pool_id&#93; =&#62; 1
    &#91;item_parent&#93; =&#62; 122083
    &#91;item&#93; =&#62; 150009417
    &#91;ean&#93; =&#62; 1400001001072
    &#91;item_description&#93; =&#62; TESTELC
    &#91;color_id&#93; =&#62; 10115
    &#91;color_description&#93; =&#62; PAVEMENT
    &#91;size_id&#93; =&#62; M38_0001
    &#91;size_description&#93; =&#62; 1
 [...]]]></description>
		<wfw:commentRss>http://www.wemvc.com/1441.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux(Centos)防DDOS攻击软件-DDoS-Deflate</title>
		<link>http://www.wemvc.com/1361.html</link>
		<comments>http://www.wemvc.com/1361.html#comments</comments>
		<pubDate>Tue, 29 Jun 2010 18:51:32 +0000</pubDate>
		<dc:creator>精东</dc:creator>
				<category><![CDATA[实用工具]]></category>
		<category><![CDATA[服务器]]></category>

		<guid isPermaLink="false">http://www.wemvc.com/?p=1361</guid>
		<description><![CDATA[(D)DoS-Deflate是一款免费的用来防御和减轻DDoS攻击。它通过netstat监测跟踪创建大量网络连接的IP地址，在检测到某个结点超过预设的限制时，该程序会通过APF或IPTABLES禁止或阻挡这些IP. 
DDoS-Deflate安装及配置

1、安装

wget http://www.inetbase.com/scripts/ddos/install.sh
chmod 0700 install.sh
./install.sh


2、配置
配置文件是 /usr/local/ddos/ddos.conf ，默认有如下配置

FREQ=1
NO_OF_CONNECTIONS=150
APF_BAN=1
KILL=1
EMAIL_TO=”root”
BAN_PERIOD=600

IP地址白名单：/usr/local/ddos/ignore.ip.list
卸载

wget http://www.inetbase.com/scripts/ddos/uninstall.ddos
chmod 0700 uninstall.ddos
./uninstall.ddos

MediaLayer was in need of a script to automatically mitigate (D)DoS attacks. The necessity started when MediaLayer was the target of a rather large, consistent attack originating from multiple IP addresses. Each IP would have a large amount of connections to the server, as shown as [...]]]></description>
		<wfw:commentRss>http://www.wemvc.com/1361.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ubuntu下安装&amp;使用压力测试工具Webbench-1.5</title>
		<link>http://www.wemvc.com/1316.html</link>
		<comments>http://www.wemvc.com/1316.html#comments</comments>
		<pubDate>Sat, 26 Jun 2010 07:58:24 +0000</pubDate>
		<dc:creator>精东</dc:creator>
				<category><![CDATA[服务器]]></category>
		<category><![CDATA[webbench]]></category>

		<guid isPermaLink="false">http://www.wemvc.com/?p=1316</guid>
		<description><![CDATA[Webbench是有名的网站压力测试工具，它是由Lionbridge公司（http://www.lionbridge.com）开发。它的帮助文件和文档请到：www.webbench.com上查看。
Webbech 能测试处在相同硬件上，不同服务的性能以及不同硬件上同一个服务的运行状况。webBech的标准测试可以向我们展示服务器的两项内容：每秒钟相应请求数和每秒钟传输数据量。webbench不但能具有便准静态页面的测试能力，还能对动态页面（ASP,PHP,JAVA,CGI）进行测试的能力。还有就是他支持对含有SSL的安全网站例如电子商务网站进行静态或动态的性能测试。

下面介绍如何在Ubuntu下安装webbench:
1、安装依赖包CTAGS

apt-get install ctags

2、安装Webbench 1.5

wget http://www.wemvc.com/wp-content/uploads/2010/06/webbench-1.5.tar.gz
tar zxvf webbench-1.5.tar.gz
cd webbench-1.5
make &#38;&#38; make install

3、使用介绍

webbench -c 500 -t 30 http://127.0.0.1/test.jpg

参数说明：-c表示并发数，-t表示时间(秒)
4、测试结果

webbench-1.5$ sudo webbench -c 500 -t 10 http://localhost/
Webbench - Simple Web Benchmark 1.5
Copyright (c) Radim Kolar 1997-2004, GPL Open Source Software.
&#160;
Benchmarking: GET http://localhost/
500 clients, running 10 sec.
&#160;
Speed=816 pages/min, 13094 bytes/sec.
Requests: 136 susceed, 0 failed.

]]></description>
		<wfw:commentRss>http://www.wemvc.com/1316.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ubuntu 10.04 64bit 编译安装MySQL5.1.x、 PHP 5.3、NGINX 0.8.x</title>
		<link>http://www.wemvc.com/1272.html</link>
		<comments>http://www.wemvc.com/1272.html#comments</comments>
		<pubDate>Wed, 23 Jun 2010 13:48:47 +0000</pubDate>
		<dc:creator>精东</dc:creator>
				<category><![CDATA[服务器]]></category>

		<guid isPermaLink="false">http://www.wemvc.com/?p=1272</guid>
		<description><![CDATA[一时兴起，决定体验Ubuntu，当然少不了要配置开发环境。从网上收集了一些资料，开始配置安装过程。
首先我们现配置下系统，避免以后的问题。
1、locale 的问题，可能会造成在 SSH 终端下的乱码，Debian 可以用 dpkg-reconfigure locales 来设定，Ubuntu就不是这样了。可以先查看一下 /usr/share/i18n/SUPPORTED 这个文件，有哪些受支持的 locale 设定，然后用命令激活即可。

locale-gen en_US.UTF-8
locale-gen fr_FR
locale-gen zh_CN.UTF-8
locale-gen zh_CN
locale-gen zh_CN.GBK
locale-gen zh_CN.GB18030

然后设定系统默认的编码语言，这样 SSH 下面就不会有乱码了，打开 /etc/default/locale 文件，输入以下内容，然后重启系统即可。

LANG=&#34;zh_CN.UTF-8&#34;
LANGUAGE=&#34;zh_CN:zh&#34;

2、因为系统的pygrub已经更换成pvgrub，此时我们可以根据自己的喜好升级系统内核了…那么我们就敲命令把内核也一起升掉好了…

apt-get update
apt-get upgrade
apt-get dist-upgrade

现在我们需要确认一下系统内核，然后把多余的系统内核给卡擦了…

uname -a #确定下版本，不要把现在正在用的给删了
dpkg --get-selections &#124; grep linux  #可以看到系统内核的列表

然后更改 /boot/grub/menu.lst，修改其中的版本就可以了，当然建议重启一下然后再删除系统内核。
4、安装一些必备的软件：

aptitude install vim
aptitude install wget
aptitude install rcconf
aptitude install cron
aptitude install build-essential
aptitude install imagemagick
aptitude install postfix
aptitude install vsftpd
aptitude install mailx
aptitude install gawk
aptitude install [...]]]></description>
		<wfw:commentRss>http://www.wemvc.com/1272.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>[多图] Ubuntu 8.04 中开启3D桌面特效与设置方法</title>
		<link>http://www.wemvc.com/1263.html</link>
		<comments>http://www.wemvc.com/1263.html#comments</comments>
		<pubDate>Sat, 19 Jun 2010 18:22:57 +0000</pubDate>
		<dc:creator>精东</dc:creator>
				<category><![CDATA[服务器]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.wemvc.com/?p=1263</guid>
		<description><![CDATA[Ubuntu 8.04 (Hardy Heron) 中集成了强大3D交互界面，Ubuntu 的 3D桌面特效给用户带来了一种全新的视觉用户。想必有很多朋友也因为看到了 Ubuntu 8.04 那炫目的 3D 桌面特效才开始慢慢地了解Ubuntu 8.04 (Hardy Heron) 的。虽然在这之前也不少的朋友写过设置 Ubuntu  Linux 3D桌面特效的文章，但新发行版的发布也会有新的朋友看到了 Ubuntu 3D 桌面特效而接触 Ubuntu  Linux 。因此，我觉得有必要把在Ubuntu 8.04 (Hardy Heron) 开启 3D 桌面特效的方法给新手们再详细的介绍一下。

本文采用图文并茂的方式给新们讲解，几乎每一步骤都有配图片和文字说明，通过本文的介绍了后,没有多少 Ubuntu Linux  基础的新手们也应该能轻松地在 Ubuntu 8.04 (Hardy Heron) 中开启3D 桌面特效。
1.说明:作者的是用的 NVIDIA GeForce FX 5200 的显卡. 如果你是用的其它的型号的 NVIDIA显卡,设置方法与本文类似。在 Ubuntu 8.04 LTS (Hardy Heron) 加入了大量的 ATI 的驱动。因此，ATI显卡的设置方法的思路也是类似的。由于作者是用的英文版的系统，可能和你看到的有一点不一样。
2.Ubuntu 8.04 [...]]]></description>
		<wfw:commentRss>http://www.wemvc.com/1263.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>25 jQuery Image Gallery/Slider Tutorials and Plugins</title>
		<link>http://www.wemvc.com/1255.html</link>
		<comments>http://www.wemvc.com/1255.html#comments</comments>
		<pubDate>Wed, 16 Jun 2010 11:32:36 +0000</pubDate>
		<dc:creator>精东</dc:creator>
				<category><![CDATA[程序开发]]></category>

		<guid isPermaLink="false">http://www.wemvc.com/?p=1255</guid>
		<description><![CDATA[jQuery image galleries and sliders are very common on portfolio sites  and are also useful for any other type of site for displaying images  and photos. Fortunately, adding a jQuery gallery does not have to be  difficult, even if you don’t have much experience with JavaScript and  jQuery. In this post [...]]]></description>
		<wfw:commentRss>http://www.wemvc.com/1255.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP5对象迭代(Object Iteration)</title>
		<link>http://www.wemvc.com/1230.html</link>
		<comments>http://www.wemvc.com/1230.html#comments</comments>
		<pubDate>Mon, 31 May 2010 10:13:19 +0000</pubDate>
		<dc:creator>精东</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Object Iteration]]></category>

		<guid isPermaLink="false">http://www.wemvc.com/?p=1230</guid>
		<description><![CDATA[PHP5提供一个为对象定义通过一连串的消息被重述的途径成为可能，例如使用一个foreach语句。默认地，所有可见的属性将用来迭代(反复)。
简单的对象迭代(Simple Object Iteration)
PHP代码如下:

&#60;?php
class MyClass
&#123;   public $var1 = 'value 1';
    public $var2 = 'value 2';
    public $var3 = 'value 3';
    protected $protected = 'protected var';
    private   $private   = 'private var';
    function iterateVisible&#40;&#41; 
   [...]]]></description>
		<wfw:commentRss>http://www.wemvc.com/1230.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>如何关闭掉MAGENTO后台没用的功能</title>
		<link>http://www.wemvc.com/1111.html</link>
		<comments>http://www.wemvc.com/1111.html#comments</comments>
		<pubDate>Wed, 26 May 2010 07:18:13 +0000</pubDate>
		<dc:creator>精东</dc:creator>
				<category><![CDATA[Magento]]></category>
		<category><![CDATA[程序开发]]></category>

		<guid isPermaLink="false">http://www.wemvc.com/?p=1111</guid>
		<description><![CDATA[由于magento符合模块化标准，其实不论是前台还是后台都是通过模板中的一个个block组织成你所看到的，至于用户诱发的动作有一部分是在 controller中完成的，有的则是在model中实现的，还有些是直接放在block中的。显然controller是负责指挥。block可以说 是负责显示，或者说是指导模板如何显示，当然它也可以处理些数据，且是读操作比较多。model理论上讲，操作数据的部分应该放在这个地方，但是，主要应 该是写的操作。不过也有读的。清楚了这一结构。你就知道在什么地方关闭没用的功能了。

agento中所有模块的开关都是在app/etc/modules中的文件进行配置的，要把一个模块禁用，步骤如下：
1. 确定你要关闭的模块，我们这边要关闭的是AdminNotification
2. 到app/etc/modules目录下，找到包含这个模板定义的xml文件，删掉它的相关定义，或将&#60;active&#62;true&#60;/active&#62;值改成false。
]]></description>
		<wfw:commentRss>http://www.wemvc.com/1111.html/feed</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Magento后台路径修改方法</title>
		<link>http://www.wemvc.com/1109.html</link>
		<comments>http://www.wemvc.com/1109.html#comments</comments>
		<pubDate>Wed, 26 May 2010 07:17:42 +0000</pubDate>
		<dc:creator>精东</dc:creator>
				<category><![CDATA[Magento]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[程序开发]]></category>

		<guid isPermaLink="false">http://www.wemvc.com/?p=1109</guid>
		<description><![CDATA[Magento后台路径的修改是必要的，很大程度的提高Magento安全性。今天一位朋友问起，我就想到在博客里和大家分享下。
第一种方法，在安装Magento的时候就有一个修改Magento后台路径的地方。
第二种方法，是用在已经安装好的Magento网站上的，打开后台的system/configration/admin可以看到
在Custom admin URL中按照下面提示修改后台路径。例如：www.magentofront-end.com/magento/。后台修改完后，还需要修改Magento配置文件，进入app/etc/local.xml，在57行可以看到&#60;frontName&#62;&#60;![CDATA[admin]]&#62;&#60;/frontName&#62;把admin修改为之前在后台修改过的路径，以www.magentofront-end.com/magento/为例，就是把admin改为magento。
Magento后台地址无法打开救急方法，在操作的时候可能会有误操作导致Magento后台无法打开，请按照下面方法还原Magento后台路径方法。在数据库中找到表core_config_data，然后删除admin/url/use_custom，admin/url/custom，web/secure/base_url，web/unsecure/base_url这4个字段。这4个字段在表的最后一页，最后删除Magento缓存。
文章转载自：http://www.magentofront-end.com/magentomuban/77
]]></description>
		<wfw:commentRss>http://www.wemvc.com/1109.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>重新安装 Magento 模块</title>
		<link>http://www.wemvc.com/1104.html</link>
		<comments>http://www.wemvc.com/1104.html#comments</comments>
		<pubDate>Wed, 26 May 2010 06:32:14 +0000</pubDate>
		<dc:creator>精东</dc:creator>
				<category><![CDATA[Magento]]></category>
		<category><![CDATA[程序开发]]></category>

		<guid isPermaLink="false">http://www.wemvc.com/1104.html</guid>
		<description><![CDATA[在Magento中有良好的版本控制，如果你想重新安装一个模块，只要在core_resource表中找到对应的模块名，将该条记录删除即可，例如：

+-------------------------+---------+
&#124; code                    &#124; version &#124;
+-------------------------+---------+
&#124; adminnotification_setup &#124; 1.0.0   &#124; 
&#124; admin_setup             &#124; 0.7.1   &#124; 
&#124; etc ...    [...]]]></description>
		<wfw:commentRss>http://www.wemvc.com/1104.html/feed</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
	</channel>
</rss>
