Removing doubles from a list
10
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.
3
function to remove a computer from a domai
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.
9
Get a List of Folders and/or Files
11
Set a Cookie
7
Remove newslines from a string.
11
mattrmiller
Recursively delete a directory, emptying all contents.
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.
3
List Files in a Directory in VB.NET









