Float like a butterfly, sting like a bard =P
Update: Want to automate ye insults? There’s both Java and JavaScript code in the comments! (Thanks, shetboy!)
Float like a butterfly, sting like a bard =P
Update: Want to automate ye insults? There’s both Java and JavaScript code in the comments! (Thanks, shetboy!)
Here is an example Java object that generates random insults. I thought it may be a fun way to learn a little bit of the Collections interface.
Anyway, re-format code as desired. (r3dux: Done!)
The object:
The client:
Most impressive, sir!
However I’ll see your beautiful Java code and lower you some shonky JavaScript!
Brace thyself…
You have to mung it together with no white-space for it to work properly in WordPress, otherwise it adds stuff like <p> tags on any blank lines, and that breaks it big time. However, that in itself is a useful thing to know – I only managed to figure out why it wasn’t working by going through the code with FireBug and seeing those pesky tags – and that’s when the code was entered in HTML mode not with the WYSIWYG editor, too! Very sketchy…
Anyways, the javascript for this is:
Which if you put together into a standalone page, you end up with something like this (opens in new tab).
Impressive, I like that
** Clicks on imaginary ‘I Like This’ button **
Uses generate button instead
=> Thou warped fen-sucked clack-dish!
The “Like” button on this page is not imaginary, you just don’t have a Bookface account!
[clicks on imaginary “Like That Shet Likes This” button] =P
Thou bawdy pottle-deep flax-wench! <—— mine :P
It must know you!
Wuv woo! xXx =P