2、Prop 1)、大小写问题 根据官网给的规范大概就是内部命名用驼峰命名,外部调用就使用其等价的 kebab-case (短横线分隔命名) 命名。养成一个好习惯是很有必要的,人家咋说你咋做呗。 2)、对传入属性的设置 我们可以对传入的属性设置type,官方定义的传入类型有String,Number ...
分类:
其他好文 时间:
2020-05-26 01:01:03
阅读次数:
75
一. 可以之际像c语言一样用System.out.printf()格式化输出 二. System.out.format 1. format()方法模仿自printf(), 可用于PrintStream或PrintWrter对象,其中也包括System.out对象 三.Formatter类 1.在ja ...
分类:
编程语言 时间:
2019-01-24 13:18:50
阅读次数:
186
字符串 增 改 strip()删除首和尾的空格 str.lstrip() 删左首空格 str.rstrip() 删右尾空格 st.lower() 将当前字符串的英文全部修改为小写字母 st.upper() 将当前字符串的英文全部修改为大写字母 st.capitalize()如果当前字符串的第一个字符 ...
分类:
其他好文 时间:
2018-11-05 00:05:34
阅读次数:
148
import timefrom hashlib import sha1import hmacdef get_signal(time_stamp): b=b"sdffsdfs" a = hmac.new(b, digestmod=sha1) # HMAC key a.update(time_stamp ...
分类:
其他好文 时间:
2018-05-13 16:56:19
阅读次数:
194
##元字符:.^$*+?{}[]|()\在re中最重要的就是元字符与findall配合使用 # re模块(就是正则表示式模块)主要功能就是做匹配 #正则表达式(re)是一种小型的高度专业化的编程语言, #例子:12345665、4563111、4565778、可以通过123.。。6+*正则匹配 im... ...
分类:
其他好文 时间:
2018-05-12 16:19:29
阅读次数:
283
内置函数 __str__ __repr__ 当需要使用__str__的场景时找不到 __str__就找__repr__当需要使用__repr__的场景时找不到__repr__的时候就找父类的repr双下repr是双下str的备胎 class List: def __init__(self,*args ...
分类:
其他好文 时间:
2018-04-19 18:21:36
阅读次数:
165