889 Posted Topics
Re: Hi ilokana and welcome to DaniWeb :) I'm not sure exactly what you are trying to do here? Do you want to create a drop-down box that when the user selects an option it automatically redirects them to a selected link? Why do you not want a Submit button? Regards, … | |
Hi all, I am currently writing a spell checker that needs to suggest corrections for a mis-spelled Suburb/Locality in a Post Code/Zip Code lookup site. All of the suburb names are stored in a database in the Postcodes table and I was wondering if I could use the Pspell library … | |
Re: Using your example, the following query should work: [code=sql] -- get the required columns using aliases where necessary SELECT e.id AS entry_id, sf.id AS sections_fields_id, sf.name AS value -- from the entries table FROM entries e -- join to the section_fields table JOIN sections_fields sf -- describe how to join … | |
Re: The line [code=java] for(int i =0; i>15;i++) [/code] is incorrect. It says, start at i=0, and while i>15 do the following code and add one to i. If i starts at 0 it is never greater than 15, so the code will never execute. You have a similar error with … | |
Re: I'm sorry Aamit, but I am not sure what you are trying to achieve here. Do you want to add a column, change_id, to your table and have the existing rows have an auto-incrementing number assigned to the value in this column based on youngest to oldest? If that is … | |
Re: Something like this should work: [code=sql] -- set where to insert INSERT INTO Table_one (First_Name) -- select values to insert SELECT Name FROM Table_Two -- you may need to specify which ones from Table_two to insert -- using a WHERE clause [/code] HTH :) | |
Re: [url]http://en.wikipedia.org/wiki/Red_black_tree[/url] describes the difference in fairly good detail. The main difference between the two is in the worst case, where a BST can be as bad as O(n) for insertion, search and delete, but a red-black tree is O(log n) in the worst case for these operations. The article is … | |
Re: I would do something like this: [code=php] if ( is_set( $_POST[ "newName" ])) { $displayName = $_POST[ "newName" ]; // add quotes here $displayName = "'$displayName'"; } // otherwise $displayName is not set ie is NULL // ... //UPDATE OLD MESSAGE // don't insert quotes in $displayName here // because … | |
Re: Hi AsinuS and welcome to DaniWeb :) Can you post the query you are using to insert the xml? Also table information might help us to solve your problem too. We'll start there (at the most basic possible problem) and work our way out... | |
Re: You can use a JOIN to do this. You need to select the rows from each table, then describe how rows are related. Such a query will look something like this: [code=sql] -- select rows select Products.ProductID, Products.Description, Products.Value, StockOnHand.QtyInStock -- from each joined table from Products join StockOnHand -- … | |
Re: I think StringBuffer might be the other String__ class you were referring to. Both the StringBuilder and StringBuffer class are better at concatenation than the base String class. StringBuilder will out-perform StringBuffer (although both are highly efficient at concatenation) but note that StringBuilder does not guarantee synchronisation, meaning that you … | |
Re: Your first line [code=php] $msbody = ; [/code] doesn't do anything. What you want is this: [code=php] $msgbody = "Referred by = " . $referredby; $msbody .= "<br>"; $msbody .= "Your Full Name = " . $fromname; // etc [/code] | |
Re: The COUNT function will return the number of rows returned by the query which is what I think you are trying to do. The COUNT function requires a column to count as a parameter, so your query will look something like this: [code=sql] select COUNT(name) as number_sold from beats where … | |
Re: Take a look at the Runtime class. You can use its exec method to run a ping and the resulting Process has methods to allow you to obtain the I/O/E streams. This allows you to interpret the results of your ping, but note that there are differences in the ping … | |
Re: Hi zoroman, Sorry but we aren't allowed to just do your homework for you. Perhaps you could show us what you've tried or discuss how you think the problem should be tackled. We would love to help, but we need to see some effort first. | |
Re: I would have another table, related_wigets, with the following structure: widgetid (number, PK, FK) related_widgetid (number, PK, FK) When someone wants to relate widget with widgetid = 1 to widget with widgetid = 2, do an insert like so: [code=sql] insert into related_widgets (widgetid, related_widgetid) values (1, 2) [/code] When … | |
Re: The idea behind an abstract class is that you can define some common functionality of a set of similar classes, but leave other details up to the implementing (extending) classes. In a way they are similar to interfaces, except that you can actually implement some of the functions in the … | |
Re: I think this may be to do with permissions on the folder. Your permissions are not the same as php's permissions. The fix depends on what server you are using, but in a Linux server you can use a chmod command on the directory to change the permissions. You need … | |
Re: No 1 should be fairly straight forward using the $_GET array. You can set a variable in their response in the Insert screen, and retrieve it in the Update screen if it is set. (see the isset() function in the PHP doco for examples on how to do this). The … | |
Re: The problem here is that you can't see the fName parameter from the toString() method. This is because fName belongs to the Individual class, not the IndividualArray class. I think that you should remove lines 33-35 since you are outputting your list of Individuals one by one after that anyway. | |
Re: I think you would find it easier to read the input into a String and use the charAt() method to read each char in the String. | |
Re: The first thing you should do is work out EXACTLY what you want your program to do. Your explanation is still a little "fuzzy" on the details (pardon the pun!) Then go through and find all the unique nouns (things) in your detailed description - this will give you a … | |
Re: First of all, you need to call your file "filename.[B]java[/B]" not filename.class. When you compile the java source file a class file will be created that you can run in a Command prompt or Unix Console (not a browser) by typing [code] java filename [/code] Otherwise your code should work … | |
Re: You are using the value "X" in the .equals(Object) method which expects an Object as a parameter. It would be better if you declared your "X" as a constant String or char and compared the variable mark to that instead. | |
Re: Put all of your components that you want to group into a JPanel and set a border around it. Something like TitledBorder should suffice, although if you want to get really fancy try a CompoundBorder. Then you just add the JPanel to your JFrame where you want. | |
Re: Are you allowed to change the constructor signature in the second GUI? If so, probably the easiest way to achieve what you are after is to pass a reference for the original GUI in the second GUI's constructor and use that reference in the second GUI's addClick() method to callback … | |
Re: Take a look at the Java API for the java.io package which you will need a solid understanding for to accomplish your task. The Java API can be found [URL="http://java.sun.com/javase/6/docs/api/"]here[/URL]. [URL="http://java.sun.com/docs/books/tutorial/essential/io/fileio.html"]This tutorial[/URL] will probably prove useful to you too. | |
Re: The KeyEvent class has constants for each of the F-keys. You can use a KeyAdapter to listen for a key press, although this is an abstract class so of course you will need to write your own extension. Check out the API on both of these classes for more details. | |
Re: When you say it's not working, are you getting an error message? Does the string "Came in" print? If the answer is no to both questions then there are no Room objects in your LinkedList. Try a call to roomList.size() to see how many are Room objects exist in your … | |
Re: So your permissions on that folder are not correct. Can you type [code] ls -l -a [/code] in your Cygwin window and check the permissions of your folder? It's the part that looks like [code] rwxr--r-- [/code] The permissions relate to your permission, your group's permission and other permissions. If … | |
Hi all, I wanted to ask if it is a good idea to install PHP on a windows XP machine running IIS? A lot of the documentation I have read talks about Windows 2000 Server with IIS, but not XP. At work I run PHP on a Linux-like platform (FreeBSD … | |
Re: You need to backup the database and then the .bak file that is created can be restored on another PC quite easily. Are you using SQL Management Studio? | |
Re: Where in the class myFinalToolkit is the computeColorSampleImage(BufferedImage, int, int) method? I can't see it in the code that you posted, but that could be because you didn't use code tags :P | |
Re: I think what you need is to have some way of refreshing the lists according to user selection. This should be achievable using a Javascript function call when the user makes a selection. I'm not sure how to do this exactly, maybe ask your question in the Javascript forum? | |
Re: Start by setting $sort to some default value, say 0, before you try to retrieve it from the $_GET array. Then immediately before your while loop, you could do something like: [code=php] if ($sort != 0) { $result = $orderresult; } [/code] | |
Re: I'm not 100% sure, but I think you need to [code=java] import one.two.*; [/code] to import the two subpackage where the Show class resides. | |
Re: So a Stack is just a data structure that follows the Last In First Out rule (LIFO). This means that the last item placed on the stack (with an add or push method of some description) will be the next to be removed (by a call to a remove or … | |
Re: Couldn't you just have a status field in your message object? This could be used to determine whether a message has been read, unread, deleted, caught by spam filter etc. | |
Re: Hi jadamus and welcome to DaniWeb, Ah yes, good old IE. Unfortunately, IE is notorious for doing things differently to other browsers. Can you please post your menu code for us to look at to see if we can offer any hints? | |
Re: Hi nanna and welcome to DaniWeb :) You have a line that reads [code=java] do { [/code] If you remove that line I think this will solve your problem. Incidentally, a do-statement needs a condition at the end of it to let java know how long you want to do … | |
Re: First, make sure that the SQL file has statements that read like this: [code=sql] CREATE TABLE IF NOT EXISTS Example -- table definition goes here [/code] Then you actually need to run the mysql query by typing the following into a terminal: [code] mysql DB_Name < script.sql [/code] | |
Re: You need to escape all of your double quotes with the backslash character. There are a few on line 100 that are not escaped. This is causing the error on line 101. It might pay to double-check your other lines too... | |
Re: You need to write a toString() method for your TimerAT object that converts an instance to a String representation. Then you can just loop over the array and print each one using a call to [code=java] System.out.println( time[index].toString() ); [/code] | |
Re: Hi threebluldboys and welcome to DaniWeb :) The line [code=php] return mysql_query($query); [/code] comes before you have defined what $query is. It should probably come at the end of the function as it is returning something. Hope this helps and happy php'ing! | |
Re: Why do you need your inner class to be static? | |
Re: Check out the [URL="http://java.sun.com/javase/6/docs/api/"]Java API[/URL] for documentation on the KeyListener interface. This interface provides the necessary tools for listening for key presses. Depending on what you are trying to do though, it might be better to interrupt rather than listen for the key press. | |
Re: The way I see it is you need two groups of tables in your database, one for the seating and the other to record bookings. Your seating tables would be tables like Seat and SeatType that record the details of each seat in the venue, while the booking tables would … | |
Re: postfix = postfix + " " + (Integer.parseInt (symbol)); This line is attempting to change the entire string to a number, not just the number part of the string. The string "4+4" is not a number, even though the charAt(0) is a digit... | |
Re: I think it may possibly be out of beta now - that post is almost 2 years old... :P ![]() |
The End.