U-Boot source code reading and analysis 001: U-Boot code style and coding standards

Most of the content of this article is translated from U-Boot official documentation https://u-boot.readthedocs.io/en/latest/develop/codingstyle.html Article directory Preface U-Boot coding style U-Boot documentation writing Use structures for I/O access Header file inclusion order file name Comments on functions and structures Device driver modelDM other test Foreword Before officially entering the reading and writing of U-Boot source […]

How to correctly comply with Python coding standards

Foreword There is no rule without rules, and the same is true for code. This article will introduce some of the more commonly used Python code specifications that you follow when doing your own projects. Naming Case Module name writing: module_name Package name writing: package_name Class name: ClassName Method name: method_name Exception name: ExceptionName Function […]

Solve sklearn.exceptions.NotFittedError: This StandardScaler instance is not fitted yet. Call fit wi

Table of Contents Solve sklearn.exceptions.NotFittedError: This StandardScaler instance is not fitted yet. Call ‘fit’ with appropriate arguments before using this estimator. Problem Description solution 1. Check code logic 2. Use Pipeline 3. Use fit_transform in conclusion Practical application scenario: house price prediction Introduction to scikit-learn Features Common uses Sample code Resolve sklearn.exceptions.NotFittedError: This StandardScaler instance […]

20|Production acceleration: What coding standards need to be considered in C projects?

In the previous lectures of this module, we mainly introduced the C standard library that can speed up project coding, as well as related techniques for optimizing C code. In the next three lectures, we will introduce the coding standards, automated testing and structured compilation that need to be paid attention to during engineering collaboration […]

[Practice] DDD scaffolding and coding standards

1. Background introduction Our team has been continuously promoting the systematic governance of business systems, and in the process we have developed our own DDD scaffolding project. The scaffolding project is an important part of the systematic governance process. It has two functions: Can carry out unified specifications for new projects Provide guidance on DDD […]

Go language specification: high-quality programming and coding standards

1. Introduction High-quality programming refers to writing code that is readable, maintainable, testable, and performant with high standards and good practices. Whether the various boundary conditions are considered complete Abnormal situation handling, stability guarantee Easy to read and maintain (1) Coding principles From the perspective of instructions, how to code in development can reduce the […]

The first generation of microservice solution standards-SpringCloudNetflix-Day01

Spring Cloud Netflix 1. The evolution of application architecture Monolith –> Distributed –> SOA –> Microservices –>… 1. Monolithic application architecture 1.1. Concept Monolithic architecture: All modules, components…are in one application and finally packaged into a (war, jar) package and deployed with a container (Tomcat). Usually, one application shares one database. 1.2. Advantages and disadvantages […]

CMake: Setting Language Standards (3)

Set language standard (3) preface C++20 new features Add keywords New identifier module import header file Ranges coroutine Concepts Updates to Lambda Expressions Updates to constant expressions (constexpr) atomic smart pointer Automatically merge (Joining), can interrupt (Cancellable) thread Synchronization library std::atomic_ref other updates Introduction This article is the last one of the current C++ features. […]

CMake: Setting Language Standards (2)

CMake: Setting Language Standards (2) preface C++14 new features Function return type deduction variable template Alias template constexpr limitations [[deprecated]] tag Binary Literal and Integer Literal Separators std::make_unique std::shared_timed_mutex and std::shared_lock std::integer_sequence std::exchange std::quoted C++17 new features Constructor template deduction structured binding if-switch statement initialization inline variable fold expression constexpr lambda expression namespace nesting __has_include […]