1,359 Posted Topics
Re: From the description you give, what you are talking about is a [diff](http://en.wikipedia.org/wiki/Diff) tool. There are many such programs around, but I am assuming this is an assignment, rather than simply the need to diff the two files. The three most common algorithms for the problem (in order of increasing … | |
Re: First off, we don't do other people's homework for them. Second, we *don't* do other people's homework for them. And third, ***we don't do other people's homework for them***. Sensing a pattern here yet? No one here will simply hand you a solution on a silver platter. If you show … | |
Re: Given that the querent dropped off of Daniweb over a year ago, I doubt you will get an answer. | |
Re: When you say you want to clear the character, do you mean you want to insert a space character (`' '`), ASCII 0x20), or a null character (ASCII 0x00)? These are two different things with different consequences. If you insert a space, operand[0] = '\0x20'; the string will be `" … | |
Re: Here you have the opposite problem from what you had before: because these are methods rather that properties, you need the parenthese after them in order to call the methods. | |
Re: The [`<iostream>` library header](http://www.cplusplus.com/reference/iostream/) is a header that defines several of the standard stream I/O classes and objects, including `cin` and `cout`. It is mainly used to include those two objects, and the classes they belond to (`istream` and `ostream`, respectively) in a source file. [This post](http://forums.devshed.com/programming/514904-simple-calculator-post2001351.html#post2001351) explains in detail … | |
Re: First off, we don't do other people's homework for them. Second, we *don't* do other people's homework for them. And third, ***we don't do other people's homework for them***. Sensing a pattern here yet? No one here will simply hand you a solution on a silver platter. If you show … | |
Re: The interpreter cannot find those properties because you didn't define them; I assume this was simply an oversight. Happens all the time, no big worry there. Just add the following methods to the class: @property def numerator(self): return self.num @property def denominator(self): return self.den BTW, your string formatting should read: … | |
Re: **iamthwee**: jQuery *is* JavaScript, or rather, a library for JavaScript. You cannot hope to understand jQuery if you don't know the underlying JavaScript that it is based on. As for Sublime, I am not familiar with it, but given that one of the demonstrations on the home page uses Python … | |
Re: The issue is that `bgcolor()` is a free function inside the `turtle` module, not a class method of `Turtle`. Try the following changes and you should be able to run it (is worked when I tried it): from turtle import Shape, Turtle, mainloop, Vec2D as Vec, bgcolor from time import … | |
Re: OK, so write the program, and when you have a question, come back here and ask for some help. | |
Re: Which are you more familiar with, and do you have a C++ library for the database engine? Java has standard library support for database work in general (the standard C++ library doesn't have any), but still often needs driver for the specific DBMS. In most cases, the differences in support … | |
Re: It's not entirely clear what you want, and I doubt anyone would have an example quite like that on hand in any case. It sounds as if you want to know who to provide a menu, is that more or less correct? If so, a general model for what you … | |
Re: **Edward_3**: I think you missed the point. The OP needs a C program, and cannot use the C++ version, for whatever reason s/he has. **shadowplayer28**: Just what are you trying to accomplish by re-writing the program in C? Why do you need it to be in C, and not in … | |
Re: > we are supposed to read a list from a file, (named float.txt, or can be IN visual studio which i forgot how to to do, and searched the internet for an hour and nothing good comes up) If memory serves, what you have to do for that is right … | |
Re: Did you read AD's reponse earlier? Even if you had explained the project to us in a comprehensible manner - which you didn't - we don't do homework for people here. Do your work, and when you have a problem, as a question and give us enough information to answer … | |
Re: Hmmn, tricky. While it is possible to do that, it is more dofficult that you probably expect, and almost certainly not what you actually want anyway. I expect that the real goal here is to save the user's information - say, their name and a high score - so that … ![]() | |
Re: I assume that the real issue here is that you cannot ensure that Arial (or any other given font you may choose) will be installed on the host system, correct? Unlike, say, Windows, or MacOS, there are no 'standard' fonts for Linux, which is what the real issue is IIUC. … ![]() | |
Re: **mridul.ahuja**: What language is this again? Because that certainly isn't C++ declaration syntax. I think you're thinking of VB.Net, except that `cin` and the input operator aren't in VB.... | |
Re: What lunatic taught you to use `goto` like that? Or at all, for that matter? If your professor is teaching to write code like that - hell, if you professor even **mentioned** `goto` in the first place - you should walk away from that course. Here's a piece of advice: … | |
Re: You are in fact opening the file correctly, but that won't do you much good unless you have a codec to decode the data with, I am afraid. We'd have to know what kind of system you are using (e.g., Windows, Linux, MacOS, FreeBSD, etc.) and what kind of libraries … | |
Re: Let's dig a bit deeper with our questions, perhaps. What is your project meant for? Do you need to use C++, or would another language be suitable? Do you already know C++ programming in general? What other languages do you know, and have you done GUI programming with any of … | |
Re: As 2teez says, the policy at Daniweb is that you must give demonstrate that you have made a good faith effort to solve your problem yourself, and that respondents are expected to only provide support and assistance, not provide full solutions. Show us what you have tried so far, or … | |
![]() | Re: First off, you may very well already have that version of Python installed. Python is widely used in many Linux distributions, and since Python 3.4 is the current stable version, it is safe to say that if you've kept up with your package updates, you may already have that version. … ![]() |
Re: First off, we don't do other people's homework for them. Second, we *don't* do other people's homework for them. And third, ***we don't do other people's homework for them***. Sensing a pattern here yet? No one here will simply hand you a solution on a silver platter. If you show … | |
Re: As it happens, there are many answers to the question 'how do I learn how to program?', and which one is most effective to you will depend on how you think and what you want to do. What is constant in all of them is that you will need to … | |
Re: The general answer is, you can't, at least not meaningfully. The longer answer is, it is very dependent on the hardware and software in question, both the firmware of the drive and the drivers of the operating system. Even if you were dealing with an isolated case - a single … | |
Re: As Rubberman says, you need to do the actual work; we can only advise you and help you fix problems. That having been said, I will give you this advice: A Queue is a specialized for of collection in which the order that items are added is the same as … | |
Re: Considering that the last person involved in this thread hasn't been around for half a year, I think you may be a bit late to the party. In other words, don't resurrect lond-dead threads. We have enough zombies on Daniweb already :) | |
Re: This program is clearly intended to test the function, but it would be helpful to know the overall goal, that is, what the program this test is intended to prepare for is supposed to do. Is this a parsing project for a compiler course, by any chance? It has the … | |
Re: **NO.** This code relies on the old Turbo C++ compiler, and isn't even remotely viable with any modern C++ compiler. The real answer is, it depends on the operating system you are writing for and the graphics libraries you are using. C++ doesn't not have *any* standard graphics support, or … | |
Re: The first thing I'll recommend is indenting the code by four spaces, except for the labels; this should make it easier to read. However, I can't tell if you did that or not already, because you didn't paste the code in using the CODE button, and the forum software does … | |
Re: A web framework is a set of interconnected libraries and interfaces that allow you to work with web pages in a more structured manner than the default Python library does (actually, in most languages, there isn't any standard library for HTML and HTTP at all; Python has only a very … | |
Re: The `ld` program is the linker used by GCC (the default compiler used by the Dev-C++ IDE) when building executables. The permissions issue is most likely a factor of where your program is being compiled. Can you give the PATH of the source file, as well as to executable file … | |
Re: *Haven't we been here before? Oh, yeah, we have. In that case, let me repeat what I said last time:* First off, don't hijack other people's threads with unrelated questions; if you have a new question not related to the thread, create a new thread. Second, didn't you read what … | |
Re: I am afraid you're posting in the wrong forum; you want the [JavaScript](http://www.daniweb.com/web-development/javascript-dhtml-ajax/117) forum, under Web Development. Despite the names, Java and JavaScript are completely unrelated. | |
Re: I don't think you understand how things work at DaniWeb. This isn't a free homework solution site. We don't do your prject for you; you have to do the work yourself. We may advise you on how to finish a project, and in some cases help you fix a piece … | |
Re: The first question I will ask is, how are you representing the matrices? The most common matrix representions in Python would be as a list of lists, or (for constant matrices) a tuple of tuples. However, if you intend more elaborate operations, it may make sense to wrap that in … | |
Re: Just what are you comparing for? The equality operator only tells you if they are equal; it won't give you which is the larger of the two. If you mean to determine which of two numbers is larger, you would use the inequality operators such as `<` (less than) or … | |
Re: Yes, it should allow you to paste code; what browser are you using? If you look at the editing window, you should see a button marked 'Code'. If you click on that, it will come up with a pop-up window for editing the code in. If you have pop-ups blocked, … | |
Re: One thing I noticed is that I made a mistake in the stack saves, when I first showed you about them, and all the function which use them have duplicated the error. instead of sw $ra, 0($fp) you should use sw $ra, 4($fp) You would make the same change to … | |
Re: First off, you should understand that a Python function is not a function in the mathematical sense of a relationship between a set of values *n<sub>x</sub>* in a domain and a value *m* in a co-domain. Rather, it is a series of expressions that perform a computation, and may or … | |
Re: I posted [one last message](http://www.daniweb.com/software-development/cpp/threads/474555/corrections-turbo-c-conversion/2#post2072872) in the previous thread, if you haven't read it yet please do so before doing anything else. As for the language issue, I suspected that this was going to be the case. It was one of the reasons I kept asking about that earlier. | |
Re: You are using `beqz` for the tests, but you want to use `bnez` (which is actually a macro for `bne x, $zero, label`, but both SPIM and MARS should support it). You want to loop when the value is not equal to zero; right now, you are looping *only* if … | |
Re: I *think* what the OP is asking for is how to log printed documents and the IP addresses of the originating computers... but I am not sure. What that has to do with Java isn't very clear, even if I am right. | |
Re: OK, and where is the question? More importantly, where is the code you've already tried writing? To quote Daniweb rules: > Do provide evidence of having done some work yourself if posting questions from school or work assignments So, what have you done on this so far yourself? Or perhaps … | |
Re: The short answer is, `rand()` and `srand()` (which you should call at the beginning of the program before calling `rand()` for the time) are in `<stdlib.h>`, so you need to `#include` that header in order to get the function prototypes for them. That having been said, I will add that … | |
Re: Please make sure your code is properly indented before pasting it into the postings. If it was indented before, then you may be having problems pasting it. For the meanwhile, I'll run the code through [AStyle](http://astyle.sourceforge.net/) to get it formetted usefully: package waffles; import java.util.Scanner; import java.util.Stack; /** * */ … | |
Re: We are willing to help you, but you'll need to show what you've done already, and give us more specific about what help you need. * What have you done so far? Do you have a plan for how to do it? Have you thought out what the main data … | |
Re: For the first line of `strlen()`, change the code to addi $t0, $zero, 1 #initialize count to start with 1 for first character The problem you are experiencing is likely to be because the `$t0` register is not guaranteed to be zeroed out when the program starts. You are also … |
The End.