﻿ ObjectScript | InterSystems Developer Community
By update
Question
Kryštof Matějka · Nov 2, 2016
html beautifier

Hello,

I'm sending http request through %Net.HttpRequest and I have html page in response. Is there any built-in tool for beautify html for printing in terminal?
Thanks.

00
0 353
Question
Uri Shmueli · Nov 3, 2016
Simple Arithmetics

Can somebody explain this behaviour of Cache (and many other calculating machine as well) :

WRITE 1/3*12

4

WRITE 1/3*5

1.666666666666666667

W 1/3*18

5.999999999999999999

W 1/3*21

6.999999999999999999

W 1/3*24

7.999999999999999999

How can we make more occurate caculations in Cache ?

10
0 577

There is an interesting discussion in the Russian forum going.

What is the best solution for the function which returns the max for the set of parameters?

From the listed solutions I like this one:

```ClassMethod max(args...) {
for i=1:1:args {  s max(+\$g(args(i))) = i }
s i="", max=\$o(max(i),-1, i) Q \$lb(max, i)
}
```

10
0 698

I was recently asked whether we have a function to convert LDAP date time stamps into \$HOROLOG format or other formats and the answer is not at the moment, but there is a simple method to do the conversion.

Let us look at the facts and figures involved...

1) Active Directory's (AD) date 0 (zero) is 1601-01-01 00:00:00.000 or January 1st, 1601 at midnight (00:00:00)

2) AD timestamps are calculated as the number of 100 nanosecond intervals from date 0

3) 864000000000 is the number of 100 nanosecond intervals per day

50
0 759

Here you have an easy way to write and execute COS code from your unix scripts. This way one does not need to write routines or even open Studio or Atelier. It can be an option for simple and small actions for instance things like installation tasks or compiling.

See sample bash script (compile.sh) to compile classes:

50
0 723
Article
Jose Ruperez · Oct 12, 2016 1m read
Lines of Code

With a routine like this one, you can quickly calculate how many lines of code you are working with. And it is not only for routines, it works for classes because remember that classes generate routines !

Here you have the routine source code:

50
0 628

Now, let’s say you can’t access the terminal or simply you just rather execute it from a web interface. In this article, I will show you how to execute terminal commands from a simple web page.

For example, in the image below you see how we execute \$zv on a webpage:

22
0 21,643
Question
Rustam Ibragimov · Sep 9, 2016
Trimming...

Hello, guys.

I found one interesting moment in Cache Object Script. It doesn't have(or at least I didn't find) trimming function. By trimming I mean if a string has some whitespaces/tabs/carriage returns from very beginning or/and from very right, this function removes them.

I have found several workaround ways.

1. Using Cache Basic

10
0 1,382

Wir suchen für ein Unternehmen unserer Firmengruppe

eine/n ERP System Developer / Programmierer/ Software Entwickler

Unser Partnerunternehmen ist ein international agierendes Handelsunternehmen mit Sitz in der Nähe von Wien.

Der zukunftsorientierte IT Bereich entwickelt intelligente innovative Lösungen für die Vielfalt der Herausforderungen, die sich täglich stellen. Die Fülle der abwechslungsreichen Aufgaben und Projekte, sowie die Art und Weise wie zusammengearbeitet wird, bietet hervorragende Wachstums- und Entwicklungschancen.

30
0 508
Question
sansa stark · Aug 29, 2016
Cache 5.02 installation

Hi all,

We have one doubt regarding cache 5.02 installation.

What is the difference b/w custom and standard installation in cache 5.02?

Thanks,

Sansa.

10
0 306

Hello, guys.

I need to find all web files, get their content in UDL format and to be able to export them. And, vice versa, to be able to import them in udl format.

I know that they are located in CSP folder. However, is there any way to do this using COS functions?

10
1 467

Hello community!

Is there any method/property/way in Caché to obtain something like unique identifier for installed Caché system? The idea is to get the identifier that will differ on any other installation/machine/etc, but will forever remain the same for the current installation, even if \$zv changes (in case of update) or any data is removed from the database.

00
0 300

Hi -

I have 3 classes: "Class A" has a property X, "Class B" has a property which is a Class A, and I have a "Class C" which has a property of a Class B.

Class A definition

`Class USER.ClassA Extends %Persistent`

`{`

`Property Propx as %String;`

`}`

Class B definition

Class USER.ClassB Extends %Persistent

`{`

00
0 276
Question
Eduard Lebedyuk · May 23, 2016
REST and IO redirection

Problem: I have a REST broker, and if I hit a code block, which does IO redirection, the REST reply becomes broken in one of the following ways:

• Binary output
• No output
• First 4096 characters of the reply are missing

Consider the following REST broker:

40
1 838
Question
Scott Roth · May 9, 2016
Production Monitor

At the Global Summit several folks had mention that they developed their own production monitor. I am looking to create a monitor similar to eGate that we only display those Services/Processes/Operations that are in trouble, and those Errors that are showing up in the Event Log. Does anyone have any examples of this?

Thanks

Scott Roth

The Ohio State University Wexner Medical Center

00
1 458