- 博客(6)
- 资源 (1)
- 收藏
- 关注
原创 ngx_http_init_request
记录一下 ngx_http_init_request 函数已经更改为 ngx_http_wait_request_handler
2018-09-12 17:04:19 432
原创 【Python】爬虫抓取必应壁纸
一直想把必应上的壁纸批量下载下来,可惜一直没找到源网站,今天发现在天堂图片网上有必应的壁纸,所以写了一个小爬虫来爬取一下图片看看 网址在此: http://www.ivsky.com/bizhi/bing_v1704/ 首先我们需要一个函数来打开网页,获得网页源码内容,这个函数可以这样写def getHtml(url): #url open打开网页 page = re...
2018-09-09 16:44:28 2580
原创 判断IP是否在IP段内
项目当中衍生出来的一道题,给定一个IP段以及一个IP,判断这个IP是否在此IP段内。IP段的表示方法有两种,一种如192.168.1.0/24,另一种如192.168.1.1-254 例:1.input: 192.168.1.0/24 192.168.1.56output: true//192.168.1.0/24表示的IP范围是192.168.1.1~192.1...
2018-09-09 15:56:58 3501
原创 【LeetCode】【Python】441. Arranging Coins
You have a total of n coins that you want to form in a staircase shape, where every k-th row must have exactly k coins.Given n, find the total number of full staircase rows that can be formed.n is...
2018-09-03 10:03:07 231
原创 【LeetCode】【Python】162.Find Peak Element
Question A peak element is an element that is greater than its neighbors.Given an input array nums, where nums[i] ≠ nums[i+1], find a peak element and return its index.The array may contain multi...
2018-09-03 09:50:57 225
原创 【LeetCode】【Python】657. Judge Route Circle
QuestionInitially, there is a Robot at position (0, 0). Given a sequence of its moves, judge if this robot makes a circle, which means it moves back to the original place.The move sequence is repr...
2018-09-01 00:22:37 209
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人