Destynation

Feed Rss

defaults write -g ApplePressAndHoldEnabled -bool false

32 or 64

03.28.2012, No Comments, CentOS, by .

# getconf LONG_BIT

JDK ? JRE ?

03.26.2012, No Comments, JAVA, by .

JDK – 자바개발도구 (Java Development Kit)
JRE – 자바실행환경 (Java Runtime Environment), 자바로 작성된 응용프로그램이 실행되기 위한 최소환경

JDK = JRE + 개발에 필요한 실행파일 (javac 등.)
JRE = JVM + 클래스 라이브러리 (Java API)

SCRIPT1028: Expected identifier, string or number
SCRIPT1028: 식별자나 문자열 또는 숫자가 필요합니다.

, 또는 ; 을 유심히 살펴보자.

Smarty

03.16.2012, No Comments, PHP, by .

http://www.smarty.net/

sanitizeMySQL

03.16.2012, No Comments, PHP, by .
<?php
function sanitizeMySQL( $var )
{
    $var = mysql_real_escape_string( $var );
    $var = <a href="http://leejimyung.com/?p=422" title="sanitizeString">sintizeString</a>( $var );
    return $var;
}

sanitizeString

03.16.2012, 1 Comment, PHP, by .
<?php
function sanitizeString( $var )
{
    $var = stripslashed( $var );
    $var = htmlentities( $var );
    $var = strip_tags( $var );
    return $var;
}

주소와 포트 사이에 콤마( , )를 사용한다.

Wiki – Installation
xdebug

Requirements

To run webgrind you need a webserver with PHP 5 installed. Webgrind uses json_encode that is available from PHP 5.2 or as a PECL extension before that.

Xdebug does the actual profiling so that should be installed first (http://www.xdebug.org/docs/install). Then add the following to your php.ini file:

Always profile scripts with xdebug:

xdebug.profiler_enable = 1

Alternatively, enable profiling with GET/POST parameter XDEBUG_PROFILE, e.g. http://localhost/samplepage.php?XDEBUG_PROFILE:

xdebug.profiler_enable_trigger = 1

Please refer to the Xdebug manual for further configuration settings: http://www.xdebug.org/docs/all_settings

Installation

  1. Download webgrind.
  2. Extract webgrind to a folder accessible to the webserver.
  3. Start using webgrind with your browser of choice by navigating to the URL of your webgrind install, e.g. http://localhost/webgrind.

Installing webgrind on production servers is highly discouraged as it might allow access to sensitive files.

Configuration

Webgrind can be configured by editing the config.php file in the webgrind directory, but should work with default settings provided Xdebug is installed and configured correctly.

  • $storageDir - path to a writeable directory where webgrind will store processed cachegrind files
  • $profilerDir - If Xdebug is not installed, this variable defines a directory searched for cachegrind files. If Xdebug is installed, webgrind will look for cachegrind files defined by the xdebug.profiler_output_dir setting. The default is /tmp.

Further configuration options are described in the config.php file itself.

Instructions

Download xdebug-2.1.3.tgz
Unpack the downloaded file with tar -xvzf xdebug-2.1.3.tgz
Run: cd xdebug-2.1.3
Run: phpize

As part of its output it should show:

Configuring for:

Zend Module Api No: 20090626
Zend Extension Api No: 220090626
If it does not, you are using the wrong phpize. Please follow this FAQ entry and skip the next step.

Run: ./configure
Run: make
Run: cp modules/xdebug.so /Applications/MAMP/bin/php/php5.3.6/lib/php/extensions/no-debug-non-zts-20090626
Edit /Applications/MAMP/bin/php/php5.3.6/conf/php.ini and add the line
zend_extension = /Applications/MAMP/bin/php/php5.3.6/lib/php/extensions/no-debug-non-zts-20090626/xdebug.so
Restart the webserver