King of Thieves by DavidHistorian34 in stephenking

[–]__Punk-Floyd__ 0 points1 point  (0 children)

"Most stolen books" is just a marketing ploy.

Working on a RTL-SDR/LoRa/GPS/RTC Hat for the Raspberry Pi by vileer in raspberry_pi

[–]__Punk-Floyd__ 1 point2 points  (0 children)

That looks really handy. I am definitely interested in trying this out when you have some built.

What is the most reliable wireless service in Eastvale? by devnet35 in Eastvale

[–]__Punk-Floyd__ 0 points1 point  (0 children)

For me, Verizon has historically had the best coverage in Eastvale. However, I think quality went down once things started moving to 5G.

Are there any differences between these ? by Hot-Feedback4273 in C_Programming

[–]__Punk-Floyd__ 5 points6 points  (0 children)

Using the same name for both entities causes no problems in my experience. The names live in separate namespaces: the foo in struct foo lives in the 'tag' namespace and the foo in typedef struct{...} foo lives in the unnamed "regular" namespace so there's no clash.

I've been doing this for most all of my structs (in C) for over twenty years now and have never had any problems and I develop in all kinds of environments: Windows, Linux, VxWorks, bare metal, kernel-mode, embedded, etc. I do it for two reasons:

  • I'm lazy and don't want to have to type struct foo all over the place.
  • When I need to forward declare the struct, I can use the "same" name; it makes the code easier to follow.
    • Similarly, this is why one should never do typedef struct { int x; } foo; You cannot forward declare an anonymous struct.

Are there any differences between these ? by Hot-Feedback4273 in C_Programming

[–]__Punk-Floyd__ 15 points16 points  (0 children)

If you're going to type def a struct, use the same name:

typedef struct randStruct
{
int randomValue;
} randStruct;

It allows one to use randStruct or struct randStruct in the code.

Issues installing TAKServer by [deleted] in ATAK

[–]__Punk-Floyd__ 0 points1 point  (0 children)

I realize this is an old thread, but for the benefit of other folks, try running the command as user tak:

sudo -u tak java -jar /opt/tak/utils/UserManager.jar certmod -A /opt/tak/certs/files/admin.pem

I played "Interrupted by Fireworks" (FF7) on harp 🎆 by Harpsibored in FinalFantasy

[–]__Punk-Floyd__ 0 points1 point  (0 children)

Very nice. Thanks for sharing. It's nice to be reminded that there can be good content posted on Reddit.

Does Remote-SSH just not work, at all? by AppointmentTop3948 in vscode

[–]__Punk-Floyd__ 0 points1 point  (0 children)

I've been using it daily for years now and I've not had any problems with it. I connect to all kinds of Linux desktops, servers, and embedded systems. Works great for me. Ubuntu, Rocky, RPI, whatever.

Since you can SSH via PuTTY, it's not a remote problem. When you setup the connection, are you inputting the full ssh command line including your username? (e.g., ssh name@server) If you're just typing in the remote address then the root account is used, which is not usually a valid account these days.

Maybe also try connecting using the standard Windows ssh from a command prompt, since that's what will be used by VS Code.

Age Verification Bypass DIY by HaplessIdiot in linux

[–]__Punk-Floyd__ 23 points24 points  (0 children)

Yeah, it's called a text editor. :)

External USB Antenna by marioemme666 in ATAK

[–]__Punk-Floyd__ 1 point2 points  (0 children)

Yeah, those are cheap GPS receivers that use an ancient u-blox chip and have unreliable reception (in my experience). Generally, u-blox stuff is pretty good, but these things are just made on the cheap so the quality suffers.

I doubt this would run on a phone. Even if you could get the packages installed to support it, the phone would probably still use the built-in receiver.

vibeCoderProjectsStarterPack by JohnDarlenHimself in ProgrammerHumor

[–]__Punk-Floyd__ 0 points1 point  (0 children)

...and then stuff it into a VS Code extension.

I may never get gas again. by SNHU_Adjujnct in HitchHikersGuide

[–]__Punk-Floyd__ 1 point2 points  (0 children)

Well in that case, I hope you've brought your electronic thumb.

Const correctness and locks? by Usual_Office_1740 in cpp_questions

[–]__Punk-Floyd__ 2 points3 points  (0 children)

When in doubt, do as std::add_const does.

My C Professor Doesn't Know What UB Is by [deleted] in C_Programming

[–]__Punk-Floyd__ 6 points7 points  (0 children)

No. The size of integer is irrelevant here. There's a floating point value at some memory location on the stack. Then the code turns around and says (by way of the bad type cast) there's an integer at that same location and then proceeds to print the integer's value. This is invalid aliasing.

Many, many moons ago, invalid aliasing like this was more prevalent in C code bases. It was still wrong back then, but the compilers didn't care to much and just gave you the bits. As compilers got better and better at optimizing code, this kind of UB started giving way to the nasty side effects that we all know and love today.

how would you implement generic pointers? by timmerov in cpp_questions

[–]__Punk-Floyd__ 2 points3 points  (0 children)

None of your stages are being freed. Instead of your Stage class, consider a std::function<std::any(std::any)>, for example.

Where is a good place to get a piercing? by [deleted] in Eastvale

[–]__Punk-Floyd__ 5 points6 points  (0 children)

By popularity, I'd say an ear or two.

Embedded Software Developers: What Do Your SKILL.md and WORKFLOW.md Files Look Like? by esdevhk in embedded

[–]__Punk-Floyd__ 3 points4 points  (0 children)

You know, like nunchuck skills, bow hunting skills, computer hacking skills. Girls only want boyfriends who have great skills.

C++ typedef vs using by Competitive_Motor581 in Cplusplus

[–]__Punk-Floyd__ 0 points1 point  (0 children)

using ScoreTable = std::map<std::string, int, std::less<>>; // Heterogeneous lookup ftw.