自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 NodeMCU实现温湿度数据采集并发送至手机App

NodeMCU实现温湿度数据采集并发送至手机App由于是之前Arduino项目中的一个分支,又刚巧看到了NodeMCU这款小型WiFi开发板,于是就有了这篇文章。硬件清单NodeMCU开发板DHT11温湿度传感器LCD1602安卓手机软件清单ArduinoIDEAndroid Studio一些重要的知识NodeMCU基于乐鑫 ESP8266 的 NodeMCU 开发板,具有 GPIO、PWM、I2C、1-Wire、ADC 等功能,结合 NodeMCU 固件为您的原型开发提供最

2020-06-26 19:40:47 6072 30

转载 DockerFile使用

DockerFile 制作镜像vi Dockerfile #编辑Dockerfile文件指令FROM       MAINTAINER   RUN       CMD      EXPOSEENVADDCOPYENTRYPOINTVOLUMEUSERWORKDIRONBUILD语法1、FROM       <image>  例子:FROM centos  FROM指定构建镜像的基础源镜像,如果本地没有指定的镜像,则会自动从Docker的公共库pull镜像下

2022-01-19 22:26:03 194 1

原创 大数据组件安装记录:Hadoop/HBase/zookeeper/kafka

安装记录ubuntu 环境 ~/.bashrcexport JAVA_HOME=/usr/local/jdk1.8.0_291export PATH=${JAVA_HOME}/bin:${PATH}export M2_HOME=/usr/local/mavenexport PATH=${M2_HOME}/bin:${PATH}export SCALA_HOME=/usr/local/scalaexport PATH=$PATH:$SCALA_HOME/binexport KAFKA_H

2022-01-15 09:38:07 1057

原创 LeetCode六月挑战(6.27 )Perfect Squares LeetCode 279解题方案

LeetCode六月挑战(6.27 )Perfect Squares LeetCode 279解题方案Given a positive integer n, find the least number of perfect square numbers (for example, 1, 4, 9, 16, …) which sum to n.Example 1:Input: n = 12Output: 3 Explanation: 12 = 4 + 4 + 4.Example 2:Inpu

2020-06-28 07:48:30 184

原创 LeetCode六月挑战(6.26 )Sum Root to Leaf Numbers LeetCode 129解题方案

LeetCode六月挑战(6.26 )Sum Root to Leaf Numbers LeetCode 129解题方案昨天的题只需要双重循环即可完成,很简单所以没有专门发一个题目描述Given a binary tree containing digits from 0-9 only, each root-to-leaf path could represent a number.An example is the root-to-leaf path 1->2->3 which rep

2020-06-26 20:11:22 175

原创 NodeMCU 搭建ArduinoIDE开发环境配置

NodeMCU 搭建ArduinoIDE开发环境配置工具使用windows系统下载Arduino IDE,我直接从官网下载的,这里是传送门Step1 下载并安装Arduinowindows很简单,只需要下载zip文件解压,找到arduino.exe双击运行即可。Mac版本相对来说比较复杂,需要从在system preferences中设置一下。将下载好的zip解压,然后将解压出来的文件拖到Application中这个时候的Arduino是不能用的,因为并未授权这个时候我们可以打开Sy

2020-06-26 05:40:19 2416 2

原创 NodeMCU驱动安装

NODEMCU驱动安装工具使用windows系统NodeMCU驱动,有需要的朋友可以点击这里 提取码:fcpwStep1 下载驱动下载并打开驱动包,可以看到包中含有如下文件,我的电脑是64位的,所以我们选择x64.exe驱动。Step2 打开驱动程序点击next选择accept,然后点击nextStep3 等待安装,安装成功后,Finish即可Step4 将NodeMCU与电脑连接,并查看端口号这里直接放图了...

2020-06-26 05:21:04 2403

原创 LeetCode六月挑战(6.24 )Unique Binary Search Trees LeetCode 96解题方案

LeetCode六月挑战(6.24 )Unique Binary Search Trees LeetCode 96解题方案题目描述Given n, how many structurally unique BST’s (binary search trees) that store values 1 … n?Example:Input: 3Output: 5Explanation:Given n = 3, there are a total of 5 unique BST’s: 1

2020-06-24 21:19:45 106

原创 LeetCode六月挑战(6.23 )Count Complete Tree Nodes LeetCode 222 解题方案

LeetCode六月挑战(6.23 )Count Complete Tree Nodes LeetCode 222 解题方案Given a complete binary tree, count the number of nodes.Note:Definition of a complete binary tree from Wikipedia:In a complete binary tree every level, except possibly the last, is completely

2020-06-23 21:26:20 92

原创 LeetCode六月挑战(6.22 )Single Number II LeetCode 137解题方案

LeetCode六月挑战(6.22 )Single Number II LeetCode 137解题方案Given a non-empty array of integers, every element appears three times except for one, which appears exactly once. Find that single one.Note:Your algorithm should have a linear runtime complexity. Coul

2020-06-22 22:38:26 114

原创 LeetCode六月挑战(6.21 )Dungeon Game LeetCode 174解题方案

LeetCode六月挑战(6.21 )Dungeon Game LeetCode 174解题方案The demons had captured the princess § and imprisoned her in the bottom-right corner of a dungeon. The dungeon consists of M x N rooms laid out in a 2D grid. Our valiant knight (K) was initially positioned i

2020-06-21 21:53:14 133

原创 LeetCode六月挑战(6.20 )Permutation Sequence LeetCode 60解题方案

LeetCode六月挑战(6.20 )Permutation Sequence LeetCode 60解题方案SolutionThe set [1,2,3,...,*n*] contains a total of n! unique permutations.By listing and labeling all of the permutations in order, we get the following sequence for n = 3:"123""132""213""231"

2020-06-21 08:20:41 100

原创 LeetCode六月挑战(6.19 )Longest Duplicate Substring LeetCode 1044

LeetCode六月挑战(6.19 )Longest Duplicate Substring LeetCode 1044Given a string S, consider all duplicated substrings: (contiguous) substrings of S that occur 2 or more times. (The occurrences may overlap.)Return any duplicated substring that has the longest

2020-06-19 21:52:09 178

原创 LeetCode六月挑战(6.18) H-Index II LeetCode275 解题报告

LeetCode六月挑战(6.18) H-Index II LeetCode275 解题报告今天的题很简单哦!题目描述SolutionGiven an array of citations sorted in ascending order (each citation is a non-negative integer) of a researcher, write a function to compute the researcher’s h-index.According to the d

2020-06-18 19:49:01 108

原创 LeetCode六月挑战(6.17) Surrounded Regions LeetCode130 解题报告

LeetCode六月挑战(6.17) Surrounded Regions LeetCode130 解题报告Surrounded RegionsSolutionGiven a 2D board containing ‘X’ and ‘O’ (the letter O), capture all regions surrounded by ‘X’.A region is captured by flipping all 'O’s into 'X’s in that surrounded region.

2020-06-17 20:41:30 103

原创 LeetCode 98 Validate Binary Search Tree解题方法

LeetCode 98 Validate Binary Search Tree解题方法初七还是蛮菜的,这个题初七在做的时候只考虑了每个子树符合条件,但是没有考虑到子树里的结点应该与根节点的做比较,所以[10,5,15,null,null,6,20]这个testcase的结果是错误的。所以我最后写了一个辅助函数进行比较。题目描述Given a binary tree, determine if it is a valid binary search tree (BST).Assume a BST is

2020-06-16 23:18:15 96

原创 LeetCode六月挑战(6.16) Validate IP Address Solution LeetCode468 解题报告

LeetCode六月挑战(6.16) Validate IP Address Solution LeetCode468 解题报告Write a function to check whether an input string is a valid IPv4 address or IPv6 address or neither.IPv4 addresses are canonically represented in dot-decimal notation, which consists of fo

2020-06-16 22:21:40 116

原创 LeetCode六月挑战(6.15) Search in a Binary Search Tree LeetCode700 解题报告

LeetCode六月挑战(6.15) Search in a Binary Search Tree LeetCode700 解题报告今天的题目比较简单Search in a Binary Search TreeSolutionGiven the root node of a binary search tree (BST) and a value. You need to find the node in the BST that the node’s value equals the given

2020-06-15 20:31:45 98

原创 LeetCode六月挑战(6.14) Cheapest Flights Within K Stops LeetCode787解题报告

LeetCode六月挑战(6.14) Cheapest Flights Within K Stops LeetCode787解题报告不知不觉半个月过去了,六月还有半个月哦,加油!题目There are n cities connected by m flights. Each flight starts from city u and arrives at v with a price w.Now given all the cities and flights, together with sta

2020-06-14 22:56:44 132

原创 LeetCode六月挑战(6.13)Largest Divisible Subset Solution解题方案

LeetCode六月挑战(6.13)Largest Divisible Subset Solution解题方案Largest Divisible SubsetSolutionGiven a set of distinct positive integers, find the largest subset such that every pair (Si, Sj) of elements in this subset satisfies:Si % Sj = 0 or Sj % Si = 0.If

2020-06-13 22:11:22 80

原创 Leetcode六月挑战赛(6.12)LeetCode380 Insert Delete GetRandom O(1)解题方案

Leetcode六月挑战赛(6.12)Leetcode380 Insert Delete GetRandom O(1)这是之前做过的一道题,我们再来详细分析一下。题目描述Design a data structure that supports all following operations in average O(1) time.insert(val): Inserts an item val to the set if not already present.remove(val):

2020-06-12 20:17:30 76

原创 MyBatis框架学习笔记(一)

MyBatis学习笔记(一)MyBatis内部封装jdbc,使开发者只需要关注sql语句本身通过cml或注解的方式将要执行的而各种statement配置起来,通过java对象和statement中sql的动态参数进行映射生成最终执行的sql语句,最后mybatis框架执行sql并将结果映射为java对象并return。采用ORM(Object Relation Mapping)思想解决了实体和数据映射的问题,对jdbc进行封装,屏蔽jdbc api底层访问细节,使我们不用与api打交道,

2020-06-12 04:24:43 145

原创 LeetCode六月挑战(6.11) Sort Color解题方案

LeetCode六月挑战(6.10) Sort ColorSolutionGiven an array with n objects colored red, white or blue, sort them in-place so that objects of the same color are adjacent, with the colors in the order red, white and blue.Here, we will use the integers 0, 1, and 2

2020-06-11 21:49:01 126

原创 聊聊物联网中的HTTP

物联网中的HTTPHTTP协议用来传输网页数据,由请求和响应构成HTTP请求分为两部分,请求头和请求体。e.g .GET / HTTP/1.1 --请求行用于描述客户端的请求方式,请求的资源名称以及HTTP协议版本号​ HOST: ww.baidu.com --(多个)请求头用于描述客户端请求哪台主机,已经客户端的环境信息GET是一个读取请求,请求网页发送数据,/的作用是告诉网站服务器正在请求网站根目录下的内容即网页数据。HTTP/1.1是采用HTTP的协议版本号为1.1。Host:

2020-06-11 02:21:16 713

原创 LeetCode六月挑战(6.10 ) Search Insert Position LeetCode 35解题方案

LeetCode六月挑战(6.10 ) Search Insert Position LeetCode 35首先:欢迎大家关注我的博客SolutionGiven a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in order.You may assume no dupli

2020-06-10 20:51:18 90

原创 LeetCode六月挑战(6.9) Is Subsequence LeetCode 392

LeetCode六月挑战(6.9 Is Subsequence LeetCode 392SolutionGiven a string s and a string t, check if s is subsequence of t.A subsequence of a string is a new string which is formed from the original string by deleting some (can be none) of the characters witho

2020-06-09 22:41:50 109

原创 LeetCode六月挑战(6.8)Power of Two

LeetCode六月挑战(6.8)Power of TwoPower of TwoSolutionGiven an integer, write a function to determine if it is a power of two.Example 1:Input: 1Output: true Explanation: 20 = 1Example 2:Input: 16Output: trueExplanation: 24 = 16Example 3:Input: 21

2020-06-08 19:42:39 89

原创 计算机网络自顶向下方法Character1补充

端系统通过通信链路和分组交换机(packet switch)连接到一起。链路的传输速率以比特/秒度量(bit/s或bps)。当一台端系统要向另一台端系统发送数据时,发送端系统将数据分段,并为每段加上首部字节。由此形成的信息包用计算机网络的术语来说称为分组( packet)。这些分组通过网络发送到目的端系统,在那里被装配成初始数据。分组交换机:路由器(router)和链路交换机(link-layer switch)。链路层交换机通常用于接入网中,而路由器通常用于网络核心中。从发送端系统到接收端..

2020-06-08 08:08:50 162

原创 计算机网络自顶向下Character1学习笔记

计算机网络自顶向下方法Character1本文概述:本文主要记录计算机网络自顶向下方法第一章节的知识点。学习书籍为:计算机网络自顶向下方法学习视频为:国立清华大学黄能富教授讲解的计算机网络自顶向下方法,需要的可以点击 这里What’s the Internet: nuts and blots view终端(host) = end-systems: running network apps通信线路(communication links): transmission rate = ba

2020-06-08 08:06:22 2693 2

原创 LeetCode六月挑战(6.7)Coin Change 2 (LeetCode 518)

LeetCode六月挑战(6.7)Coin Change 2SolutionYou are given coins of different denominations and a total amount of money. Write a function to compute the number of combinations that make up that amount. You may assume that you have infinite number of each kind

2020-06-07 22:16:57 95

原创 LeetCode六月挑战(6.5)Random Pick with Weight

LeetCode六月挑战(6.5)Random Pick with WeightSolutionGiven an array w of positive integers, where w[i] describes the weight of index i, write a function pickIndex which randomly picks an index in proportion to its weight.Note:1 <= w.length <= 10000

2020-06-06 23:33:19 81

原创 LeetCode六月挑战(6.4)Reverse String

LeetCode六月挑战(6.4)Reverse StringWrite a function that reverses a string. The input string is given as an array of characters char[].Do not allocate extra space for another array, you must do this by modifying the input array in-place with O(1) extra me

2020-06-06 23:20:59 63

原创 LeetCode六月挑战(6.3)Two City Scheduling

LeetCode六月挑战(6.3)Two City SchedulingSolutionThere are 2N people a company is planning to interview. The cost of flying the i-th person to city A is costs[i][0], and the cost of flying the i-th person to city B is costs[i][1].Return the minimum cost to

2020-06-06 23:15:51 97

原创 LeetCode六月挑战(6.2)Delete Node in a Linked List

LeetCode六月挑战(6.2)Delete Node in a Linked ListWrite a function to delete a node (except the tail) in a singly linked list, given only access to that node.Given linked list – head = [4,5,1,9], which looks like following:Example 1:Input: head = [4,5,1,9

2020-06-06 23:04:37 85

原创 LeetCode六月挑战(6.1)Invert a binary tree

LeetCode六月挑战(6.1)Invert a binary tree.Example:Input: 4 / \ 2 7 / \ / \1 3 6 9Output: 4 / \ 7 2 / \ / \9 6 3 1思路:递归查找左右子树,以题为例,当递归的左子树2的时候,将1和3交换,当递归到右子树7的时候,交换6和9。/** * Definition for a binary tree

2020-06-06 23:02:16 76

原创 Leetcode995 Minimum Number of K Consecutive Bit Flips解决方案

Leetcode995 Minimum Number of K Consecutive Bit Flips##题目描述In an array A containing only 0s and 1s, a K-bit flip consists of choosing a (contiguous) subarray of length K and simultaneously changing every 0 in the subarray to 1, and every 1 in the subarra

2020-06-06 22:58:56 165

原创 LeetCode994 Rotting Oranges解题方案

LeetCode994 Rotting Oranges题目描述In a given grid, each cell can have one of three values:the value 0 representing an empty cell;the value 1 representing a fresh orange;the value 2 representing a rotten orange.Every minute, any fresh orange that is ad

2020-06-06 22:56:31 200

原创 Leetcode993 Cousins in Binary Tree解决方案

Leetcode993 Cousins in Binary Tree题目描述In a binary tree, the root node is at depth 0, and children of each depth k node are at depth k+1.Two nodes of a binary tree are cousins if they have the same depth, but have different parents.We are given the root

2020-06-06 22:53:50 87

原创 Leetcode79 Word Search解题方案

Leetcode79 Word Search题目描述board =[ ['A','B','C','E'], ['S','F','C','S'], ['A','D','E','E']]​Given word = "ABCCED", return true.Given word = "SEE", return true.Given word = "ABCB", return false.思路根据word的第一个字符(d=0)在二维char数组中

2020-06-06 22:45:26 264

原创 LeetCode六月挑战赛6. 6Queue Reconstruction by Height(LeetCode 406)

LeetCode六月挑战赛6. 6Queue Reconstruction by Height(LeetCode 406)Suppose you have a random list of people standing in a queue. Each person is described by a pair of integers (h, k), where h is the height of the person and k is the number of people in front o

2020-06-06 22:34:12 82

空空如也

空空如也

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

TA关注的人

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