import org.jfugue.Player
import org.jfugue.Pattern

def player = new Player()
def pattern = null

pattern = player.loadMidi( new File("d:/work/midi/canon.mid"))

def list = pattern.toString().split()

(0..3).each {
    println list[it]

'Groovy/Grails' 카테고리의 다른 글

Cloud Foundry Community  (0) 2011.05.12
[Groovy] MD5 생성하기  (0) 2010.06.04
[Grails] HQL dynamic finder 사용법  (0) 2010.06.03
[Grails] 시작 포트 변경 방법  (0) 2010.06.03
[Groovy] URL encode/decode  (0) 2010.05.26
[MIDI] JFugue로 미디 플레이하기  (0) 2010.05.18
[MusicXML] 파일 읽어서 연주하기  (0) 2010.05.18

import org.jfugue.*

def p = new Player()
def pattern = p.loadMidi( new File("d:/work/midi/canon.mid"))

p.play(pattern)

구글 앱 엔진(Google App Engine) 줄여서 GAE라고들 부른다.
GAE는 파이썬과 자바를 지원한다.
따로 서버 관리가 필요 없기 때문에 개인 개발자는 개발에만 집중하면 되므로 매력적이라고 할 수 있다.

Google App Engine lets you run your web applications on Google's infrastructure.

  • App Engine applications are easy to build, easy to maintain, and easy to scale as your traffic and data storage needs grow.
  • With App Engine, there are no servers to maintain:
    • You just upload your application, and it's ready to serve your users.

You can serve your app from your own domain name (such as http://www.example.com/) using Google Apps. Or, you can serve your app using a free name on the appspot.com domain. You can share your application with the world, or limit access to members of your organization.

Google App Engine supports apps written in several programming languages.

  • With App Engine's Java runtime environment, you can build your app using standard Java technologies, including the JVM, Java servlets, and the Java programming language—or any other language using a JVM-based interpreter or compiler, such as JavaScript or Ruby.
  • App Engine also features a dedicated Python runtime environment, which includes a fast Python interpreter and the Python standard library.
  • The Java and Python runtime environments are built to ensure that your application runs quickly, securely, and without interference from other apps on the system.

With App Engine, you only pay for what you use.

  • There are no set-up costs and no recurring fees.
  • The resources your application uses, such as storage and bandwidth, are measured by the gigabyte, and billed at competitive rates.
  • You control the maximum amounts of resources your app can consume, so it always stays within your budget.

App Engine costs nothing to get started.

  • All applications can use up to 500 MB of storage and enough CPU and bandwidth to support an efficient app serving around 5 million page views a month, absolutely free.
  • When you enable billing for your application, your free limits are raised, and you only pay for resources you use above the free levels.

출처: 구글 코드 구글 앱 엔진 소개 페이지

Mapper나 Reducer가 퍼센트 변화 없이 가만 있을 때가 있다.
아래 상황을 숙지하고 진행상황을 항상 알 수 있도록 하자.

진행 상황 관련 연산

  • 입력 레코드 읽기 할 때
  • 출력 레코드 쓰기 할 때
  • Reporter 클래스의 setStatus() 메서드로 상태를 설정 할 때
  • Reporter 클래스의 incrCounter() 메서드로 카운터를 증가시킬 때
  • Reporter 클래스 progress() 호출

JAR 안의 파일 리스트를 보고 싶을 때가 있다. 이런 경우 jar에 tf 옵션을 주면 볼 수 있다.

  • jar –tf 파일명

자바로 리버스 엔지니어링을 하는 툴들을 찾아 보았다.

  • MaintainJ링크
    • 상용
    • 이클립스 플러그인으로 실행 가능
    • 프로그램을 실행한 후 결과를 시퀀스 다이어그램으로 얻음
  • Altoba UModel 2010 - 링크
    • 상용
    • 클래스 다이어그램, 시퀀스 다이어그램 생성
    • 바이너리 파일도 분석 가능
  • IBM Rational Software Architect링크
    • 상용
  • ArgoUML - 링크
    • 프리 오픈 소스

+ Recent posts