'2012/03'에 해당되는 글 6건

  1. 2012/03/29 visualp css, hack , ie hack selector
  2. 2012/03/21 visualp [c#]인터넷 주소창 주소 구하기
  3. 2012/03/19 visualp php 동적변수 사용하기
  4. 2012/03/19 visualp 아파치 디렉토리 목록 노출 방지
  5. 2012/03/08 visualp 리눅스 문자열 찾기
  6. 2012/03/04 visualp MySQL INSERT의 사용법

css, hack , ie hack selector

웹표준 RSS Icon ATOM Icon 2012/03/29 13:51 visualp

Target ALL VERSIONS of IE

<!--[if IE]>
	<link rel="stylesheet" type="text/css" href="all-ie-only.css" />
<![endif]-->

Target everything EXCEPT IE

<!--[if !IE]><!-->
	<link rel="stylesheet" type="text/css" href="not-ie.css" />
 <!--<![endif]-->

Target IE 7 ONLY

<!--[if IE 7]>
	<link rel="stylesheet" type="text/css" href="ie7.css">
<![endif]-->

Target IE 6 ONLY

<!--[if IE 6]>
	<link rel="stylesheet" type="text/css" href="ie6.css" />
<![endif]-->

Target IE 5 ONLY

<!--[if IE 5]>
	<link rel="stylesheet" type="text/css" href="ie5.css" />
<![endif]-->

Target IE 5.5 ONLY

<!--[if IE 5.5000]>
<link rel="stylesheet" type="text/css" href="ie55.css" />
<![endif]-->

Target IE 6 and LOWER

<!--[if lt IE 7]>
	<link rel="stylesheet" type="text/css" href="ie6-and-down.css" />
<![endif]-->
<!--[if lte IE 6]>
	<link rel="stylesheet" type="text/css" href="ie6-and-down.css" />
<![endif]-->

Target IE 7 and LOWER

<!--[if lt IE 8]>
	<link rel="stylesheet" type="text/css" href="ie7-and-down.css" />
<![endif]-->
<!--[if lte IE 7]>
	<link rel="stylesheet" type="text/css" href="ie7-and-down.css" />
<![endif]-->

Target IE 8 and LOWER

<!--[if lt IE 9]>
	<link rel="stylesheet" type="text/css" href="ie8-and-down.css" />
<![endif]-->
<!--[if lte IE 8]>
	<link rel="stylesheet" type="text/css" href="ie8-and-down.css" />
<![endif]-->

Target IE 6 and HIGHER

<!--[if gt IE 5.5]>
	<link rel="stylesheet" type="text/css" href="ie6-and-up.css" />
<![endif]-->
<!--[if gte IE 6]>
	<link rel="stylesheet" type="text/css" href="ie6-and-up.css" />
<![endif]-->

Target IE 7 and HIGHER

<!--[if gt IE 6]>
	<link rel="stylesheet" type="text/css" href="ie7-and-up.css" />
<![endif]-->
<!--[if gte IE 7]>
	<link rel="stylesheet" type="text/css" href="ie7-and-up.css" />
<![endif]-->

Target IE 8 and HIGHER

<!--[if gt IE 7]>
	<link rel="stylesheet" type="text/css" href="ie8-and-up.css" />
<![endif]-->
<!--[if gte IE 8]>
	<link rel="stylesheet" type="text/css" href="ie8-and-up.css" />
<![endif]-->


Universal IE 6 CSS

Dealing with IE 6 and below is always an extra-special challenge. These days people are dropping support for it right and left, including major businesses, major web apps, and even governments. There is a better solution than just letting the site go to hell, and that is to server IE 6 and below a special stripped-down stylesheet, and then serve IE 7 and above (and all other browsers) the regular CSS. This is been coined the universal IE 6 CSS.

<!--[if !IE 6]><!-->
  <link rel="stylesheet" type="text/css" media="screen, projection" href="REGULAR-STYLESHEET.css" />
<!--<![endif]-->

<!--[if gte IE 7]>
  <link rel="stylesheet" type="text/css" media="screen, projection" href="REGULAR-STYLESHEET.css" />
<![endif]-->

<!--[if lte IE 6]>
  <link rel="stylesheet" type="text/css" media="screen, projection" href="http://universal-ie6-css.googlecode.com/files/ie6.0.3.css" />
<![endif]-->

Hacks

If you must...

IE-6 ONLY

* html #div {
    height: 300px;
}

IE-7 ONLY

*+html #div {
    height: 300px;
}

IE-8 ONLY

#div {
  height: 300px\0/;
}

IE-7 & IE-8

#div {
  height: 300px\9;
}

NON IE-7 ONLY:

#div {
   _height: 300px;
}

Hide from IE 6 and LOWER:

#div {
   height/**/: 300px;
}
html > body #div {
      height: 300px;
}


이올린에 북마크하기(0) 이올린에 추천하기(0)
받은 트랙백이 없고, 댓글이 없습니다.

댓글+트랙백 RSS :: http://blog.visualp.com/rss/response/470

댓글+트랙백 ATOM :: http://blog.visualp.com/atom/response/470

[c#]인터넷 주소창 주소 구하기

C# RSS Icon ATOM Icon 2012/03/21 09:10 visualp
[참조1] : http://www.devpia.com/MAEUL/Contents/Detail.aspx?BoardID=17&MAEULNo=8&no=76714&ref=76714

[참조2]:http://blog.naver.com/PostView.nhn?blogId=yunani99&logNo=30111649113
(패킷캡쳐)
[참조3]:http://www.codeproject.com/Articles/4217/Packet-Sniffing-with-Winpcap-Functions-Ported-to-a
이올린에 북마크하기(0) 이올린에 추천하기(0)
받은 트랙백이 없고, 댓글이 없습니다.

댓글+트랙백 RSS :: http://blog.visualp.com/rss/response/469

댓글+트랙백 ATOM :: http://blog.visualp.com/atom/response/469

php 동적변수 사용하기

PHP RSS Icon ATOM Icon 2012/03/19 13:29 visualp

[원문] : http://blog.daum.net/kunsooretro/76
[php.net] : http://php.net/manual/kr/language.variables.variable.php

폼에서 동적으로 변수 보내는법 :

예)

<input type="text" name="s_no<?=$i?>">


예를 들어서 FORM으로 s_no0, s_no1, s_no2라는 변수로 php파일에 넘어오면


동적으로 PHP에서 변수를 대입시키고 싶을때..


이렇게하면

${'s_no'.$i}

동적으로 변수 표현가능..

이올린에 북마크하기(0) 이올린에 추천하기(0)
받은 트랙백이 없고, 댓글이 없습니다.

댓글+트랙백 RSS :: http://blog.visualp.com/rss/response/468

댓글+트랙백 ATOM :: http://blog.visualp.com/atom/response/468

/usr/local/apache/conf/extra/httpd-autoindex.conf


IndexIgnore .??* *~ *
이올린에 북마크하기(0) 이올린에 추천하기(0)
받은 트랙백이 없고, 댓글이 없습니다.

댓글+트랙백 RSS :: http://blog.visualp.com/rss/response/467

댓글+트랙백 ATOM :: http://blog.visualp.com/atom/response/467

리눅스 문자열 찾기

Linux RSS Icon ATOM Icon 2012/03/08 17:07 visualp
 grep -e  "문자열" "경로" -R
경로 밑에 있는 문자열이 포함된 모든 것을 찾는다.
이올린에 북마크하기(0) 이올린에 추천하기(0)
받은 트랙백이 없고, 댓글이 없습니다.

댓글+트랙백 RSS :: http://blog.visualp.com/rss/response/466

댓글+트랙백 ATOM :: http://blog.visualp.com/atom/response/466

MySQL INSERT의 사용법

Mysql RSS Icon ATOM Icon 2012/03/04 14:51 visualp
[원문] : http://webtech.tistory.com/31

1. MySQL INSERT의 사용법


MySQL 공식 Document에서는 아래와 같이 사용법을 정의 하고 있다.(참고, http://dev.mysql.com/doc/refman/5.5/en/insert.html)
각각의 의미는 천천히 살펴보면 누구나 알 수 있을 것이다.
INSERT [LOW_PRIORITY | DELAYED | HIGH_PRIORITY] [IGNORE] [INTO] tbl_name [(col_name,...)] {VALUES | VALUE} ({expr | DEFAULT},...),(...),... [ ON DUPLICATE KEY UPDATE col_name=expr [, col_name=expr] ... ]

OR:

INSERT [LOW_PRIORITY | DELAYED | HIGH_PRIORITY] [IGNORE]
[INTO] tbl_name SET col_name={expr | DEFAULT}, ...
[ ON DUPLICATE KEY UPDATE
col_name=expr
[, col_name=expr] ... ]
OR: 
INSERT [LOW_PRIORITY | HIGH_PRIORITY] [IGNORE]
[INTO] tbl_name [(col_name,...)] SELECT ...
[ ON DUPLICATE KEY UPDATE
col_name=expr
[, col_name=expr] ... ]

Document상에 있는 내용을 번역은 아니고, 나름 이해해서 설명 하자면...

INSERT는 이미 존재하는 Table에 새로운 rows를 추가한다.
[INSERT ... VALUES]와 [INSERT ... SET]과 같은 문장 형식은 특정한 값을 명확하고 추가하며, [INSERT ... SELECT] 형식은 다른 Table 혹은 Table들로 부터 선택된 값들을 추가 한다.(여기서 주의 해서 봐야 할 부분은 [다른 Table혹은 Table들]이다. 즉 subquery내에 동일한 Table명이 있으면 안 된다. 달리 말해 동일한 테이블의 일부를 다시 넣는 방식으로는 이와 같은 문법으로 작동 하지 않는다는 뜻이다.)
이전 row의 값을 덮어 쓰고자 한다면 INSERT대신 REPLACE를 사용할 수 있다. REPLACE는 Primary key나 Unique index와 같은 새로운 row를 추가 하고자 한다면, 이전 row를 먼저 지우고 새로운 row를 추가 하는 방식으로 동작한다. 중복되지 않는 것은 그냥 INSERT와 동일하게 동작한다.

위에서 사용된 tbl_name은 추가 되어야 할 row들이 들어갈 Table명을 의미 한다.
column name은 Table명 뒤에 콤마(,)로 분리된 리스트로 작성 할 수 있으며, 이 경우 각 column name에 해당하는 값을 VALUES리스트나 SELECT문으로 제공해야 한다. 만약 column name을 작성하지 않는다면, 해당 테이블의 모든 column의 값들을 VALUES리스트나 SELECT문으로 제공해야 한다. 테이블의 column을 모른다면 DESCRIBE tbl_name으로 찾을 수 있다.

SET절은 column이 명확하게 지정되는 것을 나타낸다.

column의 값은 여러가지 방법들로 주어질 수 있으며, 많이 사용하거나 중요한 내용만 몇가지 다루고자 한다.

먼저 가장 일반적인 방법이다.

INSERT INTO tbl_name (col1,col2) VALUES(15, 30)

해당 필드명과 값들의 리스트를 순서대로 나열하는 방식이다. 이때 반드시 컬럼의 수와 값의 수가 같아야 하며, NOT NULL이 아닌 필드는 포함되지 않아도 된다.



다음은 필드 리스트의 생략이다.

INSERT INTO tbl_name VALUES(15, 30); ==> tbl_name테이블의 필드가 2개라면...

이때는 반드시 컬럼의 수만큼 값의 리스트를 제공해야 한다.



SET 키워드를 이용한 방법.

INSERT INTO tbl_name SET col1 = 15, col2 = 30;

SET키워드 뒤에 컴럼과 값의 쌍으로 나열해 주면 된다.



INSERT ... SELECT를 이용한 방법.

INSERT INTO tbl_name (col1,col2) SELECT 15, 30;

다른 column명을 참조를 통한 방법.

INSERT INTO tbl_name (col1,col2) VALUES(15,col1*2);

이 경우 참조되는 column은 꼭 먼저 값이 설정되어야 한다. 아래와 같이 하면 안된다.
INSERT INTO tbl_name (col1,col2) VALUES(col2*2,15);
col2가 15로 설정되기 전에 col1에 col2*2를 넣으라고 하면 안된다는 것이다.


VALUES를 이용한 multiple rows.

INSERT INTO tbl_name (a,b,c) VALUES(1,2,3),(4,5,6),(7,8,9);

참고로 AUTO_INCREMENT로 증가된 값을 알고 싶다면 mysql_insert_id()함수를 사용하면 된다. 이에대한 자세한 정보는 아래 링크를 참조하기 바란다.
http://dev.mysql.com/doc/refman/5.5/en/mysql-insert-id.html

마지막으로 당연한 것이지만, INSERT는 해당 Table에 대한 INSERT권한이 있어야만 한다.

이올린에 북마크하기(0) 이올린에 추천하기(0)
받은 트랙백이 없고, 댓글이 없습니다.

댓글+트랙백 RSS :: http://blog.visualp.com/rss/response/465

댓글+트랙백 ATOM :: http://blog.visualp.com/atom/response/465