自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(54)
  • 资源 (2)
  • 收藏
  • 关注

原创 linux leveldb 1.23 编译

leveldb编译方法总结

2023-01-14 12:31:17 675

原创 【坑】glusterfs + ctdb + samba 搭建高可用服务

坑1 : samba 版本与 libtevent版本不兼容问题所有的安装包都从这个地址下载吧,不要直接yum install下载地址:https://download.gluster.org/pub/gluster/samba/CentOS/epel-7/x86_64/ 坑2:  cups服务没有安装,导致smb服务提示:can not connect to localhost...

2018-08-04 17:53:58 1939 2

原创 【ceph问题分析】osd timeout and later suicide

On a Ceph Hammer (0.94.5) cluster I've seen OSDs fail multiple times when one or more clients are responding flaky (full netfilter conntrack table).The cluster is a 250 OSD cluster with roughly 30 ...

2018-07-26 13:44:24 2873

转载 [转]Boost智能指针——scoped_ptr

boost::scoped_ptr和std::auto_ptr非常类似,是一个简单的智能指针,它能够保证在离开作用域后对象被自动释放。下列代码演示了该指针的基本应用:#include <string>#include <iostream>#include <boost/scoped_ptr.hpp>class implementation{public:    ...

2018-05-01 16:03:55 161

转载 从osd恢复mon数据

背景介绍之前手上的一个Ceph 0.94.9集群因为突然断电,三个MON都因为leveldb的问题而无法启动。已有的解决方案从已死的集群中恢复rbd镜像-ceph官方Ceph的Mon数据重新构建工具-张鹏 或者 官方的文档 这两个是同一个方法我这里选择第二种准备工作ceph-objectstore-tool是从osd收集mon相关数据,这个工具从Hammer(0.94系列)应该就在Ceph中默认安...

2018-02-09 11:36:09 1200 2

转载 Ceph修改OSD和Monitor的网络

转自:http://blog.csdn.net/for_tech/article/details/72382042随着Ceph的应用越来越深入,我们也遇到了越来越多的需求,本次我们将讲一下如何修改OSD和Monitor的网络。   Ceph应用中,在部署完ceph集群并运行一段时间后,我们很可能会遇到机房网络变动,或集群网络升级的情况,这时我们都期望能在尽量减少对现有Ceph集群影

2018-01-24 09:04:44 948

转载 XML-RPC简单使用

转载自: https://www.cnblogs.com/hupeng1234/p/6716263.htmlRPC(Remote Procedure Call)即远程方法调用,是一种在本地的机器上调用远端机器上的一个过程(方法)的技术。这个过程也被大家称为“分布式计算”,是为了提高各个分立机器的“互操作性”而发明出来的技术。XML-RPC的全称是XML Remote Procedure

2018-01-24 09:00:17 1269

转载 一步步制作RPM包

来源 http://blog.51cto.com/laoguang/1103628一.RPM制作步骤我们在企业中有的软件基本都是编译的,我们每次安装都得编译,那怎么办呢?那就根据我们的需求制作RPM安装包吧。先来说说基本布骤:1.Planning what you want             计划做什么rpm包。软件的?库的?2.Gathering the softwar

2018-01-24 08:57:30 274

转载 openat用法

转自 http://blog.csdn.net/wang1902568721/article/details/47796173《Unix环境高级编程》的第三章和第四章出现了大量的以at结尾的函数,如openat、fstatat等,书中只是粗略的说明了下,没有实际的例子让人很难懂。[cpp] view plain copy int openat(int

2017-11-09 08:43:14 5058

转载 [C++] Boost智能指针——boost::scoped_ptr(使用及原理分析)

简介     boost::scoped_ptr是一个比较简单的智能指针,它能保证在离开作用域之后它所管理对象能被自动释放。下面这个例子将介绍它的使用: 1 #include 2 #include 3 4 using namespace std; 5 6 class Book 7 { 8 public: 9 Book()10 {11

2017-09-10 15:57:27 398

原创 ceph PG 状态恢复不了的问题 (来自ceph-devel邮件)

The thing where you can't query a PG is because the OSD is throttling incoming work and the throttle is exhausted (the PG can't do work so it isn't making progress). A workaround for jewel is to r

2017-05-24 09:07:37 3172 1

原创 【glusterfs】 LOCK 机制:自旋锁和互斥量

#if HAVE_SPINLOCK#define LOCK_INIT(x) pthread_spin_init (x, 0)#define LOCK(x) pthread_spin_lock (x)#define TRY_LOCK(x) pthread_spin_trylock (x)#define UNLOCK(x) pthread_spin_u

2014-11-22 10:11:10 1017

原创 【算法】归并排序 merge sort

#include #include #include int a[15] = {15,14,13,12,11,10, 9, 8, 7, 6, 5, 4, 3, 2, 1};void merge_sort (int l_num, int h_num){ int k = l_num; int m = (h_num+l_num)/2+1; int i = 0; int *b = N

2014-07-17 23:01:33 625

原创 【算法】插入排序 insert sort algorithm

voidmain(){ int a[10] = {9, 8, 7, 6, 5, 4, 3, 2, 1, 0}; int key = 0; int j = 0; for (j = 1; j < sizeof(a)/sizeof(int); j++) { key = a[j];

2014-07-15 22:59:24 349

转载 Setting up an SSL secured Webserver with CentOS

This guide will explain how to set up a site over https. The tutorial uses a self signed key so will work well for a personal website or testing purposes. This is provided as is so proceed at your own

2014-06-01 22:42:49 511

原创 How to think like a Computer Scientist: 课后习题第二十一章1-5

#-------------------------------------------------------------------------------# Name: module1# Purpose:## Author: penglaixy## Created: 19/09/2013# Copyright: (c) penglaixy 2

2013-09-20 16:04:59 629

原创 How to think like a Computer Scientist: 课后习题第十九、二十章

#-------------------------------------------------------------------------------# Name: module1# Purpose:## Author: penglaixy## Created: 19/09/2013# Copyright: (c) penglaixy 2

2013-09-19 14:31:59 778

原创 How to think like a Computer Scientist: 课后习题第十八章9-11

#-------------------------------------------------------------------------------# Name: module1# Purpose:## Author: penglaixy## Created: 19/09/2013# Copyright: (c) penglaixy 2

2013-09-19 10:05:26 649

原创 How to think like a Computer Scientist: 课后习题第十八章5-8

#-------------------------------------------------------------------------------# Name: module1# Purpose:## Author: penglaixy## Created: 19/09/2013# Copyright: (c) penglaixy 2

2013-09-19 08:45:00 692

原创 How to think like a Computer Scientist: 课后习题第十八章4

#-------------------------------------------------------------------------------# Name: module1# Purpose:## Author: penglaixy## Created: 18/09/2013# Copyright: (c) penglaixy 2

2013-09-18 21:01:15 690

原创 How to think like a Computer Scientist: 课后习题第十八章3

#-------------------------------------------------------------------------------# Name: module1# Purpose:## Author: penglaixy## Created: 18/09/2013# Copyright: (c) penglaixy 2

2013-09-18 19:54:43 792

原创 How to think like a Computer Scientist: 课后习题第十八章2

import turtleimport timedef torn(t, order, size): if order == 0: t.forward(size) else: for angle in [85, -170, 85, 0]: torn(t,order - 1, size/2) t.r

2013-09-15 20:40:25 578

原创 How to think like a Computer Scientist: 课后习题第十八章1

import turtleimport timedef koch(t, order, size): if order == 0: t.forward(size) else: for angle in [60, -120, 60, 0]: koch(t,order - 1, size/3) t.l

2013-09-15 19:50:22 491

原创 How to think like a Computer Scientist: 课后习题第十七章5

#!/usr/bin/env pythonimport random, os.path#import basic pygame modulesimport pygamefrom pygame.locals import *#see if we can load more than standard BMPif not pygame.image.get_extended():

2013-09-15 16:17:11 877

原创 How to think like a Computer Scientist: 课后习题第十七章4

#!/usr/bin/env pythonimport random, os.path#import basic pygame modulesimport pygamefrom pygame.locals import *#see if we can load more than standard BMPif not pygame.image.get_extended():

2013-09-15 15:45:56 768

原创 How to think like a Computer Scientist: 课后习题第十七章3

#-------------------------------------------------------------------------------# Name: module1# Purpose:## Author: penglaixy## Created: 08/09/2013# Copyright: (c) penglaixy 2

2013-09-15 14:10:41 825

原创 How to think like a Computer Scientist: 课后习题第十七章2

#-------------------------------------------------------------------------------# Name: module1# Purpose:## Author: penglaixy## Created: 08/09/2013# Copyright: (c) penglaixy 2

2013-09-15 11:58:42 844

原创 How to think like a Computer Scientist: 课后习题第十五章6

#-------------------------------------------------------------------------------# Name: module2# Purpose:## Author: penglaixy## Created: 31/08/2013# Copyright: (c) penglaixy 2

2013-09-08 13:59:25 710

原创 How to think like a Computer Scientist: 课后习题第十五章1-5

#-------------------------------------------------------------------------------# Name: module2# Purpose:## Author: penglaixy## Created: 31/08/2013# Copyright: (c) penglaixy 2

2013-09-08 13:22:49 657

原创 How to think like a Computer Scientist: 课后习题第十四章5

#-------------------------------------------------------------------------------# Name: module2# Purpose:## Author: penglaixy## Created: 31/08/2013# Copyright: (c) penglaixy 2

2013-09-01 10:25:27 681

原创 How to think like a Computer Scientist: 课后习题第十四章4

#-------------------------------------------------------------------------------# Name: module1# Purpose:## Author: penglaixy## Created: 31/08/2013# Copyright: (c) penglaixy 2

2013-08-31 20:27:53 535

原创 How to think like a Computer Scientist: 课后习题第十四章1

#-------------------------------------------------------------------------------# Name: module1# Purpose:## Author: penglaixy## Created: 31/08/2013# Copyright: (c) penglaixy 2

2013-08-31 19:27:40 626

原创 How to think like a Computer Scientist: 课后习题第十四章2-3

#-------------------------------------------------------------------------------# Name: module1# Purpose:## Author: penglaixy## Created: 31/08/2013# Copyright: (c) penglaixy 2

2013-08-31 19:26:13 871

原创 How to think like a Computer Scientist: 课后习题第十三章

#-------------------------------------------------------------------------------# Name:        module1# Purpose:## Author:      penglaixy## Created:     17/08/2013# Copyright:   (c) peng

2013-08-24 11:33:49 603

原创 How to think like a Computer Scientist: 课后习题第十二章 7、8

#-------------------------------------------------------------------------------# Name: wordtools.py# Purpose:## Author: penglaixy## Created: 17/08/2013# Copyright: (c) pengla

2013-08-17 23:59:26 789

原创 How to think like a Computer Scientist: 课后习题第十一章 5-11

#-------------------------------------------------------------------------------# Name: module1# Purpose:## Author: penglaixy## Created: 11/08/2013# Copyright: (c) penglaixy 2

2013-08-11 21:21:58 743

原创 How to think like a Computer Scientist: 课后习题第九章 第6题

#-------------------------------------------------------------------------------# Name: module1# Purpose:## Author: penglaixy## Created: 11/08/2013# Copyright: (c) penglaixy 2

2013-08-11 14:11:01 432

原创 How to think like a Computer Scientist: 课后习题第九章 第5题

#-------------------------------------------------------------------------------# Name: module1# Purpose:## Author: penglaixy## Created: 11/08/2013# Copyright: (c) penglaixy 2

2013-08-11 11:42:17 861

原创 How to think like a Computer Scientist: 课后习题第九章 第4题

#-------------------------------------------------------------------------------# Name: module1# Purpose:## Author: penglaixy## Created: 11/08/2013# Copyright: (c) penglaixy 2

2013-08-11 11:32:12 675

原创 How to think like a Computer Scientist: 课后习题第九章 第3题

#-------------------------------------------------------------------------------# Name: module1# Purpose:## Author: penglaixy## Created: 11/08/2013# Copyright: (c) penglaixy 2

2013-08-11 11:17:30 515

Alice in Wonderland

How to think like a computer scientist课后习题 第二十 章 第三、四题 结果 输出

2013-09-19

空空如也

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

TA关注的人

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