添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
%3CLINGO-SUB%20id%3D%22lingo-sub-72364%22%20slang%3D%22en-US%22%3E%E5%A6%82%E4%BD%95%E5%88%9B%E5%BB%BA%E6%98%BE%E7%A4%BApvalue%E7%9A%84%E7%9B%B8%E5%85%B3%E6%80%A7%EF%BC%88%E5%85%B7%E6%9C%89%E4%B8%8D%E5%90%8C%E9%A2%9C%E8%89%B2%EF%BC%89%E5%92%8C%E6%98%9F%E5%BD%A2%E7%9A%84HEATMAPS%EF%BC%9F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-72364%22%20slang%3D%22en-US%22%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-72454%22%20slang%3D%22en-US%22%3ERe%EF%BC%9A%E5%A6%82%E4%BD%95%E5%88%9B%E5%BB%BA%E6%98%BE%E7%A4%BApvalu%E7%9A%84%E7%9B%B8%E5%85%B3%E6%80%A7%EF%BC%88%E5%85%B7%E6%9C%89%E4%B8%8D%E5%90%8C%E9%A2%9C%E8%89%B2%EF%BC%89%E5%92%8C%E6%98%9F%E5%BD%A2%E7%9A%84HEATMAPS%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-72454%22%20slang%3D%22en-US%22%3E%3CP%3E%E8%BF%99%E6%98%AF%E4%B8%80%E4%B8%AA%E8%84%9A%E6%9C%AC%EF%BC%8C%E5%BA%94%E8%AF%A5%E6%98%AF%E5%88%9B%E5%BB%BA%E6%89%80%E9%9C%80%E5%86%85%E5%AE%B9%E7%9A%84%E8%89%AF%E5%A5%BD%E5%BC%80%E7%AB%AF%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20504px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fkvoqx44227.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F12412i052CA6E1D86AE9CB%2Fimage-dimensions%2F504x537%3Fv%3D1.0%22%20width%3D%22504%22%20height%3D%22537%22%20alt%3D%22matrix.PNG%22%20title%3D%22matrix.PNG%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3ENames%20Default%20To%20Here(%201%20)%3B%0A%0A%2F%2F%20Open%20a%20sample%20data%20table%0Adt%20%3D%20Open(%20%22%24SAMPLE_DATA%2Fsemiconductor%20capability.jmp%22%20)%3B%0A%0A%2F%2F%20Run%20the%20Correlation%20Platform%20to%20get%20the%20data%0Amult%20%3D%20dt%20%26lt%3B%26lt%3B%20Multivariate(%0A%20invisible%2C%0A%20Y(%20%3ANPN1%2C%20%3APNP1%2C%20%3APNP2%2C%20%3ANPN2%2C%20%3APNP3%2C%20%3AIVP1%20)%2C%0A%20Estimation%20Method(%20%22Row-wise%22%20)%2C%0A%20Matrix%20Format(%20%22Square%22%20)%2C%0A%20Scatterplot%20Matrix(%200%20)%2C%0A%20Pairwise%20Correlations(%201%20)%0A)%3B%0A%0A%2F%2F%20Create%20data%20tables%20of%20the%20stats%20required%0AdtCorr%20%3D%20Report(%20mult%20)%5B%22Correlations%22%5D%5BMatrix%20Box(%201%20)%5D%20%26lt%3B%26lt%3B%20make%20into%20data%20table(invisible)%3B%0AdtSig%20%3D%20Report(%20mult%20)%5B%22Pairwise%20Correlations%22%5D%5BTable%20Box(%201%20)%5D%20%26lt%3B%26lt%3B%20make%20into%20data%20table(invisible)%3B%0A%0A%2F%2F%20Delete%20the%20Row%20Name%20column%2C%20not%20wanted%20in%20analysis%0AdtCorr%20%26lt%3B%26lt%3B%20delete%20columns(%201%20)%3B%0A%0A%2F%2F%20Set%20the%20100%20colors%20to%20be%20used%20to%20color%20the%20graph%0AcolorMatrix%20%3D%20%5B-16558990%2C%20-16558990%2C%20-16557962%2C%20-16557962%2C%20-16557191%2C%20-16557191%2C%20-16556419%2C%20-16556419%2C%20-16555391%2C%0A-16555391%2C%20-16554619%2C%20-16554619%2C%20-16553848%2C%20-16553848%2C%20-16553076%2C%20-16553076%2C%20-16552048%2C%20-16552048%2C%20-16551277%2C%0A-16551277%2C%20-16550506%2C%20-16550506%2C%20-16549735%2C%20-16549735%2C%20-16548964%2C%20-16548964%2C%20-16547936%2C%20-16547936%2C%20-16481629%2C%0A-16481629%2C%20-16480858%2C%20-16480858%2C%20-16480087%2C%20-16480087%2C%20-16479316%2C%20-16479316%2C%20-16478288%2C%20-16478288%2C%20-16477517%2C%0A-16477517%2C%20-16476746%2C%20-16476746%2C%20-16410184%2C%20-16410184%2C%20-16343621%2C%20-16343621%2C%20-16277315%2C%20-16277315%2C%20-16210752%2C%0A-16210752%2C%20-16144190%2C%20-16144190%2C%20-16077628%2C%20-16077628%2C%20-16011321%2C%20-16011321%2C%20-15944759%2C%20-15944759%2C%20-15878196%2C%0A-15878196%2C%20-15811634%2C%20-15811634%2C%20-15745328%2C%20-15745328%2C%20-15678765%2C%20-15678765%2C%20-15612459%2C%20-15612459%2C%20-15415082%2C%0A-15415082%2C%20-15217705%2C%20-15217705%2C%20-15020328%2C%20-15020328%2C%20-14822951%2C%20-14822951%2C%20-14625829%2C%20-14625829%2C%20-14428452%2C%0A-14428452%2C%20-14231075%2C%20-14231075%2C%20-14099234%2C%20-14099234%2C%20-13901857%2C%20-13901857%2C%20-13704735%2C%20-13704735%2C%20-13507358%2C%0A-13507358%2C%20-13309981%2C%20-13309981%2C%20-13113116%2C%20-13113116%2C%20-12916508%2C%20-12916508%2C%20-12719643%2C%20-12719643%2C%20-12522778%2C%0A-12522778%5D%3B%0A%0A%2F%2F%20Get%20the%20column%20names%20in%20the%20Corr%20data%20table%0AcolumnNamesList%20%3D%20dtCorr%20%26lt%3B%26lt%3B%20get%20column%20names(%20string%20)%3B%0A%0A%2F%2F%20Create%20the%20output%0Anw%20%3D%20New%20Window(%20%22Correlations%22%2C%0A%20gb%20%3D%20Graph%20Box(%0A%20%20Frame%20Size(%20800%2C%20800%20)%2C%0A%20%20X%20Scale(%200%2C%20N%20Col(%20dtCorr%20)%20%2B%202%20)%2C%0A%20%20Y%20Scale(%200%2C%20N%20Rows(%20dtCorr%20)%20%2B%202%20)%2C%0A%20%20%2F%2F%20Loop%20across%20the%20the%20rows%20and%20columns%20to%20find%20the%20correlation%20values%20and%20plot%20the%20results%0A%20%20For(%20x%20%3D%201%2C%20x%20%26lt%3B%3D%20N%20Cols(%20dtCorr%20)%2C%20x%2B%2B%2C%0A%20%20%20For(%20y%20%3D%201%2C%20y%20%26lt%3B%3D%20N%20Rows(%20dtCorr%20)%2C%20y%2B%2B%2C%0A%20%20%20%20%2F%2F%20Find%20the%20color%20to%20use%20from%20the%20color%20matrix%0A%20%20%20%20fc%20%3D%20Abs(%20Floor(%20(dtCorr%5By%2C%20x%5D%20*%20100)%20%2B%20.5%20)%20)%3B%0A%20%20%20%20If(%20fc%20%26lt%3B%201%2C%20fc%20%3D%201%20)%3B%0A%20%20%20%20fcc%20%3D%20colorMatrix%5Bfc%5D%3B%0A%20%20%20%20%2F%2F%20Set%20the%20color%0A%20%20%20%20Eval(%20Parse(%20%22Fill%20Color(%22%20%7C%7C%20Char(%20fcc%20)%20%7C%7C%20%22)%3B%22%20)%20)%3B%0A%20%20%20%20Pen%20Color(%20%22black%22%20)%3B%0A%20%20%20%20%0A%20%20%20%20%2F%2F%20create%20the%20output%20square%0A%20%20%20%20xlist1%20%3D%20Matrix(%20x%20)%20%7C%7C%20Matrix(%20x%20)%20%7C%7C%20Matrix(%20x%20%2B%201%20)%20%7C%7C%20Matrix(%20x%20%2B%201%20)%3B%0A%20%20%20%20xlist2%20%3D%20Matrix(%20N%20Cols(%20dtCorr%20)%20%2B%201%20-%20y%20)%20%7C%7C%20Matrix(%20N%20Cols(%20dtCorr%20)%20%2B%201%20-%20y%20%2B%201%20)%20%7C%7C%0A%20%20%20%20Matrix(%20N%20Cols(%20dtCorr%20)%20%2B%201%20-%20y%20%2B%201%20)%20%7C%7C%20Matrix(%20N%20Cols(%20dtCorr%20)%20%2B%201%20-%20y%20)%3B%0A%20%20%20%20Polygon(%20xlist1%2C%20xlist2%20)%3B%0A%20%20%20%20%2F%2F%20Draw%20a%20line%20around%20the%20square%0A%20%20%20%20Line(%20xlist1%2C%20xlist2%20)%3B%0A%20%20%20)%0A%20%20)%3B%0A%20%20%0A%20%20%2F%2F%20Add%20the%20%22*%22%20for%20significant%20correlations%2C%20by%20going%20through%20the%20significant%20data%20table%0A%20%20Text%20Color(%20%22Black%22%20)%3B%0A%20%20Text%20Size(%2020%20)%3B%0A%20%20%0A%20%20For(%20i%20%3D%201%2C%20i%20%26lt%3B%3D%20N%20Rows(%20dtSig%20)%2C%20i%2B%2B%2C%0A%20%20%20If(%20dtSig%3ASignif%20Prob%5Bi%5D%20%26lt%3B%3D%20.05%2C%0A%20%20%20%20textList%20%3D%20%7B%7D%3B%0A%20%20%20%20Insert%20Into(%20textList%2C%20Loc(%20columnNamesList%2C%20dtSig%3AVariable%5Bi%5D%20)%5B1%5D%20%2B%20.5%20)%3B%0A%20%20%20%20Insert%20Into(%20textList%2C%20N%20Cols(%20dtCorr%20)%20%2B%201%20-%20Loc(%20columnNamesList%2C%20dtSig%3Aby%20Variable%5Bi%5D%20)%5B1%5D%20%2B%20.5%20)%3B%0A%20%20%20%20%0A%20%20%20%20Text(%20Center%20Justified%2C%20textList%2C%20%22*%22%20)%3B%0A%20%20%20%20textList%20%3D%20%7B%7D%3B%0A%20%20%20%20Insert%20Into(%20textList%2C%20Loc(%20columnNamesList%2C%20dtSig%3Aby%20Variable%5Bi%5D%20)%5B1%5D%20%2B%20.5%20)%3B%0A%20%20%20%20Insert%20Into(%20textList%2C%20N%20Cols(%20dtCorr%20)%20%2B%201%20-%20Loc(%20columnNamesList%2C%20dtSig%3AVariable%5Bi%5D%20)%5B1%5D%20%2B%20.5%20)%3B%0A%20%20%20%20%0A%20%20%20%20%2F%2F%20Write%20the%20symbol%20in%20the%20middle%20of%20the%20square%0A%20%20%20%20Text(%20Center%20Justified%2C%20textList%2C%20%22*%22%20)%3B%0A%20%20%20)%0A%20%20)%3B%0A%20)%0A%20%0A)%3B%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-72421%22%20slang%3D%22en-US%22%3ERe%EF%BC%9A%E5%A6%82%E4%BD%95%E5%88%9B%E5%BB%BA%E6%98%BE%E7%A4%BApvalu%E7%9A%84%E7%9B%B8%E5%85%B3%E6%80%A7%EF%BC%88%E5%85%B7%E6%9C%89%E4%B8%8D%E5%90%8C%E9%A2%9C%E8%89%B2%EF%BC%89%E5%92%8C%E6%98%9F%E5%BD%A2%E7%9A%84HEATMAPS%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-72421%22%20slang%3D%22en-US%22%3E%3CP%3E%E4%BD%A0%E8%83%BD%E7%BB%99%E6%88%91%E4%B8%80%E4%BA%9B%E5%85%B3%E4%BA%8E''%E8%84%9A%E6%9C%AC%E5%81%87%E4%BA%BA'%E7%9A%84%E6%9B%B4%E5%A4%9A%E4%BF%A1%E6%81%AF%E5%90%97%EF%BC%9F%3C%2FP%3E%3CP%3E%E6%88%91%E6%9C%80%E8%BF%91%EF%BC%88%E4%BB%8A%E5%A4%A9%EF%BC%89%E6%8C%89%E7%85%A7%E8%BF%99%E4%B8%AA%E9%9D%9E%E5%B8%B8%E6%9C%89%E7%94%A8%E7%9A%84%E8%A7%86%E9%A2%91%E4%B8%AD%E7%BB%99%E5%87%BA%E7%9A%84%E8%AF%B4%E6%98%8E%E5%9C%A8JMP%E4%B8%8A%E5%81%9A%E4%BA%86%E6%88%91%E7%9A%84%E7%AC%AC%E4%B8%80%E4%B8%AA%E7%83%AD%E5%9B%BE%EF%BC%9A%20%3CA%20href%3D%22https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DuaBFoI3l-8U%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3E%20https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DuaBFoI3l-8U%20%3C%2FA%3E%3C%2FP%3E%3CP%3E%E5%A6%82%E6%9E%9C%E6%9C%89%E4%BA%BA%E5%8F%AF%E4%BB%A5%E5%88%B6%E4%BD%9C%E7%B1%BB%E4%BC%BC%E7%9A%84%E8%A7%86%E9%A2%91%EF%BC%8C%E4%BD%86%E4%B9%9F%E5%8C%85%E6%8B%AC%E5%A6%82%E4%BD%95%E6%B7%BB%E5%8A%A0%E6%98%9F%E6%98%9F%E7%9A%84%E8%84%9A%E6%9C%AC%EF%BC%88%E4%BE%8B%E5%A6%82*%20p%20%26lt%3B0.05%EF%BC%8C**%20p%20%26lt%3B0.01%EF%BC%8C****%20p%20%26lt%3B0.001%EF%BC%89%EF%BC%8C%E6%88%91%E8%AE%A4%E4%B8%BA%E6%95%B4%E4%B8%AAJMP%E7%A4%BE%E5%8C%BA%E7%9C%9F%E7%9A%84%E5%BE%88%E5%BC%80%E5%BF%83%E5%85%B3%E4%BA%8E%E5%AE%83%20%EF%BC%9A%EF%BC%89%3C%2FP%3E%3CP%3E%E6%88%96%E8%80%85%EF%BC%8C%E5%A6%82%E6%9E%9C%E6%9C%89%E4%BA%BA%E6%9C%89%E6%97%B6%E9%97%B4%E9%80%90%E6%AD%A5%E8%A7%A3%E9%87%8A%E9%9C%80%E8%A6%81%E4%BB%80%E4%B9%88%E8%84%9A%E6%9C%AC%E4%BB%A5%E5%8F%8A%E5%A6%82%E4%BD%95%E5%B0%86%E5%85%B6%E5%90%88%E5%B9%B6%E5%88%B0JMP%E6%95%B0%E6%8D%AE%E9%9B%86%E4%B8%AD%EF%BC%8C%E9%82%A3%E4%B9%88%E5%AE%83%E4%BB%8D%E7%84%B6%E9%9D%9E%E5%B8%B8%E6%9C%89%E7%94%A8%E3%80%82%26nbsp%3B%3C%2FP%3E%3CP%3E%E8%B0%A2%E8%B0%A2%E4%BD%A0%E7%9A%84%E7%90%86%E8%A7%A3%EF%BC%81%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-72417%22%20slang%3D%22en-US%22%3ERe%EF%BC%9A%E5%A6%82%E4%BD%95%E5%88%9B%E5%BB%BA%E6%98%BE%E7%A4%BApvalu%E7%9A%84%E7%9B%B8%E5%85%B3%E6%80%A7%EF%BC%88%E5%85%B7%E6%9C%89%E4%B8%8D%E5%90%8C%E9%A2%9C%E8%89%B2%EF%BC%89%E5%92%8C%E6%98%9F%E5%BD%A2%E7%9A%84HEATMAPS%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-72417%22%20slang%3D%22en-US%22%3E%3CP%3E%E6%B2%A1%E6%9C%89%E5%86%85%E7%BD%AE%E9%80%89%E9%A1%B9%E6%9D%A5%E5%AE%8C%E6%88%90%E6%82%A8%E7%9A%84%E8%A6%81%E6%B1%82%E7%9A%84%E5%AE%8C%E6%95%B4%E5%88%97%E8%A1%A8%E3%80%82%26nbsp%3B%20%E4%BD%86%E6%98%AF%EF%BC%8C%E4%B8%80%E4%B8%AA%E4%B8%8D%E5%A4%AA%E5%9B%B0%E9%9A%BE%E7%9A%84%E8%84%9A%E6%9C%AC%E5%8F%AF%E4%BB%A5%E7%94%9F%E6%88%90%E5%9B%BE%E8%A1%A8%E3%80%82%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-72403%22%20slang%3D%22en-US%22%3ERe%EF%BC%9A%E5%A6%82%E4%BD%95%E5%88%9B%E5%BB%BA%E6%98%BE%E7%A4%BApvalu%E7%9A%84%E7%9B%B8%E5%85%B3%E6%80%A7%EF%BC%88%E5%85%B7%E6%9C%89%E4%B8%8D%E5%90%8C%E9%A2%9C%E8%89%B2%EF%BC%89%E5%92%8C%E6%98%9F%E5%BD%A2%E7%9A%84HEATMAPS%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-72403%22%20slang%3D%22en-US%22%3E%3CP%3E%E6%98%AF%E7%9A%84%EF%BC%8C%E4%BD%86%E5%A6%82%E6%9E%9C%E6%82%A8%E8%BF%98%E5%B8%8C%E6%9C%9B%E5%9C%A8%E6%AF%8F%E4%B8%AA%E7%9B%B8%E5%85%B3%E6%80%A7%E4%B8%8A%E8%AE%BE%E7%BD%AE%E6%98%9F%E5%BD%A2%EF%BC%88%E8%A1%A8%E7%A4%BAp%E5%80%BC%26lt%3B0.05%EF%BC%89%EF%BC%8C%E8%AF%A5%E6%80%8E%E4%B9%88%E5%8A%9E%EF%BC%9F%E4%BE%8B%E5%A6%82%E9%99%84%E5%9C%A8%E7%85%A7%E7%89%87%E4%B8%AD%EF%BC%9F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-72385%22%20slang%3D%22en-US%22%3ERe%EF%BC%9A%E5%A6%82%E4%BD%95%E5%88%9B%E5%BB%BA%E6%98%BE%E7%A4%BApvalu%E7%9A%84%E7%9B%B8%E5%85%B3%E6%80%A7%EF%BC%88%E5%85%B7%E6%9C%89%E4%B8%8D%E5%90%8C%E9%A2%9C%E8%89%B2%EF%BC%89%E5%92%8C%E6%98%9F%E5%BD%A2%E7%9A%84HEATMAPS%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-72385%22%20slang%3D%22en-US%22%3E%3CP%3E%E4%BB%8EAnalyze%E4%B8%8B%E6%8B%89%E8%8F%9C%E5%8D%95%E4%B8%AD%EF%BC%9A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%20%26nbsp%3B%26nbsp%3B%20%E5%88%86%E6%9E%90%3D%3D%26gt%3B%E5%A4%9A%E5%8F%98%E9%87%8F%E6%96%B9%E6%B3%95%3D%3D%26gt%3B%E5%A4%9A%E5%8F%98%E9%87%8F%3C%2FP%3E%0A%3CP%3E%E5%9C%A8%E6%8A%A5%E5%91%8A%E8%BE%93%E5%87%BA%E7%9A%84%E7%BA%A2%E8%89%B2%E4%B8%89%E8%A7%92%E5%BD%A2%E4%B8%AD%EF%BC%8C%E9%80%89%E6%8B%A9%E2%80%9C%E9%A2%9C%E8%89%B2%E8%B4%B4%E5%9B%BE%E2%80%9D%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20271px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fkvoqx44227.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F12398i3FEB8371860F9021%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22colormap.PNG%22%20title%3D%22colormap.PNG%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E

Could you give some more info for ''script dummies'' as me?

I recently (today) did my 1st heatmap on JMP following the instructions given in this very useful video: https://www.youtube.com/watch?v=uaBFoI3l-8U

If somebody could create a similar video but also including the script for how to add the stars (eg *p<0.05, **p<0.01, **** p<0.001), i think the whole JMP community would be really happy about it :)

Alternatively if someone had some time to explain step by step what script would be needed and how it could be incorporated in a JMP dataset it would still be very useful.

Thanks for the understanding!

Here is a script that should be a good start in creating what you want

Names Default To Here( 1 );
// Open a sample data table
dt = Open( "$SAMPLE_DATA/semiconductor capability.jmp" );
// Run the Correlation Platform to get the data
mult = dt << Multivariate(
	invisible,
	Y( :NPN1, :PNP1, :PNP2, :NPN2, :PNP3, :IVP1 ),
	Estimation Method( "Row-wise" ),
	Matrix Format( "Square" ),
	Scatterplot Matrix( 0 ),
	Pairwise Correlations( 1 )
// Create data tables of the stats required
dtCorr = Report( mult )["Correlations"][Matrix Box( 1 )] << make into data table(invisible);
dtSig = Report( mult )["Pairwise Correlations"][Table Box( 1 )] << make into data table(invisible);
// Delete the Row Name column, not wanted in analysis
dtCorr << delete columns( 1 );
// Set the 100 colors to be used to color the graph
colorMatrix = [-16558990, -16558990, -16557962, -16557962, -16557191, -16557191, -16556419, -16556419, -16555391,
-16555391, -16554619, -16554619, -16553848, -16553848, -16553076, -16553076, -16552048, -16552048, -16551277,
-16551277, -16550506, -16550506, -16549735, -16549735, -16548964, -16548964, -16547936, -16547936, -16481629,
-16481629, -16480858, -16480858, -16480087, -16480087, -16479316, -16479316, -16478288, -16478288, -16477517,
-16477517, -16476746, -16476746, -16410184, -16410184, -16343621, -16343621, -16277315, -16277315, -16210752,
-16210752, -16144190, -16144190, -16077628, -16077628, -16011321, -16011321, -15944759, -15944759, -15878196,
-15878196, -15811634, -15811634, -15745328, -15745328, -15678765, -15678765, -15612459, -15612459, -15415082,
-15415082, -15217705, -15217705, -15020328, -15020328, -14822951, -14822951, -14625829, -14625829, -14428452,
-14428452, -14231075, -14231075, -14099234, -14099234, -13901857, -13901857, -13704735, -13704735, -13507358,
-13507358, -13309981, -13309981, -13113116, -13113116, -12916508, -12916508, -12719643, -12719643, -12522778,
-12522778];
// Get the column names in the Corr data table
columnNamesList = dtCorr << get column names( string );
// Create the output
nw = New Window( "Correlations",
	gb = Graph Box(
		Frame Size( 800, 800 ),
		X Scale( 0, N Col( dtCorr ) + 2 ),
		Y Scale( 0, N Rows( dtCorr ) + 2 ),
		// Loop across the the rows and columns to find the correlation values and plot the results
		For( x = 1, x <= N Cols( dtCorr ), x++,
			For( y = 1, y <= N Rows( dtCorr ), y++,
				// Find the color to use from the color matrix
				fc = Abs( Floor( (dtCorr[y, x] * 100) + .5 ) );
				If( fc < 1, fc = 1 );
				fcc = colorMatrix[fc];
				// Set the color
				Eval( Parse( "Fill Color(" || Char( fcc ) || ");" ) );
				Pen Color( "black" );
				// create the output square
				xlist1 = Matrix( x ) || Matrix( x ) || Matrix( x + 1 ) || Matrix( x + 1 );
				xlist2 = Matrix( N Cols( dtCorr ) + 1 - y ) || Matrix( N Cols( dtCorr ) + 1 - y + 1 ) ||
				Matrix( N Cols( dtCorr ) + 1 - y + 1 ) || Matrix( N Cols( dtCorr ) + 1 - y );
				Polygon( xlist1, xlist2 );
				// Draw a line around the square
				Line( xlist1, xlist2 );
		// Add the "*" for significant correlations, by going through the significant data table
		Text Color( "Black" );
		Text Size( 20 );
		For( i = 1, i <= N Rows( dtSig ), i++,
			If( dtSig:Signif Prob[i] <= .05,
				textList = {};
				Insert Into( textList, Loc( columnNamesList, dtSig:Variable[i] )[1] + .5 );
				Insert Into( textList, N Cols( dtCorr ) + 1 - Loc( columnNamesList, dtSig:by Variable[i] )[1] + .5 );
				Text( Center Justified, textList, "*" );
				textList = {};
				Insert Into( textList, Loc( columnNamesList, dtSig:by Variable[i] )[1] + .5 );
				Insert Into( textList, N Cols( dtCorr ) + 1 - Loc( columnNamesList, dtSig:Variable[i] )[1] + .5 );
				// Write the symbol in the middle of the square
				Text( Center Justified, textList, "*" );
                                                                        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){
                                                            if(!compiled){
                                                                /* 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!";
                                                            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 .lia-quilt-row:nth-child(3)").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.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) {
                                                        /* $( "div.message-uid-"+value ).find( "div.lia-message-body-content" ).append(body_L); */
                                                    } 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);
                                        /* V 2.0:2 = Reply Sync button for multi source translation */
                                                                         } catch(e){console.log(e)}
                                    if ((rContent != undefined) && (rContent != "")) {
                                        drawCanvas(decodeURIComponent(rContent));
                                        $window.connectorStatus.prop = "completed";
                                        /** Update variable with selected language code **/
                                        $scope.previousSelCode = code_l;
                                 * @function manageTranslation
                                 * @description Managess the translation of given language for the thread
                                 * @param {string} langCode - Language Code
                                 * @param {string} tid - Thread ID
                                $scope.manageTranslation = function (langCode, tid) {
                                    /* V 2.0:5 = actualStatus variable introduced to indicate detailed connector status on UI. This variable holds the actual translation percentage */
                                    $scope.transPercent = "";
                                    $scope.actualStatus = "";
                                    if (tid != "") {
                                        var bulkTranslation = lithiumPlugin.bulkTranslation(langCode, tid);
                                        bulkTranslation.then(function (trContent) {
                                            if (trContent.body != "") {
                                                $scope.showPreview(trContent.body, $scope.mszList, langCode);
                                            if ((trContent.status != "NA") && trContent.status != null) {
                                                // $scope.transPercent = String(trContent.status);
                                                $scope.actualStatus = String(trContent.status);
                                            } else {
                                                $rootScope.errorMsg = "Translation is in progress. Please retry in a few minutes."
                                            $scope.workbench = trContent.wb;
                                            /* V 2.0:4 = Trigger uncalled or delayed callbacks (documnet uploaded/translation completed from lithium).*/
                                            if (trContent.callback == 'true') {
                                                var trCompletCallback = lithiumPlugin.trCompletCallback(langCode, trContent.docID);
                                                trCompletCallback.then(function (callback) {
                                                    // $rootScope.errorMsg = "Downloading Translated content in " + langCode + " now. Please check again in a few minutes."
                                                        $rootScope.errorMsg = "Downloading Translated content. Please refresh after some time.";
                                            } else if (trContent.callback == 'upload') {
                                                var trCompletUpload = lithiumPlugin.trCompletUpload(langCode, trContent.docID);
                                                trCompletUpload.then(function (callback) {
                                                    $rootScope.errorMsg = "Uploading content to translate. Please check again in a few minutes."
                                            } else if ("many" == "one") {
                                                $scope.updateOOS();
                                            } else if ((trContent.status != null) && trContent.status.includes("100")) {
                                                /* If everything fine then only check Out of Sync status */
                                                $scope.updateOOS();
                                            } else {
                                                /* If translation perccent is less than 100 then show the percentage on UI */
                                                $scope.transPercent = $scope.actualStatus;
                                        }).catch(function (error) {
                                            console.error("Manage translation Error:"+error);
                                 * @function selectThisLang
                                 * @description Called on select dropdown.
                                 * @param {string} lang - Language code
                                $scope.selectThisLang = function (lang, anonymousFlag) {
                                    /* 1.4:3 Update Analytics on language selection */
                                    try {
                                        lingoThreadLangSelected(lang, '72364');
                                    } catch (e) {
                                                                     /* var obj = $filter('filter')($scope.sourceLangList, function (obj) {return obj.code === lang});
                                    if(obj.length > 0) {
                                        if((anonymousFlag == undefined) && ("" != obj[0].id)) {
                                            $window.location.href = "?profile.language="+obj[0].id;
                                            return "";
                                    /** Display Translated content **/
                                    var getTranslation = lithiumPlugin.getTranslation(lang, "72364");
                                    getTranslation.then(function (trContent) {
                                        if (trContent.body != "") {
                                            $scope.showPreview(trContent.body, $scope.mszList, lang);
                                        } else {
                                            $rootScope.errorMsg = "Translation is in progress. Please retry in a few minutes."
                                 * @function openWorkbench
                                 * @description Opens the workbench link of the selected code
                                $scope.openWorkbench = function (wbLink) {
                                    /* Open workbench link in new tab */
                                    $window.open(decodeURIComponent(wbLink), '_blank');
                                 * @function detectBrowserLanguage
                                 * @description detects the browser language and displays the UI to request translation for browser language
                                $scope.detectBrowserLanguage = function () {
                                    /* Get cookie value of the user choice regarding browser language translation */
                                    var brTChoice = cookieService.getBrTChoice()
                                    if (brTChoice != undefined && brTChoice == "true") {
                                        /* Do nothing if user dont want option for browser language translation */
                                    } else {
                                        /* Get user browser language */
                                        var brLangCode = window.navigator.userLanguage || window.navigator.language;
                                        brLang = "";
                                        /* Get right language code of the browser language. Get the first value in the matching list */
                                        if (brLangCode.indexOf("-") >= 0) {
                                            var obj = $filter('filter')($scope.languages, function (obj) {
                                                return obj.code === brLangCode
                                            if (obj.length > 0) {
                                                brLang = obj[0];
                                        } else {
                                            var obj = $filter('filter')($scope.languages, function (obj) {
                                                return obj.code.split("-")[0] === brLangCode
                                            if (obj.length > 0) {
                                                brLang = obj[0];
                                        /* If browser language is valid one then provide UI to request browser language translation */
                                        if (brLang != "") {
                                            var defaultLang = "";
                                            if (('en-US'.indexOf(brLang.code) == -1) && (brLang.code.indexOf('en-US') == -1) && (defaultLang.indexOf(brLang.code) == -1) && (brLang.code.indexOf(defaultLang) == -1)) {
                                                $scope.brLang = brLang;
                                                $scope.brTransMsg = "brTransMsg.html";
                                            } else {
                                                $scope.brTransMsg = "";
                                 * @function neverDisplayBrTransMsg
                                 * @description sets cookie if user never want browser language translation choice
                                $scope.neverDisplayBrTransMsg = function () {
                                    cookieService.putBrTChoice()
                                    $scope.brTransMsg = "";
                                 * @function trnaslateToBrowserLang
                                 * @param {isTranslate} isTranslate - true/false
                                 * @description Requests for browser translation based on user choice
                                $scope.trnaslateToBrowserLang = function (isTranslate) {
                                    if (isTranslate) {
                                        /* Point language dropdown to browser language */
                                        $scope.selLang = $scope.brLang.code;
                                        /* Initiate preview process for browser language */
                                        $scope.selectThisLang($scope.selLang);
                                        /* Remove browser language translation UI */
                                        $scope.brTransMsg = "";
                                    } else {
                                        $scope.brTransMsg = "";
                                /* V1.4 */
                                 * @function translateThisThread
                                 * @description Triggers the translation on button click
                                 * @param {mode} manual click or auto - click/null
                                $scope.translateThisThread = function (mode) {
                                    if (mode != undefined && mode == 'click') {
                                        /* Cheking author decision on validation */
                                        if ((document.querySelectorAll(".lingo-TrFlag").length == 0) && ("-1" != "-1")) {
                                            if (!confirm("This thread is not selected for translation by the Author. Do you want to translate this thread?")) {
                                                return false;
                                    $scope.showTransLation = true;
                                    /* If language exists in selected languages then initiate or manage translation */
                                    if ("true" == "true") {
                                        $scope.selLang = "zh-CN";
                                        /* 1.4 Update Analytics on language selected */
                                        try {
                                            lingoThreadLangSelected('zh-CN', '72364');
                                        } catch (e) {
                                        if (angular.element(document.querySelector("#trABody"))) {
                                            console.log(angular.element(document.querySelector("trABody")));
                                            $scope.showPreview(angular.element(document.querySelector("#trABody")).innerHTML, $scope.mszList, "zh-CN");
                                        $scope.manageTranslation("zh-CN", "72364");
                                    } else {
                                        if ("true" == "true") {
                                            alert("Requested languages not present in the selected languages list");
                                    /* Detecting Browser language */
                                    $scope.detectBrowserLanguage();
                                $rootScope.profLang = "";
                            /* If language exists in selected languages then initiate or manage translation */
                                /* Get Cookie */
                                 function getCookie(cname) {
                                     var name = cname + "=";
                                     var ca = document.cookie.split(';');
                                     for (var i = 0; i < ca.length; i++) {
                                         var c = ca[i];
                                         while (c.charAt(0) == ' ') {
                                             c = c.substring(1);
                                         if (c.indexOf(name) == 0) {
                                             return c.substring(name.length, c.length);
                                     return "";
                                var lang_code = "";
                                if ("true" == "true") { /* Language from Parameter */
                                    var lang_code = "zh-CN";
                                } else if (anonLang = getCookie('lia.anon.profile.language')) { /* Language from cookie */
                                    /* Get code from source list */
                                    var srObj = $filter('filter')($scope.sourceLangList, function (obj) {
                                        return obj.id === anonLang
                                    if (srObj.length > 0) {
                                        /* check code in selected languages */
                                        var selObj = $filter('filter')($scope.languages, function (obj) {
                                            return obj.code === srObj[0].code
                                        if (selObj.length > 0) {
                                            lang_code = srObj[0].code;
                                } else if (brLangCode = window.navigator.userLanguage || window.navigator.language) { /* Browser Language */
                                    /* Get right language code of the browser language. Get the first value in the matching list */
                                    if (brLangCode.indexOf("-") >= 0) {
                                        var obj = $filter('filter')($scope.languages, function (obj) {
                                            return obj.code === brLangCode
                                        if (obj.length > 0) {
                                            lang_code = obj[0].code;
                                    } else {
                                        var obj = $filter('filter')($scope.languages, function (obj) {
                                            return obj.code.split("-")[0] === brLangCode
                                        if (obj.length > 0) {
                                            lang_code = obj[0].code;
                                } else {
                                $rootScope.profLang = lang_code;
                                if (lang_code == "") {
                                    lang_code = "en-US";
                                $scope.selLang = lang_code;
                                if (angular.element(document.querySelector("#trABody"))) {
                                    console.log(angular.element(document.querySelector("#trABody")).innerHTML);
                                    $scope.showPreview(angular.element(document.querySelector("#trABody")).innerHTML, $scope.mszList, $scope.selLang);
                                $scope.showTransLation = true;
                                $scope.selectThisLang($scope.selLang, "1");
                                if ("auto" == "true") {
                                    try {
                                        lingoThreadLangSelected($scope.selLang, '72364');
                                    } catch (e) {
                                    $scope.manageTranslation($scope.selLang, "72364");
                                /* V1.4 Loading dashbaord (converted into script to remove glitch) */
                                $scope.dashboard = "dashboard.html";
                                 * @function triggerRefresh
                                 * @description Managess the translation of given language for the thread
                                 * @param {string} langCode - Language Code
                                 * @param {string} tid - Thread ID
                                $scope.triggerRefresh = function (langCode, tid) {
                                    if (confirm("Are you sure you want to manually resubmit the translation?")) {
                                        $scope.transPercent = "";
                                        var manualTriggerTrans = lithiumPlugin.manualTriggerTrans(langCode, tid);
                                        manualTriggerTrans.then(function (status) {
                                            if (status == "refresh") {
                                                var resetTranslation = lithiumPlugin.resetTranslation(tid);
                                                resetTranslation.then(function (error) {
                                                    if (error) {
                                                        $rootScope.errorMsg = error.$;
                                                    } else {
                                                        var bulkTranslation = lithiumPlugin.bulkTranslation(langCode, tid);
                                                        bulkTranslation.then(function (data) {
                                                            $rootScope.errorMsg = "Translation has been refreshed. Please refresh page after some time.";
                                            } else {
                                                $rootScope.errorMsg = status;
                                /* V 2.0: 2 = this function called on click reply sync button */
                                 * @function manualOOS
                                 * @description Sends the Out of sync check request.
                                $scope.manualTriggerOSS = function (replyID) {
                                    if ($scope.transPercent != "") {
                                        var manualOSS = lithiumPlugin.manualOSS("72364", replyID);
                                        manualOSS.then(function (value) {
                                            if (!value.includes("false")) {
                                                $scope.transPercent = "";
                                                $rootScope.errorMsg = "Message requested for re-translation. Please refresh the page in a few minutes.";
                                            } else {
                                                $rootScope.errorMsg = "Auto translation of message failed. Please refresh the page and retry.";
                                    } else {
                                        $rootScope.errorMsg = "Translation is in progress. Please retry in a few minutes.";
                            .factory('httpInterceptor', ['$q', '$rootScope',
                                function ($q, $rootScope) { /* httpInterceptor intercepts the http calls */
                                    return {
                                        request: function (config) {
                                            if (config.url.indexOf("lingotek") >= 0) {
                                                /* Start Loader */
                                                $rootScope.isLoading = true;
                                                $rootScope.errorMsg = "";
                                            return config || $q.when(config);
                                        requestError: function (request) {
                                            if ((request.config != undefined) && (request.config.url.indexOf("lingotek") >= 0)) {
                                                /* Stop Loader */
                                                $rootScope.isLoading = false;
                                                /* Display error message */
                                                $rootScope.errorMsg = "Error while processing the request. Please refresh the page and retry.";
                                            return $q.reject(request);
                                        response: function (response) {
                                            if (response.config.url.indexOf("lingotek") >= 0) {
                                                /* Stop Loader */
                                                $rootScope.isLoading = false;
                                            return response || $q.when(response);
                                        responseError: function (response) {
                                            if ((response.config != undefined) && (response.config.url.indexOf("lingotek") >= 0)) {
                                                /* Display error message */
                                                $rootScope.errorMsg = "Error while processing the request. Please refresh the page and retry.";
                                                /* Stop Loader */
                                                $rootScope.isLoading = false;
                                            return $q.reject(response);
                            .service('lithiumPlugin', function ($http, $rootScope) {  /* Service that connects the dashboard with Lithium endpoints */
                                /* V 2.0:7 = Converting all POST calls GET calls */
                                 * @function isOutOfSync
                                 * @param {string} sourceID - Thread id
                                 * @description Sends the ot of sync check request
                                var isOutOfSync = function (sourceID) {
                                    return $http.get('/plugins/custom/sasinstitute/sasinstitute2/lingotek_ep_proj_callback?mode=OSS&tid=' + sourceID + '&xslt=json.xsl').then(function (result) {
                                                var apiResponse = result.data;
                                                return apiResponse.result;
                                            function (result) {
                                                // debugger;
                                                return {"status": "false"};
                                 * @function getTrContent
                                 * @param {string} code - Language code
                                 * @param {string} tid - Thread id
                                 * @description Get the translated content from Lithium.
                                var getTranslation = function (code, tid) {
                                    /* var param = {
                                            mode:'trContent',
                                            code:code,
                                            tid:tid,
                                            xslt:'json.xsl'
                                    }; */
                                    return $http.get('/plugins/custom/sasinstitute/sasinstitute2/lingotek_ep_rest_connector?mode=trContent&code=' + code + '&tid=' + tid + '&xslt=json.xsl').then(function (result) {
                                        var apiResponse = result.data;
                                        return apiResponse.result;
                                    }, function (response) {
                                        return {
                                            "id": "",
                                            "body": "",
                                            "subject": "",
                                            "status": "",
                                            "wb": ""
                                 * @function bulkTransStatus
                                 * @param {string} code - Language code
                                 * @param {string} tid - Thread id
                                 * @description Manages translation of given thread
                                var bulkTranslation = function (code, tid) {
                                    /* V1.1: 2*/
                                    /* var param = {
                                            mode:'manageTrContent',
                                            code:code,
                                            tid:tid,
                                            xslt:'json.xsl'
                                    }; */
                                    return $http.get('/plugins/custom/sasinstitute/sasinstitute2/lingotek_ep_rest_connector?mode=manageTrContent&code=' + code + '&tid=' + tid + '&xslt=json.xsl').then(function (result) {
                                        var apiResponse = result.data;
                                        /* V1.4:3 GA code, capturing thread info on post */
                                        if (apiResponse.result.posts != undefined) {
                                            var trPosts = JSON.parse(apiResponse.result.posts);
                                            angular.forEach(trPosts, function (pObj_l) {
                                                try {
                                                    lingoUpdateSource(pObj_l.source, pObj_l.tid);
                                                catch (error) {
                                                    console.log(error);
                                        return apiResponse.result;
                                    }, function (response) {
                                        return {
                                            "id": "",
                                            "body": "",
                                            "status": "",
                                            "wb": ""
                                 * @function setDefaultLang
                                 * @param {string} code - Language code
                                 * @description Changes the user default language to requested language.
                                var setDefaultLang = function (code) {
                                    /* V1.1: 2*/
                                    return $http.get("/plugins/custom/sasinstitute/sasinstitute2/lingotek_ep_settings?mode=langSet&xslt=json.xsl&code=" + code).then(function (result) {
                                        debugger;
                                                return result.data.result.value;
                                            function (result) {
                                                return "Error. Please retry in a few minutes";
                                /* V 2.0: 1 */
                                 * @function resetTranslation
                                 * @param {string} tid - Thread ID
                                 * @description Calls the endpoint to reset the translation of given thread.
                                var resetTranslation = function (tid) {
                                    return $http.get('/plugins/custom/sasinstitute/sasinstitute2/lingotek_support?mode=refresh&tid=' + tid + '&xslt=json.xsl').then(function (result) {
                                                var apiResponse = result.data;
                                                return apiResponse.logs.error;
                                            function (result) {
                                                return "";
                                 * @function manualTriggerTrans
                                 * @param {string} code - Language code
                                 * @param {string} tid - Thread id
                                 * @description Manages translation of given thread
                                var manualTriggerTrans = function (code, tid) {
                                    /* V 2.0: 3*/
                                    /* var param = {
                                            mode:'mtrigger',
                                            code:code,
                                            tid:tid,
                                            xslt:'json.xsl'
                                    }; */
                                    return $http.get('/plugins/custom/sasinstitute/sasinstitute2/lingotek_ep_proj_callback?mode=mtrigger&code=' + code + '&tid=' + tid + '&xslt=json.xsl').then(function (result) {
                                        var apiResponse = result.data;
                                        return apiResponse.result.status;
                                    }, function (response) {
                                        return "Please retry in a few minutes.";
                                /** @function isOutOfSync
                                 * @param {string} sourceID - Thread id
                                 * @description Sends the ot of sync check request
                                var manualOSS = function (sourceID, replyID) {
                                    return $http.get('/plugins/custom/sasinstitute/sasinstitute2/lingotek_ep_proj_callback?mode=manualOSS&tid=' + sourceID + '&reply=' + replyID + '&xslt=json.xsl').then(function (result) {
                                                var apiResponse = result.data;
                                                return apiResponse.result.status;
                                            function (result) {
                                                // debugger;
                                                return "false";
                                /* V 2.0: 3 */
                                 * @function trCompletCallback
                                 * @param {string} code - Language code
                                 * @param {string} docID - Document id
                                 * @description Triggers the translation completed callback from Lithium
                                var trCompletCallback = function (code, docID) {
                                    return $http.get('/plugins/custom/sasinstitute/sasinstitute2/lingotek_ep_proj_callback?mode=callback&type=target&progress=100&document_id=' + docID + '&locale_code=' + code + '&xslt=json.xsl').then(function (result) {
                                        var apiResponse = result.data;
                                        return apiResponse.result.status;
                                    }, function (response) {
                                        return "Please retry in a few minutes.";
                                /* V 2.0: 3 */
                                 * @function trCompletUpload
                                 * @param {string} code - Language code
                                 * @param {string} docID - Document id
                                 * @description Triggers the document upload callback from Lithium
                                var trCompletUpload = function (code, docID) {
                                    return $http.get('/plugins/custom/sasinstitute/sasinstitute2/lingotek_ep_proj_callback?mode=callback&type=document_uploaded_auto&progress=0&document_id=' + docID + '&xslt=json.xsl').then(function (result) {
                                        var apiResponse = result.data;
                                        return apiResponse.result.status;
                                    }, function (response) {
                                        return "Please retry in a few minutes.";
                                return {
                                    isOutOfSync: isOutOfSync,
                                    getTranslation: getTranslation,
                                    bulkTranslation: bulkTranslation,
                                    setDefaultLang: setDefaultLang,
                                    resetTranslation: resetTranslation,
                                    manualTriggerTrans: manualTriggerTrans,
                                    manualOSS: manualOSS,
                                    trCompletCallback: trCompletCallback,
                                    trCompletUpload: trCompletUpload
                            .service("cookieService", function () { /* Service for cookie storage */
                                 * @function getBrTChoice
                                 * @description Returns the cookie set for browser language translation.
                                var getBrTChoice = function () {
                                    var cname = "it_lang_notify_hide";
                                    var name = cname + "=";
                                    var ca = document.cookie.split(';');
                                    for (var i = 0; i < ca.length; i++) {
                                        var c = ca[i];
                                        while (c.charAt(0) == ' ') c = c.substring(1);
                                        if (c.indexOf(name) == 0) return c.substring(name.length, c.length);
                                    return "";
                                 * @function getBrTChoice
                                 * @description Sets the cookie for browser language translation.
                                var putBrTChoice = function () {
                                    var cname = "it_lang_notify_hide";
                                    var exdays = 30;
                                    var d = new Date();
                                    d.setTime(d.getTime() + (exdays * 24 * 60 * 60 * 1000));
                                    var expires = "expires=" + d.toUTCString();
                                    document.cookie = cname + "=" + "true" + "; " + expires;
                                return {
                                    getBrTChoice: getBrTChoice,
                                    putBrTChoice: putBrTChoice
                })(LITHIUM.angular);
// -->