The way of python learning (function and functional programming)

The way of python learning (function and functional programming) Definition of function Function is a programming method of logic structure and process The difference between a function and a procedure is that a function has a return value and a procedure has no return value # function def func1(): '''Test function''' print('fu ...

Posted on Tue, 19 May 2020 08:38:54 -0700 by mrMarcus

The black pot of YYYY-MM-DD, we don't carry it!

Author: Tony rabbit https://zhuanlan.zhihu.com/p/101150248 Writing this blog post is a record of cross year bug s. Last year, the next group's partner calculated the number of days between two dates, because the calculation was wrong for cross year reasons. At that time, the little sister of the test group did not simulate this scenario, whi ...

Posted on Tue, 19 May 2020 00:14:16 -0700 by subasi

When Tomcat meets Netty

Story background Di ~ Di ~ Di ~, production accident, memory leak! Yesterday afternoon, I suddenly received the message of operation and maintenance that the memory in the production environment of a system in the branch leaked, so I helped to check it. Troubleshooting process The first step is to log The exception log given by the branch is ab ...

Posted on Mon, 18 May 2020 20:57:27 -0700 by Skaara

Python beginner's prerequisite: do you understand metaclasses?

Class is also an object Before you understand metaclasses, you need to master the classes in Python. The concept of classes in Python is a bit strange in light of Smalltalk. In most programming languages, a class is a set of code snippets that describe how to generate an object. This is still true in Python: >>> class ObjectCreator(obj ...

Posted on Mon, 18 May 2020 02:07:56 -0700 by RyanSmith345

Explore Java 9 module system and reaction flow

Java 9 new features, Java modularization, Java reaction flow Reactive, Jigsaw catalog Modular system Module descriptor Modular application example Compile and execute Backward compatibility Reaction flow Flow class Internal implementation A simple application Application Processor API usage summary ...

Posted on Sun, 17 May 2020 21:08:21 -0700 by beachdaze

Encapsulating the Promise version of readFile

Write in front We all know that there are two types of file reading fs.readFileSync(); / / read synchronously fs.readFile(); / / asynchronous read Copy code Promise is a solution of asynchronous programming. Can we encapsulate a promise version of readFile? Intron Let's take a look at teacher Ruan Yifeng's explanation that javascript is ...

Posted on Sun, 17 May 2020 17:41:03 -0700 by wes007

Design of IIR filter for hand-held teaching series

[guide reading]: it is often necessary to collect analog signals in embedded systems. It is inevitable to introduce interference into the signal chain of collecting analog signals, so how to filter the interference? Let's take a step-by-step description of how to design and deploy an IIR filter to your system. What is an IIR filter? IIR (Infini ...

Posted on Sat, 16 May 2020 23:28:59 -0700 by Derek

Java 8 Stream API Learning Summary

The Java 8 API adds a new abstract called Stream, which allows you to process data in a declarative way.The Stream API can greatly increase the productivity of Java programmers, allowing them to write efficient, clean, and concise code.This style treats a collection of elements as a stream that is transported through the pipeline and can be pro ...

Posted on Fri, 15 May 2020 14:58:26 -0700 by mduran

After MySQL uses the column alias, Hibernate still reads the original column name instead of the alias

phenomenon hibernate cannot find the required field from the returned result set, such as user ﹣ name, when executing the program Error message: 2020-05-15 10:37:01.330 [INFO][org.hibernate.type.StringType][nullSafeGet][180]-> could not read column value from result set: from_classifier_id; Column 'from_classifier_id' not found. 2020-05 ...

Posted on Fri, 15 May 2020 09:05:36 -0700 by usacascl

@Java knowledge point -- immutable map

immutable  [ɪˈmjuːtəbl] adj. Unchanging; immutable; immutable Immutable object in Java: in short, if an object instance cannot be changed, it is an immutable object. A large number of value objects provided by the Java SDK, such as String, are immutable objects. Create immutable map Map<String,Object> immutableMap = new Immutabl ...

Posted on Fri, 15 May 2020 07:59:08 -0700 by samadams83