Paul Clapham

Sheriff
+ Follow
since Oct 14, 2005
Paul likes ...
Eclipse IDE Firefox Browser MySQL Database
Vancouver, Canada
Cows and Likes
Cows
Total received
55
In last 30 days
1
Total given
105
Likes
Total received
2477
Received in last 30 days
25
Total given
581
Given in last 30 days
11
Forums and Threads
Scavenger Hunt
expand Rancher Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Paul Clapham

You're on the right track, it depends on your design. It looks like when you download the query data, you don't need to know the file path at that time. And I don't see anywhere that you do use the file path. But that's only because you (thankfully) haven't dumped the whole thing here. So the question for you us, does your design need to get the file path but not the query data for some use case? If so then there's definitely no need to execute the query and collect its data if that use case doesn't need the query data.
3 hours ago

Jake Smitch wrote:I am writing my program in Java to complete this task. But if you find that it is not suitable in the "Java in General" forum because it involves a windows command, then by all means move my post to a more appropriate section. Thanks.



It was a specific question about a specific Windows command.
18 hours ago

Jake Smitch wrote:Anyone have an idea of how I can get the CPU usage from tasklist?



I think that "Java in General" isn't the most suitable forum for this question. Let's try some other more suitable forum...
18 hours ago
Because you set head to null at line 16.
1 day ago
It's pretty clear that the variable tail must be null at line 49, isn't it? So that would be your problem.
1 day ago
It is quite likely that somebody has written that article and posted it on the web somewhere. But asking somebody to spend a couple of hours to write that article just for you is going a bit far, I think.
Couldn't you just include the file path in the JSON object you're returning?
3 days ago
Well, if I read the advertising for CutePDF and squint my eyes just the right way I could almost believe that CutePDF installs itself in Windows so that it appears in the Print dialogs which Windows produces. I use PDFCreator and that's how it works, so that's probably how CutePDF works as well.

So no, it isn't practical to write such a thing in Java. I won't say it's impossible but you would have to use JNI to connect with the necessary Windows interfaces.
3 days ago

Artavazd Ananikyan wrote:This framework has not developer API documentation. If any company will interested and purchase full authorization copyright will get source codes and prepare API documentation. Sorry, Bible - Matthew 7:6



You referred to Biblical pigs at the end, there. I think your native language isn't English so you may not know the English expression "buy a pig in a poke", which means that "something is sold or bought without the buyer knowing its true nature or value, especially when buying without inspecting the item beforehand".
3 days ago
Welcome to the Ranch, Brian!

Those are kind of vague names for your classes, but anyway... You can't change an object of class One to be an object of class Two.

Perhaps you could do something else which satisfies your needs, but you haven't said what they are. It looks like you have hit one of the common forum traps: "I need to do X, but I don't know how. But wait! If I could do Y then I will be able to do X. So I will ask how to do Y." It often turns out that there's a way to do X which doesn't involve Y at all.

And is this really a JavaFX problem? If it's really JavaFX then it would help if you described how it's related to JavaFX. If it's a general Java question, then just let us know and one of the moderators can move the thread into a better forum.
3 days ago

Campbell Ritchie wrote:I see I should move to Switzerland.



No, the chart says "Swizerland".
4 days ago
Well, there you go then. There's nothing which calls that method so you shouldn't be surprised that it never gets run and never prints anything. (Not that it would print anything even if it did get run.)

Perhaps there's something else that you didn't tell us about? Some framework which somebody else is going to use to run your code, perhaps?
5 days ago

Kaid Elliott wrote:can you explain with code I'm not asking you to do the work simply modify my code.



There's very little difference between the two. The "work" you need to do here is to simply modify your code.

However let me ask you this. You've got a for-loop between lines 11 and 21. Rob already mentioned this, but I'll put it another way. That loop has a loop counter. What is it supposed to do and why don't you need to use it anywhere in the loop?

And then, as Rob pointed out: your Fib_No method is supposed to return an integer value. Presumably that value is supposed to depend on the "position" parameter in some way? You should be able to explain that, I expect it's described in the problem statement. Your code always returns zero, which I'm sure must be wrong.

And no, you can't expect to fix that code by asking Mr. Google. Look at this example, unrelated to yours:



You might find out through testing that the method doesn't always return the sum of a and b, but no amount of web searching is going to point out the obvious error.
5 days ago
But the code you posted doesn't print anything. Perhaps there's some other code which you didn't show us, and it's supposed to be printing something?

The only thing I can see which is not quite self-explanatory is the array of Customers called custArray. The method you posted ignores that array and searches something else which is called customers.
5 days ago
It sounds to me like you don't talk to your manager much. I would have thought that mentioning your successes in conversation would be better than an e-mail out of the blue. (Call it "selling yourself" if you like.)
6 days ago