摘要: 1.有效的山脉数组 给定一个有效的整数数组A。如果它是有效的山脉数组就返回true,否则返回false。 数组A A.length>=3; 在0<i<A.length-1 条件下 存在i (1)A[0]<A[i] <....<.A[i-1]<A[i]; (2)A[i]>A[i+1]>....>A[A 阅读全文
posted @ 2021-07-13 11:22 未解 阅读(36) 评论(0) 推荐(0) 编辑
摘要: 1. 给定一个包含 n 个整数的数组 nums,判断 nums 中是否存在三个元素 a,b,c ,使得 a + b + c = 0 ?找出所有满足条件且不重复的三元组。 注意:答案中不可以包含重复的三元组。 例如, 给定数组 nums = [-1, 0, 1, 2, -1, -4], 满足要求的三元 阅读全文
posted @ 2019-12-24 17:29 未解 阅读(155) 评论(0) 推荐(0) 编辑
摘要: $.fn.myTarea = function(){ return this.each(function(){ $(this).bind('input propertychange', function() { var id = $(this).attr("id"); var maxContent= 阅读全文
posted @ 2019-06-16 23:58 未解 阅读(377) 评论(0) 推荐(0) 编辑
摘要: 冒泡排序 function bubble_sort($arr) { } 归并排序 二分查找-递归 function bin_search($arr,$low,$high,$value) { } 二分查找-非递归 function bin_search($arr,$low,$high,$value) 阅读全文
posted @ 2019-06-16 23:41 未解 阅读(295) 评论(0) 推荐(0) 编辑
摘要: ##### 1.装饰器 例子: 取sumw() 不定参数 + 字典参数 总数+(109, 20) 阅读全文
posted @ 2019-01-22 15:36 未解 阅读(144) 评论(0) 推荐(0) 编辑
摘要: import requestsimport refrom bs4 import BeautifulSoupimport jsonimport math'''写文件'''def json_sanalyzes(legal): contents ={} for i in legal: li=[] for 阅读全文
posted @ 2019-01-08 10:13 未解 阅读(896) 评论(0) 推荐(0) 编辑
摘要: 1 requests 2 gevent 3 sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding='gb18030') # 改系统编码 utf-8 不好使 爬取多个歌曲 批量爬取 阅读全文
posted @ 2019-01-03 17:12 未解 阅读(656) 评论(0) 推荐(0) 编辑
摘要: jquery 验证 文本框 过滤 非法字符 限制文字个数 input 过滤中文汉字 汉字替换为空 阅读全文
posted @ 2018-11-20 14:32 未解 阅读(120) 评论(0) 推荐(0) 编辑
摘要: import requestsimport randomimport timeimport osimport csvimport pandas as pdreq_url = 'https://www.lagou.com/jobs/positionAjax.json?needAddtionalResu 阅读全文
posted @ 2018-09-20 10:40 未解 阅读(300) 评论(0) 推荐(0) 编辑
摘要: function setCookie(name, value) { var exp = new Date(); exp.setTime(exp.getTime() + 24 * 60 * 60 * 1000); document.cookie = name + "=" + escape(value) 阅读全文
posted @ 2018-03-20 12:48 未解 阅读(115) 评论(0) 推荐(0) 编辑