go to post Julius Kavay · Feb 9 What does a nervous twitching guitarist has to do with this developer community? I thought, this is a community of professionals and not of script kiddies. It's sorry to say, but under such circumstances I do not want to participate here. Just to make it clear, I have nothing against a video which demonstrates a Cache or IRIS feature, or which is a recording of a webinar or something similar but it should have something in common with development, with the database or at least with the lanuages or tools we use.
go to post Julius Kavay · Feb 4 Just open the class and see, what it does.Because the class extends %Projection.AbstractProjection, you could use it in one of your own classes: Class your.class Extends %Persistent{ Projection Test As %Projection.Monitor(MONENABLED=1);} But don't ask me, what the class does or should do...
go to post Julius Kavay · Feb 3 Create an abstract class and add it to all your classes, where a list of properties (for whatever reason) is needed Class DC.ClassInfo [ Abstract ] { /// Return property info: %PropNames(all) /// /// all: 1 = Return a list of all properties<br> /// 0 = Return a list of storable properties only ClassMethod PropNames(all = 0) As %String [ CodeMode = objectgenerator ] { s (prop(0),prop(1))="" f i=1:1:%compiledclass.Properties.Count() { s p=%compiledclass.Properties.GetAt(i), s=p.Storable s prop(s)=prop(s)_$e(",",prop(s)]"")_p.Name } d %code.WriteLine($c(9)_"s stor="""_prop(1)_"""") d %code.WriteLine($c(9)_"q $s(all:"""_prop(0)_$e(",",prop(0)]"")_"""_stor,1:stor)") q $$$OK } } For example Class My.Person Extends (%Persistent, DC.ClassInfo) { Property Name As %String; Property Age As %Integer; } Putting all together write ##class(My.Person).PropNames() --> Age,Name write ##class(My.Person).PropNames(1) --> %%OID,%Concurrency,Age,Name // That way, in your application, you can easily check, // if a property exists or not if $length(##class(My.Person).PropNames(), ",", "TestProp") -->0 if $length(##class(My.Person).PropNames(), ",", "Age") -->1
go to post Julius Kavay · Jan 27 my short test now USER> USER>k ^kav USER>s ^kav(1)="some", ^(2)="data..." USER>ts k ^kav(1) f h 1 TS K ^kav(1) F H 1 ^ <INTERRUPT> TL1:USER>tc USER>zw ^kav ^kav(2)="data..." USER> shows something else... the deleted node is gone
go to post Julius Kavay · Jan 27 If I interpret the situation correctly, you started a (direct mode) job in a terminal session and want to stop it without loosing (i.e. avoiding a rollback) the already deleted records. I think (but not tested) a simple Ctrl + C should be do the trick. After typing "Ctrl+C" you should see <INTERRUPT> TLn:yournamespace> Now type TC+<Enter>. This commits the already deleted item and you can exit your terminam session with the usual Halt command. As above said, not tested but maybe some of the Gurus here can agree (or disagree) with this procedure.
go to post Julius Kavay · Jan 23 Maybe the next time we get a better description which includes all details (unhidden, if possible).Bye the way, what's the very difference between the two example pyramides ("Output" and "also a valid output")? I don't see any visible difference - but who knows, maybe I need new glasses...
go to post Julius Kavay · Jan 23 do res.HttpResponse.Data.Rewind() set dynObj = {}.%FromJSON(res.HttpResponse.Data) // now, you can use the JSON-Data write dynObj.propName // if it's a dynObject write dynObj.%Get(0) // if it's a dynArray
go to post Julius Kavay · Jan 23 Perhaps it's the inattentiveness of the author. This is not the first time, we got an incomplete described task to solve like punctuations etc. in https://community.intersystems.com/post/code-golf-word-order
go to post Julius Kavay · Jan 23 I'm sorry to say, but this kind of information is an essential part of the task, and as such should be written before the recurring "As usual, the shortest ..." Also, it would be nice, if the output example would show this trivia (the invisible spaces)! I just saw "input = 3" and the output showed no trailing blanks! And I saw the Notice with two links- how to compute the size- test examplesI wasn't interested in opening them, first, I know how to compute code size and second, I make the examples myself.Hiding information in a side notice is a questionable practice. ClassMethod Pyramide(n) { s a="#" f i=1:1:n w ?n-i,a,?2*n-1,! s a=a_"##" } For a test use w $c(27)_"[7m" d ##class(your.class).Pyramide(5) w $c(27)_"[0m" and you should get