825 Posted Topics

Member Avatar for murnesty
Member Avatar for David W
0
232
Member Avatar for nawraz

When you want to use two operating system son the same computer you generally have two choices: dual-boot or virtualization. In the dual boot case you install both operating systems to the same hard drive and have a boot loader that is aware of both systems and gives you an …

Member Avatar for wpeckham
-1
342
Member Avatar for Ezekiel_1

`string.find` looks for the entire substring provided (as a whole) within the string it is called on. It returns the position of the start of that substring within the original string. It seems that you are trying to find individual letters that are common between two strings (if I understand …

Member Avatar for David W
0
527
Member Avatar for larry burns

Github (and related services) are a great way to maintain a portfolio. I don't think that you should necessarily wait until you have a 'finished' product before you place it on github. If you are interested in showing-off for potential employers they will be just as (if not more) interested …

Member Avatar for Moschops
0
150
Member Avatar for Valkrem

I'm not sure shell tools are the most straightforward to use for this purpose. Are you open to other processing tools? Scripting languages? With something like Ruby or Python this would take 20-30 lines of code. Other things that are more suited to dealing directly with records such as R …

Member Avatar for L7Sqr
0
101
Member Avatar for debasis29

You may want to look into the concept of [sandboxing](http://en.wikipedia.org/wiki/Sandbox_(computer_security)) instead of seperate file systems.

Member Avatar for debasis29
0
198
Member Avatar for H_beginner

The usual place to look for options to a program are the man pages of that program. Typeing `man gcc` at the command prompt will give you a good start.

Member Avatar for L7Sqr
0
252
Member Avatar for ziadkassam

If this is your advanced degree and you don't yet have a topic my best suggestion is to get thinking. Have you consulted with your academic advisor on the subject? This is not necessarily the best question to be asking an online forum if you desire an advanced degree.

Member Avatar for somyms
0
193
Member Avatar for shaneetra.graham

You could do like `bash` and keep it in a 'hidden' file in the user's home directory (`bash` uses `~/.bash_history`). If you want to quickly access past commands, however, you probably want to keep the most recent N commands in memory and only flush them to disk periodically.

Member Avatar for N1GHTS
0
130
Member Avatar for brandon66

I'm not sure what you mean, exactly. If you want to vary the types of seperators that you use just allow for arguments to the function. Something like: void printBoard (board_t *b, char col_sep, char row_sep) { for (...) { for (...) { printf ("%c%d", col_sep, b[x][y]); } printf ("\n"); …

Member Avatar for L7Sqr
0
239
Member Avatar for sireiz

Android already has all the built-in functionality you would need. Maps. GPS. Developer platform. At that point, it is a matter of following on of the may tutorials on using the maps API to whatever end you want. Although, I must ask why you are choosing to work on a …

Member Avatar for rubberman
0
192
Member Avatar for mexabet

Without the implementation of `GetFloat` the best I can offer is to change `GetFloat` to accept negative input. Perhaps if you provide the definition of that function we could help you a bit more.

Member Avatar for mexabet
0
308
Member Avatar for NardCake

Conceptually, accuracy is mapping the amount complete of a whole to some textual representation given your screen dimensions. For things that dont have an *end* pre se (such as a download of undetermined size) you may want to just have an animation that goes back and forth on the screen …

Member Avatar for L7Sqr
1
196
Member Avatar for mudassar.hashmi6641

The term *users* implies a host-based solution. If that is what your intended goal is then you should be aware that non-privileged processes will be somewhat unreliable in such endeavors and you should rely on a kernel-level approach if you need precision. If, instead, you want *host* or *connection* throttling …

Member Avatar for L7Sqr
0
96
Member Avatar for clife

I want to point out why this can be a problem for future readers of this thread. C++ does name mangling based on the function signature. Consider the following code: int fun () { return 0; } int main () { return fun (); } An assembly listing of that …

Member Avatar for L7Sqr
0
226
Member Avatar for COKEDUDE

A better approach would be to read a line at a time and parse each line looking for the format you describe.

Member Avatar for deceptikon
0
160
Member Avatar for slater619

This sounds very much like homework. The benefit you will get from answering yourself after having thought through the problem will far outweigh any outright answer we provide. To start, work out how long it takes to send a single bit. Then, how many bits can fit on the line …

Member Avatar for L7Sqr
0
271
Member Avatar for johnson gbenga

paste -d' ' <(seq 0 4) <(tr ' ' '\n' <<< "a b c d e") `paste` joins lines of a file according to some delimeter. The funky `<(...)` syntax is bash *Process Substitution* which allows you to use a named pipe as if it were a file. The `<<<` …

Member Avatar for cfajohnson
0
180
Member Avatar for mallo

Well, first suggestion I have is to do some minimal set of research related to your topic. Depending on what you are trying to accomplish, an IDS is no small task. There are existing projects that you can build from including [Bro](http://www.bro.org/) and [Snort](http://www.snort.org/). There are other projects that take …

Member Avatar for mallo
0
211
Member Avatar for Phani_1
Member Avatar for MikeBah

In general, a binary tree container is recursive. That is, the internal members are also of type binary tree. Example: typedef struct bst_ { char payload; struct bst_ *left, *right; } bst_type; It seems that you are trying to access the *root* of the tree explicitly (via `struct node *p …

Member Avatar for anas.man
0
192
Member Avatar for pelle12

I'll comment as a `vi` (`vim`, actually) user. As mike_2000_17 mentions, when you are talking simply about 'notepad in the terminal' there is more overhead to `vi` - edit mode vs. command mode is a good example. However, if you prefer to do most editing in the terminal `vi` has …

Member Avatar for mike_2000_17
0
381
Member Avatar for NewHeart42108

Why not wrap the commadn you want to run in a shell script and have *that* redirect to file? job.sh: #!/bin/bash SITE="http://my/path/to/updateWebsite.php" LOG="http://my/path/to/updateWebsite.log" /usr/bin/curl -s ${SITE} > ${LOG} 2>&1 and then your cron command would be: `/path/to/job.sh`

Member Avatar for L7Sqr
0
199
Member Avatar for Lee_2

`Shoot` is a method defined on the object `Bullet`. In your definition, you can not shoot without a bullet, so to speak. You have a couple of choices: Create a `Bullet` object and call shoot through *that* Bullet b; b.Shoot(); Make the `Shoot` method static on `Bullet` and call it …

Member Avatar for L7Sqr
0
304
Member Avatar for roshan.parate.73

One hint that I will provide is that a large amount of your work will be reduced if you use something like `strtol`

Member Avatar for L7Sqr
0
778
Member Avatar for mythos061

To do this programatically you would create an [expression tree](http://en.wikipedia.org/wiki/Binary_expression_tree) and traverse that placing parenthesis around each operation.

Member Avatar for mythos061
0
278
Member Avatar for MacErich

Your original example does not include a `c_out` variable. It might as well be a guessing game for all of us until you post a representitive example we can compile and run ourselves. Reduce your problem to the minimum code necessary to repreduce the effect and post that here. In …

Member Avatar for MacErich
0
198
Member Avatar for AhmadHasanSahi

If all you want is the animations you can get that [online](http://www.sorting-algorithms.com/). If you want to actually plug in a hand-made visualization to a particular code block it will be much harder and dependent on your ability in a chosen language. Where are your strengths?

Member Avatar for AhmadHasanSahi
0
347
Member Avatar for newbie14

@newbie14 Is this related to our dialog [from a few months ago](http://www.daniweb.com/software-development/c/threads/454927/c-dissecting-protocol-level-3-and-application-and-url-name-in-packet-hex-va#post1976021)? Are you continuing from where you left off or starting an entirely new direction?

Member Avatar for newbie14
0
143
Member Avatar for clife
Member Avatar for atzounis

In addition to what **Ancient Dragon** points out, if you are to the point where the number of arguments is cumbersome you may want to look into a refactor - possibly using structs to pass around common data.

Member Avatar for NathanOliver
0
269
Member Avatar for cambalinho

From your output: `error: 'a' has not been declared` You should provide `a` as an argument to the macro. Like `events2(b,a);` Also, it is often helpful to try and read the error messages and follow them in your code (I think Visual Studio actually allows you to double-click an error …

Member Avatar for Ancient Dragon
0
224
Member Avatar for newbie14

The *format string* to `sprintf` details how many arguments are acceptable in the `varargs` portion of the call (the remaining values to print). Generally speaking - unless you are printing an `%` or doing something fancy - you can expect one argument for each `%` found in your format string. …

Member Avatar for newbie14
0
295
Member Avatar for Ikanda Simeon

`switch` to `if-else` is fairly straightforward. However, `if-else` to `switch` can be problematic depending on the format of your conditions. `switch` will only accept integer values to the case statements.

Member Avatar for L7Sqr
0
205
Member Avatar for word2the wise

Following **Ancient Dragon**, if you are on a *nix you can get this from `/usr/share/dict/words` deatils [here](http://en.wikipedia.org/wiki/Words_(Unix)) along with a link to a sample file.

Member Avatar for L7Sqr
0
132
Member Avatar for alaa sam

What exactly do you mean by *coverage map*? Do you want a list of available access points? Do you want to measure the coverage (geometric area) of a particular access point?

Member Avatar for tsttst
0
1K
Member Avatar for you207

Why not use `std::sort` for the range input? For example: #include <iostream> #include <algorithm> int main () { int xs[] = {1, 3, 5, 7, 9, 2, 4, 6, 8, 0}; for (int i = 0; i < 10; ++i) std::cout << xs[i] << " "; std::cout << std::endl; std::sort …

Member Avatar for vmanes
0
418
Member Avatar for uswer

You've simply pasted what looks like an assignment without even asking for *anything*. What do you think this is? Make an attempt. Report back with specific questions when you are stuck.

Member Avatar for Jamblaster
0
163
Member Avatar for kbear23

I'd suggest using a `std::vector` instead of a raw pointer to array since the size of the array is not known within the `int2string` function which is a bad thing. I'd also suggest more `C++` facilities instead of `itoa`. Also, if you are not using any parts of the class …

Member Avatar for kiran.ghodke.395
0
4K
Member Avatar for skyyadav

You commented out the `using namespace std` line. You need to either uncomment that or specify that you want the `cin` from the `std` namespace. Something like `std::cin >> n`

Member Avatar for skyyadav
0
182
Member Avatar for nguyenlong.0805

A shell script is essentially a collection of shell commands. Your statement > (not shell command) confuses me. Can you clarify?

Member Avatar for L7Sqr
0
64
Member Avatar for castajiz_2

`int smallResult = sum( arr, n - 1 );` Is not storing the function into the integer, it is storing the results of *evaluating* the function into the integer. At runtime, your program will evaluate the code of `sum` and place the ultimate answer into `smallResult`. This is why it …

Member Avatar for L7Sqr
0
152
Member Avatar for mixelplik

Try something like: for (int i = 0; i < size; ++i) { outputFile << " Pos# " <<i <<" : " << id[i] << " " << setprecision(4) << showpoint << ave[i]; if (i > 0 && 0 == i % 3) { outputFile << std::endl; } else if …

Member Avatar for L7Sqr
0
424
Member Avatar for raviragarwal292
Member Avatar for sonunmonu

In general, one does not password protect a file. The way files are protected in Linux is with file permissions. If you set the file to be readable by only the owner and place it in a directory that is private to your account (also with read access turned off) …

Member Avatar for GrazerC0de
0
204
Member Avatar for pardeepkhatri

I'll also add that with technologies like Virtualbox running in seamless mode you can get most of the best of both worlds. You still wont be able to transfer EXEs from one platform to another but you can run both platforms at the same time and run software specific to …

Member Avatar for praom2104
0
393
Member Avatar for Daneil
Member Avatar for Logan_2

You are missing a semicolon after the `while` construct. `while [ "$YANSWER" == "$YORN" ]; do`

Member Avatar for L7Sqr
0
2K
Member Avatar for sireiz

In general, getting all the traffic passing through a router is a difficult task. The only centralized point for collection is the router itself (without injecting multiple additional points into your network as **JorgeM** suggests). Several things complicate this: The aggregate capacity of the router is usually much higher than …

Member Avatar for minimee120
0
151
Member Avatar for M44y4

You are experiencing a failure of one right now. Had you opened with something like: "I'm interested in learning about the types of communication protocols that exist and their strengths and weaknesses. So far, I've looked into X, Y, and Z and I see this. Unfortunately, I feel like there …

Member Avatar for M44y4
0
316

The End.