go to post Eduard Lebedyuk · Dec 10, 2017 Sourceforge link is dead. Is there any other way to get sources?
go to post Eduard Lebedyuk · Dec 9, 2017 Should be 100 in CLS, xml doesn't cut it. [@Evgeny Shvarov]?There is also this version. Don't know which is better.
go to post Eduard Lebedyuk · Dec 9, 2017 1. cls is used by several others languages there, it's okay.2. We need more than 100 CLS repositories to add our highlighting to GitHub3. GitHub language grammar == Atom language grammar. We have one, but it needs work.
go to post Eduard Lebedyuk · Dec 8, 2017 Extended global reference.Process private globals.Can you show examples of the second case?
go to post Eduard Lebedyuk · Dec 8, 2017 System Management Portal -> Menu -> Databases -> HSAUDIT -> Mount RO (remove check) -> Save.
go to post Eduard Lebedyuk · Dec 8, 2017 Here's the code I ran: Class User.XMLTest { /// do ##class(User.XMLTest).Test() ClassMethod Test() { set source = ..GetXData("Source") set xslt = ..GetXData("XSLT") #dim result As %Stream.Object set sc = ##class(%XML.XSLT.Transformer).TransformStream(source, xslt, .result) do result.OutputToDevice() } ClassMethod GetXData(name) As %Stream.TmpCharacter [ CodeMode = expression ] { ##class(%Dictionary.XDataDefinition).IDKEYOpen($classname(), name).Data } XData Source { Your Message } XData XSLT { Your XSLT } } and here's the result: { "Message" : { "Header" : { "Code" : "HOT", "Date" : "2017-12-08 11:22:34.658" }, "Body" : [ { "Code" : "HOT", "Name" : "SIDE", "Type" : "AADULT", "Sec" : "MSec", "ardge" : "Adult", "Nder" : "F", "TBC" : "21", "BO" : "14", "DBOC" : "0", "LBC" : "5", "AB" : "2" }, ... Check %objlasterror and also check your XML encoding, there may be problems if your encoding does not match declaration.
go to post Eduard Lebedyuk · Dec 7, 2017 So, for now, yes. I changed to articleIt was a question? My bad, I thought I created an article.
go to post Eduard Lebedyuk · Dec 7, 2017 But how about getting not just a progress but how to get some data before task finished. Append to data global as required and get data on each check, not only for complete requests?And also, I see beg security Issue, when I can get information from any other process. You use TaskId directly from the request like you trust everybody. And also easy to get SUBSCRIPT error.I completely agree that it's unsecure and with no $get(). But it's a minimal implementation, so I skipped a lot of details.BTW: do you suppose to acept someone's answer? Looks like it is mostly just discissing topic.I think it's more of a discussion topic. That's why it's an article and not a question.
go to post Eduard Lebedyuk · Dec 7, 2017 You're getting an error: :ERROR{ERROR #5002: Cache error: <PROPERTY DOES NOT EXIST>zXMLTOJson+6^TestEnvironment.Custom.GENERAL.CUSTOM.XLT.XMLToJsonOperation1.1 *Parameters,EnsLib.EDI.XML} Which means : Class is EnsLib.EDI.XMLIt does not have Parameters propertyError is found in the 6th line of zXMLTOJson routine in TestEnvironment.Custom.GENERAL.CUSTOM.XLT.XMLToJsonOperation1.1 6th line is probably this: Set tSC = ..Transform(tInput,tSSKey,pRequest.Parameters,.tOutput) and pRequest object (of EnsLib.EDI.XML class) does not have Parameters property. Your call should probably be: Set tSC = ..Transform(tInput,tSSKey,pRequest,.tOutput)
go to post Eduard Lebedyuk · Dec 7, 2017 I thought about actually building the tree in ppg and recursively iterating over it till the error is pinpointed. But it sure would take a lot of time to implement. What's your approach? Any shortcuts?
go to post Eduard Lebedyuk · Dec 6, 2017 I first translated each word into normalized form - array of [letter, number of occurrences], ordered by letters. And then just checked if given normalized form already exists: ClassMethod IsLettersUnique(word) As %Boolean { set length = $length(word) for i=1:1:length { set letter = $e(word, i) set temp(letter) = $i(temp(letter)) } set normalized = "" set key = "" for { set key=$order(temp(key),1, occurrences) quit:key="" set normalized = normalized _ key _ occurrences } quit:$d(%normalized(normalized))>0 $$$NO set %normalized(normalized) = 1 quit $$$YES } Normalized words: aaba -> a3b1aaab -> a3b1
go to post Eduard Lebedyuk · Dec 6, 2017 Add: Set email.Charset = "UTF-8" Set email.IsHTML = $$$YES and add text in html, for example: Do email.TextData.Write($$$FormatText("Hello %1!<br>Thank you for visiting %2!", "Name", "Location")) Also if your BO has only one method you can name in OnMessage and remove XData altogether. If new lines is really the only thing you need formatting-wise, you can use WriteLine method and send plain text emails: Do email.TextData.WriteLine($$$FormatText("Thank you for your recent visit to %1.", "Location")) Do email.TextData.WriteLine("We continue to look for ways to improve and your feedback is important.") Do email.TextData.WriteLine($$$FormatText("Please take a few moments to complete our survey by following the link provided below, or by completing the paper survey you may have received at discharge from your recent visit at %1.", "Location"))
go to post Eduard Lebedyuk · Dec 3, 2017 Should've done Day 3 part 1 same as you. Deriving the formula took me like half an hour.
go to post Eduard Lebedyuk · Dec 3, 2017 Here's mine: https://github.com/eduard93/AOC/tree/master/AOC
go to post Eduard Lebedyuk · Dec 2, 2017 I'm in. Here's my solution. Thought about using $zstrip, but while it can remove duplicates, it can't leave only duplicates: w $zstrip("11223","=E") 123 Also, for second task it says: 1212 produces 6: the list contains 4 items, and all four digits match the digit 2 items ahead. 1221 produces 0, because every comparison is between a 1 and a 2. Shouldn't 1221 produce 3 as first 2 and second 1 match. Currently failed on second task with 10938.
go to post Eduard Lebedyuk · Dec 1, 2017 Would skip classes with several levels of inheritance from %Persistent. Use SubclassOf query instead.
go to post Eduard Lebedyuk · Dec 1, 2017 URL map can also be splitted into several parts: XData UrlMap [ XMLNamespace = "http://www.intersystems.com/urlmap" ] { <Routes> <!-- Api version 1 --> <Map Prefix="/v1" Forward="Api.v1"/> <!-- Api version 2 --> <Map Prefix="/v2" Forward="Api.v2"/> </Routes> } And brokers in Api.v1 and Api.v2 would process the requests according to their URL Map.