3,927 Posted Topics

Member Avatar for thunderstorm98
Member Avatar for gr8fubar420

[quote=RamyMahrous;440782]you don't have any problem to cast int to string int myInteger = 25 String myString = myInteger; what's your problem?![/quote] This is not valid at all. To the OP, use String.valueOf(int value).

Member Avatar for Ramy Mahrous
0
350
Member Avatar for KimJack

Just parse the lines from the text file into its fields, create the Student, and I would suggest you could use a HashMap if you want to access the Students by their ID. You have already posted several threads about reading a field from text file, so I find it …

Member Avatar for Ezzaral
0
92
Member Avatar for Khishin

Instantiating a class at runtime like that can be done through Reflection. See the following info: [url]http://java.sun.com/docs/books/tutorial/reflect/index.html[/url] Class.forName() will allow you to get a Class instance for a given full (including package) class name.

Member Avatar for Khishin
0
150
Member Avatar for ceyesuma

Super can also be used to call a parent class method that you overriding to extend the original functionality. i.e.[code=java] public void someMethod(){ // go ahead and do what parent class has defined super.someMethod(); // now do a few other things that this subclass needs... }[/code]

Member Avatar for no1zson
0
116
Member Avatar for nwad

Post the code that you do have, or pseudocode for the algorithm and specific questions that you have about implementing it in Java. The forum is for Java help - not implementations by request.

Member Avatar for jwenting
0
83
Member Avatar for vinod_javas

Not sure exactly what you are referring to with "precasting". There is casting[code] List pointList = new ArrayList(); pointList.add( new Point(0,0) ); Point p = (Point)pointList.get(0); // you must cast Object to Point here[/code] or you can use generics to "pre-cast" and declare the type of collection[code] List<Point> pointList = …

Member Avatar for Ezzaral
0
114
Member Avatar for jjt

"visualization java tools"? Do you mean the graphics APIs? Please describe what you are wanting to do a little bit more.

Member Avatar for jjt
0
194
Member Avatar for java_starter

Well, the math that it is performing is very straightforward. Do you mean to increase the "discountRate" by 20% of "discountRateBeforeTaxes" on every call to setDiscountRate()? You would probably be better served by breaking those calculations into multiple steps if you aren't getting the results you expect. Then you can …

Member Avatar for jwenting
0
142
Member Avatar for claudiu_is

If you pass the JFrame reference as the "owner" parameter to the JDialog constructor it will center on it. Example:[code] JFrame frame = new JFrame(); frame.setBounds(200,200,300, 400); frame.setVisible(true); JDialog dialog = new JDialog(frame,"test"); dialog.setVisible(true);[/code]

Member Avatar for claudiu_is
0
183
Member Avatar for sakura_fujin

[quote=sakura_fujin;441002]actually i still have problems with regards to this project of mine, GUI is really not the priority, il post a new thread with regards to it, tnx[/quote] And [U]use code tags[/U]! Both here and in the other post, you have posted a huge wall of code without any formatting, …

Member Avatar for Ezzaral
0
147
Member Avatar for degamer106

[inlinecode]Ellipse2D.Double ellipse = new Ellipse2D.Double(0,0,getWidth(),getHeight());[/inlinecode]

Member Avatar for Ezzaral
0
132
Member Avatar for macsuibhne

Well, without a database you will have to hardcode every condition as an if statement, but if that is really what you want to do then...[code] $makems = $_GET['makems']; if ($makems==83){ // place the audi banner }[/code]

Member Avatar for HazardTW
0
96
Member Avatar for kpssivam

If you are using the DefaultTableModel for your model, you can call [INLINECODE]removeRow(int row)[/INLINECODE]. If you are using your own custom table model then you must implement it yourself.

Member Avatar for jwenting
0
63
Member Avatar for BABSYOMMY

[quote=BABSYOMMY;439940]I need to a have a CHAT WINDOW in my business website. Please how can I achieve this?[/quote] You don't mention what language you are using for your site, but you might want to look into Joomla if you are willing to consider something PHP-based. It has a ton of …

Member Avatar for ~s.o.s~
0
112
Member Avatar for alsoumhi
Member Avatar for ixenocidei
Member Avatar for ixenocidei
0
78
Member Avatar for jjt

You need to look into [URL="http://en.wikipedia.org/wiki/Optimization_%28mathematics%29"]optimization[/URL].

Member Avatar for iamthwee
0
175
Member Avatar for kaarthikvr

What? Your post does not make any sense at all. Please provide a bit more info on what you are wanting to do.

Member Avatar for orko
0
76
Member Avatar for The Dude

[quote=ft3ssgeek;438324]Free speech is, of course, one of the core foundations of our contry and I would not presume to infringe on anyones decision to exercise that right...but I believe that with that right should come the responsibility to exercise it responsibly...[/quote] Responsibility seems to be a fading concept these days.

Member Avatar for jasimp
0
226
Member Avatar for aruna_k_2006
Member Avatar for ivatanako

Not sure if you are storing the ID as a number or a string in the db, but if it is a number then drop the single quotes in the where clause. Other than that the SQL look just fine.

Member Avatar for jwenting
0
722
Member Avatar for smartness

Why don't you ask on the vBulletin forums?? [url]http://www.vbulletin.com/forum/[/url] For specific apps like that you're better off starting at the source.

Member Avatar for Ezzaral
0
37
Member Avatar for Onispawn

You may want to look into using osCommerce for the site:[url]http://www.oscommerce.com/[/url] There are many people that do custom templating for osCommerce if you need that service.

Member Avatar for Ezzaral
0
153
Member Avatar for hsmom314

You will of course have to implement a paging mechanism if your results exceed rows*columns and you will need to get all of the items into a single array before you generate the <tr> and <td> elements. The following example code shows how you can generate the table you want[code] …

Member Avatar for schizoman
0
915
Member Avatar for ryy705

Ok, I think I know what is causing your issue. Check your db.conf file for the root_path property. If you left it set to the default 'jvm' then you need to change that to use "configuration" as below[code] # root_path - If this is set to 'jvm' then the root …

Member Avatar for ryy705
0
113
Member Avatar for bizmey

Maybe you would find an idea by using the search feature of the forums - there are about 2 million posts for "final year project" help...

Member Avatar for Ramy Mahrous
0
118
Member Avatar for java_starter

[quote=java_starter;438781][code] F:\JAVA\Java Files\Lab3\DellCustomer.java:3: cannot find symbol symbol : class Stirng location: class DellCustomer public static void main(Stirng[] args)[/code][/quote] Just a spelling error - I think you mean String. ^ [quote=java_starter;438781][code] F:\JAVA\Java Files\Lab3\DellCustomer.java:5: cannot find symbol symbol : constructor Customer(java.lang.String) location: class Customer Customer neel = new Customer("Neel Smith"); ^ [/code][/quote] …

Member Avatar for jwenting
0
166
Member Avatar for Anupkumar

I don't know - but it has nothing to do with PHP so perhaps you should post such general ponderings over in the Geek's Lounge?

Member Avatar for jbennet
0
101
Member Avatar for sarath.koiloth

Unless you are parsing XML streams, you would find it simpler to use the DOM parser, which uses a Document model instead of the event-driven stream parsing of SAX. Info on using both types of parsers is here: [url]http://java.sun.com/xml/tutorial_intro.html[/url]

Member Avatar for sarath.koiloth
0
114
Member Avatar for Herm

[quote=Herm;436506]i love holland.....[/quote] ... and ... ? [quote=Herm;436515]I'm a hot woman from Holland[/quote] No... you aren't. [quote=Herm;436518]Hey, are you that on your pic? What is your age?[/quote] If he are that on his pic, he age are what his is. [quote=Herm;436523]i'm sorry i'm new here.[/quote] I'm sorry you are new …

Member Avatar for Lardmeister
0
241
Member Avatar for CsE2007

[quote=iamthwee;438658]Surely the util.Calendar stuff should contain something relevant?[/quote] Yea, a combo of Calendar and DateFormat, though not very intuitive unfortunately:[code] Calendar now = Calendar.getInstance(); System.out.println(new SimpleDateFormat("EEEE").format(now.getTime()));[/code]

Member Avatar for orko
0
90
Member Avatar for KimJack

[quote=iamthwee;438089]Erm maybe because 08765 isn't an integer?[/quote] Exactly. If you really need leading zeros then you have to create that String representation yourself - which will undo the whole point of converting in the first place.

Member Avatar for KimJack
0
101
Member Avatar for njagi

I can't see what you are wanting to accomplish with this code[code] foreach ($nvalue as $key => $value){ $nvalue[]=$value; }[/code] the following shows your array is just fine as it is[code] foreach ($nvalue as $key=>$value){ echo $key."=".$value."<br>"; }[/code] Why are you overwriting the array values?

Member Avatar for somedude3488
0
297
Member Avatar for kotigadu

File.[B][URL="http://java.sun.com/javase/6/docs/api/java/io/File.html#lastModified%28%29"]lastModified[/URL][/B]() You can't get creation date without using native code though. [URL]http://mindprod.com/jgloss/lastmodified.html[/URL]

Member Avatar for Ezzaral
0
29
Member Avatar for komox

You need J2ME: [url]http://java.sun.com/javame/index.jsp[/url] (and why are you advertising the links at the bottom of your post?)

Member Avatar for Ezzaral
0
101
Member Avatar for doreigon

You're right - you didn't follow number 3 correctly. Your code is adding the new coordinates to the old when all it needs to do is set them[code] x1 = xNew1; y1 = yNew1; x2 = xNew2; y2 = yNew2;[/code]

Member Avatar for doreigon
0
597
Member Avatar for vinod_javas

[quote=vinod_javas;437818]hi everyone i have a very a very basic question in mind .. i wanted to discuss .. Difference Between these? String s1= new String("java") ; String s2="java" ; [/quote] Strings are immutable in Java and the String class maintains a pool of String objects that have been created. Using …

Member Avatar for vinod_javas
1
145
Member Avatar for 9Mark9

Well, you don't say where you are in the learning process, but wanting to do a graphical game is a bit beyond the basics. I'd recommend something text-based from the console before you get into Swing and 2D graphics.

Member Avatar for iamthwee
0
117
Member Avatar for volscolts16

See bold red comments in the code: [quote=volscolts16;436999]I having a small problem with the output on the Your CD's side, they are only viewable if I double click inside the pane, then they show up, almost like the pane is on top. How can I fix, I have tried moving …

Member Avatar for volscolts16
0
582
Member Avatar for abar_sow

You'll have to read from one file and write what you want into another. As you scan your input, when you find line.startsWith("Acknowledgement") then keep reading lines but don't write any data until you get to the line.startsWith("Introduction"). I hope you aren't stripping copyrighted material of all copyright and acknowledegment …

Member Avatar for Ezzaral
0
105
Member Avatar for kohuke

Well, you can use [code] long startTime = System.nanoTime(); // ... the code being measured ... long estimatedTime = System.nanoTime() - startTime;[/code] if you really think you need better than millisecond resolution.

Member Avatar for kohuke
0
154
Member Avatar for KimJack

I can't see why you need to avoid split, but [URL="http://java.sun.com/javase/6/docs/api/java/util/Scanner.html"]Scanner [/URL] and [URL="http://java.sun.com/javase/6/docs/api/java/util/regex/package-frame.html"]java.util.regex[/URL] are other options for parsing your input.

Member Avatar for ~s.o.s~
0
122
Member Avatar for ryy705

It all depends on the nature of the app, but yes, many use a database to store information. The database choice depends on your application needs. If you need a central database for many client apps, take a look at Postgre SQL or MySQL. If each clients data is self-contained, …

Member Avatar for ryy705
0
197
Member Avatar for abar_sow

Well, your question barely makes sense given the code that you posted (which needs code tags too). Maybe this example of writing to a file will help [url]http://www.exampledepot.com/egs/java.io/WriteToFile.html[/url]

Member Avatar for abar_sow
0
140
Member Avatar for KimJack

You need to reset index and tmp before scanning each line. Also you don't have any checks on index vs strLine.length() so if you did have a line with no spaces in it you will get an index out of range.

Member Avatar for KimJack
0
86
Member Avatar for claudiu_is

You don't even need the [inlinecode]new File("")[/inlinecode] part - the method is static. [code] for(File drive : File.listRoots() ) System.out.println(drive); [/code] :)

Member Avatar for Ezzaral
0
127
Member Avatar for DeadJustice

As I understand your requirement, you only need an array coffee[numberOfAisles][numberOfBins]. I don't think you need to have a different number of bins per aisle, so you can create the array directly from the two questions without looping. You will need to loop the array when you total the weight. …

Member Avatar for DeadJustice
0
105
Member Avatar for glowkazaf
Member Avatar for Ezzaral
0
57
Member Avatar for tirivamwe

[quote=tirivamwe;432742]code in login page is: [code]header("Location: index.php?$page");[/code] how do i get the data from the variable in index page after redirect from login page[/quote] You mean the $page value? Or some other variable? If you mean $page (which I assume is a name-value pair like "var=someValue", if not then you …

Member Avatar for Ezzaral
0
139

The End.