go to post Vitaliy Serdtsev · Sep 17, 2019 It's a challenge. Give a reproducible example for "play around". There are a bunch of hints: Query Optimization. @Kyle.Baxter will also be interested in your issue.
go to post Vitaliy Serdtsev · Sep 17, 2019 At me in SMP the following query returns 23: select datepart('hh', {ts '2019-09-10 23:01:45'})
go to post Vitaliy Serdtsev · Jul 30, 2019 By default, the mac address of the computer on which the DBMS instance is running is returned. But you can get the mac address of any other computer, see getmac /?.
go to post Vitaliy Serdtsev · Jul 29, 2019 I checked for versions 2009.1/2010.1: unfortunately, the $zu(114,0) returns nothing, therefore, remains variant with the command line. Example for Windows, provided that the system has a single network card: #include %syConfig n result w $zu(144,1,$$$DEFETHADDR),!,"------",! d $system.OBJ.DisplayError(##class(%Net.Remote.Utility).RunCommandViaCPIPE("getmac /NH /fo table",,.result)) w $p(result," ",1)PS: for other OS command line may be different.
go to post Vitaliy Serdtsev · Jul 25, 2019 I know. After all the author requested the solution on pure M and not COS.
go to post Vitaliy Serdtsev · Jul 25, 2019 Try this: w $zu(114,0) or w $$$DEFETHADDR ; from %syConfig.inc
go to post Vitaliy Serdtsev · Jul 24, 2019 Important note: it should be noted that the proposed solutions refer only to the port of the private web server, which may not even be installed. In the case of an external web server, this is not possible.
go to post Vitaliy Serdtsev · Jul 24, 2019 Thank you for your comment. This code is taken from the source code %SYS, which in theory should be an example for application developers. I hope that InterSystems developers will see your comment and make appropriate changes.
go to post Vitaliy Serdtsev · Jul 16, 2019 See $(REST - CSP - (-HyperEvents) + EasyUI + File Upload). Part 2
go to post Vitaliy Serdtsev · Jul 16, 2019 Intel i5-2400 10000 digits ~ 58 sec. calcPI(n) public { s $lb(len,nines,predigit,r)=$lb(10*n\3,0,0,"") f i=1:1:len s a(i)=2 f j=1:1:n { s q=0 f i=len:-1:1 s x=10*a(i)+(q*i), a(i)=x#(2*i-1), q=x\(2*i-1) s a(1)=q#10, q=q\10 i q=9 { s nines=nines+1 }elseif q=10 { s r=r_(predigit+1)_$$repeat^%qarfunc(0,nines), predigit=0, nines=0 }else{ s r=r_predigit, predigit=q s:nines r=r_$$repeat^%qarfunc(9,nines), nines=0 } } q r_predigit }
go to post Vitaliy Serdtsev · Jul 12, 2019 And if so? w $zobjref(^||PPG(1)).NameStill take a look at $$$objOrefToInt/$$$objIntToOref (%occObject.inc) PS: it should be noted that OREF ≠ OID and serve different purposes.
go to post Vitaliy Serdtsev · Jul 10, 2019 I found out the reason for the difference in the result BASIC256: Instead s len = 10*n\4, must be s len = 10*n\3,Error on site.
go to post Vitaliy Serdtsev · Jul 10, 2019 Translation of: LUA calcPILua(n=1000) public { s len = 10*n\3, nines = 0, predigit = 0 f j=1:1:len s a(j)=2 f j=1:1:n { s q=0 f i=len:-1:1 { s x = 10*a(i) + (q*i), a(i)=x#(2*i-1), q=x\(2*i-1) } s a(1)=q#10, q=q\10 i q=9 { s nines = nines + 1 }elseif q=10 { w predigit+1 f k = 1:1:nines w 0 s predigit = 0, nines = 0 }else{ w predigit s predigit = q i nines { f k = 1:1:nines w 9 s nines = 0 } } } w predigit }The result of this example is exactly the same as the result of the program C# (tested at n=10000).
go to post Vitaliy Serdtsev · Jul 10, 2019 Translation of: BASIC256 calcPI(n=1000) public { s len = 10*n\4, needdecimal = $$$YES, nines = 0, predigit = 0 ;# {First predigit is a 0} f j=1:1:len s a(j-1)=2 ;# {Start with 2s} f j=1:1:n { s q=0 f i=len:-1:1 { ;# {Work backwards} s x = 10*a(i-1) + (q*i), a(i-1)=x#(2*i-1), q=x\(2*i-1) } s a(0)=q#10, q=q\10 i q=9 { s nines = nines + 1 }elseif q=10 { s d = predigit+1 d outputd i nines>0 f k = 1:1:nines s d = 0 d outputd s predigit = 0, nines = 0 }else{ s d = predigit,predigit = q d outputd i nines { f k = 1:1:nines s d = 9 d outputd s nines = 0 } } } w predigit q outputd() if needdecimal { q:d=0 w d_"." s needdecimal = $$$NO } else { w d } }The greater "n", the higher the accuracy. If there is a lack of RAM, you can easily replace the local array "a" with globals ^||a or ^a.
go to post Vitaliy Serdtsev · Jul 3, 2019 Is this normal? Yes. 2015.x (pJournalFlag = 0) Latest (pJournalFlag = 1)
go to post Vitaliy Serdtsev · Jun 27, 2019 w $$MyFunc(1),!, $$MyFunc(1,.V)," V=",V,! MyFunc(p...) s Answer=p_" params" s:p=2 p(2)="it's all good" q Answer USER>do ^test 1 params 2 params V=it's all good
go to post Vitaliy Serdtsev · May 21, 2019 Can be easier: ClassMethod GetPrivateProp( oref, propName) As %String { d ##class(%Studio.General).DumpObjectExecute(.arr,oref) q arr(propName) }
go to post Vitaliy Serdtsev · May 21, 2019 Date and Time Constructs Try this: SELECT LBTS_RowID ,LBTS_CollectedDate FROM SQLUser.LB_TestSet JOIN SQLUser.LB_Transfer ON ($LISTBUILD(LBTS_RowID) %INLIST LBTR_TestSetList) WHERE LBTS_CollectedDate BETWEEN {d '2019-01-01'} AND {d '2019-05-10'}
go to post Vitaliy Serdtsev · May 17, 2019 Try this: XData Contents [ XMLNamespace = "http://www.intersystems.com/zen" ] { <page xmlns="http://www.intersystems.com/zen"> <tableNavigatorBar tablePaneId="tp1"/> <tablePane id="tp1" OnCreateResultSet="CreateRS" OnExecuteResultSet="ExecuteRS" maxRows="0" pageSize="10" useSnapshot="true" > <parameter value="USER1"/> </tablePane> <tableNavigatorBar tablePaneId="tp2"/> <tablePane id="tp2" OnCreateResultSet="CreateRS" OnExecuteResultSet="ExecuteRS" maxRows="0" pageSize="10" useSnapshot="true" > <parameter value="USER2"/> </tablePane> </page> }