diff --git a/iDNA/.DS_Store b/iDNA/.DS_Store new file mode 100644 index 0000000..5008ddf Binary files /dev/null and b/iDNA/.DS_Store differ diff --git a/iDNA/goal_DNA.txt b/iDNA/goal_DNA.txt new file mode 100644 index 0000000..c2fe46b --- /dev/null +++ b/iDNA/goal_DNA.txt @@ -0,0 +1 @@ +CCTGGGATTAGGGTATCCGCCCTCTGTGACTCTTGG \ No newline at end of file diff --git a/iDNA/iDNA.xcodeproj/project.pbxproj b/iDNA/iDNA.xcodeproj/project.pbxproj new file mode 100644 index 0000000..a2eb25f --- /dev/null +++ b/iDNA/iDNA.xcodeproj/project.pbxproj @@ -0,0 +1,351 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 270ED7B6169443E8007CD20B /* Nucleotides.m in Sources */ = {isa = PBXBuildFile; fileRef = 270ED7B5169443E8007CD20B /* Nucleotides.m */; }; + 272A0BB61688485E00F6EFE7 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 272A0BB51688485E00F6EFE7 /* Cocoa.framework */; }; + 272A0BC01688485E00F6EFE7 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 272A0BBE1688485E00F6EFE7 /* InfoPlist.strings */; }; + 272A0BC21688485E00F6EFE7 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 272A0BC11688485E00F6EFE7 /* main.m */; }; + 272A0BC61688485E00F6EFE7 /* Credits.rtf in Resources */ = {isa = PBXBuildFile; fileRef = 272A0BC41688485E00F6EFE7 /* Credits.rtf */; }; + 272A0BC91688485E00F6EFE7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 272A0BC81688485E00F6EFE7 /* AppDelegate.m */; }; + 272A0BCC1688485E00F6EFE7 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 272A0BCA1688485E00F6EFE7 /* MainMenu.xib */; }; + 272A0BDB16884F0000F6EFE7 /* NSBezierPath+MCAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 272A0BD816884F0000F6EFE7 /* NSBezierPath+MCAdditions.m */; }; + 272A0BDC16884F0000F6EFE7 /* NSShadow+MCAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 272A0BDA16884F0000F6EFE7 /* NSShadow+MCAdditions.m */; }; + 272A0BEC16886B6100F6EFE7 /* LCDBoxView.m in Sources */ = {isa = PBXBuildFile; fileRef = 272A0BEB16886B6100F6EFE7 /* LCDBoxView.m */; }; + 272A0BF11688A4A200F6EFE7 /* Cell.m in Sources */ = {isa = PBXBuildFile; fileRef = 272A0BEE1688A4A200F6EFE7 /* Cell.m */; }; + 272A0BF91688D1D900F6EFE7 /* Population.m in Sources */ = {isa = PBXBuildFile; fileRef = 272A0BF81688D1D900F6EFE7 /* Population.m */; }; + 27EEE6341699BF7300A67547 /* idna.iconset in Resources */ = {isa = PBXBuildFile; fileRef = 27EEE6331699BF7300A67547 /* idna.iconset */; }; + 27EEE644169A003300A67547 /* IntegerValueFormatter.m in Sources */ = {isa = PBXBuildFile; fileRef = 27EEE643169A003300A67547 /* IntegerValueFormatter.m */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 270ED7B4169443E8007CD20B /* Nucleotides.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Nucleotides.h; sourceTree = ""; }; + 270ED7B5169443E8007CD20B /* Nucleotides.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Nucleotides.m; sourceTree = ""; }; + 272A0BB11688485E00F6EFE7 /* iDNA.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = iDNA.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 272A0BB51688485E00F6EFE7 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; }; + 272A0BB81688485E00F6EFE7 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; }; + 272A0BB91688485E00F6EFE7 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = System/Library/Frameworks/CoreData.framework; sourceTree = SDKROOT; }; + 272A0BBA1688485E00F6EFE7 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; + 272A0BBD1688485E00F6EFE7 /* iDNA-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "iDNA-Info.plist"; sourceTree = ""; }; + 272A0BBF1688485E00F6EFE7 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; + 272A0BC11688485E00F6EFE7 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; + 272A0BC31688485E00F6EFE7 /* iDNA-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "iDNA-Prefix.pch"; sourceTree = ""; }; + 272A0BC51688485E00F6EFE7 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.rtf; name = en; path = en.lproj/Credits.rtf; sourceTree = ""; }; + 272A0BC71688485E00F6EFE7 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; + 272A0BC81688485E00F6EFE7 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; + 272A0BCB1688485E00F6EFE7 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/MainMenu.xib; sourceTree = ""; }; + 272A0BD716884F0000F6EFE7 /* NSBezierPath+MCAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSBezierPath+MCAdditions.h"; sourceTree = ""; }; + 272A0BD816884F0000F6EFE7 /* NSBezierPath+MCAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSBezierPath+MCAdditions.m"; sourceTree = ""; }; + 272A0BD916884F0000F6EFE7 /* NSShadow+MCAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSShadow+MCAdditions.h"; sourceTree = ""; }; + 272A0BDA16884F0000F6EFE7 /* NSShadow+MCAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSShadow+MCAdditions.m"; sourceTree = ""; }; + 272A0BEA16886B6100F6EFE7 /* LCDBoxView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LCDBoxView.h; sourceTree = ""; }; + 272A0BEB16886B6100F6EFE7 /* LCDBoxView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LCDBoxView.m; sourceTree = ""; }; + 272A0BED1688A4A200F6EFE7 /* Cell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Cell.h; sourceTree = ""; }; + 272A0BEE1688A4A200F6EFE7 /* Cell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Cell.m; sourceTree = ""; }; + 272A0BF71688D1D900F6EFE7 /* Population.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Population.h; sourceTree = ""; }; + 272A0BF81688D1D900F6EFE7 /* Population.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Population.m; sourceTree = ""; }; + 27EEE6331699BF7300A67547 /* idna.iconset */ = {isa = PBXFileReference; lastKnownFileType = folder.iconset; path = idna.iconset; sourceTree = ""; }; + 27EEE642169A003300A67547 /* IntegerValueFormatter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IntegerValueFormatter.h; sourceTree = ""; }; + 27EEE643169A003300A67547 /* IntegerValueFormatter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = IntegerValueFormatter.m; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 272A0BAE1688485E00F6EFE7 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 272A0BB61688485E00F6EFE7 /* Cocoa.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 272A0BA61688485E00F6EFE7 = { + isa = PBXGroup; + children = ( + 272A0BBB1688485E00F6EFE7 /* iDNA */, + 272A0BB41688485E00F6EFE7 /* Frameworks */, + 272A0BB21688485E00F6EFE7 /* Products */, + ); + sourceTree = ""; + }; + 272A0BB21688485E00F6EFE7 /* Products */ = { + isa = PBXGroup; + children = ( + 272A0BB11688485E00F6EFE7 /* iDNA.app */, + ); + name = Products; + sourceTree = ""; + }; + 272A0BB41688485E00F6EFE7 /* Frameworks */ = { + isa = PBXGroup; + children = ( + 272A0BB51688485E00F6EFE7 /* Cocoa.framework */, + 272A0BB71688485E00F6EFE7 /* Other Frameworks */, + ); + name = Frameworks; + sourceTree = ""; + }; + 272A0BB71688485E00F6EFE7 /* Other Frameworks */ = { + isa = PBXGroup; + children = ( + 272A0BB81688485E00F6EFE7 /* AppKit.framework */, + 272A0BB91688485E00F6EFE7 /* CoreData.framework */, + 272A0BBA1688485E00F6EFE7 /* Foundation.framework */, + ); + name = "Other Frameworks"; + sourceTree = ""; + }; + 272A0BBB1688485E00F6EFE7 /* iDNA */ = { + isa = PBXGroup; + children = ( + 272A0BC71688485E00F6EFE7 /* AppDelegate.h */, + 272A0BC81688485E00F6EFE7 /* AppDelegate.m */, + 27EEE642169A003300A67547 /* IntegerValueFormatter.h */, + 27EEE643169A003300A67547 /* IntegerValueFormatter.m */, + 272A0BCA1688485E00F6EFE7 /* MainMenu.xib */, + 270ED7B4169443E8007CD20B /* Nucleotides.h */, + 270ED7B5169443E8007CD20B /* Nucleotides.m */, + 272A0BED1688A4A200F6EFE7 /* Cell.h */, + 272A0BEE1688A4A200F6EFE7 /* Cell.m */, + 272A0BF71688D1D900F6EFE7 /* Population.h */, + 272A0BF81688D1D900F6EFE7 /* Population.m */, + 272A0BEA16886B6100F6EFE7 /* LCDBoxView.h */, + 272A0BEB16886B6100F6EFE7 /* LCDBoxView.m */, + 272A0BD716884F0000F6EFE7 /* NSBezierPath+MCAdditions.h */, + 272A0BD816884F0000F6EFE7 /* NSBezierPath+MCAdditions.m */, + 272A0BD916884F0000F6EFE7 /* NSShadow+MCAdditions.h */, + 272A0BDA16884F0000F6EFE7 /* NSShadow+MCAdditions.m */, + 272A0BBC1688485E00F6EFE7 /* Supporting Files */, + ); + path = iDNA; + sourceTree = ""; + }; + 272A0BBC1688485E00F6EFE7 /* Supporting Files */ = { + isa = PBXGroup; + children = ( + 272A0BBD1688485E00F6EFE7 /* iDNA-Info.plist */, + 272A0BBE1688485E00F6EFE7 /* InfoPlist.strings */, + 27EEE6331699BF7300A67547 /* idna.iconset */, + 272A0BC11688485E00F6EFE7 /* main.m */, + 272A0BC31688485E00F6EFE7 /* iDNA-Prefix.pch */, + 272A0BC41688485E00F6EFE7 /* Credits.rtf */, + ); + name = "Supporting Files"; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 272A0BB01688485E00F6EFE7 /* iDNA */ = { + isa = PBXNativeTarget; + buildConfigurationList = 272A0BCF1688485E00F6EFE7 /* Build configuration list for PBXNativeTarget "iDNA" */; + buildPhases = ( + 272A0BAD1688485E00F6EFE7 /* Sources */, + 272A0BAE1688485E00F6EFE7 /* Frameworks */, + 272A0BAF1688485E00F6EFE7 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = iDNA; + productName = iDNA; + productReference = 272A0BB11688485E00F6EFE7 /* iDNA.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 272A0BA81688485E00F6EFE7 /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 0450; + ORGANIZATIONNAME = "Alexander Shvets"; + }; + buildConfigurationList = 272A0BAB1688485E00F6EFE7 /* Build configuration list for PBXProject "iDNA" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + ); + mainGroup = 272A0BA61688485E00F6EFE7; + productRefGroup = 272A0BB21688485E00F6EFE7 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 272A0BB01688485E00F6EFE7 /* iDNA */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 272A0BAF1688485E00F6EFE7 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 272A0BC01688485E00F6EFE7 /* InfoPlist.strings in Resources */, + 272A0BC61688485E00F6EFE7 /* Credits.rtf in Resources */, + 272A0BCC1688485E00F6EFE7 /* MainMenu.xib in Resources */, + 27EEE6341699BF7300A67547 /* idna.iconset in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 272A0BAD1688485E00F6EFE7 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 272A0BC21688485E00F6EFE7 /* main.m in Sources */, + 272A0BC91688485E00F6EFE7 /* AppDelegate.m in Sources */, + 272A0BDB16884F0000F6EFE7 /* NSBezierPath+MCAdditions.m in Sources */, + 272A0BDC16884F0000F6EFE7 /* NSShadow+MCAdditions.m in Sources */, + 272A0BEC16886B6100F6EFE7 /* LCDBoxView.m in Sources */, + 272A0BF11688A4A200F6EFE7 /* Cell.m in Sources */, + 272A0BF91688D1D900F6EFE7 /* Population.m in Sources */, + 270ED7B6169443E8007CD20B /* Nucleotides.m in Sources */, + 27EEE644169A003300A67547 /* IntegerValueFormatter.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXVariantGroup section */ + 272A0BBE1688485E00F6EFE7 /* InfoPlist.strings */ = { + isa = PBXVariantGroup; + children = ( + 272A0BBF1688485E00F6EFE7 /* en */, + ); + name = InfoPlist.strings; + sourceTree = ""; + }; + 272A0BC41688485E00F6EFE7 /* Credits.rtf */ = { + isa = PBXVariantGroup; + children = ( + 272A0BC51688485E00F6EFE7 /* en */, + ); + name = Credits.rtf; + sourceTree = ""; + }; + 272A0BCA1688485E00F6EFE7 /* MainMenu.xib */ = { + isa = PBXVariantGroup; + children = ( + 272A0BCB1688485E00F6EFE7 /* en */, + ); + name = MainMenu.xib; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 272A0BCD1688485E00F6EFE7 /* 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; + }; + 272A0BCE1688485E00F6EFE7 /* 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; + }; + 272A0BD01688485E00F6EFE7 /* 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; + }; + 272A0BD11688485E00F6EFE7 /* Release */ = { + 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 = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 272A0BAB1688485E00F6EFE7 /* Build configuration list for PBXProject "iDNA" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 272A0BCD1688485E00F6EFE7 /* Debug */, + 272A0BCE1688485E00F6EFE7 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 272A0BCF1688485E00F6EFE7 /* Build configuration list for PBXNativeTarget "iDNA" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 272A0BD01688485E00F6EFE7 /* Debug */, + 272A0BD11688485E00F6EFE7 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 272A0BA81688485E00F6EFE7 /* 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/alexandershvets.xcuserdatad/UserInterfaceState.xcuserstate b/iDNA/iDNA.xcodeproj/project.xcworkspace/xcuserdata/alexandershvets.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000..36000ff Binary files /dev/null and b/iDNA/iDNA.xcodeproj/project.xcworkspace/xcuserdata/alexandershvets.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/iDNA/iDNA.xcodeproj/xcuserdata/alexandershvets.xcuserdatad/xcdebugger/Breakpoints.xcbkptlist b/iDNA/iDNA.xcodeproj/xcuserdata/alexandershvets.xcuserdatad/xcdebugger/Breakpoints.xcbkptlist new file mode 100644 index 0000000..05301bc --- /dev/null +++ b/iDNA/iDNA.xcodeproj/xcuserdata/alexandershvets.xcuserdatad/xcdebugger/Breakpoints.xcbkptlist @@ -0,0 +1,5 @@ + + + diff --git a/iDNA/iDNA.xcodeproj/xcuserdata/alexandershvets.xcuserdatad/xcschemes/iDNA.xcscheme b/iDNA/iDNA.xcodeproj/xcuserdata/alexandershvets.xcuserdatad/xcschemes/iDNA.xcscheme new file mode 100644 index 0000000..5f0303b --- /dev/null +++ b/iDNA/iDNA.xcodeproj/xcuserdata/alexandershvets.xcuserdatad/xcschemes/iDNA.xcscheme @@ -0,0 +1,86 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/iDNA/iDNA.xcodeproj/xcuserdata/alexandershvets.xcuserdatad/xcschemes/xcschememanagement.plist b/iDNA/iDNA.xcodeproj/xcuserdata/alexandershvets.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..f2af980 --- /dev/null +++ b/iDNA/iDNA.xcodeproj/xcuserdata/alexandershvets.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,22 @@ + + + + + SchemeUserState + + iDNA.xcscheme + + orderHint + 0 + + + SuppressBuildableAutocreation + + 272A0BB01688485E00F6EFE7 + + primary + + + + + diff --git a/iDNA/iDNA/AppDelegate.h b/iDNA/iDNA/AppDelegate.h new file mode 100644 index 0000000..47ddd41 --- /dev/null +++ b/iDNA/iDNA/AppDelegate.h @@ -0,0 +1,59 @@ +// +// AppDelegate.h +// iDNA +// +// Created by Alexander Shvets on 24.12.12. +// Copyright (c) 2012 Alexander Shvets. All rights reserved. +// + +#import +#import "Cell.h" +#import "Population.h" + +@interface AppDelegate : NSObject +{ + int populationSize; + int DNALength; + int mutationRate; + + int generation; + int bestMatch; + + int appState; + + Cell* goalDNA; + Population* population; +} + +@property (assign) IBOutlet NSWindow *window; +@property (weak) IBOutlet NSTextField *fieldPopulationSize; +@property (weak) IBOutlet NSTextField *fieldDNALength; +@property (weak) IBOutlet NSTextField *fieldMutationRate; + +@property (weak) IBOutlet NSSlider *sliderPopulationSize; +@property (weak) IBOutlet NSSlider *sliderDNALength; +@property (weak) IBOutlet NSSlider *sliderMutationRate; + +@property (weak) IBOutlet NSTextField *fieldGoalDNA; +@property (weak) IBOutlet NSTextField *labelGeneration; +@property (weak) IBOutlet NSTextField *labelBestMatch; +@property (weak) IBOutlet NSLevelIndicator *progressMatch; + +@property (weak) IBOutlet NSButton *btnStart; +@property (weak) IBOutlet NSButton *btnPause; +@property (weak) IBOutlet NSButton *btnLoad; + +- (IBAction)startEvolution:(id)sender; +- (IBAction)pauseEvolution:(id)sender; +- (IBAction)loadGoalDNA:(id)sender; +- (NSString*)validateDNAString:(NSString*)DNAString; + +- (void)buildGoalDNAWithLength:(int)length; + +- (void)disableControls; +- (void)enableControls; +- (void)appReset; + +- (void)evolution; + +@end diff --git a/iDNA/iDNA/AppDelegate.m b/iDNA/iDNA/AppDelegate.m new file mode 100644 index 0000000..839c798 --- /dev/null +++ b/iDNA/iDNA/AppDelegate.m @@ -0,0 +1,303 @@ +// +// AppDelegate.m +// iDNA +// +// Created by Alexander Shvets on 24.12.12. +// Copyright (c) 2012 Alexander Shvets. All rights reserved. +// + +#import "AppDelegate.h" +#import "Nucleotides.h" +#import "IntegerValueFormatter.h" + +#define MAX_POPULATION_SIZE 5000 +#define DEFAULT_POPULATION_SIZE 1000 +#define MAX_DNA_LENGTH 300 +#define DEFAULT_DNA_LENGTH 50 +#define DEFAULT_MUTATION_RATE 10 + +#define APP_STATE_IDLE 0 +#define APP_STATE_RUNNING 1 +#define APP_STATE_PAUSED 2 + +@implementation AppDelegate + +- (void)applicationDidFinishLaunching:(NSNotification *)aNotification +{ + + [self appReset]; + + IntegerValueFormatter* formatter = [[IntegerValueFormatter alloc] init]; + [_fieldPopulationSize setFormatter:formatter]; + [_fieldDNALength setFormatter:formatter]; + [_fieldMutationRate setFormatter:formatter]; + + [_sliderPopulationSize setMaxValue:MAX_POPULATION_SIZE]; + [_sliderDNALength setMaxValue:MAX_DNA_LENGTH]; + [self setPopulationSize:DEFAULT_POPULATION_SIZE]; + [self setDNALength:DEFAULT_DNA_LENGTH]; + [self setMutationRate:DEFAULT_MUTATION_RATE]; + + [_fieldGoalDNA setStringValue:[goalDNA stringValue]]; + + [_labelGeneration setStringValue:[NSString stringWithFormat:@"Generation: %i", generation]]; +} + +- (id)init +{ + if(self = [super init]){ + [self addObserver:self forKeyPath:@"populationSize" options:NSKeyValueObservingOptionOld context:@"populationSize"]; + [self addObserver:self forKeyPath:@"DNALength" options:NSKeyValueObservingOptionOld context:@"DNALength"]; + [self addObserver:self forKeyPath:@"mutationRate" options:NSKeyValueObservingOptionOld context:@"mutationRate"]; + } + + return self; +} + +- (void)dealloc { + [self removeObserver:self forKeyPath:@"populationSize"]; + [self removeObserver:self forKeyPath:@"DNALength"]; + [self removeObserver:self forKeyPath:@"mutationRate"]; +} + +- (void)appReset +{ + appState = APP_STATE_IDLE; + generation = 1; + bestMatch = 0; + + [self enableControls]; +} + +-(void) observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context { + if (context == @"populationSize") { + + if(populationSize > MAX_POPULATION_SIZE){ + populationSize = MAX_POPULATION_SIZE; + [_fieldPopulationSize setIntegerValue:populationSize]; + } else if(populationSize < 2){ + populationSize = 2; + [_fieldPopulationSize setIntegerValue:populationSize]; + } + + //NSLog(@"populationSize %i", populationSize); + + } else if (context == @"DNALength") { + + if(DNALength > MAX_DNA_LENGTH){ + DNALength = MAX_DNA_LENGTH; + [_fieldDNALength setIntegerValue:DNALength]; + } else if(DNALength < 1){ + DNALength = 1; + [_fieldDNALength setIntegerValue:DNALength]; + } + + [self buildGoalDNAWithLength: DNALength]; + //NSLog(@"DNALength %i", DNALength); + + } else if (context == @"mutationRate") { + + if(mutationRate < 1){ + mutationRate = 1; + [_fieldMutationRate setIntValue:mutationRate]; + } else if(mutationRate > 100){ + mutationRate = 100; + [_fieldMutationRate setIntValue:mutationRate]; + } + + //NSLog(@"mutationRate $i", mutationRate); + } +} + +- (void)setPopulationSize:(int)size +{ + populationSize = size; +} + +- (void)setDNALength:(int)length +{ + DNALength = length; +} + +- (void)setMutationRate:(int)rate +{ + mutationRate = rate; +} + +- (void)buildGoalDNAWithLength:(int) length +{ + goalDNA = [[Cell alloc] initWithLength:length]; + [_fieldGoalDNA setStringValue:[goalDNA stringValue]]; +} + + +- (IBAction)startEvolution:(id)sender { + [self disableControls]; + + if(appState != APP_STATE_PAUSED){ + population = [[Population alloc] initWithPopulationSize:populationSize andDNALength:DNALength]; + NSLog(@"New population created. Simulation started."); + } else { + NSLog(@"Simulation continue"); + } + + //NSLog(@"goal: %@, %i", [goalDNA stringValue], DNALength); + + appState = APP_STATE_RUNNING; + + //start background evolution + NSThread* bgEvolutionThread = [[NSThread alloc] initWithTarget:self selector:@selector(evolution) object:nil]; + [bgEvolutionThread start]; +} + +- (void) evolution +{ + + do { + @autoreleasepool { //устраняем утечку памяти в цикле + + // пересчитать расстояние Хэминга для каждой клетки в популяции + [population hammingDistanceWith:goalDNA]; + + // отсортировать популяцию по расстоянию Хэминга + [population sort]; + + // процент сходства лучшей клетки с целевой ДНК + float bestPopulationDistance = DNALength - [[population.cells objectAtIndex:0] hammingDistance]; + float matchPercent = (bestPopulationDistance / DNALength) * 100; + + // обновление статистики (если необходимо) + if((int)matchPercent > bestMatch){ + bestMatch = (int)matchPercent; + [_progressMatch setIntValue:bestMatch]; + [_labelBestMatch setStringValue:[NSString stringWithFormat:@"Best individual match: %i%%", bestMatch]]; + + NSLog(@"\nNew best match: %i%% \nBest DNA: %@", bestMatch, [[population.cells objectAtIndex:0] stringValue]); + } + + // проверка на успешное завершение эволюции + if(![population evolutionSuccess]){ + + // скрестить кандидатов из топ 50% и заменить результатом оставшиеся 50% + if(DNALength >= 2) [population hybridize]; + + // мутировать получившуюся популяцию + [population mutate:mutationRate]; + + generation++; + [_labelGeneration setStringValue:[NSString stringWithFormat:@"Generation: %i", generation]]; + + } else { // эволюция завершена + + [_labelBestMatch setStringValue:@"Simulation successfully complete."]; + NSLog(@"JOB DONE!!!!"); + NSBeep(); + + appState = APP_STATE_IDLE; + [self appReset]; + } + + } + } while(appState == APP_STATE_RUNNING); + +} + +- (IBAction)pauseEvolution:(id)sender { + if([[sender title] isEqualToString:@"Pause"]){ + //pause + appState = APP_STATE_PAUSED; + [sender setTitle:@"Resume"]; + + } else { + //resume + [self startEvolution:nil]; + [sender setTitle:@"Pause"]; + } +} + +- (void)disableControls +{ + [_fieldPopulationSize setEnabled:NO]; + [_fieldDNALength setEnabled:NO]; + [_sliderPopulationSize setEnabled:NO]; + [_sliderDNALength setEnabled:NO]; + [_btnStart setEnabled:NO]; + [_btnLoad setEnabled:NO]; + [_btnPause setEnabled:YES]; +} + +- (void)enableControls +{ + [_fieldPopulationSize setEnabled:YES]; + [_fieldDNALength setEnabled:YES]; + [_sliderPopulationSize setEnabled:YES]; + [_sliderDNALength setEnabled:YES]; + [_btnStart setEnabled:YES]; + [_btnLoad setEnabled:YES]; + [_btnPause setEnabled:NO]; +} + +- (IBAction)loadGoalDNA:(id)sender { + + NSOpenPanel* openDlg = [NSOpenPanel openPanel]; + [openDlg setCanChooseFiles:YES]; + [openDlg setAllowedFileTypes:[NSArray arrayWithObjects:@"txt", @"dna", nil]]; + [openDlg setAllowsMultipleSelection:NO]; + + if([openDlg runModal] == NSOKButton){ + NSArray* files = [openDlg URLs]; + NSString* filePath = [[files objectAtIndex:0] path]; + + if(filePath){ + NSString* fileContents = [NSString stringWithContentsOfFile:filePath encoding:NSUTF8StringEncoding error:nil]; + NSString* dnaString = [self validateDNAString:fileContents]; + NSLog(@"File DNA: %@", dnaString); + + if([dnaString length]){ + [self setDNALength:(int)[dnaString length]]; + [_fieldGoalDNA setStringValue:dnaString]; + + //goalDNA = nil; + goalDNA = [[Cell alloc ] initWithString:dnaString]; + NSLog(@"Loaded goal DNA: %@", [goalDNA stringValue]); + + } else { + NSAlert *alert = [[NSAlert alloc] init]; + [alert setMessageText:@"\nWrong DNA format.\nNo nucleotides found."]; + [alert beginSheetModalForWindow:_window modalDelegate:self didEndSelector:nil contextInfo:nil]; + } + + } + } + +} + +// проверка загруженой из файла ДНК. +// удаление неправильных символов (не C,G,T,A). это позволяет скормить приложению любой текстовый файл. +// обрезать ДНК до максимально возможной длины +- (NSString*)validateDNAString:(NSString*)DNAString +{ + + NSArray* nucleotides = [[Nucleotides sharedInstance] getNucleotides]; + NSString* dnaString = @""; + NSString* singleChar = @""; + + for(int i = 0; i < [DNAString length]; i++){ + singleChar = [[DNAString substringWithRange:NSMakeRange(i,1)] uppercaseString]; + if([nucleotides containsObject:singleChar]){ + dnaString = [dnaString stringByAppendingString:singleChar]; + } + + if([dnaString length] >= MAX_DNA_LENGTH) break; + } + + return dnaString; +} + +// закрываем приложение при закрытии окна +- (BOOL) applicationShouldTerminateAfterLastWindowClosed:(NSApplication *)sender +{ + return YES; +} + +@end \ No newline at end of file diff --git a/iDNA/iDNA/Cell.h b/iDNA/iDNA/Cell.h new file mode 100644 index 0000000..4541338 --- /dev/null +++ b/iDNA/iDNA/Cell.h @@ -0,0 +1,28 @@ +// +// Cell.h +// hexlet_dna +// +// Created by Alexander Shvets on 02.11.12. +// Copyright (c) 2012 Alexander Shvets. All rights reserved. +// + +#import + +@interface Cell : NSObject +{ + NSArray *nucleotides; +} + +@property NSMutableArray *dna; +@property int hammingDistance; + +- (id)initWithLength:(int)dnaLength; +- (id)initWithDNA:(NSArray*)dnaArr; +- (id)initWithString:(NSString*)dnaString; + +- (void)mutate:(int)count; +- (int)hammingDistance:(id)cell; + +- (NSString*)stringValue; + +@end diff --git a/iDNA/iDNA/Cell.m b/iDNA/iDNA/Cell.m new file mode 100644 index 0000000..666c585 --- /dev/null +++ b/iDNA/iDNA/Cell.m @@ -0,0 +1,119 @@ +// +// Cell.m +// hexlet_dna +// +// Created by Alexander Shvets on 02.11.12. +// Copyright (c) 2012 Alexander Shvets. All rights reserved. +// + +#import "Cell.h" +#import "Nucleotides.h" + +@implementation Cell + +- (id)initWithLength:(int) dnaLength +{ + if(self = [super init]){ + _dna = [NSMutableArray arrayWithCapacity:dnaLength]; + _hammingDistance = dnaLength; + nucleotides = [[Nucleotides sharedInstance] getNucleotides]; + + int nucleotideIndex; + for(int i = 0; i < dnaLength; i++){ + nucleotideIndex = arc4random() % 4; + [_dna addObject:[nucleotides objectAtIndex:nucleotideIndex]]; + } + + } + + return self; +} + +- (id)initWithDNA:(NSArray*)dnaArr +{ + if(self = [super init]){ + _dna = [NSMutableArray arrayWithArray:dnaArr]; + _hammingDistance = (int)[dnaArr count]; + nucleotides = [[Nucleotides sharedInstance] getNucleotides]; + } + + return self; +} + +- (id)initWithString:(NSString*)dnaString +{ + if(self = [super init]){ + _dna = [NSMutableArray arrayWithCapacity:[dnaString length]]; + for (int i=0; i < [dnaString length]; i++) { + [_dna addObject:[NSString stringWithFormat:@"%c", [dnaString characterAtIndex:i]]]; + } + + _hammingDistance = (int)[dnaString length]; + nucleotides = [[Nucleotides sharedInstance] getNucleotides]; + } + + return self; +} + +- (void) mutate:(int)percent { + + if(percent < 1){ + return; + } else if(percent > 100){ + percent = 100; + } + + uint indexToReplace, nucleotideIndex, indexValue; + uint nucleotidesToReplace = (uint)(percent * 0.01 * [self.dna count]); + + if(nucleotidesToReplace < 1){ + // необходимо изменить минимум 1 нуклеотид + nucleotidesToReplace = 1; + } + + NSMutableArray *replacedIndexes = [NSMutableArray arrayWithCapacity:nucleotidesToReplace]; + + // заполняем массив доступными индексами + for (int i = 0; i < [self.dna count]; i++){ + [replacedIndexes addObject:[NSNumber numberWithUnsignedInt:i]]; + } + + while (nucleotidesToReplace) { + indexToReplace = arc4random() % [replacedIndexes count]; // индекс для замены + indexValue = [[replacedIndexes objectAtIndex:indexToReplace] unsignedIntValue]; + + do { // исключаем замену на аналогичный нуклеотид + nucleotideIndex = arc4random() % 4; + } while ([[self.dna objectAtIndex:indexValue] isEqual:[nucleotides objectAtIndex:nucleotideIndex]]); + + // заменяем нуклеотид по индексу indexToReplace + [self.dna replaceObjectAtIndex:indexValue withObject:[nucleotides objectAtIndex:nucleotideIndex]]; + + [replacedIndexes removeObjectAtIndex:indexToReplace]; // изымаем этот индекс из списка доступных + + nucleotidesToReplace--; + } + +} + +- (int)hammingDistance: (Cell*)goalDNA { + int distance = 0; + for(int i = 0; i < [goalDNA.dna count]; i++){ + if(![[goalDNA.dna objectAtIndex:i] isEqualToString:[self.dna objectAtIndex:i]]) distance++; + } + + self.hammingDistance = distance; + + return distance; +} + +- (NSString*)stringValue +{ + return [self.dna componentsJoinedByString:@""]; +} + +-(NSString *) description { + return [NSString stringWithFormat:@"HD: %d | DNA: %@", self.hammingDistance, [self.dna componentsJoinedByString:@""]]; +} + +@end diff --git a/iDNA/iDNA/IntegerValueFormatter.h b/iDNA/iDNA/IntegerValueFormatter.h new file mode 100644 index 0000000..07aa887 --- /dev/null +++ b/iDNA/iDNA/IntegerValueFormatter.h @@ -0,0 +1,13 @@ +// +// IntegerValueFormatter.h +// iDNA +// +// Created by Alexander Shvets on 06.01.13. +// Copyright (c) 2013 Alexander Shvets. All rights reserved. +// + +#import + +@interface IntegerValueFormatter : NSNumberFormatter + +@end diff --git a/iDNA/iDNA/IntegerValueFormatter.m b/iDNA/iDNA/IntegerValueFormatter.m new file mode 100644 index 0000000..6d487a1 --- /dev/null +++ b/iDNA/iDNA/IntegerValueFormatter.m @@ -0,0 +1,28 @@ +// +// IntegerValueFormatter.m +// iDNA +// +// Created by Alexander Shvets on 06.01.13. +// Copyright (c) 2013 Alexander Shvets. All rights reserved. +// + +#import "IntegerValueFormatter.h" + +@implementation IntegerValueFormatter + +- (BOOL)isPartialStringValid:(NSString*)partialString newEditingString:(NSString**)newString errorDescription:(NSString**)error +{ + + if([partialString length] == 0) *newString = @"0"; + + NSScanner* scanner = [NSScanner scannerWithString:partialString]; + + if(!([scanner scanInt:0] && [scanner isAtEnd])) { + NSBeep(); + return NO; + } + + return YES; +} + +@end diff --git a/iDNA/iDNA/LCDBoxView.h b/iDNA/iDNA/LCDBoxView.h new file mode 100644 index 0000000..dc5cd20 --- /dev/null +++ b/iDNA/iDNA/LCDBoxView.h @@ -0,0 +1,13 @@ +// +// LCDBoxView.h +// iDNA +// +// Created by Alexander Shvets on 24.12.12. +// Copyright (c) 2012 Alexander Shvets. All rights reserved. +// + +#import + +@interface LCDBoxView : NSBox + +@end diff --git a/iDNA/iDNA/LCDBoxView.m b/iDNA/iDNA/LCDBoxView.m new file mode 100644 index 0000000..aa2a897 --- /dev/null +++ b/iDNA/iDNA/LCDBoxView.m @@ -0,0 +1,65 @@ +// +// LCDBoxView.m +// iDNA +// +// Created by Alexander Shvets on 24.12.12. +// Copyright (c) 2012 Alexander Shvets. All rights reserved. +// + +#import "LCDBoxView.h" +#import "NSShadow+MCAdditions.h" +#import "NSBezierPath+MCAdditions.h" + +@implementation LCDBoxView + +- (id)initWithFrame:(NSRect)frame +{ + self = [super initWithFrame:frame]; + if (self) { + // Initialization code here. + } + + return self; +} + +- (void)drawRect:(NSRect)dirtyRect +{ + + static NSShadow *kDropShadow = nil; + static NSShadow *kInnerShadow = nil; + static NSGradient *kBackgroundGradient = nil; + static NSColor *kBorderColor = nil; + + if (kDropShadow == nil) { + kDropShadow = [[NSShadow alloc] initWithColor:[NSColor colorWithCalibratedWhite:.863 alpha:.75] offset:NSMakeSize(0, -1.0) blurRadius:1.0]; + kInnerShadow = [[NSShadow alloc] initWithColor:[NSColor colorWithCalibratedWhite:0.0 alpha:.52] offset:NSMakeSize(0.0, -1.0) blurRadius:4.0]; + kBorderColor = [NSColor colorWithCalibratedWhite:0.569 alpha:1.0]; + // iTunes style + /* + kBackgroundGradient = [[NSGradient alloc] initWithColorsAndLocations:[NSColor colorWithCalibratedRed:0.929 green:0.945 blue:0.882 alpha:1.0],0.0,[NSColor colorWithCalibratedRed:0.902 green:0.922 blue:0.835 alpha:1.0],0.5,[NSColor colorWithCalibratedRed:0.871 green:0.894 blue:0.78 alpha:1.0],0.5,[NSColor colorWithCalibratedRed:0.949 green:0.961 blue:0.878 alpha:1.0],1.0, nil]; + */ + // Xcode style + kBackgroundGradient = [[NSGradient alloc] initWithColorsAndLocations:[NSColor colorWithCalibratedRed:0.957 green:0.976 blue:1.0 alpha:1.0],0.0,[NSColor colorWithCalibratedRed:0.871 green:0.894 blue:0.918 alpha:1.0],0.5,[NSColor colorWithCalibratedRed:0.831 green:0.851 blue:0.867 alpha:1.0],0.5,[NSColor colorWithCalibratedRed:0.82 green:0.847 blue:0.89 alpha:1.0],1.0, nil]; + } + + NSRect bounds = [self bounds]; + bounds.size.height -= 1.0; + bounds.origin.y += 1.0; + + NSBezierPath *path = [NSBezierPath bezierPathWithRoundedRect:bounds xRadius:3.5 yRadius:3.5]; + + [NSGraphicsContext saveGraphicsState]; + [kDropShadow set]; + [path fill]; + [NSGraphicsContext restoreGraphicsState]; + + [kBackgroundGradient drawInBezierPath:path angle:-90.0]; + + [kBorderColor setStroke]; + [path strokeInside]; + + [path fillWithInnerShadow:kInnerShadow]; +} + + +@end diff --git a/iDNA/iDNA/NSBezierPath+MCAdditions.h b/iDNA/iDNA/NSBezierPath+MCAdditions.h new file mode 100644 index 0000000..972856d --- /dev/null +++ b/iDNA/iDNA/NSBezierPath+MCAdditions.h @@ -0,0 +1,24 @@ +// +// NSBezierPath+MCAdditions.h +// +// Created by Sean Patrick O'Brien on 4/1/08. +// Copyright 2008 MolokoCacao. All rights reserved. +// + +#import + + +@interface NSBezierPath (MCAdditions) + ++ (NSBezierPath *)bezierPathWithCGPath:(CGPathRef)pathRef; +- (CGPathRef)cgPath; + +- (NSBezierPath *)pathWithStrokeWidth:(CGFloat)strokeWidth; + +- (void)fillWithInnerShadow:(NSShadow *)shadow; +- (void)drawBlurWithColor:(NSColor *)color radius:(CGFloat)radius; + +- (void)strokeInside; +- (void)strokeInsideWithinRect:(NSRect)clipRect; + +@end diff --git a/iDNA/iDNA/NSBezierPath+MCAdditions.m b/iDNA/iDNA/NSBezierPath+MCAdditions.m new file mode 100644 index 0000000..ab93334 --- /dev/null +++ b/iDNA/iDNA/NSBezierPath+MCAdditions.m @@ -0,0 +1,223 @@ +// +// NSBezierPath+MCAdditions.m +// +// Created by Sean Patrick O'Brien on 4/1/08. +// Copyright 2008 MolokoCacao. All rights reserved. +// + +#import "NSBezierPath+MCAdditions.h" + +// remove/comment out this line of you don't want to use undocumented functions +#define MCBEZIER_USE_PRIVATE_FUNCTION + +#ifdef MCBEZIER_USE_PRIVATE_FUNCTION +extern CGPathRef CGContextCopyPath(CGContextRef context); +#endif + +static void CGPathCallback(void *info, const CGPathElement *element) +{ + //NSBezierPath *path = info; + NSBezierPath *path = CFBridgingRelease(info); + CGPoint *points = element->points; + + switch (element->type) { + case kCGPathElementMoveToPoint: + { + [path moveToPoint:NSMakePoint(points[0].x, points[0].y)]; + break; + } + case kCGPathElementAddLineToPoint: + { + [path lineToPoint:NSMakePoint(points[0].x, points[0].y)]; + break; + } + case kCGPathElementAddQuadCurveToPoint: + { + // NOTE: This is untested. + NSPoint currentPoint = [path currentPoint]; + NSPoint interpolatedPoint = NSMakePoint((currentPoint.x + 2*points[0].x) / 3, (currentPoint.y + 2*points[0].y) / 3); + [path curveToPoint:NSMakePoint(points[1].x, points[1].y) controlPoint1:interpolatedPoint controlPoint2:interpolatedPoint]; + break; + } + case kCGPathElementAddCurveToPoint: + { + [path curveToPoint:NSMakePoint(points[2].x, points[2].y) controlPoint1:NSMakePoint(points[0].x, points[0].y) controlPoint2:NSMakePoint(points[1].x, points[1].y)]; + break; + } + case kCGPathElementCloseSubpath: + { + [path closePath]; + break; + } + } +} + +@implementation NSBezierPath (MCAdditions) + ++ (NSBezierPath *)bezierPathWithCGPath:(CGPathRef)pathRef +{ + NSBezierPath *path = [NSBezierPath bezierPath]; + CGPathApply(pathRef, &path, CGPathCallback); + + return path; +} + +// Method borrowed from Google's Cocoa additions +- (CGPathRef)cgPath +{ + CGMutablePathRef thePath = CGPathCreateMutable(); + if (!thePath) return nil; + + uint elementCount = (uint)[self elementCount]; + + // The maximum number of points is 3 for a NSCurveToBezierPathElement. + // (controlPoint1, controlPoint2, and endPoint) + NSPoint controlPoints[3]; + + for (unsigned int i = 0; i < elementCount; i++) { + switch ([self elementAtIndex:i associatedPoints:controlPoints]) { + case NSMoveToBezierPathElement: + CGPathMoveToPoint(thePath, &CGAffineTransformIdentity, + controlPoints[0].x, controlPoints[0].y); + break; + case NSLineToBezierPathElement: + CGPathAddLineToPoint(thePath, &CGAffineTransformIdentity, + controlPoints[0].x, controlPoints[0].y); + break; + case NSCurveToBezierPathElement: + CGPathAddCurveToPoint(thePath, &CGAffineTransformIdentity, + controlPoints[0].x, controlPoints[0].y, + controlPoints[1].x, controlPoints[1].y, + controlPoints[2].x, controlPoints[2].y); + break; + case NSClosePathBezierPathElement: + CGPathCloseSubpath(thePath); + break; + default: + NSLog(@"Unknown element at [NSBezierPath (GTMBezierPathCGPathAdditions) cgPath]"); + break; + }; + } + return thePath; +} + +- (NSBezierPath *)pathWithStrokeWidth:(CGFloat)strokeWidth +{ +#ifdef MCBEZIER_USE_PRIVATE_FUNCTION + NSBezierPath *path = [self copy]; + CGContextRef context = [[NSGraphicsContext currentContext] graphicsPort]; + CGPathRef pathRef = [path cgPath]; + + CGContextSaveGState(context); + + CGContextBeginPath(context); + CGContextAddPath(context, pathRef); + CGContextSetLineWidth(context, strokeWidth); + CGContextReplacePathWithStrokedPath(context); + CGPathRef strokedPathRef = CGContextCopyPath(context); + CGContextBeginPath(context); + NSBezierPath *strokedPath = [NSBezierPath bezierPathWithCGPath:strokedPathRef]; + + CGContextRestoreGState(context); + + CFRelease(pathRef); + CFRelease(strokedPathRef); + + return strokedPath; +#else + return nil; +#endif//MCBEZIER_USE_PRIVATE_FUNCTION +} + +- (void)fillWithInnerShadow:(NSShadow *)shadow +{ + [NSGraphicsContext saveGraphicsState]; + + NSSize offset = shadow.shadowOffset; + NSSize originalOffset = offset; + CGFloat radius = shadow.shadowBlurRadius; + NSRect bounds = NSInsetRect(self.bounds, -(ABS(offset.width) + radius), -(ABS(offset.height) + radius)); + offset.height += bounds.size.height; + shadow.shadowOffset = offset; + NSAffineTransform *transform = [NSAffineTransform transform]; + if ([[NSGraphicsContext currentContext] isFlipped]) + [transform translateXBy:0 yBy:bounds.size.height]; + else + [transform translateXBy:0 yBy:-bounds.size.height]; + + NSBezierPath *drawingPath = [NSBezierPath bezierPathWithRect:bounds]; + [drawingPath setWindingRule:NSEvenOddWindingRule]; + [drawingPath appendBezierPath:self]; + [drawingPath transformUsingAffineTransform:transform]; + + [self addClip]; + [shadow set]; + [[NSColor blackColor] set]; + [drawingPath fill]; + + shadow.shadowOffset = originalOffset; + + [NSGraphicsContext restoreGraphicsState]; +} + +- (void)drawBlurWithColor:(NSColor *)color radius:(CGFloat)radius +{ + NSRect bounds = NSInsetRect(self.bounds, -radius, -radius); + NSShadow *shadow = [[NSShadow alloc] init]; + shadow.shadowOffset = NSMakeSize(0, bounds.size.height); + shadow.shadowBlurRadius = radius; + shadow.shadowColor = color; + NSBezierPath *path = [self copy]; + NSAffineTransform *transform = [NSAffineTransform transform]; + if ([[NSGraphicsContext currentContext] isFlipped]) + [transform translateXBy:0 yBy:bounds.size.height]; + else + [transform translateXBy:0 yBy:-bounds.size.height]; + [path transformUsingAffineTransform:transform]; + + [NSGraphicsContext saveGraphicsState]; + + [shadow set]; + [[NSColor blackColor] set]; + NSRectClip(bounds); + [path fill]; + + [NSGraphicsContext restoreGraphicsState]; + +} + +// Credit for the next two methods goes to Matt Gemmell +- (void)strokeInside +{ + /* Stroke within path using no additional clipping rectangle. */ + [self strokeInsideWithinRect:NSZeroRect]; +} + +- (void)strokeInsideWithinRect:(NSRect)clipRect +{ + NSGraphicsContext *thisContext = [NSGraphicsContext currentContext]; + float lineWidth = [self lineWidth]; + + /* Save the current graphics context. */ + [thisContext saveGraphicsState]; + + /* Double the stroke width, since -stroke centers strokes on paths. */ + [self setLineWidth:(lineWidth * 2.0)]; + + /* Clip drawing to this path; draw nothing outwith the path. */ + [self setClip]; + + /* Further clip drawing to clipRect, usually the view's frame. */ + if (clipRect.size.width > 0.0 && clipRect.size.height > 0.0) { + [NSBezierPath clipRect:clipRect]; + } + + /* Stroke the path. */ + [self stroke]; + + /* Restore the previous graphics context. */ + [thisContext restoreGraphicsState]; + [self setLineWidth:lineWidth]; +} + +@end diff --git a/iDNA/iDNA/NSShadow+MCAdditions.h b/iDNA/iDNA/NSShadow+MCAdditions.h new file mode 100644 index 0000000..5870d51 --- /dev/null +++ b/iDNA/iDNA/NSShadow+MCAdditions.h @@ -0,0 +1,15 @@ +// +// NSShadow+MCAdditions.h +// +// Created by Sean Patrick O'Brien on 4/3/08. +// Copyright 2008 MolokoCacao. All rights reserved. +// + +#import + + +@interface NSShadow (MCAdditions) + +- (id)initWithColor:(NSColor *)color offset:(NSSize)offset blurRadius:(CGFloat)blur; + +@end diff --git a/iDNA/iDNA/NSShadow+MCAdditions.m b/iDNA/iDNA/NSShadow+MCAdditions.m new file mode 100644 index 0000000..2c0bab3 --- /dev/null +++ b/iDNA/iDNA/NSShadow+MCAdditions.m @@ -0,0 +1,26 @@ +// +// NSShadow+MCAdditions.m +// +// Created by Sean Patrick O'Brien on 4/3/08. +// Copyright 2008 MolokoCacao. All rights reserved. +// + +#import "NSShadow+MCAdditions.h" + + +@implementation NSShadow (MCAdditions) + +- (id)initWithColor:(NSColor *)color offset:(NSSize)offset blurRadius:(CGFloat)blur +{ + self = [self init]; + + if (self != nil) { + self.shadowColor = color; + self.shadowOffset = offset; + self.shadowBlurRadius = blur; + } + + return self; +} + +@end diff --git a/iDNA/iDNA/Nucleotides.h b/iDNA/iDNA/Nucleotides.h new file mode 100644 index 0000000..038878a --- /dev/null +++ b/iDNA/iDNA/Nucleotides.h @@ -0,0 +1,19 @@ +// +// Nucleotides.h +// iDNA +// +// Created by Alexander Shvets on 02.01.13. +// Copyright (c) 2013 Alexander Shvets. All rights reserved. +// + +#import + +@interface Nucleotides : NSObject{ + NSArray* nucleos; +} + ++ (Nucleotides *) sharedInstance; + +- (NSArray*) getNucleotides; + +@end diff --git a/iDNA/iDNA/Nucleotides.m b/iDNA/iDNA/Nucleotides.m new file mode 100644 index 0000000..455f579 --- /dev/null +++ b/iDNA/iDNA/Nucleotides.m @@ -0,0 +1,39 @@ +// +// Nucleotides.m +// iDNA +// +// Created by Alexander Shvets on 02.01.13. +// Copyright (c) 2013 Alexander Shvets. All rights reserved. +// + +#import "Nucleotides.h" + +@implementation Nucleotides + +static Nucleotides *sNucleotides = nil; + ++ (Nucleotides *) sharedInstance +{ + @synchronized(self) + { + if(sNucleotides == nil) sNucleotides = [[Nucleotides alloc] init]; + } + + return sNucleotides; +} + +- (id) init { + if(sNucleotides == nil) NSLog(@"Nucleotides singleton initialized"); + + self = [super init]; + if(self) nucleos = [NSArray arrayWithObjects:@"A", @"T", @"G", @"C", nil]; + + return self; +} + +- (NSArray*) getNucleotides +{ + return nucleos; +} + +@end diff --git a/iDNA/iDNA/Population.h b/iDNA/iDNA/Population.h new file mode 100644 index 0000000..e34178c --- /dev/null +++ b/iDNA/iDNA/Population.h @@ -0,0 +1,31 @@ +// +// Population.h +// iDNA +// +// Created by Alexander Shvets on 24.12.12. +// Copyright (c) 2012 Alexander Shvets. All rights reserved. +// + +#import +#import "Cell.h" + +@interface Population : NSObject +{ + //NSMutableArray* cells; +} + +@property NSMutableArray* cells; + +- (id)initWithPopulationSize:(int)size andDNALength:(int)dnaLength; + +- (void)hammingDistanceWith:(Cell*)goalDNA; + +- (void)sort; + +- (BOOL)evolutionSuccess; + +- (void)hybridize; + +- (void)mutate:(int)percent; + +@end diff --git a/iDNA/iDNA/Population.m b/iDNA/iDNA/Population.m new file mode 100644 index 0000000..9eaae62 --- /dev/null +++ b/iDNA/iDNA/Population.m @@ -0,0 +1,151 @@ +// +// Population.m +// iDNA +// +// Created by Alexander Shvets on 24.12.12. +// Copyright (c) 2012 Alexander Shvets. All rights reserved. +// + +#import "Population.h" + + +@implementation Population + +- (id)initWithPopulationSize:(int)size andDNALength:(int)dnaLength +{ + if(self = [super init]){ + _cells = [NSMutableArray arrayWithCapacity:size]; + + for(int i = 0; i < size; i++){ + [_cells addObject:[[Cell alloc] initWithLength:dnaLength]]; + } + } + + return self; +} + + +// обновляем расстояние Хэмминга для популяции +- (void)hammingDistanceWith:(Cell*)goalDNA +{ + for(Cell* cell in self.cells){ + [cell hammingDistance:goalDNA]; + } +} + + +// сортировка поплуляции на основе расстояния Хэмминга +- (void)sort +{ + + NSSortDescriptor *sortDescriptor = [[NSSortDescriptor alloc] initWithKey:@"hammingDistance" ascending:YES]; + NSArray *sortDescriptors = [NSArray arrayWithObject:sortDescriptor]; + NSArray *sortedCells = [self.cells sortedArrayUsingDescriptors:sortDescriptors]; + + self.cells = [NSMutableArray arrayWithArray:sortedCells]; + //NSLog(@"sorted: %@", sortedArray); +} + + +// проверка нет ли полного совпадения с целевой ДНК +- (BOOL)evolutionSuccess +{ + BOOL result = NO; + + NSIndexSet* foundIndexes = [self.cells indexesOfObjectsPassingTest: ^ BOOL(Cell* cell, NSUInteger idx, BOOL *stop){ + if(cell.hammingDistance == 0) return YES; + return NO; + }]; + + if([foundIndexes count]) result = YES; + + return result; +} + + +// скрестить кандидатов из топ 50% и заменить результатом оставшиеся 50% +- (void) hybridize +{ + int populationSize = (int)[self.cells count]; + int halfPopulation = populationSize / 2; + + NSArray* topCells = [self.cells subarrayWithRange:NSMakeRange(0, halfPopulation + (populationSize % halfPopulation))]; + NSMutableArray* newCells = [NSMutableArray arrayWithCapacity:halfPopulation]; + + for(int i = 0; i < halfPopulation; i++){ + + // случайно выбираем две клетки для скрещивания + NSArray* firstDNA = [[topCells objectAtIndex:(arc4random() % [topCells count])] dna]; + NSArray* secondDNA = [[topCells objectAtIndex:(arc4random() % [topCells count])] dna]; + + int DNALength = (int)[firstDNA count]; + NSMutableArray* newDNA = [NSMutableArray arrayWithCapacity:DNALength]; + + // выбор случайного алгоритма скрещивания + switch(arc4random() % 3){ + case 0: // 50% первого ДНК + 50% второго ДНК + { + int halfDNALenth = DNALength / 2; + + NSArray* subDNA1 = [firstDNA subarrayWithRange:NSMakeRange(0, halfDNALenth + (DNALength % halfDNALenth))]; + NSArray* subDNA2 = [firstDNA subarrayWithRange:NSMakeRange(halfDNALenth + (DNALength % halfDNALenth), halfDNALenth)]; + + [newDNA addObjectsFromArray:subDNA1]; + [newDNA addObjectsFromArray:subDNA2]; + + break; + } + + case 1: // 1% первого ДНК + 1% второго ДНК + 1% первого ДНК + ... и т.д. + { + for(int f = 0; f < DNALength; f+=2){ + [newDNA addObject:[firstDNA objectAtIndex:f]]; + if(f+1 < DNALength) [newDNA addObject:[secondDNA objectAtIndex:f+1]]; + } + + break; + } + + case 2: + default: // 20% первого ДНК + 60% второго ДНК + 20% первого ДНК + { + int perc20 = DNALength * 0.2; + int perc60 = DNALength - perc20 * 2; + + NSArray* subDNA1 = [firstDNA subarrayWithRange:NSMakeRange(0, perc20)]; + NSArray* subDNA2 = [secondDNA subarrayWithRange:NSMakeRange(perc20, perc60)]; + NSArray* subDNA3 = [firstDNA subarrayWithRange:NSMakeRange(perc20 + perc60, perc20)]; + + [newDNA addObjectsFromArray:subDNA1]; + [newDNA addObjectsFromArray:subDNA2]; + [newDNA addObjectsFromArray:subDNA3]; + + break; + } + } + + Cell* newCell = [[Cell alloc] initWithDNA:newDNA]; + [newCells addObject:newCell]; + } + + // замена результатом скрещивания оставшиеся 50% + NSMutableArray *newGeneration = [NSMutableArray arrayWithArray:topCells]; + [newGeneration addObjectsFromArray:newCells]; + self.cells = newGeneration; +} + + +// матация популяции +- (void)mutate:(int)percent +{ + for(Cell* cell in self.cells){ + [cell mutate:percent]; + } +} + +-(NSString *) description { + return [NSString stringWithFormat:@"Population: %@", self.cells]; +} + + +@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..c8b77d2 --- /dev/null +++ b/iDNA/iDNA/en.lproj/MainMenu.xib @@ -0,0 +1,5898 @@ + + + + 1080 + 12C60 + 2844 + 1187.34 + 625.00 + + com.apple.InterfaceBuilder.CocoaPlugin + 2844 + + + IBNSLayoutConstraint + NSBox + NSButton + NSButtonCell + NSCustomObject + NSLevelIndicator + NSLevelIndicatorCell + NSMenu + NSMenuItem + NSNumberFormatter + NSSlider + NSSliderCell + NSTextField + NSTextFieldCell + NSToolbar + NSToolbarFlexibleSpaceItem + NSToolbarItem + 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 + + + 4103 + 2 + {{335, 390}, {629, 331}} + 1954021376 + iDNA + NSWindow + + + 296C73B6-7A16-4415-8012-821A91A53527 + + + YES + YES + YES + NO + 2 + 1 + + + + 08C80AD9-7F78-4ADF-9E92-771DE5EA3D17 + + Custom View + Custom View + + + + 268 + + + + 274 + + + + 268 + {{12, 51}, {413, 17}} + + + _NS:1535 + YES + + 68157504 + 138413120 + Generation: 0 + + LucidaGrande-Bold + 13 + 16 + + _NS:1535 + + + 6 + System + controlColor + + 3 + MC42NjY2NjY2NjY3AA + + + + 6 + System + controlTextColor + + 3 + MAA + + + + NO + + + + 268 + {{12, 6}, {413, 17}} + + _NS:1535 + YES + + 68157504 + 138413120 + Best individual match: 0% + + LucidaGrande + 11 + 3100 + + _NS:1535 + + + + 6 + System + controlDarkShadowColor + + + + NO + + + + 268 + {{15, 29}, {407, 16}} + + + _NS:9 + YES + + 134217728 + 0 + _NS:9 + + 100 + 1 + 1 + + NO + + + {{1, 1}, {437, 73}} + + + _NS:11 + + + {{0, 14}, {439, 75}} + + _NS:9 + {0, 0} + + 67108864 + 0 + Box + + + 6 + System + textBackgroundColor + + 3 + MQA + + + + 3 + MCAwLjgwMDAwMDAxMTkAA + + + + 1 + 4 + 0 + NO + + 6 + System + windowFrameColor + + + + 6 + System + controlHighlightColor + + + + + + + {200, 72} + {441, 100} + YES + YES + -1 + YES + 0 + + + NSToolbarFlexibleSpaceItem + + Flexible Space + + + + + + {1, 5} + {20000, 32} + YES + YES + -1 + YES + 0 + + YES + YES + + + 1048576 + 2147483647 + + + + + + + + + + + + + + + + + + + + 256 + + + + 268 + {{17, 291}, {114, 17}} + + + + _NS:1535 + YES + + 68157504 + 4195328 + Population size + + LucidaGrande + 13 + 1044 + + _NS:1535 + + + + + NO + + + + 268 + {{17, 261}, {114, 17}} + + + + _NS:1535 + YES + + 68157504 + 4195328 + DNA length + + _NS:1535 + + + + + NO + + + + 268 + {{17, 231}, {114, 17}} + + + + _NS:1535 + YES + + 68157504 + 4195328 + Mutation rate % + + _NS:1535 + + + + + NO + + + + 268 + {{131, 289}, {58, 22}} + + + + _NS:9 + YES + + -1804074943 + 272630848 + + + + + + + + + + -∞ + + + +∞ + + #,##0.### + #,##0.### + + + + + + + + NaN + + + + 0 + 0 + YES + NO + 1 + AAAAAAAAAAAAAAAAAAAAAA + + + + 3 + YES + YES + YES + + . + , + YES + NO + YES + + _NS:9 + + YES + + + 6 + System + textColor + + + + NO + + + + 268 + {{131, 259}, {58, 22}} + + + + _NS:9 + YES + + -1804074943 + 272630848 + + + + + + + + -∞ + + + +∞ + + #,##0.### + #,##0.### + + + + + + + + NaN + + + + + + 3 + YES + YES + YES + + . + , + YES + NO + YES + + _NS:9 + + YES + + + + NO + + + + 268 + {{131, 229}, {58, 22}} + + + + _NS:9 + YES + + -1804074943 + 272630784 + + + + + + + + -∞ + + + +∞ + + #,##0.### + #,##0.### + + + + + + + + NaN + + + + + + 3 + YES + YES + YES + + . + , + YES + NO + YES + + _NS:9 + + YES + + + + NO + + + + 268 + {{202, 290}, {409, 21}} + + + + _NS:9 + YES + + -2080112384 + 0 + + _NS:9 + + 100 + 1 + 50 + 0.0 + 0 + 1 + NO + NO + + NO + + + + 268 + {{202, 260}, {409, 21}} + + + + _NS:9 + YES + + -2080112384 + 0 + + _NS:9 + + 100 + 1 + 50 + 0.0 + 0 + 1 + NO + NO + + NO + + + + 268 + {{202, 229}, {409, 21}} + + + + _NS:9 + YES + + -2080112384 + 0 + + _NS:9 + + 100 + 0.0 + 50 + 0.0 + 0 + 1 + NO + NO + + NO + + + + 268 + {{14, 13}, {132, 32}} + + + + _NS:9 + YES + + 67108864 + 134217728 + Start evolution + + _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 + {{481, 13}, {134, 32}} + + + + _NS:9 + YES + + 67108864 + 134217728 + Load goal DNA + + _NS:9 + + -2038284288 + 129 + + + 200 + 25 + + NO + + + + 12 + + + + 274 + + + + 268 + {{17, 124}, {563, 18}} + + + + _NS:1535 + YES + + 68157504 + 138413056 + Goal DNA + + LucidaGrande + 14 + 16 + + _NS:1535 + + + + + NO + + + + 268 + {{12, 14}, {571, 104}} + + + + _NS:9 + {250, 750} + YES + + -2074083327 + 272629760 + + + _NS:9 + + YES + + + + NO + + + {{1, 1}, {595, 151}} + + + + _NS:11 + + + {{15, 57}, {597, 153}} + + + + _NS:9 + {0, 0} + + 67108864 + 0 + Box + + + + 3 + MCAwLjgwMDAwMDAxMTkAA + + + + 1 + 0 + 0 + NO + + + {629, 331} + + + + + {{0, 0}, {1440, 878}} + {10000000000000, 10000000000000} + 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 + + + + fieldPopulationSize + + + + 953 + + + + fieldDNALength + + + + 954 + + + + fieldMutationRate + + + + 955 + + + + fieldGoalDNA + + + + 1090 + + + + labelGeneration + + + + 1091 + + + + labelBestMatch + + + + 1092 + + + + sliderMutationRate + + + + 1094 + + + + sliderPopulationSize + + + + 1095 + + + + sliderDNALength + + + + 1096 + + + + btnStart + + + + 1097 + + + + btnPause + + + + 1098 + + + + btnLoad + + + + 1099 + + + + startEvolution: + + + + 1100 + + + + pauseEvolution: + + + + 1102 + + + + loadGoalDNA: + + + + 1103 + + + + progressMatch + + + + 1104 + + + + value: self.populationSize + + + + + + value: self.populationSize + value + self.populationSize + 2 + + + 1221 + + + + value: self.DNALength + + + + + + value: self.DNALength + value + self.DNALength + 2 + + + 1226 + + + + value: self.mutationRate + + + + + + value: self.mutationRate + value + self.mutationRate + 2 + + + 1229 + + + + value: self.populationSize + + + + + + value: self.populationSize + value + self.populationSize + 2 + + + 967 + + + + value: self.DNALength + + + + + + value: self.DNALength + value + self.DNALength + 2 + + + 968 + + + + value: self.mutationRate + + + + + + value: self.mutationRate + value + self.mutationRate + 2 + + + 969 + + + + delegate + + + + 1105 + + + + + + 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 + + + + + 4 + 0 + + 4 + 1 + + 20 + + 1000 + + 8 + 29 + 3 + + + + 6 + 0 + + 6 + 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 + + 20 + + 1000 + + 6 + 24 + 3 + + + + 4 + 0 + + 4 + 1 + + 20 + + 1000 + + 8 + 29 + 3 + + + + 5 + 0 + + 5 + 1 + + 20 + + 1000 + + 8 + 29 + 3 + + + + 5 + 0 + + 5 + 1 + + 0.0 + + 1000 + + 6 + 24 + 2 + + + + 11 + 0 + + 11 + 1 + + 0.0 + + 1000 + + 6 + 24 + 2 + + + + 6 + 0 + + 6 + 1 + + 20 + + 1000 + + 8 + 29 + 3 + + + + 10 + 0 + + 10 + 1 + + 0.0 + + 1000 + + 6 + 24 + 2 + + + + 6 + 0 + + 6 + 1 + + 20 + + 1000 + + 8 + 29 + 3 + + + + 5 + 0 + + 5 + 1 + + 0.0 + + 1000 + + 6 + 24 + 2 + + + + 10 + 0 + + 10 + 1 + + 0.0 + + 1000 + + 6 + 24 + 2 + + + + 6 + 0 + + 6 + 1 + + 20 + + 1000 + + 8 + 29 + 3 + + + + 6 + 0 + + 6 + 1 + + 0.0 + + 1000 + + 6 + 24 + 2 + + + + 3 + 0 + + 3 + 1 + + 80 + + 1000 + + 3 + 9 + 3 + + + + 3 + 0 + + 3 + 1 + + 50 + + 1000 + + 3 + 9 + 3 + + + + 5 + 0 + + 5 + 1 + + 0.0 + + 1000 + + 6 + 24 + 2 + + + + 6 + 0 + + 6 + 1 + + 0.0 + + 1000 + + 6 + 24 + 2 + + + + 5 + 0 + + 5 + 1 + + 131 + + 1000 + + 3 + 9 + 3 + + + + 5 + 0 + + 5 + 1 + + 0.0 + + 1000 + + 6 + 24 + 2 + + + + 3 + 0 + + 3 + 1 + + 20 + + 1000 + + 8 + 29 + 3 + + + + 3 + 0 + + 3 + 1 + + 123 + + 1000 + + 3 + 9 + 3 + + + + 6 + 0 + + 6 + 1 + + 20 + + 1000 + + 8 + 29 + 3 + + + + 5 + 0 + + 5 + 1 + + 18 + + 1000 + + 3 + 9 + 3 + + + + 11 + 0 + + 11 + 1 + + 0.0 + + 1000 + + 6 + 24 + 2 + + + + 6 + 0 + + 6 + 1 + + 0.0 + + 1000 + + 6 + 24 + 2 + + + + 5 + 0 + + 5 + 1 + + 20 + + 1000 + + 8 + 29 + 3 + + + + 11 + 0 + + 11 + 1 + + 0.0 + + 1000 + + 6 + 24 + 2 + + + + 6 + 0 + + 6 + 1 + + 0.0 + + 1000 + + 6 + 24 + 2 + + + + 5 + 0 + + 5 + 1 + + 20 + + 1000 + + 8 + 29 + 3 + + + + 11 + 0 + + 11 + 1 + + 0.0 + + 1000 + + 6 + 24 + 2 + + + + 5 + 0 + + 5 + 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 + + + + + 536 + + + + + + + + + 540 + + + + + 603 + + + + + 606 + + + + + + + + 605 + + + + + 4 + 0 + + 4 + 1 + + 7 + + 1000 + + 3 + 9 + 3 + + + + 5 + 0 + + 5 + 1 + + 16 + + 1000 + + 8 + 29 + 3 + + + + 6 + 0 + + 6 + 1 + + 16 + + 1000 + + 8 + 29 + 3 + + + + 3 + 0 + + 3 + 1 + + 29 + + 1000 + + 3 + 9 + 3 + + + + 6 + 0 + + 6 + 1 + + 16 + + 1000 + + 8 + 29 + 3 + + + + 5 + 0 + + 5 + 1 + + 16 + + 1000 + + 8 + 29 + 3 + + + + 3 + 0 + + 3 + 1 + + 6 + + 1000 + + 3 + 9 + 3 + + + + 5 + 0 + + 5 + 1 + + 16 + + 1000 + + 8 + 29 + 3 + + + + 6 + 0 + + 6 + 1 + + 16 + + 1000 + + 8 + 29 + 3 + + + + + + + + + 607 + + + + + + + + 608 + + + + + 611 + + + + + + 8 + 0 + + 0 + 1 + + 17 + + 1000 + + 3 + 9 + 1 + + + + + + 612 + + + + + 616 + + + + + 711 + + + + + + 7 + 0 + + 0 + 1 + + 108 + + 1000 + + 3 + 9 + 1 + + + + + + 712 + + + + + 718 + + + + + + + + 720 + + + + + 723 + + + + + 724 + + + + + + + + 725 + + + + + 727 + + + + + 729 + + + + + + 7 + 0 + + 0 + 1 + + 58 + + 1000 + + 3 + 9 + 1 + + + + + + 730 + + + + + + + + 731 + + + + + 734 + + + + + 737 + + + + + + + + 739 + + + + + + + + 740 + + + + + 745 + + + + + + + + 746 + + + + + + + + 747 + + + + + 759 + + + + + + 7 + 0 + + 0 + 1 + + 405 + + 1000 + + 3 + 9 + 1 + + + + + + 760 + + + + + 796 + + + + + 797 + + + + + 809 + + + + + 810 + + + + + 824 + + + + + 828 + + + + + + + + 830 + + + + + 832 + + + + + 834 + + + + + + + + 835 + + + + + 836 + + + + + 844 + + + + + 846 + + + + + 854 + + + + + 856 + + + + + 857 + + + + + 859 + + + + + 860 + + + + + 862 + + + + + 863 + + + + + 867 + + + + + 868 + + + + + 869 + + + + + 871 + + + + + 873 + + + + + 876 + + + + + 878 + + + + + 879 + + + + + 911 + + + + + + + + 912 + + + + + 914 + + + + + 916 + + + + + + + + 917 + + + + + 919 + + + + + 920 + + + + + + + + 921 + + + + + 923 + + + + + 924 + + + + + 926 + + + + + 927 + + + + + 1030 + + + + + 9 + 0 + + 9 + 1 + + 0.0 + + 1000 + + 5 + 22 + 2 + + + + 4 + 0 + + 4 + 1 + + 11 + + 1000 + + 8 + 29 + 3 + + + + 3 + 0 + + 3 + 1 + + 8 + + 1000 + + 3 + 9 + 3 + + + + 6 + 0 + + 6 + 1 + + 16 + + 1000 + + 8 + 29 + 3 + + + + + + + + 1052 + + + + + 1053 + + + + + 888 + + + + + + 7 + 0 + + 0 + 1 + + 557 + + 1000 + + 3 + 9 + 1 + + + + + + 889 + + + + + 1055 + + + + + 900 + + + + + 7 + 0 + + 0 + 1 + + 571 + + 1000 + + 3 + 9 + 1 + + + + 8 + 0 + + 0 + 1 + + 104 + + 1000 + + 3 + 9 + 1 + + + + + + + 908 + + + + + 901 + + + + + 1065 + + + + + 1066 + + + + + 1069 + + + + + 1072 + + + + + 1075 + + + + + 1076 + + + + + 1078 + + + + + 1085 + + + + + 1086 + + + + + 1087 + + + + + 1089 + + + + + 1197 + + + + + 935 + + + + + + + + 936 + + + + + 1211 + + + + + 1212 + + + + + 1215 + + + + + 1216 + + + + + + + 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 + LCDBoxView + + + + + + + + + + + + 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 + fieldPopulationSize + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + fieldDNALength + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + fieldMutationRate + 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 + fieldGoalDNA + 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 + + + + + + 1229 + + + + + AppDelegate + NSObject + + id + id + id + + + + loadGoalDNA: + id + + + pauseEvolution: + id + + + startEvolution: + id + + + + NSButton + NSButton + NSButton + NSTextField + NSTextField + NSTextField + NSTextField + NSTextField + NSTextField + NSLevelIndicator + NSSlider + NSSlider + NSSlider + NSWindow + + + + btnLoad + NSButton + + + btnPause + NSButton + + + btnStart + NSButton + + + fieldDNALength + NSTextField + + + fieldGoalDNA + NSTextField + + + fieldMutationRate + NSTextField + + + fieldPopulationSize + NSTextField + + + labelBestMatch + NSTextField + + + labelGeneration + NSTextField + + + progressMatch + NSLevelIndicator + + + sliderDNALength + NSSlider + + + sliderMutationRate + NSSlider + + + sliderPopulationSize + NSSlider + + + window + NSWindow + + + + IBProjectSource + ./Classes/AppDelegate.h + + + + LCDBoxView + NSBox + + IBProjectSource + ./Classes/LCDBoxView.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..ce317ec --- /dev/null +++ b/iDNA/iDNA/iDNA-Info.plist @@ -0,0 +1,34 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIconFile + idna + CFBundleIdentifier + artshvets.${PRODUCT_NAME:rfc1034identifier} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + LSMinimumSystemVersion + ${MACOSX_DEPLOYMENT_TARGET} + NSHumanReadableCopyright + Copyright © 2012 Alexander Shvets. 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..24593cd --- /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/idna.iconset/.DS_Store b/iDNA/iDNA/idna.iconset/.DS_Store new file mode 100644 index 0000000..5008ddf Binary files /dev/null and b/iDNA/iDNA/idna.iconset/.DS_Store differ diff --git a/iDNA/iDNA/idna.iconset/icon_128x128.png b/iDNA/iDNA/idna.iconset/icon_128x128.png new file mode 100644 index 0000000..20a036e Binary files /dev/null and b/iDNA/iDNA/idna.iconset/icon_128x128.png differ diff --git a/iDNA/iDNA/idna.iconset/icon_128x128@2x.png b/iDNA/iDNA/idna.iconset/icon_128x128@2x.png new file mode 100644 index 0000000..fb9198b Binary files /dev/null and b/iDNA/iDNA/idna.iconset/icon_128x128@2x.png differ diff --git a/iDNA/iDNA/idna.iconset/icon_16x16.png b/iDNA/iDNA/idna.iconset/icon_16x16.png new file mode 100644 index 0000000..c5f2f5b Binary files /dev/null and b/iDNA/iDNA/idna.iconset/icon_16x16.png differ diff --git a/iDNA/iDNA/idna.iconset/icon_16x16@2x.png b/iDNA/iDNA/idna.iconset/icon_16x16@2x.png new file mode 100644 index 0000000..ce8d566 Binary files /dev/null and b/iDNA/iDNA/idna.iconset/icon_16x16@2x.png differ diff --git a/iDNA/iDNA/idna.iconset/icon_256x256.png b/iDNA/iDNA/idna.iconset/icon_256x256.png new file mode 100644 index 0000000..cff50f8 Binary files /dev/null and b/iDNA/iDNA/idna.iconset/icon_256x256.png differ diff --git a/iDNA/iDNA/idna.iconset/icon_256x256@2x.png b/iDNA/iDNA/idna.iconset/icon_256x256@2x.png new file mode 100644 index 0000000..5a7f2ef Binary files /dev/null and b/iDNA/iDNA/idna.iconset/icon_256x256@2x.png differ diff --git a/iDNA/iDNA/idna.iconset/icon_32x32.png b/iDNA/iDNA/idna.iconset/icon_32x32.png new file mode 100644 index 0000000..bed52f1 Binary files /dev/null and b/iDNA/iDNA/idna.iconset/icon_32x32.png differ diff --git a/iDNA/iDNA/idna.iconset/icon_32x32@2x.png b/iDNA/iDNA/idna.iconset/icon_32x32@2x.png new file mode 100644 index 0000000..57c925a Binary files /dev/null and b/iDNA/iDNA/idna.iconset/icon_32x32@2x.png differ diff --git a/iDNA/iDNA/idna.iconset/icon_512x512.png b/iDNA/iDNA/idna.iconset/icon_512x512.png new file mode 100644 index 0000000..087f167 Binary files /dev/null and b/iDNA/iDNA/idna.iconset/icon_512x512.png differ diff --git a/iDNA/iDNA/idna.iconset/icon_512x512@2x.png b/iDNA/iDNA/idna.iconset/icon_512x512@2x.png new file mode 100644 index 0000000..b62d88f Binary files /dev/null and b/iDNA/iDNA/idna.iconset/icon_512x512@2x.png differ diff --git a/iDNA/iDNA/main.m b/iDNA/iDNA/main.m new file mode 100644 index 0000000..f1e2982 --- /dev/null +++ b/iDNA/iDNA/main.m @@ -0,0 +1,14 @@ +// +// main.m +// iDNA +// +// Created by Alexander Shvets on 24.12.12. +// Copyright (c) 2012 Alexander Shvets. All rights reserved. +// + +#import + +int main(int argc, char *argv[]) +{ + return NSApplicationMain(argc, (const char **)argv); +}