go to post Vitaliy Serdtsev · Feb 28 See Class Reference: Class %Stream.FileBinaryGzip Extends FileBinary Class %Stream.FileBinary Extends %Stream.Object Hence %Stream.FileBinaryGzip is already the heir of %Stream.Object.
go to post Vitaliy Serdtsev · Feb 14 It seems to me that there is a typo in the TestStartBottomLeft method: should be Do $$$AssertEquals(##class(codeGolf.ClockwiseWord).Solution(.matrix, 3, 1), "781234569")
go to post Vitaliy Serdtsev · Feb 5 I'm not familiar with Ensemble, but it may be possible to replace the regular stream with the %Stream.GlobalCharacterSearchable class?
go to post Vitaliy Serdtsev · Feb 4 C:\Program Files\Python313\python3.dll Here is exactly the version 3.9.13, and not 3.13?
go to post Vitaliy Serdtsev · Feb 4 I was interested and I decided to check: USER>w $zv IRIS for Windows (x86-64) 2024.3 (Build 217U) Thu Nov 14 2024 17:59:58 EST USER>d $System.Python.Shell() Python 3.9.13 (tags/v3.9.13:6de2ca5, May 17 2022, 16:36:42) [MSC v.1929 64 bit (AMD64)] on win32 Type quit() or Ctrl-D to exit this shell. >>>
go to post Vitaliy Serdtsev · Feb 4 Only InterSystems developers can fix the generated code. To do this, contact the WRC. You and I can only work around the bug by rewriting the query.
go to post Vitaliy Serdtsev · Feb 4 I installed Python 3.12.8 (x64) and configured it according to the documentation (link is given above) Everything is working fine: USER>do $System.Python.Shell() Python 3.12.8 (tags/v3.12.8:2dc476b, Dec 3 2024, 19:30:04) [MSC v.1942 64 bit (AMD64)] on win32 Type quit() or Ctrl-D to exit this shell. >>>By the way, I didn't touch PythonPath.
go to post Vitaliy Serdtsev · Feb 4 Please note the following warning: Important: There are known incompatibilities between InterSystems IRIS and Python 3.13, so you are advised to avoid Python 3.13 at this time. This issue will be addressed in an upcoming version of InterSystems IRIS.
go to post Vitaliy Serdtsev · Jan 28 That's right, the generated code lacks $GET or initial initialization of the variable.
go to post Vitaliy Serdtsev · Jan 28 Yes, these are fields that will either be inserted or updated. PS: In fact, the following query should work correctly: INSERT OR UPDATE myTable SET name='Omer', counter = NVL(counter,0) + 1 But unfortunately, the SQL engine generates code where an undefined variable is accessed, so the <UNDEFINED> error occurs. Try contacting WRC for a fix.
go to post Vitaliy Serdtsev · Jan 27 The query can be yet simplified: insert or update myTable(name,counter) select 'Omer', nvl((select counter from dc.myTable where name='Omer') + 1, 1)
go to post Vitaliy Serdtsev · Jan 23 And if so? insert or update myTable(name,counter) select 'Omer', case when exists(select * from myTable where name='Omer') then (select counter from myTable where name='Omer') + 1 else 1 endThe "name" field is assumed to be unique.
go to post Vitaliy Serdtsev · Dec 23, 2024 By the way, in SQL Data Lens, which works via JDBC, it is possible to see the source code of classes: https://sqldatalens.com/class-viewer/
go to post Vitaliy Serdtsev · Dec 23, 2024 Simple test Class dc.test [ Abstract ] { ClassMethod Stream2BytesArray1(stream As %Stream.Object) As %SYS.Python [ Language = python ] { stream.Rewind() s = "" while not stream.AtEnd: r = stream.Read(1000000) s += r b = bytearray() b.extend(map(ord, s)) return b } ClassMethod Stream2BytesArray2(stream As %Stream.Object) As %SYS.Python [ Language = python ] { import iris maxlen = iris.system.SYS.MaxLocalLength() b = bytearray() stream.Rewind() while not stream.AtEnd: b.extend(iris._SYS.Python.Bytes(stream.Read(maxlen))) return b } ClassMethod Stream2BytesArray3(stream As %Stream.Object) As %SYS.Python { set maxlen = $$$MaxLocalLength, b = $SYSTEM.Python.Builtins().bytearray() do stream.Rewind() while 'stream.AtEnd {do b.extend($system.Python.Bytes(stream.Read(maxlen)))} return b } /// d ##class(dc.test).Test() ClassMethod Test() { s builtin=$system.Python.Builtins(), maxstr=$tr($j("",$$$MaxStringLength)," ","0"), stream=##class(%GlobalBinaryStream).%New() f i=1:1:7 d stream.Write(maxstr) w "Stream.Size=",stream.Size,! f n=1:1:3 { s fn="Stream2BytesArray"_n,t=$zh,r=$CLASSMETHOD($this,fn,stream),t=($zh-t)_" s." w $$$FormatText("%1 len(r)=%2 time=%3",fn,builtin.len(r),t),! } } } USER>d ##class(dc.test).Test() Stream.Size=25488008 Stream2BytesArray1 len(r)=25488008 time=.752708 s. Stream2BytesArray2 len(r)=25488008 time=.14895 s. Stream2BytesArray3 len(r)=25488008 time=.080003 s. The numbers speak for themselves.
go to post Vitaliy Serdtsev · Dec 18, 2024 ClassMethod Stream2BytesArray(stream As %Stream.Object) As %SYS.Python { set builtin = $SYSTEM.Python.Builtins() set b = builtin.bytearray() do stream.Rewind() while 'stream.AtEnd { set r = $system.Python.Bytes(stream.Read($$$MaxLocalLength)) do b.extend(r) } quit b }
go to post Vitaliy Serdtsev · Dec 3, 2024 Here you can find version 3.10.2: https://repo.maven.apache.org/maven2/com/intersystems/intersystems-jdbc/
go to post Vitaliy Serdtsev · Nov 15, 2024 Parallel Query Processing Ignored Parallel Query Processing for a Specific Query And don't forget about AutoParallelThreshold
go to post Vitaliy Serdtsev · Oct 11, 2024 I checked on the version "IRIS 2024.2CE for Windows" - the file is deleted from the SOURCFILE. Maybe it's about the access rights to delete? Check it out: Step 6: Determine Owners and Groups UNIX® Users, Groups and Permissions
go to post Vitaliy Serdtsev · Oct 11, 2024 It seems to me that in this case it would be advisable to use a comparison of stream hashes, using, for example, the SHA3HashStream method.
go to post Vitaliy Serdtsev · Aug 15, 2024 XData block (MimeType) The default is text/xml Encoding Translation Try this: XData Script { <script type="text/javascript"> var v1=1; var v2=2; function Colors() { if (v1=1&&v2=2) { alert('&<>"'); } } </script> }