달력

3

« 2024/3 »

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31

'Tip & Tips'에 해당되는 글 33

  1. 2011.01.17 Mac에서 Windows 공유 폴더 연결하기
  2. 2010.12.25 Virtual Box 4.0 Released 1
  3. 2009.09.07 PNG File 에 대한 간략 정리
  4. 2009.07.18 Twitter API 사용하기 1
2011. 1. 17. 00:12

Mac에서 Windows 공유 폴더 연결하기 Tip & Tips2011. 1. 17. 00:12

그동안 손을 대지 않았던 Mac book을 오래 간만에 손을 대었다.  집에 새로 설치한 3TB짜리 NAS를 이용하기 싶은데, 갑자기 어떻게 이용해야 할지 생각이 나지 않아서 또 이리저리 열어보고 만져보다가 겨우 찾아 내었다. 아니 이렇게 고민할 필요는 없었는데 필요 이상의 시간을 낭비했다.

이를 연결하는 것은 의외로 너무나 간단하다.
Finder를 열고, 아래 이미지의 왼쪽 중간에 보이는 "공유"라는 항목을 클릭을 하면 네트워크 상으로 연결되어져 있는 PC들이 보이게 된다. 나의 경우는 최근에 구매한 노트북 한대와 NAS가 보여지는데, 연결하고자 하는 기기를 선택하고, 사용자 인증을 거치면 공유 폴더들이 보여지게 된다.
사용하는 방법은 윈도의 공유 폴더의 이용 방법과 동일하다. 보안을 위해서 계정과 암호는 반드시 설정하는 것이 좋다.  
:
Posted by 행복상자
2010. 12. 25. 17:25

Virtual Box 4.0 Released Tip & Tips/VirtualBox2010. 12. 25. 17:25

내가 Virtual Box를 블로그를 통해서 소개한지 꽤 오랜 시간이 지났다.
가상화와 관련된 제품들이 많이 나오고, 또 앞으로도 유용하게 사용될 것이라는 점에 대해서는 크게 의심하지 않는 바이다.

내가 이 제품에 대해서 관심을 갖게 된 이유로는 무료로 사용할 수 있으면서도 기능과 버전이 빠르게 올라갈 만큼 사용자가 원하는 기능들을 지속적으로 개발해 나가고 있었기 때문이다. 더군다나 메뉴와 도움말을 한글로 지원하기까지 했다.

이 제품은 원래는 Sun에서 개발하던 제품이었는데, 오라클로 합병하면서 오라클에서 제공하던 오라클 VM 서버 제품군과 중복이 되어서, 추가 개발이 이루어 지지 않을지 걱정했었다. 선과 오라클과의 합병은 개인적으로는 별로 바람직한 방향이 아니고, 단지 비즈니스적으로 주도권을 유지하는 측면으로만 진행될거라 예상했고, 실제로 이러한 우려와 예측은 틀리지 않았다.

이러한 와중에서 며칠전, 지난 12월 22일자로 Virtual Box의 새로운 버전인 4.0 버전이 Release 된것은 굉장히 놀라운 소식이었다.

4.0 버전으로 릴리스 하면서, 추가된 기능과  변경되 몇가지 주요 Feature들은 다음과 같다.

1) File Location 
   - VirtualBox의 Configuration 파일들과 disk 이미지 파일들이 다른 위치(폴더)에서
      관리되었으  나, 4.0에서는 동일한 디렉토리에 저장된다.
   - 기본 Configuration 파일의 확장자가 XML로 관리되었는데, 4.0 에서는 vbox로 변경되었다.
      그러나 내용은 이전과 동일하다.
   - 기본 저장 위치도 이전에는 .VirtualBox 였으나, VirtualBox VMs로 바뀌게 되었다.
      (윈도우즈 계열 OS의 사용자 Profile 디렉토리 아래 저장)
2) User Interface 변경
   - Virtual Machine 설정 화면이 좀더 사용성 있게 바뀌었고 실행되고 있는 또는 저장되어 있는
     이미지에 대한 Preveiw 기능이 들어갔다.
3) 아이콘을 통한 VM 이미지 실행하기
   - 실행을 하기 원하는 OS의 이미지를 바탕화면에서 실행할 수 있도록 아이콘을 생성해 준다.
4) Virtua 이미지 쉽게 삭제하기
   - 이지미 삭제시, 이와 관련된 이미자와 Confituration 파일들을 클릭 한번에 모두 삭제해 준다.
5) 네크워크 Boot와 가상 H/W 칩셋 설정하기
   - 네트워크 Booting을 지원하며, H/W에 대한 칩셋 종류에 대해서 설정 가능하다.
6) 더 많은 Host OS의 메모리의 할 당이 가능하다.
   - 초기의 VirtualBox 버전들에서는 1.5Gbyte 이상의 메모리 할당이 어려웠으나, 4.0에서는
     그 이상의 할당이 가능하다. 만약 32bit OS의 윈도우 7에서 할당한다면, 3Gbyte까지 가능.
7) Open Virtualization Format Archive (OVA) 지원
   - OVA 파일 포맷으로 Import/Export 가 가능하다. VmWare에서 생성한 파일의 사용 가능함.

그리고, 아래는 이번에 Release 된 VirualBox 4.0의 릴리즈 로그이다. 더 많은 변경 사항들은 아래 로그를
확인할 수 있다.

VirtualBox 4.0.0 (released 2010-12-22)

This version is a major update. The following major new features were added:

  • Reorganization of VirtualBox into a base package and Extension Packs; see chapter 1.5, Installing VirtualBox and extension packs, see the manual for more information
  • New settings/disk file layout for VM portability; see chapter 10.1, Where VirtualBox stores its files, see the manual for more information
  • Major rework of the GUI (now called “VirtualBox Manager”):
    • Redesigned user interface with guest window preview (also for screenshots)
    • New “scale” display mode with scaled guest display; see chapter 1.8.5, Resizing the machine’s window, see the manual for more information
    • Support for creating and starting .vbox desktop shortcuts (bug #1889)
    • The VM list is now sortable
    • Machines can now be deleted easily without a trace including snapshots and saved states, and optionally including attached disk images (bug #5511; also, VBoxManage unregistervm --delete can do the same now)
    • Built-in creation of desktop file shortcuts to start VMs on double click (bug #2322)
  • VMM: support more than 1.5/2 GB guest RAM on 32-bit hosts
  • New virtual hardware:
    • Intel ICH9 chipset with three PCI buses, PCI Express and Message Signaled Interrupts (MSI); see chapter 3.4.1, “Motherboard” tab, see the manual for more information
    • Intel HD Audio, for better support of modern guest operating systems (e.g. 64-bit Windows; bug #2785)
  • Improvements to OVF support (see chapter 1.12, Importing and exporting virtual machines, see the manual for more information):
    • Open Virtualization Format Archive (OVA) support
    • Significant performance improvements during export and import
    • Creation of the manifest file on export is optional now
    • Imported disks can have formats other than VMDK
  • Resource control: added support for limiting a VM’s CPU time and IO bandwidth; see chapter 5.8, Limiting bandwidth for disk images, see the manual for more information
  • Storage: support asynchronous I/O for iSCSI, VMDK, VHD and Parallels images
  • Storage: support for resizing VDI and VHD images; see chapter 8.21, VBoxManage modifyhd, see the manual for more information.
  • Guest Additions: support for multiple virtual screens in Linux and Solaris guests using X.Org server 1.3 and later
  • Language bindings: uniform Java bindings for both local (COM/XPCOM) and remote (SOAP) invocation APIs

In addition, the following items were fixed and/or added:

  • VMM: Enable large page support by default on 64-bit hosts (applies to nested paging only)
  • VMM: fixed guru meditation when running Minix (VT-x only; bug #6557)
  • VMM: fixed crash under certain circumstances (Linux hosts only, non VT-x/AMD-V mode only; bugs #4529 and #7819)
  • GUI: add configuration dialog for port forwarding in NAT mode (bug #1657)
  • GUI: show the guest window content on save and restore
  • GUI: certain GUI warnings don’t stop the VM output anymore
  • GUI: fixed black fullscreen minitoolbar on KDE4 hosts (Linux hosts only; bug #5449)
  • BIOS: implemented multi-sector reading to speed up booting of certain guests (e.g. Solaris)
  • Bridged networking: improved throughput by filtering out outgoing packets intended for the host before they reach the physical network (Linux hosts only; bug #7792)
  • 3D support: allow use of CR_SYSTEM_GL_PATH again (bug #6864)
  • 3D support: fixed various clipping/visibility issues (bugs #5659, #5794, #5848, #6018, #6187, #6570)
  • 3D support: guest application stack corruption when using glGetVertexAttrib[ifd]v (bug #7395)
  • 3D support: fixed OpenGL support for libMesa 7.9
  • 3D support: fixed Unity/Compiz crashes on natty
  • 2D Video acceleration: multimonitor support
  • VRDP: fixed rare crash in multimonitor configuration
  • VRDP: support for upstream audio
  • Display: fixed occasional guest resize crash
  • NAT: port forwarding rules can be applied at runtime
  • SATA: allow to attach CD/DVD-ROM drives including passthrough (bug #7058)
  • Floppy: support readonly image files, taking this as the criteria for making the medium readonly (bug #5651)
  • Audio: fixed memory corruption during playback under rare circumstances
  • Audio: the DirectSound backend now allows VMs to be audible when another DirectSound application is active, including another VM (bug #5578)
  • EFI: support for SATA disks and CDROMs
  • BIOS: reduce the stack usage of the VESA BIOS function #4F01 (Quake fix)
  • OVF/OVA: fixed export of VMs with iSCSI disks
  • Storage: Apple DMG image support for the virtual CD/DVD (bug #6760)
  • Linux host USB support: introduced a less invasive way of accessing raw USB devices (bugs #1093, #5345, #7759)
  • Linux hosts: support recent Linux kernels with CONFIG_DEBUG_SET_MODULE_RONX set
  • Guest Additions: Shared Folders now can be marked as being auto-mounted on Windows, Linux and Solaris guests
  • Linux Additions: Shared Folders now support symbolic links (bug #818)
  • Linux Additions: combined 32-bit and 64-bit additions into one file
  • Windows Additions: automatic logon on Windows Vista/Windows 7 is now able to handle renamed user accounts; added various bugfixes

:
Posted by 행복상자
2009. 9. 7. 23:11

PNG File 에 대한 간략 정리 Tip & Tips2009. 9. 7. 23:11


최근에 아는 지인과 이야기 하다가, PNG 파일의 변환 이야기가 나왔다. 하고 있는 일이 있는데, 몇가지 풀리지 않는 이미징 프로세싱상의 문제점이었는데, 나의 호기심을 자극하였다.

내가 그동안 알고 있는 PNG파일에 대한 내용은
1. 라이센스가 없다.
2. R,G,B 와 알파 채널을 제공한다.
이것이 전부이다. 그래서, 쉽게 쓰고, 편하게 쓰자 였다.

요즘 왠만한 웹사이트와 개발되는 프로그램들은 PNG파일들을 대부분 기본으로 지원하고 있다. 이는 개발툴과 Application 기본적으로 지원하고 있다는 말이다.  iPhone에서도 기본 이미지는 png 파일을 이용해서 메뉴 아이콘을 구성하고 있다.

관련 자료들은 내가 잘 이용하는 위키디피아에서 찾아 보았다.
PNG파일데 대한 다음 링크를 브라우져에서 열어보면, 아래와 같은 목차가 나타난다.


세부 사항들은 위에서 각 링크를 찾아 보면 되고, 간략하게 PNG파일에 대해서 요약하면,
PNG 는 Potalble Network Graphics의 약자로, 무손실 데이터 압축을 사용하는 비트맵 이미지 포맷이다. PNG는 GIF 포맷을 개선하고, 대체하기 위해 만들어진 포맷으로 파일 포맷에 대한 라이센스를 필요로 하지 않는다. PNG는 palette기반의 24bit RGB color와 greyscale RGB 그리고 RGBA (알파체널을 포함한 RGB) 이미지들을 지원한다.
그리고, 이 파일 포맷은 인터넷상에서 전송을 위한 목적으로 설계되었기 때문에, 전문 적인 디자인을 위한 CMYK와 같은 color space는 제공하지 않고 있다.

마지막으로 PNG 파일은 "PNG" 또는 "png" 확장자로 사용되고, 인터넷에서 주로 사용하고 있는 Mine media type으로는 "image/png" 로 정의해서 사용한다.

PNG file의 헤더는 8 byte로 되어 있다. (필드의 세부 내용은 아래 참조)
Bytes Purpose
89 Has the high bit set to detect transmission systems that do not support 8 bit data and to reduce the chance that a text file is mistakenly interpreted as a PNG, or vice versa.
50 4E 47 In ASCII, the letters "PNG", allowing a person to identify the format easily if it is viewed in a text editor.
0D 0A A DOS style line ending (CRLF) to detect DOS-UNIX line ending conversion of the data.
1A A byte that stops display of the file under DOS when the command type has been used—the end-of-file character
0A A UNIX style line ending (LF) to detect UNIX-DOS line ending conversion.



PNG 파일을 사용하는 .Net Framework의 예제는 아래와 같다.
(물론 여러 툴에서 각각 UI 에서 지원하기 위한 클래스와 API가 있지만, 단지 내가 좋아하는 VB를 좋아하기 때문에 예제도 MSDN에서 찾아 보았다.)

다음 링크를 따라 가면, 2개의 예제가 있다.

사용하는 예제는 무척 간단한다. Encode 또는 Decode 클래스를 이용하면되는데, 기본적인 사용법을 알아두면, GIF 나 JPEG 의 Encode 또는 Decode 클래스를 쉽게 이용할 수 있다.

[PNG Image를  Decodeing 하는 예제]
' Open a Stream and decode a PNG image
Dim imageStreamSource As New FileStream("smiley.png", FileMode.Open, FileAccess.Read, FileShare.Read)
Dim decoder As New PngBitmapDecoder(imageStreamSource, BitmapCreateOptions.PreservePixelFormat, BitmapCacheOption.Default)
Dim bitmapSource As BitmapSource = decoder.Frames(0)

' Draw the Image
Dim myImage As New Image()
myImage.Source = bitmapSource
myImage.Stretch = Stretch.None
myImage.Margin = New Thickness(20)

[PNG Image를  Encodeing 하는 예제]
Dim width As Integer = 128
Dim height As Integer = 128
Dim stride As Integer = width
Dim pixels(height * stride) As Byte
' Define the image palette
Dim myPalette As BitmapPalette = BitmapPalettes.Halftone256
' Creates a new empty image with the pre-defined palette
Dim image As BitmapSource = System.Windows.Media.Imaging.BitmapSource.Create( _
width, height, 96, 96, PixelFormats.Indexed8, myPalette, pixels, stride)
Dim stream As New FileStream("new.png", FileMode.Create)
Dim encoder As New PngBitmapEncoder()
Dim myTextBlock As New TextBlock()
myTextBlock.Text = "Codec Author is: " + encoder.CodecInfo.Author.ToString()
encoder.Interlace = PngInterlaceOption.On
encoder.Frames.Add(BitmapFrame.Create(image))
encoder.Save(stream)


:
Posted by 행복상자
2009. 7. 18. 13:10

Twitter API 사용하기 Tip & Tips2009. 7. 18. 13:10

아래 글을 사실 몇 주전에 Twitter API를 분석하기 위해서, 정리하던 자료로 Google Docs로 만들었던 자료의 일부이다. 실제로는 Twitter API 를 이용하여 개발을 할때는 자기가 원하는 언어와 툴을 사용하여 개발을 할 수 있도록, 문서들을 제공하고 있지만 자신이 자신있는 개발언어와 코드를 보면 더 쉽게 이해할 수 있을 것이다. 

개인적으로는 google app engine에 올릴 작은 서비스를 만들기 위해서 Java 라이브러리를 찾았는데, 그때 정리했던 자료인데, 별로 도움이 안 될거 같아서 그냥 지울까하다가 Blog에 올린다.

[간략히 정리한 자료]
Twitter API는 두개의 파트로 구성되어 있다. 이는 역사적이 이유때문인데, 회사의 사명이 바뀌고 Rebranding되었기 때문이다.
    - REST API, Search API => 향후에도 분리된 형태로 남을 것이다.
 
The Twitter REST API:
    - 개발자들이 Twitter core data로 접근이 가능하다.
        . update timelines, status data and user infomation
The Search API:
    - 개발자들이 Twitter Search와 Trands data의 기능의 사용할 수 있도록 해준다.
 
Rate limiting
    - Twitter API는 clients가 주어진 사간에서 제한된 수의 Calls을 만들수 있도록 허락하고
    - 이러한 정책은 두종류의 API들을 통해서 다른 방법으로 적용된다.
 
REST API Rate Limiting
    - REST API 는 시간당 100개의 requests의 기본적인 제한을 가지고 있다.
    - account and IP-based rate limitig을 가지고 있고
    - HTTP Post 를 이용하여 Twitter에게 데이터를 전송하는 경운는 제약이 없다. 
        . statuses/update 와 같을 경우에....
 
Twitter Access in Java
    - Java library
    - 모든 library를 설치해서 사용하기 보다는, 인터넷에 올라온 분석글들의 도움을 받아보니, 이중에서 Twitter4J 가 괜찮은 것 같다.

나중에 실제로 Twitter4J를 사용해보았는데 사용법이 어렵지 않아, Twitter를 사용해 본 경험이 있는 개발자라면, 쉽게 사용할 수 있다. 
사실, Twitter에서 제공하는 인터페이스를 랩핑한 코드들이기 때문에, 쉬워 보일지도 모른다.

테스트를 하면서, 갑자기 동작이 안하는 경우가 발생하는데, 이경우 API를 너무 많이 호출했는지를 먼저 의심해 보아야 한다. Twitter는 Open Platform이기는 하지만, 동일 IP주소를 사용하는 PC와 Device에 제약사항이 있는데, 시간당 100회와 하루 24시간동안 1000회를 이용 가능하도록 되어 있다. 

이러한 제약 사항을 기억하고 있다면, 원하는 서비스 모듈을 만들어 사용하는데 큰 어려움과 부족(?)함이 없을 것이다.


:
Posted by 행복상자