티스토리 툴바


크리에이티브 커먼즈 라이선스
Creative Commons License
맥OS 라이언 버전부터 윈도우의 잘라내기와 비슷한 기능이 제공됩니다.

방법은

1. 라이언 버전
  이동할 파일이나 폴더를 복사( Command + C )한 후  붙여넣을 위치에서 이동( Command + Option + V )을 하게 되면 선택한 파일이나 폴더가 이동을 하게 됩니다.
 
2. 라이언 하위 버전
  라이언 하위 버전에서는 잘라내기 기능이 없기 때문에 써드파티 프로그램 등을 통해서 잘라내기 기능을 사용할 수 있지만 대부분이 유료인 관계로 
 아래와 같이 오토메이터+AppleScript를 사용하여 잘라내기 기능을 추가하여 사용할 수 있습니다.

1. 먼저 아래의 링크에서 파일을 다운로드 받습니다.
 http://jkcnp.googlecode.com/files/CutAndPaste_0.9.1.zip
 
2. 다운로드한 파일의 압축을 풀면 아래와 같이 2개의 파일이 있습니다.

3. 'CutFile.workflow' 파일을 더블클릭하면 Automator가 실행이 되고 아래와 같이 팝업창이 뜹니다.
   - 설치를 클릭합니다.
- 정상적으로 설치가 된 경우 아래와 같이 '설치 완료'창이 뜹니다.


- PasteFile.workflow파일도 위와 똑같이 설치를 해줍니다.
 
4. 이제 Finder에서 잘라내기&붙여넣기에 대한 단축키를 설정합니다. 먼저 '시스템 환경설정'을 엽니다.
 
5. '키보드'를 클릭합니다.

 6. '응용 프로그램 단축키'를 선택한 후 '+' 버튼을 클릭합니다.
 아래와 같이 창이 뜨는데 먼저 '응용 프로그램'에서 'Finder'를 선택하고
 메뉴제목은 아까 설치한 파일명과 똑같이 'CutFile'로 적어줍니다.
 그리고 단축키는 윈하시는 단축키를 설정해주시고 추가를 클릭하시면 
 이제 잘라내기에 대한 단축키가 설정된 것입니다.
 
 
7.  이제 붙여넣기 단축키도 위와 같이 설정을 해주시면 됩니다.
 
8. 아래와 같이 단축키 설정이 되었으면 이제 Finder에서 설정한 단축키를 이용하여
이동할 파일이나 폴더를 설정하신후 이동할 폴더에서 붙여넣기 단축키를 누르시면 잘라내기&붙여넣기 기능이 동작합니다.

 

저작자 표시 비영리 변경 금지
Posted by Only Young - 수신 smok95

댓글을 달아 주세요

  1. Favicon of http://blackturtle.tistory.com BlogIcon 까만거북이 2012/01/20 17:39  댓글주소  수정/삭제  댓글쓰기

    좋은 글 고맙습니다.
    덕분에 큰 도움 되었네요. : )

    제 블로그에 관련글을 적으면서 smok95님의 글을 소개했습니다.
    불편하시다면, 연락 부탁드립니다. :)
    http://blackturtle.tistory.com/711483

    좋은 하루 되세요.

크리에이티브 커먼즈 라이선스
Creative Commons License
출처 : http://stackoverflow.com/questions/133925/javascript-post-request-like-a-form-submit

function post_to_url(path, params, method) {
    method = method || "post"; // Set method to post by default, if not specified.

    // The rest of this code assumes you are not using a library.
    // It can be made less wordy if you use one.
    var form = document.createElement("form");
    form.setAttribute("method", method);
    form.setAttribute("action", path);

    for(var key in params) {
        var hiddenField = document.createElement("input");
        hiddenField.setAttribute("type", "hidden");
        hiddenField.setAttribute("name", key);
        hiddenField.setAttribute("value", params[key]);

        form.appendChild(hiddenField);
    }

    document.body.appendChild(form);
    form.submit();
}



// 사용예) 다음 로그인
post_to_url("https://logins.daum.net/accounts/login.do", {"id":"아이디", "pw":"비밀번호"});





저작자 표시 비영리 변경 금지
Posted by Only Young - 수신 smok95

댓글을 달아 주세요

크리에이티브 커먼즈 라이선스
Creative Commons License


/* AudioToolbox 헤더파일 임포트 ( AudioToolbox.framework 추가해야함.) */

#import <AudioToolbox/AudioToolbox.h>



/***

 *  리스너 함수 (callback함수)

 *

 *  inClientData : 사용자데이터 ( AudioSessionAddPropertyListener에서 4번째 인자값)

 *  inID : AudioSessionAddPropertyListener에서 1번째 인자값으로 현재는 한개의 ID 사용하기 때문에 사용하지 않음

 *  inDataSize : inData 크기

 *  inData : void*형으로 inID 맞는 데이터형으로 캐스팅 필요

 */

void Listener(void *inClientData, AudioSessionPropertyID inID,

                        UInt32 inDataSize, const void *inData)

{

    CFDictionaryRef routeChangeDict = inData;

    UILabel* p = (UILabel*)inClientData;

    

    // kAudioSession_AudioRouteChangeKey_Reason이름에 해당하는 값을 가져온다.

    CFNumberRef routeChangeReasonRef = CFDictionaryGetValue(routeChangeDict, CFSTR(kAudioSession_AudioRouteChangeKey_Reason));

    

    SInt32 routeChangeReason;

    

    CFNumberGetValue(routeChangeReasonRef, kCFNumberSInt32Type, &routeChangeReason);

    

    switch(routeChangeReason)

    {

        case kAudioSessionRouteChangeReason_OldDeviceUnavailable:

        {

            // 헤드셋 분리

            p.text = @"disconnected";

        }break;

        case kAudioSessionRouteChangeReason_NewDeviceAvailable:

        {

            // 헤드셋 연결

            p.text = @"connected";

        }

    }

}


@implementation HeadsetConnectionStateAppDelegate



@synthesize window=_window;


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

{

    // Override point for customization after application launch.

    [self.window makeKeyAndVisible];

    

    

    // 연결상태를 화면에 표시할 레이블 생성

    UILabel* statusLabel = [[UILabel alloc]initWithFrame:self.window.frame];

    [self.window addSubview:statusLabel];

    statusLabel.text = @"unknown";

    

    

    /**

     *  1. 오디오 세션 객체 초기화

     *  오디오 세션을 사용하기 위해서 프로그램 내에서 최초 1 AudioSessionInitialize 호출해 주어야 .

     */

    OSStatus result = AudioSessionInitialize(NULL,NULL,NULL,NULL);

    

    if(result) NSLog(@"AudioSessionInitialize error : %d", (int)result);

    else

    {

        /**

         *  2. 리스너 설정

         *  1번째 인자 : kAudioSessionProperty_AudioRouteChange 값을 설정

         *  2번째 인자 : 이벤트가 발생시 변경사항을 수신받을 리스너(callback)함수 

         *  3번째 인자 : 리스너함수 호출시 전달할 사용자데이터로 현재 예제의 경우에는 statusLabel 설정함.

         */

        result = AudioSessionAddPropertyListener(kAudioSessionProperty_AudioRouteChange, Listener, statusLabel);

        if (result) 

        {

            NSLog(@"AudioSessionAddPropertyListener error : %d", (int)result);

        }

    }

    

    [statusLabel release];

    return YES;

}



- (void)dealloc

{

    [_window release];

    [super dealloc];

}


@end




저작자 표시 비영리 변경 금지
Posted by Only Young - 수신 smok95

댓글을 달아 주세요