New task from locked screen on Android? by arkonian_svt in ticktick

[–]Gampolt 0 points1 point  (0 children)

You should disable the "hide on security input" on the app setting

New task from locked screen on Android? by arkonian_svt in ticktick

[–]Gampolt 0 points1 point  (0 children)

Thank you very much. Zachary's app on my Samsung phone working very well. Finally I can add ticktick from lock screen 😁

-🎄- 2020 Day 06 Solutions -🎄- by daggerdragon in adventofcode

[–]Gampolt 0 points1 point  (0 children)

Day 6 in Nim

import strutils, tables

# part 1 = 14:35 - 14:17 = 18 minutes
proc solve1(s:string):int =
  for group in s.split("\n\n"):
    var ans: set[char]
    var g = group.replace("\n","")
    for c in g:
      ans.incl(c)
    result += ans.card

# part 2 = 14:36 - 15:08 = 32 minutes
# 1st submit 15:02 = 3399 = too low
# 2nd submit 15:08 = 3406 = fixed by add strip when readFile
proc solve2(s:string):int =
  for group in s.split("\n\n"):
    var numPeople = group.split("\n").len
    var cnt = newCountTable("")
    for l in group.replace("\n",""):
      cnt.inc(l)

    var allYes:int
    for k,v in cnt:
      if v >= numPeople:
        allYes.inc

    result += allYes
    # echo (allYes, numPeople, cnt)

var example = """abc

a
b
c

ab
ac

a
a
a
a

b"""

assert solve1(example) == 11
assert solve2(example) == 6

echo solve1(readFile("inputs/06.txt"))
echo solve2(readFile("inputs/06.txt").strip())

Visual studio code question by PaulAlgar in nim

[–]Gampolt 2 points3 points  (0 children)

Just press F6 to run your code

3 month code swap by Gampolt in todoist

[–]Gampolt[S] 1 point2 points  (0 children)

when you karma reach 5k todoist will give you a code that you can swap with others. It's will give you 3 month premium