blocks

Code::Blocks工具栏消失的解决方法

我与影子孤独终老i 提交于 2020-03-12 06:28:32
使用Code::Blocks时,有时候不知道点到了什么,工具栏全部消失了: 解决方法: View -> perspectives -> Code::Blocks default 然后就恢复正常了: By the way,左侧的工具栏通过 Shift + F2 打开: 来源: CSDN 作者: Giyn 链接: https://blog.csdn.net/weixin_45961774/article/details/104803092

Linux LVM逻辑卷管理

让人想犯罪 __ 提交于 2020-01-03 12:12:33
一、LVM初始化 1.物理卷pv 常用命令 pvs/pvscan 查看系统里有pv的磁盘 pvdisplay 显示系统上面的pv状态 pvremove 删除pv 创建pv pvcreate /dev/sdb2 Physical volume "/dev/sdb2" successfully created. 查看pv列表 pvs/pvscan PV VG Fmt Attr PSize PFree /dev/sda2 vg_root lvm2 a-- 35.00g 1.00g /dev/sda3 vg_new lvm2 a-- 64.50g 9.50g /dev/sdb1 lvm2 --- 95.36g 95.36g /dev/sdb2 lvm2 --- <104.64g <104.64g 查看pv状态 pvdisplay --- Physical volume --- PV Name /dev/sda2 VG Name vg_root PV Size 35.00 GiB / not usable 4.00 MiB Allocatable yes PE Size 4.00 MiB Total PE 8960 Free PE 256 Allocated PE 8704 PV UUID yC67Cm-Hvxr-aXde-ovxA-1qME-UEIa-hmkzgq --- Physical

centos7 将home目录空间扩容到根目录

核能气质少年 提交于 2019-12-12 04:43:03
[root@localhost ~]# umount /home/ [root@localhost ~]# lvremove /dev/mapper/centos-home Do you really want to remove active logical volume centos/home? [y/n]: y Logical volume "home" successfully removed [root@localhost ~]# lvextend -L +120G /dev/mapper/centos-root Size of logical volume centos/root changed from 50.00 GiB (12800 extents) to 170.00 GiB (43520 extents). Logical volume centos/root successfully resized. [root@localhost ~]# xfs_growfs /dev/mapper/centos-root meta-data=/dev/mapper/centos-root isize=512 agcount=4, agsize=3276800 blks = sectsz=512 attr=2, projid32bit=1 = crc=1 finobt=0

pytorch框架下的Finetune 以及ResNet50 代码

偶尔善良 提交于 2019-12-05 07:27:22
Resnet 50 # -*- coding: utf-8 -*- import torch.nn as nn import math import torch.utils.model_zoo as model_zoo class residual_block(nn.Module): expansion = 4 def __init__(self, inplanes, planes, stride=1, downsample = None): super(residual_block, self).__init__() self.conv1 = nn.Conv2d(inplanes, planes, bias=False, kernel_size=1) self.bn1 = nn.BatchNorm2d(planes) self.conv2 = nn.Conv2d(planes, planes, stride = stride, kernel_size=3 , padding=1, bias = False) self.bn2 = nn.BatchNorm2d(planes) self.conv3 = nn.Conv2d(planes, planes*4, kernel_size=1,bias=False) self.bn3 = nn.BatchNorm2d(planes * 4)

Valgrind检测非法访问内存

匿名 (未验证) 提交于 2019-12-02 23:34:01
版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/chengqiuming/article/details/90311664 #include<iostream> #include<stdlib.h> using namespace std; void func(){ int *x=(int *)malloc( 10 * sizeof ( int ) ) ; x[10]=0; } int main(){ func(); cout<<"done"<<endl; return 0; } [root@localhost charpter05]# g++ -g 0508test.cpp -o 0508 [root@localhost charpter05]# ./0508 done [root@localhost charpter05]# valgrind ./0508 ==16719== Memcheck, a memory error detector ==16719== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al. ==16719== Using Valgrind-3.15.0 and LibVEX; rerun with -h for copyright

Valgrind检测内存读写越界

匿名 (未验证) 提交于 2019-12-02 23:34:01
版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/chengqiuming/article/details/90311919 内存读写越界是指访问了没有权限访问的内存地址空间,比如访问数组时越界,对动态内存访问超出了申请时内存的大小范围。 #include<stdlib.h> #include<iostream> using namespace std; int main(){ int len=4; int *pt=(int *)malloc(len*sizeof(int)); int *p=pt; for(int i=0;i<len;i++) p++; *p=5; cout<<"the value of p is "<<*p<<endl; return 0; } [root@localhost charpter05]# g++ -g 0511.cpp -o 0511 [root@localhost charpter05]# ./0511 the value of p is 5 [root@localhost charpter05]# valgrind ./0511 ==18335== Memcheck, a memory error detector ==18335== Copyright (C) 2002-2017, and

centos7 将home目录空间扩容到根目录

核能气质少年 提交于 2019-11-27 10:34:36
[root@localhost ~]# umount /home/ [root@localhost ~]# lvremove /dev/mapper/centos-home Do you really want to remove active logical volume centos/home? [y/n]: y Logical volume "home" successfully removed [root@localhost ~]# lvextend -L +120G /dev/mapper/centos-root Size of logical volume centos/root changed from 50.00 GiB (12800 extents) to 170.00 GiB (43520 extents). Logical volume centos/root successfully resized. [root@localhost ~]# xfs_growfs /dev/mapper/centos-root meta-data=/dev/mapper/centos-root isize=512 agcount=4, agsize=3276800 blks = sectsz=512 attr=2, projid32bit=1 = crc=1 finobt=0