This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class OrderedArrayList<T> { | |
| private ArrayList<T> data; | |
| private int searchpos; | |
| public OrderedArrayList(ArrayList<T> data) { | |
| this.data = data; | |
| searchpos = 0; | |
| } | |
| public boolean contains(T other) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if (SearchResults.size() == 1) { | |
| DATA = SearchResults.get(0); | |
| } else { | |
| /* Find the smallest list */ | |
| int baseitem = 0; | |
| for (int i = 1; i < SearchResults.size(); i++) { | |
| if (SearchResults.get(i).size() < SearchResults.get(baseitem).size()) { | |
| baseitem = i; | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/python -ttu | |
| # | |
| # For a set of disks that were previously in a RAID set, build an image of the data such as it was, | |
| # ignoring parity. | |
| class RAIDDEV: | |
| def __init__(self, DEVICE, OFFSET=0): | |
| self.DATA=file(DEVICE, r) | |
| self.DATA.seek(OFFSET) |
NewerOlder