Article Nikolay Solovyev · Aug 1, 2019 3m read

In many projects I was faced with storing hierarchical data (tree) in classes.
By tree, I mean such data, where each node has a parent node — an object of the same class.
Many examples of such data can be given. For example, a catalog in the online store. Suppose that this online store sells books, in this case, the category tree might look like this:

The number in front of the name is the category ID.
For storage, you can create classes:

The MyApp.Category class  is used to store the category tree and contains the property “Parent” - reference to the same class.

1
1 1258
Article Alexander Koblov · Jul 29, 2016 10m read

In this article we are going to compare $Increment and $Sequence functions.

First of all, a note for readers who have never heard of $Increment. $Increment is a Caché ObjectScript function which performs an atomic operation to increment its argument by 1 and return the resulting value. You can only pass a global or local variable node as a parameter to $Increment, not an arbitrary expression. $Increment is heavily used when assigning sequential IDs. In such cases parameter of $Increment is usually a global node. $Increment guarantees that each process using it gets a unique ID.

11
5 1965
Discussion Eduard Lebedyuk · Jul 31, 2019

Let's have a round of CodeGolf!

As usual the goal is to write the shortest solution for a specified problem.

Today we have one of the classics: FizzBuzz.

Write a program that prints the numbers from 1 to 100.

But for multiples of three print “Fizz” instead of the number and for the multiples of five print “Buzz”.

For numbers which are multiples of both three and five print “FizzBuzz”

22
1 798
Question Erin Dolson · Jul 16, 2019

Hi all,

I'm looking to set up monitoring for several interfaces. I understand that I can set an Inactivity Timeout. However, obviously there are messages coming through more frequently during certain hours than other hours. 

Is there a way to set an Inactivity Timeout for each hour of the day instead of one value that is used all day long? 

Best,

Erin

12
3 909
Question Marcus West · Aug 1, 2019

I've setup ODBC connection so I can access Cache data within SQL Server.

I want to be able to write SQL queries for internal monitoring purposes, similar to what's possible with SQL Server.  Specifically I want to be able to check mirroring status (i.e. check which is the current primary mirror member), check the status of any Ensemble productions (started/stopped), check the status of business hosts etc.  I want to do all of this from SQL Server to go with our other system monitoring solutions.

1
0 342
Announcement Anastasia Dyubaylo · Aug 1, 2019
0
0 241
Question Julian Matthews · Jul 31, 2019

Has anyone had any success receiving a DICOM TCP in, and then using a process to write to a file while responding to the sender correctly? I'm pulling my hair out, and would love to know where I'm going wrong. 

2
0 351
Question Margaret Parker · Sep 21, 2016

I was just watching a video - Clinical Document Architecture and Document Creation - Videos An Introduction to CDA - from Australia (browser, Firefox). The video started and played fine for 8m 49s, then stopped with the following message: Could not download the video Error code: PLAYER_ERR_TIMEOUT.

3
0 773
Announcement Evgeny Shvarov · Jul 31, 2019

Hi Developers!

This is an anniversary announcement to celebrate 6,000 members on InterSystems Developers!

There are some other good figures came: 

  • we have more than 5,000 posts with almost 1,000 articles. (956 to the moment).
  • Also, we are close to having 20,000 answers and comments and 2,000,000 reads for DC postings.

And we have the Spanish Community for 2 months running! Join Spanish DC!

0
1 285
Question Zdeněk Bartušek · Jul 31, 2019

Hello community,

I need to know if there is any method which can me say specified imported files or namespaces in Cache.

To better specification of my problem, I've got two installer manifests. Firts one did some resource changing and import some files and classes, second one must be started after the first one, because it's only his update, which creates some nemaspaces. So i need to check if the first manifest ran succesful and I can start the second one.

Is it good way trying to do this by some method or are there some other, better ways maybe by ccontrol, I don't know?

1
0 255
Question James Hipp · Jul 29, 2019

Hello,

Is it possible to write global output values to STDOUT, in a similar way to how csession can take routine intput, like below:

(In Cache Terminal)

%SYS>d ##class(%SYSTEM.License).ShowSummary()

License Server summary view of active key.

     Distributed license use:

Current License Units Used =        1

Maximum License Units Used =        1

License Units   Authorized =      200

     Local license use:

Current Connections =      1  Maximum Connections =      1

Current Users       =      1  Maximum Users       =      2

(From Linux OS Terminal)

5
0 671
Question Zdeněk Bartušek · Jul 30, 2019

Good morning,

I'm trying to understand $ZF function, but only documentation isn't enought in this way. So my question is is there any possibility to get enviroment variable by this function into ensemble?

I've tried this as example from ducumentation, but there is an error and  I don't know why...

Thanks for your solutions.

Zdenek

17
0 1435
Question Jimmy Christian · Jul 30, 2019

Hello Community,

How do i disable an operation explicitly based on a value in a variable?

I set the ReplyCodeAction to E=D.

In the Operation Code i am throwing an explicit ERROR

THROW ##class(%Exception.General).%New("Shutting Down Operation",999,,"My own special exception")

But my operation still remains up.

Any suggestions please will be appreciated.

Thanks,

Jimmy Christian.

6
0 388
Announcement Anastasia Dyubaylo · Jul 23, 2019

Hi Everyone!

InterSystems HealthShare is nominated for the Computable Awards 2019! The Unified Health Record that we implemented together with our partner Itzos in the St. Maartens Clinic has a chance to become the "ICT Project of the Year in Healthcare". 

A great honour, but of course we also want to win. We need 4,000 votes! Therefore we'd like to ask you to vote!

 

7
0 593
Article Jeffrey Drumm · Jul 25, 2019 1m read

I'm not saying that this is in anyway "best practices," but I'm in a peculiar situation where I need to restrict users from starting a "retired" Ensemble Production in a namespace that's been renamed. It's still an "Ensemble-activated" namespace; we need to keep it available for Ensemble Message Viewer access ... fortunately, only for a little while.

It's a bit of a hack ...

Open the Production class in Studio and add the following classmethod:

ClassMethod OnStart() As %Status
{
    Return $system.Status.Error(5001,"THIS PRODUCTION IS DISABLED.")
}
6
1 543
Article David Crawford · Jul 26, 2019 3m read

Hello community! I have to work with queries using all kinds of methods like embedded sql and class queries. But my favorite is dynamic sql, simply because of how easy it is to manipulate them at runtime. The downside to writing a lot of these is the maintenance of the code and interacting with the output in a meaningful way. In an effort to have as much dynamism as possible so that we're not rewriting code constantly, and so that we have as little code possible (while still making sense and getting the job done), I made a function that takes in any dynamic query and outputs a dynamic object.

7
2 1263
Question Zdeněk Bartušek · Jul 25, 2019

Hello,

I've got similar question as I have mentioned here once. Itś about enviroment variables and getting their values into manifest.

Now a know, that I must use this method $system.Util.GetEnviron("")  but still if I try to use it it doesn't work. I need to set variable in bash.sh file and then get that value into manifest. If I try this in terminal it works only for system variables as you can see, but it shoul normally works for user variables to or not?

I've tried this this syntax several times and it was working until I've reinstall my Ensemble instantion:

6
0 729
Question Dan Pahnke · Jul 23, 2019

Hello,

I've got a csp page that has successfully set up a websocket connection to a Cache class. When the websocket object's close function is triggered at the browser I was expecting one of the class' methods to fire at the server. The onclose method is triggered at the browser but nothing at the server. Is a method supposed to fire at the server?

Thanks,

Dan

Cache for Windows (x86-64) 2015.1.4 (Build 803_6) Tue May 15 2018 12:08:36 EDT

4
0 1289