<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[creambean的博客]]></title><description><![CDATA[]]></description><link>https://blog.csdn.net/creambean</link><language>zh-cn</language><generator>https://blog.csdn.net/</generator><copyright><![CDATA[Copyright &copy; creambean]]></copyright><item><title><![CDATA[对 virtualbox 虚拟机镜像硬盘扩容]]></title><link>https://blog.csdn.net/creambean/article/details/99761809</link><guid>https://blog.csdn.net/creambean/article/details/99761809</guid><author>creambean</author><pubDate>Mon, 19 Aug 2019 20:58:10 +0800</pubDate><description><![CDATA[文章目录扩大容量大小使扩容生效
扩大容量大小
VBoxManage.exe modifyhd '/path/to/the/virtual_hard_disk' --resize 'size_in_MB'

确保 VBoxManage.exe 再环境变量中找得到, 当然将路径定位到 VBoxmanage
.exe 也可以.
使扩容生效
virtualbox 用 gparted 镜像启动, 加载扩容后...]]></description><category></category></item><item><title><![CDATA[Fail to LSB:AppArmor]]></title><link>https://blog.csdn.net/creambean/article/details/99760513</link><guid>https://blog.csdn.net/creambean/article/details/99760513</guid><author>creambean</author><pubDate>Mon, 19 Aug 2019 20:47:41 +0800</pubDate><description><![CDATA[文章目录发生了什么AppArmor怎么解决
发生了什么
还是虚拟机 ubuntu 启动时的错误, (host win10, virtualbox). 每次都有该错误, 看着有点难受.
AppArmor
引用 ubuntu 的解释
AppArmor is a Linux Security Module implementation of name-based mandatory access con...]]></description><category></category></item><item><title><![CDATA[Ubuntu: a start job started by dev-disk-by]]></title><link>https://blog.csdn.net/creambean/article/details/99759072</link><guid>https://blog.csdn.net/creambean/article/details/99759072</guid><author>creambean</author><pubDate>Mon, 19 Aug 2019 20:33:07 +0800</pubDate><description><![CDATA[文章目录发生了什么如何解决如何获取硬盘 uuid
发生了什么
最近虚拟机启动 ubuntu 非常慢(host win10, virtualbox), 里面有一段错误 a start job started by dev-disk-by (1m30s). 也就是每次启动至少要多等 1m30s. 这肯定不能忍
如何解决
查资料得知, 这个错误大概率使因为 /etc/fstab 文件的配置有问题. 因为...]]></description><category></category></item><item><title><![CDATA[Conert a string to lowercase in c++]]></title><link>https://blog.csdn.net/creambean/article/details/99220866</link><guid>https://blog.csdn.net/creambean/article/details/99220866</guid><author>creambean</author><pubDate>Sun, 11 Aug 2019 19:30:27 +0800</pubDate><description><![CDATA[文章目录Using ranged for loopusing std::for_eachusing std::transform
Using ranged for loop
char toLowerCase(char c)
{
	if (c &gt;= 'A' &amp;&amp; c &lt;= 'Z') {
		return c + 32;
	}

	return c;
}
std::stri...]]></description><category></category></item><item><title><![CDATA[理解c++11中的static_assert]]></title><link>https://blog.csdn.net/creambean/article/details/98795461</link><guid>https://blog.csdn.net/creambean/article/details/98795461</guid><author>creambean</author><pubDate>Wed, 07 Aug 2019 23:25:45 +0800</pubDate><description><![CDATA[文章目录是什么?c++11之前的日子#error的问题简单的 static_assert 使用范例static_assert 相较于 #error 的优势使用范围
是什么?
static_assert简单来说就是在编译时进行断言判断. 如果条件不满足, 编译停止并输出指定错误信息.
语法:
static_assert(constant_expression, string_literal); 

...]]></description><category></category></item><item><title><![CDATA[auto_ptr vs unique_ptr]]></title><link>https://blog.csdn.net/creambean/article/details/97431792</link><guid>https://blog.csdn.net/creambean/article/details/97431792</guid><author>creambean</author><pubDate>Fri, 26 Jul 2019 23:00:18 +0800</pubDate><description><![CDATA[auto_ptr and unique_ptr
The new type std::unique_ptr is introduced in c++11,  and supposed to be a replacement for std::auto_ptr.
But think this, if it is a direct replacement, why give it a new name ...]]></description><category></category></item><item><title><![CDATA[Call of Overloaded Function is ambiguous]]></title><link>https://blog.csdn.net/creambean/article/details/97431580</link><guid>https://blog.csdn.net/creambean/article/details/97431580</guid><author>creambean</author><pubDate>Fri, 26 Jul 2019 22:58:21 +0800</pubDate><description><![CDATA[error: Call of Overloaded Function is ambiguous
看例子吧
#include&lt;iostream&gt;

using namespace std;

int sum(int a,int b){
   return a+b;
}

int sum(float a, float b){
   return a+b;
}

int main(){
  ...]]></description><category></category></item><item><title><![CDATA[SIGPIPE and EPIPE]]></title><link>https://blog.csdn.net/creambean/article/details/96637617</link><guid>https://blog.csdn.net/creambean/article/details/96637617</guid><author>creambean</author><pubDate>Sat, 20 Jul 2019 22:06:17 +0800</pubDate><description><![CDATA[SIGPIPE and EPIPE
SIGPIPE 是如下情况引起的 (这里只是一个例子)
grep "pattern" &lt; reallyhugefile | head

grep 有可能会输出上百万行, 但是 head 只需要读取10行就会退出. 一旦 head 将管道的读端关闭, 那么 grep 就会获得 SIGPIPE 信号, 然后被强制退出, 使其节约资源.
如果不想自己的程序因为这...]]></description><category></category></item><item><title><![CDATA[error: invalid static_cast from type 'xxx*' to type 'yyy*']]></title><link>https://blog.csdn.net/creambean/article/details/96637471</link><guid>https://blog.csdn.net/creambean/article/details/96637471</guid><author>creambean</author><pubDate>Sat, 20 Jul 2019 21:58:08 +0800</pubDate><description><![CDATA[文章目录error: invalid static_cast from type 'xxx*' to type 'yyy*'[What good is static_cast?][1]
error: invalid static_cast from type ‘xxx*’ to type ‘yyy*’
通常来说, static_cast 不适用于不同指针类型之间的转换, 因为它们是完全不同的两个类...]]></description><category></category></item><item><title><![CDATA[Decorator Pattern]]></title><link>https://blog.csdn.net/creambean/article/details/95932986</link><guid>https://blog.csdn.net/creambean/article/details/95932986</guid><author>creambean</author><pubDate>Sun, 14 Jul 2019 22:14:26 +0800</pubDate><description><![CDATA[文章目录Decorator Pattern适用范围
Decorator Pattern
用图来表示

适用范围

动态的为单个对象实例添加新特性而不干扰其他对象实例
通过子类的方式来实现拓展变得不实际的情况下


...]]></description><category></category></item><item><title><![CDATA[Bridge Pattern]]></title><link>https://blog.csdn.net/creambean/article/details/95388936</link><guid>https://blog.csdn.net/creambean/article/details/95388936</guid><author>creambean</author><pubDate>Wed, 10 Jul 2019 22:20:57 +0800</pubDate><description><![CDATA[文章目录Bridge Pattern使用范围
Bridge Pattern
一张图来展示

使用范围

将接口定义和实现分离
接口定义和实现分辨独立扩展
用户端对实现端的代码修改无感知
对用户端屏蔽实现部分
多个对象之间共享实现部分


...]]></description><category></category></item><item><title><![CDATA[In-class Initialization]]></title><link>https://blog.csdn.net/creambean/article/details/95241365</link><guid>https://blog.csdn.net/creambean/article/details/95241365</guid><author>creambean</author><pubDate>Tue, 09 Jul 2019 21:28:46 +0800</pubDate><description><![CDATA[文章目录Non-static Data Member InitializersISO C++ forbids in-class initialization of non-const static member[Why I can't initialize static data members in class?][1]C++03 9.4.2 Static data membersWhat ar...]]></description><category></category></item><item><title><![CDATA[error: expected unqualified-id before 'xxx']]></title><link>https://blog.csdn.net/creambean/article/details/94406934</link><guid>https://blog.csdn.net/creambean/article/details/94406934</guid><author>creambean</author><pubDate>Mon, 01 Jul 2019 20:25:37 +0800</pubDate><description><![CDATA[发生了什么
看如下代码
class A
{
public:
    void do() {}
};

这会引起GCC报错: error: expected unqualified-id before 'do'
解释
通常 expected unqualified-id before 这个错误通常是因为语法错误引起的, 如上一个语句没有用
分毫结尾之类的. 这个也不例外, 原因就是 do是关键字, ...]]></description><category></category></item><item><title><![CDATA[error 'xxx' is an inaccessible base of 'yyy']]></title><link>https://blog.csdn.net/creambean/article/details/94406891</link><guid>https://blog.csdn.net/creambean/article/details/94406891</guid><author>creambean</author><pubDate>Mon, 01 Jul 2019 20:24:13 +0800</pubDate><description><![CDATA[又发生了什么
看如下代码
class VisibilityTest
{
public:
    virtual void doIt() { std::cout &lt;&lt; "Base\n"; }
};

class DVisibilityTest : private VisibilityTest
{
private:
    virtual void doIt() override { st...]]></description><category></category></item><item><title><![CDATA[Loki::GenScatterHierarchy]]></title><link>https://blog.csdn.net/creambean/article/details/94360014</link><guid>https://blog.csdn.net/creambean/article/details/94360014</guid><author>creambean</author><pubDate>Sun, 30 Jun 2019 22:07:56 +0800</pubDate><description><![CDATA[Loki::GenScatterHierarchy
阅读Loki泛型库, 用图来展示Loki::GenScatterHierarchy
template&lt;class T&gt;
class Collection
{
public:
    std::vector&lt;T&gt; m_vector;
};

Loki::GenScatterHierarchy&lt;MakeTypelist&...]]></description><category></category></item><item><title><![CDATA[Abstract Factory Pattern]]></title><link>https://blog.csdn.net/creambean/article/details/94221259</link><guid>https://blog.csdn.net/creambean/article/details/94221259</guid><author>creambean</author><pubDate>Sat, 29 Jun 2019 23:00:24 +0800</pubDate><description><![CDATA[Abstract Factory Pattern
图比语言好使

适用范围

将对象的创建, 组合和表示方式从系统中独立出来
系统需要多种的一类对象
相关的对象需要一起的使用, 可以用该方式来进行限制
需要对外提供库支持, 但只想暴露接口不想暴露实现


...]]></description><category></category></item><item><title><![CDATA[How to unit test a method that has void as return type]]></title><link>https://blog.csdn.net/creambean/article/details/93916372</link><guid>https://blog.csdn.net/creambean/article/details/93916372</guid><author>creambean</author><pubDate>Thu, 27 Jun 2019 21:46:24 +0800</pubDate><description><![CDATA[转 How to unit test a method that has void as return type
How to unit test a method that has void as return type
How do I test a method that returns void? For example a method like this.
void Foo::Proc...]]></description><category></category></item><item><title><![CDATA[inline functin vs #define]]></title><link>https://blog.csdn.net/creambean/article/details/93791326</link><guid>https://blog.csdn.net/creambean/article/details/93791326</guid><author>creambean</author><pubDate>Wed, 26 Jun 2019 22:49:51 +0800</pubDate><description><![CDATA[Why should I use inline functions instead of plain old #define macros?
Unlike #define macros, inline functions avoid infamous macro errors since inline functions always evaluate every argument exactly...]]></description><category></category></item><item><title><![CDATA[difference between 'typedef' and 'using' in C++11]]></title><link>https://blog.csdn.net/creambean/article/details/93790994</link><guid>https://blog.csdn.net/creambean/article/details/93790994</guid><author>creambean</author><pubDate>Wed, 26 Jun 2019 22:47:37 +0800</pubDate><description><![CDATA[文章目录What is the difference between 'typedef' and 'using' in C++11Interesting pointsConclusion
What is the difference between ‘typedef’ and ‘using’ in C++11
Apart from ‘using’ can be used within templa...]]></description><category></category></item><item><title><![CDATA[Name mangling in C++]]></title><link>https://blog.csdn.net/creambean/article/details/93526920</link><guid>https://blog.csdn.net/creambean/article/details/93526920</guid><author>creambean</author><pubDate>Mon, 24 Jun 2019 21:18:17 +0800</pubDate><description><![CDATA[文章目录Name mangling in C++
Name mangling in C++
Mangling is simply how the compiler keeps the linker happy.
In C, you can’t have two functions with the same name, no matter what. So that’s what the link...]]></description><category></category></item></channel></rss>