自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(9)
  • 问答 (3)
  • 收藏
  • 关注

原创 shell拼接字符串时自动换行的解决办法

问题描述:在使用shell读取某txt文件,并将多行文本拼接给一个一个变量时,总是会自动换行问题原因:文件版本问题解决方法:vim进入要读取的文本,然后“set ff=unix”

2021-07-21 17:46:19 2028

原创 pycharm安装pytorch报错的原因之一及解决方法

今天在pycharm通过interpreter 安装 pytorch时一直报错No such file or directory,Google一番后猜测是因为文件名超过250字符,windows系统默认禁止文件路径超过250字符。解决办法如下:1. 进入注册表编辑器2. 找到以下目录:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem3. 找到LongPathsEnabled, 参数选1保存,重新进入

2021-02-07 06:03:15 1756

原创 docker中安装tcpdump出错解决方法

在做高速网络实验时遇到问题,做一下记录tcpdump安装后使用过程中出现错误:tcpdump: error while loading shared libraries: libcrypto.so.1.0.0: cannot stat shared object: Permission denied解决方法:mv /usr/sbin/tcpdump /usr/bin/tcpdumpln -s /usr/bin/tcpdump /usr/sbin/tcpdump...

2020-12-06 05:24:17 1837

原创 LeetCode.98 —— 验证二叉搜索树(Validate Binary Search Tree)

Given a binary tree, determine if it is a valid binary search tree (BST).Assume a BST is defined as follows:The left subtree of a node contains only nodes with keysless thanthe node's key. The right subtree of a node contains only nodes with keysgr...

2020-07-26 02:14:59 119

原创 Java Comparator使用指南 ---- 看这一篇就够了

目录Comparator:Comparator的Default方法:Comparable接口在Java学习过程中,Arrays.sort()可以说是我写过最多的一个方法之一。但在很多时候,仅仅是对数组的升序排序并不能满足我们的要求。例如对复杂的对象数组进行排序,或是对大量对象进行分组。为此,Java提供了比较器来解决此类问题.上来先举个例子:class People{ String name; int age; int id; public.

2020-07-16 14:49:57 24790

原创 LeetCode.695 —— 岛屿的最大面积(Max Area of Island)

Given a non-empty 2D arraygridof 0's and 1's, anislandis a group of1's (representing land) connected 4-directionally (horizontal or vertical.) You may assume all four edges of the grid are surrounded by water.Find the maximum area of an island in th...

2020-07-11 23:33:25 147

原创 关于Integer的缓存机制所引出的问题

在复习Java基础时看到这样一个问题:public static void main(String[] args) { Integer a = 800; Integer b = 800; System.out.println((a == b) +" "+ a.hashCode()+" "+b.hashCode()); Integer c = new Integer(8); Integer d = new Integer(

2020-07-11 11:43:41 343 1

原创 LeetCode.662 —— 二叉树的最大宽度(Maximum Width of Binary Tree)

题目:https://leetcode.com/problems/maximum-width-of-binary-tree/Given a binary tree, write a function to get the maximum width of the given tree. The width of a tree is the maximum width among all levels. The binary tree has the same structure as afull bi.

2020-07-10 23:42:26 399 1

转载 100层楼2个鸡蛋,测试其最低破碎楼层问题

原文章链接http://www.cnblogs.com/yangai/p/5391533.htmlhttp://www.tuicool.com/articles/NzUNJrhttp://blog.sina.com.cn/s/blog_6c813dbd0101bh98.html有一栋楼共100层,一个鸡蛋从第N层及以上的楼层落下来会摔破, 在第N层以下的楼层落下

2017-10-24 16:29:52 8999 2

空空如也

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

TA关注的人

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