파이썬은 인터프리트 언어이고, 그런 이유로 tab이나 공백에 의해 문장을 구분한다.

아래는 공백이나 탭을 넣지 않고 while 문을 실행하여 발생한 에러이다.
>>> a,b = 0,1
>>> while b < 10:
... print b
  File "<stdin>", line 2
    print b
        ^
IndentationError: expected an indented block

아래는 탭을 이용하여 실행한 모습이다.
>>> a,b = 0,1
>>> while b < 10:
...    print b
...    a,b = b, a+b
...
1
1
2
3
5
8

아래는 공백을 이용하여 실행한 모습이다.
>>> a,b = 0,1
>>> while b < 10:
...  print b
...  a,b =b,a+b
...
1
1
2
3
5
8


Posted by 구차니
개소리 왈왈2010. 1. 20. 22:34
오오오~ 당해주겠어! 라고 그럴싸한 전화번호(010-1111-1111)을 넣고 한참을 기다렸더니


저 대머리 시키 누구야 ㄱ-

아무튼 skyrubber님 블로그에 가보니 전화번호 수집하는게 아닐까? 라고 하셨는데
호기심 발동해서 소스를 보니

<form name="form" method="post" enctype="multipart/form-data" action="./mailling.php" onSubmit="return FormCheck()">

FormCheck() 함수는 단순하게 10자리 입력인지 확인하는거고(헉 그럼 옛날 번호는 안되?)
mailing.php 가 수상해서 리눅스를 통해 wget 으로 파일을 받아서 확인해봤더니

 <meta http-equiv="refresh" content="0;url=sub.html">

심플하다.. 참고로 더 대머리 페이지가 sub.html
음.. 낙시라고 하기에는 도메인까지 사서 장난질이라서 규모가 크고
악성이라고 하기에는 코드가 너무 심플하고..


[발견 : http://jwmx.tistory.com/1740]
[링크 : http://blog.naver.com/skyrubber/90076267433]

'개소리 왈왈' 카테고리의 다른 글

아이스크림  (0) 2010.01.22
오늘도..  (0) 2010.01.22
토요일에 눈을 붙였다 눈을 떼보니..  (0) 2010.01.18
패딩 + 스키니 + 어그부츠 = ?  (4) 2010.01.16
국민은행 자동이체가 바뀐다고?  (2) 2010.01.16
Posted by 구차니
아.. 오묘한 언어의 세상 ㅠ.ㅠ

Note for C++/Java/C# Programmers
The self in Python is equivalent to the self pointer in C++ and the this reference in Java and C#.

[링크 : http://www.ibiblio.org/g2swap/byteofpython/read/self.html]

"네임스페이스"는 파이썬에서 변수를 담아두는 공간으로, 원래는 로컬, 모듈 전체, 빌트인 세 가지 네임스페이스를 찾도록 되어 있다가, 파이썬 2.1부터 상위에 싸여있는 것들도 찾도록 돼 있습니다.

[링크 : http://openlook.org/blog/2008/12/13/why-self-in-python-is-attractive/]

Posted by 구차니
프로그램 사용2010. 1. 20. 14:43


다운로드 & 게임고고싱 ㅋㅋ
한번 받아서 2000년까지 왔는데 증기기관도 못 만들었어 ㅠ.ㅠ

[링크 : http://freeciv.wikia.com/wiki/Main_Page]
[링크 : http://sourceforge.net/projects/freeciv/] << 다운로드

'프로그램 사용' 카테고리의 다른 글

IE8 에서 APM 접속시 (인트라넷)  (0) 2010.04.03
X-LUK DBC-UP 모니터 프로그램 :: somikon  (0) 2010.02.18
Cooliris (piclens)  (6) 2010.01.05
Fast Picture Viewer 제한사항  (0) 2009.12.27
BeeGIF - 대박 GIF 프로그램!  (2) 2009.12.13
Posted by 구차니
하드웨어2010. 1. 20. 10:34
예전에 전정/제계쪽에서 로봇제어용으로 블루투스 쓴다고 한거 같아서
어느정도 속도가 나오가 문득 궁금해져서 검색하게 되었다.
아무리 느리다고 해도 RS-232보다는 빠르니 충분히 시리얼을 대체할 무선 통신 기술이긴하다.
RS-232로 일반적으로 사용하는 속도가 9600bps 에서 115kbps 이니 지그비로는 조금 느릴수도 있겠지만
저전력을 감안하면 지그비도 나쁘진 않을듯 하다.

음.. 그런데 임베디드에서 어떻게 쓰지?


블루투스 SIG에는 소니 에릭슨, IBM, 노키아, 도시바가 참여하였다.
IEEE 802.15.1 규격을 사용하는 블루투스는 PANs(Personal Area Networks)의 산업 표준이다.
블루투스는 ISM 대역인 2.45GHz를 사용한다.
버전 1.1과 1.2의 경우 속도가 초당 723.1 킬로비트(723.1kb/s)에 달하며,
버전 2.0의 경우 EDR(Enhanced Data Rate)을 특징으로 하는데, 초당 2.1 메가비트(2.1Mb/s)의 속도를 낼 수 있다

[링크 : http://ko.wikipedia.org/wiki/블루투스]
[링크 : http://en.wikipedia.org/wiki/Bluetooth]

직비(영어: ZigBee)는 IEEE 802.15.4(PHY, MAC)에 기반한 무선 기술 스펙이다.
직비는 산업, 과학, 의학용 무선 주파수(ISM 밴드) 내에서 작동한다.
또한, 유럽에서는 868 MHz, 미국과 오스트레일리아에서는 915 MHz, 범세계적으로는 2.4 GHz 무선 주파수를 사용한다.

The radios use direct-sequence spread spectrum coding, which is managed by the digital stream into the modulator. BPSK is used in the 868 and 915 MHz bands, and orthogonal QPSK that transmits two bits per symbol is used in the 2.4 GHz band. The raw, over-the-air data rate is 250 kbit/s per channel in the 2.4 GHz band, 40 kbit/s per channel in the 915 MHz band, and 20 kbit/s in the 868 MHz band. Transmission range is between 10 and 75 meters (33 and 246 feet) and up to 1500 meters for zigbee pro, although it is heavily dependent on the particular environment. The maximum output power of the radios is generally 0 dBm (1 mW).

[링크 : http://ko.wikipedia.org/wiki/직비]
[링크 : http://en.wikipedia.org/wiki/ZigBee]

Posted by 구차니
회사일2010. 1. 19. 11:01
MPEG-1's known weaknesses:
    * an audio compression system limited to two channels (stereo.)
    * no standardized support for interlaced video with poor compression when used for interlaced video
    * only one standardized "profile" (Constrained Parameters Bitstream) which was unsuited for higher resolution video. MPEG-1 could support 4k video but there was no easy way to encode video for higher resolutions, and identify hardware capable of supporting it, as the limitations of such hardware were not defined.
    * Support for only one color space, 4:2:0.

[링크 : http://en.wikipedia.org/wiki/Mpeg2]



MPEG-2 part 1 ~ 11
Part  1 H.222.0
Part  2 H.262
Part  3 MPEG-2 BC - backwards compatible with MPEG-1 Audio
Part  4 - conformance testing
Part  5 - software simulation
Part  6 DSM-CC (Digital Storage Media Command and Control)
Part  7 MPEG-2 NBC (Audio - Non-Backwards Compatible with MPEG-1 Audio) / AAC
Part  8 - drop
Part  9
Part 10 DSM-CC
Part 11 IPMP (Intellectual Property Management and Protection)

Audio encoding
 MPEG-2 also introduces new audio encoding methods. These are:[12]
 MPEG-2 BC (backward compatible with MPEG-1 audio formats)[6][5][9]
     * low bitrate encoding with halved sampling rate (MPEG-1 Layer 1/2/3 LSF)
     * multichannel encoding with up to 5.1 channels
 MPEG-2 NBC (Non-Backward Compatible)[6][5]
     * MPEG-2 AAC
     * multichannel encoding with up to 48 channels

[링크 : http://en.wikipedia.org/wiki/Mpeg2]


MPEG-4 part 1 ~ 27
Part  1 System
Part  2 Visual
Part  3 Audio
Part  4 Conformance testing
Part  5 Reference software
Part  6 DMIF (Delivery Multimedia Integration Framework)
Part  7
Part  8 over IP
Part  9 Reference hardware description
Part 10 AVC (H.264)
Part 11
Part 12 3gp (iso base media file format)
Part 13 IPMP
Part 14 mp4
Part 15 AVC (Advanced Video Coding)
Part 16 AFX (Animation Framework eXtension)
Part 17
Part 18
Part 19
Part 20
Part 21
Part 22
Part 23
Part 24
Part 25
Part 26
Part 27

[링크 : http://en.wikipedia.org/wiki/MPEG-4]



H.262 or MPEG-2 Part 2(known as MPEG-2 Video) is a digital video compression and encoding standard.
H.263 is a video codec standard originally designed as a low-bitrate compressed format for videoconferencing.
H.264/MPEG-4 AVC is a standard for video compression.

H.262 [링크 : http://en.wikipedia.org/wiki/MPEG-2_Part_2]
H.263 [링크 : http://en.wikipedia.org/wiki/H.263]
H.264 [링크 : http://en.wikipedia.org/wiki/H.264]

'회사일' 카테고리의 다른 글

VLC 1.0.5 반전!  (2) 2010.03.11
인증서 복사하기  (0) 2010.03.04
ERP, SCM, CRM, EIS, MIS, DSS  (0) 2009.12.17
MP@ML MP@HL  (0) 2009.09.29
리셋 타이밍은 지켜주세요!  (0) 2009.06.30
Posted by 구차니
libxtst-dev 와
libgtk2.0-dev를 필요로 한다.


아무튼, CellWriter의 구조상.. 논리적 오류로
모든 변수들이 int 형이지, unsigned int형이 존재하지 않는다.

즉, 한글의 영역인 0xAC00은 마이너스 값으로 인식해서 제대로 계산을 하지 못한다.

수정할 곳은

common.h 46 line
typedef struct {
        short enabled;
        const unsigned int start, end;
        const char *name;
} UnicodeBlock;

cellwidget.c 1793 line
void cell_widget_train(void)
{
        UnicodeBlock *block;
        unsigned int i, pos, range;

        stop_timeout();

        /* Save cells */
        if (!training) {
                cells_saved = cells;
                cell_rows_saved = cell_rows;
                cell_cols_saved = cell_cols;
                cell_row_view_saved = cell_row_view;
                cells = NULL;
                cell_row_view = 0;
        }

        /* Clear if not training any block */
        if (training_block < 0) {
                free_cells();
                pack_cells(1, cell_cols);
                cell_widget_render();
                return;
        }

        /* Pack the Unicode block's characters into the cell grid */
        block = unicode_blocks + training_block;
        range = block->end - block->start + 1;
        training = TRUE;
        pack_cells((range + cell_cols - 1) / cell_cols, cell_cols);

        /* Preset all of the characters for training */
        for (i = 0, pos = 0; i < range; i++) {
                unsigned short ch;

                ch = block->start + i;
                if (char_disabled(ch))
                        continue;
                cells[pos].ch = ch;
                cells[pos].alts[0] = NULL;
                cells[pos++].flags = 0;
        }
        range = pos;
        for (; pos < cell_rows * cell_cols; pos++)
                clear_cell(pos);
        pack_cells(1, cell_cols);

        unclear(FALSE);
        cell_widget_render();
}


음.. 생각해보니
ㅋㅋㅋ 이런 자소도 있어야지 이모티콘을 쓰니 이녀석들을 위해 Jamo도 복구를 해야겠다.

그런데 대충 12000 자 인데.. 언제 학습시키지? ㄱ-

'프로그램 사용 > CellWriter' 카테고리의 다른 글

CellWriter 소스코드  (0) 2010.01.18
CellWriter - 리눅스용 필기인식 프로그램  (2) 2009.12.29
Posted by 구차니
C:\cellwriter-1.3.4\src\window.c
849            { FALSE, 0x1100, 0x11FF, "Hangul Jamo" },
911            { FALSE, 0x3130, 0x318F, "Hangul Compatibility Jamo" },
927            { FALSE, 0xAC00, 0xD7AF, "Hangul Syllables" },


음.. 내용을 검색해보니 window.c 에서 Hangul 이라는 키워드가 검출 되었다.

WindowsXP "굴림" 문자표 검색을 해보니
 Hangul Syllable (음절) 링크
 0xAC00 ~ 0xD7A3
 Hangul Choseong (초성)  0x1100 ~ 0x115F
 Hangul Jungseon (중성)  0x1160 ~ 0x11A2
 Hangul jongseon (종성)  0x11A8 ~ 0x11F9
이렇게 구분이 된다.

Unicode.org 에서

Hangul Jamo

Hangul Jamo Extended-A

Hangul Jamo Extended-B

Hangul Compatibility Jamo

Halfwidth Jamo

Hangul Syllables (.7MB)


이렇게 구분되긴 하지만, 실질적으로 우리가 보는 조합된 문자는 Syllabels에 들어있다.
그나저나.. Syllabels만 해도 11,171 글자인데.. 어느 세월에 학습을 하고 직접 입력을 하나 ㄱ-

2009/12/29 - [Linux/Ubuntu] - CellWriter - 리눅스용 필기인식 프로그램

Posted by 구차니
프로그램 사용/VLC2010. 1. 18. 15:40
우여곡절끝에 VLC를 컴파일 해서 samr / H.263 코덱으로 접속을 해도 에러는 나지 않도록 했는데..
RTSP 10초 timeout으로 플레이 까지는 하지 못한다.
도대체 VLC로 유튜브 플레이한 사람은.. 용자인가 -ㅁ-?




아무튼, youtube + RTSP로 검색하다보니, xHTML이 빠져서 그런거 같은 느낌이 강하게 든다..
도대체 이넘은 또 어떻게 산을 넘어가야 하나?

 YouTube launched its mobile site, YouTube Mobile on 15 June 2007. It is based on xHTML and uses 3GP videos with H263/AMR codec and RTSP streaming. It is available via a web interface at m.youtube.com or via YouTube's Mobile Java Application.

[링크 : http://blog.daum.net/johagnes/1890446]

'프로그램 사용 > VLC' 카테고리의 다른 글

의미는 없는 Linux / Windows VLC 차이  (0) 2010.01.26
VLC로 youtube 동영상 감상하기  (0) 2010.01.26
VLC compile [링크]  (0) 2010.01.15
ffmpeg + AMR + x264 + VLC?  (0) 2010.01.14
우분투에서 VLC 컴파일하기  (3) 2010.01.13
Posted by 구차니
개소리 왈왈2010. 1. 18. 14:34
월요일..


토요일에 롯데월드 갔다가
집에서 데굴멍하다가
일요일 새벽 3시 부터 자서 오후 3시 까지 Zzz..
잠시 일어나서 돌아다니다가 오후 9시 부터 자서 월요일 7:40am 기상


에이구 허리야 ㅠ.ㅠ
Posted by 구차니