ObjectScript

Syndicate content 33 

Hi Community!

Sometimes I meet a method which accepts 10+ parameters.

And often I need only the 8th parameter  to  pass. And I call the method something like:

do ##class(Some.Feature).Method(,,,,,,,"flag")

And I don't like this method when I call it like this cause, you know, often I just miss the number of commas and raise some other flag I wanted.

How do you avoid this situations? 

If you meet such a code, how do you call it and sure that you didn't miss the number of ","?

What is a good number of parameters in a method and f you need to pass more parameters in a method what do you do?

Last answer 5 May 2019 Last comment 5 hours 40 min ago
+ 2   0 11
421

views

+ 2

rating

The .NET Core Identity model has an IPasswordHasher<> interface for  for 

  • Hashing a password so that it can be stored in a database
  • Verifying a provided plain-text password matches a previously stored hash. 

I am getting invalid password errors during the login process when the .NET Core Identity model computes a hash from a plain text input and compares it to a password hash value I've returned from Caché. The default hashing algorithm is PBKDF2 with HMAC-SHA256, 128-bit salt, 256-bit subkey, and 10,000 iterations (detailed article on .NET Core Identity PasswordHasher). The algorithm Caché uses is probably different which may be why I am getting errors.

Last answer 4 days ago Last comment 2 days ago
0   1 2
56

views

0

rating

Hello everyone,
After some work with IRIS we want to share our ToolBox-4-Iris with you.

What is this about?

The ToolBox-4-Iris is an API for IRIS with a collection of handy and useful tools - features that are not available in IRIS, but greatly simplify application development. To save time and effort on the "typical tools" that every developer needs. This includes additional classes, individual methods or even more efficient macros, which are described in the respective packages.

Content

Last comment 4 days ago
+ 10   0 2
69

views

+ 10

rating

Object Synchronization is a feature that has been around for a while, since Caché days, but I wanted to explore a bit more how it works. I've always thought that database automatic synchronization is complex by nature but, for some particular scenarios shouldn't be so hard. So I considered a very simple use case (OK, perhaps the typical one, I'm not discovering anything... but if it's common and it works, it's good wink ).

Last comment 6 days ago
+ 6   2 2
110

views

+ 6

rating

I have a list property that I query from the database to get the values contained in that list using $LISTFROMSTRING() when the list is returned the list values contain a rectangle like character similar to when you copy past something to the Terminal and it has a preceding space .The problem is I need to compare those values to other values and they do not match because of this value I have tried to use $EXTRACT(value,*W) and *P but this is not striping the preceding character how do I get rid of this character any ideas please. 

Last answer 10 days ago Last comment 10 days ago
0   0 2
99

views

0

rating

Hello All,

I need some help:

 I would like to create Web Application using our ZEN with Cache DB so please guide me.

1.What is difference between zen page and zen application.

2.what is the difference between Client Method and server Method then where to use it.

Thanks.

Last answer 13 days ago Last comment 11 days ago
0   0 3
107

views

0

rating

I have an OAuth 2.0 development environment where Caché is serving all three roles as the Authorization Server, Client and Resource Server based on a great 3-part series on OAuth 2.0 by @Daniel Kutac. I have a simple password grant type where an x-www-form-urlencoded body (as described in this post) is sent as a POST to the token endpoint at https://localhost:57773/oauth2/token and a response body with a HTTP Response 200 header is returned. The response body looks something like this.

Last answer 12 days ago Last comment 12 days ago
+ 1   0 3
50

views

+ 1

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 13 days ago Last comment 2 April 2019
0   0 4
136

views

0

rating

Hey Guys,

I got stuck with this for 2 days, please help me

Actually my logic is when I enter the input on the text field in browser, the entered input to be print on the next page but I am getting "Undefined". How to i do it.

Below is my code:

 

 

Last answer 10 August 2019 Last comment 10 August 2019
0   0 2
77

views

0

rating

Hello,

I am struggling to print out the actual property values of the Security.System class.

https://cedocs.intersystems.com/latest/csp/documatic/%25CSP.Documatic.cls

 

I was hoping to be able to print the Authentication Enabled properties of a system from the command line using the Get or GetProperties class method. Currently, however, I am only able to get a return 1 or Invalid Oref error.

 

Last answer 29 July 2019 Last comment 8 August 2019
0   0 2
97

views

0

rating

Hi all, I have released the latest version of VSCode extension for ObjectScript already a month ago, and finally a time for the info about this new release.

So, what's new in the release:

What's new in this version

  • added export setting "objectscript.export.addCategory" if enabled uses the previous behaviour, adds category folder to export folder, disabled by default
  • added Server actions menu, by clicking on server info from status bar. Open Management portal, Class Reference and toggle connection.
  • Class Suggestion in ##class, Extends, As, CompileAfter, DependsOn, PropertyClass
  • $SYSTEM suggestion by Classes from %SYSTEM
  • Import and compile folder or file by context menu in File Explorer
  • Server Explorer, now possible to open any other namespace
  • Macros suggestion

For details how it works now, look further.

Last comment 8 August 2019
+ 9   5 5
546

views

+ 9

rating

An exciting position has arisen for a Junior Application Support Analyst in an established support team at CDS Computer Design Systems Ltd  CDS is an independent SME, based near Manchester City Centre, specialising in the Oil and Gas distribution software market for over 45 years with strong ties throughout the industry https:

0   0 1
0

comments

70

views

0

rating

An exciting position has arisen for an Application Support Analyst 3rd Line, in an established support team at CDS Computer Design Systems Ltd.  CDS is an independent SME, based near Manchester City Centre (United Kingdom) specialising in the Oil and Gas distribution software market for over 45 years with strong ties throughout the industry - https://www.codas.com

0   0 1
0

comments

97

views

0

rating

Hi developers!

Just want to check with you on best practices for that.

You collaborate for InterSystems IRIS repository. You fork it, then make changes, commit, push, pull request, discuss(if any), your PR is accepted.

What's next? 

Do you delete the repository you forked in?

 

 

Last answer 8 August 2019 Last comment 23 July 2019
0   0 3
60

views

0

rating

Hello,

I am wondering the best way to disable a user account using this class in Cache (Security.Users).

https://cedocs.intersystems.com/latest/csp/documatic/%25CSP.Documatic.cls

 

Example User Account = jhipp

Currently is Enabled

 

I know that we can use the auto-generated EnabledGetStored method, for example:

%SYS> w ##class(Security.Users).EnabledGetStored("jhipp")
1

 

Last answer 7 August 2019 Last comment 7 August 2019
0   0 1
41

views

0

rating

Hi,

I have a method that has multiple parameters and is normally used from other classes in ObjectScript. Most of the parameters have default values. Withing the server code that's perfect. In some areas I can call myMethod(,,"sometext") or myMethod(tVariab) and thats fine... I use it as it's required in each place.

But now I want to expose it as a REST service so I need to buld a kind of wrapper., another method in a REST dispatcher class that will receive the parameters in a JSON object and will call the server method already implemented. Something like:

Last answer 7 August 2019 Last comment 7 August 2019
0   0 3
78

views

0

rating

A SOLID Design in Cache Object

In this session, we will discussing SOLID Principle of Programming and will implement in a example.
I have used Cache Object Programming Language for examples.
We will go step by step to understand the requirement, then what common mistakes we use to do while designing, understanding each principles and then complete design with its implementation via Cache Objects.

Last comment 8 August 2019
+ 3   2 2
205

views

+ 3

rating

Hi Everyone!

Please watch the new video on InterSystems Developers YouTube, recorded by @Sourabh Sethi  in the  "Coding Talks" format:

Informative and Fast WEB API VIA ObjectScript and Ensemble/HealthShare

 

0   0 1
0

comments

118

views

0

rating

Hello Community,

For the Business Rules in a process i want to use a constraint where source could be FromA or FromB.

But looks like the constraint does not allow multiple source values.

Is there a way to provide multiple source in Constraint? Or is there a way in Rules to identify the Source ?

Thanks

Jimmy Christian

Last answer 1 August 2019 Last comment 6 August 2019
+ 1   1 3
59

views

+ 1

rating

 Pre-requisite - Basic knowledge of ENSEMBLE and ObjectScript

My both previous sessions were related to OBJECTSCRIPT.
This time, we are going to add a flavour Ensemble/Healthshare,
to be informative and fast.

In this session we are going to discuss about - 
"Informative and Fast WEB API VIA ObjectScript and Ensemble/HealthShare"

Web API can be REST or SOAP. We will taking example of SOAP in this session.
However, whatever I demonstrate today, will also be applicable for REST.

0   0 1
0

comments

88

views

0

rating

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:

 

Last comment 2 August 2019
+ 5   1 2
181

views

+ 5

rating

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

Last answer 30 July 2019 Last comment 31 July 2019
0   0 2
100

views

0

rating

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.

Last answer 30 July 2019 Last comment 30 July 2019
0   0 3
63

views

0

rating

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:

Last comment 29 July 2019
+ 2   1 1
104

views

+ 2

rating

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.

Last comment 29 July 2019
+ 6   1 4
229

views

+ 6

rating