草庐IT

cmake-error-when-building-vtk

全部标签

javascript - Angular 5 : ng build - -prod fails due to clean-css: Cannot read property 'line' of undefined

我的应用在Angular5.2.6下。ngserve一切正常,但是当运行ngbuild--prod时,它需要一段时间,然后才会失败。这些错误似乎与clean-css操作有关。错误跟踪:92%chunkassetoptimization/home/khalidvm/Desktop/Workspace/Front/frontend_v2/node_modules/clean-css/lib/reader/input-source-map-tracker.js:37if(originalPosition.line===null&&line>1&&selectorFallbacks>0){^T

javascript - Chrome 扩展 : fire an event when element created?

我想在将元素添加到文档时触发一个事件。我读过JQuerydocumentationforon()和listofevents但似乎没有一个事件与元素创建有关。我必须监控DOM,因为我无法控制何时将元素添加到文档(因为我的Javascript是Chrome扩展内容脚本) 最佳答案 我知道这是一个老问题,已经有了答案,但由于情况发生了变化,我想我会为登陆此页面寻找答案的人们添加一个更新的答案。DOMMutationEvents已被弃用。根据MDN(关于DOMMutationEvents):DeprecatedThisfeaturehasb

使用 Team Foundation Server Build 进行 JavaScript 单元测试

我们使用的是TeamFoundationServer2010,我们使用Jasmine在本地机器上运行了一些JavaScript单元测试。.我们正在使用基于工作流程的构建。有没有人在构建期间成功运行Jasmine测试?如果Jasmine测试失败,您可以中断构建吗? 最佳答案 我看到的方法是使用CodePlex上可用的ChutzpahTestRunner:http://chutzpah.codeplex.com/这允许您从命令行运行Jasmine/QUnit测试,然后可以使用InvokeProcess事件轻松地将其与TFSBuild集成

javascript - Chrome 网上商店服务器拒绝带有 "Error : The manifest must define a version."的扩展

注意:这个问题是关于您在进行Chrome开发时使用的manifest.json的version属性。它看起来与下面关于manifest_version的问题类似,但事实并非如此。我真的很想从中吸取教训,但我失败了。NeedtoupdateChromeextensiontomanifestversion2ifnomanifestversionoriginallyspecified?--我目前正在做我的第一个Chrome扩展。强大、有趣、棒极了。除了一件让我烦恼的蠢事。我的Chrome扩展程序是开源的,所以你可以直接转到GitHub上的代码,这样你就可以立即看到我犯了一个愚蠢的错误http

javascript - 谷歌地图 v3 : How to tell when an ImageMapType overlay's tiles are finished loading?

我正在使用GoogleMapsv3API,并且我有一个基于ImageMapType类的自定义叠加层。我想在叠加层的图block加载时显示某种加载指示器,但我看不到任何方式来知道它们何时完成。创建叠加层的代码类似于以下内容:varmyOverlay=newgoogle.maps.ImageMapType({getTileUrl:myGetTileUrl,tileSize:newgoogle.maps.Size(256,256),isPng:true});myMap.overlayMapTypes.push(myOverlay);以上工作正常,覆盖成功加载;似乎map没有发出任何事件来指示

javascript - Websocket 错误 : Error during WebSocket handshake: No response code found in status line

我想与我的服务器建立一个tcp连接。但是我每次都会出错...WebSocketconnectionto'ws://my.ip:1337/'failed:ErrorduringWebSockethandshake:Noresponsecodefoundinstatusline:Echoserver客户:varconnection=newWebSocket('ws://my.ip:1337');connection.onopen=function(){connection.send('Ping');//Sendthemessage'Ping'totheserver};服务器:varnet=

javascript - Angular 单元测试 : Error: Cannot match any routes. URL 段: 'home/advisor'

我正在我的angular4.0.0应用程序下进行单元测试,我的真实组件中的一些方法正在通过以下方式调用手动路由:method(){....this.navigateTo('/home/advisor');....}withnavigateTo是一个自定义路由方法,调用它:publicnavigateTo(url:string){this.oldUrl=this.router.url;this.router.navigate([url],{skipLocationChange:true});}我有这个路由文件:import...//Componentsanddependenciescon

javascript - 使用 jQuery 延迟 - when() 和 getJSON() 回调

我正在尝试了解jQuery中的when函数和延迟对象。$.when($.getJSON('/echo/json',function(){console.log('sucess');},function(){console.log('error');})).then(console.log('getJSONready!'));这个例子返回:getJSONready!sucess...但我想首先触发成功回调:sucessgetJSONready!我该怎么做?http://jsfiddle.net/lukaszr/rBFmL/ 最佳答案

javascript - 未捕获的断言错误 : path must be a string error in Require. js

我在使用node-webkit的简单示例中遇到以下错误:UncaughtAssertionError:pathmustbeastring索引.html//base.jsrequire(["test"],function(test){test.init();});//test.jsdefine(function(){window.c=window.console;return{init:function(){c.log('test.init');},destroy:function(){c.log('test.destroy');}}}); 最佳答案

javascript - Const must be initialized error in Microsoft Edge in for...of loop

我正在使用const和JavaScript的新forof循环结构。它在Chrome中运行良好,但在MSEdge中,以下代码会引发错误:for(constaof[1,2,3])console.log(a);Error:Constmustbeinitialized同样,在chrome中工作正常,边缘抛出错误。我猜它期望const变量有一个初始化值,但这就是for的全部工作,不是吗?MDN说edge支持循环,所以浏览器支持不是问题。 最佳答案 根据https://kangax.github.io/compat-table/es6,"con