Today's challenge is about decompressing input that is compressed in an experimental format. In the format, markers indicate how much time a number of characters need to be repeated.
The input in today's challenge consists of an encrypted name, a dash, a sectorID, a dash and a checksum between brackets. A name is real if the checksum is equal to the five most common letters in the encypted name.
The challenge of day 5 is to calculate a password of 8 characters by finding the MD5 hash of the input and an increasing integer index. The password is constructed by taking the 6th character of the first 8 hashes that start with 5 zeroes (in hex representation).
Advent of Code is a series of 25 small programming challenges, it's an ideal way for beginners to start learning a computer language, and for advanced people to sharpen their programming skills.
There are small and bigger puzzles, which you can solve typically in half an hour to a few hours. (Looking at the leaderboard, the top aces can do them in less than 10 minutes.)
Hi everybody, We have written a convert from Punycode. This is reformed from javascript. Perhaps many non-English systems need to use this feature in domain name resolution. Anyone can use and change the code as needed.
It is easy to receive JSON representation or dynamic Array from %ListOfDataTypes:
set l=##class(%ListOfDataTypes).%New()
do l.Insert("a")
do l.Insert("b")
do l.Insert("c")
set arrStr=l.$toJSON()
zwrite arrStr
set arr=l.$compose([])
zwrite arr
How to make backward conversion? How to receive %ListOfDataTypes from dynamic Array an JSON string?
RESTFormsUI calls %Save() for me, which is great. But I want to set the property CreationDate with the current date for every new record being inserted.
So object callback implementation seems as a reasonable option. I did the following:
Inspired by the article "Declarative development in Caché" that's still trending on the dev com. The OP explored a functional style of iterating over a collection. A comment today suggested "Caché would need syntax support for anonymous functions".
With Macros you can kind of get anonymous like syntax using dot notation.
This is not production code, but it does work. First the macros...
A feature I recently used in working on ISC internal applications is the ability to send emails on behalf of someone. This is useful when generating system notifications from an application when you want some of them to show up as being from a specific person, perhaps posting comments on a work ticket.
In my case I was updating our facilities work order system for tracking requests. Normally all notification emails are sent from the same noreply email address. I wanted to change that so comments added from the original requester would show up as being from them and stand out.
As more people join Developer Community, and with increasing efforts to promote code sharing, I'd like to draw fresh attention to this post I wrote a year ago. It spotlights a feature within the class compiler which is both useful and dangerous. When importing code (e.g. from an XML export of classes received from someone), it's worth considering the risks.
Even if that post doesn't seem relevant to you at the moment you may wish to note it for the future. A handy way of doing this is to click the star icon at the end of it.
This is the second part of my long post about package managers in operating systems and language distributions. Now, hopefully, we have managed to convince you that convenient package manager and rich 3rd party code repository is one key factor in establishing of a vibrant and fast growing ecosystem. (Another possible reason for ecosystem success is the consistent language design, but it will be topic for another day.)
It is not possible in a COS (Caché Object Script) job/process context to have multiple Named Pipes. It is a one Named Pipe per job/process limited line of communication.
Named Pipes, in Caché, like most pipes on most operating systems are Unidirectional. That means you open them for either Read or Write, but not both.
Many mobile applications that enable users to get information about road fines and pay them, send notifications about newly added fines. This functionality can be efficiently implemented using push notifications sent to users’ devices.
Our application was not an exception. The server side is based on the Ensemble platform that offers integrated support of push notifications starting from version 2015.1.
Consider you need to exclude substring(s) from a string.
I did it with the following snippet:
/// excludes all the substrings from the string
ClassMethod ExcludeSubstring(substr,str as %String) As %String
{
while ($L(str,substr)>1) {
set str=$Piece(str,substr)_$Piece(str,substr,2,*)
}
quit str
}