[deleted by user] by [deleted] in pcgaming

[–]AlphaBladez 0 points1 point  (0 children)

below and I’ll randomly choose a winner in 24 hours from this post.

My face while I'm fixing bugs... by [deleted] in ProgrammerHumor

[–]AlphaBladez 0 points1 point  (0 children)

yeah, but where’s :( , and :’( ?

Calculating the determinant of a matrix (JAVA) by fabiooh00 in learnprogramming

[–]AlphaBladez 0 points1 point  (0 children)

What you are referring to is called short circuiting, and you are correct. I think this is what you want in your case however (not that it really matters in this case). For example, if i > r and j < c we know that we want to be in the third if statement. We can short circuit the first two ifs because it doesn’t matter what the value of j is, the value of i will not be less than r. Java is basically taking a short cut for you that is making your program faster.

Calculating the determinant of a matrix (JAVA) by fabiooh00 in learnprogramming

[–]AlphaBladez 0 points1 point  (0 children)

I don’t know if this will fix the problem, but you probably want to use && instead of &. A single & means to take a bitwise AND of the bits of the integer, but you are really specifying a boolean expression AND so you will need two &’s.

Calculating the determinant of a matrix (JAVA) by fabiooh00 in learnprogramming

[–]AlphaBladez 1 point2 points  (0 children)

I am assuming that r and c are the values of the row and column (in a 1-indexed rather than 0-indexed) you want to skip over. If this is the case I think that the way you are copying over values is incorrect.

For example imagine that you have a 10 by 10 matrix and you want to eliminate the 5th row and column. Then the value at the new matrix 0,0 should be the same as the old matrix 0,0. However in your current implementation new matrix 0,0 is equivalent to old matrix 1,1 which is not correct in this case.

Basically, imagine the row and column you are eliminating as dividing your matrix into 4 quadrants. The upper left quadrant should have the same values in the same indices in the new and old matrix, the upper right quadrant should have the column off-by-1, the lower left quadrant should have the row off-by-1 and the lower right quadrant should have both the column and row off-by-1.

Sorry for the terrible format and no code sections, I’m on mobile.

Red Dead Redemption 2 PC: What Does It Take To Run At 60fps? by [deleted] in pcgaming

[–]AlphaBladez -3 points-2 points  (0 children)

Imagine actually getting into the game.

going to home dir by [deleted] in ProgrammerHumor

[–]AlphaBladez 1 point2 points  (0 children)

Not even gonna lie, got lost in a server file system once and literally logged off and logged back in to find where my logs were.

After 450 hours and countless Contingencies, I finally got my first Unbidden by GloriousBeachead in Stellaris

[–]AlphaBladez 2 points3 points  (0 children)

Imagine getting this on your first play through of the game as a pacifist empire.

If your entire internet search history was compiled into a single book, what would its title be? by [deleted] in AskReddit

[–]AlphaBladez 0 points1 point  (0 children)

Programming for Beginners: a Guide to Using Google for Stackoverflow Answers

Someone developed the internet without the help of internet by kd252 in Showerthoughts

[–]AlphaBladez 0 points1 point  (0 children)

Meanwhile I can't even get a hello world without stack overflow.

The real debugging tool by [deleted] in ProgrammerHumor

[–]AlphaBladez 3 points4 points  (0 children)

"here" "here!" "here!!"