自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 git常用命令备忘

本地git init 初始化git add tilegit commit -m 'message' tile分支git branch 分支名 创建分支git checkout 分支名 切换git branch -v 查看分支git merge 分支名 合并分支历史版本git refloggit log版本回退git reset --hard 版本号...

2022-05-05 21:07:23 121 1

原创 917. 仅仅反转字母

class Solution: def reverseOnlyLetters(self, S: str) -> str: i=0 j=len(S)-1 result=[" "]*len(S) while(i<len(S) and j>=0): if(S[i].isalpha() and S[j].isalpha()): result[i]=S[j] .

2020-09-15 20:17:41 102

原创 88. 合并两个有序数组

class Solution: def merge(self, nums1: List[int], m: int, nums2: List[int], n: int) -> None: """ Do not return anything, modify nums1 in-place instead. """ i=0 j=0 t=0 ttt=m+n-1 while(.

2020-09-12 21:01:08 102

原创 秋招2020 笔试查漏

英特尔:基础算法:中后序遍历霍夫曼树sram和dramx86和64位AI部分:测试集抖动全连接层参数

2020-09-11 20:58:02 120

原创 216. 组合总和 III

class Solution: def combinationSum3(self, k: int, n: int) -> List[List[int]]: end=[] def dfs(k,n,l,i): if(sum(l)==n and len(l)==k): end.append(l.copy()) if(i>9 or len(l).

2020-09-11 09:16:59 105

原创 2020-09-10

class Solution: def canPlaceFlowers(self, flowerbed: List[int], n: int) -> bool: if n==0: return True if len(flowerbed)<=2: for i in flowerbed: if i==1 or n>1: return.

2020-09-10 20:18:06 68

原创 1550. 存在连续三个奇数的数组 (easy)

class Solution: def threeConsecutiveOdds(self, arr: List[int]) -> bool: isodd=0 for i in arr: if i%2 != 0: isodd+=1 if(isodd==3): return True else: .

2020-09-10 19:03:50 91

原创 628. 三个数的最大乘积 (EASY)

class Solution: def maximumProduct(self, nums: List[int]) -> int: nums.sort() if(nums[0]<0 and nums[1]<0): return nums[-1]*nums[-2]*nums[-3] if nums[-1]*nums[-2]*nums[-3]>nums[1]*nums[0]*nums[-1] else nums[1]*nu.

2020-09-10 18:58:43 81

原创 977. 有序数组的平方 (EASY)

class Solution: def sortedSquares(self, A: List[int]) -> List[int]: A=[num*num for num in A] A.sort() return A

2020-09-10 18:45:59 78

原创 面试题 17.10. 主要元素 (ESAY)

class Solution: def majorityElement(self, nums: List[int]) -> int: s = set(nums) for i in s: if(nums.count(i)>len(nums)/2): return i; return -1

2020-09-10 18:37:25 123

原创 39. 组合总和

class Solution: def combinationSum(self, candidates: List[int], target: int) -> List[List[int]]: end=[]; i=0; tmp=[]; def dfs(candidates, target,tmp,i): if sum(tmp)==target: end.

2020-09-10 09:11:11 89

原创 40. 组合总和 II

class Solution: def combinationSum2(self, candidates: List[int], target: int) -> List[List[int]]: candidates=sorted(candidates) end=[] def dfs(candidates,target,i,l): if(sum(l)==target): end.appen.

2020-09-10 09:10:08 66

原创 1576. 替换所有的问号

class Solution: def modifyString(self, s: str) -> str: while s.find('?')!=-1: t='a' tmp=ord(t) if len(s)==1: return 'a' if s.find('?')==0: while t==s[s.find('?'.

2020-09-08 11:08:21 134

原创 347. 前 K 个高频元素

class Solution {public: static bool cmp(pair<int,int> a,pair<int,int> b){ return a.second > b.second; } vector<int> topKFrequent(vector<int>& nums, int k) { map<int,int> m; for(int .

2020-09-07 16:35:57 81

原创 新服务器安装 -mima

安装部分:机架的安装比较麻烦,导轨请参考安装说明线路安装包括,电源线,网线,vga线(连接屏幕),鼠标键盘的双usb线(机柜里是触摸板不需要)首先网线安装,顺着145服务器的网线找到交换机,新买的网线一头插入交换机另一头插入服务器,亮绿灯表示可用(黄灯可能是因为ip地址还未配置好)安装好开机,在机箱里会有管理员账号密码,输入账号密码登录界面网络部分:首先问李老师要新分...

2020-04-17 16:27:32 399

原创 服务器备忘

查看端口被监听 netstat –ntl杀死指定端口 sudo fuser -k -n tcp 80杀死指定用户 sudo killall -u 用户名查看进程对应文件 ps aux | grep 4874文件权限部分把文件拥有者赋给指定用户 sudo chown -R username filename (其中R可选,递归处理内部文件)查看文件夹访问权限 ......

2020-03-19 10:52:18 523

原创 ubuntu 连不上网

首先确定网线是否可用,可用的话插上去在机箱后面会亮绿灯接着如果连不上网,先ping119.75.217.109 (这是百度的ip地址),如果不可用尝试重启网络服务,命令是sudo /etc/init.d/networking restart接着继续ping119.75.217.109如果ping的通继续ping www.baidu.co...

2019-12-16 19:21:06 408

原创 git 备忘

总述 https://blog.csdn.net/qq_36150631/article/details/81038485常用指令备忘:首先一般linux指令都可用git init 将目录变为git可以管理的库,就是那个.git文件git add example.txt 将文件添加到暂存区git commit 将文件提交给仓库git commit -m 文件名 提...

2019-12-10 21:28:13 97

原创 linux下anaconda pip更新到用户目录问题

使用sudo命令时候会默认将pip安装到用户目录 因此只需要删掉管理员指令即可,可能权限不够,只需要用 chown -R 用户名 目录名把权限赋给他即可 这里只需要简单地使用pip install --upgrade pip 即可...

2019-11-07 19:23:57 296

原创 xrdp 老版本返回上一次登录以及error - problem connecting

连接服务器失败总结以下几种处理方式:首先确定不是网络问题, ping ip地址说明服务器端的网络没有问题,通常linux开机默认监听22,3350,3389几个端口22端口是用来连接ssh,一般不会挂掉,可以使用winscp尝试连接22端口,如果能够连接,但是连接超时,那么一般是3350或者3389端口挂掉了去服务器端查看端口信息 使用命令netstat -n...

2019-10-18 13:56:58 2168

原创 openslide更新为3.4.1 删除旧版本后不显示新版本问题

正常安装openslide-3.4.1,参考博客https://blog.csdn.net/weixin_37485708/article/details/86090352我在读取病理切片的时候遇到了错误:TIFFFillTile: 0: Invalid tile byte count, tile 41852github上有相关问题日志:https://github...

2019-10-17 18:58:26 677 2

原创 服务器硬件维护

磁盘检测,使用smartoctl ,先下载:sudo apt-get install smartmontools查看硬盘详细信息:sudo smartctl -a /dev/sda 这里的sda是具体的硬盘,可以df -h查看有哪些硬盘,至于1234是下面的子分区查看磁盘信息fdisk -l...

2019-09-05 20:43:28 253

原创 安装Linux win双系统 无法正常启动 读不出U盘

最近需要32位Linux,所以把64位的删掉重新下载,若只删除分区,会遗留Linux的引导,具体删除教程很好找不赘述    首先uefi模式无法安装32位的Ubuntu , 所以安装32位Linux之前一定要检查一下是否开启了uefi模式,这里是一个关闭教程        http://jingyan.baidu.com/article/1876c852bc6a82890b

2017-10-14 18:21:45 1805

原创 table加到JScrollPane不能变大小 问题

今天写swing遇见小bug浪费很久,jtable表一直居中很小,而且表的数据不显示表头,查了半天数据库最后发现是 JScrollPane和Jpanel放反了 因为JScroLLPane 类只能放一个组件,通常有多个组件时讲多个组件放在Jpanel中,并将panel放在JScroLLPane中...

2017-09-17 23:21:48 1298

空空如也

空空如也

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

TA关注的人

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