上一页 1 ··· 24 25 26 27 28 29 30 31 32 ··· 47 下一页
摘要: Filter过滤器简介 Filter被称作过滤器或者拦截器,其基本功能就是对Servlet容器调用Servlet的过程进行拦截,从而在Servlet进行响应处理前后实现一些特殊功能。 当浏览器访问服务器中的目标资源时,会被Filter拦截,在Filter中进行预处理操作,然后再将请求转发给目标资源。 阅读全文
posted @ 2022-06-01 16:59 kingwzun 阅读(36) 评论(0) 推荐(0) 编辑
摘要: https://blog.csdn.net/g13197895299/article/details/123017413 解决方案: 阅读全文
posted @ 2022-06-01 16:24 kingwzun 阅读(270) 评论(0) 推荐(0) 编辑
摘要: from abc import ABCMeta, abstractmethod import math from webbrowser import BaseBrowser class Shape: __metaclass__=ABCMeta @abstractmethod def length(s 阅读全文
posted @ 2022-06-01 15:47 kingwzun 阅读(528) 评论(0) 推荐(0) 编辑
摘要: Python __ 面向对象基础 import math as m class Rect: l = 0.0 h = 0.0 z = 0.0 def __init__(self, l, h, z): self.l = l self.h = h self.z = z def length(self): 阅读全文
posted @ 2022-06-01 14:35 kingwzun 阅读(464) 评论(0) 推荐(0) 编辑
摘要: from cgi import print_arguments class Time: __hour=0 __minute=0 __second=0 #设置数据成员hour的值(采用12小时制),非法的输入默认为12; def setHour(self, h): if h>12 or h<0: se 阅读全文
posted @ 2022-06-01 11:08 kingwzun 阅读(573) 评论(0) 推荐(0) 编辑
摘要: 原文 定义类 class ClassName: #属性 . . . #方法 . . . 小样例: 代码里面的self作用相当于java中的this,表示当前类的对象,可以调用当前类中的属性和方法。 后面会详细说 class Point: x=0 y=0 def toString(self): ret 阅读全文
posted @ 2022-06-01 10:45 kingwzun 阅读(58) 评论(0) 推荐(0) 编辑
摘要: class Point: x=0 y=0 def __init__(self,xx,yy): self.x=xx self.y=yy def move(self,x1,y1): self.x+=x1 self.y+=y1 def toString(self): return "({},{})".fo 阅读全文
posted @ 2022-06-01 09:55 kingwzun 阅读(239) 评论(0) 推荐(0) 编辑
摘要: 概述 Python标准库fractions中Fraction类 能够自动对分子和分母进行约分,当分子分母中有负号时,自动约分并最终将负号归于分子 导入 from fractions import Fraction 实例化 Fraction类实例可以由一对整数,一个分数,或者一个字符串构建而成。 # 阅读全文
posted @ 2022-06-01 09:37 kingwzun 阅读(384) 评论(0) 推荐(0) 编辑
摘要: from fractions import Fraction as F while True: try: a = input() if a.find('+')!=-1: ls = a.split('+') print(F(ls[0]) + F(ls[1])) elif a.find('-')!=-1 阅读全文
posted @ 2022-05-31 17:15 kingwzun 阅读(55) 评论(0) 推荐(0) 编辑
摘要: from fractions import Fraction as F n=int(input()) for i in range(n): a = input() if a.find('+')!=-1: ls = a.split('+') print(F(ls[0]) + F(ls[1])) eli 阅读全文
posted @ 2022-05-31 17:13 kingwzun 阅读(466) 评论(0) 推荐(0) 编辑
上一页 1 ··· 24 25 26 27 28 29 30 31 32 ··· 47 下一页