2011년 9월 29일 목요일

[XML] XML 이란


아래 HTML을 XML요소로 구분해 본다면...

> < font size = '9' > test font

> font 는 요소 노드 (Element)
> size는 속성 노드(attribute)
> test font 는 값 노드(value)



2011년 9월 28일 수요일

[Python] String manipulation

1. length of string
>>> len(s)

2. Concatenate
>>> 'string1234' + 'string5678'

3. Casting to other type
>>> int("42")

4. Casting from other type to string
>>> x = 123
>>> str(x)

[Python] Control flow tool

1. if statement

if x<0:
     x = 0
elif x== 0:
     print 'zero'
elif x==1:
     print 'Single'
else:
     print 'More'


Don't forget indent!

2011년 9월 23일 금요일

[Java] 강제 익셉션 발생 - Exception

throw new Exception("User Define Exception > failed.");

2011년 9월 21일 수요일

[jQuery] Span object

  1. html()
    It's same as xx.innerHTML();
    It can create object such as select box, check box
    >>$("#obj").html("");
  2. text()
    It just replaces quote in span tag.
    It can't create object.
    >>$("#obj").text("");

[jQuery] Select box

  1. visibility
    --show
    $("#obj_name").css("visibility","visible");
    --hide
    $("#obj_name").css("visibility","hidden");
  2. event listener for change
    $("#select_lvl10").change(function(){
    -- blahblah
    });

2011년 9월 7일 수요일

2011년 9월 4일 일요일

[python] 괜찮은 파이썬 레퍼런스 사이트

http://www.tutorialspoint.com/python/

[python] 형변환

아주 간단한다.

str(integer) 혹은 int(string)

끝!

[python] 파이썬은 들여쓰기가 중요하다.

파이썬에서는 들여쓰기를 하지 않으면 문법오류가 날 수 있다.
예를들어
sample1
try:
    xxxx
이것과
sample2
try:
xxxx

샘플1과 샘플2는 엄연히 다른 코드로 인식한다.
물론 샘플1과 같이 작성해야한다.