原创 [PHP] Easy popup in Magento

How to create the popup in an easy way? <?php if ($this->canShow()): ?> <script type="text/javascript"> //<![CDATA[

原创 [Python] Commands in Django

點贊 收藏 分享 文章舉報 wonderfan 發佈了270 篇原創文章 · 獲贊 3 · 訪問量 15萬+ 私信 關注

原创 [Python] My Overview of Django

How to parse the ini file ?The ConfigParser class will read the configurat

原创 [Python] Use Python to generate Java Unit Test codes automatically

This code snippet is used to generate the unit test of Java codes. import os import string def task(source,target):

原创 Python:自動解包

[flash=300,300]http://player.youku.com/player.php/sid/XNzQ2OTMyMzIw/v.swf[/flash]<embed src="http://pla

原创 [PHP]Use PHP script to tidy Dojo toolkit

In the Dojo toolkit, there are some unused files so it is better to remove them. <?php @set_time_limit(0); $target_p

原创 [Python]Understand attribute in Python

This recipe is a small code snippet of showing how to distinguish attribute and item in Python language. class MyClass

原创 [Ruby] Define abstract methods

Ruby has its own style to define the abstract methods in its class. class Shape def initialize raise NotImplem

原创 [OpenStack]Deploy WordPress Using Heat

This is the HOT for WordPess deployment on top of OpenStack environment. heat_template_version: 2014-09-06 descriptio

原创 [Backbone]Make Backbone Better With Extensions

Backbone is becoming wildly popular as a web application development framework. Along with this popularity comes count

原创 [PHP]How to get the system info?

In my daily work, i use Ruby, Python and PHP. In the Ruby language, we can leverage the RubyConfig module to get the al

原创 [HA]負載均衡:HAPROXY與KEEPALIVED強強組合

步驟一:修改系統控制配置文件,允許分配虛擬IP(VIP) /etc/sysctl.conf net.ipv4.ip_nonlocal_bind=1<pre style="word-wrap: normal; line-height: 1

原创 [Django] Base class in the model layer

In the model layer, the Model class is the base class while the ModelBase class is metaclass.

原创 [Python]How to handle the exception in Python?

This post demonstrates how to use try clause to handle the exceptions def test_exception(case=None): print case try:

原创 [JavaScript] Use template engine in Dojo

This is a trial to embed the underscore template utility into Dojo toolkit. define("myjs/Header",["dojo/_base/declare"