代理模式 代理模式分为静态代理和动态代理.下图为静态代理结构图: 静态代理示例代码: // 抽象主题接口 public interface Subject { void request(); } // 具体主题角色 public class RealSubject implements Subjec ...
分类:
其他好文 时间:
2021-04-20 15:00:18
阅读次数:
0
定义一个学生类,包含学号、姓名、成绩等属性。(1)使用重载函数定义多个构造函数。(2)使用默认参数定义构造函数。 #include<iostream> #include<string> using namespace std; class Student { public: Student(){ n ...
分类:
编程语言 时间:
2021-04-20 14:48:10
阅读次数:
0
微信搜索??「程序员小熊」,关注这个写干货的程序员,回复「算法」或「python」,即可获取经典算法或 python 电子书籍~ ...
分类:
其他好文 时间:
2021-04-20 14:42:03
阅读次数:
0
目录 | 上一节 (9.1 包) | 下一节 (9.3 版本分发) 9.2 第三方模块 Python 拥有一个包含各种内置模块的大型库(自带电池(batteries included))(译注:“自带电池”来自于官方文档的翻译,意为“功能齐全”)。 甚至还有很多第三方模块(可以使用)。请到 Pyth ...
分类:
编程语言 时间:
2021-04-20 14:41:48
阅读次数:
0
【python】Leetcode每日一题-存在重复元素3 【题目描述】 给你一个整数数组 nums 和两个整数 k 和 t 。请你判断是否存在 两个不同下标 i 和 j,使得 abs(nums[i] - nums[j]) ? t ,同时又满足 abs(i - j) ? k 。 如果存在则返回 tru ...
分类:
编程语言 时间:
2021-04-20 14:30:59
阅读次数:
0
https://blog.csdn.net/weixin_32572129/article/details/112536413 https://blog.csdn.net/qq_33431368/article/details/84777906 https://www.cnblogs.com/For ...
分类:
编程语言 时间:
2021-04-20 14:30:22
阅读次数:
0
golang easyjson使用 1.先安装easyjson go get -u github.com/mailru/easyjson/ 2.在结构体上加//easyjson:json的注解 //easyjson:json type School struct { Name string `jso ...
分类:
Web程序 时间:
2021-04-20 14:21:08
阅读次数:
0
1.饿汉式,这种方式不推荐,会造成资源的浪费。 public class Hungry { private Hungry(){ } private static Hungry hungry = new Hungry(); public static Hungry getInstance(){ ret ...
分类:
其他好文 时间:
2021-04-20 14:07:56
阅读次数:
0
Pyinstaller原理详解 什么是Pyinstaller Pyinstaller可以把Python程序打包成exe文件,可以在没有Python的电脑上运行,主要用于生产用。 Python.h! 在讲原理之前,我们讲一下python.h这个东东。 众所周知,Python是用C语言编写的,内部各种复 ...
分类:
其他好文 时间:
2021-04-20 14:07:38
阅读次数:
0
public class Main { public static void main(String[] args) { test test = new test(); test.xxx(new zi()); } } class fu{ public void x(){ System.out.pri ...
分类:
其他好文 时间:
2021-04-20 14:06:09
阅读次数:
0