diff --git a/iDNA/iDNA.xcodeproj/project.pbxproj b/iDNA/iDNA.xcodeproj/project.pbxproj new file mode 100644 index 0000000..886b163 --- /dev/null +++ b/iDNA/iDNA.xcodeproj/project.pbxproj @@ -0,0 +1,332 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 0D6AEA1D1689DF2600034395 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0D6AEA1C1689DF2600034395 /* Cocoa.framework */; }; + 0D6AEA271689DF2600034395 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 0D6AEA251689DF2600034395 /* InfoPlist.strings */; }; + 0D6AEA291689DF2600034395 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 0D6AEA281689DF2600034395 /* main.m */; }; + 0D6AEA2D1689DF2600034395 /* Credits.rtf in Resources */ = {isa = PBXBuildFile; fileRef = 0D6AEA2B1689DF2600034395 /* Credits.rtf */; }; + 0D6AEA301689DF2600034395 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 0D6AEA2F1689DF2600034395 /* AppDelegate.m */; }; + 0D6AEA331689DF2600034395 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 0D6AEA311689DF2600034395 /* MainMenu.xib */; }; + 0D6AEA431689FE7400034395 /* Cell.m in Sources */ = {isa = PBXBuildFile; fileRef = 0D6AEA421689FE7300034395 /* Cell.m */; }; + 0D6AEA4A1689FF5500034395 /* NSMutableArray+Shuffle.m in Sources */ = {isa = PBXBuildFile; fileRef = 0D6AEA491689FF5500034395 /* NSMutableArray+Shuffle.m */; }; + 0D7E761E169A0BBA0089D9C8 /* Evolution.m in Sources */ = {isa = PBXBuildFile; fileRef = 0D7E761D169A0BBA0089D9C8 /* Evolution.m */; }; + 0DD00A8116A05DAA00B661B2 /* Graph.m in Sources */ = {isa = PBXBuildFile; fileRef = 0DD00A8016A05DAA00B661B2 /* Graph.m */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 0D6AEA181689DF2600034395 /* iDNA.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = iDNA.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 0D6AEA1C1689DF2600034395 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; }; + 0D6AEA1F1689DF2600034395 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; }; + 0D6AEA201689DF2600034395 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = System/Library/Frameworks/CoreData.framework; sourceTree = SDKROOT; }; + 0D6AEA211689DF2600034395 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; + 0D6AEA241689DF2600034395 /* iDNA-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "iDNA-Info.plist"; sourceTree = ""; }; + 0D6AEA261689DF2600034395 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; + 0D6AEA281689DF2600034395 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; + 0D6AEA2A1689DF2600034395 /* iDNA-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "iDNA-Prefix.pch"; sourceTree = ""; }; + 0D6AEA2C1689DF2600034395 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.rtf; name = en; path = en.lproj/Credits.rtf; sourceTree = ""; }; + 0D6AEA2E1689DF2600034395 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; + 0D6AEA2F1689DF2600034395 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; + 0D6AEA321689DF2600034395 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/MainMenu.xib; sourceTree = ""; }; + 0D6AEA411689FE7300034395 /* Cell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Cell.h; sourceTree = ""; }; + 0D6AEA421689FE7300034395 /* Cell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Cell.m; sourceTree = ""; }; + 0D6AEA481689FF5500034395 /* NSMutableArray+Shuffle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSMutableArray+Shuffle.h"; sourceTree = ""; }; + 0D6AEA491689FF5500034395 /* NSMutableArray+Shuffle.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSMutableArray+Shuffle.m"; sourceTree = ""; }; + 0D7E761C169A0BBA0089D9C8 /* Evolution.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Evolution.h; sourceTree = ""; }; + 0D7E761D169A0BBA0089D9C8 /* Evolution.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Evolution.m; sourceTree = ""; }; + 0D7E762E169B11AC0089D9C8 /* SenTestingKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SenTestingKit.framework; path = Library/Frameworks/SenTestingKit.framework; sourceTree = DEVELOPER_DIR; }; + 0DD00A7F16A05DAA00B661B2 /* Graph.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Graph.h; sourceTree = ""; }; + 0DD00A8016A05DAA00B661B2 /* Graph.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Graph.m; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 0D6AEA151689DF2600034395 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 0D6AEA1D1689DF2600034395 /* Cocoa.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 0D6AEA0D1689DF2600034395 = { + isa = PBXGroup; + children = ( + 0D6AEA221689DF2600034395 /* iDNA */, + 0D6AEA1B1689DF2600034395 /* Frameworks */, + 0D6AEA191689DF2600034395 /* Products */, + ); + sourceTree = ""; + }; + 0D6AEA191689DF2600034395 /* Products */ = { + isa = PBXGroup; + children = ( + 0D6AEA181689DF2600034395 /* iDNA.app */, + ); + name = Products; + sourceTree = ""; + }; + 0D6AEA1B1689DF2600034395 /* Frameworks */ = { + isa = PBXGroup; + children = ( + 0D6AEA1C1689DF2600034395 /* Cocoa.framework */, + 0D7E762E169B11AC0089D9C8 /* SenTestingKit.framework */, + 0D6AEA1E1689DF2600034395 /* Other Frameworks */, + ); + name = Frameworks; + sourceTree = ""; + }; + 0D6AEA1E1689DF2600034395 /* Other Frameworks */ = { + isa = PBXGroup; + children = ( + 0D6AEA1F1689DF2600034395 /* AppKit.framework */, + 0D6AEA201689DF2600034395 /* CoreData.framework */, + 0D6AEA211689DF2600034395 /* Foundation.framework */, + ); + name = "Other Frameworks"; + sourceTree = ""; + }; + 0D6AEA221689DF2600034395 /* iDNA */ = { + isa = PBXGroup; + children = ( + 0D7E761C169A0BBA0089D9C8 /* Evolution.h */, + 0D7E761D169A0BBA0089D9C8 /* Evolution.m */, + 0D6AEA411689FE7300034395 /* Cell.h */, + 0D6AEA421689FE7300034395 /* Cell.m */, + 0D6AEA481689FF5500034395 /* NSMutableArray+Shuffle.h */, + 0D6AEA491689FF5500034395 /* NSMutableArray+Shuffle.m */, + 0D6AEA2E1689DF2600034395 /* AppDelegate.h */, + 0D6AEA2F1689DF2600034395 /* AppDelegate.m */, + 0D6AEA311689DF2600034395 /* MainMenu.xib */, + 0D6AEA231689DF2600034395 /* Supporting Files */, + 0DD00A7F16A05DAA00B661B2 /* Graph.h */, + 0DD00A8016A05DAA00B661B2 /* Graph.m */, + ); + path = iDNA; + sourceTree = ""; + }; + 0D6AEA231689DF2600034395 /* Supporting Files */ = { + isa = PBXGroup; + children = ( + 0D6AEA241689DF2600034395 /* iDNA-Info.plist */, + 0D6AEA251689DF2600034395 /* InfoPlist.strings */, + 0D6AEA281689DF2600034395 /* main.m */, + 0D6AEA2A1689DF2600034395 /* iDNA-Prefix.pch */, + 0D6AEA2B1689DF2600034395 /* Credits.rtf */, + ); + name = "Supporting Files"; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 0D6AEA171689DF2600034395 /* iDNA */ = { + isa = PBXNativeTarget; + buildConfigurationList = 0D6AEA361689DF2600034395 /* Build configuration list for PBXNativeTarget "iDNA" */; + buildPhases = ( + 0D6AEA141689DF2600034395 /* Sources */, + 0D6AEA151689DF2600034395 /* Frameworks */, + 0D6AEA161689DF2600034395 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = iDNA; + productName = iDNA; + productReference = 0D6AEA181689DF2600034395 /* iDNA.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 0D6AEA0F1689DF2600034395 /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 0450; + ORGANIZATIONNAME = witzawitz; + }; + buildConfigurationList = 0D6AEA121689DF2600034395 /* Build configuration list for PBXProject "iDNA" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + ); + mainGroup = 0D6AEA0D1689DF2600034395; + productRefGroup = 0D6AEA191689DF2600034395 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 0D6AEA171689DF2600034395 /* iDNA */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 0D6AEA161689DF2600034395 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 0D6AEA271689DF2600034395 /* InfoPlist.strings in Resources */, + 0D6AEA2D1689DF2600034395 /* Credits.rtf in Resources */, + 0D6AEA331689DF2600034395 /* MainMenu.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 0D6AEA141689DF2600034395 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 0D6AEA291689DF2600034395 /* main.m in Sources */, + 0D6AEA301689DF2600034395 /* AppDelegate.m in Sources */, + 0D6AEA431689FE7400034395 /* Cell.m in Sources */, + 0D6AEA4A1689FF5500034395 /* NSMutableArray+Shuffle.m in Sources */, + 0D7E761E169A0BBA0089D9C8 /* Evolution.m in Sources */, + 0DD00A8116A05DAA00B661B2 /* Graph.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXVariantGroup section */ + 0D6AEA251689DF2600034395 /* InfoPlist.strings */ = { + isa = PBXVariantGroup; + children = ( + 0D6AEA261689DF2600034395 /* en */, + ); + name = InfoPlist.strings; + sourceTree = ""; + }; + 0D6AEA2B1689DF2600034395 /* Credits.rtf */ = { + isa = PBXVariantGroup; + children = ( + 0D6AEA2C1689DF2600034395 /* en */, + ); + name = Credits.rtf; + sourceTree = ""; + }; + 0D6AEA311689DF2600034395 /* MainMenu.xib */ = { + isa = PBXVariantGroup; + children = ( + 0D6AEA321689DF2600034395 /* en */, + ); + name = MainMenu.xib; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 0D6AEA341689DF2600034395 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_ENABLE_OBJC_EXCEPTIONS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.8; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = macosx; + }; + name = Debug; + }; + 0D6AEA351689DF2600034395 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = YES; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_ENABLE_OBJC_EXCEPTIONS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.8; + SDKROOT = macosx; + }; + name = Release; + }; + 0D6AEA371689DF2600034395 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + COMBINE_HIDPI_IMAGES = YES; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "iDNA/iDNA-Prefix.pch"; + INFOPLIST_FILE = "iDNA/iDNA-Info.plist"; + PRODUCT_NAME = "$(TARGET_NAME)"; + WRAPPER_EXTENSION = app; + }; + name = Debug; + }; + 0D6AEA381689DF2600034395 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + COMBINE_HIDPI_IMAGES = YES; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = "iDNA/iDNA-Prefix.pch"; + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + INFOPLIST_FILE = "iDNA/iDNA-Info.plist"; + PRODUCT_NAME = "$(TARGET_NAME)"; + WRAPPER_EXTENSION = app; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 0D6AEA121689DF2600034395 /* Build configuration list for PBXProject "iDNA" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 0D6AEA341689DF2600034395 /* Debug */, + 0D6AEA351689DF2600034395 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 0D6AEA361689DF2600034395 /* Build configuration list for PBXNativeTarget "iDNA" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 0D6AEA371689DF2600034395 /* Debug */, + 0D6AEA381689DF2600034395 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 0D6AEA0F1689DF2600034395 /* Project object */; +} diff --git a/iDNA/iDNA.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/iDNA/iDNA.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..2d38afe --- /dev/null +++ b/iDNA/iDNA.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/iDNA/iDNA.xcodeproj/project.xcworkspace/xcuserdata/n.xcuserdatad/UserInterfaceState.xcuserstate b/iDNA/iDNA.xcodeproj/project.xcworkspace/xcuserdata/n.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000..261e0b5 Binary files /dev/null and b/iDNA/iDNA.xcodeproj/project.xcworkspace/xcuserdata/n.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/iDNA/iDNA.xcodeproj/xcuserdata/n.xcuserdatad/xcdebugger/Breakpoints.xcbkptlist b/iDNA/iDNA.xcodeproj/xcuserdata/n.xcuserdatad/xcdebugger/Breakpoints.xcbkptlist new file mode 100644 index 0000000..e10d6c0 --- /dev/null +++ b/iDNA/iDNA.xcodeproj/xcuserdata/n.xcuserdatad/xcdebugger/Breakpoints.xcbkptlist @@ -0,0 +1,137 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/iDNA/iDNA.xcodeproj/xcuserdata/n.xcuserdatad/xcschemes/iDNA.xcscheme b/iDNA/iDNA.xcodeproj/xcuserdata/n.xcuserdatad/xcschemes/iDNA.xcscheme new file mode 100644 index 0000000..b7c2100 --- /dev/null +++ b/iDNA/iDNA.xcodeproj/xcuserdata/n.xcuserdatad/xcschemes/iDNA.xcscheme @@ -0,0 +1,86 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/iDNA/iDNA.xcodeproj/xcuserdata/n.xcuserdatad/xcschemes/iDNAtests.xcscheme b/iDNA/iDNA.xcodeproj/xcuserdata/n.xcuserdatad/xcschemes/iDNAtests.xcscheme new file mode 100644 index 0000000..f6304b9 --- /dev/null +++ b/iDNA/iDNA.xcodeproj/xcuserdata/n.xcuserdatad/xcschemes/iDNAtests.xcscheme @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/iDNA/iDNA.xcodeproj/xcuserdata/n.xcuserdatad/xcschemes/xcschememanagement.plist b/iDNA/iDNA.xcodeproj/xcuserdata/n.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..35fd38b --- /dev/null +++ b/iDNA/iDNA.xcodeproj/xcuserdata/n.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,32 @@ + + + + + SchemeUserState + + iDNA.xcscheme + + orderHint + 0 + + iDNAtests.xcscheme + + orderHint + 1 + + + SuppressBuildableAutocreation + + 0D6AEA171689DF2600034395 + + primary + + + 0D7E762C169B11AC0089D9C8 + + primary + + + + + diff --git a/iDNA/iDNA/AppDelegate.h b/iDNA/iDNA/AppDelegate.h new file mode 100644 index 0000000..e1ede13 --- /dev/null +++ b/iDNA/iDNA/AppDelegate.h @@ -0,0 +1,49 @@ +// +// AppDelegate.h +// iDNA +// +// Created by n on 25.12.12. +// Copyright (c) 2012 witzawitz. All rights reserved. +// + +#import +#import "Cell.h" +#import "Graph.h" +#import "Evolution.h" + +@interface AppDelegate : NSObject +{ + NSInteger populationSize; + NSInteger dnaLength; + NSInteger mutationRate; + + Evolution *evolution; +} + +@property (assign) IBOutlet NSWindow *window; + +// Text fields. +@property (weak) IBOutlet NSTextField *tfPopulationSize; +@property (weak) IBOutlet NSTextField *tfDnaLength; +@property (weak) IBOutlet NSTextField *tfMutationRate; +@property (weak) IBOutlet NSTextField *tfGoalDNA; +// Sliders. +@property (weak) IBOutlet NSSlider *slPopulationSize; +@property (weak) IBOutlet NSSlider *slDnaLength; +@property (weak) IBOutlet NSSlider *slMutationRate; +// Buttons. +@property (weak) IBOutlet NSButton *btStartEvolution; +@property (weak) IBOutlet NSButton *btPause; +@property (weak) IBOutlet NSButton *btLoadGoalDNA; +// Labels. +@property (weak) IBOutlet NSTextField *lbGeneration; +@property (weak) IBOutlet NSTextField *lbBestMatch; + +// View for drawing graph. +@property (weak) IBOutlet Graph *vwGraph; + +- (IBAction)startEvolution:(id)sender; +- (IBAction)pause:(id)sender; +- (IBAction)loadGoalDNA:(id)sender; + +@end diff --git a/iDNA/iDNA/AppDelegate.m b/iDNA/iDNA/AppDelegate.m new file mode 100644 index 0000000..012e1b6 --- /dev/null +++ b/iDNA/iDNA/AppDelegate.m @@ -0,0 +1,228 @@ +// +// AppDelegate.m +// iDNA +// +// Created by n on 25.12.12. +// Copyright (c) 2012 witzawitz. All rights reserved. +// + +#import "AppDelegate.h" + +@implementation AppDelegate +{ + NSInteger maxPopulationSize; + NSInteger maxDnaLength; + NSInteger maxMutationRate; +} + +- (id) init +{ + if (self = [super init]) + { + maxDnaLength = 100; + maxMutationRate = 100; + maxPopulationSize = 10000; + + dnaLength = maxDnaLength / 2; + mutationRate = maxMutationRate / 2; + populationSize = maxPopulationSize / 2; + } + + return self; +} + +- (void) applicationDidFinishLaunching:(NSNotification *)aNotification +{ + [_slDnaLength setIntegerValue:dnaLength]; + [_slMutationRate setIntegerValue:mutationRate]; + [_slPopulationSize setIntegerValue:populationSize]; + + evolution = [[Evolution alloc] init]; + [self setGoalDNA]; + [self addObserver:self forKeyPath:@"dnaLength" options:NSKeyValueObservingOptionNew context:nil]; + [self addObserver:self forKeyPath:@"mutationRate" options:NSKeyValueObservingOptionNew context:nil]; + [self addObserver:self forKeyPath:@"populationSize" options:NSKeyValueObservingOptionNew context:nil]; + + [_vwGraph setHidden:YES]; +} + +-(void) observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context +{ + // If any of parameters was changed we should reset evolution. + [evolution reset]; + [self setLabelForGeneration:0]; + [self setLabelForBestMatch:0]; + + [_vwGraph reset]; + [_vwGraph setNeedsDisplay:YES]; +} + +// Only for remove observers. +-(void) dealloc +{ + [self removeObserver:self forKeyPath:@"dnaLength"]; + [self removeObserver:self forKeyPath:@"mutationRate"]; + [self removeObserver:self forKeyPath:@"populationSize"]; +} + +- (IBAction)startEvolution:(id)sender +{ + [self checkInputValues]; + if (dnaLength > 0 && populationSize > 0) + { + dispatch_queue_t back = dispatch_queue_create("back", NULL); + dispatch_async(back, ^{ + [self setInputsEnabled:NO]; + + if ([evolution state] == INIT) + [evolution initWithMutationRate:mutationRate PopulationSize:populationSize DnaLength:dnaLength]; + else if ([evolution state] == PAUSED) + [evolution setState:STARTED]; + + while ([evolution state] == STARTED) + { + [evolution perfomStep]; + dispatch_sync(dispatch_get_main_queue(), ^{ + [self updateLabels]; + }); + } + [self setInputsEnabled:YES]; + }); + } + else + { + NSAlert *alert = [NSAlert alertWithMessageText:@"Какой-то из параметров равен 0." defaultButton:@"Просто закройся" alternateButton:@"Я понял" otherButton:@"Другая кнопка" informativeTextWithFormat:@"Скорее всего это размер ДНК или популяции."]; + [alert runModal]; + } +} + +-(void) checkInputValues +{ + NSInteger currentDnaLength = [_tfDnaLength integerValue]; + NSInteger currentMutationRate = [_tfMutationRate integerValue]; + NSInteger currentPopulationSize = [[[[_tfPopulationSize stringValue] componentsSeparatedByCharactersInSet:[[NSCharacterSet decimalDigitCharacterSet] invertedSet]] componentsJoinedByString:@""] integerValue]; + + // Check if any value was changed. + if (currentDnaLength != [self dnaLength]) + [self setDnaLength:currentDnaLength]; + if (currentMutationRate != [self mutationRate]) + [self setMutationRate:currentMutationRate]; + if (currentPopulationSize != [self populationSize]) + [self setPopulationSize:currentPopulationSize]; +} + +// Pause button pressed. +- (IBAction)pause:(id)sender +{ + [evolution setState:PAUSED]; +} + +- (IBAction)loadGoalDNA:(id)sender +{ + [self openDNADialog]; +} + +-(void) openDNADialog +{ + NSOpenPanel *open = [NSOpenPanel openPanel]; + [open setCanChooseFiles:YES]; + [open setAllowsMultipleSelection:NO]; + [open setAllowedFileTypes:[NSArray arrayWithObjects:@"txt", nil]]; + + if ([open runModal] == NSOKButton) + { + @try + { + NSString *path = [[[open URLs] objectAtIndex:0] path]; + if (path) + { + NSString *content = [NSString stringWithContentsOfFile:path encoding:NSUTF8StringEncoding error:nil]; + // Validate string. Force reading only necessary symbols. + content = [[content componentsSeparatedByCharactersInSet: [[NSCharacterSet characterSetWithCharactersInString:NUCLEOTIDES] invertedSet]] componentsJoinedByString:@""]; + content = [content substringToIndex:MIN([content length], maxDnaLength)]; + dnaLength = [content length]; + [_tfDnaLength setStringValue:[NSString stringWithFormat:@"%ld", dnaLength]]; + [_tfGoalDNA setStringValue:content]; + [evolution setGoalDNAwithString:@"content"]; + } + } + @catch(NSException *exception) + { + NSAlert *alert = [NSAlert alertWithMessageText:@"Неправильный файл." defaultButton:@"Просто закройся" alternateButton:@"Я понял" otherButton:@"Другая кнопка" informativeTextWithFormat:@"Что-то пошло не так."]; + [alert runModal]; + } + } +} + +// Set information for labels 'current generation' and 'best match'. +-(void) updateLabels +{ + [self setLabelForGeneration:[evolution step]]; + [self setLabelForBestMatch:[evolution bestMatch]]; +} + +-(void) setLabelForGeneration: (NSInteger) step +{ + [_lbGeneration setStringValue:[NSString stringWithFormat:@"%ld", step]]; +} + +-(void) setLabelForBestMatch: (NSInteger) bestMatch +{ + [_lbBestMatch setStringValue:[NSString stringWithFormat:@"%ld", bestMatch]]; +} + +// Enabling or disabling inputs. +- (void) setInputsEnabled: (Boolean) status +{ + [_btLoadGoalDNA setEnabled:status]; + [_btStartEvolution setEnabled:status]; + [_btPause setEnabled:!status]; + + [_tfDnaLength setEnabled:status]; + [_tfMutationRate setEnabled:status]; + [_tfPopulationSize setEnabled:status]; + + [_slDnaLength setEnabled:status]; + [_slMutationRate setEnabled:status]; + [_slPopulationSize setEnabled:status]; +} + +// Create new goal DNA and sets value to corresponding text field. +- (void) setGoalDNA +{ + [_tfGoalDNA setStringValue:[[evolution createGoalDNAWithLength:dnaLength] DNAtoString]]; +} + +// Getters. +- (NSInteger) dnaLength { return dnaLength; } +- (NSInteger) mutationRate { return mutationRate; } +- (NSInteger) populationSize { return populationSize; } + +// Setters. +- (void) setDnaLength: (NSInteger) x +{ + dnaLength = MIN(x, maxDnaLength); + [_tfDnaLength setStringValue:[NSString stringWithFormat:@"%ld", dnaLength]]; + if ([evolution state] == INIT || [evolution state] == FINISHED) + [self setGoalDNA]; +} + +- (void) setMutationRate: (NSInteger) x +{ + mutationRate = MIN(x, maxMutationRate); + [_tfMutationRate setStringValue:[NSString stringWithFormat:@"%ld", mutationRate]]; +} + +- (void) setPopulationSize: (NSInteger) x +{ + populationSize = MIN(x, maxPopulationSize); + [_tfPopulationSize setStringValue:[NSString stringWithFormat:@"%ld", populationSize]]; +} + +// Close app if window is closed. +- (BOOL)applicationShouldTerminateAfterLastWindowClosed:(NSApplication *)theApplication +{ + return YES; +} + +@end diff --git a/iDNA/iDNA/Cell.h b/iDNA/iDNA/Cell.h new file mode 100644 index 0000000..20ee836 --- /dev/null +++ b/iDNA/iDNA/Cell.h @@ -0,0 +1,26 @@ +// +// Cell.h +// iDNA +// +// Created by n on 25.12.12. +// Copyright (c) 2012 witzawitz. All rights reserved. +// + +#import +#define NUCLEOTIDES @"ATGC" + +@interface Cell : NSObject + +-(int) hammingDistance: (Cell *) cell; +-(NSInteger) DNAsize; +-(NSString *) getDNAatIndex: (NSInteger)index; +-(void) setDNA: (NSString *) nucluotide atIndex: (NSInteger)index; +-(id) initWithCell: (Cell *) cell; +-(id) initWithDNAlength: (NSInteger) length; +-(id) initWithString: (NSString *) dna; +-(NSString *) DNAtoString; +-(Cell *) crossWithCell: (Cell *) otherCell; +-(void) mutate: (NSInteger) percentToReplace; +-(NSString *) randomNucleotide; + +@end diff --git a/iDNA/iDNA/Cell.m b/iDNA/iDNA/Cell.m new file mode 100644 index 0000000..0f93617 --- /dev/null +++ b/iDNA/iDNA/Cell.m @@ -0,0 +1,237 @@ +// +// Cell.m +// iDNA +// +// Created by n on 25.12.12. +// Copyright (c) 2012 witzawitz. All rights reserved. +// + +#import "Cell.h" +#import "NSMutableArray+Shuffle.h" + +@implementation Cell +{ + NSMutableArray *DNA; + NSString *nucleotide; +} + +-(id) init +{ + self = [super init]; + + if (self) + { + [self initNucleotides]; + [self initDNAWithlength:100]; + } + + return self; +} + +-(void) initNucleotides +{ + nucleotide = NUCLEOTIDES; +} + +-(id) initWithDNAlength: (NSInteger) length +{ + if (self = [super init]) + { + [self initNucleotides]; + [self initDNAWithlength:length]; + } + return self; +} + +-(id) initWithCell: (Cell *) cell +{ + if (self = [super init]) + { + [self initNucleotides]; + + NSInteger DNAsize = [cell DNAsize]; + DNA = [[NSMutableArray alloc] initWithCapacity:DNAsize]; + for (NSInteger i = 0; i < DNAsize; i++) + [DNA setObject:[cell getDNAatIndex:i] atIndexedSubscript:i]; + } + return self; +} + +-(void) initDNAWithlength: (NSInteger) length +{ + int DNAsize = (int) length; + + // First init of DNA array. + DNA = [[NSMutableArray alloc] initWithCapacity:DNAsize]; + + // Fill with random nucleotides from corresponding array. + for (NSInteger i=0; i < DNAsize; i++) + { + [DNA setObject:[self randomNucleotide] atIndexedSubscript:i]; + } +} + +-(id) initWithString: (NSString *) dna +{ + if (self = [super init]) + { + [self initNucleotides]; + DNA = [[NSMutableArray alloc] initWithCapacity:[dna length]]; + for (NSInteger i = 0; i < [dna length]; i++) + [DNA setObject:[NSString stringWithFormat:@"%c", [dna characterAtIndex:i]] atIndexedSubscript:i]; + } + return self; +} + +-(int) hammingDistance: (Cell *) cell +{ + int dist = 0; + + // In case DNA size of two cells are differents. + NSInteger minDNAsize = MIN([cell DNAsize], [self DNAsize]); + NSInteger maxDNAsize = MAX([cell DNAsize], [self DNAsize]); + + // Comparing elements. + for (NSInteger i=0; i= [self DNAsize])) + return nil; + return [DNA objectAtIndex:index]; +} + +// Sets DNA nucleotide at given index. +-(void) setDNA: (NSString *) nucluotide atIndex: (NSInteger)index +{ + if ((index >= 0) && (index < [self DNAsize])) + { + [DNA setObject:nucluotide atIndexedSubscript:index]; + } +} + +// Return random nucleotide from corresponding array. +-(NSString *) randomNucleotide +{ + return [NSString stringWithFormat:@"%c", [nucleotide characterAtIndex:arc4random_uniform((int)[nucleotide length])]]; +} + +-(NSString *) randomNucleotideExceptGiven: (NSString *) except +{ + @autoreleasepool + { + NSString *ncl = [nucleotide stringByReplacingOccurrencesOfString:except withString:@""]; + return [NSString stringWithFormat:@"%c", [ncl characterAtIndex:arc4random_uniform((int)[ncl length])]]; + } +} + +-(void) setRandomDNAatIndex:(NSInteger) index +{ + [self setDNA:[self randomNucleotideExceptGiven:[self getDNAatIndex:index]] atIndex:index]; +} + +-(Cell *) crossWithCell: (Cell *) otherCell +{ + switch (arc4random_uniform(3)) + { + case 0: + return [self crossByHalfWithCell:otherCell]; + case 1: + return [self crossByOnePercentWithCell:otherCell]; + case 2: + return [self crossByPartsWithCell:otherCell]; + default: + return self; + } +} + +-(Cell *) crossByHalfWithCell: (Cell *) otherCell +{ + if ([self DNAsize] != [otherCell DNAsize]) + return self; + for (NSInteger i = [self DNAsize] / 2; i<[self DNAsize]; i++) + [self setDNA:[otherCell getDNAatIndex:i] atIndex:i]; + return self; +} + +-(Cell *) crossByOnePercentWithCell: (Cell *) otherCell +{ + if ([self DNAsize] != [otherCell DNAsize]) + return self; + for (NSInteger i = 0; i < [self DNAsize]; i++) + if (i % 2 == 1) + [self setDNA:[otherCell getDNAatIndex:i] atIndex:i]; + return self; +} + +-(Cell *) crossByPartsWithCell: (Cell *) otherCell +{ + if ([self DNAsize] != [otherCell DNAsize]) + return self; + for (NSInteger i = [self DNAsize]/5; i < 4*[self DNAsize]/5; i++) + [self setDNA:[otherCell getDNAatIndex:i] atIndex:i]; + return self; +} + +-(void) mutate: (NSInteger) percentToReplace +{ + // Explicit number of element to replace. + NSInteger replace = percentToReplace * [self DNAsize] / 100; + + // Some preparation in case of data out of range. + if (replace < 0) + replace = 0; + if (replace > [self DNAsize]) + replace = [self DNAsize]; + + // Nothing to do here. + if (replace == 0) + return; + + NSInteger i = 0; + + // Array that stores indices to replace. + NSMutableArray *indicesToReplace = [[NSMutableArray alloc] initWithCapacity:[self DNAsize]]; + for (i = 0; i < [self DNAsize]; i++) + [indicesToReplace setObject:[NSNumber numberWithInteger:i] atIndexedSubscript:i]; + // Shuffle it! + [indicesToReplace shuffle]; + + for (i = 0; i < replace; i++) + { + [self setRandomDNAatIndex:[[indicesToReplace objectAtIndex:i] integerValue]]; + } +} + +// Returns DNA as string. +-(NSString *) DNAtoString +{ + NSMutableString *output = [[NSMutableString alloc] init]; + for (NSInteger i = 0; i < [self DNAsize]; i++) + { + [output appendString: [self getDNAatIndex:i]]; + } + return output; +} + +@end diff --git a/iDNA/iDNA/Evolution.h b/iDNA/iDNA/Evolution.h new file mode 100644 index 0000000..bc43177 --- /dev/null +++ b/iDNA/iDNA/Evolution.h @@ -0,0 +1,43 @@ +// +// Evolution.h +// iDNA +// +// Created by n on 06.01.13. +// Copyright (c) 2013 witzawitz. All rights reserved. +// + +#import +#import "Cell.h" + +// States of evolution process. +#define INIT 0 +#define STARTED 1 +#define FINISHED 2 +#define PAUSED 3 + +@interface Evolution : NSObject +{ + NSInteger step; + NSInteger state; + + NSInteger mutationRate; + NSInteger populationSize; + NSInteger dnaLength; + + NSInteger bestMatch; + + NSMutableArray *population; + Cell *goalDNA; +} + +-(Cell *) createGoalDNAWithLength:(NSInteger) length; +-(void) initWithMutationRate:(NSInteger)rate PopulationSize: (NSInteger) size DnaLength: (NSInteger) length; +-(void) perfomStep; +-(NSInteger) state; +-(NSInteger) step; +-(NSInteger) bestMatch; +-(void) reset; +-(void) setState: (NSInteger) st; +-(void) setGoalDNAwithString: (NSString *) dna; + +@end diff --git a/iDNA/iDNA/Evolution.m b/iDNA/iDNA/Evolution.m new file mode 100644 index 0000000..fd6feee --- /dev/null +++ b/iDNA/iDNA/Evolution.m @@ -0,0 +1,150 @@ +// +// Evolution.m +// iDNA +// +// Created by n on 06.01.13. +// Copyright (c) 2013 witzawitz. All rights reserved. +// + +#import "Evolution.h" + +@implementation Evolution + +-(id) init +{ + if (self = [super init]) + { + step = 0; + state = INIT; + bestMatch = 0; + } + return self; +} + +-(NSInteger) state { return state; } +-(NSInteger) step { return step; } + +// Create goal DNA with given length. +-(Cell *) createGoalDNAWithLength:(NSInteger) length +{ + goalDNA = [[Cell alloc] initWithDNAlength:length]; + return goalDNA; +} + +// Init population with given parameters. +-(void) creatPopulation +{ + population = [[NSMutableArray alloc] initWithCapacity:populationSize]; + for (NSInteger i = 0; i < populationSize; i++) + { + [population setObject:[[Cell alloc] initWithDNAlength:dnaLength] atIndexedSubscript:i]; + } +} + +// Setters. +-(void) setMutationRate: (NSInteger) rate { mutationRate = rate; } +-(void) setPopulationSize: (NSInteger) size { populationSize = size; } +-(void) setDnaLength: (NSInteger) length { dnaLength = length; } +-(void) setState: (NSInteger) st { state = st; } +-(void) setGoalDNAwithString: (NSString *) dna +{ + [self reset]; + goalDNA = [[Cell alloc] initWithString:dna]; + dnaLength = [goalDNA DNAsize]; +} + +// Initialization with parameters. +-(void) initWithMutationRate:(NSInteger)rate PopulationSize: (NSInteger) size DnaLength: (NSInteger) length +{ + [self setMutationRate:rate]; + [self setPopulationSize:size]; + [self setDnaLength:length]; + + if (state == INIT) + { + [self creatPopulation]; + state = STARTED; + } +} + +// Performs one step of evolution. +-(void) perfomStep +{ + step++; + [self sortPopulation]; + if ([self isZeroHammingDistance]) + { + state = FINISHED; + return; + } + + [self crossPopulation]; + [self mutatePopulation]; +} + +// Sort population by hamming distance. +- (void) sortPopulation +{ + NSArray *sorted = [population sortedArrayUsingComparator:^NSComparisonResult (id a, id b){ + NSNumber *first = [NSNumber numberWithInt:[(Cell *)a hammingDistance:goalDNA]]; + NSNumber *second = [NSNumber numberWithInt:[(Cell *)b hammingDistance:goalDNA]]; + return first > second; + }]; + population = [NSMutableArray arrayWithArray:sorted]; +} + +// Cross first half of population and replace the second. +- (void) crossPopulation +{ + for (NSInteger i = ceil([population count] / 2); i < [population count]; i++) + { + [population setObject:[self crossDNAfromTop] atIndexedSubscript:i]; + } +} + +// Crosses two random DNA from first half. +- (Cell *) crossDNAfromTop +{ + int half = ceil([population count] / 2); + Cell *cell1 = [population objectAtIndex:arc4random_uniform(half)]; + Cell *cell2 = [population objectAtIndex:arc4random_uniform(half)]; + + return [cell1 crossWithCell:cell2]; +} + +// Mutate the whole population. +- (void) mutatePopulation +{ + for (Cell *cell in population) + [cell mutate:mutationRate]; +} + +// Checks whether there is cell with hamming distance = 0. +// Implying the population array is sorted. +- (Boolean) isZeroHammingDistance +{ + if ([population count] < 1) + return NO; + if ([goalDNA hammingDistance:[population objectAtIndex:0]] == 0) + return YES; + return NO; +} + +-(NSInteger) bestMatch +{ + NSInteger bestHD = 0; + if ([population count] > 0) + bestHD = [goalDNA hammingDistance:[population objectAtIndex:0]]; + bestMatch = MAX(bestMatch, 100 - 100 * bestHD / dnaLength); + + return bestMatch; +} + +-(void) reset +{ + state = INIT; + step = 0; + bestMatch = 0; +} + +@end diff --git a/iDNA/iDNA/Graph.h b/iDNA/iDNA/Graph.h new file mode 100644 index 0000000..0c633ca --- /dev/null +++ b/iDNA/iDNA/Graph.h @@ -0,0 +1,23 @@ +// +// Graph.h +// iDNA +// +// Created by n on 11.01.13. +// Copyright (c) 2013 witzawitz. All rights reserved. +// + +#import + +@interface Graph : NSView +{ + NSPointArray points; + NSMutableData *pointData; + float width; + float height; + float originX; +} + +-(void) addPointWithY: (float) y; +-(void) reset; + +@end diff --git a/iDNA/iDNA/Graph.m b/iDNA/iDNA/Graph.m new file mode 100644 index 0000000..1806bab --- /dev/null +++ b/iDNA/iDNA/Graph.m @@ -0,0 +1,78 @@ +// +// Graph.m +// iDNA +// +// Created by n on 11.01.13. +// Copyright (c) 2013 witzawitz. All rights reserved. +// + +#import "Graph.h" + +@implementation Graph + +- (id)initWithFrame:(NSRect)frame +{ + self = [super initWithFrame:frame]; + if (self) + { + pointData = [[NSMutableData alloc] init]; + width = self.frame.size.width; + height = self.frame.size.height; + originX = self.frame.origin.x; + } + + return self; +} + +-(void) addPoint: (NSPoint) point +{ + NSUInteger pointCount = [pointData length] / sizeof(NSPoint); + [pointData setLength:(pointCount+1) * sizeof(NSPoint)]; + points = [pointData mutableBytes]; + points[pointCount] = point; +} + +-(void) addPointWithX: (float) x andY: (float) y +{ + [self addPoint:NSMakePoint(x, y)]; +} + +-(void) addPointWithY: (float) y +{ + NSUInteger pointCount = [pointData length] / sizeof(NSPoint); + if (pointCount == 0) + [self addPoint:NSMakePoint(0, y)]; + else + { + float lastX = points[pointCount-1].x; + [self addPoint:NSMakePoint(lastX+1, y)]; + } +} + +-(void) reset +{ + [pointData setLength:0]; + points = NULL; +} + +- (void)drawRect:(NSRect)rect +{ + [NSBezierPath strokeLineFromPoint:NSMakePoint(0, 0) toPoint:NSMakePoint(0, height)]; + [NSBezierPath strokeLineFromPoint:NSMakePoint(0, 0) toPoint:NSMakePoint(width, 0)]; + + NSUInteger pointCount = [pointData length] / sizeof(NSPoint); + if (pointCount > 0) + { + NSBezierPath *path = [NSBezierPath bezierPath]; + NSUInteger pointCount = [pointData length] / sizeof(NSPoint); + if (pointCount > width) + { + //originX--; + //[self translateOriginToPoint:NSMakePoint(-points[pointCount-(int)width-1].x, 0)]; + } + [path appendBezierPathWithPoints:[pointData mutableBytes] count: pointCount]; + [path stroke]; + } +} + +@end diff --git a/iDNA/iDNA/NSMutableArray+Shuffle.h b/iDNA/iDNA/NSMutableArray+Shuffle.h new file mode 100644 index 0000000..374d469 --- /dev/null +++ b/iDNA/iDNA/NSMutableArray+Shuffle.h @@ -0,0 +1,13 @@ +// +// NSMutableArray+Shuffle.h +// iDNA +// +// Created by n on 25.12.12. +// Copyright (c) 2012 witzawitz. All rights reserved. +// + +#import + +@interface NSMutableArray (Shuffle) +-(void) shuffle; +@end diff --git a/iDNA/iDNA/NSMutableArray+Shuffle.m b/iDNA/iDNA/NSMutableArray+Shuffle.m new file mode 100644 index 0000000..66a3174 --- /dev/null +++ b/iDNA/iDNA/NSMutableArray+Shuffle.m @@ -0,0 +1,22 @@ +// +// NSMutableArray+Shuffle.m +// iDNA +// +// Created by n on 25.12.12. +// Copyright (c) 2012 witzawitz. All rights reserved. +// + +#import "NSMutableArray+Shuffle.h" + +@implementation NSMutableArray (Shuffle) + +// Everyday I'm shuffling! +-(void) shuffle +{ + for (NSInteger i = 0; i < [self count] - 1; i++) + { + [self exchangeObjectAtIndex:i withObjectAtIndex:arc4random_uniform((int)([self count]-i)) + i]; + } +} + +@end diff --git a/iDNA/iDNA/en.lproj/Credits.rtf b/iDNA/iDNA/en.lproj/Credits.rtf new file mode 100644 index 0000000..46576ef --- /dev/null +++ b/iDNA/iDNA/en.lproj/Credits.rtf @@ -0,0 +1,29 @@ +{\rtf0\ansi{\fonttbl\f0\fswiss Helvetica;} +{\colortbl;\red255\green255\blue255;} +\paperw9840\paperh8400 +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural + +\f0\b\fs24 \cf0 Engineering: +\b0 \ + Some people\ +\ + +\b Human Interface Design: +\b0 \ + Some other people\ +\ + +\b Testing: +\b0 \ + Hopefully not nobody\ +\ + +\b Documentation: +\b0 \ + Whoever\ +\ + +\b With special thanks to: +\b0 \ + Mom\ +} diff --git a/iDNA/iDNA/en.lproj/InfoPlist.strings b/iDNA/iDNA/en.lproj/InfoPlist.strings new file mode 100644 index 0000000..477b28f --- /dev/null +++ b/iDNA/iDNA/en.lproj/InfoPlist.strings @@ -0,0 +1,2 @@ +/* Localized versions of Info.plist keys */ + diff --git a/iDNA/iDNA/en.lproj/MainMenu.xib b/iDNA/iDNA/en.lproj/MainMenu.xib new file mode 100644 index 0000000..330201a --- /dev/null +++ b/iDNA/iDNA/en.lproj/MainMenu.xib @@ -0,0 +1,5649 @@ + + + + 1080 + 12C60 + 2844 + 1187.34 + 625.00 + + com.apple.InterfaceBuilder.CocoaPlugin + 2844 + + + IBNSLayoutConstraint + NSButton + NSButtonCell + NSCustomObject + NSCustomView + NSMenu + NSMenuItem + NSSlider + NSSliderCell + NSTextField + NSTextFieldCell + NSUserDefaultsController + NSView + NSWindowTemplate + + + com.apple.InterfaceBuilder.CocoaPlugin + + + PluginDependencyRecalculationVersion + + + + + NSApplication + + + FirstResponder + + + NSApplication + + + AMainMenu + + + + iDNA + + 1048576 + 2147483647 + + NSImage + NSMenuCheckmark + + + NSImage + NSMenuMixedState + + submenuAction: + + iDNA + + + + About iDNA + + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Preferences… + , + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Services + + 1048576 + 2147483647 + + + submenuAction: + + Services + + _NSServicesMenu + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Hide iDNA + h + 1048576 + 2147483647 + + + + + + Hide Others + h + 1572864 + 2147483647 + + + + + + Show All + + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Quit iDNA + q + 1048576 + 2147483647 + + + + + _NSAppleMenu + + + + + File + + 1048576 + 2147483647 + + + submenuAction: + + File + + + + New + n + 1048576 + 2147483647 + + + + + + Open… + o + 1048576 + 2147483647 + + + + + + Open Recent + + 1048576 + 2147483647 + + + submenuAction: + + Open Recent + + + + Clear Menu + + 1048576 + 2147483647 + + + + + _NSRecentDocumentsMenu + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Close + w + 1048576 + 2147483647 + + + + + + Save… + s + 1048576 + 2147483647 + + + + + + Revert to Saved + + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Page Setup... + P + 1179648 + 2147483647 + + + + + + + Print… + p + 1048576 + 2147483647 + + + + + + + + + Edit + + 1048576 + 2147483647 + + + submenuAction: + + Edit + + + + Undo + z + 1048576 + 2147483647 + + + + + + Redo + Z + 1179648 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Cut + x + 1048576 + 2147483647 + + + + + + Copy + c + 1048576 + 2147483647 + + + + + + Paste + v + 1048576 + 2147483647 + + + + + + Paste and Match Style + V + 1572864 + 2147483647 + + + + + + Delete + + 1048576 + 2147483647 + + + + + + Select All + a + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Find + + 1048576 + 2147483647 + + + submenuAction: + + Find + + + + Find… + f + 1048576 + 2147483647 + + + 1 + + + + Find and Replace… + f + 1572864 + 2147483647 + + + 12 + + + + Find Next + g + 1048576 + 2147483647 + + + 2 + + + + Find Previous + G + 1179648 + 2147483647 + + + 3 + + + + Use Selection for Find + e + 1048576 + 2147483647 + + + 7 + + + + Jump to Selection + j + 1048576 + 2147483647 + + + + + + + + + Spelling and Grammar + + 1048576 + 2147483647 + + + submenuAction: + + Spelling and Grammar + + + + Show Spelling and Grammar + : + 1048576 + 2147483647 + + + + + + Check Document Now + ; + 1048576 + 2147483647 + + + + + + YES + YES + + + 2147483647 + + + + + + Check Spelling While Typing + + 1048576 + 2147483647 + + + + + + Check Grammar With Spelling + + 1048576 + 2147483647 + + + + + + Correct Spelling Automatically + + 2147483647 + + + + + + + + + Substitutions + + 1048576 + 2147483647 + + + submenuAction: + + Substitutions + + + + Show Substitutions + + 2147483647 + + + + + + YES + YES + + + 2147483647 + + + + + + Smart Copy/Paste + f + 1048576 + 2147483647 + + + 1 + + + + Smart Quotes + g + 1048576 + 2147483647 + + + 2 + + + + Smart Dashes + + 2147483647 + + + + + + Smart Links + G + 1179648 + 2147483647 + + + 3 + + + + Text Replacement + + 2147483647 + + + + + + + + + Transformations + + 2147483647 + + + submenuAction: + + Transformations + + + + Make Upper Case + + 2147483647 + + + + + + Make Lower Case + + 2147483647 + + + + + + Capitalize + + 2147483647 + + + + + + + + + Speech + + 1048576 + 2147483647 + + + submenuAction: + + Speech + + + + Start Speaking + + 1048576 + 2147483647 + + + + + + Stop Speaking + + 1048576 + 2147483647 + + + + + + + + + + + + Format + + 2147483647 + + + submenuAction: + + Format + + + + Font + + 2147483647 + + + submenuAction: + + Font + + + + Show Fonts + t + 1048576 + 2147483647 + + + + + + Bold + b + 1048576 + 2147483647 + + + 2 + + + + Italic + i + 1048576 + 2147483647 + + + 1 + + + + Underline + u + 1048576 + 2147483647 + + + + + + YES + YES + + + 2147483647 + + + + + + Bigger + + + 1048576 + 2147483647 + + + 3 + + + + Smaller + - + 1048576 + 2147483647 + + + 4 + + + + YES + YES + + + 2147483647 + + + + + + Kern + + 2147483647 + + + submenuAction: + + Kern + + + + Use Default + + 2147483647 + + + + + + Use None + + 2147483647 + + + + + + Tighten + + 2147483647 + + + + + + Loosen + + 2147483647 + + + + + + + + + Ligatures + + 2147483647 + + + submenuAction: + + Ligatures + + + + Use Default + + 2147483647 + + + + + + Use None + + 2147483647 + + + + + + Use All + + 2147483647 + + + + + + + + + Baseline + + 2147483647 + + + submenuAction: + + Baseline + + + + Use Default + + 2147483647 + + + + + + Superscript + + 2147483647 + + + + + + Subscript + + 2147483647 + + + + + + Raise + + 2147483647 + + + + + + Lower + + 2147483647 + + + + + + + + + YES + YES + + + 2147483647 + + + + + + Show Colors + C + 1048576 + 2147483647 + + + + + + YES + YES + + + 2147483647 + + + + + + Copy Style + c + 1572864 + 2147483647 + + + + + + Paste Style + v + 1572864 + 2147483647 + + + + + _NSFontMenu + + + + + Text + + 2147483647 + + + submenuAction: + + Text + + + + Align Left + { + 1048576 + 2147483647 + + + + + + Center + | + 1048576 + 2147483647 + + + + + + Justify + + 2147483647 + + + + + + Align Right + } + 1048576 + 2147483647 + + + + + + YES + YES + + + 2147483647 + + + + + + Writing Direction + + 2147483647 + + + submenuAction: + + Writing Direction + + + + YES + Paragraph + + 2147483647 + + + + + + CURlZmF1bHQ + + 2147483647 + + + + + + CUxlZnQgdG8gUmlnaHQ + + 2147483647 + + + + + + CVJpZ2h0IHRvIExlZnQ + + 2147483647 + + + + + + YES + YES + + + 2147483647 + + + + + + YES + Selection + + 2147483647 + + + + + + CURlZmF1bHQ + + 2147483647 + + + + + + CUxlZnQgdG8gUmlnaHQ + + 2147483647 + + + + + + CVJpZ2h0IHRvIExlZnQ + + 2147483647 + + + + + + + + + YES + YES + + + 2147483647 + + + + + + Show Ruler + + 2147483647 + + + + + + Copy Ruler + c + 1310720 + 2147483647 + + + + + + Paste Ruler + v + 1310720 + 2147483647 + + + + + + + + + + + + View + + 1048576 + 2147483647 + + + submenuAction: + + View + + + + Show Toolbar + t + 1572864 + 2147483647 + + + + + + Customize Toolbar… + + 1048576 + 2147483647 + + + + + + + + + Window + + 1048576 + 2147483647 + + + submenuAction: + + Window + + + + Minimize + m + 1048576 + 2147483647 + + + + + + Zoom + + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Bring All to Front + + 1048576 + 2147483647 + + + + + _NSWindowsMenu + + + + + Help + + 2147483647 + + + submenuAction: + + Help + + + + iDNA Help + ? + 1048576 + 2147483647 + + + + + _NSHelpMenu + + + + _NSMainMenu + + + 15 + 2 + {{335, 390}, {505, 343}} + 880279552 + iDNA + NSWindow + + + {505, 343} + {505, 343} + + + 256 + + + + 268 + {{17, 306}, {118, 17}} + + + + _NS:1535 + YES + + 68157504 + 272630784 + Population size + + LucidaGrande + 13 + 1044 + + _NS:1535 + + + 6 + System + controlColor + + 3 + MC42NjY2NjY2NjY3AA + + + + 6 + System + controlTextColor + + 3 + MAA + + + + NO + + + + 268 + {{17, 272}, {118, 17}} + + + + _NS:1535 + YES + + 68157504 + 272630784 + DNA length + + _NS:1535 + + + + + NO + + + + 268 + {{17, 240}, {118, 17}} + + + + _NS:1535 + YES + + 68157504 + 272630784 + Mutation rate % + + _NS:1535 + + + + + NO + + + + 268 + {{140, 301}, {51, 22}} + + + + _NS:9 + YES + + -1804599231 + 71304256 + 5000 + + _NS:9 + + YES + + 6 + System + textBackgroundColor + + 3 + MQA + + + + 6 + System + textColor + + + + NO + + + + 268 + {{140, 267}, {51, 22}} + + + + _NS:9 + YES + + -1804599231 + -2076179456 + 50 + + _NS:9 + + YES + + + + NO + + + + 268 + {{140, 235}, {51, 22}} + + + + _NS:9 + YES + + -1804599231 + 71304192 + 50 + + _NS:9 + + YES + + + + NO + + + + 268 + {{197, 301}, {290, 21}} + + + + _NS:9 + YES + + -2080112384 + 0 + + _NS:9 + + 10000 + 0.0 + 5000 + 0.0 + 0 + 1 + NO + NO + + NO + + + + 268 + {{197, 267}, {290, 21}} + + + + _NS:9 + YES + + -2080112384 + 0 + + _NS:9 + + 100 + 0.0 + 50 + 0.0 + 0 + 1 + NO + NO + + NO + + + + 268 + {{197, 235}, {290, 21}} + + + + _NS:9 + YES + + -2080112384 + 0 + + _NS:9 + + 100 + 0.0 + 50 + 0.0 + 0 + 1 + NO + NO + + NO + + + + 268 + {{17, 215}, {118, 17}} + + + + _NS:1535 + YES + + 68157504 + 272630784 + Generation + + _NS:1535 + + + + + NO + + + + 268 + {{137, 215}, {57, 17}} + + + + _NS:1535 + YES + + 68157504 + 71304192 + 0 + + _NS:1535 + + + + + NO + + + + 268 + {{17, 190}, {118, 17}} + + + + _NS:1535 + YES + + 68157504 + 272630784 + Best match % + + _NS:1535 + + + + + NO + + + + 268 + {{17, 165}, {118, 17}} + + + + _NS:1535 + YES + + 68157504 + 272630784 + Goal DNA + + _NS:1535 + + + + + NO + + + + 268 + {{137, 190}, {57, 17}} + + + + _NS:1535 + YES + + 68157504 + 71304192 + 0 + + _NS:1535 + + + + + NO + + + + 268 + {{20, 49}, {465, 108}} + + + + _NS:9 + {250, 750} + YES + + -1805647871 + 272629760 + + + _NS:9 + + YES + + + + NO + + + + 268 + {{14, 13}, {132, 32}} + + + + _NS:9 + YES + + 67108864 + 134217728 + Start evolution + + _NS:9 + + -2038284288 + 129 + + + 200 + 25 + + NO + + + + 268 + {{357, 13}, {134, 32}} + + + + _NS:9 + YES + + 67108864 + 134217728 + Load goal DNA + + _NS:9 + + -2038284288 + 129 + + + 200 + 25 + + NO + + + + 268 + {{146, 13}, {77, 32}} + + + + _NS:9 + YES + + 603979776 + 134217728 + Pause + + _NS:9 + + -2038284288 + 129 + + + 200 + 25 + + NO + + + + 268 + {{206, 165}, {279, 67}} + + + + _NS:9 + Graph + + + {505, 343} + + + + + {{0, 0}, {1280, 778}} + {505, 365} + {505, 365} + YES + + + AppDelegate + + + NSFontManager + + + YES + + + + + + + terminate: + + + + 449 + + + + orderFrontStandardAboutPanel: + + + + 142 + + + + delegate + + + + 495 + + + + performMiniaturize: + + + + 37 + + + + arrangeInFront: + + + + 39 + + + + print: + + + + 86 + + + + runPageLayout: + + + + 87 + + + + clearRecentDocuments: + + + + 127 + + + + performClose: + + + + 193 + + + + toggleContinuousSpellChecking: + + + + 222 + + + + undo: + + + + 223 + + + + copy: + + + + 224 + + + + checkSpelling: + + + + 225 + + + + paste: + + + + 226 + + + + stopSpeaking: + + + + 227 + + + + cut: + + + + 228 + + + + showGuessPanel: + + + + 230 + + + + redo: + + + + 231 + + + + selectAll: + + + + 232 + + + + startSpeaking: + + + + 233 + + + + delete: + + + + 235 + + + + performZoom: + + + + 240 + + + + performFindPanelAction: + + + + 241 + + + + centerSelectionInVisibleArea: + + + + 245 + + + + toggleGrammarChecking: + + + + 347 + + + + toggleSmartInsertDelete: + + + + 355 + + + + toggleAutomaticQuoteSubstitution: + + + + 356 + + + + toggleAutomaticLinkDetection: + + + + 357 + + + + saveDocument: + + + + 362 + + + + revertDocumentToSaved: + + + + 364 + + + + runToolbarCustomizationPalette: + + + + 365 + + + + toggleToolbarShown: + + + + 366 + + + + hide: + + + + 367 + + + + hideOtherApplications: + + + + 368 + + + + unhideAllApplications: + + + + 370 + + + + newDocument: + + + + 373 + + + + openDocument: + + + + 374 + + + + raiseBaseline: + + + + 426 + + + + lowerBaseline: + + + + 427 + + + + copyFont: + + + + 428 + + + + subscript: + + + + 429 + + + + superscript: + + + + 430 + + + + tightenKerning: + + + + 431 + + + + underline: + + + + 432 + + + + orderFrontColorPanel: + + + + 433 + + + + useAllLigatures: + + + + 434 + + + + loosenKerning: + + + + 435 + + + + pasteFont: + + + + 436 + + + + unscript: + + + + 437 + + + + useStandardKerning: + + + + 438 + + + + useStandardLigatures: + + + + 439 + + + + turnOffLigatures: + + + + 440 + + + + turnOffKerning: + + + + 441 + + + + toggleAutomaticSpellingCorrection: + + + + 456 + + + + orderFrontSubstitutionsPanel: + + + + 458 + + + + toggleAutomaticDashSubstitution: + + + + 461 + + + + toggleAutomaticTextReplacement: + + + + 463 + + + + uppercaseWord: + + + + 464 + + + + capitalizeWord: + + + + 467 + + + + lowercaseWord: + + + + 468 + + + + pasteAsPlainText: + + + + 486 + + + + performFindPanelAction: + + + + 487 + + + + performFindPanelAction: + + + + 488 + + + + performFindPanelAction: + + + + 489 + + + + showHelp: + + + + 493 + + + + alignCenter: + + + + 518 + + + + pasteRuler: + + + + 519 + + + + toggleRuler: + + + + 520 + + + + alignRight: + + + + 521 + + + + copyRuler: + + + + 522 + + + + alignJustified: + + + + 523 + + + + alignLeft: + + + + 524 + + + + makeBaseWritingDirectionNatural: + + + + 525 + + + + makeBaseWritingDirectionLeftToRight: + + + + 526 + + + + makeBaseWritingDirectionRightToLeft: + + + + 527 + + + + makeTextWritingDirectionNatural: + + + + 528 + + + + makeTextWritingDirectionLeftToRight: + + + + 529 + + + + makeTextWritingDirectionRightToLeft: + + + + 530 + + + + performFindPanelAction: + + + + 535 + + + + addFontTrait: + + + + 421 + + + + addFontTrait: + + + + 422 + + + + modifyFont: + + + + 423 + + + + orderFrontFontPanel: + + + + 424 + + + + modifyFont: + + + + 425 + + + + window + + + + 532 + + + + tfGoalDNA + + + + 1456 + + + + startEvolution: + + + + 1457 + + + + tfPopulationSize + + + + 1458 + + + + tfDnaLength + + + + 1459 + + + + tfMutationRate + + + + 1460 + + + + slPopulationSize + + + + 1461 + + + + slDnaLength + + + + 1462 + + + + slMutationRate + + + + 1463 + + + + btStartEvolution + + + + 1464 + + + + btPause + + + + 1465 + + + + btLoadGoalDNA + + + + 1466 + + + + pause: + + + + 1467 + + + + lbGeneration + + + + 1477 + + + + lbBestMatch + + + + 1478 + + + + vwGraph + + + + 1530 + + + + loadGoalDNA: + + + + 1531 + + + + value: self.populationSize + + + + + + value: self.populationSize + value + self.populationSize + 2 + + + 1434 + + + + value: self.populationSize + + + + + + value: self.populationSize + value + self.populationSize + 2 + + + 1437 + + + + value: self.dnaLength + + + + + + value: self.dnaLength + value + self.dnaLength + 2 + + + 1455 + + + + value: self.mutationRate + + + + + + value: self.mutationRate + value + self.mutationRate + 2 + + + 1443 + + + + value: self.populationSize + + + + + + value: self.populationSize + value + self.populationSize + 2 + + + 1345 + + + + takeIntValueFrom: + + + + 1362 + + + + takeIntValueFrom: + + + + 1363 + + + + value: self.dnaLength + + + + + + value: self.dnaLength + value + self.dnaLength + 2 + + + 1450 + + + + value: self.mutationRate + + + + + + value: self.mutationRate + value + self.mutationRate + 2 + + + 1361 + + + + takeIntValueFrom: + + + + 1364 + + + + + + 0 + + + + + + -2 + + + File's Owner + + + -1 + + + First Responder + + + -3 + + + Application + + + 29 + + + + + + + + + + + + + + 19 + + + + + + + + 56 + + + + + + + + 217 + + + + + + + + 83 + + + + + + + + 81 + + + + + + + + + + + + + + + + + 75 + + + + + 78 + + + + + 72 + + + + + 82 + + + + + 124 + + + + + + + + 77 + + + + + 73 + + + + + 79 + + + + + 112 + + + + + 74 + + + + + 125 + + + + + + + + 126 + + + + + 205 + + + + + + + + + + + + + + + + + + + + + + 202 + + + + + 198 + + + + + 207 + + + + + 214 + + + + + 199 + + + + + 203 + + + + + 197 + + + + + 206 + + + + + 215 + + + + + 218 + + + + + + + + 216 + + + + + + + + 200 + + + + + + + + + + + + + 219 + + + + + 201 + + + + + 204 + + + + + 220 + + + + + + + + + + + + + 213 + + + + + 210 + + + + + 221 + + + + + 208 + + + + + 209 + + + + + 57 + + + + + + + + + + + + + + + + + + 58 + + + + + 134 + + + + + 150 + + + + + 136 + + + + + 144 + + + + + 129 + + + + + 143 + + + + + 236 + + + + + 131 + + + + + + + + 149 + + + + + 145 + + + + + 130 + + + + + 24 + + + + + + + + + + + 92 + + + + + 5 + + + + + 239 + + + + + 23 + + + + + 295 + + + + + + + + 296 + + + + + + + + + 297 + + + + + 298 + + + + + 211 + + + + + + + + 212 + + + + + + + + + 195 + + + + + 196 + + + + + 346 + + + + + 348 + + + + + + + + 349 + + + + + + + + + + + + + + 350 + + + + + 351 + + + + + 354 + + + + + 371 + + + + + + + + 372 + + + + + 6 + 0 + + 6 + 1 + + 20 + + 1000 + + 8 + 29 + 3 + + + + 4 + 0 + + 4 + 1 + + 20 + + 1000 + + 8 + 29 + 3 + + + + 4 + 0 + + 4 + 1 + + 20 + + 1000 + + 8 + 29 + 3 + + + + 5 + 0 + + 6 + 1 + + 12 + + 1000 + + 6 + 24 + 3 + + + + 3 + 0 + + 4 + 1 + + 8 + + 1000 + + 6 + 24 + 3 + + + + 4 + 0 + + 4 + 1 + + 20 + + 1000 + + 8 + 29 + 3 + + + + 5 + 0 + + 5 + 1 + + 20 + + 1000 + + 8 + 29 + 3 + + + + 6 + 0 + + 6 + 1 + + 20 + + 1000 + + 8 + 29 + 3 + + + + 5 + 0 + + 5 + 1 + + 206 + + 1000 + + 3 + 9 + 3 + + + + 3 + 0 + + 3 + 1 + + 0.0 + + 1000 + + 6 + 24 + 2 + + + + 11 + 0 + + 11 + 1 + + 0.0 + + 1000 + + 6 + 24 + 2 + + + + 5 + 0 + + 6 + 1 + + 8 + + 1000 + + 6 + 24 + 3 + + + + 5 + 0 + + 5 + 1 + + 0.0 + + 1000 + + 6 + 24 + 2 + + + + 6 + 0 + + 6 + 1 + + 20 + + 1000 + + 8 + 29 + 3 + + + + 11 + 0 + + 11 + 1 + + 0.0 + + 1000 + + 6 + 24 + 2 + + + + 5 + 0 + + 5 + 1 + + 0.0 + + 1000 + + 6 + 24 + 2 + + + + 5 + 0 + + 6 + 1 + + 8 + + 1000 + + 6 + 24 + 3 + + + + 6 + 0 + + 6 + 1 + + 20 + + 1000 + + 8 + 29 + 3 + + + + 11 + 0 + + 11 + 1 + + 0.0 + + 1000 + + 6 + 24 + 2 + + + + 5 + 0 + + 6 + 1 + + 8 + + 1000 + + 6 + 24 + 3 + + + + 6 + 0 + + 6 + 1 + + 20 + + 1000 + + 8 + 29 + 3 + + + + 6 + 0 + + 6 + 1 + + 0.0 + + 1000 + + 6 + 24 + 2 + + + + 5 + 0 + + 5 + 1 + + 0.0 + + 1000 + + 6 + 24 + 2 + + + + 5 + 0 + + 6 + 1 + + 8 + + 1000 + + 6 + 24 + 3 + + + + 11 + 0 + + 11 + 1 + + 0.0 + + 1000 + + 6 + 24 + 2 + + + + 3 + 0 + + 4 + 1 + + 8 + + 1000 + + 6 + 24 + 3 + + + + 6 + 0 + + 6 + 1 + + 20 + + 1000 + + 8 + 29 + 3 + + + + 3 + 0 + + 4 + 1 + + 8 + + 1000 + + 6 + 24 + 3 + + + + 5 + 0 + + 5 + 1 + + 20 + + 1000 + + 8 + 29 + 3 + + + + 5 + 0 + + 6 + 1 + + 8 + + 1000 + + 6 + 24 + 3 + + + + 5 + 0 + + 5 + 1 + + 0.0 + + 1000 + + 6 + 24 + 2 + + + + 11 + 0 + + 11 + 1 + + 0.0 + + 1000 + + 6 + 24 + 2 + + + + 3 + 0 + + 4 + 1 + + 10 + + 1000 + + 6 + 24 + 3 + + + + 6 + 0 + + 6 + 1 + + 0.0 + + 1000 + + 6 + 24 + 2 + + + + 5 + 0 + + 6 + 1 + + 8 + + 1000 + + 6 + 24 + 3 + + + + 5 + 0 + + 5 + 1 + + 0.0 + + 1000 + + 6 + 24 + 2 + + + + 3 + 0 + + 3 + 1 + + 0.0 + + 1000 + + 6 + 24 + 2 + + + + 5 + 0 + + 5 + 1 + + 20 + + 1000 + + 8 + 29 + 3 + + + + 3 + 0 + + 4 + 1 + + 8 + + 1000 + + 6 + 24 + 3 + + + + 6 + 0 + + 6 + 1 + + 0.0 + + 1000 + + 6 + 24 + 2 + + + + 5 + 0 + + 6 + 1 + + 8 + + 1000 + + 6 + 24 + 3 + + + + 3 + 0 + + 3 + 1 + + 0.0 + + 1000 + + 6 + 24 + 2 + + + + 5 + 0 + + 5 + 1 + + 0.0 + + 1000 + + 6 + 24 + 2 + + + + 5 + 0 + + 6 + 1 + + 8 + + 1000 + + 6 + 24 + 3 + + + + 3 + 0 + + 3 + 1 + + 20 + + 1000 + + 8 + 29 + 3 + + + + 5 + 0 + + 5 + 1 + + 20 + + 1000 + + 8 + 29 + 3 + + + + 3 + 0 + + 4 + 1 + + 8 + + 1000 + + 6 + 24 + 3 + + + + 5 + 0 + + 5 + 1 + + 20 + + 1000 + + 8 + 29 + 3 + + + + 3 + 0 + + 4 + 1 + + 8 + + 1000 + + 6 + 24 + 3 + + + + 5 + 0 + + 5 + 1 + + 20 + + 1000 + + 8 + 29 + 3 + + + + 5 + 0 + + 5 + 1 + + 20 + + 1000 + + 8 + 29 + 3 + + + + 5 + 0 + + 5 + 1 + + 20 + + 1000 + + 8 + 29 + 3 + + + + 3 + 0 + + 3 + 1 + + 20 + + 1000 + + 8 + 29 + 3 + + + + + + + + + + + + + + + + + + + + + + + + + 375 + + + + + + + + 376 + + + + + + + + + 377 + + + + + + + + 388 + + + + + + + + + + + + + + + + + + + + + + + 389 + + + + + 390 + + + + + 391 + + + + + 392 + + + + + 393 + + + + + 394 + + + + + 395 + + + + + 396 + + + + + 397 + + + + + + + + 398 + + + + + + + + 399 + + + + + + + + 400 + + + + + 401 + + + + + 402 + + + + + 403 + + + + + 404 + + + + + 405 + + + + + + + + + + + + 406 + + + + + 407 + + + + + 408 + + + + + 409 + + + + + 410 + + + + + 411 + + + + + + + + + + 412 + + + + + 413 + + + + + 414 + + + + + 415 + + + + + + + + + + + 416 + + + + + 417 + + + + + 418 + + + + + 419 + + + + + 420 + + + + + 450 + + + + + + + + 451 + + + + + + + + + + 452 + + + + + 453 + + + + + 454 + + + + + 457 + + + + + 459 + + + + + 460 + + + + + 462 + + + + + 465 + + + + + 466 + + + + + 485 + + + + + 490 + + + + + + + + 491 + + + + + + + + 492 + + + + + 494 + + + + + 496 + + + + + + + + 497 + + + + + + + + + + + + + + + + + 498 + + + + + 499 + + + + + 500 + + + + + 501 + + + + + 502 + + + + + 503 + + + + + + + + 504 + + + + + 505 + + + + + 506 + + + + + 507 + + + + + 508 + + + + + + + + + + + + + + + + 509 + + + + + 510 + + + + + 511 + + + + + 512 + + + + + 513 + + + + + 514 + + + + + 515 + + + + + 516 + + + + + 517 + + + + + 534 + + + + + 1132 + + + + + + 7 + 0 + + 0 + 1 + + 112 + + 1000 + + 3 + 9 + 1 + + + + + + 1133 + + + + + 1137 + + + + + + + + 1138 + + + + + 1200 + + + + + + + + 1201 + + + + + 1206 + + + + + + 7 + 0 + + 0 + 1 + + 51 + + 1000 + + 3 + 9 + 1 + + + + + + 1207 + + + + + 1211 + + + + + 1212 + + + + + + + + 1214 + + + + + + 1220 + + + + + + + + 1221 + + + + + 1241 + + + + + 1242 + + + + + 1246 + + + + + 1248 + + + + + 1267 + + + + + 1295 + + + + + 1296 + + + + + 1298 + + + + + 1299 + + + + + 1302 + + + + + 1303 + + + + + 1304 + + + + + 1306 + + + + + 1307 + + + + + + + + 1308 + + + + + 1313 + + + + + 1314 + + + + + + + + 1316 + + + + + 1323 + + + + + 1324 + + + + + + + + 1325 + + + + + 1329 + + + + + 1336 + + + + + 1354 + + + + + 1355 + + + + + 1356 + + + + + 1357 + + + + + 1358 + + + + + 1365 + + + + + + + + 1366 + + + + + 1368 + + + + + 1369 + + + + + 1370 + + + + + + + + 1371 + + + + + 1374 + + + + + 1375 + + + + + 1376 + + + + + 1377 + + + + + 1378 + + + + + + + + 1379 + + + + + + + + 1380 + + + + + 1381 + + + + + 1383 + + + + + 1386 + + + + + 1388 + + + + + 1389 + + + + + 1390 + + + + + 1391 + + + + + 1392 + + + + + + + + 1393 + + + + + 1397 + + + + + 1398 + + + + + 1399 + + + + + 1400 + + + + + + 8 + 0 + + 0 + 1 + + 108 + + 1000 + + 3 + 9 + 1 + + + + + + 1401 + + + + + 1402 + + + + + 1403 + + + + + 1406 + + + + + 1409 + + + + + + + + 1410 + + + + + 1411 + + + + + 1412 + + + + + 1413 + + + + + + + + 1414 + + + + + 1417 + + + + + 1418 + + + + + 1419 + + + + + + + + 1420 + + + + + 1423 + + + + + 1424 + + + + + 1425 + + + + + 1426 + + + + + 1486 + + + + + 1488 + + + + + 1490 + + + + + 1493 + + + + + 1522 + + + + + 1523 + + + + + 1525 + + + + + 1528 + + + + + 1529 + + + + + + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + + + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + + + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + + + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + {{380, 496}, {480, 360}} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + + + + + 1531 + + + + + AppDelegate + NSObject + + id + id + id + + + + loadGoalDNA: + id + + + pause: + id + + + startEvolution: + id + + + + NSButton + NSButton + NSButton + NSTextField + NSTextField + NSSlider + NSSlider + NSSlider + NSTextField + NSTextField + NSTextField + NSTextField + Graph + NSWindow + + + + btLoadGoalDNA + NSButton + + + btPause + NSButton + + + btStartEvolution + NSButton + + + lbBestMatch + NSTextField + + + lbGeneration + NSTextField + + + slDnaLength + NSSlider + + + slMutationRate + NSSlider + + + slPopulationSize + NSSlider + + + tfDnaLength + NSTextField + + + tfGoalDNA + NSTextField + + + tfMutationRate + NSTextField + + + tfPopulationSize + NSTextField + + + vwGraph + Graph + + + window + NSWindow + + + + IBProjectSource + ./Classes/AppDelegate.h + + + + Graph + NSView + + IBProjectSource + ./Classes/Graph.h + + + + NSLayoutConstraint + NSObject + + IBProjectSource + ./Classes/NSLayoutConstraint.h + + + + + 0 + IBCocoaFramework + YES + 3 + + {11, 11} + {10, 3} + + YES + + diff --git a/iDNA/iDNA/iDNA-Info.plist b/iDNA/iDNA/iDNA-Info.plist new file mode 100644 index 0000000..8abc952 --- /dev/null +++ b/iDNA/iDNA/iDNA-Info.plist @@ -0,0 +1,34 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIconFile + + CFBundleIdentifier + bie.${PRODUCT_NAME:rfc1034identifier} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + LSMinimumSystemVersion + ${MACOSX_DEPLOYMENT_TARGET} + NSHumanReadableCopyright + Copyright © 2012 witzawitz. All rights reserved. + NSMainNibFile + MainMenu + NSPrincipalClass + NSApplication + + diff --git a/iDNA/iDNA/iDNA-Prefix.pch b/iDNA/iDNA/iDNA-Prefix.pch new file mode 100644 index 0000000..41eaf80 --- /dev/null +++ b/iDNA/iDNA/iDNA-Prefix.pch @@ -0,0 +1,7 @@ +// +// Prefix header for all source files of the 'iDNA' target in the 'iDNA' project +// + +#ifdef __OBJC__ + #import +#endif diff --git a/iDNA/iDNA/main.m b/iDNA/iDNA/main.m new file mode 100644 index 0000000..cb2669b --- /dev/null +++ b/iDNA/iDNA/main.m @@ -0,0 +1,14 @@ +// +// main.m +// iDNA +// +// Created by n on 25.12.12. +// Copyright (c) 2012 witzawitz. All rights reserved. +// + +#import + +int main(int argc, char *argv[]) +{ + return NSApplicationMain(argc, (const char **)argv); +} diff --git a/iDNA/iDNAtests/en.lproj/InfoPlist.strings b/iDNA/iDNAtests/en.lproj/InfoPlist.strings new file mode 100644 index 0000000..477b28f --- /dev/null +++ b/iDNA/iDNAtests/en.lproj/InfoPlist.strings @@ -0,0 +1,2 @@ +/* Localized versions of Info.plist keys */ + diff --git a/iDNA/iDNAtests/iDNAtests-Info.plist b/iDNA/iDNAtests/iDNAtests-Info.plist new file mode 100644 index 0000000..16679ab --- /dev/null +++ b/iDNA/iDNAtests/iDNAtests-Info.plist @@ -0,0 +1,22 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + bie.${PRODUCT_NAME:rfc1034identifier} + CFBundleInfoDictionaryVersion + 6.0 + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + + diff --git a/iDNA/iDNAtests/iDNAtests-Prefix.pch b/iDNA/iDNAtests/iDNAtests-Prefix.pch new file mode 100644 index 0000000..8e69d7b --- /dev/null +++ b/iDNA/iDNAtests/iDNAtests-Prefix.pch @@ -0,0 +1,7 @@ +// +// Prefix header for all source files of the 'iDNAtests' target in the 'iDNAtests' project +// + +#ifdef __OBJC__ + #import +#endif diff --git a/iDNA/iDNAtests/iDNAtests.h b/iDNA/iDNAtests/iDNAtests.h new file mode 100644 index 0000000..e00857d --- /dev/null +++ b/iDNA/iDNAtests/iDNAtests.h @@ -0,0 +1,13 @@ +// +// iDNAtests.h +// iDNAtests +// +// Created by n on 07.01.13. +// Copyright (c) 2013 witzawitz. All rights reserved. +// + +#import + +@interface iDNAtests : SenTestCase + +@end diff --git a/iDNA/iDNAtests/iDNAtests.m b/iDNA/iDNAtests/iDNAtests.m new file mode 100644 index 0000000..13edc92 --- /dev/null +++ b/iDNA/iDNAtests/iDNAtests.m @@ -0,0 +1,24 @@ +#import "iDNAtests.h" + +@implementation iDNAtests + +- (void)setUp +{ + [super setUp]; + + // Set-up code here. +} + +- (void)tearDown +{ + // Tear-down code here. + + [super tearDown]; +} + +- (void)testExample +{ + STFail(@"Unit tests are not implemented yet in iDNAtests"); +} + +@end