go to post Dmitry Maslennikov · Mar 28, 2016 You can use class %Routine set rtn=##class(%Routine).%OpenId("hello.mac") write rtn.Size 88
go to post Dmitry Maslennikov · Mar 24, 2016 Thanks for the reply Luca, of course, I know that I can write my own script for it, and your ccontainermain it is a very good solution. And it works quite well, and with some my modifications, more informative now. And I hope that I can help to improve this tool.Now I am goid to write an article (in russian yet), about Docker+Caché+HAProxy, not as a micro-service, but with ECP, my containers will work as ECP-Applications with registration on HAProxy. And on github I have some questions which I now faced, when worked on it.
go to post Dmitry Maslennikov · Mar 24, 2016 I use such code in one of my projects ClassMethod Test() { set address="One Memorial Drive, Cambridge, MA 02142, USA" do ..GetCoords(address, .latitude, .longitude, .partialMatch) zw latitude, longitude, partialMatch } ClassMethod GetCoords(Address As %String, Output Latitute As %Float = "", Output Longitude As %Float = "", Output PartialMatch As %Boolean) As %Status { set params("address")=Address set sc=..CallGoogleAPI("/maps/api/geocode/json", .params, .data) if data.status="OK" { set result=data.results.$get(0) set PartialMatch = +result."partial_match" set Latitute = result.geometry.location.lat set Longitude = result.geometry.location.lng } quit $$$OK } ClassMethod CallGoogleAPI(Url As %String, ByRef Params, Output Data) As %Status { #;set Params("key")="your api key here" quit ..CallApi("maps.googleapis.com", 1, Url, .Params, .Data) } ClassMethod CallApi(Server As %String, Secure As %Boolean = 1, Url As %String, ByRef Params, Output Data) As %Status { set ht=##class(%Net.HttpRequest).%New() set ht.Server="maps.googleapis.com" set ht.Https=Secure set:Secure ht.SSLConfiguration=..GetSSLCertificate(Server) set param="" for { set param=$order(Params(param),1,value) quit:param="" do ht.SetParam(param, value) } set sc=ht.Get(Url) if $$$ISERR(sc) quit sc set Data={} set Data=Data.$fromJSON(ht.HttpResponse.Data) quit $$$OK } ClassMethod GetSSLCertificate(Server As %String) As %Status { new $namespace znspace "%SYS" do { quit:##class(Security.SSLConfigs).Exists(Server) set tSC=##class(Security.SSLConfigs).Create(Server) $$$ThrowOnError(tSC) } while 0 quit Server }
go to post Dmitry Maslennikov · Mar 22, 2016 Caché doesn't have Zlogin routine, if it is %-routine, it should be in CACHESYS and any others, could be placed in any database. Z-routine means that it is developed outside from InterSystems, they recommend to use such naming to prevent overwriting with system routines, present or future.
go to post Dmitry Maslennikov · Mar 18, 2016 Luca, may I ask, what exactly means InterSystems supports Docker now. I have not found anything about docker in documentation in version 2016.1. Actually I see that you already use docker with version 2015, and with 2016 I still have to use ccontainermain. It would be better if we could just use ccontrol for the same functionality as it now used ccontainermain.
go to post Dmitry Maslennikov · Mar 16, 2016 No, I've already bought Parallels. I thought that Parallels, much better in some cases then Fusion. And I don't even know how to localize this problem, because after restarting studio, it seems like everithing works well, but sometime when it happens when I edited some file, and studio locked it, then I need to kill previous Studio's job.
go to post Dmitry Maslennikov · Mar 16, 2016 John looks like you worried about your leadership in this contest, not sure that somebody could do more than you, in just one day now.
go to post Dmitry Maslennikov · Mar 16, 2016 Is anybody knows why Studio in Windows7 through Parallels which connected to server on the host, too often says that connection have been lost, and offers to restart Studio? Version used on both sides 2016.1.
go to post Dmitry Maslennikov · Mar 11, 2016 Murray thanks for your articles. But I think, should be mentioned metrics related to Write Daemon too, such as WDphase and WDQsz. Some time when our system looks works too slow, it may depends how quickly our disks can write. And I think in this case it is very usefull metrics. In my own experience I saw when in usual day our server started to work to slow in we saw that writedaemon all time was in 8 phase, and with PhyWrs we can count how many blocks were really written on a disk, and it was not so big count in that time, and so we found a problem in our storage, something related with snapshots. And when storage was reconfigured, our witedaemon continued to work as before quickly.
go to post Dmitry Maslennikov · Mar 11, 2016 How about this way, just USER>s rs=##class(%File).FileSetFunc("c:\intersystems\") USER>d rs.%Display() Name Type Size DateCreated DateModified ItemName C:\InterSystems\Deltanji D 2016-02-08 18:11:24 2016-02-08 18:21:28 Deltanji C:\InterSystems\EMS D 2013-10-22 10:10:17 2014-05-12 11:44:27 EMS C:\InterSystems\Ensemble10 D 2013-01-12 09:28:38 2015-11-06 12:25:53 Ensemble10 C:\InterSystems\Ensemble14 D 2013-10-22 10:00:14 2015-11-06 12:29:29 Ensemble14 Much simplier, end returns %SQL.ClassQueryResultSet *Func available since 2012.2
go to post Dmitry Maslennikov · Mar 11, 2016 In our project we started to use it when InterSystems suddenly moved %cspSession global from CACHETEMP to CACHE. And after that, all our chnages in %session.Data started journaling. And to prevent it, we use %ALL to map this global to CACHETEMP.
go to post Dmitry Maslennikov · Mar 10, 2016 I used this url and it looks works fine.https://atelier.artifactoryonline.com/atelier/atelier-beta-1.0/
go to post Dmitry Maslennikov · Mar 9, 2016 Unfortunately output window, just ignore any control characters, and not sure that is possible now.
go to post Dmitry Maslennikov · Mar 9, 2016 Much better If it would be possible to migrate or merge two accounts here. I have a WRC account on email from my current company, but what happens when I chnage a job. In this case I may loose access to any my content here. And I have another registration with my own email. It would be very nice if I could merge two of this accounts or something else, if I could use WRC and commonity with the same my own not corporate account.
go to post Dmitry Maslennikov · Mar 9, 2016 As I know you may only change default background color for document and for status pane, and this color will be different for different servers
go to post Dmitry Maslennikov · Mar 9, 2016 Using Gravatar, It is a good idea.But, I think there is a some problem with it. Most of accounts here uses corporate e-mails, but in any other places we are using our private e-mail, I do so. And I hava gravatar for years, and it uses only my private addresses, and sure most of people here too.
go to post Dmitry Maslennikov · Mar 9, 2016 Unfortunately, no one file can be downloaded, with 404 error