摘要: 最近在看ceph rgw的源码, 在其客户端数据处理部分遇到std::enable_if的概念,如下: enable_if的作用主要用于模板的匹配,偏特化的一个过程。编译器在类型推导的过程中,会尝试推导所有的重载函数,在此过程在过程中,如果enable_if条件不满足,则会在候选函数集合中剔除此函数 阅读全文
posted @ 2017-08-14 15:25 舒克_贝塔 阅读(3141) 评论(0) 推荐(1) 编辑
摘要: #include<setjmp.h> #include<signal.h> #include<unistd.h> #include<iostream> #include<cstdio> #include<cstdlib> using namespace std; static sigjmp_buf 阅读全文
posted @ 2017-06-21 16:34 舒克_贝塔 阅读(441) 评论(0) 推荐(0) 编辑
摘要: 1、在利用ceph-deploy安装ceph-jewel版本时,执行如下命令报错: ceph-deploy mon create-init 返回信息中,ceph-deploy执行激活monitor步骤时发生错误,经排查,ceph-deploy没有正确处理systemd服务的启动。更新ceph-dep 阅读全文
posted @ 2017-05-12 13:48 舒克_贝塔 阅读(171) 评论(0) 推荐(0) 编辑
摘要: 1、对磁盘分区 两块盘: /dev/vdb,/dev/vdc 标记为LVM: 创建PV: pvcreate /dev/vdb1 /dev/vdc1 pvdisplay #查看pv 创建vg: vgcreate test /dev/vdb1 /dev/vdc1 vgdisplay #查看vg状态信息 阅读全文
posted @ 2017-04-07 14:40 舒克_贝塔 阅读(366) 评论(0) 推荐(0) 编辑
摘要: 忘记suse root密码可通过以下途径实现修改密码: 在开机界面下方,输入: init=/bin/bash 进入bash界面: mount -o remount,rw / passwd root mount -o remount,ro / exit 阅读全文
posted @ 2017-04-07 09:23 舒克_贝塔 阅读(1779) 评论(0) 推荐(0) 编辑
摘要: 利用rpmbuild打包,需要两类文件:1、源码,源码以tar归档进行压缩的源码包,以及一些.patch文件,存放于目录./SOURCES下;2、.spec文件,定义了打包的动作,以及依赖,是打包的最主要类容。 首先介绍SPEC文件: SPEC文件的一些语法: .spec中的条件判断语句有两种:1、 阅读全文
posted @ 2016-11-18 10:29 舒克_贝塔 阅读(8941) 评论(0) 推荐(0) 编辑
摘要: 主要是在mac下利用自带的终端登录虚拟机中的ubuntu系统。用的是virtualbox,虚拟机网咯为NAT模式,设置端口转发,本机的10000对应虚拟机的22端口。22端口是ssh的默认端口。(如果是login远程主机,这些端口的配置可以省略)。 首先,在编辑/etc/hosts文件,添加虚拟机主 阅读全文
posted @ 2016-09-11 15:49 舒克_贝塔 阅读(3802) 评论(0) 推荐(0) 编辑
摘要: 批量更改本地的md文件中的图片链接。以适应github,使得在github中能够正常展现图片。 阅读全文
posted @ 2016-08-12 20:33 舒克_贝塔 阅读(770) 评论(0) 推荐(0) 编辑
摘要: 由于装的是双系统,只给Centos留了20G的空间,软件越装越多导致空间不够用,不得已需要从windows空间重新划分一些空间。 首先从windows空间压缩出20g的空间,新建卷格式化成NTFS格式。(计算机属性,磁盘管理) 进入Centos中,查看所要新挂载空间在第几分区。可以利用sudo bl 阅读全文
posted @ 2016-04-08 22:12 舒克_贝塔 阅读(8675) 评论(0) 推荐(0) 编辑
摘要: Distinct SubsequencesGiven a stringSand a stringT, count the number of distinct subsequences ofTinS.A subsequence of a string is a new string which is... 阅读全文
posted @ 2015-09-12 11:42 舒克_贝塔 阅读(99) 评论(0) 推荐(0) 编辑