Skip to content

Instantly share code, notes, and snippets.

View mz2's full-sized avatar

Matias Piipari mz2

View GitHub Profile
@mz2
mz2 / NSArray+UniqueObjects.h
Created March 21, 2010 23:12
NSArray+UniqueObjects.h: get unique objects from an NSArray, whilst maintaining sort ordering
#import <Foundation/Foundation.h>
@interface NSArray (UniqueObjects)
-(NSArray*) uniqueObjects;
-(NSArray*) uniqueObjectsSortedUsingSelector: (SEL)comparator;
-(NSArray*) uniqueObjectsSortedUsingFunction: (NSInteger (*)(id, id, void *)) comparator
#import "NSArray+UniqueObjects.h"
@implementation NSArray (UniqueObjects)
-(NSArray*) uniqueObjects {
NSSet *set = [[NSSet alloc] initWithArray: self];
NSArray *vals = [set allObjects];
[set release];
return vals;
module WMC
# NoyesParser parses motif files with a header line and
# column lines with symbols in the DNA alphabet in order A,C,G,T
class NoyesParser
attr_accessor :motifset
attr_accessor :nukelinepattern
attr_accessor :namepattern
attr_accessor :normalize