dev1.egloos.com

知之者 不如好之子 好之者 不如樂之者

포토로그 마이가든



[android] web js 에서 app method call _개발_part 1


-------------------------------------------------------

App code
--------------------------------------------------------

private class AndroidBridge {
 
    public void setResult(final String msg) {  // must be final
            setSave(msg);
    }
}


-------------------------------------------------------
App interface code
--------------------------------------------------------


webView.getSettings().setJavaScriptEnabled(true);

// 자바 스크립트로 바인딩할 클래스 인스턴스와 JavaScript에서 인스턴스

// 웹에서 사용할 네임
webView.addJavascriptInterface(new AndroidBridge(), "android");


-------------------------------------------------------
Web code

--------------------------------------------------------


<script>

    function getResult() {

        //window.[인터페이스명].[메쏘드명] method call

        window.android.setResult('msg');

    }

</script>




로그관리 __mySQL

/user/local/mysql/var에 있는 로그 덕분에 disk full 이 났을 경우

mysql-bin.000001...
으로 시작하는 로그들을 적당하게 삭제하고
mysql-bin.index 에 값을 변경
(변경하지 않으면 에러남)


-------------------------------------------------------

my.cnf 수정
--------------------------------------------------------

[root] vi /etc/my.cnf


# The MySQL server
[mysqld]
expire_logs_days=3          #3일치 저장


-------------------------------------------------------

mysql 직접 접속 변경
--------------------------------------------------------


[root] mysql -u root -p

mysql> show variables LIKE '%logs%';

+------------------+-------+
| Variable_name    | Value |
+------------------+-------+
| expire_logs_days | 0     |
+------------------+-------+
1 row in set (0.00 sec)

mysql> set global expire_logs_days=3;        : 3일로 설정
mysql> flush logs;                                             : 로그 재시작(적용)
mysql> show variables LIKE '%logs%';   3일로 제대로 되었나 확인.

+------------------+-------+
| Variable_name    | Value |
+------------------+-------+
| expire_logs_days | 3     |
+------------------+-------+
1 row in set (0.00 sec)


12월 서버 누가 접속했는가? _Linux

이슈
12월 언제인가 서버한대에 해킹을 당했다
어떤 IP가 접속했는가?

해결
>grep "GET /admin.php" server-access_log | awk '/Dec\/2011/' > 1226.txt
2011 12월 로그만 추림

>grep "GET" 1226.txt | awk '{print $1}' | sort | uniq -c
로그중 접속된 숫자만큰 IP필터링

REF.

 1. wc
- 지정한 파일의 행 수, 단어 수, 문자 수 를 화면에 출력한다. -l 옵션을 자주 사용한다.
- 다른 명령어와 함께 사용되는 응용에는 (파이프) 를 사용한다.


2. sort
- 텍스트로 입력된 내용을 지정한 방법에 따라 정렬하여 출력한다.
- 기본적으로 아스키 코드 값을 이용하며 숫자는 -n 옵션을 사용하여 인식이 가능하다
- 특정한 필드를 이용하여 정렬하려면 +n (2번 필드부터 1로 인식), -k n (필드번호 그대로 사용)을 이용하여 사용이 가능하다. 만일 두번째 필드의 정렬을 적용하지 않으려면 - 를 다시 이용한다.
- 예) sort +1 test : 이경우는 두번째 필드를 이용하여 정렬을 하고 만약 두번째 필드가 같다면 세 번째 필드를 이용하여 정렬한다.
- 예) sort +1 -2 test : 이 경우 두번째 필드가 같으면 세번째 필드를 이용하여 정렬하지 않고 원래 파일의 순서를 유지한 채로 정렬한다.
- 숫자를 이용하는 경우는 -n -k 4 와 같이 사용한다.
- 파일로 저장하려면 -o 옵션을 사용한다.
- 필드 구분자를 이용하여 (이때 -t: 와 같이 옵션에 필드 구분자를 붙여서 사용) 다른 파일도 처리가 가능


3. split
- 큰 파일을 여러 개의 작은 파일로 분할하는 명령이며 지정된 이름의 파일이 생성된다.(xaa, xab)
- 예제로 /etc/services 파일을 복사하여 사용한다. -30 과 같이 행을 기준으로 분할이 가능하고 -b 512 와 같이 용량을 기준으로 분할도 가능하다.


4. uniq
- 중복된 내용의 행이 연속으로 있으면 하나만 남기고 삭제한다.
- 전체적으로 분산된 중복은 찾아내지 못한다. 따라서 정렬하여 순차적으로 만든뒤에 적용한다.
- 파일로 저장이 가능하다. -o 옵션
- 중복없는 행만 찾으려면 -u 옵션
- 중복 행 보기 : -d, 중복 횟수 보기 : -c


5. cut
- 파일의 각 행(세로)에서 선택된 필드를 잘라내는 명령이다.
- 주의 사항은 필드의 구별은 탭으로만 인식한다는 점이다. 문서가 탭으로 필드 구별이 되어있지 않다면 필드 구분자 옵션 -d 을 이용하여 -d’ ‘ 와 같이 공백으로 구분하는 것도 가능하다.
- 특정한 문자를 추출하는 것 보다는 -f 를 이용하여 필드를 추출하는데 더 유용하다. 콤마를 이용해서 여러 필드 추출이 가능하다.


PHP configuration 옵션 정리 __PHP

원본: http://orion203.springnote.com/pages/6906419.xhtml

CentOS 5 가 최소 설치되었다고 가정하고 시작했기 때문에 컴파일 환경을 구축을 먼저 해줘야 합니다.

yum update -y

reboot

yum install gcc.x86_64 gcc-c++.x86_64 wget.x86_64 bzip2-devel.x86_64 pkgconfig.x86_64 openssl-devel.x86_64 make.x86_64 man.x86_64 nasm.x86_64 gmp.x86_64 gdbm-devel.x86_64 readline-devel.x86_64 compat-readline43.x86_64 ncurses-devel.x86_64 db4-devel.x86_64 automake* autoconf* -y

 

Donwload and Unpack

 

cd /usr/src

wget ftp://ftp.sayclub.com/pub/languages/php/php-5.2.16.tar.bz2

tar xvjf php-5.2.16.tar.bz2

cd php-5.2.16

 

Knowledge

Php는 아주 많은 기능들을 제공합니다. 이러다보니 Configure 옵션도 많아서 제대로 지정해주지 않으면 사용하지도 않는 기능이 내장이 된다거나 꼭 필요한 기능인데 shared module로 올린다거나 하는 불상사가 발생할 수 있습니다. 따라서 무엇이 필요한지 자주 사용되는 기능인지를 따져보는 것이 좋습니다.

 

Php의 많은 기능들은 컴파일할때 기능을 내장하는 Built in 방식과 필요한 기능만을 그때 그때 컴파일해서 붙여서 쓰는 shared 방식을 사용할 수 있습니다. 보통 Built in 방식으로 지정을하지 않으면 전부다 shared 방식으로 언제든지 붙여서 쓸수 있기 때문에 너무 걱정을 하지 않아도 됩니다.

 

Built in 방식은 보통 자주 쓰는 경우에 사용을하고 shared 방식은 가끔 쓰는 기능이 필요한 경우에 사용을 합니다. 따라서 Php가 어떤 목적으로 사용할 것인지를 알아야 필요한 기능을 Built in 할것인지를 알 수 있겠죠.

 

주요한 기능들은 다음과 같습니다.

 

  1. --with-pear     - php 라이브러리인 pear 를 지원.
  2. --with-gettext  - php내에 국제화를 위한 프로그램을 지원하기위해서 필요한 기능을 지원.
  3. --with-iconv     - 문자셋 변환을 위한 기능을 지원.
  4. --with-bz2      - 압축프로그램인 BZip2 기능을 지원.
  5. --with-gmp      - GNU MP 지원. GNU MP는 멀티 프로세싱을 위한 것입니다. 쓰레드, Fork 와는 또다른 병렬 프로그래밍 기법입니다.
  6. --with-apxs2    - apache2 와 연동 지원.
  7. --with-zlib      - ZLIB 지원.
  8. --with-mcrypt   - mcrypt 로 암호화 과련 기능을 지원.
  9. --with-mhash    - mhash 지원.
  10. --with-mysql     - mysql 데이터베이스 지원.
  11. --with-pdo-mysql  - pdo mysql 지원.
  12. --with-mysqli         - mysqli 지원.
  13. --with-pgsql      - pgsql 데이터베이스 지원.
  14. --with-pdo-pgsql  - pdo pgsql 지원.
  15. --with-xmlrpc      - xmlrpc 지원.
  16. --with-libxml-dir    - XML2 지원을 위한 libxml2 라이브러리 디렉토리 지정.
  17. --with-pcre-dir    - Perl Compatible Regular Expression 지원을 위한 라이브러리 디렉토리 지정.
  18. --with-gd          - GD 그래픽 지원.

  19. --with-native-ttf     - TrueType 문자열 지원.

  20. --with-jpeg-dir    - JPEG 그래픽 지원을 위한 라이브러리 디렉토리 지정.

  21. --with-png-dir     - PNG 그래픽 지원을 위한 라이브러리 디렉토리 지정.

  22. --with-xpm-dir     - XPM 그래픽 지원을 위한 라이브러리 디렉토리 지정.

  23. --with-ttf          - FreeType 폰트 지원.

  24. --with-freetype-dir - FreeType 폰트 라이브러리 디렉토리 지정.

  25. --enable-safe-mode      - safe mode 지원.

  26. --enable-zend-multibyte  - Zend 의 multibyte 지원.

  27. --enable-soap   - SOAP 웹 서비스 지원.

  28. --enable-curl     - cURL 지원.

  29. --enable-sockets  - fsockopen 과 같은 소켓 함수를 쓰기위해서는 필요합니다.

  30. --enable-zip        - Zip 파일을 읽고 쓸수 있는 기능 지원.

  31. --enable-magic-quotes  - '," 와 같은 것을 자동으로 처리해주는 기능을 제공합니다.

  32. --enable-mbstring   - multibyte 문자열 처리를 위한 지원.

  33. --enable-shmop      - Shared Memory Operations 으로서 공유메모리 접근 기능을 지원합니다. Windows 플랫폼은 사용할 수 없습니다. 여기를 참고하세요.

  34. --enable-pcntl(CLI/CGI only)  - Process Control 를 지원합니다. Windows 플랫폼은 사용할 수 없습니다.

  35. --enable-sysvmsg    - System V message 를 지원합니다. Windows 플랫폼은 사용할 수 없습니다. 여기를 참고하세요.

  36. --enable-sysvsem    - System V Semaphore 를 지원합니다. Windows 플랫폼은 사용할 수 없습니다. 여기를 참고하세요.

  37. --enable-sysvshm     - System V shared memory 를 지원합니다. Windows 플랫폼은 사용할 수 없습니다. 여기를 참고하세요.

  38. --enable-calendar    - Calendar Conversion 를 지원합니다.

  39. --enable-bcmath     - bc 스타일의 수학함수를 지원합니다.

  40. --enable-ftp         - ftp 지원.

  41. --enable-exif        - 이미지 메타정보 표시를 지원합니다.

  42. --enable-fastcgi     - FastCGI 지원.

 

주로 많이 사용하는 Configure 옵션들은 위와 같습니다. 자세히 보면 'with' 시작하는 것이 있고 'enable' 로 시작하는 것이 있는데, with 의 경우에는 외부의 라이브러리가 있어야 하며 enable은 php에 라이브러리를 내장하고 있어 기능을 켜는 역활을 합니다.

 

Configure 를 하기전에 위의 내용을 알고 있어야 자신에게 필요한 것을 Php에 내장시킬 수 있습니다. 여기에서는 큰틀에서 다음과 같은 것을 Php에 넣을 것입니다.

 

  1. Apache 웹서버 연동. --with-apxs2 옵션 설정 필요.

  2. Mysql 데이터베이스 연동. --with-mysql, --with-pdo-mysql 옵션 설정 필요.

  3. Pgsql 데이터베이스 연동. --with-pgsql, --with-pdo-pgsql 옵션 설정 필요.

  4. 그래픽 이미지 지원. --with-gd, gd-native-ttf, jpg, png, freetype 기능이 필요함.

  5. xml 처리를 위한 기능이 필요. --with-libxml 옵션 설정 필요.

  6. pear 기능 필요. --with-pear 옵션 설정 필요.

  7. 기타 부가적인 기능들 필요. gettext, bz2, mcrypt, mbstring, magic quotas, iconv 등등

 

1~3까지는 설치 노트에 있는대로 설치를 한 것으로 간주했습니다. 나머지 설치를 위한 라이브러리 설치를 먼저 진행을 합니다. 즉 다음과 같습니다.

 

  • Apache2 - /usr/local/apache2

  • Mysql - /usr/local/mysql5.5

  • PostgreSQL - /usr/local/pgsql-9.0

 --with-gd를 위한 CentOS Lib 설치.

yum install gd.x86_64 gd-devel.x86_64

 --with-jpeg-dir 를 위한 CentOS Lib 설치.

yum install libjpeg.x86_64 libjpeg-devel.x86_64

 --with-png-dir 를 위한 CentOS Lib 설치.

yum install libpng.x86_64 libpng-devel.x86_64

 --with-freetype-dir 를 위한 CentOS Lib 설치.

yum install freetype.x86_64 freetype-devel.x86_64

 --with-libxml-dir 를 위한 CentOS Lib 설치.

yum install libxml2.x86_64 libxml2-devel.x86_64

 --with-bz2 를 위한 CentOS Lib 설치.

yum install bzip2.x86_64 bzip2-devel.x86_64

 --with-gettext 를 위한 CentOS Lib 설치.

yum install gettext.x86_64 gettext-devel.x86_64

 --with-jpeg-dir 를 위한 CentOS Lib 설치.

yum install libmcrypt.x86_64 libmcrypt-devel.x86_64

 --with-mhash 를 위한 CentOS Lib 설치.

yum install mhash.x86_64 mhash-devel.x86_64

 --with-gmp 를 위한 CentOS Lib 설치.

yum install gmp-devel.x86_64 gmp.x86_64

 

이외에도 필요한 기능들을 포함하면 한번쯤 CentOS 라이브러리를 패키지를 살펴봐야 합니다.

 

Configure and Compile

이제 컴파일을 위한 Configure 는 다음과 같습니다.

 

./configure --prefix=/usr/local/php5.2.16 \

--with-libdir=lib64 \

--with-apxs2=/usr/local/apache2/bin/apxs \

--with-mysql=/usr/local/mysql5.5 \

--with-pdo-mysql=/usr/local/mysql5.5 \

--with-mysqli=/usr/local/mysql5.5/bin/mysql_config \

--with-pgsql=/usr/local/pgsql9.0 \

--with-pdo-pgsql=/usr/local/pgsql9.0 \

--with-pear \

--with-libxml-dir=/usr \

--with-gettext \

--with-iconv \

--with-zlib \

--with-mcrypt \

--with-mhash \

--with-gd \

--with-jpeg-dir=/usr \

--with-png-dir=/usr \

--with-freetype-dir=/usr \

--with-bz2 \

--enable-gd-native-ttf \

--enable-zip \

--enable-mbstring \

--enable-zend-multibyte \

--enable-safe-mode

 

make

make install

cp php.ini-recommended /usr/local/php5.2.16/lib/php.ini

 

Apache PHP Configure

Apache 웹서버에서 PHP 컴파일을 인식시켜야 합니다. 이를 위해서 아파치에 설정을 해야 합니다.

 

]# cd /usr/local/apache2/conf/extra

]# vim httpd-php.conf

<IfModule php5_module>

    <FilesMatch "\.(htm|html|php)$">

        SetHandler application/x-httpd-php

    </FilesMatch>

 

    <FilesMatch "\.phps$">

        SetHandler application/x-httpd-php-source

    </FilesMatch>

 

    DirectoryIndex index.htm index.html index.php

</IfModule>

]# vim /usr/local/apache2/conf/httpd.conf

#Php settings

Include conf/extra/httpd-php.conf

 

]# /usr/local/apache2/bin/apachectl restart


Call to undefined function curl_init() __PHP

--------------------------------------------------------
해결방안
--------------------------------------------------------
--with-curl 을 추가해 소스 재컴파일 해준다.

--------------------------------------------------------
1. PHP소스 다운(최신의 stable)
--------------------------------------------------------
http://www.php.net/downloads.php

--------------------------------------------------------
2. 각 환경에 맞도록 configure
--------------------------------------------------------
 ./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache2/bin/apxs --with-kerberos --with-imap-ssl --with-mysql=/usr/local/mysql --enable-sockets --with-regex=php --enable-ftp --enable-inline-optimization --disable-debug --with-config-file-path=/usr/local/apache2/conf --with-zlib --with-zlib-dir --with-curl --with-iconv --with-gdbm --with-gd --enable-gd-native-ttf --with-jpeg-dir --with-freetype-dir=/usr --enable-mbstring --enable-mbregex --enable-sigchild --enable-dba --enable-zend-multibyte --with-bz2 --enable-ftp --enable-exif --with-openssl --enable-wddx --enable-magic-quotes --enable-sysvmsg --enable-sysvsem --enable-sysvshm --disable-debug --enable-shared=rewrite --with-mcrypt
설정중 문제가 있다면 http://dev1.egloos.com/4649819 에서 오류 수정

--------------------------------------------------------
3. 빌드
--------------------------------------------------------
make
make install


서비스중 빌드 했을 경우 잠시(10초이내) php가 동작안하는 경우 발생
아파치 리스타트 해주고 다시 접속하면 컴파일된 php로 동작



PHP소스 컴파일 에러 수정 __PHP

오류 메세지 : cannot find -lltdl

해결 방법 : yum install *ltdl*


오류 메세지 : configure: error: xml2-config not found. Please check your libxml2 installation 
해결 방법 : yum install libxml2 libxml2-devel -y 

오류 메세지 : configure: error: Please reinstall the BZip2 distribution 
해결 방법 : yum -y install bzip2-devel 

오류 메세지 : configure: error: libjpeg.(a|so) not found. 
해결 방법 : yum -y install libjpeg-devel 

오류 메세지 : configure: error: libpng.(a|so) not found. 
해결 방법 : yum -y install libpng-devel 

오류 메세지 : configure: error: freetype.h not found. 
해결 방법 : yum -y install freetype-devel 

오류 메세지 : configure: error: utf8_mime2text() has new signature, but U8T_CANONICAL is missing. This should not happen. Check config.log for additional information. 
해결 방법 : yum -y install libc-client-devel 

오류 메세지 : configure: error: Kerberos libraries not found. 
해결 방법 : yum -y install krb5-devel 

오류 메세지 : configure: error:Cannot find OpenSSL's <evp.h> 
해결 방법 : yum -y install openssl-devel

 

checking for termcap functions library... configure: error: No curses/termcap library found
해결책 :  # yum -y install ncurses-devel

configure: error: C++ preprocessor "/lib/cpp" fails sanity check
해결책 : # yum -y install gcc-c++

/usr/lib/libdb-4.3.so: could not read symbols: File in wrong format
/usr/lib/libexpat.so: could not read symbols: File in wrong format

해결책 : # mv /usr/lib/libexpat.so /usr/lib/libexpat.so.bak
               # ln -s /lib64/libexpat.so.0.5.0 /usr/lib/libexpat.so 
               # mv /usr/lib/libdb-4.3.so /usr/lib/libdb-4.3.so.bak
               # ln -s /lib64/libdb-4.3.so /usr/lib/libdb-4.3.so
에러의 원인은 64비트 환경에서 32비트용 소스를 가져다가 설치하기 때문이다. 컴파일 도구와 관련된 심볼릭 링크 파일을 찾지 못한다고 나오고 있다.

configure: error: Unable to locate gmp.h
해결책 : # yum -y install gmp*

configure: error: not found. Please reinstall the expat distribution.
해결책 : # yum -y install expat*

configure: error: Please reinstall the libcurl distribution - easy.h should be in /include/curl/
해결책 : # yum -y install curl* 또는 yum -y install curl & yum -y install curl-devel

configure: error: Please reinstall libmcrypt - I cannot find mcrypt.h <br>
configure: error: Please reinstall libmhash - I cannot find mhash.h
해결책 : # yum install libmcrypt libmcrypt-devel libmhash libmhash-devel

Configure: error: xml2-config not found. Please check your libxml2 installation
해결책 : #yum install libxml2-devel

Checking for pkg-config... /usr/bin/pkg-config
configure: error: Cannot find OpenSSL's <evp.h>
해결책 : #yum install openssl-devel

Configure: error: Please reinstall the BZip2 distribution
해결책 : # yum install bzip2-devel

Configure: error: libjpeg.(also) not found.
해결책 : # yum install libjpeg-devel

Configure: error: libpng.(also) not found.
해결책 : yum install libpng-devel

Configure: error: freetype.h not found.
해결책 : #yum install freetype-devel

Configure: error: Cannot find MySQL header files under /usr.
Note that the MySQL client library is not bundled anymore!
해결책 : # yum install mysql-devel

Configure: error: Please reinstall the ncurses distribution
해결책 : # yum install ncurses-devel

Checking for unixODBC support... configure: error: ODBC header file '/usr/include/sqlext.h' not found!
해결책 : # yum install unixODBC-devel

Configure: error: Cannot find pspell
해결책 : # yum install pspell-devel

Configure: error: snmp.h not found. Check your SNMP installation.
# yum install net-snmp-devel

configure: error: ZLIB extension requires zlib >= 1.0.9

ln -sf /usr/lib64/libgssapi_krb5.so.2.2 /usr/lib/libgssapi_krb5.so
ln -sf /usr/lib64/libkrb5.so.3.3 /usr/lib/libkrb5.so
ln -sf /usr/lib64/libk5crypto.so.3.1 /usr/lib/libk5crypto.so
ln -sf /lib64/libcom_err.so.2 /usr/lib/libcom_err.so
ln -sf /usr/lib64/libgcrypt.so.11 /usr/lib/libgcrypt.so
ln -sf /usr/lib64/libgpg-error.so.0 /usr/lib/libgpg-error.so
ln -sf /usr/lib64/libexpat.so /usr/lib/libexpat.so
ln -sf /usr/lib64/libm.so /usr/lib/libm.so
ln -sf /usr/lib64/libssl.so /usr/lib/libssl.so

64bit os에서 php 5.2.6 configure 옵션에 --with-kerberos 옵션 넣어서 configure 진행했을경우 에러 나는 경우 조치 사항

krb5-devel 관련 라이브러리 파일을 /usr/lib64 에서 /usr/lib로 복사 링크

/usr/lib64/libdes425.a
/usr/lib64/libdes425.so
/usr/lib64/libgssapi_krb5.a
/usr/lib64/libgssapi_krb5.so
/usr/lib64/libgssrpc.a
/usr/lib64/libgssrpc.so
/usr/lib64/libk5crypto.a
/usr/lib64/libk5crypto.so
/usr/lib64/libkadm5clnt.a
/usr/lib64/libkadm5clnt.so
/usr/lib64/libkadm5srv.a
/usr/lib64/libkadm5srv.so
/usr/lib64/libkdb5.a
/usr/lib64/libkdb5.so
/usr/lib64/libkrb4.a
/usr/lib64/libkrb4.so
/usr/lib64/libkrb5.a
/usr/lib64/libkrb5.so


Javascript chart library _WebApp

출처: http://sixrevisions.com/javascript/graph_chart_plot_data_javascript/

Effective data visualization allows users to easily understand and consume otherwise complex, boring information. Plotting your data can serve as a replacement to tabular data, and is also a great way to add practical graphics to your web page or application. There are a variety of ways you can plot data on-the-fly – but in this article we’ll focus on 10 excellent JavaScript solutions to graphing/charting data that allow you to process data client-side. You’ll also find a link to one of the demonstration pages of the script so that you can see it in action.

Flot

Flot - Screen shot.

Flot is a data-plotting library developed by IOLA built on top of jQuery.  It’s easy to use, yet feature-packed and elegant. It has a mouse-controlled zooming feature (click and drag over the target area) and some simple user interactivity features such the ability to determine the x and y coordinates of mouse clicks.

Demonstration: Different graph types

Flotr Javascript Plotting Library

Flotr Javascript Plotting Library - screen shot.

Flotr, written by Bas Wenneker of Solutoire.com, is a plotting solution inspired by Flot that uses the Prototype JS library and excanvas.js. It supports most modern browsers including Internet Explorer 6, and has many features of Flot including mouse tracking, selection, mouse-tracking features.

Demonstration: Basic Legend Example

fgCharting Plugin for jQuery

fgCharting Plugin for jQuery - screen shot.

fgCharting jQuery plugin is an accessible solution for charting data. It takes data in an HTML table and dynamically transforms the table into charts, allowing non-traditional browsers (i.e. – screen readers) access to the HTML table. Basic usage involves one line of code to initialize the plugin.

Demonstration:  Chart types page

PlotKit

PlotKit - screen shot.

PlotKit is a charts and graphs plotting solution written on top of Mochikit. PlotKit a complete rewrite of a project called CanvasGraph.js, improving on code structure and adding support for SVG format. The developers of PlotKit provides you with a PlotKit Quick Start guide to get you up and running in no time.

Demonstration: SVG Renderer Tests

JavaScript Diagram Builder

JavaS-ript Diagram Builder - screen shot.

The JavaScript Diagram Builder supports several types of chart and graph types including bars, dots, lines, and pie charts. The developer has provided a Browser Support tool to help you check if particular objects/methods of the library are supported by your current browser.

Demonstration: The Bar object

Emprise JavaScript Charts

Emprise JavaScript Charts - screen shot.

Emprise JavaScript Charts offers a free Personal License for their feature-packed charting/graphing script. Check out their feature comparison table of the different types of licenses to see which license is right for you.

Demonstration:  Area Chart Example

Dynamic Drive Pie Graph script

Dynamic Drive Pie Graph script - screen shot.

DynamicDrive offers a DHTML/CSS based solution for graphing pie charts. The implementation is straightforward, just include two scripts provided (wz_jsgraphics.js and pie.js), define the values of each segment of your pie chart either inline or in an external JS file, and you’re set!

Dynamic Drive Line Graph script

Dynamic Drive Line Graph script - screen shot.

The Line Graph script is another DHTML solution from DynamicDrive that allows you display line graph data. The procedure for implementation is similar to the Pie Graph script.

Canvas 3D Graph

Canvas 3D Graph - screen shot.

If you need to graph 3-dimensional data, Canvas 3D Graph is worth checking out. Canvas 3D Graph is written with excanvas.js to support Internet Explorer.

The Dojo Charting Engine

The Dojo Charting Engine - screen shot.

The Dojo Charting Engine is a solution written on top of the Dojo Toolkit JavaScript library. It is a feature-rich solution that includes trend methods for analyzing data on-the-fly, 3D visual bars, and animated hover-over effects. Note that the example test page linked on the project page doesn’t work, here’s the working example page link.


phpize 활용 _Linux

phpize는 php에서 extension 모듈을 올리는 데 필요한 유틸리티
phpize는 php-devel 패키지(yum install php-devel)

--------------------------------------------------------
1. phpize 확인 
--------------------------------------------------------
[root]whereis phpize
phpize: /usr/bin/phpize

보통 /usr/bin/phpize에 존재합니다.
없으면, php-devel을 설치


--------------------------------------------------------
2. httpd가 DSO 지원확인
--------------------------------------------------------
[root] httpd -l
Compiled-in modules:
  http_core.c
  mod_so.c 

--------------------------------------------------------
3. extension 설치 
--------------------------------------------------------
* 테스트로 php에 기본 소스인 있는 pdo_mysql 설치

[root] phpize   // extension 컴파일 지정
Configuring for:
  PHP Api Version:   20020918
  Zend Module Api No:   20020429
  Zend Extension Api No:   20021010

[root]./configure --with-php-config=/etc/httpd/conf && make && make install 


// 각자 모듈 올리는 곳(php.ini의 extension_dir 부분 참조)에 복사해 넣으시면 됩니다.
[root] cp ../modules/pdo_user.so /usr/lib/php/modules 


// extension 추가
[root]vi /etc/httpd/conf/php.ini 
extension=pdo_user.so 


// 아파치 리스타트
[root@ns1 22:15:03 ~]$ service httpd restart

DB 속도저하에 따른 웹페이지 접속 지연(skip-name-resolve) __mySQL

--------------------------------------------------------
skip-name-resolve
옵션으로 DNS lookup과정을 생략함으로 속도 향상시킴
--------------------------------------------------------

[root] vi /etc/my.cnf


# The MySQL server
[mysqld]
skip-external-locking
skip-host-cache
skip-locking
skip-name-resolve

show processlist 에서 unauthenticated user 가 표시되면

연결속도 저하와 웹서비스 접속이 느려짐


mysql> show processlist;
| 3436942 | unauthenticated user | 192.168.0.52:49607 || Connect|| login |
| 3436943 | unauthenticated user | 192.168.0.52:49608 || Connect|| login


--------------------------------------------------------

1. 해결방법
--------------------------------------------------------

mysql 시작시 --skip-name-resolve 옵션으로 실행
또는 /etc/hosts 파일에 접속 IP와 호스트명을 넣음



--------------------------------------------------------

2. 원인
--------------------------------------------------------
mysql에서 접속시 ip에 대한 resolving(역질의)를 하지만

대부분의 IP는 등록되어 있지 않으며 DNS속도에 따라 DB연결속도가 좌우됨


i-funbox _PDA

아이패드2에서
안에 있는 파일을 맨날 iFile로만 보다가

wifi속도때문에 몬가 상큼한게 없을까 찾아보니 역시..

ifunbox.zip


1 2 3 4 5 6 7 8 9 10 다음