I am still new to cache objectscript and am trying to figure out how I would go about removing the escape characters from my JSON below. When I call the $toJSON method it's adding the "\" character in the file path.

 

{"FileStatus":"P","Path":"\/somepath\/test\/test123\/filename.txt","InterchangeOID":"100458"}

My Code

Last answer 6 hours 44 min ago Last comment 48 min 43 sec ago
0   0 4
74

views

0

rating

I have an xml that has non standard characters and I would like to transform it with xslt  so that those characters render in the format  &#nnn here is what I have so far any help appreciated 

xslt

 

 

<!--?xml version="1.0"?-->
<xsl:transform version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output encoding="Windows-1252" indent="yes" omit-xml-declaration="yes" method="xml">
>  <xsl:template match="/Recordset">
    <recordset><xsl:apply-templates></xsl:apply-templates></recordset>
  </xsl:template>
  <xsl:template match="*|@*">
    <xsl:copy>
      <xsl:apply-templates select="@*">
      <xsl:apply-templates>
    </xsl:apply-templates></xsl:apply-templates></xsl:copy>
  </xsl:template>
</xsl:output></xsl:transform>
 

XML

Last comment 6 days ago
0   0 4
0

answers

53

views

0

rating

At the moment I am trying to write a documentation file for a project and intend to use LaTeX for it.
Has anyone already had experience with this? I haven't found syntax highlighting with the LaTeX packages I know yet.
I found a request on Pygment but it was from 2016 and there was no reply on it since then.

Does anyone know a simple way for syntax highlighting COS in LaTeX?
Thanks for your input!
 

Martin

Last answer 2 April 2019 Last comment 2 April 2019
0   0 4
72

views

0

rating

Hello all!

My company has been switching from $zf(-1) to $zf(-100) like many companies have been. I have been doing fine with 1 argument windows commands such as:

set errorfile = "D:\folder\error.txt"
set outputfile = "D:\folder\output.txt"


set options(1) = ""
set options(2) = "D:\ThomasTools\"

w $zf(-100,"/SHELL /STDERR="_errorfile_" /STDOUT="_outputfile, "dir", .options

Last answer 1 April 2019
0   0 2
0

comments

62

views

0

rating

Hi All,
 How to create Https request with Negotiate,NTLM Authentication in cache using %Net.HttpRequest package.
 I tried with basic authentication it is throwing >401 - Unauthorized: Access is denied due to invalid credentials.
 
 can anyone please guide me 
 
 Many Thanks !!
 Vicky

Last answer 15 March 2019 Last comment 15 March 2019
0   0 3
60

views

0

rating

Hello,
Having difficulty with sending POST request.

How I can send parameters in the body of request, if i'm using ContentType:"application/x-www-form-urlencoded".

Version of ensemble: 2010

My code is bellow:

Set httpRequest=##class(%Net.HttpRequest).%New()
set httpRequest.SSLConfiguration="1"
Set httpRequest.ContentCharset="utf-8"
Set httpRequest.Server="test.oath.com"
Set httpRequest.Port=443
Set httpRequest.Https=1
Set httpRequest.Location = "/auth/key"
set httpRequest.ContentType="application/x-www-form-urlencoded"
Set httpRequest.ContentCharset="utf-8"    
do httpRequest.EntityBody.Write("grant_type=client_credentials&scope=num&client_id=random")
Set httpRequest.Timeout=119
do httpRequest.Post("",2)

the resul

Last answer 12 February 2019
0   0 1
0

comments

190

views

0

rating

When I run the following cmd in Ubuntu 18.04

the container is created and stays running

But when I run this cmd, the container is created but exits immediately

Not sure why it is doing this.  if anyone can shed some light, it would be most appreciated.

Last answer 31 January 2019 Last comment 6 February 2019
0   0 4
105

views

0

rating

I need to automate the handling of usernames passwords, serverNames etc for use in the sending and receiving  of emails, logging into SFTP servers etc etc for use within COS code
To manage external passwords we could use LastPass or any other proprietary password loggers, but I need to be able to call them as part of the automation (COS code) and occasionally visually look them up to "remind" the staff of their passwords.

any suggestions as to the best class data constructs to handle this scenario. Should the whole table be encrypted, only the passwords etc.

each employee has their own login details, past password storage (non-re-use)  could be useful.

we're talking of 200-300+ passwords here.

kevin

Last answer 18 January 2019 Last comment 22 January 2019
0   0 3
184

views

0

rating

This is the class which I want to test.

Class GSK.MyTestUnit Extends %RegisteredObject
{

ClassMethod Add(num1 As %Integer, num2 As %Integer)
{
s res=num1+num2
q res
}
}

This is my testing class.

Class GSK.TestingClass Extends %UnitTest.TestCase
{

Method test()
{
Do $$$AssertEquals(##class(GSK.MyTestUnit).Add(3,8),41, "Test Add(2,2)=4 passed ")
do $$$AssertNotEquals(##class(GSK.MyTestUnit).Add(3,8),11,"pass/fail")
}

}

The test cases are passed even though they should fail.

s ^UnitTestRoot="C:\TestSuite1"
d ##class(%UnitTest.Manager).RunTest("Test2")

Here TestSuite1 is my parent directory and Test2 is the folder which contains the test case file
please can anybody help me in this issue

Last answer 4 December 2018
+ 1   1 2
0

comments

66

views

+ 1

rating