889 Posted Topics

Member Avatar for ilokana

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, …

Member Avatar for php-freelancer
0
461
Member Avatar for darkagn

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 …

0
99
Member Avatar for drewtemp

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 …

Member Avatar for darkagn
0
124
Member Avatar for Alishaikh

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 …

Member Avatar for ~s.o.s~
0
117
Member Avatar for Aamit

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 …

Member Avatar for darkagn
0
102
Member Avatar for cVz

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 :)

Member Avatar for darkagn
0
67
Member Avatar for lulusweety

[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 …

Member Avatar for haider_up32
0
155
Member Avatar for sleign

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 …

Member Avatar for sikka_varun
0
2K
Member Avatar for AsinuS

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...

Member Avatar for darkagn
0
76
Member Avatar for ebyong77

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 -- …

Member Avatar for darkagn
0
65
Member Avatar for BestJewSinceJC

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 …

Member Avatar for masijade
0
140
Member Avatar for squarkman

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]

Member Avatar for darkagn
0
85
Member Avatar for CodeBoy101

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 …

Member Avatar for darkagn
0
186
Member Avatar for mrjoli021

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 …

Member Avatar for darkagn
0
164
Member Avatar for zoroman

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.

Member Avatar for zoroman
0
536
Member Avatar for Tom Tolleson

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 …

Member Avatar for Tom Tolleson
0
124
Member Avatar for Venom Rush

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 …

Member Avatar for digital-ether
0
159
Member Avatar for tuse

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 …

Member Avatar for tuse
0
215
Member Avatar for mgn2683

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 …

Member Avatar for mgn2683
0
119
Member Avatar for dnmoore

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.

Member Avatar for dnmoore
0
153
Member Avatar for mrjoli021

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.

Member Avatar for BestJewSinceJC
0
255
Member Avatar for bimpok

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 …

Member Avatar for stultuske
0
138
Member Avatar for cwarn23

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 …

Member Avatar for cwarn23
0
474
Member Avatar for ming97

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.

Member Avatar for darkagn
0
94
Member Avatar for Spartan552

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.

Member Avatar for Spartan552
0
99
Member Avatar for xyster

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 …

Member Avatar for xyster
-1
86
Member Avatar for program_writer

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.

Member Avatar for darkagn
0
82
Member Avatar for ndeniche

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.

Member Avatar for ndeniche
0
107
Member Avatar for Aashath

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 …

Member Avatar for darkagn
0
120
Member Avatar for babusek

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 …

Member Avatar for babusek
0
854
Member Avatar for darkagn

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 …

Member Avatar for darkagn
0
204
Member Avatar for wiesiek
Member Avatar for wiesiek
0
147
Member Avatar for RahulV

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?

Member Avatar for varmadba
0
62
Member Avatar for jee85

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

Member Avatar for darkagn
-1
417
Member Avatar for god_1896

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?

Member Avatar for mangel.murti
0
280
Member Avatar for XPlus

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]

Member Avatar for HazardTW
0
100
Member Avatar for marcux

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.

Member Avatar for darkagn
0
100
Member Avatar for scream2ice

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 …

Member Avatar for scream2ice
0
261
Member Avatar for mrcniceguy

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.

Member Avatar for mrcniceguy
0
99
Member Avatar for jadamus

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?

Member Avatar for darkagn
0
65
Member Avatar for nanna

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 …

Member Avatar for javaAddict
0
162
Member Avatar for threebluIdboys

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]

Member Avatar for threebluIdboys
0
116
Member Avatar for MissPheth

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...

Member Avatar for R0bb0b
0
191
Member Avatar for cproud21

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]

Member Avatar for darkagn
0
87
Member Avatar for threebluIdboys

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!

Member Avatar for threebluIdboys
0
88
Member Avatar for rtrader
Member Avatar for Hockeyfreak889

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.

Member Avatar for masijade
0
72
Member Avatar for martingavin21

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 …

Member Avatar for darkagn
0
95
Member Avatar for ezkonekgal

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...

Member Avatar for ezkonekgal
0
222
Member Avatar for Stivi

I think it may possibly be out of beta now - that post is almost 2 years old... :P

Member Avatar for leegeorg07
0
128

The End.