Wednesday, July 31, 2013

VLC등에서 옛날 avi를 플레이할때 ghost가 보이는 현상 해결법

Wondershare player 사용하면 됨
(Damaged and Cannot be Opened FIX 설정해주고 쓰면 됨)

참고로 옛날 avi 가 툭툭 끊어지며 재생되는 현상이 있을 경우 MPlayerX 를 쓰면 재생이 잘되는 경우가 있음

키워드 : old, 동영상, 깨지는 현상, 고스트

Mountain Lion: Damaged and Cannot be Opened FIX

Top 4 AVI Players for Mac

Top 4 AVI Players for Mac
NO 1. How to Play AVI in Mac: Video Converter for Mac
NO 2. Download AVI player for Mac - Wondershare Player
NO 3. QuickTime + Perian
NO 4. Download AVI player for Mac — Mplayer

Saturday, July 20, 2013

OS X에서 다이얼로그 박스 버튼들을 tab 키로 옮겨다니는 방법

디폴트로는 탭이 안먹히는데 Preference 에서 다음과 같이 해주면 된다.


링크 : Use the Tab Key to Switch Between Dialog Buttons in Mac OS X

Friday, July 5, 2013

AppleScript에서의 \r과 \n

AppleScript에서의 carriage return 과 line feed 는
각각 return, linefeed 로 쓰면 된다

예)
set str to "My name is " & linefeed & "Babo"

Saturday, June 29, 2013

Tuesday, June 11, 2013

mountain lion hanging when wake from sleep

mountain lion hanging when wake from sleep

Mountain Lion won't wake up after an extended sleep
The current workarounds are:
Disable hibernate mode.
Disable standby mode.

Mountain Lion can’t Wake Up from Slumber
SEPTEMBER 5, 2012

Troubleshooting system sleep in OS X
1. Disconnect or disable peripherals
2. Reset the power manager
3. Remove the sleep image file
$ sudo rm /private/var/vm/sleepimage

Monday, June 10, 2013

.DS_Store already exists

"The operation can't be completed because an item with the name .DS_Store already exists"
이런 error message 가 뜨면서 외장하드에 카피가 안될 경우 임시 해결법

터미널에서
cp -r 소스폴더 타겟폴더
명령으로 하면 잘 된다.

근본적인 것은 OS 차원에서 문제 수정이 되어야 할듯.
키워드 : copy
출처 : https://discussions.apple.com/thread/4506193?start=0&tstart=0

OS X Finder 에서 hidden file 표시하기

터미널에서 다음을 실행하고
$ defaults write com.apple.Finder AppleShowAllFiles YES
Finder 를 Relaunch 함
출처 : Show hidden files Mac OS X 10.7 Lion and 10.8 Mountain Lion

Friday, June 7, 2013

OS X 에서 외장하드가 eject 안될때 해결법

The volume cannot be ejected because it is currently in use 메시지가 뜰때 해결법
Option + Command + Esc 해서 Finder 를 Relaunch 한다
출처 : The volume cannot be ejected because it is currently in use
키워드 : 파인더, 추출, external hard drive

Tuesday, May 21, 2013

Perl 에서 hash 의 element 수 구하기

 print scalar(keys %h);  
출처 : How can I find the number of elements in a hash?

Perl 에서 array 복사하기

다음과 같은 대입문은 어레이를 copy 즉 duplicate 함.
      my @a = (1, 2, 3, 4, 5);  
      my @b = @a;  
      for(my $i = 0; $i < scalar(@b); $i = $i + 1)  
      {  
           $b[$i] = $b[$i] + 100;  
      }  
      printArray(\@a);  
      printArray(\@b);  

Monday, May 20, 2013

Perl 에서 array 를 함수의 reference 로 pass 하는 법

 my @a = (10, 20, 30);  
 foo(\@a);  
 sub foo  
 {  
      my $pa = shift;  
      my @a = @$pa;  
      for(my $i = 0; $i < @a; $i = $i + 1)  
      {  
           print "$a[$i]\n";  
      }  
 }  

Sunday, May 19, 2013

Perl 의 array 에서 특정 value 가 element 에 존재하는지 체크하는 법

      my @a = ("A", "B", "C");  
      if(grep(/A/, @a))  
      {  
           print "found it\n";  
      }  
      else  
      {  
           print "Coudn't find it\n";  
      }  
키워드 :exists
참고링크 : How can I check if a Perl array contains a particular value?

Perl 에서 hash 를 sort 하는 법

여기 참조 : Perl 에서 hash 를 print 하는 법
sort 할때의 비교문
integer 로서 비교할 때는 <=> 를 사용하고
string 으로서 비교할 때는 cmp 를 사용한다.

Perl 에서 hash 를 함수의 reference 로 pass 하는 법

여기 참조 : Perl 에서 hash 를 print 하는 법

Perl 에서 hash 를 print 하는 법

 sub printHash_stringKey  
 {  
      my $v = shift;  
      my @keys = sort {$a cmp $b} keys %$v;  
      foreach my $key (@keys)  
      {  
           print "$key: $v->{$key}\n";  
      }  
 }  
 sub printHash_intKey  
 {  
      my $v = shift;  
      my @keys = sort {$a <=> $b} keys %$v;  
      foreach my $key (@keys)  
      {  
           print "$key: $v->{$key}\n";  
      }  
 }  
호출은 printHash(\%hash); 와 같이 하면 됨


Value 로 sort 하는 방법
 sub sortHashByValue  
 {  
      my $hash = shift;  
      my @keys = sort {$hash->{$b} <=> $hash->{$a}} keys %$hash;  
      foreach my $key (@keys)   
      {   
           print "$key: $hash->{$key}\n";  
      }  
 }  

Thursday, May 16, 2013

SlowMp3

Slow Mp3
MP3를 느리게 플레이해주는 어플리케이션
Slow MP3 is a musician's music player. It can slow down, transpose and transcribe songs on the fly. Need to learn a song in a different key from the original? No problem. Want to play a fast solo part over and over again, in half speed? Can do. Cannot identify a chord? Slow MP3 will show the notes to you.
키워드 : 재생