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.

Última respuesta 5 días atrás Último comentario 4 días atrás
0   0 3
79

visitas

0

clasificación

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.

Último comentario 3 días atrás
+ 2   0 2
89

visitas

+ 2

clasificación

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.

And some interesting challenges:

Did I miss something? Add more challenges in comments.

+ 2   0 1
0

comentarios

100

visitas

+ 2

clasificación

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"))
}
}
Última respuesta 10 días atrás Último comentario 10 días atrás
0   0 2
70

visitas

0

clasificación

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:

0   0 1
0

respuestas

0

comentarios

31

visitas

0

clasificación

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?

Última respuesta 4 September 2019 Último comentario 5 September 2019
0   0 3
79

visitas

0

clasificación

 I have two local instances:

  • IRIS for Windows (x86-64) 2018.1.2 (Build 626_3U) Wed Jun 12 2019 19:07:59 EDT
  • IRIS for Windows (x86-64) 2019.1 (Build 510U) Thu Mar 14 2019 14:13:37 EDT

I'm using Java Gateway to talk to external system.

Both instances are using the same:

  • jar
  • generated class
  • java version


They are calling the same method with this java signature:

Última respuesta 18 August 2019
0   0 1
0

comentarios

47

visitas

0

clasificación