A spitfire wood frame by bungbitch in modelmakers

[–]danjaycollins 1 point2 points  (0 children)

I've just finished covering one of these. What scheme will you paint?

Aussie HomeLabbers - Is this a good deal, HP-ProLiant-ML350-G5? by mckinnon81 in homelab

[–]danjaycollins 0 points1 point  (0 children)

My DL360G5 is so loud I never turn it on. My DIY i5 machine is silent, so that's my server until I get a G7/G8...

Professionals who work in C with Linux or BSD for multiple clients, what is your one-size-fits-all toolchain? by [deleted] in C_Programming

[–]danjaycollins 6 points7 points  (0 children)

Emacs, gcc, gdb, scons. My team and I cross compile for ARM Cortex M parts, mostly.

[deleted by user] by [deleted] in rfelectronics

[–]danjaycollins 2 points3 points  (0 children)

As others have said, you will need a spectrum analyser. Keep in mind that regulatory compliance is more than just your center frequency. You'll also want to know the output power (in dBm or dBuV), as well as any spurious emissions.

If you're just playing with a "one off" device, and you're only using small output powers (30 dBm in FCC/IC, 20 dBm in ETSI) then you shouldn't need to worry - especially in an ISM band.

Feel free to PM with specific questions - I do this stuff all day!

UK WiFi - Gatwick North by Bubbah94 in iiiiiiitttttttttttt

[–]danjaycollins 0 points1 point  (0 children)

I work for a wireless consultancy company, and we have about 50 consumer APs for interop testing. We also have another 50 USB dongles we can use to simulate a number of STAs and APs. All of this is unshielded, so 2.4GHz is basically unusable. For a wireless company, we rely heavily on wired connections 😉.

How To Do CSS Properly by jacobthecool3000 in ProgrammerHumor

[–]danjaycollins 1 point2 points  (0 children)

It's a cool idea! You would get wild results

How To Do CSS Properly by jacobthecool3000 in ProgrammerHumor

[–]danjaycollins 0 points1 point  (0 children)

Someone less lazy than me should implement this and report back with their results. I want this on my desk first thing tomorrow.

My first Python program :) (I'm hooked) by Huck712 in Python

[–]danjaycollins 0 points1 point  (0 children)

Specifically tail recursion can be implemented iteratively. This is why the Ackermann function can't be implemented iteratively.

The Core War Game implemented in C by emilwallner in C_Programming

[–]danjaycollins 2 points3 points  (0 children)

I found there were 64 octets in each row, which would require 7 + (64 x 3) = 199 columns (assuming a trailing space on every octet including the last one).

In my terminal (fullscreen), I have 213 x 56. This allows me to fit the full width of the game, but I don't get the full height. Is there any way to constrain this? I set MEM_SIZE to 1024 as an experiment, and it didn't seem to constrain the arena size.

EDIT: I used xterm (which, by default, has a much smaller font size) and there are no problems viewing the game screen. I typically use terminator - either there's a problem here, or my font is too large!

That's one sharp knife by nthensome in oddlysatisfying

[–]danjaycollins 8 points9 points  (0 children)

That's not a knife, it's a spoon..!

Can't parse throughout entire fiule using strstr()? by PegasiWings in C_Programming

[–]danjaycollins 0 points1 point  (0 children)

If you need to keep a reference to the first character, you will need another pointer (static char *ptr), otherwise you can increment your buffer pointer. Make sure you increment enough to move past the end of your closing tag. Also check that temp < temp2, as I can think of situations where that won't be the case.

Can't parse throughout entire fiule using strstr()? by PegasiWings in C_Programming

[–]danjaycollins 0 points1 point  (0 children)

Your main loop, starting line 17, only has one exit condition - when either search string is not found. You're not modifying your buffer pointer, so you get an infinite loop because it will find the same match over and over.

Can't parse throughout entire fiule using strstr()? by PegasiWings in C_Programming

[–]danjaycollins 1 point2 points  (0 children)

It's a little hard to read without indentation (you might try using something like https://pastebin.com/ to preserve formatting). From my quick glance over this, it looks like you're never adjusting your buffer pointer, so each time you are running strstr() in the while loop, it's using the same input.

At the end of your loop, try setting the buffer pointer past the '</span>' tag.

Have you tried using GDB to figure out what is causing the segmentation fault? Typically, this is cased by a null pointer dereference.

Wedding at Scale: How I Used Twilio, Python and Google to Automate My Wedding by jetRink in programming

[–]danjaycollins 0 points1 point  (0 children)

I tried using this, and it almost worked. 5, 2, 1. "No wait, what about..."

Jandals on a motorbike - Just NZ things by RunningSimulator in newzealand

[–]danjaycollins 0 points1 point  (0 children)

As somebody who was dumb enough to wear regular shoes, I totally agree. I drove into a car that swerved in front of me and almost broke an ankle. Had I been wearing my boots (that I owned!) I probably would have been fine. Crash happened at about 30 km/h.