上一页 1 2 3 4 5 6 7 8 ··· 14 下一页
摘要: 1.设计模式选型 行为型(策略模式),为消除if-else 实现代码的松耦合而存在 2.思路:将行为的决策权交给枚举,有多少种情况就需要定义多少个枚举类型,匹配时根据枚举类型中的键值进行决策。 3.talk is cheap, show me the code 4.代码实现: 4.1定义一个超级父类 阅读全文
posted @ 2020-06-08 17:04 海的味道 阅读(2321) 评论(0) 推荐(0) 编辑
摘要: <!DOCTYPE html> <html> <head> <title>t.html</title> <meta name="content-type" content="text/html; charset=GB2312"> <meta name="keywords" content="keyw 阅读全文
posted @ 2020-05-21 16:27 海的味道 阅读(858) 评论(0) 推荐(0) 编辑
摘要: 上代码: <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="viewport" content="initial-scale= 阅读全文
posted @ 2020-05-19 09:35 海的味道 阅读(440) 评论(0) 推荐(0) 编辑
摘要: 说明:代码来源网络,此处只做记录,方便日后使用 <html> <style> #demo{width:300px;margin:0 auto; overflow:hidden} #indemo{width:300%} #demo1{width:300px; float:left} #demo2{wi 阅读全文
posted @ 2020-05-18 18:28 海的味道 阅读(4008) 评论(0) 推荐(0) 编辑
摘要: 1.测试类 mutiQuery.java /** * 多线程并发访问 * @author HUAWEI * */ public class mutiQuery { // 自定义工作线程 private static class Worker extends Thread { private Cycl 阅读全文
posted @ 2020-03-17 17:12 海的味道 阅读(2761) 评论(0) 推荐(0) 编辑
摘要: 1.准备工作 1)下载mail-1.4.jar 2) 下载activation-1.1.jar 如果是maven项目,引入依赖: <!-- https://mvnrepository.com/artifact/javax.mail/mail --> <dependency> <groupId>jav 阅读全文
posted @ 2020-03-16 15:27 海的味道 阅读(1760) 评论(0) 推荐(0) 编辑
摘要: 1.数组实现的栈 #include <stdio.h> #include <string.h> #include <stdlib.h> #define MAXSIZE 5 /** *数组实现的栈,缺点,容量固定 **/ typedef struct{ int data[MAXSIZE]; int i 阅读全文
posted @ 2020-02-16 14:10 海的味道 阅读(372) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h> #include <stdlib.h> #include <string.h> //#define LEN sizeof(LinkedList); typedef struct Student{ int score; char name[10]; struct 阅读全文
posted @ 2020-02-15 14:26 海的味道 阅读(762) 评论(0) 推荐(0) 编辑
摘要: 1.工具类基类(配置类):ExecutorSchdule 1 public interface ExecutorSchdule { 2 3 //corePoolSize 表示允许线程池中允许同时运行的最大线程数。 4 int corePoolSize = 40; 5 6 //maximumPoolS 阅读全文
posted @ 2020-01-20 13:51 海的味道 阅读(532) 评论(0) 推荐(0) 编辑
摘要: 目标:测试option的过滤,链式操作: 代码: 阅读全文
posted @ 2019-04-30 13:32 海的味道 阅读(1471) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 ··· 14 下一页