添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
%3CLINGO-SUB%20id%3D%22lingo-sub-802838%22%20slang%3D%22en-US%22%20mode%3D%22UPDATE%22%3E%E5%A6%82%E4%BD%95%E6%A0%B9%E6%93%9A%E5%88%97%E4%B8%AD%E5%80%BC%E4%B9%8B%E9%96%93%E7%9A%84%E5%B7%AE%E7%95%B0%E4%BE%86%E8%A8%88%E7%AE%97%E8%A1%8C%E6%95%B8%EF%BC%9F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-802838%22%20slang%3D%22en-US%22%20mode%3D%22UPDATE%22%3E%3CP%3E%E4%BD%A0%E5%A5%BD%EF%BC%8C%3C%2FP%3E%3CP%3E%E6%88%91%E6%AD%A3%E5%9C%A8%E5%98%97%E8%A9%A6%E6%A0%B9%E6%93%9A%E2%80%9CDieY%E2%80%9D%E5%88%97%E5%89%B5%E5%BB%BA%E4%B8%80%E5%80%8B%E6%96%B0%E5%88%97%3C%2FP%3E%3CP%3E%E6%88%91%E6%83%B3%E8%A6%81%E6%A0%B9%E6%93%9A%E6%AF%8F%E4%B8%80%E8%A1%8C%E8%88%87%E5%89%8D%E4%B8%80%E8%A1%8C%E4%B9%8B%E9%96%93%E7%9A%84%E5%B7%AE%E7%95%B0%E9%80%B2%E8%A1%8C%E9%80%A3%E7%BA%8C%E8%A8%88%E6%95%B8%E3%80%82%3C%2FP%3E%3CP%3E%E7%AC%AC2%E8%A1%8C-%E7%AC%AC1%E8%A1%8C%EF%BC%8C%E7%AC%AC3%E8%A1%8C-%E7%AC%AC2%E8%A1%8C%EF%BC%8C%E7%AC%AC4%E8%A1%8C-%E7%AC%AC3%E8%A1%8C%EF%BC%8C%E4%BE%9D%E6%AD%A4%E9%A1%9E%E6%8E%A8%E3%80%82%3C%2FP%3E%3CP%3E%E5%A6%82%E6%9E%9C%E5%B7%AE%E5%80%BC%E4%BD%8E%E6%96%BC%E6%9F%90%E5%80%8B%E5%80%BC%EF%BC%88%E4%BE%8B%E5%A6%82%205%EF%BC%89%EF%BC%8C%E5%89%87%E5%B0%87%E8%A9%B2%E5%80%BC%E8%A8%AD%E7%82%BA%201%E3%80%82%3C%2FP%3E%3CP%3E%E5%A6%82%E6%9E%9C%E5%B7%AE%E5%80%BC%E5%A4%A7%E6%96%BC%E6%AD%A4%E5%80%BC%EF%BC%8C%E5%89%87%E8%A8%88%E6%95%B8%E5%8A%A0%201%E3%80%82%3C%2FP%3E%3CP%3E%E4%BF%9D%E7%95%99%E6%9C%80%E5%BE%8C%E7%9A%84%E8%A8%88%E6%95%B8%EF%BC%8C%E7%9B%B4%E5%88%B0%E5%B7%AE%E5%80%BC%E9%AB%98%E6%96%BC%E5%85%AC%E5%BC%8F%E4%B8%AD%E8%A8%AD%E5%AE%9A%E7%9A%84%E5%80%BC%E3%80%82%3C%2FP%3E%3CP%3E%E6%89%80%E4%BB%A5%E6%9C%80%E7%B5%82%E6%88%91%E5%B0%87%E6%9C%89%E4%B8%80%E5%80%8B%E6%96%B0%E5%88%97%EF%BC%8C%E5%85%B6%E5%80%BC%E5%A6%82%E4%B8%8B%EF%BC%9A1%2C1%2C1%2C1%2C1%2C1%2C1%2C2%2C2%2C2%2C2%2C2%2C2%2C2%2C3%2C3%2C3%2C3%2C3%20%2C3%2C3%20%E7%AD%89%E7%AD%89..%3C%2FP%3E%3CP%3E%20%3C%2FP%3E%3CP%3E%E9%9D%9E%E5%B8%B8%E6%84%9F%E8%AC%9D%E4%BB%BB%E4%BD%95%E5%B9%AB%E5%8A%A9%3C%2FP%3E%3CP%3E%20%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Ohad_s_0-1727735727384.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Ohad_s_0-1727735727384.png%22%20style%3D%22width%3A%20363px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Ohad_s_0-1727735727384.png%22%20style%3D%22width%3A%20363px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F68738i53F6878635D6D028%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Ohad_s_0-1727735727384.png%22%20alt%3D%22Ohad_s_0-1727735727384.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%20%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-802838%22%20slang%3D%22en-US%22%20mode%3D%22UPDATE%22%3E%3CLINGO-LABEL%3E%E5%9F%BA%E7%A4%8E%E8%B3%87%E6%96%99%E5%88%86%E6%9E%90%E8%88%87%E5%BB%BA%E6%A8%A1%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3E%E8%B3%87%E6%96%99%E6%B7%B7%E5%90%88%E8%88%87%E6%B8%85%E7%90%86%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3E%E6%95%B8%E6%93%9A%E6%8E%A2%E7%B4%A2%E5%92%8C%E8%A6%96%E8%A6%BA%E5%8C%96%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-802896%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%E5%9B%9E%E8%A6%86%EF%BC%9A%E5%A6%82%E4%BD%95%E6%A0%B9%E6%93%9A%E5%88%97%E4%B8%AD%E4%BD%8D%E6%95%B8%E4%B9%8B%E9%96%93%E7%9A%84%E5%B7%AE%E7%95%B0%E4%BE%86%E8%A8%88%E7%AE%97%E8%A1%8C%E6%95%B8%EF%BC%9F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-802896%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%E9%80%99%E6%98%AF%E6%88%91%E6%83%B3%E5%87%BA%E4%BE%86%E7%9A%84%E5%85%AC%E5%BC%8F%3C%2FP%3E%0A%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3EIf(%0A%09Row()%20%3D%3D%201%2C%20count%20%3D%201%2C%0A%09%3ADieY%20-%20Lag(%20%3ADieY%20)%20%26gt%3B%205%2C%20count%0A%09%2B%2B)%3B%0Acount%3B%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22txnelson_0-1727770895361.png%22%20style%3D%22width%3A%20804px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22txnelson_0-1727770895361.png%22%20style%3D%22width%3A%20804px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F68742i8DBF7E42939E01E9%2Fimage-dimensions%2F804x547%3Fv%3Dv2%22%20width%3D%22804%22%20height%3D%22547%22%20role%3D%22button%22%20title%3D%22txnelson_0-1727770895361.png%22%20alt%3D%22txnelson_0-1727770895361.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%20%3C%2FP%3E%3C%2FLINGO-BODY%3E

Hi,

I am trying to create a new column based on column "DieY"

I want continuous count based on the difference between each row and the previous one.

row 2-row 1, row 3-row 2, row 4-row 3 and so on.

if the difference is below a certain value, e.g. 5, set the value to 1.

if the difference is above, add 1 to the count.

keep the last count until the difference is above the value set in the formula.

so eventually I will have a new column with values such as: 1,1,1,1,1,1,1,2,2,2,2,2,2,2,3,3,3,3,3,3,3 and so on..

Many thanks to any help

Ohad_s_0-1727735727384.png

var data = div.getElementsByClassName("video-js"); var script = document.createElement('script'); script.src = "https://players.brightcove.net/" + data_account + "/" + data_palyer + "_default/index.min.js"; for(var i=0;i< data.length;i++){ videodata.push(data[i]); for(var i=0;i< videodata.length;i++){ document.getElementsByClassName('lia-vid-container')[i].innerHTML = videodata[i].outerHTML; document.body.appendChild(script); catch(e){ /* Re compile html */ $compile(rootElement.querySelectorAll('div.lia-message-body-content')[0])($scope); if (code_l.toLowerCase() != newBody.getAttribute("slang").toLowerCase()) { /* Adding Translation flag */ var tr_obj = $filter('filter')($scope.sourceLangList, function (obj_l) { return obj_l.code.toLowerCase() === newBody.getAttribute("slang").toLowerCase() if (tr_obj.length > 0) { tr_text = "This post originally written in lilicon-trans-text has been computer translated for you. When you reply, it will also be translated back to lilicon-trans-text.".replace(/lilicon-trans-text/g, tr_obj[0].title); try { if ($scope.wootMessages[$rootScope.profLang] != undefined) { tr_text = $scope.wootMessages[$rootScope.profLang].replace(/lilicon-trans-text/g, tr_obj[0].title); } catch (e) { } else { //tr_text = "This message was translated for your convenience!"; tr_text = "This message was translated for your convenience!"; try { if (!document.getElementById("tr-msz-" + value)) { var tr_para = document.createElement("P"); tr_para.setAttribute("id", "tr-msz-" + value); tr_para.setAttribute("class", "tr-msz"); tr_para.style.textAlign = 'justify'; var tr_fTag = document.createElement("IMG"); tr_fTag.setAttribute("class", "tFlag"); tr_fTag.setAttribute("src", "/html/assets/lingoTrFlag.PNG"); tr_fTag.style.marginRight = "5px"; tr_fTag.style.height = "14px"; tr_para.appendChild(tr_fTag); var tr_textNode = document.createTextNode(tr_text); tr_para.appendChild(tr_textNode); /* Woot message only for multi source */ if(rootElement.querySelector(".lia-quilt-forum-message")){ rootElement.querySelector(".lia-quilt-forum-message").appendChild(tr_para); } else if(rootElement.querySelector(".lia-message-view-blog-topic-message")) { rootElement.querySelector(".lia-message-view-blog-topic-message").appendChild(tr_para); } else if(rootElement.querySelector(".lia-quilt-blog-reply-message")){ rootElement.querySelector(".lia-quilt-blog-reply-message").appendChild(tr_para); } else if(rootElement.querySelector(".lia-quilt-tkb-message")){ rootElement.querySelector(".lia-quilt-tkb-message").appendChild(tr_para); } else if(rootElement.querySelector(".lia-quilt-tkb-reply-message")){ rootElement.querySelector(".lia-quilt-tkb-reply-message").insertBefore(tr_para,rootElement.querySelector(".lia-quilt-row.lia-quilt-row-footer")); } else if(rootElement.querySelector(".lia-quilt-idea-message")){ rootElement.querySelector(".lia-quilt-idea-message").appendChild(tr_para); }else if(rootElement.querySelector(".lia-quilt-column-alley-left")){ rootElement.querySelector(".lia-quilt-column-alley-left").appendChild(tr_para); else { if (rootElement.querySelectorAll('div.lia-quilt-row-footer').length > 0) { rootElement.querySelectorAll('div.lia-quilt-row-footer')[0].appendChild(tr_para); } else { rootElement.querySelectorAll('div.lia-quilt-column-message-footer')[0].appendChild(tr_para); } catch (e) { } else { /* Do not display button for same language */ // syncList.remove(value); var index = $scope.syncList.indexOf(value); if (index > -1) { $scope.syncList.splice(index, 1); angular.forEach(mszList_l, function (value) { if (document.querySelectorAll('div.lia-js-data-messageUid-' + value).length > 0) { var rootElements = document.querySelectorAll('div.lia-js-data-messageUid-' + value); }else if(document.querySelectorAll('.lia-occasion-message-view .lia-component-occasion-message-view').length >0){ var rootElements = document.querySelectorAll('.lia-occasion-message-view .lia-component-occasion-message-view')[0].querySelectorAll('.lia-occasion-description')[0]; }else { var rootElements = document.querySelectorAll('div.message-uid-' + value); angular.forEach(rootElements, function (rootElement) { if (value == '802838' && "ForumTopicPage" == "TkbArticlePage") { rootElement = document.querySelector('.lia-thread-topic'); /* V1.1 Remove from UI */ if (document.getElementById("tr-msz-" + value)) { document.getElementById("tr-msz-" + value).remove(); if (document.getElementById("tr-sync-" + value)) { document.getElementById("tr-sync-" + value).remove(); /* XPath expression for subject and Body */ var lingoRBExp = "//lingo-body[@id = " + "'lingo-body-" + value + "'" + "]"; lingoRSExp = "//lingo-sub[@id = " + "'lingo-sub-" + value + "'" + "]"; /* Get translated subject of the message */ lingoRSXML = doc.evaluate(lingoRSExp, doc, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null); for (var i = 0; i < lingoRSXML.snapshotLength; i++) { /* Replace Reply/Comment subject with transalted subject */ var newSub = lingoRSXML.snapshotItem(i); /*** START : extracting subject from source if selected language and source language is same **/ var sub_L = ""; if (newSub.getAttribute("slang").toLowerCase() == code_l.toLowerCase()) { if (value == '802838') { sub_L = decodeURIComponent($scope.sourceContent[value].subject); else{ sub_L = decodeURIComponent($scope.sourceContent[value].subject); } else { sub_L = newSub.innerHTML; /*** End : extracting subject from source if selected language and source language is same **/ /* This code is placed to remove the extra meta tag adding in the UI*/ sub_L = sub_L.replace('<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />',''); catch(e){ // if($scope.viewTrContentOnly || (newSub.getAttribute("slang").toLowerCase() != code_l.toLowerCase())) { if ($scope.viewTrContentOnly) { if ("ForumTopicPage" == "IdeaPage") { if (value == '802838') { if( (sub_L != "") && (sub_L != undefined) && (sub_L != "undefined") ){ document.querySelector('.MessageSubject .lia-message-subject').innerHTML = sub_L; if ("ForumTopicPage" == "TkbArticlePage") { if (value == '802838') { if( (sub_L != "") && (sub_L != undefined) && (sub_L != "undefined") ){ var subTkbElement = document.querySelector('.lia-thread-subject'); if(subTkbElement){ document.querySelector('.lia-thread-subject').innerHTML = sub_L; else if ("ForumTopicPage" == "BlogArticlePage") { if (value == '802838') { try { if((sub_L != "") && (sub_L!= undefined) && (sub_L != "undefined")){ var subElement = rootElement.querySelector('.lia-blog-article-page-article-subject'); if(subElement) { subElement.innerText = sub_L; } catch (e) { /* var subElement = rootElement.querySelectorAll('.lia-blog-article-page-article-subject'); for (var subI = 0; subI < subElement.length; subI++) { if((sub_L != "") && (sub_L!= undefined) && (sub_L != "undefined")){ subElement[subI].innerHTML = sub_L; else { try { // rootElement.querySelectorAll('.lia-blog-article-page-article-subject').innerHTML= sub_L; /** var subElement = rootElement.querySelectorAll('.lia-blog-article-page-article-subject'); for (var j = 0; j < subElement.length; j++) { if( (sub_L != "") && (sub_L != undefined) && (sub_L != "undefined") ){ subElement[j].innerHTML = sub_L; } **/ } catch (e) { else { if (value == '802838') { /* Start: This code is written by iTalent as part of iTrack LILICON - 98 */ if( (sub_L != "") && (sub_L != undefined) && (sub_L != "undefined") ){ if(document.querySelectorAll('.lia-quilt-forum-topic-page').length > 0){ if(rootElement.querySelector('div.lia-message-subject').querySelector('h5')){ rootElement.querySelector('div.lia-message-subject').querySelector('h5').innerText = decodeURIComponent(sub_L); } else { rootElement.querySelector('.MessageSubject .lia-message-subject').innerText = sub_L; } else { rootElement.querySelector('.MessageSubject .lia-message-subject').innerText = sub_L; /* End: This code is written by iTalent as part of iTrack LILICON - 98 */ catch(e){ console.log("subject not available for second time. error details: " + e); } else { try { /* Start: This code is written by iTalent as part of LILICON - 98 reported by Ian */ if ("ForumTopicPage" == "IdeaPage") { if( (sub_L != "") && (sub_L != undefined) && (sub_L != "undefined") ){ document.querySelector('.lia-js-data-messageUid-'+ value).querySelector('.MessageSubject .lia-message-subject').innerText = sub_L; else{ if( (sub_L != "") && (sub_L != undefined) && (sub_L != "undefined") ){ rootElement.querySelector('.MessageSubject .lia-message-subject').innerText = sub_L; /* End: This code is written as part of LILICON - 98 reported by Ian */ } catch (e) { console.log("Reply subject not available. error details: " + e); // Label translation var labelEle = document.querySelector("#labelsForMessage"); if (!labelEle) { labelEle = document.querySelector(".LabelsList"); if (labelEle) { var listContains = labelEle.querySelector('.label'); if (listContains) { /* Commenting this code as bussiness want to point search with source language label */ // var tagHLink = labelEle.querySelectorAll(".label")[0].querySelector(".label-link").href.split("label-name")[0]; var lingoLabelExp = "//lingo-label/text()"; trLabels = []; trLabelsHtml = ""; /* Get translated labels of the message */ lingoLXML = doc.evaluate(lingoLabelExp, doc, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null); /* try{ for(var j=0;j ,'; trLabelsHtml = trLabelsHtml+'
  • '+lTex+'
  • '; var tagHLink = labelEle.querySelectorAll(".label")[j].querySelector(".label-link").href; trLabelsHtml = trLabelsHtml+'
  • '+lTex+'
  • '; } catch(e){} */ var labelsLength = document.querySelector(".LabelsList").querySelectorAll(".label").length; var labelSnapshotLength = lingoLXML.snapshotLength; if (labelsLength == labelSnapshotLength){ for (var k = 0; k < lingoLXML.snapshotLength; k++) { //trLabels.push(lingoLXML.snapshotItem(i).textContent); if (k != 0) { //trLabelsHtml = trLabelsHtml + '
  • ,
  • '; //diffVariable = kValue if(labelEle.querySelectorAll(".label")[k]){ tagHLink = labelEle.querySelectorAll(".label")[k].querySelector(".label-link").href; if ("ForumTopicPage" == "BlogArticlePage") { trLabelsHtml = trLabelsHtml + '
  • ' + lingoLXML.snapshotItem(k).textContent + '
  • '; else { trLabelsHtml = trLabelsHtml + '
  • ' + lingoLXML.snapshotItem(k).textContent + '
  • '; catch(e){ catch(e){ if (newSub.getAttribute("slang").toLowerCase() != code_l.toLowerCase()) { if (trLabelsHtml != "") { labelEle.querySelector("ul").innerHTML = ""; labelEle.querySelector("ul").innerHTML = trLabelsHtml; // trLabels = trLabels.split(","); // trLabels = reverseArr(trLabels); // var tagHLink = labelEle.querySelectorAll(".label")[0].querySelector(".label-link").href.split("label-name")[0]; // cELabels = labelEle.querySelectorAll(".label"); // //cELabels = reverseArr(cELabels); // for(var cE=0; cE < trLabels.length; cE++) { // if(trLabels[cE]){ // cELabels[cE].querySelector(".label-link").text = trLabels[cE]; // } // } /* V 2.0:3 = Store not translated reply id */ if (lingoRSXML.snapshotLength == 0) { if ($scope.falseReplyID == "") { $scope.falseReplyID = value; /* Get translated Body of Replies/Comments */ lingoRBXML = doc.evaluate(lingoRBExp, doc, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null); /* Replace Reply/Comment Body with translated Body */ for (var i = 0; i < lingoRBXML.snapshotLength; i++) { var newBody = lingoRBXML.snapshotItem(i); /* try { var cPTags = newBody.getElementsByTagName("p"); var searchText = "