Search Results

Showing results 1 to 27 of 27
Search took 0.01 seconds.
Search: Posts Made By: DeepZ
Forum: Perl Oct 20th, 2009
Replies: 6
Views: 562
Posted By DeepZ
Hmm, weird. Putting a $i = 0; after line 67 (instead of at line 52, but works there also) did the trick for me. And from the posting i saw that the $i = 0 you put in at line 52 also prevents the...
Forum: Perl Oct 20th, 2009
Replies: 6
Views: 562
Posted By DeepZ
Ah, found it i think.

You seem to be using $i as a 'end-of-record' indicator. When $i is set to 1, we have reached the end of the record and print the collected data into the outfile.

However,...
Forum: Perl Oct 19th, 2009
Replies: 6
Views: 562
Posted By DeepZ
$k is not initialised, as you have use strict.

for (my $k=0;$k<$n;$k==)

should do the trick.

Cheers.
Forum: Geeks' Lounge Jul 4th, 2006
Replies: 6
Views: 1,577
Posted By DeepZ
So i'm 'The Emperor' which sounds OK. (Hmm, need to update my chef about my newly aquired status.)
Nice, but what do i do with all that responsibility 8-)
Forum: Java May 29th, 2006
Replies: 9
Views: 1,647
Posted By DeepZ
Sttt. Don't let them in on the secret. 8-)
Forum: Java May 28th, 2006
Replies: 9
Views: 1,647
Posted By DeepZ
Were not all guru's. We all had to learn.
Forum: Java May 28th, 2006
Replies: 9
Views: 1,647
Posted By DeepZ
Oops, wrong key, we continue :

for (int count = 0; count < characters.length; count++) {
for (int c2 = 0; c2 < word.length(); c2++) {
if (word.charAt(c2) == characters[count]) {
...
Forum: Java May 28th, 2006
Replies: 9
Views: 1,647
Posted By DeepZ
OK, lets see. Starting from the main method you input a word and a letter and then for some reason create a array of strings, word.length strings long, and each string is set to "*".

I expect you...
Forum: Java May 27th, 2006
Replies: 9
Views: 1,647
Posted By DeepZ
OK, as i was bored i had a quick look.

In GuessWord.java you have :

private String[] hiddenWord = new String[word.length()];


This is a instance variable which is created as the...
Forum: Java May 8th, 2006
Replies: 14
Views: 5,045
Posted By DeepZ
Hi, back again (had a overheating CPU here, cooled down now 8-)

Do you still have a problem with the last code you posted.

I tried your code as below :

import java.io.*;
public class...
Forum: Java May 5th, 2006
Replies: 1
Views: 840
Posted By DeepZ
What's the exception and the sourcelines you have a problem with?
Forum: Java May 5th, 2006
Replies: 4
Views: 1,118
Posted By DeepZ
If your method2 needs to work on data in a variable defined/declared (or whatever) in method1 you need to pass it as a argument.

JWenting is right though, have a look at your design. It looks...
Forum: Java May 3rd, 2006
Replies: 14
Views: 5,045
Posted By DeepZ
Well, the JVM is telling you that the last 4 characters of your string are not a number. So....
Forum: Java May 3rd, 2006
Replies: 4
Views: 1,058
Posted By DeepZ
Right you are.
As far as i can see you are missing a closing brace just before public void makedeposit, leading the compiler to think you are defining a method inside another method.

Tnx
Forum: Java May 3rd, 2006
Replies: 1
Views: 1,817
Posted By DeepZ
I assume you have problems with this bit :

class MenuListener implements ActionListener{
public void actionPerformed (ActionEvent e){
if(e.getSource() == displaySchedule){
...
Forum: Java May 3rd, 2006
Replies: 6
Views: 4,518
Posted By DeepZ
I think the problem is that :

public void Complex(double x, double y)


is not a constructor. A constructor does not have a return type, and yes, even void is a return type.

Change to :
...
Forum: Java May 3rd, 2006
Replies: 4
Views: 1,118
Posted By DeepZ
The easiest way for this, and i think the most used, is to create an instance of your class and run the methods using that.

So it would be something like :

public class Schedule {

Vector...
Forum: Java Aug 13th, 2005
Replies: 9
Views: 2,080
Posted By DeepZ
Well, there may be enough physical memory but the JVM is probably not using it all. Normally the JVM does not allocate all available memory to the heap.:)

If you use JDK1.5, you could use...
Forum: Java May 6th, 2005
Replies: 15
Views: 5,652
Posted By DeepZ
How about this kludge (not tested at all, so...):

if (jta.getText().length() > 0) {
jta.insert("Some text",jta.getText().length()-1); // add the new text before the linefeed.
} else {
...
Forum: Java May 3rd, 2005
Replies: 15
Views: 5,652
Posted By DeepZ
From the top of my head, you should set the caret position after you update the text :
jta.append("Some text!");
jta.setCaretPosition(jta.getText().length()); Have fun.
Forum: Java Apr 2nd, 2005
Replies: 5
Views: 2,678
Posted By DeepZ
I was more thinking along these lines : (Quick kludge on the lastFactor > 0 test but ok) :


import java.io.*;
import java.util.*;
public class Factorizer
{
public static void main(String[]...
Forum: Java Apr 1st, 2005
Replies: 5
Views: 2,678
Posted By DeepZ
What you would need to do (from the top of my head) is to see if the lefthand factor (i in your example) matches the previous righthand factor (j in your ex.).

As soon as i matches the j, we are...
Forum: Java Mar 23rd, 2005
Replies: 5
Views: 3,136
Posted By DeepZ
No problem. I'll try and give you a better idea of the workings (just the code, sketchy, in the main method, i have left out the class defs etc.):


for (int x = 1; x < 13; x++) { // Could also...
Forum: Java Mar 23rd, 2005
Replies: 5
Views: 3,136
Posted By DeepZ
:?: Unless i am missing something, this code will only print :
On the 1 day of xmas my true love gave to me,
On the 2 day of xmas my true love gave to me,
etc... , as the switch statement is...
Forum: Java Mar 11th, 2005
Replies: 3
Views: 3,053
Posted By DeepZ
You provided a constructor (Which btw should have method brackets behind it) but you do not create an object of the class, so there are no variables to work with.

What you want is something like...
Forum: Perl Sep 1st, 2004
Replies: 2
Views: 5,245
Posted By DeepZ
:sad: This usually means that the cgi script does not print anything, so probably it is generating an error. I would guess it cannot find the lib.

:!: If you use CGI::Carp, you can show the CGI...
Forum: Java Sep 1st, 2004
Replies: 1
Views: 17,447
Posted By DeepZ
Sounds easy, but...

Two options :
A] Use Java2 Version 1.5. The option seems to be included there.
B] Use a WindowListener handler for the WindowDeactivated event and call the toFront() method...
Showing results 1 to 27 of 27

 


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

©2003 - 2009 DaniWeb® LLC