题目: Given a 2D matrix matrix, find the sum of the elements inside the rectangle defined by its upper left corner (row1, col1) and lower right corner ( ...
分类:
编程语言 时间:
2020-02-12 00:30:01
阅读次数:
62
遍历链表出错 节点结构: /** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; ...
分类:
其他好文 时间:
2020-02-12 00:29:33
阅读次数:
58
题目链接 Dima loves representing an odd number as the sum of multiple primes, and Lisa loves it when there are at most three primes. Help them to represen ...
分类:
其他好文 时间:
2020-02-12 00:29:05
阅读次数:
85
Eratosthenes筛法(埃氏筛) 时间复杂度:O(nlognlogn) 思路 代码 欧拉筛(线性筛) ...
分类:
其他好文 时间:
2020-02-12 00:28:48
阅读次数:
66
1. 安装keepalived高可用工具 1.1 切换目录到/usr/loca中 1.2 解压该压缩包tar -zxvf keepalived--1.2.18.tar.gz 1.3 切换目录到解压后的文件keepalived--1.2.18 1.4 yum install -y openssl op ...
分类:
系统相关 时间:
2020-02-12 00:28:18
阅读次数:
80
import requests from lxml import etree import time, json, requests import pymysql header = { 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) ...
分类:
数据库 时间:
2020-02-12 00:28:03
阅读次数:
82
Trial and Error 可以被翻译为试错,更白话一些就是不断尝试,不断犯错,继续尝试,继续犯错,一直进行下去,直到作对了。 有一篇英文文章讲解的不错,特在此分享,原文链接: http://www.exforsys.com/career-center/problem-solving/the-u ...
分类:
其他好文 时间:
2020-02-12 00:27:43
阅读次数:
66
构建新 AI 解决方案或开发产品的最难的部分不是 AI 本身或者算法,而是数据的收集和标记。 经典数据集: MNIST | CIFAR | PASCAL VOC | MS COCO | LSUN | SVHN 1. MS COCO COCO是一个大型的、丰富的物体检测,分割和字幕数据集。它有几个特点 ...
分类:
其他好文 时间:
2020-02-12 00:27:26
阅读次数:
115
from lxml import etree html = ''' <li class="tag_1">需要的内容1 <a>需要的内容2</a> </li> ''' selector = etree.HTML(html) contents = selector.xpath('//li[@class ...
分类:
其他好文 时间:
2020-02-12 00:27:08
阅读次数:
69
pthread_rwlock:读写锁 #import "ViewController.h" #import <Pthread.h> @interface ViewController () @property (nonatomic,assign) pthread_rwlock_t lock; @en ...
分类:
移动开发 时间:
2020-02-12 00:26:51
阅读次数:
106
缺少依赖或者说版本不对 Using cached https://pypi.tuna.tsinghua.edu.cn/packages/e7/a7/4cd50e57cc6f436f1cc3a7e8fa700ff9b8b4d471620629074913e3735fb2/cffi-1.11.5.tar ...
分类:
编程语言 时间:
2020-02-12 00:26:37
阅读次数:
216
列表生成式 列表生成式即List Comprehensions,是Python内置的非常简单却强大的可以用来创建list的生成式。 举个例子,要生成list [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]可以用list(range(1, 11)): >>> list(range(1, ...
分类:
编程语言 时间:
2020-02-12 00:26:20
阅读次数:
107
1.3 安装环境 Python是一种开发语言,是需要编译这种语言的工具的,只有编译成我们电脑懂得语言,电脑才能执行我们得python语句,我们一般都称为软件开发环境(Software Development Environment,SDE),我们可能还听过IDE(集成开发环境,Integrated ... ...
分类:
编程语言 时间:
2020-02-12 00:25:59
阅读次数:
88
由于JavaScript 的 replace 只能替换一次,因此另外编写一个能现替换全部匹配内容方法,代码如下: /* 把 content 中所有的 searchValue 替换为 replaceValue */ function replaceAll(content,searchValue,rep ...
分类:
编程语言 时间:
2020-02-12 00:25:38
阅读次数:
81
#!/bin/bash ############################################################ # 日期:2020-02-10 # 作者:何鹏举 # 说明:根据传入参数的jar包名称,重启SpringBoot应用并查看日志 ############# ...
分类:
编程语言 时间:
2020-02-12 00:25:15
阅读次数:
125
一.信号的采样与保持 fN:奈奎斯特频率 1.奈奎斯特采样定理解释了采样率和所测信号频率之间的关系。 阐述了采样率fs必须大于被测信号感兴趣最高频率分量的两倍。 (采样率高才能保证所测信号的失真小,2倍频时虽然(临界)做到了信号的频率成分没有失信,但是很难保证信号的幅值不失真) 2.当采样率低于2f ...
分类:
其他好文 时间:
2020-02-12 00:24:20
阅读次数:
72
Nginx: 1.安装nginx yum源 rpm -Uvh http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm 2.yum install nginx -y 3.mv ...
分类:
其他好文 时间:
2020-02-12 00:24:02
阅读次数:
74