Current location - Quotes Website - Personality signature - What are the established rules at the dinner party?
What are the established rules at the dinner party?
What are the established rules at the dinner party? How can I put it? There are actually no rules in the current dinner. If there is, just make sure you eat well and eat well.

There are many traditional dinner rules, but I only know a few basics.

Don't make any noise when father and son sit separately (except for the guessing order). The elders (dignitaries) sit in privileged positions. Generally speaking, the location facing the door is respected in hotels, facing south (on the kang) or north (on the ground) in homes, and facing the door in buildings.

Don't eat until the host tells you to start.

You can't steal from your elders.

Can't say that the master is not.

Avoid indecent diet.

Avoid sitting incorrectly.

If you accompany guests, you should persuade them not to stop drinking. You can't finish your meal before the guests. When the guests have finished eating, the accompanying guests should also put down and have a good meal.

What are the established rules?

Engagement ring, friends and family eating. It depends on the rules. Look at yourself.

Recognized idioms

Established under the convention

new word

Basic explanation and detailed explanation

Explanation: refers to the name of things or social habits that people often determine or form through long-term social practice.

Said by: Xunzi Zheng Ming: "A name is not fixed, but based on life. If it is customary, it is appropriate. If it is different from the agreement, it is not appropriate. "

Grammar: combination; As predicate, attribute and object; Include praise

tidy

Xunzi Zheng Ming: "There is no proper name; Meet with life; Habit is appropriate; It is inappropriate to be different from the contract. "

What are the established rules?

Kill people and pay debts.

What are the established rules in the process of werewolf killing game?

1. When a werewolf kills, all werewolves must specify the same target before killing. If the werewolf doesn't agree, no one will die that night

2. Mixed-race people support a person (no matter what profession the supporter is) on the first night, as long as the supported camp wins.

Then the hybrid wins, or loses. Cupid's love with werewolves turned Cupid to the werewolf camp, a half-blood.

Support werewolves, so the victory conditions are the same as werewolves, that is, the victory of werewolves, that is, the victory of Cupid and half-blood.

3. Leadership is a numerical value of online game werewolf. When a werewolf, it has; Leadership; The higher the number, the player can decide to kill.

For example, a werewolf A with 0 leadership killed 1 and another werewolf B of 1 killed 2, so player 2 died, and

No. 1

What are the established things?

Answer for you.

All grammars stipulate that natural spelling and pronunciation are valid.

What are the established rules of Jingning She nationality?

You can't drop blood outside when you kill a chicken.

We should sing folk songs at weddings and funerals.

There is a bonfire party on March 3rd every year.

Brides cry when they get married.

The bride will return to her parents' home three days after her marriage.

What are the hidden rules in dota?

There are no rules. What are the rules of playing games? At most, there are auxiliary and output points, such as taking the lead in output, assisting as a leader, and protecting output in group warfare.

What are the established naming rules and specifications in jdk?

20 17 version of Ali java development manual: a lot, only a part can be copied, details can go to Baidu.

I. Programming Convention (1) Naming Convention 1. Naming in mandatory codes cannot start with or end with an underscore or dollar sign. Counterexample: _ name/_ _ name/$ object/name _/name $/object $2. It is forbidden to use pinyin mixed with English in the mandatory code, and it is not allowed to use Chinese directly. Note: Correct English spelling and grammar can make readers easy to understand and avoid ambiguity. Note that even pure pinyin naming should be avoided. Counterexample: dazhe promotion [discount]/getpingfenbyname () [score]/intavariable = 3 Positive example: Alibaba/Taobao/Youku/Hangzhou and other internationally used names can be regarded as English. 3. The class name must use the UpperCamelCase style and follow the hump form, except for the following cases: (domain model related naming) DO/BO/DTO/VO, etc. Positive example: Marco polo/userdo/xmlservice/tcpuddle/tapromotionCounter example: macropolo/userdo/xmlservice/tcpuddle/tapromotion4. Force the method name, parameter number, member variable and region variable to use the lowerCamelCase style, which must follow the hump form. Positive example: localvalue/gethttpmessage ()/inputsuserid5. Force constant names to be capitalized and separate words with underscores, so that the semantic expression is complete and clear, not too long. Positive example: MAX_STOCK_COUNT counter Example: MAX_COUNT 6. Forcing Abstract class naming to start with abstract or Base; Exception class naming ends with exception; The naming of a Test class begins with the class name it wants to test and ends with test. 7. Mandatory brackets are part of the array type, and the array is defined as follows: string [] args; Counterexample: it is defined by the string args[]. 8. Force all Boolean variables in POJO class not to add is, otherwise some frame parsing will lead to serialization errors. Counterexample: Boolean problem defined as basic data type; The method is also issues (). During the reverse parsing, the RPC framework will "think" that the corresponding attribute name is isSuess, which leads to the failure of obtaining the attribute and then throws an exception. 9. Force the package name to use lowercase uniformly, and there is only one English word with natural meaning between dot separators. The package name is singular, but if the class name has plural meaning, the class name can be plural. Positive example: the application tool class package is named alibaba.open.util, and the class name is MessageUtils (this rule refers to the framework structure of spring) 10. Completely irregular abbreviations are forced to be eliminated to avoid ignorance. Counterexample: AbstractClass "abbreviation" is named AbsClass;; The condition abbreviation is named condi, which seriously reduces the readability of the code. 1 1. It is suggested that if the design pattern is used, it is suggested that the specific pattern be embodied in the class name. Description: Embodying the design pattern in the name helps readers to quickly understand the architectural design idea. Positive example: public class OrderFactory public class LoginProxy public class resource observer; 12. It is suggested that the methods and properties in the interface class should not be decorated with any symbols (nor should they be public), so as to keep the code simple and add effective Javadoc comments. Try not to define variables in the interface. If a variable must be defined, it must be related to the interface method and be the basic constant of the whole application. Positive example: interface method signature: void f (); The basic constant of the interface indicates: String COMPANY = "alibaba counterexample: interface method definition: public abstract void f (); Description: The interface in JDK8 allows default implementation, so this default method is a valuable default implementation for all implementation classes. 13. There are two sets of rules for naming interfaces and implementation classes: 1) It is mandatory that for Service and DAO classes, based on the concept of SOA, the exposed services must be interfaces, and the internal implementation classes are distinguished from interfaces by the suffix impl. Positive example: CacheServiceImpl implements the CacheService interface. 2) If it is an interface name that describes the capability, it is suggested to use the corresponding adjective as the interface name (usually in the form of -- able). Positive example: AbstractTranslator realizes translatability. 14. It is recommended to use the suffix Enum to refer to the enumerated class names. The names of enumeration members should be all capitalized, and words should be separated by underscores. Note: Enumeration is actually a special constant class, and the constructor is forced to be private by default. Positive example: enumeration name: DealStatusEnum, member name: SUCCESS/unknown _ REASON. 15. Refer to the naming convention of each layer: A) Service/DAO layer method naming convention 1) The method of obtaining a single object uses get as the prefix. 2) The method of obtaining multiple objects uses list as the prefix. 3) The method of obtaining statistical values uses count as the prefix. 4) The insert method is prefixed with save (recommended) or insert. 5) The deletion method is prefixed with remove (recommended) or delete. 6) The modified method uses update as the prefix. B) Domain model naming convention 1) Data object: xxxDO, xxx is the table name. 2) Data transmission object: xxxDTO, xxx is the name related to the business field. 3) Display object: xxxVO, xxx is generally the name of the webpage. 4) POJO is the collective name of DO/DTO/BO/VO, and it is forbidden to be named xxxPOJO. (2) Definition of constant 1. It is mandatory that any magic value (that is, undefined constant) is not allowed to appear directly in the code. Counterexample: stringkey = "id # taobao _"+tradeid; cache.put(key,value); 2. When forcing the initial assignment of Long or long, you must use uppercase L, not lowercase L, which is easy to be confused with the number 1, causing misunderstanding. Description: Length a = 2l Did you write the number 2 1 or the length 2? 3. It is suggested not to use a constant class to maintain all constants, but to classify and maintain them separately according to constant functions. For example, cache-related constants are placed under class: CacheConsts; Constants related to system configuration are placed under the class ConfigConsts. Note: For a large and complete constant class, you must use the query function to locate the modified constant, which is not conducive to understanding and maintenance. 4. There are five levels of recommended constant reuse: sharing constants across applications, sharing constants within applications, sharing constants within subprojects, sharing constants within packages and sharing constants within classes. 1) Cross-application * * * shared constants: put in the second-party library, generally under the constant directory in client.jar 2) Within-application * * * shared constants: put in the constant directory in the module of a library. Counterexample: variables that are easy to understand should also be defined as * * * shared constants in application. Two siege engineers defined the variable "yes" in two classes: in class A, public static final string yes = "yes"; Class b: public static final string YES = "yA.YES.equals(B.YES), which is expected to be true and actually returned to be false, resulting in online problems. 3) * * * Shared constants within subprojects: that is, under the constant directory of the current subproject. 4) * * * Enjoy constants in the package: that is, in a separate constant directory under the current package. 5) * * * Shared constants within the class: defined directly within the class. 5. If the variable value changes only within a range, it is recommended to use Enum class. If there are extended properties other than names, you must use the Enum class. The numbers in the following example are extended information, indicating a day of the week. Positive examples: public enum {Monday (1), Tuesday (2), Wednesday (3), Thursday (4), Friday (5), Sunday (6) and Sunday (7); (3) Format convention 1. Convention on the use of compulsory stents. If the braces are empty, write them directly as {} without line breaks; If it is a non-empty code block: 1), there is no line break before the opening brace. 2) Wrap the line after the opening brace. 3) Wrap the line before the closing brace. 4) The code such as else after the right parenthesis will not wrap; Indicates that a line break is required after the closing brace is terminated. 2. Force no space between the left parenthesis and the last character; Similarly, there is no space between the right parenthesis and the previous character. Please refer to the positive example under Article 5 for details. 3. Mandatory if/for/while/switch/do and other reserved words must have spaces between the left and right brackets. 4. Force any operator to add a space around it. Note: Operators include assignment operator =, logical operator &; &, symbols of addition, subtraction, multiplication and division, operators of three eyes, etc. 5.4 Spaces are forced to indent, and tabs are prohibited. Note: If you use tab indentation, you must set 1 tab to 4 spaces. When IDEA sets tabs to 4 spaces, do not check Use tabs; ; In eclipse, you must check the insertion spaces of tabs. Positive example: (involving 1-5 points) public static void main (string [] args) {indented by 4 spaces String say = "hello must be a space int flag = 0; on the left and right of the hello operator; There must be a space between the keyword if and brackets, and the f, 0 and right brackets in brackets and left brackets do not need the space if (flag = = 0) {system. Out.println (say); } put a space before the opening brace, without wrapping; If (flag = = 1) {system。 Out.println ("world ") follows the left brace; Line breaks before the right parenthesis, followed by else. No line breaks are required. Alibaba Java Development Manual-Prohibited for commercial purposes, offenders will be prosecuted -6/37} else {system. out . println(" OK "); If you end directly after the closing brace, you must break the line }} 6. Force the number of characters in a single line not to exceed 120, and break the line when necessary. Follow the following principles when breaking lines: 1) The second line is indented by 4 spaces relative to the first line, starting from the third line, and will not be indented any more. Reference examples. 2) The operator uses the following contents for packaging. 3) The dot symbol of the method call is wrapped with the following contents. 4) Multiple parameters are too long and wrap after commas. 5) Don't wrap before the brackets. See counterexample. Positive example: stringbuffer * * = new stringbuffer (); When it exceeds 120 characters, the newline character is indented by 4 spaces, and the dot symbol before the method is wrapped together * * *. Append ("child") ... Append ("xin") ... Append ("yellow") ... Append (. Counterexample: stringbuffer * * = new stringbuffer (); When it is longer than 120 characters, do not wrap * * *. Append ("child"). Append ("Xin") ... add ("yellow") before the brackets; A method call with many parameters may exceed 120 characters. Do not put packaging methods (args 1, args2, args3, ..., argsx) before commas; 7. When defining and passing in mandatory method parameters, spaces must be added after commas of multiple parameters. Positive example: The independent variable "A" in the following example must be followed by a space. Methods ("A", "B" and "C"); 8. Force the IDE's text file encoding to be UTF-8; The line breaks of files in the IDE are in Unix format, not in windows format. 9. It is suggested that there is no need to add some spaces to align the characters in one line with the corresponding characters in the previous line. Positive example: int a = 3;; Length b = 4 l float c = 5 fstringbuffer * * * = new stringbuffer (); Note: Add variable * * *. If alignment is needed, a, b and c should be added with several spaces, which is a tedious thing in the case of many variables. Alibaba Java Development Manual-Commercial use is prohibited and offenders will be prosecuted -7/37 10. It is suggested to insert blank lines between execution statement groups, variable definition statement groups, different business logics or different semantics in the method body. There is no need to insert blank lines between the same business logic and semantics. Note: there is no need to insert multiple lines of spaces for separation. (4) OOP protocol 1. It is mandatory to avoid accessing such static variables or static methods through class object references, which unnecessarily increases the parsing cost of the compiler and can be accessed directly with class names. 2. Force all override methods to be annotated with @Override. Counterexample: the problem of getObject () and get 0 object (). One is the letter o, and the other is the number 0. Adding @Override can accurately judge whether the override is successful or not. In addition, if the method signature is modified in the abstract class, its implementation class will compile immediately and report the error. 3. Only when the same parameter type and the same business meaning are forced to be used, can Java variable parameters be used and Object be avoided. Note: Variable parameters must be placed at the end of the parameter list. Encourage students to try not to use argument programming. ) positive example: public user getusers (string type, integer ... ids) 4. Force the interface that is being called externally or depends on the second party library, and do not modify the method signature to avoid affecting the caller of the interface. Obsolete interfaces must be annotated with @Deprecated and clearly explain what the new interface or service is. 5. It is mandatory not to use outdated classes or methods. Description: decoding (string encoding) method in java ... URLDecoder has expired, and two-parameter decoding (string source, string encoding) should be used. Since the interface provider is obviously an outdated interface, it is obliged to provide new interfaces at the same time; As a caller, it is an obligation to verify what the new implementation of the outdated method is. 6. It is easy to empty pointer exceptions by forcing the equals method of an object, so you should call equals with a constant or an object with a certain value. Positive example: "test". Equals (object); Counterexample: object. equals ("test"); Description: Java. util.objects # equals (a tool class introduced by JDK 7) is recommended. 7. Force comparison of values between all wrapped objects of the same type, and all wrapped objects use the equals method. Note: For integer var =? For the assignment between-128 and 127, integer objects are generated in IntegerCache.cache, and the existing objects will be reused. Integer values in this interval can be directly judged by = =, but data outside this interval will be generated on the heap, and existing objects will not be reused. This is a big pit, and it is suggested to use the equal sign method to judge it. 8. The usage criteria of basic data types and packaged data types are as follows: 1) All POJO class attributes must use packaged data types. 2) Force the return values and parameters of RPC methods to use wrapper data types. 3) It is recommended that all local variables use basic data types. Note: the POJO class attribute has no initial value to remind the user that it must be explicitly assigned when it needs to be used. Any NPE problem or warehousing inspection is the responsibility of the user. Positive example: the query result of the database may be empty, because there is NPE risk in automatically unpacking and receiving with basic data types. Counterexample: For example, it shows the fluctuation of total trading volume, that is, plus or minus x%, where x is the basic data type. When the RPC service call is unsuccessful, the default value is returned, and the page displays: 0%, which is unreasonable and should be displayed as a dash-. Therefore, the null value of wrapper data type can represent additional information, such as: remote call failed, abnormal exit. 9. When defining POJO classes (such as DO/DTO/VO), do not set any attribute default values. Counterexample: the default value of gmtCreate of POJO class is newdate (); However, when extracting data, the attribute is not put into a specific value, and when other fields are updated, the field will also be updated, resulting in the creation time being modified to the current time. 10. When adding attributes to the forced serialization class, please do not modify the serialVersionUID field to avoid deserialization failure; If the upgrade is completely incompatible and avoids deserialization confusion, modify the serialVersionUID value. Note: note that the inconsistency of serialVersionUID will throw an exception during serialization execution. 1 1. It is forbidden to add any business logic to the forced construction method. If there is initialization logic, please put it in the init method. 12. Force the POJO class to write a string method. When using the tool in IDE: source & gt to generate toString, if you inherit another POJO class, pay attention to adding super.toString in front of it. Note: When the method throws an exception, you can directly call POJO's toString () method to print its attribute value, which is convenient for troubleshooting. 13. It is recommended to use the index to access the array obtained by the split method of String. You need to check whether there is any content after the last delimiter, otherwise you will risk throwing IndexOutOfBoundsException. Description: String str = "a, B, C,, "; String[] ary = str.split(","); Expected to be greater than 3, the result is 3system. out.println (ary.length); 14. It is suggested that when a class has multiple constructors or multiple methods with the same name, these methods should be put together for easy reading. 15. It is suggested that the definition order of methods in the class is: public method or protection method >; Private methods > Getter/setter methods. Note: public methods are the most concerned methods for class callers and maintainers, and the first screen display is the best; Although the protection method is only concerned by subclasses, it may also be the core method under the "template design mode"; Private methods generally do not need special attention from the outside world, and are implemented in a black box; Because the value of method information is very low, all getter/setter methods of Service and DAO are placed at the end of the class body. 16. In the recommended setter method, the parameter name is the same as the class member variable name. Member name = parameter number. Try not to add business logic in the getter/setter method, which will increase the difficulty of troubleshooting. Counterexample: public integer getdata () {if (true) {returndata+100; } else {return data-100; }} 17. It is suggested to connect the strings in the loop and use the append method of StringBuilder to extend the package. Counterexample: String str = "startfor(int I = 0;; I< 100; i++){ str = str+" hello "; } Description: The decompiled bytecode file shows that a StringBuilder object will be created for each loop, and then an append operation will be performed. Finally, a String object will be returned through the toString method, resulting in a waste of memory resources. 18. The following situations are recommended, and it will be more suggestive to declare it as final: 1) Variables that do not need to be reassigned, including class attributes and local variables. 2) Giving the object real participation in final means that it is not allowed to modify the reference point. 3) The class method determines that it is not allowed to be overwritten. 19. It is recommended to use the clone method of Object carefully to copy objects. Note: By default, the cloning method of objects is shallow replication. If you want to achieve deep replication, you need to rewrite the cloning method to copy the attribute object. 20. It is suggested that the access control of class members and methods should be strict: 1) If it is not allowed to create objects directly through new, then the construction method must be private. 2) Tool classes are not allowed to have public or default constructors. 3) Class is a non-static member variable, which is shared with subclasses * * * and must be protected. 4) A class is not a static member variable, it is only used in this class and must be private. 5) Class static member variables must be private if they are used only in this class. 6) If it is a static member variable, you must consider whether it is final. 7) Class member methods can only be called within a class and must be private. 8) Class member methods are only exposed to inherited classes, so they are restricted to protected. Description: The access scope of any class, method, parameter and variable is strictly controlled. Too wide access range is not conducive to module decoupling. Thinking: If it is a private method, you can delete it if you want, but if you delete a public service method or a public member variable, don't you sweat? Variables are like your own children. Try to stay within your sight. The range of variables is too large. If you run around without restrictions, you will be worried.

What idioms seem to be wrong but are valid?

Happened to coincide, the secret contract was stolen, and it was agreed that the sea would meet the mountain alliance, the people would meet at dusk, the warbler would meet the swallow, the appointment was made first, the secret contract was stolen, and the secret contract came first.