Stephan van Hulst

Saloon Keeper
+ Follow
since Sep 20, 2010
Enschede, The Netherlands
Cows and Likes
Cows
Total received
163
In last 30 days
2
Total given
152
Likes
Total received
1769
Received in last 30 days
30
Total given
182
Given in last 30 days
4
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Stephan van Hulst

That's what I mean by migrating, yes.

There's no point in moving your application to a new framework version if you're not willing to rewrite parts of it to use the new framework.

Validation has become part of Spring's core modules, with some luck they didn't make a lot of changes to it and all you have to do is update some import statements.
54 minutes ago
It looks like hexadecimal, so you probably first have to decode the input from hexadecimal. After you've transformed the input to output, you have to encode it back to hexadecimal again.

We can't tell you what the input means, and how you should transform it though. We don't know the purpose of your application.
I'd first model the address before I'd try to encode it:
This is one of those things you can easily find out by writing some code.
You say that users enter credentials manually into the configuration file, but how are they going to do that if the credentials need to be encrypted?

Doesn't the cloud service support an authentication standard such as OAuth? That way you don't have to mess around with passwords.
2 days ago
Then I suggest you add a static method to the enum that can convert between the identifier and an enum constant:
2 days ago
Okay, so when the value of what is "2", do you want to get ReportType.GENERAL_REPORT?
2 days ago
Under the project properties, I believe there's a "run" menu where you can specify VM and command line arguments.
2 days ago
Mixing versions is asking for trouble.

Either stick with Spring 2, or migrate your current code base that it uses the new framework properly.
2 days ago

Arpan Ghoshal wrote:Here the Cat class contains an instance variable containing an object of class Tail but the Tail class is not marked Serializable then how does this code work ?


You didn't try to write an object of type Cat.

Also does a class need to marked serializable to be written to a file using writeObject() ? I think the answer is no then I can't understand what is actually the need for Serialization ?


Yes. If you want to write an object to an ObjectOutputStream, it needs to be Serializable and all its instance fields that are not transient also need to be Serializable.

Why doesn't it print D also ?


Because D is Serializable.

Why shouldn't every class be marked Serializable ?

One of the answers said : The compiler will throw an exception if certain classes are marked Serializable


You've already seen that the compiler doesn't throw an exception when you mark a class as Serializable. It's only when you try to write an instance at runtime, and not all non-transient instance fields are also Serializable.
Yeah it looks like a continue was intended there.
2 days ago
Like Mano hinted at, it's a tradeoff between precision and memory. If memory is not a concern, then you don't use float.

I almost never use double either, but that's another discussion.
2 days ago
It's just coincidence. You can't assign a special meaning to that particular number.

It turns out that it's not possible to have an exact binary representation of the decimal number 1.05, using floats. When you multiply by hundred, you also multiply the inaccuracy. Then, you transform the binary float representation to a decimal string represenration, which by complete accident just happens to be lower than the real answer.

The only way to truly understand what's going on is to read the floating point spec, but I doubt it's worth your time because it's not interesting nor important to the average Java programmer.
2 days ago