외규장각 도서 환수 모금 캠페인

'2012/11'에 해당되는 글 3건

  1. 2012.11.15 MySql sql 명령어
  2. 2012.11.08 iPhone iPad Model 알아오기
  3. 2012.11.08 UIImagePickerController iPad , iPhone snippet

MySql sql 명령어

잡동사니 2012. 11. 15. 16:55
mysql mac 실행
cd /usr/local/mysql/bin
sudo ./mysql -u root -p

show databases;


use 'databasename';


show tables;


create table 'tablename'( name date-type [aption]);

 -data-type : tinyint | smallint | mediumint | int[unsigned] | integer | bigint | float | double | date | datetime | timestamp | time | year | char(M) | varchar(M) | tinytext | enum('value1','value2') | text | blob | mediumblob | mediumtext | longblob | longtext


- [option] : not null | auto_increment | primary key | etc

Posted by 닉네임영역
,

#import <sys/utsname.h>


struct utsname systemInfo;

    uname(&systemInfo);

    

    NSString *platform = [NSString stringWithCString:systemInfo.machine encoding:NSUTF8StringEncoding];

    

    if ([platform isEqualToString:@"iPhone1,1"]) {

        platform = @"iPhone2G";

    }

    else if ([platform isEqualToString:@"iPhone1,2"]) {

        platform = @"iPhone3G";

    }

    else if ([platform isEqualToString:@"iPhone2,1"]) {

        platform = @"iPhone3GS";

    }

    else if ([platform isEqualToString:@"iPhone3,1"]) {

        platform = @"iPhone4";

    }

    else if ([platform isEqualToString:@"iPhone3,3"]) {

        platform = @"iPhone4(CDMA)";

    }

    else if ([platform isEqualToString:@"iPhone4,1"]) {

        platform = @"iPhone4S";

    }

    

    else if ([platform isEqualToString:@"iPod1,1"]) {

        platform = @"iPod1G";

    }

    else if ([platform isEqualToString:@"iPod2,1"]) {

        platform = @"iPod2G";

    }

    else if ([platform isEqualToString:@"iPod3,1"]) {

        platform = @"iPod3G";

    }

    else if ([platform isEqualToString:@"iPod4,1"]) {

        platform = @"iPod4G";

    }

    

    else if ([platform isEqualToString:@"iPad1,1"]) {

        platform = @"iPad";

    }

    else if ([platform isEqualToString:@"iPad2,1"]) {

        platform = @"iPad2(WiFi)";

    }

    else if ([platform isEqualToString:@"iPad2,2"]) {

        platform = @"iPad2(GSM)";

    }

    else if ([platform isEqualToString:@"iPad2,3"]) {

        platform = @"iPad2(CDMA)";

    }

    else if ([platform isEqualToString:@"iPad3,1"]) {

        platform = @"iPad3(WiFi)";

    }

    else if ([platform isEqualToString:@"iPad3,2"]) {

        platform = @"iPad3(GSM)";

    }

    else if ([platform isEqualToString:@"iPad3,3"]) {

        platform = @"iPad3(CDMA)";

    }

    else if ([platform isEqualToString:@"i386"]) {

        platform = @"Simulator";

    }

    else {

        platform = @"unKnownDevice";

    }

Posted by 닉네임영역
,

UIBarButtonItem *rightButton = [[UIBarButtonItem allocinitWithBarButtonSystemItem:UIBarButtonSystemItemAction target:self action:@selector(rightButtonAction:)];

    self.navigationItem.rightBarButtonItem = rightButton;



iPad

UIImagePickerController *imagePickerController = [[UIImagePickerController alloc] init];

            UIPopoverController *popOver = [[UIPopoverController alloc] initWithContentViewController:imagePickerController];

            popOver.delegate =self;

            

            [popOver presentPopoverFromRect:CGRectMake(self.view.frame.size.width, 0, 0, 0) inView:self.view permittedArrowDirections:UIPopoverArrowDirectionUp animated:YES];



iPhone

- (void)rightButtonAction:(id)sender {

    UIActionSheet *actionSheet = [[UIActionSheet alloc] initWithTitle:@"Select" delegate:self cancelButtonTitle:@"Cancel" destructiveButtonTitle:@"What" otherButtonTitles:nil, nil];

    [actionSheet showInView:self.view];

    [actionSheet release];

}


-(void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex {

    UIImagePickerController *picker = [[UIImagePickerController alloc] init];

    picker.delegate = self;

    switch (buttonIndex) {

        case 0:

        {

            picker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;

            [self presentModalViewController:picker animated:YES];

        }

            break;

            

        default:

            break;

    }

}

Posted by 닉네임영역
,


사랑합니다. 편안히 잠드소서