草庐IT

An_Overview_of_the_JBossCX_Archit

全部标签

javascript - 如何解决 “cannot call method … of undefined” 错误?

functioncalcRoute(){varstart=document.getElementById("start_").value;varend=document.getElementById("end_").value;varrequest={origin:start,destination:end,travelMode:google.maps.TravelMode.DRIVING};directionsService.route(request,function(response,status){if(status==google.maps.DirectionsStatus.

javascript - 剑道数据源 : how cancel an update request

我有一个剑道UI网格和一个数据源。当我调用Update方法时,我测试了一个变量,如果条件为假,我不想发送请求。目前我有:$scope.MySource=newkendo.data.DataSource({update:{url:function(lista){if(testVariable==true){testVariable=false;return"api/Liste/PutLista/"+lista.Id}else{$scope.MySource.cancelChanges();}},type:"PUT",dataType:"json",beforeSend:function(

javascript - 错误 "Uncaught TypeError: Cannot read property ' __count' of undefined"in grid datasource

我最近更新了我的jQuery和KendoUI版本。现在使用jQuery1.12.13和KendoUI2016.3.914(不确定它在他们的公共(public)网站上对应的版本,但可能在R32016左右)。似乎kendo或jQuery对数据格式变得更加严格。我有一个带有数据源的剑道UI网格,该数据源具有type:"json"。这在早期版本中有效但不再适用-它给出了警告:未知的数据源传输类型“json”。验证该类型的注册脚本是否包含在页面上的KendoUI之后。所以我查看了文档并将类型更改为odata。这给出了一个错误:VM94003:3未捕获类型错误:无法读取未定义的属性“__count

javascript - 类型错误 : Failed to set the 'buffer' property on 'AudioBufferSourceNode' : The provided value is not of type 'AudioBuffer

我正在处理现有的codoCircle.调低音量。它按预期运行。现在我想在codepen中使用相同的代码我得到这个错误类型错误:无法在“AudioBufferSourceNode”上设置“缓冲区”属性:提供的值不是“AudioBuffer”类型我做了一些研究,找到了firstanswer有用。答案是当我在playSoundplayer.buffer=buffer中分配时,缓冲区仍未定义,因为加载回调尚未触发。这对我来说很有意义,所以我尝试做一个setTimeout像:setTimeout(playSound,9000);没有成功。你知道解决这个问题的方法吗?为什么在CodeCircle中

Javascript 权威指南 : the confusion of steps of converting object to a string

根据Javascript权威指南第6版3.8.3节:Toconvertanobjecttoastring,JavaScripttakesthesesteps:•IftheobjecthasatoString()method,JavaScriptcallsit.Ifitreturnsaprimitivevalue,JavaScriptconvertsthatvaluetoastring(ifitisnotalreadyastring)andreturnstheresultofthatconversion.Notethatprimitive-to-stringconversionsarea

javascript - "JavaScript - the Good Parts"示例的解释(第 4.15 节)?

JS初学者:)需要来自Crockford'sbook的代码片段的解释,第4.15节:varmemoizer=function(memo,fundamental){varshell=function(n){varresult=memo[n];if(typeofresult!=='number'){result=fundamental(shell,n);memo[n]=result;}returnresult;};returnshell;};varfibonacci=memoizer([0,1],function(shell,n){returnshell(n-1)+shell(n-2);}

javascript - ngrx : how the reducers function are invoked, 何时被调用?

我正在尝试使用ngrx库来管理我的应用程序的状态。我浏览了许多ngrx文档和git页面。我理解有三个重要的概念:商店Reducer和行动Store是我们应用程序的单一数据源。因此,对数据的任何修改或检索都是通过Actions完成的。我的问题是当一个Action被发送到商店时到底发生了什么?它如何知道要调用哪个reducer?它是否解析所有注册到商店的reducer?可以有多个同名的Action,在这种情况下会发生什么?提前致谢。 最佳答案 一图胜千言...来源:BuildingaReduxApplicationwithAngular

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/JSON : Get unknown property of an object

如果我有这样的JSON对象:{"message":{"name":{"stringLengthTooShort":"blub"}}}属性的名称(此处)stringLengthTooShort每次都在变化,我怎么能简单地用JS获取name的子属性?目前我有message.name但我现在怎么才能得到它的child呢? 最佳答案 如果它始终是message.name的第一个属性,您可以这样做:varkeys=[];for(varlinmessage.name){if(message.name.hasOwnProperty(l)){key

javascript - 道格拉斯克罗克福德的 "Javascript: The Good Parts"第 5.5 章

我正在阅读书名中的第5.5章。我仍然无法理解如何使用本章中的eventuality函数“我们可以用零件集组合对象”。对象是否由具有“on”和“fire”功能的事件系统组成?本书下面部分的代码:vareventuality=function(that){varregistry={};that.fire=function(event){//Fireaneventonanobject.Theeventcanbeeither//astringcontainingthenameoftheeventoran//objectcontainingatypepropertycontainingthe//