November 24th, 2011

overwhelming firepower

Anyone here know much about Java?

I have user input for a URL field. I want them to be able to enter anything from "http://andrewducker.wordpress.com/xmlrpc.php" to "andrewducker.wordpress.com" and be able to end up at the same end point.

I've wasted a couple of hours messing around with the various constructors for URL and not got to anywhere satisfactory, should I just do string checking and construct it myself?

I should make it clear - I always want the /xmlrpc.php bit to be what's on the end of the URL, that's a Wordpress standard, so I don't need to do any complex discovery. I just need to append that if it's not there.

I was hoping that someone would have written a class that could append bits of URLs together, but the basic stuff in the built in URL class doesn't quite cut it.



Original post on Dreamwidth - there are comment count unavailable comments there.
Illuminati

Interesting Links for 24-11-2011


Original post on Dreamwidth - there are comment count unavailable comments there.
Back slowly away

Arrrr, it be a pirate poll

Best Pirate Movie

Muppet Treasure Island
12(20.0%)
Captain Blood
7(11.7%)
Pirates
1(1.7%)
Cutthroat Island
1(1.7%)
Yellowbeard
2(3.3%)
The Crimson Permanent Assurance
13(21.7%)
Pirates Of The Caribbean: Curse Of The Black Pearl
15(25.0%)
Treasure Island (1950's version)
2(3.3%)
Treasure Planet
1(1.7%)
Black Swan
0(0.0%)
SEWIWEIC
6(10.0%)
There is no good pirate movie.
0(0.0%)

Actually good

Pirates of the Caribbean: Curse of the Black Pearl
51(58.0%)
Pirates of the Caribbean: Dead Man's Chest
13(14.8%)
Pirates of the Caribbean: At World's End
10(11.4%)
Pirates of the Caribbean: On Stranger Tides
9(10.2%)
Nope, all shit
5(5.7%)

Clearly only a pedant of titanic proportions would claim that The Princess Bride was a pirate movie

Pfft, can't see anyone being _that_ pedantic.
26(49.1%)
And I _am_ that pedant!
27(50.9%)