Fast Exponentiation





ranking Sort Sort   |   date Sort Sort   |   member Sort Sort
Syndication

7
Date Submitted Tue. Mar. 14th, 2006 11:49 PM
Revision 1
Coder mattrmiller
Tags Java | Newline | REMOVE | Replace | String
Comments 4 comments
Remove newslines from a string.
7
Date Submitted Thu. Mar. 16th, 2006 11:17 PM
Revision 1
Coder mattrmiller
Tags File | Java | Move
Comments 1 comments
Move a file quickly in java.
6
Date Submitted Fri. Feb. 17th, 2006 8:54 AM
Revision 1
Scripter TimYates
Tags Java
Comments 1 comments
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...
6
Date Submitted Fri. Apr. 7th, 2006 9:50 AM
Revision 1
Helper jpinkham
Tags CLASSPATH | DOS | Java
Comments 2 comments
Here's a nifty trick I often use for testing.

Lets say you have a c:\foo\lib directory full of jarfiles for log4j, javamail...whatever.

Modern J2EE containers do a nice job of letting you deploy a jarfile with your code and have a lib directory full of jarfiles like this, but what if you just want to run a quick client from the command line?

Here's what you do:
6
Date Submitted Sun. Jul. 23rd, 2006 5:39 PM
Revision 1
Helper rugi
Tags Array | Java | Random
Comments 0 comments
Method for get n random number's
6
Date Submitted Sat. Jul. 28th, 2007 3:19 PM
Revision 1
Helper rugi
Tags BufferedImage | Canvas | Image | Java
Comments 0 comments
Convert
java.awt.Canvas to java.awt.image.BufferedImage or java.awt.image.Image
6
Date Submitted Thu. Aug. 24th, 2006 1:58 PM
Revision 1
Beginner jamesstaylor
Tags Java
Comments 1 comments
This is a quick and easy class that will generate MD5 hashes from strings. I originally wrote it to insert into my Oracle database so I could generate MD5 hases for passwords from PL/SQL.

Example

String md5Hash = stringMD5("my password");
6
Date Submitted Thu. Jan. 4th, 2007 4:30 AM
Revision 1
Beginner jimmah
Tags C | factorial | Fast | Recursive
Comments 3 comments
Gives factorials for a given value.
6
Date Submitted Thu. Oct. 20th, 2005 6:27 PM
Revision 1
Coder mattrmiller
Tags Date | Java | Parse
Comments 1 comments
Date Parse
6
Date Submitted Tue. Apr. 25th, 2006 1:03 PM
Revision 1
Coder mattrmiller
Tags Generate | Java | UID
Comments 3 comments
Another way to generate a unique ID.