- Strength to Increase Rep
- +12
- Strength to Decrease Rep
- -3
- Upvotes Received
- 205
- Posts with Upvotes
- 180
- Upvoting Members
- 127
- Downvotes Received
- 10
- Posts with Downvotes
- 10
- Downvoting Members
- 9
Computer engineer constantly trying to overcome his lack of natural talent.
- Interests
- Bowling. Construction. Family. Not necessarily in that order.
- PC Specs
- Various machines of differing levels of power. Linux mostly with some Mac and Windows thrown in for…
Re: CSV format will end a line with `,` if the last field is empty. If you use a standard CSV parser you would just be able to select all but the last column (through the API of the library). Search for `C++ CSV parser` and you will get plenty of … | |
Re: You will need to code a way to listen for mouse clicks (most systems provide an interface to this functionality) and then report the values accumulated over time. Look at your system documentation for where to begin. | |
Re: C'mon, lets address the aspect ratio. [code]#include <iostream> int foo(double a, double b, double x, double y) { return ((x*x)/(a*a) + (y*y)/(b*b)); } int main () { int b = 4, a = 10; const int min = -15, max = 15; int x = min, y = min; for … | |
Re: If you need a quick-and-dirty approach to controlling several machines in parallel (provided the number of machines is fairly small) you can use `tmux`. With a separate pane hosting an `ssh` session to a unique host you can enable `synchronize-panes` in `tmux` to have commands echoed to each host at … | |
Re: It seems you are making some assumptions that you have not verified yourself. The ones **Hiroshe** point out are good examples: Python, if used correctly, fits very nicely into an analysts toolbox regardless of scale. Have you had a *specific* example where this is not the case? R has some … | |
Re: When `sendto` fails, you can check the value of `errno` to know the reason. For example: if (-1 == nb) { fprintf (stderr, "sendto failed. Reason: '%s'\n", strerror (errno)); ... } | |
Re: If I understand your request correctly, you want to create an environment that makes it easy to defend your position by generating results you expect to be correct? I'm not sure that is the proper approach. What exactly are you 'fuzzing'? What do you expect your fuzz to produce when … | |
Re: Most important: *curiosity*. You can have all the skills in the world but if you are not curious about why that bump is there or what caused that little blip you will only ever be 'run-of-the-mill.' That being said, I'd say you should have a strength in all of these … | |
Re: You key is ambiguous considering your array. If you concatenate the first two elements (as text) you get "0001", your key leads with "001". Did you use "0" + "01" or "00" + "1"? In addition, are you guaranteed that the last value is 3 digits? What about the others … | |
Re: In general, these things are highly coupled with your OS - what OS are you using? | |
Re: What output are you expecting? What are you getting? What is your thoughts on why they may not be the same? | |
Re: If you are dealing with a variable size input you have a few options: 1. If you know the maximum size of the input you can create a static array that is on the stack (heed **Moschops**' warning about stack size). Then you fill in the elements as you read … | |
Re: How will what you are doing compare (or be distinct from) existing anti-virus software packages? There is an entire industry built around this - presumably using more user friendly tools/languages than direct assembly. Why not start there and see what you can leverage? | |
Re: This is highly dependent on the environment, logs, and the filtering you'd like to do. Limititng yourself to not using existing libraries makes for a difficult journey. How are you getting these logs? Individually over a socket connection? As a single file with all server logs aggregated in one place? … | |
Re: You could use environment variables. In C/C++ you can access your environment either by the `envp` to main or through the `getenv` call. For `getenv` you might do something similar to the following pseudocode: for arg in argv: if arg[0] == '$': char * variable = getenv(arg[1..-1]) You'd obviously need … | |
Re: A shell script is simply a sequence of commands issued to the shell in bulk for convenience. You place commands into a shell script exactly as you would type them on the command line. For example, to execute `ls` you do: #!/bin/bash ls Simple as that. | |
Re: Depends on how your system (i.e. `UDP server`) logs these things. For example, you might look at the `last` command in Linux for some of the information you seek but it does not contain the IP or transaction ID (whatever that is). I assume there is some built-in log support … | |
Re: What problems are you having? We wont just do the problem for you but we'd be happy to help you along with any issues you have. I'd suggest you make a separate function that handles inserting into a list. That way, in that function, you can manage how items are … | |
Re: There are functions that will check this for you: `isalpha`, `isdigit` both from `#include <cctype>` From there you can either read a string or convert to number (via `strtol`). | |
Re: If this is an academic exercise you should solve it yourself. The process of solving hard problems is what education is all about; having others provide a simple solution (that you fail to understand) breaks that process. If you are a professional and are directly asking others to do your … | |
Re: `printf` will allow you to format output as you'd like. double area = ...; printf ("Area: %0.2f\n", area); | |
Re: You can do this with `screen`. For example: screen -d -m nautilus . Will start a screen session to host the `nautilus` process (without attaching to it) and will exit the session once the `nautilus` process exits. The net effect is that you will get a GUI that will stay … | |
Re: Considering you can write your own that list would be quite large. | |
Re: EMD is a mechanism to compare probability distributions - usually in multiple dimensions (*e.g.* image comparison). How would you look to apply that to ECG signals? What *features* are you expecting to extract with this method? The EMD will tell you how similar two normalized histograms are (*i.e.* it will … | |
Re: You may want to look into `<cctype>` which provides facilities for this type of thing. For example: #include <string> #include <cctype> std::string make_upper (const std::string& in) { std::string out(in); for (::size_t i = 0; i < in.size (); ++i) { out[i] = ::toupper(out[i]); } return out; } You can find … | |
Re: I'd suggest you look into a salary comparison tool that can adjust for cost of living and wages local to your area. It is highly dependent on where you live, your experience, and your education[1]. There are also [labor statistics](http://www.bls.gov/bls/blswage.htm) available if you can learn to navigate them. Unfortunately, there … | |
Re: In the header `<cctype>` you will find `isalpha` and `isalnum` among [others](http://www.cplusplus.com/reference/cctype/) | |
Re: If you've already established the connection, you can just use the existing socket to send messages between the two machines. What that means, specifically, depends on the client/server setup. If you have a command-oriented set where one machine issues commands to the other (or there is some other well know … | |
Re: To expand on what **Duoas** mentioned about `TIOCGWINSZ`, here is an example: #include <stdio.h> #include <unistd.h> #include <ioctl.h> #include <termios.h> int main () { struct winsize ws; ioctl (STDOUT_FILENO, TIOCGWINSZ, &ws); printf ("Window width: %zd\n", ws.ws_col); return 0; } | |
Re: It really depends on the software. In general, software packages are maintained for you and you use `apt-get` to install, update and/or remove packages. When you need to install by hand (if the package repository doesn't contain your software) you need to follow the instructions of that particular software. How … |