C + + exception handling mechanism from simple to deep, and the bottom analysis of function call assembly process Bottom layer simulation of C++11 intelligent pointer

I abnormal 1.1. Programming model and basic usage of exceptions Let's use it to explain the above model double Div(int a, int b) { if (b == 0) throw "Zero Div";//Throw a string constant cout << "If an exception is thrown, Cut yourself and all at once, Will not execute" << endl; return (double)a / (double)b; } int main() { ...

Added by ChrisBoden on Fri, 25 Feb 2022 15:50:17 +0200

Are you sure you don't know about python anonymous functions anymore?

The previous chapter described custom functions, while anonymous functions are a special case of custom functions. It only needs one line to define functions and has a cool name 'lambda' 1, Foundation # definition lambda arg1,arg2,arg3,...argn:expression # For example, the previously defined my_sum function def my_sum(num1, num2): re ...

Added by wheelbarrow on Fri, 25 Feb 2022 15:15:13 +0200

C + + learning notes

catalogue I What is operator overloading II How operators are overloaded 1. Friend overload 2. Class member function overloading III Special operator overloading 1. Stream operator 2. Self increasing and self decreasing operator overloading and text overloading (1) Self increasing and self decreasing (2) Text overload (3) Implicit con ...

Added by xinnex on Fri, 25 Feb 2022 15:06:01 +0200

Java is really not difficult to Log4j log

Log4j log: What is Log4j? log4j is a common logging framework, which is used to record the execution process or exceptions of the application. It is recorded in the log file. The operation and exception information of the application can be known through the log file. Why log? We know that the program will produce a lot of information during ...

Added by Warptweet on Fri, 25 Feb 2022 14:59:00 +0200

[Spring] principle and implementation of AOP

1, Gossip I'm a little sleepy today, but I still insist on learning for a while. Today, let's take a look at another major feature of Spring, AOP 2, Basic points 1. Basic concepts AOP means aspect oriented programming. It is a technology to realize the unified maintenance of program functions through precompiled mode and dynamic agent during ...

Added by washbucket on Fri, 25 Feb 2022 14:33:29 +0200

JAVA object oriented

1. Basic concepts of inheritance Inheritance is one of the three object-oriented features. Inheritance is everywhere. Inheritance is not only code reuse, but also the essence is to write code with abstract thinking in order to achieve stronger scalability of the program Inheritance is the process of creating a new class from an existin ...

Added by darkerstar on Fri, 25 Feb 2022 12:28:34 +0200

C language: file operation

  catalogue 1, Classification of documents 2, File pointer 3, Open and close files 4, How to read and write files 1. Sequential reading and writing of documents 1. fputs write file 2. fgetc reads files 3. fputs write file 4. fgets reading files 5. fprintf write formatted data 6. fscanf read formatted data 7. fwrite binary write fil ...

Added by plus2net on Fri, 25 Feb 2022 11:33:10 +0200

Implementation of skynet timer

I Data structure of timer skynet timer uses a timer data structure to save data, as follows: struct timer { struct link_list near[TIME_NEAR]; //The event queue closest to the current time is retrieved from this queue every time a tick is made struct link_list t[4][TIME_LEVEL]; //An event queue that is far from the current t ...

Added by ojav on Fri, 25 Feb 2022 10:49:43 +0200

Introduction to Python zero Basics - 16 - collections in Python

What is a collection? A set is an unordered and unrepeatable sequenceIts basic usage includes member detection and de duplicationSet objects also support mathematical operations such as union, intersection, difference set, symmetric difference and so onAll elements in the collection are placed in the middle of {} and separated by commas d ...

Added by cmpennington on Fri, 25 Feb 2022 02:10:58 +0200

Test Tengine Open Source Dubbo Function

Python WeChat Subscription Applet Course Video https://edu.csdn.net/course/detail/36074 Python Actual Quantitative Transaction Finance System https://edu.csdn.net/course/detail/35475 This article has been included https://github.com/lkxiaolou/lkxiaolou Welcome to star. Search focuses on WeChat's public number "Insect Catcher Master& ...

Added by hannnndy on Thu, 24 Feb 2022 19:31:16 +0200