<feed xmlns="http://www.w3.org/2005/Atom"> <id>https://straywarrior.github.io/</id><title>StrayWarrior's Blog</title><subtitle>For coding better.</subtitle> <updated>2026-09-08T20:37:58+08:00</updated> <author> <name>StrayWarrior</name> <uri>https://straywarrior.github.io/</uri> </author><link rel="self" type="application/atom+xml" href="https://straywarrior.github.io/feed.xml"/><link rel="alternate" type="text/html" hreflang="en" href="https://straywarrior.github.io/"/> <generator uri="https://jekyllrb.com/" version="4.4.1">Jekyll</generator> <rights> © 2026 StrayWarrior </rights> <icon>/assets/img/favicons/favicon.ico</icon> <logo>/assets/img/favicons/favicon-96x96.png</logo> <entry><title>A bug Caused by Implicit Construction of std::string</title><link href="https://straywarrior.github.io/posts/a-bug-caused-by-implicit-construction-of-stdstring/" rel="alternate" type="text/html" title="A bug Caused by Implicit Construction of std::string" /><published>2018-06-05T00:00:00+08:00</published> <updated>2018-06-05T00:00:00+08:00</updated> <id>https://straywarrior.github.io/posts/a-bug-caused-by-implicit-construction-of-stdstring/</id> <content type="text/html" src="https://straywarrior.github.io/posts/a-bug-caused-by-implicit-construction-of-stdstring/" /> <author> <name>StrayWarrior</name> </author> <category term="corcpp" /> <category term="programminglanguage" /> <summary>Recently I met a bug when I was using google protobuf to serialize and deserialize messages. I have a code segment like this: class MyMessage; // A message class generated by protobuf&amp;lt;/code&amp;gt; void process() { MyMessage msg; std::string msg_buffer = some_other_func(); // receive binary format "string" msg.ParseFromString(msg_buffer.data()); } In the code, there is a weird usa...</summary> </entry> <entry><title>Be careful with return-value optimization of C++ compilers</title><link href="https://straywarrior.github.io/posts/a-potential-bug-caused-by-optimization-of-c-compilers/" rel="alternate" type="text/html" title="Be careful with return-value optimization of C++ compilers" /><published>2018-01-26T00:00:00+08:00</published> <updated>2018-01-26T00:00:00+08:00</updated> <id>https://straywarrior.github.io/posts/a-potential-bug-caused-by-optimization-of-c-compilers/</id> <content type="text/html" src="https://straywarrior.github.io/posts/a-potential-bug-caused-by-optimization-of-c-compilers/" /> <author> <name>StrayWarrior</name> </author> <category term="corcpp" /> <category term="programminglanguage" /> <summary>Side Effect of Return-value Optimization This “bug” is caused by return-value optimization and affects both GCC and Microsoft C/C++ Compiler. Assume that we have codes like following: #include &amp;lt;cstdio&amp;gt; class Complex { public: Complex() : Complex(0.0, 0.0) {} Complex(double a, double b) : a(a), b(b) {} Complex(const Complex &amp;amp; x) : a(x.a), b(x.b) { dummy = 1.f; ...</summary> </entry> <entry><title>"Module Not Found" when using VBA in Office</title><link href="https://straywarrior.github.io/posts/module-not-found-when-using-vba-in-office/" rel="alternate" type="text/html" title="&amp;quot;Module Not Found&amp;quot; when using VBA in Office" /><published>2016-06-05T00:00:00+08:00</published> <updated>2026-03-11T13:15:55+08:00</updated> <id>https://straywarrior.github.io/posts/module-not-found-when-using-vba-in-office/</id> <content type="text/html" src="https://straywarrior.github.io/posts/module-not-found-when-using-vba-in-office/" /> <author> <name>StrayWarrior</name> </author> <category term="msoffice" /> <category term="mswindows" /> <summary>English Version Both Windows and Office support multiple languages and someone like me may use different language settings for them. However, this can cause some strange problems. My operation system is Windows 8.1 Pro and it is set to display in English. I installed Simplified Chinese version of Office 2016 and it was set to display in Simplified Chinese (By default, it doesn’t have English l...</summary> </entry> <entry><title>Link Error When Compiling and Installing Python Package in Windows</title><link href="https://straywarrior.github.io/posts/link-error-when-compiling-and-installing-python-package-in-windows/" rel="alternate" type="text/html" title="Link Error When Compiling and Installing Python Package in Windows" /><published>2016-02-23T00:00:00+08:00</published> <updated>2016-02-23T00:00:00+08:00</updated> <id>https://straywarrior.github.io/posts/link-error-when-compiling-and-installing-python-package-in-windows/</id> <content type="text/html" src="https://straywarrior.github.io/posts/link-error-when-compiling-and-installing-python-package-in-windows/" /> <author> <name>StrayWarrior</name> </author> <category term="corcpp" /> <category term="python" /> <summary>It’s usually easy to install a Python package in Windows with pip or other pre-built binaries. However, sometimes we must build the binary from source by ourselves, such as Basemap module, a part of matplotlib-toolkit. Then we may meet some error just like this: Error c1010070: Failed to load and parse the manifest ... Actually, there’s a small bug in the “Distutils” component in some versio...</summary> </entry> <entry><title>Compile and Install Basemap in Windows (Using MSVC)</title><link href="https://straywarrior.github.io/posts/compile-and-install-basemap-in-windows-using-msvc/" rel="alternate" type="text/html" title="Compile and Install Basemap in Windows (Using MSVC)" /><published>2016-02-23T00:00:00+08:00</published> <updated>2026-03-11T13:21:26+08:00</updated> <id>https://straywarrior.github.io/posts/compile-and-install-basemap-in-windows-using-msvc/</id> <content type="text/html" src="https://straywarrior.github.io/posts/compile-and-install-basemap-in-windows-using-msvc/" /> <author> <name>StrayWarrior</name> </author> <category term="python" /> <category term="mswindows" /> <summary>Basemap is a Python package, which never releases new update after 2014. It’s easy to use in Linux or OS X but not easy to install on Windows. It doesn’t supply setup-package for Python 3.4 or 3.5 or newer version. For Python 2.6/2.7/3.2/3.3, there’re pre-built setup-package which are easy to use. (See SourceForge.net) However, if we want to use Python 3.4 or higher version, it seems to be nece...</summary> </entry> </feed>
