摘要: 1、CSS选择器 1.1 元素选择器 元素选择器根据元素名称来选择 HTML 元素。 p { text-align: center; color: red; } 1.2 id 选择器 根据id 属性来选择特定元素。 #box { text-align: center; color: red; } 1 阅读全文
posted @ 2023-03-15 18:09 诸葛卧龙仙人 阅读(29) 评论(0) 推荐(0)
摘要: HTML 是用来描述网页的一种语言。 HTML 指的是超文本标记语言 (Hyper Text Markup Language)。 1、HTML 标题 <h1> 定义最大的标题。<h6> 定义最小的标题。 <!DOCTYPE html> <html> <head> <meta charset="utf 阅读全文
posted @ 2023-03-15 17:42 诸葛卧龙仙人 阅读(148) 评论(0) 推荐(0)
摘要: class Singleton{ private Singleton(){ } private static volatile Singleton singleton = null; public static Singleton getInstance(){ if (singleton == nu 阅读全文
posted @ 2023-03-03 15:04 诸葛卧龙仙人 阅读(11) 评论(0) 推荐(0)
摘要: 1、折半查找又称为二分查找,仅适用于有序的顺序表。 class BinarySearch{ public int search(int[] a,int k){ int low = 0; int high = a.length-1; int mid; while (low <= high){ mid 阅读全文
posted @ 2023-03-03 08:43 诸葛卧龙仙人 阅读(20) 评论(0) 推荐(0)
摘要: 1、Spring4、SpringBoot1 1.1 代码实现 public interface Calculator { int div(int a,int b); } @Component public class CalculatorImpl implements Calculator{ @Ov 阅读全文
posted @ 2023-02-28 09:20 诸葛卧龙仙人 阅读(112) 评论(0) 推荐(0)
摘要: 1、引入依赖 <dependency> <groupId>org.junit.jupiter</groupId> <artifactId>junit-jupiter-api</artifactId> <version>5.9.1</version> </dependency> <dependency 阅读全文
posted @ 2023-02-27 19:02 诸葛卧龙仙人 阅读(21) 评论(0) 推荐(0)
摘要: 1、引入依赖 <!--spring aop依赖--> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-aop</artifactId> <version>6.0.2</version> </dependen 阅读全文
posted @ 2023-02-27 18:29 诸葛卧龙仙人 阅读(15) 评论(0) 推荐(0)
摘要: 1、定义接口 public interface Calculator { int add(int a,int b); int sub(int a,int b); int mul(int a,int b); int div(int a,int b); } 2、实现接口 public class Cal 阅读全文
posted @ 2023-02-27 15:19 诸葛卧龙仙人 阅读(15) 评论(0) 推荐(0)
摘要: 1、定义IOC容器接口 public interface ApplicationContext { public Object getBean(Class clazz); } 2、实现IOC接口 public class AnnotationApplicationContext implements 阅读全文
posted @ 2023-02-27 11:24 诸葛卧龙仙人 阅读(56) 评论(0) 推荐(0)
摘要: 1、类名.class Class clazz1 = User.class; 2、对象.getClass() Class clazz2 = new User().getClass(); 3、class.forName() Class clazz3 = Class.forName("com.jixian 阅读全文
posted @ 2023-02-26 20:38 诸葛卧龙仙人 阅读(17) 评论(0) 推荐(0)