Share

Use the By property when you want to animate a value “by” a certain amount, rather than specifying a starting or ending value. You may also use the By property with the From property.

The following table summarizes how the FromTo, and By properties may be used together or separately to determine an animation’s target values.

Properties specified Resulting behavior
From The animation progresses from the value specified by the From property to the base value of the property being animated or to a previous animation’s output value, depending on how the previous animation is configured.
From and To The animation progresses from the value specified by the From property to the value specified by the To property.
From and By The animation progresses from the value specified by the From property to the value specified by the sum of the From and By properties.
To The animation progresses from the animated property’s base value or a previous animation’s output value to the value specified by the To property.
By The animation progresses from the base value of the property being animated or a previous animation’s output value to the sum of that value and the value specified by the By property.
If you set both the To and By properties, the To property takes precedence and the By property is ignored.

To use other interpolation methods or animate between more than two target values, use a DoubleAnimationUsingKeyFrames object.

References

Share
Share

You may have following error message when you start Google App Engine Server.

Initializing App Engine server
[ERROR] Unable to start App Engine server
java.lang.RuntimeException: Unable to restore the previous TimeZone
at com.google.appengine.tools.development.DevAppServerImpl.restoreLocalTimeZone(DevAppServerImpl.java:228)
at com.google.appengine.tools.development.DevAppServerImpl.start(DevAppServerImpl.java:164)
at com.google.appengine.tools.development.gwt.AppEngineLauncher.start(AppEngineLauncher.java:97)
at com.google.gwt.dev.DevMode.doStartUpServer(DevMode.java:509)
at com.google.gwt.dev.DevModeBase.startUp(DevModeBase.java:1068)
at com.google.gwt.dev.DevModeBase.run(DevModeBase.java:811)
at com.google.gwt.dev.DevMode.main(DevMode.java:311)
Caused by: java.lang.NoSuchFieldException: defaultZoneTL
at java.lang.Class.getDeclaredField(Class.java:1882)
at com.google.appengine.tools.development.DevAppServerImpl.restoreLocalTimeZone(DevAppServerImpl.java:222)
… 6 more
[ERROR] shell failed in doStartupServer method

The solution is to add an extra parameter in your virtual machine run configuration.

-Dappengine.user.timezone=UTC

References

Share

Google App Engine for Java

March 21st, 2012 | Posted by zemna in Software Development - (0 Comments)
Share

IBM developer Networks 자료

Share

HTML5 Reference Sites

March 16th, 2012 | Posted by zemna in HTML5 | Web - (0 Comments)
Share

W3Schools Online Web Tutorials (http://www.w3schools.com/html5)

HTML5 Tutorial (http://www.html5tutorial.info)

Share

Remove the icon of a WPF window

December 6th, 2011 | Posted by zemna in .NET | Software Development | WPF - (0 Comments)
Share

WPF does not provide any function to remove the icon of a window. But we can use Win32 API to remove the icon.

WPF Tutorial site provide IconHelper class to remove icon of a window. You can find the source code in link below

Share
Share

Prior to .NET Framework 4, we can’t make in-process shell extension using managed code because of the CLR limitation allowing only one .NET runtime per process.

Jesse Kaplan, one of the CLR programmer, explains…

Unfortunately unmanaged C++ is really the only way to go here.

Writing in-process \shell extensions in managed code is actually a very dangerous thing to do because it has the effect of injecting your managed code (and the .NET Framework) into every application on the machine that has a file open dialog.

The problems occur because only one version of the .NET Framework can be loaded in a process at any given time (other shared components such as java and msxml have the same property and thus the same restriction).

If you write your shell extension using the 2.0 .NET Framework and an application built with the 1.1 .NET Framework uses a file open dialog, your shell extension will fail because it can not run on an earlier version. Things can get even worse if your shell-extension manages to get loaded in a process before another applications managed code does: your extension may force an existing application onto a different runtime version than the one it was expecting and cause it to fail.

Because of these problems we strongly recomend against using any single-instance-per-process runtime or library (such as the .NET Framework, java, or msxml) in an in-process shell extension.

Go to thread

But in .NET Framework 4 has got the ability to have multiple runtimes with any other runtime, we can make a shell extensions using managed code.

Articles

All-In-One Windows Shell Code Samples

Because of this new feature, I can make a new plan of my Zemna Shell Extensions..  :lol:

Share
Share

1. ImageMagick, ImageMagick-devel 설치

yum install ImageMagick ImageMagick-devel

2. TrueType 폰트 설치

wget http://www.osresources.com/files/centos-windows-fonts/msfonts.tbz

mkdir/usr/share/fonts/default/TrueType

tar xvjpf msfonts.tbz -C /usr/share/fonts/default/TrueType/

3. rmagick 설치

gem install rmagick -v 1.15.17 –no-rdoc –no-ri
Share
Share

이번에 Redmine을 구축하면서 나타난 에러 현상으로 고치는데 상당한 시간을 투자했다..  :cry:

일단, 기본적인 설치과정은 아래의 문서를 따라하면 별다른 문제없이 진행이 가능하다.

모든 설치를 마치고나서, 웹 브라우저에서 화면을 띄우니 아래와 같은 에러 화면이 나타난다…

에러 메세지를 확인하기 위해 로그 파일을 열어보니 아파치 웹서버 로그에서 아래와 같은 에러메세지가 발생한 것을 확인하였다.

현재, 서버에 설치된 루비의 경로와 Passenger에서 사용하는 루비의 경로가 틀려서 나타난 현상이였다.

다른 좋은 방법이 분명히 있을 것으로 생각되나, 그냥 간단히 심볼릭 링크를 이용하여 /usr/bin/ruby 경로를 통해 Ruby를 실행하능하도록 하였다.

sudo ln -s /usr/local/bin/ruby /usr/bin/ruby

이렇게 하니 Redmine이 정상적으로 출력되는 것을 확인하였다.

Share
Share

이번에 워드프레스가 3.2.1 버전으로 업데이트 되면서 PHP 5.2.4 이상의 버전을 요구하게 되었다.

기본 패키지에는 PHP 5.1 버전이 들어 있으므로 PHP 5.3 으로 업그레이드를 위해서는 다음과 같은 과정을 거치면 된다.

1. Repository를 갱신한다.

# wget http://download.fedora.redhat.com/pub/epel/5/i386/epel-realease-5-4.noarch.rpm
# wget http://rpms.famillecollet.com/enterprise/remi-release-5.rpm
# rpm -Uvh remi-release-5*.rpm epel-release-5*.rpm

2. 이전 버전의 PHP를 제거한다

# yum erase php php-pear php-mysql php-cli php-common

3. 신규 버전의 PHP를 설치한다

# yum –enablerepo=remi install php53 php-pear php53-mysql

4. 아파치 서버를 재가동 한다

# service httpd restart

이렇게 하게되면 PHP 버전을 업데이트 할 수 있게 된다.

참고

Share
Share

이번에 안드로이드에 올린 어플 중에, 광고를 제거한 버전을 올려달라는 요청을 받게 되었다.

이렇게 무료/유료 버전의 앱을 개발하여 마켓에 올릴 경우에 어떻게 해야 코딩의 중복을 제거하고 효과적인 코딩이 가능한지 하는 부분에 대해 확실히 공부하며 정리하는 차원에서 글을 써보고자 한다.

1. 어떻게 하면 효율적인 개발이 가능한가?

무료/유료 버전의 앱을 동시에 개발하는데는 몇가지 방법이 있다고 한다.

1.1. 완전히 분리된 2개의 프로젝트를 생성하는 방법

가장 손쉽게 분리가 가능한 방법으로, 이클립스에서 별도로 2개의 프로젝트를 생성하여 따로 개발하는 방법이다. 이 방법은 가장 손쉬운 방법이기는 하나, 개발자의 입장에서 동일한 코드를 2개의 프로젝트에서 관리해야 하기 때문에 상당히 신경을 써야하는 부분이 존재하게 된다.

1.2. 모든 기능을 가지고 있는 하나의 프로젝트를 생성하고 유료 키 형식의 프로젝트를 별도로 생성하는 방법

위에서 언급한 코드가 중복되는 문제를 해결하기 위해, 하나의 프로젝트에 모든 기능을 구현한다. 그리고 유료 버전으로 등록할 별도의 프로젝트를 생성한다. 유료 프로젝트는 별다른 기능을 구현할 필요는 없지만 빈 껍데기나 마찬가지 이므로 런처에서 보이지는 않도록 설정을 하고, 보안을 위해 앞에서 생성한 프로젝트와 동일한 키로 서명하여 마켓에 등록시키면 된다. 만일, 키부분에 대한 처리를 동일하게 가져가지 않는다면 나중에 유료 키 앱의 설치여부를 판단하는 과정이 까다로워진다.

앱의 전체적인 사용 형태는, 사용자는 최초에 무료버전의 앱을 다운로드 받아야 하고, 유료버전으로 사용하고 싶다면 마켓에서 유료인증 키 앱을 구매하고 설치하면, 무료버전이 유료버전으로 바뀌는 방식이다.

이와 같이 구현하게 되면, 기능이 구현된 프로젝트에서는 특정한 기능을 유료버전에서만 제공하거나 할 때, 유료인증 앱의 설치여부와 해당 앱의 시그너처가 동일한지를 판별하여 동일할 경우에만 기능을 제공하도록 프로그래밍하면 된다. 코딩에 대한 샘플을 여기를 클릭하여 확인하자.

이 방식의 문제점은 역시 사용자의 불편함이라고 볼 수 있다. 사용자가 유료 앱을 구매한 이후에도 마켓에서 설치를 하려면 무료/유료 버전을 전부 다운로드 해야 하기 때문이다.

1.3. 프로젝트 라이브러리를 이용한 소스코드 공유방법

현재 이클립스에서 앱을 개발할 때, 안드로이드 프로젝트를 라이브러리로 설정하여 다른 안드로이드 프로젝트에서 참조하는 방식을 사용할 수 있다. 이 라이브러리 참조를 이용하면 1.1에서 언급한 소스코드의 중복 문제를 해결하고, 1.2에서 언급한 불편함 문제도 어느정도 커버가 된다. 좀 더 상세히 알아보도록 하자.

일단, 기존에 개발하는 것처럼 한개의 안드로이드 프로젝트를 생성한다. 생성된 프로젝트에 어플의 기능을 개발한다. 개발이 완료되어서 유료와 무료버전으로 분리할 시점이 되었다면, 일단 생성한 프로젝트를 안드로이드 라이브러리 프로젝트로 변경한다.

[Figure 1. 안드로이드 라이브러리 프로젝트 설정]

이제는 실질적으로 마켓에 배포할 무료/유료버전의 안드로이드 프로젝트를 생성한다. 그리고 생성된 프로젝트에 이전에 생성한 라이브러리 프로젝트를 참조로 설정한다.

[Figure 2. 안드로이드 라이브러리 참조 설정]

여기까지 되었다면, 무료/유료 프로젝트에서는 라이브러리 프로젝트의 모든 소스를 사용할 수 있게 된다. 그리고 참고로 얘기하자면, 만일 동일 이름의 리소스가 라이브러리에도 존재하고 하위 프로젝트에도 존재한다면, 실제 런타임에서는 하위 프로젝트의 리소스가 사용된다. 즉, 각 버전별로 아이콘이나 리소스는 각 버전에 맞게 수정이 가능하다는 뜻이다.

라이브러리 프로젝트에는 앱의 모든 기능이 구현되어야 한다. 현재 설치된 어플이 유료인지 무료인지 판별하기 위해서는 위에서 언급한 리소르를 사용할 수 있다. 간단히 Boolean 형식의 리소스를 추가하고 해당 기능을 유료에서만 제공해 주고 싶으면 코드상에서 해당 리소스의 값을 체크하여 기능을 나타내거나 숨기거나 할 수가 있게 된다.

이상, 무료/유료 앱을 동시에 만드는 방법이 크게 3자리 정도 존재하는 것으로 보인다. 이 중에서, 각 앱의 버전별 개발 구성에 따라 차이는 존재하겠지만, 보통의 경우에는 마지막 경우인 라이브러리를 이용하는 방법이 제일 무난한 것으로 생각된다.

안드로이드 마켓에 마인드맵 앱중에 Thinking Space 라는 막강한 앱이 있다. 이 어플은 무료버전(광고삽입 및 기능제약)과 유료버전(Thinking Space Pro)이 존재한다. 예전에 이 앱이 위에서 언급한 3가지 방법 중에서 2번째 방법인 키 프로젝트를 생성하는 방법이였던 것으로 추측된다. 현재는 3번째 방법으로 변경된 것으로 추측된다. 결국, 이 앱을 만드는 사람들도 세번째 방법이 최선이다라고 생각하지 않았을까 하는게 내 생각이다. ^^;;

그렇다면 다음번에는 세번째 방식을 이용하여 개발할 경우에 대해 좀 더 세부적으로 파고 들어가 봐야 겠다.

참고자료

Share