Easy C++ concept I can't understand can anyone help me write this program?
Write a program that prompts the user to enter a positive integer. The program should then output whether it is a triangular number or not. Include a function to validate the input and a function to test if the input is a triangular number or not.
I feel extremely dumb and just want to know how to do this for future reference. Thanks in advance
>>8464241
#include <iostream>
using namespace std;
bool isTriangular(int);
int main()
{
int x;
cout<<"Please enter positive integer :\n";
cin>>x;
return 0;
}
bool isTriangular(int x){
this is what I have so far
The formula for triangular numbers is n(n+1)/2
Just do the reverse to see if you end up with a positive integer.
The reverse is at the bottom of this page: https://en.wikipedia.org/wiki/Triangular_number
We all feel lazy sometimes but you should really make a bit more of an effort with this extremely baby assignment. Programming is one of the most important life skills you can learn.
Holy shit. The memes about CS really are true
>be me
>first term math student
>studied CS before for two semesters, but switched majors because I soon realized that it's a meme degree
>be in linear algebra, a class most students of math related majors take in the first term, but CS students in the third term
>get handed back corrected assignments
>I'm the only one with a perfect score, tutor comments about it and asks if I already did other math classes (which I did, two of them)
>most other students have about half of the assignment correct, the other CS students even less
>the average CS student is so bad at math that even in the third term after having heard two other math classes, he's still worse than first term students of other subjects
Of course I noticed before that CS students are bad at math, but today was just too much. CS is a fucking meme, like you always said
why are the math and CS students taking the exact same math class ? Aren't math students supposed to have advanced math classes ?
Did you really start CS thinking it would be maths-intensive? That's stupidity on your part. Your classmates were shit at it because they assumed they could get by with high-school level math, which isn't that far from the truth.
>>8464238
In my university (and in many other unis in Germany), the first two math classes analysis and linear algebra are attended by students of math, physics, CS, MFE (mathematical financial economics),... Only later are there separate classes
>>8464246
I didn't expect it to be maths-intensive (though I did expect a little bit more math than I got), but I expected the non-math classes to be harder. They were a fucking joke compared to the math classes. I knew they would be easier, but not THAT much easier
>walk in
>see this
>what do
>>8464097
question why the moon is a tiny earth clone on both of those realities
>>8464097
What happens if the wormhole closes right when you're passing throught it?
>>8465344
A new big bang and a new universe.
How naturally talented do you have to be in math to become a physicist? Is a desire to work extremely hard worth anything, and could it be used to compensate?
I'm a 26-year-old MD/PhD (currently doing PhD in computational biology) thinking of quitting my MD/PhD to pursue a career in theoretical physics. I've always been interested in math, and I loved physics, but I was never stellar in either subject. I had to work hard, mostly because I rarely knew how to limit myself and often wanted to know exactly how things worked rather than accepting simplified explanations.
>pic obviously related
bamp
if you do this you are quite retarded.
at least finish your phd before getting assraped by theoretical physics and killing yourself
>>8464102
>getting assraped by theoretical physics and killing yourself
Is it really that bad?
>What do you think of this /sci/?
A recent concern in psychological science is that many statistically significant findings, including some classic findings, do not replicate.
This problem is not unique to psychological science. The landmark article “Why Most Published Research Findings Are False” (Ioannidis, 2005b) was relevant to all scientific
research.
In this context, the purpose of this article is to highlight 10 findings about the genetic and environmental origins of individual differences in behavior that have
consistently replicated. On the basis of our decades of experience in the field of behavioral genetics and our
experience in writing the major textbook in the field, we selected these 10 findings because in our opinion they are “big” findings, both in terms of effect size and their potential impact on psychological science. These findings are not novel precisely because we selected results that have been repeatedly verified. For this reason, each
f the findings in our top 10 list has been re
viewed else-where, and a few have been highlighted previously as “laws” of behavioral genetics, as will be noted later.
Although not all of these findings are supported by formal meta-analyses, we expect that most behavioral geneticists will agree with the 10 findings on our list, but we also suspect they may wish to add to the list. What is
novel about our article is that we bring together 10 reproducible findings from behavioral genetics and consider reasons specific to behavioral genetics that might explain
why these results replicate and why others do not.
FINDING 1: ALL PSYCHOLOGICAL TRAITS SHOW SIGNIFICANT AND SUBSTANTIAL GENETIC INFLUENCE
Psychological domains traditionally focused on individual differences are those that have been studied most frequently with genetically sensitive designs, primarilythe twin method in which resemblance is compared in pairs of identical and fraternal twins: cognitive abilities
and disabilities, psychopathology, personality, substance use and abuse, and health psychology. Traits in these domains have consistently shown significant genetic influence in adequately powered studies
Although ubiquitous genetic influence is now widely accepted, this finding should not be taken for granted because it was a battleground in psychology as recently as a few decades ago and remains controversial in some areas such as education.
As an example, a review of the world’s literature on intelligence that included 10,000 pairs of twins showed identical twins to be significantly more similar than fraternal twins (twin correlations of about .85 and .60, respectively), with corroborating results from family and adoption studies, implying significant genetic influence. We are not aware of a single adequately powered study reporting nonsignificant heritability.
Traits such as political beliefs, religiosity,
altruism, and food preferences also have shown significant genetic influence. A recent metaanalysis of data drawn from 3,000 publications on nearly 18,000 traits of 15 million twin pairs showed that this finding is not limited to psychological traits
Significant and substantial genetic influence on individual differences in psychological traits is so widespread that we are unable to name an exception. The challenge now is to find any reliably measured behavioral trait for which genetic influence is not significantly different from zero in more than one adequately powered study.
FINDING 2: NO TRAITS ARE 100% HERITABLE
As noted earlier, heritability estimates are substantial, typically between 30% and 50%, but this range of estimates is a long way from 100%. Again, we are unable to find any excep-
tion in which the heritability of a behavioral trait is near 100%. However, this is not a limitation of the methods, because some traits, such as individual differences in
height, yield heritability as high as 90%. It should be noted that behavioral traits are less reliably measured than physical traits such as height, and error of measurement contributes to nonheritable variance.
Although this finding might seem obvious and unsurprising, it is crucial because it provides the strongest available evidence for the importance of environmental influence after controlling for genetic influence. Because
genetic influence is significant and substantial, one must control for genetic influence when investigating environmental influence.
Environmental research using genetically sensitive designs has led to three of the most important discoveries about the way the environment affects behavioral development
FINDING 3: HERITABILITY IS CAUSED BY MANY GENES OF SMALL EFFECT
Powerful but overlooked evidence that many genes affect complex traits including behavior comes from selection studies in nonhuman animal research. If only a few genes were responsible for the heritability of a trait,
selected lines would separate after a few generations and would not diverge any further in later generations. In contrast, selection studies of complex traits show a linear
response to selection even after dozens of generations of selection, as seen, for example in one of the largest and longest selection studies of behavior that included replicate selected and control lines
Although GWA studies have limited power to detect such minuscule effects even with samples in the tens or hundreds of thou-
sands, these studies have tremendous power to detect larger effects. For example, a GWA study of 20,000 individuals has 99.9% power to detect an association with an effect size that accounts for 1% of the variance (i.e., a correlation of .10). This suggests that no such associations exist with effect sizes larger than 1% in the population. Some
extremely rare mutations have large effects on individuals, but because they are rare, their effect on the population is small. If the largest effects are so small, the smallest effects are likely to be infinitesimal, which implies that
heritability is caused by many genes of small effects.
so I was browsing videos on youtube and checking if there is anything related to my new most favourite may-may™ and stumbled over an interesting problem.
So let's say you play a video which is 100 seconds in length and every 10 seconds you play the same video but with the same condition except it's at double the speed of the previous video. So it's recursive.
At the start you should, for example, quickly get a stack of "paused" nested videos which are all waiting for the video one layer below to finish playing.
So the question is: Does the whole video have a finite length?
Because of 1 + 1/2 + 1/4... converges on 2 I have the feeling that it should. However while it is easy to understand that Achilles must overtake the turtle in Zeno's Paradox, I have trouble seeing if any video ever "passes" the first 10 seconds to reach the 20 second mark or eventually totally finish and let the superordinate video continue.
>>8463816
>So let's say you play a video which is 100 seconds in length
>Does the whole video have a finite length?
how is that a question?
>>8463830
well that's an interesting point you raise
https://www.nasaspaceflight.com/2016/11/nasa-working-group-orion-esm-schedule/
>be NASA
>contract out 1 (one) part of SLS to Europe
>that part is based on 95% pre-existing hardware
>Europoors are so shit they can't even get that part finished
>delays the entire project for potentially years
>the Saturn V class rocket is ready to go in 2018 but the tiny service module apparently is too difficult
NASA should just cancel Orion and start using SLS to send heavy payloads to the Moon, Jupiter and the Ice Giant Planets desu
Why does Europe have to ruin everything, /sci/?
>USA did this in 2012
>Europe can't land a pizza platter with a parachute on Mars in 2016
ESA has roughly 1/4 of NASA's budget and lack even remotely the same experience with space flight in general. That's pretty much why they're nowhere near as good as NASA is.
>be nasa
>see spacex cutting costs by 10x with vertical integration
>be required by congress to use thousands of shit contractors
What is the simplest way to break human bones without using any extra equipment suck as sticks? At what angles and how do you press the limbs against the joints for the easiest result? What about fingers? Torso bones such as ribs?
Ribs need impact. Everything else can be broken on the principle that ligaments (which hold bones together) are in the main, stronger than bones. Think of the range of movement they least want to go into. So you can hyperextend an elbow, or twist a wrist. Knees will tend to give out in the ligaments first, and ankles are tougher, they can tear ligaments or avulse (pull off a bit) bone or break bones, if stamped on, eg football players.
>>8463620
I need more specifics. In case of breaking a leg for example, would the way to do be to step on it below the knee and then jerk it up and to the knee holding it above the foot?
So i was reading the wiki and saw a recommendation of Guyton and Halls Physiology and Robbins Pathology and lots of other books studied at medical schools. Do people really read those huge af books just for the sake of learning a new thing here?
>>8463003
So you're asking if people really do read/have to read fuckhuge bricks for university? YES WE FUCKING DO.
What the fuck did you think? Jesus christ...
t. medfag
most of it is bulk of the writer reflecting his ego, to project his person personality, and be friends with the reader
if you don't care about him / her and just read the book it only takes a day or two and you get all the necessary info
>>8463007
No. When recommending Guyton, wiki said after reading this you will know more physiology than a med student cause medstudents go for important things only.
So i was asking if there really are non-med autists who read these books for fun..
Why do they call it "real analysis"?
Is there a "fake analysis"?
Why is a [math]\mathbb{R}P^2[/math] a real projective space if we can't embed it in [math]R^3[/math]? I'd call it fake instead.
Ps. nice duck.
>>8462532
It's analysis of the real numbers. Yes, there is also an "imaginary analysis". No fake one afaik, tho.
>>8462544
>fake
that's nonstandard
Not sure if this is the appropriate board to ask this, but I'll give it a shot. Has anybody here had negative effects from long term use of legal, prescribed stims, specifically Vyvanse?
lisdexamfetamine fucks your shit up and i feel bad for anyone who's parents have had them on it since they were kids or teens
people have given up on solving problems
>>8462242
id say stims are pretty safe. i dont think the side effects are good in short term and can be bad (depending who you are). but yeah long term not much probably unless you get addicted and maybe bad teeth/breath. feel like if u take enough for a long time it can increase your risk of anxiety/panic. maybe it will increase your blood pressure too? i dont know.
>>8462242
I love it. I'm writing my doctorate thesis on vyvanse. wouldn't take it if I didn't have to do intensive work though. I value my sleep. Otherwise great for doing mass reading and writing
We invented bread millenia ago... but we only invented something to toast it in 1893
Really gets those axons electrified
Really causes those synaptic vesicles to bind to their receptor sites.
>>8460985
sure triggered a statistically significant increase in action potentials
How did we have the technology to send people to the moon in 1969? How did 47 year old computers control the launch and maneuvers that were necessary? We sent people to the moon 47 years ago, and 47 years before that people were driving Model T's. It's just crazy
>>8460080
Shitton of manual computation.
see that flag moving in the wind?
that vacuum moon wind?
well guess what
>>8460138
Are you talking about how the flag is upright instead of just fallen over? Well that's because there was a horizontal pole going through the top of the flag to make it stay like that
How do I show that the vector equation of a line
[eqn] r = (6, -5, 1) + λ(-1, 2, -3) [/eqn]
is perpendicular to the plane
[eqn] x - 2y + 3z = -9 [/eqn]
take a picture and give it to whoever asked u
>>8454762
A book doesn't really help.
Set up the equation of an arbitrary line which belongs to the plane, take the dot product with the original line, show it equals zero.
Alternatively, find the equations of 2 perpendicular lines which belong to the plane, take their cross product, show it is co-linear to your original line
Today I was sitting in my quantum field theory lecture, and the lecturer was female. We were going over the canonical quantization formalism and writing fields [math] \phi(x) [\math] as integrals over momentum space and creation/annihilation operators. Every time there was some technical derivation, she said:
There is a technical derivation here, and I'm SO lazy today, so I'm not going to do it on the board, it can be found in my lecture notes though, with a smug smile.
WHY couldn't she just say: I'm not going to do it because it doesn't provide insight into the course so you should read it yourself or some thing in this fashion... why does she behave so female...
pic unrelated, I just like the alexander horned surface :)
She sounds like terrible lecturer.
Not all women in physics are like that; don't mark us all like that because of one lazy lecturer.
>>8464966
Can I give you the D?
>>8464988
Fuck it, I just recently got dumped, might as well