I have two tables: one a local table using cache and the other is via an SQL gateway connection to an MSSQL Server via a 64bit ODBC driver (ODBC Driver 17 for SQL Server).
When I try to join them on a date field I don't get any matches, and I know that there are matches, e.g. running both views separately returns resuls for 30/11/2022.
The following statement returns rows for the first table r, but nothing for the table l
We use iKnow's GetSimilar for decision making. Right now we have a domain with both good and bad documents and using GetSimilar we want to see if a document is more similar to the good ones or the bad ones. To do this we simply compare the weighted average of the score from the good ones and the bad ones that GetSimilar returns.
The problem is that GetSimilar doesn't always return the score to all other documents. Assuming we have 50 documents I would expect the following result:
For CachéQuality I'd love to be able to create issues when the programmer uses classes which are deprecated for this or that version of Caché... But short of reading all the changelogs of all versions, I can't really tell when a command appeared (for instance RETURN; I know now that it appeared in 2014.x, but it took me some time to realize that), or when a (set of) class(es) became deprecated (for instance %GlobalCharacterStream to be replaced with %Stream.GlobalCharacter -- I don't even know since which version this is true :/).
Is there a way to find the median in Intersystems Cache SQL? I know it is not available as an aggregate function. Also in SQL Server I could try something like:
SELECT
(
(SELECT MAX(Score) FROM
(SELECT TOP 50 PERCENT Score FROM Posts ORDER BY Score) AS BottomHalf)
+
(SELECT MIN(Score) FROM
(SELECT TOP 50 PERCENT Score FROM Posts ORDER BY Score DESC) AS TopHalf)
) / 2 AS Median
However, there is no PERCENT Keyword in Cache as well. Any suggestions?
I have a WebSocket application which spawns new process using JOB command.
Sometimes WebSocket connection can be terminated, and in the meantime I need to hold spawned process alive until it can be associated with the new WebSocket connection. (Do not suggest serializing process state here instead please)
I want to create a CSP page that returns a pdf.
The pdf is identified by a pdftoken parameter.
My goal is to validate the token and return the pdf (ContentType=”application/pdf”) if the token
is good and return a text error message "Bad Token" (ContentType=”text/plain”) if the token is missing or bad.
My issue seems to be associated with ContentType. I can define one ContentType that works for the pdf or the error message.
I am unable to change the ContentType.
is it possible to ZW variables in stack frames above the current one? I am calling a custom logging method, and would like to log variables from the point of call.
I have a service that I need to receive notifications from when the service has started. Usually this service will be off, but when started a need a method to be called so I can email and be alerted. The only method I know I can use is " OnProcessInput" but this is when an input is received (new file, new message...) but I could not find any events to deal when the service starts...I tried "OnInit" but does not seems to work...any ideas?
I would like a REST client to be able to send a custom header with the http request, for example "APPLICATION-ID".
This can be seen in the CSP gateway trace but I have tried using %request.GetCgiEnv("HTTP_APPLICATION-ID") in various formats and parts of the classes but cannot work out where I can get this. Documentation says this should work but is for normal CSP pages.
I know that Cache files can be stored as XML and UDL based files. Is there any way to determine in which format the file(class, routine, dfi and so on) is stored? Because you can easily name your XML based file as class.cls and it will be perfectly valid.
I know that one way to check whether this file is in XML format is just try to parse it like
Set st = ##class(%XML.TextReader).ParseStream(contentStream)
If you have Cache installed on a Cent OS machine, and you want to switch the OS to Red Hat 7, and your Caché is installed on a non-OS drive, do you need to reinstall Caché?
English word ="Other anemias" It is converted to french as printing "Autres anemies".But correct word is " Autres anémies".I wrote a program in the cache. But did not get the correct output.So How to solve this issue