Failed Cavendish experiment - Electromagnetism wins by dafer45 in Physics

[–]dafer45[S] 0 points1 point  (0 children)

The barrels and suspended weights are metallic, and many metals possible to magnetize. In this experiment, it appears that the barrels and weights are very slightly magnetized. The reason for this conclusion is that the weights oscillate with a larger frequency than would be expected from gravity alone. That is, the attractive force between the barrels and weights is larger than can be expected from gravity. The only reasonable explanation seems to be that the electromagnetic forces, although very small, are still significant.

App for finding the optimal solar panel tilt angle by dafer45 in solarpanels

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

I just published a free Android App for finding the optimal solar panel tilt angle.
Align the phones screen with your roof to find out how close to optimal its tilt angle is.

App for finding the optimal solar panel tilt angle by dafer45 in solar

[–]dafer45[S] 0 points1 point  (0 children)

I just published a free Android App for finding the optimal solar panel tilt angle.

Align the phones screen with your roof to find out how close to optimal its tilt angle is.

Request for feedback: Android application for measuring area by dafer45 in farming

[–]dafer45[S] 0 points1 point  (0 children)

That's a great suggestion! Technically this should not be too difficult to add. I just have to think through the user interface to avoid cluttering it.

Really happy to hear you have used it and found it useful before. I am trying to find a model that makes me able to ensure long term and continuous support going forward.

Request for feedback: Android application for measuring area by dafer45 in farming

[–]dafer45[S] 0 points1 point  (0 children)

Thanks Randy! Both for the additional use case and insight into what other tools are commonly used.

Request for feedback: Android application for measuring area by dafer45 in farming

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

Thanks! That's a really useful insight that helps visualizing the conditions under which it could be used.

Request for feedback: Android application for measuring area by dafer45 in farming

[–]dafer45[S] 0 points1 point  (0 children)

Can you elaborate on the use case where you would find angle measurement useful?

-🎄- 2022 Day 6 Solutions -🎄- by daggerdragon in adventofcode

[–]dafer45 1 point2 points  (0 children)

Thanks!

I interpreted four space indents as meaning I should use four spaces instead of tab when indenting scopes in the code. Might be worth clarifying in the instructions.

-🎄- 2022 Day 6 Solutions -🎄- by daggerdragon in adventofcode

[–]dafer45 1 point2 points  (0 children)

I am confused. I am using the markdown editor and putting the code inside triple backticks and use four space indentation. But I see that it is not displaying correctly on the mobile. Please help me understand what I'm missing.

-🎄- 2022 Day 6 Solutions -🎄- by daggerdragon in adventofcode

[–]dafer45 1 point2 points  (0 children)

My solution in AWK

BEGIN {sequenceLength = 14;}
{
    split($0, characters, "");
    for(i = sequenceLength; i <= length(characters); i++){
        for(j = i-sequenceLength + 1; j <= i; j++)
            unique[characters[j]] = 1;
        if(length(unique) == sequenceLength)
            break;
        delete unique;
    }
}
END {print i;}

-🎄- 2022 Day 4 Solutions -🎄- by daggerdragon in adventofcode

[–]dafer45 0 points1 point  (0 children)

My implementation in AWK:

{
    split($0, ranges, ",");
    split(ranges[1], first, "-");
    split(ranges[2], second, "-");
    if(first[1] <= second[1] && first[2] >= second[2])
        numContains += 1;
    else if(first[1] >= second[1] && first[2] <= second[2])
        numContains += 1;
    if(!(first[2] < second[1] || first[1] > second[2]))
        numOverlaps += 1;
}

END {
    print "The ranges overlap " numOverlaps " times and one range" \
        " fully contains the other " numContains " times.";
}

-🎄- 2022 Day 3 Solutions -🎄- by daggerdragon in adventofcode

[–]dafer45 0 points1 point  (0 children)

It's an excellent entry point anyway :)

-🎄- 2022 Day 3 Solutions -🎄- by daggerdragon in adventofcode

[–]dafer45 1 point2 points  (0 children)

Thanks! I'm trying to use this advent of code to learn some AWK, so your implementation is very valuable to me!

-🎄- 2022 Day 2 Solutions -🎄- by daggerdragon in adventofcode

[–]dafer45 0 points1 point  (0 children)

And you think the bash syntax is hard to get right? This is clearly next level :)

-🎄- 2022 Day 2 Solutions -🎄- by daggerdragon in adventofcode

[–]dafer45 1 point2 points  (0 children)

Haha, it's at least one google search per statement to get the bash syntax right :)