Search Results

Showing results 1 to 40 of 787
Search took 0.05 seconds.
Search: Posts Made By: darkagn
Forum: Java 3 Days Ago
Replies: 3
Views: 212
Posted By darkagn
Yep that works too, my example was to show you the method behind the madness :P
Forum: MySQL 3 Days Ago
Replies: 2
Views: 171
Posted By darkagn
I don't believe that you need a profile_id, just use the user_id as the key in the profiles table. When you create a new user, insert a record into both tables. When you delete a user's account,...
Forum: Java 4 Days Ago
Replies: 3
Views: 212
Posted By darkagn
Instead of:

you want to call join like so:

// build a char array containing the three characters you tried
char[] chars = new char[3];
chars[0] = 'a';
chars[1] = 'b';
chars[2] = 'c';
//...
Forum: Java 4 Days Ago
Replies: 7
Views: 170
Posted By darkagn
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: MS SQL 4 Days Ago
Replies: 2
Views: 192
Posted By darkagn
Use the SUBSTRING function.

SELECT SUBSTRING(ImageLink, 2, 100) FROM TheTable -- the 2 indicates start at index of 2, the 100 will give you the next 100 characters in the string "ImageLink"
Forum: MySQL 5 Days Ago
Replies: 1
Views: 187
Posted By darkagn
You can simply pass the Count to the Max function like so:

select max(count(ProgramType)) as MAXCOUNT
from credential_state
group by ProgramType
Forum: MySQL 6 Days Ago
Replies: 3
Views: 289
Posted By darkagn
Ah ok, sorry I misunderstood what you were trying to do.

The SUBSTR() function might be able to help.

SELECT TARIFF FROM RATES WHERE COUNTRYCODE = SUBSTR(<phonenumber>, 0, 3)

You probably...
Forum: MySQL 7 Days Ago
Replies: 3
Views: 289
Posted By darkagn
Looks like COUNTRYCODE is a VARCHAR(3) (that is a maximum of 3 character string) so I don't think you can store the Bahamas code in that field. However if you want all country codes that start with a...
Forum: PHP 7 Days Ago
Replies: 4
Views: 206
Posted By darkagn
Not sure if this is your problem, but I think you may need a <body> tag between your <html> and <table> tags.
Forum: Java 7 Days Ago
Replies: 2
Views: 151
Posted By darkagn
In order to run a method that takes an array of integers and returns their sum, your method will need the following signature:

public static int sumArray(int[] anArray)

Then, instead of having...
Forum: MySQL 7 Days Ago
Replies: 2
Views: 265
Posted By darkagn
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: PHP 7 Days Ago
Replies: 6
Views: 304
Posted By darkagn
Actually PHP does support the switch statement, the original poster was just using it incorrectly. A simple example of a PHP switch statement might be:

// get the mode of operation from the URL...
Forum: PHP 9 Days Ago
Replies: 6
Views: 304
Posted By darkagn
You can't use a switch statement like the way you are attempting. Try changing those switch statements to if-else statements and you should be fine.
Forum: PHP 9 Days Ago
Replies: 1
Views: 124
Posted By darkagn
There are lots of free site map generator tools out there. One of the most popular ones is Google's phpSitemapNG. Here (http://enarion.net/google/phpsitemapng/) is a link to the home website for this...
Forum: PHP 10 Days Ago
Replies: 3
Views: 163
Posted By darkagn
The line:

new Cite;

means that there needs to be a class called Cite, not a file called Cite.php. Even if there was a Cite class, the code in the wfCite function wouldn't need that line as it...
Forum: PHP 10 Days Ago
Replies: 4
Views: 176
Posted By darkagn
The call to mysql_query returns true if it is successful, false if it is not. You can therefore call it inside the condition of an if-statement. I believe you can do that in C++ too if the function...
Forum: Java 13 Days Ago
Replies: 4
Views: 192
Posted By darkagn
Yes, that looks good to me. So let's look at what you need to do for your countOneLetter method. The method signature will look like this:

public int countOneLetter(File inputFile, char...
Forum: Java 13 Days Ago
Replies: 2
Views: 119
Posted By darkagn
I believe it is possible to set a flag to generate javadoc for private/protected fields and methods. I think its -private or something like that. Google might be able to help you some more on that.
Forum: Java 13 Days Ago
Replies: 13
Views: 458
Posted By darkagn
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: Java 13 Days Ago
Replies: 2
Views: 167
Posted By darkagn
I think if you remove the line

traverseInOrder.successor.predecessor = newNode

your algorithm will be correct. Remember, node.successor.predecessor should always equal node unless node is the...
Forum: Java 13 Days Ago
Replies: 4
Views: 193
Posted By darkagn
Hi Ballen92 and welcome to DaniWeb :)

What's the error message you get? If I had to guess on the information you've given us, I would say that the method addKeyListener is not defined for your...
Forum: Java 14 Days Ago
Replies: 4
Views: 192
Posted By darkagn
Sorry hedwards09, we can only give homework help to those that make an attempt first. Can you post what you have so far with the specific problems you are having? If you haven't started coding yet,...
Forum: PHP 14 Days Ago
Replies: 3
Views: 164
Posted By darkagn
Sorry for the late reply, I was at work and got distracted doing, well work :P Well your code looks ok to me, could it be that the problem lies in user_list.php with retrieving the $_GET["message"]...
Forum: PHP 15 Days Ago
Replies: 3
Views: 164
Posted By darkagn
Has your session started correctly before the call to your function? Check by echo'ing $_SESSION["Last_Page"] and make sure it's what you expect.

What error message do you generate?
Forum: Java 26 Days Ago
Replies: 1
Views: 473
Posted By darkagn
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 28 Days Ago
Replies: 2
Views: 197
Posted By darkagn
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 28 Days Ago
Replies: 2
Views: 177
Posted By darkagn
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 29 Days Ago
Replies: 2
Views: 588
Posted By darkagn
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 29 Days Ago
Replies: 3
Views: 434
Posted By darkagn
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 29 Days Ago
Replies: 1
Views: 162
Posted By darkagn
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 29 Days Ago
Replies: 1
Views: 124
Posted By darkagn
Hi intet,

We only give help to those who show some effort. What have you tried so far?
Forum: Java 31 Days Ago
Replies: 6
Views: 407
Posted By darkagn
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 31 Days Ago
Replies: 1
Views: 341
Posted By darkagn
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 33 Days Ago
Replies: 6
Views: 320
Posted By darkagn
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 34 Days Ago
Replies: 1
Views: 152
Posted By darkagn
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 Oct 16th, 2009
Replies: 2
Views: 243
Posted By darkagn
This section is commented out:

<?
$host="localhost"; // Host name
$username="root"; // Mysql username
$password="brijpuja1"; // Mysql password
$db_name="newsumo"; // Database name...
Forum: PHP Oct 15th, 2009
Replies: 6
Views: 630
Posted By darkagn
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 Oct 14th, 2009
Replies: 1
Views: 339
Posted By darkagn
Try this:

$query2 = "SELECT tblclasslist.studentNo FROM acumenchain.tblclasslist JOIN acumenchain.tblregistration ON tblclasslist.studentNo = tblregistration.studentNo JOIN acumenchain.tbllogin ON...
Forum: MySQL Oct 12th, 2009
Replies: 3
Views: 343
Posted By darkagn
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 Oct 11th, 2009
Replies: 2
Views: 199
Posted By darkagn
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...
Showing results 1 to 40 of 787

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC