Removing doubles from a list
9
This is a very convenient way to remove all doubles from a List in Java. The only prerequisite is that the elements in the list have proper equals and hashCode methods.
It work by using the constructor of a Set that takes a Collection as an argument.
I poured the snippet in a little program so can run it straight away.
It work by using the constructor of a Set that takes a Collection as an argument.
I poured the snippet in a little program so can run it straight away.
7
Weighted random selection from the list.
Don't forget to call itemsChanged after updating list content.
Don't forget to call itemsChanged after updating list content.
13
It works with Array types. The example is a simple list of numbers, but the array could contain anything; lists of strings, functions, DOM nodes, whatever. Unfortunately, a lot of things that seem like arrays in the DOM aren't really, so you can't shuffle the images on a page with just document.images.shuffle() all by itself.
11
mattrmiller
Recursively delete a directory, emptying all contents.
10
7
Remove newslines from a string.
3
function to remove a computer from a domai
7
List Files in a Directory in C#
3
List Files in a Directory in VB.NET
9
Get a List of Folders and/or Files









