Posts
 
Reputation
Joined
Last Seen
Ranked #167
Strength to Increase Rep
+12
Strength to Decrease Rep
-3
95% Quality Score
Upvotes Received
205
Posts with Upvotes
180
Upvoting Members
127
Downvotes Received
10
Posts with Downvotes
10
Downvoting Members
9
45 Commented Posts
13 Endorsements
Ranked #121
Ranked #106
~374.77K People Reached
About Me

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…
Favorite Tags

825 Posted Topics

Member Avatar for casey.li.146

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 …

Member Avatar for ming_1
0
6K
Member Avatar for venus87

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.

Member Avatar for Seyferx
0
3K
Member Avatar for restrictment

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 …

Member Avatar for CharlieCap
2
2K
Member Avatar for Pavan_6

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 …

Member Avatar for Pavan_6
0
183
Member Avatar for mgold

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 …

Member Avatar for thaifoodlover
0
346
Member Avatar for Sameer_4

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)); ... }

Member Avatar for L7Sqr
0
100
Member Avatar for d8m9

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 …

Member Avatar for rubberman
0
527
Member Avatar for Transcendent

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 …

Member Avatar for Ene Uran
0
223
Member Avatar for pdk123

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 …

Member Avatar for L7Sqr
0
257
Member Avatar for programmingman

In general, these things are highly coupled with your OS - what OS are you using?

Member Avatar for manofprogram
0
110
Member Avatar for surya777

What output are you expecting? What are you getting? What is your thoughts on why they may not be the same?

Member Avatar for NathanOliver
0
144
Member Avatar for nacedo

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 …

Member Avatar for TalhaMoazSarwar
0
205
Member Avatar for theBigB

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?

Member Avatar for theBigB
0
553
Member Avatar for tnd2491

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? …

Member Avatar for L7Sqr
0
196
Member Avatar for it@61@sec

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 …

Member Avatar for it@61@sec
0
314
Member Avatar for Niloofar24

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.

Member Avatar for Niloofar24
0
257
Member Avatar for tnd2491

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 …

Member Avatar for tnd2491
0
140
Member Avatar for Habib_5

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 …

Member Avatar for L7Sqr
0
368
Member Avatar for mahmoud.beltagy95

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`).

Member Avatar for mahmoud.beltagy95
0
109
Member Avatar for Theekshana

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 …

Member Avatar for Joel100
0
187
Member Avatar for doris_3
Re: C

`printf` will allow you to format output as you'd like. double area = ...; printf ("Area: %0.2f\n", area);

Member Avatar for rubberman
-1
134
Member Avatar for RikTelner

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 …

Member Avatar for JasonHippy
0
289
Member Avatar for Ahmad Imran
Member Avatar for Duoas
-1
231
Member Avatar for elaher

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 …

Member Avatar for L7Sqr
0
100
Member Avatar for cambalinho

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 …

Member Avatar for sneekula
0
343
Member Avatar for Jack_11

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 …

Member Avatar for glenn_3
0
151
Member Avatar for radhikachopraaa

In the header `<cctype>` you will find `isalpha` and `isalnum` among [others](http://www.cplusplus.com/reference/cctype/)

Member Avatar for L7Sqr
0
101
Member Avatar for XodoX

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 …

Member Avatar for XodoX
0
342
Member Avatar for it@61@sec

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; }

Member Avatar for L7Sqr
0
523
Member Avatar for ali.fayyazi

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 …

Member Avatar for hardmode
0
326
Member Avatar for Neelima_1

That error is not related to insert mode it appears during edit mode. Try using `vim` instead of `vi` (you may have to install a package) and then you should see when you are in insert mode by the status at the bottom of the edit window (you should see …

Member Avatar for L7Sqr
0
113
Member Avatar for orgy147
Member Avatar for L7Sqr
0
111
Member Avatar for zahra123

> Part of the problem is that writing parsing rules is not trivial I think that is the crux of the matter. `lex` and `yacc` are fine tools for writing a parser/generator. The nature of languages and their compilation is that they are largely static don't often change. > any …

Member Avatar for zahra123
0
526
Member Avatar for justzamir

What error are you getting - compiler/runtime? I can see that `scanf` might be an issue as you don't include `<cstdio>` (I'm unclear if `<conio.h>` does that for you). Also, you are mixing input mechanisms (`cin` and `scanf`) - it is best to pick one and be consistent. Also, you …

Member Avatar for jencas
1
338
Member Avatar for ozzan93

Are you expected to provide code for this or some sort of pseudocode describing how you would implement such a thing? Have you been given any example cod eto build from or are you to complete this from scratch? In general, we do not provide free homework answers. Show that …

Member Avatar for L7Sqr
0
419
Member Avatar for Adami

That code wont compile. Do you have a working example (that was copied incorrectly) or are you asking how to get the current example to compile?

Member Avatar for L7Sqr
0
162
Member Avatar for Fil_1

What do you expect to be returned from `toBinary`? What *is* being returned? Do you get warnings when you compile? What are they? As an aside, when I see: > I have all of the needed includes so do not worry about them. followed by: > I am some what …

Member Avatar for ddanbe
0
246
Member Avatar for anwar sholi 2
Re: gets

Well, knowing how it works and *using* it are entirely different. I agree with **Schol-R-LEA** in that you should never use this function. However, if you want to learn how it works internally to better understand it and *why* you should avoid it - that is a good thing. Look …

Member Avatar for L7Sqr
0
173
Member Avatar for muhd.hadziq

There aren't many `c++` elements that need changing. Look at `cin`, `cout`, the use of `static_cast<>`, and the `#include` directives and you should be good.

Member Avatar for muhd.hadziq
0
270
Member Avatar for sabri1990

The `argv` parameter passed to main contains the arguments passed to the program. So, for example, if you'd like to use the argument to the program as the file name instead of the hard-coded `D:\photo\sab.jpg` you would do something like: image = imread(argv[1], CV_LOAD_IMAGE_COLOR);

Member Avatar for L7Sqr
0
234
Member Avatar for kotachari

This looks like a very simple grammar would do the job. Unfortunately, generating a parser from a grammar will only give you strings, you need to interpret that data individually and that requires knowledge of what this data *means*. For example, what is the difference between a string that has …

Member Avatar for L7Sqr
0
407
Member Avatar for COKEDUDE

The `while` loop you have is the code executed after the `if` condition is evaluated. Are you saying that you want it to be executed when the `if` condition is true (or false)? I'm unclear on what you mean by combining an `if` statement with a `while` loop.

Member Avatar for L7Sqr
0
953
Member Avatar for COKEDUDE

There are times when this does matter. If I recall correctly Windows will translate `\n` to `\r\n` automagically unless you specify binary mode. I can't remember the exact order of events to tickle this situation but if you expect to produce accurate cross-platform content binary mode is one step you …

Member Avatar for L7Sqr
0
1K
Member Avatar for Yudz_1

Those seem like pretty explicit rules. What have you accomplished so far? What do you need help with?

Member Avatar for L7Sqr
1
628
Member Avatar for Malkolm

To add to what **Moschops** mentions, you can either assign `total = numdQuotes` or just output `numdQuotes`.

Member Avatar for L7Sqr
0
291
Member Avatar for danny.holland.1485

I find the best way to describe a protocol is through a state machine. A state machine can be represented in a variety of ways (directed graph, UML, a formal grammar) so what you get *handed* varies. However, the process of adhering to a protocol boils down to following the …

Member Avatar for L7Sqr
0
107
Member Avatar for Lilgenski16

I see a definition for `tellStory` and `askText` but not for `askNumber`. Just define the funciton (like you did for the other two) and the compiler will be happy.

Member Avatar for Lilgenski16
0
438
Member Avatar for shahera.arafat

OT: I'm curious, mike_2000_17, what is it about the LLVM codebase that annoys you? I've have the opposite experience - adopting some of the style I found there.

Member Avatar for mike_2000_17
0
195
Member Avatar for Web Spider

`tshark` is the command line version of `wireshark`. You can also use `tcpdump` depending on the platform. Each of these is easy to wrap around a script interface.

Member Avatar for L7Sqr
0
137
Member Avatar for tgreiner

The End.