摘要: 两个数组取交集: const intersection = (a, b) => { const s = new Set(b); return [...new Set(a)].filter(x => s.has(x)); }; 用法: intersection([1, 2, 3], [4, 3, 2] 阅读全文
posted @ 2021-01-12 17:13 iTachiLEe 阅读(7427) 评论(0) 推荐(1) 编辑
摘要: #!/usr/bin/python try: from AppKit import NSWorkspace except ImportError: print "Can't import AppKit -- maybe you're running python from brew?" print 阅读全文
posted @ 2021-01-12 09:39 iTachiLEe 阅读(315) 评论(0) 推荐(0) 编辑