'분류 전체보기'에 해당되는 글 333건

  1. 2014.03.22 mint linux, ssh 활성화
  2. 2014.03.13 [git] 파일 하나만 다른 브런치로부터 가져오기
  3. 2014.03.05 [git] 파일 하나만 전의 리비전으로 되돌리기
  4. 2014.03.05 [git] 다른 브랜치의 파일 비교하기
  5. 2014.03.03 [objc] Appirater, 앱평가 알림 라이브러리
  6. 2014.03.02 [shellscript] 디렉토리 안의 파일 보기
  7. 2014.03.01 [shellscript] parameter
  8. 2014.03.01 [linux] 파일 찾기, find
  9. 2014.03.01 [shellscript] 기본 문법
  10. 2014.03.01 [shellscript] Hello World
  11. 2014.02.28 [TerminalIDE] vim
  12. 2014.02.28 [Python][TerminalIDE][Android] TerminalIDE(android)에서 Python 사용하기
  13. 2014.02.28 [app] 안드로이드에서 개발환경을 만든다! Termianl IDE
  14. 2014.02.27 [python] window mp3player lib
  15. 2014.02.26 [objc] NSDate 날짜비교
  16. 2014.02.26 [objc] singleton, sharedInstance, 싱글톤
  17. 2014.02.25 [objc] #define 대신에 const를 써보자
  18. 2014.02.25 [objc] property 있는데 셀렉터 없다고 하면서 죽을 때
  19. 2014.02.25 [firefox] 파이어폭스 속도 향상
  20. 2014.02.25 [firefox] 설정 초기화
  21. 2014.02.24 [objc] 디바이스가 iPhone5s인가 체크, device model
  22. 2014.02.20 [objc] xib와 커스텀 UIView 만들기
  23. 2014.02.19 [pod] pod가 문제를 일으킬 때
  24. 2014.02.18 [c] c style array
  25. 2014.02.18 [git] git, 리모드 브랜치부터 새로운 로컬브랜치를 생성
  26. 2014.02.07 [objc] 본문에 이미지 포함시키기, 본문보다 이미지를 앞에 위치시키고 싶을때
  27. 2014.02.01 Unity3D, 회전하는 지구와 달 만들기
  28. 2014.01.17 [objc] push 메세지를 클릭해서 앱을 실행시킬 경우
  29. 2014.01.17 [objc] UTC시간 관련
  30. 2014.01.14 Test

mint linux, ssh 활성화

etc 2014. 3. 22. 12:37



http://linuxg.net/how-to-enable-ssh-on-linux-mint-15-14-13-12/

Posted by tenn
,





git checkout [branch_name] -- [filename]





http://stackoverflow.com/questions/2364147/how-to-get-just-one-file-from-another-branch

Posted by tenn
,




git checkout HEAD path/to/file.txt


git checkout [commit revision] [file name]


http://stackoverflow.com/questions/2733873/reverting-a-single-file-to-a-previous-version-in-git

Posted by tenn
,




git diff --name-status branch1..branch2


git difftool branch1:config/environment.rb branch2:config/environment.rb



http://blog.firsthand.ca/2011/05/compare-git-branches-compare-two-files.html



Posted by tenn
,







static NSString *_appId = @"593799029";

// 경고창이 표시될때까지의 날짜

static double _daysUntilPrompt = 5;

// 경고창이 표시될때까지의 기동회수

static NSInteger _usesUntilPrompt = 20;

//특정의 조건으로 경고창을 표시하고 싶을 때

static NSInteger _significantEventsUntilPrompt = -1;

// 나중에 를 선택했을 경우, 몇일후 경고창을 재표시할것인가를 지정

static double _timeBeforeReminding = 1;

//YES를 할 경우 매번 경고창을 표시

static BOOL _debug = NO;



http://programming-ios.com/objective_c-appirater-alert/

Posted by tenn
,


for f in `ls`; do

  echo "File -> $f"

done

http://superuser.com/questions/31464/looping-through-ls-results-in-bash-shell-script

Posted by tenn
,


* 쉘스크립트이름 : $0

* 파라메터 개수 : $#

-> 파라메터에 *를 사용하면, 자동으로 해당파일 이름들로 변환된다.

-> *.txt를 파라메터로 했을 때, txt파일이 5개 있다면 $#의 값은 5가된다.


* 파라메터 :  $0〜$n



if [ "$#" -eq 0 ]

// 파라메터가 없을 때



http://blog.naver.com/PostView.nhn?blogId=eleexpert&logNo=140125262113










Posted by tenn
,

[linux] 파일 찾기, find

etc 2014. 3. 1. 17:30



** 파일이름으로 검색

하위디렉토리 까지 찾아줌


find . -name '*.sh'


find






Posted by tenn
,


*** if


x=10

if [ $x = 10 ]; then

        echo 10

else

        echo not 10

fi

※띄어쓰기 주의




*** For

#!/bin/bash


for i in 1 5 10; do
    echo $i
done



for((i=10;i>0;i--));do

        echo $i

done




*** 문자 포함


string='My string';


if [[ $string == *My* ]]

then

  echo "It's there!";

fi


http://stackoverflow.com/questions/229551/string-contains-in-bash


*** 참고할만한

http://webtn.tistory.com/33








Posted by tenn
,


hello.sh

#!/bin/bash


echo "Hello World"





$ chmod +x

$ ./hello.sh

Hello World

$



Posted by tenn
,

[TerminalIDE] vim

etc 2014. 2. 28. 10:21

이동


h : left

j  : down

k : up

l : right

Posted by tenn
,




설치 및 환경설정

http://kazy.hatenablog.com/entry/2012/11/17/023310


python3의 경우, 설정파일

https://code.google.com/p/python-for-android/source/browse/python3-alpha/python3-src/standalone.sh




미확인...

Posted by tenn
,


https://play.google.com/store/apps/details?id=com.spartacusrex.spartacuside&hl=en




git도 되고

vim도 되고

자바도 되고

심심할 일은 없겠다.

Posted by tenn
,


https://pypi.python.org/pypi/mp3play/#downloads

Posted by tenn
,

[objc] NSDate 날짜비교

iPhone 2014. 2. 26. 14:54







if ([date1 compare:date2] == NSOrderedDescending){


}



* NSOrderedSame : 같을때

* NSOrderedDescending :  date1가 date2보다 이후

* NSOrderedAscending :  date1이 date2보다 이전






http://stackoverflow.com/questions/5965044/how-to-compare-two-nsdates-which-is-more-recent

Posted by tenn
,





+ (ClassType*)sharedInstance{

      static ClassType *instance;

static dispatch_once_t predicate;

dispatch_once(&predicate, ^{

instance = [[ClassType alloc] init];

});

return instance;

}




Posted by tenn
,

http://www.objectivec-iphone.com/introduction/const/define-const.html

Posted by tenn
,



property 선언을 메소드 선언 뒤에서 하면 안된다...

Posted by tenn
,



url 입력창     about:config


network.http.pipelining       false -> true




앱캐시를 켜는 듯??


http://firefoxinside.tistory.com/31

Posted by tenn
,

[firefox] 설정 초기화

etc 2014. 2. 25. 11:58

파이어폭스 설정 초기화


① url 입력창에 about:support 입력

② reset firefox 클릭




http://blog.creation.net/530

Posted by tenn
,

#import <sys/sysctl.h>


    size_t size;

    sysctlbyname("hw.machine"NULL, &size, NULL0);

    char *machine = malloc(size);

    sysctlbyname("hw.machine", machine, &size, NULL0);

    NSString *platform = [NSString stringWithUTF8String:machine];

    free(machine);

    

//iPhone5s의 경우,  platform이"iPhone6"


//angeOfString:@"iPhone6"].location != NSNotFound  <- 이렇게 체크





* iPod5th : iPod5,1

* iPhone4 : iPhone3,1

* iPhone4S : iPhone4,1

* iPhone5 : iPhone5,2

* iPhone5s : iPhone6,1



Posted by tenn
,


1. UIView를 계승한 클래스 만듦.


2. xib만듦


3. UIView에.. 추가


+ (id)customView

{

    CustomView *customView = [[[NSBundle mainBundleloadNibNamed:@"xibview" owner:nil options:nillastObject];

    

    // make sure customView is not nil or the wrong class!

    if ([customView isKindOfClass:[CustomView class]])

        return customView;

    else

        return nil;

}


4. xib의 Custom Class에 CustomView지정.


5. 사용



CustomView *cView = [CustomView customView];




Posted by tenn
,



http://stackoverflow.com/questions/21474536/podfile-gives-an-error-on-install

Posted by tenn
,

[c] c style array

iPhone 2014. 2. 18. 23:01




   int array[10];

    

    for(int i=0;i<10;i++){

        array[i] = 0;

        NSLog(@"%d", array[i]);

    }

    

    for(int i=0;i<10;i++){

        array[i] = i;

        NSLog(@"%d", array[i]);

    }


Posted by tenn
,



git checkout -b test origin/test




http://stackoverflow.com/questions/1783405/git-checkout-remote-branch

Posted by tenn
,

메일 타입을 HTML로 해서


이미지 데이터를 포함시킨다.

NSData *imageData = UIImageJPEGRepresentation(myImage, 1.0f);
NSString *encodedString = [imageData base64Encoding];
[emailBody appendString:[NSString stringWithFormat:@"<p><b><img src='https://t1.daumcdn.net/cfile/tistory/275C1D4656E67CA00C",encodedString]];

http://stackoverflow.com/questions/14859463/how-to-send-image-in-email-body

Posted by tenn
,



** 지구와 달이 될 오브젝트를 생성

Shphere를 2개 생성해서 배치


** Texture입히기

지구와 달에 입힐 이미지를 프로젝트에 추가후, 오브젝트에 드래그&드롭


** 그룹핑

달을 지구주위로 돌게 하기 위해, 달 오브젝트를 지구 오브젝트에 드래그&드롭


** 스크립팅

자바스크립트 생성.

자전하는 코드를 작성.

달은 지구에 속해있으므로 공전된다.


#pragma strict

var speed:float;

function Start () {

}

function Update () {
    
    var direction = -1;

    this.transform.Rotate(Vector3.up * direction * speed *Time.deltaTime);   
}



** 스크립트 적용

지구오브젝트와 달 오브젝트에 각각 스크립트를 적용.


** 속도 조절

Script의 speed의 수치를 조절




참고

http://www.youtube.com/watch?v=PQA80_J2-OQ


Posted by tenn
,


push 메세지를 클릭해서 앱을 실행시킬경우

두가지 경우에 대해 처리를 해주어야 한다.



1. 앱이 기동하지 않은 경우.


ApplicationDelegate의

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions

메소드가 불린다.

launchOptions에 푸시메세지에서 설정한 정보를 얻을수 있다.


2. 앱이 기동하여 백그라운드에 있는경우.


-(void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo

메소드가 불린다.

userInfo에 푸시에서 설정한 정보를 얻을수 있다.

앱이 포어그라운드에 있을 경우에도 핸들링이 되므로, 

푸시를 누를 경우에만 이벤트를 핸들링 하고 싶을 경우.

[application applicationState]을 조건으로 추가해주면 된다.




Posted by tenn
,

[objc] UTC시간 관련

iPhone 2014. 1. 17. 18:04


-(NSString *)getUTCFormateDate:(NSDate *)localDate

{

    NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];

    NSTimeZone *timeZone = [NSTimeZone timeZoneWithName:@"UTC"];

    [dateFormatter setTimeZone:timeZone];

    [dateFormatter setDateFormat:@"yyyy-MM-dd hh:mm:ss"];

    NSString *dateString = [dateFormatter stringFromDate:localDate];

    return dateString;

}



"yyyy-MM-dd HH:mm:ss"

로 하면, 12시간 표시로 할 경우

로컬라이즈된 오전, 오후 표시가 된다.


Posted by tenn
,

Test

2014. 1. 14. 20:31

보호되어 있는 글입니다.
내용을 보시려면 비밀번호를 입력하세요.