自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(125)
  • 收藏
  • 关注

转载 leetcode-160. Intersection of Two Linked Lists

160.Intersection of Two Linked ListsWrite a program to find the node at which the intersection of two singly linked lists begins.For example, the following two linked lists:A: ...

2018-01-03 22:12:00 233

转载 《算法图解》示例代码的实现

这几天看了《算法图解》,把里面的示例代码都实现了一边,在 github 上找到了一位朋友的仓库,fork 了他的。里面有我们添加的 Python,Java,C++的实现,欢迎大家 fork!!!附上网址:https://github.com/lynxux/AlgorithmDiagram转载于:https://www.cnblogs.com/linkcode/p/818...

2018-01-03 22:10:00 300

转载 leetcode-142. Linked List Cycle II

142. Linked List Cycle IIGiven a linked list, return the node where the cycle begins. If there is no cycle, return null.Note: Do not modify the linked list.Follow up:Can you solve it wi...

2018-01-03 22:09:00 244

转载 leetcode-141. Linked List Cycle

141.Linked List CycleGiven a linked list, determine if it has a cycle in it. Follow up:Can you solve it without using extra space?题意:判断一个链表是否为一个环?(能否使用O(1)的空间复杂度?)思路:在做过之前...

2018-01-03 22:05:00 188

转载 leetcode-287. Find the Duplicate Number

287.Find the Duplicate NumberGiven an arraynumscontainingn+ 1 integers where each integer is between 1 andn(inclusive), prove that at least one duplicate number must exist. Assume that th...

2017-12-27 22:17:00 135

转载 图解HTTP笔记-4(HTTP首部)

HTTP首部HTTP的首部字段根据实际使用用途分为四种:通用首部字段:请求和响应报文都会使用的首部请求首部字段:请求报文的首部响应首部字段:响应报文的首部实体首部字段:实体部分的首部通用首部字段: 首部字段名 说明 Cache-Control 控制缓存的行为 Connection 逐跳首部,连接的管理...

2017-12-25 19:55:00 129

转载 leetcode-752. Open the Lock

752.Open the LockYou have a lock in front of you with 4 circular wheels. Each wheel has 10 slots:'0', '1', '2', '3', '4', '5', '6', '7', '8', '9'. The wheels can rotate freely and wrap a...

2017-12-25 12:31:00 159

转载 leetcode-751. IP to CIDR

751.IP to CIDRGiven a start IP addressipand a number of ips we need to covern, return a representation of the range as a list (of smallest possible length) of CIDR blocks.A CIDR bloc...

2017-12-25 12:28:00 287

转载 leetcode-747. Largest Number Greater Than Twice of Others

747. Largest Number Greater Than Twice of OthersIn a given integer arraynums, there is always exactly one largest element.Find whether the largest element in the array is at least twice ...

2017-12-25 12:26:00 142

转载 leetcode-565. Array Nesting

565. Array NestingA zero-indexed array A of length N contains all integers from 0 to N-1. Find and return the longest length of set S, where S[i] = {A[i], A[A[i]], A[A[A[i]]], ... } subjecte...

2017-12-23 10:18:00 123

转载 图解http笔记-3(HTTP状态码)

一. 返回结果的HTTP状态码状态码告知了从服务端返回的请求的结果如 200 ok 以 3 位数字 和 原因短语 组成样式类别原因短语1xxInfomational(信息性状态码)接收的请求正在处理2xxSuccess(成功状态码)请求正常处理完毕3xxRedirection(重定向状态码)需要进...

2017-12-22 21:41:00 163

转载 Effective Java读书笔记1

一. 考虑用静态工厂方法代替构造方法1. 什么是静态工厂方法注意与设计模式中的工厂模式是不同的,它是用通过专门定义一个类来负责创建其他类的实例,其实例通常拥有共同的父类,其实现主要是靠Java的反射机制。2. 静态工厂方法的优点1.有名称对于一个对象的实例化来说,如果使用构造方法的话,可以使用构造函数的重载来实现不同情况下的实例化,但是由于构造函数的名称都是类...

2017-12-21 11:58:00 127

转载 leetcode-121. Best Time to Buy and Sell Stock

121. Best Time to Buy and Sell StockSay you have an array for which the ith element is the price of a given stock on day i.If you were only permitted to complete at most one transaction (...

2017-12-21 09:58:00 126

转载 图解http笔记-2

持久连接http的初始版本中,没进行一次http通信就要断开连接。以前传输的内容都是很小的,但是现在,当一个浏览器请求一个有很图片的html网页时,要请求html文档,也要请求图片等资源,就要进行很多次TCP的断开和连接,增加通信的开销。所以就有了HTTP keep-alive的方法:只要一端没有明确提出断开连接,就保持TCP的连接。'Connection': 'ke...

2017-12-21 09:00:00 86

转载 图解http笔记-1

图解http笔记-1http中可使用的方法:Get:获取资源用来请求访问已被URI识别的资源。指定的资源经服务器解析后返回响应内容。Post:传输实体主体和Get很类似,但是一般使用PostPut:传输文件要求在请求报文的主体中包含文件的内容,然后保存在请求URI指定的位置 但是由于http1.1的put方法不带验证机制...

2017-12-18 23:40:00 98

转载 vim下某些词着色,怎么取消?

后来发现是一不小心按到搜索,变成了搜索着色,取消着色只需要:以下两种都可以::noh:set nohls 转载于:https://www.cnblogs.com/linkcode/p/8150739.html...

2017-12-18 16:02:00 413

转载 centOS 下yum安装Python3教程

用yum方式安装python3:sudo yum install epel-releasesudo yum install python34测试:[root@VM_221_21_centos ~]# vim helloworld.py[root@VM_221_21_centos ~]# python helloworld.pyhelloworld 转载于...

2017-12-17 20:48:00 423

转载 centOS yum出问题解决办法

今天用CentOS的时候,yum安装 python 的时候,提示:error: rpmdb: BDB0113 Thread/process 21814/140288630364160 failed: BDB1507 Thread died in Berkeley DB library,需要用下面两个命令:就可以了[root@VM_221_21_centos ~]# rpm --r...

2017-12-17 20:44:00 213

转载 HTTP method POST is not supported by this URL解决方案

在学习慕课网的 servlet 教程的过程中,使用post的转跳页面会提示这个错误后来百度了才知道是重写的 doPost() 方法中的 super() 导致的!!!只需要把这个 super.doPost(req,resp) 注释掉或者删掉就好了 转载于:https://www.cnblogs.com/linkcode/p/8150742.html...

2017-12-17 19:24:00 355

转载 leetcode-216. Combination Sum III

216. Combination Sum IIIFind all possible combinations ofknumbers that add up to a numbern, given that only numbers from 1 to 9 can be used and each combination should be a unique set of...

2017-12-14 21:13:00 96

转载 idea-jsp out.println方法未找到(cannot be resolve)解决办法

去项目设置里配置tomcat服务器,添加一下 jsp-api.jar也可以把tomcat安装文件夹lib里的所有的库都添加进来 转载于:https://www.cnblogs.com/linkcode/p/8150744.html...

2017-12-11 21:07:00 890

转载 leeetcode-40. Combination Sum II

40. Combination Sum IIGiven a collection of candidate numbers (C) and a target number (T), find all unique combinations inCwhere the candidate numbers sums toT.Each number inCmay onl...

2017-12-11 18:50:00 113

转载 leetcode- 39. Combination Sum

39. Combination Sumiven asetof candidate numbers (C)(without duplicates)and a target number (T), find all unique combinations inCwhere the candidate numbers sums toT.Thesamerepe...

2017-12-08 18:29:00 60

转载 leetcode-90. Subsets II

90. Subsets IIGiven a collection of integers that might contain duplicates,nums, return all possible subsets (the power set).Note:The solution set must not contain duplicate subsets.For ...

2017-12-07 21:37:00 92

转载 正则表达式总结(持续更新。。)

正则表达式总结:1.用\d可以匹配一个数字,\w可以匹配一个字母或数字2.用*表示任意个字符(包括0个),用+表示至少一个字符,用?表示0个或1个字符,用{n}表示n个字符,用{n,m}表示n-m个字符:3. []表示一个字符的限定4.$表示行的结束,\d$表示必须以数字结束^表示行的开头,^\d表示必须以数字开头。5.用()表示的就是要提取的分组(Grou...

2017-12-06 22:26:00 84

转载 JavaScript == 和 ===

js == === !!!对于string,number等基础类型,==和===是有区别的1)不同类型间比较,==之比较“转化成同一类型后的值”看“值”是否相等,===如果类型不同,其结果就是不等,因为js 也是有包装类的,例如 String,Number,Boolean2)同类型比较,直接进行“值”比较,两者结果一样 转载于:https://www.cnblo...

2017-12-06 21:13:00 85

转载 leetcode-78. Subsets

78. SubsetsGiven a set ofdistinctintegers,nums, return all possible subsets (the power set).Note:The solution set must not contain duplicate subsets.For example,Ifnums=[1,2,3], a...

2017-12-06 15:27:00 93

转载 Linux常用命令总结

# Linux常用命令[TOC]常用系统工作命令man命令man命令用于查看各种命令的帮助格式: 命令名称 [命令参数] [命令对象]命令对象一般是指要处理的目标(普通文件/目录文件/用户等等),命令参数会比较麻烦,需要长时间的经验积累才能比较好的把握。[root@host Desktop]# man man[root@host Desktop]# m...

2017-12-06 11:16:00 198

转载 Java Socket编程实例

Java Socket编程笔记(注:需要 Java IO相关的知识)1.使用 TCP 连接的demo需要用到 java.net.Socket 和 java.net.ServerSocket ,具体可以查询 API 文档创建 Sever 类和 Client 类作为 demoServer类的实现:import java.io.*;import java.net.S...

2017-12-03 20:33:00 203

转载 信息安全概论总结-7

第七章-虚拟专用网技术2017年11月29日 星期三 14:59VPN:virtual private network 两层含义: a. 虚拟的网,只在用户需要时在建立连接 b. 利用公共网络基础设施构成的专用网 1. 优点: 安全性高,成本低,覆盖性好,可扩展性强 2. 分类方式: ...

2017-12-02 10:46:00 410

转载 信息安全概论总结-6

第六章-入侵检测技术2017年11月29日 星期三 9:04入侵检测技术定义“通过对行为,安全日志,审计数据或者其他网络上可以获取的信息进行分析,对系统的闯入或者闯出的企图进行检测”的安全技术入侵检测系统定义:对网络传输进行即时检测,对发现的可疑传输行为发出警报或者主动采取措施的网络安全设施入侵检测的局限和优点:a. 局限:有...

2017-12-02 10:41:00 195

转载 信息安全概论总结-5

第五章-防火墙技术2017年11月28日 星期二 10:09防火墙:指一种确保信息安全的设施,会按照特定的规则,允许或者禁止传输的数据通过a. 特点: i. 内,外部之间的流量必须经过防火墙 ii. 只有符合安全策略的流量才能通过 iii. 自身具有很强的抗攻击免疫能力b. 功能: i. 控制在计算机网络中不同信任域之...

2017-12-02 10:37:00 512

转载 信息安全概论总结-4

第四章-PKI技术2017年11月15日 星期三 15:41PKI: Public Key Infrastructure 公共密钥基础设施目的:可以使用户安心在从事商业活动,而不用担心数据传输在网络上的安全性基础设施的特点:普适性,透明性,易用性典型的PKI系统包括:a. 认证中心CAb. 证书库c. 密钥备份和恢复系...

2017-12-02 10:33:00 233

转载 信息安全概论总结-3

第三章-数字签名与身份认证2017年11月13日 星期一 10:33计算机安全的四大原则:机密性,完整性,可认证性,不可抵赖性• 机密性:既保护消息内容不会泄露给非授权的的人,即使攻击者观测者看到了消息的格式,也无法从中提取出任何有效的信息。• 认证性:是最重要的性质之一,认证是对主体进行身份识别非过程。• 完整性:是指保证消息的内容没有收到篡改...

2017-12-02 10:29:00 341

转载 信息安全概论总结-2

第二章-密码学概论2017年10月30日 星期一 11:11将明文转为密文的两种方法:替换法、变换法密码系统的由哪几部分构成:密码算法+密文空间+明文空间+密钥密码分析方法有几类?唯密文攻击:(只有一部分密文,都是相同的加密算法,尽可能恢复明文)已知明文攻击:(有些消息的密文和对应的明文,推导出密钥/算法)选择明文攻击+选择...

2017-12-02 10:23:00 436

转载 信息安全概论总结-1

第一章-概论2017年10月25日 星期三 14:00P²DR模型的主要内容:• Policy 安全策略• Protection 防护• Detection 检测• Response 响应PDRR模型的主要内容:• Protection 防御• Detection 检测• Response 响应• Recovery 恢复...

2017-12-02 09:51:00 394

转载 leetcode-238. Product of Array Except Self

238. Product of Array Except SelfGiven an array ofnintegers wheren> 1,nums, return an arrayoutputsuch thatoutput[i]is equal to the product of all the elements ofnumsexceptn...

2017-11-29 20:38:00 76

转载 leetcode- 442. Find All Duplicates in an Array

442. Find All Duplicates in an ArrayGiven an array of integers, 1 ≤ a[i] ≤n(n= size of array), some elements appeartwiceand others appearonce.Find all the elements that appeartwicei...

2017-11-27 12:44:00 108

转载 leetcode-100. Same Tree

100. Same TreeGiven two binary trees, write a function to check if they are the same or not.Two binary trees are considered the same if they are structurally identical and the nodes have t...

2017-11-26 12:56:00 101

转载 leetcode-530. Minimum Absolute Difference in BST

530. Minimum Absolute Difference in BSTGiven a binary search tree with non-negative values, find the minimumabsolute differencebetween values of any two nodes.Example:Input: 1 ...

2017-11-25 10:45:00 94

空空如也

空空如也

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

TA关注的人

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