http://blog.solapun.com/css으로
블러그 주소가 변경이 되었습니다.
JUIN100
2011년 3월 10일 목요일
2011년 3월 2일 수요일
jquery Slider 를 이용할경우 배경이미지 와 바 이미지를 변경하고자 할경우
http://blog.solapun.com/css
스타일을 아래와 같이 추가를 하면 정상적으로 변경이 된다.
[배경을 바꿔주는 스타일]
.ui-widget-content {border:none;background:url(test2.jpg) 50% 50% repeat-x; }
.ui-widget-header { background: transparent;}
[바 이미지를 변경해 주는 스타일]
.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border:none;background:url(test3.jpg)undefined no-repeat;}
.ui-state-focus { border:none;background:url(test3.jpg) no-repeat;}
.ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { border:none;background:url(test3.jpg) no-repeat;}
예문링크
http://blog.juin100.co.kr/xe/css/textyle/825
스타일을 아래와 같이 추가를 하면 정상적으로 변경이 된다.
[배경을 바꿔주는 스타일]
.ui-widget-content {border:none;background:url(test2.jpg) 50% 50% repeat-x; }
.ui-widget-header { background: transparent;}
[바 이미지를 변경해 주는 스타일]
.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border:none;background:url(test3.jpg)undefined no-repeat;}
.ui-state-focus { border:none;background:url(test3.jpg) no-repeat;}
.ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { border:none;background:url(test3.jpg) no-repeat;}
예문링크
http://blog.juin100.co.kr/xe/css/textyle/825
2011년 2월 11일 금요일
2011년 2월 7일 월요일
[서버운영] 서버의 인코딩(캐릭터셋) 환경 세팅 개념. encoding, charset, characterset
[출처:phpschool]
[http://blog.solapun.com/css]
1. ssh
file : ~/.bash_profile
export LANG=ko_KR.UTF-8
or
export LANG=ko_KR.EUC-KR
putty, securecrt 등의 ssh client 에서도 맞춰줘야 함.
설정하면? ls 할 때 글자 안깨짐. 끝.
2. ftp
서버설정 없음.
filezilla 에서 사이트관리자에 등록을 하면 문자셋 탭에서 UTF-8 이나 CP949 로 설정하면 됨.
설정하면? ftp 로 볼 때 글자 안깨지고, php 에서 UTF-8 로 파일명 쓸 수 있음.
3. web server (apache 등)
필요 없음. AddDefaultCharset 같은건 다 주석.
4. php
default_charset = utf-8
or
default_charset = x-windows-949
5. html
or
반드시 head 바로 밑에 meta
title 등 한국어가 위에 나오면 절대 안됨.
6. mysql
file: init 의 mysql 스크립트
--character-set-server=utf8
or
--character-set-server=euckr
옵션 변경
주의할 점은 처음 설치시 해야 한다는 것.
데이터가 있는데 이걸 바꾸면 다 깨짐.
mysql> show variables like 'ch%';
+--------------------------+----------------------------+
| Variable_name | Value |
+--------------------------+----------------------------+
| character_set_client | utf8 |
| character_set_connection | utf8 |
| character_set_database | utf8 |
| character_set_filesystem | binary |
| character_set_results | utf8 |
| character_set_server | utf8 |
| character_set_system | utf8 |
| character_sets_dir | /usr/share/mysql/charsets/ |
+--------------------------+----------------------------+
8 rows in set (0.00 sec)
php 에서 접속시 mysql_query('set names utf8'); 하는 것을 추천.
my.cnf 에 character-set-client-handshake = false 하는 방법도 있는데 비추.
utf8이 짱.
http://www.phpschool.com/gnuboard4/bbs/board.php?bo_table=tipntech&wr_id=58038&sca=&sfl=wr_name%7C%7Csubject&stx=%BC%DB%C8%BF%C1%F8&sop=and&page=5
License : Public Domain
Written by Song Hyo-Jin (shj at xenosi.de)
[http://blog.solapun.com/css]
1. ssh
file : ~/.bash_profile
export LANG=ko_KR.UTF-8
or
export LANG=ko_KR.EUC-KR
putty, securecrt 등의 ssh client 에서도 맞춰줘야 함.
설정하면? ls 할 때 글자 안깨짐. 끝.
2. ftp
서버설정 없음.
filezilla 에서 사이트관리자에 등록을 하면 문자셋 탭에서 UTF-8 이나 CP949 로 설정하면 됨.
설정하면? ftp 로 볼 때 글자 안깨지고, php 에서 UTF-8 로 파일명 쓸 수 있음.
3. web server (apache 등)
필요 없음. AddDefaultCharset 같은건 다 주석.
4. php
default_charset = utf-8
or
default_charset = x-windows-949
5. html
or
반드시 head 바로 밑에 meta
title 등 한국어가 위에 나오면 절대 안됨.
6. mysql
file: init 의 mysql 스크립트
--character-set-server=utf8
or
--character-set-server=euckr
옵션 변경
주의할 점은 처음 설치시 해야 한다는 것.
데이터가 있는데 이걸 바꾸면 다 깨짐.
mysql> show variables like 'ch%';
+--------------------------+----------------------------+
| Variable_name | Value |
+--------------------------+----------------------------+
| character_set_client | utf8 |
| character_set_connection | utf8 |
| character_set_database | utf8 |
| character_set_filesystem | binary |
| character_set_results | utf8 |
| character_set_server | utf8 |
| character_set_system | utf8 |
| character_sets_dir | /usr/share/mysql/charsets/ |
+--------------------------+----------------------------+
8 rows in set (0.00 sec)
php 에서 접속시 mysql_query('set names utf8'); 하는 것을 추천.
my.cnf 에 character-set-client-handshake = false 하는 방법도 있는데 비추.
utf8이 짱.
http://www.phpschool.com/gnuboard4/bbs/board.php?bo_table=tipntech&wr_id=58038&sca=&sfl=wr_name%7C%7Csubject&stx=%BC%DB%C8%BF%C1%F8&sop=and&page=5
License : Public Domain
Written by Song Hyo-Jin (shj at xenosi.de)
2011년 1월 13일 목요일
PHP Design Patterns Builder
[출처] http://www.fluffycat.com/PHP-Design-Patterns/ , http://www.liveware.kr
About the Builder
In the Builder Pattern a director and a builder work together to build an object. The director controls the building and specifies what parts and variations will go into an object. The builder knows how to assemble the object given specification.
In this example we have a director, HTMLPageDirector, which is given a builder, HTMLPageBuilder. The director tells the builder what the pageTitle will be, what the pageHeading will be, and gives multiple lines of text for the page. The director then has the bulder do a final assembly of the parts, and return the page.
Note that the html tags I use in the example code have [ and ] instead of < and > so this page will display correctly.
AbstractPageBuilder.php
//copyright Lawrence Truett and FluffyCat.com 2006, all rights reserved
abstract class AbstractPageBuilder {
abstract function getPage();
}
AbstractPageDirector.php
//copyright Lawrence Truett and FluffyCat.com 2006, all rights reserved
abstract class AbstractPageDirector {
abstract function __construct(AbstractPageBuilder $builder_in);
abstract function buildPage();
abstract function getPage();
}
HTMLPage.php
//copyright Lawrence Truett and FluffyCat.com 2006, all rights reserved
class HTMLPage {
private $page = NULL;
private $page_title = NULL;
private $page_heading = NULL;
private $page_text = NULL;
function __construct() {
}
function showPage() {
return $this->page;
}
function setTitle($title_in) {
$this->page_title = $title_in;
}
function setHeading($heading_in) {
$this->page_heading = $heading_in;
}
function setText($text_in) {
$this->page_text .= $text_in;
}
function formatPage() {
$this->page = '[html]';
$this->page .=
'[head][title]'.$this->page_title.'[/title][/head]';
$this->page .= '[body]';
$this->page .= '[h1]'.$this->page_heading.'[/h1]';
$this->page .= $this->page_text;
$this->page .= '[/body]';
$this->page .= '[/html]';
}
}
HTMLPageBuilder.php
//copyright Lawrence Truett and FluffyCat.com 2006, all rights reserved
include_once('AbstractPageBuilder.php');
include_once('HTMLPage.php');
class HTMLPageBuilder extends AbstractPageBuilder {
private $page = NULL;
function __construct() {
$this->page = new HTMLPage();
}
function setTitle($title_in) {
$this->page->setTitle($title_in);
}
function setHeading($heading_in) {
$this->page->setHeading($heading_in);
}
function setText($text_in) {
$this->page->setText($text_in);
}
function formatPage() {
$this->page->formatPage();
}
function getPage() {
return $this->page;
}
}
HTMLPageDirector.php
//copyright Lawrence Truett and FluffyCat.com 2006, all rights reserved
include_once('AbstractPageBuilder.php');
include_once('AbstractPageDirector.php');
class HTMLPageDirector extends AbstractPageDirector {
private $builder = NULL;
public function __construct(AbstractPageBuilder $builder_in) {
$this->builder = $builder_in;
}
public function buildPage() {
$this->builder->setTitle('Testing the HTMLPage');
$this->builder->setHeading('Testing the HTMLPage');
$this->builder->setText('Testing, testing, testing!');
$this->builder->setText('Testing, testing, testing, or!');
$this->builder->setText('Testing, testing, testing, more!');
$this->builder->formatPage();
}
public function getPage() {
return $this->builder->getPage();
}
}
testBuilder.php
//copyright Lawrence Truett and FluffyCat.com 2006, all rights reserved
include_once('BookSingleton.php');
include_once('HTMLPage.php');
include_once('HTMLPageBuilder.php');
include_once('HTMLPageDirector.php');
define('BR', '<'.'BR'.'>');
echo 'BEGIN TESTING BUILDER PATTERN'.BR;
echo BR;
$pageBuilder = new HTMLPageBuilder();
$pageDirector = new HTMLPageDirector($pageBuilder);
$pageDirector->buildPage();
$page = $pageDirector->GetPage();
echo $page->showPage();
echo BR.BR;
echo 'END TESTING BUILDER PATTERN'.BR;
output of testBuilder.php
BEGIN TESTING BUILDER PATTERN
Testing the HTMLPage
Testing, testing, testing, or!
Testing, testing, testing, more!
END TESTING BUILDER PATTERN
About the Builder
In the Builder Pattern a director and a builder work together to build an object. The director controls the building and specifies what parts and variations will go into an object. The builder knows how to assemble the object given specification.
In this example we have a director, HTMLPageDirector, which is given a builder, HTMLPageBuilder. The director tells the builder what the pageTitle will be, what the pageHeading will be, and gives multiple lines of text for the page. The director then has the bulder do a final assembly of the parts, and return the page.
Note that the html tags I use in the example code have [ and ] instead of < and > so this page will display correctly.
AbstractPageBuilder.php
//copyright Lawrence Truett and FluffyCat.com 2006, all rights reserved
abstract class AbstractPageBuilder {
abstract function getPage();
}
AbstractPageDirector.php
//copyright Lawrence Truett and FluffyCat.com 2006, all rights reserved
abstract class AbstractPageDirector {
abstract function __construct(AbstractPageBuilder $builder_in);
abstract function buildPage();
abstract function getPage();
}
HTMLPage.php
//copyright Lawrence Truett and FluffyCat.com 2006, all rights reserved
class HTMLPage {
private $page = NULL;
private $page_title = NULL;
private $page_heading = NULL;
private $page_text = NULL;
function __construct() {
}
function showPage() {
return $this->page;
}
function setTitle($title_in) {
$this->page_title = $title_in;
}
function setHeading($heading_in) {
$this->page_heading = $heading_in;
}
function setText($text_in) {
$this->page_text .= $text_in;
}
function formatPage() {
$this->page = '[html]';
$this->page .=
'[head][title]'.$this->page_title.'[/title][/head]';
$this->page .= '[body]';
$this->page .= '[h1]'.$this->page_heading.'[/h1]';
$this->page .= $this->page_text;
$this->page .= '[/body]';
$this->page .= '[/html]';
}
}
HTMLPageBuilder.php
//copyright Lawrence Truett and FluffyCat.com 2006, all rights reserved
include_once('AbstractPageBuilder.php');
include_once('HTMLPage.php');
class HTMLPageBuilder extends AbstractPageBuilder {
private $page = NULL;
function __construct() {
$this->page = new HTMLPage();
}
function setTitle($title_in) {
$this->page->setTitle($title_in);
}
function setHeading($heading_in) {
$this->page->setHeading($heading_in);
}
function setText($text_in) {
$this->page->setText($text_in);
}
function formatPage() {
$this->page->formatPage();
}
function getPage() {
return $this->page;
}
}
HTMLPageDirector.php
//copyright Lawrence Truett and FluffyCat.com 2006, all rights reserved
include_once('AbstractPageBuilder.php');
include_once('AbstractPageDirector.php');
class HTMLPageDirector extends AbstractPageDirector {
private $builder = NULL;
public function __construct(AbstractPageBuilder $builder_in) {
$this->builder = $builder_in;
}
public function buildPage() {
$this->builder->setTitle('Testing the HTMLPage');
$this->builder->setHeading('Testing the HTMLPage');
$this->builder->setText('Testing, testing, testing!');
$this->builder->setText('Testing, testing, testing, or!');
$this->builder->setText('Testing, testing, testing, more!');
$this->builder->formatPage();
}
public function getPage() {
return $this->builder->getPage();
}
}
testBuilder.php
//copyright Lawrence Truett and FluffyCat.com 2006, all rights reserved
include_once('BookSingleton.php');
include_once('HTMLPage.php');
include_once('HTMLPageBuilder.php');
include_once('HTMLPageDirector.php');
define('BR', '<'.'BR'.'>');
echo 'BEGIN TESTING BUILDER PATTERN'.BR;
echo BR;
$pageBuilder = new HTMLPageBuilder();
$pageDirector = new HTMLPageDirector($pageBuilder);
$pageDirector->buildPage();
$page = $pageDirector->GetPage();
echo $page->showPage();
echo BR.BR;
echo 'END TESTING BUILDER PATTERN'.BR;
output of testBuilder.php
BEGIN TESTING BUILDER PATTERN
Testing the HTMLPage
Testing, testing, testing!Testing, testing, testing, or!
Testing, testing, testing, more!
END TESTING BUILDER PATTERN
[jquery] jquery 를 이용하여 A 태그 의 href 를 사용하지 않는방법
$('#myLink').click(function(e) {
e.preventDefault();
//do other stuff when a click happens
});
preventDefault()
이벤트 메소드로
event의 실행을 막는 기능을 한다.
e.preventDefault();
//do other stuff when a click happens
});
preventDefault()
이벤트 메소드로
event의 실행을 막는 기능을 한다.
2011년 1월 5일 수요일
TED 한국어 서비스
http://blog.solapun.com/?mid=textyle&category=79&vid=css&document_srl=657
http://www.ted.com/index.php/translate/languages/kor
TED.com은 전세계 유명인의 지식을 전파하는 사이트입니다.
그것도 한국어 버전으로 번역해서 나오고 암튼 2010년도에 알게된 가장 괜찮은 사이트
http://www.ted.com/index.php/translate/languages/kor
TED.com은 전세계 유명인의 지식을 전파하는 사이트입니다.
그것도 한국어 버전으로 번역해서 나오고 암튼 2010년도에 알게된 가장 괜찮은 사이트
피드 구독하기:
게시물 (Atom)