diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000..59df8f4 Binary files /dev/null and b/.DS_Store differ diff --git a/iDNA/.DS_Store b/iDNA/.DS_Store new file mode 100644 index 0000000..159eeb2 Binary files /dev/null and b/iDNA/.DS_Store differ diff --git a/iDNA/iDNA.xcodeproj/project.pbxproj b/iDNA/iDNA.xcodeproj/project.pbxproj new file mode 100644 index 0000000..e7ef17d --- /dev/null +++ b/iDNA/iDNA.xcodeproj/project.pbxproj @@ -0,0 +1,329 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 2EEBA40516875CA5004EC063 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2EEBA40416875CA5004EC063 /* Cocoa.framework */; }; + 2EEBA40F16875CA5004EC063 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 2EEBA40D16875CA5004EC063 /* InfoPlist.strings */; }; + 2EEBA41116875CA5004EC063 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 2EEBA41016875CA5004EC063 /* main.m */; }; + 2EEBA41516875CA5004EC063 /* Credits.rtf in Resources */ = {isa = PBXBuildFile; fileRef = 2EEBA41316875CA5004EC063 /* Credits.rtf */; }; + 2EEBA41816875CA5004EC063 /* HVSDocument.m in Sources */ = {isa = PBXBuildFile; fileRef = 2EEBA41716875CA5004EC063 /* HVSDocument.m */; }; + 2EEBA41B16875CA5004EC063 /* HVSDocument.xib in Resources */ = {isa = PBXBuildFile; fileRef = 2EEBA41916875CA5004EC063 /* HVSDocument.xib */; }; + 2EEBA41E16875CA6004EC063 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 2EEBA41C16875CA6004EC063 /* MainMenu.xib */; }; + 2EEBA42616875D19004EC063 /* HVSCellDna.m in Sources */ = {isa = PBXBuildFile; fileRef = 2EEBA42516875D19004EC063 /* HVSCellDna.m */; }; + 2EEBA42D168774BE004EC063 /* HVSPopulationOfDna.m in Sources */ = {isa = PBXBuildFile; fileRef = 2EEBA42C168774BE004EC063 /* HVSPopulationOfDna.m */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 2EEBA40016875CA5004EC063 /* iDNA.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = iDNA.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 2EEBA40416875CA5004EC063 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; }; + 2EEBA40716875CA5004EC063 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; }; + 2EEBA40816875CA5004EC063 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = System/Library/Frameworks/CoreData.framework; sourceTree = SDKROOT; }; + 2EEBA40916875CA5004EC063 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; + 2EEBA40C16875CA5004EC063 /* iDNA-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "iDNA-Info.plist"; sourceTree = ""; }; + 2EEBA40E16875CA5004EC063 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; + 2EEBA41016875CA5004EC063 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; + 2EEBA41216875CA5004EC063 /* iDNA-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "iDNA-Prefix.pch"; sourceTree = ""; }; + 2EEBA41416875CA5004EC063 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.rtf; name = en; path = en.lproj/Credits.rtf; sourceTree = ""; }; + 2EEBA41616875CA5004EC063 /* HVSDocument.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HVSDocument.h; sourceTree = ""; }; + 2EEBA41716875CA5004EC063 /* HVSDocument.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = HVSDocument.m; sourceTree = ""; }; + 2EEBA41A16875CA5004EC063 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/HVSDocument.xib; sourceTree = ""; }; + 2EEBA41D16875CA6004EC063 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/MainMenu.xib; sourceTree = ""; }; + 2EEBA42416875D19004EC063 /* HVSCellDna.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HVSCellDna.h; sourceTree = ""; }; + 2EEBA42516875D19004EC063 /* HVSCellDna.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HVSCellDna.m; sourceTree = ""; }; + 2EEBA42B168774BE004EC063 /* HVSPopulationOfDna.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HVSPopulationOfDna.h; sourceTree = ""; }; + 2EEBA42C168774BE004EC063 /* HVSPopulationOfDna.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HVSPopulationOfDna.m; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 2EEBA3FD16875CA5004EC063 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 2EEBA40516875CA5004EC063 /* Cocoa.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 2EEBA3F516875CA5004EC063 = { + isa = PBXGroup; + children = ( + 2EEBA40A16875CA5004EC063 /* iDNA */, + 2EEBA40316875CA5004EC063 /* Frameworks */, + 2EEBA40116875CA5004EC063 /* Products */, + ); + sourceTree = ""; + }; + 2EEBA40116875CA5004EC063 /* Products */ = { + isa = PBXGroup; + children = ( + 2EEBA40016875CA5004EC063 /* iDNA.app */, + ); + name = Products; + sourceTree = ""; + }; + 2EEBA40316875CA5004EC063 /* Frameworks */ = { + isa = PBXGroup; + children = ( + 2EEBA40416875CA5004EC063 /* Cocoa.framework */, + 2EEBA40616875CA5004EC063 /* Other Frameworks */, + ); + name = Frameworks; + sourceTree = ""; + }; + 2EEBA40616875CA5004EC063 /* Other Frameworks */ = { + isa = PBXGroup; + children = ( + 2EEBA40716875CA5004EC063 /* AppKit.framework */, + 2EEBA40816875CA5004EC063 /* CoreData.framework */, + 2EEBA40916875CA5004EC063 /* Foundation.framework */, + ); + name = "Other Frameworks"; + sourceTree = ""; + }; + 2EEBA40A16875CA5004EC063 /* iDNA */ = { + isa = PBXGroup; + children = ( + 2EEBA42416875D19004EC063 /* HVSCellDna.h */, + 2EEBA42516875D19004EC063 /* HVSCellDna.m */, + 2EEBA42B168774BE004EC063 /* HVSPopulationOfDna.h */, + 2EEBA42C168774BE004EC063 /* HVSPopulationOfDna.m */, + 2EEBA41616875CA5004EC063 /* HVSDocument.h */, + 2EEBA41716875CA5004EC063 /* HVSDocument.m */, + 2EEBA41916875CA5004EC063 /* HVSDocument.xib */, + 2EEBA41C16875CA6004EC063 /* MainMenu.xib */, + 2EEBA40B16875CA5004EC063 /* Supporting Files */, + ); + path = iDNA; + sourceTree = ""; + }; + 2EEBA40B16875CA5004EC063 /* Supporting Files */ = { + isa = PBXGroup; + children = ( + 2EEBA40C16875CA5004EC063 /* iDNA-Info.plist */, + 2EEBA40D16875CA5004EC063 /* InfoPlist.strings */, + 2EEBA41016875CA5004EC063 /* main.m */, + 2EEBA41216875CA5004EC063 /* iDNA-Prefix.pch */, + 2EEBA41316875CA5004EC063 /* Credits.rtf */, + ); + name = "Supporting Files"; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 2EEBA3FF16875CA5004EC063 /* iDNA */ = { + isa = PBXNativeTarget; + buildConfigurationList = 2EEBA42116875CA6004EC063 /* Build configuration list for PBXNativeTarget "iDNA" */; + buildPhases = ( + 2EEBA3FC16875CA5004EC063 /* Sources */, + 2EEBA3FD16875CA5004EC063 /* Frameworks */, + 2EEBA3FE16875CA5004EC063 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = iDNA; + productName = iDNA; + productReference = 2EEBA40016875CA5004EC063 /* iDNA.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 2EEBA3F716875CA5004EC063 /* Project object */ = { + isa = PBXProject; + attributes = { + CLASSPREFIX = HVS; + LastUpgradeCheck = 0450; + ORGANIZATIONNAME = "VladIslav Khazov"; + }; + buildConfigurationList = 2EEBA3FA16875CA5004EC063 /* Build configuration list for PBXProject "iDNA" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + ); + mainGroup = 2EEBA3F516875CA5004EC063; + productRefGroup = 2EEBA40116875CA5004EC063 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 2EEBA3FF16875CA5004EC063 /* iDNA */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 2EEBA3FE16875CA5004EC063 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 2EEBA40F16875CA5004EC063 /* InfoPlist.strings in Resources */, + 2EEBA41516875CA5004EC063 /* Credits.rtf in Resources */, + 2EEBA41B16875CA5004EC063 /* HVSDocument.xib in Resources */, + 2EEBA41E16875CA6004EC063 /* MainMenu.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 2EEBA3FC16875CA5004EC063 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 2EEBA41116875CA5004EC063 /* main.m in Sources */, + 2EEBA41816875CA5004EC063 /* HVSDocument.m in Sources */, + 2EEBA42616875D19004EC063 /* HVSCellDna.m in Sources */, + 2EEBA42D168774BE004EC063 /* HVSPopulationOfDna.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXVariantGroup section */ + 2EEBA40D16875CA5004EC063 /* InfoPlist.strings */ = { + isa = PBXVariantGroup; + children = ( + 2EEBA40E16875CA5004EC063 /* en */, + ); + name = InfoPlist.strings; + sourceTree = ""; + }; + 2EEBA41316875CA5004EC063 /* Credits.rtf */ = { + isa = PBXVariantGroup; + children = ( + 2EEBA41416875CA5004EC063 /* en */, + ); + name = Credits.rtf; + sourceTree = ""; + }; + 2EEBA41916875CA5004EC063 /* HVSDocument.xib */ = { + isa = PBXVariantGroup; + children = ( + 2EEBA41A16875CA5004EC063 /* en */, + ); + name = HVSDocument.xib; + sourceTree = ""; + }; + 2EEBA41C16875CA6004EC063 /* MainMenu.xib */ = { + isa = PBXVariantGroup; + children = ( + 2EEBA41D16875CA6004EC063 /* en */, + ); + name = MainMenu.xib; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 2EEBA41F16875CA6004EC063 /* 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; + }; + 2EEBA42016875CA6004EC063 /* 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; + }; + 2EEBA42216875CA6004EC063 /* 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; + }; + 2EEBA42316875CA6004EC063 /* 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 */ + 2EEBA3FA16875CA5004EC063 /* Build configuration list for PBXProject "iDNA" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2EEBA41F16875CA6004EC063 /* Debug */, + 2EEBA42016875CA6004EC063 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 2EEBA42116875CA6004EC063 /* Build configuration list for PBXNativeTarget "iDNA" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2EEBA42216875CA6004EC063 /* Debug */, + 2EEBA42316875CA6004EC063 /* Release */, + ); + defaultConfigurationIsVisible = 0; + }; +/* End XCConfigurationList section */ + }; + rootObject = 2EEBA3F716875CA5004EC063 /* 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/hadush.xcuserdatad/UserInterfaceState.xcuserstate b/iDNA/iDNA.xcodeproj/project.xcworkspace/xcuserdata/hadush.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000..1c52a4b Binary files /dev/null and b/iDNA/iDNA.xcodeproj/project.xcworkspace/xcuserdata/hadush.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/iDNA/iDNA.xcodeproj/xcuserdata/hadush.xcuserdatad/xcdebugger/Breakpoints.xcbkptlist b/iDNA/iDNA.xcodeproj/xcuserdata/hadush.xcuserdatad/xcdebugger/Breakpoints.xcbkptlist new file mode 100644 index 0000000..adfcd62 --- /dev/null +++ b/iDNA/iDNA.xcodeproj/xcuserdata/hadush.xcuserdatad/xcdebugger/Breakpoints.xcbkptlist @@ -0,0 +1,59 @@ + + + + + + + + + + + + + diff --git a/iDNA/iDNA.xcodeproj/xcuserdata/hadush.xcuserdatad/xcschemes/iDNA.xcscheme b/iDNA/iDNA.xcodeproj/xcuserdata/hadush.xcuserdatad/xcschemes/iDNA.xcscheme new file mode 100644 index 0000000..384e7a4 --- /dev/null +++ b/iDNA/iDNA.xcodeproj/xcuserdata/hadush.xcuserdatad/xcschemes/iDNA.xcscheme @@ -0,0 +1,86 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/iDNA/iDNA.xcodeproj/xcuserdata/hadush.xcuserdatad/xcschemes/xcschememanagement.plist b/iDNA/iDNA.xcodeproj/xcuserdata/hadush.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..d767edb --- /dev/null +++ b/iDNA/iDNA.xcodeproj/xcuserdata/hadush.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,22 @@ + + + + + SchemeUserState + + iDNA.xcscheme + + orderHint + 0 + + + SuppressBuildableAutocreation + + 2EEBA3FF16875CA5004EC063 + + primary + + + + + diff --git a/iDNA/iDNA/.DS_Store b/iDNA/iDNA/.DS_Store new file mode 100644 index 0000000..5008ddf Binary files /dev/null and b/iDNA/iDNA/.DS_Store differ diff --git a/iDNA/iDNA/HVSCellDna.h b/iDNA/iDNA/HVSCellDna.h new file mode 100644 index 0000000..f45117d --- /dev/null +++ b/iDNA/iDNA/HVSCellDna.h @@ -0,0 +1,29 @@ +// +// HVSCellDna.h +// iDNA +// +// Created by VladIslav Khazov on 23.12.12. +// Copyright (c) 2012 VladIslav Khazov. All rights reserved. +// + +#import + +//размерность ДНК (Значение по умолчанию) +#define sizeDNA 100 // НЕ задавать меньше 1 ! + +@interface HVSCellDna : NSObject + +// Основной массив, создаем свойство с методами +@property NSMutableArray *DNA; +//Данное свойство будет хранить размер данной ДНК. (Можно было брать его из популяции, но мне кажется так будет доп. проверка передаваемых значений) +@property int lengthDna; + +//Определяем функцию сравнения, входной параметр объект класса HVSСellDna +-(int) hammingDistance: (HVSCellDna *) otherCell; +//Мутация входящий параметр - % +-(void) mutate:(int) i; +//метод init +-(id)init; +//Свой метод init с указанной размерностью ДНК. +-(id)initWithLengthDna:(int) length; +@end diff --git a/iDNA/iDNA/HVSCellDna.m b/iDNA/iDNA/HVSCellDna.m new file mode 100644 index 0000000..1736e1c --- /dev/null +++ b/iDNA/iDNA/HVSCellDna.m @@ -0,0 +1,110 @@ +// +// HVSCellDna.m +// iDNA +// +// Created by VladIslav Khazov on 23.12.12. +// Copyright (c) 2012 VladIslav Khazov. All rights reserved. +// + +#import "HVSCellDna.h" + +@implementation HVSCellDna + +//Изменяем стандартный метод init +- (id) init { + if (sizeDNA<1) { + NSAlert *myAlert = [NSAlert alertWithMessageText:@"ДНК не может быть меньше 1. Вы убили ее!!!" defaultButton:@"Exit" alternateButton:nil otherButton:nil informativeTextWithFormat:@" "]; + [myAlert runModal]; + exit(0); + } + //вызов родительского метода + self = [super init]; + if (self) { + //Создаем временный массив + NSArray *arrayCode = [NSArray arrayWithObjects:@"A", @"T", @"G", @"C", nil]; + //Определяем размерность нашего массива + _DNA = [[NSMutableArray alloc] initWithCapacity:sizeDNA]; + //Заполняем массив + for (int i=0; i<=sizeDNA-1; i++) { + //Добавляем объект в массив DNA, используя случайное число от 0 до 3, как индекс для массива arrayCode + [_DNA addObject:[arrayCode objectAtIndex:arc4random_uniform(4)]]; + } + } + // Устанавливаем размерность данного ДНК. + [self setLengthDna:(int)sizeDNA]; + return self; +} + +-(id)initWithLengthDna:(int)length { + if (length<1 || length>100) { + NSAlert *myAlert = [NSAlert alertWithMessageText:@"ДНК не может быть меньше 1 и больше 100. Вы убили ее!!!" defaultButton:@"Exit" alternateButton:nil otherButton:nil informativeTextWithFormat:@" "]; + [myAlert runModal]; + exit(0); + } + //вызов родительского метода + self = [super init]; + if (self) { + //Создаем временный массив + NSArray *arrayCode = [NSArray arrayWithObjects:@"A", @"T", @"G", @"C", nil]; + //Определяем размерность нашего массива + _DNA = [[NSMutableArray alloc] initWithCapacity:length]; + //Заполняем массив + for (int i=0; i<=length-1; i++) { + //Добавляем объект в массив DNA, используя случайное число от 0 до 3, как индекс для массива arrayCode + [_DNA addObject:[arrayCode objectAtIndex:arc4random_uniform(4)]]; + } + } + // Устанавливаем размерность данного ДНК. + [self setLengthDna:(int)length]; + return self; +} + +-(int) hammingDistance: (HVSCellDna *) otherCell{ + //Счетчик совпадений + int count = 0; + //Проверка размерности + if (_lengthDna != [otherCell lengthDna]) { + NSAlert *myAlert = [NSAlert alertWithMessageText:@"ДНК имеют разную размерность!" defaultButton:@"Ok" alternateButton:nil otherButton:nil informativeTextWithFormat:@" "]; + [myAlert runModal]; + return 0; + } + // [otherCell DNA] возвращает свойство второго HVSCellDna, Обращаемся к нему как к NSMutableArray + for(int i=0;i<=_lengthDna-1;i++){ + //Проверяем на совпадение + if ([[otherCell DNA] objectAtIndex:i]!=[_DNA objectAtIndex:i]) { + count++; + } + } + return count; +} + +-(void) mutate:(int) i{ + if (i<1 || i>100) { + NSAlert *myAlert = [NSAlert alertWithMessageText:@"Указан не верный параметр 'Процента мутации'. Обе ДНК остались без изменений " defaultButton:@"Ok" alternateButton:nil otherButton:nil informativeTextWithFormat:@" "]; + [myAlert runModal]; + return; + } + // Количество элементов которые необходимо изменить в ДНК + int countMutator = _lengthDna*i/100; + //Создадим массив для хранения еще не мутировавших + NSMutableArray *arrayCheck = [[NSMutableArray alloc] initWithCapacity:_lengthDna]; + for (int k=0; k<_lengthDna; k++) { + [arrayCheck addObject:[NSNumber numberWithInt:k]]; + } + //Создаем временный массив видов ДНК + NSArray *arrayCode = [NSArray arrayWithObjects:@"A", @"T", @"G", @"C", nil]; + // Переменная для случайного номера ДНК + int dnaIndex = 0; + + //Цикл по нужному количество изменяемых элементов + for (int j=1; j<=countMutator; j++) { + //Генерим случайное число от 0 до количества еще не мутировавших элементов + dnaIndex = arc4random_uniform(_lengthDna-j+1); + //Меняем + [[self DNA] replaceObjectAtIndex:[[arrayCheck objectAtIndex:dnaIndex] intValue] withObject:[arrayCode objectAtIndex:arc4random_uniform(4)]]; + // Удаляем мутировавший элемент из архива + [arrayCheck removeObjectAtIndex:dnaIndex]; + } +} + +@end diff --git a/iDNA/iDNA/HVSDocument.h b/iDNA/iDNA/HVSDocument.h new file mode 100644 index 0000000..807b5e5 --- /dev/null +++ b/iDNA/iDNA/HVSDocument.h @@ -0,0 +1,45 @@ +// +// HVSDocument.h +// iDNA +// +// Created by VladIslav Khazov on 23.12.12. +// Copyright (c) 2012 VladIslav Khazov. All rights reserved. +// + +#import +#import "HVSPopulationOfDna.h" + +@interface HVSDocument : NSDocument { + //Определяем нашу популяцию + HVSPopulationOfDna *myPopulation; + //Флаг Паузы + BOOL flagPause; +} +//Свойста для работы с объектами на форме +//Текстовые поля +@property (weak) IBOutlet NSTextField *popTextSize; +@property (weak) IBOutlet NSTextField *popTextLength; +@property (weak) IBOutlet NSTextField *popTextRate; +@property (weak) IBOutlet NSTextField *popTextGoalDna; +//Слайдеры +@property (weak) IBOutlet NSSlider *popSliderSize; +@property (weak) IBOutlet NSSlider *popSliderLength; +@property (weak) IBOutlet NSSlider *popSliderRate; +//Лэйблы +@property (weak) IBOutlet NSTextField *popLabelGeneration; +@property (weak) IBOutlet NSTextField *popLabelMatch; +//Индикатор +@property (weak) IBOutlet NSLevelIndicator *popLevelMatch; +//Кнопки +@property (weak) IBOutlet NSButton *popButtonStart; +@property (weak) IBOutlet NSButton *popButtonPause; +@property (weak) IBOutlet NSButton *popButtonLoad; + + +//Действия +- (IBAction)buttonStart:(id)sender; +- (IBAction)buttonPause:(id)sender; +- (IBAction)buttonLoad:(id)sender; +//Фоновый поток +-(void)startBackgroundEvolution; +@end diff --git a/iDNA/iDNA/HVSDocument.m b/iDNA/iDNA/HVSDocument.m new file mode 100644 index 0000000..16463d9 --- /dev/null +++ b/iDNA/iDNA/HVSDocument.m @@ -0,0 +1,309 @@ +// +// HVSDocument.m +// iDNA +// +// Created by VladIslav Khazov on 23.12.12. +// Copyright (c) 2012 VladIslav Khazov. All rights reserved. +// + +#import "HVSDocument.h" +#import "HVSCellDna.h" +#import "HVSPopulationOfDna.h" + +@implementation HVSDocument + +- (id)init +{ + self = [super init]; + if (self) { + //Создаем популяцию с начальными параметрами. + myPopulation = [[HVSPopulationOfDna alloc]init]; + //Добавляем свойство lengthDNA в наблюдение нашему контроллеру. + [myPopulation addObserver:self forKeyPath:@"populationLengthDna" options:NSKeyValueObservingOptionOld context:@"changePopulationLengthDNA"]; + [myPopulation addObserver:self forKeyPath:@"populationSize" options:NSKeyValueObservingOptionOld context:@"changePopulationSize"]; + [myPopulation addObserver:self forKeyPath:@"populationRate" options:NSKeyValueObservingOptionOld context:@"changePopulationRate"]; + flagPause=NO; + } + return self; +} + +-(void)dealloc { + //Убираем свойства из наблюдения. + [myPopulation removeObserver:self forKeyPath:@"populationLengthDna"]; + [myPopulation removeObserver:self forKeyPath:@"populationSize"]; + [myPopulation removeObserver:self forKeyPath:@"populationRate"]; +} +//Доп метод +-(void) changeKeyPath:(NSString *) keyPath + ofObject:(id) obj + toValue:(id) value { + [obj setValue:value forKeyPath:keyPath]; +} +//Метод запускается когда изменяется переменная populationLengthDna объекта myPopulation, а также всех остальных наблюдаемых объектов +-(void) observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context { + + NSUndoManager *myManager = [self undoManager]; + //Проверка, какая переменная была изменена. + if (context==@"changePopulationLengthDNA") { + //UNDO + id oldValue = [change objectForKey:NSKeyValueChangeOldKey]; + if (oldValue == [NSNull null]) { + oldValue = nil; + } + [[myManager prepareWithInvocationTarget:self] changeKeyPath:@"populationLengthDna" ofObject:myPopulation toValue:oldValue]; + [myManager setActionName:@"Change Length DNA"]; + + //Получаем текущие значение переменной + int length = (int)[myPopulation populationLengthDna]; + //Генерим нового Альфа самца + [myPopulation setGoalDNA:[[HVSCellDna alloc]initWithLengthDna:length]]; + // Выводим Goal DNA нашей поппуляции в текстовом поле. + //Берем GOAL DNA + NSMutableArray *myArrayDNA = [[myPopulation goalDNA] DNA]; + NSMutableString *result = [[NSMutableString alloc]init]; + //Цикл перевода массива в строку. + for (int i=0; i<=[myArrayDNA count]-1 ; i++) { + [result appendString:[myArrayDNA objectAtIndex:i]]; + } + [_popTextGoalDna setStringValue:result]; + } + if (context==@"changePopulationSize") { + id oldValue = [change objectForKey:NSKeyValueChangeOldKey]; + if (oldValue == [NSNull null]) { + oldValue = nil; + } + [[myManager prepareWithInvocationTarget:self] changeKeyPath:@"populationSize" ofObject:myPopulation toValue:oldValue]; + [myManager setActionName:@"Change Size"]; + } + if (context==@"changePopulationRate") { + id oldValue = [change objectForKey:NSKeyValueChangeOldKey]; + if (oldValue == [NSNull null]) { + oldValue = nil; + } + [[myManager prepareWithInvocationTarget:self] changeKeyPath:@"populationRate" ofObject:myPopulation toValue:oldValue]; + [myManager setActionName:@"Change Rate"]; + } +} + +//Действия +-(void)startBackgroundEvolution { + //Эволюция + //Выполняем пока не получим 100: совпадений или пока не нажмут на кнопку Пауза + while ([myPopulation flag]==NO && flagPause==NO) { + [myPopulation evolution]; + [_popLevelMatch setIntegerValue:myPopulation.maxHamming]; + [_popLabelMatch setIntegerValue:myPopulation.maxHamming]; + [_popLabelGeneration setIntegerValue:myPopulation.countEvolution]; + } + + //Меняем интерфейс если не Пауза + if (flagPause==NO) { + [_popTextSize setEnabled:YES]; + [_popTextLength setEnabled:YES]; + + [_popSliderSize setEnabled:YES]; + [_popSliderLength setEnabled:YES]; + + [_popButtonLoad setEnabled:YES]; + } + + //Разрешаем менять % мутации, даже на паузе. + [_popSliderRate setEnabled:YES]; + [_popTextRate setEnabled:YES]; + [_popButtonStart setEnabled:YES]; + [_popButtonPause setEnabled:NO]; +} + + +//Нажата кнопка Старт +- (IBAction)buttonStart:(id)sender { + //Меняем интерфейс + + [_popTextSize setEnabled:NO]; + [_popTextLength setEnabled:NO]; + [_popTextRate setEnabled:NO]; + + [_popSliderSize setEnabled:NO]; + [_popSliderLength setEnabled:NO]; + [_popSliderRate setEnabled:NO]; + + [_popButtonStart setEnabled:NO]; + [_popButtonLoad setEnabled:NO]; + [_popButtonPause setEnabled:YES]; + + //Если это не после паузы + if (flagPause==NO) { + //Создаем случайную популяцию ДНК с заданными параметрами. + [myPopulation setPopulation]; + // Устанавливаем флаг совпадений в NO + [myPopulation setFlag:NO]; + //Совпадение с Альфа + [myPopulation setMaxHamming:0]; + //Количество эволюций + [myPopulation setCountEvolution:0]; + } + //Эволюция - запускаем фоном + flagPause=NO; + [self performSelectorInBackground:@selector(startBackgroundEvolution) withObject:nil]; +} +- (IBAction)buttonPause:(id)sender { + flagPause=YES; + +} +- (IBAction)buttonLoad:(id)sender { + //Загрузка файла текстового поля + + //Создаем File Open Dialog class + NSOpenPanel* openDlg = [NSOpenPanel openPanel]; + + //Включаем выбор файлов + [openDlg setCanChooseFiles:YES]; + //отключаем выбор папок + [openDlg setCanChooseDirectories:NO]; +// [openDlg setRequireFileType:@"txt"]; + //разрешаем только расширение txt + [openDlg setAllowedFileTypes:[[NSArray alloc]initWithObjects:@"txt", nil]]; + //Остальные разрешенеия запрещаем выбирать + [openDlg setAllowsOtherFileTypes:NO]; + + // Запускаем и ждем Окей + if ( [openDlg runModal] == NSOKButton ) + { + // Получаем список выбранных файлов + NSArray* files = [openDlg URLs] ; + + BOOL symbol=NO; + // Проходим по ним + for( int i = 0; i < [files count]; i++ ) + { + //Получаем Path первого выбранного + NSString* fileName = [[files objectAtIndex:i] path]; + //Считываем все подряд + NSString * fileContents = [NSString stringWithContentsOfFile:fileName encoding:NSUTF8StringEncoding error:nil]; + // Записываем его есои он устраивает нашим параметрам + if ([fileContents length]==[myPopulation populationLengthDna] && [fileContents length]<=100) { + //Проверка символов в файле + for (int t=0; t<=[fileContents length]-1; t++) { + switch ([fileContents characterAtIndex:t]) { + case (unichar)'A': + break; + case (unichar)'T': + break; + case (unichar)'G': + break; + case (unichar)'C': + break; + default: + symbol=YES; + break; + } + } + + if (symbol==NO) { + //Устанавливаем текстовое поле + [_popTextGoalDna setStringValue:fileContents]; + //создаем нового альфа самца размерностью файла + [[myPopulation goalDNA] setDNA:[[NSMutableArray alloc]initWithContentsOfFile:fileContents]]; + } else { + NSAlert *myAlert = [NSAlert alertWithMessageText:@"Похоже файл содержит символ не относящийся к ДНК или в нем есть управляющие символы (Пр. перевод каретки)" defaultButton:@"Okey" alternateButton:nil otherButton:nil informativeTextWithFormat:@" "]; + [myAlert runModal]; + } + + } else { + NSString *str=[[NSMutableString alloc]initWithFormat:@"Данный файл имеет длину %ld",[fileContents length]]; + NSAlert *myAlert = [NSAlert alertWithMessageText:@"Файл содержит ДНК другой размерностью или его размер больше 100 единиц!!! " defaultButton:@"Okey" alternateButton:nil otherButton:nil informativeTextWithFormat:str]; + [myAlert runModal]; + } + + } + } + +} + + +- (NSString *)windowNibName +{ + // Override returning the nib file name of the document + // If you need to use a subclass of NSWindowController or if your document supports multiple NSWindowControllers, you should remove this method and override -makeWindowControllers instead. + return @"HVSDocument"; +} + +- (void)windowControllerDidLoadNib:(NSWindowController *)aController +{ + [super windowControllerDidLoadNib:aController]; + // Add any code here that needs to be executed once the windowController has loaded the document's window. + // Выводим Goal DNA нашей поппуляции. + //Берем GOAL DNA + NSMutableArray *myArrayDNA = [[myPopulation goalDNA] DNA]; + NSMutableString *result = [[NSMutableString alloc]init]; + //Цикл перевода массива в строку. + for (int i=0; i<=[myArrayDNA count]-1 ; i++) { + [result appendString:[myArrayDNA objectAtIndex:i]]; + } + [_popTextGoalDna setStringValue:result]; +} + ++ (BOOL)autosavesInPlace +{ + return YES; +} + +//Сохранение документа +- (NSData *)dataOfType:(NSString *)typeName error:(NSError **)outError +{ + NSMutableData *saveData = [[NSMutableData alloc]init]; + NSKeyedArchiver *myKeyArchiver = [[NSKeyedArchiver alloc] initForWritingWithMutableData:saveData]; + [myKeyArchiver encodeInteger:[myPopulation populationSize] forKey:@"populationSize"]; + [myKeyArchiver encodeInteger:[myPopulation populationLengthDna] forKey:@"populationLengthDna"]; + [myKeyArchiver encodeInteger:[myPopulation populationRate] forKey:@"populationRate"]; + [myKeyArchiver encodeObject:[myPopulation populationDNA] forKey:@"populationDNA"]; + [myKeyArchiver encodeInt:[[myPopulation goalDNA] lengthDna] forKey:@"lengthDna"]; + [myKeyArchiver encodeObject:[[myPopulation goalDNA] DNA] forKey:@"DNA"]; + [myKeyArchiver encodeBool:[myPopulation flag] forKey:@"flag"]; + [myKeyArchiver encodeInteger:[myPopulation maxHamming] forKey:@"maxHamming"]; + [myKeyArchiver encodeInteger:[myPopulation countEvolution] forKey:@"countEvolution"]; + + [myKeyArchiver finishEncoding]; + + +// NSData *saveData = [NSKeyedArchiver archivedDataWithRootObject:[self popButtonLoad]]; + return saveData; +} + +- (BOOL)readFromData:(NSData *)data ofType:(NSString *)typeName error:(NSError **)outError +{ + + NSKeyedUnarchiver *myKeyArchiver = [[NSKeyedUnarchiver alloc] initForReadingWithData:data]; + HVSPopulationOfDna *newMyPopulation = nil; + @try { + newMyPopulation = [[HVSPopulationOfDna alloc] init]; + [newMyPopulation setPopulationSize:[myKeyArchiver decodeIntegerForKey:@"populationSize"]]; + [newMyPopulation setPopulationLengthDna:[myKeyArchiver decodeIntegerForKey:@"populationLengthDna"]]; + [newMyPopulation setPopulationRate:[myKeyArchiver decodeIntegerForKey:@"populationRate"]]; + [newMyPopulation setPopulationDNA:[myKeyArchiver decodeObjectForKey:@"populationDNA"]]; + //Подготовка + [newMyPopulation setGoalDNA:[[HVSCellDna alloc] initWithLengthDna:(int)[myKeyArchiver decodeIntegerForKey:@"lengthDna"]]]; +// [myKeyArchiver decodeIntForKey:@"lengthDna"]; +// [myKeyArchiver decodeObjectForKey:@"DNA"]; + [[newMyPopulation goalDNA] setDNA:[myKeyArchiver decodeObjectForKey:@"DNA"]]; + + [newMyPopulation setFlag:[myKeyArchiver decodeBoolForKey:@"flag"]]; + [newMyPopulation setMaxHamming:[myKeyArchiver decodeIntegerForKey:@"maxHamming"]]; + [newMyPopulation setCountEvolution:[myKeyArchiver decodeIntegerForKey:@"countEvolution"]]; + } + @catch (NSException *exception) { + if (outError) { + NSDictionary *d = [NSDictionary dictionaryWithObject:@"The file is invalid!" forKey:NSLocalizedFailureReasonErrorKey]; + *outError = [NSError errorWithDomain:NSOSStatusErrorDomain code:unimpErr userInfo:d]; + return NO; + } + } + myPopulation = newMyPopulation; + //Не понятно, потому что в инит стоит addObsrving, но он при почему то не работает при вызове... + [myPopulation addObserver:self forKeyPath:@"populationLengthDna" options:NSKeyValueObservingOptionOld context:@"changePopulationLengthDNA"]; + [myPopulation addObserver:self forKeyPath:@"populationSize" options:NSKeyValueObservingOptionOld context:@"changePopulationSize"]; + [myPopulation addObserver:self forKeyPath:@"populationRate" options:NSKeyValueObservingOptionOld context:@"changePopulationRate"]; + return YES; +} + +@end diff --git a/iDNA/iDNA/HVSPopulationOfDna.h b/iDNA/iDNA/HVSPopulationOfDna.h new file mode 100644 index 0000000..ad30591 --- /dev/null +++ b/iDNA/iDNA/HVSPopulationOfDna.h @@ -0,0 +1,36 @@ +// +// HVSPopulationOfDna.h +// iDNA +// +// Created by VladIslav Khazov on 23.12.12. +// Copyright (c) 2012 VladIslav Khazov. All rights reserved. +// Популяция ДНК + +#import +#import "HVSCellDna.h" + +@interface HVSPopulationOfDna : NSObject + +//Свойства популяции ДНК, определяющие размер популяции, размер 1-ой ДНК и процент мутации. +@property NSInteger populationSize; +@property NSInteger populationLengthDna; +@property NSInteger populationRate; +// Массив который хранит объекты типа ДНК (HVSCellDna) +@property NSMutableArray *populationDNA; +// Goal DNA +@property HVSCellDna *goalDNA; +//Флаг указывающий на совпадение одного из ДНК с Альфа самцом +@property BOOL flag; +//Максимальное совпадение в % +@property NSInteger maxHamming; +//Количество проходов +@property NSInteger countEvolution; + +-(id) init; + +//метод заполнения популяции +-(void)setPopulation; +//метод эволюции +- (void)evolution; + +@end diff --git a/iDNA/iDNA/HVSPopulationOfDna.m b/iDNA/iDNA/HVSPopulationOfDna.m new file mode 100644 index 0000000..7ba9e4b --- /dev/null +++ b/iDNA/iDNA/HVSPopulationOfDna.m @@ -0,0 +1,139 @@ +// +// HVSPopulationOfDna.m +// iDNA +// +// Created by VladIslav Khazov on 23.12.12. +// Copyright (c) 2012 VladIslav Khazov. All rights reserved. +// + +#import "HVSPopulationOfDna.h" + +@implementation HVSPopulationOfDna + +-(id)init { + self = [super init]; + if (self) { + [self setPopulationLengthDna:30]; + [self setPopulationRate:5]; + [self setPopulationSize:1000]; + [self setGoalDNA:[[HVSCellDna alloc]initWithLengthDna:30]]; + [self setFlag:NO]; + [self setMaxHamming:0]; + [self setCountEvolution:0]; + } + return self; +} + +//метод заполнения популяции c заданными параметрами +-(void)setPopulation { +// [self setPopulationDNA:[[NSMutableArray alloc]initWithCapacity:[self populationSize]]]; + _populationDNA = [[NSMutableArray alloc] initWithCapacity:_populationSize]; + //Заполняем популяцию + for (int i=0; i<=_populationSize-1; i++) { + //Длина каждой днк + int length = (int)_populationLengthDna; + //Добавляем объект в массив. +// [[self populationDNA] addObject:[[HVSCellDna alloc]initWithLengthDna:length]]; + [_populationDNA addObject:[[HVSCellDna alloc] initWithLengthDna:length]]; + } +} + + +//Эволюция 1 проход +-(void)evolution { + //Сортировка + //Создаем временный массив. + NSMutableArray *sortPopulationDNA = [[NSMutableArray alloc] initWithCapacity:_populationSize]; + //Смысл сортировки: Ищем и добавляем в массив сначала все элементы которые совпадают полностью, затем на 1 меньше и так далее. Пока не добавим все элементы в сортированный массив. + for (int lenDNA=(int)_populationLengthDna; lenDNA>=1; lenDNA--) { + for (int i=0; i<=_populationSize-1 ; i++) { + int tempHamming =[[_populationDNA objectAtIndex:i] hammingDistance:_goalDNA]; + if (tempHamming==lenDNA) { + [sortPopulationDNA addObject:[_populationDNA objectAtIndex:i]]; + //Проверка на полное совпадение + if (tempHamming==(int)_populationLengthDna) { + _flag=YES; + } + //Максимальное совпадение + if (tempHamming*100/_populationLengthDna>_maxHamming) { + _maxHamming = tempHamming*100/_populationLengthDna; + } + } + } + } + //Присваиваем отсортированный массив нашему. + _populationDNA=sortPopulationDNA; + //Временная ДНК для скрещивания. + NSMutableArray *tempDNA = [[NSMutableArray alloc] initWithCapacity:_populationLengthDna]; + // временные индексы топ ДНК + int tempDNA1,tempDNA2; + //Если нет совпадений делаем эволюцию + if (_flag==NO) { + //Увеличиваем счетчик + _countEvolution++; + //Цикл по второй половине популяция, для их замены. + for (int i=(int)_populationSize/2; i<=_populationSize-1; i++) { + //Случайный выбор метода. + int random = arc4random_uniform(3); + switch (random) { + case 0: + tempDNA1 = arc4random_uniform((int)_populationSize/2); + tempDNA2 = arc4random_uniform((int)_populationSize/2); + //создаем новый ДНК 50/50 + for (int j=0; j<=(int)_populationLengthDna-1; j++) { + if (j<=(int)_populationLengthDna/2) { + //Добавляем значение случайной ДНК 1, по индексу j. + [tempDNA addObject:[[[_populationDNA objectAtIndex:tempDNA1] DNA] objectAtIndex:j]]; + } else { + //Добавляем значение случайной ДНК 2, по индексу j. + [tempDNA addObject:[[[_populationDNA objectAtIndex:tempDNA2] DNA] objectAtIndex:j]]; + } + } + //Записываем результат + [[_populationDNA objectAtIndex:i] setDNA:tempDNA]; + break; + case 1: + tempDNA1 = arc4random_uniform((int)_populationSize/2); + tempDNA2 = arc4random_uniform((int)_populationSize/2); + //создаем новый ДНК через 1 1/1/1/1/1 + for (int j=0; j<=(int)_populationLengthDna-1; j++) { + if (j%2==0) { + //Добавляем значение случайной ДНК 1, по индексу j. + [tempDNA addObject:[[[_populationDNA objectAtIndex:tempDNA1] DNA] objectAtIndex:j]]; + } else { + //Добавляем значение случайной ДНК 2, по индексу j. + [tempDNA addObject:[[[_populationDNA objectAtIndex:tempDNA2] DNA] objectAtIndex:j]]; + } + } + //Записываем результат + [[_populationDNA objectAtIndex:i] setDNA:tempDNA]; + break; + case 2: + tempDNA1 = arc4random_uniform((int)_populationSize/2); + tempDNA2 = arc4random_uniform((int)_populationSize/2); + //создаем новый ДНК 20/60/20 + for (int j=0; j<=(int)_populationLengthDna-1; j++) { + if (j*100/((int)_populationLengthDna-1)<=20 || j*100/((int)_populationLengthDna-1)>60) { + //Добавляем значение случайной ДНК 1, по индексу j. + [tempDNA addObject:[[[_populationDNA objectAtIndex:tempDNA1] DNA] objectAtIndex:j]]; + } else { + //Добавляем значение случайной ДНК 2, по индексу j. + [tempDNA addObject:[[[_populationDNA objectAtIndex:tempDNA2] DNA] objectAtIndex:j]]; + } + } + //Записываем результат + [[_populationDNA objectAtIndex:i] setDNA:tempDNA]; + break; + default: + break; + } + + } + //Мутация популяции + for (HVSCellDna *dna in _populationDNA) { + [dna mutate:(int)_populationRate]; + } + } +} + +@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/HVSDocument.xib b/iDNA/iDNA/en.lproj/HVSDocument.xib new file mode 100644 index 0000000..251fdcd --- /dev/null +++ b/iDNA/iDNA/en.lproj/HVSDocument.xib @@ -0,0 +1,2800 @@ + + + + 1080 + 12C60 + 2844 + 1187.34 + 625.00 + + com.apple.InterfaceBuilder.CocoaPlugin + 2844 + + + IBNSLayoutConstraint + NSButton + NSButtonCell + NSCustomObject + NSLevelIndicator + NSLevelIndicatorCell + NSNumberFormatter + NSSlider + NSSliderCell + NSTextField + NSTextFieldCell + NSUserDefaultsController + NSView + NSWindowTemplate + + + com.apple.InterfaceBuilder.CocoaPlugin + + + PluginDependencyRecalculationVersion + + + + + HVSDocument + + + FirstResponder + + + 15 + 2 + {{133, 235}, {507, 413}} + 1886912512 + iDNA + NSWindow + View + + {94, 86} + + + 256 + + + + 268 + {{17, 376}, {106, 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, 351}, {106, 17}} + + + + _NS:1535 + YES + + 68157504 + 272630784 + DNA length + + _NS:1535 + + + + + NO + + + + 268 + {{17, 326}, {106, 17}} + + + + _NS:1535 + YES + + 68157504 + 272630784 + Mutation rate % + + _NS:1535 + + + + + NO + + + + 268 + {{197, 374}, {292, 21}} + + + + _NS:9 + YES + + -2080374784 + 0 + + _NS:9 + + 10000 + 1 + 5000 + 0.0 + 0 + 1 + NO + NO + + NO + + + + 268 + {{197, 349}, {292, 21}} + + + + _NS:9 + YES + + -2080374784 + 0 + + _NS:9 + + 100 + 1 + 50 + 0.0 + 0 + 1 + NO + NO + + NO + + + + 268 + {{197, 324}, {292, 21}} + + + + _NS:9 + YES + + -2080374784 + 0 + + _NS:9 + + 100 + 1 + 50 + 0.0 + 0 + 1 + NO + NO + + NO + + + + 268 + {{128, 371}, {63, 22}} + + + + _NS:9 + YES + + -1804599231 + -1874852864 + + + + + + + + + + + + -∞ + + + +∞ + + #,##0.### + #,##0.### + + + + + + + + NaN + + + + + + 3 + YES + YES + YES + + . + , + YES + NO + YES + + _NS:9 + + YES + + 6 + System + textBackgroundColor + + 3 + MQA + + + + 6 + System + textColor + + + + NO + + + + 268 + {{128, 346}, {63, 22}} + + + + _NS:9 + YES + + -1804599231 + -1874852864 + + + + + + + + + + -∞ + + + +∞ + + #,##0.### + #,##0.### + + + + + + + + NaN + + + + + + 3 + YES + YES + YES + + . + , + YES + NO + YES + + _NS:9 + + YES + + + + NO + + + + 268 + {{128, 321}, {63, 22}} + + + + _NS:9 + YES + + -1804599231 + -1874852864 + + + + + + + + + + -∞ + + + +∞ + + #,##0.### + #,##0.### + + + + + + + + NaN + + + + + + 3 + YES + YES + YES + + . + , + YES + NO + YES + + _NS:9 + + YES + + + + NO + + + + 268 + {{20, 290}, {295, 19}} + + + + _NS:1535 + YES + + 68157504 + 71304192 + Generation: + + LucidaGrande + 16 + 16 + + _NS:1535 + + + + + NO + + + + 268 + {{23, 265}, {315, 17}} + + + + _NS:1535 + YES + + 68157504 + 71304192 + Best individual match % - + + _NS:1535 + + + + + NO + + + + 268 + {{20, 241}, {467, 16}} + + + + _NS:9 + YES + + 0 + 0 + _NS:9 + + 100 + 100 + 2 + 2 + 1 + + NO + + + + 268 + {{20, 49}, {467, 184}} + + + + _NS:9 + YES + + -1805647871 + 205520896 + + + LucidaGrande + 30 + 16 + + _NS:9 + + YES + + + + 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 + {{359, 13}, {134, 32}} + + + + _NS:9 + YES + + 67108864 + 134217728 + Load goal DNA + + _NS:9 + + -2038284288 + 129 + + + 200 + 25 + + NO + + + + 268 + {{343, 265}, {147, 17}} + + + + _NS:1535 + YES + + 68157504 + -1874852864 + 0 + + + + + + + -∞ + + +∞ + + # + # + + + + + + + + NaN + + + + 0 + 0 + YES + NO + 1 + AAAAAAAAAAAAAAAAAAAAAA + + + + 3 + YES + YES + YES + + . + , + NO + NO + YES + + _NS:1535 + + + + + NO + + + + 268 + {{317, 292}, {173, 17}} + + + + _NS:1535 + YES + + 68157504 + -1874852864 + 0 + + + + + + + -∞ + + +∞ + + # + # + + + + + + + + NaN + + + + + + 3 + YES + YES + YES + + . + , + NO + NO + YES + + _NS:1535 + + + + + NO + + + {507, 413} + + + + + {{0, 0}, {1920, 1058}} + {94, 108} + {10000000000000, 10000000000000} + YES + + + NSApplication + + + YES + + + + + + + window + + + + 18 + + + + popTextLength + + + + 100163 + + + + popTextSize + + + + 100164 + + + + popTextRate + + + + 100165 + + + + popTextGoalDna + + + + 100194 + + + + popSliderSize + + + + 100195 + + + + popSliderLength + + + + 100196 + + + + popSliderRate + + + + 100197 + + + + popLevelMatch + + + + 100200 + + + + popButtonStart + + + + 100201 + + + + popButtonPause + + + + 100202 + + + + popButtonLoad + + + + 100203 + + + + buttonStart: + + + + 100204 + + + + buttonPause: + + + + 100205 + + + + buttonLoad: + + + + 100206 + + + + popLabelGeneration + + + + 100274 + + + + popLabelMatch + + + + 100277 + + + + delegate + + + + 17 + + + + value: self.myPopulation.populationSize + + + + + + value: self.myPopulation.populationSize + value + self.myPopulation.populationSize + 2 + + + 100178 + + + + value: self.myPopulation.populationLengthDna + + + + + + value: self.myPopulation.populationLengthDna + value + self.myPopulation.populationLengthDna + 2 + + + 100181 + + + + value: self.myPopulation.populationRate + + + + + + value: self.myPopulation.populationRate + value + self.myPopulation.populationRate + 2 + + + 100184 + + + + value: self.myPopulation.populationSize + + + + + + value: self.myPopulation.populationSize + value + self.myPopulation.populationSize + 2 + + + 100187 + + + + value: self.myPopulation.populationLengthDna + + + + + + value: self.myPopulation.populationLengthDna + value + self.myPopulation.populationLengthDna + 2 + + + 100190 + + + + value: self.myPopulation.populationRate + + + + + + value: self.myPopulation.populationRate + value + self.myPopulation.populationRate + 2 + + + 100193 + + + + value: self.myPopulation.maxHamming + + + + + + value: self.myPopulation.maxHamming + value + self.myPopulation.maxHamming + 2 + + + 100271 + + + + value: self.myPopulation.maxHamming + + + + + + value: self.myPopulation.maxHamming + value + self.myPopulation.maxHamming + 2 + + + 100248 + + + + value: self.myPopulation.countEvolution + + + + + + value: self.myPopulation.countEvolution + value + self.myPopulation.countEvolution + 2 + + + 100268 + + + + value: self.myPopulation.maxHamming + + + + + + value: self.myPopulation.maxHamming + value + self.myPopulation.maxHamming + 2 + + + 100254 + + + + + + 0 + + + + + + -2 + + + File's Owner + + + -1 + + + First Responder + + + 5 + + + + + + Window + + + 6 + + + + + 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 + + + + 4 + 0 + + 4 + 1 + + 20 + + 1000 + + 8 + 29 + 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 + + + + 11 + 0 + + 11 + 1 + + 0.0 + + 1000 + + 6 + 24 + 2 + + + + 6 + 0 + + 6 + 1 + + 20 + + 1000 + + 8 + 29 + 3 + + + + 5 + 0 + + 6 + 1 + + 8 + + 1000 + + 6 + 24 + 3 + + + + 3 + 0 + + 3 + 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 + + + + 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 + + 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 + + + + 3 + 0 + + 3 + 1 + + 20 + + 1000 + + 8 + 29 + 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 + + + + 6 + 0 + + 6 + 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 + + 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 + + + + 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 + + + + 5 + 0 + + 5 + 1 + + 26 + + 1000 + + 3 + 9 + 3 + + + + 3 + 0 + + 4 + 1 + + 8 + + 1000 + + 6 + 24 + 3 + + + + 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 + + + + 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 + + + + 3 + 0 + + 3 + 1 + + 20 + + 1000 + + 8 + 29 + 3 + + + + + + + + + + + + + + + + + + + + + + + + -3 + + + Application + + + 100027 + + + + + + 7 + 0 + + 0 + 1 + + 100 + + 1000 + + 3 + 9 + 1 + + + + + + 100028 + + + + + 100031 + + + + + 100032 + + + + + 100033 + + + + + 100034 + + + + + + + + 100036 + + + + + 100039 + + + + + 100040 + + + + + 100042 + + + + + + + + 100043 + + + + + 100047 + + + + + 100049 + + + + + 100050 + + + + + + + + 100051 + + + + + 100052 + + + + + 100055 + + + + + 100056 + + + + + + + + 100057 + + + + + 100061 + + + + + 100063 + + + + + 100065 + + + + + + + + 100066 + + + + + 100070 + + + + + 100072 + + + + + 100079 + + + + + + 7 + 0 + + 0 + 1 + + 63 + + 1000 + + 3 + 9 + 1 + + + + + + 100080 + + + + + + + + 100085 + + + + + 100086 + + + + + 100091 + + + + + 100093 + + + + + 100094 + + + + + 100095 + + + + + 100096 + + + + + + + + 100098 + + + + + + + + 100101 + + + + + 100102 + + + + + 100103 + + + + + 100104 + + + + + 100105 + + + + + + + + 100106 + + + + + + + + 100110 + + + + + 100111 + + + + + 100112 + + + + + 100113 + + + + + 100114 + + + + + + 7 + 0 + + 0 + 1 + + 289 + + 1000 + + 3 + 9 + 1 + + + + + + 100115 + + + + + 100120 + + + + + + 7 + 0 + + 0 + 1 + + 309 + + 1000 + + 3 + 9 + 1 + + + + + + 100121 + + + + + 100123 + + + + + 100131 + + + + + + + + 100132 + + + + + 100133 + + + + + 100134 + + + + + 100136 + + + + + 100137 + + + + + + 8 + 0 + + 0 + 1 + + 184 + + 1000 + + 3 + 9 + 1 + + + + + + 100138 + + + + + 100139 + + + + + 100140 + + + + + 100142 + + + + + 100144 + + + + + + + + 100145 + + + + + 100146 + + + + + 100147 + + + + + 100148 + + + + + 100149 + + + + + 100150 + + + + + + + + 100151 + + + + + 100154 + + + + + 100155 + + + + + 100156 + + + + + + + + 100157 + + + + + 100160 + + + + + 100161 + + + + + 100166 + + + + + 100173 + + + + + 100174 + + + + + 100175 + + + + + 100208 + + + + + 100211 + + + + + 100212 + + + + + 100223 + + + + + + 7 + 0 + + 0 + 1 + + 141 + + 1000 + + 3 + 9 + 1 + + + + + + 100224 + + + + + + + + 100225 + + + + + 100245 + + + + + 100250 + + + + + 7 + 0 + + 0 + 1 + + 167 + + 1000 + + 3 + 9 + 1 + + + + 8 + 0 + + 0 + 1 + + 17 + + 1000 + + 3 + 9 + 1 + + + + + + + 100252 + + + + + + + + 100253 + + + + + 100261 + + + + + 100263 + + + + + 100264 + + + + + 100272 + + + + + 100273 + + + + + 100275 + + + + + 100276 + + + + + + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + + + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + + + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + + + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + + + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + + + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + + com.apple.InterfaceBuilder.CocoaPlugin + + + com.apple.InterfaceBuilder.CocoaPlugin + + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + + + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + + com.apple.InterfaceBuilder.CocoaPlugin + + + + + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + {{133, 170}, {507, 413}} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + com.apple.InterfaceBuilder.CocoaPlugin + + + + + + 100277 + + + + + HVSDocument + NSDocument + + id + id + id + + + + buttonLoad: + id + + + buttonPause: + id + + + buttonStart: + id + + + + NSButton + NSButton + NSButton + NSTextField + NSTextField + NSLevelIndicator + NSSlider + NSSlider + NSSlider + NSTextField + NSTextField + NSTextField + NSTextField + + + + popButtonLoad + NSButton + + + popButtonPause + NSButton + + + popButtonStart + NSButton + + + popLabelGeneration + NSTextField + + + popLabelMatch + NSTextField + + + popLevelMatch + NSLevelIndicator + + + popSliderLength + NSSlider + + + popSliderRate + NSSlider + + + popSliderSize + NSSlider + + + popTextGoalDna + NSTextField + + + popTextLength + NSTextField + + + popTextRate + NSTextField + + + popTextSize + NSTextField + + + + IBProjectSource + ./Classes/HVSDocument.h + + + + NSLayoutConstraint + NSObject + + IBProjectSource + ./Classes/NSLayoutConstraint.h + + + + + 0 + IBCocoaFramework + YES + 3 + YES + + 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..b5a73d3 --- /dev/null +++ b/iDNA/iDNA/en.lproj/MainMenu.xib @@ -0,0 +1,4562 @@ + + + + 1080 + 11D50 + 2457 + 1138.32 + 568.00 + + com.apple.InterfaceBuilder.CocoaPlugin + 2457 + + + NSMenu + NSMenuItem + NSCustomObject + + + 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 + + + NSFontManager + + + + + + + terminate: + + + + 448 + + + + orderFrontStandardAboutPanel: + + + + 142 + + + + performMiniaturize: + + + + 37 + + + + arrangeInFront: + + + + 39 + + + + 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: + + + + 371 + + + + openDocument: + + + + 372 + + + + printDocument: + + + + 373 + + + + raiseBaseline: + + + + 425 + + + + lowerBaseline: + + + + 426 + + + + copyFont: + + + + 427 + + + + subscript: + + + + 428 + + + + superscript: + + + + 429 + + + + tightenKerning: + + + + 430 + + + + underline: + + + + 431 + + + + orderFrontColorPanel: + + + + 432 + + + + useAllLigatures: + + + + 433 + + + + loosenKerning: + + + + 434 + + + + pasteFont: + + + + 435 + + + + unscript: + + + + 436 + + + + useStandardKerning: + + + + 437 + + + + useStandardLigatures: + + + + 438 + + + + turnOffLigatures: + + + + 439 + + + + turnOffKerning: + + + + 440 + + + + capitalizeWord: + + + + 454 + + + + lowercaseWord: + + + + 455 + + + + uppercaseWord: + + + + 456 + + + + toggleAutomaticDashSubstitution: + + + + 460 + + + + orderFrontSubstitutionsPanel: + + + + 461 + + + + toggleAutomaticTextReplacement: + + + + 463 + + + + toggleAutomaticSpellingCorrection: + + + + 466 + + + + performFindPanelAction: + + + + 467 + + + + performFindPanelAction: + + + + 468 + + + + performFindPanelAction: + + + + 469 + + + + pasteAsPlainText: + + + + 471 + + + + showHelp: + + + + 494 + + + + alignCenter: + + + + 517 + + + + pasteRuler: + + + + 518 + + + + toggleRuler: + + + + 519 + + + + alignRight: + + + + 520 + + + + copyRuler: + + + + 521 + + + + alignJustified: + + + + 522 + + + + alignLeft: + + + + 523 + + + + makeBaseWritingDirectionNatural: + + + + 524 + + + + makeBaseWritingDirectionLeftToRight: + + + + 525 + + + + makeBaseWritingDirectionRightToLeft: + + + + 526 + + + + makeTextWritingDirectionNatural: + + + + 527 + + + + makeTextWritingDirectionLeftToRight: + + + + 528 + + + + makeTextWritingDirectionRightToLeft: + + + + 529 + + + + performFindPanelAction: + + + + 533 + + + + addFontTrait: + + + + 420 + + + + addFontTrait: + + + + 421 + + + + modifyFont: + + + + 422 + + + + orderFrontFontPanel: + + + + 423 + + + + modifyFont: + + + + 424 + + + + + + 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 + + + + + 374 + + + + + + + + 375 + + + + + + + + + 376 + + + + + + + + 387 + + + + + + + + + + + + + + + + + + + + + + + 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 + + + + + 449 + + + + + + + + 450 + + + + + + + + + + 451 + + + + + 452 + + + + + 453 + + + + + 457 + + + + + 458 + + + + + 459 + + + + + 462 + + + + + 464 + + + + + 465 + + + + + 470 + + + + + 491 + + + + + + + + 492 + + + + + + + + 493 + + + + + 495 + + + + + + + + 496 + + + + + + + + + + + + + + + + + 497 + + + + + 498 + + + + + 499 + + + + + 500 + + + + + 501 + + + + + 502 + + + + + + + + 503 + + + + + 504 + + + + + 505 + + + + + 506 + + + + + 507 + + + + + + + + + + + + + + + + 508 + + + + + 509 + + + + + 510 + + + + + 511 + + + + + 512 + + + + + 513 + + + + + 514 + + + + + 515 + + + + + 516 + + + + + 532 + + + + + + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + + + + + 533 + + + + + ABAppCardController + NSWindowController + + id + id + id + id + id + id + id + id + + + + addCardViewField: + id + + + copy: + id + + + cut: + id + + + doDelete: + id + + + find: + id + + + paste: + id + + + saveChanges: + id + + + toggleCardEditingMode: + id + + + + ABCardView + NSButton + NSManagedObjectContext + NSSearchField + NSTextField + NSWindow + + + + mCardView + ABCardView + + + mEditButton + NSButton + + + mManagedObjectContext + NSManagedObjectContext + + + mSearchField + NSSearchField + + + mStatusTextField + NSTextField + + + mWindow + NSWindow + + + + IBProjectSource + ./Classes/ABAppCardController.h + + + + ABCardView + NSView + + id + id + + + + commitAndSave: + id + + + statusImageClicked: + id + + + + NSObjectController + NSImageView + NSView + ABNameFrameView + NSView + NSImage + ABImageView + + + + mBindingsController + NSObjectController + + + mBuddyStatusImage + NSImageView + + + mHeaderView + NSView + + + mNameView + ABNameFrameView + + + mNextKeyView + NSView + + + mUserImage + NSImage + + + mUserImageView + ABImageView + + + + IBProjectSource + ./Classes/ABCardView.h + + + + ABImageView + NSImageView + + id + id + id + id + + + + copy: + id + + + cut: + id + + + delete: + id + + + paste: + id + + + + IBProjectSource + ./Classes/ABImageView.h + + + + DVTBorderedView + DVTLayoutView_ML + + contentView + NSView + + + contentView + + contentView + NSView + + + + IBProjectSource + ./Classes/DVTBorderedView.h + + + + DVTDelayedMenuButton + NSButton + + IBProjectSource + ./Classes/DVTDelayedMenuButton.h + + + + DVTGradientImageButton + NSButton + + IBProjectSource + ./Classes/DVTGradientImageButton.h + + + + DVTImageAndTextCell + NSTextFieldCell + + IBProjectSource + ./Classes/DVTImageAndTextCell.h + + + + DVTImageAndTextColumn + NSTableColumn + + IBProjectSource + ./Classes/DVTImageAndTextColumn.h + + + + DVTLayoutView_ML + NSView + + IBProjectSource + ./Classes/DVTLayoutView_ML.h + + + + DVTOutlineView + NSOutlineView + + IBProjectSource + ./Classes/DVTOutlineView.h + + + + DVTSplitView + NSSplitView + + IBProjectSource + ./Classes/DVTSplitView.h + + + + DVTStackView_ML + DVTLayoutView_ML + + IBProjectSource + ./Classes/DVTStackView_ML.h + + + + DVTTableView + NSTableView + + IBProjectSource + ./Classes/DVTTableView.h + + + + DVTViewController + NSViewController + + IBProjectSource + ./Classes/DVTViewController.h + + + + FirstResponder + + duplicateDocument: + id + + + duplicateDocument: + + duplicateDocument: + id + + + + IBUserSource + + + + + HFController + NSObject + + selectAll: + id + + + selectAll: + + selectAll: + id + + + + IBProjectSource + ./Classes/HFController.h + + + + HFRepresenterTextView + NSView + + selectAll: + id + + + selectAll: + + selectAll: + id + + + + IBProjectSource + ./Classes/HFRepresenterTextView.h + + + + IBEditor + NSObject + + id + id + id + id + id + + + + changeFont: + id + + + performCopy: + id + + + performCut: + id + + + selectAll: + id + + + sizeSelectionToFit: + id + + + + IBProjectSource + ./Classes/IBEditor.h + + + + IDECapsuleListView + DVTStackView_ML + + dataSource + id + + + dataSource + + dataSource + id + + + + IBProjectSource + ./Classes/IDECapsuleListView.h + + + + IDEDMArrayController + NSArrayController + + IBProjectSource + ./Classes/IDEDMArrayController.h + + + + IDEDMEditor + IDEEditor + + DVTBorderedView + NSView + IDEDMEditorSourceListController + DVTSplitView + + + + bottomToolbarBorderView + DVTBorderedView + + + sourceListSplitViewPane + NSView + + + sourceListViewController + IDEDMEditorSourceListController + + + splitView + DVTSplitView + + + + IBProjectSource + ./Classes/IDEDMEditor.h + + + + IDEDMEditorController + IDEViewController + + IBProjectSource + ./Classes/IDEDMEditorController.h + + + + IDEDMEditorSourceListController + IDEDMEditorController + + DVTBorderedView + IDEDMEditor + DVTImageAndTextColumn + DVTOutlineView + NSTreeController + + + + borderedView + DVTBorderedView + + + parentEditor + IDEDMEditor + + + primaryColumn + DVTImageAndTextColumn + + + sourceListOutlineView + DVTOutlineView + + + sourceListTreeController + NSTreeController + + + + IBProjectSource + ./Classes/IDEDMEditorSourceListController.h + + + + IDEDMHighlightImageAndTextCell + DVTImageAndTextCell + + IBProjectSource + ./Classes/IDEDMHighlightImageAndTextCell.h + + + + IDEDataModelBrowserEditor + IDEDMEditorController + + IDEDataModelPropertiesTableController + IDECapsuleListView + NSArrayController + IDEDataModelPropertiesTableController + IDEDataModelEntityContentsEditor + IDEDataModelPropertiesTableController + + + + attributesTableViewController + IDEDataModelPropertiesTableController + + + capsuleView + IDECapsuleListView + + + entityArrayController + NSArrayController + + + fetchedPropertiesTableViewController + IDEDataModelPropertiesTableController + + + parentEditor + IDEDataModelEntityContentsEditor + + + relationshipsTableViewController + IDEDataModelPropertiesTableController + + + + IBProjectSource + ./Classes/IDEDataModelBrowserEditor.h + + + + IDEDataModelConfigurationEditor + IDEDMEditorController + + IDECapsuleListView + IDEDataModelEditor + IDEDataModelConfigurationTableController + + + + capsuleListView + IDECapsuleListView + + + parentEditor + IDEDataModelEditor + + + tableController + IDEDataModelConfigurationTableController + + + + IBProjectSource + ./Classes/IDEDataModelConfigurationEditor.h + + + + IDEDataModelConfigurationTableController + IDEDMEditorController + + NSArrayController + NSArrayController + IDEDataModelConfigurationEditor + XDTableView + + + + configurationsArrayController + NSArrayController + + + entitiesArrayController + NSArrayController + + + parentEditor + IDEDataModelConfigurationEditor + + + tableView + XDTableView + + + + IBProjectSource + ./Classes/IDEDataModelConfigurationTableController.h + + + + IDEDataModelDiagramEditor + IDEDMEditorController + + XDDiagramView + IDEDataModelEntityContentsEditor + + + + diagramView + XDDiagramView + + + parentEditor + IDEDataModelEntityContentsEditor + + + + IBProjectSource + ./Classes/IDEDataModelDiagramEditor.h + + + + IDEDataModelEditor + IDEDMEditor + + DVTDelayedMenuButton + DVTDelayedMenuButton + NSSegmentedControl + IDEDataModelConfigurationEditor + IDEDataModelEntityContentsEditor + IDEDataModelFetchRequestEditor + NSSegmentedControl + NSTabView + + + + addEntityButton + DVTDelayedMenuButton + + + addPropertyButton + DVTDelayedMenuButton + + + browserDiagramSegmentControl + NSSegmentedControl + + + configurationViewController + IDEDataModelConfigurationEditor + + + entityContentsViewController + IDEDataModelEntityContentsEditor + + + fetchRequestViewController + IDEDataModelFetchRequestEditor + + + hierarchySegmentControl + NSSegmentedControl + + + tabView + NSTabView + + + + IBProjectSource + ./Classes/IDEDataModelEditor.h + + + + IDEDataModelEntityContentsEditor + IDEDMEditorController + + IDEDataModelBrowserEditor + IDEDataModelDiagramEditor + IDEDataModelEditor + NSTabView + + + + browserViewController + IDEDataModelBrowserEditor + + + diagramViewController + IDEDataModelDiagramEditor + + + parentEditor + IDEDataModelEditor + + + tabView + NSTabView + + + + IBProjectSource + ./Classes/IDEDataModelEntityContentsEditor.h + + + + IDEDataModelFetchRequestEditor + IDEDMEditorController + + NSArrayController + IDEDataModelEditor + IDECapsuleListView + + + + entityController + NSArrayController + + + parentEditor + IDEDataModelEditor + + + tableView + IDECapsuleListView + + + + IBProjectSource + ./Classes/IDEDataModelFetchRequestEditor.h + + + + IDEDataModelPropertiesTableController + IDEDMEditorController + + IDEDMArrayController + NSTableColumn + NSArrayController + IDEDataModelBrowserEditor + IDEDMHighlightImageAndTextCell + XDTableView + + + + arrayController + IDEDMArrayController + + + entitiesColumn + NSTableColumn + + + entityArrayController + NSArrayController + + + parentEditor + IDEDataModelBrowserEditor + + + propertyNameAndImageCell + IDEDMHighlightImageAndTextCell + + + tableView + XDTableView + + + + IBProjectSource + ./Classes/IDEDataModelPropertiesTableController.h + + + + IDEDocDownloadsTableViewController + NSObject + + NSButtonCell + DVTTableView + IDEDocViewingPrefPaneController + + + + _downloadButtonCell + NSButtonCell + + + _tableView + DVTTableView + + + prefPaneController + IDEDocViewingPrefPaneController + + + + IBProjectSource + ./Classes/IDEDocDownloadsTableViewController.h + + + + IDEDocViewingPrefPaneController + IDEViewController + + id + id + id + id + id + id + id + id + id + id + id + + + + addSubscription: + id + + + checkForAndInstallUpdatesNow: + id + + + deleteDocSet: + id + + + downloadAction: + id + + + minimumFontSizeComboBoxAction: + id + + + minimumFontSizeEnabledAction: + id + + + showHelp: + id + + + showSubscriptionSheet: + id + + + subscriptionCancelAction: + id + + + toggleAutoCheckForAndInstallUpdates: + id + + + toggleDocSetInfo: + id + + + + DVTGradientImageButton + DVTGradientImageButton + DVTGradientImageButton + NSSplitView + NSView + NSView + DVTBorderedView + DVTBorderedView + NSButton + NSTextView + IDEDocDownloadsTableViewController + NSComboBox + NSTextField + NSButton + NSTextField + NSWindow + NSButton + + + + _addButton + DVTGradientImageButton + + + _deleteButton + DVTGradientImageButton + + + _showInfoAreaButton + DVTGradientImageButton + + + _splitView + NSSplitView + + + _splitViewDocSetInfoSubview + NSView + + + _splitViewDocSetsListSubview + NSView + + + borderedViewAroundSplitView + DVTBorderedView + + + borderedViewBelowTable + DVTBorderedView + + + checkAndInstallNowButton + NSButton + + + docSetInfoTextView + NSTextView + + + downloadsTableViewController + IDEDocDownloadsTableViewController + + + minimumFontSizeControl + NSComboBox + + + noUpdatesAvailableMessage + NSTextField + + + showInfoButton + NSButton + + + subscriptionTextField + NSTextField + + + subscriptionWindow + NSWindow + + + validateAddSubscriptionButton + NSButton + + + + IBProjectSource + ./Classes/IDEDocViewingPrefPaneController.h + + + + IDEEditor + IDEViewController + + IBProjectSource + ./Classes/IDEEditor.h + + + + IDEViewController + DVTViewController + + IBProjectSource + ./Classes/IDEViewController.h + + + + IKImageView + + id + id + id + id + + + + copy: + id + + + crop: + id + + + cut: + id + + + paste: + id + + + + IBProjectSource + ./Classes/IKImageView.h + + + + NSDocument + + id + id + id + id + id + id + + + + printDocument: + id + + + revertDocumentToSaved: + id + + + runPageLayout: + id + + + saveDocument: + id + + + saveDocumentAs: + id + + + saveDocumentTo: + id + + + + IBProjectSource + ./Classes/NSDocument.h + + + + NSDocumentController + + _openRecentDocument: + id + + + _openRecentDocument: + + _openRecentDocument: + id + + + + IBProjectSource + ./Classes/NSDocumentController.h + + + + NSResponder + + _insertFindPattern: + id + + + _insertFindPattern: + + _insertFindPattern: + id + + + + IBProjectSource + ./Classes/NSResponder.h + + + + QLPreviewBubble + NSObject + + id + id + + + + hide: + id + + + show: + id + + + + parentWindow + NSWindow + + + parentWindow + + parentWindow + NSWindow + + + + IBProjectSource + ./Classes/QLPreviewBubble.h + + + + QTMovieView + + id + id + id + id + id + + + + showAll: + id + + + showCustomButton: + id + + + toggleLoops: + id + + + zoomIn: + id + + + zoomOut: + id + + + + IBProjectSource + ./Classes/QTMovieView.h + + + + WebView + + id + id + id + id + + + + reloadFromOrigin: + id + + + resetPageZoom: + id + + + zoomPageIn: + id + + + zoomPageOut: + id + + + + IBProjectSource + ./Classes/WebView.h + + + + XDDiagramView + NSView + + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + + + + _graphLayouterMenuItemAction: + id + + + _zoomPopUpButtonAction: + id + + + alignBottomEdges: + id + + + alignCentersHorizontallyInContainer: + id + + + alignCentersVerticallyInContainer: + id + + + alignHorizontalCenters: + id + + + alignLeftEdges: + id + + + alignRightEdges: + id + + + alignTopEdges: + id + + + alignVerticalCenters: + id + + + bringToFront: + id + + + collapseAllCompartments: + id + + + copy: + id + + + cut: + id + + + delete: + id + + + deleteBackward: + id + + + deleteForward: + id + + + deselectAll: + id + + + diagramZoomIn: + id + + + diagramZoomOut: + id + + + expandAllCompartments: + id + + + flipHorizontally: + id + + + flipVertically: + id + + + layoutGraphicsConcentrically: + id + + + layoutGraphicsHierarchically: + id + + + lock: + id + + + makeSameHeight: + id + + + makeSameWidth: + id + + + moveDown: + id + + + moveDownAndModifySelection: + id + + + moveLeft: + id + + + moveLeftAndModifySelection: + id + + + moveRight: + id + + + moveRightAndModifySelection: + id + + + moveUp: + id + + + moveUpAndModifySelection: + id + + + paste: + id + + + rollDownAllCompartments: + id + + + rollUpAllCompartments: + id + + + selectAll: + id + + + sendToBack: + id + + + sizeToFit: + id + + + toggleGridShown: + id + + + toggleHiddenGraphicsShown: + id + + + togglePageBreaksShown: + id + + + toggleRuler: + id + + + toggleSnapsToGrid: + id + + + unlock: + id + + + + _diagramController + IDEDataModelDiagramEditor + + + _diagramController + + _diagramController + IDEDataModelDiagramEditor + + + + IBProjectSource + ./Classes/XDDiagramView.h + + + + XDTableView + NSTableView + + showAllTableColumns: + id + + + showAllTableColumns: + + showAllTableColumns: + id + + + + IBProjectSource + ./Classes/XDTableView.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..09845a5 --- /dev/null +++ b/iDNA/iDNA/iDNA-Info.plist @@ -0,0 +1,55 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleDocumentTypes + + + CFBundleTypeExtensions + + idna + + CFBundleTypeIconFile + + CFBundleTypeName + DocumentType + CFBundleTypeOSTypes + + ???? + + CFBundleTypeRole + Editor + NSDocumentClass + HVSDocument + + + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIconFile + + CFBundleIdentifier + Pride.${PRODUCT_NAME:rfc1034identifier} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + LSMinimumSystemVersion + ${MACOSX_DEPLOYMENT_TARGET} + NSHumanReadableCopyright + Copyright © 2012 VladIslav Khazov. 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/main.m b/iDNA/iDNA/main.m new file mode 100644 index 0000000..a052ecb --- /dev/null +++ b/iDNA/iDNA/main.m @@ -0,0 +1,14 @@ +// +// main.m +// iDNA +// +// Created by VladIslav Khazov on 23.12.12. +// Copyright (c) 2012 VladIslav Khazov. All rights reserved. +// + +#import + +int main(int argc, char *argv[]) +{ + return NSApplicationMain(argc, (const char **)argv); +} diff --git a/iDNA/mygoaldna.txt b/iDNA/mygoaldna.txt new file mode 100644 index 0000000..eba4e0e --- /dev/null +++ b/iDNA/mygoaldna.txt @@ -0,0 +1 @@ +CCCCTTTTTTTAAACCCGAGGGGGGCTC \ No newline at end of file