Golang has a precision problem when dealing with floating-point numbers. If you don't use decimal, you will have a big problem

Accuracy problems encountered by Golang in dealing with floating point numbers Golang easy learning 1, What is a floating point number? Floating point number is a digital representation of the number belonging to a special subset of rational numbers. It is used to approximately represent any real number in the computer. Floating poi ...

Added by sureshmaharana on Thu, 17 Feb 2022 22:04:08 +0200

Dynamic memory management

Stack memory and heap memory The declared variables and function names are stack memory, but heap memory is used in dynamic memory management. Stack memory is relatively compact, so it has large local correlation. There is a dynamic expansion in the heap during operation, and the release needs to be displayed. new is called at run time. ve ...

Added by argan328 on Thu, 17 Feb 2022 20:12:06 +0200

Day22 Java IO stream File, IO stream

File summary: If you want to realize IO stream operation, you must know the representation of files on the hard disk Java provides a class that allows us to manipulate files on the hard disk: file. File is the representation of a file File: abstract representation of file and directory (folder) pathnames. Construction method of File class ...

Added by cartoonjunkie on Thu, 17 Feb 2022 18:55:48 +0200

Stop writing the main method test. It's too Low. This is the professional Java test method

preface "If you cannot measure it, you cannot improve it". In daily development, there are many options for calling some code or using tools. When we are not sure about their performance, the first thing we want to do is to measure it. Most of the time, we will simply use multiple counts to measure the total time-consuming of this method. Ho ...

Added by FramezArt on Thu, 17 Feb 2022 17:34:25 +0200

day4 - daily summary and homework

*** Process control 1) Sequential structure: code is executed from top to bottom, and each statement is executed in sequence (default) 2) Branch structure: choose to execute or not execute part of the code according to the conditions (use if) 3) Loop structure: make the code execute repeatedly (for, while) Branching structure age = 10 if ag ...

Added by libinaz on Thu, 17 Feb 2022 16:36:48 +0200

JAVA foundation 06 - interface and polymorphism

1, Interface 1.1 what is the interface First of all, explain the rookie tutorial, which is very professional Interface (English: Interface), an abstract type in JAVA programming language, is a collection of abstract methods. Interfaces are usually declared as interfaces. A class inherits the abstract methods of the interface by inheritin ...

Added by Abarak on Thu, 17 Feb 2022 11:30:10 +0200

18 details of Spring transaction propagation mechanism

What is the transaction propagation mechanism The propagation mechanism of transactions, as the name suggests, is how to propagate transactions between multiple transaction methods. For example, method A is A transactional method. Method B is called when method A executes. Whether method B has A transaction or not and whether it needs A tr ...

Added by rajan on Thu, 17 Feb 2022 11:16:16 +0200

Embedded C language development file IO programming open/close/read/write/stat/fstat/lstat

open/close int fd2; fd2=open(argv[1],O_RDWR | O_CREAT | O_EXCL,0655); if(fd2==-1) { perror("open file error!"); exit(1); } printf("fd2=%d\n",fd2); int ret=close(fd2); printf("fd2=%d\n",fd2); printf("ret=%d\n",ret); Partial code O_RDONLY O_WRONLY O_RDWR: read only write only O_CREAT: create when the f ...

Added by jtrost on Thu, 17 Feb 2022 09:29:27 +0200

Different basic details of Java

Reading needs a certain foundation, which is not suitable for people who first know Java. There are some concise languages, some knowledge points or a brush, and you don't know that you need to consult the materials in detail. The purpose of this article is to supplement some details of Java foundation, some slightly in-depth places and some pl ...

Added by B34ST on Thu, 17 Feb 2022 06:13:07 +0200

Basic knowledge of Java exception and handling in Java

catalogue abnormal 1. Classification of anomalies 2. Two methods of handling exceptions try...catch...finally The difference between compile time exception and run-time exception: Methods in Throwable finally throws throw  The difference between throws and throw: abnormal Abnormal condition in Java program 1. Classification of ano ...

Added by johanafm on Thu, 17 Feb 2022 04:00:01 +0200