自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

睹物思理

Great Thoughts improve life by code.

  • 博客(11)
  • 收藏
  • 关注

原创 【LeetCode】69.Sqrt(x)

Implement int sqrt(int x).Compute and return the square root of x.x is guaranteed to be a non-negative integer.【题目分析】题目要求实现求平方根(舍小数取整)函数如果直接从1开始遍历到x寻找,会超时。问题的症结便集中在怎样最大限度缩小遍历次数【思路分析】使用二分查找的思想,缩小查找范围[l...

2018-03-28 21:13:14 180

原创 【LeetCode】66.Plus One

Given a non-negative integer represented as a non-empty array of digits, plus one to the integer.You may assume the integer do not contain any leading zero, except the number 0 itself.The digits are s...

2018-03-28 21:04:37 142

原创 【Linux】Ubuntu安装Mysql

尝试多次apt-get install报错,那就别偷懒,下载文件包一个一个安装吧。首先彻底删除:彻底卸载软件# 删除软件及其配置文件apt-get --purge remove mysql-server mysql-client# 删除没用的依赖包apt-get autoremove mysql-server mysql-client# 此时dpkg的列表中有“rc”状态的软件包,可以执行如下命令...

2018-03-28 14:55:07 1174

原创 【LeetCode】21.Merge Two Sorted Lists

21. Merge Two Sorted ListsMerge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists.Example:Input: 1->2->4, 1-&...

2018-03-23 16:48:34 183

原创 【LeetCode】20.Valid_Parentheses

20. Valid ParenthesesGiven a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid.The brackets must close in the correct order, "()" and "()[]{...

2018-03-23 13:32:56 217

原创 【Python】获取整数的长度(ps.非str(int)方法)

不转换到字符串同时处理0和正数你可能想把它放在一个函数中:)下面是一些基准测试。len(str()) 已经落后于相当小的数字了

2018-03-16 20:57:54 30445 1

转载 【Python】list的常用操作

python列表的常用操作方法主要介绍了Python中列表(List)的详解操作方法,包含创建、访问、更新、删除、其它操作等,需要的朋友可以参考下。1.创建列表。只要把逗号分隔的不同的数据项使用方括号括起来即可1 List = ['wade','james','bosh','haslem']与字符串的索引一样,列表索引从0开始。列表可以进行截取、组合等2.添加新的元素 1 List.append(...

2018-03-16 20:39:43 203

转载 【Python】列表、数组、矩阵的转化

# -*- coding: utf-8 -*-from numpy import *a1 =[[1,2,3],[4,5,6]] #列表print('a1 :',a1)#('a1 :', [[1, 2, 3], [4, 5, 6]])a2 = array(a1) #列表 -----> 数组print('a2 :',a2)#('a2 :', array([[1, 2, 3]...

2018-03-16 20:32:08 855

转载 【数据库学习笔记】数据库事务的四个特性

数据库事务的四个特性(ACID)1 、原子性 (Atomicity) 事务是数据库的逻辑工作单位,事务中包含的各操作要么都做,要么都不做 2 、一致性 (Consistency) 事务执行的结果必须是使数据库从一个一致性状态变到另一个一致性状态。因此当数据库只包含成功事务提交的结果时,就说数据库处于一致性状态。如果数据库系统 运行中发生故障,有些事务尚未完成就被迫中断,这些未完成事务对数据库所做的...

2018-03-15 16:16:59 176

转载 【ssh】ECDSA key fingerprint问题

$ whoaminame: kelvinemail: kelvv@outlook.comhomepage: www.kelvv.comgithub: https://github.com/kelvvSecure Shell(缩写为SSH),由IETF的网络工作小组(Network Working Group)所制定;SSH为一项创建在应用层和传输...

2018-03-13 16:44:39 31874

原创 【Git问题】

1、git clone问题error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version一、问题现象今天在github 进行git clone 代码的时候发现报error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol ...

2018-03-13 15:57:49 630

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除