VirtualBox 6.1 扩容VDI磁盘容量
确保对应的虚拟机已经关机!!!
All articles in 未分类
git 操作
补充资料看这里!!!https://git-scm.com/book/zh/v2
Linux上安装运行VirtualBox的步骤
通过命令行和GUI方式,在Linux/Centos 6.7上安装、设置并运行VirtualBox虚拟机Windows 7/10镜像,安装增强功能包,开启Seamless/无缝模式
在windows上使用rsync
Rsync Run on Linux:cwRsync Server 和 Git Bash+Rsync
leetcode #468. 验证IP地址 警告
这个题不要做了,通过率低纯粹是SB,你按照标准的IPv4/IPv6以及题目的要求写代码,仍然通不过,SB!
题目提示也不要信!!!
最好的办法就是一次次试,一次次出错找到用例进行改。
浪费时间和精力。
烂题!
想体验的可以提交我下面的例程,玩玩就算了。
import re
class Solution:
def validIPAddress(self, IP):
"""
:type IP: str
:rtype: str
"""
# 判断是否为IPv4 并且是4段
if "." in IP and len(IP.split('.')) == 4:
if self.IPv4(IP):
return "IPv4"
# 判断是否为IPv6 并且是8段
elif ":" in IP and len(IP.split(':')) == 8:
if self.IPv6(IP):
return "IPv6"
return "Neither"
def IPv4(self, IP):
for item in IP.split('.'):
if not item: # 判断为空
return False
if not re.findall("^\d+$", item): # 判断是否是纯数字
return False
if int(item) > 255 or int(item) < 0: # 判断是否属于0-255
return False
if str(int(item)) != str(item): # 判断是否有多余的0
return False
return True
def IPv6(self, IP):
for item in IP.split(":"):
if not item: # 判断为空
return False
if not re.findall("^[a-fA-F\d]+$", item): # 判断是否有其他字符
return False
if len(item) > 4: # 判断长度<=4
return False
return True微信的那些逆向协议
平时我一直用itchat,突然在一个开源 … More 微信的那些逆向协议