$ ./manage.
py debugsqlshell
Python 2.6.1
(r261:
67515, Jul
72009,23:
51:
51) [GCC 4.2.1
(Apple Inc.
build5646)] on darwin
Type
"help", "copyright","credits" or"license"for more information.
(InteractiveConsole
) >>>from page.
modelsimport Page
>>>### Lookup and use resulting in an extra query... >>> p
= Page.
objects.
get(pk
=1) SELECT
"page_page".
"id", "page_page".
"number", "page_page".
"template_id", "page_page".
"description" FROM
"page_page" WHERE
"page_page".
"id" =1
>>>print p.
template.
name SELECT
"page_template".
"id", "page_template".
"name", "page_template".
"description" FROM
"page_template" WHERE
"page_template".
"id" =1
Home
>>>### Using select_related to avoid 2nd database call... >>> p
= Page.
objects.
select_related('template').
get(pk
=1) SELECT
"page_page".
"id", "page_page".
"number", "page_page".
"template_id", "page_page".
"description", "page_template".
"id", "page_template".
"name", "page_template".
"description" FROM
"page_page" INNER JOIN
"page_template" ON
("page_page".
"template_id"="page_template".
"id") WHERE
"page_page".
"id" =1
//关键字的使用探讨/*访问关键词private 只能在本类中访问public 只能在本工程中访问protected 只能在包中和子类中访问默认的 只能在包中访问*//*final 类 方法 变量 final 类 不能被继承 final 方法 不能被子类覆盖,但可以继承 final 变量 只能有一次赋值,赋值后不能改变 final 不能用来修饰构造方法*///this()
What’s new in Zabbix 2.0?
去年开始使用Zabbix的时候,是1.8.X的版本,今年Zabbix已经跨入了2.0的时代。看了2.0的release notes,和performance相关的有下面几个:
:: Performance improvements::Trigger related da
修改jboss端口
%JBOSS_HOME%\server\{服务实例名}\conf\bindingservice.beans\META-INF\bindings-jboss-beans.xml
中找到
<!-- The ports-default bindings are obtained by taking the base bindin
@echo off
::演示:删除指定路径下指定天数之前(以文件名中包含的日期字符串为准)的文件。
::如果演示结果无误,把del前面的echo去掉,即可实现真正删除。
::本例假设文件名中包含的日期字符串(比如:bak-2009-12-25.log)
rem 指定待删除文件的存放路径
set SrcDir=C:/Test/BatHome
rem 指定天数
set DaysAgo=1
HTML5的video和audio标签是用来在网页中加入视频和音频的标签,在支持html5的浏览器中不需要预先加载Adobe Flash浏览器插件就能轻松快速的播放视频和音频文件。而html5media.js可以在不支持html5的浏览器上使video和audio标签生效。 How to enable <video> and <audio> tags in