go to post Eduard Lebedyuk · Mar 19, 2020 I would really recommend moving to REST. With InterSystems products it's very easy. There are many articles available here on community about REST implementation.
go to post Eduard Lebedyuk · Mar 18, 2020 No need to init the array object: Set valueRecived = ["green","yellow","blue"] Do ##class(%ZEN.Auxiliary.jsonProvider).%ConvertJSONToObject(valueRecived.%ToJSON(),,.array) Zw array
go to post Eduard Lebedyuk · Mar 15, 2020 To add, globals can also be distributed across several InterSystems IRIS instances via global mapping or ECP/Distributed Caching.
go to post Eduard Lebedyuk · Mar 15, 2020 Hello! Can you elaborate on your high-level use case: What data are you storing? What do you want to calculate? Any particular reason you decided to use globals instead of tables/classes? Article on how globals/tables/classes interact. In general your task can be solved in two mainstream and one additional way: Store f. Every time a data point is inserted/updated we calculate and store f(datapoint). Advantage: fast querying and savings on CPU cycles as the calculation work is only performed once. Disadvantage: changing f requires recalculation and time, storage. Calculate f. Every time data point is accessed we calculate f. Advantage: zero costs to change f, we immediately get new results. No storage required. Disadvantage: potentially CPU intensive load. Additionally if you need to just check a condition (i.e. that f>0) you may not need an f value as by applying functional analysis, you can solve the issue analytically if f is a continuous function.
go to post Eduard Lebedyuk · Mar 14, 2020 set in = "1.2.3" set separator = "." set separatorOut = "," set out = "tmp(" _ $lts($lfs(in, separator), separatorOut) _ ")" If you're sure that separator length is always equal you can use $replace, and if you're sure that separator is one character long you can use $translate.
go to post Eduard Lebedyuk · Mar 14, 2020 Open role as an object (note lowercase): set role = "%db_cachetemp" set roleObj = ##class(Security.Roles).%OpenId(role) Create required resource as an object: set resouceObj = ##class(Security.Resource).%New() /// set resource Insert resource into the role and save the role do roleObj.Resources.Insert(resourceObj) set sc = roleObj.%Save() And role has a new resource.
go to post Eduard Lebedyuk · Mar 14, 2020 Use List query: do ##class(Security.Resources).ListFunc().%Display()
go to post Eduard Lebedyuk · Mar 13, 2020 Current implementation resolves GraphQL query into SQL, so classes/tables are required. This is our advantage as we don't need to write resolvers manually. That said, if you want to provide custom schema - you can, as our GraphQL implementation includes GraphQL parser so you can use parsed AST to write your own resolver.
go to post Eduard Lebedyuk · Mar 12, 2020 I'm not really sure what do you mean by if there was a class parameter I had missed that just indicated the extent was temporary what do you want to achieve with this?
go to post Eduard Lebedyuk · Mar 12, 2020 All images are not loaded when privacy protection is enabled in Firefox (which is enabled by default). Copy them on community maybe?
go to post Eduard Lebedyuk · Mar 10, 2020 This. Or even better post your code. Is speed/memory footprint important?
go to post Eduard Lebedyuk · Mar 9, 2020 Invoke is the way to go. ClassMethod CreateWebApp(pVars, pLogLevel, tInstaller) As %Status { Set Namespace=tInstaller.Evaluate("${Namespace}") Do tInstaller.PushNS("%SYS") Do ##class(Security.System).GetInstallationSecuritySetting(.security) If (security="None") { Set cspProperties("AutheEnabled") = $$$AutheUnauthenticated } Else { Set cspProperties("AutheEnabled") = $$$AutheCache // Password } Set cspProperties("NameSpace") = Namespace Set cspProperties("IsNameSpaceDefault") = $$$YES Set cspProperties("DispatchClass") = "MDX2JSON.REST" Set cspProperties("UseCookies") = $$$YES Set tSC = ##class(Security.Applications).Create("/"_Namespace, .cspProperties) Do tInstaller.PopNS() If $$$ISERR(tSC) Throw ##class(%Installer.Exception).CreateFromStatus(tSC) Quit $$$OK } And invoke with <RunInstall Class="MDX2JSON.Installer" Method="CreateWebApp"/>
go to post Eduard Lebedyuk · Mar 6, 2020 Thank you, Marc! With Kitty there's even a Put Window on Foreground option: I've tested with h 10 w $c(7) and it works! Is there anything similar for cterm/iristerm?
go to post Eduard Lebedyuk · Mar 6, 2020 IRISList is a wrapper over InterSystems IRIS $lb structure, and it supports these value types: Int16, Int32, Int64, bool, Single, Double, string, byte[], IRISList. To be more specific the following datatypes are available. ISO/IEC 8859{1 string. The remainder of the $LIST element is a string of ISO/IEC 8859-1 characters. UNICODE string. The remainder of the $LIST element is a string of UNICODE characters in UTF-16 little endian format. Positive integer. The remainder of the $LIST element is an unsigned integer in little endian order with high order zero octet truncated. Negative integer. The remainder of the $LIST element is a negative integer in twos complement little endian order with high order #FF octet truncated. Positive radix 10 number. The next octet is a signed char that serves as an exponent. That is followed by an unsigned integer in little endian order with high order zero octet truncated. The value of the number is integer × 10exponent. Negative radix 10 number. The next octet is a signed char that serves as an exponent. That is followed by a negative integer in twos complement little endian order with high order #FF octet truncated. The value of the number is integer × 10exponent. IEEE floating point number. Length must allow for either 4 or 8 (preferred) octet of data. In C# Decimal can be constructed from {Int32, Int32, Int32, Boolean, Byte} and you can use GetBits method to retrieve these parts from Decimal (docs).
go to post Eduard Lebedyuk · Mar 6, 2020 Depends on the project I guess. Trivial fixes can be sent via pulls directly. Bigger fixes usually require time to fix so some discussion can help. That said, opening empty pull and talking there also works.
go to post Eduard Lebedyuk · Mar 5, 2020 In most cases just process special variable should be enough: Set SourceConfigName = process.%PrimaryRequestHeader.SourceConfigName