Robert Cemper · May 16, 2023 go to post

Just to rephrase your issue:

  • you expect a JSON array of JSON objects   [{..},{..},{..} ]
  • but you get a JSON object containing that array {"cursos": [{..},{..},{..} ]}
;;  asssumptio input holds the received objset jobj={}.%FromJSON(input) ; convert to objset jarray=jobj.%Get("cursos")   ; content of "cursos" = [..]set output=jarray.%ToJSON() ; convert to  string

docu: %Library.DynamicObject
 

Robert Cemper · May 15, 2023 go to post

There is still another critical directory for Windows Docker Desktop

C:\Users\<yourusername>\AppData\Local\Temp\docker-scout\sha256

There some GB of Generated/Downloaded images are kept and NEVER cleared
I didn't miss anything when I deleted them manually after stopping Docker
getting back some more GB

Robert Cemper · May 12, 2023 go to post

 In past (before2016),
I had 2 times the challenge to run a private training within a window of 2 years

  • Are developers generally willing or resistant to the idea of learning ObjectScript? Mostly rather resistant, but forced to learn it to get the job,  
  • Why? ObjectScript is not the mainstream. And in my geographic environment (middle Europe) demand is rather low. So it's more a curiosity skill that almost no recruiters value 
  • For developers trying to learn ObjectScript - what was that process like? classroom training + practical exercises  What were the main challenges there?
    • In-person learning?  Y
    • Online class?  N
    • Documentation?  Y
    • What were your impressions? almost all tried to map the previous experience to ObjectScript the concept of variable scoping + global variants shocked them they had massive problems following CSP=>CLS=>MAC=>INT=>OBJ  
  • How did it compare to other languages? They were looking for public examples. Support of SQL was often disappointing compared to market leaders
  • What would have made it easier to learn? pushing it to universities and technical schools instead of retreating and leaving that space to competitors
  • How long did it take to learn?    basics 2 weeks - guided development 3 months
  • Was it longer/shorter than expected?  Just a predefined schedule  
  • Easier or harder than expected? Hackers and Investigators had a clear advantage Formal thinkers suffered the most.

The main environment was a huge application Upgraded from
MUMPS to ObjectScript with a lot of old-style code using enough
ancient tricks that might "Code Quality" drive crazy.

Are there any other comments you'd like to make about the hiring
or training process that might help us improve?
My personal prerequisites list:

  • understanding Java (:= Object concept)
  • understanding SQL DBs
  • willing and able to think across the fence
  • rather exploring new ideas than varying old models
  • courageous enough to explore and fill white space on their skills map
  • digging into details

Besides the technology item:
being rather an explorer than an administrator

Robert Cemper · May 10, 2023 go to post

Obviously, ChatGPT has no idea of ObjectScript
nonexisting methods, wrong indexing, ......

DISAPPOINTING 

Robert Cemper · May 10, 2023 go to post
ClassMethod SortVersion(input As%DynamicArray) As%DynamicArray {
    Set sorted = []
    Set val = ""Kill order
    For i=1:1:input.%Size() Set order(input.%Get(i-1))=""For  {
        Set val=$o(order(val)) Quit:val=""do sorted.%Push(val)
        }
   Quit sorted
}
Robert Cemper · May 8, 2023 go to post

works fine. it didn't know me first 😉
just a minor adjustment

ports:
  - 52773:52773
  - 51773:1972

Robert Cemper · May 7, 2023 go to post

Typical licensing happens by user by processes - every user gets 25 processes slots
if you exceed this 25 every process consumes its own license.
so up to 25 you consume 1 license but by #26 you convert to 26 licenses consumed
then the total number of license slots counts.
But there are also other licensing models. You should check with ISC Sales or WRC which one applies. 

  • $SYSTEM.License.KeyLicenseUnits() 
     returns the number of license units authorized by the active key.
  • $SYSTEM.License.LUConsumed()
    returns number of license units currently consumed at the local instance.
  • there are more $SYSTEM.License...... that might be of interest.

Docu %SYSTEM.License

Robert Cemper · May 1, 2023 go to post

Permission points to some missing user privileges
start your container in foreground   (no -d switch) to see the full log  with details

Robert Cemper · Apr 19, 2023 go to post

we need to handle 2 types of line terminators. $C(13,10) and $C(10)
+ BASE64 holds only printable characters, $C(13) is a NONO in Base64.
So:
if you always use $c(10) as line terminator 
then set ln=$TRANSLATE(ln,$c(13))  will remove also a leftover $C(13) if existing
or just do nothing.

Robert Cemper · Apr 17, 2023 go to post

right! Just the stating numeric is important

i will elaborate on the background of objects

Robert Cemper · Apr 17, 2023 go to post

It is dating back to the very early days of Caché. Even before my time @ ISC
(my guess >25 years)  There was a lot of $Z* stuff e.g. $ZU(..)  
That was not meant to be used for applications.
Just for internal use in system utilities. With no public Docs.
Some became public over time, mostly renamed,  and were documented.
I just found it by examing some related system functions.

Robert Cemper · Apr 16, 2023 go to post

MUCH more simple and shorter
 

killset a=##class(Sample.Person).%OpenId(2)
set b=##class(Sample.Person).%OpenId(12)
set c=##class(Sample.Person).%OpenId(111)

set obj=$zobjref("2@Sample.Person")

;; BINGOzw
 
a=<OBJECT REFERENCE>[1@Sample.Person]
b=<OBJECT REFERENCE>[2@Sample.Person]
c=<OBJECT REFERENCE>[3@Sample.Employee]
obj=<OBJECT REFERENCE>[2@Sample.Person]
Robert Cemper · Apr 16, 2023 go to post

there was some GOLF work  to do

set o="" for  set o=$zobjnext(o) quit:(o="")||($p(o,"?")=x)

Robert Cemper · Apr 16, 2023 go to post

it is possible. but an OREF is always a LOCAL reference !
see this example
 

SAM>kill
SAM>set a=##class(Sample.Person).%OpenId(2)
SAM>set b=##class(Sample.Person).%OpenId(12)
SAM>set c=##class(Sample.Person).%OpenId(111)
 
SAM>setx="3@Sample.Person";what we look for
SAM>set o="";this will be our OREF  
SAM>zw
a=<OBJECT REFERENCE>[4@Sample.Person]
b=<OBJECT REFERENCE>[3@Sample.Person]
c=<OBJECT REFERENCE>[2@Sample.Employee]
o=""x="3@Sample.Person"
SAM>;; now we convert our String x to OREF o
SAM>forset o=$zobjnext(o) quit:(o="")||($p(o,"?")=x)
 
SAM>zw;; we did it
a=<OBJECT REFERENCE>[4@Sample.Person]
b=<OBJECT REFERENCE>[3@Sample.Person]
c=<OBJECT REFERENCE>[2@Sample.Employee]
o=<OBJECT REFERENCE>[3@Sample.Person]
x="3@Sample.Person"
SAM>

The key-oneliner:
for  set o=$zobjnext(o) quit:(o="")||($p(o,"?")=x)

Robert Cemper · Apr 16, 2023 go to post

I'll think it over. I have some dirty ideas. need to check it
it's kind of useful golf for me.

Robert Cemper · Apr 16, 2023 go to post

you just can copy an already existing reference  SET rerf=a from the example above


to show all open objects:
Do $System.OBJ.ShowObjects()
Oref      Class Name                    Ref Count
----      ----------                    ---------
1         Sample.Person                 1
2         Sample.Person                 1
3         Sample.Employee               1
4         Sample.Company                1

 

OR

Do $System.OBJ.ShowObjects("/detail=1")
Oref      Class Name                    Ref Count
----      ----------                    ---------
1         Sample.Person                 1
+----------------- general information ---------------
|      oref value: 1
|      class name: Sample.Person
|           %%OID: $lb("2","Sample.Person")
| reference count: 1
+----------------- attribute values ------------------
|       %Concurrency = 1  <Set>
|                DOB = 32225
|               Name = "Ubertini,Brian S."
|                SSN = "231-12-5250"
+----------------- swizzled references ---------------
|   i%FavoriteColors = ""  <Set>
|   r%FavoriteColors = ""  <Set>
|             i%Home = $lb("9177 First Court","Bensonhurst","SC",42658)  <Set>
|             r%Home = ""  <Set>
|           i%Office = $lb("260 First Place","Larchmont","NV",99593)  <Set>
|           r%Office = ""  <Set>
|           i%Spouse = ""
|           r%Spouse = ""
+--------------- calculated references ---------------
|                Age   <Get>
+-----------------------------------------------------
 
2         Sample.Person                 1
+----------------- general information ---------------
|      oref value: 2
|      class name: Sample.Person
|           %%OID: $lb("12","Sample.Person")
| reference count: 1
+----------------- attribute values ------------------
|       %Concurrency = 1  <Set>
|                DOB = 33423
|               Name = "Waal,Jeff V."
|                SSN = "137-61-1656"
+----------------- swizzled references ---------------
|   i%FavoriteColors = ""  <Set>
|   r%FavoriteColors = ""  <Set>
|             i%Home = $lb("3872 Washington Place","Newton","NJ",80886)  <Set>
|             r%Home = ""  <Set>
|           i%Office = $lb("4339 Second Drive","Albany","PA",79202)  <Set>
|           r%Office = ""  <Set>
|           i%Spouse = ""
|           r%Spouse = ""
+--------------- calculated references ---------------
|                Age   <Get>
+-----------------------------------------------------
 
3         Sample.Employee               1
+----------------- general information ---------------
|      oref value: 3
|      class name: Sample.Employee
|           %%OID: $lb("111","Sample.Employee")
| reference count: 1
+----------------- attribute values ------------------
|       %Concurrency = 1  <Set>
|                DOB = 50109
|               Name = "Yezek,Chelsea F."
|                SSN = "227-72-8394"
|             Salary = 69426
|              Title = "Executive WebMaster"
+----------------- swizzled references ---------------
|          i%Company = 2  <Set>
|          r%Company = ""  <Set>
|   i%FavoriteColors = ""
|i%FavoriteColors(1) = "Blue"
|i%FavoriteColors(2) = "Yellow"
|   r%FavoriteColors = ""  <Set>
|             i%Home = $lb("7573 Main Drive","Bensonhurst","MA",97453)  <Set>
|             r%Home = ""  <Set>
|            i%Notes = ""  <Set>
|            r%Notes = ""  <Set>
|           i%Office = $lb("7403 Oak Place","Vail","NH",46047)  <Set>
|           r%Office = ""  <Set>
|          i%Picture = ""  <Set>
|          r%Picture = ""  <Set>
|           i%Spouse = 89
|           r%Spouse = ""
+--------------- calculated references ---------------
|                Age   <Get>
+-----------------------------------------------------
4         Sample.Company                1
+----------------- general information ---------------
|      oref value: 4
|      class name: Sample.Company
|           %%OID: $lb("9","Sample.Company")
| reference count: 1
+----------------- attribute values ------------------
|       %Concurrency = 1  <Set>
|            Mission = "Leaders in dynamic nano-application development instruments for the desktop."
|               Name = "BioDyne LLC."
|            Revenue = 928565856
|              TaxID = "X6668"
+----------------- swizzled references ---------------
|        i%Employees = $lb("Sample.Employee","Company",4,"many",1,1)  <Set>
|        r%Employees = ""  <Set>
+-----------------------------------------------------
  

Then you can use %%OID to generate your own OREF

like set ref=##class(%Persistent).%Open($lb("9","Sample.Company"))
It's not really comfortable
 

Robert Cemper · Apr 16, 2023 go to post

Grazie @Luca Ravazzolo !
You hit the point: 
 could create security vulnerability  
my intention was to see the license capacity used for this type of service

Robert Cemper · Apr 16, 2023 go to post

@ is just a separator
while n is just an internal sequence number within your partition
see this example

SAMPLES>s a=##class(Sample.Person).%OpenId(2)
SAMPLES>s b=##class(Sample.Person).%OpenId(12)
SAMPLES>s c=##class(Sample.Employee).%OpenId(111)
SAMPLES>sd=##class(Sample.Company).%OpenId(9)
 
SAMPLES>zw
 
a=<OBJECT REFERENCE>[1@Sample.Person]
b=<OBJECT REFERENCE>[2@Sample.Person]
c=<OBJECT REFERENCE>[3@Sample.Employee]
d=<OBJECT REFERENCE>[4@Sample.Company]
SAMPLES>
Robert Cemper · Apr 16, 2023 go to post

I try to test contributions to the contest
but IRIS Cloud SQL just shows Deployment Pending
for HOURS !!
And no contact or mail to report this breakdown
It is really disappointing!
 

Robert Cemper · Apr 14, 2023 go to post

I googled "JSON max property size" and found

So whoever is the recipient, there will be troubles with larger properties
I'd look for something to chop it into smaller pieces. (elephant approach)

Robert Cemper · Apr 12, 2023 go to post

with studio, I open 1 for each namespace and then drag and drop it from 1 NS to the other
works single or multiple
not so useful for 300.  ns %ALL looks more promising

Robert Cemper · Apr 10, 2023 go to post

 other SQL tools. 

confirmed: 
I used ODBC + SQLGateway for access and operation from local IRIS
works perfectly.