3
List Files in a Directory in VB.NET
7
List Files in a Directory in C#
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.
9
Get a List of Folders and/or Files
-2
The method 'removeDoubles' uses a HashSet to remove double elements from a list without creating another list. The first occurrences of the multiple elements are kept, others will be removed. The order of the list will be preserved. The parameter list's iterator must support remove. Example of use is given in the main-method.
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
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.
10









