一、base64加密、解密 import base64 s = 'abc' b = base64.b64encode(s.encode()) #加密 result = b.decode() print(result) b = base64.b64decode('YWJj') #解密 print(b. ...
分类:
编程语言 时间:
2019-11-19 11:42:56
阅读次数:
204
链接: https://vjudge.net/problem/LightOJ 1067 题意: Given n different objects, you want to take k of them. How many ways to can do it? For example, say th ...
分类:
其他好文 时间:
2019-11-19 01:05:38
阅读次数:
62
本节内容: 常用的字符串处理。 格式化输出字符串。 字符串的替换。 字符串和二进制的相互转化。 字典的操作 字符串操作 常用的字符串处理 格式化输出字符串 字符串替换 字符串和二进制的相互转化 encode参数表示之前是什么格式的,decode参数表示要转换成什么格式的。 如果encode和deco ...
分类:
编程语言 时间:
2019-11-18 22:21:43
阅读次数:
98
必须掌握的点 一、 (内存)Unicode二进制字符>>>>>>编码(encode)>>>>>>(硬盘)utf-8二进制字符 (硬盘)utf-8二进制字符>>>>>>解码(decode)>>>>>>(内存) unicode二进制字符 二、 用什么编码存的数据,就用什么编码取 我们中国这边的操作系统 ...
分类:
其他好文 时间:
2019-11-18 20:09:49
阅读次数:
60
php加密解密函数: /** * 加密函数 * * @param string $txt 需要加密的字符串 * @param string $key 密钥 * @return string 返回加密结果 */ function ds_encrypt($txt, $key = '') { if (em ...
分类:
Web程序 时间:
2019-11-18 18:13:55
阅读次数:
92
1.和社区版Istio的区别 OpenShift 4.2的Service Mesh和upstream的Istio项目的增强,除了产品化之外,借用官方文档,区别在于: Red Hat OpenShift Service Mesh differs from Istio in ways that help ...
分类:
其他好文 时间:
2019-11-18 12:33:20
阅读次数:
246
view 替代 div text 文本标签 decode可以解析的有 < > & '     只支持 text 嵌套。 长按文字复制(只有该标签支持)selectable rich-text 富文本,可以将字符串解析成对应标签 1、字符 ...
分类:
其他好文 时间:
2019-11-18 09:17:27
阅读次数:
68
PHP stdclass转array的方法 <pre><?php$a = new stdClass();$a->id = '11 ';$a->username = 'me';print_r($a);$b=object2array($a);print_r($b);function object2arr ...
分类:
Web程序 时间:
2019-11-17 10:25:14
阅读次数:
194
1、When strange or different elements come together, we will have fresh perspectives and divergent ways of thinking. 2、They inevitably give birth to in ...
分类:
其他好文 时间:
2019-11-16 12:49:22
阅读次数:
87
简单的python socket聊天室就完成了 其中socket.AF_INET是固定的,好像是socket树,SOCK_DGRAM是udp协议。 这个核心是用bind绑定了一个端口,相当于自己在本地开启了一个8888端口。服务端是11111端口 ...
分类:
编程语言 时间:
2019-11-14 00:14:45
阅读次数:
117