1,678 Posted Topics

Member Avatar for eggmatters

[QUOTE=eggmatters;1022180] Is there a method I can invoke that will tell me who the caller was?[/QUOTE] You basically already did. Object source = event.getSource() returns the Object that caused the event to be fired. So you could just use '==' to determine which Object it was at that point, if …

Member Avatar for eggmatters
0
142
Member Avatar for ahmed_2003

This is not a snippet. It is a request for help. And when you are asking for help, it is probably not a good idea to post a snippet. And read the rules stickied at the top of the forum, nobody is going to write your code for you, we're …

Member Avatar for BestJewSinceJC
-3
68
Member Avatar for ki72

[QUOTE=ki72;1023261] [B]you [/B]will have to write a program that reads a 4-digit positive integer from the user and prints out the following information on the screen: [/QUOTE] Re-read your project assignment. Pay particular attention to the part that I bolded.

Member Avatar for freesoft_2000
0
103
Member Avatar for ITleb

It *should*. Although I have personally occasionally had slight GUI issues when trying to run the same jar on Mac & Windows. But yes, the idea is that it will do so. If I were you, I'd test it on multiple platforms to be sure.

Member Avatar for BestJewSinceJC
0
232
Member Avatar for whoadiz

You'll have to post the binarySearch method, since it is returning the -7 and all the other values (at least it seems that way). Also, thank you for posting in code tags. It is much appreciated.

Member Avatar for BestJewSinceJC
0
260
Member Avatar for dhanh90
Member Avatar for javaAddict
0
175
Member Avatar for jammercb
Member Avatar for 2fac323

Well if the number of elements in the array is odd, it is logically the number directly in the center. Otherwise, it is the two numbers in the center added together and divided by two.

Member Avatar for BestJewSinceJC
0
107
Member Avatar for klackey19

It's because the compiler doesn't think that your method is [I]guaranteed[/I] to return either true or false. I.e., it thinks that it's possible to reach the end of your method without returning anything at all. If you're [I]positive[/I] that your method will always return either true or false (based on …

Member Avatar for klackey19
0
183
Member Avatar for bruceaj

Post the segment of your code where you get your warning and any other relevant portion of your code. In code tags.

Member Avatar for Mikeyp926
0
86
Member Avatar for Fire00f1y

If you're done like you say, then post all of your code including the main so that I can run it. I'll see if I can fix it which I probably can, but generics are a little rusty in my mind right now and I see nothing right away.

Member Avatar for ~s.o.s~
0
172
Member Avatar for bruceaj

You can use a package that includes all of your essential classes and just import that package into any class where you want to use those classes. So basically, if you wanted to import the popular File class, you would use import java.io.File; but if you wanted to import the …

Member Avatar for quuba
0
317
Member Avatar for shakunni

I'll give you some hints and leave the rest of the work (such as using the definition of theta to come up with the values that prove it's big theta) up to you. But these are just my thoughts, no guarantee that it's correct so listen at your own risk. …

Member Avatar for BestJewSinceJC
0
90
Member Avatar for iamsmooth

Just some thoughts. . 1) because with the 1/2 condition, if you downsize the array, it will be much more likely that you will then have to subsequently resize the array later (due to having more elements than can fit in the new array you created in contractStack). 2) You …

Member Avatar for iamsmooth
0
142
Member Avatar for SebKom

[url]http://en.wikipedia.org/wiki/1_%2B_2_%2B_3_%2B_4_%2B_%C2%B7_%C2%B7_%C2%B7[/url]

Member Avatar for BestJewSinceJC
0
108
Member Avatar for nola_Coder

[QUOTE=nola_Coder;1018197] What if there are say three left parentheses on the stack, but then a right bracket appears? How would the program know that the bracket doesn't match, since there are only parentheses on the stack? [/QUOTE] edit: If a closed bracket is encountered when a '(' is on the …

Member Avatar for nola_Coder
0
683
Member Avatar for rysin

[In general you would go through one of many software development processes, depending on what company or organization you work for.] For your project, however, you could have simply had a meeting with your team and determined the essential aspects of your project. Then, once you had the essential "functions" …

Member Avatar for JuliaAdam
0
144
Member Avatar for valona
Member Avatar for katti.shyam

Figure out the maximum number of exchanges that can take place in the MAX_HEAPIFY routine. Figure out the max number of times it can be recursively called (Ex: lgn), then multiply those two numbers and you have your answer.

Member Avatar for BestJewSinceJC
0
73
Member Avatar for redrocket0274

paste us the error message. the line that the error occurred on would be good information to know.

Member Avatar for BestJewSinceJC
0
161
Member Avatar for acm09

[QUOTE=acm09;1018808]Design an application that accepts reader data and produces a count of readers by age groups as follows: under 20, 20-29, 30-39, 40-49, 50 and older." [/QUOTE] Essentially these are your requirements and the rest of the paragraph didn't matter whatsoever. I don't really see how we can help without …

Member Avatar for acm09
0
171
Member Avatar for The Dude

I typed 72 wpm three times in a row, but made 3 mistakes each time. I also type with two fingers. And who said home row meant anything !?!!?! edit: got up to 81 wpm with 3 mistakes

Member Avatar for red_gal_2005
3
178
Member Avatar for Superfat

You don't need to repaint() for setting buttons enabled or disabled. [CODE=Java] if(owned >= 0) { Sell.setEnabled (true); } if(owned <= 0) { Sell.setEnabled (false); } [/CODE] You need to consider the case when owned is equal to 0. If owned = 0, then both of your if statements are …

Member Avatar for VernonDozier
0
12K
Member Avatar for gibson.nathan

[QUOTE=gibson.nathan;1015688]now i am trying to get my wind speeds, out them into categorys, and calculate the average category. [/QUOTE] So it seems like you have your steps figured out. It looks like you got your wind speeds, put them into their categories. . but did not calculate the average. The …

Member Avatar for VernonDozier
0
135
Member Avatar for The Mad Hatter

The only problem I really have with Vista is the annoying, consistent 'do you really want to do X activity' messages and the fact that it hogs my RAM (which isn't a problem on my 4GB computer I now have). All I use is ad-aware and I have never had …

Member Avatar for Evenbit
-5
2K
Member Avatar for rgpii

[QUOTE=rgpii;1012493]Data Structures and Algorithm Analysis by Mark Allen Weiss[/QUOTE] Agreed, that book is crap. I used his Java book w/ the same title in my data structs class.

Member Avatar for jmaat7
0
207
Member Avatar for icke2433

Hints: for (the number of lines you are given to print){ -print a newline. for (the number of asteriks per line){ -print one asterik. Do not print a newline. } You can do printing using System.out.println and System.out.print. The former will print a newline (same as hitting enter basically) and …

Member Avatar for petrisal
0
105
Member Avatar for JRabbit2307

Seriously - if you can't figure out how to use code tags then read the stickies at the top of the forum that explain in detail how to do so. Or you could just quote one of the other members in here (such as Jocamps) who used code tags in …

Member Avatar for Foxh451
0
479
Member Avatar for JRabbit2307

Well, for starters you could mark previous threads solved if you no longer have questions/are satisfied with the help you got. Some of these threads look like they are solved; if they are, then mark them as solved. [url]http://www.daniweb.com/forums/thread230080.html[/url] [url]http://www.daniweb.com/forums/thread229863.html[/url] [url]http://www.daniweb.com/forums/thread229842.html[/url] [url]http://www.daniweb.com/forums/thread229265.html[/url] As for your question, it looks like you …

Member Avatar for JRabbit2307
0
4K
Member Avatar for pocku

> And the thing I don't really get is here in TCPEchoClient.c: while (totalBytesRcvd < echoStringLen) { /* Receive up to the buffer size (minus 1 to leave space for a null terminator) bytes from the sender */ if ((bytesRcvd = recv(sock, echoBuffer, RCVBUFSIZE - 1, 0)) <= 0) DieWithError("recv() …

Member Avatar for nirveshverma
0
179
Member Avatar for shopnobhumi

[CODE=Java]if(copy[0]==null) System.out.println("DEBUGGING IS IMPORTANT");[/CODE] Put that in your readFile method before the while loop.

Member Avatar for shopnobhumi
0
93
Member Avatar for Bluesilver

Haha. Pretty amusing that two people from the exact same class ended up here, assuming that is really the case. Apologize for freeposting/upping this thread but that is really funny.

Member Avatar for Bluesilver
0
141
Member Avatar for shahab03
Member Avatar for shahab03
-1
62
Member Avatar for masterjiraya

> can someone remind me how to loop a character please. I'm begging you all. > > my output must be this: *********************************************** * * * * * * * * *********************************************** > i know how to set the color attribute for a character, my problem is I for got …

Member Avatar for BestJewSinceJC
0
127
Member Avatar for dannyboiii

Not that the OP is interested, but in case anyone is, finding the minimum and then finding the maximum takes (n-1) comparisons each for a total of 2n-1 comparisons. The same can be done in about 3n/2 comparisons by doing both at once using pair comparisons. [URL="http://www.google.com/url?sa=t&source=web&ct=res&cd=3&ved=0CBgQFjAC&url=http%3A%2F%2Fwww.cs.vassar.edu%2F_media%2Fcourses%2Fcs241-200901%2Forderstats.ppt%3Fid%3Dcourses%253Acs241-200901%253Alecturenotes%26cache%3Dcache&ei=SnbXSp3IA8yo8AaSztznCA&usg=AFQjCNFTe8wAmNXcFVCGtPJdmxYSJYlQmA"]pair comparisons[/URL]

Member Avatar for BestJewSinceJC
0
296
Member Avatar for cmsc

You need to post your other classes. [CODE=Java]firstLevel.add(mainpanel, BorderLayout.CENTER); firstLevel.add(listpanel, BorderLayout.CENTER);[/CODE] Looks to me like you're just adding one thing right on top of another. How do you expect to see both? And there is no sign of CardLayout ever being used in your code. If you want to use …

Member Avatar for cmsc
0
121
Member Avatar for Janiceps

Yeah, I'm hacking in right now. Give me a few minutes and your IP will be unblocked.

Member Avatar for happygeek
-3
437
Member Avatar for samaru

Learning daniweb's posting guidelines is useful to your major? What about reading comprehension?

Member Avatar for happygeek
0
2K
Member Avatar for hket89

[QUOTE=ithelp;1013942]What is the prize for doing your homework?[/QUOTE] I'll give you low rep :)

Member Avatar for hket89
-2
502
Member Avatar for tnccjavaMatt

checkButton.setSelected(false); should work. In any case there are javadocs for all these things. Type the class name into google, click the javadoc, and read about the methods.

Member Avatar for Jocamps
0
283
Member Avatar for 2fac323

You can get rid of this: print grade and change your module to this: gradePercent(grade){ if gradePercent < 60 then print “Fail” else print”Pass” } If you do those two things, you will have fulfilled your requirements. So what's the problem?

Member Avatar for 2fac323
0
238
Member Avatar for HappyGoTyping

edit - sorry, posted this at the same time as James [CODE=Java]int N1, N2, product, PoNoN1, PoNoN2; PoNoN1=N1+"(POSITIVE)";[/CODE] You can't store Strings into integers. So declare PoNoN2 as a String, not as an integer. Otherwise use a completely different variable. You have many similar mistakes in your code. [CODE=Java]String PoNoN1; …

Member Avatar for BestJewSinceJC
0
108
Member Avatar for wutangpaul

We can't help you without seeing the code. Just post it in code tags. And try to ask some specific questions or tell us exactly what you are trying to accomplish and why it is difficult for you.

Member Avatar for BestJewSinceJC
0
109
Member Avatar for hket89

The main reason to use pass by reference is to be able to access the original object so that it will still be modified when you leave the function. Right? (Not the best wording, but hopefully what I mean is clear). I see other statements in here that don't make …

Member Avatar for BestJewSinceJC
0
175
Member Avatar for fortex

The point is, the existeValor method takes three arguments, but you were only passing in one argument. That will only result in a compiler error - the two are treated as completely different methods. So yes - you are on the right track.

Member Avatar for BestJewSinceJC
2
149
Member Avatar for iamsmooth

I'm not trying to be rude, but Narue already had a pretty good explanation of at least one of your questions in a similar thread that was created in this forum recently (it should still be on the first page). (The question): "I think big-o describes the upper bounds of …

Member Avatar for iamsmooth
0
135
Member Avatar for JRabbit2307

You click the code button. Doing so produces the two tags that are enclosed in [][]. Before the first ']', put =Java. So it will say [code=Java]. Put your code inbetween so [code=Java]YOUR CODE HERE[othertag]

Member Avatar for JRabbit2307
-1
524
Member Avatar for javaAddict

I agree with you, addict. I found an interesting note on wikipedia as well: "Another notable difference is that static member classes cannot implement an interface, unless that interface is simply a marker. So if the class has to realize a contract expressed by an interface, it really has to …

Member Avatar for javaAddict
0
127
Member Avatar for ssDimensionss

The new Item approach you listed will definitely put an item into inventory, assuming that inventory is an array of Items. However, whether or not the item will be what you want it to be depends on what parameters you are passing in. Could you post the Item class and …

Member Avatar for JamesCherrill
0
89
Member Avatar for Dani

I personally like the system. I also think it was well designed as far as the interface. The only thing I don't like is that it is going to discourage people from disagreeing (see: this thread) because they will be down voted just for having a different opinion, (which in …

Member Avatar for happygeek
4
534

The End.