自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

EmotionComputer

The harder you work, the luckier you will be

  • 博客(27)
  • 资源 (1)
  • 问答 (1)
  • 收藏
  • 关注

原创 Maximum Subarray && 动态规划详解

题目链接Given an integer array nums, find the contiguous subarray (containing at least one number) which has the largest sum and return its sum.Example:Input: [-2,1,-3,4,-1,2,1,-5,4],Output: 6Explan...

2019-01-21 16:26:34 727

原创 Reverse Bits

Reverse bits of a given 32 bits unsigned integer.Example 1:Input: 00000010100101000001111010011100Output: 00111001011110000010100101000000Explanation: The input binary string 00000010100101000001...

2019-01-31 20:42:08 329 1

原创 Hamming Distance

The Hamming distance between two integers is the number of positions at which the corresponding bits are different.Given two integers x and y, calculate the Hamming distance.Note:0 ≤ x, y < 231....

2019-01-31 19:03:39 512

原创 Number of 1 Bits

题目链接Write a function that takes an unsigned integer and return the number of ‘1’ bits it has (also known as the Hamming weight).Example 1:Input: 00000000000000000000000000001011Output: 3Explanat...

2019-01-31 18:13:48 245

原创 Roman to Integer

题目链接Roman numerals are represented by seven different symbols: I, V, X, L, C, D and M.Symbol ValueI 1V 5X 10L 50C 100D ...

2019-01-30 18:41:25 143

原创 python3爬虫:数据存储之MySQL数据库

MySQL数据库操作安装mysql:在官网:https://dev.mysql.com/downloads/windows/installer/5.7.html如果提示没有.NET Framework框架。那么就在提示框中找到下载链接,下载一个就可以了。如果提示没有Microsoft Virtual C++ x64(x86),那么百度或者谷歌这个软件安装即可。如果没有找到。那么私聊我。...

2019-01-24 19:22:42 549 1

原创 python3爬虫:文件存储之CSV文件处理

csv文件处理读取csv文件: import csv with open('stock.csv','r') as fp: reader = csv.reader(fp) titles = next(reader) for x in reader: print(x)这样操作,以后获取数据的时候,就...

2019-01-24 17:11:39 945

原创 Count Primes

题目链接Count the number of prime numbers less than a non-negative number, n.Example:Input: 10Output: 4Explanation: There are 4 prime numbers less than 10, they are 2, 3, 5, 7.看似不屑一顾的题目,却踩了大坑pyth...

2019-01-23 21:55:50 523

原创 python3爬虫:数据解析之 BeautifulSoup4库

BeautifulSoup4库和 lxml 一样,Beautiful Soup 也是一个HTML/XML的解析器,主要的功能也是如何解析和提取 HTML/XML 数据。lxml 只会局部遍历,而Beautiful Soup 是基于HTML DOM(Document Object Model)的,会载入整个文档,解析整个DOM树,因此时间和内存开销都会大很多,所以性能要低于lxml。Beaut...

2019-01-23 17:37:49 412

原创 python3爬虫:数据存储之 json文件处理

json文件处理:什么是json:JSON(JavaScript Object Notation, JS 对象标记) 是一种轻量级的数据交换格式。它基于 ECMAScript (w3c制定的js规范)的一个子集,采用完全独立于编程语言的文本格式来存储和表示数据。简洁和清晰的层次结构使得 JSON 成为理想的数据交换语言。 易于人阅读和编写,同时也易于机器解析和生成,并有效地提升网络传输效率。更...

2019-01-23 17:26:18 1830

原创 python3爬虫:网络请求之 requests库

requests库虽然Python的标准库中 urllib模块已经包含了平常我们使用的大多数功能,但是它的 API 使用起来让人感觉不太好,而 Requests宣传是 “HTTP for Humans”,说明使用更简洁方便。安装和文档地址:利用pip可以非常方便的安装: pip install requests中文文档:http://docs.python-requests.or...

2019-01-23 10:28:20 542

原创 Fizz Buzz

题目链接Write a program that outputs the string representation of numbers from 1 to n.But for multiples of three it should output “Fizz” instead of the number and for the multiples of five output “Buzz”...

2019-01-22 23:10:40 135

转载 浅析Python3中的bytes和str类型

浅析Python3中的bytes和str类型Python 3最重要的新特性之一是对字符串和二进制数据流做了明确的区分。文本总是Unicode,由str类型表示,二进制数据则由bytes类型表示。Python 3不会以任意隐式的方式混用str和bytes,你不能拼接字符串和字节流,也无法在字节流里搜索字符串(反之亦然),也不能将字符串传入参数为字节流的函数(反之亦然)。下面让我们深入分析一下二者...

2019-01-22 22:29:46 271

原创 http请求头中Referer的含义和作用

版权所属:SO JSON在线解析原文地址:https://www.sojson.com/blog/58.html转载时必须以链接形式注明原始出处及本声明。Referer 是 HTTP 请求header 的一部分,当浏览器(或者模拟浏览器行为)向web 服务器发送请求的时候,头信息里有包含 Referer 。比如我在www.google.com 里有一个www.baidu.com 链...

2019-01-22 16:07:11 7127 4

原创 python3爬虫:网络请求之 urllib库

urllib库urllib库是Python中一个最基本的网络请求库。可以模拟浏览器的行为,向指定的服务器发送一个请求,并可以保存服务器返回的数据。urlopen函数:在Python3的urllib库中,所有和网络请求相关的方法,都被集到urllib.request模块下面了,以先来看下urlopen函数基本的使用: from urllib import request re...

2019-01-22 15:39:48 440

原创 http协议和Chrome抓包工具

http协议和Chrome抓包工具什么是http和https协议:HTTP协议:全称是HyperText Transfer Protocol,中文意思是超文本传输协议,是一种发布和接收HTML页面的方法。服务器端口号是80端口。 HTTPS协议:是HTTP协议的加密版本,在HTTP下加入了SSL层。服务器端口号是443端口。在浏览器中发送一个http请求的过程:当用户在浏览器的地址栏中输...

2019-01-22 11:33:53 1393

原创 爬虫前奏

爬虫前奏爬虫的实际例子:搜索引擎(百度、谷歌、360搜索等)。伯乐在线。惠惠购物助手。数据分析与研究(数据冰山知乎专栏)。抢票软件等。什么是网络爬虫:通俗理解:爬虫是一个模拟人类请求网站行为的程序。可以自动请求网页、并数据抓取下来,然后使用一定的规则提取有价值的数据。专业介绍:百度百科。通用爬虫和聚焦爬虫:通用爬虫:通用爬虫是搜索引擎抓取系统(百度、谷歌、搜狗等)的...

2019-01-22 10:30:08 184

原创 Min Stack

题目链接Design a stack that supports push, pop, top, and retrieving the minimum element in constant time.push(x) – Push element x onto stack.pop() – Removes the element on top of the stack.top() – Ge...

2019-01-21 20:40:35 152

原创 Shuffle an Array

题目链接Shuffle a set of numbers without duplicates.Example:// Init an array with set 1, 2, and 3.int[] nums = {1,2,3};Solution solution = new Solution(nums);// Shuffle the array [1,2,3] and return...

2019-01-21 19:36:49 281

原创 House Robber

题目链接You are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed, the only constraint stopping you from robbing each of them is that adjacent ...

2019-01-21 18:37:33 379 1

原创 Best Time to Buy and Sell Stock

题目链接Say 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 (i.e., buy one and sell one share of the sto...

2019-01-20 23:01:36 122

原创 pyecharts安装一直报错问题解决

pyechats github链接问题描述:最近项目里需要用到pyecharts这个可视化python包,但是当我pip3 install 的时候一直报如下错误:通过源码安装也会报这个错误。问题解决在https://pypi.org/project/pyecharts/0.1.9.4/#files下载pyecharts-0.1.9.4-py2.py3-none-any.whl&nbsp...

2019-01-11 11:10:38 4571

原创 Climbing Stairs

题目链接You are climbing a stair case. It takes n steps to reach to the top.Each time you can either climb 1 or 2 steps. In how many distinct ways can you climb to the top?Note: Given n will be a posit...

2019-01-08 23:24:46 169

原创 First Bad Version

题目链接You are a product manager and currently leading a team to develop a new product. Unfortunately, the latest version of your product fails the quality check. Since each version is developed based o...

2019-01-07 16:04:35 196

原创 将本地代码上传到GitHub常报错误

1. Updates were rejected because the remote contains work that you do每次建立新的仓库,提交的时总会出现这样的错误,真是头疼,…直接开始正题,git 提交的步骤:git init //初始化仓库git add .(文件name) //添加文件到本地仓库git commit -m “first commit” ...

2019-01-04 15:42:30 313

原创 Convert Sorted Array to Binary Search Tree

题目链接Given an array where elements are sorted in ascending order, convert it to a height balanced BST.For this problem, a height-balanced binary tree is defined as a binary tree in which the depth of...

2019-01-04 09:24:51 149

原创 Binary Tree Level Order Traversal

题目链接Given a binary tree, return the level order traversal of its nodes’ values. (ie, from left to right, level by level).For example:Given binary tree [3,9,20,null,null,15,7],3/ \ 9 20/&...

2019-01-02 10:40:08 201

大模型入门必看教程 - GPT

大模型入门必看教程 - GPT

2023-11-08

java设计模式

http//pqpqnet/设计模式pdf持续更新中第1页目目目目录录录录1策略模式22代理模式63单例模式104多例模式125工厂方法156抽象工厂模式257门面模式268更新记录279相关链接28

2016-10-06

计算机网络

计算机网络学习基础,感觉还是很实用,很好的,

2015-09-12

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

TA关注的人

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