go to post Dmitry Maslennikov · Feb 22, 2018 try this call set rs=##class(%File).FileSetFunc("c:\") if rs.%SQLCODE { write rs.%SQLCODE," - ",rs.%Message } else { do rs.%Display() }
go to post Dmitry Maslennikov · Feb 22, 2018 You can just pass any value to the called by #server(..myMethod(arg1,arg2))# or #call(..myMethod(arg1,arg2))# method. Look at my simple example. Class User.Page Extends %CSP.Page { ClassMethod OnPage() As %Status { &html<<html> <head>> write ..HyperEventHead() &html< </head> <body> <label><input id="chbox" type="checkbox" onchange="checkboxChanged(this);"> Choose me </label><br> <select id="combo">> write ..comboboxOptions() &html<</select>> &html< <script language="javascript"> function checkboxChanged(chbox) { var options = #server(..comboboxOptions(chbox.checked))#; document.getElementById("combo").innerHTML = options; } </script> </body> </html>> Quit $$$OK } ClassMethod comboboxOptions(chbox = 0) { set options = "" if chbox { set options = options _ "<option value=""11"">test1</option>" set options = options _ "<option value=""12"">test2</option>" set options = options _ "<option value=""13"">test3</option>" set options = options _ "<option value=""14"">test4</option>" } else { set options = options _ "<option value=""11"">value1</option>" set options = options _ "<option value=""12"">value2</option>" set options = options _ "<option value=""13"">value3</option>" set options = options _ "<option value=""14"">value4</option>" } return options } }
go to post Dmitry Maslennikov · Feb 21, 2018 you can use cterm.exe for this task, so, you can run some script, or routine in Cache or just run cache.exe directly. Microsoft Windows [Version 10.0.16299.248] (c) 2017 Microsoft Corporation. All rights reserved. C:\Users\Admin>c:\intersystems\ensemble\bin\cache.exe -sc:\intersystems\ensemble\mgr\ Node: DESKTOP-4IDCEJ0, Instance: ENSEMBLE USER>
go to post Dmitry Maslennikov · Feb 21, 2018 I hope this can explain USER>zzdump $lb(100,200,50) 0000: 03 04 64 03 04 C8 03 04 32 ..d..È..2 USER>zzdump $lb("100","200","50") 0000: 05 01 31 30 30 05 01 32 30 30 04 01 35 30 ..100..200..50 USER>k set mem=$s,mem=$s set a=1234567890 write mem-$s 8 USER>k set mem=$s,mem=$s set a="1234567890" write mem-$s 32 storing numbers as numbers in $listbuild, is a bit cheapier in memory But sorry, I don't understand your worry about, how numbers were stored. It mostly does not matter. If I not mistaken, only one place where numbers as numbers are matter is $ZHEX function, which returns different result for string and for a number.
go to post Dmitry Maslennikov · Feb 19, 2018 you can generate script right before call csession, but you don't need to save it to file. echo -e "Write \"CurrentPath = ${PWD}\"\n" \ "Write \"CurrentShell = ${SHELL}\"\n" \ "halt\n" \ | csession cache -U%SYS Or if you already have some script file as a template, you can use command envsubst (maybe you have to install it), which will replace these variables with real values. envsubst text.txt | csession cache -U%SYS
go to post Dmitry Maslennikov · Feb 16, 2018 replace Hyphen to tab may help write $tr($zcvt($tr("JOHN SMITH-DOW", "-", $c(9)), "W"), $c(9), "-") John Smith-Dow
go to post Dmitry Maslennikov · Feb 14, 2018 This error will happen on Windows and macOS, due to docker uses overlay driver there, which is not supported. You should configure Docker daemon to use aufs as storage driver instead.This screenshot from macOS, on Windows a bit different, but anyway, you should choose Daemon, and switch to advanced mode, where you can use daemon settings in JSON format, just add "storage-driver": "aufs", and Apply this changes. It will apply and restart daemon. After that it should work.
go to post Dmitry Maslennikov · Feb 11, 2018 Yep, both versions are popular, but anyway they prefer Angular name.For React I think, better just React as well. As written on their website.
go to post Dmitry Maslennikov · Feb 11, 2018 I think it would be better to rename AngularJS to Angular. Angular is the name for the Angular of today and tomorrow. AngularJS is the name for all v1.x versions of Angular.
go to post Dmitry Maslennikov · Feb 11, 2018 With Base64 possible to encode everything, text or binary data, such as PNG. To store it you should first decode it. But, if your image in DataURI format, first, you have to get only base64. set png="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==" set b64=$piece(png,"base64,", 2) To encode Base64 in Caché you can use $system.Encryption.Base64Encode(), and $system.Encryption.Base64Decode() to decode. set binary=$system.Encryption.Base64Decode(b64) But these methods support only string and does not support streams. So, you have to write this encoded data, to your file content. Do not forget to use Binary stream classes (%Stream.FileBinary, %Stream.GLobalBinary) to store binary information. set file=##class(%Stream.GlobalBinary).%New() do file.Write(binary) But if your Base64 too long, you can decode by parts with length divisible by 3.
go to post Dmitry Maslennikov · Feb 9, 2018 Sorry Nicole, it is planned for version 1.5. While we waited for current version 1.1 since 1.0 one year. So, it will be solved in 4 years. Please correct me if I'm wrong.And about issues on WRC. I really don't like an idea to fill issues with Atelier with WRC. This issues should be publicly available, where users of this IDE can even vote for some issues. It would be much better if InterSystems will open special repository on GitHub for issues in Atelier.
go to post Dmitry Maslennikov · Feb 9, 2018 USER>write $zcvt("mY sImPlE eXaMpLe", "W") My Simple Example $ZCONVERT W or wWord translation: Convert the first character of each word in string to uppercase. Any character preceded by a blank space, a quotation mark ("), an apostrophe ('), or an open parenthesis (() is considered the first character of a word. Word translation converts all other characters to lowercase. Word translation is locale specific ; the above syntax rules for English may differ for other language locales.S or sSentence translation: Convert the first character of each sentence in string to uppercase. The first non-blank character of string, and any character preceded by a period (.), question mark (?), or exclamation mark (!) is considered the first character of a sentence. (Blank spaces between the preceding punctuation character and the letter are ignored.) If this character is a letter, it is converted to uppercase. Sentence translation converts all other letter characters to lowercase. Sentence translation is locale specific ; the above syntax rules for English may differ for other language locales.
go to post Dmitry Maslennikov · Feb 9, 2018 Wireshark is a good tool, but it covers all network. And maybe too much for you. And not so much suitable for HTTP requests inspections. I can suggest you use something like Fiddler. And you should look at this article.
go to post Dmitry Maslennikov · Feb 9, 2018 It will not work with Angular or any other modern web application and developed in right way. All pages opened without Cache at all. Web Application is made from static JavaScript, and this app can some time call REST on the server to fetch some data. And sessions now should be endless and stateless. You can only measure server's time.
go to post Dmitry Maslennikov · Feb 6, 2018 It should not be a problem. I do Angular2+ application, but I have not done this logging. But, as far as I know, it is possible to subscribe to any routing changes. import 'rxjs/add/operator/pairwise'; import { Router, ActivatedRoute } from '@angular/router; export class AppComponent { constructor( private router: Router, private activatedRoute: ActivatedRoute) { this.router.events .filter(event => event instanceof NavigationStart) .subscribe((event:NavigationStart) => { console.log(event.url) }); // OR this.activatedRoute.url.subscribe(url =>{ console.log(url); }); } } And you can then call any API as you want
go to post Dmitry Maslennikov · Feb 5, 2018 How to determine if a class is mapped (e.g. from CACHELIB)
go to post Dmitry Maslennikov · Feb 5, 2018 I don't know what another telnet client you are using, but I suggest that in this client used some special font, which supports to show such invisible chars. ZWrite shows non-display characters as $char and ZZDump can just show everything as hex dump.