1,359 Posted Topics

Member Avatar for MasterHacker110

First off, you aren't going to be writing hard [real-time](https://en.wikipedia.org/wiki/Real-time_computing) applications on Windows, or on any other operating system that uses virtual memory without specific support for unswappable pages. That's the first thing to understand: if there is a possibility of a delay in response time due to paging or …

Member Avatar for MasterHacker110
0
228
Member Avatar for chubbyy.putto

Well, to answer the question, the usual solution to having a multidimensional `ArrayList` is to declare an `ArrayList` of `ArrayList` of the type being stored: ArrayList<ArrayList<String> > data = new ArrayList<ArrayList<String> >(); data.add(new ArrayList<String>()); data.add(new ArrayList<String>()); data.get(0).add("Alex"); data.get(0).add("31"); data.get(1).add("Burren"); data.get(1).add("Java"); However, no experienced Java developer would ever do this. The …

Member Avatar for Schol-R-LEA
0
352
Member Avatar for Tcll

> (most IDE's refer to "intellisense" as "Code Completion", especially for linux) That's because the term 'Intellisense' is a trademark of Microsoft. Other developers can't use that name. In any case, 'auto-completion' was the term used long before Microsoft introduced their version of it. As for IDEs, I think both …

Member Avatar for Tcll
0
630
Member Avatar for aluhnev

You would need to call `isPrime()` with two numbers, one the number you are checking and the other a number smaller than that but larger than it's square root. I would reccomend changing the name of `isPrime()` to `primeTest()` and having a second function called `isPrime()`, which takes only one …

Member Avatar for aluhnev
0
5K
Member Avatar for cemonica

A few questions and suggestions: * Why did you include a null constructor? You generally only want a default c'tor if there is a reasonable default to provide, which in this case there really isn't. A null c'tor is generally a Bad Thing, as it looks like a proper default …

Member Avatar for Schol-R-LEA
0
199
Member Avatar for valestrom

First off, you'll want to use the tab escape sequence, `"\t"`, rather than the tab character itself in your string replace. Second, your are returning the function at the end of the first pass of the loop; you seem confused as to how you want the function to work, whether …

Member Avatar for Gribouillis
0
5K
Member Avatar for blindislands

OK, I see a few things you didn't mention, such as a) the particular emulator you are using, and b) whether you are running in realistic mode, with load and branch delays. I also see a major flaw in your algorithm. As it is now, you are stacking the original …

Member Avatar for Schol-R-LEA
0
951
Member Avatar for rob.sigmon.1

In order to create a sub-class of an existing class, you need to use the `extends` keyword and the name of the class being extended in the declaration of the new class. class UsedCar extends Car { // ... } Furthermore, the parent class would have to have the methods …

Member Avatar for Schol-R-LEA
1
560
Member Avatar for fardous

No, please, don't. That book is a terrible introduction to C++, and does not really cover data structures to any real degree in any case. Fardous: what do you already know of programming in general, and of C++ in specific? What do you know of data structures in any other …

Member Avatar for Schol-R-LEA
0
147
Member Avatar for COKEDUDE

The problem is not in the numbers used, but in the size of the memnory being allocated. The type `N` is a pointer type, which means that it is likely to be one system word long (probably either 32 or 64 bits, assuming a common Intel or AMD CPU, though …

Member Avatar for Schol-R-LEA
0
233
Member Avatar for COKEDUDE

> How exactly do structs in structs work? Do you need to do anything special with them? What do you mean by 'special'? What you would do woith them would depend on what you intentions are. I know that sounds evasive, but it really is as much of an answer …

Member Avatar for COKEDUDE
0
1K
Member Avatar for COKEDUDE

Your casts are fine; the problem is that you haven't initialized the values of `start.x` and `edges.x1[0]` yet, so they have whatever garbage was in them before the program was run (or zeroes, at best, if the memory is getting cleared by the system before use). BTW, did you see …

Member Avatar for COKEDUDE
0
166
Member Avatar for moaz.amin.37

I am afraid you will wait indefinitely if you expect us to do the work for you. While we are here to help you learn, doing your work for you doesn't actually accomplish that. As a matter of policy for both Daniweb in general and most members in particular, we …

Member Avatar for moaz.amin.37
0
1K
Member Avatar for lewashby

Most likely, these are just the values that happen to be in those memory addresses when the prgoram starts.

Member Avatar for AndrisP
0
127
Member Avatar for chubbyy.putto

It is quite simple: first, you need an `unsigned int` variable as a counter, which should be initialized to zero. Alter your `printf()` statement to print this counter as a four-digit hex value followed by a a semi-colon and a space, followed by the string you are now printing. Finally, …

Member Avatar for chubbyy.putto
0
336
Member Avatar for arif421
Member Avatar for Schol-R-LEA
-1
48
Member Avatar for leontran1992

The thing is, when computing a series like this, you can't simply jump to the *n*th iteration and get the right answer; you need to sum all the iterations before it to get the approximation. You want your `for()` loop to start at 1 and iterate by one, and have …

Member Avatar for Schol-R-LEA
0
258
Member Avatar for munchlaxxx

> I would probably need to add a case for it in the switch in LexicalAnalysis.cpp, right? And add it to the state diagram? If you want them as separate token types, then yes to both, though most languages treat all whitespace as a single token type. The answer to …

Member Avatar for Schol-R-LEA
0
326
Member Avatar for Navneet_2

You will want: * a variable that holds the character currently being printed * an outer `for()` loop to count the number of lines to print * an `if()` statement that flips the character being printed (hint: use the modulo (`%`) operator) * two inner `for()` loops, one that prints …

Member Avatar for jwenting
-2
203
Member Avatar for dennis.teye

First off, this is the C++ forum, not the C forum; you'll want to ask questions about C programming there. Second, all you've done is post your assignment; you haven't asked a question, or shown any indication of having done any of the work on the project yet. [Daniweb rules](https://www.daniweb.com/community/rules) …

Member Avatar for Schol-R-LEA
0
180
Member Avatar for COKEDUDE

First off, I would recommend that, rather than having individual named structures as one-off types, that you define a POINT struct type and use that as the basis of your larger data structures: struct POINT { double x; double y; }; /* a vector represents a directional line segment, that …

Member Avatar for Schol-R-LEA
0
478
Member Avatar for Riya_2

OK, you have some of the idea, but you seem confused about some aspects, such as parameteters and return values. Let me give some suggestions. First off, your goal is to get the number of vowels in the function parameter, `test`. The parameter of a function is a value passed …

Member Avatar for Schol-R-LEA
0
196
Member Avatar for mark103

I assume that the OP is referring to [XMBC Media Center](http://xbmc.org/), but I don't know enough about it myself to make sense out of the question, either. I would suggest that the OP seek help on the [XMBC forums](http://forum.xbmc.org/) directly, as there presumably would be people familiar with the program …

Member Avatar for Schol-R-LEA
0
181
Member Avatar for aurgiwilllearn

Where you have it now (lines 21-34) is actually workable. The implementation has several problems with it as it stands, but you could leave it right where it is. However, that's not what you would usually do. Has your instructor (or textbook) explained about writing separate methods other than `Main()` …

Member Avatar for mridul.ahuja
0
182
Member Avatar for fffffffff

Actually, reliability is not the real issue with analog computers; indeed, they can be much more reliable at times, as they don't have issues of round-off errors and so forth that are inherent in digital computers. Analog devices have the advantage of being continous rather than discrete, and thus are …

Member Avatar for Schol-R-LEA
-1
99
Member Avatar for Alexandra Nichole

Then that would be your first step, wouldn't it? Writing out even a basic skeleton on a class and a `main()` function would at least give us code to discuss. We will not write your program for you. Not only does it do you no good for us to simply …

Member Avatar for Schol-R-LEA
0
94
Member Avatar for Cy_Squared

I will give one piece of advice, but I don't know if it will make sense to you yet. Anyway, here it goes: When getting numbers from standard input, the natural inclination is to use `scanf()` directly. I don't recommend that, as it can have unforeseen issues with the newline …

Member Avatar for David W
0
667
Member Avatar for mary ann_1

First off, you should know before anything else that no one here is going to do the work for you. It is Daniweb policy that we assist you in solving your problem, but that we not solve the problem directly by providing code. It doesn't sound like that is what …

Member Avatar for Schol-R-LEA
0
718
Member Avatar for munchlaxxx

While Deceptikon's answer is excellent, I would want to ask if you understood what an array really is, in the assembly language you are using. The algorithm won't help you if you don't know how to declare an array in the first place. Which processor are you targeting, and what …

Member Avatar for munchlaxxx
0
930
Member Avatar for moaz.amin.37

I am no expert at Java threading, but I believe the main issue is that you aren't synchronizing on a single object, but rather you have three separate objects of the same type, which happen to be synchronized, but *not with each other*. You would need a single object which …

Member Avatar for vantrendin
0
247
Member Avatar for rose_2

The first thing I would recommend in starting out with Python is finding a good Integrated Development Environment, oe IDE; while IDLE, the one that comes with Python, is passable, it is not really new-user friendly and takes a bit of getting used to. Unfortunately, 'good' is very subjective when …

Member Avatar for Schol-R-LEA
0
374
Member Avatar for daino

Keep in mind that there is difference between the general algorithms, and the [archive file formats](https://en.wikipedia.org/wiki/List_of_archive_formats) which are their concrete realization. For any given algorithm, there are more than one possible representation of the compressed data. It is only when you have a specific format that you can meaningfully talk …

Member Avatar for Ghost0s
1
203
Member Avatar for ashiselma

Simple: func(); If you have ever used `printf()` or any other standard library calls, you have made a function call. These functions are *not* part of the language; they are part of the library, which is something completely different. Just because they are *standard* does not mean they are part …

Member Avatar for dinad578
0
377
Member Avatar for Schol-R-LEA

I am currently making out the plans for the milestones for the rest of this year in my long-term projects (Thelema, Assiah, and Alfheim). I was hoping that someone would be able to review these plans and help me determine which are feasible in the next four months. The overall …

Member Avatar for Hiroshe
0
203
Member Avatar for Ahmed_53

Good to meet you, though I should point out that such introductions really ought to be posted to the 'Community Introductions' forum, rather than one of the language fora. Since you are new, I don't think anyone will fault you for it, but it is something to be aware of …

Member Avatar for mattster
0
71
Member Avatar for Mark Kim Bryan

What have you tried so far, and what problems are you having with it? Please include at least enough of your source code to explain any difficulties you are experiencing. Keep in mind the following DaniWeb community rule: > Do provide evidence of having done some work yourself if posting …

Member Avatar for Schol-R-LEA
0
360
Member Avatar for iqra aslam

First off, which version of Dev-C++ do you have? The original Bloodshed Dev-C++ has not been maintained for nearly ten years, and is badly out of date. We recommend the [Orwell fork](http://sourceforge.net/projects/orwelldevcpp/) as the most up to date version available.

Member Avatar for Schol-R-LEA
0
68
Member Avatar for Gotovina7

That, plus you may want to have a little patience. Fora like this aren't IM or Twitter; they are more like email, where you might have to wait hours or even days before a response. OTOH, it also means that you aren't limited to 140 characters, so posts can be …

Member Avatar for Schol-R-LEA
0
2K
Member Avatar for Ivzirnalsradeys

My optimism in others' good intentions is battling with my pessimism about [help vampires](http://www.skidmore.edu/~pdwyer/e/eoc/help_vampire.htm) (which the OP is quickly proving herself to be). Still, in the hope of giving her at least a leg up, I'll try to give what advice I may. >a) Explain how the computer passes control …

Member Avatar for Taywin
0
236
Member Avatar for EarhawkPH

Also, which compiler are you using? If it is Turbo C, then you are limited to a `long` of 16 bits, which gives an `unsigned` maximum value of 65535.

Member Avatar for sanjulovers
0
250
Member Avatar for VKG147

How are you running the script, and what command line arguments are you invoking the script with? If you are running the script from the command line, you would have arguments as part of the invocation, like so: python test_argv.py arg1 arg2 arg3 OTOH, if you are using an IDE …

Member Avatar for Schol-R-LEA
0
742
Member Avatar for m4mukulgarg

First off, as JamesCherrill states, there is a vast amount of tutorials and other resources covering the subject of compiler development around, and while much of it is of questionable value, it should be possible to find something you can use to begin your work. [This forum reference](http://forums.devshed.com/programming-languages-139/compiler-writing-language-design-634985.html), while dated, …

Member Avatar for Schol-R-LEA
0
556
Member Avatar for Goyang

Could you please give more details about what you need? First off, I expect most of the people here are unfamiliar with the game you refer to, and we'd need to know what operating system you are running on (Windows, Linux, MacOS, etc.) and what compiler you are using. I've …

Member Avatar for Schol-R-LEA
0
161
Member Avatar for tan.revilleza

**Nicolae_1**: First off, this is an English language forum, and giving an answer in another language (especially one poorly known outside of its home country such as Romanian) is extremely rude and unlikely to be helpful. Even if the OP were a native speaker - which is not the case …

Member Avatar for Sam_6
-1
261
Member Avatar for neha1511

OK, I trust that this is indeed urgent *for you*, but you should be aware that it isn't necessarily going to get us moving faster. The forum moves at its own pace; you might get an answer right away, or the next day, or next week, or never. I wouldn't …

Member Avatar for Ahmad_Khalaf
-1
1K
Member Avatar for Clif40RD

OK, I've finally got Netbeans running and connecting to a local (embedded) database that I created manually with IJ, so I've got a handle on what you are talking about. As it happens, there is a way to add a foreign key to a table in Netbeans, but it isn't …

Member Avatar for Clif40RD
0
735
Member Avatar for Entalist

The purpose of the d'tor is not to free the object itself; that is done by `delete`, which should only be applied to dynamically allocated memory (that is, values allocated using `new`) in any case. Also, freeing the object does not *overwrite* the object; the memory itself is is still …

Member Avatar for Entalist
0
185
Member Avatar for khennxi

If you have a question like this, please start a new thread rather than resurrecting a long-dead one like this. As for why `printf()` and `scanf()` aren't used in Java very often, well, to begin with, ther *is* no `scanf()` method in the standard Java library. Rather, the `Scanner` class …

Member Avatar for Schol-R-LEA
-3
847
Member Avatar for Clif40RD

While Slavi's answer is indeed a good starting point, I think we could help some more as well if you could give us some more information. Let's start with a few pertinent questions: * What operating system is this going to run on? * What [database engine](https://en.wikipedia.org/wiki/Relational_database_management_system) are you using …

Member Avatar for Clif40RD
0
247
Member Avatar for andrew mendonca

I would prompt you to consider a shorter if somewhat more complex solution, one which works by *sorting* the three values. While a full sorting function is a bit heavyweight for this purpose, consider using three temporary values, `min`, `mid`, and `max`, and then testing the three input values in …

Member Avatar for Taywin
0
3K

The End.