给你一个未排序的整数数组 nums ,请你找出其中没有出现的最小的正整数。O(n)+O(1) 排序 func firstMissingPositive(A []int) int { n := len(A) sort.Ints(A) for i := 1; i <= n; i++ { idx := s ...
分类:
其他好文 时间:
2021-02-01 12:16:54
阅读次数:
0
/** * C++ 语言: 二叉查找树 * * @author skywang * @date 2013/11/07 */ #ifndef _BINARY_SEARCH_TREE_HPP_ #define _BINARY_SEARCH_TREE_HPP_ #include <iomanip> #in ...
分类:
编程语言 时间:
2021-02-01 11:49:33
阅读次数:
0
正则表达式 使用方法: ①:描述我们要找的字符串的规律 ②:调用函数,执行该正则表达式 PHP: //把字符串haha找出来 $str="haha,this is my blog" preg_match_all('/haha/',$str,$res); print_r($res); 在PHP里正则必 ...
分类:
其他好文 时间:
2021-01-29 12:19:14
阅读次数:
0
1. 安装nginx // 查询有没有nginx brew search nginx //开始安装nignx brew install nginx 2. 检查nignx是否安装成功 nginx -V 查看nginx版本及安装的本地位置 ngxin -v 查看nginx版本(此方法依然可以检测是否安装 ...
分类:
系统相关 时间:
2021-01-28 12:15:34
阅读次数:
0
from selenium import webdriverfrom time import sleepdriver=webdriver.Firefox()adddress="地址"driver.get(adddress)#进入嵌套的frame中寻找元素driver.switch_to_frame( ...
分类:
编程语言 时间:
2021-01-28 12:10:48
阅读次数:
0
基本查询,q表示关键字,df为不指定字段的默认字段,sort时间排序,from和size表示分页和每页大小,timeout为超时时间 GET /movies/_search?q=2012&df=title&sort=year:desc&from=0&size=10&timeout=1s 带profi ...
分类:
其他好文 时间:
2021-01-27 13:06:43
阅读次数:
0
作者: J. R. R. Uijlings, K. E. A. van de Sande, T. Gevers, A. W. M. Smeulders. 引用: Uijlings, Jasper RR, et al. "Selective search for object recognition. ...
分类:
其他好文 时间:
2021-01-26 12:41:30
阅读次数:
0
function is_weixin(){ var ua = navigator.userAgent.toLowerCase(); if(ua.match(/MicroMessenger/i)=="micromessenger") { return true; } else { return fal ...
分类:
微信 时间:
2021-01-26 12:38:44
阅读次数:
0
报错信息如下: Syntax Error: ValidationError: Invalid options object. Stylus Loader has been initialized using an options object that does not match the API ...
分类:
其他好文 时间:
2021-01-26 12:19:01
阅读次数:
0
前言 为什么要用ElasticSearch?我们的应用经常需要添加检索功能,开源的Elastic Search是目前全文检索引擎的首选。它可以快速的存储、搜索和分析海量数据。ElasticSearch是一个分布式搜索框架,提供RestfulAPI,底层基于Lucene,采用多shard(分片)的方式 ...
分类:
其他好文 时间:
2021-01-26 12:09:17
阅读次数:
0