各种语言代码规范
来源:互联网 发布:miss男装淘宝店 编辑:程序博客网 时间:2024/06/06 03:39
1. C
http://wiki.nginx.org/CodingStyle
http://tengine.taobao.org/book/appendix_a.html
2.C++
- http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml
- 中文版:http://zh-google-styleguide.readthedocs.org/en/latest/google-cpp-styleguide/contents/
3.Java
- https://sites.google.com/a/android.com/opensource/submit-patches/code-style-guide
- http://www.oracle.com/technetwork/java/codeconvtoc-136057.html
4.Python
- http://google-styleguide.googlecode.com/svn/trunk/pyguide.html
- 中文版: http://zh-google-styleguide.readthedocs.org/en/latest/google-python-styleguide/
5.JavaScript
- http://google-styleguide.googlecode.com/svn/trunk/javascriptguide.xml
6.PHP
- http://framework.zend.com/wiki/display/ZFDEV/PHP+Coding+Standard+%28draft%29
7.Objective-C
- http://google-styleguide.googlecode.com/svn/trunk/objcguide.xml
8.JSON
- http://google-styleguide.googlecode.com/svn/trunk/jsoncstyleguide.xml
- 中文版:https://github.com/darcyliu/google-styleguide/blob/master/JSONStyleGuide.md
9.Shell
- http://google-styleguide.googlecode.com/svn/trunk/shell.xml
10.SQL
1). 所有的关键字大写
2). 关键字SELECT、FROM、JOIN、ON、WHERE、GROUP BY、LIMIT,都应该组成独立的block,有合适的缩进格式
3). 使用4个空格缩进,避免使用TAB键
4). 嵌套查询、嵌套条件,需要使用(),并组成独立的block,有合适的缩进格式
5). 每一行最多有一个关键字(IF等除外)
样例:
SELECT TBL_TEMP1.COL_A AS A, TBL_EXAMPLE.COL_B - TBL_EXAMPLE.COL_C AS DIFFFROM ( SELECT COL_ID, COL_X * COL_X AS COL_A FROM TBL_NUMBER WHERE COL_ID > 100 AND COL_ID <= 1000 ) TBL_TEMP1JOIN TBL_EXAMPLEON TBL_TEMP1.COL_ID = TBL_EXAMPLE.COL_IDWHERE TBL_TEMP1.COL_A <= 10000 AND ( TBL_EXAMPLE.COL_B > 0 OR TBL_EXAMPLE.COL_C < 0 )GROUP BY TBL_EXAMPLE.COL_IDLIMIT 10;
Author:忆之独秀
Email:leaguenew@qq.com
注明出处:http://blog.csdn.net/lavorange/article/details/51441695
0 0
- 各种语言代码规范
- C语言代码规范
- C语言代码规范
- C语言代码规范
- R语言代码规范
- C 语言代码规范探讨
- C语言中的代码规范
- c语言的代码规范
- C语言的代码规范探讨
- C语言代码书写规范[参考]
- C语言编程规范--代码注释
- R语言学习之<代码规范>
- 【C语言】代码规范 内存管理
- C语言写代码要规范
- 各种B/S语言下常见命名规范
- 各种B/S语言下常见命名规范
- 各种编程语言中屏蔽代码块
- 【加密】各种加密(打乱)易语言代码的sdk代码
- 测试你的Service
- 让你真正的理解Hash
- 高斯消元模板
- Struts2 XML配置详解
- kettle中循环遍历不同地址不同库名
- 各种语言代码规范
- 关于“ora-00911: 无效字符 ”的解决方案
- saltstack[5]-grains
- MJExtension使用指导(转)
- Unity3D总结
- awk#egrep#cat#.sh#
- 跨域Ajax请求时是否带Cookie的设置
- 开发中GridView常见问题
- appium for windows 的安装及环境搭配