Good way to calculate such property. One question I have is why you use indirection and $name function in the generated method? It can be safely removed, for example like this:
ClassMethod IsLastKnownRecordCheck(CitizenRef As %Integer, RelocationDate As %Date) As %Boolean [ CodeMode = objectgenerator ]
{
setstoragename="Default"
setstorageInd=%class.Storages.FindObjectId(%classname_"||"_storagename)
setstorage=%class.Storages.GetAt(storageInd)
setindexLocation=storage.IndexLocation
do %code.WriteLine($c(9)_"quit $order("_indexLocation_"(""CitizenRelocation"", CitizenRef, RelocationDate))=""""")
quit $$$OK
}
In your source fact class define a new property - IsLastKnownRecord As %Boolean
Fill this property with correct values during batch imort, or fill it with a task or a trigger or a callback (many ways to calculate it, choose any approach you want)
In your cube delete IsLastKnownRecord dimension
In studio open your cube class and add buildRestriction to the cube definition: <cube buildRestriction="IsLastKnownRecord=1"
Save and compile your cube
During cube build only facts with IsLastKnownRecord value equal to true would be used to build a cube
These are not repositiories, but rather GitHub organisations with repositories. For example one of the repositories in intersistems-ru organisation is MDX2JSON, and there is a LICENSE file present with MIT licence right at the root. Most other projects are also licensed (check LICENSE file in the root folder of a repository).
If for example you have Criteria defined like this:
Property Criteria As %String(MAXLEN = 2000); // MAXLEN>512
Try to define the property like this:
Property Criteria As %String(COLLATION = "TRUNCATE(490)", MAXLEN = 2000);
How to debug SQL queries:
1. In SMP > System > Configuration > General SQL Settings enable the following flags (don't forget to press Save):
Retains SQL Statement as Comments in .INT Code
Cached Query - Save Source
2. Purge all Cached Queries - execute in terminal (namespace with query):
Do $SYSTEM.SQL.Purge()
3. Execute the query again to get an error
4. Open in studio %sqlcq.HSREGISTRY.cls966.1.int routine (it would be %sqlcq.HSREGISTRY.cls1.1.int after purge)
5. Go to %0AmEdun+4 in this routine and see what this is about. Set try/catch, and debug.
In this case the most likely scenario is that the code tries to set global subscript longer than the maximum of 511 characters. Since the only change between queries is the column (there is also "as Relevance" part in your error query, but I think it's irrelevant) then it's probably something with that.
We use several providers, on all of them there are servers for development & testing and production. Some features are availible on DO, some only in other places. Can't say I found a cloud provider offering everything I want in one place.
Yes, DigitalOcean is quite good. I manage around 50 servers there and they don't disappoint. One issue I have is that they don't offer backup/snapshot management. All you can do with a backup is restore it to current or a new server. I'm used to features offered by other cloud providers, such as:
Browse backup disk image
Download disk image
But to do it in DigitalOcean I need to create a new droplet from a backup (takes time and costs money) and browse it.
Also their in-browser-web-access is quite lacking - they offer only VNC access, but not:
Please note, that another approach (put tstVar in the "public" list) suggested by Timothy Leavitt works better in most cases, as once defined a % variable can be modified anywhere within the process. With "public" list you retain full control over variable visibility which makes debugging much easier.
script --quiet myoutput.log
csession cache
work in terminal
hang
exit
If you want to log every command then you can enable it in SMP -> System Administration -> Security -> Auditing -> Configure System Events. Once there enable %System/%DirectMode/DirectMode event and every terminal command would be logged along with time and user who executed it. Audit must also be active, of course.
Yes, I'm searching for a ready code downloading from Gmail etc. Or at least code connecting to the server.
ClassMethod GmailAsPOP3() As %Net.POP3
{
Set server=##class(%Net.POP3).%New()
Set server.port=995
//just in case we plan to fetch any messages
//that have attachments
Set server.StoreAttachToFile=1
Set server.StoreInlineToFile=1
Set server.AttachDir="c:\DOWNLOADS\"
Set servername="pop.gmail.com"
Set server.UseSTARTTLS=1
Set server.SSLConfiguration = "GMail" //any empty enabled client SSL/TLS config
Set user="mail@gmail.com"
Set pass="pass"
Set status=server.Connect(servername,user,pass)
If $$$ISERR(status)
{
Do $System.Status.DisplayError(status)
Quit $$$ERROR()
}
Quit server
}
It returns this error:ERROR #6013: Unable to make TCP/IP connection to mail server. An earlier connection may not have been closed. [zConnectPort+39^%Net.POP3.1:EMAIL]
go to post
Good way to calculate such property. One question I have is why you use indirection and $name function in the generated method? It can be safely removed, for example like this:
go to post
Hello. You can do it like this:
go to post
These are not repositiories, but rather GitHub organisations with repositories. For example one of the repositories in intersistems-ru organisation is MDX2JSON, and there is a LICENSE file present with MIT licence right at the root. Most other projects are also licensed (check LICENSE file in the root folder of a repository).
go to post
What is the Criteria datatype?
Can you show the property definition?
If for example you have Criteria defined like this:
Property Criteria As %String(MAXLEN = 2000); // MAXLEN>512
Try to define the property like this:
Property Criteria As %String(COLLATION = "TRUNCATE(490)", MAXLEN = 2000);
How to debug SQL queries:
1. In SMP > System > Configuration > General SQL Settings enable the following flags (don't forget to press Save):
2. Purge all Cached Queries - execute in terminal (namespace with query):
3. Execute the query again to get an error
4. Open in studio %sqlcq.HSREGISTRY.cls966.1.int routine (it would be %sqlcq.HSREGISTRY.cls1.1.int after purge)
5. Go to %0AmEdun+4 in this routine and see what this is about. Set try/catch, and debug.
In this case the most likely scenario is that the code tries to set global subscript longer than the maximum of 511 characters. Since the only change between queries is the column (there is also "as Relevance" part in your error query, but I think it's irrelevant) then it's probably something with that.
go to post
A lot of foss source samples to analyze are availible at our GitHub organizations:
Also thank you & forked.
go to post
We use several providers, on all of them there are servers for development & testing and production. Some features are availible on DO, some only in other places. Can't say I found a cloud provider offering everything I want in one place.
go to post
Yes, DigitalOcean is quite good. I manage around 50 servers there and they don't disappoint. One issue I have is that they don't offer backup/snapshot management. All you can do with a backup is restore it to current or a new server. I'm used to features offered by other cloud providers, such as:
But to do it in DigitalOcean I need to create a new droplet from a backup (takes time and costs money) and browse it.
Also their in-browser-web-access is quite lacking - they offer only VNC access, but not:
go to post
"/" itself is also a valid REST path:
<Route Url="/" Method="GET" Call="Index"/>
go to post
Since when removing working functionality became a good thing?
WYSWIG does not support some formatting when creating an article (break tag for example).
How do I get to groups list now?
go to post
Learn -> Grous are missing.
Can't choose editor type now.
go to post
Thank you Stefan!
Yes, I'm asking about persistent data, of course.
go to post
Turns out FF renders the <pre> tag node with horisontal scrollbar (if required) and Chrome without. Ok.
go to post
I'm against that. As it is right now, I can copy/paste code from <pre> tag into the terminal and it would work.
The advantage of <pre> block is that it would be displayed exactly as the author intended.
If we add line breaks the code would not work after copy/paste into the terminal.
go to post
Some notes:
go to post
Please note, that another approach (put tstVar in the "public" list) suggested by Timothy Leavitt works better in most cases, as once defined a % variable can be modified anywhere within the process. With "public" list you retain full control over variable visibility which makes debugging much easier.
go to post
You can use script command for that
If you want to log every command then you can enable it in SMP -> System Administration -> Security -> Auditing -> Configure System Events. Once there enable %System/%DirectMode/DirectMode event and every terminal command would be logged along with time and user who executed it. Audit must also be active, of course.
go to post
Thanks
go to post
That and DeepSee, yes.
go to post
Yes, I'm searching for a ready code downloading from Gmail etc. Or at least code connecting to the server.
ClassMethod GmailAsPOP3() As %Net.POP3
{
Set server=##class(%Net.POP3).%New()
Set server.port=995
//just in case we plan to fetch any messages
//that have attachments
Set server.StoreAttachToFile=1
Set server.StoreInlineToFile=1
Set server.AttachDir="c:\DOWNLOADS\"
Set servername="pop.gmail.com"
Set server.UseSTARTTLS=1
Set server.SSLConfiguration = "GMail" //any empty enabled client SSL/TLS config
Set user="mail@gmail.com"
Set pass="pass"
Set status=server.Connect(servername,user,pass)
If $$$ISERR(status)
{
Do $System.Status.DisplayError(status)
Quit $$$ERROR()
}
Quit server
}
It returns this error:ERROR #6013: Unable to make TCP/IP connection to mail server. An earlier connection may not have been closed. [zConnectPort+39^%Net.POP3.1:EMAIL]
go to post
Hi, Luca.
IMAP would be better than POP I suppose.