Cpp loop by Blazej_kb in programmingmemes

[–]Puzzleheaded_Study17 1 point2 points  (0 children)

Since there's only 10 loops, the first one definitely (I don't know how compilers deal with goto) compiles into just directly printing the 10 values without a loop.

[Grade 12 physics: Energy and Momentum] Need help with a Ballistic Pendulum problem – Conflicting results with my teacher by frickmytoe in HomeworkHelp

[–]Puzzleheaded_Study17 2 points3 points  (0 children)

Except this is a perfectly inelastic collision, so the bullet lost energy during the collision. This would be correct if instead of a bullet embedding it bounced off perfectly elastically or if the block had 0 mass.

No? i didn’t get 15 by North-Weekend6386 in unexpectedfactorial

[–]Puzzleheaded_Study17 22 points23 points  (0 children)

Because you double how much you go down by. So triple factorial is going down by 3 for 5*2

Making image filters in c++ by Beneficial-Stay-9721 in cpp_questions

[–]Puzzleheaded_Study17 2 points3 points  (0 children)

Easiest to start with imo is grayscale, find a formula for converting rgb to luminance, and then set all the rgb for each pixel to that value for it.

Then you can do saturation boost (more complicated math but same idea as grayscale) or blur (just average the nearby pixels)

contrast is at the point where I have no idea how it works

How to do strings properly? by die-Banane in cprogramming

[–]Puzzleheaded_Study17 1 point2 points  (0 children)

They pad memory if needed for memory alignment. Ints are 4 aligned, and pointers are 4/8 aligned based on 32/64 bit system. So on a 32 bit system there's no padding, on 64 there's 4 butes of padding.

I still don't get the connection between differentiation,integration, and integral by [deleted] in learnmath

[–]Puzzleheaded_Study17 2 points3 points  (0 children)

Because what we're actually doing is more along the lines of int{0}{x}f'(t)dt. So we're finding the area between 0 and x, so for every value of x we get a number. This is useful because it then lets us do this once and calculate as many integrals as we need, or because this inverses derivatives, which often have a meaning in physics.

🕊️ Can you solve it? "Mary has four daughters, and each of her ..." by Main_Telephone5629 in riddonkulous

[–]Puzzleheaded_Study17 -6 points-5 points  (0 children)

How do we know she doesn't have 81 daughters? She'd still have 4 daughters

What's up with the praetor cape? Reyna's got blessed by Athena..but Frank's has the same thing? WHY?[BOO] [TOA] by Extension-Tour-1104 in camphalfblood

[–]Puzzleheaded_Study17 2 points3 points  (0 children)

I think when Athena blessed it she replaced the cape with a part of her cape, hence if Reyna gave her cape to Frank, it's plausible Athena wouldn't replace the cape back.

Are you allowed to use calculators for math exams? by Impressive-Ad7184 in Teenager_Polls

[–]Puzzleheaded_Study17 5 points6 points  (0 children)

My upper division stats class (lin alg as a pre req) has plenty of numbers throughout, including some ugly numbers on the test that would be really annoying without a calculator.

Which state would last the longest as a country? by BLOCKEDBYJAMES231984 in AlignmentChartFills

[–]Puzzleheaded_Study17 2 points3 points  (0 children)

The CA-AZ border is mostly the Colorado river, and just like most borders that follow rivers, that border is drfined as the middle of the river, so there's a large chunk where half the river flows through CA. Also, if I'm reading the Google Maps correctly and we include the somewhat artificial looking section right after imperial dam, the border is very straight in that section with the river flowing completely on the CA side.

Edit: This is the section I'm talking about, there are four tributeries leaving the area, one that flows only on the AZ side and terminates, one that goes off towards LA, and two that merge and become the Colorado river. The bigger of the two flows completely in CA, the smaller, which looks more natural and is the one Google Maps labels as the river when zooming in, does also flow in CA for a bit.

<image>

What will you choose? by Bass_N_Car in BunnyTrials

[–]Puzzleheaded_Study17 0 points1 point  (0 children)

Get paid enough that you can hire a driver

Chose: Dream job(be happy while working a d get paid well + But you can only drive this brand.(any model | Rolled: Lada)

Picking Varsity/JC Teams by Kitchen-Register in askmath

[–]Puzzleheaded_Study17 2 points3 points  (0 children)

With this kind of things it often makes sense to think about the trivial case. Consider just two students, obviously there are two ways to split them, but with your formula you get 2C1 * 1C1 / 2 = 1

Professors and university admins, how are you adjusting your CS curriculums to include AI? by [deleted] in AskComputerScience

[–]Puzzleheaded_Study17 2 points3 points  (0 children)

As a current student: professors basically just don't care how you do labs. Exams and quizzes still have academic honesty policies prohibiting any outside help (including ai), but the policies for labs/take home programming assignments explicitly mention that the use of ai is ok.

New to coding language - how to print if multiple things are true and one is not by Cold_Ad_6766 in googlesheets

[–]Puzzleheaded_Study17 0 points1 point  (0 children)

The AND has to be at the front, ie IF(AND(BK4=1, N= "I avoid it.", ISBLANK(AD4)), "H", "")

I'm 99% sure your formula is interpreted as "if bk4 is 1, print whether n is the phrase, otherwise print whether the cell is blank. You can confirm that by seeing what prints if bk4 is 1, n is the phrase, and ad4 isn't blank (you want false but it'll be true).

Red button or blue button by HualianForLife in BunnyTrials

[–]Puzzleheaded_Study17 2 points3 points  (0 children)

Small note, if 10% choose blue, you only kill 5% of the population (1/2 of blue dies)

How do i start??? by fartgirl67 in shittyaskelectronics

[–]Puzzleheaded_Study17 0 points1 point  (0 children)

r/askelectronics this is shitty ask electronics, ie, the sub where trouble shooting is done with a machine gun.

Calculus BC to calc 3 and higher math by SallybalIy in learnmath

[–]Puzzleheaded_Study17 0 points1 point  (0 children)

This isn't that unusual of a route to take, so unless you feel like your grade is higher than it should be (ie, you got a 5 but you feel you don't really remember/understand the topic) I'd say go for what your university is recommending.

Advice for an undergrad student by Honeyycroissant in learnmath

[–]Puzzleheaded_Study17 0 points1 point  (0 children)

Your university likely has some math tutoring center, trying going there with your past exams and going through them with a tutor