889 Posted Topics

Member Avatar for Blackeagle

Q1: The System.exit() method terminates the Java Virtual Machine, not just a single frame. Q2: Not sure what you mean by this Question.

Member Avatar for Blackeagle
0
217
Member Avatar for rahejapreeti

Hi rahejapreeti and welcome to DaniWeb :) By a bullet, do you mean an ordered list? Do you know how to do that in XML (without php)? If so, let me point you in the direction of [URL="http://www.php.net/manual/en/book.simplexml.php"]the Simple XML documentation[/URL]. Simple XML provides an easy-to-use XML manipulation for PHP. …

Member Avatar for rahejapreeti
0
187
Member Avatar for codered152
Re: help

[QUOTE=edensigauke;685361]absolutely. i do that most of the time. an example lets say i have created a class Me.java which has the following constructors public Me() {} public Me(String s) {} public Me(int dead) {} public static void main(String[] args) { Me theBasicConstructor = new Me(); Me theStringConstructor = new Me("Hello"); …

Member Avatar for codered152
0
94
Member Avatar for ChintuChowdary

Why do you want to do this? Are you trying to hack a website for some nefarious purpose?

Member Avatar for darkagn
0
45
Member Avatar for mrjoli021

Use modulo arithmetic instead. [code=java] if ( i >= array.size() ) { i = i % array.size(); } [/code] In fact, you don't even need the if-statement, just do the modulo...

Member Avatar for imran786
0
118
Member Avatar for god_1896

Just taking a quick look, you have not passed in a parameter to the region::getAllR() call. Note that the signature of the function is function getAllR($Region_id) which contains a single parameter with no default value set. Therefore you must call the function like so: region::getAllR($aRegionId);

Member Avatar for god_1896
0
213
Member Avatar for TGMaverick

All I can say is planning your project will reduce the amount of time to code it. Perhaps start by designing the database of players - what details do you require from a new member and how will they go about searching for a partner? Start with the basics of …

Member Avatar for Dizdain
0
150
Member Avatar for muthu592

Are you talking about the IDE or the java.beans package? If you mean the IDE then this link will help [url]http://www.netbeans.org/kb/[/url]

Member Avatar for Alex Edwards
0
115
Member Avatar for assgar

Check out the documentation on the date_sub function - I think this will do what you are after. Here is a link: [url]http://au2.php.net/manual/en/function.date-sub.php[/url]

Member Avatar for darkagn
0
225
Member Avatar for pardeep3dec

With a solid background in C/C++, Java should be relatively straight forward to pick up. I think one of the best free resources for learning java is the java website, [url]http://java.sun.com[/url] , which has the API documentation and lots of great tutorials. In terms of books I would probably recommend …

Member Avatar for peter_budo
0
110
Member Avatar for ravikiran032

Hmm, the InetAddress.getByName(String) method should work. Are you using the full computer name? That is, including the network?

Member Avatar for Ezzaral
0
133
Member Avatar for EmpireZ

Without more details I can only guess, but I would say that your data type for the amount of money that the player can get is an SQL INT. Am I right? An INT in SQL can only have a maximum value of 2,147,483,647. If that is the case, I …

Member Avatar for ryan_vietnow
0
121
Member Avatar for queenc
Member Avatar for pabz_sarquilla
0
77
Member Avatar for warlock300300
Re: Help

What have you done so far? We are not allowed to just give you the answer, we need to see some effort. Sorry!

Member Avatar for Ezzaral
0
83
Member Avatar for ocreds

Hi ocreds, In order to raise a number to a certain power, you need to use the Math.pow(double, double) method. The documentation on it is found [URL="http://java.sun.com/javase/6/docs/api/"]here[/URL] in the Math class. Basically it accepts two numbers as parameters and returns the first number raised to the power of the second …

Member Avatar for peter_budo
0
232
Member Avatar for bdcd

[QUOTE=bdcd;680857] [code=php] $new_file_name=vsquarel; [/code][/QUOTE] I think that this line is incorrect? Possibly it should be: [code=php] $new_file_name="vsquarel"; [/code] or even: [code=php] $new_file_name="vsquarel.htm"; [/code] Unless vsquarel is supposed to be a variable, in which case it should be: [code=php] $new_file_name=$vsquarel; [/code] Try these suggestions and see if that fixes your problem... …

Member Avatar for bdcd
0
131
Member Avatar for oconndav

Something like this might be simpler if it is possible for your code: [code=php] // $elements is your list of elements that you are adding to your string array $arrayString = array(); foreach($elements as $element) { $arrayString[] = $element; } [/code] Now, in your $arrayString you will need to access …

Member Avatar for oconndav
0
108
Member Avatar for shelly2373

For your previous button, I think you want to do something like [code=java] index--; if (index < 0) { index = numItems - 1; } [/code] This will allow you to cycle through your inventory items by pressing the Previous button when you are at the first item. You can …

Member Avatar for deush
0
449
Member Avatar for zahra1364

Sorry what do you mean by "resizer code"? Can you provide an example or show us what you have so far?

Member Avatar for scorpionz
0
95
Member Avatar for veledrom

Take a look at the date() function in the PHP Manual ( found at [url]http://au.php.net/manual/en/function.date.php[/url] ). There is a special format, t, that returns the number of days in a given month. For example, to find the number of days in July, you could write something like: [code=php] $julyDays = …

Member Avatar for veledrom
0
98
Member Avatar for nixwave

The simple bugs are often the hardest to fix. I personally hate the ones where you have a slight spelling mistake in a variable name and instead of throwing an error it just works but not as you'd expect. They can take ages to find. I would recommend purchasing a …

Member Avatar for nixwave
0
128
Member Avatar for vincent_neo

I agree with jbennet but would like to add that perhaps your best bet would be to contact the GIMP community administrators and just double check with them. They may have specific requirements that you need to adhere to.

Member Avatar for freddirkse
0
1K
Member Avatar for AirmanTheGreat

Have you compiled the code? That error usually relates to attempting to run a main method in a file that has not yet been compiled. If that was a compiler error, which line(s) give the error?

Member Avatar for AirmanTheGreat
0
212
Member Avatar for twgood

The error is occurring on line 488 and is a NullPointerException, which means that something is being referenced on line 488 that hasn't been initialised properly. Which line of code is number 488 (in Inventory.java file)?

Member Avatar for darkagn
0
100
Member Avatar for god_1896

The only thing I can see wrong with your sql statement is that you don't need single quotes around your variables. But I wouldn't think that would cause an error. What happens when you call the storedRecord function? (It should just print the sql statement to the screen, but what …

Member Avatar for god_1896
0
114
Member Avatar for sciwizeh

I know that your tutorial probably says to connect to port 7 for an echo, but try connecting to a port > 1024. Chances are your errors are due to trying to connect to a port that is in use.

Member Avatar for sciwizeh
0
3K
Member Avatar for andrew13d

Sure it is. You can do something like: [code=sql] SELECT * FROM <databaseTable> WHERE columnX = 'x' AND columnY = 'Y' AND columnZ = 'Z' [/code]

Member Avatar for andrew13d
0
112
Member Avatar for lich

While you are learning java it is probably best if you learn to code your interfaces from scratch rather than using a GUI builder. You will need to use the java.awt and javax.swing packages. There are plenty of tutorials in GUI design - [URL="http://java.sun.com/docs/books/tutorial/ui/index.html"]This one[/URL] is probably a good place …

Member Avatar for sciwizeh
0
90
Member Avatar for ryy705

Try sending an email with only addresses in the BCC field (ie none in the To or CC fields) and when it is delivered each address will appear in the To field, but only the recipient's will be displayed.

Member Avatar for mexabet
0
95
Member Avatar for max2me99

Your DB structure looks ok, except that I would probably just sort by name and remove the sort_name field. Your SQL query will look something like: [code=sql] SELECT * FROM table_ads INNER JOIN table_categories ON table_ads.category_id = table_categories.id WHERE table_ads.active = true ORDER BY name [/code] Might need a bit …

Member Avatar for max2me99
0
107
Member Avatar for ncognito66

Couple of quick points: ID fields should never be a text field. Use Unsigned INT or something similar. This helps efficiency and referential integrity of your tables. Think about maybe consolidating the three columns Dayofweek, Timeslot and AMPM into one column, TimeOfDay, and making it a smalldatetime field, which is …

Member Avatar for ncognito66
0
115
Member Avatar for zyaday

[QUOTE=zyaday;650615] [code] 14: String imageText = null; 15: imageText = getParameter("image"+i); 16: if (imageText != null) { [/code][/QUOTE] The next line will only run if imageText is not null, so your call to getParameter method must return something. I would suggest putting in a println statement to see what the …

Member Avatar for darkagn
0
91
Member Avatar for ishlux

This is a generic function to return a specific field ($field) from a table ($tble) in a MySQL database. The exact record returned is specified by the parameter $whr. So your call: [code=php] $msgcount = getdata("messages", "count(*)", "status=0"); [/code] will result in the parameter $msgcount being the result of the …

Member Avatar for darkagn
0
106
Member Avatar for sushantlikhar

The only thing I would say is that since you have a Foreign Key in Amount called Invoice_id, you will need to update the Invoice table before the Amount table. If you try to insert into Amount table for an invoice that you haven't entered into the Invoice table, you …

Member Avatar for sushantlikhar
0
142
Member Avatar for ishlux
Member Avatar for odysseous
Member Avatar for odysseous
0
105
Member Avatar for MxDev

[URL="http://www.esus.com/docs/GetQuestionPage.jsp?uid=1326"]This link[/URL] contains an example of how to do what you are trying to do. Basically the author overrides the components paintComponent() method and inserts a numbering system in the left Inset of the area. Hope this helps, darkagn

Member Avatar for darkagn
0
49
Member Avatar for steveg1965

Hi Steve and welcome to Daniweb, Good to see another fellow Australian in the mix. I can offer some advice for numbers 2 and 3... For 2, take a look at the [URL="http://phpgacl.sourceforge.net/"]GACL package[/URL], which is a very powerful tool that deals with security and permission levels for your site. …

Member Avatar for steveg1965
0
99
Member Avatar for diasmvds

There may be a better solution out there, but what about if you did a transpose whenever the user rotates their image to make sure the origin is kept above and to the left of the top-most and left-most areas of the drawing?

Member Avatar for Ezzaral
0
133
Member Avatar for CoolGamer48
Member Avatar for CoolGamer48
0
106
Member Avatar for regent_royal

I'm sorry regent_royal, what was the question? If you want to know how to display that HTML that you have posted in a JEditorPane its just a matter of assigning all of that HTML text via a call to the component's setText() method.

Member Avatar for Ezzaral
0
166
Member Avatar for diasmvds

You need to call Graphics2D.setStroke(Stroke) method before drawing a line. You will need to create a Stroke first - use the BasicStroke class for now. Also, don't forget to reset the stroke after you have drawn your line.

Member Avatar for sanaulla123
0
2K
Member Avatar for c++ prog

[url]www.php.net[/url] is probably a good place to start. This site has some really good documentation and sample code. Of course, if you get stuck there is also DaniWeb :)

Member Avatar for ditty
0
133
Member Avatar for k_en

StringBuffer is certainly better in handling lots of operations than a normal String and can handle the same number of characters as a String. It is also completely thread safe. However if you are using JDK 5 or later, you might want to think about using a StringBuilder if system …

Member Avatar for Ezzaral
0
81
Member Avatar for hassanalvi1989

Hi hassanalvi1989, welcome to DaniWeb. What language were you thinking of doing this in? Have you done anything so far that we can comment on? What AI principles will you use? Cheers, darkagn EDIT: Sorry, I didn't look at the title. C++ is your language of choice?

Member Avatar for Nick Evan
0
143
Member Avatar for C41R0

Use e.getSource() to determine where to copy / paste to / from rather than mPane.field. For example, your PasteActionAdapter.actionPerformed method should be: [code=java] public void actionPerformed(ActionEvent e) { e.getSource().paste(); } [/code]

Member Avatar for C41R0
0
121
Member Avatar for bops

Could you just put a simple if-statement in your mouseExited method? [code=java] public void mouseExited(MouseEvent e) { if (e.getSource() != this.closeButton) { // do your current code here } } [/code]

Member Avatar for Ezzaral
0
575
Member Avatar for PL.P27

I would convert letter to a char and then compare that char with your charArray word using [code=java] for (int i=0; i<array.size(); i++) { if (letter.charArray[0] == array[i]) { // the letter is at position i } } [/code]

Member Avatar for Futbol10
0
131
Member Avatar for gptArun

Do you have a database on the local server called 'example'? And is there a user called 'root' with a password 'root' that has access to that database? Try testing this by connecting to the example database with that username/password in mysql and see if it works that way. Your …

Member Avatar for darkagn
0
215
Member Avatar for napper_1337

Hi napper_1337 and welcome to DaniWeb, Can you please post your code for index.php for the lines near 142? Say 140-150 so we can see what is going on?

Member Avatar for shadiadiph
0
67

The End.