Search Results

Showing results 1 to 40 of 179
Search took 0.05 seconds.
Search: Posts Made By: darkagn
Forum: Java Nov 17th, 2009
Replies: 3
Views: 610
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 Nov 16th, 2009
Replies: 7
Views: 346
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: MySQL Nov 13th, 2009
Replies: 2
Views: 572
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 Nov 12th, 2009
Replies: 6
Views: 437
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 Nov 11th, 2009
Replies: 3
Views: 271
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 Oct 24th, 2009
Replies: 2
Views: 193
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: PHP Oct 15th, 2009
Replies: 6
Views: 880
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: PHP Oct 11th, 2009
Replies: 4
Solved: EOT With PHP
Views: 543
Posted By darkagn
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 Oct 10th, 2009
Replies: 2
Views: 391
Posted By darkagn
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 Oct 10th, 2009
Replies: 4
Solved: EOT With PHP
Views: 543
Posted By darkagn
What does EOT mean?
Forum: PHP Sep 18th, 2009
Replies: 8
Views: 351
Posted By darkagn
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 17th, 2009
Replies: 8
Views: 351
Posted By darkagn
$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 9th, 2009
Replies: 4
Views: 558
Posted By darkagn
Hi andym67 and welcome to DaniWeb :)

A better approach is this:

if(isset($_SESSION["namevalue"]))
$val = $_SESSION["namevalue"];
else
$val = "";
// maybe do some validation on $val...
Forum: PHP Sep 9th, 2009
Replies: 4
Views: 221
Posted By darkagn
Ah ok, so are all of your fields of type VARCHAR? Might be worthwhile changing to NUMERICs if you are going to be joining tables a bit, that is if that doesn't mess everything else up!
Forum: PHP Sep 9th, 2009
Replies: 4
Views: 221
Posted By darkagn
Are you sure that your $_SESSION['SESS_ORDERNUM'] is set correctly? Try echo'ing your sql statement before you send it to mysql_query and see...
Forum: PHP Sep 8th, 2009
Replies: 1
Views: 336
Posted By darkagn
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: DaniWeb Community Feedback Sep 7th, 2009
Replies: 74
Solved: Upgrade bugs
Views: 5,062
Posted By darkagn
>If you specify an invalid language, it defaults to using the one from the
>current forum. csharp is now invalid in favor of C#. For c++, you can do
>C++ or cpp.

code=php is not working in the...
Forum: PHP Sep 5th, 2009
Replies: 2
Views: 278
Posted By darkagn
Hi Mujahid158 and welcome to DaniWeb

The mysql_query function returns a result set resource for select queries. You can't access it in the way that you are attempting, you need to specify the...
Forum: PHP Sep 3rd, 2009
Replies: 3
Views: 385
Posted By darkagn
There are a few ways you can do this, but the simplest is probably to pass the variable via GET. To do this add the following line of code after you set $errorpas:

header("Location:...
Forum: Software Development Job Offers Aug 28th, 2009
Replies: 4
Views: 1,504
Posted By darkagn
And how about a recruitment company actually trying to find work with little or no work experience. Seriously, all you companies are the same.
Forum: PHP Aug 20th, 2009
Replies: 3
Views: 290
Posted By darkagn
I would have a single table, called user_pref, which would have the columns user_id, product_type_id, both of which would form the primary key for the table. If the user selects pets as a preferred...
Forum: PHP Aug 6th, 2009
Replies: 4
Views: 417
Posted By darkagn
$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: PHP Aug 3rd, 2009
Replies: 2
Views: 231
Posted By darkagn
Basically the way that it works is everything after the ? is a set of key-value pairs. So, if you need to find $_REQUEST["msg"] you need the URL to read http://xxxxx.php?msg=zzz

Hope this helps,...
Forum: Computer Science Jul 23rd, 2009
Replies: 9
Views: 1,068
Posted By darkagn
Hi Patrick,

Unfortunately it is not as simple as that. Different languages are better at different tasks. Most are designed to perform specific tasks at first and grow from there. Really what you...
Forum: PHP Jul 23rd, 2009
Replies: 2
Views: 227
Posted By darkagn
if(51 < $bal && $bal < 75)

This statement reads "if $bal is GREATER THAN 51 and LESS THAN 75". If you have $bal EQUAL to 51 it is not GREATER THAN 51. (Sorry for the shouting, but it is necessary...
Forum: PHP Jul 15th, 2009
Replies: 2
Views: 387
Posted By darkagn
You are overwriting your $sql variable with the second statement. Try running the first SQL statement before you set the $sql variable, or you could change your second statement to use a new...
Forum: PHP Jun 19th, 2009
Replies: 2
Views: 664
Posted By darkagn
There are two functions that you might find useful, in_array and array_search. Here is an example of their usage:

$employee = array();
$employee [] = array("name" =>"Chris Apple", "company" =>...
Forum: Java Jun 10th, 2009
Replies: 2
Views: 174
Posted By darkagn
I believe that Object one is your observer and objects two three and four would notify it when their data changes.

So Object one is your listener, the other objects are models in the explanation...
Forum: PHP Jun 1st, 2009
Replies: 4
Views: 558
Posted By darkagn
You can use a combination of the substr (http://au2.php.net/manual/en/function.substr.php) and strpos (http://au2.php.net/manual/en/function.strpos.php) functions to achieve this.
Forum: PHP May 26th, 2009
Replies: 6
Views: 4,137
Posted By darkagn
Hi nish123,

You will need to use two function calls for this, strtotime and date. First you use strtotime to convert your string to a unix timestamp, like so:

$time = strtotime( $date );
...
Forum: Java May 15th, 2009
Replies: 8
Solved: Need help
Views: 482
Posted By darkagn
readData is not a public variable, so you can't access it by myInput.readData. Try this for your Input class:

class Input{
private String readData;
Input() throws Exception {
readData =...
Forum: Game Development May 12th, 2009
Replies: 10
Views: 1,654
Posted By darkagn
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: Java Apr 22nd, 2009
Replies: 8
Views: 2,769
Posted By darkagn
The easiest way to do this is to extend JPanel and override the paintComponent method. When you override the paintComponent method, you should do the following:

public void paintComponent(...
Forum: PHP Apr 21st, 2009
Replies: 11
Views: 601
Posted By darkagn
If autoid is a numeric field, you don't need the ' marks around it in the SQL statement. If you remove them, the $id should be resolved.
Forum: PHP Apr 21st, 2009
Replies: 11
Views: 601
Posted By darkagn
Also, you will need to check that each field has been set. Use the isset method on each of your $_POST retrievals, like so:

if( isset( $_POST[ 'title' ]))
$titel = $_POST[ 'title' ];

Then...
Forum: PHP Apr 21st, 2009
Replies: 11
Views: 601
Posted By darkagn
Try echo'ing your update sql statement before you run the query. This way you can check the sql that is being run for the correct variables. Another good hint for debugging is to copy and paste that...
Forum: PHP Apr 21st, 2009
Replies: 11
Views: 601
Posted By darkagn
Should it update the TITLE if you change the YEAR?
Forum: PHP Apr 21st, 2009
Replies: 11
Views: 601
Posted By darkagn
<input type="hidden" value="$autoid">


The error is in this line, you have forgotten to name this field, so it can't find it in the $_POST array. Try changing to this:

<input type="hidden"...
Forum: MS SQL Apr 14th, 2009
Replies: 3
Views: 413
Posted By darkagn
Hi Somerston and welcome to DaniWeb :)

You will need to join to the employee table twice to get the name for each column. Something like this should work:

-- first select the columns required...
Forum: Java Apr 11th, 2009
Replies: 9
Views: 862
Posted By darkagn
Yes I have already mentioned that k2k can run their program as an applet. Do you know of any way that a java application (ie not an applet) can be run from an HTML link?
Showing results 1 to 40 of 179

 


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

©2003 - 2009 DaniWeb® LLC