본문 바로가기

Development

UINavigationBar 그림자 지우기 [self.navigationController.navigationBar setBackgroundImage:[[UIImage alloc] init] forBarMetrics:UIBarMetricsDefault]; [self.navigationController.navigationBar setShadowImage:[[UIImage alloc] init]]; 더보기
[Scala] Generic function 제네릭과 함수를 같이 사용하는 예제이다. def test [T](text:T) (block:(T) => String): Result = { val resultStr = block(text) Ok(Json.obj("result" -> "SUCCESS","object" -> resultStr)) } 함수 사용하기test("aaaaa") { inputText => "bbbbbbb" } 더보기
이것은 보통 파일의 퍼미션이 서로 다르기 때문입니다.: WordPress에서 업데이트를 하라고 하는데 실패하는 경우는 대부분 권한의 문제가 있기 때문이다.본인은 임시적으로 권한을 777로 주고 업데이트 완료후에 다시 권한을 설정하는 것으로 해결하였다. sudo find . -type f -exec chmod 644 {} +sudo find . -type d -exec chmod 755 {} + 더보기
EC2에 wordpress 설치하기!! httpd 부터 설치 가이드라인 문서이다. 1. http://docs.aws.amazon.com/ko_kr/AWSEC2/latest/UserGuide/install-LAMP.html 2. http://docs.aws.amazon.com/ko_kr/AWSEC2/latest/UserGuide/hosting-wordpress.html 더보기
WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! ssh 접속을 하다가 어떻게 하다보면 꼬여서 아래와 같은 에러가 발생할때까 있다. @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY! Someone could be eavesdropping on you right now (man-in-the-middle attack)! It is also possible that the RSA host key has jus.. 더보기
UITableView Cell Moving Control 보통 아래의 코드로 UITableView의 이동이 가능하도록 만들었다. 그렇지만 특정 Index에 접근을 할 수 없게는 만들수가 없다. - (BOOL)tableView:(UITableView *)tableView canMoveRowAtIndexPath:(NSIndexPath *)indexPath { if (indexPath.row >= [dataList count]) return NO; return YES; } 아래의 메소드를 활용하면 특정 index로 순서가 바뀌지 않도록 방지할 수 있다. - (NSIndexPath *)tableView:(UITableView *)tableView targetIndexPathForMoveFromRowAtIndexPath:(NSIndexPath *)sourceIndexP.. 더보기
typesafe activator 삭제하기 .ivy2 폴더와 .activator 폴더를 삭제하면 된다. 더보기
Duplicate files copied in APK META-INF/notice.txt 안드로이드 프로젝트에서 Spring framework를 사용하려고 실행하니 아래와 같은 오류가 발생하였다. 원인은 notice.txt 파일을 제외시키지 못해서 생기는 문제인 듯하고 이 파일외에도 여러개의 중복되는 파일이 존재하는 듯하다.duplicate files during packaging of APK /Users/myusername/Development/Appname/Appname/Appname/build/apk/Appname-debug-unaligned.apk Execution failed for task ':Appname:packageDebug'. > Duplicate files copied in APK META-INF/notice.txt File 1: /Users/myusername/.grad.. 더보기
인터페이스 빌드에서 커스텀 값 조정 가능하게 만들기 IB_DESIGNABLE@interface CustomButton : UIButton @property (nonatomic, strong) IBInspectable UIColor *buttonBackground; @property (nonatomic, assign) IBInspectable CGFloat cornerRadius; - (void) setButtonBackground:(UIColor *) color { _buttonBackground = color; [self setBackgroundColor:_buttonBackground]; } - (void) setCornerRadius:(CGFloat) cornerRadius { [self.layer setCornerRadius:cornerRadius.. 더보기
[Play Framework2] Json polymorphism Scala에서는 동적으로 Json 으로 변환하기가 힘들다. 그래서 찾은 방법이 trait을 만들어서 상속을 통한 방법이다. trait Person object Person { implicit val shapeWrites = Writes[Person] { person => person match { case student: Student => Json.writes[Student].writes(student) case teacher: Teacher => Json.writes[Teacher].writes(teacher) case parent: Parent => Json.writes[Parent].writes(parent)}} } @Entity@Table (name = "teacher")case class Te.. 더보기