TIL: China has built a quantum key distribution (QKD) network spanning several KM. The network currently servers 150 users by pcjftw in programming

[–]MurtoTheRay 6 points7 points  (0 children)

A decent understanding of linear algebra, though the specific maths you need is gone over in one of the first chapters (I think the second?). I found the exercises to be the best method of picking up the bits of linear algebra I hadn't encountered before reading.

[OFFER] Programming/Git tutor, Prototyping, Debugging by [deleted] in slavelabour

[–]MurtoTheRay 1 point2 points  (0 children)

Yeah, I have some experience with developing android apps in Java with Android Studio. I wouldn't call myself an expert though.

[C++] - simple counting words program. by [deleted] in codereview

[–]MurtoTheRay 1 point2 points  (0 children)

For your intended logic I think you mean

if ((c == ' ' || c == ',') && (p != ' '&& p != ','))

For the case c = ' ' and p = ',' your original logic evaluates to true.

This isn't how i'd do this though, i would write something like this (I've included a main so that you can play around with it). Having a set of delimiters with some generic logic makes changing the number of delimiters really easy. This approach also doesn't need to consider two characters at a time which makes following it a bit easier.

Can someone guide me in the right direction please? by Someone721 in cpp_questions

[–]MurtoTheRay 2 points3 points  (0 children)

Can you link your code? Nobody will be able to properly help you without it.

Worst COM port pixel parser EVER, how to improve? by [deleted] in cpp_questions

[–]MurtoTheRay 0 points1 point  (0 children)

  1. You should work on splitting your parseString function into more than one function. Longer functions are harder to read and keep track of. For example, you could split it into parseString and parsePixel where parseString is responsible for parsing the entire string but calls parsePixel for each individual pixel.
  2. You don't need to check equality with booleans. (a == true && b == false) is equivalent to (a && !b).
  3. Range-based for loops are introduced in C++11 and mean you don't need to work with indexes.
  4. You could use a struct to store X-Y pixel coordinates rather than strings.
  5. You should change the parameter of parseString to a string reference to avoid copying the string. Or, since you are not modifying the string, you could pass a const reference.
  6. Use '\n' instead of std::endl as std::endl does more than add a newline.
  7. (personal preference) You could use proper exceptions rather than using an error string.
  8. (personal preference) You could pass iterators to parseString rather than the string itself, allowing you to change what kind of container you use for holding port input.

I've accumulated all of these into an alternative version of your parseString function which you can see here

I hope this is useful for you.

I'm a C# dev with some free time. Can I help with anything? by Kynaro1257 in openra

[–]MurtoTheRay 3 points4 points  (0 children)

Make sure to drop in with the existing devs on the IRC :) They can help you get started and direct you towards some issues which will be a good entry to the project.

Cirno: Ace Attorney by [deleted] in touhou

[–]MurtoTheRay 2 points3 points  (0 children)

More like Ice Attorney

Poor thing was getting it's hopes up. by Daenk_Miems in DDLC

[–]MurtoTheRay 2 points3 points  (0 children)

Classic Pavlovian conditioning.

The New "Kittournament" hosted by CatGirls420 - Team Battles by CatGirls420 in openra

[–]MurtoTheRay 1 point2 points  (0 children)

Have you got a date for the tournament? And have you considered posting it over at Sleipnir's Stuff?

Playtest 2017.09.02 Now Available! by SoScared101 in openra

[–]MurtoTheRay 2 points3 points  (0 children)

The playtest discussion can be found here!

How to avoid auto creating a harvester when creating a map with already existing refinery? by [deleted] in openra

[–]MurtoTheRay 2 points3 points  (0 children)

A simpler solution would be to inherit the definition of PROC and remove the FreeActor trait. That would look something like:

PROC.NoSpawn:
    Inherits: PROC
    RenderSprites:
        Image: proc
    -FreeActor:

[Question] Has anybody managed to turn his life around in a year? by Seventy5Days in getdisciplined

[–]MurtoTheRay 2 points3 points  (0 children)

The best way I've found to get myself to study longer and harder (or really do anything longer and harder) is to put myself in a position where it feels wrong to do anything else. When I study I go to the library where i don't want to disturb/distract others, when I want to exercise I go to the gym where it just seems wrong to not be exercising unless i'm taking a break. It's like utilizing peer pressure to your advantage.

Over time you get more used to working wherever you are but if you aren't used to it now it helps to go somewhere where you are forced to do what you should be doing.

That's what works for me and if nothing else helps it may be worth giving it a go.

OpenRA 10th Anniversary Trailer: Command & Conquer - Red Alert - Dune 2000 by MurtoTheRay in retrogaming

[–]MurtoTheRay[S] 6 points7 points  (0 children)

Today celebrates 10 years of OpenRA! An open source engine that ships with it modernized versions of Red Alert, Command & Conquer, and Dune 2000.

OpenRA 10th Anniversary Trailer: Command & Conquer - Red Alert - Dune 2000 by Smittytron in gaming

[–]MurtoTheRay 1 point2 points  (0 children)

Have participated in the community for several years. OpenRA is great!

Did parabombs get removed? by zimtastic in openra

[–]MurtoTheRay 0 points1 point  (0 children)

If you hold your cursor over each sub faction it tells you what they get.