go to post Eduard Lebedyuk · Aug 29, 2016 Add init parameters: set htmlSnippet = "<h1>Hello</h1>" set regex = ##class(%Regex.Matcher).%New("<[^>]*>", htmlSnippet) set plainText = regex.ReplaceAll(" ") write !,plainText
go to post Eduard Lebedyuk · Aug 12, 2016 Both of these tools are for GitHub and Cache (not Git and Cache, but with easy customization required to support some other Git server API over HTTP).Cache Updater is a simple Cache task. You specify GitHub information (repository and user/pass if it's a private repo) and namespace. Then you set a schedule and that's it. Every time the tasks runs it downloads (and compiles) code from GitHub and into Cache Namespace.CacheGitHubCI is a full fledged CI system. You may specify pre and post compile actions, unit tests, etc. The results and timings of each build and action are saved and there are DeepSee dashboards available. GitHub webhooks are supported, which allows running builds immediately after there is a new commit in a repository.Which one you choose depends on your requirements. Cache Updater is very easy to set up, CacheGitHubCI offers more features.Both of them are built atop GitHub COS API, which provides COS wrappers for GitHub API.
go to post Eduard Lebedyuk · Aug 10, 2016 Then you need to specify MODE attribute as LOGICAL for that cspbind property. Documentation.
go to post Eduard Lebedyuk · Aug 10, 2016 Sure, execute this in a terminal to open a new terminal for an instance named cache: do $zf(-2,"cterm.exe /console=cn_ap:cache") $ZF(-2) docs, cterm docs.
go to post Eduard Lebedyuk · Aug 10, 2016 Please post the property definition.by default she send the value as DISPLAYLISTHow do you get property value?
go to post Eduard Lebedyuk · Aug 9, 2016 Here's the version for windows and most linux distros: ClassMethod RunPage(Url As %String = "http://intersystems.com") { #Include %occOptions Set Browser = $Select($$$isWINDOWS:"start", $$$isUNIX:"x-www-browser", 1:"x-www-browser") Set Command = Browser _ " " _ Url Do $ZF(-1, Command) }
go to post Eduard Lebedyuk · Aug 4, 2016 I doubt that this kind of information is available. Have you thought about wrapping global calls in a method? ClassMethod SetVal(glvn, value) { // track statistics, like $Username changed glvn from oldvalue to value, etc. set @glvn = value }
go to post Eduard Lebedyuk · Aug 4, 2016 Simpliest way: Cache executes an operating system command via $zf(-1) function.Alternatively, you can load a dll with $zf(-4) (also 3, 5) functions.There is also CNA project - it provides an interface for using native C-compatible shared libraries without anything but Caché ObjectScript code. CNA is a wrapper for libffi. CNA consists of native library (libcna) and Caché class (CNA.CNA). It is a wrapper around $zf functions.That said, the most effective would be some kind of a library load with library written in either C or generated from some computational language. For example Mathlab can generate C code, which can be then compiled into a library.
go to post Eduard Lebedyuk · Aug 4, 2016 Something like this? I had a similar problem, but the check was required only for part of the properties. If you want all of them, remove the line with continue. Method IsEmpty() As %Boolean [ CodeMode = objectgenerator ] { For i = 1:1:%class.Properties.Count() { Set Prop = %class.Properties.GetAt(i) CONTINUE:(Prop.Internal || Prop.Calculated || Prop.ReadOnly || Prop.Private || Prop.Identity) Do %code.WriteLine(" Quit:.." _ Prop.Name _ "'="""" $$$NO") } Do %code.WriteLine(" Quit $$$YES") }
go to post Eduard Lebedyuk · Aug 3, 2016 Are you in %SYS namespace? Underlying database (CACHELIB) is probably mounted as read-only.
go to post Eduard Lebedyuk · Aug 3, 2016 Inherit from EnsPortal.MessageViewer Copy searchPane from EnsPortal.Template.filteredViewer In searchPane, TimeFormat node replace attribute value="12" with value="999" Compile. Your new class would have Complete as TimeFormat default value Alternatively, instead of 2-4 you can set TimeFormat value in your class by overriding some init callback ( %OnAfterCreatePage maybe, don't forget to call ##super() though) and setting it there. It would be a better solution. 2020 UPDATE. I think I found a better solution. 1. Extend EnsPortal.MsgFilter.Assistant class. 2. In this class redefine EnumerateExecute method to provide the desired format. Replace this line: Do ..addTerm(.aSelect,"{fn RIGHT(%EXTERNAL(head.TimeCreated),"_dateLen_" )} As TimeCreated") to provide the format you need. Alternatively redefine OnFinalizeSQL to replace {fn RIGHT(%EXTERNAL(head.TimeCreated),999)} with something else. 3. Set the global ^EnsPortal.Settings("MessageViewer","AssistantClass") to the value of your class. This looks like an official way to modify MessageViewer behavior.
go to post Eduard Lebedyuk · Aug 3, 2016 12th piece is the FreezeOnError property for a Database and is always set to on (since 2008.1.0.217.0). The corresponding property FreezeOnError was removed from SYS.Database class.
go to post Eduard Lebedyuk · Aug 3, 2016 Sorry, I forgot that SYS.Database is deployed. You'll need to match $zu(49) to properties manually. But the macros usually have the same name. For example field 14 is sfnpiece macro ("piece" part of the name is irrelevant, so just sfn it is) and it corresponds to SFN property in SYS.Database. To test, you can write the following method: ClassMethod Test( Directory ) { Set db=##Class(SYS.Database).%OpenId(Directory) Write db.SFN = $p($zu(49),",",$$$sfnpiece) //14th piece // More checks }
go to post Eduard Lebedyuk · Aug 3, 2016 Check where in ParseZU49Info it takes field 14 and what property does it fills with that information. Check %syDatabase.inc for more information. #; Pieces of return value from $zu(49) #define mountpiece 1 #define blksizpiece 2 #define uicpiece 3 #define filsizpiece 4 #define expandpiece 5 #define maxblkpiece 6 #define glodirpiece 7 #define gloptrpiece 8 #define rdirpiece 9 #define rgrpiece 10 #define glogrpiece 11 #define freezepiece 12 #define colpiece 13 #define sfnpiece 14 #define totvolpiece 15 #define formatpiece 16 #define attribpiece 17 #define statuspiece 18 #define exptimepiece 19 #define nojrnpiece 20 #define bigdbpiece 21 #define curblkspiece 22 #define blkspermappiece 23 #define curmapspiece 24 #define resourcepiece 25 #define enckeyidpiece 26
go to post Eduard Lebedyuk · Aug 3, 2016 ParseZU49Info method in SYS.Database class translates $ZU(49) call into SYS.Database properties.
go to post Eduard Lebedyuk · Aug 3, 2016 - where can I get cache.node? The link in the Intersystmes documentation http://globalsdb.org/downloads/ doesn't work. I found cache0100.node and cache0120.node in my Cache instance's \bin directory. But I am not sure if I can use them or not.Cache instance's \bin directory is the correct path.Can anyone recommend any tutorial or code example with installation instructions?Samples are provided in <CacheDir>\dev\node.js\samples directory. Installation instructions are located in settings.js file.
go to post Eduard Lebedyuk · Jul 29, 2016 If they are defined in one class, try: ClientMethod logout() [ Language = javascript ] { this.DoLogout(); }