Forum: MySQL 3 Days Ago |
| Replies: 5 Views: 678 Hi saher_omer,
In future, please start a new thread if your question is not directly related to the original poster's problems.
But to answer your question, there are many examples on the net... |
Forum: Java 13 Days Ago |
| Replies: 3 Views: 197 The main method in a java application has the following signature:
public static void main(String[] args)
If you are a beginner I would suggest starting with something a bit simpler than a... |
Forum: Java 23 Days Ago |
| Replies: 7 Views: 296 You type java Hi, there is no need to specify the ".class" to run your program. Also, you will need a main method in that class to run the program. |
Forum: MySQL 26 Days Ago |
| Replies: 2 Views: 506 In PHP the strtotime (http://au2.php.net/manual/en/function.strtotime.php) and date (http://au2.php.net/manual/en/function.date.php) functions might be useful to you. You can go:
for($i=0; $i<10;... |
Forum: Java 31 Days Ago |
| Replies: 15 Views: 632 Hi alreem,
We can only help you if you show that you have made some sort of an attempt. Do you have an algorithm or some code that you have tried? We may be able to point you in the right... |
Forum: PHP Oct 24th, 2009 |
| Replies: 2 Views: 188 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: Game Development Oct 23rd, 2009 |
| Replies: 3 Views: 610 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 Oct 20th, 2009 |
| Replies: 6 Views: 475 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 Oct 12th, 2009 |
| Replies: 3 Views: 376 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: Java Oct 10th, 2009 |
| Replies: 2 Views: 372 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 Oct 10th, 2009 |
| Replies: 2 Views: 355 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 Sep 8th, 2009 |
| Replies: 1 Views: 311 So is $title the title of a single RSS feed item? If so, you can do something like:
$count = 0;
foreach($rssFeedItems as $title)
{
if(empty($title))
echo ++$count; // a prepend... |
Forum: Computer Science Aug 20th, 2009 |
| Replies: 1 Views: 496 There are a few different types of SQL, but http://www.w3schools.com/sql/default.asp is a good site for general SQL knowledge. http://www.sql.org/sql-database/sql-tutorial/ is a good beginner's... |
Forum: PHP Aug 6th, 2009 |
| Replies: 4 Views: 382 $send="INSERT INTO mailbox SET
member_id='$memid',
user_name='$$_SESSION[user_name]',
user_id='$_SESSION[user_id]',
message='$message',
inbox='NEW',
subject='$subject',
... |
Forum: Game Development May 12th, 2009 |
| Replies: 10 Views: 1,624 When you say you suck at math, how bad is it? Are we taliking about not knowing advanced calculus and algebra, or not knowing your times tables? Who are you comparing yourself to?
This site... |
Forum: PHP Apr 7th, 2009 |
| Replies: 1 Views: 460 imagedestroy() is used to free memory assigned to an image resource stream. I haven't tried it out, but I assume it can be used to free any image resource stream created by the GD package.
By tmp... |
Forum: PHP Mar 23rd, 2009 |
| Replies: 3 Views: 617 I assume you want $nowdate to be a string. String concatenation in PHP uses a period character to join strings. This **should** work:
$nowdate = date('Y') . "-" . (date('Y') + 1); |
Forum: Java Mar 20th, 2009 |
| Replies: 9 Views: 401 In order to tell what parameters you need to pass to the method, you can look at the method signature. In your Pizza class, let's look at how the setSize method is described:
public void setSize... |
Forum: MySQL Mar 19th, 2009 |
| Replies: 1 Views: 614 I think in this situation you are better off explicitly joining the tables by account id. Like so:
SELECT COUNT(J.account) from JanTable J
INNER JOIN FebTable F
ON J.account = F.account
WHERE... |
Forum: Java Mar 11th, 2009 |
| Replies: 3 Views: 562 About 50% of my job is in documentation and technical support. There are many help authoring tools out there and in general you get what you pay for. http://hat-matrix.com/ might be able to help you... |
Forum: Oracle Mar 10th, 2009 |
| Replies: 3 Views: 929 Hi vimotaro,
Are you asking if you receive a record you want to update an existing one with the data in that received record? If so, you can do this quite easily by running a SELECT COUNT(*)... |
Forum: PHP Nov 24th, 2008 |
| Replies: 5 Views: 1,605 Yes, except that you don't have to define the code for Reptile::eat() because it is in the Animal class. If you wanted to change the way that the Reptile eats from the way that the Animal eats then... |
Forum: Java Nov 13th, 2008 |
| Replies: 4 Views: 422 Should zipCode belong to the Individual class or the IndividualArray class? I think it is a value relating to the Individual, not the list of Individuals. |
Forum: MySQL Oct 7th, 2008 |
| Replies: 5 Views: 1,024 First, make sure that the SQL file has statements that read like this:
CREATE TABLE IF NOT EXISTS Example
-- table definition goes here
Then you actually need to run the mysql query by typing... |
Forum: IT Professionals' Lounge Aug 7th, 2008 |
| Replies: 4 Views: 2,069 I think it may possibly be out of beta now - that post is almost 2 years old... :P |
Forum: PHP Jul 25th, 2008 |
| Replies: 2 Views: 456 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:
SELECT * FROM table_ads
INNER JOIN... |
Forum: PHP Jul 2nd, 2008 |
| Replies: 5 Views: 498 www.php.net 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 :) |
Forum: Java Jun 24th, 2008 |
| Replies: 8 Views: 3,173 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... |
Forum: PHP May 26th, 2008 |
| Replies: 7 Views: 1,454 Your problem is in the first if-statement:
if ($_FILES["userfile"]["size"] = 0)
You are using an assignment here rather than the comparator == as I think you mean. In PHP though, your... |
Forum: Java Jan 21st, 2008 |
| Replies: 3 Views: 3,379 Hi Akeem Amure and welcome to Daniweb :)
A couple of things before we start - please don't shout (by using all capitals) and there is no need to ask for help as soon as possible as we always try... |
Forum: Java Jan 13th, 2008 |
| Replies: 1 Views: 1,178 Rather than implementing the ActionListener in your class, it is probably better to add an ActionListener to your menu item. You can do this by
// Exit menu item
exitItem = new JMenuItem("Exit");... |
Forum: Java Dec 18th, 2007 |
| Replies: 13 Views: 1,504 dReg1 in the above code is an Accumulator, a register that is used to keep track of the result of the calculations. If you think about how a calculator works, you enter a number, press the operator,... |
Forum: Community Introductions Dec 15th, 2007 |
| Replies: 4 Views: 516 Hi and wecome fellow Aussie! (We are slowly taking over Daniweb) <insert evil laughter> :D |
Forum: Java Dec 15th, 2007 |
| Replies: 13 Views: 1,504 It looks to me like it is a flag to tell whether something has been inputted or not. If it hasn't, isFixReg is set to true, and pressing a number (for example) starts a new String. Otherwise,... |
Forum: Java Dec 11th, 2007 |
| Replies: 9 Views: 1,589 Ok I don't want to give it away, but the line String "type"; is not how you initialise a String. And it is in the wrong method.
You have moved the line Triangle T = new Triangle(); from where it... |
Forum: DaniWeb Community Feedback Dec 7th, 2007 |
| Replies: 39 Views: 3,051 I like the solved threads count. But maybe as a compromise the moderators/administrators of daniweb could have this info removed from their profiles? After all, they are moderators so we all know how... |
Forum: Java Dec 1st, 2007 |
| Replies: 9 Views: 1,260 Hi piers,
The problem is that you posted a huge chunk of code that any of your fellow students could copy easily by searching for "scanner" in google. I think that is what the person is implying... |
Forum: C++ Nov 15th, 2007 |
| Replies: 5 Views: 1,053 Hope this has helped,
darkagn |
Forum: Geeks' Lounge Nov 13th, 2007 |
| Replies: 14 Views: 1,749 I received the following email the other day and thought it was worth sharing. I chuckled but maybe it's just my stupid sense of humour... :twisted:
... |
Forum: Java Oct 7th, 2007 |
| Replies: 2 Views: 8,721 Hi Libran,
To help debug your code, try adding some println statements to gain a better understanding of what is going on. Please see my comments below.
import java.util.*;
import... |