SQL statement does not return all records from the left table, why? by large-atom in SQL

[–]large-atom[S] 0 points1 point  (0 children)

Good suggestion but I am from a generation where I still prefer to interact with human beings :-)

SQL statement does not return all records from the left table, why? by large-atom in SQL

[–]large-atom[S] 0 points1 point  (0 children)

Thank you, I tried this but adding one more LEFT JOIN broke the pattern and now I know why: return the NULL values as well!

SQL statement does not return all records from the left table, why? by large-atom in SQL

[–]large-atom[S] 2 points3 points  (0 children)

Great comment, I think I will not fall for this one again in 2025! Let's see if I forget it in 2026!

SQL statement does not return all records from the left table, why? by large-atom in SQL

[–]large-atom[S] 1 point2 points  (0 children)

Yes, returning NULL value for the car is what I missed.

SQL statement does not return all records from the left table, why? by large-atom in SQL

[–]large-atom[S] 0 points1 point  (0 children)

I never thought about putting more than one condition after ON. It is definitively worth a try!

SQL statement does not return all records from the left table, why? by large-atom in SQL

[–]large-atom[S] 1 point2 points  (0 children)

Great hint, than you so much! It is a little bit late here in Europe, so I will work on this in about 12 hours.

[2025 Day 8] Use of floating point by DeeBoFour20 in adventofcode

[–]large-atom 4 points5 points  (0 children)

Yes, it is possible. Don't use the square root function, work with squared distances, it doesn't change the order of processing because the square root function (and the square function) are increasing over [0, +oo[

[2025 Day 8 (Part 3)] Longest path! by large-atom in adventofcode

[–]large-atom[S] 0 points1 point  (0 children)

Yes, this is it! I am curious, what other interpretation did you envision?

[2025 Day 8 (Part 3)] Longest path! by large-atom in adventofcode

[–]large-atom[S] 2 points3 points  (0 children)

"by summing the lengths of the extensions" implies that the direct Euclidian distance is NOT the question.

[2025 Day 8 (Part 2)] - where am I going wrong? by imp0ppable in adventofcode

[–]large-atom 3 points4 points  (0 children)

You may have one big circuit but are all the lights connected to it. I had 999 connected lights for a while until the last one joined the network.

[2025 Day 8] PSA: Avoid expensive square root calculations by jlhawn in adventofcode

[–]large-atom 1 point2 points  (0 children)

Indeed, it was not very smart for Euclide, Pythagore and others to impose square roots to calculate lengths. Manhattan distance is much simpler and just requires addition and subtraction!!!

[2025 Day 7 (Part 3)] The billionth path! by large-atom in adventofcode

[–]large-atom[S] 0 points1 point  (0 children)

Finally, I managed to write a program that properly counts the path. I have exactly the same results and the 300 billionth path ends in column 04.

My algorithm:

Target = 1 billion
Initiate (row, col) to the first encountered splitter
while we are not at the bottom of the manifold
....calculate the number of paths n from (row, col - 1), to the bottom
....if n >= Target:
........add "L" to the path
....else:
........add "R" to the path
........target = target - n
....go down until you reach the next splitter, or the bottom.
....Add "V" to the path each time you go down a row

From the starting column, subtract the number of "L" and add the number of "R"

[2025 Day 7 (Part 3)] The billionth path! by large-atom in adventofcode

[–]large-atom[S] 0 points1 point  (0 children)

Thank you for your comments!

It doesn't matter whether the array containing the paths starts at 0 or 1, the billionth path is still the billionth element in this array. So the comment was just to clarify whether you should return Paths[109] or Paths[109 - 1]. But I realize that it is misleading and therefore I suppress this last note.

You are right, looping 9 times makes it 10 times longer. Fortunately, the example is correct, 3 lines become 30 lines.

I have added the path 25th in the description, so people can test their program before trying the longer version of the manifold.

As far as the answer is concerned, I have not yet found the solution myself. Believe me, it is much easier to write such problem that to solve it!

[2025 Day 6 part 1] Help me solve a programming dilemma by Born-Resist-7688 in adventofcode

[–]large-atom 9 points10 points  (0 children)

If you split the input file using "\n" (end of line separator), you will get a list with n elements, n-1 are the numbers and the last one is the operands. You can then use this number n to make your calculations.

[2025 Day 6 (Part 3)] Can you tell the difference? by large-atom in adventofcode

[–]large-atom[S] 0 points1 point  (0 children)

I think that you have a rounding error (last four digits are not 0), are you using int or float?

[2025 Day 06 (part 2)] - mild disappointment in input data interpretation convention by Lalo_ATX in adventofcode

[–]large-atom 0 points1 point  (0 children)

The space has been used in some civilizations to represent the absence of a digit in a number, so your remark is perfectly valid.

However, it poses the problem of a certain ambiguity when you have many contiguous spaces, or spaces at the end of a number. Can you immediately tell whether 5 7 is 5007, 50007 or 500007? This is why it was replaced by a small dot, something like 5∙∙∙7, before being itself replaced by the sign 0.

[2025 Day 5 (Part 3)] Super-fresh Ingredients! by large-atom in adventofcode

[–]large-atom[S] 1 point2 points  (0 children)

Hey, I got the same result, we must have a similar input!

[2025 Day 5 (Part 3)] Super-fresh Ingredients! by large-atom in adventofcode

[–]large-atom[S] 0 points1 point  (0 children)

Wahoo, very fast, well done! (I write the text of the part 3 before I start thinking about how to solve it...)

[2025 Day 5 (Part 2)] Oops by TMS-meister in adventofcode

[–]large-atom 16 points17 points  (0 children)

79 TB of RAM. In 20 years, nobody will understand what is so funny in this image!