会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
瞬_冷
新随笔
管理
上一页
1
2
3
4
5
6
2018年11月12日
Ubuntu 批量添加用户
摘要: #!/bin/bashcat user.txt | while read linedo user=$(echo $line | cut -d ' ' -f1) passwd=$(echo $line | cut -d ' ' -f2) useradd -r -m -s /bin/bash $user
阅读全文
posted @ 2018-11-12 09:42 瞬_冷
阅读(720)
评论(0)
推荐(0)
2018年10月29日
C/C++扩展Python的时候数据类型转换的对应:
摘要:
阅读全文
posted @ 2018-10-29 14:23 瞬_冷
阅读(2400)
评论(0)
推荐(0)
2018年10月19日
源码安装支持ffmpeg的opencv2
摘要: 1.首先安装ffmpeg apt-get install ffmpeg 2.安装opencv对ffmeg的依赖 # for Compiling OpenCV with ffmpeg support apt-get install build-essential apt-get install cma
阅读全文
posted @ 2018-10-19 16:48 瞬_冷
阅读(1485)
评论(0)
推荐(0)
Ubuntu16.04 使用lvm挂载硬盘以及扩容
摘要: 1.首先通过fdisk -l 查看磁盘的属性,找到要添加的磁盘名称(Disk /dev/sda) 2.使用fdisk将磁盘进行逻辑分区 fdisk /dev/sda m来查看命令帮助 n添加一张新的partition,之后都是划分几个分区,以及分区的大小,不过这些都可以使用默认的值,然后就可以直接按
阅读全文
posted @ 2018-10-19 15:04 瞬_冷
阅读(9466)
评论(0)
推荐(0)
2018年10月12日
Ubuntu16.04 修改主机名,以及解析主机名
摘要: 第一步:修改主机名: vim /etc/hostname 第二步:修改网络解析名称: vim /etc/hosts 第三步:重启网络配置服务(或者刷新dns): sudo /etc/init.d/networking restart(sudo /etc/init.d/dns-clean start)
阅读全文
posted @ 2018-10-12 10:31 瞬_冷
阅读(875)
评论(0)
推荐(0)
2018年10月11日
Ubuntu 增加swap空间大小
摘要: 1. create a 1G file for the swap. sudo fallocate -l 1G /swapfile we can verify that the correct amount of space was reserved by typing: ls -lh /swapfi
阅读全文
posted @ 2018-10-11 13:53 瞬_冷
阅读(1474)
评论(0)
推荐(0)
2018年10月10日
先填充在缩放和先缩放后填充的区别
摘要: 将同样的一张图(101*156),采用两种不同的方式进行缩放填充,带来的像素差异: 1.先填充后缩放 def resize_1(img): height, width, channel = img.shape temp = np.zeros((height,height,3),np.uint8) s
阅读全文
posted @ 2018-10-10 15:13 瞬_冷
阅读(1299)
评论(0)
推荐(0)
2018年4月23日
C++ 获取字符串中的所有汉字
摘要: #include<iostream>using namespace std;int main() { char str[20] = "cd大家好df"; //std::cin >> str; char cstr[20]; int n, cn; n = 0; cn = 0; while (str[n]
阅读全文
posted @ 2018-04-23 17:59 瞬_冷
阅读(3301)
评论(0)
推荐(0)
2018年4月10日
使用requests抓取https报SSL错误
摘要: 安装requests的方法:sudo pip install requests 当碰到requests链接https的时候报SSL错误的时候使用如下解决: 1:将python的pip 版本升级到9.0.3以上。然后运行安装request的秘钥认证就可以了:pip install requests[s
阅读全文
posted @ 2018-04-10 17:56 瞬_冷
阅读(1011)
评论(0)
推荐(0)
上一页
1
2
3
4
5
6