Write lisp interpreter in java (5 problems with custom if)

As we have defined the if function above, there is still a problem. That is, when the parameter is atom or a simple function that does not involve recursion, everything is normal. If the recursion function is involved, there will be a problem. Here is a classic example(define fact (lambda ( n) (if (= n 1) 1 (* n (fact (- n 1)))))) ...

Added by StripedTiger on Sat, 12 Feb 2022 04:42:40 +0200

android custom view draw a clock

In this article, we will customize a View to implement a clock. Let's take a look at the rendering first. Here is just a static picture. In fact, the second hand is moving. As for other effects, you can add them on your own. 1. Attribute setting Create a new file attrs. In the res/values directory XML, in which we will define the attributes r ...

Added by Jtech on Sat, 12 Feb 2022 04:15:02 +0200

Chapter 9 constructor of JavaSE topic

1. Constructor overview (1) Introduction to constructor Constructor: it is a special method of class to complete the initialization of new objects; //Constructor definition method [Modifier ] Method name(parameter list ){ Method body; } (2) Constructor considerations ① The modifier of the constructor can be default or public, protecte ...

Added by corporateboy on Sat, 12 Feb 2022 02:23:20 +0200

Dubbo source code reading 6: Dubbo dynamically generated classes

Section 1 Dubbo dynamically generated classes When dubbo calls the exportServices() method, it will use code generation technology to dynamically generate the subclasses of Protocol$Adaptive, ProxyFactory$Adaptive and Wrapper. Dubbo uses javassist to dynamically generate classes. Dubbo has two scenarios using dynamic classes. 1)ExtensionLo ...

Added by waffle72 on Sat, 12 Feb 2022 01:49:11 +0200

[SSM basics] Spring learning notes

Spring notes 1, Spring understand Spring concept: make the existing technology easier to use, integrate the existing technical framework, and simplify enterprise application development; advantage: Spring is a free and open source framework Spring is a lightweight, non intrusive framework that has no impact after adding the spring framework ...

Added by pinhead on Sat, 12 Feb 2022 01:18:35 +0200

Notes on Java from introduction to mastery

Special course (comprehensive case) Programming thinking training 1. Programming thinking The ability to use the learned Java technology to solve problems and write code 2. Suggestions on improving programming thinking and programming ability Programming thinking and programming ability are not formed overnight. It takes time to precip ...

Added by MnilinM on Sat, 12 Feb 2022 00:58:10 +0200

Control inversion, dependency injection and dependency inversion are indistinguishable?

Through this article, you will understand What is inversion of control (IoC)? What exactly does "reversal" reverse? What is the relationship between Spring and IOC? What are dependency injection (DI) and Dependency Inversion Principle (DIP)? What is the relationship between IOC, DI and DIP? 1. Control reversal (IoC) 1.1 ...

Added by advancedfuture on Sat, 12 Feb 2022 00:20:58 +0200

spring integrates the core principles of mybatis

In mybatis, I often use @ MapperScan annotation. Let's see how it is integrated into spring. First, when we enter MapperScan, we will see @ import (mapperscannerregister. Class) When we open mappercannerregister, we will see that the importbeandefinitionregister interface is implemented. This interface will call the registerBeanDefinitions ...

Added by Phirus on Fri, 11 Feb 2022 23:51:54 +0200

Lettuce source code Analysis-1 [synchronous operation]

1, ForewordOfficial document address: https://lettuce.io/core/5.3.7...  recently, due to work requirements, we need to understand some implementation principles of lettuce. As can be seen from the directory of the official documents, lettuce implements a wealth of business functions, supports three execution modes: synchronous blocking, Fu ...

Added by excence on Fri, 11 Feb 2022 23:25:31 +0200

Dynamic loading is not suitable for array classes? How to dynamically load an array class?

Absrtact: since the array is a class, what is the compiled class name? What about the classpath? Why is dynamic loading not suitable for arrays? How to dynamically load an array? This article is shared from Huawei cloud community< [JAVA cold knowledge] dynamic loading is not suitable for array classes? How to dynamically load an array cla ...

Added by usamaalam on Fri, 11 Feb 2022 23:02:40 +0200