• Can const member functions take non const pointers as return values?


    Let’s start with a piece of code class A { int *x; public: int *f() const { return x; } }; Member functionfReturn to private memberxI think it will modify the membersx, right? fyesconstMember function, I should add it before the return typeconstIs that right? constThe member function should guarantee that it cannot change any […]

  • Big data development hive common date function


    The front is a summary of commonly used date functions, and the back is a continuous date SQL topic and its solution routine. 1. Current date and time select current_timestamp — 2020-12-05 19:16:29.284 2. Get the current date, which is 2020-12-05 SELECT current_date; ## OR SELECT current_date(); — 2020-12-05 3. Get the time stamp of […]

  • Rust programming: memory layout


    1. Each type has a data alignment attribute. On the X86 platform, both U64 and f64 are 32-bit aligned. 2. The size of a type is an integral multiple of its alignment property, which ensures that the offset of the value of this type in the array is an integral multiple of its type size, […]

  • Detailed explanation of native array method in JavaScript


    In JS, arrays can be constructed by array constructor or[]Literal quantity. Array is a special object, inherited from the object prototype. However, when typeof is used to judge, it does not have a specific value and still returns’ object ‘. But use the [] instanceof array to return true. This shows that there is an […]

  • Does the team still need scrum master? -After the team matures (transfer)


    This article is reproduced from the official account of WeChat, “the North Ming tangerine”. The author: Guan Tingting. When can we get rid of this As team members become more familiar with the scrum process, the work of Scrum master gradually decreases. Many people have a question: do mature scrum teams still need a scrum […]

  • The use of Yii redis Zset ordered set


      Similar to hash which stores the mapping relationship between key and value, ordered set also stores the mapping between member and score, and provides score processing commands, as well as commands to fetch and scan member and score in order according to score. Here are some common commands and their use in Yii. ZADD […]

  • Study day 46


    C++ 1. Constructor 1. For a special member in a class, its name is the same as the class name. When creating a class object, the special member will be automatically called by the system 2. Forget to call manually 3. The purpose is to initialize the data members of class objects 4. The constructor […]

  • Big data development – Data Warehouse ads layer index calculation


    Ads layer data is often the final result index data, which is used in large screen display or real-time stream processing. Practice how to write SQL in large screen display through the following two examples. 1. Member analysis case 1.1 data preparation The table structure is as follows. This table is a member table of […]

  • Write a framework with ioc-aop-mvc function from scratch — learning notes — 05. Implement container dependency injection


    1. Implementation ideas and contents to be completed Realization idea Define related annotation labels The implementation creates the annotated member variable instance and injects it into the member variable marked by @ Autowired What needs to be done Write classutil # setfield method to set property value for corresponding instance Write @ Autowired annotation Write […]

  • Java foundation — final and static keywords


    1. Final keyword The final keyword stands for “final”, “immutable” 1.1 modifying variables Member variable – represents that the current variable is a constant stored in the method area.Must be explicitly initialized, that is, it can be initialized at the time of definition or in the constructor! Local variables – variables are immutable throughout the […]

  • Study day 47


    C++ Implement the member function inline in the class definition Class member functions are defined and treated as inline inline functions The success of inline depends on the compiler Const If const is added at the end of a member function, const, const, const, const, const, const, const, const, const, const, const, const, const, const, […]

  • Study day 48


    C++ 1. Initialization of const member variable 1. The initial value 2. You can’t assign values to initial values, you can only initialize values in the list 2. Default constructor 1. Functions without function parameters 2. The generated object will definitely call the constructor. If there is no constructor, it will be initialized by default […]