2,898 Posted Topics
Re: The basic idea of a literature review is to ask the questions: Did anyone try to do this (or something similar) before? If so, what was their approach? You just do a lot of research to answer those questions. You collect all the articles and resources that you've encountered and … | |
Re: The binary mode is a legacy feature for a time when some computers had different memory encoding for binary versus text data. This distinction hasn't been relevant on any platform for a long time (probably 20-30 years), as far as I know. I guess you can still apply the "b" … | |
Re: The use of `sys_nerr` and `sys_errlist` is deprecated, in favor of the `strerror` function. The code you posted (which is not complete) appears to attempt to provide a version of `strerror` function that relies on `sys_nerr` and `sys_errlist` for systems that do not provide the more modern `strerror` function. This … | |
Re: > there are free options such as Ghostscript Might be worth mentioning that it is free as long as you don't use it for a commercial application (only for GPL / AGPL projects). If you intend to use it in a commercial application, you must contact their licensing broker (Artifex … | |
Re: Batch, like most shell scripting languages, are usually considered as one tool in a large tool shed. A lot of programmers and system administrators use shell scripts a lot for automating some tasks (e.g., search through a folder for images not in jpg format and convert them all to that … | |
Re: If you have the source code, then you can open those files in any text editor. Source code files are just plain text files. There are, of course, different editors and IDEs (Integrated Development Environment) that are taylored to specific languages, but all they do is open the source files … | |
Re: You should use the initialization list, which is something like this in general: Foo::Foo() : member1(/* something */), member2() { }; And so, for a dozen eggs, you should use one of the [constructors of vector class](http://www.cplusplus.com/reference/vector/vector/vector/), such as this: Tray::Tray() : dozen(12, Eggs()) { }; where "Eggs()" can be … | |
Re: I guess you have to let time tell. By that I mean that you will naturally come to that realization. But in more practical terms, here's a good checklist: - People start recognizing your expertise: you are allowed to agree with them, it would be false modesty to do otherwise. … | |
It seems that all of a sudden, some threads have 50 or more tags (e.g., the [C++ forum](http://www.daniweb.com/software-development/cpp/8)). They seem to have just appeared, and take up a significant space in the listing (6 or 7 rows of tags below each post). Shouldn't there be some limit or something? | |
Re: Hitting CTRL-S after every sentence I type, even in places like this forum editor where it's obviously not needed (in fact, I had to request to Dani to add code in the editor to block the CTRL-S action from triggering the "save webpage" behavior of the browser). I also refresh … ![]() | |
Re: You have mismatching `const` on your functions. In the derived class, you have: bool isEmptyStack() const; bool isFullStack() const; And in the base class you have: virtual bool isEmptyStack() = 0; virtual bool isFullStack() = 0; The base class functions should be: virtual bool isEmptyStack() const = 0; virtual bool … | |
Re: It is probably caused by line-breaks being different. If you grabbed code that was developed on a unix-like operating system (Mac, Linux, BSD... and pretty much every OS except Windows), then the lines are broken with a "line-feed" character (i.e., `'\n'`), but in Windows, lines are broken with a "carriage … | |
Re: I used to live in Helsinki (Otaniemi), but I'm not sure I can be of great help. I guess one issue is that this is a weird time for anything in Finland. You didn't say exactly for when you'll be visiting, but anytime between now and the end of december … | |
Re: I somewhat fall under that category. I like to be explicit about the end of the function with a `return;`. Part of this reason is that sometimes when writing several functions at the same time, or when you're writing one function and than split up some code into another, and … | |
Re: Yeah, definitely a must-read! It makes you laugh and cry. There are things in there that just sound so outrageous and deliberately vicious against the maintainers. And it makes you laugh until you realize that you've seen exact examples of that in real-life production code.... and it really turns bitter … | |
Re: Well, it's not the Fibonacci sequence at all. I mean, the recursion `return Cabin(n/2) + 1;` is not at all the [Fibonacci recursion](http://en.wikipedia.org/wiki/Fibonacci_number). It should be something like `return Cabin(n-1) + Cabin(n-2);`, but watch out for the termination condition (not to mention that this is not a very efficient recursion). | |
Re: > There are plenty of freely available priority queue implementations. Including one in the standard library: [std::priority_queue](http://www.cplusplus.com/reference/queue/priority_queue/). You can always use the STL algorithm [heap functions](http://www.cplusplus.com/reference/algorithm/make_heap/) too. > Can anyone pl help? If you *need a priority-queue*, use the standard one. If you *were asked to implement one*, then we … | |
Re: How many of those emails have you actually received matrixdevuk? I'm asking because I'm guessing you haven't had that many, maybe only one. The receivers of these emails are selected based on many factors, including posting history to the relevant forum category, and the reputation metrics (rep, up-votes, post quality, … | |
Re: > Is documentation systems something like Java libraries? No. A documentation system, which is usually called a documentation generator, is a tool (program / application) that can be used to generate documentation about your code directly from your code (provided that you have some annotations in it). Notable examples are … | |
Re: The de facto standard compilers for Linux are GCC (GNU Compiler Collection), which you can install if it is not pre-installed on your distro. Under Ubuntu, you can simply install "build-essential" package, which pulls in all that you need (compilers, make, auto-conf.. etc..). Other distros will have an equivalent packages. … | |
Re: Well, according to the scores on [cpu benchmarks](https://www.cpubenchmark.net/high_end_cpus.html), we have this: CPU - Score - Price Intel Xeon E5-2697 v2 @ 2.70GHz - 17,516 - $2,579.99 Intel Core i7-4960X @ 3.60GHz - 14,022 - $1,048.99 So, that should answer the question on which on is the best, at least as … | |
Re: Those queries would go in the [Mobile Development](https://www.daniweb.com/software-development/mobile-development/181) forum. | |
Re: The background image is nearly identical to the default one in [Kubuntu 13.04](http://portallinux.es/novedades-de-la-familia-ubuntu-13-04/kubuntu-13-04/). And the icon artistry reminds of some of the older versions of Kubuntu / KDE, which makes me think it's in that family. However, the rather purified look of the desktop widgets (menu bar, icons, etc.) reminds … | |
Re: I believe that you should be able to create a symbolic link within your home Music directory that points to your Audiobooks directory. Then, you can run the rsync command on the Music directory and get both directories sync'ed at the same time. When running the reverse rsync command (from … | |
Re: A long time favorite of mine is "nincompoop". I just think it is such an odd word, by sound and purpose. I don't know if anyone ever uses it. I like odd words, like "vichyssoise" which I use from time to time in formal writing too (in the figurative sense, … | |
Re: It is undefined behavior because the compiler is not required to perform the increments in any specific order. | |
Re: > How should you deal with copying and destroying FilmList objects? The answer that this question is begging for is "[deep copy](http://www.learncpp.com/cpp-tutorial/912-shallow-vs-deep-copying/)". You can read more about it in [my tutorial](https://www.daniweb.com/software-development/cpp/tutorials/373787/beginning-c0x-making-a-raii-class). > even I test it with a simpler replica of this design shown that the pointer in the original … | |
Re: Look at this [list of C++ operators](http://en.wikipedia.org/wiki/Operators_in_C_and_C%2B%2B), it shows all the operators (binary and unary) in C++ along with the prototypes for the member and non-member version of the operator overload functions. That might be a quicker reference for you than asking us for each operator. | |
Re: If you want to be sure to catch the point at which the upper and lower bounds are equal, then you have to check that condition every time you modify one or the other, and you have to make sure you don't modify both at the same time. This is … | |
Re: First, I guess you are assuming that the student list in the input file is already is some sort of order (by number or by name). Otherwise, you have to sort the array first, because binary search requires an ordered array. Second, we won't just give you code for your … | |
Re: You need to also add boost-system (libboost_system.a or libboost_system.dylib). And make sure to add it after boost-thread in the list of libraries to link with. This is just because boost-thread depends on boost-system, so both need to be linked, in that order. | |
Re: It depends on what level you want to code at. For graphic user interface (GUI), I recommend [Qt](http://qt-project.org/). There are plenty of [tutorials](http://qt-project.org/doc/qt-4.8/tutorials.html) out there (and it's cross-platform too). For 3D graphics, I would recommend [Coin3D](https://bitbucket.org/Coin3D/coin/wiki/Home) (an open-source implementation of [OpenInventor](http://www.vsg3d.com/open-inventor/sdk), which is a high-level OOP API on top of … | |
Re: > If I have to use Instance of B in A.h rather than pointer then? I know we cant define any instance for the forward declaration, but what is the solution in that case? Thanks. You cannot do that, it's a physical impossibility. One way or another, you cannot have … | |
Re: There could be issues with using Qt with MinGW on a 64bit platform. Have you followed this [instructional wiki](http://qt-project.org/wiki/MinGW-64-bit)? The basic MinGW distribution doesn't truly work in 64bit, you need the w64 distribution of it. | |
Re: I'm like prit, I have a on and off beard from just being lazy at shaving it. That's fairly common with my colleagues too. But when I shave I leave the sideburns, if that counts as a beard. | |
Re: I totally understand your frustration. I've had my share of problems with Windows Update. I think that the update system works under the assumption that you had Windows pre-installed with your computer and that you always use Windows and therefore, never miss their monthly updates. But for people like me, … | |
Re: I also had problems recently with this. It was on my old computer on which I had ElementaryOS installed. I tried a lot of things to fix it, but couldn't manage to get it to work. I figured that the problem might just be that ElementaryOS is linked to some … | |
Re: I don't really understand the question. What does it mean "program a GUI"? Normally, you start with an objective like "provide an application for doing X, Y, and Z." and then create a GUI that helps the end-user work with the application. The "X, Y, and Z" is what really … | |
Re: I agree with Hiroshe about UML diagrams. I have rarely found them to be useful. I think that they are simply too detailed. If you have to make a diagram that has all your classes, with all of their data members and methods (functions), you are basically doubling your workload … | |
Re: > Why will I need to update each and every source file? If you only change the definitions (implementations) of the functions, but leave all the declarations (or the function names and signatures) intact, then you won't have to change anything in the rest of the source code. However, and … | |
Re: Those two functions essentially do the same thing (read a line from cin). The difference between the two is that the member function (`cin.getline(..)`) takes an argument (the string to be filled in with the content of the line) as a `char*`, which is the C-style representation for strings (a … | |
Re: You certainly deserve a lot of praise for this piece of code! We rarely see beginners producing code at that level of "good practices" of programming. > Is my code well-written and readable? Yes, it's well-written and readable. You get an A+ here. I really can't find anything to critique … | |
Re: > > Elementary os = Linux version of Mac :) > > What? ElementaryOS is a distribution of Linux, based on Ubuntu and GNOME, which pretty much copied all the GUI elements of Mac OS X. [See for yourself](http://www.linuxuser.co.uk/reviews/elementary-os-review-jupiter-is-massive-but-its-largely-hot-air). > He went with text starting as "Wow, Linux looks like … | |
Re: You can use [EasyBCD](http://neosmart.net/EasyBCD/) to edit the Windows bootloader menu (including adding Linux boots to it too!). It's advertized (but free) as a way to setup dual-boots, and it's great for that, but you can also just use it to edit the Windows bootloader menu entries. That's what I've always … | |
Re: It baffles me that all this discussion can go on about the pros and cons of operator overloading and trying to explain why Java's designers decided to exclude operator overloading altogether out of some sort of principle or good coding practices concern against them as a whole. The reality is … | |
Re: Normally, if bad-alloc is thrown, it indicates that you are trying to allocate more memory than you possibly could, given the amount of memory available on your system (RAM + virtual memory). Make sure you are not trying to allocate such a crazy amount of memory. And if this is … | |
Re: > do you think its important to put virtual keyword in class B and C? It's not necessary, but it is good practice to do so, just to be explicit about it. Sometimes the code for the base class and the code for the derived class are far appart (different … | |
Re: There is no "memory difference" between those two things. The only difference is semantically, as in, the first creates a variable with an initial value, the other creates a variable and then assigns it a value. The first is preferred, but this is purely a matter of semantics (i.e., how … | |
Re: Your code is full of non-standard C++ code. And then, there is a typo with `"\t"<program` which should be `"\t" << program`. Correcting those basic problems, we get this: // NOTE: standard C++ headers don't have the .h ending: #include <iostream> #include <fstream> // NOTE: standard C++ components are in … | |
Re: I got a Nexus 5 a few months ago. I love it, it works great and it's fast and crisp and all that.. no complaints. Also, the wireless charger is really nice to have. I guess the SG S5 has higher specs but like Agilemind said, that's pretty much plateau'd … |
The End.