可选链式调用 可选链式调用是一种可以在当前值可能为 nil 的可选值上请求和调用属性、方法及下标的方法。如果可选值有值,那么调用就会成功;如果可选值是 nil,那么调用将返回 nil。多个调用可以连接在一起形成一个调用链,如果其中任何一个节点为 nil,整个调用链都会失败,即返回 nil。 注意 S ...
分类:
其他好文 时间:
2020-04-12 12:46:16
阅读次数:
64
Error Handling - 错误处理 一旦序列里面产出了一个 error 事件,整个序列将被终止。RxSwift 主要有两种错误处理机制: retry - 重试 catch - 恢复 retry - 重试 retry 可以让序列在发生错误后重试: // 请求 JSON 失败时,立即重试, // ...
分类:
其他好文 时间:
2020-04-12 00:06:04
阅读次数:
90
系统 --help 系统帮助 arch 显示机器的处理器架构uname -m 显示机器的处理器架构uname -r 显示正在使用的内核版本 cat /proc/meminfo 校验内存使用 cat /proc/swaps 显示哪些swap被使用 cat /proc/net/dev 显示网络适配器及统 ...
分类:
系统相关 时间:
2020-04-10 20:01:55
阅读次数:
99
一、单继承下的属性查找 现在子类中找,子类没有到父类找 实例一、 class Foo: def f1(self): print('Foo.f1')? def f2(self): print('Foo.f2') self.f1() # obj.f1()?class Bar(Foo): def f1(s ...
分类:
其他好文 时间:
2020-04-10 00:37:01
阅读次数:
77
恢复内容开始 Linux NAS存储之CIFS CIFS是Windows和Unix系统之间共享文件的一种协议,客户端通常是Windwos等。支持多节点同时挂载以及并发写入 1、服务器端操作(存储端) 1.1、服务器端安装samba和cifs-utils [root@nas ~]# yum -y in ...
分类:
系统相关 时间:
2020-04-09 12:16:09
阅读次数:
240
一、压缩配置 #全局配置 http { gzip on; gzip_min_length 1k; gzip_buffers 4 16k; gzip_comp_level 2; gzip_types text/plain application/x-javascript text/css applic ...
分类:
其他好文 时间:
2020-04-08 12:12:18
阅读次数:
69
Given an array of strings, group anagrams together. Example: Note: All inputs will be in lowercase. The order of your output does not matter. 这道题就是用每个 ...
分类:
其他好文 时间:
2020-04-07 10:00:31
阅读次数:
94
return new ModelAndView(new RedirectView("http://www.pqsas.com/app/login_toLogin")); ...
分类:
其他好文 时间:
2020-04-05 00:29:20
阅读次数:
127
function download(filename, text) { var pom = document.createElement('a'); pom.setAttribute('href', 'data:text/plain;charset=utf-8,' + encodeURICompon ...
分类:
Web程序 时间:
2020-04-04 11:23:48
阅读次数:
79
总结一下在目前的电商系统中的商品涉及的属性spu,sku。搞清楚两者之间的关系对表的设计非常重要 spu Standard Product Unit (标准产品单位) ,一组具有共同属性的商品集 SKU Stock Keeping Unit(库存量单位),SPU商品集因具体特性不同而细分的每个商品 ...
分类:
其他好文 时间:
2020-04-03 16:27:01
阅读次数:
370