Objective The present study aimed to evaluate the accuracy of the factorial method for estimating energy needs in individuals living in China.Methods Sixteen healthy female adults aged 22.1±1.2 years with a body ...Objective The present study aimed to evaluate the accuracy of the factorial method for estimating energy needs in individuals living in China.Methods Sixteen healthy female adults aged 22.1±1.2 years with a body mass index (kg/m 2) of 20.4±1.7 were selected as subjects.In free-living conditions,energy expenditure (EE) was determined by using the factorial method.At the same time,the doubly labeled water method (DLW) was also used to measure energy expenditure of the subjects and served as the criterion method.EE predicted by the factorial method (EE factorial) was compared with the simultaneous measurement of EE by the validated DLW method (EE DLW).Results There was excellent agreement between EE factorial (7.46±0.59 MJ/d) and EE DLW (7.64 ± 0.49 MJ/d),with a difference of-2.6±4.9% (-0.18±0.36 MJ/d).No significant differences were found between the two methods.EE factorial was highly correlated with EE DLW (r=0.795,P0.001) and a good agreement for individuals was found by using the Bland and Altman test.Conclusion The factorial method gives satisfactory estimates of EE for both groups and individuals living in China.展开更多
Complex conditional statement is one of the bad code smells, which affects the quality of the code and design of software. In the proposed approach, two commonly-used design patterns for handling complex conditional s...Complex conditional statement is one of the bad code smells, which affects the quality of the code and design of software. In the proposed approach, two commonly-used design patterns for handling complex conditional statements are selected, and they are the factory method pattern and the strategy pattem. Two pattern-directed refactoring approaches based on the two design patterns are proposed. Each approach contains a refactoring opportunities identification algorithm and an automated refactoring algorithm. After parsing the abstract syntax tree generated from source code, the refactoring opportunities are identified effectively and automatically. Then, for candidate code, refactoring algorithms are executed automatically, which are used to simplify or remove complex conditional statements. By empirical analysis and quality assessment, the code after refactoring has better maintainability and extensibility, and the proposed approach for automated pattern-directed refactoring succeeds to reduce code size and complexity of classes.展开更多
基金supported by the National Natural Science Foundation of China (No. 30771811)the Scientific Research Foundation of Hebei Medical University for the Young Core Instructor (No. 30900143)
文摘Objective The present study aimed to evaluate the accuracy of the factorial method for estimating energy needs in individuals living in China.Methods Sixteen healthy female adults aged 22.1±1.2 years with a body mass index (kg/m 2) of 20.4±1.7 were selected as subjects.In free-living conditions,energy expenditure (EE) was determined by using the factorial method.At the same time,the doubly labeled water method (DLW) was also used to measure energy expenditure of the subjects and served as the criterion method.EE predicted by the factorial method (EE factorial) was compared with the simultaneous measurement of EE by the validated DLW method (EE DLW).Results There was excellent agreement between EE factorial (7.46±0.59 MJ/d) and EE DLW (7.64 ± 0.49 MJ/d),with a difference of-2.6±4.9% (-0.18±0.36 MJ/d).No significant differences were found between the two methods.EE factorial was highly correlated with EE DLW (r=0.795,P0.001) and a good agreement for individuals was found by using the Bland and Altman test.Conclusion The factorial method gives satisfactory estimates of EE for both groups and individuals living in China.
文摘Complex conditional statement is one of the bad code smells, which affects the quality of the code and design of software. In the proposed approach, two commonly-used design patterns for handling complex conditional statements are selected, and they are the factory method pattern and the strategy pattem. Two pattern-directed refactoring approaches based on the two design patterns are proposed. Each approach contains a refactoring opportunities identification algorithm and an automated refactoring algorithm. After parsing the abstract syntax tree generated from source code, the refactoring opportunities are identified effectively and automatically. Then, for candidate code, refactoring algorithms are executed automatically, which are used to simplify or remove complex conditional statements. By empirical analysis and quality assessment, the code after refactoring has better maintainability and extensibility, and the proposed approach for automated pattern-directed refactoring succeeds to reduce code size and complexity of classes.