All tagged bug

举个例子:在windows系统中,有用户“Farmer John"(注意中间有空格分隔),在用户根目录下有用户的头像图片”C:UsersFarmer Johnphoto.jpg“。现在有一对图片操作的库函数foo,foo的输入参数即为图片路径,由于foo的实现不完善导致如果路径中包含空格符的话会有bug(比如遇到空格截断),但用户又不能修改该函数,更不可能为了这个bug而去修改用户名,此时的一个很好的hack方式就是用mklink来fix包含空格的那个目录或者文件。对于现在这个bug,可以这么解决…

It is a rule in math that the absolute value of a number must be no less than zero. Is it true in computer languages? Well, most of the case except one. Let me take C language for example.

For a 32-bits C interger, its value ranges from [-2147483648, 2147483647] .So for x = -2147483648, what is the result of abs(x)? 2147483648, -2147483648, 2147483647, 0 or something else?