|
 |
|
|
Submitted: April 3, 2009
Views: 1113
This snippet shows you how you can calculate e^x taylor through Java recursion.
|
|
|
 |
|
|
Submitted: August 4, 2009
Views: 453
A very fast algorithm that on average is O(n logn) as opposed to brute-force approach that is O(n³). This algorithm is modeled after QuickSort.
NOTE: The class expects the array of points to be sorted by x-coordinates. Those points with the same x-coordinate should be sorted by their y-coordinate. This is shown in the snippet.
|
|
|
 |
|
|
Submitted: September 3, 2008
Views: 616
Snippet to convert between EBCDIC and ASCII or visa versa. Uses byte arrays rather than strings.
|
|
|
 |
|
|
Submitted: March 3, 2009
Views: 2423
Ensure that user input is not interpreted as a regular expression when using String.replaceAll or Stirng.split.
|
|
|
 |
|
|
Submitted: November 15, 2008
Views: 1238
Sorts a Array of generic objects, which implement the comparable interface, using a bubble sort.
|
|
|
 |
|
|
Submitted: July 18, 2008
Views: 1294
|
|
|
 |
|
|
Submitted: November 15, 2006
Views: 3133
A class of static functions that lets you work with multidimensional arrays so as to perform operations in Linear Algebra (find the determinant of a matrix, etc.)
|
|
|
 |
|
|
Submitted: June 30, 2009
Views: 617
It take an object as a parameter and calculates its MD5 hash based on the return value of the toString() method.
|
|
|
 |
|
|
Submitted: May 6, 2009
Views: 537
|
|
|
 |
|
|
Submitted: February 3, 2009
Views: 1349
java code snippet that shows how to play MIDI files in java
|
|
|
 |
|
|
Submitted: May 15, 2009
Views: 699
|
|
|
 |
|
|
Submitted: April 5, 2009
Views: 665
Recursively solves the classic "N Queens" problem.
|
|
|
 |
|
|
Submitted: October 23, 2009
Views: 148
If you're lazy like me, you will find this extremely useful.
|
|
|
 |
|
|
Submitted: August 19, 2009
Views: 124
This program finds all the prime integers less than or equal to a given number n.
|
|
|
 |
|
|
Submitted: February 21, 2009
Views: 2162
A short solution to the problem of finding all the variations of a string.
|
|
|
 |
|
|
Submitted: September 6, 2009
Views: 134
Switches upper case letters to lower case and lower case letters to upper case in a given string automatically, and then returns the new converted string.
|
|
|
 |
|
|
Submitted: March 18, 2009
Views: 226
This snippet runs through multiple arrays of doubles and tells you if they are sorted or not.
|
|
|
 |
|
|
Submitted: February 10, 2007
Views: 2673
A small demonstration of using java.lang.reflect to dynamically load a class and call a method.
|
|
|
 |
|
|
Submitted: March 23, 2009
Views: 1614
use the JACOB COM bridge to query the WMI interface to determine which services are currently started on a computer
|
|
|
 |
|
|
Submitted: October 28, 2006
Views: 6301
How to convert your .class into a web applet
|
|
|
 |
|
|
Submitted: January 7, 2006
Views: 7260
Use the arrow keys to move the image in eight different directions!
|
|
|
 |
|
|
Submitted: August 27, 2008
Views: 1786
A Java implementation of the cocktail sorting algorithm
|
|
|
 |
|
|
Submitted: October 15, 2008
Views: 1023
This snippet shows how to compute the power of a given base and power... Will return the answer. This works for all inputs of the real number series.
--- Upgraded to Accept Negative Input Values
|
|
|
 |
|
|
Submitted: July 13, 2009
Views: 239
Converts a color image to Greyscale by assigning each pixels red, green and blue values to the average of all three.
Example input is here: http://syfran.com/wp-content/uploads/2009/07/tux.png
Example output is here: http://syfran.com/wp-content/uploads/2009/07/greyTux.jpg
|
|
|
 |
|
|
Submitted: January 31, 2007
Views: 9144
This method identifies and counts number of occurances of a string(arg2) in a string (arg1).
|
|