A bug Caused by Implicit Construction of std::string
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</code>...
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</code>...
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 &l...
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 sys...
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 o...
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 ...
这里所谓奇奇怪怪的问题,并非手写代码错误导致的bug,也不是编译器对C++11标准的支持不同而导致的bug,而是由于不同类型、不同版本的编译器行为不同,或者或不同平台下标准头文件的差异而导致的。 一个常见于MSVC的编译期错误 #include<iostream> #include<cmath> int main(){ std::cout <<...
由于NTFS文件系统权限管理的原因,OS X系统下新建或修改的文件一般在Windows中会因没有权限而无法访问,使用批处理可以较为快速地获得对某一文件或文件夹的控制权限。 使用以下代码新建一个批处理文件,保存为takeown.bat @echo off setlocal enabledelayedexpansion :start set /p dir="Input the direct...
Basemap使用自带的shapefile.py处理ESRI的shapefile,但是Basemap自带的shapefile版本过低(1.1.x),其中存在一个bug导致使用Python 3.x版本时无法正确处理Windows-1252编码的二进制文件。典型错误: File "D:\Python34\lib\site-packages\mpl_toolkits\basemap\shapef...
系统环境:Windows 8.1 Pro x64 软件版本:Premiere Pro CS6 (version 6.0.0) 今日使用Premiere发现一个奇怪的现象,某一个视频在预览窗口里预览以及放入序列之后都会有音频流混乱的现象,而该视频使用一般播放器均能正常播放,因此基本可以排除解码的问题。考虑到Premiere为了加快预览速度总是会在临时文件夹中缓存大量的源素材,猜想可能是某个...
系统环境:Windows 8.1 Pro Update 1 自从用了Windows 8 系统之后,听音乐时会感到有明显的音量变化,一直不明白是怎么回事。声卡驱动已经正确安装,音量设置也保持不变。 实际上这是Windows 8系统的一个特性,当系统检测到有通信活动时自动降低了系统音量,只是这个对通信活动的检测似乎有一点逻辑上的不足,导致了实际使用体验中的奇怪现象。 要关掉这个特性,只要右...