Function FindColOfValue(ws As Worksheet, val As Variant, rowNum As Long, startCol As Long) Dim i As Long With ws For i = startCol To .Range(.Cells(startCol, rowNum), .Cells(startCol, rowNum)).CurrentRegion.Columns.Count() If .Cells(rowNum, i).Value = val Then FindColOfValue = i Exit Function End If Next End With FindColOfValue = -1 End Function
Function FindRowOfValue(ws As Worksheet, val As Variant, colNum As Long, startRow As Long) Dim r As Long With ws For r = startRow To .Range(.Cells(startRow, colNum), .Cells(startRow, colNum)).CurrentRegion.Rows.Count() If .Cells(r, colNum).Value = val Then FindRowOfValue = r Exit Function End If Next End With End Function
Sort a dictionary by value 依据字典的值进行排序 newDict = {k: v for k, v in sorted(x.items(), key=lambda item: item[1])} import operator # 示例字典 d = {'a': 3, 'e': 4, 'b': 2, 'c': 5, 'd': 1} # 按 key 排序 def dict_sort_by_key(d: dict): sorted_d = sorted(d.items(), key=operator.itemgetter(0)) return dict(sorted_d) # 按 value 排序 def dict_sort_by_val(d: dict): # sorted_dic
Node.jslet region = process.env.AWS_REGION Pythonimport os region = os.environ['AWS_REGION'] 更多运行时环境变量参考 AWS docs
Public DNS 几大公共DNS服务器的IP地址 提供商 主 DNS 辅 DNS Cloudflare 1.1.1.1 1.0.0.1 Google 8.8.8.8 8.8.4.4 阿里云 223.5.5.5 223.6.6.6 Control D 76.76.2.0 76.76.10.0 Cisco OpenDNS 208.67.222.222 208.67.220.220
如何获得资产ID(asset id)、货币符号(symbol)等等信息? 由于Mixin Network 中有多条区块链的总计上千种资产,大多数一般也用不到。获
def get_md5_string(content)->str: """ - content: bytes or string """ m = hashlib.md5() if type(content) == bytes: m.update(content) elif type(content) == str: m.update(content.encode()) else: return None return m.hexdigest()
什么是进程和线程?有什么区别? 阮一峰的一篇文章,使用通俗易懂的比喻解释了进程和线程的概念。再结合维基百科里的词条定义➦,在这里做个知识点梳理
管理 AWS 资源,除了使用浏览器端的控制台(console)。也可以使用命令行。 官方文档入口: https://docs.aws.amazon.com/cli/latest/reference/ 安装目前已经是 AWSCLI V2稳定版(2021-04) 如果之
如果本地安装了 AWS CLI 可以直接使用 aws 命令进行配置: aws configure 或者,可以手动创建证书文件,文件默认位置是 ~/.aws/credentials 文件内容: [default] aws_access_key_id=YOUR_ACCESS_KEY aws_secret_access_key=YOUR_SECRET_KEY 如果要设置默认地区(Regoi