The most common usecase is generating data models based on the database, mostly using t4 files so far. We have a non-standard way of defining some parts of it so the default MS tools don't quite cut it (like ef dbcontext scaffold). I've been looking into roslyn but it seems like it might be more trouble than its worth, but default t4 doesn't even have a proper editor and syntax highlighting so its a low bar atm.
Cyno
If our content gets federated to threads then it just means that google results will point to it first rather than to us, they will probably have better indexing and search features than the fediverse. People will also probably think the content originated on threads too (since that's where they see it and threads could easily obfuscate info like that) instead of who actually made it.
It could increase the short term engagement but in the long run, it will just serve to make threads better.
I was really hoping there was something like hamachi/xfire/garena from the old days but modernized and more stable 😅 I just assumed it'd be a solved problem by now.
I'm not giving up on tailscale yet, I'll try the funnel feature but yeah... seems a bit troublesome for sure
Thanks for linking that, seems like a great resource! Seems like there's a few that support UDP although I'm not sure if they will work with a CGNAT setup, also their setup seems a bit more complicated and technical than expected but I need to look more into it tomorrow. If everyone else needs to have this installed then that might be an issue
🤷♂️ Downvotes are meaningless, I'd rather see them give an actual counterargument if they have one but im used to it from reddit
That's not really a good solution although it is a temporary workaround.
- Many users won't know this is a feature they can use, or how to set it up
- Some users use alternative instances that federate with lemmy which might not have this feature
- Content still gets copied and hosted on this instance which might not be desireable
Besides, at the end of the day, shouldn't the admins and mods here curate the content according to the community's guidelines and spirit? If someone started spamming undesired content on a forum you're administrating, the answer wouldn't be "all the users can just block it if it's an issue". I don't think it should be the answer here either
Having a prepared grid helper for AoC is a 150IQ move 😁
I went with a matrix approach and was just planning to handle it through indexes but kinda gave up halfway implementing the finding of numbers, their start/end positions... I'm guessing a regex but that might have issues if we have identical numbers later, so not sure. Will surely go back to it eventually though :P
Thanks, I managed to find the culprit in the end however - I was using a forward-look of 5 characters for finding if it matches a word so in a string of a3two for example, it would register the two before the 3. It was an easy fix once i found the issue.
Thanks, I managed to find the culprit in the end however - I was using a forward-look of 5 characters for finding if it matches a word so in a string of a3two for example, it would register the two before the 3. It was an easy fix once i found the issue.
Was pretty simple in Python with a regex to get the game number, and then the count of color. for part 2 instead of returning true/false whether the game is valid, you just max the count per color. No traps like in the first one, that I've seen, so it was surprisingly easy
def process_game(line: str):
game_id = int(re.findall(r'game (\d+)*', line)[0])
colon_idx = line.index(":")
draws = line[colon_idx+1:].split(";")
# print(draws)
if is_game_valid(draws):
# print("Game %d is possible"%game_id)
return game_id
return 0
def is_game_valid(draws: list):
for draw in draws:
red = get_nr_of_in_draw(draw, 'red')
if red > MAX_RED:
return False
green = get_nr_of_in_draw(draw, 'green')
if green > MAX_GREEN:
return False
blue = get_nr_of_in_draw(draw, 'blue')
if blue > MAX_BLUE:
return False
return True
def get_nr_of_in_draw(draw: str, color: str):
if color in draw:
nr = re.findall(r'(\d+) '+color, draw)
return int(nr[0])
return 0
# f = open("input.txt", "r")
f = open("input_real.txt", "r")
lines = f.readlines()
sum = 0
for line in lines:
sum += process_game(line.strip().lower())
print("Answer: %d"%sum)
Git Fork is amazing