root@bca19b7cb221:/# du -hd1 /usr/cachesys/ | sort -h
12K     /usr/cachesys/devuser
92K     /usr/cachesys/SNMP
112K    /usr/cachesys/patrol
264K    /usr/cachesys/lib
300K    /usr/cachesys/samples
400K    /usr/cachesys/doc
1.2M    /usr/cachesys/docs
3.9M    /usr/cachesys/httpd
33M     /usr/cachesys/fop
49M     /usr/cachesys/dist
58M     /usr/cachesys/dev
85M     /usr/cachesys/csp
241M    /usr/cachesys/bin
642M    /usr/cachesys/mgr
1.1G    /usr/cachesys/

root@bca19b7cb221:/# find /usr/cachesys/mgr/ -name *.DAT -exec ls -lah {} \;
-rw-rw---- 1 root cacheusr 888K Jan 29 22:43 /usr/cachesys/mgr/cachetemp/CACHE.DAT
-rw-rw---- 1 root cacheusr 160M Jan 29 22:43 /usr/cachesys/mgr/enslib/CACHE.DAT
-rw-rw---- 1 root cacheusr 385M Jan 29 22:43 /usr/cachesys/mgr/cachelib/CACHE.DAT
-rw-rw---- 1 root cacheusr 1.0M Jan 29 22:43 /usr/cachesys/mgr/user/CACHE.DAT
-rw-rw---- 1 root cacheusr 1.0M Jan 29 22:43 /usr/cachesys/mgr/cacheaudit/CACHE.DAT
-rw-rw---- 1 root cacheusr 1.0M Jan 29 22:43 /usr/cachesys/mgr/cache/CACHE.DAT
-rw-r----- 1 root cacheusr 65M Jan 29 22:43 /usr/cachesys/mgr/CACHE.DAT

root@bca19b7cb221:/# du -h /usr/local/etc/cachesys/
106M    /usr/local/etc/cachesys/

I am not sure if I really need everything in /usr/cachesys/bin/ - 241MB
 and /usr/local/etc/cachesys/ - 106MB, this two folders plus CACHESYS - 65MB and CACHELIB - 385MB (how much it will be if separate DeepSee and other unnecessary staff), will be around 800MB. While currently image layer size 1.24GB.

Container was started with entrypoint bash. So IRIS has not started, yet.

Yes, in this key it is a good idea to use a password. But I would prefer to have unauthenticated access locally inside the container with csession. So, in this case, I can install and configure everything that I need in my image. But, the instance still will be secured from outside.

But anyway I need more control on what should appear in IRIS. If I don't need yet DeepSee, Ensemble features and so on. Installed IRIS inside container have size more than 1GB,  but even just remove not needed files for me dev folder, even maybe whole CSP folder (offered external CSPgateway container, should be interesting to inspect). It is possible to reduce size in few hundreds of megabytes more.

Unfortunately, it is not so easy to implement it without a good parser. InterSystems still don't want to publish any sort of parsers. And not sure they have plans to implement it in Atelier, yet. While we still have so many troubles in Atelier, it would be better if they will fix it first. And then it would be possible to ask, hope it will not take so long.

In your case, it is not only beautifier it is also static syntax check. Which can recommend changing some bad practices/old school/possible error code. And it is done by project CacheQuality

Instead of your query, I would recommend using query from INFORMATION_SCHEMA.Tables table

SELECT
  TABLE_SCHEMA,
  TABLE_NAME,
  CLASSNAME
FROM INFORMATION_SCHEMA.Tables

In Cache we don't have a table with the number of rows in each table, you have to measure it by yourself for each table. But you can write SQL Function which will count it for you, and you can use this function in the query above.

SELECT count(*) FROM Sample.Person

Is it possible to create own image with IRIS based on Ubuntu? Currently available distributive does not support it, and where to get isc-main.

It is good that you prepared the image, but you also set a password there, so, to use this image I have to change a password, and it means that my image will be uselessly bigger with at least about 176Mb in my case. I changed a password by instruction in the documentation.

This error happens because you got another error in the request, do not forget to check status.

But anyway. As you need to call https, you should first configure SSL Configuration manually through management portal. You have to fill only Name field, any name on your choice.

Or the same but programmatically.

 ClassMethod GetSSLConfiguration(Server As %String) As %String
{
  new $namespace
  znspace "%SYS"
  do {
    quit:##class(Security.SSLConfigs).Exists(Server)

    set tSC=##class(Security.SSLConfigs).Create(Server)
    $$$ThrowOnError(tSC)
  while 0
  
  quit Server
}

And full working example 

 Class User.Google Extends %RegisteredObject
{

/// Google API key
Parameter KEY = "Put Your Google Maps API Key here";

ClassMethod GetDistanceMatrix(Origins As %String, Destinations As %String, Output Status As %Status) As %DynamicObject
{
  set params("origins")=Origins
  set params("destinations")=Destinations
  set Status=..CallGoogleMapsAPI("/maps/api/distancematrix/json", .params, .data) 
  quit data
}

ClassMethod CallGoogleMapsAPI(Url As %String, ByRef Params, Output Data) As %Status
{
  set Data={}
  set ht=##class(%Net.HttpRequest).%New()
  set ht.Server="maps.googleapis.com"
  set ht.Https=1
  set ht.SSLConfiguration=..GetSSLConfiguration(ht.Server)
  
  set param=""
  for {
    set param=$order(Params(param),1,value)
    quit:param=""
    do ht.SetParam(param, value)
  }
  do ht.SetParam("key", ..#KEY)
  
  set sc=ht.Get(Url)
  if $$$ISERR(sc) quit sc
  
  set Data={}.%FromJSON(ht.HttpResponse.Data)

  quit $$$OK
}

ClassMethod GetSSLConfiguration(Server As %String) As %String
{
  new $namespace
  znspace "%SYS"
  do {
    quit:##class(Security.SSLConfigs).Exists(Server)

    set tSC=##class(Security.SSLConfigs).Create(Server)
    $$$ThrowOnError(tSC)
  while 0
  
  quit Server
}

}

And call in terminal

USER>set data=##class(Google).GetDistanceMatrix("BRISTOL", "LONDON", .sc)

USER>w data.%ToJSON()
{"destination_addresses":["London, UK"],"origin_addresses":["Bristol, UK"],"rows":[{"elements":[{"distance":{"text":"190 km","value":189925},"duration":{"text":"2 hours 23 mins","value":8582},"status":"OK"}]}],"status":"OK"}

My example should work on versions 2016.2 and later, tested on 2017.2

Could you repeat my commands?

USER>do $system.OBJ.Compile("Test.*","cdk-u")

Compilation started on 01/29/2018 08:42:30 with qualifiers 'cdk-u'
Compiling 2 classes, using 2 worker jobs
Compiling class Test.Book
Compiling class Test.Chapter
Compiling table Test.Book
Compiling table Test.Chapter
Compiling routine Test.Book.1
Compiling routine Test.Chapter.1
Compilation finished successfully in 0.691s.

USER>set b = ##class(Test.Book).%New()

USER>w b.Chapters
7@%Library.RelationshipObject

If you got almost the same, your Insert should work

In first you used wrong slashes for windows and macOS. For windows should be "\" and for macOS "/"

For macOS you should use Unix style, where did you find this macOS style with colons? I have never seen such way.

And do not forget, that you can use methods NormalizeFilename and NormalizeDirectory in the class %File. These methods can help you to fix platform differences.

In the web world, you don't have access to files on the client's machine, only if a user will give you this particular file. So, if a user manually downloaded your file, changed it. He should interact with your application again, to select and upload it back.

But, there is another way, how to achieve what you want. If I understood you correctly, you need a way to edit MSWord files stored in your application. In this case, instead of the download file, edit and upload back, we have now two ways.

  • WebDAV: it is an extension for HTTP for editing files through the network. You can make a special link which will be opened by MS Word, and after save, it will save this file back to the server, without storing it locally.
  • Office Online: it is almost the same office but which is working online installed on company`s server. It obviously has less functionality than the desktop version, but in most cases, it could be enough. And if online version does not support something in your file it will offer to open it through WebDAV, if you as a developer support it. As an example how it works, you can go to OneDrive, upload some office file, and edit it right there. Almost the same version available to install on your server.

In my previous company, I realized both ways, it was quite tricky but it still works.

date in Cache stored in $horolog, which is just number of days from 01/01/1841. So to get the last day of the month you need the date for the first day of next month minus 1.

USER>set y=2018 for m=1:1:12 set d=$zdh(m_"/01/"_y) w !,$zd(d-1, 4)

31/12/2017
31/01/2018
28/02/2018
31/03/2018
30/04/2018
31/05/2018
30/06/2018
31/07/2018
31/08/2018
30/09/2018
31/10/2018
30/11/2018