Forum: Java 9 Days Ago |
| Replies: 1 Views: 201 The line:
Criminal criminal = new Criminal(leftInput.name());
is trying to access the private variable leftInput which doesn't belong to your class. You only have access to the parameter e in... |
Forum: Java 11 Days Ago |
| Replies: 1 Views: 133 Hi bhoop and welcome to DaniWeb :)
There are tools out there that allow you to create an exe from a java application. However this defeats one of the main advantages of java, portability. You... |
Forum: PHP 11 Days Ago |
| Replies: 2 Views: 146 Try adding the following line to your script, anywhere after the line $dir = $documentroot . '/' . $username; but not inside the function:
rmdir_r($dir);
Basically, the code inside the function... |
Forum: MySQL 12 Days Ago |
| Replies: 2 Views: 343 You need to do this in two separate SQL queries. First, use a select statement to retrieve the location ID given the posted area. Then use this result as the location number when inserting to the... |
Forum: Game Development 12 Days Ago |
| Replies: 3 Views: 226 Hi erlene and welcome to DaniWeb :)
You have posted in the Game Development forum which is a forum for discussing game programming. I think you will have a better response from one of the tech... |
Forum: Java 12 Days Ago |
| Replies: 1 Views: 128 Your error message is telling you what has gone wrong with this line:
if (hours == 16 && minutes == 23)
Here you are trying to compare your variable hours which is a NumberDisplay object with... |
Forum: Java 12 Days Ago |
| Replies: 1 Views: 103 Hi intet,
We only give help to those who show some effort. What have you tried so far? |
Forum: Java 15 Days Ago |
| Replies: 6 Views: 300 Hi easyb and welcome to DaniWeb :)
You don't need to use Math.pow at all. Math.pow is used to find the power of a number. I wish that banks would pay interest exponentially but unfortunately... ;)... |
Forum: MySQL 15 Days Ago |
| Replies: 1 Views: 285 Hi Vikk and welcome to DaniWeb :)
Have you made an attempt at this query yet? If you post what you have done we might be able to see what you are trying to accomplish and give some pointers. |
Forum: Computer Science 16 Days Ago |
| Replies: 6 Views: 293 I studied scheme at university for a semester and I don't remember much besides lots and lots of brackets. Most of the problems I had with it all boiled down to the fact that I had unbalanced... |
Forum: PHP 17 Days Ago |
| Replies: 1 Views: 142 Hi raz0r and welcome to DanoWeb :)
Not sure exactly what you are trying to do, but the rand function will give you a random number. You can read more about the rand function here... |
Forum: PHP 19 Days Ago |
| Replies: 2 Views: 210 This section is commented out:
<?
$host="localhost"; // Host name
$username="root"; // Mysql username
$password="brijpuja1"; // Mysql password
$db_name="newsumo"; // Database name... |
Forum: PHP 20 Days Ago |
| Replies: 6 Views: 447 Hi catcoffee and welcome to DaniWeb :)
1) Can be achieved with a <input type='file'> in a PHP/HTML form. PHP then uses an array, $_POST, to retrieve all posted data and the $_FILE array to access... |
Forum: MySQL 21 Days Ago |
| Replies: 1 Views: 306 Try this:
$query2 = "SELECT tblclasslist.studentNo FROM acumenchain.tblclasslist JOIN acumenchain.tblregistration ON tblclasslist.studentNo = tblregistration.studentNo JOIN acumenchain.tbllogin ON... |
Forum: MySQL 22 Days Ago |
| Replies: 3 Views: 307 Not sure what DaniWeb's policy is, but for other forum-type sites that I have contributed to we kept all PM's, emails, forum posts in database tables. If the owner of the message deleted it (by... |
Forum: PHP 23 Days Ago |
| Replies: 2 Views: 186 From the PHP Documentation:
Try changing localhost to 127.0.0.1 and see if this fixes your problem. If not, try echo'ing mysql_error() instead of "fail" as this will give you more details as to... |
Forum: PHP 24 Days Ago |
| Replies: 3 Views: 271 Ok, so are you saying that your font doesn't work when you try to display text with PHP via an echo or print? How are you setting the font without using HTML or CSS? |
Forum: Java 24 Days Ago |
| Replies: 2 Views: 243 String number = Float.toString(number);
I think what you are trying to do is convert the number n to a string yes?
What I would do is this:
String number = new Float(n).toString();
Here... |
Forum: Java 24 Days Ago |
| Replies: 3 Views: 164 Your line:
while (i<=k)
is placed before k is properly initialised. I think you need a line inserted to receive the input that you are prompting for. That is similar to your line that reads:
... |
Forum: Java 24 Days Ago |
| Replies: 2 Views: 251 Hi ankiwalia and welcome to Daniweb :)
Your SQL syntax is incorrect. Instead of this:
String query="select username and password from Registeredusers";
Try this:
String query="select... |
Forum: PHP 25 Days Ago |
| Replies: 104 Views: 2,786 Lots of noobs have trouble connecting to a MySQL database and running queries, displaying results etc.
Another good tutorial might describe the differences between the popular browsers such as IE,... |
Forum: PHP 25 Days Ago |
| Replies: 3 Views: 271 |
Forum: Geeks' Lounge 25 Days Ago |
| Replies: 31 Views: 1,293 I remember when I was really young on the Apple II playing games like Taipan (which was a pirates / smuggling game) and Chivalry (where you were a knight who wandered the land and competed in... |
Forum: Java 29 Days Ago |
| Replies: 5 Views: 279 Somewhere in your code you are passing a null value when you can't. If I had to guess I would say your problem occurs somewhere near these lines of code:
URL url =... |
Forum: Computer Science 29 Days Ago |
| Replies: 4 Views: 425 1/2 is 0 remainder 1 because you have 0 whole divisions into 2. You are correct in saying that it is 0.5, but when doing a conversion between bases we deal only in whole numbers. |
Forum: PHP Sep 19th, 2009 |
| Replies: 2 Views: 302 Hi surf and welcome to DaniWeb :)
echo '<option value=\"$key\">$value </option>\n';
This line is your problem. Swap all ' with " and vice versa. The problem is that $value is not evaluated... |
Forum: PHP Sep 19th, 2009 |
| Replies: 11 Views: 454 Does a window open and the problem is that it is just blank? Or does no window open at all? Truly, I can't see what's wrong with your code, the syntax looks correct, maybe try echoing $row['id']... |
Forum: PHP Sep 18th, 2009 |
| Replies: 8 Views: 304 Yes that's right. This might help:
$results = mysql_query("SELECT a.column1, a.column2, a.column3 FROM table1 as a");
while(($nextRow = mysql_fetch_assoc($results)) !== false)
{
... |
Forum: PHP Sep 18th, 2009 |
| Replies: 8 Views: 683 For example, with CSV file format, each row of data is a row in the csv file and each column is separated by a comma. So what you need to do is this:
// let's say the report.php file has a table... |
Forum: PHP Sep 17th, 2009 |
| Replies: 8 Views: 683 Ok, that's what I meant from providing an export facility. From your original description I thought maybe you meant you want to convert your php source code to html or something.
So, your function... |
Forum: PHP Sep 17th, 2009 |
| Replies: 6 Views: 258 Have you tried the DOMDocument::getElementById() function? Can you post your coding attempt with the DOM parser please? |
Forum: PHP Sep 17th, 2009 |
| Replies: 8 Views: 304 $results is a resource that can be used to grab an array using any of the mysql_fetch functions:
while(($nextRow = mysql_fetch_assoc($results)) !== false)
{
$column1 = $nextRow["column1"];
... |
Forum: PHP Sep 17th, 2009 |
| Replies: 8 Views: 683 Hi lcyew and welcome to DaniWeb :)
Do you mean that you want to provide an export facility, or that you need to export your source code to those formats?
To provide an export facility you need... |
Forum: PHP Sep 16th, 2009 |
| Replies: 6 Views: 258 Hi Davros and welcome to DaniWeb :)
So are you trying to change the code that embeds the editor on the fly? If so, according to what criteria? I'm a little confused as to what you want to achieve. |
Forum: PHP Sep 16th, 2009 |
| Replies: 11 Views: 454 Try it like this perhaps?
echo "<input type=\"image\" src=\"ViewHotel.PNG\" name=\"image\" width=\"90\" height=\"24\" onClick=\"window.open('viewhotel.php?id={$row['id']}, 'mywindow',... |
Forum: PHP Sep 16th, 2009 |
| Replies: 1 Views: 146 Hi duckman_ca,
I'm fairly new to C# so I don't know xml.InnerText, but XML parsing in PHP is quite simple thanks to several libraries we have available. Take a look at SimpleXML or the standard... |
Forum: PHP Sep 16th, 2009 |
| Replies: 11 Views: 454 Hmm, I can't see what's wrong there, can you post the whole line of code please? Also, what is the error message you are getting when you run the code? |
Forum: PHP Sep 16th, 2009 |
| Replies: 11 Views: 454 Try this:
<?php
// php code here
?>
<!-- HTML code here -->
<input type='button' name='myButton' id='myButton' onClick="window.open('viewhotel.php?id=\'<?php echo $row['id'];... |
Forum: PHP Sep 15th, 2009 |
| Replies: 3 Views: 278 Personally I find it difficult to critique UML when I am not sure exactly what you are trying to achieve, but I'll give it a go. It looks good except for a couple of things that I noticed.
First... |
Forum: PHP Sep 15th, 2009 |
| Replies: 4 Views: 260 Using double quotes in PHP has many advantages, not the least of which is that all variables will be evaluated inside them. Consider the following code:
for($i=0; $i<10; $i++)
echo "$i ";
... |