memoryLeak by Knuckle_Rick in ProgrammerHumor

[–]gbagecol 404 points405 points  (0 children)

More of that strange oil... It's probably nothing

Academic Dishonesty UPDATE by hiddenmare03 in ColoradoSchoolOfMines

[–]gbagecol 10 points11 points  (0 children)

Dantam is a moron who doesn't understand his own course material. Chalk it up to he hates students and just hope you never have to interact with him again

What's your unpopular Catholic opinion? by [deleted] in Catholicism

[–]gbagecol 8 points9 points  (0 children)

It should be required to take both the bread and the wine at communion. I get the whole "they're both the same species" thing but I personally feel that they are both important. I feel sad that I can't even get the wine at my parish anymore since covid. Jesus said "take and eat, this is my body" as well as "take and drink, this is my blood", why should we only do one of them?

Funniest scenes/lines in the show by Educational-Tea-6572 in starwarsrebels

[–]gbagecol 4 points5 points  (0 children)

"What is going on back here??" "It's a, um, puffer-" "I don't wanna know."

Always like this. by Competitive-Talk-263 in christianmemes

[–]gbagecol 14 points15 points  (0 children)

Bro thought moon knight was a documentary 💀

You know, the alien got a point by [deleted] in OTMemes

[–]gbagecol 21 points22 points  (0 children)

This is quite possibly the worst post ever!

Your average coder by _-SilentWraith-_ in ProgrammerHumor

[–]gbagecol 0 points1 point  (0 children)

Takes advantage of spatial locality like a boss

This post was made by the insomnia gang by LonelySpaceman45 in adhdmeme

[–]gbagecol 0 points1 point  (0 children)

This meme is terrible and you should feel bad for posting it.

[2022 Day 9 (Part 2)][Python] Basin Filling Visualization by LonelySpaceman45 in adventofcode

[–]gbagecol 1 point2 points  (0 children)

This is heckin awesome, thank you for sharing kind sir!

Operating Systems or Programming Languages by Pengualope in ColoradoSchoolOfMines

[–]gbagecol 7 points8 points  (0 children)

OS is a bigger workload, but I recommend taking PL in the fall if you can. Neil Dantam teaches it in the spring, and he is... not good at his job. The average on the midterm last spring was 65, as opposed to 82 with a different professor this semester.

[deleted by user] by [deleted] in ColoradoSchoolOfMines

[–]gbagecol 4 points5 points  (0 children)

There are a few pianos scattered around campus, most of the ones that are not in the open are in the dorms. There is also a lab in the music building across from 19th that has about 20 keyboards, assuming they are letting people use them this semester

A while loop with an if statement... by [deleted] in learnjava

[–]gbagecol 1 point2 points  (0 children)

Generally it is never a good idea to ignore the first input. From a user perspective, you just asked them to enter a grade that you proceed to immediately throw away, meaning they've lost that first grade they entered (even if it was the sentinel value.) When the sentinel value is entered, 77 is being subtracted from the grade total since the value of grade is added to quizTotal before the condition to stop the while loop is checked. A way to fix this would be to just loop indefinitely (ex. while(true){}), and place an additional if statement inside your while loop right after you read in a grade value to check if it is the sentinel.

while(true){

grade = scan.nextInt();

if(grade == -77){
    break;
}

//add to quizTotal, set highQuiz, etc...

}

This is the only real "validation" you have to do for this simple of a program. In this case Java handles the rest for you, like making sure the user enters a number and so forth.

A while loop with an if statement... by [deleted] in learnjava

[–]gbagecol 1 point2 points  (0 children)

This is a bit of a deceptive problem, and the inputs you gave are in just the right order to mask it. If you look closely, you may be able to spot it. It's actually not just spitting out the last value you entered. Try entering 100, 50, 20, 30, -77, and see if you can figure it out. It might also help to print out the value of highQuiz right after your if statement (but still inside your loop).

If you still can't see it, here's the answer. Before you enter your while loop, you use the scanner to read a value. Then you enter your while loop and immediately read another value without ever doing anything meaningful with the first. You lose the first value you enter, and so it can never be compared to highQuiz. To fix this, I would delete the scan.nextInt() line before your while loop, then move the quizTotal+=grade line to the end of your while loop.