still another variant that I would prefer
set str=""
for ... {
set str=str_myval_","
}
set str=$e(str,1,*-1)
And BTW: $ZH is much easier to handle than $now()
- Log in to post comments
still another variant that I would prefer
set str=""
for ... {
set str=str_myval_","
}
set str=$e(str,1,*-1)
And BTW: $ZH is much easier to handle than $now()
I don't think ObjectScript might be lost.
It will just fade out of applications development into "specials".
Though the question. "Why to write applications INSIDE a DB environment at all?"
still remains open and unanswered.
Thank you @Alexey Maslov !
This sequence is the best illustration I could wish of "the priests know what to do"
It's nothing that the average developer of a business application needs.
%Library.Date and %Library.Time are both DataType classes typically used to define Properties.
The values are stored as integers according to $HOROLOG format
They have its MINVAL and MAXVAL as any other numeric data type
you can avoid $zu(12) by
Thank you @Herman Slagman !
I like your suggestion and would fully support it if ISC would take that turn.
You mentioned ignorance and you are right. I'm full with you.
Though I still see another more dangerous hurdle to pass:
- Understanding the concept. Applying the concept. Teaching the concept.
I just fear there might not be enough qualified developers available to execute it.
Seeing the actual situation on my side of the globe I wouldn't expect to find enough experts.
Of course, if you have a Shadow instance of your operational machine you can do it there and avoid the load on the primary machine.
Eventually, you can run there all analyses without export at all.
I don't have a real favorite.
- for similar changes in multiple records, I use SQL in SMP, rarely also $system.SQL.Shell() from terminal
- for single changes, I use Global Edit in SMP and direct access in terminal equally
- for special objects I often write my class related customized edit method
Thanks for the input. (I was waiting for it)
If someone goes for speed I'd suggest C or Assembly Language That's where ultimate speed lives.
As long as speed is available in the cloud for a few $$$ more. It's only interesting by principles not in reality.
The key - in my opinion - is to break the chains of a rarely known scripting language compared to others.
On what operating system do you run this repo ?
Your ERROR message looks like coming from Windows [backslash] (No directory \home\....)
BUT the whole code seems to be written just for Linux/ Docker images
It is nowhere mentioned as a prerequisite. Might be implicit to.
>>> "you’ll need the InterSystems Sandbox"
I never heard of, never used it.
there's a mistake
Methode CopyFrom(source As %AbstractStream) as %Status
just returns an obviously strange status.
to see the content use DO stream.OutputToDevice()
to get a clearer picture of the requirements it is essential to understand
how the connection operates:
It's evident that the behaviors are different on both ends
for #1 you start with a Listener and keep it cyclic reading, eventually writing
for #2 you open the listener, receive something and close it
to send your message you need an open - write - close cycle.
both are possible but you have to know what your opponent expects and how it reacts.
The whole requirement is rather archaic. Sounds like a webserver without HTTP.
REST would be the better approach.
Finally, you may consider outplacing the whole connection management to Node.js
which is far better suited for such exercises. Eg: wrap incoming stream into REST
see this docu TCP Client/Server Communication
- the key trick is to use READ with a timer
- if there is no input, you either write
or place the next timed read if there's nothing to send
put it into %ZLANGC00 as ZY
and just have
ClassMethod ToNato(t) {
ZY
} It's an important improvement.
and THANKS! I feel honored.
I just can't believe it.![]()
![]()
¡ Gracias !
leaving aside that there are evident typing errors that break the code
your reply underlines that the criteria: "Shortest answer wins!"
misses the precise definition of what is measured.
There is not much chance to be shorter than "x x q o" (= 7 char)
Out of curiosity, I checked the size of the underlying OBJ code:
> object size = 380 (+47% !) + timestamp = 18
So the expected gain is not what you would assume at first sight.
For the price of an almost unreadable code
Sorry, I never touched Angular I only know where it is coming from.
my 1st attempt:
N(t) s a="Alfa,Bravo,Charlie,Delta,Echo,Foxtrot,Golf,Hotel,India,Juliett,Kilo,Lima,Mike,November,Oscar,Papa,Quebec,Romeo,Sierra,Tango,Uniform,Victor,Whiskey,Xray,Yankee,Zulu"
f i=1:1:$l(t) s %=$E($zcvt(t,"U"),i) w $s(%?1A:$p(a,",",$a(%)#32)_" ",%=" ":"",1:%)Line1=174 Line2=84 Total=258
dobrodošli
[Google translate is my helper]
you probably intended
zpm "install iris-analytics-sample"I come from Vienna, Austria.
I guess we are "neighbors" according to your mail (.si)
Zdravo Matjaž!
you are right in principle. Though there are hundreds of similar cases since DECADES!
ok, the cleaner solution brings us back to my previous proposal.
add a calculated property to your serial class ##class(Packing.Needs.Attributes) like this
Property List As %List [ Calculated, SqlComputed,
SqlComputeCode = { set {*}= $LB({attr1},{attr2},{attr3},{attr4} ) }, SqlComputed ];
attr1,attr2,attr3,attr4 have to be the SQLnames of these properties !!!
WARNING#1: you have to maintain this list manually at every change of the attributes!
WARNING#2:: this calculation happens at every access to the object.
The additional parameter SqlComputeOnChange = (attr1,attr2,attr3,attr4)
may reduce this. though I've never tried in practice
Ok. the picture becomes clearer:
%SerialObject is stored as $LB($LB(....),...)
you can get your result by 2 steps.
do attribute.%SerializeObject(.serialraw)
set list=$list(serialraw)don't think so complicated. leave your serial object as it is
but use instead a CALCULATED, SQLCOMPUTED Property as $LB() and you can then index it
IRIS includes a bunch of "legacy" routines".
Typically %R*, %G* that you can load by "legacy" commands in a "legacy" session or terminal
(not webterminal or simliar commandline simulatiors)
They are hidden in some way, It is not specific to VSC but the same with Studio.
Though ZL %RI ZS %zRI should create a routine that you can work on. Z*,z*%Z*,%z* is writable Use code
my PullRequest is pending.
IMAGE=intersystemsdc/iris-community:2019.4.0.383.0-zpm
is broken as it starts with SHELL ["/irissession.sh"]
instead of SHELL ["/bin/bash", "-c"]
Newer imags don't have that problem
20/30 tables and 300 columns is quite a heavy query / view.
VIEW is only a stored SELECT. The same considerations apply.
#1)
you should have an index for each column that appears in a JOIN ON.. on WHERE...
and that's hopefully just 1 index by table
#2) for each table the required columns should go as Data into the index
You are perfect if the query analyzer only shows access to indices.
My proposal only covered views of a single table with indices
Materializing a multi-table view as you describe it would require a hidden table with all JOINs
and no filtering WHERE clause. And you would require extra code to keep it up to date.
This is a job that the query generator does in an excellent way and with all tricks available.
I wouldn't say it's impossible. And the final query is definitely faster.
But it may take weeks or months to get it running. Not to talk about maintenance.
Analytics/DeepSee acts in a similar way. And I can prove: it wasn't done in an afternoon session.