Hello,
I'm sending http request through %Net.HttpRequest and I have html page in response. Is there any built-in tool for beautify html for printing in terminal?
Thanks.
InterSystems ObjectScript is a scripting language to operate with data using any data model of InterSystems Data Platform (Objects, Relational, Key-Value, Document, Globals) and to develop business logic for serverside applications on InterSystems Data Platform.
Hello,
I'm sending http request through %Net.HttpRequest and I have html page in response. Is there any built-in tool for beautify html for printing in terminal?
Thanks.
Can somebody explain this behaviour of Cache (and many other calculating machine as well) :
WRITE 1/3*12
4
WRITE 1/3*5
1.666666666666666667
W 1/3*18
5.999999999999999999
W 1/3*21
6.999999999999999999
W 1/3*24
7.999999999999999999
How can we make more occurate caculations in Cache ?
There is an interesting discussion in the Russian forum going.
What is the best solution for the function which returns the max for the set of parameters?
From the listed solutions I like this one:
ClassMethod max(args...) {
for i=1:1:args { s max(+$g(args(i))) = i }
s i="", max=$o(max(i),-1, i) Q $lb(max, i)
}Hi,
I am using iknow text categorization to classify texts. I have 11 medical articles as my training set. Here is part of the source code:
This post is the direct result of working with an InterSystems customer who came to me with the following problem:
SELECT COUNT(*) FROM MyCustomTableTakes 0.005 seconds, total 2300 rows. However:
SELECT * FROM MyCustomTableTook minutes. The reason for this is subtle and interesting enough for me to write a post about. This post is lengthy, but if you scroll to the bottom I'll write a quick summary, so if you've gotten this far and think you've already read enough, scroll to the end to get the main point. Check for the sentence in bold.
I was wondering how you could take an exported obj and have it converted to an int/mac.
Here you have an easy way to write and execute COS code from your unix scripts. This way one does not need to write routines or even open Studio or Atelier. It can be an option for simple and small actions for instance things like installation tasks or compiling.
See sample bash script (compile.sh) to compile classes:
With a routine like this one, you can quickly calculate how many lines of code you are working with. And it is not only for routines, it works for classes because remember that classes generate routines !
Here you have the routine source code:
Hello, guys.
I found one interesting moment in Cache Object Script. It doesn't have(or at least I didn't find) trimming function. By trimming I mean if a string has some whitespaces/tabs/carriage returns from very beginning or/and from very right, this function removes them.
I have found several workaround ways.
1. Using Cache Basic
ClassMethod TrimCacheBasic(str As %String) As %String [ Language = basic ]{Return Trim(str)}2. Using SQL
Have you tried $Translate for date conversion?
USER>write $Translate("Dd.Mm.WwYy","WwYy-Mm-Dd","2015-08-02")
02.08.2015
Stolen from Russian forum and Alexander Koblov.
Hello,
Hello, guys.
Say I have two horologs or timestamps, how can I compare them? I know that just time1 > time2 doesn't work because it will compare them as strings which is not correct.
I have been using the query below and it was working fine but now it's giving a SQL error. There were no changes made that could cause this to stop working. There is no Field 'APPLICATIONID' in the table.
QueueSQL=select distinct (convert(char(5),SkillsetID)+'='+Skillset) from iagentbySkillsetStat where ApplicationID > 10000 QueueMappingSQL=SELECT DISTINCT (convert(char(5),SkillsetID)+'='+Skillset), SkillsetID FROM iagentbySkillsetStat iagentbySkillsetStat WHERE (iagentbySkillsetStat.ApplicationID>10000)
DB- Intersystems Cache
Error details for the log files are below.
What are the difference between $ and $$ symbols using macro.
Wir suchen für ein Unternehmen unserer Firmengruppe
eine/n ERP System Developer / Programmierer/ Software Entwickler
Unser Partnerunternehmen ist ein international agierendes Handelsunternehmen mit Sitz in der Nähe von Wien.
Der zukunftsorientierte IT Bereich entwickelt intelligente innovative Lösungen für die Vielfalt der Herausforderungen, die sich täglich stellen. Die Fülle der abwechslungsreichen Aufgaben und Projekte, sowie die Art und Weise wie zusammengearbeitet wird, bietet hervorragende Wachstums- und Entwicklungschancen.
EnsPlus, the Caché Objectscript plugin for Visual Studio, has now been upgraded to support all versions of Visual Studio 2015, including the free Community edition.
UPDATE: Found a reason in my code why this could be occurring. Still it would be interesting to hear what people come back with.
Consider the following MERGE statement.
M ^WORKDELETED(DAYNUM,WKS,ACC,$H,%logname)=^WORK(DAYNUM,WKS,ACC)
Produces output
^WORKDELETED(64165,366,16090404088,"64165,34201","user001")="SOME DATA"
^WORKDELETED(64165,366,16090404088,"64165,34201","user001",0,"LOG")="64163*11:05*user001*64163,39919*~"
<other sub-level nodes omitted>
I want to use the Regex Matcher to strip HTML tags, but I get a REGEX error. Can anyone explain what I'm doing wrong?
set htmlSnippet = "<h1>Hello</h1>"
set regex = ##class(%Regex.Matcher).%New()
set regex.Text = htmlSnippet
set regex.Pattern = "<[^>]*>"
set plainText = regex.ReplaceAll(" ")
write !,plainText
Hello, guys.
I need to find all web files, get their content in UDL format and to be able to export them. And, vice versa, to be able to import them in udl format.
I know that they are located in CSP folder. However, is there any way to do this using COS functions?
Hello community!
Is there any method/property/way in Caché to obtain something like unique identifier for installed Caché system? The idea is to get the identifier that will differ on any other installation/machine/etc, but will forever remain the same for the current installation, even if $zv changes (in case of update) or any data is removed from the database.
Hi -
I have 3 classes: "Class A" has a property X, "Class B" has a property which is a Class A, and I have a "Class C" which has a property of a Class B.
Class A definition
Class USER.ClassA Extends %Persistent
{
Property Propx as %String;
}
Class B definition
Class USER.ClassB Extends %Persistent
{
Property Record as USER.ClassA;
}
Class C defintion (which is where I'm having my problem)
Class USER.ClassC Extends %Persistent
{
Property BRecord As USER.ClassB;
Property ARecord As USER.ClassA [ Calculated, SqlComputeCode = { ????? }, SqlComputed ];
Method ARecordGet() as USER.ClassA
{
quit ..BRecord.ARecord
}
}
write "5apples" + "7 orange" //Ans :12
Values are string , why add numeric value . its an error or correct . please tell me.
Is there an API I can call to determine the size of a routine in a CACHE.DAT file so that I don't have to directly reference the ^ROUTINE global?
Please Explain "$h"
Process-private Globals can be used as a data global in storage definition. That way, each process can have its own objects for the class with ppg storage. For example lets define a pool, which can:
Here's the class:
Problem: I have a REST broker, and if I hit a code block, which does IO redirection, the REST reply becomes broken in one of the following ways:
Consider the following REST broker:
How to get a user input in cache . Below this program run in browser but displayed the error of "
Caché Server Pages Version 2016.1.1.108.0
Error Condition The processing of the request was interrupted
CSP application closed the connection before sending a complete response"
<html>
<head>
<title>User input </title>
</head>
<body>
<script language="Cache" runat="server">
r "enter 1ST num",x
r "Enter 2ND num",y
s z = x+y
w z
</script>
</body>
</html>
Hi,
I create a cache class program. Its compile it. But how to run it?
Please send one sample program with output
At the Global Summit several folks had mention that they developed their own production monitor. I am looking to create a monitor similar to eGate that we only display those Services/Processes/Operations that are in trouble, and those Errors that are showing up in the Event Log. Does anyone have any examples of this?
Thanks
Scott Roth
The Ohio State University Wexner Medical Center
Hello Cache experts,
Has anyone tried using Cache object script to check windows service is running or windows service installed or not on same computer or remote computer ? basically i am trying to develop cache program which will check "windows service" running or installed on current computer or remote computer. Based on the status of this windows service, i want to write some business logic in our application. Any suggestions will be more welcome