Posts
 
Reputation
Joined
Last Seen
Ranked #71
Strength to Increase Rep
+15
Strength to Decrease Rep
-3
85% Quality Score
Upvotes Received
358
Posts with Upvotes
282
Upvoting Members
128
Downvotes Received
56
Posts with Downvotes
47
Downvoting Members
36
111 Commented Posts
~884.28K People Reached
Favorite Tags
Member Avatar for vegaseat

"It requires a very unusual mind to undertake the analysis of the obvious" -Alfred North Whitehead

Member Avatar for Reverend Jim
15
13K
Member Avatar for Duki

[QUOTE=MosaicFuneral;869504]Coffee, all day, a whole pot. The only real American food is corn dishes. I think, I'm going to be real American, today, and break-out the corncob pipe.[/QUOTE] If a big, fat, juicy hamburger isn't American then I don't know what is.

Member Avatar for Dani
22
17K
Member Avatar for dsmush

How so? Please post your solution so that if someone comes across your thread in a search (or is just reading the thread like I am) they can see it.

Member Avatar for Toby_6
1
3K
Member Avatar for Xeros606

^ No, that is not what he wanted. He just wants any 0's to be removed from the array. I thought I already answered this in another thread last week but in any case it's pretty simple so I don't understand why all of you guys are making it seem …

Member Avatar for JamesCherrill
0
3K
Member Avatar for Archenemie

For what it's worth I agree with Masijade (about learning to code GUIs by hand first, then moving on to builders if you want to). Doing so was very helpful to me and it made it a lot easier to use the GUI builder as well. If you jump into …

Member Avatar for dotxyteam
0
2K
Member Avatar for rudypooh786

else if (Balance <100) Balance = 0; count = count +1; System.out.println("Balance at Month " +count+ " is " +Balance+ " after making a payment of " +MonthlyRepayment ); That's because you set MonthlyRepayment to 100 initially and then you never set the variable to anything else. If you want …

Member Avatar for KAIWEN KEVIN
0
4K
Member Avatar for dmanw100

I'd be willing to bet that if you changed your code to this, then your code would work. I've never actually seen somebody use "File" as an argument to a Scanner, so excuse me if I'm wrong, but I don't think it should be used. File is a class that …

Member Avatar for JamesCherrill
0
967
Member Avatar for rupali

[QUOTE=Radhika...;1012475]sum=0; for(i=0;i<n;i++) for(j=0;j<i;j++) sum++; what is the actual running time of this code??[/QUOTE] Not positive, but it's probably theta (n * n!) = theta (n^2). The reason I'd say that is because the outer loop is O(n) and the inner loop is always one less than whatever the value is …

Member Avatar for jamie_13
2
49K
Member Avatar for ka-ii

Error check your code and tell us at what point your code doesn't work and show us the method where it doesn't work. If you can't do that then you won't get any help.

Member Avatar for JamesCherrill
0
15K
Member Avatar for k2k

And the unofficial way would be to put the code in a method, then call the method in the appropriate places.

Member Avatar for JamesCherrill
0
14K
Member Avatar for cpsusie

The person who posted above me is completely wrong. Assembly is faster than any other code if you use/code it correctly. It could be that the optimizations the compiler made for the C++ code were good optimizations, whereas the code you wrote was poorly designed and written.

Member Avatar for Zack_7
0
11K
Member Avatar for iMaZx

I don't see why you need a DecimalFormat, I don't think it is necessary. And what is your question?

Member Avatar for rproffitt
0
439
Member Avatar for Isky

The reason it gives you trouble is because when the user enters an integer then hits enter, two things have just been entered - the integer and a "newline" which is \n. The method you are calling, "nextInt", only reads in the integer, which leaves the newline in the input …

Member Avatar for stultuske
0
21K
Member Avatar for hhappak

As for S.o.S's reply, you would expect it to infinitely loop, since you want to continuously check the file for updates. In other words it is supposed to infinitely loop so I don't see why you have an issue with that. Maybe I didn't understand the issue. Anyway, I'll give …

Member Avatar for rproffitt
0
5K
Member Avatar for elektro123

[url]http://www.csee.umbc.edu/courses/undergraduate/341/spring09/projects/proj5/HuffmanExplanation.html[/url] Is that helpful at all? One of the projects I did in school. I don't know if that is "static" huffman coding or adaptive... I always assumed it was the only huffman coding TBH.

Member Avatar for Zlatan25
0
3K
Member Avatar for playagain

Routers can use queues. I'd elaborate but if you want to use it as an example, it'll force you to research it first to figure out the correct terminology/phrasing for an example.

Member Avatar for priya..
-2
12K
Member Avatar for vegaseat

Einstein couldn't speak fluently when he was nine. His parents thought he might be retarded.

Member Avatar for vegaseat
11
9K
Member Avatar for OrangeNaa

It looks ok to me. Pseudocode doesn't really have a "standard" format (that I know of) - if an experienced programmer were writing that pseudocode, it would look a bit different - but I think you covered most of the steps, which is the important thing. A program wouldn't just …

Member Avatar for channasrey7
0
1K
Member Avatar for Nikki_77

If you define a method as taking an int parameter (which is how your AccelerateSpeed() method is defined) you need to pass it an int when you call the method. And if you re-read James' post, he was saying that you have a variable 'speed' declared at the class level …

Member Avatar for stultuske
0
22K
Member Avatar for yingfo

For your add (should be called insert?) method: 1. You have to first figure out what index they want to add the item at. If the index they want to add the item at is the empty, then just insert it and you're done. 2. If the index is not …

Member Avatar for stultuske
0
919
Member Avatar for himanjim
Member Avatar for doha786

[url]http://java.sun.com/docs/books/tutorial/uiswing/components/filechooser.html[/url] Read through that tutorial, it should be helpful to you. Courtesy of a post by peter budo that I found by searching daniweb.

Member Avatar for JamesCherrill
0
4K
Member Avatar for imclumsy

Maybe I am overlooking the obvious, but why can't you use the depth property to help you test for an AVL tree?

Member Avatar for JamesCherrill
0
260
Member Avatar for debasisdas
Member Avatar for shivers20

Nice first post. Hope you have a good time with that program that the OP said doesn't work that was written years ago.

Member Avatar for stultuske
0
3K
Member Avatar for LooN_iE

[URL="http://java.sun.com/j2se/1.5.0/docs/api/java/io/FileWriter.html#FileWriter(java.io.File,%20boolean"]Putting text at the end of an existing file[/URL] ^ I'm pretty sure using FileWriter with the constructor that has "append" as one of the arguments will allow you to write to a file without deleting its contents first. To use FileWriter: PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter("foo.out"))); [URL="http://java.sun.com/j2se/1.5.0/docs/api/java/io/BufferedWriter.html"]The …

Member Avatar for ncmathsadist
0
300
Member Avatar for ang19
Member Avatar for nickewus24

You should validate the employee's salary in the employee's module (i.e. the employee module should not exit until they have entered a valid salary). Same for the other modules. It makes the "main" part of your pseudocode more concise, and leaves the obvious tasks to the modules that they belong …

Member Avatar for heftytest
0
182
Member Avatar for sravan953

I don't know what line 12 is because you didn't use the code tags correctly. If you had, it would have put line numbers there. Anyway: Check out the String class's toCharArray() method. Once you get your char array, iterate backwards over it, printing out each character. If you want …

Member Avatar for JamesCherrill
0
607
Member Avatar for ChPravin

Yes. In your "main package" you can add a folder called resources. In that resources folder you can put your files. Then you can export the project as a Runnable Jar File in eclipse by going to File->Export->(Choose Java Option)->Runnable Jar File. Here is a code sample to get you …

Member Avatar for devin.mcknight.102
0
8K