Below are snippets for TimYates.
4
This should stop your JSP page being cached by browsers and proxies.
It tries to cover all bases, just stick it at the top of any JSP page.
If your entire web application requires this, it would be much more economical to write a J2EE Filter, and run this code for each request before chaining on to the next filter..
It tries to cover all bases, just stick it at the top of any JSP page.
If your entire web application requires this, it would be much more economical to write a J2EE Filter, and run this code for each request before chaining on to the next filter..
5
Draws a line (with arrow head) between two given points.
6
More often than not, if your trying to work out what's going wrong with your subclass of InputStream, why the character encoding is getting lost in your database, or your file format reader is failing, you'll need to dump a byte buffer out in a useable form.
Here's two methods, one which appends to a StringBuffer, one which simply prints out to System.out
Tim.
(NB: The line: sb.append( "n" ) ; SHOULD have a leading slash ie: sb.append( "\n" ) ; but the formatter seems to remove it...
Here's two methods, one which appends to a StringBuffer, one which simply prints out to System.out
Tim.
(NB: The line: sb.append( "n" ) ; SHOULD have a leading slash ie: sb.append( "\n" ) ; but the formatter seems to remove it...
6
Toggles the visibility of an HTML element. Should be part of everyone's javascript toolkit
10
A prototype function to get an array of elements by id in an array
12
If you have ever written a website or java application where people paste stuff in from Word, you are likely to have hit the problem of Word using high ascii chars for "open quotes", "close quotes", reg symbol, etc...
This java class (with a single static method) can replace the most prevalent of these with normal ascii values
Hope it helps someone...
This java class (with a single static method) can replace the most prevalent of these with normal ascii values
Hope it helps someone...









