自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

两鬓已不能斑白的专栏

临渊羡鱼,不如退而结网

  • 博客(463)
  • 资源 (4)
  • 收藏
  • 关注

原创 2020-11-30

Longest Valid ParenthesesGiven a string containing just the characters ‘(’ and ‘)’, find thelength of the longest valid (well-formed) parentheses substring.Example 1:Input: s = “(()”Output: 2 Explanation: The longest valid parenthesessubstring is .

2020-11-30 21:46:22 322

原创 2020-11-30

Merge k Sorted ListsYou are given an array of k linked-lists lists, each linked-list is sorted in ascending order.Merge all the linked-lists into one sorted linked-list and return it.Example 1:Input: lists = [[1,4,5],[1,3,4],[2,6]]Output: [1,1,2,3,.

2020-11-30 21:02:29 259

原创 spring-data-jpa 是如何渲染查询的

spring-data-jpa 是如何渲染查询的1、 spring-data-jpa是什么, 它和jpa有什么关系?jpa: Java Persistence API, 是一种规范, 定义了一系列的接口, 用于将对象映射到表上.Hibernate: 是jpa的一种实现spring-data-jpa spring全家通成员之一, 也是jpa的一种实现, 并且是hibernate的封装, 底层调用的是hibernate三者的关系可以参考下图(图片源自网络)从上图中可以看出, spring-data

2020-06-25 11:01:16 688 1

原创 897. Increasing Order Search Tree

897. Increasing Order Search TreeGiven a tree, rearrange the tree in in-order so that the leftmost node in the tree is now the root of the tree, and every node has no left child and only 1 right chil...

2019-03-27 23:26:40 305

原创 942. DI String Match

942. DI String Match下班到家后,刷了刷leetcode,发现了一道很有意思的小题,题目如下:Given a string S that only contains “I” (increase) or “D” (decrease), let N = S.length.Return any permutation A of [0, 1, …, N] such that fo...

2019-03-26 22:38:39 218

原创 LeetCode刷题笔记目录

1、Two Sumhttps://blog.csdn.net/u010429424/article/details/7764898927、Remove Elementhttps://blog.csdn.net/u010429424/article/details/7326056453、Maximum Subarrayhttps://blog.csdn.net/u010429424/art...

2019-03-01 22:59:39 412

原创 692. Top K Frequent Words:HashMap排序

因为平时工作中较少能接触到HashMap的排序,因此周末借由一道leetcode上的小题,再写一写HashMap的排序代码,特此记录。原题如下:Top K Frequent WordsGiven a non-empty list of words, return the k most frequent elements.Your answer should be sorted by f...

2019-01-06 11:23:48 476

原创 Leetcode 215. Kth Largest Element in an Array

Find the kth largest element in an unsorted array. Note that it is the kth largest element in the sorted order, not the kth distinct element.Example 1:Input: [3,2,1,5,6,4] and k = 2Output: 5Exampl...

2018-12-31 00:27:07 180

原创 Leetcode 946. Validate Stack Sequences

Given two sequences pushed and popped with distinct values, return true if and only if this could have been the result of a sequence of push and pop operations on an initially empty stack.Example 1:...

2018-12-23 16:14:50 439

原创 338. Counting Bits

Given a non negative integer number num. For every numbers i in the range 0 ≤ i ≤ num calculate the number of 1’s in their binary representation and return them as an array.Example 1:Input: 2Output...

2018-11-11 17:32:36 215

原创 Leetcode 703.Kth Largest Element in a Stream

Design a class to find the kth largest element in a stream. Note that it is the kth largest element in the sorted order, not the kth distinct element.Your KthLargest class will have a constructor whi...

2018-11-03 22:52:13 322

原创 Java Exception、Error学习

Java Exception、Error学习一、Exception(异常)、Error(错误)均继承自Throwable,表示可以被抛出,需要使用catch捕获。IOException:I/O操作异常,一般在文件读写时捕获ClassNotFoundException:找不到指定类的异常(编译时Class.forName)TimeoutException:超时异常,Exception th...

2018-10-28 15:37:00 218

原创 yolo3 + python 找出图像中的汉字

yolo3 + python 识别二维码中的汉字源码下载地址https://github.com/lijialinneu/keras-yolo3-master/准备环境(1)python环境,安装anaconda3,我装的是python3.6版本(2)安装tensorflow(cpu版)、keras,直接用pip install 命令下载,或conda install命令(3)下载...

2018-10-21 09:34:25 10327 11

原创 leetcode 广搜小题两道

leetcode 广搜小题两道周末无聊,故刷两道小题,用的都是广搜的思想Minimum Depth of Binary TreeGiven a binary tree, find its minimum depth.The minimum depth is the number of nodes along the shortest path from the root node ...

2018-09-22 23:49:43 381

原创 783. Minimum Distance Between BST Nodes

Given a Binary Search Tree (BST) with the root node root, return the minimum difference between the values of any two different nodes in the tree.Example :Input: root = [4,2,6,1,3,null,null...

2018-09-09 09:13:58 234

原创 SQL join、left join小例子

最近在刷Leetcode中,遇到两道SQL小题,记录在此 join小例子: 181. Employees Earning More Than Their Managers 197. Rising Temperature left join 小例子: 175. Combine Two Tables181. Employees Earning More...

2018-09-09 08:27:33 1368

原创 690. Employee Importance

You are given a data structure of employee information, which includes the employee’s unique id, his importance value and his direct subordinates’ id. For example, employee 1 is the leader of employ...

2018-09-08 23:35:06 195

原创 888. Fair Candy Swap

**888. Fair Candy Swap**Alice and Bob have candy bars of different sizes: A[i] is the size of the i-th bar of candy that Alice has, and B[j] is the size of the j-th bar of candy that Bob has.Since...

2018-08-25 10:56:36 445

原创 Leetcode 关于树的题:589. N-ary Tree Preorder Traversal 和 429. N-ary Tree Level Order Traversal

Given an n-ary tree, return the preorder traversal of its nodes’ values.For example, given a 3-ary tree:Return its preorder traversal as: [1,3,5,6,2,4].Note: Recursive solution is trivial, cou...

2018-08-25 09:30:26 397

原创 695. Max Area of Island

Given a non-empty 2D array grid of 0’s and 1’s, an island is a group of 1’s (representing land) connected 4-directionally (horizontal or vertical.) You may assume all four edges of the grid are surro...

2018-06-28 21:32:33 267 3

原创 811. Subdomain Visit Count

A website domain like “discuss.leetcode.com” consists of various subdomains. At the top level, we have “com”, at the next level, we have “leetcode.com”, and at the lowest level, “discuss.leetcode.com”...

2018-06-27 21:18:54 367

原创 821. Shortest Distance to a Character

Given a string S and a character C, return an array of integers representing the shortest distance from the character C in the string.Example 1:Input: S = "loveleetcode", C = 'e'Output: [3...

2018-06-22 09:46:10 197

原创 852. Peak Index in a Mountain Array

Let’s call an array A a mountain if the following properties hold: A.length >= 3 There exists some 0 < i < A.length - 1 such that A[0] < A[1] < ... A[i-1] < A[i] ...

2018-06-18 11:03:15 376

原创 669. Trim a Binary Search Tree

Given a binary search tree and the lowest and highest boundaries as L and R, trim the tree so that all its elements lies in [L, R] (R >= L). You might need to change the root of the tree, so the r...

2018-06-02 16:06:53 214

原创 LeetCode 832. Flipping an Image

Given a binary matrix A, we want to flip the image horizontally, then invert it, and return the resulting image.To flip an image horizontally means that each row of the image is reversed.  For ...

2018-06-02 15:06:01 373

原创 Scrapy爬虫学习笔记1. 安装并编写第一个Scrapy爬虫

Scrapy爬虫学习笔记1. 安装并编写第一个Scrapy爬虫 以下内容参考自《精通Scrapy网络爬虫一书》,小白的学习记录。 如果想了解一下Scrapy的实现细节,可以在github中下载到源代码,地址如下: https://github.com/scrapy/scrapyScrapy安装(1)pip install 安装(2)setup.py 安装(3)尝...

2018-05-06 17:08:10 907

原创 python itchat 使用记录(代码帖)

itchat 是一个调用微信的python接口,通过itchat,可以基于开发一些扩展功能。官方教程通俗易懂,官方教程入口: http://itchat.readthedocs.io/zh/latest/tutorial/tutorial0/下面的代码,添加了自动聊天机器人的功能,里面使用了图灵机器人,可以到官网上申请一个,官网地址:http://www.tuling123.com/# ...

2018-02-20 22:31:02 1286

原创 IDEA构建Spring项目初探(配置记录)

IDEA构建Spring项目初探1、首先,在IDEA中新建一个Spring项目,项目命名为SpringTest2、然后,新建一个User类,类中只有一个成员变量:username。使用IDEA的快捷键,可以快速创建get和set方法。 User.javapublic class User { private String username; public Str

2018-01-29 21:45:56 521

原创 base64 字符串转为图片(python代码)

将base64字符串转为图片的python代码,python为我们提供了b64decode函数,来实现这个功能。import osimport base64 import sysstrs = sys.argv[1] # 读取命令行中输入的参数,即base64字符串img = base64.b64decode(strs) file = open('test.jpg','wb

2018-01-15 21:12:40 13647

原创 北京工作前一天

今天是2018年1月8日,于沈阳,2018年的第一场大雪,明天就要去北京正式工作了,下午等友人,无聊,故刷Leetcode小题~第1题、728. Self Dividing NumbersA self-dividing number is a number that is divisible by every digit it contains.For example, 128 is

2018-01-08 14:14:48 557

原创 OpenCV 自学笔记33. 计算图像的均值、标准差和平均梯度

OpenCV 自学笔记33. 计算图像的均值、标准差和平均梯度均值、标准差和平均梯度是验证图像质量的常用指标。其中:均值反映了图像的亮度,均值越大说明图像亮度越大,反之越小;标准差反映了图像像素值与均值的离散程度,标准差越大说明图像的质量越好;平均梯度反映了图像的清晰度和纹理变化,平均梯度越大说明图像越清晰;那么,如何使用OpenCV计算图像的均值、标准差和平均梯度呢?OpenCV提供了几个

2017-11-21 14:57:07 66852 8

原创 88. Merge Sorted Array

Given two sorted integer arrays nums1 and nums2, merge nums2 into nums1 as one sorted array.Note:You may assume that nums1 has enough space (size that is greater or equal to m + n) to hold additional

2017-11-15 20:40:22 303

原创 OpenCV自学笔记32. ubuntu 安装python3+opencv3的过程记录

OpenCV自学笔记32. ubuntu 安装python3+opencv3的过程记录1、安装numpysudo apt-get install python3-numpy2、安装其他依赖sudo apt-get install build-essential cmake libgtk2.0-dev pkg-config libavcodec-dev libavformat-dev libswsca

2017-11-14 14:59:41 2155 1

原创 python3 urllib

python 3 urllib的使用方法import urllib.request r = urllib.request.urlopen("http://www.baidu.com")print(r.read())import urllib.requestvalue = {}val

2017-11-08 15:25:45 390

原创 189. Rotate Array

Rotate an array of n elements to the right by k steps.For example, with n = 7 and k = 3, the array [1,2,3,4,5,6,7] is rotated to [5,6,7,1,2,3,4]. Note:Try to come up as many solutions as you can,

2017-11-08 15:24:34 276

原创 京东笔试:合法字符串

题目描述有关合法字符串的问题,记不太清了,大概描述如下:首先""是合法的字符串如果X是合法的字符串,那么(X)也是合法的字符串如果X是合法的字符串,那么XY也是合法的字符串比如"",(),()(),(((()))),((),())都是合法的字符串 现在,我们要对合法字符串进行删除,一次删除如下:首先去掉最左边的"("然后去掉一个")"如果执行一次操作后,字符串依

2017-11-08 15:21:31 488

原创 Linux 入门笔记6. 进程管理入门

Linux 入门笔记6. 进程管理入门1、进程监控(1)ps比如使用ps命令,监控python进程:ps -ef | grep python这几列的含义分别为:UID、PID、PPID、C、STIME、TTY、TIME、CMD 列 含义 UID 用户ID PID 进程ID PPID 父进程ID C CPU资源占用百分比 STIME 进程启动时间 TT

2017-11-07 17:02:28 1037

原创 Linux入门笔记5. 多用户多任务

Linux入门笔记5. 多用户多任务1、用户与组Linux是一个多用户多任务的操作系统,可以允许多个用户同在系统上执行不同的任务。Linux的用户一般分为超级用户、普通用户,还有虚拟用户。用户与组:把具有相同权限的用户统一到一个组中,可以方便权限的管理。比如有多个用户具有修改数据库的权限,那么可以将他们放在同一个组中,对这个组赋予修改数据库的权限。用户与组不是一一对应的,一个用户可以存在于多个组中,

2017-11-05 12:25:07 1648

原创 Linux入门笔记4. 菜鸟的常用命令

Linux入门笔记4. 菜鸟的常用命令1、系统维护命令(1)ls:ls命令有点像windows下的dir命令,用于显示目录下的内容,后面可以加不同的选项,比如: 选项 作用 -a –all 显示所有的文件 -l 详细列出文件信息其余选项可以使用 --help查看帮助(2)cd 选项 作用 cd .. 返回

2017-11-04 21:33:16 489

原创 Linux入门笔记3. shell语法入门

Linux入门笔记3. shell语法入门1、通配符通配符有点像正则表达式中的通配符,感觉大同小异。常用的通配符有:*、?、[]等(1)*表示匹配任意一个或多个字符列出所有以.db为结尾的文件ls *.db(2)? 表示匹配任意一个字符,与*的区别在于:?只能匹配一个字符) (3)[] 表示匹配任意包含在[]内的字符下面的命令会列出rc1.d、rc2.d、rc3.d、rc4.d、rc5.d、rc6

2017-11-04 19:41:35 559

vgg16_weights_th_dim_ordering_th_kernels_notop.h5

vgg16 cnn theano

2017-08-05

vgg16_weights_tf_dim_ordering_tf_kernels_notop.h5

vgg16 卷积神经网络

2017-08-05

《机器学习实战》一书的源代码

《机器学习实战》一书的源代码,用python写的

2015-09-24

python写的列主元Gauss消去法

Gauss消去法可以有效计算线性方程组。针对《数值分析》中的列主元Gauss消去算法,编写的python程序。在这个程序中,可以计算出线性方程组的一个x解,并能逐步打印出线性方程组的每一步变换。注意:运行此程序需要了解基本的线性代数知识。tar.gz是我在Ubuntu下的压缩包,请自行解压,如有问题或意见,欢迎反馈,谢谢!

2015-09-23

空空如也

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

TA关注的人

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