thread_id
stringlengths
6
6
question
stringlengths
1
16.3k
comment
stringlengths
1
6.76k
upvote_ratio
float64
30
396k
sub
stringclasses
19 values
unj838
Watched a documentary there called American Factory where a huge corporation spy’s on its workers to see who’s in a union and find ways to fire those who support it. In school I was also taught that when the mafia was prevalent they were able to corrupt a number of unions. Do you feel any unions in the US are effective nowadays. Here in Ireland we really don’t have a strong union for any industry bar the Luas industry. Often what happens is a small minority in a union for one industry will feel not cared for and will form a new union and send conflicting messages and demands to the employers and government.
> spy’s on its workers to see who’s in a union and find ways to fire those who support it. Haven't seen the movie, but I suspect that they were trying to identify workers who were trying to form a *new* union, rather than workers who were already part of a pre-existing union. It's very common for companies to discourage workers from forming unions, because unions are intended to force changes that benefit the workers at the expense of the company. It is illegal to fire a worker for trying to form or encourage a union, but companies can legally fire workers for all manner of other petty reasons, so union promoters should expect to be under increased scrutiny. Anyway, once the union exists, there's no secret about who's a member. I've never been a member of a union. I've worked alongside union members in various job functions. Some unions are a pain in the ass to deal with, some are not. Some are effective at improving working conditions, some are not. Some are corrupt, some are not.
190
AskAnAmerican
unj838
Watched a documentary there called American Factory where a huge corporation spy’s on its workers to see who’s in a union and find ways to fire those who support it. In school I was also taught that when the mafia was prevalent they were able to corrupt a number of unions. Do you feel any unions in the US are effective nowadays. Here in Ireland we really don’t have a strong union for any industry bar the Luas industry. Often what happens is a small minority in a union for one industry will feel not cared for and will form a new union and send conflicting messages and demands to the employers and government.
Some unions prey on the employees that they're supposed to support. Some unions are wildly corrupt. Some are inefficient and obstructionist. Some are mostly good, but made mistakes. And some are pretty great. I was in a union that was corrupt and preyed on their own people. I was offered a job selling insurance to union members where the insurance company deliberately misrepresented itself and the coverage and bribed the union bosses to look the other way (I declined). I'm currently in a great union. If I wasn't working here, I wouldn't believe that a union could be this good, working with the business as a partner, not looking for problems but addressing them when they come up, and defending the employees when needed (which is rare because the business isn't shady).
130
AskAnAmerican
unjawi
Would you have to have an older sample too? How's that work? Edit: You guys are very informed in your fields. I'm impressed. A lot of academic communities act aggressively to those that are uninformed. Thank you all for your answers. Almost like I would need a few years to comprehend your discussions adequately. Weird, huh?
No, you cannot see them with standard DNA sequencing. Although egenetic changes do modify the DNA, they do not modify the actual sequence. You can detect epigenetic modifications with techniques such as chromatin IP, bisulfite sequencing, ATAC-sequencing, and Western blotting, among others; the technique you use depends on the precise modification you're interested in and how sensitive you need it to be.
380
AskScience
unjawi
Would you have to have an older sample too? How's that work? Edit: You guys are very informed in your fields. I'm impressed. A lot of academic communities act aggressively to those that are uninformed. Thank you all for your answers. Almost like I would need a few years to comprehend your discussions adequately. Weird, huh?
There is the added complication that there may be tissue-specific differences in epigenetic marks, so you'd need to sample across multiple locations (unlike the case for your genomic sequence, which with some exceptions should be about the same in every cell in your body).
50
AskScience
unlj00
~43% of sites worldwide use Wordpress, however 99% of the front end job descriptions I’ve seen never mention Wordpress and instead mention JS frameworks. 1. Why do you think that is? 2. Am I pigeonholing myself if I were to take a job where they use Wordpress instead of JS framework? 3. Say I take the job and stick with it for 2-3 years where I’m gaining experience with Wordpress, PHP, vanilla JS, CSS/Sass - do you think it’d be hard to switch into a development role using something like React?
>1. Why do you think that is? Most WordPress sites need minimal development. 90% of it can be managed by a random guy in marketing. That's actually one of the main selling points of WordPress: you don't need to hire a lot of expensive developers.
60
AskProgramming
unlj00
~43% of sites worldwide use Wordpress, however 99% of the front end job descriptions I’ve seen never mention Wordpress and instead mention JS frameworks. 1. Why do you think that is? 2. Am I pigeonholing myself if I were to take a job where they use Wordpress instead of JS framework? 3. Say I take the job and stick with it for 2-3 years where I’m gaining experience with Wordpress, PHP, vanilla JS, CSS/Sass - do you think it’d be hard to switch into a development role using something like React?
Because companies don't generally need full time employees to build them a static website, and keep it going. The majority of Wordpress sites are built by design agencies and lone wolf designers, or people doing it themselves. This isn't in any way to denigrate Wordpress or the people that use it, by the way. Far from it. But once a WP site is up, the work of the person designing it is largely done.
30
AskProgramming
unlolu
Solved: Thank you for your answers, I found perf, gprof, gprof2dot and hotspot, that helps a lot. This tools are available in Linux (Ubuntu/Fedora). \#################### Hi. I don't know how to implement this question. The thing is, I am following some tutorials for developing games with SDL2: Madsycode(youtube), Limeoats(youtube), Pikuma(was in Udemy, now he has his own page). * One of the many things that I like in the Pikuma tutorial, is that the programs is so lightweight, ECS, integration with Lua. * In the Limeoats, I like that you can print with animations tilemaps and some physics. * With Madsycode, I like the organization of the code. ​ This is each game running and measuring using htop, bpytop, btop. | SDL | threads | RAM | CPU | | ------ | ------- | --- | --------------- | | Mad | 12 | 79M | (2.5 to 3.5) | | Lime | 11 | 69M | (1.9 to 2.6) | Pikuma doesn't measured because its the lighter :D **But,** comparing Mad and lime, the consume are almost similar. Is there a way to know which thread/method/function is consuming more? Or, Which method do you use for lightweight your program?
For windows, I love perfview. Steep learning curve though but it will serve you well to invest the time.
30
cpp_questions
unn41s
What would you personally have done more of in your younger life so that you can feel more fulfilled now?
Learned more about finance and invested more, sooner. I’m not doing badly now, but I could have done much better, much earlier if I’d made some relatively small changes to my money habits.
920
AskOldPeople
unn41s
What would you personally have done more of in your younger life so that you can feel more fulfilled now?
Say no about 10x more often. I can't stress this enough. If you feel like somebody can't handle your no, then you are being bullied, pushed around, manipulated, etc by that person. It's a huge red flag. Address elephants in rooms every time I see one (because I'm gonna be the one to do it anyway. I may as well get it over with asap.) Self-care. I still suck at it, but I think I probably had a better chance of making it habitual if I had recognized the need 30 years ago. Be less shy and afraid to participate in things.
760
AskOldPeople
unn41s
What would you personally have done more of in your younger life so that you can feel more fulfilled now?
Education, education, education. Have the skills to support yourself. Never depend on a spouse or SO to pay the rent.
660
AskOldPeople
unnbft
Pretty much just the title. Any help would be appreciated just wondering how much of a benefit it is when looking for a job
It's required for certain government or government contractor jobs. However, (in the U.S. at least), you can't just get a clearance if you want one. You require a reason and a sponsor for the clearance. That means you can't get a security clearance until you have landed a job that requires one.
120
AskProgramming
unnbft
Pretty much just the title. Any help would be appreciated just wondering how much of a benefit it is when looking for a job
Already having been cleared in the past is gets you a pretty good leg up on other applicants, and being eligible at all opens up opportunities in a smaller applicant pool than if you aren't, in aerospace (and other military contractors, but the big ones that are hiring in droves are the aerospace people). But you either already have one or you don't. It's not like you can just apply for one.
30
AskProgramming
unngx6
Do most world maps look like [this](https://geology.com/world/world-map.shtml) or like [this](https://www.mapshop.com/world-physical-map-with-wonders-pacific-centered-light-oceans/) I’ve seen some people say the US uses the world map that splits Europe in half and the US is in the middle, but I don’t think that people actually use that.
The first one is pretty standard.
1,680
AskAnAmerican
unngx6
Do most world maps look like [this](https://geology.com/world/world-map.shtml) or like [this](https://www.mapshop.com/world-physical-map-with-wonders-pacific-centered-light-oceans/) I’ve seen some people say the US uses the world map that splits Europe in half and the US is in the middle, but I don’t think that people actually use that.
New world on the left, Old world on the right is pretty standard.
1,080
AskAnAmerican
unngx6
Do most world maps look like [this](https://geology.com/world/world-map.shtml) or like [this](https://www.mapshop.com/world-physical-map-with-wonders-pacific-centered-light-oceans/) I’ve seen some people say the US uses the world map that splits Europe in half and the US is in the middle, but I don’t think that people actually use that.
>I’ve seen some people say the US uses the world map that splits Europe in half and the US is in the middle, but I don’t think that people actually use that. I think that is a type of nautical map, and it's done so both the Atlantic and Pacific can be seen in their entirety
760
AskAnAmerican
uno33m
So i came across AWS and i wanted to know to know if amazon hires those without experience in this field. I wanna learn a lot about AWS from cloud Practioner, developer and devops engineer, i know amazon has resources on their webistes for this but if i were to pass my AWS exam(s) what will the chances be of getting hired in this area
Maybe work for a Fortune 500 then transfer into the role like I did better option that wait if you wait a little bit skips all the It low wages stuff
70
ITCareerQuestions
uno33m
So i came across AWS and i wanted to know to know if amazon hires those without experience in this field. I wanna learn a lot about AWS from cloud Practioner, developer and devops engineer, i know amazon has resources on their webistes for this but if i were to pass my AWS exam(s) what will the chances be of getting hired in this area
You may be able to find an junior level AWS position like this one. [https://lensa.com/junior-cloud-engineer--aws-python-rust-java-jobs/des-moines/jd/bc90f1ba802f35dc09592275490716ae?utm\_campaign=google\_jobs\_apply&utm\_source=google\_jobs\_apply&utm\_medium=organic](https://lensa.com/junior-cloud-engineer--aws-python-rust-java-jobs/des-moines/jd/bc90f1ba802f35dc09592275490716ae?utm_campaign=google_jobs_apply&utm_source=google_jobs_apply&utm_medium=organic) Its not directly with AWS, but its a start. That being said, you may have to get some formal IT experience if you cannot break in this way. I would advise looking for other entry level IT positions as well as throwing your resume to junior level AWS positions as well.
50
ITCareerQuestions
unof2v
Hey guys, I am a soon to be physics grad, and while I have always enjoyed coding I do think I am a core science at my heart. So why programming? Because I need the money to sustain myself and pay my way through a masters, which can be quite expensive. Also, I need a break from physics for a while. Also can't stay with my parents no more. Bunch of stuff. So I wanna know which programming language should I focus and learn in the next 6 months in the hope of landing an alright job. I can program in python, C++ up until linked lists etc., and I have a solid understanding of control flow for most languages, and thus my confidence that I'll understand most languages. Also, the answers will help me get a nerve of what the programming world looks like right now and what is in demand. Any and all suggestions/criticism welcome. ​ PS: I'm in the UK if that helps.
What the heck does “up until linked lists” mean? That you can’t write code more complex than a linked list? Read it? Understand it? Also, how are you even defining “more complex”, if that’s even what you meant? And, “good understanding of control flow”? I’m no physicist, but sounds like to me: “I have a good understanding of F = ma. What does the particle physics market look like, and what kinda job can I get at CERN??”
30
AskProgramming
unogs1
I've made a small CLI program in python that solves a problem for me, and could be useful to others. It takes a .json file and converts an array within it to a csv to be edited, then you can send the csv back to overwrite the original array with the new key value pairs in the csv file. There's a few other minor things, but that's the gist of it. Now, I would like to monetize it. This script solves a problem I have with software that's $500/year, so I feel I can sell a few of these. Problem is, I'm not sure how to go about it. About me, I've published an android app in kotlin. I'm relatively familiar with kotlin and a little of python. I could probably pickup enough java quickly to get it done there. I've tried using tkinter to build a gui in python, but it's turning out to be way more work than I expected, and I don't know how I could monetize an .exe without having users just share the executable, circumventing having to pay for it. I would like to avoid having to manage my own backend for validation (hence using google auth). I thought of creating a web app that uses google authentication, but I can't find much information about how to do that (perhaps I am not looking in the right places... I don't know what I don't know, you know?) I've used apps script extensively to automate and log data (from g-services as well as rpi's). I guess my question is, how would you do this? It needs to accept a file from the user, ask some questions, generate a new file with that information, and spit out that different file to the user. I'm open to learning some of a new language if it's going to be easier, but would like to stick with kotlin/java/python if possible.
Open source it, put it up on github, use it as motivation to either get a higher paying job or a better increase from your employer. Profit!
80
AskProgramming
unogs1
I've made a small CLI program in python that solves a problem for me, and could be useful to others. It takes a .json file and converts an array within it to a csv to be edited, then you can send the csv back to overwrite the original array with the new key value pairs in the csv file. There's a few other minor things, but that's the gist of it. Now, I would like to monetize it. This script solves a problem I have with software that's $500/year, so I feel I can sell a few of these. Problem is, I'm not sure how to go about it. About me, I've published an android app in kotlin. I'm relatively familiar with kotlin and a little of python. I could probably pickup enough java quickly to get it done there. I've tried using tkinter to build a gui in python, but it's turning out to be way more work than I expected, and I don't know how I could monetize an .exe without having users just share the executable, circumventing having to pay for it. I would like to avoid having to manage my own backend for validation (hence using google auth). I thought of creating a web app that uses google authentication, but I can't find much information about how to do that (perhaps I am not looking in the right places... I don't know what I don't know, you know?) I've used apps script extensively to automate and log data (from g-services as well as rpi's). I guess my question is, how would you do this? It needs to accept a file from the user, ask some questions, generate a new file with that information, and spit out that different file to the user. I'm open to learning some of a new language if it's going to be easier, but would like to stick with kotlin/java/python if possible.
Quite frankly, this sounds like the kind of quick script that folks bang out every day. However, does this accomplish something that is critical to whatever processes the workflow involving the licensed software requires, and is it something that would normally be done many times during a given project? If so, the simplest approach would be to build the functionality into a webapp, using a framework that supports authentication (Laravel, etc), and can be integrated with a payment processor (Square, etc). If the solution you provide is cost-effective, you *might* make something from it. No harm in trying. By building a webapp, instead of a standalone application, you don’t have to worry about space pirates.
50
AskProgramming
unoruu
Let me give some example: int a = 3; #ifdef a cout << a; #else cout << (++a); #endif With the printed result `4`. Based on this example, I assume that preprocessor symbols are not the same as postprocessor symbols, AKA the `a` in `#ifdef a` isn't the same as the `a` in `int a = 3;`. I make this assumption, because if they were the same, I would assume `#ifdef a` to be a branch that is hit rather than missed. But evidently it missed. So in order to test that assumption, I make a new example: #define a int a = 3; #ifdef a cout << a; #else cout << (++a); #endif Since I believe the two `a`s to be separate, I expect this to compile. It does not. So now I have evidence both for and against the idea that these two symbols `a` are the same. ​ Somebody please tell me what the hell is going on here, I don't understand.
The preprocessor doesn't give a flying crap about your C++ code, other than being syntactically compatible. > \#define a `a` identifiers are now replaced with nothing. You can check by dumping the preprocessed output. https://www.learncpp.com/cpp-tutorial/introduction-to-the-preprocessor/
230
cpp_questions
unoruu
Let me give some example: int a = 3; #ifdef a cout << a; #else cout << (++a); #endif With the printed result `4`. Based on this example, I assume that preprocessor symbols are not the same as postprocessor symbols, AKA the `a` in `#ifdef a` isn't the same as the `a` in `int a = 3;`. I make this assumption, because if they were the same, I would assume `#ifdef a` to be a branch that is hit rather than missed. But evidently it missed. So in order to test that assumption, I make a new example: #define a int a = 3; #ifdef a cout << a; #else cout << (++a); #endif Since I believe the two `a`s to be separate, I expect this to compile. It does not. So now I have evidence both for and against the idea that these two symbols `a` are the same. ​ Somebody please tell me what the hell is going on here, I don't understand.
The pre-processor is an entirely separate language applied to the source text before the C++ compiler sees it. The preprocessor macros are independent of the language identifiers. In the first example, there is no `a` preprocessor macro defined, so the `#ifdef` branch is elided from the source text as seen by the compiler and it sees: int a = 3; cout << (++a); And thus prints out `4`. In the second example, you've defined a preprocessor macro `a` to be an empty string. The preprocessor spits out the text: int = 3; cout << ; Which will not compile.
130
cpp_questions
unoruu
Let me give some example: int a = 3; #ifdef a cout << a; #else cout << (++a); #endif With the printed result `4`. Based on this example, I assume that preprocessor symbols are not the same as postprocessor symbols, AKA the `a` in `#ifdef a` isn't the same as the `a` in `int a = 3;`. I make this assumption, because if they were the same, I would assume `#ifdef a` to be a branch that is hit rather than missed. But evidently it missed. So in order to test that assumption, I make a new example: #define a int a = 3; #ifdef a cout << a; #else cout << (++a); #endif Since I believe the two `a`s to be separate, I expect this to compile. It does not. So now I have evidence both for and against the idea that these two symbols `a` are the same. ​ Somebody please tell me what the hell is going on here, I don't understand.
#define a means replace `a` with nothing. So the next line becomes int = 3 which is meaningless. `-E` is your friend : https://godbolt.org/z/MsG3EM4Wr
40
cpp_questions
unoyir
So I'm an experienced self taught dev working in the software industry for the past 5 years. My experience with programming includes JS/TS (React), Python and Go. I've been looking to learn a new programming language in my spare time and I'm thinking to branching into a systems/non-gc programming language but im not sure which to pick. This will be half learning exercise, half increasing my skills to further increase my employability. I've thought about C, C++, Rust, Nim and potentially Zig although i think C (been told everyone should learn this language to understand how computers work but probably wont get me a job) and Rust are on my shortlist
C
40
AskProgramming
unoyir
So I'm an experienced self taught dev working in the software industry for the past 5 years. My experience with programming includes JS/TS (React), Python and Go. I've been looking to learn a new programming language in my spare time and I'm thinking to branching into a systems/non-gc programming language but im not sure which to pick. This will be half learning exercise, half increasing my skills to further increase my employability. I've thought about C, C++, Rust, Nim and potentially Zig although i think C (been told everyone should learn this language to understand how computers work but probably wont get me a job) and Rust are on my shortlist
I'd say C all the way. There are some languages that are arguably better or nicer, but C really forces you to learn it well.
30
AskProgramming
unp4h2
Why are there multiple programming languages?
We've been designing programming languages for about 70 years, and have learned a thing or two in that time. Following from that, researchers like playing with new ideas, and sometimes they catch on outside of an academic context too, and a new language is built around the new idea. Languages have trade-offs. One well-suited for one purpose may be poorly-suited for other purposes.
170
AskProgramming
unp4h2
Why are there multiple programming languages?
Because anyone can write a language. Everyone is smarter than the last person so theirs is the best way. Would it be better if there were only one? And one OS, and one model of car?
100
AskProgramming
unp4h2
Why are there multiple programming languages?
Why are there multiple flavors of food? Why are there different colors of paint? Why are there different kitchen utensils? Why are there different tools? Why are there different sports?
100
AskProgramming
unpguo
I only made a `bidirectional iterator` once before and that was for a `list` a long time ago. So I am uncertain how to do it for a `map` now concerning the `member typedefs` of `std::iterator_traits<It>`. If I am doing `template <tyename K, typename v>` where K is the `key` and V is the `value`, then would this ok for the `member typedefs`?: template <typename K, typename V> struct Iterator { using value_type = V; using difference_type = ptrdiff_t; using pointer = V*; using reference = V&; using iterator_category = std::bidirectional_iterator_tag; }; Thanks
`value_type` for associative containers is generally `pair<const Key, Value>`, with everything else following from that. //edit: In case your map type does not store its nodes in a pair, you could consider something like `pair<const Key&, Value&>`.
30
cpp_questions
unppsp
Satellites can sit in orbit. Can missiles do the same?
[Yes.](https://en.wikipedia.org/wiki/Fractional_Orbital_Bombardment_System)
240
AskScience
unppsp
Satellites can sit in orbit. Can missiles do the same?
It's called Fractional Orbital Bombardment system. It does require a missile designed for it. The delta V (change in velocity) requirement is higher than for an ICBM, so it needs either a more powerful missile or/and a lighter warhead, and the missile needs to perform the reentry burn meaning there's different control requirements after the boost phase. Edit: Or just orbital bombardment if the missile loiters in orbit for ages. Doing that with nuclear warheads would break international treaties.
50
AskScience
unppsp
Satellites can sit in orbit. Can missiles do the same?
[removed]
40
AskScience
unpriy
For me, I think you can get better Italian food than in Italy in some places in the US. What are some foods like this for y’all?
I’m gonna throw a weird one out there, but bagels.
6,050
AskAnAmerican
unpriy
For me, I think you can get better Italian food than in Italy in some places in the US. What are some foods like this for y’all?
May be an unpopular opinion but I prefer American pizza over Italian pizza… and I don’t mean that chain restaurant pizza, but those from small businesses. I remember eating this delicious cheese pizza from NYC on my trip last year and it was better than any pizza I tried at Italy when I went on summer trip there 3 years ago… and believe me, I tried a good amount of places. May just be my taste buds tho….
5,620
AskAnAmerican
unpriy
For me, I think you can get better Italian food than in Italy in some places in the US. What are some foods like this for y’all?
Sorry Germany. America took your burger, ran with it, and got all the gold medals.
3,770
AskAnAmerican
unq2ic
And when I mean modern, I mean the last 10-15 years. What old techology do you really miss?
i dont covet old technology but i do think social media has ruined humanity.
390
AskOldPeople
unq2ic
And when I mean modern, I mean the last 10-15 years. What old techology do you really miss?
I've become a luddite of sort as well. I don't know if I am quite old enough to comment yet (40, b. 1981) but I miss technology from 15 years ago. Algorithms have ruined social media. All these places used to have NO ADS. You OWNED your software and no one could force you to update anything. I read somewhere on reddit that taking tests in school requires eye tracking software and I think I'd rather be temporarily blind than submit to that. A pesky example: My Samsung just "updated" recently and tore out a function that I used a LOT, the health heartbeat and O2 meter, and the only option now is to get a 3rd party app that has invasive ads or pay even more money for the same thing I already had. I'm going to be salty and cantankerous about it for a while too, so I am feeling like an old curmudgeon.
200
AskOldPeople
unq2ic
And when I mean modern, I mean the last 10-15 years. What old techology do you really miss?
I’m the 51 year old tech support manager for an office of lawyers ranging in age from late 20s to early 70s. In my experience, no one hates any and all technology like a 35 year old lawyer. I send them instructions on how to change their default browser and they react like I told them they have to compile their own source code. For myself, I’ve always been a techie guy, but I don’t like a lot of the ways that’s technology is progressing. I don’t like when things are hidden from me in the interest of making them easier to use. I don’t like how everything wants to tie me down to monthly fees. I pay monthly for Adobe Photoshop and Lightroom, which means that as soon as I stop paying, my photo libraries become useless. I subscribe to Apple Music, which is super convenient, but as soon as I stop paying I no longer have any music. If I were to “buy” a movie from the Google Play store, do I really own it? What if they scrap the store like they did with Google Music? I don’t like the massive harvesting of personal information. I don’t like ads everywhere. Instagram is now showing a “personalized” ad for every 3 pictures. I miss buying something like an new CD player or vhs player, buying some tapes or CDs, and just playing them. If the thing breaks, I can get it fixed and use it until the tapes wear out. No license agreements, no giving them my email address or phone number, not having to opt out of sending usage statistics to “improve my experience”. Just leave me alone.
120
AskOldPeople
unqo55
Can decompression sickness cause pneumocephalus (air in the cranial cavity)?
I don’t think so: * decompression sickness (DCS) doesn’t cause \*air\* anywhere, only nitrogen * nitrogen equilibrates between environment, lungs and blood relatively slowly (compared to oxygen and CO2): DCS is caused by an imbalance between higher tissue concentrations and lower ambient (partial) pressures - nitrogen bubbles then form, best pictured by all the bubbles appearing in fizzy drink when opened. * these bubbles will form where tissue nitrogen concentrations are highest. This can be in general tissues, but is usually within plasma, liver and muscle. They therefore form within the blood vessels rather than as free gas within the brain or CSF. Although the latter is possible I think neurological DCS is still a manifestation of circulatory dysfunction secondary to bubble formation, not direct formation of bubbles in neurological tissue. This is Reddit so I could be wrong, but the basics will be sound so the answer is likely to be ‘no’
30
AskScience
unqui2
Hello! Logins will be held in a SQL database. We want to limit access to 5 devices simultaneously. If a user will connect from a 6th device and if our app/client is working on all 5 devices, he won't log in.
This works for 5 browsers not 5 devices. Store a generated ID in a cookie and send it with each request, keep an array of the ID associated with the user in the database. Limit the IDs to 5 in the DB. If a request comes from the user and the ID passed with the request isn't in the database IDs, reject the request.
50
AskProgramming
unr0ga
I mean we do have Lady liberty, and uncle sam. Columbia too, along with the obsolete and dated personifications. Like brother Jonathan. But if we were to really capture the USA under one person, who or what would it be?
Lady Liberty isn't a personification. It's a symbol for what we strive to be [It's why China will never see Spiderman: No Way Home](https://screenrant.com/spiderman-no-way-home-finale-china-edit-request/)
420
AskAnAmerican
unr0ga
I mean we do have Lady liberty, and uncle sam. Columbia too, along with the obsolete and dated personifications. Like brother Jonathan. But if we were to really capture the USA under one person, who or what would it be?
Hey now, let's put some respect on Miss Columbia's name why don't we She was a girlboss throughout the 1800s/early 1900s until she was unfairly killed off by the world wars and the "need" for a masculine personification In political comics, she was always a better personification (as was shown to care more about justice/equality/democracy) than Uncle Sam. She was used to represent the American people while Uncle Sam was used to represent the federal government. Eidt Of course, the answer to this question can be answered by Hetalia
200
AskAnAmerican
unr0ga
I mean we do have Lady liberty, and uncle sam. Columbia too, along with the obsolete and dated personifications. Like brother Jonathan. But if we were to really capture the USA under one person, who or what would it be?
Trying to capture it as one person would be a disservice to the nation itself.
130
AskAnAmerican
unrc4v
(Sorry I know this is a cpp subreddit but c seems to be inactive) The following is intended to print out statements but in different lines: #include <stdio.h> int main(){ printf("Hello World!"); printf(" "); int number= 1; float percentage= 3.14; char letter = 'A'; printf("This is the number: %d", number); printf("This is the percentage: %f", percentage); printf("This is the character: %c", letter); return 0; } However, it all prints on the same line. Output: Hello World! This is the number: 1This is the percentage: 3.140000This is the character: A I also tried doing it so that it prints the percentage sign on line 12: printf("This is the percentage: %f%", percentage); but I got an error, what can I do? I am coding on Ubuntuu text editor, using terminal to run my code, and an online compiler. Both print on the same line.
printf doesn't automatically add a newline. u need to add `\n`, ie `printf("hello\n")`. for the percent sign you probably need to escape it since it is a special character. Try `printf("This is the percentage: %f\%", percentage);`
70
cpp_questions
uns7h7
Like if I wanted to stand at the highest and lowest point where would I need to go?
Highest: Mount Whitney Lowest: Death Valley Apparently these are also the highest and lowest points in the contiguous United States.
350
AskAnAmerican
uns7h7
Like if I wanted to stand at the highest and lowest point where would I need to go?
Tallest: Mt Elbert - 14,439 ft. Lowest: Lauren Boebert’s district.
160
AskAnAmerican
uns7h7
Like if I wanted to stand at the highest and lowest point where would I need to go?
[https://en.wikipedia.org/wiki/Britton\_Hill](https://en.wikipedia.org/wiki/Britton_Hill) comes in at a whooping 345 feet summit. Pretty much everywhere else is coast line.
140
AskAnAmerican
unsbpq
Is isolationist sentiment on the rise? Do you think it will continue to grow?
Yes, on both sides of the political spectrum but for different reasons. Republicans are saying other countries have taken advantage of the USA, that they're not paying their fair share to our commitments, and we shouldn't be spending money on foreign aid that could be going to Americans here. Democrats are saying we shouldn't be intervening in other countries affairs, that we have a history of destabilizing and overthrowing governments that don't follow our orders, and that we shouldn't be telling other nations how to live when we have a myriad of issues at home we should be focusing on. Both sides essentially want isolationism, their reasoning for it differs a little though. But what will ultimately win out in politics is business interests and business interests benefit more from our global position than they would an isolationist one
640
AskAnAmerican
unsbpq
Is isolationist sentiment on the rise? Do you think it will continue to grow?
Nice try Vladimir
420
AskAnAmerican
unsbpq
Is isolationist sentiment on the rise? Do you think it will continue to grow?
I think we should help Ukraine, but if you compare the numbers Europe isn't stepping up and doing their fair share. As usual.
400
AskAnAmerican
unsdlz
Evidently there is sulfur and oxygen in magma and it combines to form SO2. What magma chemistry leads to this being a primary constituent of volcanic eruptions?
You answered your question pretty well in asking it: It's a major volcanic emission because sulfur is in solution in magma. There's a fair amount in the earth in general, and it ends up in most magma in some amount, just like silicon, iron, aluminum, calcium, and sodium. When the magma cools, near the surface in the case of a volcano, the sulfur is one of the last things in the liquid magma to be in an 'active' state (I think it's technically a superfluid under these conditions, but it might just be a gas dissolved in mostly solid rock?). This sulfur escapes through micro- or macroscopic cracks (or the bubbling surface of a lava lake or flow, or mixed with ash and CO2 and water in an explosive eruption) and reacts with air to form sulfur dioxide.
50
AskScience
unsdz4
Would the blood be ‘tainted’? Could it potentially get someone sick? Asking out of curiosity all I could find online is “don’t donate until one week free of symptoms”.
First up, respiratory viruses are not known to be transmitted through blood transfusions. This was confirmed many times during Covid-19. Respiratory viruses mostly live in cells in your airways, they aren't in your blood stream. Even then, not a problem for the recipient (mostly) due to how donated blood is processed. Let's specifically look at *whole blood* donation in wealthy countries. Your individual donation is often these days mixed in with a lot of other people before any testing. It all depends on the centre that does the collection and company that does the processing. But let's assume individual testing. It is tested for blood groups, red cell antibodies and then a handful of blood borne infectious diseases such as HIV, hepatitis, syphilis, HTLV, CMV and malaria if you checked that box. Others too depending on where you live. Worth mentioning that even those are removed in later processes by washing. More on that below. Your blood is then broken down into it's components using a centrifuge. Red blood cells, plasma, or platelets are extracted using specialised machines. There are also special detergents and soaps to remove viruses or proteins that are not wanted. This is called [blood washing](https://en.wikipedia.org/wiki/Washed_red_blood_cells). It's rare these days to get given a packet of blood that was taken directly from the host without processing. Any cold viruses will be removed by washing. They aren't there, but if they were somehow, they are removed. From [the WHO website](https://www.who.int/news-room/fact-sheets/detail/blood-safety-and-availability): 37% of the blood collected in low-income countries is separated into components, 69% in lower-middle-income countries, 95% in upper-middle-income countries, and 97% in high-income countries. Your two main concerns not addressed above are * Allergic reactions to proteins and/or cells in the transfusion (not related to colds) * Fever due to special proteins called *cytokines* in the transfusion. These reactions are called febrile nonhemolytic transfusion reactions (FNHTRs) (related to colds) Cytokines are special proteins you make to trigger your immune system. You can think of it as you get a respiratory virus, your body then sounds the alarm (cytokines) to make an immune response. After a transfusion the host body is confused at why the alarm is sounding so it starts an immune response just in case. Important note: the host doesn't have an infection, their body is responding as if it has. Partly, we don't need a patient starting an immune response when they already under stress for whatever reason they need the blood. However, the trauma requiring a blood transfusion is probably so serious that a fever is least of their problems. Mostly, *we want you to wait for your own health*. After a cold your body is stressed and we don't want to cause you harm too. Your blood volume is higher in white blood cells, but not a problem as all those white blood cells will be removed and thrown away / turned into products. Fun fact: the preferred process to dispose of waste human blood is to pour down the regular domestic sewer drain for disposal. This is completely legal and safe. Should a blood processer decide a batch is (1) too old and unusable or (2) contaminated in some way that it is too expensive to purify or (3) too much was collected, they will pour it down the drain.
80
AskScience
unsdz4
Would the blood be ‘tainted’? Could it potentially get someone sick? Asking out of curiosity all I could find online is “don’t donate until one week free of symptoms”.
It's actually....really, really bad if a cold virus gets from your nose/throat/lungs to your blood. Sometimes your digestive tract gets infected, too, but a typical cold infection would leave various *markers* of the infection, from white blood cells etc going to the linings of your airways and other immune processes on-site, but hypothetically no living cold virus. The rules are to be careful in the 0.1% (or some other very small percent) of cases where that isn't the case, and someone vulnerable gets REALLY sick. EDIT: thought about this some more. I think there may be active virus in your blood with a 'normal' cold, but not at concentrations where it can successfully start infecting more of your cells elsewhere in your body. One problem they hope to avoid is that your blood might go to someone with next to no working immune system who could get a systemic infection from a tiny viral load in donated blood. I think. Folks who aren't the nerd kid of two nerd nurses feel free to weigh in.
50
AskScience
unspbx
I've got the following function, which uses `std::make_unique`: void from_json(const nl::json& json, std::unique_ptr<b2Shape>& shape) { const int type{json.at("type").get<int>()}; const nl::json& value = json.at("value"); switch (type) { case 0: shape = std::make_unique<b2CircleShape>(value.get<b2CircleShape>()); break; case 1: shape = std::make_unique<b2EdgeShape>(value.get<b2EdgeShape>()); break; case 2: shape = std::make_unique<b2PolygonShape>(value.get<b2PolygonShape>()); break; case 3: shape = std::make_unique<b2ChainShape>(value.get<b2ChainShape>()); break; default: throw util::Io_error{"unknown shape type"}; } } How can I make a `void from_json(const nl::json& json, std::shared_ptr<b2Shape>& shape)` version without duplicating code? The signature must be as described so the json library can recognize the function. One idea is to just call `new`, but is there a better way?
You can construct a shared_ptr by moving from a unique_ptr So have the shared from_json call the unique one
60
cpp_questions
untk4o
I'm trying to do my own clicker game, and I'd like to do a map like Pokéclicker have, with different single color tiles next to another, with a light grey grid to show the mark between 2 tiles. Any idea how to code that in a proper manner ? I'm thinking something like this [https://i.redd.it/rr4q4mfrbqe61.png](https://i.redd.it/rr4q4mfrbqe61.png) in the bottom part of the screen, in the middle. I'm thinking array of arrays with a color each, an printing color\[0\] + separator + color\[1\] ... for each line, separated by a line of separator or something like that. Sounds kinda basics, so I figured they were better ways to do it.
Sounds like you want to implement a two-dimensional array: https://math.hws.edu/javanotes/c7/s5.html
30
AskProgramming
untutd
In my country same retail chain has different prices for same product in different places which depends on purchasing power of region. Is this a thing in US?
Due to different costs in different states, even different municipalities can have different prices. California retail prices are higher than retail prices in in Texas, for example. You can check [numbeo.com](https://numbeo.com). Retail sites also often ask you to enter to your ZIP code. Nominally, chains like Dollar Tree might say that they try to maintain consistent prices, but in reality their prices must vary to keep up with fluctuating costs.
190
AskAnAmerican
untutd
In my country same retail chain has different prices for same product in different places which depends on purchasing power of region. Is this a thing in US?
I believe the Costco food court has the same prices nationwide. other than that, no. Varying cost of living and tax rates make prices fluctuate a lot
30
AskAnAmerican
untutd
In my country same retail chain has different prices for same product in different places which depends on purchasing power of region. Is this a thing in US?
Not really. Sales tax varies though.
30
AskAnAmerican
untx5n
Do you need a supercomputer to train a neural network?
This depends entirely on the size/complexity of the neural network and the data you're working with A neural network can be anything from single-digit amount of neurons to billions, if not trillions, of neurons such as for example GTP-3 You can train a relatively simple neural network on your home computer in a reasonable timeframe.
100
AskComputerScience
untx5n
Do you need a supercomputer to train a neural network?
No. You might want a bunch of regular computers depending on the size of the net
40
AskComputerScience
unu2s0
My dentist is mad about the stuff, reckons if I can only do one I should floss rather than brush. Good way to stop teeth decay. But what do First Nations culture use if they don’t have plastic?
While dental floss may not have existed many cultures used miswak or need branches that people chew on. They have antimicrobial properties and the ends can be used to dislodge food and brush one's teeth. I'm sure other cultures had similar technology.
40
AskScience
unuevz
What are some crazy/weird laws in your state?
It's illegal to hunt whales in Oklahoma. https://www.knowledgetribe.in/articles/7-unusual-laws-around-world#:~:text=Oklahoma%20has%20a%20law%20which,stringent%20law%20banning%20the%20pastime.
130
AskAnAmerican
unuevz
What are some crazy/weird laws in your state?
In Colorado it's a fairly significant misdemeanor, with possible penalties of up to a year in jail prior to March 1 (not sure how this offense was reclassified), to throw a cigarette out the window of a car It makes sense when you think about the wildfire problems here, but definitely shocking to see how severe it is
100
AskAnAmerican
unuevz
What are some crazy/weird laws in your state?
Restaurants and bars are required to specify which they are. So a restaurant will have a sign stating "This establishment is a restaurant" and a bar stating "This establishment is a bar" or something like that. Up until a year or so ago we weren't allowed to have the same percentage of ABV in our beer as every other state. I believe the maximum ABV you can purchase outside of a liquor store is 5% now, it was like 3.5% before.
90
AskAnAmerican
ununpf
One that sticks with me is "Hold onto yourself, Bartlett. You're twenty feet short."
"Serpentine! Serpentine!"
80
AskOldPeople
ununpf
One that sticks with me is "Hold onto yourself, Bartlett. You're twenty feet short."
I love the smell of Napalm in the morning Apocalypse Now
50
AskOldPeople
ununpf
One that sticks with me is "Hold onto yourself, Bartlett. You're twenty feet short."
'Don't be stoopid. Nobody's jugs're bigger than their neck. ' *Grease*
50
AskOldPeople
unv7pf
I am from india and casual sex is not very common here.And i always hear a lot about america that casual sex and kink parties are common.Can anyone give some idea? By casual sex,i mean people involving physically with other people if they are mutually attracted to each other without committing to one long term partner.
casual sex between two people? very common, mostly through dating apps/college scenes etc. sex parties/orgies? not very common.
1,750
AskAnAmerican
unv7pf
I am from india and casual sex is not very common here.And i always hear a lot about america that casual sex and kink parties are common.Can anyone give some idea? By casual sex,i mean people involving physically with other people if they are mutually attracted to each other without committing to one long term partner.
I used to spend a lot of time in India and I was always surprised at how much sex you guys think goes on here. Like, I used to check into hotels with my wife and they would assume that we were casual friends who were sleeping together (They would say things like, "So, I assume a one-bed room for you and your... Friend?"). We were wearing wedding bands and everything, although I guess culturally that's not always how you guys represent marriage over there huh? Anyway, I used to get the distinct impression that a lot of people in India think that way about America because of our TV shows. Sit-coms like Friends and stuff. There is definitely more causal sex in America than in India, but certainly not as much as those TV shows make it seem. Kind of like how a bunch of Indian soap operas make it look like everyone has a ton of money and lives in really nice houses, and wears a ton of gold jewelry everyday? Similar in America.
970
AskAnAmerican
unv7pf
I am from india and casual sex is not very common here.And i always hear a lot about america that casual sex and kink parties are common.Can anyone give some idea? By casual sex,i mean people involving physically with other people if they are mutually attracted to each other without committing to one long term partner.
> casual sex > >kink parties These two are not as connected as you'd like to think. Its interesting one side of the world thinks we're these sex crazed maniacs and the other side of the world thinks we're stuck up prudes.
700
AskAnAmerican
unv8bo
So I made a little program to calculate marks for test. It's my first project so I may have done something wrong. Here's the code: #include <iostream> #include <fstream> #include <cmath> using namespace std; struct { string fach; float maxP; float yourP; float note; }note; string mid = " "; string line = " "; string notes = " "; bool s; string getNot(string str1, int num1){ string note = " "; int pos1 = 0; for(int i=num1; i <= str1.length(); i++){ note[0]=str1[i]; } return note; } int main(){ ofstream file("data.txt", std::ios_base::app); cout << "Deine Punktzahl:" << endl; cin >> note.yourP; cout << "Max. Punktzahl:" << endl; cin >> note.maxP; note.note = ceil(((note.yourP/note.maxP)*5+1) * 100.0) / 100.0; if(note.note >7){ cout << "FALSCHE PUNKTZAHL" << endl; return 0; }else if(note.note < 7 && note.note > 6){ note.note = 6; } cout << "Fach:" << endl; cout << "SH - Software Hardware"; cout << " M - Mathe" ; cout << " P - Physik" << endl; cout << "I - Informatik" ; cout << " EK - Elektronik"; cout << " ET - Elektrotechnik" << endl; cin >> note.fach; cout << note.note <<endl; cout << "Save?" << endl; cin >> s; if(s){ file<<"f:"<< note.fach <<"|yP"<< note.yourP <<"|mP "<< note.maxP <<"|nt "<< note.note << endl; } file.close(); ifstream fileR; fileR.open("data.txt"); if(!fileR){ cout << "Unable to open file" << endl; exit(1); } cout << "Welche Noten?" << endl; cin >> mid; if(mid != "."){ size_t pos; while(fileR.good()){ getline(fileR,line); // get line from file pos=line.find(mid); // search if(pos!=string::npos){ pos=line.find("nt")+3; break; } } notes = getNot(line, pos); cout << notes << endl; } return 0; } The problem is that the `getNot(line, pos);` doesn't return the string. I have checked and in the function itself it does write to `note`, but it doesn't return the `note` string. Have I missed something? EDIT: I havent even noticed that I left the 0 in `note[0]`, now I see it will only return one character. Thanks for helping me spot the problem
You can return strings, exactly like that. Your problem is somewhere else. 1. `struct {...} note;` is a terrible idea. Unnamed types are very rarely useful. 2. Don't use `using namespace std;` 3. Don't use (mutable) global variables 4. `for(int i=num1; i <= str1.length(); i++)` is going out of bounds for `str1[i]`. 5. `note[0]=str1[i];` Are you sure you want to overwrite the first char over and over? 6. Why are you using floats? You're using double literals for the calculations anyway so even if you had a reason to use floats (and you don't) it would be screwed up at that point. 7. You need to `#include <string>` if you use `std::string` and `std::getline`. 8. Why do you hate whitespace that much? Code is way more readable if you put spaces around operators. 9. Why are you writing things to file just to read them again? Just use the data directly and then write to the file at the end if you have to save it.
120
cpp_questions
unv8bo
So I made a little program to calculate marks for test. It's my first project so I may have done something wrong. Here's the code: #include <iostream> #include <fstream> #include <cmath> using namespace std; struct { string fach; float maxP; float yourP; float note; }note; string mid = " "; string line = " "; string notes = " "; bool s; string getNot(string str1, int num1){ string note = " "; int pos1 = 0; for(int i=num1; i <= str1.length(); i++){ note[0]=str1[i]; } return note; } int main(){ ofstream file("data.txt", std::ios_base::app); cout << "Deine Punktzahl:" << endl; cin >> note.yourP; cout << "Max. Punktzahl:" << endl; cin >> note.maxP; note.note = ceil(((note.yourP/note.maxP)*5+1) * 100.0) / 100.0; if(note.note >7){ cout << "FALSCHE PUNKTZAHL" << endl; return 0; }else if(note.note < 7 && note.note > 6){ note.note = 6; } cout << "Fach:" << endl; cout << "SH - Software Hardware"; cout << " M - Mathe" ; cout << " P - Physik" << endl; cout << "I - Informatik" ; cout << " EK - Elektronik"; cout << " ET - Elektrotechnik" << endl; cin >> note.fach; cout << note.note <<endl; cout << "Save?" << endl; cin >> s; if(s){ file<<"f:"<< note.fach <<"|yP"<< note.yourP <<"|mP "<< note.maxP <<"|nt "<< note.note << endl; } file.close(); ifstream fileR; fileR.open("data.txt"); if(!fileR){ cout << "Unable to open file" << endl; exit(1); } cout << "Welche Noten?" << endl; cin >> mid; if(mid != "."){ size_t pos; while(fileR.good()){ getline(fileR,line); // get line from file pos=line.find(mid); // search if(pos!=string::npos){ pos=line.find("nt")+3; break; } } notes = getNot(line, pos); cout << notes << endl; } return 0; } The problem is that the `getNot(line, pos);` doesn't return the string. I have checked and in the function itself it does write to `note`, but it doesn't return the `note` string. Have I missed something? EDIT: I havent even noticed that I left the 0 in `note[0]`, now I see it will only return one character. Thanks for helping me spot the problem
##include <string>
50
cpp_questions
unv8bo
So I made a little program to calculate marks for test. It's my first project so I may have done something wrong. Here's the code: #include <iostream> #include <fstream> #include <cmath> using namespace std; struct { string fach; float maxP; float yourP; float note; }note; string mid = " "; string line = " "; string notes = " "; bool s; string getNot(string str1, int num1){ string note = " "; int pos1 = 0; for(int i=num1; i <= str1.length(); i++){ note[0]=str1[i]; } return note; } int main(){ ofstream file("data.txt", std::ios_base::app); cout << "Deine Punktzahl:" << endl; cin >> note.yourP; cout << "Max. Punktzahl:" << endl; cin >> note.maxP; note.note = ceil(((note.yourP/note.maxP)*5+1) * 100.0) / 100.0; if(note.note >7){ cout << "FALSCHE PUNKTZAHL" << endl; return 0; }else if(note.note < 7 && note.note > 6){ note.note = 6; } cout << "Fach:" << endl; cout << "SH - Software Hardware"; cout << " M - Mathe" ; cout << " P - Physik" << endl; cout << "I - Informatik" ; cout << " EK - Elektronik"; cout << " ET - Elektrotechnik" << endl; cin >> note.fach; cout << note.note <<endl; cout << "Save?" << endl; cin >> s; if(s){ file<<"f:"<< note.fach <<"|yP"<< note.yourP <<"|mP "<< note.maxP <<"|nt "<< note.note << endl; } file.close(); ifstream fileR; fileR.open("data.txt"); if(!fileR){ cout << "Unable to open file" << endl; exit(1); } cout << "Welche Noten?" << endl; cin >> mid; if(mid != "."){ size_t pos; while(fileR.good()){ getline(fileR,line); // get line from file pos=line.find(mid); // search if(pos!=string::npos){ pos=line.find("nt")+3; break; } } notes = getNot(line, pos); cout << notes << endl; } return 0; } The problem is that the `getNot(line, pos);` doesn't return the string. I have checked and in the function itself it does write to `note`, but it doesn't return the `note` string. Have I missed something? EDIT: I havent even noticed that I left the 0 in `note[0]`, now I see it will only return one character. Thanks for helping me spot the problem
The function certainly returns a string. But the question is what string? What do you want the function to do? I don't think it does what you want: currently it returns a string which consists of a single character which is the last character of the input argument `str1` unless `num1` is equal to or larger than the length of `str1` in which case it just returns a string with a space: " ". Also the variable `pos1` is completely unused. I don't know what the function is supposed to do, so I can't really help you more than that. Here are some other suggestions for improving your code in general: You are using old C-style declarations of structs - don't do that, do: struct note { string fach; float maxP; float yourP; float note; }; (notice position of name `node` should immediately follow `struct`) Don't use global variables (except for global constants)! Just don't! This is a bad practice that will quickly lead to errors. Instead declare and define them in the scope/function where they are needed - in your case you can move the definition of `mid`, `line`, `notes` and `s` into the `main` function. Use (long) descriptive variable names. In three hours you have already forgotten what `mid`, `s`, `num1` and `pos1` refer to. Use *descriptive* names: `do_save`, `start_index` etc. Enable all (or almost all) warnings for your compiler. If you're using Visual Studio you can use `/Wall` or `/W4`, on gcc/clang you can use `-Wall -Wpedantic -Wextra` Ensure that you use an IDE (like Visual Studio or CLion) or a Text Editor that can show code hints, auto-completion and compiler warnings.
40
cpp_questions
unvbom
Hi!, I recently bought a 7tb hdd and replaced a 1tb one in my pc, along with replacing an 220gb system ssd for a bigger one (500gb). I've noticed that after that upgrade, file explorer freezes 50% of the time, working in Blender (software), is much slower, and overall the pc is seeming to struggle. How much does disk space influence the stats of the pc? Is there any easy solution?
Try r/techsupport. As the [posting guidelines](https://old.reddit.com/r/AskComputerScience/comments/bl37qz/read_before_posting/) suggest, this sub is rather for questions about [computer science](https://en.wikipedia.org/wiki/Computer_science). Anyway, to answer the more general question, increased disk space shouldn't slow anything down.
30
AskComputerScience
unvdzr
Why not just use plates?
There’s a sheet of wax paper in it. Easy to toss and clean the basket without wasting a whole plate
420
AskAnAmerican
unvdzr
Why not just use plates?
Food safety laws are different in every state, but in mine (California) and I assume in many others, the major benefit is cleaning time. Baskets do need to be washed/disinfected, but considering there's rarely any actual food on them once the liner is thrown out, doing so is very fast and easy. They also stack easily, are less prone to breaking, and cheaply replaceable, theres also time saved on the serving end of things, if you have waiters who clean the tables, its much faster to dump a basket out than it is to scrape a plate off, or if you rely on customers to return their baskets on their own, you save time having front of house staff put away dishes, and they can focus on cleaning tables/seats instead. The restaurant I work at personally serves items like burgers, chicken strips, and fries in baskets, while most of the rest of the menu is served on plates and bowls. I also happen to be the dishwasher during closing shifts, we run a dish-pit with no machine, which means every item is hand rinsed, soaked, and sanitized by yours truly. the difference in time that it takes me to wash 50 baskets vs 50 plates is immense.
150
AskAnAmerican
unvdzr
Why not just use plates?
To be clear, fast food (McDonald’s, Burger King, Wendy’s, etc) doesn’t have baskets, at least any I’ve ever seen. Places like food stands and diners do. So your question is moot.
60
AskAnAmerican
unwbsj
Are there any free tools and resources to practice with Oracle Cloud Applications? I have seen an internal job opportunity for “ Oracle Cloud Applications Administrator” and was thinking about going for it. Anyone have any experience in a similar position and can provide some insight on what the position does?
Here you go: * https://education.oracle.com/learning-explorer * https://www.oracle.com/education/ * https://education.oracle.com/oracle-certification-paths-all Oracle was giving away free training and exam vouchers for months earlier this year so you might want to keep an eye out to see if they offer more this year.
30
ITCareerQuestions
unwk5i
As the title says. I'm a 25-year old Filipino expat in UAE currently working as a call center rep and I am considering switching to IT field. I do not have a related degree nor work experience in this field but as I did my research online, I can get certifications and start with the basics such as A+ and work my way up from there which is what I wanted to do. However, I did my research here in UAE and it appears that only a few training centers offer the A+ certification, training takes roughly 4 to 6 weeks before taking the certification exam. I wanted to ask you all if this timeframe will be enough to cover the entire course or should I consider self-studying to give myself more time to prepare and then do an online certification exam? Also, what are my odds of passing the certification exam if I self-study? Your thoughts and opinions will be helpful. Thank you.
Jason Dion and Prof Messer Practice tests along with Messer's study groups/videos and ExamCram is what I used for the A+. I'd suggest self study. 4-6 weeks is very rushed. If you practice a lot you'll be fine.
30
ITCareerQuestions
unwq4z
I like Java, C++ and Javascript. However if there's one language that gives me the heebie jeebies........it's Bash 😐 It's so weird. The fact that spaces are important in syntax and how easy it is to overlook an error because of just a space!? And the code itself looks like it was written by an alien.
Like Bash, Perl is a bit of a syntax bastard
150
AskProgramming
unwq4z
I like Java, C++ and Javascript. However if there's one language that gives me the heebie jeebies........it's Bash 😐 It's so weird. The fact that spaces are important in syntax and how easy it is to overlook an error because of just a space!? And the code itself looks like it was written by an alien.
100% Javascript!
130
AskProgramming
unwq4z
I like Java, C++ and Javascript. However if there's one language that gives me the heebie jeebies........it's Bash 😐 It's so weird. The fact that spaces are important in syntax and how easy it is to overlook an error because of just a space!? And the code itself looks like it was written by an alien.
Well OP, just wait for the fun you’ll have with whitespace when you use YAML 😂 I guess PHP and people still using JSP or whatever that ancient Java thing was gives me heebies jeebies, but I generally avoid these things 😛
90
AskProgramming
unxgdl
Our project is compiling with C++17 at the moment and we consider moving up to C++20. We compile to Windows only at the moment, but the issue is that it is very likely that we will have to port it to MacOS and Linux in the future (let's say it for sure won't happen in the next 6 months) I know that gcc and clang are lagging behind MSVC when it comes to C++20 support, but assuming we stay away from modules at the moment, anyone has an idea of how likely are we to encounter incompatibilities between MSVC/gcc/clang? (i.e code that compiles in one compiler but fails to compile in another due to a bug or a feature that is not yet fully supported)
https://en.cppreference.com/w/cpp/compiler_support/20 So basically modules and std::format are not portable right now, have fun with the rest.
50
cpp_questions
unxo55
I know it is more of a QoL thing since you can just achieve it through telling everyone on the team to not use it, but it would be very helpful in a codebase touched by many people.
You probably can't within the language. The reason is that `int32_t` is very often just something like `typedef int int32_t;`. Things like [std::is\_same](https://en.cppreference.com/w/cpp/types/is_same) also [think they're the same type](https://godbolt.org/z/v15fv5Mo1). You probably need some compiler-specific stuff if it's even possible.
250
cpp_questions
unxo55
I know it is more of a QoL thing since you can just achieve it through telling everyone on the team to not use it, but it would be very helpful in a codebase touched by many people.
Id install [git hooks](https://git-scm.com/docs/githooks) to ensure nothing with `int` can be pushed
240
cpp_questions
unxo55
I know it is more of a QoL thing since you can just achieve it through telling everyone on the team to not use it, but it would be very helpful in a codebase touched by many people.
There is no way to do it within the language because the type system does not distinguish between them — `int32_t` is simply a typedef for (typically) either `int` or `long`, meaning they are exactly the same type. That said, there are external tools that can do this for you. I believe there is a clang-tidy rule to enforce this style, for instance. It would be nice to get that as a built-in (optional) compiler warning.
90
cpp_questions
unxqbz
I've been working as application support/developer for the last 15 years, and now that I've turned 40, I've found that I am no longer able to effectively deal with the random incidents and major outages, that I used to be able to shrug off and deal with when younger. I'm worried the crushing stress from trying to get a major production system back online during an outage might be affecting my health in potentially dangerous ways now. As such, I was wondering what, if any, alternative jobs I could consider moving into, that didn't come with the fortnightly all-day MIM/bridge/customer-yelling/panic attack merry go round? I'm just looking for ideas at this point :)
You could move into project management? You have the tech background and it’s not firefighting.
700
ITCareerQuestions
unxqbz
I've been working as application support/developer for the last 15 years, and now that I've turned 40, I've found that I am no longer able to effectively deal with the random incidents and major outages, that I used to be able to shrug off and deal with when younger. I'm worried the crushing stress from trying to get a major production system back online during an outage might be affecting my health in potentially dangerous ways now. As such, I was wondering what, if any, alternative jobs I could consider moving into, that didn't come with the fortnightly all-day MIM/bridge/customer-yelling/panic attack merry go round? I'm just looking for ideas at this point :)
Security is an option. Compliance is nice in that aspect, you come in to work, tell everyone how they are doing everything wrong and leave while they stay and fix. There are other parts of security that don’t deal with incidents as well. Your previous experience is a big advantage when working security as well.
520
ITCareerQuestions
unxqbz
I've been working as application support/developer for the last 15 years, and now that I've turned 40, I've found that I am no longer able to effectively deal with the random incidents and major outages, that I used to be able to shrug off and deal with when younger. I'm worried the crushing stress from trying to get a major production system back online during an outage might be affecting my health in potentially dangerous ways now. As such, I was wondering what, if any, alternative jobs I could consider moving into, that didn't come with the fortnightly all-day MIM/bridge/customer-yelling/panic attack merry go round? I'm just looking for ideas at this point :)
Look for a new job as a systems architect.
420
ITCareerQuestions
uny1np
Hi ! I'm having trouble implementing firebase in an iOS app using cpp... I hope you'll be able to help me ^^' Here are the three troublesome files : First, the listener interface from firebase : class Listener { public: virtual ~Listener(); /// Called on the client when a message arrives. /// /// @param[in] message The data describing this message. virtual void OnMessage(const Message& message) = 0; /// Called on the client when a registration token arrives. This function /// will eventually be called in response to a call to /// firebase::messaging::Initialize(...). /// /// @param[in] token The registration token. virtual void OnTokenReceived(const char* token) = 0; }; Then, my own listener for iOS, h file #ifndef NotificationHandlerIOS_hpp #define NotificationHandlerIOS_hpp #include "NotificationHandler.h" #include <iostream> #include "firebase/messaging.h" struct NotificationHandlerIOS : public firebase::messaging::Listener { ~NotificationHandlerIOS() override; void OnMessage(const ::firebase::messaging::Message& message) override final; void OnTokenReceived(const char* token) override final; }; #endif /* NotificationHandlerIOS_hpp */ And finally, the cpp file #include "NotificationHandlerIOS.hpp" #include "NotificationHandler.h" #include <iostream> void NotificationHandlerIOS::OnMessage(const ::firebase::messaging::Message& message) { qDebug() << message.raw_data; } void NotificationHandlerIOS::OnTokenReceived(const char* token) { qDebug() << token; NotificationHandler::GetInstance()->RegisterToken(token); } Now, the fun part, the error : Unimplemented pure virtual method 'OnMessage' in 'NotificationHandlerIOS'
Your posts seem to contain unformatted code. Please make sure to format your code otherwise your post may be removed. Read [our guidelines](https://www.reddit.com/r/cpp_questions/comments/48d4pc/important_read_before_posting/) for how to format your code. *I am a bot, and this action was performed automatically. Please [contact the moderators of this subreddit](/message/compose/?to=/r/cpp_questions) if you have any questions or concerns.*
40
cpp_questions
uny3eq
Have you ever eaten horseradish?
If we count wasabi as horseradish then yes,a lot of times... every time I eat sushi.
2,030
AskAnAmerican
uny3eq
Have you ever eaten horseradish?
As a Jew I must eat horseradish at least once a year at passover. It's also good with roast beef.
1,840
AskAnAmerican
uny3eq
Have you ever eaten horseradish?
Yes indeed. Particularly if you count cocktail sauce - horseradish being a primary constituent.
1,310
AskAnAmerican
unybzo
altho i learned C/C++ , pointers , OOP design , etc in school but everything i do in job i ve learned on my own during summer breaks or weekends . Go , React , Git , docker to name a few and i believe that this is the case for most of my classmates if not for everyone who works as SWE , it's true that school taught me a lot of things but i just don't use IAbstractAbstractFactory nor all those OOP heavy design patterns that i had been taught in univ . so what's the real difference between Self-taught and CS grad if they both taught them selves frameworks and languages (we talking about normal web stack not all those data eng,low level jobs ) ?
Kind of. Without a traditional CS education - you can go a whole career without understanding the likes of path finding algorithms, OS internals, distributed synchronization primitives, etc so you aren’t forced to learn those things by the industry. However, understanding these concepts will make you a better software engineer and will give you the right intuitions to make sound engineering decisions.
2,650
CSCareerQuestions
unybzo
altho i learned C/C++ , pointers , OOP design , etc in school but everything i do in job i ve learned on my own during summer breaks or weekends . Go , React , Git , docker to name a few and i believe that this is the case for most of my classmates if not for everyone who works as SWE , it's true that school taught me a lot of things but i just don't use IAbstractAbstractFactory nor all those OOP heavy design patterns that i had been taught in univ . so what's the real difference between Self-taught and CS grad if they both taught them selves frameworks and languages (we talking about normal web stack not all those data eng,low level jobs ) ?
IME, the difference between self-taught programmers and formally taught programmers mainly boils down to whether someone else forced them to put some uncommon tools in their “mental toolbox”. Those tools aren’t always used every day (if they were, self-taught folks would learn them), but they are useful occasionally and are necessary to efficiently tackle some types of problems (which are fortunately somewhat uncommon in actual business products). TL;DR: it’s hard to know what you don’t know, so if you teach yourself without getting feedback from someone who knows more, you tend to end up with gaps around the difficult/uncommon topics.
2,540
CSCareerQuestions
unybzo
altho i learned C/C++ , pointers , OOP design , etc in school but everything i do in job i ve learned on my own during summer breaks or weekends . Go , React , Git , docker to name a few and i believe that this is the case for most of my classmates if not for everyone who works as SWE , it's true that school taught me a lot of things but i just don't use IAbstractAbstractFactory nor all those OOP heavy design patterns that i had been taught in univ . so what's the real difference between Self-taught and CS grad if they both taught them selves frameworks and languages (we talking about normal web stack not all those data eng,low level jobs ) ?
a CS degree teaches you the fundamentals that you can apply to most languages
520
CSCareerQuestions
unyg77
Three years ago, we revealed the first image of a black hole. Today, we announce groundbreaking results on the center of our galaxy. We'll be answering questions from 1:30-3:30 PM Eastern Time (17:30-19:30 UTC)! The Event Horizon Telescope (EHT) - a planet-scale array of eleven ground-based radio telescopes forged through international collaboration - was designed to capture images of a black hole. As we continue to delve into data from past observations and pave the way for the next generation of black hole science, we wanted to answer some of your questions! You might ask us about: + Observing with a global telescope array + Black hole theory and simulations + The black hole imaging process + Technology and engineering in astronomy + International collaboration at the EHT + The next-generation Event Horizon Telescope (ngEHT) + ... and our recent results! Our Panel Members consist of: + Michi Bauböck, Postdoctoral Research Associate at the University of Illinois Urbana-Champaign + Nicholas Conroy, Astronomy PhD Student at the University of Illinois Urbana-Champaign + Vedant Dhruv, Physics PhD Student at the University of Illinois Urbana-Champaign + Razieh Emami, Institute for Theory and Computation Fellow at the Center for Astrophysics | Harvard & Smithsonian + Joseph Farah, Astrophysics PhD Student at University of California, Santa Barbara + Raquel Fraga-Encinas, PhD Student at Radboud University Nijmegen, The Netherlands + Abhishek Joshi, Physics PhD Student at University of Illinois Urbana-Champaign + Jun Yi (Kevin) Koay, Support Astronomer at the Academia Sinica Institute of Astronomy and Astrophysics, Taiwan + Yutaro Kofuji, Astronomy PhD Student at the University of Tokyo and National Astronomical Observatory of Japan + Noemi La Bella, PhD Student at Radboud University Nijmegen, The Netherlands + David Lee, Physics PhD Student at University of Illinois Urbana-Champaign + Amy Lowitz, Research Scientist at the University of Arizona + Lia Medeiros, NSF Astronomy and Astrophysics Fellow at the Institute for Advanced Study, Princeton + Wanga Mulaudzi, Astrophysics PhD Student at the Anton Pannekoek Institute for Astronomy at the University of Amsterdam + Alejandro Mus, PhD Student at the Universitat de València, Spain + Gibwa Musoke, NOVA-VIA Postdoctoral Fellow at the Anton Pannekoek Institute for Astronomy, University of Amsterdam + Ben Prather, Physics PhD Student at University of Illinois Urbana-Champaign + Jan Röder, Astrophysics PhD Student at the Max Planck Institute for Radio Astronomy in Bonn, Germany + Jesse Vos, PhD Student at Radboud University Nijmegen, The Netherlands + Michael F. Wondrak, Radboud Excellence Fellow at Radboud University Nijmegen, The Netherlands + Gunther Witzel, Staff Scientists at the Max Planck Institute for Radioastronomy, Germany + George N. Wong, Member at the Institute for Advanced Study and Associate Research Scholar in the Princeton Gravity Initiative If you'd like to learn more about us, you can also check out our [Website](https://eventhorizontelescope.org/), [Facebook](https://www.facebook.com/ehtelescope/), [Twitter](https://twitter.com/ehtelescope), [Instagram](https://www.instagram.com/ehtelescope), and [YouTube](https://www.youtube.com/channel/UC4sItzYomoJ6Flt0aDyHMOQ). We look forward to answering your questions! Username: /u/EHTelescope
What is the groundbreaking result?
1,470
AskScience
unyg77
Three years ago, we revealed the first image of a black hole. Today, we announce groundbreaking results on the center of our galaxy. We'll be answering questions from 1:30-3:30 PM Eastern Time (17:30-19:30 UTC)! The Event Horizon Telescope (EHT) - a planet-scale array of eleven ground-based radio telescopes forged through international collaboration - was designed to capture images of a black hole. As we continue to delve into data from past observations and pave the way for the next generation of black hole science, we wanted to answer some of your questions! You might ask us about: + Observing with a global telescope array + Black hole theory and simulations + The black hole imaging process + Technology and engineering in astronomy + International collaboration at the EHT + The next-generation Event Horizon Telescope (ngEHT) + ... and our recent results! Our Panel Members consist of: + Michi Bauböck, Postdoctoral Research Associate at the University of Illinois Urbana-Champaign + Nicholas Conroy, Astronomy PhD Student at the University of Illinois Urbana-Champaign + Vedant Dhruv, Physics PhD Student at the University of Illinois Urbana-Champaign + Razieh Emami, Institute for Theory and Computation Fellow at the Center for Astrophysics | Harvard & Smithsonian + Joseph Farah, Astrophysics PhD Student at University of California, Santa Barbara + Raquel Fraga-Encinas, PhD Student at Radboud University Nijmegen, The Netherlands + Abhishek Joshi, Physics PhD Student at University of Illinois Urbana-Champaign + Jun Yi (Kevin) Koay, Support Astronomer at the Academia Sinica Institute of Astronomy and Astrophysics, Taiwan + Yutaro Kofuji, Astronomy PhD Student at the University of Tokyo and National Astronomical Observatory of Japan + Noemi La Bella, PhD Student at Radboud University Nijmegen, The Netherlands + David Lee, Physics PhD Student at University of Illinois Urbana-Champaign + Amy Lowitz, Research Scientist at the University of Arizona + Lia Medeiros, NSF Astronomy and Astrophysics Fellow at the Institute for Advanced Study, Princeton + Wanga Mulaudzi, Astrophysics PhD Student at the Anton Pannekoek Institute for Astronomy at the University of Amsterdam + Alejandro Mus, PhD Student at the Universitat de València, Spain + Gibwa Musoke, NOVA-VIA Postdoctoral Fellow at the Anton Pannekoek Institute for Astronomy, University of Amsterdam + Ben Prather, Physics PhD Student at University of Illinois Urbana-Champaign + Jan Röder, Astrophysics PhD Student at the Max Planck Institute for Radio Astronomy in Bonn, Germany + Jesse Vos, PhD Student at Radboud University Nijmegen, The Netherlands + Michael F. Wondrak, Radboud Excellence Fellow at Radboud University Nijmegen, The Netherlands + Gunther Witzel, Staff Scientists at the Max Planck Institute for Radioastronomy, Germany + George N. Wong, Member at the Institute for Advanced Study and Associate Research Scholar in the Princeton Gravity Initiative If you'd like to learn more about us, you can also check out our [Website](https://eventhorizontelescope.org/), [Facebook](https://www.facebook.com/ehtelescope/), [Twitter](https://twitter.com/ehtelescope), [Instagram](https://www.instagram.com/ehtelescope), and [YouTube](https://www.youtube.com/channel/UC4sItzYomoJ6Flt0aDyHMOQ). We look forward to answering your questions! Username: /u/EHTelescope
I was surprised to see that Sag A* changed in such a short timescale. What's the time resolution you can achieve? I guess you can't image events shorter than one hour or so. What's the limiting factor? Can a image taken over a shorter length of time become less blurred, or is the optical resolution the cause of the blurriness of the image of Sag A*?
1,230
AskScience
unyg77
Three years ago, we revealed the first image of a black hole. Today, we announce groundbreaking results on the center of our galaxy. We'll be answering questions from 1:30-3:30 PM Eastern Time (17:30-19:30 UTC)! The Event Horizon Telescope (EHT) - a planet-scale array of eleven ground-based radio telescopes forged through international collaboration - was designed to capture images of a black hole. As we continue to delve into data from past observations and pave the way for the next generation of black hole science, we wanted to answer some of your questions! You might ask us about: + Observing with a global telescope array + Black hole theory and simulations + The black hole imaging process + Technology and engineering in astronomy + International collaboration at the EHT + The next-generation Event Horizon Telescope (ngEHT) + ... and our recent results! Our Panel Members consist of: + Michi Bauböck, Postdoctoral Research Associate at the University of Illinois Urbana-Champaign + Nicholas Conroy, Astronomy PhD Student at the University of Illinois Urbana-Champaign + Vedant Dhruv, Physics PhD Student at the University of Illinois Urbana-Champaign + Razieh Emami, Institute for Theory and Computation Fellow at the Center for Astrophysics | Harvard & Smithsonian + Joseph Farah, Astrophysics PhD Student at University of California, Santa Barbara + Raquel Fraga-Encinas, PhD Student at Radboud University Nijmegen, The Netherlands + Abhishek Joshi, Physics PhD Student at University of Illinois Urbana-Champaign + Jun Yi (Kevin) Koay, Support Astronomer at the Academia Sinica Institute of Astronomy and Astrophysics, Taiwan + Yutaro Kofuji, Astronomy PhD Student at the University of Tokyo and National Astronomical Observatory of Japan + Noemi La Bella, PhD Student at Radboud University Nijmegen, The Netherlands + David Lee, Physics PhD Student at University of Illinois Urbana-Champaign + Amy Lowitz, Research Scientist at the University of Arizona + Lia Medeiros, NSF Astronomy and Astrophysics Fellow at the Institute for Advanced Study, Princeton + Wanga Mulaudzi, Astrophysics PhD Student at the Anton Pannekoek Institute for Astronomy at the University of Amsterdam + Alejandro Mus, PhD Student at the Universitat de València, Spain + Gibwa Musoke, NOVA-VIA Postdoctoral Fellow at the Anton Pannekoek Institute for Astronomy, University of Amsterdam + Ben Prather, Physics PhD Student at University of Illinois Urbana-Champaign + Jan Röder, Astrophysics PhD Student at the Max Planck Institute for Radio Astronomy in Bonn, Germany + Jesse Vos, PhD Student at Radboud University Nijmegen, The Netherlands + Michael F. Wondrak, Radboud Excellence Fellow at Radboud University Nijmegen, The Netherlands + Gunther Witzel, Staff Scientists at the Max Planck Institute for Radioastronomy, Germany + George N. Wong, Member at the Institute for Advanced Study and Associate Research Scholar in the Princeton Gravity Initiative If you'd like to learn more about us, you can also check out our [Website](https://eventhorizontelescope.org/), [Facebook](https://www.facebook.com/ehtelescope/), [Twitter](https://twitter.com/ehtelescope), [Instagram](https://www.instagram.com/ehtelescope), and [YouTube](https://www.youtube.com/channel/UC4sItzYomoJ6Flt0aDyHMOQ). We look forward to answering your questions! Username: /u/EHTelescope
Can you tell us a bit more about the user interface with the telescope? I can't imagine you're taking turns looking through a single eyeglass.
860
AskScience
unym8g
What American people think about Malcolm X beliefs (the beliefs that he held before his pilgrimage to Mecca) ?
I doubt most Americans have any idea what those beliefs were.
1,400
AskAnAmerican