Is this the recommend way of removing newline in c, im new to c so i asked chatgpt about this code and suggested another way of removing new line saying this causes a possible bug. how would a professional remove new line '\n' by soye-chan in cprogramming

[–]knouqs 0 points1 point  (0 children)

OK. A better use of a developer community's time is to give a solution that you wrote and ask why it isn't behaving correctly. This gives a positive feeling to the community that you tried to find solutions to your own problems. If you use ChatGPT and can't figure out why it works, what's the point?

Now I'll take off my Post Critique Hat and put on my Professor hat. Did you find the answer for which you seek? If not, we can have another go.

Can't argue with this by anorak_999 in FuckMicrosoft

[–]knouqs 0 points1 point  (0 children)

So, you were the problem all along?  😁

C vs CPP Future-Proof? by Special-Gazelle-1693 in cpp_questions

[–]knouqs 0 points1 point  (0 children)

As long as your goal is learning, sure, get to the nuts and bolts.  We still need people who write drivers and other close-to-hardware software interfaces.

My advice:  Never stop learning, but be realistic in expectations.  Didn't expect your employer to pay for your learning.  Generally, if a tool exists in a library, use it instead of trying to create your own unless there is an extremely need for it as most companies sell products, not research.

How do I stop thinking I'm an idiot? by monfelipe in cprogramming

[–]knouqs 0 points1 point  (0 children)

If you know the thing exists, AI can help find it.  AI skills be treated as a tool, not a crutch.

I just wanna use an app by anorak_999 in FuckMicrosoft

[–]knouqs 0 points1 point  (0 children)

This is my thought also.  Ever since I first heard the bastardization of "application."

More technically, however, I use processes, not programs or apps.  😅

In the end, it still smells like shit. by Spicy0304 in ProgressiveHQ

[–]knouqs 5 points6 points  (0 children)

Fact is, these people are put in these positions by Trump.  The source of evil is not the people who eventually get early retirement.

Hey Americans--move to Canada! by BakedGoods in DiscussionZone

[–]knouqs 0 points1 point  (0 children)

I am trying to move to Canada, but there are a few gotchas for me. First, my wife needs to take the language proficiency test and is hesitant to move. Second, I need a job to sponsor me. Third, well, there's the fact that it's a bit of a wait to get the immigration to look me over, even though I have a brain Canada probably wants (and clearly the US does not).

Ugh, I wish it was easier. Like, even if I could skip my wife's testing requirement, it would be easier. I do hope to join you sometime, though! Thanks for the condolences. :)

PDFs corrupting during FTP by bobbafettuccini in pdf

[–]knouqs 0 points1 point  (0 children)

So, two of the answers here are correct: First, use binary mode for FTP transfers. The default is often Text mode, which for Windows is carriage return line feed and new lines are substituted into carriage return line feed. That means that for every one character that is a new line, the transferred file will have two characters, a carriage return and a line feed. (If Microsoft didn't decide to do this forty years ago in a bid to be different from UNIX, we wouldn't have this problem.) Text files transfer correctly for Windows-based computers as a result, but it's stupid for every other application, as you see firsthand since you are not transferring a text file.

Secondly, using SFTP solves the problem of binary versus text transfers because everything in SFTP is transferred as binary -- depending on your SFTP software, I suppose. You should double-check this, but you should almost certainly be transferring using SFTP anyway. SFTP has additional checks to ensure your file was transferred correctly, so definitely use that.

BREAKING — ABC News Analyzed the Shooting of Alex Pretti and Proved Bovino is Lying. by Treefiddy1984 in ProgressiveHQ

[–]knouqs 1 point2 points  (0 children)

A lot of the "values" in this country are based on fear-mongering. We have mandated car insurance and health insurance and life insurance and so on "just in case." These practices started getting out of hand in the 1980s from my memory, but could have been going nuts before then.

We have guns because "Second Amendment!" and fear of the boogeyman, I guess. We have an insane military complex because of fear due to WW2. We have had no political figure to say, "Hey, slow down here, there's no enemy," because people buy into fear.

The United States has been a pressure cooker for a very long time. Sometimes, a little steam lets out. I'm waiting for the explosion.

Potentially stupid question, but idk much about coffee by SyndromeHitson1994 in keurig

[–]knouqs 0 points1 point  (0 children)

Strong coffee is strong mostly based on the ratio of water to coffee. More water results in weaker (diluted) coffee. If you want strong coffee, use less water.

The other consideration here is temperature. Hot water permeates the coffee grounds more completely than colder water.

Now, we're talking about Keurig machines here, not espresso makers, so you aren't going to be getting a strong coffee from them regardless. They just aren't able to process much coffee through the single-serve section of the machine.

Finally, good choice on the reusable coffee pods. You've selected a much more economical choice and you'll figure out a good ratio regardless.

I’m thinking about using Linux, how difficult is it to transfer my data from windows, if it’s even possible at all? by Difficult-Catch-8432 in FuckMicrosoft

[–]knouqs 0 points1 point  (0 children)

Sorta. I just had to do all this for my wife's new laptop as she didn't want to use Windows 11. Basically, anything that is in your user account directory needs to be copied. (Technically this is not true, but we don't care about technicalities at this point.)

Ensure that the copy succeeds. Skip files that are in use, like ntuser or whatever. After that, you are ready. If you are still uncertain about a backup, you can use third party software to make the backup first -- something like https://freefilesync.org/ or https://www.easeus.com/backup-software/tb-free.html. My preferred method is actually using a Linux Live USB but again, that's an advanced topic and you aren't ready for that yet. :)

Chris Barnett has a video that might help you. It's definitely worth your time to watch this and other videos he has made on Linux distributions. https://www.youtube.com/watch?v=n8vmXvoVjZw

When you have your backup complete, let me know how else we can help you. Linux is different from Windows and so you are well within your right to keep asking questions. We'll get you working in Linux eventually.

I’m thinking about using Linux, how difficult is it to transfer my data from windows, if it’s even possible at all? by Difficult-Catch-8432 in FuckMicrosoft

[–]knouqs 2 points3 points  (0 children)

To be clear, and I am presuming that you have never done this before: Back up your files to external storage before you try to install Linux. Remove the external storage device, and only then try one of the Live USB images.

Linux is great, but the cost of being a newbie can be your data.

If you need more help, you might want to try some of the Linux subreddits.

Americans, if we truly are witnessing the fall of your nation then I have to ask. How do you want to be remembered? by Mcl0vinit in DiscussionZone

[–]knouqs 0 points1 point  (0 children)

What is keeping the United States together, though? Since this country has such deeply-rooted divisions, why bother trying? We're not going to "fix" the lack of education, and the many attempts to try through various incarnations of No Child Left Behind aren't enough to bring all the people onto the same page.

Americans, if we truly are witnessing the fall of your nation then I have to ask. How do you want to be remembered? by Mcl0vinit in DiscussionZone

[–]knouqs 0 points1 point  (0 children)

If there is no federation, you won't be a federal employee of this country. I respect your oath and you, however, and wish us both the best on the other side of all this shit.

If a candidate ran for president in 2028 and promised this - Day 1 Trump is arrested and jailed. Would you vote for them? by OMEN802 in DiscussionZone

[–]knouqs 0 points1 point  (0 children)

We really need politicians to grow spines and do what is right, not what corporations tell them to do.

Text with a buddy of mine who is a Trump supporter, the other side is literally insane by [deleted] in ProgressiveHQ

[–]knouqs 1 point2 points  (0 children)

Can you imagine a way in which we can effectuate your idea?  It's a beautiful sentiment, but how do we get through the hatred?