Win a copy of Microservices in Action this week in the Web Services forum!

Paul Clapham

Sheriff
+ Follow
since Oct 14, 2005
Paul likes ...
Eclipse IDE Firefox Browser MySQL Database
Vancouver, Canada
Cows and Likes
Cows
Total received
50
In last 30 days
0
Total given
99
Likes
Total received
2387
Received in last 30 days
7
Total given
526
Given in last 30 days
4
Forums and Threads
Scavenger Hunt
expand Rancher Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Paul Clapham

Daniel Demesmaecker wrote:Still haven't found the button to mark a thread as solved though...



For me it's at the bottom, below the "Post Reply" button and its friends. But most of the little buttons I see there are for staff only, so perhaps the thread-solved button is also for staff only?
44 seconds ago
That's the whole class? It doesn't have any methods which deal with sprites?

Or is this "if" statement supposed to be in the AlienEntity class? That seems unlikely to me -- but then it seems to me that we're going through a long process where you reveal relevant details one at a time.

I notice that the Entity class doesn't store the name of the sprite. So it looks like it might be difficult to find out whether it contains a sprite with a given name. There's maybe a couple of ways to deal with that but you're still asking about how to write an if-statement. You need to back up a bit and work on the design of those classes. Your design needs a way to find the name of the sprite from either the Entity or the AlienEntity class.
7 hours ago

Tom Andreas Vingaas wrote:make my code more cleaner and readable



Yes, you're absolutely correct about that. I tried to read it and I suspected you might have some backwards logic somewhere, but it was too hard for me to figure that out.
7 hours ago

Danielx Anderssonx wrote:Thanks for your answer. :) Yeah I think "ref" is sprite-related .  



A bad choice of names if "ref" is supposed to be the name of a sprite. But anyway, the Entity superclass also contains that "ref" variable -- at least, you might assume that given that it is passed in the constructor. So perhaps you could look at that class's declaration to see whether it has sprite-related methods?
7 hours ago
I would (tentatively) assume that the AlienEntity class includes some methods which allow you to find out information about the sprite it might contain. But I would have to look at the way the class is declared to know for sure.

Probably you could look at that class's declaration to see whether it has sprite-related methods?
7 hours ago
It would certainly help if you explained how that code "failed".
23 hours ago
Actually when I search for something using Google, it's quite common for the top several results to be identified as "Ad". I haven't encountered the situation you described before.
23 hours ago

Jim ken wrote:python experts could you please help on the same?



Recall that Tim said "Provide meaningful descriptions of what a piece of code is supposed to do, and what it actually does." Even Python experts can't help until you do that.

In case it isn't obvious, just asking for assistance does not constitute a description of what your code is supposed to do, nor what it actually does.
1 day ago

Campbell Ritchie wrote:Before you test that code, stop using Calendar or the buillt‑in Date class. Use the newer classes as described in the Java™ Tutorials.



It looks like the whole point of the code is to write a class which represents time-stamps. Yes, I know that's a WTF and it's the exact opposite of best practice. But apparently there are still some teachers who think it's a good way to practice coding.
1 day ago
This question looks almost identical to Attribute error saying it must both appear in an element but dont. At least I don't see any difference.

If there's a difference, then it would help greatly if you mentioned what it is. If there's no difference, then... it would help if you explained why the suggestions provided in the other thread didn't work for you.
Here's a link to the Oracle tutorial which shows a simple example of that: Retrieving and Modifying Values from Result Sets.

(By the way a ResultSet can encapsulate more than one row, so "the" value for a particular column might be misleading; each row will have a value for that particular column.)
I don't understand what you mean by "working principle". So instead, could you post an example of what you're asking about, along with a question related to that example?

(If you think that more than one example would be helpful, then sure, go ahead and post more than one example.)

Carey Brown wrote:My last name is "Brown". How are you supposed to deduce my first and middle initials from that?



You'd have to be "N. W. Brown" according to the specifications.
3 days ago
It may be true that your version of SQL supports cursors. But the code you're attempting to write there is a horribly long and convoluted way to write the simple statement



You only need 5 lines of code to do that, instead of the more than 11 lines that might make your code work. And it only runs 1 SQL statement and not 2.

Asif Haciyev wrote:Just I can't understand why textField is not cleaning.



My guess: that line of code clears a text field, but not the text field which you see in your GUI.

So look through the rest of your code to see if maybe you declare it twice, or create it twice, or something like that.
4 days ago