| Author |
Message |
|
|
|
Well thanks! I didn't really mean to have you download the copy for me, but I do appreciate it. Luckily for me I still have the 5.5.12 version laying around, so I'll use that.
|
 |
|
|
Greetings:
I was reading this thread and followed the link to the Tomcat bug in bug tracker. So far as I can tell, it looks as if the code was rolled back to the correctly working version.
I'm just curious if anyone has confirmed the correct Tomcat behaviour has in fact been rolled back in the version available via the "latest stable" release. My download (from the Internet) pipe is relatively small here in my office, and I'd rather not download the incorrect version if I can help it.
Thanks!!
|
 |
|
|
You're first java assignment ever is comparing the effectiveness of 3 different hash methods?
Holy mackerel, I'm glad I'm not in that class!
Stdunbar is correct. It's better to think "what should I do?" rather than "what Java code will accomplish this task?". So, what should you do?
|
 |
|
|
To tfecw: I considered the add to the character route. The trick comes when the OP is expected to decide whether a character is a ASCII character. Using the "add to the character" method, "This is a test." becomes "Wklv#lv#d#whvw1" - which doesn't quite fit the bill.
I considered the regular expression route - and thought that it'd probably be easier to just create a map, and use a loop to add characters.
YMMV...
|
 |
|
|
I'm sorry. I don't know what to say to that. I'm not going to write this for you.
Maybe you should start here Your first cup of java. . Come back when you feel a bit more comfortable (and less annoyed with Java).
|
 |
|
|
It's a very small part of what you need. What it does is map a supplied character with a return character. If you were to make a complete map of all the characters - that is to say continue the pattern at the ellipsis (...) - and map all the way to z, you would have the mechanism to translate your characters.
That's the point behind the map - you map characters.
|
 |
|
|
Oh come now. Suppose I gave you this:
Map<Character,Character> caeserMap = new HashMap<Character,Character>();
caesarMap.put( 'a', 'd' );
caesarMap.put( 'b', 'e' );
...
and I gave you this:
System.out.println( caesarMap.get( 'a' ) ); //prints d
Would that help?
|
 |
|
|
Excellent. This means that you need some way to map the letter "a" to "d" - yes? So let's start with that:
In the Java API, there is a class called "HashMap". The idea is that you have a "key" and a "value". If you "Map" "a" to "d", then everytime you find an "a" you can substitute a "d". Armed with this, you could parse your string and substitute each character.
Before I get too much farther, do you have Java 5? If you're not sure, go to a command prompt and type "java -version".
|
 |
|
|
|
I'm sorry to be so specific, but this is important if you want to learn how to program. How specifically do you scramble the letters (not Java - just in words)? How specifically do you unscramble the letters?
|
 |
|
|
Never mind Java for the moment. Pretend you're writing a recipe - and the person reading the recipe has no idea how to cook. Or pretend you're writing for a clymer manual if you prefer.
What steps would you take to perform these tasks?
|
 |
|
|