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.
키워드 : 재생

How to open apps from an unidentified developer in OS X Mountain Lion

How to open apps from an unidentified developer in OS X Mountain Lion
By Allyson Kazmucha, Wednesday, Aug 15, 2012 a 11:27 am

Sunday, May 5, 2013

1080p와 1080i

저마다 다른 ‘풀HD’, 기준이 뭐니
블로터닷넷 2013.05.03
‘풀HD’라는 말은 사실 정확한 규격이 아니다. 애초 하드웨어의 한계를 감추기 위한 용어에 가깝다...결론적으로 화면은 1920×1080i와 1280×720p의 해상도를 일컫는다. 이 해상도의 뒤만 따서 ’1080i’와 ’720p’라고 흔히 부른다. 언뜻 보면 1080i가 더 높은 해상도 같지만 이는 한 번에 540줄씩 홀수 짝수로 나눠서 뿌려주는 방식이고 720p는 계속해서 720줄의 화면을 보여주기 때문에 어떤 게 더 화질이 좋다고는 말하기 어렵다... TV 입장에서 보면 소스 포맷은 분명 1080p가 맞다. 그런데 송출하는 영상은 1080i다. 이걸 풀HD로 업스케일링하는 것인데, TV에 전송되는 영상은 분명 풀HD가 맞다. MP3 파일을 CD 포맷으로 바꿔 구운 것과 비슷하다.
키워드 : TV

Saturday, April 13, 2013

OS X 에서 Notes 가 저장된 위치

Notes 의 데이터는
~/Library/Containers/com.apple.Notes/Data/Library/Notes/NotesV1.storedata
같은 이름의 파일에 저장되어 있다.
Where does OS X Mountain Lion store Notes data?

Finder 의 파일명 폰트 크게 하는 법

Finder 에서 command + J (View » Show View Options) 해서 폰트 사이즈를 키워준다.
(폰트 크기는 16 까지 키울 수 있음)
"Use as defaults" 를 해준다.
키워드 : Set a larger font size for the Finder's various views