Given a matrix, like this[[0, 0, 1, 1, 1][0, 1, 1, 1, 1][0, 0, 1, 1, 1][0, 0, 0, 0, 0]]each cell is either 1 or 0in each row, from left to right, when ...
分类:
其他好文 时间:
2020-02-07 13:14:09
阅读次数:
85
BS的应用在生活中已经非常常见,我们打车,叫外卖,查个地图之类的都会查询附近的相关坐标位置,mongodb提供了原生的二维地图查询,极大地方便了大家的开发。 假定我们有一个定义了位置信息的集合location,给定a,b,c,d节点 db.location.find() { "_id" : "A", ...
分类:
数据库 时间:
2020-02-07 12:21:20
阅读次数:
90
Given a binary tree containing digits from 0-9 only, each root-to-leaf path could represent a number. An example is the root-to-leaf path 1->2->3 whic ...
分类:
其他好文 时间:
2020-02-07 10:41:25
阅读次数:
56
时间:2020.2.6 今天把昨天做到一半的首都之窗百姓信件爬取完成了。 源码如下: 1 import requests 2 import io 3 from bs4 import BeautifulSoup 4 #信1705-1 赵路仓 5 kv = {'user-agent': 'Mozilla ...
分类:
编程语言 时间:
2020-02-07 01:24:07
阅读次数:
110
Given an array of integers and an integer k, you need to find the total number of continuous subarrays whose sum equals to k. Example 1: Input:nums = ...
分类:
其他好文 时间:
2020-02-07 00:48:28
阅读次数:
65
前言:mac系统自带python,不过以当前mac系统的最新版本为例,自带的python版本都是2. 版本,虽然不影响老版本项目的运行,但是python最新的3. 版本的一些语法与2. 版本并不相同,网上的教程大神们也肯定都更新出了最新版的教程,我们不论是学习还是使用,当然用最新版会更好一点。 1、 ...
分类:
编程语言 时间:
2020-02-06 19:41:25
阅读次数:
1018
1.selenium获取网页iframe内容 语法:driver.switch_to.frame(iframe) ①通过tag_name driver.get(url) #该iframe为页面的第几个iframe iframe = driver.find_elements_by_tag_name(' ...
分类:
Web程序 时间:
2020-02-06 16:49:03
阅读次数:
104
1 """ 2 Given a string s, find the longest palindromic substring in s. You may assume that the maximum length of s is 1000. 3 Example 1: 4 Input: "bab ...
分类:
其他好文 时间:
2020-02-06 16:22:50
阅读次数:
60
package com.apress.todo.repository; import com.apress.todo.domain.ToDo; import org.springframework.dao.EmptyResultDataAccessException; import org.spri ...
分类:
数据库 时间:
2020-02-06 14:17:06
阅读次数:
198
Suppose we have very large sparse vectors (most of the elements in vector are zeros) Find a data structure to store them Compute the Dot Product. Foll ...
分类:
其他好文 时间:
2020-02-06 12:45:46
阅读次数:
44