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%"
分享到:
相关推荐
In some cases there might be good arguments for changing certain style rules, but we nonetheless keep things as they are in order to preserve consistency. Another issue this guide addresses is that...
■■ Use test-driven development techniques for writing JavaScript code. ■■ Create Cascading Style Sheets (CSS) that visually format your HTML document. ■■ Create HTML tables. ■■ Create ...
Style Comments C++ Code Naming Style Coding Religion Indentation and Code Format Clarity Simplicity Consistency and Organization Further Reading Summary 4. Basic Declarations and Expressions Basic ...
You’ll learn how to choose the right programming style for each project, manage unanticipated problems, and work more successfully with every facet of JavaScript programming from data structures to ...