

Dann sollte Putin mal jemand Bescheid geben, dass er Nazis bezahlt und unterstützt obwohl er die in der Ukraine ja bekämpfen will.


Dann sollte Putin mal jemand Bescheid geben, dass er Nazis bezahlt und unterstützt obwohl er die in der Ukraine ja bekämpfen will.
Of course that’s not what the end state should be but while Lemmy is still growing it’s better to have something to work off than to wait around for good discussions to just appear.
Interesting. Could you also see a reason for why they downvoted? Do they downvote a specific type of content or do they downvote just about everything?
Did he make more of these and does he post them anywhere online?
a = (√a)^2 = √a √a
Then you have (√a √a) /(2 √a) = 6 and can cross out one √a and multiply by 2 to get √a = 12
I’ve never been one to post much on any social media platform but on Lemmy I try to make it up by upvoting things I want to see on the platform and commenting to get discussions going.
Can you not recreate that same community on a different instance with the rules that you want?
The amount of upvotes you get on your posts says something different
Yeah they’re doing a huge service to the Fediverse. I’ve had a few times where I saw posts from the same people across totally different communities to the point where I’m wondering if they’re actually interested in all these subjects or just posting for the sake of it.


Yes I have the ear buds and they’re the only buds i would buy since they have replacable batteries and don’t become e-waste the moment that dies.
The bass is amazing however in the default EQ setting the highs are severely lacking. I was able to fix this with a custom eq and now the sound is good however don’t expect HiFi quality. The drivers kind of feel like they are made for bass and a second driver for highs was omitted.
Today I saw that they updated the accompanying app and now the EQ has less sliders so I will have to see if the sound can still be corrected the way I want it.
Edit: These are my first ear buds so I don’t have a comparison.
There’s also a community for this [email protected]
Weiß nicht ob das jetzt sein muss daraus auf die Meinung der ganzen Community zu schließen


Also unlike reddit you can create your own community on another instance or even run your own instance according to your own rules.
I would of made this post myself but I like literally don’t care enough.
And that you can tell which editor a person uses based on how they remap it
This one took way to long to do because I got hung up on what turned out to just be forgetting to rename functions when copying code from part 1 to part 2.
I did part 1 in language but turned to regex for part 2.
#!/usr/bin/elixir
defmodule GiftShopDatabase do
def getRanges(filename) do
{:ok, content} = File.read(filename)
input = String.trim(content)
ranges = []
currLowerLim = ""
currNum = ""
parseRanges(input, ranges, currLowerLim, currNum)
end
defguardp isDigit(c) when c in ?0..?9
defp parseRanges(input, ranges, currLowerLim, currNum) do
case input do
<<>> -> Enum.reverse([{currLowerLim,IO.iodata_to_binary(currNum)} | ranges])
<<",", rest::binary>> ->
#newUpperLim = IO.iodata_to_binary(currNum) |> String.to_integer
newUpperLim = IO.iodata_to_binary(currNum)
parseRanges(rest, [{currLowerLim,newUpperLim} | ranges], currLowerLim, "")
<<"-", rest::binary>> ->
#newLowerLim = IO.iodata_to_binary(currNum) |> String.to_integer
newLowerLim = IO.iodata_to_binary(currNum)
parseRanges(rest, ranges, newLowerLim, "")
<<char::utf8, rest::binary>> when isDigit(char) ->
parseRanges(rest, ranges, currLowerLim, [currNum | <<char>>])
other -> raise "[ ERROR ] unkown input:#{inspect(other)}"
end
end
def getInvIDSum(ranges, invIDSum) do
case ranges do
[] -> invIDSumString.to_integer(elem(range,0)), invIDSum))
[range | rest] -> getInvIDSum(rest, invIDSum+checkRange(range, String.to_integer(elem(range,0)), 0))
other -> raise "[ ERROR ] invalid ranges given:#{inspect(other)}"
end
end
defp checkRange(range, currID, invIDSum) do
strUpperLim = String.to_integer(elem(range,1))
unevenDigitCount = rem(String.length(Integer.to_string(currID)),2)
case currID do
_ when currID > strUpperLim -> invIDSum
_ when unevenDigitCount == 1 -> checkRange(range, currID+1, invIDSum)
_ -> checkRange(range, currID+1, invIDSum + checkID(currID))
end
end
defp checkID(currID) do
pow = :math.pow(10,String.length(Integer.to_string(currID))/2)
front = floor(currID/pow)
back = currID - floor(front*pow)
if front == back, do: currID, else: 0
end
def getInvIDSumPart2(ranges, invIDSum) do
case ranges do
[] -> invIDSum
#[range | rest] -> getInvIDSumPart2(rest, invIDSum+checkRangePart2(range, elem(range,0), invIDSum))
[range | rest] -> getInvIDSumPart2(rest, invIDSum+checkRangePart2(range, elem(range,0), 0))
other -> raise "[ ERROR ] invalid ranges given:#{inspect(other)}"
end
end
def checkRangePart2(range, currID, invIDSum) do
numID = String.to_integer(currID)
numUpperLim = String.to_integer(elem(range,1))
case currID do
_ when numID > numUpperLim -> invIDSum
_ when numID < 10 -> checkRangePart2(range, Integer.to_string(String.to_integer(currID)+1), invIDSum)
_ -> checkRangePart2(range, Integer.to_string(String.to_integer(currID)+1), invIDSum + checkIDPart2(currID,1,floor(String.length(currID)/2)))
end
end
def checkIDPart2(currID, currLen, maxLen) do
regex = "(#{String.slice(currID,0,currLen)})+"
regexComp = Regex.compile(regex)
res = Regex.run(elem(regexComp,1), currID)
case res do
[_, _] when currLen > maxLen or maxLen == 0 -> 0
[longestMatch, _] when longestMatch == currID -> String.to_integer(currID)
[_, _] -> checkIDPart2(currID, currLen+1, maxLen)
_ -> 0
end
end
end #module
IO.puts "### Part 1 ###"
ranges = GiftShopDatabase.getRanges("input/day02Input.txt")
IO.puts "[ INFO ] ranges:#{inspect(ranges)}"
invIDSum = GiftShopDatabase.getInvIDSum(ranges, 0)
IO.puts "[ INFO ] invalid ID sum:#{invIDSum}"
IO.puts "### Part 2 ###"
ranges = GiftShopDatabase.getRanges("input/day02Input.txt")
IO.puts "[ INFO ] ranges:#{inspect(ranges)}"
invIDSum = GiftShopDatabase.getInvIDSumPart2(ranges, 0)
IO.puts "[ INFO ] invalid ID sum:#{invIDSum}"
Oh wow I’m late but that’s because I decided to do this year in Elixir which I am not really experienced enough yet as it seems. Part 1 was ok but I didn’t really put enough thought into Part 2 and got stuck for a while. However I got it done after a few failed tries and a few questions to AI on how to do things in Elixir.
#!/usr/bin/elixir
defmodule SafeDial do
def readInstructions(filename) do
filename
|> File.stream!()
|> Stream.map(&String.trim/1)
|> Stream.reject(&(&1 == ""))
|> Stream.map(fn line ->
case Regex.run(~r/^([A-Za-z])(\d+)$/, line) do
[_, letter, number] -> {String.to_atom(letter), String.to_integer(number)}
_ -> nil
end
end)
|> Enum.reject(&(&1 == nil))
end
def evalInstructions(instructions) do
initialPos = 50
zeroCount = 0
checkInstruction(instructions, initialPos, zeroCount)
end
defp checkInstruction(instructions, currPos, zeroCount) do
case instructions do
[] -> {currPos, zeroCount}
[instruct | rest] ->
nextPos =
case instruct do
{dir, step} when dir == :R and currPos + rem(step,100) > 99 ->
currPos + rem(step,100) - 100
{dir, step} when dir == :R and currPos + rem(step,100) > 99 ->
currPos + rem(step,100) - 100
{dir, step} when dir == :R ->
currPos + rem(step,100)
{dir, step} when dir == :L and currPos - rem(step,100) < 0 ->
currPos - rem(step,100) + 100
{dir, step} when dir == :L ->
currPos - rem(step,100)
_ -> raise "[ ERROR ] unkown instruction: #{inspect(instruct)}"
end
newZeroCount = if nextPos == 0, do: zeroCount + 1, else: zeroCount
checkInstruction(rest, nextPos, newZeroCount)
other -> raise "[ ERROR ] unknown instruction: #{inspect(other)}"
end
end
def evalInstructionsPart2(instructions) do
initialPos = 50
zeroCount = 0
checkInstructionPart2(instructions, initialPos, zeroCount)
end
defp checkInstructionPart2(instructions, currPos, zeroCount) do
case instructions do
[] -> {currPos, zeroCount}
[instruct | rest] ->
{nextPos, zeroCount1} =
case instruct do
{dir, step} when dir == :R and currPos + rem(step,100) == 100 ->
{currPos + rem(step,100) - 100, zeroCount+floor(step/100)}
{dir, step} when dir == :R and currPos + rem(step,100) > 99 ->
{currPos + rem(step,100) - 100, zeroCount+floor(step/100)+1}
{dir, step} when dir == :R ->
{currPos + rem(step,100), zeroCount+floor(step/100)}
{dir, step} when dir == :L and currPos == 0 and currPos - rem(step,100) < 0 ->
{currPos - rem(step,100) + 100, zeroCount+floor(step/100)}
{dir, step} when dir == :L and currPos - rem(step,100) < 0 ->
{currPos - rem(step,100) + 100, zeroCount+floor(step/100)+1}
{dir, step} when dir == :L ->
{currPos - rem(step,100), zeroCount+floor(step/100)}
_ -> raise "[ ERROR ] unkown instruction: #{inspect(instruct)}"
end
newZeroCount = if nextPos == 0, do: zeroCount1 + 1, else: zeroCount1
checkInstructionPart2(rest, nextPos, newZeroCount)
other -> raise "[ ERROR ] unknown instruction: #{inspect(other)}"
end
end
end #module
IO.puts "### PART 1 ###"
instructions = SafeDial.readInstructions("input/day01Input.txt")
{finalPos, zeroCount} = SafeDial.evalInstructions(instructions)
IO.puts "final position:#{finalPos} zero count:#{zeroCount}"
IO.puts "### PART 2 ###"
instructions = SafeDial.readInstructions("input/day01Input.txt")
{finalPos, zeroCount} = SafeDial.evalInstructionsPart2(instructions)
IO.puts "final position:#{finalPos} zero count:#{zeroCount}"
Edit: removed debug output


SVG memes are totally underdeveloped
At least partly that’s where the name came from, didn’t it?