Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

You can just echo the result of the function.
http://www.php.net/manual/en/function.mysql-affected-rows.php

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Help implies you making an effort and receiving assistance. I don't see that here. You just pasted the assignment.

Post code. Ask specific questions. If you are looking for someone to write this for you to hand in, look elsewhere.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Did you RTFM? http://msdn.microsoft.com/en-us/library/ms186862.aspx

Looks pretty straightforward

update [tablename] set [fieldname] = replace([fieldname],'.','')

Probably want to verify those results with a select before you run the update though.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Agreed. Moving to Javascript.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

>is there any way for me to update without re downloading
Nope.

>is there and reason to either?
Bug fixes and security updates.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Yes, I think this thread has probably served its time.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Google or perhaps "Similar Threads" listing.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

>same didnt even notice is was from 5 years ago since it was at the top
If you had read the responses to the thread though, you would have seen those last two before you and realized it was an old, dead thread.

It's always a good idea to actually read the thread before posting so that you have the full context of what has already been said.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

I doubt the OP is going to return after six years to post his classes. ;)

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

> Now say!
Now say what? That you're a nut who is just rambling on in a barely coherent fashion about some ill-conceived fantasy?

Consider it said.

happygeek commented: Arf arf! +0
Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

What? Your request doesn't make sense.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Google was far from the first search engine. Look up Archie, Gopher, WebCrawler, Lycos, etc. There were many before Google came along and took the crown.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

That will remove all zeros though, regardless of position. Is that what you intend? replaceAll("^0*", "") will remove just the leading ones.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

It looks to me like you could just loop until you have read the line

Date,Withdraw/Deposit,Amount,Current Balance

and then set a boolean flag that all lines after that one are kept.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

No, the problem is that what you have written is not valid Java syntax. You cannot place commas in those expressions. What are you trying to do with those statements?

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

> but didn't found the code that use Microsoft Visual C++ 2010 Express Edition as a compiler
The point isn't to "found" the code - it's to write it. Make some effort, post your code, ask specific questions.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Sounds like you're trying to scam a pay-per-click service. If that's not the case, perhaps you can explain further?

codeorder commented: good insight. +1
Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Okay, this was scattered across 4 different threads. I have merged them into one. If you wonder why it seems a bit of a mess, that would be why.

Plang007, keep it in one thread in the future.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Here is one tool, but I've never used it personally:
http://one-jar.sourceforge.net/

It's not something that is generally done.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Put the println() statements after your while() loop if you just want to see the final result after the player turn.

private void waitForCompletePlayerSequence()
    {
        do
        {
            // these if you want to update as letters are clicked
            System.out.println("player sequence " + playerSequence);
            System.out.println("sequence length" + simonSequence.size());
            System.out.println("player length " + playerSequence.size());

            System.out.println("in waitForcompletePlayerSequence loop");
            Utility.pause(500);//note this is in the main thread
        }
        while (playerSequence.size() < simonSequence.size());

        // these if you want to see the final result
        System.out.println("player sequence " + playerSequence);
        System.out.println("sequence length" + simonSequence.size());
        System.out.println("player length " + playerSequence.size());
    }
Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

I'm not sure why you are setting up all that other stuff with the values from args. It sounds like all you need to do is loop over the args, convert them to numbers and add them up.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Are you just wanting it to update as the wait loop runs? Move it into the loop

private void waitForCompletePlayerSequence()
    {
        do
        {
            System.out.println("player sequence " + playerSequence);
            System.out.println("sequence length" + simonSequence.size());
            System.out.println("player length " + playerSequence.size());
            System.out.println("in waitForcompletePlayerSequence loop");
            Utility.pause(500);//note this is in the main thread
        }
        while (playerSequence.size() < simonSequence.size());
    }
Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

arrayLength needs to be an int.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Without the use of special class loaders, you can't put all of your jars into a single jar.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

You need an explicit cast to int

int b = (int)a;
Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

404

@Agarsia: Why are you subtracting when you are on team A? Team A adds :P

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Nidhish, please do not make multiple threads for the same question. You already have another thread for this:
http://www.daniweb.com/forums/thread349208.html

I am closing this thread. Please direct further discussion to the other thread.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Just to clear up the confusion: Yes, this thread has been moved from PHP to Javascript.

Carry on :)

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

So did you actually have a question about this code?

AndreRet commented: Nice HR here, thanks. +6
Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

You can view that thread again now. There was a post in the middle that was causing a parsing problem. I deleted it and it's fine now.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Edit: Never mind, answered my own question.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

You code won't even compile. How do you know the result?

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

There is also a doClick() method on buttons.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

So read the documentation.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

You could setOpaque(false); on the panel that you wish to be transparent. It depends on what layout you are using and how you are adding the components.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Use DecimalFormat

DecimalFormat df = new DecimalFormat("0000");
      int a=23;
      System.out.println(df.format(a));
Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Replace the println() statements in your catch blocks with exp.printStackTrace() calls so you can see exactly which line is causing the error.

I don't see anything specifically wrong with your code. I suggested the previous change because the Access ODBC driver is picky about re-reading values that have already been read.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Try changing your query call to this and see if it makes a difference

ResultSet rset = s.executeQuery("SELECT * FROM Customer");
Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Then you got a connection and the driver worked.

Invalid cursor state could be occurring if you tried to read a row value without calling next(). Post the code and the stack trace if you want a more definitive answer.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

You could try installing these standalone 64-drivers:
http://www.microsoft.com/downloads/en/details.aspx?displaylang=en&FamilyID=c06b8369-60dd-4b64-a44b-84b371ede16d

They will not install if you have 32-bit MS Office applications installed, which we do here where I work, so I was unable to try them out.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Or you can run the code under a 32-bit JVM. The 64-bit JVM will not find the 32-bit Access driver in ODBC, but a 32-bit installation will.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Capitalization matters in Java. Look up that function in the API.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

> I'm being serious here.
No you aren't. You are just wasting people's time.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

> and can someone also tell me how to make a topic go to solved?
You can click the "Mark this thread as solved" link under the heading "Has this thread been answered?" heading at the bottom of the thread.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Um, alright, so did you have a question?

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

A couple of things. In your KeyDemoFrame constructor, you're creating a completely separate JPanel.

public KeyDemoFrame(){
        window = new JPanel();
        window.setSize(400,400);
        window.setVisible(true);
        addKeyListener(this);

    }

You need to act upon the current instance of your custom KeyFrameDemo class instead. You also don't need the setSize() and setVisible() calls

public KeyDemoFrame(){
        addKeyListener(this);

    }

The size and visibility will be handled with your JFrame setup over in your main() method.

The other issue is that your KeyDemoFrame panel does not have the focus when you create it and you can't focus it by clicking on it. Your panel needs to have the focus to process your key events. To fix this, you have to request focus after the panel has been made visible.

public static void main(String[] args) {
        // TODO code application logic here
        JFrame window = new JFrame("A Window");
        KeyDemoFrame keyDemoFrame = new KeyDemoFrame();
        window.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        window.add(keyDemoFrame, BorderLayout.CENTER);
        window.setSize(400,500);
        window.setVisible(true);
        keyDemoFrame.requestFocusInWindow();
    }

Edit: It's also a good idea to specify EXIT_ON_CLOSE so your program terminates when you close the frame.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster
Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Initialize the variable to a default value, whichever would make more sense as a default for your usage.

Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

> Hope I wasn't too harsh.....
Harsh? No, not really - just clueless.

Please stop interjecting useless comments into other people's threads. This "advice" you seem compelled to give on a topic that you don't understand is not helpful.

jonsca commented: Youda man +6
Ezzaral 2,714 Posting Sage Team Colleague Featured Poster

Glad to hear it.