每当我拿出一段我正在处理的代码时,我就得到了This function's cyclomatic complexity is too high. (7).但我对如何以这种方式重写它有点困惑,所以它的工作原理.
这将是不断抛出该消息的函数:
function () {
var duration = +new Date() - start.time,
isPastHalf = Number(duration) < 250 && Math.abs(delta.x) > 20 || Math.abs(delta.x) > viewport / 2,
direction = delta.x < 0;
if (!isScrolling) {
if (isPastHalf) {
if (direction) {
this.close();
} else {
if (this.content.getBoundingClientRect().left > viewport / 2 && pulled === true) {
this.close();
return;
}
this.open();
}
} else {
if (this.content.getBoundingClientRect().left > viewport / 2) { …Run Code Online (Sandbox Code Playgroud) 今天我需要在我的开发机器上重新安装Microsoft Pex.
我使用的是Windows 7,32位,Visual Studio 2010,.NET 2/3.5
我启动了通常的安装程序,但它因为一个神秘的2753错误而停止了.
我该如何进行安装?