[리눅스] php 설치시의 configure 옵션

사용자 삽입 이미지


리눅스에 php를 설치하면서 configure 명령어를 사용할 일이 있었다.
두세번 해보았는데, 마음처럼 움직여주질 않았다.
아무래도 명령을 내리면서 사용된 옵션이 잘못된 것 같아, 검색을 하던끝에 좋은 옵션모음을 발견했다.
아래는 그 내용...

하단에 출처블로그 경로가 있는데, php를 설치하다가 짜증난 사람이라면 한번쯤 참고해보기 바란다.
유후~

--prefix=/usr/local/server/php \
--with-apxs2=/usr/local/server/apache/bin/apxs \
--with-mysql=/usr/local/server/mysql \
--with-config-file-path=/usr/local/server/apache/conf \
--disable-debug \
--enable-safe-mode \
--enable-sockets \
--enable-mod-charset \
--enable-calendar \
--enable-sysvsem=yes \
--enable-sysvshm=yes \
--enable-ftp \
--enable-magic-quotes \
--enable-gd-native-ttf \
--enable-inline-optimization \
--enable-bcmath \
--with-zlib \
--with-jpeg-dir=/usr \
--with-png-dir=/usr/lib \
--with-freetype-dir=/usr \
--with-libxml-dir=/usr \
--enable-exif \
--with-gd \
--with-ttf \
--with-gettext \
--enable-sigchild \
--enable-mbstring \
--with-mcrypt처


출처: http://littletrue.egloos.com/4358239

[JAVA] Hashmap & List 정렬기법

샘플 코드

List<TestBean> testList = new ArrayList<TestBean>(testMap.values());

Comparator<TestBean> c = Collections.reversOrder();

Collections.sort(testList, c);


위의 예처럼

1. 먼저 대상 맵의 value 만을 가지고 리스트를 하나 만든다.

2. 어떻게 비교할것인지 정한다 (여기선 내림차순)

3. Collections.sort 메소드에 위에서 만든 대상 리스트와 비교 방법을 넣어준다.


이렇게 하면 리스트가 정렬되어있다


여기서 리스트가 직접 정의한 클래스를 대상으로 비교를 해야하는 경우에는

해당 클래스가 Comparable 인터페이스를 구현하고, compareTo() 메소드를 오버라이드 하고 있어야 한다


위의 예를 들면(여기서는 해당 객체의 count를 가지고 비교를 하려고 한다)


public TestBean implements Comparable{

private int count;


public int compareTo(Object arg0){

TestBean comparer = (TestBean) arg0;

return this.count - comparer.count;

}

}

요렇게 되어있으면 된다!!

출처 : http://blog.daum.net/_blog/BlogTypeView.do?
                  blogid=0QJho&articleno=31&_bloghome_menu=recenttext#ajax_history_home

SKT - 안드로이드 출시 단말별 해상도

[SKT(통신사) - 안드로이드폰 조사]

* ATRIX (아트릭스, 모토로라)
- Android 2.2
- 해상도 : 540 X 960

* GALAXY Gio (갤럭시 지오, 삼성전자)
- Android 2.2
- 해상도 : 320 X 480

* Vega S (베가S, 팬택)
- Android 2.2
- 해상도 : 480 X 800

* GALAXY S II (갤럭시S 2, 삼성전자)
- Android 2.3
- 해상도 : 480 X 800

* Nexus S (넥서스 S, 삼성전자)
- Android 2.3
- 해상도 : 480 X 800

* Xperia arc (엑스페리아 아크, 소니에릭슨)
- Android 2.3
- 해상도 : 480 X 854

* OPTIMUS 2X (옵티머스2X, LG전자)
- Android 2.2
- 해상도 : 480 X 800

* GALAXY S hoppin (갤럭시S 호핀, 삼성전자)
- Android 2.2
- 해상도 : 480 X 800

* DEFY (디파이, 모토로라)
- Android 2.2
- 해상도 : 480 X 854

* reAction (리액션, SK 텔레시스)
- Android 2.2
- 해상도 : 480 X 800

* SKY MIRACH (미라크, 팬택)
- Android 2.2
- 해상도 : 480 X 800

* MOTO GRAM (모토글램, 모토로라)
- Android 2.1
- 해상도 : 480 X 854

* Vega (베가, 팬택)
- Android 2.1
- 해상도 : 480 X 800

* MOTO QRTY (모토쿼티, 모토로라)
- Android 2.1
- 해상도 : 480 X 854

* Xperia X10 (엑스페리아 X10, 소니에릭슨)
- Android 2.1
- 해상도 : 480 X 854

* GALAXY S (갤럭시S, 삼성전자)
- Android 2.1
- 해상도 : 480 X 800

* Optimus Z (옵티머스Z, LG전자)
- Android 2.1
- 해상도 : 480 X 800

* HTC Desire (디자이어, HTC)
- Android 2.2
- 해상도 : 480 X 800

* SIRIUS (시리우스, 팬택)
- Android 2.1
- 해상도 : 480 X 800

* GALAXY A (갤럭시A, 삼성전자)
- Android 2.2
- 해상도 : 480 X 800

* MOTOROI (모토로이, 모토로라)
- Android 2.0
- 해상도 : 480 X 854

 - 세티즌 : www.cetizen.co.kr -

View에 백그라운드 반복설정

안드로이드에서 아래와 같이 EditText 에 편지지와 같은 배경을 적용하려면 다음과 같이 하면 된다.
drawable 에 xml 파일을 만들고 속성에 repeat 를 준 다음에 EditText 에서 resource를 호출하여 사용하면 된다.

drawable/letter_background.xml
<?xml version="1.0" encoding="utf-8"?>
<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
    android:src="@drawable/dot_line"
    android:tileMode="repeat"
    />
<EditText
    android:id="@+id/edit_content"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:layout_below="@id/edit_title"
    android:background="@drawable/letter_background"
    android:gravity="top"
    android:lineSpacingExtra="20px"   
    android:minHeight ="200px"
    />


사용자 삽입 이미지

출처 : http://blog.inculab.net/42
 

<TextView>에서의 줄간격 설정하기

일반적인 TextView


<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
   android:orientation="vertical"
   android:layout_width="fill_parent"
   android:layout_height="fill_parent"
   >
<TextView  
   android:layout_width="fill_parent"
   android:layout_height="wrap_content"
   android:text="@string/aticle_content"
   />
</LinearLayout>





lineSpacingExtra의 설정시

라인의 간격을 더하기로 계산한다.
[Text_height 값] + [LindSpacing 값]

 
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
   android:orientation="vertical"
   android:layout_width="fill_parent"
   android:layout_height="fill_parent"
   >
<TextView 
   android:layout_width="fill_parent"
   android:layout_height="wrap_content"
   android:text="@string/aticle_content"
   android:lineSpacingExtra="15dip"
   />
</LinearLayout>





lineSpacingMultiplier의 설정시

라인의 간격을 곱하기로 계산한다.
[ Text_height 값] * [ LindSpacing 값]

 
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
   android:orientation="vertical"
   android:layout_width="fill_parent"
   android:layout_height="fill_parent"
   >
<TextView 
   android:layout_width="fill_parent"
   android:layout_height="wrap_content"
   android:text="@string/aticle_content"
    android:lineSpacingMultiplier="2.5"
   />
</LinearLayout>


'기술참고자료 > Android' 카테고리의 다른 글

SKT - 안드로이드 출시 단말별 해상도  (0) 2011.04.28
View에 백그라운드 반복설정  (0) 2011.04.20
<supports-screens> Guide  (1) 2011.04.19
<support-screen>  (0) 2011.04.19
SIM의 IMSI값 읽어오기  (0) 2011.04.19