Question Eduard Lebedyuk · Oct 1, 2019 Current rss memory consumption / use of $zf(-100) I need to know the current rss memory consumption. On earlier Cache versions I used this method: set sc = ##class(%Net.Remote.Utility).RunCommandViaZF("smem -u cacheusr | grep cacheusr | awk '{print $6}'",,.rss) It doesn't work because we use $zf(-100) on IRIS 2019.1. New version: #Beginner #System Administration #InterSystems IRIS 1 2 0 381
Question Eduard Lebedyuk · Sep 14, 2019 Replacing character groups What's the best way to replace character groups?I want not to remove character groups as $zstrip does but to replace them with whitespaces.$translate needs explicit character list.Effectively I want to remove any characters besides letters, numbers and a small (known) subset of punctuation characters, replacing everything else with whitespaces. #Code Snippet #ObjectScript #Caché #InterSystems IRIS 0 6 0 661
Announcement Eduard Lebedyuk · Sep 12, 2019 Python Gateway 0.8 release I'm happy to announce the latest Python Gateway release. This is not an InterSystems product, it is community supported open source project. Download new release from GitHub. Now for the new features. Fast transfer. Pass globals, classes and tables from InterSystems IRIS to Python with ease and speed (10x faster than old QueryExecute). Documentation. #Artificial Intelligence (AI) #Analytics #Machine Learning (ML) #Python #Release #InterSystems IRIS Open Exchange app 2 8 0 505
Announcement Eduard Lebedyuk · Sep 10, 2019 Code Golf Index Code golf is a type of recreational computer programming competition in which participants strive to achieve the shortest possible source code that implements a certain algorithm.Here's a list of Code Golf competitions we had on Developers Community.Output 9876543210 without using numbersHow can I make my text behave in accordance with gravity?Drawing BoxesFizzBuzzAnd some interesting challenges:Can you crack the Black Box?Convert Cyrillic to Latin Did I miss something? Add more challenges in comments. #Code Snippet #Coding Guidelines #Contest #InterSystems IRIS 2 0 0 463
Article Eduard Lebedyuk · Sep 9, 2019 1m read Zabbix memory template Just wanted to share my Zabbix template for monitoring InterSystems IRIS on Linux servers.It monitors irisusr (configurable) memory consumption: #Monitoring #System Administration #InterSystems IRIS 3 5 0 1.5K
Question Eduard Lebedyuk · Sep 8, 2019 Set NULL in dynamic object Is there a way to set null in dynamic object without using %Set methods? I have this method and I need to set NULL as, well, null and not string. ClassMethod node(name) [ CodeMode = expression ] { { "name":(name), "content":($case(##class(%Dictionary.ClassDefinition).%ExistsId(name), $$$YES:"mycontent", $$$NO:"NULL")) } } #InterSystems IRIS 0 3 0 714
Question Eduard Lebedyuk · Sep 8, 2019 SQL condition in SELECT query I'm writing "Finder"-like dialog and need to get list of BPL classes.The query is dependent on current "path" - it outputs all BPLs in the current path (if any) and all sub-packages which contains BPLs.So far I have this query: #Business Process (BPL) #Ensemble 0 2 0 436
Question Eduard Lebedyuk · Aug 28, 2019 Run code on Business Process start I want to execute initialization code on the start of my business process.I thought OnInit is a way to go, but apparently not - ^dbg global remains empty: Class Test.BP Extends Ens.BusinessProcess { Method OnInit() As %Status { Set ^dbg = 1 Quit $$$OK } } Ideas? #Business Process (BPL) #Ensemble 1 4 0 600
Question Eduard Lebedyuk · Aug 26, 2019 Best way of setting request stream property from BPL? I have BPL BP and BO.To call BO I need to populate the stream property of the request message.What's the best way to do it? #Beginner #Business Operation #Business Process (BPL) #Ensemble 0 3 0 421
Question Eduard Lebedyuk · Aug 17, 2019 Difference in JavaGateway handling of %GlobalBinaryStream / byte[] between InterSystems IRIS 2018.1.2 and 2019.1 I have two local instances:IRIS for Windows (x86-64) 2018.1.2 (Build 626_3U) Wed Jun 12 2019 19:07:59 EDTIRIS for Windows (x86-64) 2019.1 (Build 510U) Thu Mar 14 2019 14:13:37 EDTI'm using Java Gateway to talk to external system.Both instances are using the same:jargenerated classjava versionThey are calling the same method with this java signature: #Java #InterSystems IRIS 1 1 1 217
Discussion Eduard Lebedyuk · Jul 31, 2019 CodeGolf: FizzBuzz 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” #Code Snippet #Caché 4 22 1 677
Question Eduard Lebedyuk · Jul 23, 2019 DeepSeeWeb add markers to line chart I have this fact tableCheckTimeErrorMarker (1 or 0)2019-01-01 00:01:00102019-01-01 00:02:00512019-01-01 00:03:0020And the cube which is pretty much 1:1.I have build an MDX: #Analytics #Analyzer #InterSystems IRIS BI (DeepSee) 0 2 0 237
Question Eduard Lebedyuk · Jul 19, 2019 Can I determine inside Ensemble Job that Ensemble tries to shut down the job From inside Business Service (OnProcessInput method specifically) I want to determine if Ensemble tries to shut down the job.Is it possible? How? #Business Operation #Business Process (BPL) #Business Service #System Administration #Ensemble 0 2 0 220
Article Eduard Lebedyuk · Jul 16, 2019 4m read Classes, tables and globals - how it all works? When I describe InterSystems IRIS to more technically-minded people, I always start with how it is a multimodel DBMS at its core. In my opinion that is its main advantage (on the DBMS side). And the data is stored only once. You just choose the access API you want to use. #Beginner #Best Practices #Globals #Object Data Model #Relational Tables #SQL #InterSystems IRIS 10 1 5 1.5K
Question Eduard Lebedyuk · Jun 8, 2019 Set environment variable from terminal How do I set environment variable for current process? set env = "MYVAR" set s = $ZF(-1,"export " _ env _ "=2048m") set val = $system.Util.GetEnviron(env) zw val Returns val="" because $zf(-1) spawns new process. #Red Hat Enterprise Linux (RHEL) #System Administration #Caché 0 10 2 1.4K
Question Eduard Lebedyuk · Jun 7, 2019 Different XML projections for the same class I have one persistent, xml-enabled class.I need to convert objects of this class to XML.However I need to project each object in different ways (depending onwhere I send it), for example:Different list of attributes are projectedAttributes have different names...Is there a way to do that with XML Adaptor? #ObjectScript #SOAP #XML #Caché 0 1 0 243
Question Eduard Lebedyuk · May 29, 2019 Send request to BP on production start How do I send request on production start?Here's what I got so far in my production class: ClassMethod OnStart(pTimeStarted As %String) As %Status { job ..InitialTraining() quit 1 } lassMethod InitialTraining() As %Status { hang 5 set sc = ##class(EnsLib.Testing.Service).SendTestRequest(...) quit sc } Is there a better way without hang, etc? #Business Process (BPL) #Ensemble 0 1 0 369
Question Eduard Lebedyuk · May 17, 2019 Is there a way to get [ Internal, Private ] property? I have a class defined like this: Class test.ABC Extends %RegisteredObject { Property myProp As %Binary [ Internal, Private ]; } Is there a way to get a value of myProp from outside of the object? I can't modify or extend the class obviously. #Object Data Model #ObjectScript #Caché 1 8 1 726
Article Eduard Lebedyuk · Apr 23, 2019 1m read Python Gateway Part II: Installation This series of articles would cover Python Gateway for InterSystems Data Platforms. Execute Python code and more from InterSystems IRIS. This project brings you the power of Python right into your InterSystems IRIS environment: #Artificial Intelligence (AI) #Languages #Machine Learning (ML) #Python #InterSystems IRIS Open Exchange app 3 2 1 1.3K
Question Eduard Lebedyuk · Apr 15, 2019 CacheGlobalOrder example to iterate over global and get data I managed to use CacheGlobalOrder to iterate over global and return the next subscript: #C++ #Callout #Caché 0 1 0 441