Complement for Code Style

1. Use underline to Separate different part of Variable and method's name.

project_item
@product_name

def find_people
end

2.We should have a space after comma, no space before comma and no space in method parentheses.

attr_reader :product, :quantity
find_product(name, id, time)

3.Javascript

win = new Ext.Window({
applyTo: 'hello-win',
layout: 'fit',
width: 500,
height: 300,
closeAction: 'hide',
plain: true,
items: new Ext.TabPanel({
applyTo: 'hello-tabs',
autoTabs: true,
activeTab: 0,
deferredRender: false,
border: false
}),
buttons: [{
text: 'Submit',
disabled: true
},{
text: 'Close',
handler: function(){
win.hide();
}
}]
});

Contain code like follow:

[{
...
},{
...
}],

({
...
},{
...
})

4.SQL

SELECT CONCAT(parent.name,' , ',p.name) AS Project,
t.name AS Task,
wi.wComment AS Description,
sec_to_time(wi.wBegin) AS 'Start Time',
sec_to_time(wi.wEnd) AS 'End_time',
sec_to_time(wi.wEnd-wi.wBegin) AS Time
FROM T4U_WORKITEMS wi
INNER JOIN T4U_DAYINFOS di ON ( wi.dayinfo_id = di.id )
INNER JOIN T4U_TASKS t ON ( wi.task_id = t.id )
INNER JOIN T4U_PROJECTS p ON ( wi.project_id = p.id )
INNER JOIN T4U_PERSONS per ON ( di.person_id = per.id )
INNER JOIN T4U_PROJECTS parent ON ( IFNULL(p.parent_id,p.id) = parent.id )
WHERE di.daydate = '2009-03-10'
AND per.surName LIKE "eric%"
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值