- 博客(11)
- 收藏
- 关注
原创 在windows上连接虚拟机
查看虚拟机ssh服务是否打开service sshd status若是not found,则需要安装openssh-serversudo apt-get install openssh-server openssh-client若是inactive,则service sshd start也可以查看是否有ssh的服务ps -e | grep sshd...
2019-11-07 15:23:14
389
原创 ubuntu安装anaconda pytorch 远程配置jupyter
在tuna镜像站中选择对应版本的anaconda,我下载的是Anaconda3-5.2.0-Linux-x86_64.sh,对应python3.6.然后直接bashAnaconda3-5.2.0-Linux-x86_64.sh安装过程中,安装路径自己输入/opt/anaconda3。安装完成后,在/etc/profile中最后一行,添加export PATH=/opt/...
2019-10-30 20:47:16
291
原创 ubuntu16.04配置显卡驱动和CUDA,CUDNN
1.安装SSH为了通过ssh工具远程连接服务器sudo apt-get install openssh-server2.vim wgetubuntu自带的是vi,可能会在编辑时不能移动光标。wget可用于下载东西:wget -c urlsudo apt-get install vimvim --versionapt-get updateapt-get i...
2019-10-30 11:29:46
174
原创 ubuntu创建新用户和添加权限
创建新用户useradd -r -m -s /bin/bash 用户名-r 建立系统账号 -m 自动建立用户的登入目录 -s 指定用户登陆所使用的shell添加用户权限通过修改/etc/sudoers的方式修改权限sudo chmod +w /etc/sudoerssudo vi /etc/sudoers在 "root ALL=(ALL) ALL"的...
2019-10-29 19:57:09
719
原创 1105. Filling Bookcase Shelves
int minHeightShelves(vector<vector<int>>& books, int shelf_width) { auto n=books.size(); vector<int> dp(n+1,INT_MAX/2); dp[0]=0; for(int i=1;...
2019-09-27 22:06:30
124
原创 322. Coin Change
int coinChange(vector<int> &coins, int amount) { vector<int> ans(amount + 1, amount+10); ans[0] = 0; for (int i = 1; i < amount+1; i++) { for...
2019-09-23 21:49:04
52
原创 42. Trapping Rain Water
int trap(vector<int>& height) { int leftmax=0,rightmax=0,res=0; int lf=0,rh=height.size()-1; while(lf<rh){ if(height[lf]<height[rh]){ ...
2019-09-19 21:55:42
59
原创 11. Container With Most Water
int maxArea(vector<int>& height) { int i=0,j=height.size()-1; int ans=0; while(i<j){ int mins=min(height[i],height[j]); ans=max(ans,(j...
2019-09-18 22:04:22
73
原创 linux命令
mkdir 创建新目录 -p可以递归创建rmdir 删除空目录cp 复制文件 -r复制目录 -p复制文件属性信息mv 移动或改名rm 删除文件 -r删除目录 -f不用询问自己删除touch 创建文件cat 查看文件内容 加行号 -ntac 反序显示more/less 显示长文件 (less可以搜索关键字)head 显示文件前几行 -n选择多...
2019-09-17 20:34:10
101
原创 34. Find First and Last Position of Element in Sorted Array
vector<int> searchRange(vector<int>& nums, int target) { vector<int> ans(2,-1); bool f=false,r=false; int n=nums.size(); int i=0,j=n-1; ...
2019-09-17 20:17:28
81
原创 94.二叉树中序遍历
vector<int> inorderTraversal(TreeNode* root) { vector<int> res; stack<TreeNode *> st; while(1) { if (root) { st.push(root); ...
2019-09-17 12:07:39
55
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人