<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
	<channel>
		<title>호빵네트워크</title>
		<link>http://hoppang.net/tc/</link>
		<description>사람은 핸들과 키보드를 잡으면 난폭해진다</description>
		<language>ko</language>
		<pubDate>Thu, 04 Mar 2010 16:04:34 +0900</pubDate>
		<generator>Textcube 1.7.8 : Con moto</generator>
		<image>
		<title>호빵네트워크</title>
		<url>http://hoppang.net/tc/attach/1/2374939270.jpg</url>
		<link>http://hoppang.net/tc/</link>
		<width>222</width>
		<height>166</height>
		<description>사람은 핸들과 키보드를 잡으면 난폭해진다</description>
		</image>
		<item>
			<title>ToHeart 2 .PAK 파일 분해기</title>
			<link>http://hoppang.net/tc/63</link>
			<description>&lt;br&gt;앗시바 글쓰다 날려먹었군...&lt;br&gt;&lt;br&gt;주제는 ToHeart2 .PAK 파일 분해기&lt;br&gt;&lt;br&gt;근데 저 pak 파일이라는게 좀 지나치게 단순한 포맷이라&lt;br&gt;&lt;br&gt;프로그램에 뭐가 있을거란 기대는 금지&lt;br&gt;&lt;br&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;작성동기&lt;/span&gt;&lt;br&gt;&lt;br&gt;엊저녁 할일이 없었다&lt;br&gt;&lt;br&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;라이센스&lt;/span&gt;&lt;br&gt;&lt;br&gt;이 프로그램을 다운받으면 호빵님의 노예가 되는 라이센스.txt&lt;br&gt;&lt;br&gt;라고 하고싶지만 제작사(나 말고) 사정상 &lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;GPL&lt;/span&gt;임...&lt;br&gt;&lt;br&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;판매가격&lt;/span&gt;&lt;br&gt;&lt;br&gt;매달 님 통장 혹은 부모님 통장에서 통신사로 나가고 있으니 신경쓸거 없음&lt;br&gt;&lt;br&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;소스코드 공개 여부&lt;/span&gt;&lt;br&gt;&lt;br&gt;필요한 사람 댓글남기면 택배로 보내줌&lt;br&gt;&lt;br&gt;...농담이고 머 원한다면 주겠지만(아니 줘야되지만) 전혀 가치 없는 물건이라...&lt;br&gt;&lt;br&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;도움주신 분&lt;/span&gt;&lt;br&gt;&lt;br&gt;뭔 배짱으로 월급을 받는지 알 도리 없는 리프사의 어떤 프로그래머&lt;br&gt;&lt;br&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;사용법&lt;/span&gt;&lt;br&gt;&lt;br&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;예제&amp;gt;&lt;/span&gt; &lt;span style=&quot;font-weight: bold;&quot;&gt;th2_unpack grp.pak&lt;/span&gt;&lt;br&gt;&lt;br&gt;하면 grp.pak의 모든 파일이 해체돼서 나옴&lt;br&gt;&lt;br&gt;압축돼있던 놈은 압축 풀려서 나옴&lt;br&gt;&lt;br&gt;기존에 같은이름 파일이 있으면 묻지도 따지지도 않고 덮어씌움&lt;br&gt;&lt;br&gt;예외, 오류처리 &lt;span style=&quot;text-decoration: line-through;&quot;&gt;일절 없음&lt;/span&gt; 쪼금 있음&lt;br&gt;&lt;br&gt;인자로 넘긴 파일이 투하트의 .pak 파일이 아니면 &lt;span style=&quot;text-decoration: line-through;&quot;&gt;무슨일이 벌어질진 나도 모름&lt;/span&gt; 안풀림&lt;br&gt;&lt;br&gt;테스트용 출력문을 안제거해서 시끄러움&lt;br&gt;&lt;br&gt;실행하려고 할때 나도 모르는 어떤 dll등을 요구할수도 있으니&lt;br&gt;&lt;br&gt;그런 상황이 만에하나 발생할경우 댓글로 신고 바람&lt;br&gt;&lt;br&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;사용중 이상발생시&lt;/span&gt;&lt;br&gt;&lt;br&gt;책임안짐 배째&lt;br&gt;&lt;br&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;실행환경&lt;/span&gt;&lt;br&gt;&lt;br&gt;win7 64비트에서 테스트됐으나 32비트 실행파일임&lt;br&gt;&lt;br&gt;제일 중요한 &lt;span style=&quot;font-weight: bold;&quot;&gt;다운경로&lt;/span&gt;&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://hoppang.net/pds/th2_unpack.exe&quot; target=&quot;_blank&quot;&gt;http://hoppang.net/pds/th2_unpack.exe&lt;/a&gt;&lt;br&gt;&lt;br&gt;안받아지면 쫌 기둘&lt;br&gt;&lt;br&gt;&lt;span style=&quot;text-decoration: line-through;&quot;&gt;변형된(압축된도 아니고..) PAK 파일 풀기 기능 추가한 patch1 버전 새로 올림&lt;/span&gt;&lt;br&gt;&lt;br&gt;&lt;span style=&quot;text-decoration: underline;&quot;&gt;버그 급 수정한 patch2 버전 올림..&lt;/span&gt;&lt;br&gt;&lt;br&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;마지막으로&lt;/span&gt;&lt;br&gt;&lt;br&gt;링크 한줄로 끝낼려고 했는데 어째 말이 많아졌다&lt;br&gt;&lt;br&gt;아참 같은 엔진 쓰는 겜은 다 풀릴듯.. 장담은 못함&lt;br&gt;&lt;fieldset style=&quot;margin:20px 0px 20px 0px;padding:5px;&quot;&gt;&lt;legend&gt;&lt;span&gt;&lt;strong&gt;크리에이티브 커먼즈 라이센스&lt;/strong&gt;&lt;/span&gt;&lt;/legend&gt;&lt;!--Creative Commons License--&gt;&lt;div style=&quot;float: left; width: 88px; margin-top: 3px;&quot;&gt;&lt;a rel=&quot;license&quot; href=&quot;http://creativecommons.org/licenses/by-nc-nd/2.0/kr/&quot; target=_blank&gt;&lt;img alt=&quot;Creative Commons License&quot; style=&quot;border-width: 0&quot; src=&quot;http://i.creativecommons.org/l/by-nc-nd/2.0/kr/88x31.png&quot;/&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;margin-left: 92px; margin-top: 3px; text-align: justify;&quot;&gt;이 저작물은 &lt;a rel=&quot;license&quot; href=&quot;http://creativecommons.org/licenses/by-nc-nd/2.0/kr/&quot; target=_blank&gt;크리에이티브 커먼즈 코리아 저작자표시-비영리-변경금지 2.0 대한민국 라이센스&lt;/a&gt;에 따라 이용하실 수 있습니다.
			&lt;!-- Creative Commons License--&gt;
			&lt;!-- &lt;rdf:RDF xmlns=&quot;http://web.resource.org/cc/&quot; xmlns:dc=&quot;http://purl.org/dc/elements/1.1/&quot; xmlns:rdf=&quot;http://www.w3.org/1999/02/22-rdf-syntax-ns#&quot;&gt;
			&lt;Work rdf:about=&quot;&quot;&gt;
			&lt;license rdf:resource=&quot;http://creativecommons.org/licenses/by-nc-nd/2.0/kr/&quot; /&gt;
			&lt;/Work&gt;
			&lt;License rdf:about=&quot;http://creativecommons.org/licenses/by-nc-nd/&quot;&gt;
			&lt;permits rdf:resource=&quot;http://web.resource.org/cc/Reproduction&quot;/&gt;
			&lt;permits rdf:resource=&quot;http://web.resource.org/cc/Distribution&quot;/&gt;
			&lt;requires rdf:resource=&quot;http://web.resource.org/cc/Notice&quot;/&gt;
			&lt;requires rdf:resource=&quot;http://web.resource.org/cc/Attribution&quot;/&gt;&lt;prohibits rdf:resource=&quot;http://web.resource.org/cc/CommercialUse&quot;/&gt;&lt;/License&gt;&lt;/rdf:RDF&gt; --&gt;&lt;/div&gt;&lt;/fieldset&gt;</description>
			<category>삽질일기</category>
			<category>ToHeart 2 .PAK extractor</category>
			<category>나 졸업작품 언제 완성해</category>
			<category>리얼 공돌이 오덕 러브 파워 작렬</category>
			<category>투하트</category>
			<author>(호빵)</author>
			<guid>http://hoppang.net/tc/63</guid>
			<comments>http://hoppang.net/tc/63#entry63comment</comments>
			<pubDate>Wed, 17 Feb 2010 10:17:48 +0900</pubDate>
		</item>
		<item>
			<title>[예제] 텍스트 파일 읽어서 몽땅 뿌려주기</title>
			<link>http://hoppang.net/tc/61</link>
			<description>왜 올렸나 묻지 말자.&lt;br&gt;&lt;br&gt;&lt;pre name=&quot;CODE&quot; class=&quot;ocaml&quot;&gt;
(* readfile.ml
&amp;nbsp;* 텍스트 파일을 통째로 읽어 내용을 출력해 주는 프로그램.
&amp;nbsp;* http://camltastic.blogspot.com/2008/09/tip-read-all-lines-from-file-most.html
&amp;nbsp;* 의 코드를 많이 참고했음.
&amp;nbsp;* ocamlc -o readfile(.exe) readfile.ml *)

(* 함수의 이름은 뭐라도 상관없다. OCaml에는 main함수 같은 개념은 없다. *)
let _ =
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (* 이것들은 관점에 따라 함수라고 봐도 좋고 변수라고 봐도 좋다.
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; * 하지만 근본 개념은 함수다. *)
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; let filename = &quot;readfile.ml&quot; in
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; let channel = open_in filename in
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (* 이 놈은 함수가 아니다. &#039;ref&#039; 지시어는 변할 수 있는(mutable) 객체를 만든다.
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; * [] - 빈 리스트 같은 OCaml 기본 문법은 
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; * http://merd.sourceforge.net/pixel/language-study/syntax-across-languages-per-language/OCaml.html
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; * 를 읽어볼 것. *)
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; let lines = ref [] in
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; try
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (* input_line 함수는 파일의 끝을 만나면 End_of_file 예외를
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; * 발생시킨다. *)
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; while true; do
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (* OCaml의 리스트는 앞에서 붙이기(C++ 식으로 말하자면
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; * push_front())밖에 안 된다. 물론, 기본으로 제공되는
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; * 것이 그렇다는 얘기. 원한다면 스스로 push_back을
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; * 구현해도 문제될 것 없다. *)
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; lines := (input_line channel) :: !lines
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; done;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (* 예외처리. OCaml의 예외는 C++보다는 조금 그 심각함(?)이 덜하다. *)
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; with End_of_file -&amp;gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (* 파일 닫기 *)
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; close_in channel;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (* 리스트의 크기 - 이 경우에는 텍스트파일의 줄 수를 출력함. *)
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Printf.printf &quot;length of lines = %d\n&quot; (List.length !lines);
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (* 아까 리스트를 역순으로 붙여나갔기 때문에, 원래 순서대로
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; * 작업하려면 List.rev 함수를 이용해서 뒤집어줘야 한다 *)
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; List.iter (Printf.printf &quot;%s\n&quot;) (List.rev !lines)

&lt;/pre&gt;&lt;br&gt;아, 무슨 언어냐고...?&lt;br&gt;&lt;br&gt;분류 보세여 :$&lt;br&gt;&lt;br&gt;&lt;fieldset style=&quot;margin:20px 0px 20px 0px;padding:5px;&quot;&gt;&lt;legend&gt;&lt;span&gt;&lt;strong&gt;크리에이티브 커먼즈 라이센스&lt;/strong&gt;&lt;/span&gt;&lt;/legend&gt;&lt;!--Creative Commons License--&gt;&lt;div style=&quot;float: left; width: 88px; margin-top: 3px;&quot;&gt;&lt;a rel=&quot;license&quot; href=&quot;http://creativecommons.org/licenses/by-nc-nd/2.0/kr/&quot; target=_blank&gt;&lt;img alt=&quot;Creative Commons License&quot; style=&quot;border-width: 0&quot; src=&quot;http://i.creativecommons.org/l/by-nc-nd/2.0/kr/88x31.png&quot;/&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;margin-left: 92px; margin-top: 3px; text-align: justify;&quot;&gt;이 저작물은 &lt;a rel=&quot;license&quot; href=&quot;http://creativecommons.org/licenses/by-nc-nd/2.0/kr/&quot; target=_blank&gt;크리에이티브 커먼즈 코리아 저작자표시-비영리-변경금지 2.0 대한민국 라이센스&lt;/a&gt;에 따라 이용하실 수 있습니다.
			&lt;!-- Creative Commons License--&gt;
			&lt;!-- &lt;rdf:RDF xmlns=&quot;http://web.resource.org/cc/&quot; xmlns:dc=&quot;http://purl.org/dc/elements/1.1/&quot; xmlns:rdf=&quot;http://www.w3.org/1999/02/22-rdf-syntax-ns#&quot;&gt;
			&lt;Work rdf:about=&quot;&quot;&gt;
			&lt;license rdf:resource=&quot;http://creativecommons.org/licenses/by-nc-nd/2.0/kr/&quot; /&gt;
			&lt;/Work&gt;
			&lt;License rdf:about=&quot;http://creativecommons.org/licenses/by-nc-nd/&quot;&gt;
			&lt;permits rdf:resource=&quot;http://web.resource.org/cc/Reproduction&quot;/&gt;
			&lt;permits rdf:resource=&quot;http://web.resource.org/cc/Distribution&quot;/&gt;
			&lt;requires rdf:resource=&quot;http://web.resource.org/cc/Notice&quot;/&gt;
			&lt;requires rdf:resource=&quot;http://web.resource.org/cc/Attribution&quot;/&gt;&lt;prohibits rdf:resource=&quot;http://web.resource.org/cc/CommercialUse&quot;/&gt;&lt;/License&gt;&lt;/rdf:RDF&gt; --&gt;&lt;/div&gt;&lt;/fieldset&gt;</description>
			<category>OCaml</category>
			<category>와우를 끊으니 세상이 달라보여요</category>
			<author>(호빵)</author>
			<guid>http://hoppang.net/tc/61</guid>
			<comments>http://hoppang.net/tc/61#entry61comment</comments>
			<pubDate>Sat, 13 Feb 2010 01:57:30 +0900</pubDate>
		</item>
		<item>
			<title>[Linux/Mac OS X] Non blocking stdin input</title>
			<link>http://hoppang.net/tc/60</link>
			<description>윈도우즈는 WaitForSingleObject() API 함수를 이용하면 아주 간단히 끝낼 수 있지만, 맥을 비롯한 POSIX 쪽으로 넘어가면 상황이 좀 더 복잡해진다. 기본적으로 유닉스는 stdin을 통해 비동기 입출력을 &lt;span style=&quot;font-weight: bold;&quot;&gt;할 수 없기&lt;/span&gt; 때문이다.

&lt;br&gt;&lt;br&gt;하지만 기본적으로 안 된다는 거지, 불가능하다는 소린 아니다. &lt;br&gt;여기 도움이 될 만한 링크가 하나 있다.
&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://cc.byexamples.com/20070408/non-blocking-user-input-in-loop-without-ncurses/&quot; target=&quot;_blank&quot;&gt;&lt;span style=&quot;text-decoration: underline;&quot;&gt;Non-blocking user input in loop without ncurses.&lt;/span&gt;&lt;/a&gt;&lt;br&gt;&lt;br&gt;이 글을 참고하면 앞 포스팅에서 말했던 nonblocking 입력을 구현해 낼 수 있지만, 윈도우즈에서와 다른 점이 하나 있다. echo가 없어지지 않는다는 점이다. 이 문제는 termios 설정 과정에서 플래그를 조금만 조작해 주면 해결할 수 있다.&lt;br&gt;&lt;br&gt;
&lt;pre name=&quot;CODE&quot; class=&quot;php&quot;&gt;
&lt;sys time.h=&quot;&quot;&gt;&lt;sys types.h=&quot;&quot;&gt;&lt;termios.h&gt;&lt;unistd.h&gt;&lt;cstdio&gt;/**
&amp;nbsp;@a http://cc.byexamples.com/20070408/non-blocking-user-input-in-loop-without-ncurses/
&amp;nbsp;
&amp;nbsp;with few modification.
&amp;nbsp;*/

#include&amp;lt;sys/time.h&amp;gt;&amp;nbsp; // sys time.h
#include&amp;lt;sys/types.h&amp;gt; // sys types.h
#include&amp;lt;termios.h&amp;gt; // termios.h
#include&amp;lt;unistd.h&amp;gt; // unistd.h
#include&amp;lt;cstdio&amp;gt; // C라면 그냥 stdio.h로 바꿔 주면 된다..

#define NB_ENABLE 0
#define NB_DISABLE 1

void nonblock(int state)&amp;nbsp; 
{
&amp;nbsp; &amp;nbsp; struct termios ttystate;

&amp;nbsp; &amp;nbsp; // 터미널 상태를 읽어온다.
&amp;nbsp; &amp;nbsp; // STDIN_FILENO = fileno(stdin) (정수형이다) 
&amp;nbsp; &amp;nbsp; tcgetattr(STDIN_FILENO, &amp;amp;ttystate);&amp;nbsp; 

&amp;nbsp; &amp;nbsp; if (state==NB_ENABLE)&amp;nbsp; 
&amp;nbsp; &amp;nbsp; {
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //turn off canonical mode&amp;nbsp; 
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ttystate.c_lflag &amp;amp;= ~ICANON;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // 에코를 끄는 방법은 간단하다
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ttystate.c_lflag &amp;amp;= ~ECHO;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // 최소로 읽어올 글자수를 정함
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ttystate.c_cc[VMIN] = 1;&amp;nbsp; 
&amp;nbsp; &amp;nbsp; }&amp;nbsp; 
&amp;nbsp; &amp;nbsp; else if (state==NB_DISABLE)&amp;nbsp; 
&amp;nbsp; &amp;nbsp; {
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Canonical 모드를 다시 사용한다
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ttystate.c_lflag |= ICANON;&amp;nbsp; 
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // 에코도 복구해줘야 한다... ㅡㅡ
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ttystate.c_lflag |= ECHO;
&amp;nbsp; &amp;nbsp; }&amp;nbsp; 
&amp;nbsp; &amp;nbsp; // 지정한 옵션대로 터미널을 설정한다.
&amp;nbsp; &amp;nbsp; tcsetattr(STDIN_FILENO, TCSANOW, &amp;amp;ttystate);
}&amp;nbsp; 

int kbhit()&amp;nbsp; 
{&amp;nbsp; 
&amp;nbsp; &amp;nbsp; struct timeval tv;&amp;nbsp; 
&amp;nbsp; &amp;nbsp; fd_set fds;&amp;nbsp; 
&amp;nbsp; &amp;nbsp; tv.tv_sec = 0;&amp;nbsp; 
&amp;nbsp; &amp;nbsp; tv.tv_usec = 0;&amp;nbsp; 
&amp;nbsp; &amp;nbsp; FD_ZERO(&amp;amp;fds);&amp;nbsp; 
&amp;nbsp; &amp;nbsp; FD_SET(STDIN_FILENO, &amp;amp;fds); //STDIN_FILENO is 0&amp;nbsp; 
&amp;nbsp; &amp;nbsp; select(STDIN_FILENO+1, &amp;amp;fds, NULL, NULL, &amp;amp;tv);&amp;nbsp; 
&amp;nbsp; &amp;nbsp; return FD_ISSET(STDIN_FILENO, &amp;amp;fds);&amp;nbsp; 
}

int main()
{
&amp;nbsp; &amp;nbsp; char c;&amp;nbsp; 
&amp;nbsp; &amp;nbsp; int i=0;&amp;nbsp; 

&amp;nbsp; &amp;nbsp; nonblock(NB_ENABLE);&amp;nbsp; 
&amp;nbsp; &amp;nbsp; while(!i)&amp;nbsp; 
&amp;nbsp; &amp;nbsp; {&amp;nbsp; 
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; usleep(1);
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; i=kbhit();
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (i!=0)
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; c=fgetc(stdin);
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (c==&#039;q&#039;)
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; i=1;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; i=0;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&amp;nbsp; &amp;nbsp; }
&amp;nbsp; &amp;nbsp; printf(&quot;\n you hit %c. \n&quot;,c);&amp;nbsp; 
&amp;nbsp; &amp;nbsp; nonblock(NB_DISABLE);

&amp;nbsp; &amp;nbsp; return 0; 
}
&lt;/pre&gt;&lt;br&gt;이건 여담인데.. BSD 계열의 개선된 폴링 메커니즘인 kqueue는 애초에 stdin, tty 등 콘솔 장치와 연계되지가 않고, poll의 경우는 타이거에서 stdin과 연계가 안되는 &#039;버그&#039;가 있다. 결국 select 뿐이다...

&lt;br&gt;&lt;br&gt;확인은 안해봤지만 위 코드는 아마 POSIX 표준을 만족하는 운영체제에서는 다 실행될 것으로 본다.&lt;br&gt;&lt;br&gt;이건 여담 2인데, 사파리에선 텍스트큐브 위지윅 편집기가 동작하지 않는 것 같다.&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;에코 관련해서 버그가 있다. 손좀 봐야겠다.&lt;/span&gt;&lt;br style=&quot;font-weight: bold;&quot;&gt;&lt;br&gt;

&lt;/cstdio&gt;&lt;/unistd.h&gt;&lt;/termios.h&gt;&lt;/sys&gt;&lt;/sys&gt;&lt;fieldset style=&quot;margin:20px 0px 20px 0px;padding:5px;&quot;&gt;&lt;legend&gt;&lt;span&gt;&lt;strong&gt;크리에이티브 커먼즈 라이센스&lt;/strong&gt;&lt;/span&gt;&lt;/legend&gt;&lt;!--Creative Commons License--&gt;&lt;div style=&quot;float: left; width: 88px; margin-top: 3px;&quot;&gt;&lt;a rel=&quot;license&quot; href=&quot;http://creativecommons.org/licenses/by-nc-nd/2.0/kr/&quot; target=_blank&gt;&lt;img alt=&quot;Creative Commons License&quot; style=&quot;border-width: 0&quot; src=&quot;http://i.creativecommons.org/l/by-nc-nd/2.0/kr/88x31.png&quot;/&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;margin-left: 92px; margin-top: 3px; text-align: justify;&quot;&gt;이 저작물은 &lt;a rel=&quot;license&quot; href=&quot;http://creativecommons.org/licenses/by-nc-nd/2.0/kr/&quot; target=_blank&gt;크리에이티브 커먼즈 코리아 저작자표시-비영리-변경금지 2.0 대한민국 라이센스&lt;/a&gt;에 따라 이용하실 수 있습니다.
			&lt;!-- Creative Commons License--&gt;
			&lt;!-- &lt;rdf:RDF xmlns=&quot;http://web.resource.org/cc/&quot; xmlns:dc=&quot;http://purl.org/dc/elements/1.1/&quot; xmlns:rdf=&quot;http://www.w3.org/1999/02/22-rdf-syntax-ns#&quot;&gt;
			&lt;Work rdf:about=&quot;&quot;&gt;
			&lt;license rdf:resource=&quot;http://creativecommons.org/licenses/by-nc-nd/2.0/kr/&quot; /&gt;
			&lt;/Work&gt;
			&lt;License rdf:about=&quot;http://creativecommons.org/licenses/by-nc-nd/&quot;&gt;
			&lt;permits rdf:resource=&quot;http://web.resource.org/cc/Reproduction&quot;/&gt;
			&lt;permits rdf:resource=&quot;http://web.resource.org/cc/Distribution&quot;/&gt;
			&lt;requires rdf:resource=&quot;http://web.resource.org/cc/Notice&quot;/&gt;
			&lt;requires rdf:resource=&quot;http://web.resource.org/cc/Attribution&quot;/&gt;&lt;prohibits rdf:resource=&quot;http://web.resource.org/cc/CommercialUse&quot;/&gt;&lt;/License&gt;&lt;/rdf:RDF&gt; --&gt;&lt;/div&gt;&lt;/fieldset&gt;</description>
			<category>삽질일기</category>
			<category>넌블러킹 입력</category>
			<category>넌블럭킹 입력</category>
			<category>배불러</category>
			<category>키보드</category>
			<author>(호빵)</author>
			<guid>http://hoppang.net/tc/60</guid>
			<comments>http://hoppang.net/tc/60#entry60comment</comments>
			<pubDate>Fri, 29 Jan 2010 17:51:24 +0900</pubDate>
		</item>
		<item>
			<title>[Windows] Nonblocking 키보드 입력</title>
			<link>http://hoppang.net/tc/59</link>
			<description>&lt;br&gt;아.. nonblocking을 한글로 뭐라고 표현해야 될지 모르겠다.&lt;br&gt;&lt;br&gt;대충 풀어서 쓰자면 입력을 요구하되, 기다리지는 않는다는 뜻이다. 무슨 소린가 하면, C로 프로그래밍을 조금이라도 해본 사람은 알 것이다. gets 같은 함수로 입력받기를 기다린다고 하자. 그럼 이 gets는 실제로 입력이 들어올 때까지 끝나지 않는다.&lt;br&gt;&lt;br&gt;&lt;pre name=&quot;CODE&quot; class=&quot;php&quot;&gt;
gets(first);
printf(&quot;첫 번째 입력이 들어왔습니다. ?\n&quot;);
gets(second);
&lt;/pre&gt;&lt;br&gt;first 입력을 완료하기 전까지 2번 줄의 printf는 결코 실행되지 않으며, 따라서 second 입력도 받을 수 없다. gets는 사용자가 입력을 완료할 때까지 끝나지 않는 것이다. 이것이 Blocking 입력이다.&lt;br&gt;&lt;br&gt;반대로 Nonblocking은, 입력이 들어왔는지 조사는 하지만 입력이 있건 없건 진행된다. 넌블럭킹 입력 같은 경우는 프로그래밍 초보자가 다룰 주제가 아니기 때문에 교양 수준으로 배운 사람들이라면 생전 처음 듣는 소리일 것이다. 넌블럭킹 입력의 쓰임을 가상코드로 표현해보면 대충 이렇다.&lt;br&gt;&lt;br&gt;&lt;pre name=&quot;CODE&quot; class=&quot;php&quot;&gt;
// 입력이 있든 없든 이 함수는 결과값을 즉시 반환한다(고 치자)
input = check_if_input_exists(stdin); 

if(input == true) printf(&quot;요태카지 날 미앵한고야?\n&quot;);
else /* input == false */ printf(&quot;논 자유에 모미 아냐 요태카지 그래와코 아페로도 개속\n&quot;);
&lt;/pre&gt;&lt;br&gt;즉 넌블럭킹 입력은 (지나치게 단순화한 것이긴 하지만) 입력이 반드시 있다고 가정하는 것이 아니라, 입력이 있을 수도 없을 수도 있는 경우에 쓸 수 있는 놈이다. 혹은 입력이 언젠가는 있겠지만, 그거 무한정 기다리고 있을 만큼 한가하지 않다면, 언젠가 들어올 입력을 기다리는 동안 다른 일을 하고 있어야 마땅하다.&lt;br&gt;&lt;br&gt;넌블럭킹과 블럭킹의 차이를 이해하기 가장 쉬운 예가 게임이다. 턴제 전략게임 - 중에 가장 유명한 - 바둑을 두고 있다고 치자. 바둑은 블럭킹의 예를 들기에 가장 적합한 케이스다. 내가 돌을 두기 전까지는 결코 상대방 차례가 오지 않기 때문이다(물론 시간제한 없는 룰일 경우다). 반대로 내 차례라는 것이 애당초 없는 스타크래프트는 넌블럭킹의 예를 들기에 (사실 조금은 부적합하지만) 좋다.&lt;br&gt;&lt;br&gt;아무튼 잡설은 그만하고..&lt;br&gt;&lt;br&gt;&lt;br&gt;그런데 블럭킹 입력과 달리 넌블럭킹 입력은 운영체제에 몹시 의존적이다. 코드 하나 짜 놓고 이리저리 돌려쓰기를 좋아하는 나 같은 사람에게는 몹시도 슬픈 얘기다.&lt;br&gt;&lt;br&gt;&lt;br&gt;그러니까 안짜도 될 코드 짜서 짜증이 났다 그 소리다.&lt;br&gt;&lt;br&gt;&lt;pre name=&quot;CODE&quot; class=&quot;php&quot;&gt;
/**
&amp;nbsp;&amp;nbsp; &amp;nbsp;윈도우즈에서 Nonblocking 입력을 몹시 하고 싶어서 만들었다.
&amp;nbsp;&amp;nbsp; &amp;nbsp;
&amp;nbsp;&amp;nbsp; &amp;nbsp;@author hoppang at gmail dot com
&amp;nbsp;&amp;nbsp; &amp;nbsp;@date 2010-01-27
&amp;nbsp;&amp;nbsp; &amp;nbsp;@version 9999
&amp;nbsp;&amp;nbsp; &amp;nbsp;@a http://hoppang.net
&amp;nbsp;*/

#include&amp;lt;cstdio&amp;gt;
#include&amp;lt;windows.h&amp;gt;

int main()
{
&amp;nbsp;&amp;nbsp; &amp;nbsp;int count = 0;
&amp;nbsp;&amp;nbsp; &amp;nbsp;DWORD result, how_many_read;
&amp;nbsp;&amp;nbsp; &amp;nbsp;INPUT_RECORD input;
&amp;nbsp;&amp;nbsp; &amp;nbsp;HANDLE stdin_handle;
&amp;nbsp;&amp;nbsp; &amp;nbsp;// stdin의 윈도우식 핸들을 구한다.
&amp;nbsp;&amp;nbsp; &amp;nbsp;stdin_handle = GetStdHandle(STD_INPUT_HANDLE);
&amp;nbsp;&amp;nbsp; &amp;nbsp;// 각 
&amp;nbsp;&amp;nbsp; &amp;nbsp;bool shift_state = false, alt_state = false, ctrl_state = false;
&amp;nbsp;&amp;nbsp; &amp;nbsp;// 자 루프를 돌자
&amp;nbsp;&amp;nbsp; &amp;nbsp;for(;;){
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;/*
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;WaitForSingleObject는 키보드 입력에만 쓰이는 놈은 아니다.
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;자세한 것은 MSDN을 찾아보고.. 아무튼 여기서는 유닉스의 select를
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;대체할 수 있다.
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;두 번째 인자(시간)가 0일 경우 입력 버퍼에 아무것도 없어도
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;입력을 기다리지 않고 즉시 리턴한다. (non-blocking)
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; */
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;result = WaitForSingleObject(stdin_handle, 0);
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;/*
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;들어온 입력이 있을 경우 WAIT_OBJECT_0이 반환된다.
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;인터넷에서 어쩌다 본 문서에는 &#039;모든 종류의&#039; 이벤트를 감지할 수 있다고 했으나,
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;실제 돌려본 바 그렇지는 않은 듯함. 키보드 입력만 받는다.
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; */
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if(result == WAIT_OBJECT_0) {
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;/* 입력 버퍼에서 입력을 읽어들인다.
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; param 1 [in] &amp;nbsp; &amp;nbsp;이름 보면 모르나
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; param 2 [out] &amp;nbsp; &amp;nbsp;받아들인 입력 정보가 저장될 구조체
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; param 3 [in] &amp;nbsp; &amp;nbsp;인자 2에 넘겨진 구조체가 몇 개인가.
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; param 4 [out] &amp;nbsp; &amp;nbsp;읽어들인 입력 정보가 총 몇 개인가. 문제가 없다면 인자 3과 같다.
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; */
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ReadConsoleInput(stdin_handle, &amp;amp;input, 1, &amp;amp;how_many_read);
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;/*
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; 조금 귀찮은 부분이다.
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; */
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;switch(input.Event.KeyEvent.wVirtualKeyCode) {
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;case VK_ESCAPE:
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return 1;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;case VK_SHIFT:
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;shift_state = input.Event.KeyEvent.bKeyDown;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;break;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;case VK_MENU: // alt
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;alt_state = input.Event.KeyEvent.bKeyDown;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;break;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;case VK_CONTROL:
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ctrl_state = input.Event.KeyEvent.bKeyDown;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;break;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;default:
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if(input.Event.KeyEvent.bKeyDown == TRUE) {
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;printf(&quot;\ninput %x %s%s%s, how_many_read = %x\n&quot;,
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;input.Event.KeyEvent.wVirtualKeyCode,
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;shift_state ? &quot;[shift]&quot; : &quot;&quot;,
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;alt_state ? &quot;[alt]&quot; : &quot;&quot;, 
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ctrl_state ? &quot;[ctrl]&quot; : &quot;&quot;, how_many_read);
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// 입력이 없을 경우. 사실 이건 없어도 상관없는데
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// 프로그램이 멎어 있지 않다는 것을 보여주려고 집어넣었다.
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;else printf(&quot;\r%10d&quot;, count++);
&amp;nbsp;&amp;nbsp; &amp;nbsp;}
&amp;nbsp;&amp;nbsp; &amp;nbsp;
&amp;nbsp;&amp;nbsp; &amp;nbsp;return 0;
}
&lt;/pre&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;fieldset style=&quot;margin:20px 0px 20px 0px;padding:5px;&quot;&gt;&lt;legend&gt;&lt;span&gt;&lt;strong&gt;크리에이티브 커먼즈 라이센스&lt;/strong&gt;&lt;/span&gt;&lt;/legend&gt;&lt;!--Creative Commons License--&gt;&lt;div style=&quot;float: left; width: 88px; margin-top: 3px;&quot;&gt;&lt;a rel=&quot;license&quot; href=&quot;http://creativecommons.org/licenses/by-nc-nd/2.0/kr/&quot; target=_blank&gt;&lt;img alt=&quot;Creative Commons License&quot; style=&quot;border-width: 0&quot; src=&quot;http://i.creativecommons.org/l/by-nc-nd/2.0/kr/88x31.png&quot;/&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;margin-left: 92px; margin-top: 3px; text-align: justify;&quot;&gt;이 저작물은 &lt;a rel=&quot;license&quot; href=&quot;http://creativecommons.org/licenses/by-nc-nd/2.0/kr/&quot; target=_blank&gt;크리에이티브 커먼즈 코리아 저작자표시-비영리-변경금지 2.0 대한민국 라이센스&lt;/a&gt;에 따라 이용하실 수 있습니다.
			&lt;!-- Creative Commons License--&gt;
			&lt;!-- &lt;rdf:RDF xmlns=&quot;http://web.resource.org/cc/&quot; xmlns:dc=&quot;http://purl.org/dc/elements/1.1/&quot; xmlns:rdf=&quot;http://www.w3.org/1999/02/22-rdf-syntax-ns#&quot;&gt;
			&lt;Work rdf:about=&quot;&quot;&gt;
			&lt;license rdf:resource=&quot;http://creativecommons.org/licenses/by-nc-nd/2.0/kr/&quot; /&gt;
			&lt;/Work&gt;
			&lt;License rdf:about=&quot;http://creativecommons.org/licenses/by-nc-nd/&quot;&gt;
			&lt;permits rdf:resource=&quot;http://web.resource.org/cc/Reproduction&quot;/&gt;
			&lt;permits rdf:resource=&quot;http://web.resource.org/cc/Distribution&quot;/&gt;
			&lt;requires rdf:resource=&quot;http://web.resource.org/cc/Notice&quot;/&gt;
			&lt;requires rdf:resource=&quot;http://web.resource.org/cc/Attribution&quot;/&gt;&lt;prohibits rdf:resource=&quot;http://web.resource.org/cc/CommercialUse&quot;/&gt;&lt;/License&gt;&lt;/rdf:RDF&gt; --&gt;&lt;/div&gt;&lt;/fieldset&gt;</description>
			<category>삽질일기</category>
			<category>넌블러킹 입력</category>
			<category>넌블럭킹 입력</category>
			<author>(호빵)</author>
			<guid>http://hoppang.net/tc/59</guid>
			<comments>http://hoppang.net/tc/59#entry59comment</comments>
			<pubDate>Wed, 27 Jan 2010 18:15:31 +0900</pubDate>
		</item>
		<item>
			<title>last.fm last 3 months my favorite songs</title>
			<link>http://hoppang.net/tc/58</link>
			<description>&lt;br&gt;&lt;table class=&quot;candyStriped chart&quot;&gt;&lt;tbody&gt;&lt;tr class=&quot;first odd streamable&quot;&gt;&lt;td class=&quot;positionCell&quot;&gt;1
    &lt;/td&gt;
        &lt;td class=&quot;playbuttonCell&quot;&gt;
        &lt;a class=&quot;playbutton&quot; href=&quot;http://www.last.fm/music/Black+Eyed+Peas/_/I+Gotta+Feeling?autostart&quot; rel=&quot;nofollow&quot;&gt;&lt;img class=&quot;icon play_icon&quot; alt=&quot;Play&quot; src=&quot;http://cdn.last.fm/flatness/clear.gif&quot; width=&quot;17&quot; height=&quot;17&quot;&gt;&lt;/a&gt;    &lt;/td&gt;
                                                        &lt;td class=&quot;subjectCell&quot; title=&quot;I Gotta Feeling, played 63 times&quot;&gt;
            &lt;div&gt;
                                        &lt;a href=&quot;http://www.last.fm/music/Black+Eyed+Peas&quot;&gt;Black Eyed Peas&lt;/a&gt; – &lt;a href=&quot;http://www.last.fm/music/Black+Eyed+Peas/_/I+Gotta+Feeling&quot;&gt;I Gotta Feeling&lt;/a&gt;                        
                                    &lt;/div&gt;
    &lt;/td&gt;
    &lt;td class=&quot;lovedCell&quot;&gt;
                    &lt;img title=&quot;A loved track&quot; alt=&quot;Loved track&quot; class=&quot;icon loved_indicator_icon&quot; src=&quot;http://cdn.last.fm/flatness/clear.gif&quot; width=&quot;11&quot; height=&quot;9&quot;&gt;            &lt;/td&gt;
                    &lt;td class=&quot;multibuttonCell&quot;&gt;
        &lt;a href=&quot;http://www.last.fm/music/Black+Eyed+Peas/_/I+Gotta+Feeling&quot; class=&quot;             mRemoveFromLibrary         mSend
        mAddTags
                mAddToPlaylist
                     mUnlove                                     lfmButton lfmMultiButton lfmButtonFortrack lfmSmallButton lfmSmallMultiButton lfmMultiButtonFull&quot; forcelink=&quot;1&quot;&gt;&lt;/a&gt;    &lt;br&gt;&lt;/td&gt;
    &lt;td class=&quot;chartbarCell&quot;&gt;
    &lt;div style=&quot;width: 100%;&quot; class=&quot;chartbar&quot;&gt;&lt;span&gt;63&lt;/span&gt;&lt;/div&gt;    &lt;/td&gt;

                &lt;/tr&gt;&lt;tr class=&quot;streamable&quot;&gt;
&lt;td class=&quot;positionCell&quot;&gt;
        2
    &lt;/td&gt;
        &lt;td class=&quot;playbuttonCell&quot;&gt;
        &lt;a class=&quot;playbutton&quot; href=&quot;http://www.last.fm/music/%E4%B8%AD%E5%B3%B6%E7%BE%8E%E5%98%89/_/Over+Load?autostart&quot; rel=&quot;nofollow&quot;&gt;&lt;img class=&quot;icon play_icon&quot; alt=&quot;Play&quot; src=&quot;http://cdn.last.fm/flatness/clear.gif&quot; width=&quot;17&quot; height=&quot;17&quot;&gt;&lt;/a&gt;    &lt;/td&gt;
                                                        &lt;td class=&quot;subjectCell&quot; title=&quot;Over Load, played 52 times&quot;&gt;
            &lt;div&gt;
                                        &lt;a href=&quot;http://www.last.fm/music/%E4%B8%AD%E5%B3%B6%E7%BE%8E%E5%98%89&quot;&gt;中島美嘉&lt;/a&gt; – &lt;a href=&quot;http://www.last.fm/music/%E4%B8%AD%E5%B3%B6%E7%BE%8E%E5%98%89/_/Over+Load&quot;&gt;Over Load&lt;/a&gt;                        
                                    &lt;/div&gt;
    &lt;/td&gt;
    &lt;td class=&quot;lovedCell&quot;&gt;
                    &lt;img title=&quot;A loved track&quot; alt=&quot;Loved track&quot; class=&quot;icon loved_indicator_icon&quot; src=&quot;http://cdn.last.fm/flatness/clear.gif&quot; width=&quot;11&quot; height=&quot;9&quot;&gt;            &lt;/td&gt;
                    &lt;td class=&quot;multibuttonCell&quot;&gt;
        &lt;a href=&quot;http://www.last.fm/music/%E4%B8%AD%E5%B3%B6%E7%BE%8E%E5%98%89/_/Over+Load&quot; class=&quot;             mRemoveFromLibrary         mSend
        mAddTags
                mAddToPlaylist
                     mUnlove                                     lfmButton lfmMultiButton lfmButtonFortrack lfmSmallButton lfmSmallMultiButton lfmMultiButtonFull&quot; forcelink=&quot;1&quot;&gt;&lt;/a&gt;    &lt;br&gt;&lt;/td&gt;
    &lt;td class=&quot;chartbarCell&quot;&gt;
    &lt;div style=&quot;width: 82%;&quot; class=&quot;chartbar&quot;&gt;&lt;span&gt;52&lt;/span&gt;&lt;/div&gt;    &lt;/td&gt;

                &lt;/tr&gt;&lt;tr class=&quot;odd&quot;&gt;
&lt;td class=&quot;positionCell&quot;&gt;
        3
    &lt;/td&gt;
        &lt;td class=&quot;playbuttonCell&quot;&gt;
        &amp;nbsp;    &lt;/td&gt;
                                                        &lt;td class=&quot;subjectCell&quot; title=&quot;난 알아요, played 46 times&quot;&gt;
            &lt;div&gt;
                                        &lt;a href=&quot;http://www.last.fm/music/%EC%84%9C%ED%83%9C%EC%A7%80&quot;&gt;서태지&lt;/a&gt; – &lt;a href=&quot;http://www.last.fm/music/%EC%84%9C%ED%83%9C%EC%A7%80/_/%EB%82%9C+%EC%95%8C%EC%95%84%EC%9A%94&quot;&gt;난 알아요&lt;/a&gt;                        
                                    &lt;/div&gt;
    &lt;/td&gt;
    &lt;td class=&quot;lovedCell&quot;&gt;
            &lt;br&gt;&lt;/td&gt;
                    &lt;td class=&quot;multibuttonCell&quot;&gt;
        &lt;a href=&quot;http://www.last.fm/music/%EC%84%9C%ED%83%9C%EC%A7%80/_/%EB%82%9C+%EC%95%8C%EC%95%84%EC%9A%94&quot; class=&quot;             mRemoveFromLibrary         mSend
        mAddTags
                mAddToPlaylist
                     mLove                                     lfmButton lfmMultiButton lfmButtonFortrack lfmSmallButton lfmSmallMultiButton lfmMultiButtonFull&quot; forcelink=&quot;1&quot;&gt;&lt;/a&gt;    &lt;br&gt;&lt;/td&gt;
    &lt;td class=&quot;chartbarCell&quot;&gt;
    &lt;div style=&quot;width: 73%;&quot; class=&quot;chartbar&quot;&gt;&lt;span&gt;46&lt;/span&gt;&lt;/div&gt;    &lt;/td&gt;

                &lt;/tr&gt;&lt;tr class=&quot;&quot;&gt;
&lt;td class=&quot;positionCell&quot;&gt;
        4
    &lt;/td&gt;
        &lt;td class=&quot;playbuttonCell&quot;&gt;
        &amp;nbsp;    &lt;/td&gt;
                                                        &lt;td class=&quot;subjectCell&quot; title=&quot;We Will Robot Rock You, played 42 times&quot;&gt;
            &lt;div&gt;
                                        &lt;a href=&quot;http://www.last.fm/music/Daft+Punk&quot;&gt;Daft Punk&lt;/a&gt; – &lt;a href=&quot;http://www.last.fm/music/Daft+Punk/_/We+Will+Robot+Rock+You&quot;&gt;We Will Robot Rock You&lt;/a&gt;                        
                                    &lt;/div&gt;
    &lt;/td&gt;
    &lt;td class=&quot;lovedCell&quot;&gt;
            &lt;br&gt;&lt;/td&gt;
                    &lt;td class=&quot;multibuttonCell&quot;&gt;
        &lt;a href=&quot;http://www.last.fm/music/Daft+Punk/_/We+Will+Robot+Rock+You&quot; class=&quot;             mRemoveFromLibrary         mSend
        mAddTags
                mAddToPlaylist
                     mLove                                     lfmButton lfmMultiButton lfmButtonFortrack lfmSmallButton lfmSmallMultiButton lfmMultiButtonFull&quot; forcelink=&quot;1&quot;&gt;&lt;/a&gt;    &lt;br&gt;&lt;/td&gt;
    &lt;td class=&quot;chartbarCell&quot;&gt;
    &lt;div style=&quot;width: 66%;&quot; class=&quot;chartbar&quot;&gt;&lt;span&gt;42&lt;/span&gt;&lt;/div&gt;    &lt;/td&gt;

                &lt;/tr&gt;&lt;tr class=&quot;odd streamable&quot;&gt;
&lt;td class=&quot;positionCell&quot;&gt;
        5
    &lt;/td&gt;
        &lt;td class=&quot;playbuttonCell&quot;&gt;
        &lt;a class=&quot;playbutton&quot; href=&quot;http://www.last.fm/music/%E6%B5%9C%E5%B4%8E%E3%81%82%E3%82%86%E3%81%BF/_/fairyland?autostart&quot; rel=&quot;nofollow&quot;&gt;&lt;img class=&quot;icon play_icon&quot; alt=&quot;Play&quot; src=&quot;http://cdn.last.fm/flatness/clear.gif&quot; width=&quot;17&quot; height=&quot;17&quot;&gt;&lt;/a&gt;    &lt;/td&gt;
                                                        &lt;td class=&quot;subjectCell&quot; title=&quot;fairyland, played 37 times&quot;&gt;
            &lt;div&gt;
                                        &lt;a href=&quot;http://www.last.fm/music/%E6%B5%9C%E5%B4%8E%E3%81%82%E3%82%86%E3%81%BF&quot;&gt;浜崎あゆみ&lt;/a&gt; – &lt;a href=&quot;http://www.last.fm/music/%E6%B5%9C%E5%B4%8E%E3%81%82%E3%82%86%E3%81%BF/_/fairyland&quot;&gt;fairyland&lt;/a&gt;                        
                                    &lt;/div&gt;
    &lt;/td&gt;
    &lt;td class=&quot;lovedCell&quot;&gt;
                    &lt;img title=&quot;A loved track&quot; alt=&quot;Loved track&quot; class=&quot;icon loved_indicator_icon&quot; src=&quot;http://cdn.last.fm/flatness/clear.gif&quot; width=&quot;11&quot; height=&quot;9&quot;&gt;            &lt;/td&gt;
                    &lt;td class=&quot;multibuttonCell&quot;&gt;
        &lt;a href=&quot;http://www.last.fm/music/%E6%B5%9C%E5%B4%8E%E3%81%82%E3%82%86%E3%81%BF/_/fairyland&quot; class=&quot;             mRemoveFromLibrary         mSend
        mAddTags
                mAddToPlaylist
                     mUnlove                                     lfmButton lfmMultiButton lfmButtonFortrack lfmSmallButton lfmSmallMultiButton lfmMultiButtonFull&quot; forcelink=&quot;1&quot;&gt;&lt;/a&gt;    &lt;br&gt;&lt;/td&gt;
    &lt;td class=&quot;chartbarCell&quot;&gt;
    &lt;div style=&quot;width: 58%;&quot; class=&quot;chartbar&quot;&gt;&lt;span&gt;37&lt;/span&gt;&lt;/div&gt;    &lt;/td&gt;

                &lt;/tr&gt;&lt;tr class=&quot;&quot;&gt;
&lt;td class=&quot;positionCell&quot;&gt;
        6
    &lt;/td&gt;
        &lt;td class=&quot;playbuttonCell&quot;&gt;
        &amp;nbsp;    &lt;/td&gt;
                                                        &lt;td class=&quot;subjectCell&quot; title=&quot;You Raise Me Up, played 34 times&quot;&gt;
            &lt;div&gt;
                                        &lt;a href=&quot;http://www.last.fm/music/Celtic+Woman&quot;&gt;Celtic Woman&lt;/a&gt; – &lt;a href=&quot;http://www.last.fm/music/Celtic+Woman/_/You+Raise+Me+Up&quot;&gt;You Raise Me Up&lt;/a&gt;                        
                                    &lt;/div&gt;
    &lt;/td&gt;
    &lt;td class=&quot;lovedCell&quot;&gt;
            &lt;br&gt;&lt;/td&gt;
                    &lt;td class=&quot;multibuttonCell&quot;&gt;
        &lt;a href=&quot;http://www.last.fm/music/Celtic+Woman/_/You+Raise+Me+Up&quot; class=&quot;             mRemoveFromLibrary         mSend
        mAddTags
                mAddToPlaylist
                     mLove                                     lfmButton lfmMultiButton lfmButtonFortrack lfmSmallButton lfmSmallMultiButton lfmMultiButtonFull&quot; forcelink=&quot;1&quot;&gt;&lt;/a&gt;    &lt;br&gt;&lt;/td&gt;
    &lt;td class=&quot;chartbarCell&quot;&gt;
    &lt;div style=&quot;width: 53%;&quot; class=&quot;chartbar&quot;&gt;&lt;span&gt;34&lt;/span&gt;&lt;/div&gt;    &lt;/td&gt;

                &lt;/tr&gt;&lt;tr class=&quot;odd streamable&quot;&gt;
&lt;td class=&quot;positionCell&quot;&gt;
        7
    &lt;/td&gt;
        &lt;td class=&quot;playbuttonCell&quot;&gt;
        &lt;a class=&quot;playbutton&quot; href=&quot;http://www.last.fm/music/Lady+GaGa/_/Paparazzi?autostart&quot; rel=&quot;nofollow&quot;&gt;&lt;img class=&quot;icon play_icon&quot; alt=&quot;Play&quot; src=&quot;http://cdn.last.fm/flatness/clear.gif&quot; width=&quot;17&quot; height=&quot;17&quot;&gt;&lt;/a&gt;    &lt;/td&gt;
                                                        &lt;td class=&quot;subjectCell&quot; title=&quot;Paparazzi, played 33 times&quot;&gt;
            &lt;div&gt;
                                        &lt;a href=&quot;http://www.last.fm/music/Lady+GaGa&quot;&gt;Lady GaGa&lt;/a&gt; – &lt;a href=&quot;http://www.last.fm/music/Lady+GaGa/_/Paparazzi&quot;&gt;Paparazzi&lt;/a&gt;                        
                                    &lt;/div&gt;
    &lt;/td&gt;
    &lt;td class=&quot;lovedCell&quot;&gt;
                    &lt;img title=&quot;A loved track&quot; alt=&quot;Loved track&quot; class=&quot;icon loved_indicator_icon&quot; src=&quot;http://cdn.last.fm/flatness/clear.gif&quot; width=&quot;11&quot; height=&quot;9&quot;&gt;            &lt;/td&gt;
                    &lt;td class=&quot;multibuttonCell&quot;&gt;
        &lt;a href=&quot;http://www.last.fm/music/Lady+GaGa/_/Paparazzi&quot; class=&quot;             mRemoveFromLibrary         mSend
        mAddTags
                mAddToPlaylist
                     mUnlove                                     lfmButton lfmMultiButton lfmButtonFortrack lfmSmallButton lfmSmallMultiButton lfmMultiButtonFull&quot; forcelink=&quot;1&quot;&gt;&lt;/a&gt;    &lt;br&gt;&lt;/td&gt;
    &lt;td class=&quot;chartbarCell&quot;&gt;
    &lt;div style=&quot;width: 52%;&quot; class=&quot;chartbar&quot;&gt;&lt;span&gt;33&lt;/span&gt;&lt;/div&gt;    &lt;/td&gt;

                &lt;/tr&gt;&lt;tr class=&quot;streamable&quot;&gt;
&lt;td class=&quot;positionCell&quot;&gt;
        8
    &lt;/td&gt;
        &lt;td class=&quot;playbuttonCell&quot;&gt;
        &lt;a class=&quot;playbutton&quot; href=&quot;http://www.last.fm/music/%E4%B8%AD%E5%B3%B6%E7%BE%8E%E5%98%89/_/Over+Load+%28Instrumental%29?autostart&quot; rel=&quot;nofollow&quot;&gt;&lt;img class=&quot;icon play_icon&quot; alt=&quot;Play&quot; src=&quot;http://cdn.last.fm/flatness/clear.gif&quot; width=&quot;17&quot; height=&quot;17&quot;&gt;&lt;/a&gt;    &lt;/td&gt;
                                                        &lt;td class=&quot;subjectCell&quot; title=&quot;Over Load (Instrumental), played 30 times&quot;&gt;
            &lt;div&gt;
                                        &lt;a href=&quot;http://www.last.fm/music/%E4%B8%AD%E5%B3%B6%E7%BE%8E%E5%98%89&quot;&gt;中島美嘉&lt;/a&gt; – &lt;a href=&quot;http://www.last.fm/music/%E4%B8%AD%E5%B3%B6%E7%BE%8E%E5%98%89/_/Over+Load+%28Instrumental%29&quot;&gt;Over Load (Instrumental)&lt;/a&gt;                        
                                    &lt;/div&gt;
    &lt;/td&gt;
    &lt;td class=&quot;lovedCell&quot;&gt;
            &lt;br&gt;&lt;/td&gt;
                    &lt;td class=&quot;multibuttonCell&quot;&gt;
        &lt;a href=&quot;http://www.last.fm/music/%E4%B8%AD%E5%B3%B6%E7%BE%8E%E5%98%89/_/Over+Load+%28Instrumental%29&quot; class=&quot;             mRemoveFromLibrary         mSend
        mAddTags
                mAddToPlaylist
                     mLove                                     lfmButton lfmMultiButton lfmButtonFortrack lfmSmallButton lfmSmallMultiButton lfmMultiButtonFull&quot; forcelink=&quot;1&quot;&gt;&lt;/a&gt;    &lt;br&gt;&lt;/td&gt;
    &lt;td class=&quot;chartbarCell&quot;&gt;
    &lt;div style=&quot;width: 47%;&quot; class=&quot;chartbar&quot;&gt;&lt;span&gt;30&lt;/span&gt;&lt;/div&gt;    &lt;/td&gt;

                &lt;/tr&gt;&lt;tr class=&quot;odd&quot;&gt;
&lt;td class=&quot;positionCell&quot;&gt;
        9
    &lt;/td&gt;
        &lt;td class=&quot;playbuttonCell&quot;&gt;
        &amp;nbsp;    &lt;/td&gt;
                                                        &lt;td class=&quot;subjectCell&quot; title=&quot;Ruby Shoes, played 24 times&quot;&gt;
            &lt;div&gt;
                                        &lt;a href=&quot;http://www.last.fm/music/Tommy+heavenly6&quot;&gt;Tommy heavenly6&lt;/a&gt; – &lt;a href=&quot;http://www.last.fm/music/Tommy+heavenly6/_/Ruby+Shoes&quot;&gt;Ruby Shoes&lt;/a&gt;                        
                                    &lt;/div&gt;
    &lt;/td&gt;
    &lt;td class=&quot;lovedCell&quot;&gt;
            &lt;br&gt;&lt;/td&gt;
                    &lt;td class=&quot;multibuttonCell&quot;&gt;
        &lt;a href=&quot;http://www.last.fm/music/Tommy+heavenly6/_/Ruby+Shoes&quot; class=&quot;             mRemoveFromLibrary         mSend
        mAddTags
                mAddToPlaylist
                     mLove                                     lfmButton lfmMultiButton lfmButtonFortrack lfmSmallButton lfmSmallMultiButton lfmMultiButtonFull&quot; forcelink=&quot;1&quot;&gt;&lt;/a&gt;    &lt;br&gt;&lt;/td&gt;
    &lt;td class=&quot;chartbarCell&quot;&gt;
    &lt;div style=&quot;width: 38%;&quot; class=&quot;chartbar&quot;&gt;&lt;span&gt;24&lt;/span&gt;&lt;/div&gt;    &lt;/td&gt;

                &lt;/tr&gt;&lt;tr class=&quot;streamable flp&quot;&gt;
&lt;td class=&quot;positionCell&quot;&gt;
        10
    &lt;/td&gt;
        &lt;td class=&quot;playbuttonCell&quot;&gt;
        &lt;a class=&quot;playbutton&quot; href=&quot;http://www.last.fm/music/%EC%95%84%EC%9D%B4%EB%B9%84/_/Touch+Me?autostart&quot; rel=&quot;nofollow&quot;&gt;&lt;img class=&quot;icon play_icon&quot; alt=&quot;Play&quot; src=&quot;http://cdn.last.fm/flatness/clear.gif&quot; width=&quot;17&quot; height=&quot;17&quot;&gt;&lt;/a&gt;    &lt;/td&gt;
                                                        &lt;td class=&quot;subjectCell&quot; title=&quot;Touch Me, played 23 times&quot;&gt;
            &lt;div&gt;
                                        &lt;a href=&quot;http://www.last.fm/music/%EC%95%84%EC%9D%B4%EB%B9%84&quot;&gt;아이비&lt;/a&gt; – &lt;a href=&quot;http://www.last.fm/music/%EC%95%84%EC%9D%B4%EB%B9%84/_/Touch+Me&quot;&gt;Touch Me&lt;/a&gt;                        
                                &lt;small&gt;
                                    full track
                            &lt;/small&gt;
                            &lt;/div&gt;
    &lt;/td&gt;
    &lt;td class=&quot;lovedCell&quot;&gt;
                    &lt;img title=&quot;A loved track&quot; alt=&quot;Loved track&quot; class=&quot;icon loved_indicator_icon&quot; src=&quot;http://cdn.last.fm/flatness/clear.gif&quot; width=&quot;11&quot; height=&quot;9&quot;&gt;            &lt;/td&gt;
                    &lt;td class=&quot;multibuttonCell&quot;&gt;
        &lt;a href=&quot;http://www.last.fm/music/%EC%95%84%EC%9D%B4%EB%B9%84/_/Touch+Me&quot; class=&quot;             mRemoveFromLibrary         mSend
        mAddTags
                mAddToPlaylist
                     mUnlove                                     lfmButton lfmMultiButton lfmButtonFortrack lfmSmallButton lfmSmallMultiButton lfmMultiButtonFull&quot; forcelink=&quot;1&quot;&gt;&lt;/a&gt;    &lt;br&gt;&lt;/td&gt;
    &lt;td class=&quot;chartbarCell&quot;&gt;
    &lt;div style=&quot;width: 36%;&quot; class=&quot;chartbar&quot;&gt;&lt;span&gt;23&lt;/span&gt;&lt;/div&gt;    &lt;/td&gt;

                &lt;/tr&gt;&lt;tr class=&quot;odd&quot;&gt;
&lt;td class=&quot;positionCell&quot;&gt;
        11
    &lt;/td&gt;
        &lt;td class=&quot;playbuttonCell&quot;&gt;
        &amp;nbsp;    &lt;/td&gt;
                                                        &lt;td class=&quot;subjectCell&quot; title=&quot;Pray, played 21 times&quot;&gt;
            &lt;div&gt;
                                        &lt;a href=&quot;http://www.last.fm/music/Tommy+heavenly6&quot;&gt;Tommy heavenly6&lt;/a&gt; – &lt;a href=&quot;http://www.last.fm/music/Tommy+heavenly6/_/Pray&quot;&gt;Pray&lt;/a&gt;                        
                                    &lt;/div&gt;
    &lt;/td&gt;
    &lt;td class=&quot;lovedCell&quot;&gt;
                    &lt;img title=&quot;A loved track&quot; alt=&quot;Loved track&quot; class=&quot;icon loved_indicator_icon&quot; src=&quot;http://cdn.last.fm/flatness/clear.gif&quot; width=&quot;11&quot; height=&quot;9&quot;&gt;            &lt;/td&gt;
                    &lt;td class=&quot;multibuttonCell&quot;&gt;
        &lt;a href=&quot;http://www.last.fm/music/Tommy+heavenly6/_/Pray&quot; class=&quot;             mRemoveFromLibrary         mSend
        mAddTags
                mAddToPlaylist
                     mUnlove                                     lfmButton lfmMultiButton lfmButtonFortrack lfmSmallButton lfmSmallMultiButton lfmMultiButtonFull&quot; forcelink=&quot;1&quot;&gt;&lt;/a&gt;    &lt;br&gt;&lt;/td&gt;
    &lt;td class=&quot;chartbarCell&quot;&gt;
    &lt;div style=&quot;width: 33%;&quot; class=&quot;chartbar&quot;&gt;&lt;span&gt;21&lt;/span&gt;&lt;/div&gt;    &lt;/td&gt;

                &lt;/tr&gt;&lt;tr class=&quot;streamable flp&quot;&gt;
&lt;td class=&quot;positionCell&quot;&gt;
        12
    &lt;/td&gt;
        &lt;td class=&quot;playbuttonCell&quot;&gt;
        &lt;a class=&quot;playbutton&quot; href=&quot;http://www.last.fm/music/%EB%B0%95%EC%A7%84%EC%98%81/_/No+Love+No+More?autostart&quot; rel=&quot;nofollow&quot;&gt;&lt;img class=&quot;icon play_icon&quot; alt=&quot;Play&quot; src=&quot;http://cdn.last.fm/flatness/clear.gif&quot; width=&quot;17&quot; height=&quot;17&quot;&gt;&lt;/a&gt;    &lt;/td&gt;
                                                        &lt;td class=&quot;subjectCell&quot; title=&quot;No Love No More, played 18 times&quot;&gt;
            &lt;div&gt;
                                        &lt;a href=&quot;http://www.last.fm/music/%EB%B0%95%EC%A7%84%EC%98%81&quot;&gt;박진영&lt;/a&gt; – &lt;a href=&quot;http://www.last.fm/music/%EB%B0%95%EC%A7%84%EC%98%81/_/No+Love+No+More&quot;&gt;No Love No More&lt;/a&gt;                        
                                &lt;small&gt;
                                    full track
                            &lt;/small&gt;
                            &lt;/div&gt;
    &lt;/td&gt;
    &lt;td class=&quot;lovedCell&quot;&gt;
            &lt;br&gt;&lt;/td&gt;
                    &lt;td class=&quot;multibuttonCell&quot;&gt;
        &lt;a href=&quot;http://www.last.fm/music/%EB%B0%95%EC%A7%84%EC%98%81/_/No+Love+No+More&quot; class=&quot;             mRemoveFromLibrary         mSend
        mAddTags
                mAddToPlaylist
                     mLove                                     lfmButton lfmMultiButton lfmButtonFortrack lfmSmallButton lfmSmallMultiButton lfmMultiButtonFull&quot; forcelink=&quot;1&quot;&gt;&lt;/a&gt;    &lt;br&gt;&lt;/td&gt;
    &lt;td class=&quot;chartbarCell&quot;&gt;
    &lt;div style=&quot;width: 28%;&quot; class=&quot;chartbar&quot;&gt;&lt;span&gt;18&lt;/span&gt;&lt;/div&gt;    &lt;/td&gt;

                &lt;/tr&gt;&lt;tr class=&quot;odd&quot;&gt;
&lt;td class=&quot;positionCell&quot;&gt;
        12
    &lt;/td&gt;
        &lt;td class=&quot;playbuttonCell&quot;&gt;
        &amp;nbsp;    &lt;/td&gt;
                                                        &lt;td class=&quot;subjectCell&quot; title=&quot;I miss you？, played 18 times&quot;&gt;
            &lt;div&gt;
                                        &lt;a href=&quot;http://www.last.fm/music/Do+As+Infinity&quot;&gt;Do As Infinity&lt;/a&gt; – &lt;a href=&quot;http://www.last.fm/music/Do+As+Infinity/_/I+miss+you%EF%BC%9F&quot;&gt;I miss you？&lt;/a&gt;                        
                                    &lt;/div&gt;
    &lt;/td&gt;
    &lt;td class=&quot;lovedCell&quot;&gt;
                    &lt;img title=&quot;A loved track&quot; alt=&quot;Loved track&quot; class=&quot;icon loved_indicator_icon&quot; src=&quot;http://cdn.last.fm/flatness/clear.gif&quot; width=&quot;11&quot; height=&quot;9&quot;&gt;            &lt;/td&gt;
                    &lt;td class=&quot;multibuttonCell&quot;&gt;
        &lt;a href=&quot;http://www.last.fm/music/Do+As+Infinity/_/I+miss+you%EF%BC%9F&quot; class=&quot;             mRemoveFromLibrary         mSend
        mAddTags
                mAddToPlaylist
                     mUnlove                                     lfmButton lfmMultiButton lfmButtonFortrack lfmSmallButton lfmSmallMultiButton lfmMultiButtonFull&quot; forcelink=&quot;1&quot;&gt;&lt;/a&gt;    &lt;br&gt;&lt;/td&gt;
    &lt;td class=&quot;chartbarCell&quot;&gt;
    &lt;div style=&quot;width: 28%;&quot; class=&quot;chartbar&quot;&gt;&lt;span&gt;18&lt;/span&gt;&lt;/div&gt;    &lt;/td&gt;

                &lt;/tr&gt;&lt;tr class=&quot;&quot;&gt;
&lt;td class=&quot;positionCell&quot;&gt;
        14
    &lt;/td&gt;
        &lt;td class=&quot;playbuttonCell&quot;&gt;
        &amp;nbsp;    &lt;/td&gt;
                                                        &lt;td class=&quot;subjectCell&quot; title=&quot;ABOUT U, played 17 times&quot;&gt;
            &lt;div&gt;
                                        &lt;a href=&quot;http://www.last.fm/music/Tommy+heavenly6&quot;&gt;Tommy heavenly6&lt;/a&gt; – &lt;a href=&quot;http://www.last.fm/music/Tommy+heavenly6/_/ABOUT+U&quot;&gt;ABOUT U&lt;/a&gt;                        
                                    &lt;/div&gt;
    &lt;/td&gt;
    &lt;td class=&quot;lovedCell&quot;&gt;
            &lt;br&gt;&lt;/td&gt;
                    &lt;td class=&quot;multibuttonCell&quot;&gt;
        &lt;a href=&quot;http://www.last.fm/music/Tommy+heavenly6/_/ABOUT+U&quot; class=&quot;             mRemoveFromLibrary         mSend
        mAddTags
                mAddToPlaylist
                     mLove                                     lfmButton lfmMultiButton lfmButtonFortrack lfmSmallButton lfmSmallMultiButton lfmMultiButtonFull&quot; forcelink=&quot;1&quot;&gt;&lt;/a&gt;    &lt;br&gt;&lt;/td&gt;
    &lt;td class=&quot;chartbarCell&quot;&gt;
    &lt;div style=&quot;width: 26%;&quot; class=&quot;chartbar&quot;&gt;&lt;span&gt;17&lt;/span&gt;&lt;/div&gt;    &lt;/td&gt;

                &lt;/tr&gt;&lt;tr class=&quot;last odd&quot;&gt;
&lt;td class=&quot;positionCell&quot;&gt;
        14
    &lt;/td&gt;
        &lt;td class=&quot;playbuttonCell&quot;&gt;
        &amp;nbsp;    &lt;/td&gt;
                                                        &lt;td class=&quot;subjectCell&quot; title=&quot;We Will Rock You, played 17 times&quot;&gt;
            &lt;div&gt;
                                        &lt;a href=&quot;http://www.last.fm/music/Queen&quot;&gt;Queen&lt;/a&gt; – &lt;a href=&quot;http://www.last.fm/music/Queen/_/We+Will+Rock+You&quot;&gt;We Will Rock You&lt;/a&gt;                        
                                    &lt;/div&gt;
    &lt;/td&gt;
    &lt;td class=&quot;lovedCell&quot;&gt;
            &lt;br&gt;&lt;/td&gt;
                    &lt;td class=&quot;multibuttonCell&quot;&gt;
        &lt;a href=&quot;http://www.last.fm/music/Queen/_/We+Will+Rock+You&quot; class=&quot;             mRemoveFromLibrary         mSend
        mAddTags
                mAddToPlaylist
                     mLove                                     lfmButton lfmMultiButton lfmButtonFortrack lfmSmallButton lfmSmallMultiButton lfmMultiButtonFull&quot; forcelink=&quot;1&quot;&gt;&lt;/a&gt;    &lt;br&gt;&lt;/td&gt;
    &lt;td class=&quot;chartbarCell&quot;&gt;
    &lt;div style=&quot;width: 26%;&quot; class=&quot;chartbar&quot;&gt;&lt;span&gt;17&lt;/span&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br&gt;제목 참 길기도 하지?&lt;br&gt;&lt;br&gt;3위에 저 난 알아요는 1집의 그 난 알아요가 아니고&lt;br&gt;&lt;br&gt;The Great Seotaiji Symphony에서 공연한거&lt;br&gt;&lt;br&gt;내 취향은 대략 국적불명인듯&lt;br&gt;&lt;br&gt;&lt;fieldset style=&quot;margin:20px 0px 20px 0px;padding:5px;&quot;&gt;&lt;legend&gt;&lt;span&gt;&lt;strong&gt;크리에이티브 커먼즈 라이센스&lt;/strong&gt;&lt;/span&gt;&lt;/legend&gt;&lt;!--Creative Commons License--&gt;&lt;div style=&quot;float: left; width: 88px; margin-top: 3px;&quot;&gt;&lt;a rel=&quot;license&quot; href=&quot;http://creativecommons.org/licenses/by-nc-nd/2.0/kr/&quot; target=_blank&gt;&lt;img alt=&quot;Creative Commons License&quot; style=&quot;border-width: 0&quot; src=&quot;http://i.creativecommons.org/l/by-nc-nd/2.0/kr/88x31.png&quot;/&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;margin-left: 92px; margin-top: 3px; text-align: justify;&quot;&gt;이 저작물은 &lt;a rel=&quot;license&quot; href=&quot;http://creativecommons.org/licenses/by-nc-nd/2.0/kr/&quot; target=_blank&gt;크리에이티브 커먼즈 코리아 저작자표시-비영리-변경금지 2.0 대한민국 라이센스&lt;/a&gt;에 따라 이용하실 수 있습니다.
			&lt;!-- Creative Commons License--&gt;
			&lt;!-- &lt;rdf:RDF xmlns=&quot;http://web.resource.org/cc/&quot; xmlns:dc=&quot;http://purl.org/dc/elements/1.1/&quot; xmlns:rdf=&quot;http://www.w3.org/1999/02/22-rdf-syntax-ns#&quot;&gt;
			&lt;Work rdf:about=&quot;&quot;&gt;
			&lt;license rdf:resource=&quot;http://creativecommons.org/licenses/by-nc-nd/2.0/kr/&quot; /&gt;
			&lt;/Work&gt;
			&lt;License rdf:about=&quot;http://creativecommons.org/licenses/by-nc-nd/&quot;&gt;
			&lt;permits rdf:resource=&quot;http://web.resource.org/cc/Reproduction&quot;/&gt;
			&lt;permits rdf:resource=&quot;http://web.resource.org/cc/Distribution&quot;/&gt;
			&lt;requires rdf:resource=&quot;http://web.resource.org/cc/Notice&quot;/&gt;
			&lt;requires rdf:resource=&quot;http://web.resource.org/cc/Attribution&quot;/&gt;&lt;prohibits rdf:resource=&quot;http://web.resource.org/cc/CommercialUse&quot;/&gt;&lt;/License&gt;&lt;/rdf:RDF&gt; --&gt;&lt;/div&gt;&lt;/fieldset&gt;</description>
			<author>(호빵)</author>
			<guid>http://hoppang.net/tc/58</guid>
			<comments>http://hoppang.net/tc/58#entry58comment</comments>
			<pubDate>Tue, 12 Jan 2010 01:47:06 +0900</pubDate>
		</item>
		<item>
			<title>고민끝</title>
			<link>http://hoppang.net/tc/57</link>
			<description>&lt;br&gt;&lt;pre name=&quot;CODE&quot; class=&quot;php&quot;&gt;
class Arm_vm
{
// 이상 생략
&amp;nbsp; &amp;nbsp; std::map&amp;lt;uint32_t, std::tr1::function&amp;lt;uint32_t, (Arm_vm*, bool, uint32_t)&amp;gt; handler;
// 이하 생략
};

Arm_vm::Arm_vm()
{
// 기타 생략
&amp;nbsp; &amp;nbsp; handler[1] = &amp;amp;Arm_vm::handler_1;
&amp;nbsp; &amp;nbsp; handler[2] = &amp;amp;Arm_vm::handler_2;

 &amp;nbsp;&amp;nbsp; handler[3] = &amp;amp;Arm_vm::handler_3;

 &amp;nbsp;&amp;nbsp; handler[4] = &amp;amp;Arm_vm::handler_4;
// 또 이하 생략

}

// 호출할 때
uint32_t ret = handler[3](this, true, 0x1000);
// handler가 불리는 위치가 클래스 내가 아니라면 this를 적당히 바꿔줘야겠지

&lt;/pre&gt;&lt;br&gt;&lt;fieldset style=&quot;margin:20px 0px 20px 0px;padding:5px;&quot;&gt;&lt;legend&gt;&lt;span&gt;&lt;strong&gt;크리에이티브 커먼즈 라이센스&lt;/strong&gt;&lt;/span&gt;&lt;/legend&gt;&lt;!--Creative Commons License--&gt;&lt;div style=&quot;float: left; width: 88px; margin-top: 3px;&quot;&gt;&lt;a rel=&quot;license&quot; href=&quot;http://creativecommons.org/licenses/by-nc-nd/2.0/kr/&quot; target=_blank&gt;&lt;img alt=&quot;Creative Commons License&quot; style=&quot;border-width: 0&quot; src=&quot;http://i.creativecommons.org/l/by-nc-nd/2.0/kr/88x31.png&quot;/&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;margin-left: 92px; margin-top: 3px; text-align: justify;&quot;&gt;이 저작물은 &lt;a rel=&quot;license&quot; href=&quot;http://creativecommons.org/licenses/by-nc-nd/2.0/kr/&quot; target=_blank&gt;크리에이티브 커먼즈 코리아 저작자표시-비영리-변경금지 2.0 대한민국 라이센스&lt;/a&gt;에 따라 이용하실 수 있습니다.
			&lt;!-- Creative Commons License--&gt;
			&lt;!-- &lt;rdf:RDF xmlns=&quot;http://web.resource.org/cc/&quot; xmlns:dc=&quot;http://purl.org/dc/elements/1.1/&quot; xmlns:rdf=&quot;http://www.w3.org/1999/02/22-rdf-syntax-ns#&quot;&gt;
			&lt;Work rdf:about=&quot;&quot;&gt;
			&lt;license rdf:resource=&quot;http://creativecommons.org/licenses/by-nc-nd/2.0/kr/&quot; /&gt;
			&lt;/Work&gt;
			&lt;License rdf:about=&quot;http://creativecommons.org/licenses/by-nc-nd/&quot;&gt;
			&lt;permits rdf:resource=&quot;http://web.resource.org/cc/Reproduction&quot;/&gt;
			&lt;permits rdf:resource=&quot;http://web.resource.org/cc/Distribution&quot;/&gt;
			&lt;requires rdf:resource=&quot;http://web.resource.org/cc/Notice&quot;/&gt;
			&lt;requires rdf:resource=&quot;http://web.resource.org/cc/Attribution&quot;/&gt;&lt;prohibits rdf:resource=&quot;http://web.resource.org/cc/CommercialUse&quot;/&gt;&lt;/License&gt;&lt;/rdf:RDF&gt; --&gt;&lt;/div&gt;&lt;/fieldset&gt;</description>
			<category>삽질일기</category>
			<category>tr1</category>
			<category>멤버함수포인터</category>
			<author>(호빵)</author>
			<guid>http://hoppang.net/tc/57</guid>
			<comments>http://hoppang.net/tc/57#entry57comment</comments>
			<pubDate>Mon, 11 Jan 2010 03:50:05 +0900</pubDate>
		</item>
		<item>
			<title>고민중</title>
			<link>http://hoppang.net/tc/56</link>
			<description>&lt;br&gt;C에서는 어렵겠지만 C++에서 이름으로 변수를 만드는 건 어려운 일이 아니다.&lt;br&gt;&lt;br&gt;&lt;pre name=&quot;CODE&quot; class=&quot;php&quot;&gt;
std::map&amp;lt;std::string, int&amp;gt; variable_map;

void set_variable(const std::string&amp;amp; str, int value)
{
&amp;nbsp; &amp;nbsp; variable_map[str] = value;
}

int get_variable(const std::string&amp;amp; str)
{
&amp;nbsp; &amp;nbsp; return variable_map[str];
}
&lt;/pre&gt;&lt;br&gt;거의 꼼수 수준이긴 하지만. (느리기도 하겠고)&lt;br&gt;&lt;br&gt;문제는, 지금 하고 싶은 것은 &quot;a&quot;라는 변수를 읽을 때마다 &quot;handler_a&quot; 라는 함수를 호출하고 싶다는 것이다. 앞의 handler_는 다 똑같다고 봤을 때, 결국 문제는 함수 이름으로 함수를 호출할 수 있느냐는 것이다.&lt;br&gt;&lt;br&gt;C++을 버리면 간단하겠지만 그러지 않는 편이 좋으니까..&lt;br&gt;&lt;br&gt;고민 답 나오면 추가함. :$&lt;br&gt;&lt;br&gt;&lt;p id=&quot;more56_0&quot; class=&quot;moreless_fold&quot;&gt;&lt;span style=&quot;cursor: pointer;&quot; onclick=&quot;toggleMoreLess(this, &#039;56_0&#039;,&#039; more.. &#039;,&#039; less.. &#039;); return false;&quot;&gt; more.. &lt;/span&gt;&lt;/p&gt;&lt;div id=&quot;content56_0&quot; class=&quot;moreless_content&quot; style=&quot;display: none;&quot;&gt;&lt;br&gt;답이 있을듯 없을듯 있을듯 없는 해결책&lt;br&gt;&lt;br&gt;&lt;pre name=&quot;CODE&quot; class=&quot;php&quot;&gt;
std::map&amp;lt;std::string, int&amp;gt; value_map;
std::map&amp;lt;std::string, func_ptr&amp;gt; read_handler_map;
std::map&amp;lt;std::string, func_ptr&amp;gt; write_handler_map;


void set_variable(const std::string&amp;amp; str, int value)
{
&amp;nbsp; &amp;nbsp; write_handler_map[str];

&amp;nbsp; &amp;nbsp; variable_map[str] = value;
}

int get_variable(const std::string&amp;amp; str)
{
&amp;nbsp; &amp;nbsp; read_handler_map[str];

&amp;nbsp; &amp;nbsp; return variable_map[str];
}
&lt;/pre&gt;&lt;br&gt;생각해보니까 저런 식으로 핸들러 설정이 가능하면 value_map이 필요가 없네?&lt;br&gt;&lt;br&gt;뭐 애초에 저렇게 맘 편한 파일포인터 설정이 가능한게 지금으로서는 boost를 이용하거나&lt;br&gt;&lt;br&gt;아님 tr1::function을 이용하거나 둘중 하난데.. 어째야하나&lt;br&gt;&lt;br&gt;&lt;/div&gt;&lt;br&gt;&lt;fieldset style=&quot;margin:20px 0px 20px 0px;padding:5px;&quot;&gt;&lt;legend&gt;&lt;span&gt;&lt;strong&gt;크리에이티브 커먼즈 라이센스&lt;/strong&gt;&lt;/span&gt;&lt;/legend&gt;&lt;!--Creative Commons License--&gt;&lt;div style=&quot;float: left; width: 88px; margin-top: 3px;&quot;&gt;&lt;a rel=&quot;license&quot; href=&quot;http://creativecommons.org/licenses/by-nc-nd/2.0/kr/&quot; target=_blank&gt;&lt;img alt=&quot;Creative Commons License&quot; style=&quot;border-width: 0&quot; src=&quot;http://i.creativecommons.org/l/by-nc-nd/2.0/kr/88x31.png&quot;/&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;margin-left: 92px; margin-top: 3px; text-align: justify;&quot;&gt;이 저작물은 &lt;a rel=&quot;license&quot; href=&quot;http://creativecommons.org/licenses/by-nc-nd/2.0/kr/&quot; target=_blank&gt;크리에이티브 커먼즈 코리아 저작자표시-비영리-변경금지 2.0 대한민국 라이센스&lt;/a&gt;에 따라 이용하실 수 있습니다.
			&lt;!-- Creative Commons License--&gt;
			&lt;!-- &lt;rdf:RDF xmlns=&quot;http://web.resource.org/cc/&quot; xmlns:dc=&quot;http://purl.org/dc/elements/1.1/&quot; xmlns:rdf=&quot;http://www.w3.org/1999/02/22-rdf-syntax-ns#&quot;&gt;
			&lt;Work rdf:about=&quot;&quot;&gt;
			&lt;license rdf:resource=&quot;http://creativecommons.org/licenses/by-nc-nd/2.0/kr/&quot; /&gt;
			&lt;/Work&gt;
			&lt;License rdf:about=&quot;http://creativecommons.org/licenses/by-nc-nd/&quot;&gt;
			&lt;permits rdf:resource=&quot;http://web.resource.org/cc/Reproduction&quot;/&gt;
			&lt;permits rdf:resource=&quot;http://web.resource.org/cc/Distribution&quot;/&gt;
			&lt;requires rdf:resource=&quot;http://web.resource.org/cc/Notice&quot;/&gt;
			&lt;requires rdf:resource=&quot;http://web.resource.org/cc/Attribution&quot;/&gt;&lt;prohibits rdf:resource=&quot;http://web.resource.org/cc/CommercialUse&quot;/&gt;&lt;/License&gt;&lt;/rdf:RDF&gt; --&gt;&lt;/div&gt;&lt;/fieldset&gt;</description>
			<category>삽질일기</category>
			<category>함수 이름으로 호출하고 싶은데 방법을 모르겠다</category>
			<author>(호빵)</author>
			<guid>http://hoppang.net/tc/56</guid>
			<comments>http://hoppang.net/tc/56#entry56comment</comments>
			<pubDate>Sat, 09 Jan 2010 17:29:40 +0900</pubDate>
		</item>
		<item>
			<title>undefined reference to &#039;luaL_newstate()&#039;</title>
			<link>http://hoppang.net/tc/55</link>
			<description>&lt;br&gt;아.. 혼자 삽질했다.&lt;br&gt;&lt;br&gt;&lt;pre name=&quot;CODE&quot; class=&quot;php&quot;&gt;
&amp;nbsp; &amp;nbsp; lua_State *L = lua_open();
&lt;/pre&gt;&lt;br&gt;이 단 한줄의 코드를 링크할때 제목과 같은 에러가 나는데,&lt;br&gt;&lt;br&gt;물론 라이브러리 링크를 까먹을만큼 내가 나사 빠진 인간은 아니고..&lt;br&gt;&lt;br&gt;이유는 간단했다. &lt;span style=&quot;font-weight: bold;&quot;&gt;C++ 소스에서&lt;/span&gt; 헤더를 &lt;span style=&quot;font-weight: bold;&quot;&gt;그냥&lt;/span&gt; 불러왔더니 저렇게 된 것이다.&lt;br&gt;&lt;br&gt;&lt;pre name=&quot;CODE&quot; class=&quot;php&quot;&gt;
extern &quot;C&quot; {
#include&amp;lt;lua.h&amp;gt;
#include&amp;lt;lauxlib.h&amp;gt;
#include&amp;lt;lualib.h&amp;gt;
}
&lt;/pre&gt;&lt;br&gt;상식있게 살자.&lt;br&gt;&lt;br&gt;..이건 진짜 삽질일기로구만.&lt;br&gt;&lt;br&gt;&lt;fieldset style=&quot;margin:20px 0px 20px 0px;padding:5px;&quot;&gt;&lt;legend&gt;&lt;span&gt;&lt;strong&gt;크리에이티브 커먼즈 라이센스&lt;/strong&gt;&lt;/span&gt;&lt;/legend&gt;&lt;!--Creative Commons License--&gt;&lt;div style=&quot;float: left; width: 88px; margin-top: 3px;&quot;&gt;&lt;a rel=&quot;license&quot; href=&quot;http://creativecommons.org/licenses/by-nc-nd/2.0/kr/&quot; target=_blank&gt;&lt;img alt=&quot;Creative Commons License&quot; style=&quot;border-width: 0&quot; src=&quot;http://i.creativecommons.org/l/by-nc-nd/2.0/kr/88x31.png&quot;/&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;margin-left: 92px; margin-top: 3px; text-align: justify;&quot;&gt;이 저작물은 &lt;a rel=&quot;license&quot; href=&quot;http://creativecommons.org/licenses/by-nc-nd/2.0/kr/&quot; target=_blank&gt;크리에이티브 커먼즈 코리아 저작자표시-비영리-변경금지 2.0 대한민국 라이센스&lt;/a&gt;에 따라 이용하실 수 있습니다.
			&lt;!-- Creative Commons License--&gt;
			&lt;!-- &lt;rdf:RDF xmlns=&quot;http://web.resource.org/cc/&quot; xmlns:dc=&quot;http://purl.org/dc/elements/1.1/&quot; xmlns:rdf=&quot;http://www.w3.org/1999/02/22-rdf-syntax-ns#&quot;&gt;
			&lt;Work rdf:about=&quot;&quot;&gt;
			&lt;license rdf:resource=&quot;http://creativecommons.org/licenses/by-nc-nd/2.0/kr/&quot; /&gt;
			&lt;/Work&gt;
			&lt;License rdf:about=&quot;http://creativecommons.org/licenses/by-nc-nd/&quot;&gt;
			&lt;permits rdf:resource=&quot;http://web.resource.org/cc/Reproduction&quot;/&gt;
			&lt;permits rdf:resource=&quot;http://web.resource.org/cc/Distribution&quot;/&gt;
			&lt;requires rdf:resource=&quot;http://web.resource.org/cc/Notice&quot;/&gt;
			&lt;requires rdf:resource=&quot;http://web.resource.org/cc/Attribution&quot;/&gt;&lt;prohibits rdf:resource=&quot;http://web.resource.org/cc/CommercialUse&quot;/&gt;&lt;/License&gt;&lt;/rdf:RDF&gt; --&gt;&lt;/div&gt;&lt;/fieldset&gt;</description>
			<category>삽질일기</category>
			<author>(호빵)</author>
			<guid>http://hoppang.net/tc/55</guid>
			<comments>http://hoppang.net/tc/55#entry55comment</comments>
			<pubDate>Fri, 25 Dec 2009 20:55:34 +0900</pubDate>
		</item>
		<item>
			<title>Obj-C: 이름으로 호출하기</title>
			<link>http://hoppang.net/tc/54</link>
			<description>&lt;br&gt;&lt;pre name=&quot;CODE&quot; class=&quot;php&quot;&gt;
switch(i) {
&amp;nbsp; &amp;nbsp; case 0:
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; func00(); break;
&amp;nbsp; &amp;nbsp; case 1:
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; func01(); break;
&amp;nbsp; &amp;nbsp; case 2:
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; func02(); break;
...
}
&lt;/pre&gt;&lt;br&gt;코딩을 하다보면 이런 상황이 간혹 올 때가 있다&lt;br&gt;&lt;br&gt;코코아에서는 이것을 그나마 좀 더 편하게 할 수도 있다.&lt;br&gt;&lt;br&gt;&lt;pre name=&quot;CODE&quot; class=&quot;php&quot;&gt;
NSString* funcName = [NSString stringWithFormat:@&quot;func%02x&quot;, i];
[self performSelector:NSSelectorFromString(funcName)];
&lt;/pre&gt;&lt;br&gt;NSSelectorFromString과 performSelector를 이용하면 함수 이름으로 호출이 가능하다.&lt;br&gt;&lt;br&gt;없는 함수를 찾는다면?&lt;br&gt;&lt;br&gt;그냥 실행이 안될뿐.&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;fieldset style=&quot;margin:20px 0px 20px 0px;padding:5px;&quot;&gt;&lt;legend&gt;&lt;span&gt;&lt;strong&gt;크리에이티브 커먼즈 라이센스&lt;/strong&gt;&lt;/span&gt;&lt;/legend&gt;&lt;!--Creative Commons License--&gt;&lt;div style=&quot;float: left; width: 88px; margin-top: 3px;&quot;&gt;&lt;a rel=&quot;license&quot; href=&quot;http://creativecommons.org/licenses/by-nc-nd/2.0/kr/&quot; target=_blank&gt;&lt;img alt=&quot;Creative Commons License&quot; style=&quot;border-width: 0&quot; src=&quot;http://i.creativecommons.org/l/by-nc-nd/2.0/kr/88x31.png&quot;/&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;margin-left: 92px; margin-top: 3px; text-align: justify;&quot;&gt;이 저작물은 &lt;a rel=&quot;license&quot; href=&quot;http://creativecommons.org/licenses/by-nc-nd/2.0/kr/&quot; target=_blank&gt;크리에이티브 커먼즈 코리아 저작자표시-비영리-변경금지 2.0 대한민국 라이센스&lt;/a&gt;에 따라 이용하실 수 있습니다.
			&lt;!-- Creative Commons License--&gt;
			&lt;!-- &lt;rdf:RDF xmlns=&quot;http://web.resource.org/cc/&quot; xmlns:dc=&quot;http://purl.org/dc/elements/1.1/&quot; xmlns:rdf=&quot;http://www.w3.org/1999/02/22-rdf-syntax-ns#&quot;&gt;
			&lt;Work rdf:about=&quot;&quot;&gt;
			&lt;license rdf:resource=&quot;http://creativecommons.org/licenses/by-nc-nd/2.0/kr/&quot; /&gt;
			&lt;/Work&gt;
			&lt;License rdf:about=&quot;http://creativecommons.org/licenses/by-nc-nd/&quot;&gt;
			&lt;permits rdf:resource=&quot;http://web.resource.org/cc/Reproduction&quot;/&gt;
			&lt;permits rdf:resource=&quot;http://web.resource.org/cc/Distribution&quot;/&gt;
			&lt;requires rdf:resource=&quot;http://web.resource.org/cc/Notice&quot;/&gt;
			&lt;requires rdf:resource=&quot;http://web.resource.org/cc/Attribution&quot;/&gt;&lt;prohibits rdf:resource=&quot;http://web.resource.org/cc/CommercialUse&quot;/&gt;&lt;/License&gt;&lt;/rdf:RDF&gt; --&gt;&lt;/div&gt;&lt;/fieldset&gt;</description>
			<category>맥이야기</category>
			<category>코코아</category>
			<category>팁</category>
			<category>호출</category>
			<author>(호빵)</author>
			<guid>http://hoppang.net/tc/54</guid>
			<comments>http://hoppang.net/tc/54#entry54comment</comments>
			<pubDate>Sat, 17 Oct 2009 19:42:22 +0900</pubDate>
		</item>
		<item>
			<title>EXC_BAD_ACCESS 예외</title>
			<link>http://hoppang.net/tc/53</link>
			<description>&lt;pre name=&quot;CODE&quot; class=&quot;php&quot;&gt;
void iambabo(int merong)
{
&amp;nbsp; &amp;nbsp; merong = 100;
}
&lt;/pre&gt;&lt;br&gt;이런 등신짓을 하면 나기도함.&lt;br&gt;&lt;br&gt;&lt;fieldset style=&quot;margin:20px 0px 20px 0px;padding:5px;&quot;&gt;&lt;legend&gt;&lt;span&gt;&lt;strong&gt;크리에이티브 커먼즈 라이센스&lt;/strong&gt;&lt;/span&gt;&lt;/legend&gt;&lt;!--Creative Commons License--&gt;&lt;div style=&quot;float: left; width: 88px; margin-top: 3px;&quot;&gt;&lt;a rel=&quot;license&quot; href=&quot;http://creativecommons.org/licenses/by-nc-nd/2.0/kr/&quot; target=_blank&gt;&lt;img alt=&quot;Creative Commons License&quot; style=&quot;border-width: 0&quot; src=&quot;http://i.creativecommons.org/l/by-nc-nd/2.0/kr/88x31.png&quot;/&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;margin-left: 92px; margin-top: 3px; text-align: justify;&quot;&gt;이 저작물은 &lt;a rel=&quot;license&quot; href=&quot;http://creativecommons.org/licenses/by-nc-nd/2.0/kr/&quot; target=_blank&gt;크리에이티브 커먼즈 코리아 저작자표시-비영리-변경금지 2.0 대한민국 라이센스&lt;/a&gt;에 따라 이용하실 수 있습니다.
			&lt;!-- Creative Commons License--&gt;
			&lt;!-- &lt;rdf:RDF xmlns=&quot;http://web.resource.org/cc/&quot; xmlns:dc=&quot;http://purl.org/dc/elements/1.1/&quot; xmlns:rdf=&quot;http://www.w3.org/1999/02/22-rdf-syntax-ns#&quot;&gt;
			&lt;Work rdf:about=&quot;&quot;&gt;
			&lt;license rdf:resource=&quot;http://creativecommons.org/licenses/by-nc-nd/2.0/kr/&quot; /&gt;
			&lt;/Work&gt;
			&lt;License rdf:about=&quot;http://creativecommons.org/licenses/by-nc-nd/&quot;&gt;
			&lt;permits rdf:resource=&quot;http://web.resource.org/cc/Reproduction&quot;/&gt;
			&lt;permits rdf:resource=&quot;http://web.resource.org/cc/Distribution&quot;/&gt;
			&lt;requires rdf:resource=&quot;http://web.resource.org/cc/Notice&quot;/&gt;
			&lt;requires rdf:resource=&quot;http://web.resource.org/cc/Attribution&quot;/&gt;&lt;prohibits rdf:resource=&quot;http://web.resource.org/cc/CommercialUse&quot;/&gt;&lt;/License&gt;&lt;/rdf:RDF&gt; --&gt;&lt;/div&gt;&lt;/fieldset&gt;</description>
			<category>바보</category>
			<author>(호빵)</author>
			<guid>http://hoppang.net/tc/53</guid>
			<comments>http://hoppang.net/tc/53#entry53comment</comments>
			<pubDate>Thu, 08 Oct 2009 20:39:49 +0900</pubDate>
		</item>
	</channel>
</rss>
