The company's computers are very bad (especially hard drives ). A sudden power failure occurred many times over the past few days. This may cause some data loss. When oracle is connected using OTL, the environment variable is changed. Cause a series
Several customers use the same subset of the class interface, or the interfaces of the two classes are the same.Extracts the same subset into an independent interface.
Motivation: There are several ways of mutual use between classes. "Using a
you can often see the same 3 , 4 item data: 2 the same fields in the classes and the same parameters in many function signatures. The data that is always tied together should have their own objects. First, find out where the data appears in the
You use the delegate relationship between two classes, and often write many very simple delegate functions for the entire interface.Let the delegate class inherit the delegate class.
Motivation: This refactoring is the opposite of replace
A function returns a specificCodeTo indicate an error.Switch exception.
Motivation:ProgramAnd do not necessarily know how to handle the error. When a subroutine discovers an error, it needs to let its callers know the error, and the caller may also
The aspx syntax is relatively simple, so the aspx parser is almost completely implemented through regular expressions. The razor parser is very different from the aspx parser. It is actually divided into three independent components:
1) understand
A field in the class should be set as a value when the object is created, and then it will not be changed.Remove all set-value functions of this field.
Motivation: If you provide a value setting function for a field, it implies that the field
The function name does not reveal the function's purpose.Modify the function name.
Motivation: A strongly advocated programming style is to break down complicated processing into small functions. However, if you do not do well, this will make
When the coil is left, it is 0, no capturing, and the image length is 0. Confirm according to this point ~~ --- 0 --- no screenshot --- exit. ------ The length of the PIC is 0. Based on this, we can determine whether there is a captured image.
[HKEY_LOCAL_MACHINE \ SOFTWARE \ Ubisoft \ prince of Persia the two thrones \ 1.00.999]"Product_path" = "W: \ prince of Persia t2t""Product_executable" = "princeofpersia.exe""Product_language" = "9""Product_release" = "retail na""Profiles_path" = "C:
In the production environmentTomcatIf the memory is not set properly, memory overflow may easily occur. The memory causes are different, and the processing methods are also different.
Here we will summarize the situation and relevant information.
You wantAlgorithmReplace it with another algorithm that is clearer.Replace the function Ontology with another algorithm.
StringFoundperson (String[] People) { For(IntI = 0; I { If(PEOPLE [I]. Equals ("Don")) { Return "Don"; }
This method can improve the execution efficiency of statements to be executed repeatedly. When using this method, you must name the three parameters of parameters. Otherwise, an exception occurs.
See the followingCode:
Code
Code
beginners of object technology generally do not want to use small objects in small tasks - class money , A range class consisting of a start value and end value. You can use replace data value with object (replace data value with object)
2Each class must use the other feature, but only one-way connection is required.Add one reverse pointer and enable the modified function to update two connections at the same time.
Motivation: at the initial stage of development, you may
In many cases, winform also needs to be like webform. When entering some content, it will automatically display more or similar content. Baidu and Google use this method.
This makes it easier for many users to use the system you designed. In the
Only numbers are allowed: "^ [0-9] * $ ".
Only n digits can be entered: "^ \ D {n} $ ".
You can only enter at least N digits: "^ \ D {n,} $ ".
Only M ~ can be input ~ N-digit :. "^ \ D {m, n} $"
Only numbers starting with zero and non-zero
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.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service