InterSystems delivered Cache distributive as a DMG file until 2016.2. And fortunately, they decided do not do it anymore.

But all the time, it was also available as tar.gz. Which is working in exactly the same way as any other Linux version.

So, you can use ccontrol tool, to see a list of instances, their status and start or stop.

csession can be used as a terminal in windows.

To open System Management Portal, you can just this URL in a Browser - http://localhost:57772/csp/sys/UtilHome.csp

I think could be even shorter, but as is

  set sum = 0, north = ""
  set fs = ##Class(%Stream.FileCharacter).%New()
  set sc=fs.LinkToFile("day4.txt")
  while 'fs.AtEnd {
    set line = fs.ReadLine()
    do line(line)
  }
  !,"Sum = ",sum
  !,"North = ",north
  q
line(line) [ sum, north ] {
  set name = $p(line, "-", 1, * -1)
  set checkSumm = $piece($piece(line, "]"), "[", *)
  for i=1:1:5 {
    set char = $e(checkSumm, i)
    set count = $l(name) - $l($tr(name, char))
    set order( - count, char) = ""
  }
  set testSumm = ""
  set i=""
  for {
    set = $o(order(i))
    quit:i=""
    quit:i=0
    set = ""
    for {
      set = $o(order(i, c))
      quit:c=""
      set testSumm = testSumm _ c
    }
  }
  if testSumm=checkSumm {
    set sector = $piece($piece(line, "["), "-", *)
    set sum = sum + sector
    for i=1:1:sector set name = $tr(name, "zabcdefghijklmnopqrstuvwxy-", "abcdefghijklmnopqrstuvwxyz ")
    if name["north" set north = sector
  }
}

One code for both passwords

  set doorId = "reyedfim"
  set (pass1,pass2) = ""
  for i=1:1 {
    set hash = $system.Encryption.MD5Hash(doorId _ i)
    set key1 = $zla($reverse($e(hash, 1, 3))_$c(0))
    continue:key1>15
    if $l(pass1)<8 set pass1 = pass1 _ $zhex(key1)
    continue:key1>7
    continue:$tr($e(pass2, key1 + 1)," ")'=""
    set $e(pass2, key1 + 1)=$zhex($a($e(hash,4))\16)
    quit:($l($tr(pass2," "))=8)
  }
  !,"Password #1 = ",pass1
  !,"Password #2 = ",pass2

Mine

  set fs = ##Class(%Stream.FileCharacter).%New()
  set sc=fs.LinkToFile("day6.txt")
  while 'fs.AtEnd {
    set line = fs.ReadLine()
    do line(line)
  }
  set (msg1,msg2)=""
  for i=1:1 {
    quit:'$d(count1(i))
    if $o(count1(i, ""), -1, char) set msg1 = msg1 _ char
    set msg2 = msg2 _ $o(count2(i, $o(count2(i, "")), ""))
  }
  !,"msg1 = ",msg1
  !,"msg2 = ",msg2
  q
line(line) [symbols, count1, count2 ] {
  i=1:1:$l(line) {
    set char = $e(line, i)
    set count = +$get(symbols(i, char))
    kill count2(i, count, char)
    set count = $i(symbols(i, char))
    set count1(i, count) = char
    set count2(i, count, char) = ""
  }
}

Look at my solution for this task

   k
  set fs = ##Class(%Stream.FileCharacter).%New()
  set sc=fs.LinkToFile("day8.txt")
  set count=0,width=50,height=6
  for = 1:1:width for = 1:1:height set screen(x,y) = 0
  while 'fs.AtEnd {
    set line = fs.ReadLine()
    do line(line)
  }
  do draw()
  set count = 0
  for x=1:1:width for = 1:1:height set count = count + screen(x,y)
  !!,"Count = ", count 
  quit
line(line) [screen, width, height, x, y] {
  set $lb(cmd, size, pos, , by) = $lfs(line, " ")
  if cmd = "rect" {
    set $lb(mx, my) = $lfs(size, "x")
    = 1:1:mx y=1:1:my set screen(x,y) = 1
  else {
    set $lb(v1, pos) = $lfs(pos, "=")
    set v2=$case(v1, "x":"y", :"x")
    set max = $case(v1,"x":height, :width)
    set @v1 = pos + 1, @v2 = 1
    for i=1:1:by {
      set prev = $g(screen(x,y))
      for @v2 = 2:1:max set $lb(screen(x,y), prev) = $lb(prev, screen(x,y))
      set @v2 = 1
      set screen(x, y) = prev
    }
  }
}
draw() [screen, width, height] {
  = 1:1:height {
    !
    = 1:1:width {
      write $case($get(screen(x,y)), 1:"#", :" ")
    }
  }
}

And for the second part, a bit different.

  set fs = ##Class(%Stream.FileCharacter).%New()
  set sc=fs.LinkToFile("day7.txt")
  set count=0
  while 'fs.AtEnd {
    set line = fs.ReadLine()
    if $locate(line, "(\w)(?!\1)(\w)\1\w*(?:\[\w+\]\w*)*\[\w*\2\1\2\w*\]")||$locate(line, "\[\w*(\w)(?!\1)(\w)\1\w*\](?:\w*\[\w+])*\w*\2\1\2"), $i(count)
  }
  !,count 

Interesting, but I don't understand why you still trying to parse strings manually when InterSystems already supports Regex.

 set fs = ##Class(%Stream.FileCharacter).%New()
 set sc=fs.LinkToFile("day7.txt")
 set count=0
 set abba = ##class(%Regex.Matcher).%New("(\w)(?!\1)(\w)\2\1")
 set hyper = ##class(%Regex.Matcher).%New("\[\w*(\w)(?!\1)(\w)\2\1\w*\]")
 while 'fs.AtEnd {
   set line = fs.ReadLine()
   set abba.Text = line
   set hyper.Text = line
   if abba.Locate(),'hyper.Locate(),$i(count)
 }
 !,count 

So simple, isn't it?

For regex maniac, maybe possible to join both regex's to one to get fewer operations. But anyway, in this simple example you can see the power of Regex.

And even shorter

 set fs = ##Class(%Stream.FileCharacter).%New()
 set sc=fs.LinkToFile("day7.txt")
 set count=0
 while 'fs.AtEnd {
   set line = fs.ReadLine()
   if $locate(line, "(\w)(?!\1)(\w)\2\1"), '$locate(line, "\[\w*(\w)(?!\1)(\w)\2\1\w*\]"), $i(count)
 }
 !,count 

Documentation now looks quite pure about Atelier. 

As far as I know, Studio does lock for any files which in edit mode, not just opened but after some changes. While Atelier does not. When you save the file in Studio, it does not care what did you have before it just overrides. When Atelier checks if server's version was changed it offers to compare and choose what should be stored on server.

Yep, right, looks like Index can't help here and problem not only 511(and this length could be different on different strings).
But, you still can use Index but you should set length which should be stored. But find duplicates you can do without SQL, just by reading this index, it should be much faster, to find, all duplicates by indexed value, and then you can compare real values.

Danny, 
 

Thanks, It's amazing, to see such articles. 

But how about coding style. If to be honest, your code looks like a mess of old-school code and modern.

As this articles mostly for beginners, it would be much better to have also modern style. Instead of OPEN/USE/READ use %Stream classes. I see this way as much readable.

And about how you use standalone ELSE command without brackets, not sure that beginners, can quickly get the trick here.

Open file:"R":1 Else  Use 0 Write "Could not open file ",file Quit

I would recommend instead of mark such object as deleted, with such flag like this. Just "move" it to another table some kind of Trash, when you can store this object as a serialized string for example. In this case object will really disappear from his table and will not be availble with via SQL or any other accesses. But in this Trash, you can have information about deletion data, who deleted and information to restore it.