2013-04-01から1ヶ月間の記事一覧

UIIDの取得(Objective-C)

■UIID -インストール毎ID、Unique Installation Identiferが公開されている。(MITライセンス) --https://github.com/akisute/UIApplication-UIID ※iOS4.3以降 UIID取得方法 [[UIApplication sharedApplication] uniqueInstallationIdentifier];

MySQLデータベースコピー

mysqldumpコマンドを使用する # mysqldump source_db | mysql destination_db ※ユーザー名とパスワードを指定するには以下。 # mysqldump -u USER -p PASSWORD source_db | mysql destination_db

CakePHPでVirtual Host

NameVirtualHost *:80 <VirtualHost *:80> DocumentRoot "D:/xampp/htdocs" ServerName localhost.example.com </VirtualHost> <VirtualHost *:80> DocumentRoot "D:/xampp/htdocs/○○○/app/○○○" ServerName test-srv.hoge.com <Directory "D:/xampp/htdocs/○○○/app/○○○"> Options Indexes FollowSymLinks Includes ExecCGI …</directory></virtualhost>

画面の幅と高さを取得する(Objective-C)

//取得変数定義 CGFloat disp_w; CGFloat disp_h //画面の幅、高さを取得 CGRect r = [[UIScreen mainScreen] bounds]; disp_w = r.size.width; disp_h = r.size.height; //表示 NSLog(@"disp_w:%f", disp_w); NSLog(@"disp_h:%f", disp_h); ■補足 //ステー…

ラベルの外観(枠、角丸、色)を変更する。(Objective-C)

UILabel* label;label.layer.borderColor = [UIColor blueColor].CGColor;label.layer.borderWidth = 2.0;label.layer.cornerRadius = 8; layer.borderColor:テキストフォーム外枠の色 layer.borderWidth:テキストフォーム外枠の太さ layer.cornerRadius:丸…

数値型と文字列の変換(Objective-C)

数値型から文字列への変換NSString *text;text = [NSString stringWithFormat:@"%d",10]; float x = 1.2345f; // 小数点以下2桁まで NSString *str1 = [NSString stringWithFormat:@"%.2f", x]; // 1.23 // 3桁 NSString *str2 = [NSString stringWithFormat…

UUIDの生成(Objective-C)

- (NSString*) getUUID { //UUIDの生成 CFUUIDRef uuidObj = CFUUIDCreate(nil); NSString *uuidString = (NSString*)CFUUIDCreateString(nil, uuidObj); CFRelease(uuidObj); return [uuidString autorelease]; }