1,359 Posted Topics

Member Avatar for meaad.alhaddad

Please post what you have done already so we can advise you about it.

Member Avatar for Schol-R-LEA
-1
100
Member Avatar for BigPaw

This is a difficult thing to really give any advice on, as everyone has a different 'feel' for their favorite tools. I can only tell you my own impressions, and hope yours may be similar. Of the handful of Python editors and IDEs I have tried, the best I personally …

Member Avatar for Lardmeister
0
269
Member Avatar for eggshell5150

Why are you initializing the data this way? With most MIPS assemblers (including those for SPIM and MARS, as far as I know), you should be able to declare the string constants as, well, *constants*, like so: .data vtdPrompt: .asciiz "vals to do? " entIntPrompt: .asciiz "enter an int: " …

Member Avatar for eggshell5150
0
606
Member Avatar for DanteX

Could you tell us more about what you think is the problem with the code as given? By that I mean, is it not compiling, or running without completing, or completing but giving the wrong result? What are you supposed to return other than the computed diameter? Nind you, I …

Member Avatar for Schol-R-LEA
0
173
Member Avatar for ranam

Is this the entire header file? If so, you will need to `#include` the header for the base class (as well as `<windows.h>`, to bring in `CString`) at the beginning of the file. I would also recommend adding [include guards](http://en.wikibooks.org/wiki/More_C%2B%2B_Idioms/Include_Guard_Macro) around the file, to prevent multiple definition errors. A minor …

Member Avatar for ranam
0
115
Member Avatar for dr.syroj

The subject of the suitability of different languages for OS development is discussed at length on the [OS-Dev Wiki: Languages page](http://wiki.osdev.org/Languages).

Member Avatar for Reverend Jim
0
109
Member Avatar for pinaka

This approach won't work on [C++ `string` objects](http://www.cplusplus.com/reference/string/string/), at least not consistently. The `string` class does not use zero-delimiters to check the length of a string, but rather keeps a private size variable that is updated automagically as the string gets manipulated. In any case, the `string` class has a …

Member Avatar for pinaka
0
182
Member Avatar for candicecandy

As others have already mentioned, you need to show that you have already tried to solve the project in some manner. That having been said, can you give us some idea of what you need help with? Have you tried writing the program on your own yet? A few basic …

Member Avatar for Schol-R-LEA
0
223
Member Avatar for rajkumar.it

Not on the C++ forum, that's for certain. Try the [Jobs & Resumes](http://www.daniweb.com/business-exchange/jobs-and-resumes/52) forum here, or go to sites specifically for that purpose such as [vWorker](http://www.vworker.com/) or [Freelancer.com](http://www.freelancer.com/). [Craigslist](http://www.craigslist.com) is an excellent site for freelance gigs as well, if you're in an area that is covered by it.

Member Avatar for rajkumar.it
0
112
Member Avatar for vishalonne

First off, for future reference, is is considered bad form to [cross-post](http://forums.netbeans.org/topic52201.html) questions like this, as it can lead to a duplication of effort. In the future, I recommend posting to different forums one at a time, and only if you haven't gotten a response after at least four days …

Member Avatar for vishalonne
0
651
Member Avatar for krystosan

I would recommend using the [`pickle`](http://docs.python.org/2/library/pickle.html) library with the protocol set to 2. This is a binary format that should be unreadable in a text editor. Mind you, this means that any Python program that uses your class can still un-pickle and read it. For added security, I would suggest …

Member Avatar for krystosan
0
171
Member Avatar for hartk1213

Could you please tell us what you're having trouble with? I can see several things that need to be done, but it would be helpful if we knew what you were looking for specifically.

Member Avatar for hartk1213
0
407
Member Avatar for nyfan68

If all else fails, you can always add another level of abstraction; indeed, that what it looks like you intended, with the `PhoneNumber` class. Rather than declaring separate arrays for `aName` and `aNumber`, you should define the `PhoneNumber` class, and then in `Phonebook` you could declare an array (or better …

Member Avatar for Schol-R-LEA
0
158
Member Avatar for pashah

Can you please post the code you have so far, and describe any problems you're having with it?

Member Avatar for pashah
0
176
Member Avatar for bikashjit

That's going to depend on a lot of factors, really. Different programmers find different languages appealing. As for which language to choose, the obvious choice would be Java itself. However, you could in principle use any language which runs on the Java JVM platform, which includes [Jython](http://www.jython.org/) (a Python port …

Member Avatar for harinath_2007
0
181
Member Avatar for nyfan68

Are you sure that you want to inherit from `runtime_error` (that is, that a `Name` is a specific example of a `runtime_error`), or just `throw` such an error?

Member Avatar for nyfan68
0
159
Member Avatar for hotblink

I think you'll find that, in order to match the grades up with their counts, you'll want to use a dictionary keyed on the grades.

Member Avatar for hughesadam_87
0
391
Member Avatar for Sarah2012

In the future, please let give more information about **how** the program is failing, otherwise we won't have enough to go by. As it happens, the answer is quite simple: the function doesn't return a value. Try adding `return s` at the end of the function and it should work …

Member Avatar for HiHe
0
123
Member Avatar for pigrabbit87

The problem is that you are taking the size of the array as the highest index: int i = n; while (i > 0) { int pos = positionOfMax(a, i); //find the latest one's position rotateLeft(a, i, pos); //move the latest one to the end i--; pos = 0; } …

Member Avatar for pigrabbit87
0
3K
Member Avatar for ssfox
Member Avatar for Memo143

I've seen some ludicrous assignments in my day, but this one is among the most absurd I've ever encountered. I would be tempted to walk out on the class if I were handed a project as pointless as this. Still, an assignment is an assignment... The key to this assignment …

Member Avatar for Schol-R-LEA
0
127
Member Avatar for hotblink

I think that if you actually open up the file `grade.txt`, you'll see that there is no actual line with the text `EOF` on it; rather, in the example given, the `EOF` stands in the for the actual end-of-file marker, which isn't a printable character. In any case, Python provides …

Member Avatar for snippsat
0
428
Member Avatar for sean.walker.3785

I can see a number of issues with the code as it stands, but the most serious one is that you are repeatedly walking off the end of the `attachedNodes` array; for an array of 4 items, the range of indices is 0, 1, 2, and 3, not 0, 1, …

Member Avatar for sean.walker.3785
0
189
Member Avatar for TexasJr

The main problem I see is that you are indexing the arrays incorrectly, which is probably the cause of the segfault. In C++, arrays are zero-indexed, that is to say, an array `arr[5]` would have elements `arr[0]`, `arr[1]`, `arr[2]`, `arr[3]`, and `arr[4]`. When you try to access `arr[5]`, you overrun …

Member Avatar for TexasJr
0
176
Member Avatar for F1Fan12

There are two ways to do this, though one of them only works on 2.5 and later (it was developed for Python 3, then later backported to Python 2). In either approaches, you first need to use `split()` to divide the string into a list of individual words. aprime = …

Member Avatar for woooee
0
5K
Member Avatar for ThePythonNoob

For this case, you would use the alternate method calling syntax, using the class name instead of the object name, and passing the self argument explicitly: class.method(self, args) This isn't specific to inherited methods; it could be used anywhere you have a method call. It's uncommon to use it for …

Member Avatar for TrustyTony
0
2K
Member Avatar for Melly3

Ah, in that case, you want while sum in point: It may be better, too, if you were to declare `point` explicitly as a list or tuple; as it is, it becomes a tuple anyway, because of the assignment unpacking rules, but it would be better to explicit. point = …

Member Avatar for snippsat
0
3K
Member Avatar for alexandra.hoops.3

In the future, when getting this kind of error, please post the traceback and error message as well as he code where it is occurring. I was able to work out the problem this time, but the traceback makes it much easier to figure out the problem once you learn …

Member Avatar for ThePythonNoob
0
588
Member Avatar for ThePythonNoob

I think that you're having some conceptual issues with inheritance, resulting in what is sometimes called 'spaghetti inheritance' (that is, inheriting from an otherwise unrelated class just to get a desired behavior). There's a simple test to see if the inheritance is valid: is a `Board` a specific example of …

Member Avatar for ThePythonNoob
0
283
Member Avatar for apayn

Can you be a bit more specific, please? A few things we'd need to know include: * The version of Python you're using, and the platform it is running on. * Your goal - is this to test the program, or spoof it in some way? Did you want this …

Member Avatar for Lardmeister
0
212
Member Avatar for b1b2b3b4

I assume here that the x and y coordinates refer to a particular point in the shape, such as the centerpoint, or the top left. > If I have x,y in Shape, I do not need x,y to exist in Square right? Correct, they will be inherited by the child …

Member Avatar for b1b2b3b4
0
224
Member Avatar for Blacktono4

To understand classes, you need to know both the conceptual meaning and their concrete implementation. Abstractly, a class is a description of a type, for example, the class Animal would describe the properties which all animals have. The class acts as a template for creating objects of it's type. A …

Member Avatar for Lardmeister
0
347
Member Avatar for Blacktono4

The keyword `def` is used to define functions (and methods, when you start studying classes and objects). It essentially allows you to give a name to a piece of code, so that you can use it over and over. For example, this is a one line function, followed by a …

Member Avatar for Blacktono4
0
116
Member Avatar for bigwill2010

In order to get the desired effect for the method `getWord()`, you will need to make three changes. First, you'll need to track the centerpoint of the circle; a simple list pair would do nicely: self.center = [200, 200] # initialize to the original center of the canvas Then you …

Member Avatar for bigwill2010
0
8K
Member Avatar for krystosan

Well, to begin with, do you have [Eclipse](http://http://www.eclipse.org/) installed and running? Pydev is an add-on for Eclipse; it doesn't do anything by itself.

Member Avatar for krystosan
0
161
Member Avatar for techyworld

The [generator expression](http://www.python.org/dev/peps/pep-0289/) says, return a list of characters for every alphabetical character in `string`. The [`.join()` method](http://docs.python.org/2/library/stdtypes.html#str.join) (applied to an empty string, and taking the generated list as it's argument) then fuses the list elements into a new string, with no separator character between them. The practical upshot of …

Member Avatar for TrustyTony
0
141
Member Avatar for shills300

Just to clarify: the code posted is the **`mapmaker.py`** file, while the data is the contents of **`samos.txt`**, correct? It seems to me that the first part of the problem is to figure out how to parse the data. Fortunately, the format seems fairly simple: each item starts with a …

Member Avatar for shills300
0
555
Member Avatar for nasnoma

You may want to edit the code a bit; the indentation is off. I was able to reproduce the results described, but without knowing what it *means*, or what it was supposed to come out with, I can't tell you why it isn't giving the desired results.

Member Avatar for Schol-R-LEA
0
190
Member Avatar for ThePythonNoob

Actually, the error message is exactly correct - you invoked a class method (`info()`, which as written does not take a `self` argument) with the name of an instance, which in Python is the same as passing it an argument (namely,`help_` itself). Just to make it clearer what is happening, …

Member Avatar for ThePythonNoob
0
181
Member Avatar for Omar89
Re: java

Sounds rather open-ended, don't you think? Has the professor given you any further instructions or suggestions on how to do this? Or is that what you came here to ask for? For future reference, you should never simply post your project requirements here and expect someone to do the work …

Member Avatar for stultuske
0
133
Member Avatar for dean.ong.14

I would try asking the user for the number of questions to ask before the `for:` loop, and use `enumerate()` to get a count of how many questions have been asked. Then, add an `if:` clause that checks whether you have reached the number of questions, and break if you …

Member Avatar for dean.ong.14
0
101
Member Avatar for dezirike
Member Avatar for gwolf1

**@gwolf1:** The link which Deceptikon provided - which I will repeat [here](http://eternallyconfuzzled.com/tuts/datastructures/jsw_tut_hashtable.aspx) - gives detailed explanations and code samples for managing different sorts of hash tables. It should give you enough of an overview to get you started, and would surely do a better job than we could do by …

Member Avatar for deceptikon
0
575
Member Avatar for prathiyus

If you need to sort two different arrays, then you need to test both of the arrays separately. It would make far more sense (in general, and in this specific case) to re-write the sorting algorithm as a function, which could then be passed the array to sort. Here is …

Member Avatar for prathiyus
0
338
Member Avatar for Inshu

Certainly you can nest lists inside another list, and you wouldn't necessarily need another method to do it. If you already have the list to insert, the it is as easy as >>> alist = [1,2,3] >>> blist = [4,5,6] >>> clist = [] >>> clist.append(alist) >>> clist.append(blist) >>> clist …

Member Avatar for Schol-R-LEA
0
207
Member Avatar for triumphost

A few questions: Are `BufferPixels`, `Bpp`, `height`, and `width` instance variables? They aren't declared or passed anywhere in the method as shown. Why couldn't `unsigned char* Pixels = &BufferPixels[0];` be written as `unsigned char* Pixels = BufferPixels;`? What does `Bpp` represent? Pixel depth (bits per pixel)? If so, shouldn't the …

Member Avatar for mike_2000_17
0
225
Member Avatar for silvercats

The only processor architecture I know of which has a register file that large is the UltraSPARC, which has (IIRC) 128 64-bit registers (divided into 8 overlapping register windows of 32 registers each).

Member Avatar for Schol-R-LEA
0
229
Member Avatar for Lyled93

I was wondering why you weren't using the [`Time`](http://docs.python.org/library/datetime.html#module-datetime) class out of the `datetime` module. It correctly handles a lot of what you are doing manually right now.

Member Avatar for woooee
0
589
Member Avatar for anandschiru

First off, are you using a system `Date` (`java.util.Date`) or a database `Date` (`java.sql.Date`)? I am assuming the former, but if you are working with a SQL database, you may be talking about the latter. Either way, you will want to use one of the `Calendar` classes, probably [`GregorianCalendar`](http://docs.oracle.com/javase/7/docs/api/java/util/GregorianCalendar.html). The …

Member Avatar for anandschiru
0
305
Member Avatar for pardeep3dec

No. Turbo C (at least the version most people here seem to talk about) is a 16-bit DOS compiler, and cannot create Windows DLL files. Frankly, you would do well to drop both Turbo C and Visual Basic 6.0 and get modern compilers for both languages (OK, so VB.Net is …

Member Avatar for Schol-R-LEA
0
284

The End.