to illegal user input. If exceptions are allowed, there will be a lot of such a programming style guide (Note by the translator, this is a little far-fetched :-()!
Conclusion:
On the surface, the advantage of using exceptions is greater than the disadvantage, especially in new projects. However, for existing code, the introduction of exceptions involves all dependent code. If exceptions are allowed to be u
Original: ExtJS Code Style Guide with examplesExt JS style guide:
Well-known and easy to learn
Fast development, easy commissioning and easy deployment
Well-organized, scalable and maintainable
Ext JS Application Naming convention: 1, classThe class name should use Hump naming (camelcased).Do not
If you accidentally enter the page, it may be easier to understand from the following links:"Code Guide" Github Open source project--WYSIHTML5 Rich editor (Bootstrap style) "One"1. Overall structureIn WYSIHTML5, all objects are protected by the WYSIHTML5 command space, and the entire code architecture is at a glance from its initialization definition:Https://github.com/xing/wysihtml5/blob/master/src/wysihtm
linesfunction declarationDeclare the reuse, and do not put the function declaration in the IF branch, because the browser understands the difference, and ES does not give the standardFunction callDo not add spaces around the parentheses to avoid confusion with block statementsAnonymous functions execute immediatelyEnclose the immediately executing anonymous function in parentheses to avoid confusion with anonymous function declarationsStrict modeDo not open strict mode in the global scope, only
class file in the header file instead of the #include "file/base/file.h"How to use the Foo class when the header file does not get the Foo definition?
Declare data members using Foo * or Foo .
You can define and return values in a function declaration.
With static data members, static members are defined outside the class.But if your class is a subclass of Foo or has a data member of type Foo, it contains the header file. Do not overdo the loss of header file inclusions, res
Reprinted please indicate the source is Klayge Game Engine
, The permanent link of this article is Http://www.klayge.org /? P = 1941
After referring to Google's c ++ style guide, I wrote a document Klayge C ++ code style guide
. The main principle is similar to that of Google, but there are several differences in t
hide according to logical judgmentHidewithoutmouse: Hidden when the mouse is not on the controlIdepixelborder: Decide whether to draw a border around the TabControl Panel controlShowarrows: Determines whether the arrow in the upper-right corner of the panel is displayedShowclose: Decide whether to display the Close button in the upper right corner of the panelL Display the Code editing window on the central panel Centerpanel CodeeditorYou need to generate a TabPage object first, then wrap the c
hump-type name.4. Finally connect all the words together to get an identifier.Example:Prose Form Correct Incorrect------------------------------------------------------------------"XML HTTP Request" XMLHttpRequest XMLHttpRequest"New Customer ID" Newcustomerid Newcustomerid"Inner stopwatch" Innerstopwatch Innerstopwatch"Supports IPV6 on IOS?" Supportsipv6onios Supportsipv6onios"YouTube Importer" Youtubeimporteryoutubeimporter*Asterisking indicates yes, but not recommended.Note: in English, some
handle it) like a string.
I'm sure most of the course authors are happy to avoid these details, but now it's almost impossible.
ConclusionPython 2 and Python 3 coexist for nearly 10 years, and today we have to say: It's time to turn to Python 3.Research and Production code should be shorter, easier to read, and significantly more secure after migrating to the Python 3 code base.Most libraries now support two versions of both 2.x and 3.x. But we should not wait until the popular toolkit
NewPerson ("Nicholas"); } Else { return NULL; } }//good wording.varperson =getperosn ();if(Person!==NULL) {dosomething (); }//bad notation: compare to an uninitialized variablevarPerson ;if(Person! =NULL) {dosomething (); }//bad writing: test to determine whether a parameter is passedfunctiondosomething (arg1, arg2, Arg3, Arg4) {if(Arg4! =NULL) {dosomethingelse (); }}Avoid using special value undefined. Determine if a variable should be defined using the TypeOf operator.// good wordin
This article mainly introduces the FancySelect use guide for jQuery's flat style drop-down box beautification plug-in. For more information, see FancySelect, a small and practical jQuery drop-down box beautification plug-in. The drop-down box beautification plug-in adopts a flat design style and is one of the preferred drop-down box beautification plug-ins for fa
each substring to the list and then use the . Join Connection list after the loop ends.#Yes--------------------------Items = [''] forLast_Name, first_nameinchEmployee_list:items.append (''%(last_name, first_name)) Items.append ('') employee_table="'. Join (items)#No--------------------------Employee_table ='' forLast_Name, first_nameinchemployee_list:employee_table+=''%(last_name, first_name) employee_table+=''@11: use triple double quotes instead of triple single quotes for multiline
. Fuwo{Display:Block;//Use two spaces to represent indents instead of using the TAB key font-family:' Arial ';//String wrapped in quotation marks background:url ('/images/bg.jpg ');//url Better also wrap them in quotation marks opacity:0.5;//When the number is less than 1 o'clock, you should write 0 before the decimal point. Never show 0 of the trailing of decimals}$length: 0; When the length is defined, 0 is not required to add unit $value:5; $length: $value * 1px;//When adding a unit to a numb
Conversion from: GNU-style Arm Assembly syntax Guide (very detailed) 2
2. the symbol (or label) in the GNU Assembler)
The label can only be ~ Z, ~ Z, 0 ~ 9,".", _, And so on (it consists of dots, letters, numbers, underscores, and so on. It cannot start with a number except for a local number.
The essence of Symbol: it represents the address where it is located. Therefore, it can be used as a variable or f
Conversion from: GNU-style Arm Assembly syntax Guide (very detailed) 4
4. GNU assembly language definition entry point
The default entry for assembler is_ StartLabel,You can also use the entry mark in the connection script file to specify other entry points..
Example: Define the entry point
. Section. Data
. Section. BSS
. Section. Text
. Globl _ start
_ Start:
5. macro definition in GNU Assembler
The
the absolute name instead of using the relative name based on the current path, for example, when you introduce the Foo module in the bar package, you should write the From bar import Foo completely, rather than simply write import foo7 If you must write an import statement with a relative name, use the explicit notation: From.import fooThe import statements in the 8 file should be divided into three parts in order, representing standard library modules, third-party modules, and self-contained
This is a creation in
Article, where the information may have evolved or changed. The Go language also has its own naming and code organization rules. Beautiful code, layout clear, easy to read and understand, like a rigorous design of the API. Get the code, the user first see and touch is the layout, naming and the structure of the package. This article is not to set up hard rules for you, but to use practice to guide everyone to form their own rule
Welcome to follow my microblog and click to open the link
For details about this naming rule, refer to the Google C ++ programming style guide. Although the rules are dead, they can be improved according to the rules.CodeTo facilitate code sharing, which is helpful for improving the individual's coding capability.
1,General rules
The name cannot be abbreviated at will, even if it is understood by o
For details about this naming rule, refer to the Google C ++ programming style guide. Although rules are dead, rules can always improve code readability and facilitate code sharing, it is helpful for improving the individual's coding capability. 1. General naming rules do not support arbitrary abbreviations. Even abbreviations are based on what others can understand. The type and variable should use nouns,
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.