Files
Jack 1459724ba3 Update to 7.10.0
[+] Add Mail Server to the left menu.
[+] Add Mail Server - WebMail (requires Mail Server upgrade 5.1)
[+] Add WP Toolkit Plugin, Theme installation.
[+] Add Mail Server Login info.
[+] Add Mail Server WebMail One-click Login (requires Mail Server upgrade 5.2).
[+] Redesigned Security - Firewall.

[*] Optimized Mass Mail sending speed.
[*] Optimized the CPU usage problem of aaPanel startup service.

[-] Fix apache application, renew SSL issue.
[-] Fix Let's Encrypt account registeration failed.
[-] Fix openlitespeed using capital letters on domain name caused the website cannot be accessed issue.
[-] Fix problem of failure to reset root password in some versions of MariaDB.
[-] Fix an error in modifying Permission in some cases of MySQL.
[-] Fix the Website category display problem.
2024-08-09 09:57:59 +08:00

48 lines
1014 B
Python

import typing
# 创建一个管道函数
def make_pipe(fs: typing.List[callable]) -> callable:
"""
创建一个管道函数
@param fs: callable 数据过滤函数
@return: any
"""
def helper(val: any) -> any:
return my_pipe(val, fs)
return helper
def my_pipe(val: any, fs: typing.List[callable]) -> any:
"""
管道数据过滤函数
@param val: any
@param fs: callable 数据过滤函数
@return: any
"""
from functools import reduce
return reduce(lambda x, y: y(x), fs, val)
def is_number(s) -> bool:
"""
@name 判断输入参数是否一个数字
@author Zhj<2022-07-18>
@param s<string|integer|float> 输入参数
@return bool
"""
try:
float(s)
return True
except ValueError:
pass
try:
import unicodedata
unicodedata.numeric(s)
return True
except (TypeError, ValueError):
pass
return False