thread_id
stringlengths
6
6
question
stringlengths
1
16.3k
comment
stringlengths
1
6.76k
upvote_ratio
float64
30
396k
sub
stringclasses
19 values
ulcg1r
What was the harshest you punished your kids and why?
I spanked my 3 yo son for running out in the street between two parked cars. Only spanking he ever got. Never forgot the lesson either.
40
AskOldPeople
uldard
Where was the Hawaiian islands/hotspot located in the Mesozoic? I believe that the current islands didn’t exist until the Cenozoic, and that the oldest of the Emperor Seamounts existed during the Cretaceous period, but I have no idea where the hotspot was located or when it was created. Also, I’m wondering what clima...
Generally, when [mantle plumes](https://en.wikipedia.org/wiki/Mantle_plume) (hotspots) first reach the surface, the arrival of the plume head is accompanied by the formation of a [large igneous province](https://en.wikipedia.org/wiki/Large_igneous_province) or LIP. When a LIP erupts through oceanic lithosphere, it typi...
6,230
AskScience
ulga33
My parents bought me the new M1 air (16RAM/512GB). Could it handle projects (like UNITY) and some 3D rendering. Maybe some video and music editing too. I'm currently a freshman.
No, you’ll spill some soda innit or have it stolen from your backpack while in the library.
220
AskComputerScience
ulga33
My parents bought me the new M1 air (16RAM/512GB). Could it handle projects (like UNITY) and some 3D rendering. Maybe some video and music editing too. I'm currently a freshman.
Not really the right subreddit, but almost certainly. 16Gb of RAM might be a little limiting towards the end of your schooling but generally you should be able to get 5-6 years out of it.
40
AskComputerScience
uljuvj
How does our heart produce its electric current?
Via the [sinus node](https://en.m.wikipedia.org/wiki/Sinoatrial_node) but the rate is controlled via the [medulla](https://en.m.wikipedia.org/wiki/Heart_rate). Interesting side note, the "heartbeat" in the 6-week abortion heartbeat bill is actually the embryonic SA node producing an electric pulse. The proper heart is...
250
AskScience
uljuvj
How does our heart produce its electric current?
There are a series of active pumps, the most important one being the Na-K-ATPase pump as well as a series of ion channels. The electricity is caused by flow of ions through the various channels which can fluctuate between open and closed states.
170
AskScience
uljuvj
How does our heart produce its electric current?
The cells that make up the sinoatrial node are pretty cool. They have channels that produce what is called the "Funny Current" which was named that because researchers observing it could not figure out what it was at first and its behavior was pretty odd (or "funny"). Cells use the gradients of ions (Calcium, Sodium,...
80
AskScience
uljygg
Do our bodies have defences against prions?
TL:DR Prions are a normal part healthy cells. They are not something the body needs to protect against, in most cases. Prions, in very rare cases (very rare) , can become misshapen and cause problems. Prion diseases, also known as transmissible spongiform encephalopathies or TSEs, are a group of rare, fatal brain d...
1,120
AskScience
uljygg
Do our bodies have defences against prions?
Yes! Your body does have defenses against prions. Before we get into it, we should define some terms since it can get confusing talking about prions, prion proteins, and prion diseases. [Prion](https://en.wikipedia.org/wiki/Prion)\- a class of misfolded proteins that induce normally folded proteins to misfold. Import...
300
AskScience
uljygg
Do our bodies have defences against prions?
Not really. Most prion diseases are caused by misfolding of a specific protein. In its normal form, it's called PrPc, and it's found on the surface of healthy, normal neurons in the brain and spinal cord. As of now, we're not specifically sure what it does. What's interesting about PrPc is that it has a tendency to mi...
90
AskScience
ull014
When 9/11 happened, did any of you think it suspicious at the time? Any of you witness it in person? Do you believe it to have been a conspiracy?
I don't think it was a conspiracy. Never did. It opened the door to some really dark shit, though.
260
AskOldPeople
ull014
When 9/11 happened, did any of you think it suspicious at the time? Any of you witness it in person? Do you believe it to have been a conspiracy?
When the second tower hit, yes, I was suspicious that the first one wasn’t a freak accident. Later, I learned that it was indeed a conspiracy among operatives of an extremist group called al Qaeda.
210
AskOldPeople
ull014
When 9/11 happened, did any of you think it suspicious at the time? Any of you witness it in person? Do you believe it to have been a conspiracy?
"Do you believe it to have been a conspiracy" hell yes. I also belive Jewish Space Lasers started wildfires. microwaves turn into cameras' and can spy on us bill gates is trying to microchip us all. covid is fake. the bowling green massacare coud have been prevented. and many more very provable things norma...
150
AskOldPeople
ullk4w
Hey y’all. Just got a flu jab. Should I rest and deal with side effects or head out for an hour long walk? I have read that exercising after a flu shot can give a better immune boost. But I want the least side effects possible. So would a better immune response equal more side effects? I hope this makes sense. Please...
The CDC recommends exercising to reduce side effects: >To reduce pain and discomfort where the shot is given > * Apply a clean, cool, wet washcloth over the area. > * Use or exercise your arm. --[Possible Side Effects After Getting a COVID-19 Vaccine](https://www.cdc.gov/coronavirus/2019-ncov/vaccines/expect...
190
AskScience
ulmd2m
I want to make a sudoku game for a computer competition with a national phasea and my teacher recommended me to do it graphically. What should i use? (i only know c++ at the moment)
I highly recommend you to check out the [OneLoneCoder Pixel Engine](https://github.com/OneLoneCoder/olcPixelGameEngine) It is a very nice graphics library to create games and it is just an .hpp file.
240
cpp_questions
ulmd2m
I want to make a sudoku game for a computer competition with a national phasea and my teacher recommended me to do it graphically. What should i use? (i only know c++ at the moment)
I would recommend SFML or SDL2. Raylib is also a solid choice, but I haven't used it personally.
190
cpp_questions
ulmd2m
I want to make a sudoku game for a computer competition with a national phasea and my teacher recommended me to do it graphically. What should i use? (i only know c++ at the moment)
I’d say SDL2 as it can be used for many game related things and has tons of online help
60
cpp_questions
ulnkiy
Was it common for healthcare professionals, undertakers, etc to catch influenza from handling bodies in the 1918 Flu epidemic?
I was not able to find extremely specific information, but I cobbled some things up. The short answer is that influenza doesn't survive well in dead bodies so the risk of getting it from a body is small. I found this guideline for body handlers in Australia that specifically mentions that there is basically no risk...
4,870
AskScience
ulnkiy
Was it common for healthcare professionals, undertakers, etc to catch influenza from handling bodies in the 1918 Flu epidemic?
Nurses definitely got it. One of the things that slowed down the response to the pandemic in 1918 was the fact that the people who were working hardest on treatment and trying to develop vaccines kept getting sick As for handling the dead, probably not, as a respiratory virus it's just not that dangerous when the pat...
760
AskScience
ulnkiy
Was it common for healthcare professionals, undertakers, etc to catch influenza from handling bodies in the 1918 Flu epidemic?
"During the fall and winter months of 1918, mortality rates among physicians and nurses presumed to have influenza were 0.64% and 0.53%, respectively." https://www.centerforhealthsecurity.org/cbn/2011/cbnreport_02042011.html
390
AskScience
ulnvy4
The mullet, the crazy hairspray hair, it felt like everyone thought the bigger their hair was, the better. I always thought men were hotter when they had short hair. I didn't care for Kevin Costner until he got short hair for THE BODYGUARD and in that movie, it was hubba hubba. Before when he had the mullet, he looked ...
Twenty years from now you're going to cringe when you see photos of the hairstyle you have now.
170
AskOldPeople
ulnvy4
The mullet, the crazy hairspray hair, it felt like everyone thought the bigger their hair was, the better. I always thought men were hotter when they had short hair. I didn't care for Kevin Costner until he got short hair for THE BODYGUARD and in that movie, it was hubba hubba. Before when he had the mullet, he looked ...
The man bun is the mullet of the current era. It will be mocked in the future.
100
AskOldPeople
ulnvy4
The mullet, the crazy hairspray hair, it felt like everyone thought the bigger their hair was, the better. I always thought men were hotter when they had short hair. I didn't care for Kevin Costner until he got short hair for THE BODYGUARD and in that movie, it was hubba hubba. Before when he had the mullet, he looked ...
Every generation manages to come up with styles that the succeeding generations think look stupid. The 80s were no exception.
70
AskOldPeople
ulpzod
During Polymerase Chain Reaction, Why does Taq polymerase only extend the primer-DNA hybrid upto 1.5 kilo base pairs and not beyond that?
Processivity has to do with the likelihood of the polymerase falling off the DNA. In cells there is a protein called the clamp which literally clamps around the DNA and anchors the polymerase to the DNA. This increases processivity enormously. Its not included in the PCR design because its an extra step that is hard to...
250
AskScience
ulqhld
Some of my team members argue that we should not use anything from the standard library or the standard template library, anything that starts with "std ::", as it may use dynamic memory allocation and we are prohibited to use that (embedded application). I argue that it is crazy to try to write copies of standard func...
That wording is already way too broad. Are you going to write your own `std::cos` function? I doubt it. Not to mention the few places where the core language is inseperably connected with parts of `std::`. You can find out what parts of the standard "may" allocate memory. For example `std::find` wont allocate memory...
790
cpp_questions
ulqhld
Some of my team members argue that we should not use anything from the standard library or the standard template library, anything that starts with "std ::", as it may use dynamic memory allocation and we are prohibited to use that (embedded application). I argue that it is crazy to try to write copies of standard func...
I would say, "What do you mean by 'may'? Like, maybe on a whim, because it's a Monday, that today's the day this function decides to allocate?" Like, what's this "may" shit? You either know what you're talking about, or you don't know what you're talking about. Does a given thing allocate or not? And if so, how? It may...
320
cpp_questions
ulqhld
Some of my team members argue that we should not use anything from the standard library or the standard template library, anything that starts with "std ::", as it may use dynamic memory allocation and we are prohibited to use that (embedded application). I argue that it is crazy to try to write copies of standard func...
Writing your own implementation of something because you can't be bothered to look up whether it does dynamic memory allocation is clearly insane. If you don't have dynamic memory allocation, it should be pretty instantly obvious when you try to use something that needs it and it fails to work properly. std explicitl...
300
cpp_questions
ulqwij
I'm working on legacy code that has the following three constructors: // Constructor 1 ICLoggerFile( const QString& filename = QString(), ICLoggerModel::ICLoggerModelLogLevel level = ICLoggerModel::eICLoggerModelErrorLevel, quint32 maxsize = 0, quint3...
Picking the 3^rd is wrong since a pointer to const something is not convertible to a pointer to non-const void. If your local and CI builds are using the same compiler, then they must be using different switches. MSVC used to be lax about string conversions, so I guess you have some permissive switch set. Edit : y...
50
cpp_questions
ulrgn5
So my thought is simple, If you see clearer at a further distance vs avg population, then your brain in turn has to process more data. Over the growth of a child, I have to imagine that much keener sight would cause a noticeable difference in ability to process information as you have to always process more. Any ...
>If you see clearer at a further distance vs avg population, then your brain in turn has to process more data. That matches intuition, but it ends up not being how neurovisual brain activity works. It's easy to think of ourselves as computers processing pixels in a classical computing loop (more pixels mean more p...
60
AskScience
ulsdsi
I'm working on a compiler for one of the courses I need for my degree and I need to modify a major part of it (the expression evaluator) to handle optional references (I could just overload the entire thing but I don't want to duplicate code and create more work for myself). I came across `std::reference_wrapper` (and ...
That is fine and what `reference_wrapper` is intended for. But let me suggest an alternative: A raw pointer. It is an indirection and it can be null. Problem sovled.
40
cpp_questions
ulskr9
Well , the question is in the title , I've found **a lot** more websites that offer c++ courses/tutorials for starters than for C But from my humble understanding : C is more simple than cpp and I may make some software for my Ubuntu pc with C Anyway, probably learning cpp is better, but the question still stand...
> Is it worth to learn C before cpp ? No. It is akin to learning latin before you learn italian. There is nothing that you would learn in C that you cannot (and wont) learn in C++ (apart from the appriciation of C++'s features). At the same time, a lot of regular C would be pretty bad if not illegal C++. In fact,...
310
cpp_questions
ulskr9
Well , the question is in the title , I've found **a lot** more websites that offer c++ courses/tutorials for starters than for C But from my humble understanding : C is more simple than cpp and I may make some software for my Ubuntu pc with C Anyway, probably learning cpp is better, but the question still stand...
Obligated mention: [CppCon 2015: Kate Gregory “Stop Teaching C"](https://www.youtube.com/watch?v=YnWhqhNdYyk)
180
cpp_questions
ulskr9
Well , the question is in the title , I've found **a lot** more websites that offer c++ courses/tutorials for starters than for C But from my humble understanding : C is more simple than cpp and I may make some software for my Ubuntu pc with C Anyway, probably learning cpp is better, but the question still stand...
They are separate languages. The important thing is that they have different idioms. What is good C is often bad C++. It's all too common that C programmers write a lot of really bad C++. But there are lessons you can learn from C expressly for the purpose of learning C++. Namely, you don't have to make a class for ev...
170
cpp_questions
ulswlv
I was just at the dentist who mentioned that he gets a lot of new mothers who need serious fillings or root canals, even if they had really healthy teeth pre-pregnancy and took good care of their dental health. I didn't get to ask deeply about it but physiologically, how does getting pregnant affect dental health so ba...
It has to do with nutrition and vitamins! Basically when people make jokes about babies being parasites, there is a reason for that. The body has to provide to make the baby, and it just so happens that calcium is one of the things they need a massive amount of- for all those bones and calcium rich body parts (like tee...
410
AskScience
ulswlv
I was just at the dentist who mentioned that he gets a lot of new mothers who need serious fillings or root canals, even if they had really healthy teeth pre-pregnancy and took good care of their dental health. I didn't get to ask deeply about it but physiologically, how does getting pregnant affect dental health so ba...
Pregnancy-induced Gingivitis is extremely common, and is caused by the fluxuations and different hormones one goes through whilst pregnant. This can make it more difficult to properly clean the teeth due to the swollen tissues, or even dissuade people from doing so because of bleeding and soreness. Also, morning sickn...
280
AskScience
ulswlv
I was just at the dentist who mentioned that he gets a lot of new mothers who need serious fillings or root canals, even if they had really healthy teeth pre-pregnancy and took good care of their dental health. I didn't get to ask deeply about it but physiologically, how does getting pregnant affect dental health so ba...
[removed]
90
AskScience
ultkcv
Could there be cave paintings containing animals we haven't found fossil records for yet? And if there were, how would we tell if the animal being depicted was actually real and not some made up creature?
Not as old as cave paintings but still pretty old is the Set animal. Some sort of canine with a forked tail, square ears and a long curved nose. Could be fanciful or a stylistic representation of a known animal or something that went extinct we haven't identified. Most experts lean to the fanciful, but we really don't ...
30,580
AskScience
ultkcv
Could there be cave paintings containing animals we haven't found fossil records for yet? And if there were, how would we tell if the animal being depicted was actually real and not some made up creature?
Not a cave painting, but there's always the case of the "[Meidum goose](https://news.artnet.com/art-world/extinct-goose-egypt-mona-lisa-1947028)". The Meidum mural is one of Egypt's most famous ancient artworks, a 4,600-year-old painting found in the tomb of a prince named Nefermaat. One of the most interesting details...
10,240
AskScience
ultkcv
Could there be cave paintings containing animals we haven't found fossil records for yet? And if there were, how would we tell if the animal being depicted was actually real and not some made up creature?
We obviously know about horses, but there are petroglyphs of what appear to be horses and people on horseback in South America hundreds (possibly even thousands) of years after horses are believed to have gone extinct in the Americas. It is unclear if horses persisted within native oral tradition for dozens of generati...
6,470
AskScience
ului03
Hi, I have a web service that does some reqwest calls to other services. I had quite a challenge to implement it in such a way that the request calls run in parallel, but only those that I need. In the end I got it working like this `let mut requests: Vec<Pin<Box<dyn Future<Output = Result<FeatureColle...
You can't implement Send yourself, the compiler is the one that decides if a type is Send or not. Read [this chapter](https://doc.rust-lang.org/book/ch16-03-shared-state.html) of the book, it describes how to share data between threads.
40
LearnRust
ulw45v
I was infusing some whiskey and had overfilled the bottle. I noticed when I attempted to force the cork on wood chips that had been floating quickly sank only to rise when I removed the cork. It was overfilled to the point there was no airgap so it didn't seem I was forcing air into the solution and shaking the bottle ...
The increased pressure on the liquid could have compressed the air in the wood chips. That would increase the density of the wood chips, and they sink. When you take the cork out, pressure drops. The air bubbles in the wood chips push the liquid back out, density drops, and the chips float. The air might be staying i...
70
AskScience
ulw45v
I was infusing some whiskey and had overfilled the bottle. I noticed when I attempted to force the cork on wood chips that had been floating quickly sank only to rise when I removed the cork. It was overfilled to the point there was no airgap so it didn't seem I was forcing air into the solution and shaking the bottle ...
Liquids are often not noticeably compressible under normal human temperatures and pressures. Is it possible that what happened is the compression was (near) entirely forced on the cork which was compressed until it no longer displaced its weight and therefore lost buoyancy?
60
AskScience
ulw45v
I was infusing some whiskey and had overfilled the bottle. I noticed when I attempted to force the cork on wood chips that had been floating quickly sank only to rise when I removed the cork. It was overfilled to the point there was no airgap so it didn't seem I was forcing air into the solution and shaking the bottle ...
[removed]
30
AskScience
ulx2s9
Where did you attend college, what years, and what was the overall experience like?
Undergrad is in agriculture from a college in the Deep South. If you’ve seen Letterkenny, it was that, but without hockey.
30
AskOldPeople
ulx2s9
Where did you attend college, what years, and what was the overall experience like?
It was great being away from my awful parents, but my fellow students were such dumbasses. People will reminisce about the great friends they still have from college and I'll wonder why the fuck there didn't seem to be anyone great at my college.
30
AskOldPeople
ulx2s9
Where did you attend college, what years, and what was the overall experience like?
Went straight from high school in '77 to working in a publishing career. Lied a little in the interview. Fake it till ya make it. Seems like a lifetime ago. Oh, it was!
30
AskOldPeople
ulxe65
What was it like living during the AIDS/HIV crisis, was it scary?
It was the best of times, it was the worst of times. In 1980 at age 22 I took a semester off, moved to Austin, Texas and jumped into the gay crowd with both feet. I made a number of good friends, almost all of them are dead now. The first couple years of the decade were a blast. Then the plague came. Some peop...
2,510
AskOldPeople
ulxe65
What was it like living during the AIDS/HIV crisis, was it scary?
I studied for my doctorate with two people, one of whom (a gay man) had AIDS. He was a funny, brave, smart, wonderful person. We helped each other prepare for orals and our dissertation defenses. At first we didn't realize he was sick but then he began to fail quickly. I went to visit him in the hospital and this was...
1,910
AskOldPeople
ulxe65
What was it like living during the AIDS/HIV crisis, was it scary?
As someone who was (as far as I knew then) straight, not promiscuous (i.e., a loser), and living in a place (Trenton NJ) not particularly known as a gay hotspot? It was still fucking terrifying. Yeah, it was originally billed as "Gay Cancer," but it was pretty quickly established that it's not a gay disease. Anyone co...
1,280
AskOldPeople
ulxgmo
Hi Everyone, Here is my Matrix Multiplication C++ OpenMP code that I have written. I am trying to use OpenMP to optimize the program. The sequential code speed was 7 seconds but when I added openMP statements but it only got faster by 3 seconds. I thought it was going to get much faster and don't understand if I'm doi...
Move the `matC[i][j]` assignment out of the loop. And pls, no more nested arrays. Double indirection on every element access isn't a great idea. Just use 1D `std::vector`. *And if I enable AVX2+fp:fast on MSVC, I get FMA instructions. *`std::for_each(std::execution::par` appears to be slightly faster, but you need a...
30
cpp_questions
ulxixy
I’ve been obsessed with aging recently (not in a good way, mind you) and I can’t help but notice that I’ve yet to meet a single person who’s 40 or older that still has fun like they did in their teens, 20s, and 30s. Does anyone still get drunk as fuck at parties? Is romance still exciting? Do wild ass things still happ...
Do people still do some of that? Sure. But I don't, and I have awesome times. As you get older what you find enjoyable changes. I mean, in another universe there's someone who's posted to r/ask20somethings asking "do people in their 20s and 30s still have fun? I mean like, watching cartoons, going down the slide FRONT...
1,270
AskOldPeople
ulxixy
I’ve been obsessed with aging recently (not in a good way, mind you) and I can’t help but notice that I’ve yet to meet a single person who’s 40 or older that still has fun like they did in their teens, 20s, and 30s. Does anyone still get drunk as fuck at parties? Is romance still exciting? Do wild ass things still happ...
Absolutely still having a blast in my 50s. Just not doing stupid shit like I did in my 20s.
540
AskOldPeople
ulxixy
I’ve been obsessed with aging recently (not in a good way, mind you) and I can’t help but notice that I’ve yet to meet a single person who’s 40 or older that still has fun like they did in their teens, 20s, and 30s. Does anyone still get drunk as fuck at parties? Is romance still exciting? Do wild ass things still happ...
I had _more_ fun in my 40s than in my 20s. Including great parties, great travel experiences, awesome friends. I’ve had much more exciting romance in my 40s than in my 20s. I love going to metal gigs. I still get somewhat drunk sometimes, but “getting drunk as fuck at parties” really does get boring as you get older, ...
420
AskOldPeople
ulzraf
Edit: I was thinking about kidney and liver transplants, where the donor may still be alive.
Interesting question. Broadly, there are three types of rejection: hyperacute, acute and chronic. In hyperacute rejection the organ gets damaged really quickly by premade antibody and immune cell activity. I reckon by the time this was diagnosed the organ would be pretty badly damaged. In acute and chronic rejecti...
1,180
AskScience
ulzraf
Edit: I was thinking about kidney and liver transplants, where the donor may still be alive.
Unfortunately for most organ transplants the donor is dead, so it wouldn't be much use to them. The time window for transplants is pretty small and the rejection would damage the organ really badly, so I doubt it would be much use to anyone else either
290
AskScience
ulzraf
Edit: I was thinking about kidney and liver transplants, where the donor may still be alive.
Well there are instances of healthy donor organs being re-donated and used if that person were to die, but I think if the organ were rejected it would be too damaged to be useful in anyone else. As far as being given back to the donor I don't think that would be possible because of blood supply issues. Like you could r...
70
AskScience
um18by
Hi. I came across an AI engineer mentioning in an interview that "AI is just compression". I was struggling to understand what this means. I figured he was talking about the link of information theory to AI but not sure. He also mentioned the hutter prize which led him to this epiphany of "AI is just compression". It s...
EDIT: There's some criticism of my use of the term "AI" versus "ML". I'm answering the question as I think OP intended it, which is covering the subset of AI which is popular today, which is really ML. So if you read this, and it bugs you that I use AI, please read ML instead, it's what I really mean. If it's not immed...
480
AskComputerScience
um18by
Hi. I came across an AI engineer mentioning in an interview that "AI is just compression". I was struggling to understand what this means. I figured he was talking about the link of information theory to AI but not sure. He also mentioned the hutter prize which led him to this epiphany of "AI is just compression". It s...
Are you sure he said AI and not machine learning? Machine learning can be seen as function estimation. For a given ML problem, there is some true function which is either intractable or unknown, and the task of ML is to come up with a good guess of a function that gets the right answers most of the time (or perhaps w...
160
AskComputerScience
um18by
Hi. I came across an AI engineer mentioning in an interview that "AI is just compression". I was struggling to understand what this means. I figured he was talking about the link of information theory to AI but not sure. He also mentioned the hutter prize which led him to this epiphany of "AI is just compression". It s...
Your brain doesn't actually store data but it learns how to reproduce by conditioning your neurones. Instead of storing big amounts of data, you can train a set of neurones, which will consume less space compared to the data itself, hence compression. It won't be bit perfect though. Using AI for *real* compression is ...
30
AskComputerScience
um1faj
What signals are they receiving and why would an enemy plane or munition emit these signals in the first place?
>What signals are they receiving Imagine you're hiding in a dark room. And you know someone is looking for you: because in that darkness you can see someone using a flashlight, inspecting every dark corner where you might be hiding ... It's the same thing with whatever electromagnetic signal you're using to find ...
600
AskScience
um1faj
What signals are they receiving and why would an enemy plane or munition emit these signals in the first place?
In short, the different mechanisms for achieving the lock can be detected. Active radar homing has a radar in the missile sending out signals. Those signals can be detected and classified by the target aircraft. Passive radar homing has a receiver in the missile reacting to specific signals bounced off of the target b...
90
AskScience
um1faj
What signals are they receiving and why would an enemy plane or munition emit these signals in the first place?
Combat aircraft will have an RWR (radar warning receiver). This will alert them to the radar signals of various possible threats. Most RWR's will be able to tell the difference between various threats, like a specific type of enemy aircraft, or specific type of surface to air missle system. It also knows when one of...
30
AskScience
um28lu
i.e. the '60s, '70s, etc...
The 2020s already seem like a full fricking decade.
210
AskOldPeople
um28lu
i.e. the '60s, '70s, etc...
2020
210
AskOldPeople
um28lu
i.e. the '60s, '70s, etc...
The 80s, simply because I spent so much of them waiting to be older, to be out of high school, out of my parents house and away from the boring, parochial, minuscule town they'd settled in.
80
AskOldPeople
um4vqh
Imagine a struct, having 5 doubles as members + implicit constructors. An instance of this obj is passed to a function by value. Before the function does anything, in the debugger you see that the members are different than their assignments. What might be modifying this copy constructed temp object? We had to pass the...
Maybe nothing was wrong and the function simply didn't set itself up yet.
120
cpp_questions
um4vqh
Imagine a struct, having 5 doubles as members + implicit constructors. An instance of this obj is passed to a function by value. Before the function does anything, in the debugger you see that the members are different than their assignments. What might be modifying this copy constructed temp object? We had to pass the...
The function will expand the stack space to accommodate your struct, and then copy the values from the callee into that space. Before the copy, however, the struct will contain uninitialized values - garbage left over from previous calls. With the debugger, always assume that the function starts at the *first stateme...
50
cpp_questions
um5fkv
There are some movies that whenever they are on, I have to stop what I am doing and watch them. Yes, I've seen them TONS of time but they grab me everytime. Know what I mean? What are yours? \#1 Shawshank Redemption \# 2 Peggy Sue Got Married \# 3 Die Hard
You may not like my answer, since it's not a movie (well, it *was* a movie, but. . .), but anytime I come across an episode of M.A.S.H. I always watch. It doesn't matter that I've seen every episode a half-dozen times.
360
AskOldPeople
um5fkv
There are some movies that whenever they are on, I have to stop what I am doing and watch them. Yes, I've seen them TONS of time but they grab me everytime. Know what I mean? What are yours? \#1 Shawshank Redemption \# 2 Peggy Sue Got Married \# 3 Die Hard
On the lighter side *The Princess Bride* is not something I'll miss if available and for something more dramatic *Master and Commander: The Far side of the World* with Russell Crowe. Is there a better period style actor out there? *Gladiator* is another solid historical movie.
240
AskOldPeople
um5fkv
There are some movies that whenever they are on, I have to stop what I am doing and watch them. Yes, I've seen them TONS of time but they grab me everytime. Know what I mean? What are yours? \#1 Shawshank Redemption \# 2 Peggy Sue Got Married \# 3 Die Hard
O Brother Where Art Thou
240
AskOldPeople
um5gwq
I'm asking this as a fellow "old person". (44 F). Is there a meal service geared toward senior citizens? My mom, who just turned 75, barely eats anything. She's maybe 90 pounds. She has to do a low sodium diet per her doctor because of heart problems. She doesn't like to cook so she eats mostly toast with jam or TV ...
I don’t know the answer as an “old person”, but as a nurse of 30 years, I’d call her doctor, tell him/her your concerns, and let the multitude of social service options rain on your mother. I know it seems overwhelming, but there really is a way in this country to feed the elderly; if you need reassurance, send me a D...
200
AskOldPeople
um5gwq
I'm asking this as a fellow "old person". (44 F). Is there a meal service geared toward senior citizens? My mom, who just turned 75, barely eats anything. She's maybe 90 pounds. She has to do a low sodium diet per her doctor because of heart problems. She doesn't like to cook so she eats mostly toast with jam or TV ...
I volunteer for Meals on Wheels in my area. At least here,there is no restriction based on ability to drive. If you need/want the service,you can participate. If low income,there are subsidies. If not,you can pay the full price. However,the meals are not low sodium or made with individual dietary concerns. I myself ,ag...
100
AskOldPeople
um5gwq
I'm asking this as a fellow "old person". (44 F). Is there a meal service geared toward senior citizens? My mom, who just turned 75, barely eats anything. She's maybe 90 pounds. She has to do a low sodium diet per her doctor because of heart problems. She doesn't like to cook so she eats mostly toast with jam or TV ...
Get an Instant Pot or slow cooker, make soup or stew by the gallon, and freeze it for her in individual microwave containers. You can do several different batches so that she’s always got some variety.
80
AskOldPeople
um8ehb
Hi, I've been trying to cross compile my C++ code using the "-arch i386" and GCC outputs that it's deprecated for mac OS. I just wanted to know if there is any work around.
Cross-compile it to what target? You could also compile up your own toolchain. But afaik: macOS stopped supporting 32-bit some time ago.
90
cpp_questions
um8nb0
I've been using Dev C++, but it often crashes/closes itself and I lose all unsaved stuff. I've already tried Visual Studio Code (couldn't make it work correctly), Code::Block (it doesn't seems to have skin support?). If those are the best IDEs, how do I compile by cli? I don't really mind using notepad++. lol...
You making your life hell. Download visual studio 2022 community edition. And make it easy on yourself.
130
cpp_questions
um8t09
I am asking because I am learning remotely and trying to prioritize which subjects to focus on. Like how much should they know about each of these topics more or less and which matter the most? Are any other points more important that I should have included? Or are there too many types of jobs using C++ to make any ...
What very often people do not want to admit is that you are expected to know all of this in entry level. What is not expected is how to combine all of this to solve a problem.
560
cpp_questions
um8t09
I am asking because I am learning remotely and trying to prioritize which subjects to focus on. Like how much should they know about each of these topics more or less and which matter the most? Are any other points more important that I should have included? Or are there too many types of jobs using C++ to make any ...
You get paid to get shit done, not how many language feature checkboxes you can tick off. The programming language is just scratching the surface of what’s important in a software engineering job.
270
cpp_questions
um8t09
I am asking because I am learning remotely and trying to prioritize which subjects to focus on. Like how much should they know about each of these topics more or less and which matter the most? Are any other points more important that I should have included? Or are there too many types of jobs using C++ to make any ...
I would argue everything from the first block. However, you don't have to know everything in detail. For example: You should know how to use streams, though special stuff as using std::fill I've never used in my 10 year career. Even when useful, I would expect someone to give you std::format instead. I wouldn't expec...
50
cpp_questions
um9oz4
Hi guys, nooby question from an electronics tinkerer. For reference this is for a microcontroller with very minimal resources. The WiFi api for my microcontroller (ESP32) requires me to set a struct member that is a `uint8_t[32]` for the SSID. The docs simply showed `xyz.ssid = "name"` but that gives the error "must b...
> For reference this is for a microcontroller with very minimal resources and I'm trying to avoid including lots of headers. These two statements do not correlate. A header does not have any runtime overhead in and of itself. The code in the headers is likely much more optimised that what you or I could write.
60
cpp_questions
um9vff
Which book does it exactly refers to?
Are you asking about "a book that specifically provides an introduction to programming"? There are tons of intro books out there, and I don't think they're referring to a specific one. Here's my favorite: https://openbookproject.net/thinkcs/python/english3e/
140
LearnRust
um9vff
Which book does it exactly refers to?
It’s not referring to a literal book. [The book](https://doc.rust-lang.org/book/) is just a Medium sized online course so that you can get started with rust.
120
LearnRust
umb4gq
Can non alcoholic beer grow botulism , especially If the cans are a little swollen at the top and one of the bottoms of the cans was popped outwards. You always hear about how you should never consume anything from a swollen or dented can, but what is the likelihood of botulism spores growing in a commercially sold non...
The most important component for botulism risk is pH. The sterilized canning method is a primary means of safety but having acidity in the food is considered a secondary safety barrier. A swollen can is likely over-pressure caused by secondary fermentation, spoilage, or freezing. Botulinum growth of course doesn't nece...
40
AskScience
umb7p8
In my custom class I would like to overload & operator so that it returns the address of a member variable. Is this a safe approach as I assume it would make it impossible to get the address of the class object or should I just use a 'getMemberAddr()' function
> I assume it would make it impossible to get the address of the class object It would still be possible using [`std::address_of`](https://en.cppreference.com/w/cpp/memory/addressof). In general, it is highly discouraged to overload the unary `&` operator. I think adding the `getMemberAddr()` function wo...
80
cpp_questions
umb7p8
In my custom class I would like to overload & operator so that it returns the address of a member variable. Is this a safe approach as I assume it would make it impossible to get the address of the class object or should I just use a 'getMemberAddr()' function
The important consideration to make is how confusing this implementation will be to someone who's seeing it with no context. Operators are defined with a very specific set of semantics in mind. If you start changing what those semantics mean, your code suddenly becomes unintelligible to anyone not already familiar with...
30
cpp_questions
umbn40
I am just curious if it is better practice to use a macro instead of creating a new variable? void csvParser::formatImportCell(csvCell& _cell) { std::string& cellReference = _cell.getCellReference(); // #define cellReference _cell.getCellReference() // Remove enclo...
Using a macro in modern C++ is (almost) never a good idea. You should try to never have to use them.
90
cpp_questions
umbn40
I am just curious if it is better practice to use a macro instead of creating a new variable? void csvParser::formatImportCell(csvCell& _cell) { std::string& cellReference = _cell.getCellReference(); // #define cellReference _cell.getCellReference() // Remove enclo...
It would be absolutely atrocious to define a macro like what you just showed there: 1. Macros are entities only the preprocessor can see. When you compile your code the file is first passed through the preprocessor and your macro will mean that at every point after that macro definition the word `cellReference` will b...
30
cpp_questions
umbn80
For the wisest among us, what would be the best advice you would say to your loved ones about life?
Well, I don't know if I am "the wisest" of folks, but after 50 years of marriage, raising two kids, being on a job site for 45 years, getting & remaining sober for 18,000+ days, and retiring, becoming a widower, a grandfather, and now being a great-grandfather, my advice to my loved ones is the same as always: Dea...
190
AskOldPeople
umbn80
For the wisest among us, what would be the best advice you would say to your loved ones about life?
It is not even remotely fair. Get over the notion that it will be and you will be better prepared for the crap that will come your way.
50
AskOldPeople
umbn80
For the wisest among us, what would be the best advice you would say to your loved ones about life?
Live it. Do it. Love who you love with reckless abandon and take chances. Travel. Never stop learning. Also, a fucked up brain chemistry can take you down deeper than you know. Be aware not everyone can do what you can. Be patient with small children and old people and pets. Be kind to others and to yourself. You ...
30
AskOldPeople
umbwe2
I have as a resource `std::ifstream filestream`, and re-use it for a loop that iterates over filenames: ``` for ( string &filename : filenames ) { filestream.open(filename); sleep(1); //work filestream.close(); } ``` Is my understanding correct: - I believe this introduces a memory leak, if t...
Why are you reusing that filestream? For performance? Are you actually resuing it? Calling open() and close() is like constructing and destructing that object, so why not just move it inside the scope of for? Then you'll have a perfectly standard RAII stream.
90
cpp_questions
umbwe2
I have as a resource `std::ifstream filestream`, and re-use it for a loop that iterates over filenames: ``` for ( string &filename : filenames ) { filestream.open(filename); sleep(1); //work filestream.close(); } ``` Is my understanding correct: - I believe this introduces a memory leak, if t...
`ifstream` closes in its destructor, it is already a proper RAII type. the code is perfectly fine as it is and changing it will make it much worse. it may make sense to just not reuse it though and make a local `ifstream` inside the loop. if it were a `std::vector`, reusing it is much more beneficial
40
cpp_questions
umbyou
Is there a way to get nex element when using a ranged for loop? For example can you implement a basic bouble sort with 2 for range?
no, you will need to manually loop with index or iterators for sorting
50
cpp_questions
umdbot
I wrote a little bit ago a cmd based program to track my status of series i watch with my girlfriend. The data is saved in a .csv like „Seriesname(char[40]);actualseason(int);actualepisode(int);allseasons(int);allepisodes(int);restepisodes(int)“. The variables are created by a structarray which gets it’s length by the ...
Do yourself a favour, and use a modern UI framework, such as Qt, or WxWidgets instead of fighting with the Windows API.
70
cpp_questions
ume5c8
I feel bad for the horny ppl of the past specifically women https://mobile.twitter.com/broyeanice/status/1443665239132839938
I rather doubt these are real. It’s easy to fake something to look old. Some of the items on the list are not suspect but some of them just sound like what people today think happened back then. Maybe I missed it but I don’t see any sources cited for this. It’s been attributed to McCall’s magazine from 1958. After t...
70
AskOldPeople
ume5c8
I feel bad for the horny ppl of the past specifically women https://mobile.twitter.com/broyeanice/status/1443665239132839938
No first hand experience, but the family history of those days is filled with frustration, forced and failed marriages, judging other family members for seeking happiness, women seen as spinsters at 25, not allowed to educate themselves and forced to stop working when pregnant, partners deemed unfit and other questiona...
60
AskOldPeople
ume5c8
I feel bad for the horny ppl of the past specifically women https://mobile.twitter.com/broyeanice/status/1443665239132839938
People like to read, and so other people crank out shit for them to read. It's better to think of that shit as shit to read, and maybe add some of your own shit if you're reading it in the outhouse, and if you're the type of person who takes that shit seriously, there's a good chance you do use an outhouse. tldr: It'...
50
AskOldPeople
umegcg
Why We won't have to move to RUST?
You don't have to move to Rust, but you can. It's quite nice there: https://en.wikipedia.org/wiki/Rust%2C_Burgenland
40
LearnRust
umg72y
I am working on a system in which some actions are time critical, and other actions have to be executed periodically without particular schedule. I can do a certain number of actions until I need to do the time critical stuff again. This number is not always the same. At the moment I use a loop like this: int ...
Function pointers are awesome for this sort of thing.
110
cpp_questions
umg72y
I am working on a system in which some actions are time critical, and other actions have to be executed periodically without particular schedule. I can do a certain number of actions until I need to do the time critical stuff again. This number is not always the same. At the moment I use a loop like this: int ...
How about: static constexpr std::array<void(*)(), 25> actions {&action_0, &action_1, /*...*/, &action_25}; Now you can write a simple algorithm: std::for_each(std::begin(actions), std::next(std::begin(actions), allowed_actions), std::invoke<void()>);
40
cpp_questions
umg72y
I am working on a system in which some actions are time critical, and other actions have to be executed periodically without particular schedule. I can do a certain number of actions until I need to do the time critical stuff again. This number is not always the same. At the moment I use a loop like this: int ...
You could use an enum to avoid manually shifting the numbers when you want to insert a step into the middle: https://godbolt.org/z/vTrhrMa4M Adding the post_init step in order just means making sure it is in order inside the enum, it doesn't matter where it ends up in the switch (though you should prefer in order the...
30
cpp_questions