abstract class Geometry{ public abstract double getArea();} class Pillar{ Geometry bottom; double height; Pillar(Geometry bottom,double height) { this ...
分类:
编程语言 时间:
2020-11-30 15:24:40
阅读次数:
4
编译期异常:写代码时候变为红色,可能会产生异常,需要处理才能执行,一般情况下, API 中写了 throws 的 Exception 都不是 RuntimeException 。 第一种方法,把异常抛出去 方法上 throws ,交给虚拟机来处理,当不匹配的时候,虚拟机就会将异常打印出来,终止程序。 ...
分类:
其他好文 时间:
2020-11-27 11:44:01
阅读次数:
8
1 try 2 { 3 byte[] buffer = UDPClient.Receive(ref _udpOpto.localPoint); 4 numberOfBytesRead = 0; 5 numberOfBytesRead = buffer.Length; 6 receiveBuffer ...
分类:
其他好文 时间:
2020-11-27 11:31:47
阅读次数:
9
NameError: name 'figsize' is not defined. 解决办法: 使用jupyter notebook Try using %pylab if %pylab inline does not work. 使用python脚本 from pylab import * ...
分类:
其他好文 时间:
2020-11-27 11:12:57
阅读次数:
7
saveImage()方法 // 分别获取当前日期 与小时做文件夹 SimpleDateFormat formapath = new SimpleDateFormat("yyyyMMdd"); SimpleDateFormat formahhpath = new SimpleDateFormat(" ...
分类:
编程语言 时间:
2020-11-26 14:51:02
阅读次数:
5
axios的拦截器可以在请求或者返回被Then或者是catch处理之前对他们进行拦截。拦截器的作用。主要是在发送请求之前做一些操作,比方说可以对对一些数据进行处理。比如给每个请求都给添加token或者给。或者是在相应之前请求拦截器。可以对返回的数据进行二次加工。例如在发送请求前相应进行操作axios.interceptors.request.use((config)=>{returnconf
分类:
移动开发 时间:
2020-11-26 14:33:31
阅读次数:
13
rabbitmq消息发送失败、 一、概述 rabbitmq消息发送失败,主要有三种 1、producter连接mq失败,消息没有发送到mq 2、producter连接mq成功,但是发送到exchange失败 3、消息发送到exchange成功,但是路由到queue失败 二、发送失败处理 produc ...
分类:
其他好文 时间:
2020-11-25 12:38:28
阅读次数:
4
视图说明 1. 两个基类 1)APIView rest_framework.views.APIView APIView是REST framework提供的所有视图的基类,继承自Django的View父类。 APIView与View的不同之处在于: 传入到视图方法中的是REST framework的R ...
分类:
其他好文 时间:
2020-11-25 12:30:41
阅读次数:
6
模块化规范 传统开发模式主要问题 /* 1. 命名冲突 2. 文件依赖 */ 通过模块化解决上述问题 /* 模块化就是把单独的一个功能封装在一个模块(文件)中,模块之间相互隔离, 但是可以通过特定的接口公开内部成员,也可以依赖别的模块. 模块化开发好处: 方便代码的重用,从而提高开发效率,并且方便后 ...
分类:
Web程序 时间:
2020-11-24 13:04:23
阅读次数:
29
1、pom 包配置 我们使用 Spring Boot 版本 2.1.0、jdk 1.8、tomcat 8.0。 <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</a ...
分类:
编程语言 时间:
2020-11-24 12:18:53
阅读次数:
9