<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <title>조영규의 블로그</title>
    <link>https://youngkyu.tistory.com/</link>
    <description>늘 덕분에 삽니다.</description>
    <language>ko</language>
    <pubDate>Thu, 13 Aug 2026 00:36:01 +0900</pubDate>
    <generator>TISTORY</generator>
    <ttl>100</ttl>
    <managingEditor>youngkyu.cho</managingEditor>
    <image>
      <title>조영규의 블로그</title>
      <url>https://t1.daumcdn.net/cfile/tistory/270F5B485310D31126</url>
      <link>https://youngkyu.tistory.com</link>
    </image>
    <item>
      <title>Android Support Library란?</title>
      <link>https://youngkyu.tistory.com/39</link>
      <description>&lt;en-note lang=&quot;v2&quot; style=&quot;color: #2c3f51; font-family: 'Helvetica Neue', Arial, 'Hiragino Sans GB', STHeiti, 'Microsoft YaHei', 'WenQuanYi Micro Hei', SimSun, Song, sans-serif; line-height: 1.6;&quot;&gt;&lt;del style=&quot;position:relative;display:block;z-index:10;&quot;&gt;&lt;a style=&quot;position: absolute;color: #FFF;text-decoration: none;font-size: 12px;height: 25px;border-radius: 0;margin-top: -20px;right: 15px;background: rgba(0, 0, 0, 0);border-left: 10px solid #BB3A34;border-right: 10px solid #BB3A34;border-bottom: 5px solid rgba(0, 0, 0, 0);width: 0;text-indent:-100000px;&quot; href=&quot;http://marxi.co/#/?provider=evernote_int&amp;amp;guid=50e200f9-db08-4fde-824d-0e472384f87d&amp;amp;notebook=youngkyu.cho&quot;&gt;Edit&lt;/a&gt;&lt;/del&gt;&lt;div style=&quot;color: #2c3f51; font-family: 'Helvetica Neue', Arial, 'Hiragino Sans GB', STHeiti, 'Microsoft YaHei', 'WenQuanYi Micro Hei', SimSun, Song, sans-serif; line-height: 1.6;&quot;&gt;
                        &lt;div style=&quot;line-height: 1.6;&quot;&gt;&lt;/div&gt;
                    &lt;div style=&quot;line-height: 1.6;&quot;&gt;

&lt;p style=&quot;margin: 0 0 1.1em; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;&lt;/p&gt;&lt;p style=&quot;margin: 0 0 1.1em; color: rgba(0,0,0,0.8); line-height: 1.6;&quot;&gt;&lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; background-color: #f9f2f4; white-space: normal; padding: 2px 5px; color: rgba(44,63,81,0.5); border-radius: 0; background: rgba(102,128,153,0.075);&quot;&gt;티스토리&lt;/code&gt; &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; background-color: #f9f2f4; white-space: normal; padding: 2px 5px; color: rgba(44,63,81,0.5); border-radius: 0; background: rgba(102,128,153,0.075);&quot;&gt;android&lt;/code&gt; &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; background-color: #f9f2f4; white-space: normal; padding: 2px 5px; color: rgba(44,63,81,0.5); border-radius: 0; background: rgba(102,128,153,0.075);&quot;&gt;안드로이드&lt;/code&gt; &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; background-color: #f9f2f4; white-space: normal; padding: 2px 5px; color: rgba(44,63,81,0.5); border-radius: 0; background: rgba(102,128,153,0.075);&quot;&gt;support library&lt;/code&gt; &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; background-color: #f9f2f4; white-space: normal; padding: 2px 5px; color: rgba(44,63,81,0.5); border-radius: 0; background: rgba(102,128,153,0.075);&quot;&gt;서포트 라이브러리&lt;/code&gt; &lt;/p&gt;&lt;p style=&quot;margin: 0 0 1.1em; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 1.6;&quot;&gt;

&lt;h1 style=&quot;font-size: 2.6em; margin: 1.2em 0 .6em 0; font-family: inherit; font-weight: bold; line-height: 1.1; margin-top: 21px; margin-bottom: 10.5px; text-align: start; color: rgba(0,0,0,0.8);&quot;&gt;Android Support Library란?&lt;/h1&gt;

&lt;p style=&quot;margin: 0 0 1.1em; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;안드로이드 Support 라이브러리는 프레임워크가 제공하지 않는 기능들을 제공한다. 본 라이브러리는 새 기능의 하휘 호환을 제공하며, 유용한 UI 엘리먼트들과 앱을 위한 다양한 유틸리티를 제공한다.&lt;/p&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 1.6;&quot;&gt;

&lt;h1 style=&quot;font-size: 2.6em; margin: 1.2em 0 .6em 0; font-family: inherit; font-weight: bold; line-height: 1.1; margin-top: 21px; margin-bottom: 10.5px; text-align: start; color: rgba(0,0,0,0.8);&quot;&gt;개괄&lt;/h1&gt;

&lt;p style=&quot;margin: 0 0 1.1em; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;한 기능은 많은 경우 다른 많은 앱 개발자들에게도 중요한 경우가 많은데, 안드로이드 프레임워크는 이런 것들을 제대로 포함하고 있지 않다. 예를들어 자연스러운 안드로이드 버전별 대응 같은 것들이 바로 그것이다.&lt;/p&gt;&lt;p style=&quot;margin: 0 0 1.1em; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;이를 위해 안드로이드 SDK는 다양한 라이브러리들을 포함하고 있다. 그것이 바로 &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;Android Support Library&lt;/code&gt;다. 앱 개발자들은 해당 기능들이 필요할 때 이런 라이브러리를 추가할 수 있다.&lt;/p&gt;&lt;p style=&quot;margin: 0 0 1.1em; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;&lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;Support 라이브러리&lt;/code&gt;가 제공하는 특징적인 기능이다.&lt;/p&gt;

&lt;ul style=&quot;margin-top: 0; margin-bottom: 1.1em; line-height: 1.6;&quot;&gt;
&lt;li style=&quot;line-height: 1.6;&quot;&gt;하위호환성&lt;/li&gt;
&lt;li style=&quot;line-height: 1.6;&quot;&gt;UI 엘리먼트의 구현에서 안드로이드가 추천하는 레이아웃 패턴 사용&lt;/li&gt;
&lt;li style=&quot;line-height: 1.6;&quot;&gt;다른 form factor들에 대한 지원&lt;/li&gt;
&lt;li style=&quot;line-height: 1.6;&quot;&gt;다양한 유틸리티 함수&lt;/li&gt;
&lt;/ul&gt;

&lt;/div&gt;
&lt;div style=&quot;line-height: 1.6;&quot;&gt;

&lt;h1 style=&quot;font-size: 2.6em; margin: 1.2em 0 .6em 0; font-family: inherit; font-weight: bold; line-height: 1.1; margin-top: 21px; margin-bottom: 10.5px; text-align: start; color: rgba(0,0,0,0.8);&quot;&gt;하위 호환성이란?&lt;/h1&gt;

&lt;p style=&quot;margin: 0 0 1.1em; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;Support 라이브러리는 옛날 버전의 안드로이드 플랫폼을 최신 버전처럼 잘 지원할 수 있게 한다. 예를들어 앱이 5.0 버전(API level 21)보다 낮은 API 레벨에서 돌 때, 원래는 material 디자인이 아니지만 만약 앱이 &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;support&lt;/code&gt; 라이브러리의 &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;appcompat library&lt;/code&gt;를 쓴다면, 앱은 API 레벨 21이 제공하는 많은 기능들을 쓸 수 있을 뿐만 아니라, material 디자인으로 표현될 수 있다. 그 결과 앱은 좀 더 일관적인 경험을 플랫폼 버전을 뛰어넘으며 제공할 수 있다.&lt;/p&gt;&lt;p style=&quot;margin: 0 0 1.1em; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;&lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;support&lt;/code&gt;라이브러리는 최대한 프레임워크에 의존해 동작하려 노력한다. 그러나 상황이 여의치않은 낮은 API 레벨에서는 스스로 동작하여 해당 동작을 수행한다. 일반적으로 &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;...Compat&lt;/code&gt;으로 끝나는 친구들이 이런 역할을 하는 친구들이다. 예를들어 &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;ActivityCompat&lt;/code&gt;같은.&lt;/p&gt;&lt;p style=&quot;margin: 0 0 1.1em; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;어떤 경우에는 &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;support&lt;/code&gt;라이브러리가 어떠한 프레임워크 API 도움 없이 스스로 동작하는 경우도 있다. 이런 메소드는 모든 지원하는 플렛폼에서 일관되게 작동한다.&lt;/p&gt;&lt;p style=&quot;margin: 0 0 1.1em; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;어떤 경우든, 앱은 런타임 때 시스템의 버전을 체크할 필요가 없다. 앱은 &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;support&lt;/code&gt;라이브러리에 의존하면 되며, 알아서 시스템 상태를 체크해 동작해 줄 것이다.&lt;/p&gt;&lt;p style=&quot;margin: 0 0 1.1em; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;아래 그림을 보면, 안드로이드 4.4에서 동작하는 화면이다. 원래 안드로이드 4.4는 material 디자인을 지원하지 않지만, &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;support&lt;/code&gt; library UI 엘리먼트가 만들어 준다.&lt;/p&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 1.6;&quot;&gt;

&lt;p style=&quot;margin: 0 0 1.1em; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;&lt;/p&gt;&lt;p style=&quot;text-align: center; clear: none; float: none;&quot;&gt;&lt;span class=&quot;imageblock&quot; style=&quot;display: inline-block; width: 300px;  height: auto; max-width: 100%;&quot;&gt;&lt;img src=&quot;https://t1.daumcdn.net/cfile/tistory/25396843574F1B2D06&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Ft1.daumcdn.net%2Fcfile%2Ftistory%2F25396843574F1B2D06&quot; width=&quot;300&quot; height=&quot;521&quot; filename=&quot;./1464798952063.png&quot; filemime=&quot;image/png&quot;/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 1.6;&quot;&gt;

&lt;h1 style=&quot;font-size: 2.6em; margin: 1.2em 0 .6em 0; font-family: inherit; font-weight: bold; line-height: 1.1; margin-top: 21px; margin-bottom: 10.5px; text-align: start; color: rgba(0,0,0,0.8);&quot;&gt;일반적인 레이아웃 패턴의 지원&lt;/h1&gt;

&lt;p style=&quot;margin: 0 0 1.1em; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;&lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;support&lt;/code&gt; 라이브러리는 안드로이드 프레임워크가 지원하지 않는 사용자 인터페이스를 지원한다. 예를들면 &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;DrawerLayout&lt;/code&gt;같은 것이 그것이다. 이러한 클레스들은 안드로이드 디자인 practice들에서 권장되는 것을 따른다.&lt;/p&gt;&lt;p style=&quot;margin: 0 0 1.1em; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;이러한 &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;support&lt;/code&gt;라이브러리가 지원하는 것들의 사용으로 인해 바퀴를 또 발명하는 일 따위를 안해도 된다! 까다로운 UI가 필요하다면, 당신은 이미 있는, 사용자가 친숙한 UI 인터페이스를 제공하는 &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;support&lt;/code&gt; 라이브러리의 코드를 사용해 제작하면 된다. 예를 들어 많은 앱들이 엄청난 리스트를 빠르고 효과적으로 엘리먼트를 재사용하며 보여주길 원하는데, 이를 위해 &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;support&lt;/code&gt;라이브러리는 &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;RecyclerView&lt;/code&gt;를 제공한다!&lt;/p&gt;

&lt;/div&gt;
&lt;div style=&quot;line-height: 1.6;&quot;&gt;

&lt;h1 style=&quot;font-size: 2.6em; margin: 1.2em 0 .6em 0; font-family: inherit; font-weight: bold; line-height: 1.1; margin-top: 21px; margin-bottom: 10.5px; text-align: start; color: rgba(0,0,0,0.8);&quot;&gt;다른 Form Factor들에 대한 지원&lt;/h1&gt;

&lt;p style=&quot;margin: 0 0 1.1em; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;안드로이드 SDK는 TV나 웨어러블 같은 다른 form factor도 지원한다. 앱은 컨텐츠를 외부 스크린에 제공한다거나, 혹은 스피커에 제공한다거나, 혹은 다른 디바이스에 전송하는 등의 기능등을 적절한 &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;support&lt;/code&gt; 라이브러리를 이용해 넓은 범위의 안드로이드 시스템을 커버할 수 있다. &lt;/p&gt;

&lt;/div&gt;
&lt;div style=&quot;line-height: 1.6;&quot;&gt;

&lt;h1 style=&quot;font-size: 2.6em; margin: 1.2em 0 .6em 0; font-family: inherit; font-weight: bold; line-height: 1.1; margin-top: 21px; margin-bottom: 10.5px; text-align: start; color: rgba(0,0,0,0.8);&quot;&gt;유용한 유틸리티의 제공&lt;/h1&gt;

&lt;p style=&quot;margin: 0 0 1.1em; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;안드로이드 &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;support&lt;/code&gt;라이브러리는 하위 호환성을 가진 유틸리티들을 제공한다. 앱들은 적절한 사용자 경험을 제공하는 이러한 유틸리티를 모든 안드로이드 시스템에서 사용할 수 있다. 예를들어 &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;support&lt;/code&gt; 라이브러리는 퍼미션 메소드들은 어떤 플랫폼 버전인지에 맞춰 적절하게 동작한다. 만약 플랫폼이 &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;Runtime Permission Model&lt;/code&gt;을 지원한다면, 이러한 메소드들은 적절한 퍼미션을 유저에게 요청할 것이며, 그게 아닌 경우, 메소드는 적절한 퍼미션을 install time에 체크해 grant할 것이다.&lt;/p&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 1.6;&quot;&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;center style=&quot;display:none&quot;&gt;@%5B%uD2F0%uC2A4%uD1A0%uB9AC%2Candroid%2C%uC548%uB4DC%uB85C%uC774%uB4DC%2Csupport%20library%2C%uC11C%uD3EC%uD2B8%20%uB77C%uC774%uBE0C%uB7EC%uB9AC%5D%0A%0A%23%20Android%20Support%20Library%uB780%3F%0A%0A%uC548%uB4DC%uB85C%uC774%uB4DC%20Support%20%uB77C%uC774%uBE0C%uB7EC%uB9AC%uB294%20%uD504%uB808%uC784%uC6CC%uD06C%uAC00%20%uC81C%uACF5%uD558%uC9C0%20%uC54A%uB294%20%uAE30%uB2A5%uB4E4%uC744%20%uC81C%uACF5%uD55C%uB2E4.%20%uBCF8%20%uB77C%uC774%uBE0C%uB7EC%uB9AC%uB294%20%uC0C8%20%uAE30%uB2A5%uC758%20%uD558%uD718%20%uD638%uD658%uC744%20%uC81C%uACF5%uD558%uBA70%2C%20%uC720%uC6A9%uD55C%20UI%20%uC5D8%uB9AC%uBA3C%uD2B8%uB4E4%uACFC%20%uC571%uC744%20%uC704%uD55C%20%uB2E4%uC591%uD55C%20%uC720%uD2F8%uB9AC%uD2F0%uB97C%20%uC81C%uACF5%uD55C%uB2E4.%0A%0A%23%20%uAC1C%uAD04%0A%0A%uD55C%20%uAE30%uB2A5%uC740%20%uB9CE%uC740%20%uACBD%uC6B0%20%uB2E4%uB978%20%uB9CE%uC740%20%uC571%20%uAC1C%uBC1C%uC790%uB4E4%uC5D0%uAC8C%uB3C4%20%uC911%uC694%uD55C%20%uACBD%uC6B0%uAC00%20%uB9CE%uC740%uB370%2C%20%uC548%uB4DC%uB85C%uC774%uB4DC%20%uD504%uB808%uC784%uC6CC%uD06C%uB294%20%uC774%uB7F0%20%uAC83%uB4E4%uC744%20%uC81C%uB300%uB85C%20%uD3EC%uD568%uD558%uACE0%20%uC788%uC9C0%20%uC54A%uB2E4.%20%uC608%uB97C%uB4E4%uC5B4%20%uC790%uC5F0%uC2A4%uB7EC%uC6B4%20%uC548%uB4DC%uB85C%uC774%uB4DC%20%uBC84%uC804%uBCC4%20%uB300%uC751%20%uAC19%uC740%20%uAC83%uB4E4%uC774%20%uBC14%uB85C%20%uADF8%uAC83%uC774%uB2E4.%0A%0A%uC774%uB97C%20%uC704%uD574%20%uC548%uB4DC%uB85C%uC774%uB4DC%20SDK%uB294%20%uB2E4%uC591%uD55C%20%uB77C%uC774%uBE0C%uB7EC%uB9AC%uB4E4%uC744%20%uD3EC%uD568%uD558%uACE0%20%uC788%uB2E4.%20%uADF8%uAC83%uC774%20%uBC14%uB85C%20%60Android%20Support%20Library%60%uB2E4.%20%uC571%20%uAC1C%uBC1C%uC790%uB4E4%uC740%20%uD574%uB2F9%20%uAE30%uB2A5%uB4E4%uC774%20%uD544%uC694%uD560%20%uB54C%20%uC774%uB7F0%20%uB77C%uC774%uBE0C%uB7EC%uB9AC%uB97C%20%uCD94%uAC00%uD560%20%uC218%20%uC788%uB2E4.%0A%0A%60Support%20%uB77C%uC774%uBE0C%uB7EC%uB9AC%60%uAC00%20%uC81C%uACF5%uD558%uB294%20%uD2B9%uC9D5%uC801%uC778%20%uAE30%uB2A5%uC774%uB2E4.%0A%0A-%20%uD558%uC704%uD638%uD658%uC131%0A-%20UI%20%uC5D8%uB9AC%uBA3C%uD2B8%uC758%20%uAD6C%uD604%uC5D0%uC11C%20%uC548%uB4DC%uB85C%uC774%uB4DC%uAC00%20%uCD94%uCC9C%uD558%uB294%20%uB808%uC774%uC544%uC6C3%20%uD328%uD134%20%uC0AC%uC6A9%0A-%20%uB2E4%uB978%20form%20factor%uB4E4%uC5D0%20%uB300%uD55C%20%uC9C0%uC6D0%0A-%20%uB2E4%uC591%uD55C%20%uC720%uD2F8%uB9AC%uD2F0%20%uD568%uC218%0A%0A%23%20%uD558%uC704%20%uD638%uD658%uC131%uC774%uB780%3F%0A%0ASupport%20%uB77C%uC774%uBE0C%uB7EC%uB9AC%uB294%20%uC61B%uB0A0%20%uBC84%uC804%uC758%20%uC548%uB4DC%uB85C%uC774%uB4DC%20%uD50C%uB7AB%uD3FC%uC744%20%uCD5C%uC2E0%20%uBC84%uC804%uCC98%uB7FC%20%uC798%20%uC9C0%uC6D0%uD560%20%uC218%20%uC788%uAC8C%20%uD55C%uB2E4.%20%uC608%uB97C%uB4E4%uC5B4%20%uC571%uC774%205.0%20%uBC84%uC804%28API%20level%2021%29%uBCF4%uB2E4%20%uB0AE%uC740%20API%20%uB808%uBCA8%uC5D0%uC11C%20%uB3CC%20%uB54C%2C%20%uC6D0%uB798%uB294%20material%20%uB514%uC790%uC778%uC774%20%uC544%uB2C8%uC9C0%uB9CC%20%uB9CC%uC57D%20%uC571%uC774%20%60support%60%20%uB77C%uC774%uBE0C%uB7EC%uB9AC%uC758%20%60appcompat%20library%60%uB97C%20%uC4F4%uB2E4%uBA74%2C%20%uC571%uC740%20API%20%uB808%uBCA8%2021%uC774%20%uC81C%uACF5%uD558%uB294%20%uB9CE%uC740%20%uAE30%uB2A5%uB4E4%uC744%20%uC4F8%20%uC218%20%uC788%uC744%20%uBFD0%uB9CC%20%uC544%uB2C8%uB77C%2C%20material%20%uB514%uC790%uC778%uC73C%uB85C%20%uD45C%uD604%uB420%20%uC218%20%uC788%uB2E4.%20%uADF8%20%uACB0%uACFC%20%uC571%uC740%20%uC880%20%uB354%20%uC77C%uAD00%uC801%uC778%20%uACBD%uD5D8%uC744%20%uD50C%uB7AB%uD3FC%20%uBC84%uC804%uC744%20%uB6F0%uC5B4%uB118%uC73C%uBA70%20%uC81C%uACF5%uD560%20%uC218%20%uC788%uB2E4.%0A%0A%60support%60%uB77C%uC774%uBE0C%uB7EC%uB9AC%uB294%20%uCD5C%uB300%uD55C%20%uD504%uB808%uC784%uC6CC%uD06C%uC5D0%20%uC758%uC874%uD574%20%uB3D9%uC791%uD558%uB824%20%uB178%uB825%uD55C%uB2E4.%20%uADF8%uB7EC%uB098%20%uC0C1%uD669%uC774%20%uC5EC%uC758%uCE58%uC54A%uC740%20%uB0AE%uC740%20API%20%uB808%uBCA8%uC5D0%uC11C%uB294%20%uC2A4%uC2A4%uB85C%20%uB3D9%uC791%uD558%uC5EC%20%uD574%uB2F9%20%uB3D9%uC791%uC744%20%uC218%uD589%uD55C%uB2E4.%20%uC77C%uBC18%uC801%uC73C%uB85C%20%60...Compat%60%uC73C%uB85C%20%uB05D%uB098%uB294%20%uCE5C%uAD6C%uB4E4%uC774%20%uC774%uB7F0%20%uC5ED%uD560%uC744%20%uD558%uB294%20%uCE5C%uAD6C%uB4E4%uC774%uB2E4.%20%uC608%uB97C%uB4E4%uC5B4%20%60ActivityCompat%60%uAC19%uC740.%0A%0A%uC5B4%uB5A4%20%uACBD%uC6B0%uC5D0%uB294%20%60support%60%uB77C%uC774%uBE0C%uB7EC%uB9AC%uAC00%20%uC5B4%uB5A0%uD55C%20%uD504%uB808%uC784%uC6CC%uD06C%20API%20%uB3C4%uC6C0%20%uC5C6%uC774%20%uC2A4%uC2A4%uB85C%20%uB3D9%uC791%uD558%uB294%20%uACBD%uC6B0%uB3C4%20%uC788%uB2E4.%20%uC774%uB7F0%20%uBA54%uC18C%uB4DC%uB294%20%uBAA8%uB4E0%20%uC9C0%uC6D0%uD558%uB294%20%uD50C%uB81B%uD3FC%uC5D0%uC11C%20%uC77C%uAD00%uB418%uAC8C%20%uC791%uB3D9%uD55C%uB2E4.%0A%0A%uC5B4%uB5A4%20%uACBD%uC6B0%uB4E0%2C%20%uC571%uC740%20%uB7F0%uD0C0%uC784%20%uB54C%20%uC2DC%uC2A4%uD15C%uC758%20%uBC84%uC804%uC744%20%uCCB4%uD06C%uD560%20%uD544%uC694%uAC00%20%uC5C6%uB2E4.%20%uC571%uC740%20%60support%60%uB77C%uC774%uBE0C%uB7EC%uB9AC%uC5D0%20%uC758%uC874%uD558%uBA74%20%uB418%uBA70%2C%20%uC54C%uC544%uC11C%20%uC2DC%uC2A4%uD15C%20%uC0C1%uD0DC%uB97C%20%uCCB4%uD06C%uD574%20%uB3D9%uC791%uD574%20%uC904%20%uAC83%uC774%uB2E4.%0A%0A%uC544%uB798%20%uADF8%uB9BC%uC744%20%uBCF4%uBA74%2C%20%uC548%uB4DC%uB85C%uC774%uB4DC%204.4%uC5D0%uC11C%20%uB3D9%uC791%uD558%uB294%20%uD654%uBA74%uC774%uB2E4.%20%uC6D0%uB798%20%uC548%uB4DC%uB85C%uC774%uB4DC%204.4%uB294%20material%20%uB514%uC790%uC778%uC744%20%uC9C0%uC6D0%uD558%uC9C0%20%uC54A%uC9C0%uB9CC%2C%20%60support%20%60%20library%20UI%20%uC5D8%uB9AC%uBA3C%uD2B8%uAC00%20%uB9CC%uB4E4%uC5B4%20%uC900%uB2E4.%0A%0A%21%5BAlt%20text%5D%28./1464798952063.png%29%0A%0A%0A%23%20%uC77C%uBC18%uC801%uC778%20%uB808%uC774%uC544%uC6C3%20%uD328%uD134%uC758%20%uC9C0%uC6D0%0A%0A%60support%60%20%uB77C%uC774%uBE0C%uB7EC%uB9AC%uB294%20%uC548%uB4DC%uB85C%uC774%uB4DC%20%uD504%uB808%uC784%uC6CC%uD06C%uAC00%20%uC9C0%uC6D0%uD558%uC9C0%20%uC54A%uB294%20%uC0AC%uC6A9%uC790%20%uC778%uD130%uD398%uC774%uC2A4%uB97C%20%uC9C0%uC6D0%uD55C%uB2E4.%20%uC608%uB97C%uB4E4%uBA74%20%60DrawerLayout%60%uAC19%uC740%20%uAC83%uC774%20%uADF8%uAC83%uC774%uB2E4.%20%uC774%uB7EC%uD55C%20%uD074%uB808%uC2A4%uB4E4%uC740%20%uC548%uB4DC%uB85C%uC774%uB4DC%20%uB514%uC790%uC778%20practice%uB4E4%uC5D0%uC11C%20%uAD8C%uC7A5%uB418%uB294%20%uAC83%uC744%20%uB530%uB978%uB2E4.%0A%0A%uC774%uB7EC%uD55C%20%60support%60%uB77C%uC774%uBE0C%uB7EC%uB9AC%uAC00%20%uC9C0%uC6D0%uD558%uB294%20%uAC83%uB4E4%uC758%20%uC0AC%uC6A9%uC73C%uB85C%20%uC778%uD574%20%uBC14%uD034%uB97C%20%uB610%20%uBC1C%uBA85%uD558%uB294%20%uC77C%20%uB530%uC704%uB97C%20%uC548%uD574%uB3C4%20%uB41C%uB2E4%21%20%uAE4C%uB2E4%uB85C%uC6B4%20UI%uAC00%20%uD544%uC694%uD558%uB2E4%uBA74%2C%20%uB2F9%uC2E0%uC740%20%uC774%uBBF8%20%uC788%uB294%2C%20%uC0AC%uC6A9%uC790%uAC00%20%uCE5C%uC219%uD55C%20UI%20%uC778%uD130%uD398%uC774%uC2A4%uB97C%20%uC81C%uACF5%uD558%uB294%20%60support%60%20%uB77C%uC774%uBE0C%uB7EC%uB9AC%uC758%20%uCF54%uB4DC%uB97C%20%uC0AC%uC6A9%uD574%20%uC81C%uC791%uD558%uBA74%20%uB41C%uB2E4.%20%uC608%uB97C%20%uB4E4%uC5B4%20%uB9CE%uC740%20%uC571%uB4E4%uC774%20%uC5C4%uCCAD%uB09C%20%uB9AC%uC2A4%uD2B8%uB97C%20%uBE60%uB974%uACE0%20%uD6A8%uACFC%uC801%uC73C%uB85C%20%uC5D8%uB9AC%uBA3C%uD2B8%uB97C%20%uC7AC%uC0AC%uC6A9%uD558%uBA70%20%uBCF4%uC5EC%uC8FC%uAE38%20%uC6D0%uD558%uB294%uB370%2C%20%uC774%uB97C%20%uC704%uD574%20%60support%60%uB77C%uC774%uBE0C%uB7EC%uB9AC%uB294%20%60RecyclerView%60%uB97C%20%uC81C%uACF5%uD55C%uB2E4%21%0A%0A%23%20%uB2E4%uB978%20Form%20Factor%uB4E4%uC5D0%20%uB300%uD55C%20%uC9C0%uC6D0%0A%0A%uC548%uB4DC%uB85C%uC774%uB4DC%20SDK%uB294%20TV%uB098%20%uC6E8%uC5B4%uB7EC%uBE14%20%uAC19%uC740%20%uB2E4%uB978%20form%20factor%uB3C4%20%uC9C0%uC6D0%uD55C%uB2E4.%20%uC571%uC740%20%uCEE8%uD150%uCE20%uB97C%20%uC678%uBD80%20%uC2A4%uD06C%uB9B0%uC5D0%20%uC81C%uACF5%uD55C%uB2E4%uAC70%uB098%2C%20%uD639%uC740%20%uC2A4%uD53C%uCEE4%uC5D0%20%uC81C%uACF5%uD55C%uB2E4%uAC70%uB098%2C%20%uD639%uC740%20%uB2E4%uB978%20%uB514%uBC14%uC774%uC2A4%uC5D0%20%uC804%uC1A1%uD558%uB294%20%uB4F1%uC758%20%uAE30%uB2A5%uB4F1%uC744%20%uC801%uC808%uD55C%20%60support%60%20%uB77C%uC774%uBE0C%uB7EC%uB9AC%uB97C%20%uC774%uC6A9%uD574%20%uB113%uC740%20%uBC94%uC704%uC758%20%uC548%uB4DC%uB85C%uC774%uB4DC%20%uC2DC%uC2A4%uD15C%uC744%20%uCEE4%uBC84%uD560%20%uC218%20%uC788%uB2E4.%20%0A%0A%23%20%uC720%uC6A9%uD55C%20%uC720%uD2F8%uB9AC%uD2F0%uC758%20%uC81C%uACF5%0A%0A%uC548%uB4DC%uB85C%uC774%uB4DC%20%60support%60%uB77C%uC774%uBE0C%uB7EC%uB9AC%uB294%20%uD558%uC704%20%uD638%uD658%uC131%uC744%20%uAC00%uC9C4%20%uC720%uD2F8%uB9AC%uD2F0%uB4E4%uC744%20%uC81C%uACF5%uD55C%uB2E4.%20%uC571%uB4E4%uC740%20%uC801%uC808%uD55C%20%uC0AC%uC6A9%uC790%20%uACBD%uD5D8%uC744%20%uC81C%uACF5%uD558%uB294%20%uC774%uB7EC%uD55C%20%uC720%uD2F8%uB9AC%uD2F0%uB97C%20%uBAA8%uB4E0%20%uC548%uB4DC%uB85C%uC774%uB4DC%20%uC2DC%uC2A4%uD15C%uC5D0%uC11C%20%uC0AC%uC6A9%uD560%20%uC218%20%uC788%uB2E4.%20%uC608%uB97C%uB4E4%uC5B4%20%60support%60%20%uB77C%uC774%uBE0C%uB7EC%uB9AC%uB294%20%uD37C%uBBF8%uC158%20%uBA54%uC18C%uB4DC%uB4E4%uC740%20%uC5B4%uB5A4%20%uD50C%uB7AB%uD3FC%20%uBC84%uC804%uC778%uC9C0%uC5D0%20%uB9DE%uCDB0%20%uC801%uC808%uD558%uAC8C%20%uB3D9%uC791%uD55C%uB2E4.%20%uB9CC%uC57D%20%uD50C%uB7AB%uD3FC%uC774%20%60Runtime%20Permission%20Model%60%uC744%20%uC9C0%uC6D0%uD55C%uB2E4%uBA74%2C%20%uC774%uB7EC%uD55C%20%uBA54%uC18C%uB4DC%uB4E4%uC740%20%uC801%uC808%uD55C%20%uD37C%uBBF8%uC158%uC744%20%uC720%uC800%uC5D0%uAC8C%20%uC694%uCCAD%uD560%20%uAC83%uC774%uBA70%2C%20%uADF8%uAC8C%20%uC544%uB2CC%20%uACBD%uC6B0%2C%20%uBA54%uC18C%uB4DC%uB294%20%uC801%uC808%uD55C%20%uD37C%uBBF8%uC158%uC744%20install%20time%uC5D0%20%uCCB4%uD06C%uD574%20grant%uD560%20%uAC83%uC774%uB2E4.%0A&lt;/center&gt;
&lt;br /&gt;&lt;/en-note&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</description>
      <category>Develop</category>
      <category>Android</category>
      <category>library</category>
      <category>support</category>
      <category>안드로이드</category>
      <author>youngkyu.cho</author>
      <guid isPermaLink="true">https://youngkyu.tistory.com/39</guid>
      <comments>https://youngkyu.tistory.com/39#entry39comment</comments>
      <pubDate>Thu, 2 Jun 2016 02:28:31 +0900</pubDate>
    </item>
    <item>
      <title>[번역] FLUX 페이스북 클라이언트 사이드 웹 애플리케이션 아키텍처</title>
      <link>https://youngkyu.tistory.com/38</link>
      <description>&lt;en-note lang=&quot;v2&quot; style=&quot;color: #2c3f51; font-family: 'Helvetica Neue', Arial, 'Hiragino Sans GB', STHeiti, 'Microsoft YaHei', 'WenQuanYi Micro Hei', SimSun, Song, sans-serif; line-height: 1.6;&quot;&gt;&lt;del style=&quot;position:relative;display:block;z-index:10;&quot;&gt;&lt;a style=&quot;position: absolute;color: #FFF;text-decoration: none;font-size: 12px;height: 25px;border-radius: 0;margin-top: -20px;right: 15px;background: rgba(0, 0, 0, 0);border-left: 10px solid #BB3A34;border-right: 10px solid #BB3A34;border-bottom: 5px solid rgba(0, 0, 0, 0);width: 0;text-indent:-100000px;&quot; href=&quot;http://marxi.co/#/?provider=evernote_int&amp;amp;guid=3f7fc6f2-13de-4443-ac3b-c1f03a88cb36&amp;amp;notebook=youngkyu.cho&quot;&gt;Edit&lt;/a&gt;&lt;/del&gt;&lt;div style=&quot;color: #2c3f51; font-family: 'Helvetica Neue', Arial, 'Hiragino Sans GB', STHeiti, 'Microsoft YaHei', 'WenQuanYi Micro Hei', SimSun, Song, sans-serif; line-height: 1.6;&quot;&gt;
                        &lt;div style=&quot;line-height: 1.6;&quot;&gt;&lt;/div&gt;
                    &lt;div style=&quot;line-height: 1.6;&quot;&gt;

&lt;p style=&quot;margin: 0 0 1.1em; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;&lt;/p&gt;&lt;p style=&quot;margin: 0 0 1.1em; color: rgba(0,0,0,0.8); line-height: 1.6;&quot;&gt;&lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; background-color: #f9f2f4; white-space: normal; padding: 2px 5px; color: rgba(44,63,81,0.5); border-radius: 0; background: rgba(102,128,153,0.075);&quot;&gt;티스토리&lt;/code&gt; &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; background-color: #f9f2f4; white-space: normal; padding: 2px 5px; color: rgba(44,63,81,0.5); border-radius: 0; background: rgba(102,128,153,0.075);&quot;&gt;FLUX&lt;/code&gt; &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; background-color: #f9f2f4; white-space: normal; padding: 2px 5px; color: rgba(44,63,81,0.5); border-radius: 0; background: rgba(102,128,153,0.075);&quot;&gt;javascript&lt;/code&gt; &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; background-color: #f9f2f4; white-space: normal; padding: 2px 5px; color: rgba(44,63,81,0.5); border-radius: 0; background: rgba(102,128,153,0.075);&quot;&gt;js&lt;/code&gt; &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; background-color: #f9f2f4; white-space: normal; padding: 2px 5px; color: rgba(44,63,81,0.5); border-radius: 0; background: rgba(102,128,153,0.075);&quot;&gt;facebook&lt;/code&gt; &lt;/p&gt;&lt;p style=&quot;margin: 0 0 1.1em; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 1.6;&quot;&gt;

&lt;h1 style=&quot;font-size: 2.6em; margin: 1.2em 0 .6em 0; font-family: inherit; font-weight: bold; line-height: 1.1; margin-top: 21px; margin-bottom: 10.5px; text-align: start; color: rgba(0,0,0,0.8);&quot;&gt;Flux&lt;/h1&gt;

&lt;p style=&quot;margin: 0 0 1.1em; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;Flux는 페이스북의 클라이언트 사이드 웹 애플리케이션 구축을 위한 아키텍쳐다. 이것은 한 방향으로의 데이터 흐름을 이용하여 React의 composable view 컴포넌트를 보완한다. 이것은 좀 더 큰 컨셉의 패턴이지, 공식적은 프레임워크는 아니다. 그리고 당신은 Flux를 새로운 코드 없이 바로 시작할 수 있다.&lt;/p&gt;

&lt;/div&gt;
&lt;div style=&quot;line-height: 1.6;&quot;&gt;

&lt;h1 style=&quot;font-size: 2.6em; margin: 1.2em 0 .6em 0; font-family: inherit; font-weight: bold; line-height: 1.1; margin-top: 21px; margin-bottom: 10.5px; text-align: start; color: rgba(0,0,0,0.8);&quot;&gt;개괄&lt;/h1&gt;

&lt;p style=&quot;margin: 0 0 1.1em; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;Flux 애플리케이션들은 3가지 주요한 파트로 구성된다. Dispatcher, Store, 그리고 View들(React 컴포넌트)이 그것이다. 이것들과 Model-View-Controller를 헷갈리지 말아야 한다. Controller는 Flux애플리케이션에도 존재하지만, Controller-View의 형태로만 존재한다. View들은 데이터를 Store에서 받거나, 그들의 자식 Store에게 데이터를 패스하기 위해 최상위 계급에 자주 위치한다. 게다가 Action Creator - Dispatcher의 헬퍼 메소드들 - 는 애플리케이션에서 가능한 모든 변화들을 묘사하기 위해 시멘틱한 API를 지원한다. Flux의 업데이트 사이클의 4가지 파트로서 이것들을 이해하면 상당히 편하다.&lt;/p&gt;&lt;p style=&quot;margin: 0 0 1.1em; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;Flux는 MVC에서 양방햔 바인딩을 피한다. 유저가 React뷰와 인터렉션할 때, 뷰는 중심의 디스패처를 통하여 애플리케이션의 데이터와 비즈니스 로직 - 영향을 받은 모든 뷰들을 업데이트 하는 - 을 수행하는 다양한 스토어들에 로 Action을 전파한다. &lt;/p&gt;&lt;p style=&quot;margin: 0 0 1.1em; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;이러한 작업들은 State 사이에서 어떻게 뷰들이 변할지 구체적으로 특정하지 않아도 스토어에게 업데이트들을 보낼 수 있도록 하는 특히 React의 Declarative 프로그래밍 스타일에서 유용하다.&lt;/p&gt;&lt;p style=&quot;margin: 0 0 1.1em; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;우리는 파생된 데이터를 정확히 다루기 위해서 원래 시작했다. 예를들어 우리는 톡방들에서 아직 읽지 않은 것들의 숫자들을 읽지 않은 톡방이 하이라이트 되면서 톡방의 리스트와 함께 보여주길 바랐다. 한 톡방을 읽었다고 업데이트하면서, 동시에 읽지 않았다는 숫자를 동시에 업데이트 하는 것같은, 이런 일들은 MVC모델로는 다루기가 매우 힘들다. 의존적이고 폭포수처럼 전파되는 업데이트들은 MVC 아키텍쳐를 이용하는 큰 애플리케이션에서 자주 발생한다. 그리고 복잡한 데이터 흐름으로 예상치 못한 결과들을 초래한다.&lt;/p&gt;&lt;p style=&quot;margin: 0 0 1.1em; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;제어권은 Store에게 역전된다. 스토어들은 업데이트를 받아들이고, 그들의 일관적인 방법으로 데이터를 업데이트 하게되는 외부적인 무언가에 의존하기보다, 그들을 적절하게 조정한다. 어떠한 외부 스토어들도 그 도메인을 위한 데이터들이 어떻게 관리되는지에 대해 전혀 이해하고 있지 않다. 이는 쓸데없는 걱정거리를 만들지 않는다. 스토어들은 어떤 다이렉트 Setter 메소드도 들고있지 않다. 예를 들어 &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;setAsRead()&lt;/code&gt;같은. 그러나 대신 새로운 데이터를 그들 속의 세계로 가져오는 한가지 방법만이 존재한다.  - 바로 callback이다. Dispatcher로 그들이 등록한.&lt;/p&gt;

&lt;/div&gt;
&lt;div style=&quot;line-height: 1.6;&quot;&gt;

&lt;h1 style=&quot;font-size: 2.6em; margin: 1.2em 0 .6em 0; font-family: inherit; font-weight: bold; line-height: 1.1; margin-top: 21px; margin-bottom: 10.5px; text-align: start; color: rgba(0,0,0,0.8);&quot;&gt;스트럭쳐와 데이터 흐름&lt;/h1&gt;

&lt;p style=&quot;margin: 0 0 1.1em; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;Flux의 데이터들은 한 방향으로만 흐른다.&lt;/p&gt;

&lt;/div&gt;
&lt;div style=&quot;line-height: 1.6;&quot;&gt;

&lt;p style=&quot;margin: 0 0 1.1em; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;&lt;/p&gt;&lt;p style=&quot;text-align: center; clear: none; float: none;&quot;&gt;&lt;span class=&quot;imageblock&quot; style=&quot;display: inline-block; width: 700px;  height: auto; max-width: 100%;&quot;&gt;&lt;img src=&quot;https://t1.daumcdn.net/cfile/tistory/2365E139574DC9C907&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Ft1.daumcdn.net%2Fcfile%2Ftistory%2F2365E139574DC9C907&quot; width=&quot;700&quot; height=&quot;154&quot; filename=&quot;./1451462507641.png&quot; filemime=&quot;image/png&quot;/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p style=&quot;margin: 0 0 1.1em; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;단방향 데이터 흐름은 Flux 패턴의 중심이다. 그리고 위 다이어그램은 Flux 프로그래머에게 주요 맨탈 모델이어야 한다. 디스패처, 스토어, 뷰들은 명확한 인풋과 아웃풋이 있는 서로 독립적인 노드들이다. Action들은 간단한 오브젝트로, 새로운 데이터를 가지고 있고 어떤 타입의 프로퍼티인지에 대한 정보를 제공한다.&lt;/p&gt;&lt;p style=&quot;margin: 0 0 1.1em; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;뷰들은 유저의 인터렉션들에 대한 반응과 관련된 새로운 Action을 생성할 것이다. 그리고 이러한 액션들은 시스템에 의해 전파된다.&lt;/p&gt;

&lt;/div&gt;
&lt;div style=&quot;line-height: 1.6;&quot;&gt;

&lt;p style=&quot;margin: 0 0 1.1em; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;&lt;/p&gt;&lt;p style=&quot;text-align: center; clear: none; float: none;&quot;&gt;&lt;span class=&quot;imageblock&quot; style=&quot;display: inline-block; width: 700px;  height: auto; max-width: 100%;&quot;&gt;&lt;img src=&quot;https://t1.daumcdn.net/cfile/tistory/25194741574DC9CA33&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Ft1.daumcdn.net%2Fcfile%2Ftistory%2F25194741574DC9CA33&quot; width=&quot;700&quot; height=&quot;211&quot; filename=&quot;./1451462712969.png&quot; filemime=&quot;image/png&quot;/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p style=&quot;margin: 0 0 1.1em; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;모든 데이터는 중심 허브로서 Dispatcher를 통해 흐른다. Action은 Action creator 메소드 안에서 디스패처에게 제공된다. 그리고 더 자주는 뷰에서의 유저 인터렉션을 통해 대부분 생성될 것이다. &lt;/p&gt;&lt;p style=&quot;margin: 0 0 1.1em; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;디스패처는 스토어들이 이미 dispatcher에게 등록했던, 모든 스토어들의 액션들을 스토어들에 전달하고 callback을 호출한다. 스토어 그들이 유지하는 스테이트들과 관련된 어떤 액션이든 등록된 컬벡 내에서 스토어들은 응답하게 된다. 스토어들은 그 후, 데이터 레이어의 변화를 Controller-Views들에게 알리기 위해 change 이벤트를 방출(emit)한다. Controller-View는 이러한 이벤트들을 리스닝하고 있다가 방출이 되면 이벤트 핸들러를 통해 스토어에서 데이터를 가져온다. 컨트롤 뷰는 그들 자신의 setState() 메소드를 스스로를 리렌더하고, 또 컴포넌트 트리의 후손들을 리렌더 하기위해 호출한다.&lt;/p&gt;

&lt;/div&gt;
&lt;div style=&quot;line-height: 1.6;&quot;&gt;

&lt;p style=&quot;margin: 0 0 1.1em; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;&lt;/p&gt;&lt;p style=&quot;text-align: center; clear: none; float: none;&quot;&gt;&lt;span class=&quot;imageblock&quot; style=&quot;display: inline-block; width: 700px;  height: auto; max-width: 100%;&quot;&gt;&lt;img src=&quot;https://t1.daumcdn.net/cfile/tistory/263AF636574DC9CC20&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Ft1.daumcdn.net%2Fcfile%2Ftistory%2F263AF636574DC9CC20&quot; width=&quot;700&quot; height=&quot;381&quot; filename=&quot;./1451463358648.png&quot; filemime=&quot;image/png&quot;/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p style=&quot;margin: 0 0 1.1em; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;이 구조는 우리에게 한가지 방법으로 쉽게 애플리케이션을 추론할 수 있도록 한다.  &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;functional reactive programming&lt;/code&gt;, 혹은 더 구체적으로 &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;data-flow programming&lt;/code&gt; 혹은 &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;flow-based programming&lt;/code&gt;을 을 연상시키는 방법을 이용해서.  이 방법들에서는 애플리케이션의 데이터 플로우들은 한 뱡향으로 흐른다. 두 방향 바인딩은 없다. &lt;br /&gt;
애플리케이션 내의 특정 파트는 하나의 스토어에 의해 매우 decoupled된 채로 상태(state)가 유지된다. 동기적으로 업데이트가 디스패처에 의해 관리되면서, 스토어들의 의존성이 있는 곳에서는 엄격한 계급 체계을 유지한다.&lt;/p&gt;&lt;p style=&quot;margin: 0 0 1.1em; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;우리는 두 방향의 데이터 바인딩이 한가지 오브젝트의 변화가 다른 오브젝트의 변화를 일으키는 캐스케이딩 업데이트를 발생시킨다는 것을 알았다. 그 뿐만 아니라 그 변화 또한 더 많은 업데이트들을 트리거 할 수 있다. 애플리케이션이 커지면서 이런 케스케이딩 업데이트들은 유저 인터렉션의 결과로서 무엇이 바뀌어 져야 하는지에 대한 결과물에 대한 예측하기 힘들게 한다. 업데이트가 하나의 라운드안에서 데이터를 변경할 때, 시스템은 전체로서 예측가능해진다.&lt;/p&gt;&lt;p style=&quot;margin: 0 0 1.1em; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;다양한 Flux의 파트를 자세히 보자. 디스패처는 시작으로서 가장 적절한 선택이다.&lt;/p&gt;

&lt;/div&gt;
&lt;div style=&quot;line-height: 1.6;&quot;&gt;

&lt;h1 style=&quot;font-size: 2.6em; margin: 1.2em 0 .6em 0; font-family: inherit; font-weight: bold; line-height: 1.1; margin-top: 21px; margin-bottom: 10.5px; text-align: start; color: rgba(0,0,0,0.8);&quot;&gt;하나의 Dispatcher&lt;/h1&gt;

&lt;p style=&quot;margin: 0 0 1.1em; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;Flux 애플리케이션에서 모든 데이터 플로우를 관리하는 디스패처는 중앙 허브다. 기본적으로 디스패처는 스토어들의 안속의 callback들의 저장소(레지스트리)로 그 스스로는 어떠한 실질적 지능도 없다. 그것은 액션을 스토어로 분배하는 간단한 기계장치다. 각 스토어들은 dispatcher에 그들 스스로 뿐만 아니라 callback도 등록한다. Action creator가 디스패처에게 새로운 액션을 제공할 때, 애플리케이션 내 모든 스토어들은 저장소(레지스트리)안에있는 callbakc들을 통해 액션을 받는다. &lt;/p&gt;&lt;p style=&quot;margin: 0 0 1.1em; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;애플리케이션의 성장에 따라, 디스패처는 좀 더 활성화된다. 이때 스토어들 사이에서 특정한 순서대로 등록된 callback을 호출해 주어 의존성을 관리하는데 사용될 수도 있다. 스토어는 선언적으로 기다릴 수 있다. 다른 스토어들이 업데이트를 완료하기까지. 그리고 나서 그들 스스로를 그에맞춰 업데이트한다.&lt;/p&gt;&lt;p style=&quot;margin: 0 0 1.1em; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;페이스북이 프로덕션에서 사용하는 디스패처는 npm, Bower, or GitHub에서 이용할 수 있다.&lt;/p&gt;

&lt;/div&gt;
&lt;div style=&quot;line-height: 1.6;&quot;&gt;

&lt;h1 style=&quot;font-size: 2.6em; margin: 1.2em 0 .6em 0; font-family: inherit; font-weight: bold; line-height: 1.1; margin-top: 21px; margin-bottom: 10.5px; text-align: start; color: rgba(0,0,0,0.8);&quot;&gt;스토어(Stores)&lt;/h1&gt;

&lt;p style=&quot;margin: 0 0 1.1em; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;스토어는 애플리케이션의 스테이트와 로직을 가지고 있다. 그들의 역활은 뭔가 비슷한데, MVC에서의 모델이 그것이다. 그러나 그들은 다양한 오브젝트의 상태(state)를 관리한다. 그들은 ORM 모델이 하듯 하나의 단순한 레코드로 표현될 수 없다. Backbone의 콜렉션과도 마찬가지로 다르다. 간단히 ORM 스타일의 오브젝트를 관리하는 것 그 이상이다. 스토어는 특별한 도메인(책임영역)을 위한 애플리케이션의 상태(state)를 관리한다. &lt;/p&gt;&lt;p style=&quot;margin: 0 0 1.1em; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;예를 들어보자. 페이스북의 Lookback Video Editor는 계속 재생시간의 위치와 재생 상태를 트래킹하는 TimeStore를 사용한다.  한편, 같은 애플리케이션의 ImageStore는 계속 이미지들의 컬렉션을 트래킹한다. 우리 TodoMVC Example에 있는 TodoStore도 비슷한데 todo 아이템의 컬렉션을 다룬다. 스토어는 2가지 특성을 보인다. 하나는 모델들의 컬렉션이고 또 다른 하나는 논리적인 도메인의 싱글톤 모델이다.&lt;/p&gt;&lt;p style=&quot;margin: 0 0 1.1em; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;위에도 이야기했듯, 스토어는 그들 스스로를 디스패처에게 callback과 함께 직접 등록한다. 이 callback은 액션을 파래머터로 받는다. 스토어가 등록한 콜벡 안에서, 액션타입에 기반한 switch문은 액션을 번역하는데 사용될 뿐만 아니라 스토어 내부의 메소드들에게 적절한 훅(hook)을 제공하는데 사용된다. 이것은 액션이 디스패처를 통해 스토어의 상태 업데이트를 가능하도록 한다. 스토어가 업데이트 된 후, 그들은 스테이트가 바뀌었다는 이벤트를 내뿜는데, 이를 통해 뷰들은 새로운 상태를 질의할 수 있고, 그들 스스로를 업데이트 한다.&lt;/p&gt;

&lt;/div&gt;
&lt;div style=&quot;line-height: 1.6;&quot;&gt;

&lt;h1 style=&quot;font-size: 2.6em; margin: 1.2em 0 .6em 0; font-family: inherit; font-weight: bold; line-height: 1.1; margin-top: 21px; margin-bottom: 10.5px; text-align: start; color: rgba(0,0,0,0.8);&quot;&gt;뷰(Views)와 Controller-Views&lt;/h1&gt;

&lt;p style=&quot;margin: 0 0 1.1em; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;우리가 뷰레이어에서 필요로 하는 구성 가능한 종류의, 그리고 자유롭게 미리 랜더할 수 있는 뷰들을 React는 제공한다. 얽혀있는 뷰 계급의 최상단을 가까이에서 보면, 어떤 뷰가 의존하는 스토어가 브로드캐스트하는 이벤트들을 리스닝하는 특별한 뷰들이 존재한다. 우리는 이걸 컨트롤 뷰라고 부른다. 그들은 데이터를 스토어에서 가져오거나 혹은 그들의 후손들에게 데이터를 내려주는일을 위한 접착 코드를 제공한다. 우리는 이런 컨트롤 뷰들에게 중요한 섹션 하나를 할당해 주어야 할 것 같다.&lt;/p&gt;&lt;p style=&quot;margin: 0 0 1.1em; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;이벤트를 스토어에서 받았을 때, 스토어의 public getter 메소드들로 필요한 새 데이터를 먼저 요청한다. 이후 자신의 &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;setState()&lt;/code&gt;혹은 &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;forceUpdate()&lt;/code&gt;메소드(그것의 &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;render()&lt;/code&gt;메소드와 하부 자손들의 &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;render()&lt;/code&gt; 메소드들을 실행하는)들을 호출한다.  &lt;br /&gt;
우리는 자주 스토어의 전체 상태(state)를 뷰들의 체인이 있는 하부로 전달한다. 이것은 다른 후손들이 그들이 필요로 하는 것을 사용할 수 있도록 허락한다. 게다가 가장 최상위에서도 컨트롤러 비슷한 행동을 유지하기, 또 이렇게 우리의 자손 뷰들을 유지하기 위해, 가능한한 기능적으로 퓨어하게 모든 스토어의 상태를 싱글 오브젝트로 하부에 전달하는 것은 우리가 관리해야할 프로퍼티들의 수를 줄여주는 효과가 있다.&lt;/p&gt;&lt;p style=&quot;margin: 0 0 1.1em; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;가끔, 우리는 안쪽(최상위가 아닌) 컨트롤 뷰를 컴포넌트를 간단히 유지하기 위해 가끔 추가할 필요를 느낀다. 이것은 특정 도메인의 섹션의 계층을 더 낫게 캡슐화 할 수 있게 해주기도 한다. 그러나 안쪽의 컨트롤러뷰는 하나의 데이터 흐름을 깰 수도 있다는 점을 알아야한다. 이런 컨트롤 뷰는 새로운 데이터 흐름을 위한 엔트리 포인트를 만들 수 있으며, 이는 잠재적인 충돌 가능성을 가지고 있다. 안쪽의 컨트롤 뷰를 만들 때는 간단한 컴포넌트의 이점과 복잡한 다수의 업데이트 사이에서 조율을 해야한다. 이러한 다수의 데이터 업데이트는 의도치 않은 영향을 만들 수 있는데, 다른 컨트롤뷰에 의해 계속적으로 호출되는 React의 렌더링 메소드의 getting에서 그렇다. 그리고 이건 잠재적으로 디버깅의 어려움을 증가시킬 수 있다.&lt;/p&gt;

&lt;/div&gt;
&lt;div style=&quot;line-height: 1.6;&quot;&gt;

&lt;h1 style=&quot;font-size: 2.6em; margin: 1.2em 0 .6em 0; font-family: inherit; font-weight: bold; line-height: 1.1; margin-top: 21px; margin-bottom: 10.5px; text-align: start; color: rgba(0,0,0,0.8);&quot;&gt;액션(Actions)&lt;/h1&gt;

&lt;p style=&quot;margin: 0 0 1.1em; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;우리가 스토어에게 분배(dispatch)를 트리거할 수 있도록, 그리고 데이터 페이로드 - 이것이 우리가 부르는 액션 - 를 포함 할 수 있게 디스패처는 한 메소드를 노출시킨다. 시멘틱한 헬퍼 메소드 안에, 엑션의 생성은 아마 래핑되어있을 것이다. 그것은 액션을 디스패처에게 보낸다. 예를들어, 우리는 To-do 아이템의 글자를 To-do List 애플리케이션에서 바꾸길 원할 수 있다. 우리는 TodoActions 모듈 안에 &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;updateText(todoId, newText)&lt;/code&gt;같은 함수로 액션을 생성한다. 이 메소드들은 아마 우리의 뷰 이벤트 핸들러에 의해 호출될 것이다. 우리는 이것을 유저 인터렉션의 결과라 부를 수 있다. 이 액션 생성 메소드는 또한 액션에게 타입을 추가한다. 그래서 액션이 스토어에서 해셕될 때, 적절하게 응답할 수 있도록 한다. 우리의 예시에서는 이런 타입은 아마 TODO_UPDATE_TEXT같이 이름 붙여질 것이다.&lt;/p&gt;&lt;p style=&quot;margin: 0 0 1.1em; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;액션은 아마 다른 장소들에서 올때도 있다, 서버같은 곳에서. 예를들어, 데이터를 초기화하는 동안 이런일이 일어난다. 또 마찬가지로 서버가 에러코드를 반환할때나 혹은 애플리케이션을 업데이트할때 같을때도 일어난다.&lt;/p&gt;

&lt;/div&gt;
&lt;div style=&quot;line-height: 1.6;&quot;&gt;

&lt;h1 style=&quot;font-size: 2.6em; margin: 1.2em 0 .6em 0; font-family: inherit; font-weight: bold; line-height: 1.1; margin-top: 21px; margin-bottom: 10.5px; text-align: start; color: rgba(0,0,0,0.8);&quot;&gt;디스패처를 좀 더 보면,&lt;/h1&gt;

&lt;p style=&quot;margin: 0 0 1.1em; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;아까 얘기했지만, 디스패처는 스토어들 사이의 디펜던시도 관리가 가능하다. 이런 기능은 디스패처 클래스의 waitFor() 메소드를 통해 가능하다. 우리는 지금 이런 메소드를 쓸 필요가 없다. 왜냐면 TodoMVC 애플리케이션이 굉장히 단순하니까. 그러나 이것은 크고 복잡한 애플리케이션에선 활성화될 것이다.&lt;/p&gt;&lt;p style=&quot;margin: 0 0 1.1em; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;TodoStore의 등록된 콜벡 안에서 우리는 명시적으로 진행전에 다른 디펜던시들이 먼저 업데이트 되도록 기다릴 수 있다. &lt;/p&gt;

&lt;/div&gt;
&lt;div style=&quot;line-height: 1.6;&quot;&gt;

&lt;pre style=&quot;font-family: 'Source Code Pro',monospace; white-space: pre-wrap; display: block; background-color: rgba(102,128,153,0.05); color: #333; word-wrap: break-word; font-size: .9em; background: #f6f6f6; line-height: 1.6; margin: 0 0 1.1em; padding: 0; border: 0; border-radius: 5px; text-align: start; word-break: break-all;&quot;&gt;&lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: inherit; background-color: transparent; white-space: pre-wrap; border-radius: 0; color: #f8f8f2; display: block; background: #23241f; padding: 1.3em 2em;&quot;&gt;&lt;span style=&quot;line-height: 1.6; color: #f92672;&quot;&gt;case&lt;/span&gt; &lt;span style=&quot;line-height: 1.6; color: #e6db74;&quot;&gt;'TODO_CREATE'&lt;/span&gt;:&lt;br /&gt;  Dispatcher.waitFor([&lt;br /&gt;    PrependedTextStore.dispatchToken,&lt;br /&gt;    YetAnotherStore.dispatchToken&lt;br /&gt;  ]);&lt;br /&gt;&lt;br /&gt;  TodoStore.create(PrependedTextStore.&lt;span style=&quot;line-height: 1.6; color: #f92672;&quot;&gt;getText&lt;/span&gt;() + &lt;span style=&quot;line-height: 1.6; color: #e6db74;&quot;&gt;' '&lt;/span&gt; + action.text);&lt;br /&gt;  &lt;span style=&quot;line-height: 1.6; color: #f92672;&quot;&gt;break&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;p style=&quot;margin: 0 0 1.1em; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;&lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;waitFor()&lt;/code&gt;은 한가지 argument만 받는다. 그 argument는 디스패처의 콜백 저장소(레지스트리) 인덱스다. 이것을 우리는 dispatch tokens이라 부른다. 이와같이 waitFor()를 호출하는 스토어는 그것이 그 자신의 스테이트를 어떻게 업데이트 해야하는지 알려주기 위한 다른 스토어의 상태에 의존할 수 있다.&lt;/p&gt;&lt;p style=&quot;margin: 0 0 1.1em; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;디스패처 토큰은 디스패처에 콜벡을 등록할 때 &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;register()&lt;/code&gt;의 반환값이다.&lt;/p&gt;

&lt;/div&gt;
&lt;div style=&quot;line-height: 1.6;&quot;&gt;

&lt;pre style=&quot;font-family: 'Source Code Pro',monospace; white-space: pre-wrap; display: block; background-color: rgba(102,128,153,0.05); color: #333; word-wrap: break-word; font-size: .9em; background: #f6f6f6; line-height: 1.6; margin: 0 0 1.1em; padding: 0; border: 0; border-radius: 5px; text-align: start; word-break: break-all;&quot;&gt;&lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: inherit; background-color: transparent; white-space: pre-wrap; border-radius: 0; color: #f8f8f2; display: block; background: #23241f; padding: 1.3em 2em;&quot;&gt;PrependedTextStore.dispatchToken = Dispatcher.register(&lt;span style=&quot;line-height: 1.6; color: #f92672;&quot;&gt;&lt;span style=&quot;line-height: 1.6; color: #66d9ef;&quot;&gt;function&lt;/span&gt; &lt;span style=&quot;line-height: 1.6; color: #f8f8f2;&quot;&gt;(payload)&lt;/span&gt; &lt;/span&gt;{&lt;br /&gt;  &lt;span style=&quot;line-height: 1.6; color: #75715e;&quot;&gt;// ...&lt;/span&gt;&lt;br /&gt;});&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;p style=&quot;margin: 0 0 1.1em; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;&lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;waitFor()&lt;/code&gt;이나 actions, action creators 그리고 디스패처에 대해 더 자세한걸 원하면  &lt;a href=&quot;http://facebook.github.io/react/blog/2014/07/30/flux-actions-and-the-dispatcher.html&quot; target=&quot;_blank&quot; style=&quot;background: transparent; color: #1980e6; text-decoration: none;&quot;&gt;Flux: Actions and the Dispatcher&lt;/a&gt; 를 보자.&lt;/p&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 1.6;&quot;&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;center style=&quot;display:none&quot;&gt;@%5B%uD2F0%uC2A4%uD1A0%uB9AC%2CFLUX%2Cjavascript%2Cjs%2Cfacebook%5D%0A%0A%23Flux%0A%0AFlux%uB294%20%uD398%uC774%uC2A4%uBD81%uC758%20%uD074%uB77C%uC774%uC5B8%uD2B8%20%uC0AC%uC774%uB4DC%20%uC6F9%20%uC560%uD50C%uB9AC%uCF00%uC774%uC158%20%uAD6C%uCD95%uC744%20%uC704%uD55C%20%uC544%uD0A4%uD14D%uCCD0%uB2E4.%20%uC774%uAC83%uC740%20%uD55C%20%uBC29%uD5A5%uC73C%uB85C%uC758%20%uB370%uC774%uD130%20%uD750%uB984%uC744%20%uC774%uC6A9%uD558%uC5EC%20React%uC758%20composable%20view%20%uCEF4%uD3EC%uB10C%uD2B8%uB97C%20%uBCF4%uC644%uD55C%uB2E4.%20%uC774%uAC83%uC740%20%uC880%20%uB354%20%uD070%20%uCEE8%uC149%uC758%20%uD328%uD134%uC774%uC9C0%2C%20%uACF5%uC2DD%uC801%uC740%20%uD504%uB808%uC784%uC6CC%uD06C%uB294%20%uC544%uB2C8%uB2E4.%20%uADF8%uB9AC%uACE0%20%uB2F9%uC2E0%uC740%20Flux%uB97C%20%uC0C8%uB85C%uC6B4%20%uCF54%uB4DC%20%uC5C6%uC774%20%uBC14%uB85C%20%uC2DC%uC791%uD560%20%uC218%20%uC788%uB2E4.%0A%0A%23%uAC1C%uAD04%0A%0AFlux%20%uC560%uD50C%uB9AC%uCF00%uC774%uC158%uB4E4%uC740%203%uAC00%uC9C0%20%uC8FC%uC694%uD55C%20%uD30C%uD2B8%uB85C%20%uAD6C%uC131%uB41C%uB2E4.%20Dispatcher%2C%20Store%2C%20%uADF8%uB9AC%uACE0%20View%uB4E4%28React%20%uCEF4%uD3EC%uB10C%uD2B8%29%uC774%20%uADF8%uAC83%uC774%uB2E4.%20%uC774%uAC83%uB4E4%uACFC%20Model-View-Controller%uB97C%20%uD5F7%uAC08%uB9AC%uC9C0%20%uB9D0%uC544%uC57C%20%uD55C%uB2E4.%20Controller%uB294%20Flux%uC560%uD50C%uB9AC%uCF00%uC774%uC158%uC5D0%uB3C4%20%uC874%uC7AC%uD558%uC9C0%uB9CC%2C%20Controller-View%uC758%20%uD615%uD0DC%uB85C%uB9CC%20%uC874%uC7AC%uD55C%uB2E4.%20View%uB4E4%uC740%20%uB370%uC774%uD130%uB97C%20Store%uC5D0%uC11C%20%uBC1B%uAC70%uB098%2C%20%uADF8%uB4E4%uC758%20%uC790%uC2DD%20Store%uC5D0%uAC8C%20%uB370%uC774%uD130%uB97C%20%uD328%uC2A4%uD558%uAE30%20%uC704%uD574%20%uCD5C%uC0C1%uC704%20%uACC4%uAE09%uC5D0%20%uC790%uC8FC%20%uC704%uCE58%uD55C%uB2E4.%20%uAC8C%uB2E4%uAC00%20Action%20Creator%20-%20Dispatcher%uC758%20%uD5EC%uD37C%20%uBA54%uC18C%uB4DC%uB4E4%20-%20%uB294%20%uC560%uD50C%uB9AC%uCF00%uC774%uC158%uC5D0%uC11C%20%uAC00%uB2A5%uD55C%20%uBAA8%uB4E0%20%uBCC0%uD654%uB4E4%uC744%20%uBB18%uC0AC%uD558%uAE30%20%uC704%uD574%20%uC2DC%uBA58%uD2F1%uD55C%20API%uB97C%20%uC9C0%uC6D0%uD55C%uB2E4.%20Flux%uC758%20%uC5C5%uB370%uC774%uD2B8%20%uC0AC%uC774%uD074%uC758%204%uAC00%uC9C0%20%uD30C%uD2B8%uB85C%uC11C%20%uC774%uAC83%uB4E4%uC744%20%uC774%uD574%uD558%uBA74%20%uC0C1%uB2F9%uD788%20%uD3B8%uD558%uB2E4.%0A%0AFlux%uB294%20MVC%uC5D0%uC11C%20%uC591%uBC29%uD594%20%uBC14%uC778%uB529%uC744%20%uD53C%uD55C%uB2E4.%20%uC720%uC800%uAC00%20React%uBDF0%uC640%20%uC778%uD130%uB809%uC158%uD560%20%uB54C%2C%20%uBDF0%uB294%20%uC911%uC2EC%uC758%20%uB514%uC2A4%uD328%uCC98%uB97C%20%uD1B5%uD558%uC5EC%20%uC560%uD50C%uB9AC%uCF00%uC774%uC158%uC758%20%uB370%uC774%uD130%uC640%20%uBE44%uC988%uB2C8%uC2A4%20%uB85C%uC9C1%20-%20%uC601%uD5A5%uC744%20%uBC1B%uC740%20%uBAA8%uB4E0%20%uBDF0%uB4E4%uC744%20%uC5C5%uB370%uC774%uD2B8%20%uD558%uB294%20-%20%uC744%20%uC218%uD589%uD558%uB294%20%uB2E4%uC591%uD55C%20%uC2A4%uD1A0%uC5B4%uB4E4%uC5D0%20%uB85C%20Action%uC744%20%uC804%uD30C%uD55C%uB2E4.%20%0A%0A%uC774%uB7EC%uD55C%20%uC791%uC5C5%uB4E4%uC740%20State%20%uC0AC%uC774%uC5D0%uC11C%20%uC5B4%uB5BB%uAC8C%20%uBDF0%uB4E4%uC774%20%uBCC0%uD560%uC9C0%20%uAD6C%uCCB4%uC801%uC73C%uB85C%20%uD2B9%uC815%uD558%uC9C0%20%uC54A%uC544%uB3C4%20%uC2A4%uD1A0%uC5B4%uC5D0%uAC8C%20%uC5C5%uB370%uC774%uD2B8%uB4E4%uC744%20%uBCF4%uB0BC%20%uC218%20%uC788%uB3C4%uB85D%20%uD558%uB294%20%uD2B9%uD788%20React%uC758%20Declarative%20%uD504%uB85C%uADF8%uB798%uBC0D%20%uC2A4%uD0C0%uC77C%uC5D0%uC11C%20%uC720%uC6A9%uD558%uB2E4.%0A%0A%uC6B0%uB9AC%uB294%20%uD30C%uC0DD%uB41C%20%uB370%uC774%uD130%uB97C%20%uC815%uD655%uD788%20%uB2E4%uB8E8%uAE30%20%uC704%uD574%uC11C%20%uC6D0%uB798%20%uC2DC%uC791%uD588%uB2E4.%20%uC608%uB97C%uB4E4%uC5B4%20%uC6B0%uB9AC%uB294%20%uD1A1%uBC29%uB4E4%uC5D0%uC11C%20%uC544%uC9C1%20%uC77D%uC9C0%20%uC54A%uC740%20%uAC83%uB4E4%uC758%20%uC22B%uC790%uB4E4%uC744%20%uC77D%uC9C0%20%uC54A%uC740%20%uD1A1%uBC29%uC774%20%uD558%uC774%uB77C%uC774%uD2B8%20%uB418%uBA74%uC11C%20%uD1A1%uBC29%uC758%20%uB9AC%uC2A4%uD2B8%uC640%20%uD568%uAED8%20%uBCF4%uC5EC%uC8FC%uAE38%20%uBC14%uB790%uB2E4.%20%uD55C%20%uD1A1%uBC29%uC744%20%uC77D%uC5C8%uB2E4%uACE0%20%uC5C5%uB370%uC774%uD2B8%uD558%uBA74%uC11C%2C%20%uB3D9%uC2DC%uC5D0%20%uC77D%uC9C0%20%uC54A%uC558%uB2E4%uB294%20%uC22B%uC790%uB97C%20%uB3D9%uC2DC%uC5D0%20%uC5C5%uB370%uC774%uD2B8%20%uD558%uB294%20%uAC83%uAC19%uC740%2C%20%uC774%uB7F0%20%uC77C%uB4E4%uC740%20MVC%uBAA8%uB378%uB85C%uB294%20%uB2E4%uB8E8%uAE30%uAC00%20%uB9E4%uC6B0%20%uD798%uB4E4%uB2E4.%20%uC758%uC874%uC801%uC774%uACE0%20%uD3ED%uD3EC%uC218%uCC98%uB7FC%20%uC804%uD30C%uB418%uB294%20%uC5C5%uB370%uC774%uD2B8%uB4E4%uC740%20MVC%20%uC544%uD0A4%uD14D%uCCD0%uB97C%20%uC774%uC6A9%uD558%uB294%20%uD070%20%uC560%uD50C%uB9AC%uCF00%uC774%uC158%uC5D0%uC11C%20%uC790%uC8FC%20%uBC1C%uC0DD%uD55C%uB2E4.%20%uADF8%uB9AC%uACE0%20%uBCF5%uC7A1%uD55C%20%uB370%uC774%uD130%20%uD750%uB984%uC73C%uB85C%20%uC608%uC0C1%uCE58%20%uBABB%uD55C%20%uACB0%uACFC%uB4E4%uC744%20%uCD08%uB798%uD55C%uB2E4.%0A%0A%uC81C%uC5B4%uAD8C%uC740%20Store%uC5D0%uAC8C%20%uC5ED%uC804%uB41C%uB2E4.%20%uC2A4%uD1A0%uC5B4%uB4E4%uC740%20%uC5C5%uB370%uC774%uD2B8%uB97C%20%uBC1B%uC544%uB4E4%uC774%uACE0%2C%20%uADF8%uB4E4%uC758%20%uC77C%uAD00%uC801%uC778%20%uBC29%uBC95%uC73C%uB85C%20%uB370%uC774%uD130%uB97C%20%uC5C5%uB370%uC774%uD2B8%20%uD558%uAC8C%uB418%uB294%20%uC678%uBD80%uC801%uC778%20%uBB34%uC5B8%uAC00%uC5D0%20%uC758%uC874%uD558%uAE30%uBCF4%uB2E4%2C%20%uADF8%uB4E4%uC744%20%uC801%uC808%uD558%uAC8C%20%uC870%uC815%uD55C%uB2E4.%20%uC5B4%uB5A0%uD55C%20%uC678%uBD80%20%uC2A4%uD1A0%uC5B4%uB4E4%uB3C4%20%uADF8%20%uB3C4%uBA54%uC778%uC744%20%uC704%uD55C%20%uB370%uC774%uD130%uB4E4%uC774%20%uC5B4%uB5BB%uAC8C%20%uAD00%uB9AC%uB418%uB294%uC9C0%uC5D0%20%uB300%uD574%20%uC804%uD600%20%uC774%uD574%uD558%uACE0%20%uC788%uC9C0%20%uC54A%uB2E4.%20%uC774%uB294%20%uC4F8%uB370%uC5C6%uB294%20%uAC71%uC815%uAC70%uB9AC%uB97C%20%uB9CC%uB4E4%uC9C0%20%uC54A%uB294%uB2E4.%20%uC2A4%uD1A0%uC5B4%uB4E4%uC740%20%uC5B4%uB5A4%20%uB2E4%uC774%uB809%uD2B8%20Setter%20%uBA54%uC18C%uB4DC%uB3C4%20%uB4E4%uACE0%uC788%uC9C0%20%uC54A%uB2E4.%20%uC608%uB97C%20%uB4E4%uC5B4%20%60setAsRead%28%29%60%uAC19%uC740.%20%uADF8%uB7EC%uB098%20%uB300%uC2E0%20%uC0C8%uB85C%uC6B4%20%uB370%uC774%uD130%uB97C%20%uADF8%uB4E4%20%uC18D%uC758%20%uC138%uACC4%uB85C%20%uAC00%uC838%uC624%uB294%20%uD55C%uAC00%uC9C0%20%uBC29%uBC95%uB9CC%uC774%20%uC874%uC7AC%uD55C%uB2E4.%20%20-%20%uBC14%uB85C%20callback%uC774%uB2E4.%20Dispatcher%uB85C%20%uADF8%uB4E4%uC774%20%uB4F1%uB85D%uD55C.%0A%0A%23%uC2A4%uD2B8%uB7ED%uCCD0%uC640%20%uB370%uC774%uD130%20%uD750%uB984%0A%0AFlux%uC758%20%uB370%uC774%uD130%uB4E4%uC740%20%uD55C%20%uBC29%uD5A5%uC73C%uB85C%uB9CC%20%uD750%uB978%uB2E4.%0A%0A%21%5BAlt%20text%5D%28./1451462507641.png%29%0A%0A%uB2E8%uBC29%uD5A5%20%uB370%uC774%uD130%20%uD750%uB984%uC740%20Flux%20%uD328%uD134%uC758%20%uC911%uC2EC%uC774%uB2E4.%20%uADF8%uB9AC%uACE0%20%uC704%20%uB2E4%uC774%uC5B4%uADF8%uB7A8%uC740%20Flux%20%uD504%uB85C%uADF8%uB798%uBA38%uC5D0%uAC8C%20%uC8FC%uC694%20%uB9E8%uD0C8%20%uBAA8%uB378%uC774%uC5B4%uC57C%20%uD55C%uB2E4.%20%uB514%uC2A4%uD328%uCC98%2C%20%uC2A4%uD1A0%uC5B4%2C%20%uBDF0%uB4E4%uC740%20%uBA85%uD655%uD55C%20%uC778%uD48B%uACFC%20%uC544%uC6C3%uD48B%uC774%20%uC788%uB294%20%uC11C%uB85C%20%uB3C5%uB9BD%uC801%uC778%20%uB178%uB4DC%uB4E4%uC774%uB2E4.%20Action%uB4E4%uC740%20%uAC04%uB2E8%uD55C%20%uC624%uBE0C%uC81D%uD2B8%uB85C%2C%20%uC0C8%uB85C%uC6B4%20%uB370%uC774%uD130%uB97C%20%uAC00%uC9C0%uACE0%20%uC788%uACE0%20%uC5B4%uB5A4%20%uD0C0%uC785%uC758%20%uD504%uB85C%uD37C%uD2F0%uC778%uC9C0%uC5D0%20%uB300%uD55C%20%uC815%uBCF4%uB97C%20%uC81C%uACF5%uD55C%uB2E4.%0A%0A%uBDF0%uB4E4%uC740%20%uC720%uC800%uC758%20%uC778%uD130%uB809%uC158%uB4E4%uC5D0%20%uB300%uD55C%20%uBC18%uC751%uACFC%20%uAD00%uB828%uB41C%20%uC0C8%uB85C%uC6B4%20Action%uC744%20%uC0DD%uC131%uD560%20%uAC83%uC774%uB2E4.%20%uADF8%uB9AC%uACE0%20%uC774%uB7EC%uD55C%20%uC561%uC158%uB4E4%uC740%20%uC2DC%uC2A4%uD15C%uC5D0%20%uC758%uD574%20%uC804%uD30C%uB41C%uB2E4.%0A%21%5BAlt%20text%5D%28./1451462712969.png%29%0A%0A%uBAA8%uB4E0%20%uB370%uC774%uD130%uB294%20%uC911%uC2EC%20%uD5C8%uBE0C%uB85C%uC11C%20Dispatcher%uB97C%20%uD1B5%uD574%20%uD750%uB978%uB2E4.%20Action%uC740%20Action%20creator%20%uBA54%uC18C%uB4DC%20%uC548%uC5D0%uC11C%20%uB514%uC2A4%uD328%uCC98%uC5D0%uAC8C%20%uC81C%uACF5%uB41C%uB2E4.%20%uADF8%uB9AC%uACE0%20%uB354%20%uC790%uC8FC%uB294%20%uBDF0%uC5D0%uC11C%uC758%20%uC720%uC800%20%uC778%uD130%uB809%uC158%uC744%20%uD1B5%uD574%20%uB300%uBD80%uBD84%20%uC0DD%uC131%uB420%20%uAC83%uC774%uB2E4.%20%0A%0A%uB514%uC2A4%uD328%uCC98%uB294%20%uC2A4%uD1A0%uC5B4%uB4E4%uC774%20%uC774%uBBF8%20dispatcher%uC5D0%uAC8C%20%uB4F1%uB85D%uD588%uB358%2C%20%uBAA8%uB4E0%20%uC2A4%uD1A0%uC5B4%uB4E4%uC758%20%uC561%uC158%uB4E4%uC744%20%uC2A4%uD1A0%uC5B4%uB4E4%uC5D0%20%uC804%uB2EC%uD558%uACE0%20callback%uC744%20%uD638%uCD9C%uD55C%uB2E4.%20%uC2A4%uD1A0%uC5B4%20%uADF8%uB4E4%uC774%20%uC720%uC9C0%uD558%uB294%20%uC2A4%uD14C%uC774%uD2B8%uB4E4%uACFC%20%uAD00%uB828%uB41C%20%uC5B4%uB5A4%20%uC561%uC158%uC774%uB4E0%20%uB4F1%uB85D%uB41C%20%uCEEC%uBCA1%20%uB0B4%uC5D0%uC11C%20%uC2A4%uD1A0%uC5B4%uB4E4%uC740%20%uC751%uB2F5%uD558%uAC8C%20%uB41C%uB2E4.%20%uC2A4%uD1A0%uC5B4%uB4E4%uC740%20%uADF8%20%uD6C4%2C%20%uB370%uC774%uD130%20%uB808%uC774%uC5B4%uC758%20%uBCC0%uD654%uB97C%20Controller-Views%uB4E4%uC5D0%uAC8C%20%uC54C%uB9AC%uAE30%20%uC704%uD574%20change%20%uC774%uBCA4%uD2B8%uB97C%20%uBC29%uCD9C%28emit%29%uD55C%uB2E4.%20Controller-View%uB294%20%uC774%uB7EC%uD55C%20%uC774%uBCA4%uD2B8%uB4E4%uC744%20%uB9AC%uC2A4%uB2DD%uD558%uACE0%20%uC788%uB2E4%uAC00%20%uBC29%uCD9C%uC774%20%uB418%uBA74%20%uC774%uBCA4%uD2B8%20%uD578%uB4E4%uB7EC%uB97C%20%uD1B5%uD574%20%uC2A4%uD1A0%uC5B4%uC5D0%uC11C%20%uB370%uC774%uD130%uB97C%20%uAC00%uC838%uC628%uB2E4.%20%uCEE8%uD2B8%uB864%20%uBDF0%uB294%20%uADF8%uB4E4%20%uC790%uC2E0%uC758%20setState%28%29%20%uBA54%uC18C%uB4DC%uB97C%20%uC2A4%uC2A4%uB85C%uB97C%20%uB9AC%uB80C%uB354%uD558%uACE0%2C%20%uB610%20%uCEF4%uD3EC%uB10C%uD2B8%20%uD2B8%uB9AC%uC758%20%uD6C4%uC190%uB4E4%uC744%20%uB9AC%uB80C%uB354%20%uD558%uAE30%uC704%uD574%20%uD638%uCD9C%uD55C%uB2E4.%0A%0A%21%5BAlt%20text%5D%28./1451463358648.png%29%0A%0A%uC774%20%uAD6C%uC870%uB294%20%uC6B0%uB9AC%uC5D0%uAC8C%20%uD55C%uAC00%uC9C0%20%uBC29%uBC95%uC73C%uB85C%20%uC27D%uAC8C%20%uC560%uD50C%uB9AC%uCF00%uC774%uC158%uC744%20%uCD94%uB860%uD560%20%uC218%20%uC788%uB3C4%uB85D%20%uD55C%uB2E4.%20%20%60functional%20reactive%20programming%60%2C%20%uD639%uC740%20%uB354%20%uAD6C%uCCB4%uC801%uC73C%uB85C%20%60data-flow%20programming%60%20%uD639%uC740%20%60flow-based%20programming%60%uC744%20%uC744%20%uC5F0%uC0C1%uC2DC%uD0A4%uB294%20%uBC29%uBC95%uC744%20%uC774%uC6A9%uD574%uC11C.%20%20%uC774%20%uBC29%uBC95%uB4E4%uC5D0%uC11C%uB294%20%uC560%uD50C%uB9AC%uCF00%uC774%uC158%uC758%20%uB370%uC774%uD130%20%uD50C%uB85C%uC6B0%uB4E4%uC740%20%uD55C%20%uBC61%uD5A5%uC73C%uB85C%20%uD750%uB978%uB2E4.%20%uB450%20%uBC29%uD5A5%20%uBC14%uC778%uB529%uC740%20%uC5C6%uB2E4.%0A%uC560%uD50C%uB9AC%uCF00%uC774%uC158%20%uB0B4%uC758%20%uD2B9%uC815%20%uD30C%uD2B8%uB294%20%uD558%uB098%uC758%20%uC2A4%uD1A0%uC5B4%uC5D0%20%uC758%uD574%20%uB9E4%uC6B0%20decoupled%uB41C%20%uCC44%uB85C%20%uC0C1%uD0DC%28state%29%uAC00%20%uC720%uC9C0%uB41C%uB2E4.%20%uB3D9%uAE30%uC801%uC73C%uB85C%20%uC5C5%uB370%uC774%uD2B8%uAC00%20%uB514%uC2A4%uD328%uCC98%uC5D0%20%uC758%uD574%20%uAD00%uB9AC%uB418%uBA74%uC11C%2C%20%uC2A4%uD1A0%uC5B4%uB4E4%uC758%20%uC758%uC874%uC131%uC774%20%uC788%uB294%20%uACF3%uC5D0%uC11C%uB294%20%uC5C4%uACA9%uD55C%20%uACC4%uAE09%20%uCCB4%uACC4%uC744%20%uC720%uC9C0%uD55C%uB2E4.%0A%0A%uC6B0%uB9AC%uB294%20%uB450%20%uBC29%uD5A5%uC758%20%uB370%uC774%uD130%20%uBC14%uC778%uB529%uC774%20%uD55C%uAC00%uC9C0%20%uC624%uBE0C%uC81D%uD2B8%uC758%20%uBCC0%uD654%uAC00%20%uB2E4%uB978%20%uC624%uBE0C%uC81D%uD2B8%uC758%20%uBCC0%uD654%uB97C%20%uC77C%uC73C%uD0A4%uB294%20%uCE90%uC2A4%uCF00%uC774%uB529%20%uC5C5%uB370%uC774%uD2B8%uB97C%20%uBC1C%uC0DD%uC2DC%uD0A8%uB2E4%uB294%20%uAC83%uC744%20%uC54C%uC558%uB2E4.%20%uADF8%20%uBFD0%uB9CC%20%uC544%uB2C8%uB77C%20%uADF8%20%uBCC0%uD654%20%uB610%uD55C%20%uB354%20%uB9CE%uC740%20%uC5C5%uB370%uC774%uD2B8%uB4E4%uC744%20%uD2B8%uB9AC%uAC70%20%uD560%20%uC218%20%uC788%uB2E4.%20%uC560%uD50C%uB9AC%uCF00%uC774%uC158%uC774%20%uCEE4%uC9C0%uBA74%uC11C%20%uC774%uB7F0%20%uCF00%uC2A4%uCF00%uC774%uB529%20%uC5C5%uB370%uC774%uD2B8%uB4E4%uC740%20%uC720%uC800%20%uC778%uD130%uB809%uC158%uC758%20%uACB0%uACFC%uB85C%uC11C%20%uBB34%uC5C7%uC774%20%uBC14%uB00C%uC5B4%20%uC838%uC57C%20%uD558%uB294%uC9C0%uC5D0%20%uB300%uD55C%20%uACB0%uACFC%uBB3C%uC5D0%20%uB300%uD55C%20%uC608%uCE21%uD558%uAE30%20%uD798%uB4E4%uAC8C%20%uD55C%uB2E4.%20%uC5C5%uB370%uC774%uD2B8%uAC00%20%uD558%uB098%uC758%20%uB77C%uC6B4%uB4DC%uC548%uC5D0%uC11C%20%uB370%uC774%uD130%uB97C%20%uBCC0%uACBD%uD560%20%uB54C%2C%20%uC2DC%uC2A4%uD15C%uC740%20%uC804%uCCB4%uB85C%uC11C%20%uC608%uCE21%uAC00%uB2A5%uD574%uC9C4%uB2E4.%0A%0A%uB2E4%uC591%uD55C%20Flux%uC758%20%uD30C%uD2B8%uB97C%20%uC790%uC138%uD788%20%uBCF4%uC790.%20%uB514%uC2A4%uD328%uCC98%uB294%20%uC2DC%uC791%uC73C%uB85C%uC11C%20%uAC00%uC7A5%20%uC801%uC808%uD55C%20%uC120%uD0DD%uC774%uB2E4.%0A%0A%23%uD558%uB098%uC758%20Dispatcher%0A%0AFlux%20%uC560%uD50C%uB9AC%uCF00%uC774%uC158%uC5D0%uC11C%20%uBAA8%uB4E0%20%uB370%uC774%uD130%20%uD50C%uB85C%uC6B0%uB97C%20%uAD00%uB9AC%uD558%uB294%20%uB514%uC2A4%uD328%uCC98%uB294%20%uC911%uC559%20%uD5C8%uBE0C%uB2E4.%20%uAE30%uBCF8%uC801%uC73C%uB85C%20%uB514%uC2A4%uD328%uCC98%uB294%20%uC2A4%uD1A0%uC5B4%uB4E4%uC758%20%uC548%uC18D%uC758%20callback%uB4E4%uC758%20%uC800%uC7A5%uC18C%28%uB808%uC9C0%uC2A4%uD2B8%uB9AC%29%uB85C%20%uADF8%20%uC2A4%uC2A4%uB85C%uB294%20%uC5B4%uB5A0%uD55C%20%uC2E4%uC9C8%uC801%20%uC9C0%uB2A5%uB3C4%20%uC5C6%uB2E4.%20%uADF8%uAC83%uC740%20%uC561%uC158%uC744%20%uC2A4%uD1A0%uC5B4%uB85C%20%uBD84%uBC30%uD558%uB294%20%uAC04%uB2E8%uD55C%20%uAE30%uACC4%uC7A5%uCE58%uB2E4.%20%uAC01%20%uC2A4%uD1A0%uC5B4%uB4E4%uC740%20dispatcher%uC5D0%20%uADF8%uB4E4%20%uC2A4%uC2A4%uB85C%20%uBFD0%uB9CC%20%uC544%uB2C8%uB77C%20callback%uB3C4%20%uB4F1%uB85D%uD55C%uB2E4.%20Action%20creator%uAC00%20%uB514%uC2A4%uD328%uCC98%uC5D0%uAC8C%20%uC0C8%uB85C%uC6B4%20%uC561%uC158%uC744%20%uC81C%uACF5%uD560%20%uB54C%2C%20%uC560%uD50C%uB9AC%uCF00%uC774%uC158%20%uB0B4%20%uBAA8%uB4E0%20%uC2A4%uD1A0%uC5B4%uB4E4%uC740%20%uC800%uC7A5%uC18C%28%uB808%uC9C0%uC2A4%uD2B8%uB9AC%29%uC548%uC5D0%uC788%uB294%20callbakc%uB4E4%uC744%20%uD1B5%uD574%20%uC561%uC158%uC744%20%uBC1B%uB294%uB2E4.%20%0A%0A%uC560%uD50C%uB9AC%uCF00%uC774%uC158%uC758%20%uC131%uC7A5%uC5D0%20%uB530%uB77C%2C%20%uB514%uC2A4%uD328%uCC98%uB294%20%uC880%20%uB354%20%uD65C%uC131%uD654%uB41C%uB2E4.%20%uC774%uB54C%20%uC2A4%uD1A0%uC5B4%uB4E4%20%uC0AC%uC774%uC5D0%uC11C%20%uD2B9%uC815%uD55C%20%uC21C%uC11C%uB300%uB85C%20%uB4F1%uB85D%uB41C%20callback%uC744%20%uD638%uCD9C%uD574%20%uC8FC%uC5B4%20%uC758%uC874%uC131%uC744%20%uAD00%uB9AC%uD558%uB294%uB370%20%uC0AC%uC6A9%uB420%20%uC218%uB3C4%20%uC788%uB2E4.%20%uC2A4%uD1A0%uC5B4%uB294%20%uC120%uC5B8%uC801%uC73C%uB85C%20%uAE30%uB2E4%uB9B4%20%uC218%20%uC788%uB2E4.%20%uB2E4%uB978%20%uC2A4%uD1A0%uC5B4%uB4E4%uC774%20%uC5C5%uB370%uC774%uD2B8%uB97C%20%uC644%uB8CC%uD558%uAE30%uAE4C%uC9C0.%20%uADF8%uB9AC%uACE0%20%uB098%uC11C%20%uADF8%uB4E4%20%uC2A4%uC2A4%uB85C%uB97C%20%uADF8%uC5D0%uB9DE%uCDB0%20%uC5C5%uB370%uC774%uD2B8%uD55C%uB2E4.%0A%0A%uD398%uC774%uC2A4%uBD81%uC774%20%uD504%uB85C%uB355%uC158%uC5D0%uC11C%20%uC0AC%uC6A9%uD558%uB294%20%uB514%uC2A4%uD328%uCC98%uB294%20npm%2C%20Bower%2C%20or%20GitHub%uC5D0%uC11C%20%uC774%uC6A9%uD560%20%uC218%20%uC788%uB2E4.%0A%0A%23%uC2A4%uD1A0%uC5B4%28Stores%29%0A%0A%uC2A4%uD1A0%uC5B4%uB294%20%uC560%uD50C%uB9AC%uCF00%uC774%uC158%uC758%20%uC2A4%uD14C%uC774%uD2B8%uC640%20%uB85C%uC9C1%uC744%20%uAC00%uC9C0%uACE0%20%uC788%uB2E4.%20%uADF8%uB4E4%uC758%20%uC5ED%uD65C%uC740%20%uBB54%uAC00%20%uBE44%uC2B7%uD55C%uB370%2C%20MVC%uC5D0%uC11C%uC758%20%uBAA8%uB378%uC774%20%uADF8%uAC83%uC774%uB2E4.%20%uADF8%uB7EC%uB098%20%uADF8%uB4E4%uC740%20%uB2E4%uC591%uD55C%20%uC624%uBE0C%uC81D%uD2B8%uC758%20%uC0C1%uD0DC%28state%29%uB97C%20%uAD00%uB9AC%uD55C%uB2E4.%20%uADF8%uB4E4%uC740%20ORM%20%uBAA8%uB378%uC774%20%uD558%uB4EF%20%uD558%uB098%uC758%20%uB2E8%uC21C%uD55C%20%uB808%uCF54%uB4DC%uB85C%20%uD45C%uD604%uB420%20%uC218%20%uC5C6%uB2E4.%20Backbone%uC758%20%uCF5C%uB809%uC158%uACFC%uB3C4%20%uB9C8%uCC2C%uAC00%uC9C0%uB85C%20%uB2E4%uB974%uB2E4.%20%uAC04%uB2E8%uD788%20ORM%20%uC2A4%uD0C0%uC77C%uC758%20%uC624%uBE0C%uC81D%uD2B8%uB97C%20%uAD00%uB9AC%uD558%uB294%20%uAC83%20%uADF8%20%uC774%uC0C1%uC774%uB2E4.%20%uC2A4%uD1A0%uC5B4%uB294%20%uD2B9%uBCC4%uD55C%20%uB3C4%uBA54%uC778%28%uCC45%uC784%uC601%uC5ED%29%uC744%20%uC704%uD55C%20%uC560%uD50C%uB9AC%uCF00%uC774%uC158%uC758%20%uC0C1%uD0DC%28state%29%uB97C%20%uAD00%uB9AC%uD55C%uB2E4.%20%0A%0A%uC608%uB97C%20%uB4E4%uC5B4%uBCF4%uC790.%20%uD398%uC774%uC2A4%uBD81%uC758%20Lookback%20Video%20Editor%uB294%20%uACC4%uC18D%20%uC7AC%uC0DD%uC2DC%uAC04%uC758%20%uC704%uCE58%uC640%20%uC7AC%uC0DD%20%uC0C1%uD0DC%uB97C%20%uD2B8%uB798%uD0B9%uD558%uB294%20TimeStore%uB97C%20%uC0AC%uC6A9%uD55C%uB2E4.%20%20%uD55C%uD3B8%2C%20%uAC19%uC740%20%uC560%uD50C%uB9AC%uCF00%uC774%uC158%uC758%20ImageStore%uB294%20%uACC4%uC18D%20%uC774%uBBF8%uC9C0%uB4E4%uC758%20%uCEEC%uB809%uC158%uC744%20%uD2B8%uB798%uD0B9%uD55C%uB2E4.%20%uC6B0%uB9AC%20TodoMVC%20Example%uC5D0%20%uC788%uB294%20TodoStore%uB3C4%20%uBE44%uC2B7%uD55C%uB370%20todo%20%uC544%uC774%uD15C%uC758%20%uCEEC%uB809%uC158%uC744%20%uB2E4%uB8EC%uB2E4.%20%uC2A4%uD1A0%uC5B4%uB294%202%uAC00%uC9C0%20%uD2B9%uC131%uC744%20%uBCF4%uC778%uB2E4.%20%uD558%uB098%uB294%20%uBAA8%uB378%uB4E4%uC758%20%uCEEC%uB809%uC158%uC774%uACE0%20%uB610%20%uB2E4%uB978%20%uD558%uB098%uB294%20%uB17C%uB9AC%uC801%uC778%20%uB3C4%uBA54%uC778%uC758%20%uC2F1%uAE00%uD1A4%20%uBAA8%uB378%uC774%uB2E4.%0A%0A%uC704%uC5D0%uB3C4%20%uC774%uC57C%uAE30%uD588%uB4EF%2C%20%uC2A4%uD1A0%uC5B4%uB294%20%uADF8%uB4E4%20%uC2A4%uC2A4%uB85C%uB97C%20%uB514%uC2A4%uD328%uCC98%uC5D0%uAC8C%20callback%uACFC%20%uD568%uAED8%20%uC9C1%uC811%20%uB4F1%uB85D%uD55C%uB2E4.%20%uC774%20callback%uC740%20%uC561%uC158%uC744%20%uD30C%uB798%uBA38%uD130%uB85C%20%uBC1B%uB294%uB2E4.%20%uC2A4%uD1A0%uC5B4%uAC00%20%uB4F1%uB85D%uD55C%20%uCF5C%uBCA1%20%uC548%uC5D0%uC11C%2C%20%uC561%uC158%uD0C0%uC785%uC5D0%20%uAE30%uBC18%uD55C%20switch%uBB38%uC740%20%uC561%uC158%uC744%20%uBC88%uC5ED%uD558%uB294%uB370%20%uC0AC%uC6A9%uB420%20%uBFD0%uB9CC%20%uC544%uB2C8%uB77C%20%uC2A4%uD1A0%uC5B4%20%uB0B4%uBD80%uC758%20%uBA54%uC18C%uB4DC%uB4E4%uC5D0%uAC8C%20%uC801%uC808%uD55C%20%uD6C5%28hook%29%uC744%20%uC81C%uACF5%uD558%uB294%uB370%20%uC0AC%uC6A9%uB41C%uB2E4.%20%uC774%uAC83%uC740%20%uC561%uC158%uC774%20%uB514%uC2A4%uD328%uCC98%uB97C%20%uD1B5%uD574%20%uC2A4%uD1A0%uC5B4%uC758%20%uC0C1%uD0DC%20%uC5C5%uB370%uC774%uD2B8%uB97C%20%uAC00%uB2A5%uD558%uB3C4%uB85D%20%uD55C%uB2E4.%20%uC2A4%uD1A0%uC5B4%uAC00%20%uC5C5%uB370%uC774%uD2B8%20%uB41C%20%uD6C4%2C%20%uADF8%uB4E4%uC740%20%uC2A4%uD14C%uC774%uD2B8%uAC00%20%uBC14%uB00C%uC5C8%uB2E4%uB294%20%uC774%uBCA4%uD2B8%uB97C%20%uB0B4%uBFDC%uB294%uB370%2C%20%uC774%uB97C%20%uD1B5%uD574%20%uBDF0%uB4E4%uC740%20%uC0C8%uB85C%uC6B4%20%uC0C1%uD0DC%uB97C%20%uC9C8%uC758%uD560%20%uC218%20%uC788%uACE0%2C%20%uADF8%uB4E4%20%uC2A4%uC2A4%uB85C%uB97C%20%uC5C5%uB370%uC774%uD2B8%20%uD55C%uB2E4.%0A%0A%23%uBDF0%28Views%29%uC640%20Controller-Views%0A%0A%uC6B0%uB9AC%uAC00%20%uBDF0%uB808%uC774%uC5B4%uC5D0%uC11C%20%uD544%uC694%uB85C%20%uD558%uB294%20%uAD6C%uC131%20%uAC00%uB2A5%uD55C%20%uC885%uB958%uC758%2C%20%uADF8%uB9AC%uACE0%20%uC790%uC720%uB86D%uAC8C%20%uBBF8%uB9AC%20%uB79C%uB354%uD560%20%uC218%20%uC788%uB294%20%uBDF0%uB4E4%uC744%20React%uB294%20%uC81C%uACF5%uD55C%uB2E4.%20%uC5BD%uD600%uC788%uB294%20%uBDF0%20%uACC4%uAE09%uC758%20%uCD5C%uC0C1%uB2E8%uC744%20%uAC00%uAE4C%uC774%uC5D0%uC11C%20%uBCF4%uBA74%2C%20%uC5B4%uB5A4%20%uBDF0%uAC00%20%uC758%uC874%uD558%uB294%20%uC2A4%uD1A0%uC5B4%uAC00%20%uBE0C%uB85C%uB4DC%uCE90%uC2A4%uD2B8%uD558%uB294%20%uC774%uBCA4%uD2B8%uB4E4%uC744%20%uB9AC%uC2A4%uB2DD%uD558%uB294%20%uD2B9%uBCC4%uD55C%20%uBDF0%uB4E4%uC774%20%uC874%uC7AC%uD55C%uB2E4.%20%uC6B0%uB9AC%uB294%20%uC774%uAC78%20%uCEE8%uD2B8%uB864%20%uBDF0%uB77C%uACE0%20%uBD80%uB978%uB2E4.%20%uADF8%uB4E4%uC740%20%uB370%uC774%uD130%uB97C%20%uC2A4%uD1A0%uC5B4%uC5D0%uC11C%20%uAC00%uC838%uC624%uAC70%uB098%20%uD639%uC740%20%uADF8%uB4E4%uC758%20%uD6C4%uC190%uB4E4%uC5D0%uAC8C%20%uB370%uC774%uD130%uB97C%20%uB0B4%uB824%uC8FC%uB294%uC77C%uC744%20%uC704%uD55C%20%uC811%uCC29%20%uCF54%uB4DC%uB97C%20%uC81C%uACF5%uD55C%uB2E4.%20%uC6B0%uB9AC%uB294%20%uC774%uB7F0%20%uCEE8%uD2B8%uB864%20%uBDF0%uB4E4%uC5D0%uAC8C%20%uC911%uC694%uD55C%20%uC139%uC158%20%uD558%uB098%uB97C%20%uD560%uB2F9%uD574%20%uC8FC%uC5B4%uC57C%20%uD560%20%uAC83%20%uAC19%uB2E4.%0A%0A%uC774%uBCA4%uD2B8%uB97C%20%uC2A4%uD1A0%uC5B4%uC5D0%uC11C%20%uBC1B%uC558%uC744%20%uB54C%2C%20%uC2A4%uD1A0%uC5B4%uC758%20public%20getter%20%uBA54%uC18C%uB4DC%uB4E4%uB85C%20%uD544%uC694%uD55C%20%uC0C8%20%uB370%uC774%uD130%uB97C%20%uBA3C%uC800%20%uC694%uCCAD%uD55C%uB2E4.%20%uC774%uD6C4%20%uC790%uC2E0%uC758%20%60setState%28%29%60%uD639%uC740%20%60forceUpdate%28%29%60%uBA54%uC18C%uB4DC%28%uADF8%uAC83%uC758%20%60render%28%29%60%uBA54%uC18C%uB4DC%uC640%20%uD558%uBD80%20%uC790%uC190%uB4E4%uC758%20%60render%28%29%60%20%uBA54%uC18C%uB4DC%uB4E4%uC744%20%uC2E4%uD589%uD558%uB294%29%uB4E4%uC744%20%uD638%uCD9C%uD55C%uB2E4.%20%0A%uC6B0%uB9AC%uB294%20%uC790%uC8FC%20%uC2A4%uD1A0%uC5B4%uC758%20%uC804%uCCB4%20%uC0C1%uD0DC%28state%29%uB97C%20%uBDF0%uB4E4%uC758%20%uCCB4%uC778%uC774%20%uC788%uB294%20%uD558%uBD80%uB85C%20%uC804%uB2EC%uD55C%uB2E4.%20%uC774%uAC83%uC740%20%uB2E4%uB978%20%uD6C4%uC190%uB4E4%uC774%20%uADF8%uB4E4%uC774%20%uD544%uC694%uB85C%20%uD558%uB294%20%uAC83%uC744%20%uC0AC%uC6A9%uD560%20%uC218%20%uC788%uB3C4%uB85D%20%uD5C8%uB77D%uD55C%uB2E4.%20%uAC8C%uB2E4%uAC00%20%uAC00%uC7A5%20%uCD5C%uC0C1%uC704%uC5D0%uC11C%uB3C4%20%uCEE8%uD2B8%uB864%uB7EC%20%uBE44%uC2B7%uD55C%20%uD589%uB3D9%uC744%20%uC720%uC9C0%uD558%uAE30%2C%20%uB610%20%uC774%uB807%uAC8C%20%uC6B0%uB9AC%uC758%20%uC790%uC190%20%uBDF0%uB4E4%uC744%20%uC720%uC9C0%uD558%uAE30%20%uC704%uD574%2C%20%uAC00%uB2A5%uD55C%uD55C%20%uAE30%uB2A5%uC801%uC73C%uB85C%20%uD4E8%uC5B4%uD558%uAC8C%20%uBAA8%uB4E0%20%uC2A4%uD1A0%uC5B4%uC758%20%uC0C1%uD0DC%uB97C%20%uC2F1%uAE00%20%uC624%uBE0C%uC81D%uD2B8%uB85C%20%uD558%uBD80%uC5D0%20%uC804%uB2EC%uD558%uB294%20%uAC83%uC740%20%uC6B0%uB9AC%uAC00%20%uAD00%uB9AC%uD574%uC57C%uD560%20%uD504%uB85C%uD37C%uD2F0%uB4E4%uC758%20%uC218%uB97C%20%uC904%uC5EC%uC8FC%uB294%20%uD6A8%uACFC%uAC00%20%uC788%uB2E4.%0A%0A%uAC00%uB054%2C%20%uC6B0%uB9AC%uB294%20%uC548%uCABD%28%uCD5C%uC0C1%uC704%uAC00%20%uC544%uB2CC%29%20%uCEE8%uD2B8%uB864%20%uBDF0%uB97C%20%uCEF4%uD3EC%uB10C%uD2B8%uB97C%20%uAC04%uB2E8%uD788%20%uC720%uC9C0%uD558%uAE30%20%uC704%uD574%20%uAC00%uB054%20%uCD94%uAC00%uD560%20%uD544%uC694%uB97C%20%uB290%uB080%uB2E4.%20%uC774%uAC83%uC740%20%uD2B9%uC815%20%uB3C4%uBA54%uC778%uC758%20%uC139%uC158%uC758%20%uACC4%uCE35%uC744%20%uB354%20%uB0AB%uAC8C%20%uCEA1%uC290%uD654%20%uD560%20%uC218%20%uC788%uAC8C%20%uD574%uC8FC%uAE30%uB3C4%20%uD55C%uB2E4.%20%uADF8%uB7EC%uB098%20%uC548%uCABD%uC758%20%uCEE8%uD2B8%uB864%uB7EC%uBDF0%uB294%20%uD558%uB098%uC758%20%uB370%uC774%uD130%20%uD750%uB984%uC744%20%uAE70%20%uC218%uB3C4%20%uC788%uB2E4%uB294%20%uC810%uC744%20%uC54C%uC544%uC57C%uD55C%uB2E4.%20%uC774%uB7F0%20%uCEE8%uD2B8%uB864%20%uBDF0%uB294%20%uC0C8%uB85C%uC6B4%20%uB370%uC774%uD130%20%uD750%uB984%uC744%20%uC704%uD55C%20%uC5D4%uD2B8%uB9AC%20%uD3EC%uC778%uD2B8%uB97C%20%uB9CC%uB4E4%20%uC218%20%uC788%uC73C%uBA70%2C%20%uC774%uB294%20%uC7A0%uC7AC%uC801%uC778%20%uCDA9%uB3CC%20%uAC00%uB2A5%uC131%uC744%20%uAC00%uC9C0%uACE0%20%uC788%uB2E4.%20%uC548%uCABD%uC758%20%uCEE8%uD2B8%uB864%20%uBDF0%uB97C%20%uB9CC%uB4E4%20%uB54C%uB294%20%uAC04%uB2E8%uD55C%20%uCEF4%uD3EC%uB10C%uD2B8%uC758%20%uC774%uC810%uACFC%20%uBCF5%uC7A1%uD55C%20%uB2E4%uC218%uC758%20%uC5C5%uB370%uC774%uD2B8%20%uC0AC%uC774%uC5D0%uC11C%20%uC870%uC728%uC744%20%uD574%uC57C%uD55C%uB2E4.%20%uC774%uB7EC%uD55C%20%uB2E4%uC218%uC758%20%uB370%uC774%uD130%20%uC5C5%uB370%uC774%uD2B8%uB294%20%uC758%uB3C4%uCE58%20%uC54A%uC740%20%uC601%uD5A5%uC744%20%uB9CC%uB4E4%20%uC218%20%uC788%uB294%uB370%2C%20%uB2E4%uB978%20%uCEE8%uD2B8%uB864%uBDF0%uC5D0%20%uC758%uD574%20%uACC4%uC18D%uC801%uC73C%uB85C%20%uD638%uCD9C%uB418%uB294%20React%uC758%20%uB80C%uB354%uB9C1%20%uBA54%uC18C%uB4DC%uC758%20getting%uC5D0%uC11C%20%uADF8%uB807%uB2E4.%20%uADF8%uB9AC%uACE0%20%uC774%uAC74%20%uC7A0%uC7AC%uC801%uC73C%uB85C%20%uB514%uBC84%uAE45%uC758%20%uC5B4%uB824%uC6C0%uC744%20%uC99D%uAC00%uC2DC%uD0AC%20%uC218%20%uC788%uB2E4.%0A%0A%23%20%uC561%uC158%28Actions%29%0A%0A%uC6B0%uB9AC%uAC00%20%uC2A4%uD1A0%uC5B4%uC5D0%uAC8C%20%uBD84%uBC30%28dispatch%29%uB97C%20%uD2B8%uB9AC%uAC70%uD560%20%uC218%20%uC788%uB3C4%uB85D%2C%20%uADF8%uB9AC%uACE0%20%uB370%uC774%uD130%20%uD398%uC774%uB85C%uB4DC%20-%20%uC774%uAC83%uC774%20%uC6B0%uB9AC%uAC00%20%uBD80%uB974%uB294%20%uC561%uC158%20-%20%uB97C%20%uD3EC%uD568%20%uD560%20%uC218%20%uC788%uAC8C%20%uB514%uC2A4%uD328%uCC98%uB294%20%uD55C%20%uBA54%uC18C%uB4DC%uB97C%20%uB178%uCD9C%uC2DC%uD0A8%uB2E4.%20%uC2DC%uBA58%uD2F1%uD55C%20%uD5EC%uD37C%20%uBA54%uC18C%uB4DC%20%uC548%uC5D0%2C%20%uC5D1%uC158%uC758%20%uC0DD%uC131%uC740%20%uC544%uB9C8%20%uB798%uD551%uB418%uC5B4%uC788%uC744%20%uAC83%uC774%uB2E4.%20%uADF8%uAC83%uC740%20%uC561%uC158%uC744%20%uB514%uC2A4%uD328%uCC98%uC5D0%uAC8C%20%uBCF4%uB0B8%uB2E4.%20%uC608%uB97C%uB4E4%uC5B4%2C%20%uC6B0%uB9AC%uB294%20To-do%20%uC544%uC774%uD15C%uC758%20%uAE00%uC790%uB97C%20To-do%20List%20%uC560%uD50C%uB9AC%uCF00%uC774%uC158%uC5D0%uC11C%20%uBC14%uAFB8%uAE38%20%uC6D0%uD560%20%uC218%20%uC788%uB2E4.%20%uC6B0%uB9AC%uB294%20TodoActions%20%uBAA8%uB4C8%20%uC548%uC5D0%20%60updateText%28todoId%2C%20newText%29%60%uAC19%uC740%20%uD568%uC218%uB85C%20%uC561%uC158%uC744%20%uC0DD%uC131%uD55C%uB2E4.%20%uC774%20%uBA54%uC18C%uB4DC%uB4E4%uC740%20%uC544%uB9C8%20%uC6B0%uB9AC%uC758%20%uBDF0%20%uC774%uBCA4%uD2B8%20%uD578%uB4E4%uB7EC%uC5D0%20%uC758%uD574%20%uD638%uCD9C%uB420%20%uAC83%uC774%uB2E4.%20%uC6B0%uB9AC%uB294%20%uC774%uAC83%uC744%20%uC720%uC800%20%uC778%uD130%uB809%uC158%uC758%20%uACB0%uACFC%uB77C%20%uBD80%uB97C%20%uC218%20%uC788%uB2E4.%20%uC774%20%uC561%uC158%20%uC0DD%uC131%20%uBA54%uC18C%uB4DC%uB294%20%uB610%uD55C%20%uC561%uC158%uC5D0%uAC8C%20%uD0C0%uC785%uC744%20%uCD94%uAC00%uD55C%uB2E4.%20%uADF8%uB798%uC11C%20%uC561%uC158%uC774%20%uC2A4%uD1A0%uC5B4%uC5D0%uC11C%20%uD574%uC155%uB420%20%uB54C%2C%20%uC801%uC808%uD558%uAC8C%20%uC751%uB2F5%uD560%20%uC218%20%uC788%uB3C4%uB85D%20%uD55C%uB2E4.%20%uC6B0%uB9AC%uC758%20%uC608%uC2DC%uC5D0%uC11C%uB294%20%uC774%uB7F0%20%uD0C0%uC785%uC740%20%uC544%uB9C8%20TODO_UPDATE_TEXT%uAC19%uC774%20%uC774%uB984%20%uBD99%uC5EC%uC9C8%20%uAC83%uC774%uB2E4.%0A%0A%uC561%uC158%uC740%20%uC544%uB9C8%20%uB2E4%uB978%20%uC7A5%uC18C%uB4E4%uC5D0%uC11C%20%uC62C%uB54C%uB3C4%20%uC788%uB2E4%2C%20%uC11C%uBC84%uAC19%uC740%20%uACF3%uC5D0%uC11C.%20%uC608%uB97C%uB4E4%uC5B4%2C%20%uB370%uC774%uD130%uB97C%20%uCD08%uAE30%uD654%uD558%uB294%20%uB3D9%uC548%20%uC774%uB7F0%uC77C%uC774%20%uC77C%uC5B4%uB09C%uB2E4.%20%uB610%20%uB9C8%uCC2C%uAC00%uC9C0%uB85C%20%uC11C%uBC84%uAC00%20%uC5D0%uB7EC%uCF54%uB4DC%uB97C%20%uBC18%uD658%uD560%uB54C%uB098%20%uD639%uC740%20%uC560%uD50C%uB9AC%uCF00%uC774%uC158%uC744%20%uC5C5%uB370%uC774%uD2B8%uD560%uB54C%20%uAC19%uC744%uB54C%uB3C4%20%uC77C%uC5B4%uB09C%uB2E4.%0A%0A%23%20%uB514%uC2A4%uD328%uCC98%uB97C%20%uC880%20%uB354%20%uBCF4%uBA74%2C%0A%0A%uC544%uAE4C%20%uC598%uAE30%uD588%uC9C0%uB9CC%2C%20%uB514%uC2A4%uD328%uCC98%uB294%20%uC2A4%uD1A0%uC5B4%uB4E4%20%uC0AC%uC774%uC758%20%uB514%uD39C%uB358%uC2DC%uB3C4%20%uAD00%uB9AC%uAC00%20%uAC00%uB2A5%uD558%uB2E4.%20%uC774%uB7F0%20%uAE30%uB2A5%uC740%20%uB514%uC2A4%uD328%uCC98%20%uD074%uB798%uC2A4%uC758%20waitFor%28%29%20%uBA54%uC18C%uB4DC%uB97C%20%uD1B5%uD574%20%uAC00%uB2A5%uD558%uB2E4.%20%uC6B0%uB9AC%uB294%20%uC9C0%uAE08%20%uC774%uB7F0%20%uBA54%uC18C%uB4DC%uB97C%20%uC4F8%20%uD544%uC694%uAC00%20%uC5C6%uB2E4.%20%uC65C%uB0D0%uBA74%20TodoMVC%20%uC560%uD50C%uB9AC%uCF00%uC774%uC158%uC774%20%uAD49%uC7A5%uD788%20%uB2E8%uC21C%uD558%uB2C8%uAE4C.%20%uADF8%uB7EC%uB098%20%uC774%uAC83%uC740%20%uD06C%uACE0%20%uBCF5%uC7A1%uD55C%20%uC560%uD50C%uB9AC%uCF00%uC774%uC158%uC5D0%uC120%20%uD65C%uC131%uD654%uB420%20%uAC83%uC774%uB2E4.%0A%0ATodoStore%uC758%20%uB4F1%uB85D%uB41C%20%uCF5C%uBCA1%20%uC548%uC5D0%uC11C%20%uC6B0%uB9AC%uB294%20%uBA85%uC2DC%uC801%uC73C%uB85C%20%uC9C4%uD589%uC804%uC5D0%20%uB2E4%uB978%20%uB514%uD39C%uB358%uC2DC%uB4E4%uC774%20%uBA3C%uC800%20%uC5C5%uB370%uC774%uD2B8%20%uB418%uB3C4%uB85D%20%uAE30%uB2E4%uB9B4%20%uC218%20%uC788%uB2E4.%20%0A%0A%60%60%60%0Acase%20%27TODO_CREATE%27%3A%0A%20%20Dispatcher.waitFor%28%5B%0A%20%20%20%20PrependedTextStore.dispatchToken%2C%0A%20%20%20%20YetAnotherStore.dispatchToken%0A%20%20%5D%29%3B%0A%0A%20%20TodoStore.create%28PrependedTextStore.getText%28%29%20+%20%27%20%27%20+%20action.text%29%3B%0A%20%20break%3B%0A%0A%60%60%60%0A%0A%60waitFor%28%29%60%uC740%20%uD55C%uAC00%uC9C0%20argument%uB9CC%20%uBC1B%uB294%uB2E4.%20%uADF8%20argument%uB294%20%uB514%uC2A4%uD328%uCC98%uC758%20%uCF5C%uBC31%20%uC800%uC7A5%uC18C%28%uB808%uC9C0%uC2A4%uD2B8%uB9AC%29%20%uC778%uB371%uC2A4%uB2E4.%20%uC774%uAC83%uC744%20%uC6B0%uB9AC%uB294%20dispatch%20tokens%uC774%uB77C%20%uBD80%uB978%uB2E4.%20%uC774%uC640%uAC19%uC774%20waitFor%28%29%uB97C%20%uD638%uCD9C%uD558%uB294%20%uC2A4%uD1A0%uC5B4%uB294%20%uADF8%uAC83%uC774%20%uADF8%20%uC790%uC2E0%uC758%20%uC2A4%uD14C%uC774%uD2B8%uB97C%20%uC5B4%uB5BB%uAC8C%20%uC5C5%uB370%uC774%uD2B8%20%uD574%uC57C%uD558%uB294%uC9C0%20%uC54C%uB824%uC8FC%uAE30%20%uC704%uD55C%20%uB2E4%uB978%20%uC2A4%uD1A0%uC5B4%uC758%20%uC0C1%uD0DC%uC5D0%20%uC758%uC874%uD560%20%uC218%20%uC788%uB2E4.%0A%0A%uB514%uC2A4%uD328%uCC98%20%uD1A0%uD070%uC740%20%uB514%uC2A4%uD328%uCC98%uC5D0%20%uCF5C%uBCA1%uC744%20%uB4F1%uB85D%uD560%20%uB54C%20%60register%28%29%60%uC758%20%uBC18%uD658%uAC12%uC774%uB2E4.%0A%0A%60%60%60%0APrependedTextStore.dispatchToken%20%3D%20Dispatcher.register%28function%20%28payload%29%20%7B%0A%20%20//%20...%0A%7D%29%3B%0A%0A%60%60%60%0A%60waitFor%28%29%60%uC774%uB098%20actions%2C%20action%20creators%20%uADF8%uB9AC%uACE0%20%uB514%uC2A4%uD328%uCC98%uC5D0%20%uB300%uD574%20%uB354%20%uC790%uC138%uD55C%uAC78%20%uC6D0%uD558%uBA74%20%20%5BFlux%3A%20Actions%20and%20the%20Dispatcher%5D%28http%3A//facebook.github.io/react/blog/2014/07/30/flux-actions-and-the-dispatcher.html%29%20%uB97C%20%uBCF4%uC790.&lt;/center&gt;
&lt;br /&gt;&lt;/en-note&gt;</description>
      <category>Develop</category>
      <category>facebook</category>
      <category>Flux</category>
      <category>frontend</category>
      <category>JavaScript</category>
      <category>react</category>
      <category>Web</category>
      <category>페이스북</category>
      <author>youngkyu.cho</author>
      <guid isPermaLink="true">https://youngkyu.tistory.com/38</guid>
      <comments>https://youngkyu.tistory.com/38#entry38comment</comments>
      <pubDate>Wed, 1 Jun 2016 02:28:48 +0900</pubDate>
    </item>
    <item>
      <title>안드로이드 엑티비티란?</title>
      <link>https://youngkyu.tistory.com/37</link>
      <description>&lt;en-note lang=&quot;v2&quot; style=&quot;color: #2c3f51; font-family: 'Helvetica Neue', Arial, 'Hiragino Sans GB', STHeiti, 'Microsoft YaHei', 'WenQuanYi Micro Hei', SimSun, Song, sans-serif; line-height: 1.6;&quot;&gt;&lt;del style=&quot;position:relative;display:block;z-index:10;&quot;&gt;&lt;a style=&quot;position: absolute;color: #FFF;text-decoration: none;font-size: 12px;height: 25px;border-radius: 0;margin-top: -20px;right: 15px;background: rgba(0, 0, 0, 0);border-left: 10px solid #BB3A34;border-right: 10px solid #BB3A34;border-bottom: 5px solid rgba(0, 0, 0, 0);width: 0;text-indent:-100000px;&quot; href=&quot;http://marxi.co/#/?provider=evernote_int&amp;amp;guid=c6197b0c-4c8f-4ff3-b7fa-33bd68af0928&amp;amp;notebook=youngkyu.cho&quot;&gt;Edit&lt;/a&gt;&lt;/del&gt;&lt;div style=&quot;color: #2c3f51; font-family: 'Helvetica Neue', Arial, 'Hiragino Sans GB', STHeiti, 'Microsoft YaHei', 'WenQuanYi Micro Hei', SimSun, Song, sans-serif; line-height: 1.6;&quot;&gt;
                        &lt;div style=&quot;line-height: 1.6;&quot;&gt;&lt;/div&gt;
                    &lt;div style=&quot;line-height: 1.6;&quot;&gt;

&lt;p style=&quot;margin: 0 0 1.1em; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;&lt;/p&gt;&lt;p style=&quot;margin: 0 0 1.1em; color: rgba(0,0,0,0.8); line-height: 1.6;&quot;&gt;&lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; background-color: #f9f2f4; white-space: normal; padding: 2px 5px; color: rgba(44,63,81,0.5); border-radius: 0; background: rgba(102,128,153,0.075);&quot;&gt;티스토리&lt;/code&gt; &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; background-color: #f9f2f4; white-space: normal; padding: 2px 5px; color: rgba(44,63,81,0.5); border-radius: 0; background: rgba(102,128,153,0.075);&quot;&gt;안드로이드&lt;/code&gt; &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; background-color: #f9f2f4; white-space: normal; padding: 2px 5px; color: rgba(44,63,81,0.5); border-radius: 0; background: rgba(102,128,153,0.075);&quot;&gt;android&lt;/code&gt; &lt;/p&gt;&lt;p style=&quot;margin: 0 0 1.1em; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;&lt;/p&gt;

&lt;/div&gt;
&lt;div style=&quot;line-height: 1.6;&quot;&gt;

&lt;h1 style=&quot;font-size: 2.6em; margin: 1.2em 0 .6em 0; font-family: inherit; font-weight: bold; line-height: 1.1; margin-top: 21px; margin-bottom: 10.5px; text-align: start; color: rgba(0,0,0,0.8);&quot;&gt;안드로이드 엑티비티란?&lt;/h1&gt;

&lt;blockquote style=&quot;padding: 15px 20px; margin: 0 0 1.1em; border-left: 5px solid rgba(102,128,153,0.075); border-left-width: 10px; background-color: rgba(102,128,153,0.05); border-top-right-radius: 5px; border-bottom-right-radius: 5px;&quot;&gt;
  &lt;p style=&quot;margin: 0 0 1.1em; font-size: 1em; font-weight: 300; margin-bottom: 1.1em; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;들어가기 전에.&lt;/p&gt;
  
  &lt;p style=&quot;margin: 0 0 1.1em; font-size: 1em; font-weight: 300; margin-bottom: 0; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;모든 내용은 개인적인 안드로이드 학습을 위해 정리 것이다. 공식 홈페이지인 &lt;a href=&quot;https://developer.android.com/training/basics/activity-lifecycle/starting.html&quot; target=&quot;_blank&quot; style=&quot;background: transparent; color: #1980e6; text-decoration: none;&quot;&gt;이곳&lt;/a&gt; 안드로이드 디벨로퍼 페이지를 참고했으며, 개인적으로 약간의 번역과 의역을 붙여 이해한 내용을 풀어적었다. 혹시 처음 시작하는 누군가에게 도움이 될지 몰라 올린다. 잘못된 것이 있다면 알려주기 바란다.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 1.6;&quot;&gt;

&lt;h1 style=&quot;font-size: 2.6em; margin: 1.2em 0 .6em 0; font-family: inherit; font-weight: bold; line-height: 1.1; margin-top: 21px; margin-bottom: 10.5px; text-align: start; color: rgba(0,0,0,0.8);&quot;&gt;액티비티란?&lt;/h1&gt;

&lt;blockquote style=&quot;padding: 15px 20px; margin: 0 0 1.1em; border-left: 5px solid rgba(102,128,153,0.075); border-left-width: 10px; background-color: rgba(102,128,153,0.05); border-top-right-radius: 5px; border-bottom-right-radius: 5px;&quot;&gt;
  &lt;p style=&quot;margin: 0 0 1.1em; font-size: 1em; font-weight: 300; margin-bottom: 0; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;&lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;Activities&lt;/code&gt; &lt;br /&gt;
  An activity is one of the distinguishing features of the Android framework. Activities provide the user with access to your app, and there may be many activities. An application will usually have a main activity for when the user launches the application, another activity for when she selects some content to view, for example, and other activities for when she performs other tasks within the app. See Activities for more information.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p style=&quot;margin: 0 0 1.1em; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;안드로이드 프레임워크가 제공하는 엑티비티는 사용자가 앱에 접근할 수 있도록 하며, 다양한 &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;활동(작업)&lt;/code&gt;을 할 수 있도록 하는 일종의 &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;페이지&lt;/code&gt;입니다.&lt;/p&gt;

&lt;/div&gt;
&lt;div style=&quot;line-height: 1.6;&quot;&gt;

&lt;h1 style=&quot;font-size: 2.6em; margin: 1.2em 0 .6em 0; font-family: inherit; font-weight: bold; line-height: 1.1; margin-top: 21px; margin-bottom: 10.5px; text-align: start; color: rgba(0,0,0,0.8);&quot;&gt;액티비티 시작하기&lt;/h1&gt;

&lt;p style=&quot;margin: 0 0 1.1em; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;&lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;main()&lt;/code&gt;으로 시작하는 다른 프로그래밍 패러다임과는 다르게 안드로이드는 안드로이드 프레임워크를가&lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;Avtivity&lt;/code&gt; 인스턴스들(안드로이드의 )의 라이프사이클을 관리합니다. 각 라이프사이클 stage가 바뀌는 매 순간마다, 해당 시점에 대응되는 Callback 메소드를 실행합니다.&lt;/p&gt;

&lt;/div&gt;
&lt;div style=&quot;line-height: 1.6;&quot;&gt;

&lt;p style=&quot;margin: 0 0 1.1em; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;&lt;/p&gt;&lt;p style=&quot;text-align: center; clear: none; float: none;&quot;&gt;&lt;span class=&quot;imageblock&quot; style=&quot;display: inline-block; width: 662px;  height: auto; max-width: 100%;&quot;&gt;&lt;img src=&quot;https://t1.daumcdn.net/cfile/tistory/2151A936574DC8CD0D&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Ft1.daumcdn.net%2Fcfile%2Ftistory%2F2151A936574DC8CD0D&quot; width=&quot;662&quot; height=&quot;295&quot; filename=&quot;./1464711552621.png&quot; filemime=&quot;image/png&quot;/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p style=&quot;margin: 0 0 1.1em; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;엑티비티는 라이프 타임 동안에 각 스테이지가 순차적으로 진행됩니다. 즉 각 메소드(콜백)을 순차적으로 실행하게 됩니다. 각각의 콜백 메소드가 끝난 후 액티비티의 상태는 한단계 올라갑니다. 마치 피라미드처럼. 피라미드의 최상층은 엑티비티가 전면에서 실행중이며 사용자가 상호작용할 수 있는 상태를 뜻합니다.&lt;/p&gt;&lt;p style=&quot;margin: 0 0 1.1em; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;액티비티를 사용자가 종료하게 되면 액티비티는 하향이동하는 다른 메소드를 호출합니다. 사용자가 앱을 전환하는 경우 완전히 하향하지않고 기다리기도 합니다. 이런 경우 다시 최상층으로 올라갈 수도 있습니다.&lt;/p&gt;&lt;p style=&quot;margin: 0 0 1.1em; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;엑티비티의 복잡한 정도에 따라 모든 라이프사이클 메소드를 구현할 필요가 없을 수도 있습니다. 각각의 라이프사이클을 이해하는 것은 사용자가 예상한대로 앱이 동작함을 보장하기 위해 중요합니다.&lt;/p&gt;&lt;p style=&quot;margin: 0 0 1.1em; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;&lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;onCreate()&lt;/code&gt;가 호출된 후 바로 &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;onStart()&lt;/code&gt;가, 그리고 즉시 &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;onResume()&lt;/code&gt;이 호출됩니다.  &lt;/p&gt;&lt;p style=&quot;margin: 0 0 1.1em; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;&lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;onCreate()&lt;/code&gt;메소드에서 &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;finish()&lt;/code&gt;를 호출하는 경우를 제외하고 &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;onPause()&lt;/code&gt;, &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;onStop()&lt;/code&gt;을 먼저 호출한 후에 &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;onDestroy()&lt;/code&gt;를 호출합니다. 경우에 따라 &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;onCreate()&lt;/code&gt;에서 &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;finish()&lt;/code&gt;를 호출해야하는 경우가 있는데, 에깉비티가 다른 엑티비티를 실행하기 위한 용도일 경우가 바로 그것입니다. 이 경우 시스템은 &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;onDestory()&lt;/code&gt;만을 호출합니다.&lt;/p&gt;

&lt;/div&gt;
&lt;div style=&quot;line-height: 1.6;&quot;&gt;

&lt;h1 style=&quot;font-size: 2.6em; margin: 1.2em 0 .6em 0; font-family: inherit; font-weight: bold; line-height: 1.1; margin-top: 21px; margin-bottom: 10.5px; text-align: start; color: rgba(0,0,0,0.8);&quot;&gt;엑티비티의 일시정지와 재개&lt;/h1&gt;

&lt;p style=&quot;margin: 0 0 1.1em; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;엑티비티가 일시 중지되는 경우가 있습니다. 엑티비티가 부분적으로 보이지만, 현재 포커스 되어있지 않다면 일시정지 상태입니다. 그러나 엑티비티가 완전히 사려지면, 정지상태가 됩니다.&lt;/p&gt;&lt;p style=&quot;margin: 0 0 1.1em; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;엑티비티가 일시정지 상태가 되면 &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;onPause()&lt;/code&gt;가 호출됩니다. 이런 엑티비티는 언제나 다시 포커스가 돌아올 수 있습니다. 그러나 이는 엑티비티를 떠날 것임을 이야기하는 첫번째 신호입니다. 만약 사용자가 다시 돌아온다면 &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;onResume()&lt;/code&gt;이 호출되겠지요.&lt;/p&gt;&lt;p style=&quot;margin: 0 0 1.1em; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;엑티비티는 &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;onPause()&lt;/code&gt;뒤 곧 정지 상태로 전환될 확률이 높습니다. 따라서 CPU 소비를 하는 작업, 저장되지 않은 변경 내용의 커밋, 브로드 캐스트 리시버와 같은 시스템 리소스, 각종 센서, 배터리 수명에 영향을 미치는 혹은 사용자가 필요로 하지 않는 리소스에 대한 해지를 여기서 해주어야 합니다. 카메라를 사용하는 엑티비티라면, &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;onPause()&lt;/code&gt;는 이를 해제할 수 있는 좋은 위치죠.&lt;/p&gt;&lt;p style=&quot;margin: 0 0 1.1em; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;&lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;onPause()&lt;/code&gt;작업은 다음 엑티비티로 자연스럽게 넘어가기 위해 가볍게 유지합니다. 나머지 로드가 많은 셧다운 작업은 &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;onStop()&lt;/code&gt;에서 수행합니다.&lt;/p&gt;&lt;p style=&quot;margin: 0 0 1.1em; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;&lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;onResume()&lt;/code&gt;은 사용자가 일시정지된 엑티비티를 재개할 때 호출됩니다. 엑티비티가 전면에 표시될 때 마다 이 메소드는 호출됩니다. 따라서 &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;onResume()&lt;/code&gt;때는 &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;onPause()&lt;/code&gt; 타이밍에 릴리즈한 모든 리소스를 초기화하는 작업이 포함되어야 합니다. &lt;/p&gt;&lt;p style=&quot;margin: 0 0 1.1em; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;참고로, &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;onResume()&lt;/code&gt;과 &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;onPause()&lt;/code&gt;는 보통 서로 짝을 이뤄 작동시킵니다. 한쪽은 리소스 얻기, 한쪽은 놓아주기.&lt;/p&gt;

&lt;/div&gt;
&lt;div style=&quot;line-height: 1.6;&quot;&gt;

&lt;h1 style=&quot;font-size: 2.6em; margin: 1.2em 0 .6em 0; font-family: inherit; font-weight: bold; line-height: 1.1; margin-top: 21px; margin-bottom: 10.5px; text-align: start; color: rgba(0,0,0,0.8);&quot;&gt;엑티비티 정지 및 재시작&lt;/h1&gt;

&lt;p style=&quot;margin: 0 0 1.1em; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;엑티비티를 제대로 정지하고 재시작하는 것은 중요한 프로세스입니다. 이런 프로세스가 완벽히 동작해야 앱이 항상 작동 상태를 유지하고 진행 상태를 잃지 않는다는 신뢰를 사용자에게 줄 수 있습니다. 다음과 같은 시나리오는 엑티비티가 정지되었다가 재시작되는 상황입니다.&lt;/p&gt;

&lt;ul style=&quot;margin-top: 0; margin-bottom: 1.1em; line-height: 1.6;&quot;&gt;
&lt;li style=&quot;line-height: 1.6;&quot;&gt;사용자가 최근 앱 창을 열고 다른 엑티비티로 전환하면, 현재 전면에 있는 엑티비티는 정지됩니다. 사용자가 다시 앱창으로 돌아오면, 엑티비티는 재시작됩니다.&lt;/li&gt;
&lt;li style=&quot;line-height: 1.6;&quot;&gt;사용자가 앱에서 새 엑티비티를 시작합니다. 두번째 엑티비티가 생성되면, 현 엑티비티는 정지되고, 뒤로가기를 누르면 다시 재시작됩니다.&lt;/li&gt;
&lt;li style=&quot;line-height: 1.6;&quot;&gt;사용자가 앱을 이용하는 도중 전화가 걸려 옵니다.&lt;/li&gt;
&lt;/ul&gt;

&lt;p style=&quot;margin: 0 0 1.1em; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;&lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;onStop()&lt;/code&gt;과 &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;onRestrat()&lt;/code&gt;는 정지와 재시작의 처리를 명확히 할 수 있는 메소드입니다. 부분적인 UI 차단은 &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;onPause()&lt;/code&gt;가 호출되고, UI가 화면에 보이지 않으면 &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;onStop()&lt;/code&gt;이 호출됨으로서 &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;onStop()&lt;/code&gt;때 사용자의 포커스가 별도의 엑티비티(혹은 다른 앱)에 있음을 보장합니다. 이때 사용자가 사용하지 않는 거의 모든 리소스를 해제해야합니다.&lt;/p&gt;&lt;p style=&quot;margin: 0 0 1.1em; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;엑티비티가 정지되고 나면, 시스템이 메모리를 회수 해야하는 경우, 해당 인스턴스를 소멸시킵니다. (원래는 소멸시키지 않습니다. 메모리에 보관해 둡니다.) 급한 경우 &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;onDestroy()&lt;/code&gt;를 호출하지 않고 프로세스를 Kill할 수 있습니다. 따라서 &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;onStop()&lt;/code&gt;타이밍에 메모리 누수를 야기할 수 있는 리소스는 반드시 해제해야합니다.&lt;/p&gt;&lt;p style=&quot;margin: 0 0 1.1em; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;&lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;onPause()&lt;/code&gt;때 다 하지 못한 데이터베이스에 기록하는 작업, CPU 많이 사용하는 작업등은 &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;onStop()&lt;/code&gt;타이밍에 합니다.&lt;/p&gt;&lt;p style=&quot;margin: 0 0 1.1em; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;엑티비티가 정지되면, Activity 객체는 메모리에 계속 유지되고 있다가 재개때 다시 호출됩니다. 따라서 &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;onResume()&lt;/code&gt;타이밍에 생성한 구성요소는 다시 초기화 할 필요가 없습니다. 뿐만 아니라 레이아웃에 있는 모든 &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;View&lt;/code&gt;의 상태도 함께 메모리에 유지됩니다. 따라서 저장, 복원을 따로 해줄 필요가 없습니다.&lt;/p&gt;&lt;p style=&quot;margin: 0 0 1.1em; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;엑티비티가 정지된 상태에서 다시 시작될 때 &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;onRestart()&lt;/code&gt;가 호출됩니다. 이때 &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;onStart()&lt;/code&gt;도 연달아 호출됩니다. 따라서 &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;onRestart()&lt;/code&gt;때는 특수한 복원 작업을 수행하면 좋습니다. &lt;/p&gt;&lt;p style=&quot;margin: 0 0 1.1em; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;&lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;onStop()&lt;/code&gt;때 리소스가 릴리즈 되었으나, 앱을 처음 킬 때 &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;onStart()&lt;/code&gt;가 호출되며 초기화 했듯,  &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;onRestart()&lt;/code&gt;호출 때도 &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;onStart()&lt;/code&gt;가 호출되며 다시 리소스를 가져 올 것입니다.따라서 따로 &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;onRestart()&lt;/code&gt;때 따로 코드를 넣어주지 않아도 정상 작동합니다. 여기서 중요한 것은 &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;onStop()&lt;/code&gt;과 &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;onStart()&lt;/code&gt;가 서로 짝을 이뤄 사용되어야 한다는 것입니다. &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;onStart()&lt;/code&gt;는 필요한 시스템 리소스, 기능이 제대로 구비되었는지 확인하는 가장 좋은 장소입니다.&lt;/p&gt;

&lt;/div&gt;
&lt;div style=&quot;line-height: 1.6;&quot;&gt;

&lt;h1 style=&quot;font-size: 2.6em; margin: 1.2em 0 .6em 0; font-family: inherit; font-weight: bold; line-height: 1.1; margin-top: 21px; margin-bottom: 10.5px; text-align: start; color: rgba(0,0,0,0.8);&quot;&gt;엑티비티 재생성&lt;/h1&gt;

&lt;p style=&quot;margin: 0 0 1.1em; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;정상적인 앱 동작으로도 엑티비티가 소멸되는 시나리오가 있습니다. 사용자가 뒤로를 누르거나, 엑티비티가 &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;finish()&lt;/code&gt;를 호출하여 자체적으로 소멸 신호를 보내는 경우입니다.  이 경우, Activity는 완벽히 사라집니다.&lt;/p&gt;&lt;p style=&quot;margin: 0 0 1.1em; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;엑티비티가 정지된 상태로 장시간 사용되지 않거나, 전면에 있는 엑티비티가 리소스가 더 필요해 시스템이 백그라운드 프로세스를 종료해 메모리를 회수하려는 경우에도 시스템이 엑티비티를 소멸시킬 수 있습니다. 이렇게 정상적인 앱 동작이 아닌, 시스템이 소멸시키는 경우 시스템은 Avtivity 인스턴스는 없애지만, 그것이 존재했었음은 기억합니다. 시스템이 이전 상태를 복원하기 위해 사용하는, 저장된 데이터를 &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;인스턴스 상태(instance state)&lt;/code&gt;라 하며,  이는 &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;Bundle&lt;/code&gt;객체에 저장된 키-값 쌍의 컬렉션 입니다.&lt;/p&gt;

&lt;blockquote style=&quot;padding: 15px 20px; margin: 0 0 1.1em; border-left: 5px solid rgba(102,128,153,0.075); border-left-width: 10px; background-color: rgba(102,128,153,0.05); border-top-right-radius: 5px; border-bottom-right-radius: 5px;&quot;&gt;
  &lt;p style=&quot;margin: 0 0 1.1em; font-size: 1em; font-weight: 300; margin-bottom: 0; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;참고로, 사용자가 화면을 회전할 때 마다 엑티비티는 소멸 후 재생성됩니다.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p style=&quot;margin: 0 0 1.1em; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;기본적으로 자동으로 시스템은 Bundle 인스턴스에 레이아웃 view들의 상태를 저장합니다. 따라서 별도 코드 없이도 자동으로 복원이 됩니다. ()단 이때 &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;android:id&lt;/code&gt; 애트리뷰트 값은 반드시 있어야 합니다.) 그러나 추가적으로 코드로 데이터를 직접 저장하고 핸들링 하고 싶다면 아래의 두개의 메소드를 이용합니다.&lt;/p&gt;

&lt;/div&gt;
&lt;div style=&quot;line-height: 1.6;&quot;&gt;

&lt;p style=&quot;margin: 0 0 1.1em; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;&lt;/p&gt;&lt;p style=&quot;text-align: center; clear: none; float: none;&quot;&gt;&lt;span class=&quot;imageblock&quot; style=&quot;display: inline-block; width: 469px;  height: auto; max-width: 100%;&quot;&gt;&lt;img src=&quot;https://t1.daumcdn.net/cfile/tistory/24331C35574DC8CE01&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Ft1.daumcdn.net%2Fcfile%2Ftistory%2F24331C35574DC8CE01&quot; width=&quot;469&quot; height=&quot;223&quot; filename=&quot;./1464714818812.png&quot; filemime=&quot;image/png&quot;/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;

&lt;/div&gt;
&lt;div style=&quot;line-height: 1.6;&quot;&gt;

&lt;pre style=&quot;font-family: 'Source Code Pro',monospace; white-space: pre-wrap; display: block; background-color: rgba(102,128,153,0.05); color: #333; word-wrap: break-word; font-size: .9em; background: #f6f6f6; line-height: 1.6; margin: 0 0 1.1em; padding: 0; border: 0; border-radius: 5px; text-align: start; word-break: break-all;&quot;&gt;&lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: inherit; background-color: transparent; white-space: pre-wrap; border-radius: 0; color: #f8f8f2; display: block; background: #23241f; padding: 1.3em 2em;&quot;&gt;&lt;br /&gt;&lt;span style=&quot;line-height: 1.6; color: #f92672;&quot;&gt;static&lt;/span&gt; &lt;span style=&quot;line-height: 1.6; color: #f92672;&quot;&gt;final&lt;/span&gt; String STATE_SCORE = &lt;span style=&quot;line-height: 1.6; color: #e6db74;&quot;&gt;&quot;playerScore&quot;&lt;/span&gt;;&lt;br /&gt;&lt;span style=&quot;line-height: 1.6; color: #f92672;&quot;&gt;static&lt;/span&gt; &lt;span style=&quot;line-height: 1.6; color: #f92672;&quot;&gt;final&lt;/span&gt; String STATE_LEVEL = &lt;span style=&quot;line-height: 1.6; color: #e6db74;&quot;&gt;&quot;playerLevel&quot;&lt;/span&gt;;&lt;br /&gt;...&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;line-height: 1.6;&quot;&gt;@Override&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;line-height: 1.6; color: #f92672;&quot;&gt;&lt;span style=&quot;line-height: 1.6; color: #66d9ef;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;line-height: 1.6; color: #66d9ef;&quot;&gt;void&lt;/span&gt; &lt;span style=&quot;line-height: 1.6; color: #a6e22e;&quot;&gt;onSaveInstanceState&lt;/span&gt;&lt;span style=&quot;line-height: 1.6; color: #f8f8f2;&quot;&gt;(Bundle savedInstanceState)&lt;/span&gt; &lt;/span&gt;{&lt;br /&gt;    &lt;span style=&quot;line-height: 1.6; color: #75715e;&quot;&gt;// Save the user's current game state&lt;/span&gt;&lt;br /&gt;    savedInstanceState.putInt(STATE_SCORE, mCurrentScore);&lt;br /&gt;    savedInstanceState.putInt(STATE_LEVEL, mCurrentLevel);&lt;br /&gt;&lt;br /&gt;    &lt;span style=&quot;line-height: 1.6; color: #75715e;&quot;&gt;// Always call the superclass so it can save the view hierarchy state&lt;/span&gt;&lt;br /&gt;    &lt;span style=&quot;line-height: 1.6; color: #f92672;&quot;&gt;super&lt;/span&gt;.onSaveInstanceState(savedInstanceState);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;p style=&quot;margin: 0 0 1.1em; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;&lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;onSaveInstanceState()&lt;/code&gt;를 이용해 엑티비티의 상태를 저장해 둘 수 있습니다. 이는 이후 &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;onCreate()&lt;/code&gt; 타이밍, 혹은 그 바로 다음인 &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;onRestoreInstanceState()&lt;/code&gt; 타이밍에 핸들링 할 수 있습니다. 단 &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;onRestoreInstanceState()&lt;/code&gt;는 &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;Bundle&lt;/code&gt; 객체가 있을 경우(복원할 저장 데이터가 있을 경우)에 만 실행됩니다.&lt;/p&gt;

&lt;/div&gt;
&lt;div style=&quot;line-height: 1.6;&quot;&gt;

&lt;pre style=&quot;font-family: 'Source Code Pro',monospace; white-space: pre-wrap; display: block; background-color: rgba(102,128,153,0.05); color: #333; word-wrap: break-word; font-size: .9em; background: #f6f6f6; line-height: 1.6; margin: 0 0 1.1em; padding: 0; border: 0; border-radius: 5px; text-align: start; word-break: break-all;&quot;&gt;&lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: inherit; background-color: transparent; white-space: pre-wrap; border-radius: 0; color: #f8f8f2; display: block; background: #23241f; padding: 1.3em 2em;&quot;&gt;&lt;br /&gt;&lt;span style=&quot;line-height: 1.6;&quot;&gt;@Override&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;line-height: 1.6; color: #f92672;&quot;&gt;&lt;span style=&quot;line-height: 1.6; color: #66d9ef;&quot;&gt;protected&lt;/span&gt; &lt;span style=&quot;line-height: 1.6; color: #66d9ef;&quot;&gt;void&lt;/span&gt; &lt;span style=&quot;line-height: 1.6; color: #a6e22e;&quot;&gt;onCreate&lt;/span&gt;&lt;span style=&quot;line-height: 1.6; color: #f8f8f2;&quot;&gt;(Bundle savedInstanceState)&lt;/span&gt; &lt;/span&gt;{&lt;br /&gt;    &lt;span style=&quot;line-height: 1.6; color: #f92672;&quot;&gt;super&lt;/span&gt;.onCreate(savedInstanceState); &lt;span style=&quot;line-height: 1.6; color: #75715e;&quot;&gt;// Always call the superclass first&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;    &lt;span style=&quot;line-height: 1.6; color: #75715e;&quot;&gt;// Check whether we're recreating a previously destroyed instance&lt;/span&gt;&lt;br /&gt;    &lt;span style=&quot;line-height: 1.6; color: #f92672;&quot;&gt;if&lt;/span&gt; (savedInstanceState != &lt;span style=&quot;line-height: 1.6; color: #f92672;&quot;&gt;null&lt;/span&gt;) {&lt;br /&gt;        &lt;span style=&quot;line-height: 1.6; color: #75715e;&quot;&gt;// Restore value of members from saved state&lt;/span&gt;&lt;br /&gt;        mCurrentScore = savedInstanceState.getInt(STATE_SCORE);&lt;br /&gt;        mCurrentLevel = savedInstanceState.getInt(STATE_LEVEL);&lt;br /&gt;    } &lt;span style=&quot;line-height: 1.6; color: #f92672;&quot;&gt;else&lt;/span&gt; {&lt;br /&gt;        &lt;span style=&quot;line-height: 1.6; color: #75715e;&quot;&gt;// Probably initialize members with default values for a new instance&lt;/span&gt;&lt;br /&gt;    }&lt;br /&gt;    ...&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;p style=&quot;margin: 0 0 1.1em; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;&lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;onCreate()&lt;/code&gt;때 핸들링 하기 위해서는 반드시 &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;Bundle&lt;/code&gt;객체가 &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;null&lt;/code&gt;인지 확인하여야 합니다. 그러나 이후 실행되는 &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;onRestoreInstanceState()&lt;/code&gt;는 &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;Bundle&lt;/code&gt;객체가 없으면 실행되지 않기에 &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;null&lt;/code&gt;값에 대한 처리를 해주지 않아도 됩니다.&lt;/p&gt;

&lt;/div&gt;
&lt;div style=&quot;line-height: 1.6;&quot;&gt;

&lt;pre style=&quot;font-family: 'Source Code Pro',monospace; white-space: pre-wrap; display: block; background-color: rgba(102,128,153,0.05); color: #333; word-wrap: break-word; font-size: .9em; background: #f6f6f6; line-height: 1.6; margin: 0 0 1.1em; padding: 0; border: 0; border-radius: 5px; text-align: start; word-break: break-all;&quot;&gt;&lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: inherit; background-color: transparent; white-space: pre-wrap; border-radius: 0; color: #f8f8f2; display: block; background: #23241f; padding: 1.3em 2em;&quot;&gt;&lt;span style=&quot;line-height: 1.6; color: #f92672;&quot;&gt;&lt;span style=&quot;line-height: 1.6; color: #66d9ef;&quot;&gt;public&lt;/span&gt; &lt;span style=&quot;line-height: 1.6; color: #66d9ef;&quot;&gt;void&lt;/span&gt; &lt;span style=&quot;line-height: 1.6; color: #a6e22e;&quot;&gt;onRestoreInstanceState&lt;/span&gt;&lt;span style=&quot;line-height: 1.6; color: #f8f8f2;&quot;&gt;(Bundle savedInstanceState)&lt;/span&gt; &lt;/span&gt;{&lt;br /&gt;    &lt;span style=&quot;line-height: 1.6; color: #75715e;&quot;&gt;// Always call the superclass so it can restore the view hierarchy&lt;/span&gt;&lt;br /&gt;    &lt;span style=&quot;line-height: 1.6; color: #f92672;&quot;&gt;super&lt;/span&gt;.onRestoreInstanceState(savedInstanceState);&lt;br /&gt;&lt;br /&gt;    &lt;span style=&quot;line-height: 1.6; color: #75715e;&quot;&gt;// Restore state members from saved instance&lt;/span&gt;&lt;br /&gt;    mCurrentScore = savedInstanceState.getInt(STATE_SCORE);&lt;br /&gt;    mCurrentLevel = savedInstanceState.getInt(STATE_LEVEL);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 1.6;&quot;&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;center style=&quot;display:none&quot;&gt;@%5B%uD2F0%uC2A4%uD1A0%uB9AC%2C%uC548%uB4DC%uB85C%uC774%uB4DC%2Candroid%5D%0A%0A%23%20%uC548%uB4DC%uB85C%uC774%uB4DC%20%uC5D1%uD2F0%uBE44%uD2F0%uB780%3F%0A%0A%3E%20%uB4E4%uC5B4%uAC00%uAE30%20%uC804%uC5D0.%0A%3E%0A%3E%uBAA8%uB4E0%20%uB0B4%uC6A9%uC740%20%uAC1C%uC778%uC801%uC778%20%uC548%uB4DC%uB85C%uC774%uB4DC%20%uD559%uC2B5%uC744%20%uC704%uD574%20%uC815%uB9AC%20%uAC83%uC774%uB2E4.%20%uACF5%uC2DD%20%uD648%uD398%uC774%uC9C0%uC778%20%5B%uC774%uACF3%5D%28https%3A//developer.android.com/training/basics/activity-lifecycle/starting.html%29%20%uC548%uB4DC%uB85C%uC774%uB4DC%20%uB514%uBCA8%uB85C%uD37C%20%uD398%uC774%uC9C0%uB97C%20%uCC38%uACE0%uD588%uC73C%uBA70%2C%20%uAC1C%uC778%uC801%uC73C%uB85C%20%uC57D%uAC04%uC758%20%uBC88%uC5ED%uACFC%20%uC758%uC5ED%uC744%20%uBD99%uC5EC%20%uC774%uD574%uD55C%20%uB0B4%uC6A9%uC744%20%uD480%uC5B4%uC801%uC5C8%uB2E4.%20%uD639%uC2DC%20%uCC98%uC74C%20%uC2DC%uC791%uD558%uB294%20%uB204%uAD70%uAC00%uC5D0%uAC8C%20%uB3C4%uC6C0%uC774%20%uB420%uC9C0%20%uBAB0%uB77C%20%uC62C%uB9B0%uB2E4.%20%uC798%uBABB%uB41C%20%uAC83%uC774%20%uC788%uB2E4%uBA74%20%uC54C%uB824%uC8FC%uAE30%20%uBC14%uB780%uB2E4.%0A%0A%0A%23%20%uC561%uD2F0%uBE44%uD2F0%3F%0A%0A%3E%20%60Activities%60%0AAn%20activity%20is%20one%20of%20the%20distinguishing%20features%20of%20the%20Android%20framework.%20Activities%20provide%20the%20user%20with%20access%20to%20your%20app%2C%20and%20there%20may%20be%20many%20activities.%20An%20application%20will%20usually%20have%20a%20main%20activity%20for%20when%20the%20user%20launches%20the%20application%2C%20another%20activity%20for%20when%20she%20selects%20some%20content%20to%20view%2C%20for%20example%2C%20and%20other%20activities%20for%20when%20she%20performs%20other%20tasks%20within%20the%20app.%20See%20Activities%20for%20more%20information.%0A%0A%uC548%uB4DC%uB85C%uC774%uB4DC%20%uD504%uB808%uC784%uC6CC%uD06C%uAC00%20%uC81C%uACF5%uD558%uB294%20%uC5D1%uD2F0%uBE44%uD2F0%uB294%20%uC0AC%uC6A9%uC790%uAC00%20%uC571%uC5D0%20%uC811%uADFC%uD560%20%uC218%20%uC788%uB3C4%uB85D%20%uD558%uBA70%2C%20%uB2E4%uC591%uD55C%20%60%uD65C%uB3D9%28%uC791%uC5C5%29%60%uC744%20%uD560%20%uC218%20%uC788%uB3C4%uB85D%20%uD558%uB294%20%uC77C%uC885%uC758%20%60%uD398%uC774%uC9C0%60%uC785%uB2C8%uB2E4.%0A%0A%23%20%uC561%uD2F0%uBE44%uD2F0%20%uC2DC%uC791%uD558%uAE30%0A%0A%60main%28%29%60%uC73C%uB85C%20%uC2DC%uC791%uD558%uB294%20%uB2E4%uB978%20%uD504%uB85C%uADF8%uB798%uBC0D%20%uD328%uB7EC%uB2E4%uC784%uACFC%uB294%20%uB2E4%uB974%uAC8C%20%uC548%uB4DC%uB85C%uC774%uB4DC%uB294%20%uC548%uB4DC%uB85C%uC774%uB4DC%20%uD504%uB808%uC784%uC6CC%uD06C%uB97C%uAC00%60Avtivity%60%20%uC778%uC2A4%uD134%uC2A4%uB4E4%28%uC548%uB4DC%uB85C%uC774%uB4DC%uC758%20%29%uC758%20%uB77C%uC774%uD504%uC0AC%uC774%uD074%uC744%20%uAD00%uB9AC%uD569%uB2C8%uB2E4.%20%uAC01%20%uB77C%uC774%uD504%uC0AC%uC774%uD074%20stage%uAC00%20%uBC14%uB00C%uB294%20%uB9E4%20%uC21C%uAC04%uB9C8%uB2E4%2C%20%uD574%uB2F9%20%uC2DC%uC810%uC5D0%20%uB300%uC751%uB418%uB294%20Callback%20%uBA54%uC18C%uB4DC%uB97C%20%uC2E4%uD589%uD569%uB2C8%uB2E4.%0A%0A%21%5BAlt%20text%5D%28./1464711552621.png%29%0A%0A%uC5D1%uD2F0%uBE44%uD2F0%uB294%20%uB77C%uC774%uD504%20%uD0C0%uC784%20%uB3D9%uC548%uC5D0%20%uAC01%20%uC2A4%uD14C%uC774%uC9C0%uAC00%20%uC21C%uCC28%uC801%uC73C%uB85C%20%uC9C4%uD589%uB429%uB2C8%uB2E4.%20%uC989%20%uAC01%20%uBA54%uC18C%uB4DC%28%uCF5C%uBC31%29%uC744%20%uC21C%uCC28%uC801%uC73C%uB85C%20%uC2E4%uD589%uD558%uAC8C%20%uB429%uB2C8%uB2E4.%20%uAC01%uAC01%uC758%20%uCF5C%uBC31%20%uBA54%uC18C%uB4DC%uAC00%20%uB05D%uB09C%20%uD6C4%20%uC561%uD2F0%uBE44%uD2F0%uC758%20%uC0C1%uD0DC%uB294%20%uD55C%uB2E8%uACC4%20%uC62C%uB77C%uAC11%uB2C8%uB2E4.%20%uB9C8%uCE58%20%uD53C%uB77C%uBBF8%uB4DC%uCC98%uB7FC.%20%uD53C%uB77C%uBBF8%uB4DC%uC758%20%uCD5C%uC0C1%uCE35%uC740%20%uC5D1%uD2F0%uBE44%uD2F0%uAC00%20%uC804%uBA74%uC5D0%uC11C%20%uC2E4%uD589%uC911%uC774%uBA70%20%uC0AC%uC6A9%uC790%uAC00%20%uC0C1%uD638%uC791%uC6A9%uD560%20%uC218%20%uC788%uB294%20%uC0C1%uD0DC%uB97C%20%uB73B%uD569%uB2C8%uB2E4.%0A%0A%uC561%uD2F0%uBE44%uD2F0%uB97C%20%uC0AC%uC6A9%uC790%uAC00%20%uC885%uB8CC%uD558%uAC8C%20%uB418%uBA74%20%uC561%uD2F0%uBE44%uD2F0%uB294%20%uD558%uD5A5%uC774%uB3D9%uD558%uB294%20%uB2E4%uB978%20%uBA54%uC18C%uB4DC%uB97C%20%uD638%uCD9C%uD569%uB2C8%uB2E4.%20%uC0AC%uC6A9%uC790%uAC00%20%uC571%uC744%20%uC804%uD658%uD558%uB294%20%uACBD%uC6B0%20%uC644%uC804%uD788%20%uD558%uD5A5%uD558%uC9C0%uC54A%uACE0%20%uAE30%uB2E4%uB9AC%uAE30%uB3C4%20%uD569%uB2C8%uB2E4.%20%uC774%uB7F0%20%uACBD%uC6B0%20%uB2E4%uC2DC%20%uCD5C%uC0C1%uCE35%uC73C%uB85C%20%uC62C%uB77C%uAC08%20%uC218%uB3C4%20%uC788%uC2B5%uB2C8%uB2E4.%0A%0A%uC5D1%uD2F0%uBE44%uD2F0%uC758%20%uBCF5%uC7A1%uD55C%20%uC815%uB3C4%uC5D0%20%uB530%uB77C%20%uBAA8%uB4E0%20%uB77C%uC774%uD504%uC0AC%uC774%uD074%20%uBA54%uC18C%uB4DC%uB97C%20%uAD6C%uD604%uD560%20%uD544%uC694%uAC00%20%uC5C6%uC744%20%uC218%uB3C4%20%uC788%uC2B5%uB2C8%uB2E4.%20%uAC01%uAC01%uC758%20%uB77C%uC774%uD504%uC0AC%uC774%uD074%uC744%20%uC774%uD574%uD558%uB294%20%uAC83%uC740%20%uC0AC%uC6A9%uC790%uAC00%20%uC608%uC0C1%uD55C%uB300%uB85C%20%uC571%uC774%20%uB3D9%uC791%uD568%uC744%20%uBCF4%uC7A5%uD558%uAE30%20%uC704%uD574%20%uC911%uC694%uD569%uB2C8%uB2E4.%0A%0A%60onCreate%28%29%60%uAC00%20%uD638%uCD9C%uB41C%20%uD6C4%20%uBC14%uB85C%20%60onStart%28%29%60%uAC00%2C%20%uADF8%uB9AC%uACE0%20%uC989%uC2DC%20%60onResume%28%29%60%uC774%20%uD638%uCD9C%uB429%uB2C8%uB2E4.%20%20%0A%0A%60onCreate%28%29%60%uBA54%uC18C%uB4DC%uC5D0%uC11C%20%60finish%28%29%60%uB97C%20%uD638%uCD9C%uD558%uB294%20%uACBD%uC6B0%uB97C%20%uC81C%uC678%uD558%uACE0%20%60onPause%28%29%60%2C%20%60onStop%28%29%60%uC744%20%uBA3C%uC800%20%uD638%uCD9C%uD55C%20%uD6C4%uC5D0%20%60onDestroy%28%29%60%uB97C%20%uD638%uCD9C%uD569%uB2C8%uB2E4.%20%uACBD%uC6B0%uC5D0%20%uB530%uB77C%20%60onCreate%28%29%60%uC5D0%uC11C%20%60finish%28%29%60%uB97C%20%uD638%uCD9C%uD574%uC57C%uD558%uB294%20%uACBD%uC6B0%uAC00%20%uC788%uB294%uB370%2C%20%uC5D0%uAE49%uBE44%uD2F0%uAC00%20%uB2E4%uB978%20%uC5D1%uD2F0%uBE44%uD2F0%uB97C%20%uC2E4%uD589%uD558%uAE30%20%uC704%uD55C%20%uC6A9%uB3C4%uC77C%20%uACBD%uC6B0%uAC00%20%uBC14%uB85C%20%uADF8%uAC83%uC785%uB2C8%uB2E4.%20%uC774%20%uACBD%uC6B0%20%uC2DC%uC2A4%uD15C%uC740%20%60onDestory%28%29%60%uB9CC%uC744%20%uD638%uCD9C%uD569%uB2C8%uB2E4.%0A%0A%23%20%uC5D1%uD2F0%uBE44%uD2F0%uC758%20%uC77C%uC2DC%uC815%uC9C0%uC640%20%uC7AC%uAC1C%0A%0A%uC5D1%uD2F0%uBE44%uD2F0%uAC00%20%uC77C%uC2DC%20%uC911%uC9C0%uB418%uB294%20%uACBD%uC6B0%uAC00%20%uC788%uC2B5%uB2C8%uB2E4.%20%uC5D1%uD2F0%uBE44%uD2F0%uAC00%20%uBD80%uBD84%uC801%uC73C%uB85C%20%uBCF4%uC774%uC9C0%uB9CC%2C%20%uD604%uC7AC%20%uD3EC%uCEE4%uC2A4%20%uB418%uC5B4%uC788%uC9C0%20%uC54A%uB2E4%uBA74%20%uC77C%uC2DC%uC815%uC9C0%20%uC0C1%uD0DC%uC785%uB2C8%uB2E4.%20%uADF8%uB7EC%uB098%20%uC5D1%uD2F0%uBE44%uD2F0%uAC00%20%uC644%uC804%uD788%20%uC0AC%uB824%uC9C0%uBA74%2C%20%uC815%uC9C0%uC0C1%uD0DC%uAC00%20%uB429%uB2C8%uB2E4.%0A%0A%uC5D1%uD2F0%uBE44%uD2F0%uAC00%20%uC77C%uC2DC%uC815%uC9C0%20%uC0C1%uD0DC%uAC00%20%uB418%uBA74%20%60onPause%28%29%60%uAC00%20%uD638%uCD9C%uB429%uB2C8%uB2E4.%20%uC774%uB7F0%20%uC5D1%uD2F0%uBE44%uD2F0%uB294%20%uC5B8%uC81C%uB098%20%uB2E4%uC2DC%20%uD3EC%uCEE4%uC2A4%uAC00%20%uB3CC%uC544%uC62C%20%uC218%20%uC788%uC2B5%uB2C8%uB2E4.%20%uADF8%uB7EC%uB098%20%uC774%uB294%20%uC5D1%uD2F0%uBE44%uD2F0%uB97C%20%uB5A0%uB0A0%20%uAC83%uC784%uC744%20%uC774%uC57C%uAE30%uD558%uB294%20%uCCAB%uBC88%uC9F8%20%uC2E0%uD638%uC785%uB2C8%uB2E4.%20%uB9CC%uC57D%20%uC0AC%uC6A9%uC790%uAC00%20%uB2E4%uC2DC%20%uB3CC%uC544%uC628%uB2E4%uBA74%20%60onResume%28%29%60%uC774%20%uD638%uCD9C%uB418%uACA0%uC9C0%uC694.%0A%0A%0A%uC5D1%uD2F0%uBE44%uD2F0%uB294%20%60onPause%28%29%60%uB4A4%20%uACE7%20%uC815%uC9C0%20%uC0C1%uD0DC%uB85C%20%uC804%uD658%uB420%20%uD655%uB960%uC774%20%uB192%uC2B5%uB2C8%uB2E4.%20%uB530%uB77C%uC11C%20CPU%20%uC18C%uBE44%uB97C%20%uD558%uB294%20%uC791%uC5C5%2C%20%uC800%uC7A5%uB418%uC9C0%20%uC54A%uC740%20%uBCC0%uACBD%20%uB0B4%uC6A9%uC758%20%uCEE4%uBC0B%2C%20%uBE0C%uB85C%uB4DC%20%uCE90%uC2A4%uD2B8%20%uB9AC%uC2DC%uBC84%uC640%20%uAC19%uC740%20%uC2DC%uC2A4%uD15C%20%uB9AC%uC18C%uC2A4%2C%20%uAC01%uC885%20%uC13C%uC11C%2C%20%uBC30%uD130%uB9AC%20%uC218%uBA85%uC5D0%20%uC601%uD5A5%uC744%20%uBBF8%uCE58%uB294%20%uD639%uC740%20%uC0AC%uC6A9%uC790%uAC00%20%uD544%uC694%uB85C%20%uD558%uC9C0%20%uC54A%uB294%20%uB9AC%uC18C%uC2A4%uC5D0%20%uB300%uD55C%20%uD574%uC9C0%uB97C%20%uC5EC%uAE30%uC11C%20%uD574%uC8FC%uC5B4%uC57C%20%uD569%uB2C8%uB2E4.%20%uCE74%uBA54%uB77C%uB97C%20%uC0AC%uC6A9%uD558%uB294%20%uC5D1%uD2F0%uBE44%uD2F0%uB77C%uBA74%2C%20%60onPause%28%29%60%uB294%20%uC774%uB97C%20%uD574%uC81C%uD560%20%uC218%20%uC788%uB294%20%uC88B%uC740%20%uC704%uCE58%uC8E0.%0A%0A%60onPause%28%29%60%uC791%uC5C5%uC740%20%uB2E4%uC74C%20%uC5D1%uD2F0%uBE44%uD2F0%uB85C%20%uC790%uC5F0%uC2A4%uB7FD%uAC8C%20%uB118%uC5B4%uAC00%uAE30%20%uC704%uD574%20%uAC00%uBCCD%uAC8C%20%uC720%uC9C0%uD569%uB2C8%uB2E4.%20%uB098%uBA38%uC9C0%20%uB85C%uB4DC%uAC00%20%uB9CE%uC740%20%uC167%uB2E4%uC6B4%20%uC791%uC5C5%uC740%20%60onStop%28%29%60%uC5D0%uC11C%20%uC218%uD589%uD569%uB2C8%uB2E4.%0A%0A%60onResume%28%29%60%uC740%20%uC0AC%uC6A9%uC790%uAC00%20%uC77C%uC2DC%uC815%uC9C0%uB41C%20%uC5D1%uD2F0%uBE44%uD2F0%uB97C%20%uC7AC%uAC1C%uD560%20%uB54C%20%uD638%uCD9C%uB429%uB2C8%uB2E4.%20%uC5D1%uD2F0%uBE44%uD2F0%uAC00%20%uC804%uBA74%uC5D0%20%uD45C%uC2DC%uB420%20%uB54C%20%uB9C8%uB2E4%20%uC774%20%uBA54%uC18C%uB4DC%uB294%20%uD638%uCD9C%uB429%uB2C8%uB2E4.%20%uB530%uB77C%uC11C%20%60onResume%28%29%60%uB54C%uB294%20%60onPause%28%29%60%20%uD0C0%uC774%uBC0D%uC5D0%20%uB9B4%uB9AC%uC988%uD55C%20%uBAA8%uB4E0%20%uB9AC%uC18C%uC2A4%uB97C%20%uCD08%uAE30%uD654%uD558%uB294%20%uC791%uC5C5%uC774%20%uD3EC%uD568%uB418%uC5B4%uC57C%20%uD569%uB2C8%uB2E4.%20%0A%0A%uCC38%uACE0%uB85C%2C%20%60onResume%28%29%60%uACFC%20%60onPause%28%29%60%uB294%20%uBCF4%uD1B5%20%uC11C%uB85C%20%uC9DD%uC744%20%uC774%uB904%20%uC791%uB3D9%uC2DC%uD0B5%uB2C8%uB2E4.%20%uD55C%uCABD%uC740%20%uB9AC%uC18C%uC2A4%20%uC5BB%uAE30%2C%20%uD55C%uCABD%uC740%20%uB193%uC544%uC8FC%uAE30.%0A%0A%23%20%uC5D1%uD2F0%uBE44%uD2F0%20%uC815%uC9C0%20%uBC0F%20%uC7AC%uC2DC%uC791%0A%0A%uC5D1%uD2F0%uBE44%uD2F0%uB97C%20%uC81C%uB300%uB85C%20%uC815%uC9C0%uD558%uACE0%20%uC7AC%uC2DC%uC791%uD558%uB294%20%uAC83%uC740%20%uC911%uC694%uD55C%20%uD504%uB85C%uC138%uC2A4%uC785%uB2C8%uB2E4.%20%uC774%uB7F0%20%uD504%uB85C%uC138%uC2A4%uAC00%20%uC644%uBCBD%uD788%20%uB3D9%uC791%uD574%uC57C%20%uC571%uC774%20%uD56D%uC0C1%20%uC791%uB3D9%20%uC0C1%uD0DC%uB97C%20%uC720%uC9C0%uD558%uACE0%20%uC9C4%uD589%20%uC0C1%uD0DC%uB97C%20%uC783%uC9C0%20%uC54A%uB294%uB2E4%uB294%20%uC2E0%uB8B0%uB97C%20%uC0AC%uC6A9%uC790%uC5D0%uAC8C%20%uC904%20%uC218%20%uC788%uC2B5%uB2C8%uB2E4.%20%uB2E4%uC74C%uACFC%20%uAC19%uC740%20%uC2DC%uB098%uB9AC%uC624%uB294%20%uC5D1%uD2F0%uBE44%uD2F0%uAC00%20%uC815%uC9C0%uB418%uC5C8%uB2E4%uAC00%20%uC7AC%uC2DC%uC791%uB418%uB294%20%uC0C1%uD669%uC785%uB2C8%uB2E4.%0A%0A-%20%uC0AC%uC6A9%uC790%uAC00%20%uCD5C%uADFC%20%uC571%20%uCC3D%uC744%20%uC5F4%uACE0%20%uB2E4%uB978%20%uC5D1%uD2F0%uBE44%uD2F0%uB85C%20%uC804%uD658%uD558%uBA74%2C%20%uD604%uC7AC%20%uC804%uBA74%uC5D0%20%uC788%uB294%20%uC5D1%uD2F0%uBE44%uD2F0%uB294%20%uC815%uC9C0%uB429%uB2C8%uB2E4.%20%uC0AC%uC6A9%uC790%uAC00%20%uB2E4%uC2DC%20%uC571%uCC3D%uC73C%uB85C%20%uB3CC%uC544%uC624%uBA74%2C%20%uC5D1%uD2F0%uBE44%uD2F0%uB294%20%uC7AC%uC2DC%uC791%uB429%uB2C8%uB2E4.%0A-%20%uC0AC%uC6A9%uC790%uAC00%20%uC571%uC5D0%uC11C%20%uC0C8%20%uC5D1%uD2F0%uBE44%uD2F0%uB97C%20%uC2DC%uC791%uD569%uB2C8%uB2E4.%20%uB450%uBC88%uC9F8%20%uC5D1%uD2F0%uBE44%uD2F0%uAC00%20%uC0DD%uC131%uB418%uBA74%2C%20%uD604%20%uC5D1%uD2F0%uBE44%uD2F0%uB294%20%uC815%uC9C0%uB418%uACE0%2C%20%uB4A4%uB85C%uAC00%uAE30%uB97C%20%uB204%uB974%uBA74%20%uB2E4%uC2DC%20%uC7AC%uC2DC%uC791%uB429%uB2C8%uB2E4.%0A-%20%uC0AC%uC6A9%uC790%uAC00%20%uC571%uC744%20%uC774%uC6A9%uD558%uB294%20%uB3C4%uC911%20%uC804%uD654%uAC00%20%uAC78%uB824%20%uC635%uB2C8%uB2E4.%0A%0A%60onStop%28%29%60%uACFC%20%60onRestrat%28%29%60%uB294%20%uC815%uC9C0%uC640%20%uC7AC%uC2DC%uC791%uC758%20%uCC98%uB9AC%uB97C%20%uBA85%uD655%uD788%20%uD560%20%uC218%20%uC788%uB294%20%uBA54%uC18C%uB4DC%uC785%uB2C8%uB2E4.%20%uBD80%uBD84%uC801%uC778%20UI%20%uCC28%uB2E8%uC740%20%60onPause%28%29%60%uAC00%20%uD638%uCD9C%uB418%uACE0%2C%20UI%uAC00%20%uD654%uBA74%uC5D0%20%uBCF4%uC774%uC9C0%20%uC54A%uC73C%uBA74%20%60onStop%28%29%60%uC774%20%uD638%uCD9C%uB428%uC73C%uB85C%uC11C%20%60onStop%28%29%60%uB54C%20%uC0AC%uC6A9%uC790%uC758%20%uD3EC%uCEE4%uC2A4%uAC00%20%uBCC4%uB3C4%uC758%20%uC5D1%uD2F0%uBE44%uD2F0%28%uD639%uC740%20%uB2E4%uB978%20%uC571%29%uC5D0%20%uC788%uC74C%uC744%20%uBCF4%uC7A5%uD569%uB2C8%uB2E4.%20%uC774%uB54C%20%uC0AC%uC6A9%uC790%uAC00%20%uC0AC%uC6A9%uD558%uC9C0%20%uC54A%uB294%20%uAC70%uC758%20%uBAA8%uB4E0%20%uB9AC%uC18C%uC2A4%uB97C%20%uD574%uC81C%uD574%uC57C%uD569%uB2C8%uB2E4.%0A%0A%uC5D1%uD2F0%uBE44%uD2F0%uAC00%20%uC815%uC9C0%uB418%uACE0%20%uB098%uBA74%2C%20%uC2DC%uC2A4%uD15C%uC774%20%uBA54%uBAA8%uB9AC%uB97C%20%uD68C%uC218%20%uD574%uC57C%uD558%uB294%20%uACBD%uC6B0%2C%20%uD574%uB2F9%20%uC778%uC2A4%uD134%uC2A4%uB97C%20%uC18C%uBA78%uC2DC%uD0B5%uB2C8%uB2E4.%20%28%uC6D0%uB798%uB294%20%uC18C%uBA78%uC2DC%uD0A4%uC9C0%20%uC54A%uC2B5%uB2C8%uB2E4.%20%uBA54%uBAA8%uB9AC%uC5D0%20%uBCF4%uAD00%uD574%20%uB461%uB2C8%uB2E4.%29%20%uAE09%uD55C%20%uACBD%uC6B0%20%60onDestroy%28%29%60%uB97C%20%uD638%uCD9C%uD558%uC9C0%20%uC54A%uACE0%20%uD504%uB85C%uC138%uC2A4%uB97C%20Kill%uD560%20%uC218%20%uC788%uC2B5%uB2C8%uB2E4.%20%uB530%uB77C%uC11C%20%60onStop%28%29%60%uD0C0%uC774%uBC0D%uC5D0%20%uBA54%uBAA8%uB9AC%20%uB204%uC218%uB97C%20%uC57C%uAE30%uD560%20%uC218%20%uC788%uB294%20%uB9AC%uC18C%uC2A4%uB294%20%uBC18%uB4DC%uC2DC%20%uD574%uC81C%uD574%uC57C%uD569%uB2C8%uB2E4.%0A%0A%60onPause%28%29%60%uB54C%20%uB2E4%20%uD558%uC9C0%20%uBABB%uD55C%20%uB370%uC774%uD130%uBCA0%uC774%uC2A4%uC5D0%20%uAE30%uB85D%uD558%uB294%20%uC791%uC5C5%2C%20CPU%20%uB9CE%uC774%20%uC0AC%uC6A9%uD558%uB294%20%uC791%uC5C5%uB4F1%uC740%20%60onStop%28%29%60%uD0C0%uC774%uBC0D%uC5D0%20%uD569%uB2C8%uB2E4.%0A%0A%uC5D1%uD2F0%uBE44%uD2F0%uAC00%20%uC815%uC9C0%uB418%uBA74%2C%20Activity%20%uAC1D%uCCB4%uB294%20%uBA54%uBAA8%uB9AC%uC5D0%20%uACC4%uC18D%20%uC720%uC9C0%uB418%uACE0%20%uC788%uB2E4%uAC00%20%uC7AC%uAC1C%uB54C%20%uB2E4%uC2DC%20%uD638%uCD9C%uB429%uB2C8%uB2E4.%20%uB530%uB77C%uC11C%20%60onResume%28%29%60%uD0C0%uC774%uBC0D%uC5D0%20%uC0DD%uC131%uD55C%20%uAD6C%uC131%uC694%uC18C%uB294%20%uB2E4%uC2DC%20%uCD08%uAE30%uD654%20%uD560%20%uD544%uC694%uAC00%20%uC5C6%uC2B5%uB2C8%uB2E4.%20%uBFD0%uB9CC%20%uC544%uB2C8%uB77C%20%uB808%uC774%uC544%uC6C3%uC5D0%20%uC788%uB294%20%uBAA8%uB4E0%20%60View%60%uC758%20%uC0C1%uD0DC%uB3C4%20%uD568%uAED8%20%uBA54%uBAA8%uB9AC%uC5D0%20%uC720%uC9C0%uB429%uB2C8%uB2E4.%20%uB530%uB77C%uC11C%20%uC800%uC7A5%2C%20%uBCF5%uC6D0%uC744%20%uB530%uB85C%20%uD574%uC904%20%uD544%uC694%uAC00%20%uC5C6%uC2B5%uB2C8%uB2E4.%0A%0A%uC5D1%uD2F0%uBE44%uD2F0%uAC00%20%uC815%uC9C0%uB41C%20%uC0C1%uD0DC%uC5D0%uC11C%20%uB2E4%uC2DC%20%uC2DC%uC791%uB420%20%uB54C%20%60onRestart%28%29%60%uAC00%20%uD638%uCD9C%uB429%uB2C8%uB2E4.%20%uC774%uB54C%20%60onStart%28%29%60%uB3C4%20%uC5F0%uB2EC%uC544%20%uD638%uCD9C%uB429%uB2C8%uB2E4.%20%uB530%uB77C%uC11C%20%60onRestart%28%29%60%uB54C%uB294%20%uD2B9%uC218%uD55C%20%uBCF5%uC6D0%20%uC791%uC5C5%uC744%20%uC218%uD589%uD558%uBA74%20%uC88B%uC2B5%uB2C8%uB2E4.%20%0A%0A%60onStop%28%29%60%uB54C%20%uB9AC%uC18C%uC2A4%uAC00%20%uB9B4%uB9AC%uC988%20%uB418%uC5C8%uC73C%uB098%2C%20%uC571%uC744%20%uCC98%uC74C%20%uD0AC%20%uB54C%20%60onStart%28%29%60%uAC00%20%uD638%uCD9C%uB418%uBA70%20%uCD08%uAE30%uD654%20%uD588%uB4EF%2C%20%20%60onRestart%28%29%60%uD638%uCD9C%20%uB54C%uB3C4%20%60onStart%28%29%60%uAC00%20%uD638%uCD9C%uB418%uBA70%20%uB2E4%uC2DC%20%uB9AC%uC18C%uC2A4%uB97C%20%uAC00%uC838%20%uC62C%20%uAC83%uC785%uB2C8%uB2E4.%uB530%uB77C%uC11C%20%uB530%uB85C%20%60onRestart%28%29%60%uB54C%20%uB530%uB85C%20%uCF54%uB4DC%uB97C%20%uB123%uC5B4%uC8FC%uC9C0%20%uC54A%uC544%uB3C4%20%uC815%uC0C1%20%uC791%uB3D9%uD569%uB2C8%uB2E4.%20%uC5EC%uAE30%uC11C%20%uC911%uC694%uD55C%20%uAC83%uC740%20%60onStop%28%29%60%uACFC%20%60onStart%28%29%60%uAC00%20%uC11C%uB85C%20%uC9DD%uC744%20%uC774%uB904%20%uC0AC%uC6A9%uB418%uC5B4%uC57C%20%uD55C%uB2E4%uB294%20%uAC83%uC785%uB2C8%uB2E4.%20%60onStart%28%29%60%uB294%20%uD544%uC694%uD55C%20%uC2DC%uC2A4%uD15C%20%uB9AC%uC18C%uC2A4%2C%20%uAE30%uB2A5%uC774%20%uC81C%uB300%uB85C%20%uAD6C%uBE44%uB418%uC5C8%uB294%uC9C0%20%uD655%uC778%uD558%uB294%20%uAC00%uC7A5%20%uC88B%uC740%20%uC7A5%uC18C%uC785%uB2C8%uB2E4.%0A%0A%23%20%uC5D1%uD2F0%uBE44%uD2F0%20%uC7AC%uC0DD%uC131%0A%0A%uC815%uC0C1%uC801%uC778%20%uC571%20%uB3D9%uC791%uC73C%uB85C%uB3C4%20%uC5D1%uD2F0%uBE44%uD2F0%uAC00%20%uC18C%uBA78%uB418%uB294%20%uC2DC%uB098%uB9AC%uC624%uAC00%20%uC788%uC2B5%uB2C8%uB2E4.%20%uC0AC%uC6A9%uC790%uAC00%20%uB4A4%uB85C%uB97C%20%uB204%uB974%uAC70%uB098%2C%20%uC5D1%uD2F0%uBE44%uD2F0%uAC00%20%60finish%28%29%60%uB97C%20%uD638%uCD9C%uD558%uC5EC%20%uC790%uCCB4%uC801%uC73C%uB85C%20%uC18C%uBA78%20%uC2E0%uD638%uB97C%20%uBCF4%uB0B4%uB294%20%uACBD%uC6B0%uC785%uB2C8%uB2E4.%20%20%uC774%20%uACBD%uC6B0%2C%20Activity%uB294%20%uC644%uBCBD%uD788%20%uC0AC%uB77C%uC9D1%uB2C8%uB2E4.%0A%0A%uC5D1%uD2F0%uBE44%uD2F0%uAC00%20%uC815%uC9C0%uB41C%20%uC0C1%uD0DC%uB85C%20%uC7A5%uC2DC%uAC04%20%uC0AC%uC6A9%uB418%uC9C0%20%uC54A%uAC70%uB098%2C%20%uC804%uBA74%uC5D0%20%uC788%uB294%20%uC5D1%uD2F0%uBE44%uD2F0%uAC00%20%uB9AC%uC18C%uC2A4%uAC00%20%uB354%20%uD544%uC694%uD574%20%uC2DC%uC2A4%uD15C%uC774%20%uBC31%uADF8%uB77C%uC6B4%uB4DC%20%uD504%uB85C%uC138%uC2A4%uB97C%20%uC885%uB8CC%uD574%20%uBA54%uBAA8%uB9AC%uB97C%20%uD68C%uC218%uD558%uB824%uB294%20%uACBD%uC6B0%uC5D0%uB3C4%20%uC2DC%uC2A4%uD15C%uC774%20%uC5D1%uD2F0%uBE44%uD2F0%uB97C%20%uC18C%uBA78%uC2DC%uD0AC%20%uC218%20%uC788%uC2B5%uB2C8%uB2E4.%20%uC774%uB807%uAC8C%20%uC815%uC0C1%uC801%uC778%20%uC571%20%uB3D9%uC791%uC774%20%uC544%uB2CC%2C%20%uC2DC%uC2A4%uD15C%uC774%20%uC18C%uBA78%uC2DC%uD0A4%uB294%20%uACBD%uC6B0%20%uC2DC%uC2A4%uD15C%uC740%20Avtivity%20%uC778%uC2A4%uD134%uC2A4%uB294%20%uC5C6%uC560%uC9C0%uB9CC%2C%20%uADF8%uAC83%uC774%20%uC874%uC7AC%uD588%uC5C8%uC74C%uC740%20%uAE30%uC5B5%uD569%uB2C8%uB2E4.%20%uC2DC%uC2A4%uD15C%uC774%20%uC774%uC804%20%uC0C1%uD0DC%uB97C%20%uBCF5%uC6D0%uD558%uAE30%20%uC704%uD574%20%uC0AC%uC6A9%uD558%uB294%2C%20%uC800%uC7A5%uB41C%20%uB370%uC774%uD130%uB97C%20%60%uC778%uC2A4%uD134%uC2A4%20%uC0C1%uD0DC%28instance%20state%29%60%uB77C%20%uD558%uBA70%2C%20%20%uC774%uB294%20%60Bundle%60%uAC1D%uCCB4%uC5D0%20%uC800%uC7A5%uB41C%20%uD0A4-%uAC12%20%uC30D%uC758%20%uCEEC%uB809%uC158%20%uC785%uB2C8%uB2E4.%0A%0A%3E%20%uCC38%uACE0%uB85C%2C%20%uC0AC%uC6A9%uC790%uAC00%20%uD654%uBA74%uC744%20%uD68C%uC804%uD560%20%uB54C%20%uB9C8%uB2E4%20%uC5D1%uD2F0%uBE44%uD2F0%uB294%20%uC18C%uBA78%20%uD6C4%20%uC7AC%uC0DD%uC131%uB429%uB2C8%uB2E4.%0A%0A%uAE30%uBCF8%uC801%uC73C%uB85C%20%uC790%uB3D9%uC73C%uB85C%20%uC2DC%uC2A4%uD15C%uC740%20Bundle%20%uC778%uC2A4%uD134%uC2A4%uC5D0%20%uB808%uC774%uC544%uC6C3%20view%uB4E4%uC758%20%uC0C1%uD0DC%uB97C%20%uC800%uC7A5%uD569%uB2C8%uB2E4.%20%uB530%uB77C%uC11C%20%uBCC4%uB3C4%20%uCF54%uB4DC%20%uC5C6%uC774%uB3C4%20%uC790%uB3D9%uC73C%uB85C%20%uBCF5%uC6D0%uC774%20%uB429%uB2C8%uB2E4.%20%28%29%uB2E8%20%uC774%uB54C%20%60android%3Aid%60%20%uC560%uD2B8%uB9AC%uBDF0%uD2B8%20%uAC12%uC740%20%uBC18%uB4DC%uC2DC%20%uC788%uC5B4%uC57C%20%uD569%uB2C8%uB2E4.%29%20%uADF8%uB7EC%uB098%20%uCD94%uAC00%uC801%uC73C%uB85C%20%uCF54%uB4DC%uB85C%20%uB370%uC774%uD130%uB97C%20%uC9C1%uC811%20%uC800%uC7A5%uD558%uACE0%20%uD578%uB4E4%uB9C1%20%uD558%uACE0%20%uC2F6%uB2E4%uBA74%20%uC544%uB798%uC758%20%uB450%uAC1C%uC758%20%uBA54%uC18C%uB4DC%uB97C%20%uC774%uC6A9%uD569%uB2C8%uB2E4.%0A%0A%21%5BAlt%20text%5D%28./1464714818812.png%29%0A%0A%0A%60%60%60java%0A%0Astatic%20final%20String%20STATE_SCORE%20%3D%20%22playerScore%22%3B%0Astatic%20final%20String%20STATE_LEVEL%20%3D%20%22playerLevel%22%3B%0A...%0A%0A@Override%0Apublic%20void%20onSaveInstanceState%28Bundle%20savedInstanceState%29%20%7B%0A%20%20%20%20//%20Save%20the%20user%27s%20current%20game%20state%0A%20%20%20%20savedInstanceState.putInt%28STATE_SCORE%2C%20mCurrentScore%29%3B%0A%20%20%20%20savedInstanceState.putInt%28STATE_LEVEL%2C%20mCurrentLevel%29%3B%0A%20%20%20%20%0A%20%20%20%20//%20Always%20call%20the%20superclass%20so%20it%20can%20save%20the%20view%20hierarchy%20state%0A%20%20%20%20super.onSaveInstanceState%28savedInstanceState%29%3B%0A%7D%0A%0A%60%60%60%0A%0A%60onSaveInstanceState%28%29%60%uB97C%20%uC774%uC6A9%uD574%20%uC5D1%uD2F0%uBE44%uD2F0%uC758%20%uC0C1%uD0DC%uB97C%20%uC800%uC7A5%uD574%20%uB458%20%uC218%20%uC788%uC2B5%uB2C8%uB2E4.%20%uC774%uB294%20%uC774%uD6C4%20%60onCreate%28%29%60%20%uD0C0%uC774%uBC0D%2C%20%uD639%uC740%20%uADF8%20%uBC14%uB85C%20%uB2E4%uC74C%uC778%20%60onRestoreInstanceState%28%29%60%20%uD0C0%uC774%uBC0D%uC5D0%20%uD578%uB4E4%uB9C1%20%uD560%20%uC218%20%uC788%uC2B5%uB2C8%uB2E4.%20%uB2E8%20%60onRestoreInstanceState%28%29%60%uB294%20%60Bundle%60%20%uAC1D%uCCB4%uAC00%20%uC788%uC744%20%uACBD%uC6B0%28%uBCF5%uC6D0%uD560%20%uC800%uC7A5%20%uB370%uC774%uD130%uAC00%20%uC788%uC744%20%uACBD%uC6B0%29%uC5D0%20%uB9CC%20%uC2E4%uD589%uB429%uB2C8%uB2E4.%0A%0A%60%60%60java%0A%0A@Override%0Aprotected%20void%20onCreate%28Bundle%20savedInstanceState%29%20%7B%0A%20%20%20%20super.onCreate%28savedInstanceState%29%3B%20//%20Always%20call%20the%20superclass%20first%0A%20%20%20%0A%20%20%20%20//%20Check%20whether%20we%27re%20recreating%20a%20previously%20destroyed%20instance%0A%20%20%20%20if%20%28savedInstanceState%20%21%3D%20null%29%20%7B%0A%20%20%20%20%20%20%20%20//%20Restore%20value%20of%20members%20from%20saved%20state%0A%20%20%20%20%20%20%20%20mCurrentScore%20%3D%20savedInstanceState.getInt%28STATE_SCORE%29%3B%0A%20%20%20%20%20%20%20%20mCurrentLevel%20%3D%20savedInstanceState.getInt%28STATE_LEVEL%29%3B%0A%20%20%20%20%7D%20else%20%7B%0A%20%20%20%20%20%20%20%20//%20Probably%20initialize%20members%20with%20default%20values%20for%20a%20new%20instance%0A%20%20%20%20%7D%0A%20%20%20%20...%0A%7D%0A%0A%60%60%60%0A%0A%60onCreate%28%29%60%uB54C%20%uD578%uB4E4%uB9C1%20%uD558%uAE30%20%uC704%uD574%uC11C%uB294%20%uBC18%uB4DC%uC2DC%20%60Bundle%60%uAC1D%uCCB4%uAC00%20%60null%60%uC778%uC9C0%20%uD655%uC778%uD558%uC5EC%uC57C%20%uD569%uB2C8%uB2E4.%20%uADF8%uB7EC%uB098%20%uC774%uD6C4%20%uC2E4%uD589%uB418%uB294%20%60onRestoreInstanceState%28%29%60%uB294%20%60Bundle%60%uAC1D%uCCB4%uAC00%20%uC5C6%uC73C%uBA74%20%uC2E4%uD589%uB418%uC9C0%20%uC54A%uAE30%uC5D0%20%60null%60%uAC12%uC5D0%20%uB300%uD55C%20%uCC98%uB9AC%uB97C%20%uD574%uC8FC%uC9C0%20%uC54A%uC544%uB3C4%20%uB429%uB2C8%uB2E4.%0A%0A%60%60%60java%0Apublic%20void%20onRestoreInstanceState%28Bundle%20savedInstanceState%29%20%7B%0A%20%20%20%20//%20Always%20call%20the%20superclass%20so%20it%20can%20restore%20the%20view%20hierarchy%0A%20%20%20%20super.onRestoreInstanceState%28savedInstanceState%29%3B%0A%20%20%20%0A%20%20%20%20//%20Restore%20state%20members%20from%20saved%20instance%0A%20%20%20%20mCurrentScore%20%3D%20savedInstanceState.getInt%28STATE_SCORE%29%3B%0A%20%20%20%20mCurrentLevel%20%3D%20savedInstanceState.getInt%28STATE_LEVEL%29%3B%0A%7D%0A%0A%60%60%60%0A&lt;/center&gt;
&lt;br /&gt;&lt;/en-note&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</description>
      <category>Develop</category>
      <category>Activity</category>
      <category>Android</category>
      <category>안드로이드</category>
      <category>액티비티</category>
      <category>엑티비티</category>
      <author>youngkyu.cho</author>
      <guid isPermaLink="true">https://youngkyu.tistory.com/37</guid>
      <comments>https://youngkyu.tistory.com/37#entry37comment</comments>
      <pubDate>Wed, 1 Jun 2016 02:25:03 +0900</pubDate>
    </item>
    <item>
      <title>안드로이드 Context 개념 익히기</title>
      <link>https://youngkyu.tistory.com/36</link>
      <description>&lt;en-note lang=&quot;v2&quot; style=&quot;color: #2c3f51; font-family: 'Helvetica Neue', Arial, 'Hiragino Sans GB', STHeiti, 'Microsoft YaHei', 'WenQuanYi Micro Hei', SimSun, Song, sans-serif; line-height: 1.6;&quot;&gt;&lt;del style=&quot;position:relative;display:block;z-index:10;&quot;&gt;&lt;a style=&quot;position: absolute;color: #FFF;text-decoration: none;font-size: 12px;height: 25px;border-radius: 0;margin-top: -20px;right: 15px;background: rgba(0, 0, 0, 0);border-left: 10px solid #BB3A34;border-right: 10px solid #BB3A34;border-bottom: 5px solid rgba(0, 0, 0, 0);width: 0;text-indent:-100000px;&quot; href=&quot;http://marxi.co/#/?provider=evernote_int&amp;amp;guid=aa4a06cc-5a47-4017-bfac-c9db1ba7cd65&amp;amp;notebook=youngkyu.cho&quot;&gt;Edit&lt;/a&gt;&lt;/del&gt;&lt;div style=&quot;color: #2c3f51; font-family: 'Helvetica Neue', Arial, 'Hiragino Sans GB', STHeiti, 'Microsoft YaHei', 'WenQuanYi Micro Hei', SimSun, Song, sans-serif; line-height: 1.6;&quot;&gt;
                        &lt;div style=&quot;line-height: 1.6;&quot;&gt;&lt;/div&gt;
                    &lt;div style=&quot;line-height: 1.6;&quot;&gt;

&lt;p style=&quot;margin: 0 0 1.1em; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;&lt;/p&gt;&lt;p style=&quot;margin: 0 0 1.1em; color: rgba(0,0,0,0.8); line-height: 1.6;&quot;&gt;&lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; background-color: #f9f2f4; white-space: normal; padding: 2px 5px; color: rgba(44,63,81,0.5); border-radius: 0; background: rgba(102,128,153,0.075);&quot;&gt;티스토리&lt;/code&gt; &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; background-color: #f9f2f4; white-space: normal; padding: 2px 5px; color: rgba(44,63,81,0.5); border-radius: 0; background: rgba(102,128,153,0.075);&quot;&gt;android&lt;/code&gt; &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; background-color: #f9f2f4; white-space: normal; padding: 2px 5px; color: rgba(44,63,81,0.5); border-radius: 0; background: rgba(102,128,153,0.075);&quot;&gt;안드로이드&lt;/code&gt; &lt;/p&gt;&lt;p style=&quot;margin: 0 0 1.1em; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 1.6;&quot;&gt;

&lt;h1 style=&quot;font-size: 2.6em; margin: 1.2em 0 .6em 0; font-family: inherit; font-weight: bold; line-height: 1.1; margin-top: 21px; margin-bottom: 10.5px; text-align: start; color: rgba(0,0,0,0.8);&quot;&gt;안드로이드 Context 개념 익히기&lt;/h1&gt;

&lt;blockquote style=&quot;padding: 15px 20px; margin: 0 0 1.1em; border-left: 5px solid rgba(102,128,153,0.075); border-left-width: 10px; background-color: rgba(102,128,153,0.05); border-top-right-radius: 5px; border-bottom-right-radius: 5px;&quot;&gt;
  &lt;p style=&quot;margin: 0 0 1.1em; font-size: 1em; font-weight: 300; margin-bottom: 0; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;Context is the Interface to global information about an application environment. &lt;br /&gt;
  컨텍스트는 애플리케이션의 environment에 대한 전역 정보를 위한 인터페이스다.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p style=&quot;margin: 0 0 1.1em; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;안드로이드 개발이 꽤나 쉽지 않다는 걸 알았다. 그래서 해보고 싶었다. 아니 해야한다 생각했다. 온갖 버그가 안드로이드 SDK안부터 서드파티 라이브러리까지 존재할 뿐만 아니라 파편화 또한 아이폰과 비교도 안될만큼 심하다는 게 시제품을 만드는 안드로이드 개발자 옆을 지키며 내가 안드로이드 공부를 시작하게 된 이유다. 내가 조금이라도 일을 더 도와준다면, 조금 더 빨리 완성되지 않을까 해서. 조금이라도 도움이 되지 않을까 하는 마음에 공부하기로 했다. 예전 Servlet/JSP, Spring등을 다룰 때 JAVA를 했던 기억을 더듬어 가며(놀랍게도 벌써 그개 3년이나 됐다는 걸 알았다), 안드로이드 공부를 시작하려 한다.&lt;/p&gt;&lt;p style=&quot;margin: 0 0 1.1em; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;안드로이드 개발자 뒤에서 항상 보던 &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;getApplicationContext()&lt;/code&gt;라는 함수가 기억났다. 왜 안드로이드는 맨날 저걸 던져줘야 하는건가 라는 생각이 항상 들었지만 한번도 그 이유가 제대로 궁금한 적은 없었다. 그냥 귀찮은 처리가 많은 개발 플랫폼이구만 이라고 생각했을 뿐. &lt;/p&gt;&lt;p style=&quot;margin: 0 0 1.1em; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;안드로이드의 Context 개념은 안드로이드 디벨로퍼에 따르면, 위와 같다. 현재 사용되고있는 앱에 대한 전역 환경 정보를 가진 친구라고 한다. 이게 무슨 뜬구름 잡는 소린가.&lt;/p&gt;&lt;p style=&quot;margin: 0 0 1.1em; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;&lt;a href=&quot;http://stackoverflow.com/questions/10347184/difference-and-when-to-use-getapplication-getapplicationcontext-getbasecon&quot; target=&quot;_blank&quot; style=&quot;background: transparent; color: #1980e6; text-decoration: none;&quot;&gt;여기&lt;/a&gt; 스텍오버플로우 글에서 많은 인사이트를 얻었다.&lt;/p&gt;&lt;p style=&quot;margin: 0 0 1.1em; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;&lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;getApplication()&lt;/code&gt;, &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;getApplicationContext()&lt;/code&gt;, &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;getBaseContext()&lt;/code&gt;, &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;getContext()&lt;/code&gt;, 그리고 &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;SomeClass.this&lt;/code&gt; 까지 이게 뭐가 다른지에 대한 질문이었다.&lt;/p&gt;&lt;p style=&quot;margin: 0 0 1.1em; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;즉,&lt;/p&gt;

&lt;/div&gt;
&lt;div style=&quot;line-height: 1.6;&quot;&gt;

&lt;pre style=&quot;font-family: 'Source Code Pro',monospace; white-space: pre-wrap; display: block; background-color: rgba(102,128,153,0.05); color: #333; word-wrap: break-word; font-size: .9em; background: #f6f6f6; line-height: 1.6; margin: 0 0 1.1em; padding: 0; border: 0; border-radius: 5px; text-align: start; word-break: break-all;&quot;&gt;&lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: inherit; background-color: transparent; white-space: pre-wrap; border-radius: 0; color: #f8f8f2; display: block; background: #23241f; padding: 1.3em 2em;&quot;&gt;Toast.makeText(LoginActivity.&lt;span style=&quot;line-height: 1.6; color: #f92672;&quot;&gt;this&lt;/span&gt;, &lt;span style=&quot;line-height: 1.6; color: #e6db74;&quot;&gt;&quot;LogIn successful&quot;&lt;/span&gt;, Toast.LENGTH_SHORT).show();&lt;br /&gt;Toast.makeText(getApplication(), &lt;span style=&quot;line-height: 1.6; color: #e6db74;&quot;&gt;&quot;LogIn successful&quot;&lt;/span&gt;, Toast.LENGTH_SHORT).show();&lt;br /&gt;Toast.makeText(getApplicationContext(), &lt;span style=&quot;line-height: 1.6; color: #e6db74;&quot;&gt;&quot;LogIn successful&quot;&lt;/span&gt;, Toast.LENGTH_SHORT).show();&lt;br /&gt;Toast.makeText(getBaseContext(), &lt;span style=&quot;line-height: 1.6; color: #e6db74;&quot;&gt;&quot;LogIn successful&quot;&lt;/span&gt;, Toast.LENGTH_SHORT).show();&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;p style=&quot;margin: 0 0 1.1em; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;이 친구들과&lt;/p&gt;

&lt;/div&gt;
&lt;div style=&quot;line-height: 1.6;&quot;&gt;

&lt;pre style=&quot;font-family: 'Source Code Pro',monospace; white-space: pre-wrap; display: block; background-color: rgba(102,128,153,0.05); color: #333; word-wrap: break-word; font-size: .9em; background: #f6f6f6; line-height: 1.6; margin: 0 0 1.1em; padding: 0; border: 0; border-radius: 5px; text-align: start; word-break: break-all;&quot;&gt;&lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: inherit; background-color: transparent; white-space: pre-wrap; border-radius: 0; color: #f8f8f2; display: block; background: #23241f; padding: 1.3em 2em;&quot;&gt;&lt;span style=&quot;line-height: 1.6;&quot;&gt;Intent&lt;/span&gt; &lt;span style=&quot;line-height: 1.6;&quot;&gt;intent&lt;/span&gt; = new &lt;span style=&quot;line-height: 1.6;&quot;&gt;Intent&lt;/span&gt;(getApplicationContext(), LoginActivity.&lt;span style=&quot;line-height: 1.6; color: #f92672;&quot;&gt;class&lt;/span&gt;);&lt;br /&gt;&lt;span style=&quot;line-height: 1.6;&quot;&gt;Intent&lt;/span&gt; &lt;span style=&quot;line-height: 1.6;&quot;&gt;intent&lt;/span&gt; = new &lt;span style=&quot;line-height: 1.6;&quot;&gt;Intent&lt;/span&gt;(MenuPagina., LoginActivity.&lt;span style=&quot;line-height: 1.6; color: #f92672;&quot;&gt;class&lt;/span&gt;);&lt;br /&gt;&lt;span style=&quot;line-height: 1.6;&quot;&gt;Intent&lt;/span&gt; &lt;span style=&quot;line-height: 1.6;&quot;&gt;intent&lt;/span&gt; = new &lt;span style=&quot;line-height: 1.6;&quot;&gt;Intent&lt;/span&gt;(getBaseContext(), LoginActivity.&lt;span style=&quot;line-height: 1.6; color: #f92672;&quot;&gt;class&lt;/span&gt;);&lt;br /&gt;&lt;span style=&quot;line-height: 1.6;&quot;&gt;Intent&lt;/span&gt; &lt;span style=&quot;line-height: 1.6;&quot;&gt;intent&lt;/span&gt; = new &lt;span style=&quot;line-height: 1.6;&quot;&gt;Intent&lt;/span&gt;(getApplication(), LoginActivity.&lt;span style=&quot;line-height: 1.6; color: #f92672;&quot;&gt;class&lt;/span&gt;);&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;p style=&quot;margin: 0 0 1.1em; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;이 친구들 각각이 뭐가 다른지에 대한 것을 궁금해 하는 듯 했다. 나 또한 안드로이드 생초보지만, 어깨 넘어로 본 게 있어서 뭐가 다른지 궁금했다.&lt;/p&gt;&lt;p style=&quot;margin: 0 0 1.1em; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;안드로이드 프레임워크에서 Context는 2가지 종류로 나뉜다.&lt;/p&gt;

&lt;ul style=&quot;margin-top: 0; margin-bottom: 1.1em; line-height: 1.6;&quot;&gt;
&lt;li style=&quot;line-height: 1.6;&quot;&gt;애플리케이션 Context&lt;/li&gt;
&lt;li style=&quot;line-height: 1.6;&quot;&gt;액티비티 Context&lt;/li&gt;
&lt;/ul&gt;

&lt;p style=&quot;margin: 0 0 1.1em; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;애플리케이션 Context는 애플리케이션 자체의 생명주기(라이프사이클)에 영향을 받는다. 따라서 항상 애플리케이션의 생명 주기와 함께 한다.  &lt;br /&gt;
그러나 엑티비티 Context는 액티비티의 라이프사이클과 함께 작동해, &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;onDestory()&lt;/code&gt;와 함께 사라진다. 즉 액티비티에 대한 환경 정보들이 Context에 있고, 이 Context(엑티비티의)에 Intent를 통해 다른 액티비티를 띄우면, 엑티비티 스택이 쌓이게 되는 것이다. &lt;/p&gt;

&lt;blockquote style=&quot;padding: 15px 20px; margin: 0 0 1.1em; border-left: 5px solid rgba(102,128,153,0.075); border-left-width: 10px; background-color: rgba(102,128,153,0.05); border-top-right-radius: 5px; border-bottom-right-radius: 5px;&quot;&gt;
  &lt;p style=&quot;margin: 0 0 1.1em; font-size: 1em; font-weight: 300; margin-bottom: 0; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;&lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;LoginActivity.this&lt;/code&gt; though its referring to your own class which extends Activity class but the base class (Activity) also extends Context class, so it can be used to offer activity context. &lt;br /&gt;
  &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;getApplication()&lt;/code&gt; though its referring to Application object but the Application class extends Context class, so it can be used to offer application context. &lt;br /&gt;
   &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;getApplicationContext()&lt;/code&gt; offers application context. &lt;br /&gt;
   &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;getBaseContext()&lt;/code&gt; offers activity context.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p style=&quot;margin: 0 0 1.1em; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;세부적인 설명인데, 여기서 중요한 것은 안드로이드의 Avtivity와 Apllication class들이 모두 &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;Context&lt;/code&gt;클래스를 상속받아 만들어졌다는 것이다. 그래서 &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;LoginActivity.this&lt;/code&gt;라고 하는 순간, &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;this&lt;/code&gt;에 해당하는 &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;LoginActivity&lt;/code&gt;인스턴스가 파라매터로 전달되고, 이것은 &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;Context&lt;/code&gt;를 상속받았기에 &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;Context&lt;/code&gt;이며, 따라서 아무런 문제 없이 작동하게 되는 것이다. &lt;/p&gt;

&lt;blockquote style=&quot;padding: 15px 20px; margin: 0 0 1.1em; border-left: 5px solid rgba(102,128,153,0.075); border-left-width: 10px; background-color: rgba(102,128,153,0.05); border-top-right-radius: 5px; border-bottom-right-radius: 5px;&quot;&gt;
  &lt;p style=&quot;margin: 0 0 1.1em; font-size: 1em; font-weight: 300; margin-bottom: 0; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;Tips: 뷰를 수정하거나 할때는 &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;Activity Context&lt;/code&gt;를 나머지 경우에는 &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;Application Context&lt;/code&gt;를 사용하라.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p style=&quot;margin: 0 0 1.1em; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;다음은 액티비티의 생명주기에 대해서 공부를 해보아야 겠다.&lt;/p&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 1.6;&quot;&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;center style=&quot;display:none&quot;&gt;@%5B%uD2F0%uC2A4%uD1A0%uB9AC%2Candroid%2C%uC548%uB4DC%uB85C%uC774%uB4DC%5D%0A%0A%23%20%uC548%uB4DC%uB85C%uC774%uB4DC%20Context%20%uAC1C%uB150%20%uC775%uD788%uAE30%0A%0A%3E%20Context%20is%20the%20Interface%20to%20global%20information%20about%20an%20application%20environment.%0A%3E%20%uCEE8%uD14D%uC2A4%uD2B8%uB294%20%uC560%uD50C%uB9AC%uCF00%uC774%uC158%uC758%20environment%uC5D0%20%uB300%uD55C%20%uC804%uC5ED%20%uC815%uBCF4%uB97C%20%uC704%uD55C%20%uC778%uD130%uD398%uC774%uC2A4%uB2E4.%0A%0A%uC548%uB4DC%uB85C%uC774%uB4DC%20%uAC1C%uBC1C%uC774%20%uAF64%uB098%20%uC27D%uC9C0%20%uC54A%uB2E4%uB294%20%uAC78%20%uC54C%uC558%uB2E4.%20%uADF8%uB798%uC11C%20%uD574%uBCF4%uACE0%20%uC2F6%uC5C8%uB2E4.%20%uC544%uB2C8%20%uD574%uC57C%uD55C%uB2E4%20%uC0DD%uAC01%uD588%uB2E4.%20%uC628%uAC16%20%uBC84%uADF8%uAC00%20%uC548%uB4DC%uB85C%uC774%uB4DC%20SDK%uC548%uBD80%uD130%20%uC11C%uB4DC%uD30C%uD2F0%20%uB77C%uC774%uBE0C%uB7EC%uB9AC%uAE4C%uC9C0%20%uC874%uC7AC%uD560%20%uBFD0%uB9CC%20%uC544%uB2C8%uB77C%20%uD30C%uD3B8%uD654%20%uB610%uD55C%20%uC544%uC774%uD3F0%uACFC%20%uBE44%uAD50%uB3C4%20%uC548%uB420%uB9CC%uD07C%20%uC2EC%uD558%uB2E4%uB294%20%uAC8C%20%uC2DC%uC81C%uD488%uC744%20%uB9CC%uB4DC%uB294%20%uC548%uB4DC%uB85C%uC774%uB4DC%20%uAC1C%uBC1C%uC790%20%uC606%uC744%20%uC9C0%uD0A4%uBA70%20%uB0B4%uAC00%20%uC548%uB4DC%uB85C%uC774%uB4DC%20%uACF5%uBD80%uB97C%20%uC2DC%uC791%uD558%uAC8C%20%uB41C%20%uC774%uC720%uB2E4.%20%uB0B4%uAC00%20%uC870%uAE08%uC774%uB77C%uB3C4%20%uC77C%uC744%20%uB354%20%uB3C4%uC640%uC900%uB2E4%uBA74%2C%20%uC870%uAE08%20%uB354%20%uBE68%uB9AC%20%uC644%uC131%uB418%uC9C0%20%uC54A%uC744%uAE4C%20%uD574%uC11C.%20%uC870%uAE08%uC774%uB77C%uB3C4%20%uB3C4%uC6C0%uC774%20%uB418%uC9C0%20%uC54A%uC744%uAE4C%20%uD558%uB294%20%uB9C8%uC74C%uC5D0%20%uACF5%uBD80%uD558%uAE30%uB85C%20%uD588%uB2E4.%20%uC608%uC804%20Servlet/JSP%2C%20Spring%uB4F1%uC744%20%uB2E4%uB8F0%20%uB54C%20JAVA%uB97C%20%uD588%uB358%20%uAE30%uC5B5%uC744%20%uB354%uB4EC%uC5B4%20%uAC00%uBA70%28%uB180%uB78D%uAC8C%uB3C4%20%uBC8C%uC368%20%uADF8%uAC1C%203%uB144%uC774%uB098%20%uB410%uB2E4%uB294%20%uAC78%20%uC54C%uC558%uB2E4%29%2C%20%uC548%uB4DC%uB85C%uC774%uB4DC%20%uACF5%uBD80%uB97C%20%uC2DC%uC791%uD558%uB824%20%uD55C%uB2E4.%0A%0A%uC548%uB4DC%uB85C%uC774%uB4DC%20%uAC1C%uBC1C%uC790%20%uB4A4%uC5D0%uC11C%20%uD56D%uC0C1%20%uBCF4%uB358%20%60getApplicationContext%28%29%60%uB77C%uB294%20%uD568%uC218%uAC00%20%uAE30%uC5B5%uB0AC%uB2E4.%20%uC65C%20%uC548%uB4DC%uB85C%uC774%uB4DC%uB294%20%uB9E8%uB0A0%20%uC800%uAC78%20%uB358%uC838%uC918%uC57C%20%uD558%uB294%uAC74%uAC00%20%uB77C%uB294%20%uC0DD%uAC01%uC774%20%uD56D%uC0C1%20%uB4E4%uC5C8%uC9C0%uB9CC%20%uD55C%uBC88%uB3C4%20%uADF8%20%uC774%uC720%uAC00%20%uC81C%uB300%uB85C%20%uAD81%uAE08%uD55C%20%uC801%uC740%20%uC5C6%uC5C8%uB2E4.%20%uADF8%uB0E5%20%uADC0%uCC2E%uC740%20%uCC98%uB9AC%uAC00%20%uB9CE%uC740%20%uAC1C%uBC1C%20%uD50C%uB7AB%uD3FC%uC774%uAD6C%uB9CC%20%uC774%uB77C%uACE0%20%uC0DD%uAC01%uD588%uC744%20%uBFD0.%20%0A%0A%uC548%uB4DC%uB85C%uC774%uB4DC%uC758%20Context%20%uAC1C%uB150%uC740%20%uC548%uB4DC%uB85C%uC774%uB4DC%20%uB514%uBCA8%uB85C%uD37C%uC5D0%20%uB530%uB974%uBA74%2C%20%uC704%uC640%20%uAC19%uB2E4.%20%uD604%uC7AC%20%uC0AC%uC6A9%uB418%uACE0%uC788%uB294%20%uC571%uC5D0%20%uB300%uD55C%20%uC804%uC5ED%20%uD658%uACBD%20%uC815%uBCF4%uB97C%20%uAC00%uC9C4%20%uCE5C%uAD6C%uB77C%uACE0%20%uD55C%uB2E4.%20%uC774%uAC8C%20%uBB34%uC2A8%20%uB72C%uAD6C%uB984%20%uC7A1%uB294%20%uC18C%uB9B0%uAC00.%0A%0A%5B%uC5EC%uAE30%5D%28http%3A//stackoverflow.com/questions/10347184/difference-and-when-to-use-getapplication-getapplicationcontext-getbasecon%29%20%uC2A4%uD14D%uC624%uBC84%uD50C%uB85C%uC6B0%20%uAE00%uC5D0%uC11C%20%uB9CE%uC740%20%uC778%uC0AC%uC774%uD2B8%uB97C%20%uC5BB%uC5C8%uB2E4.%0A%0A%60getApplication%28%29%60%2C%20%60getApplicationContext%28%29%60%2C%20%60getBaseContext%28%29%60%2C%20%60getContext%28%29%60%2C%20%uADF8%uB9AC%uACE0%20%60SomeClass.this%60%20%uAE4C%uC9C0%20%uC774%uAC8C%20%uBB50%uAC00%20%uB2E4%uB978%uC9C0%uC5D0%20%uB300%uD55C%20%uC9C8%uBB38%uC774%uC5C8%uB2E4.%0A%0A%uC989%2C%0A%60%60%60%20java%0AToast.makeText%28LoginActivity.this%2C%20%22LogIn%20successful%22%2C%20Toast.LENGTH_SHORT%29.show%28%29%3B%0AToast.makeText%28getApplication%28%29%2C%20%22LogIn%20successful%22%2C%20Toast.LENGTH_SHORT%29.show%28%29%3B%0AToast.makeText%28getApplicationContext%28%29%2C%20%22LogIn%20successful%22%2C%20Toast.LENGTH_SHORT%29.show%28%29%3B%0AToast.makeText%28getBaseContext%28%29%2C%20%22LogIn%20successful%22%2C%20Toast.LENGTH_SHORT%29.show%28%29%3B%0A%60%60%60%0A%uC774%20%uCE5C%uAD6C%uB4E4%uACFC%0A%0A%60%60%60%0AIntent%20intent%20%3D%20new%20Intent%28getApplicationContext%28%29%2C%20LoginActivity.class%29%3B%0AIntent%20intent%20%3D%20new%20Intent%28MenuPagina.%2C%20LoginActivity.class%29%3B%0AIntent%20intent%20%3D%20new%20Intent%28getBaseContext%28%29%2C%20LoginActivity.class%29%3B%0AIntent%20intent%20%3D%20new%20Intent%28getApplication%28%29%2C%20LoginActivity.class%29%3B%0A%60%60%60%0A%0A%uC774%20%uCE5C%uAD6C%uB4E4%20%uAC01%uAC01%uC774%20%uBB50%uAC00%20%uB2E4%uB978%uC9C0%uC5D0%20%uB300%uD55C%20%uAC83%uC744%20%uAD81%uAE08%uD574%20%uD558%uB294%20%uB4EF%20%uD588%uB2E4.%20%uB098%20%uB610%uD55C%20%uC548%uB4DC%uB85C%uC774%uB4DC%20%uC0DD%uCD08%uBCF4%uC9C0%uB9CC%2C%20%uC5B4%uAE68%20%uB118%uC5B4%uB85C%20%uBCF8%20%uAC8C%20%uC788%uC5B4%uC11C%20%uBB50%uAC00%20%uB2E4%uB978%uC9C0%20%uAD81%uAE08%uD588%uB2E4.%0A%0A%uC548%uB4DC%uB85C%uC774%uB4DC%20%uD504%uB808%uC784%uC6CC%uD06C%uC5D0%uC11C%20Context%uB294%202%uAC00%uC9C0%20%uC885%uB958%uB85C%20%uB098%uB25C%uB2E4.%0A%0A-%20%uC560%uD50C%uB9AC%uCF00%uC774%uC158%20Context%0A-%20%uC561%uD2F0%uBE44%uD2F0%20Context%0A%0A%uC560%uD50C%uB9AC%uCF00%uC774%uC158%20Context%uB294%20%uC560%uD50C%uB9AC%uCF00%uC774%uC158%20%uC790%uCCB4%uC758%20%uC0DD%uBA85%uC8FC%uAE30%28%uB77C%uC774%uD504%uC0AC%uC774%uD074%29%uC5D0%20%uC601%uD5A5%uC744%20%uBC1B%uB294%uB2E4.%20%uB530%uB77C%uC11C%20%uD56D%uC0C1%20%uC560%uD50C%uB9AC%uCF00%uC774%uC158%uC758%20%uC0DD%uBA85%20%uC8FC%uAE30%uC640%20%uD568%uAED8%20%uD55C%uB2E4.%20%0A%uADF8%uB7EC%uB098%20%uC5D1%uD2F0%uBE44%uD2F0%20Context%uB294%20%uC561%uD2F0%uBE44%uD2F0%uC758%20%uB77C%uC774%uD504%uC0AC%uC774%uD074%uACFC%20%uD568%uAED8%20%uC791%uB3D9%uD574%2C%20%60onDestory%28%29%60%uC640%20%uD568%uAED8%20%uC0AC%uB77C%uC9C4%uB2E4.%20%uC989%20%uC561%uD2F0%uBE44%uD2F0%uC5D0%20%uB300%uD55C%20%uD658%uACBD%20%uC815%uBCF4%uB4E4%uC774%20Context%uC5D0%20%uC788%uACE0%2C%20%uC774%20Context%28%uC5D1%uD2F0%uBE44%uD2F0%uC758%29%uC5D0%20Intent%uB97C%20%uD1B5%uD574%20%uB2E4%uB978%20%uC561%uD2F0%uBE44%uD2F0%uB97C%20%uB744%uC6B0%uBA74%2C%20%uC5D1%uD2F0%uBE44%uD2F0%20%uC2A4%uD0DD%uC774%20%uC313%uC774%uAC8C%20%uB418%uB294%20%uAC83%uC774%uB2E4.%20%0A%0A%3E%20%60LoginActivity.this%60%20though%20its%20referring%20to%20your%20own%20class%20which%20extends%20Activity%20class%20but%20the%20base%20class%20%28Activity%29%20also%20extends%20Context%20class%2C%20so%20it%20can%20be%20used%20to%20offer%20activity%20context.%0A%3E%20%60getApplication%28%29%60%20though%20its%20referring%20to%20Application%20object%20but%20the%20Application%20class%20extends%20Context%20class%2C%20so%20it%20can%20be%20used%20to%20offer%20application%20context.%0A%3E%20%20%60getApplicationContext%28%29%60%20offers%20application%20context.%0A%3E%20%20%60getBaseContext%28%29%60%20offers%20activity%20context.%0A%0A%uC138%uBD80%uC801%uC778%20%uC124%uBA85%uC778%uB370%2C%20%uC5EC%uAE30%uC11C%20%uC911%uC694%uD55C%20%uAC83%uC740%20%uC548%uB4DC%uB85C%uC774%uB4DC%uC758%20Avtivity%uC640%20Apllication%20class%uB4E4%uC774%20%uBAA8%uB450%20%60Context%60%uD074%uB798%uC2A4%uB97C%20%uC0C1%uC18D%uBC1B%uC544%20%uB9CC%uB4E4%uC5B4%uC84C%uB2E4%uB294%20%uAC83%uC774%uB2E4.%20%uADF8%uB798%uC11C%20%60LoginActivity.this%60%uB77C%uACE0%20%uD558%uB294%20%uC21C%uAC04%2C%20%60this%60%uC5D0%20%uD574%uB2F9%uD558%uB294%20%60LoginActivity%60%uC778%uC2A4%uD134%uC2A4%uAC00%20%uD30C%uB77C%uB9E4%uD130%uB85C%20%uC804%uB2EC%uB418%uACE0%2C%20%uC774%uAC83%uC740%20%60Context%60%uB97C%20%uC0C1%uC18D%uBC1B%uC558%uAE30%uC5D0%20%60Context%60%uC774%uBA70%2C%20%uB530%uB77C%uC11C%20%uC544%uBB34%uB7F0%20%uBB38%uC81C%20%uC5C6%uC774%20%uC791%uB3D9%uD558%uAC8C%20%uB418%uB294%20%uAC83%uC774%uB2E4.%20%0A%0A%3E%20Tips%3A%20%uBDF0%uB97C%20%uC218%uC815%uD558%uAC70%uB098%20%uD560%uB54C%uB294%20%60Activity%20Context%60%uB97C%20%uB098%uBA38%uC9C0%20%uACBD%uC6B0%uC5D0%uB294%20%60Application%20Context%60%uB97C%20%uC0AC%uC6A9%uD558%uB77C.%0A%0A%uB2E4%uC74C%uC740%20%uC561%uD2F0%uBE44%uD2F0%uC758%20%uC0DD%uBA85%uC8FC%uAE30%uC5D0%20%uB300%uD574%uC11C%20%uACF5%uBD80%uB97C%20%uD574%uBCF4%uC544%uC57C%20%uACA0%uB2E4.&lt;/center&gt;
&lt;br /&gt;&lt;/en-note&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</description>
      <category>Develop</category>
      <category>Android</category>
      <category>conTeXt</category>
      <category>안드로이드</category>
      <category>컨텍스트</category>
      <author>youngkyu.cho</author>
      <guid isPermaLink="true">https://youngkyu.tistory.com/36</guid>
      <comments>https://youngkyu.tistory.com/36#entry36comment</comments>
      <pubDate>Wed, 1 Jun 2016 02:23:53 +0900</pubDate>
    </item>
    <item>
      <title>Redis(레디스)의 구현과 내부 구조, 작동 원리 - 1</title>
      <link>https://youngkyu.tistory.com/35</link>
      <description>&lt;en-note lang=&quot;v2&quot; style=&quot;color: #2c3f51; font-family: 'Helvetica Neue', Arial, 'Hiragino Sans GB', STHeiti, 'Microsoft YaHei', 'WenQuanYi Micro Hei', SimSun, Song, sans-serif; line-height: 1.6;&quot;&gt;&lt;del style=&quot;position:relative;display:block&quot;&gt;&lt;a style=&quot;position: absolute;color: #FFF;text-decoration: none;font-size: 12px;height: 25px;border-radius: 0;margin-top: -20px;right: 15px;background: rgba(0, 0, 0, 0);border-left: 10px solid #BB3A34;border-right: 10px solid #BB3A34;border-bottom: 5px solid rgba(0, 0, 0, 0);width: 0;text-indent:-100000px;&quot; href=&quot;http://marxi.co/#/?provider=evernote_int&amp;amp;guid=7543148c-8223-4afa-bcc2-34ecb3fb7d55&amp;amp;notebook=youngkyu.cho&quot;&gt;Edit&lt;/a&gt;&lt;/del&gt;&lt;div style=&quot;color: #2c3f51; font-family: 'Helvetica Neue', Arial, 'Hiragino Sans GB', STHeiti, 'Microsoft YaHei', 'WenQuanYi Micro Hei', SimSun, Song, sans-serif; line-height: 1.6;&quot;&gt;
                        &lt;div style=&quot;line-height: 1.6;&quot;&gt;&lt;/div&gt;
                    &lt;div style=&quot;line-height: 1.6;&quot;&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 1.6;&quot;&gt;

&lt;h1 style=&quot;font-size: 2.6em; margin: 1.2em 0 .6em 0; font-family: inherit; font-weight: bold; line-height: 1.1; margin-top: 21px; margin-bottom: 10.5px; text-align: start; color: rgba(0,0,0,0.8);&quot;&gt;Redis(레디스)의 구현과 내부 구조, 작동 원리 - 1&lt;/h1&gt;

&lt;p style=&quot;margin: 0 0 1.1em; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;새로운 프로젝트인 Haffle에서 레디스를 메인 데이터베이스로 사용하기로 결정했다. 꽤 도전적인 선택이고 내 기준에서는 약간의 기술적 도전이기도 하다. 어떻게 해야 레디스로 인스타그램처럼 잘 만들 수 있을까 고민하다가 코드를 한번 씹어먹어보기로 했다. 레디스의 여러 명령어를 사용하면서도 레디스의 구현에 대해서는 무지했는데, 이제부터 레디스에 대한 내부 구조와 세부 구현에 대해 소스 코드를 분석해 보고자 한다. 잘못된 내용이 있을시 알려주길 바란다!&lt;/p&gt;&lt;p style=&quot;margin: 0 0 1.1em; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;&lt;em style=&quot;line-height: 1.6;&quot;&gt;레디스 3.XX 기준 소스코드이다.&lt;/em&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 1.6;&quot;&gt;

&lt;h2 style=&quot;font-family: inherit; font-weight: bold; line-height: 1.1; margin-top: 21px; margin-bottom: 10.5px; font-size: 2.15em; margin: 1.2em 0 .6em 0; text-align: start; color: rgba(0,0,0,0.8);&quot;&gt;레디스 객체&lt;/h2&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 1.6;&quot;&gt;

&lt;pre style=&quot;word-break: break-word; font-family: 'Source Code Pro',monospace; white-space: pre-wrap; display: block; background-color: rgba(102,128,153,0.05); color: #333; word-wrap: break-word; font-size: .9em; background: #f6f6f6; line-height: 1.6; margin: 0 0 1.1em; padding: 2px; border: 0; border-radius: 5px; text-align: start;&quot;&gt;&lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: inherit; background-color: transparent; white-space: pre-wrap; border-radius: 0; color: #f8f8f2; display: block; background: #23241f; padding: 18px 28px;&quot;&gt;&lt;span style=&quot;line-height: 1.6; color: #75715e;&quot;&gt;// redis.h&lt;/span&gt;

&lt;span style=&quot;line-height: 1.6;&quot;&gt;#&lt;span style=&quot;line-height: 1.6; color: #f92672;&quot;&gt;define&lt;/span&gt; REDIS_LRU_BITS 24&lt;/span&gt;
&lt;span style=&quot;line-height: 1.6;&quot;&gt;#&lt;span style=&quot;line-height: 1.6; color: #f92672;&quot;&gt;define&lt;/span&gt; REDIS_LRU_CLOCK_MAX ((1&amp;lt;&amp;lt;REDIS_LRU_BITS)-1) /* Max value of obj-&amp;gt;lru */&lt;/span&gt;
&lt;span style=&quot;line-height: 1.6;&quot;&gt;#&lt;span style=&quot;line-height: 1.6; color: #f92672;&quot;&gt;define&lt;/span&gt; REDIS_LRU_CLOCK_RESOLUTION 1000 /* LRU clock resolution in ms */&lt;/span&gt;
&lt;span style=&quot;line-height: 1.6; color: #f92672;&quot;&gt;typedef&lt;/span&gt; &lt;span style=&quot;line-height: 1.6; color: #f92672;&quot;&gt;struct&lt;/span&gt; redisObject {
    &lt;span style=&quot;line-height: 1.6; color: #f92672;&quot;&gt;unsigned&lt;/span&gt; type:&lt;span style=&quot;line-height: 1.6; color: #ae81ff;&quot;&gt;4&lt;/span&gt;;
    &lt;span style=&quot;line-height: 1.6; color: #f92672;&quot;&gt;unsigned&lt;/span&gt; encoding:&lt;span style=&quot;line-height: 1.6; color: #ae81ff;&quot;&gt;4&lt;/span&gt;;
    &lt;span style=&quot;line-height: 1.6; color: #f92672;&quot;&gt;unsigned&lt;/span&gt; lru:REDIS_LRU_BITS; &lt;span style=&quot;line-height: 1.6; color: #75715e;&quot;&gt;/* lru time (relative to server.lruclock) */&lt;/span&gt;
    &lt;span style=&quot;line-height: 1.6; color: #f92672;&quot;&gt;int&lt;/span&gt; refcount;
    &lt;span style=&quot;line-height: 1.6; color: #f92672;&quot;&gt;void&lt;/span&gt; *ptr;
} robj;&lt;/code&gt;&lt;/pre&gt;

&lt;p style=&quot;margin: 0 0 1.1em; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;redis.h 에서 레디스가 저장된 데이터를 관리하기위해 사용하는 redisObject의 구조체 형식을 확인할 수 있다. 아니 사실 모든 레디스 운영을 위한 모든 변수도 이걸로 관리된다. redis.h에서 처음으로 나오는 구조체기도 하다. 레디스는 비트필드를 사용하여, type 구별(4비트)과 인코딩 타입 구별(4비트)을 위해, 그리고 LRU를 위한 시간 저장공간(24비트)을 사용하는데, 정말 아끼고 아껴 고작 저걸 다 합쳐서 32비트밖에 안사용한다. 레디스는 메모리에서 동작하고 메모리는 시스템 자원 중 매우 비싼편에 속한다. 이를 알고 최소한으로 사용하려는 노력이 돋보인다. (반성해야한다 나는.) 과거(2.6대)에는 2비트를 notUsed 필드로 남겨뒀는데 3.XX 버전대로 오면서 lru를 위해 할당한 듯 하다. refcount는 해당 객체가 참조당하는 횟수로 파악되고, ptr이 실제 데이터를 가리키는 용도로 사용되는 포인터로 보인다.&lt;/p&gt;&lt;p style=&quot;margin: 0 0 1.1em; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;여기서 encoding은 무엇인가? type은 또 무엇인가?&lt;/p&gt;

&lt;/div&gt;
&lt;div style=&quot;line-height: 1.6;&quot;&gt;

&lt;h2 style=&quot;font-family: inherit; font-weight: bold; line-height: 1.1; margin-top: 21px; margin-bottom: 10.5px; font-size: 2.15em; margin: 1.2em 0 .6em 0; text-align: start; color: rgba(0,0,0,0.8);&quot;&gt;레디스의 자료 구조(타입)과 인코딩&lt;/h2&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 1.6;&quot;&gt;

&lt;pre style=&quot;word-break: break-word; font-family: 'Source Code Pro',monospace; white-space: pre-wrap; display: block; background-color: rgba(102,128,153,0.05); color: #333; word-wrap: break-word; font-size: .9em; background: #f6f6f6; line-height: 1.6; margin: 0 0 1.1em; padding: 2px; border: 0; border-radius: 5px; text-align: start;&quot;&gt;&lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: inherit; background-color: transparent; white-space: pre-wrap; border-radius: 0; color: #f8f8f2; display: block; background: #23241f; padding: 18px 28px;&quot;&gt;&lt;span style=&quot;line-height: 1.6; color: #75715e;&quot;&gt;// redis.h&lt;/span&gt;

&lt;span style=&quot;line-height: 1.6; color: #75715e;&quot;&gt;/* Object types */&lt;/span&gt;
&lt;span style=&quot;line-height: 1.6; color: #ae81ff;&quot;&gt;#def&lt;/span&gt;ine REDIS_STRING &lt;span style=&quot;line-height: 1.6; color: #ae81ff;&quot;&gt;0&lt;/span&gt; &lt;span style=&quot;line-height: 1.6; color: #75715e;&quot;&gt;//스트링&lt;/span&gt;
&lt;span style=&quot;line-height: 1.6; color: #ae81ff;&quot;&gt;#def&lt;/span&gt;ine REDIS_LIST &lt;span style=&quot;line-height: 1.6; color: #ae81ff;&quot;&gt;1&lt;/span&gt; &lt;span style=&quot;line-height: 1.6; color: #75715e;&quot;&gt;//리스트&lt;/span&gt;
&lt;span style=&quot;line-height: 1.6; color: #ae81ff;&quot;&gt;#def&lt;/span&gt;ine REDIS_SET &lt;span style=&quot;line-height: 1.6; color: #ae81ff;&quot;&gt;2&lt;/span&gt; &lt;span style=&quot;line-height: 1.6; color: #75715e;&quot;&gt;//집합(셋)&lt;/span&gt;
&lt;span style=&quot;line-height: 1.6; color: #ae81ff;&quot;&gt;#def&lt;/span&gt;ine REDIS_ZSET &lt;span style=&quot;line-height: 1.6; color: #ae81ff;&quot;&gt;3&lt;/span&gt; &lt;span style=&quot;line-height: 1.6; color: #75715e;&quot;&gt;//정렬된 리스트&lt;/span&gt;
&lt;span style=&quot;line-height: 1.6; color: #ae81ff;&quot;&gt;#def&lt;/span&gt;ine REDIS_HASH &lt;span style=&quot;line-height: 1.6; color: #ae81ff;&quot;&gt;4&lt;/span&gt; &lt;span style=&quot;line-height: 1.6; color: #75715e;&quot;&gt;//해시테이블&lt;/span&gt;

&lt;span style=&quot;line-height: 1.6; color: #ae81ff;&quot;&gt;#def&lt;/span&gt;ine REDIS_ENCODING_RAW &lt;span style=&quot;line-height: 1.6; color: #ae81ff;&quot;&gt;0&lt;/span&gt;     &lt;span style=&quot;line-height: 1.6; color: #75715e;&quot;&gt;/* Raw representation */&lt;/span&gt;
&lt;span style=&quot;line-height: 1.6; color: #ae81ff;&quot;&gt;#def&lt;/span&gt;ine REDIS_ENCODING_INT &lt;span style=&quot;line-height: 1.6; color: #ae81ff;&quot;&gt;1&lt;/span&gt;     &lt;span style=&quot;line-height: 1.6; color: #75715e;&quot;&gt;/* Encoded as integer */&lt;/span&gt;
&lt;span style=&quot;line-height: 1.6; color: #ae81ff;&quot;&gt;#def&lt;/span&gt;ine REDIS_ENCODING_HT &lt;span style=&quot;line-height: 1.6; color: #ae81ff;&quot;&gt;2&lt;/span&gt;      &lt;span style=&quot;line-height: 1.6; color: #75715e;&quot;&gt;/* Encoded as hash table */&lt;/span&gt;
&lt;span style=&quot;line-height: 1.6; color: #ae81ff;&quot;&gt;#def&lt;/span&gt;ine REDIS_ENCODING_ZIPMAP &lt;span style=&quot;line-height: 1.6; color: #ae81ff;&quot;&gt;3&lt;/span&gt;  &lt;span style=&quot;line-height: 1.6; color: #75715e;&quot;&gt;/* Encoded as zipmap */&lt;/span&gt;
&lt;span style=&quot;line-height: 1.6; color: #ae81ff;&quot;&gt;#def&lt;/span&gt;ine REDIS_ENCODING_LINKEDLIST &lt;span style=&quot;line-height: 1.6; color: #ae81ff;&quot;&gt;4&lt;/span&gt; &lt;span style=&quot;line-height: 1.6; color: #75715e;&quot;&gt;/* Encoded as regular linked list */&lt;/span&gt;
&lt;span style=&quot;line-height: 1.6; color: #ae81ff;&quot;&gt;#def&lt;/span&gt;ine REDIS_ENCODING_ZIPLIST &lt;span style=&quot;line-height: 1.6; color: #ae81ff;&quot;&gt;5&lt;/span&gt; &lt;span style=&quot;line-height: 1.6; color: #75715e;&quot;&gt;/* Encoded as ziplist */&lt;/span&gt;
&lt;span style=&quot;line-height: 1.6; color: #ae81ff;&quot;&gt;#def&lt;/span&gt;ine REDIS_ENCODING_INTSET &lt;span style=&quot;line-height: 1.6; color: #ae81ff;&quot;&gt;6&lt;/span&gt;  &lt;span style=&quot;line-height: 1.6; color: #75715e;&quot;&gt;/* Encoded as intset */&lt;/span&gt;
&lt;span style=&quot;line-height: 1.6; color: #ae81ff;&quot;&gt;#def&lt;/span&gt;ine REDIS_ENCODING_SKIPLIST &lt;span style=&quot;line-height: 1.6; color: #ae81ff;&quot;&gt;7&lt;/span&gt;  &lt;span style=&quot;line-height: 1.6; color: #75715e;&quot;&gt;/* Encoded as skiplist */&lt;/span&gt;
&lt;span style=&quot;line-height: 1.6; color: #ae81ff;&quot;&gt;#def&lt;/span&gt;ine REDIS_ENCODING_EMBSTR &lt;span style=&quot;line-height: 1.6; color: #ae81ff;&quot;&gt;8&lt;/span&gt;  &lt;span style=&quot;line-height: 1.6; color: #75715e;&quot;&gt;/* Embedded sds string encoding */&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;p style=&quot;margin: 0 0 1.1em; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;redis.h의 179번째 줄 부터 시작하는 상수를 보자. redis는 4개의 비트로 아마 최대 16개의 자료구조 타입을 표현할 수 있을 것이다. 그리고 현재는 위의 5가지를 지원하는 듯 하다. 곧 위치 관련 구조도 지원한다는데, 이곳에 5번으로 추가되지 않을까.&lt;/p&gt;&lt;p style=&quot;margin: 0 0 1.1em; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;레디스는 인코딩타입으로 현재 9가지를 지원한다.&lt;/p&gt;

&lt;ul style=&quot;margin-top: 0; margin-bottom: 1.1em; line-height: 1.6;&quot;&gt;
&lt;li style=&quot;line-height: 1.6;&quot;&gt;RAW&lt;/li&gt;
&lt;li style=&quot;line-height: 1.6;&quot;&gt;INT&lt;/li&gt;
&lt;li style=&quot;line-height: 1.6;&quot;&gt;해시테이블&lt;/li&gt;
&lt;li style=&quot;line-height: 1.6;&quot;&gt;집맵(압축된 해시테이블)&lt;/li&gt;
&lt;li style=&quot;line-height: 1.6;&quot;&gt;연결리스트&lt;/li&gt;
&lt;li style=&quot;line-height: 1.6;&quot;&gt;집리스트(압축된 리스트)&lt;/li&gt;
&lt;li style=&quot;line-height: 1.6;&quot;&gt;INT형 변수만 있는 집합(셋)일 경우 사용되는  INTSET&lt;/li&gt;
&lt;li style=&quot;line-height: 1.6;&quot;&gt;SKIPLIST&lt;/li&gt;
&lt;li style=&quot;line-height: 1.6;&quot;&gt;EMBSTR&lt;/li&gt;
&lt;/ul&gt;

&lt;p style=&quot;margin: 0 0 1.1em; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;각각의 인코딩이 무엇인지는 정확히 모르겠지만, 어쨋든 이런 인코딩 타입을 지원하나보다. 데이터를 군더더기 없이 최소한의 공간만 사용해 저장하려는 노력의 일환인 듯 하다.&lt;/p&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 1.6;&quot;&gt;

&lt;h2 style=&quot;font-family: inherit; font-weight: bold; line-height: 1.1; margin-top: 21px; margin-bottom: 10.5px; font-size: 2.15em; margin: 1.2em 0 .6em 0; text-align: start; color: rgba(0,0,0,0.8);&quot;&gt;문자열 데이터 인코딩 따라가기&lt;/h2&gt;

&lt;p style=&quot;margin: 0 0 1.1em; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;레디스는 문자열을 저장하기 위해 아래 2가지의 인코딩을 지원한다. &lt;/p&gt;

&lt;ul style=&quot;margin-top: 0; margin-bottom: 1.1em; line-height: 1.6;&quot;&gt;
&lt;li style=&quot;line-height: 1.6;&quot;&gt;RAW&lt;/li&gt;
&lt;li style=&quot;line-height: 1.6;&quot;&gt;INT&lt;/li&gt;
&lt;/ul&gt;

&lt;p style=&quot;margin: 0 0 1.1em; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;어떻게 동작하는지 살펴보자.&lt;/p&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 1.6;&quot;&gt;

&lt;pre style=&quot;word-break: break-word; font-family: 'Source Code Pro',monospace; white-space: pre-wrap; display: block; background-color: rgba(102,128,153,0.05); color: #333; word-wrap: break-word; font-size: .9em; background: #f6f6f6; line-height: 1.6; margin: 0 0 1.1em; padding: 2px; border: 0; border-radius: 5px; text-align: start;&quot;&gt;&lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: inherit; background-color: transparent; white-space: pre-wrap; border-radius: 0; color: #f8f8f2; display: block; background: #23241f; padding: 18px 28px;&quot;&gt;// redis.c

struct redisCommand redisCommandTable[] = {
    {&lt;span style=&quot;line-height: 1.6; color: #e6db74;&quot;&gt;&quot;get&quot;&lt;/span&gt;,getCommand,&lt;span style=&quot;line-height: 1.6; color: #ae81ff;&quot;&gt;2&lt;/span&gt;,&lt;span style=&quot;line-height: 1.6; color: #e6db74;&quot;&gt;&quot;rF&quot;&lt;/span&gt;,&lt;span style=&quot;line-height: 1.6; color: #ae81ff;&quot;&gt;0&lt;/span&gt;,&lt;span style=&quot;line-height: 1.6; color: #ae81ff;&quot;&gt;NULL&lt;/span&gt;,&lt;span style=&quot;line-height: 1.6; color: #ae81ff;&quot;&gt;1&lt;/span&gt;,&lt;span style=&quot;line-height: 1.6; color: #ae81ff;&quot;&gt;1&lt;/span&gt;,&lt;span style=&quot;line-height: 1.6; color: #ae81ff;&quot;&gt;1&lt;/span&gt;,&lt;span style=&quot;line-height: 1.6; color: #ae81ff;&quot;&gt;0&lt;/span&gt;,&lt;span style=&quot;line-height: 1.6; color: #ae81ff;&quot;&gt;0&lt;/span&gt;},
    {&lt;span style=&quot;line-height: 1.6; color: #e6db74;&quot;&gt;&quot;set&quot;&lt;/span&gt;,setCommand,-&lt;span style=&quot;line-height: 1.6; color: #ae81ff;&quot;&gt;3&lt;/span&gt;,&lt;span style=&quot;line-height: 1.6; color: #e6db74;&quot;&gt;&quot;wm&quot;&lt;/span&gt;,&lt;span style=&quot;line-height: 1.6; color: #ae81ff;&quot;&gt;0&lt;/span&gt;,&lt;span style=&quot;line-height: 1.6; color: #ae81ff;&quot;&gt;NULL&lt;/span&gt;,&lt;span style=&quot;line-height: 1.6; color: #ae81ff;&quot;&gt;1&lt;/span&gt;,&lt;span style=&quot;line-height: 1.6; color: #ae81ff;&quot;&gt;1&lt;/span&gt;,&lt;span style=&quot;line-height: 1.6; color: #ae81ff;&quot;&gt;1&lt;/span&gt;,&lt;span style=&quot;line-height: 1.6; color: #ae81ff;&quot;&gt;0&lt;/span&gt;,&lt;span style=&quot;line-height: 1.6; color: #ae81ff;&quot;&gt;0&lt;/span&gt;},
    // &lt;span style=&quot;line-height: 1.6; color: #f92672;&quot;&gt;...&lt;/span&gt; 중략 &lt;span style=&quot;line-height: 1.6; color: #f92672;&quot;&gt;...&lt;/span&gt; 
    {&lt;span style=&quot;line-height: 1.6; color: #e6db74;&quot;&gt;&quot;pfselftest&quot;&lt;/span&gt;,pfselftestCommand,&lt;span style=&quot;line-height: 1.6; color: #ae81ff;&quot;&gt;1&lt;/span&gt;,&lt;span style=&quot;line-height: 1.6; color: #e6db74;&quot;&gt;&quot;r&quot;&lt;/span&gt;,&lt;span style=&quot;line-height: 1.6; color: #ae81ff;&quot;&gt;0&lt;/span&gt;,&lt;span style=&quot;line-height: 1.6; color: #ae81ff;&quot;&gt;NULL&lt;/span&gt;,&lt;span style=&quot;line-height: 1.6; color: #ae81ff;&quot;&gt;0&lt;/span&gt;,&lt;span style=&quot;line-height: 1.6; color: #ae81ff;&quot;&gt;0&lt;/span&gt;,&lt;span style=&quot;line-height: 1.6; color: #ae81ff;&quot;&gt;0&lt;/span&gt;,&lt;span style=&quot;line-height: 1.6; color: #ae81ff;&quot;&gt;0&lt;/span&gt;,&lt;span style=&quot;line-height: 1.6; color: #ae81ff;&quot;&gt;0&lt;/span&gt;},
    {&lt;span style=&quot;line-height: 1.6; color: #e6db74;&quot;&gt;&quot;pfadd&quot;&lt;/span&gt;,pfaddCommand,-&lt;span style=&quot;line-height: 1.6; color: #ae81ff;&quot;&gt;2&lt;/span&gt;,&lt;span style=&quot;line-height: 1.6; color: #e6db74;&quot;&gt;&quot;wmF&quot;&lt;/span&gt;,&lt;span style=&quot;line-height: 1.6; color: #ae81ff;&quot;&gt;0&lt;/span&gt;,&lt;span style=&quot;line-height: 1.6; color: #ae81ff;&quot;&gt;NULL&lt;/span&gt;,&lt;span style=&quot;line-height: 1.6; color: #ae81ff;&quot;&gt;1&lt;/span&gt;,&lt;span style=&quot;line-height: 1.6; color: #ae81ff;&quot;&gt;1&lt;/span&gt;,&lt;span style=&quot;line-height: 1.6; color: #ae81ff;&quot;&gt;1&lt;/span&gt;,&lt;span style=&quot;line-height: 1.6; color: #ae81ff;&quot;&gt;0&lt;/span&gt;,&lt;span style=&quot;line-height: 1.6; color: #ae81ff;&quot;&gt;0&lt;/span&gt;},
    {&lt;span style=&quot;line-height: 1.6; color: #e6db74;&quot;&gt;&quot;pfcount&quot;&lt;/span&gt;,pfcountCommand,-&lt;span style=&quot;line-height: 1.6; color: #ae81ff;&quot;&gt;2&lt;/span&gt;,&lt;span style=&quot;line-height: 1.6; color: #e6db74;&quot;&gt;&quot;r&quot;&lt;/span&gt;,&lt;span style=&quot;line-height: 1.6; color: #ae81ff;&quot;&gt;0&lt;/span&gt;,&lt;span style=&quot;line-height: 1.6; color: #ae81ff;&quot;&gt;NULL&lt;/span&gt;,&lt;span style=&quot;line-height: 1.6; color: #ae81ff;&quot;&gt;1&lt;/span&gt;,-&lt;span style=&quot;line-height: 1.6; color: #ae81ff;&quot;&gt;1&lt;/span&gt;,&lt;span style=&quot;line-height: 1.6; color: #ae81ff;&quot;&gt;1&lt;/span&gt;,&lt;span style=&quot;line-height: 1.6; color: #ae81ff;&quot;&gt;0&lt;/span&gt;,&lt;span style=&quot;line-height: 1.6; color: #ae81ff;&quot;&gt;0&lt;/span&gt;},
    {&lt;span style=&quot;line-height: 1.6; color: #e6db74;&quot;&gt;&quot;pfmerge&quot;&lt;/span&gt;,pfmergeCommand,-&lt;span style=&quot;line-height: 1.6; color: #ae81ff;&quot;&gt;2&lt;/span&gt;,&lt;span style=&quot;line-height: 1.6; color: #e6db74;&quot;&gt;&quot;wm&quot;&lt;/span&gt;,&lt;span style=&quot;line-height: 1.6; color: #ae81ff;&quot;&gt;0&lt;/span&gt;,&lt;span style=&quot;line-height: 1.6; color: #ae81ff;&quot;&gt;NULL&lt;/span&gt;,&lt;span style=&quot;line-height: 1.6; color: #ae81ff;&quot;&gt;1&lt;/span&gt;,-&lt;span style=&quot;line-height: 1.6; color: #ae81ff;&quot;&gt;1&lt;/span&gt;,&lt;span style=&quot;line-height: 1.6; color: #ae81ff;&quot;&gt;1&lt;/span&gt;,&lt;span style=&quot;line-height: 1.6; color: #ae81ff;&quot;&gt;0&lt;/span&gt;,&lt;span style=&quot;line-height: 1.6; color: #ae81ff;&quot;&gt;0&lt;/span&gt;},
    {&lt;span style=&quot;line-height: 1.6; color: #e6db74;&quot;&gt;&quot;pfdebug&quot;&lt;/span&gt;,pfdebugCommand,-&lt;span style=&quot;line-height: 1.6; color: #ae81ff;&quot;&gt;3&lt;/span&gt;,&lt;span style=&quot;line-height: 1.6; color: #e6db74;&quot;&gt;&quot;w&quot;&lt;/span&gt;,&lt;span style=&quot;line-height: 1.6; color: #ae81ff;&quot;&gt;0&lt;/span&gt;,&lt;span style=&quot;line-height: 1.6; color: #ae81ff;&quot;&gt;NULL&lt;/span&gt;,&lt;span style=&quot;line-height: 1.6; color: #ae81ff;&quot;&gt;0&lt;/span&gt;,&lt;span style=&quot;line-height: 1.6; color: #ae81ff;&quot;&gt;0&lt;/span&gt;,&lt;span style=&quot;line-height: 1.6; color: #ae81ff;&quot;&gt;0&lt;/span&gt;,&lt;span style=&quot;line-height: 1.6; color: #ae81ff;&quot;&gt;0&lt;/span&gt;,&lt;span style=&quot;line-height: 1.6; color: #ae81ff;&quot;&gt;0&lt;/span&gt;},
    {&lt;span style=&quot;line-height: 1.6; color: #e6db74;&quot;&gt;&quot;latency&quot;&lt;/span&gt;,latencyCommand,-&lt;span style=&quot;line-height: 1.6; color: #ae81ff;&quot;&gt;2&lt;/span&gt;,&lt;span style=&quot;line-height: 1.6; color: #e6db74;&quot;&gt;&quot;arslt&quot;&lt;/span&gt;,&lt;span style=&quot;line-height: 1.6; color: #ae81ff;&quot;&gt;0&lt;/span&gt;,&lt;span style=&quot;line-height: 1.6; color: #ae81ff;&quot;&gt;NULL&lt;/span&gt;,&lt;span style=&quot;line-height: 1.6; color: #ae81ff;&quot;&gt;0&lt;/span&gt;,&lt;span style=&quot;line-height: 1.6; color: #ae81ff;&quot;&gt;0&lt;/span&gt;,&lt;span style=&quot;line-height: 1.6; color: #ae81ff;&quot;&gt;0&lt;/span&gt;,&lt;span style=&quot;line-height: 1.6; color: #ae81ff;&quot;&gt;0&lt;/span&gt;,&lt;span style=&quot;line-height: 1.6; color: #ae81ff;&quot;&gt;0&lt;/span&gt;}
};
&lt;/code&gt;&lt;/pre&gt;

&lt;p style=&quot;margin: 0 0 1.1em; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;redis.c에서 문자열 데이터를 저장하는 명령어인 get과 set이 호출됐을때 실행되는 함수를 확인할 수 있다. &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;getCommand&lt;/code&gt;과 &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;setCommand&lt;/code&gt;이 그것인데, 이 소스를 찾아보자. 먼저 &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;setCommand&lt;/code&gt;가 궁금하다.&lt;/p&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 1.6;&quot;&gt;

&lt;pre style=&quot;word-break: break-word; font-family: 'Source Code Pro',monospace; white-space: pre-wrap; display: block; background-color: rgba(102,128,153,0.05); color: #333; word-wrap: break-word; font-size: .9em; background: #f6f6f6; line-height: 1.6; margin: 0 0 1.1em; padding: 2px; border: 0; border-radius: 5px; text-align: start;&quot;&gt;&lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: inherit; background-color: transparent; white-space: pre-wrap; border-radius: 0; color: #f8f8f2; display: block; background: #23241f; padding: 18px 28px;&quot;&gt;&lt;span style=&quot;line-height: 1.6; color: #75715e;&quot;&gt;// t_string.c&lt;/span&gt;

&lt;span style=&quot;line-height: 1.6; color: #f92672;&quot;&gt;static&lt;/span&gt; &lt;span style=&quot;line-height: 1.6; color: #f92672;&quot;&gt;int&lt;/span&gt; checkStringLength(redisClient *c, &lt;span style=&quot;line-height: 1.6; color: #f92672;&quot;&gt;long&lt;/span&gt; &lt;span style=&quot;line-height: 1.6; color: #f92672;&quot;&gt;long&lt;/span&gt; &lt;span style=&quot;line-height: 1.6; color: #f92672;&quot;&gt;size&lt;/span&gt;) {
    &lt;span style=&quot;line-height: 1.6; color: #f92672;&quot;&gt;if&lt;/span&gt; (&lt;span style=&quot;line-height: 1.6; color: #f92672;&quot;&gt;size&lt;/span&gt; &amp;gt; &lt;span style=&quot;line-height: 1.6; color: #ae81ff;&quot;&gt;512&lt;/span&gt;*&lt;span style=&quot;line-height: 1.6; color: #ae81ff;&quot;&gt;1024&lt;/span&gt;*&lt;span style=&quot;line-height: 1.6; color: #ae81ff;&quot;&gt;1024&lt;/span&gt;) {
        addReplyError(c,&lt;span style=&quot;line-height: 1.6; color: #e6db74;&quot;&gt;&quot;string exceeds maximum allowed size (512MB)&quot;&lt;/span&gt;);
        &lt;span style=&quot;line-height: 1.6; color: #f92672;&quot;&gt;return&lt;/span&gt; REDIS_ERR;
    }
    &lt;span style=&quot;line-height: 1.6; color: #f92672;&quot;&gt;return&lt;/span&gt; REDIS_OK;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;p style=&quot;margin: 0 0 1.1em; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;&lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;setCommand&lt;/code&gt;를 찾아 뜯어보니, 첫줄에 &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;checkStringLength&lt;/code&gt;함수가 보인다. 512메가를 넘는 스트링인가를 검사하는데, &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;redisClient&lt;/code&gt;포인터 까지 인자로 받는다.  레디스의 Command와 관련된 모든 함수는 &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;redisClient&lt;/code&gt;를 참조한다. 이게 뭘까?&lt;/p&gt;

&lt;/div&gt;
&lt;div style=&quot;line-height: 1.6;&quot;&gt;

&lt;pre style=&quot;word-break: break-word; font-family: 'Source Code Pro',monospace; white-space: pre-wrap; display: block; background-color: rgba(102,128,153,0.05); color: #333; word-wrap: break-word; font-size: .9em; background: #f6f6f6; line-height: 1.6; margin: 0 0 1.1em; padding: 2px; border: 0; border-radius: 5px; text-align: start;&quot;&gt;&lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: inherit; background-color: transparent; white-space: pre-wrap; border-radius: 0; color: #f8f8f2; display: block; background: #23241f; padding: 18px 28px;&quot;&gt;&lt;span style=&quot;line-height: 1.6; color: #75715e;&quot;&gt;// redis.h&lt;/span&gt;

&lt;span style=&quot;line-height: 1.6; color: #75715e;&quot;&gt;/* With multiplexing we need to take per-client state.
 * Clients are taken in a linked list. */&lt;/span&gt;
&lt;span style=&quot;line-height: 1.6; color: #f92672;&quot;&gt;typedef&lt;/span&gt; &lt;span style=&quot;line-height: 1.6; color: #f92672;&quot;&gt;struct&lt;/span&gt; redisClient {
    uint64_t id;            &lt;span style=&quot;line-height: 1.6; color: #75715e;&quot;&gt;/* Client incremental unique ID. */&lt;/span&gt;
    &lt;span style=&quot;line-height: 1.6; color: #f92672;&quot;&gt;int&lt;/span&gt; fd;
    redisDb *db;
    &lt;span style=&quot;line-height: 1.6; color: #f92672;&quot;&gt;int&lt;/span&gt; dictid;
    robj *name;             &lt;span style=&quot;line-height: 1.6; color: #75715e;&quot;&gt;/* As set by CLIENT SETNAME */&lt;/span&gt;
    sds querybuf;
    size_t querybuf_peak;   &lt;span style=&quot;line-height: 1.6; color: #75715e;&quot;&gt;/* Recent (100ms or more) peak of querybuf size */&lt;/span&gt;
    &lt;span style=&quot;line-height: 1.6; color: #f92672;&quot;&gt;int&lt;/span&gt; argc;
    robj **argv;
    &lt;span style=&quot;line-height: 1.6; color: #f92672;&quot;&gt;struct&lt;/span&gt; redisCommand *cmd, *lastcmd;
    &lt;span style=&quot;line-height: 1.6; color: #f92672;&quot;&gt;int&lt;/span&gt; reqtype;
    &lt;span style=&quot;line-height: 1.6; color: #f92672;&quot;&gt;int&lt;/span&gt; multibulklen;       &lt;span style=&quot;line-height: 1.6; color: #75715e;&quot;&gt;/* number of multi bulk arguments left to read */&lt;/span&gt;
    &lt;span style=&quot;line-height: 1.6; color: #f92672;&quot;&gt;long&lt;/span&gt; bulklen;           &lt;span style=&quot;line-height: 1.6; color: #75715e;&quot;&gt;/* length of bulk argument in multi bulk request */&lt;/span&gt;
    &lt;span style=&quot;line-height: 1.6; color: #e6db74;&quot;&gt;list&lt;/span&gt; *reply;
    &lt;span style=&quot;line-height: 1.6; color: #f92672;&quot;&gt;unsigned&lt;/span&gt; &lt;span style=&quot;line-height: 1.6; color: #f92672;&quot;&gt;long&lt;/span&gt; reply_bytes; &lt;span style=&quot;line-height: 1.6; color: #75715e;&quot;&gt;/* Tot bytes of objects in reply list */&lt;/span&gt;
    &lt;span style=&quot;line-height: 1.6; color: #f92672;&quot;&gt;int&lt;/span&gt; sentlen;            &lt;span style=&quot;line-height: 1.6; color: #75715e;&quot;&gt;/* Amount of bytes already sent in the current
                               buffer or object being sent. */&lt;/span&gt;
    time_t ctime;           &lt;span style=&quot;line-height: 1.6; color: #75715e;&quot;&gt;/* Client creation time */&lt;/span&gt;
    time_t lastinteraction; &lt;span style=&quot;line-height: 1.6; color: #75715e;&quot;&gt;/* time of the last interaction, used for timeout */&lt;/span&gt;
    time_t obuf_soft_limit_reached_time;
    &lt;span style=&quot;line-height: 1.6; color: #f92672;&quot;&gt;int&lt;/span&gt; flags;              &lt;span style=&quot;line-height: 1.6; color: #75715e;&quot;&gt;/* REDIS_SLAVE | REDIS_MONITOR | REDIS_MULTI ... */&lt;/span&gt;
    &lt;span style=&quot;line-height: 1.6; color: #f92672;&quot;&gt;int&lt;/span&gt; authenticated;      &lt;span style=&quot;line-height: 1.6; color: #75715e;&quot;&gt;/* when requirepass is non-NULL */&lt;/span&gt;
    &lt;span style=&quot;line-height: 1.6; color: #f92672;&quot;&gt;int&lt;/span&gt; replstate;          &lt;span style=&quot;line-height: 1.6; color: #75715e;&quot;&gt;/* replication state if this is a slave */&lt;/span&gt;
    &lt;span style=&quot;line-height: 1.6; color: #f92672;&quot;&gt;int&lt;/span&gt; repl_put_online_on_ack; &lt;span style=&quot;line-height: 1.6; color: #75715e;&quot;&gt;/* Install slave write handler on ACK. */&lt;/span&gt;
    &lt;span style=&quot;line-height: 1.6; color: #f92672;&quot;&gt;int&lt;/span&gt; repldbfd;           &lt;span style=&quot;line-height: 1.6; color: #75715e;&quot;&gt;/* replication DB file descriptor */&lt;/span&gt;
    off_t repldboff;        &lt;span style=&quot;line-height: 1.6; color: #75715e;&quot;&gt;/* replication DB file offset */&lt;/span&gt;
    off_t repldbsize;       &lt;span style=&quot;line-height: 1.6; color: #75715e;&quot;&gt;/* replication DB file size */&lt;/span&gt;
    sds replpreamble;       &lt;span style=&quot;line-height: 1.6; color: #75715e;&quot;&gt;/* replication DB preamble. */&lt;/span&gt;
    &lt;span style=&quot;line-height: 1.6; color: #f92672;&quot;&gt;long&lt;/span&gt; &lt;span style=&quot;line-height: 1.6; color: #f92672;&quot;&gt;long&lt;/span&gt; reploff;      &lt;span style=&quot;line-height: 1.6; color: #75715e;&quot;&gt;/* replication offset if this is our master */&lt;/span&gt;
    &lt;span style=&quot;line-height: 1.6; color: #f92672;&quot;&gt;long&lt;/span&gt; &lt;span style=&quot;line-height: 1.6; color: #f92672;&quot;&gt;long&lt;/span&gt; repl_ack_off; &lt;span style=&quot;line-height: 1.6; color: #75715e;&quot;&gt;/* replication ack offset, if this is a slave */&lt;/span&gt;
    &lt;span style=&quot;line-height: 1.6; color: #f92672;&quot;&gt;long&lt;/span&gt; &lt;span style=&quot;line-height: 1.6; color: #f92672;&quot;&gt;long&lt;/span&gt; repl_ack_time;&lt;span style=&quot;line-height: 1.6; color: #75715e;&quot;&gt;/* replication ack time, if this is a slave */&lt;/span&gt;
    &lt;span style=&quot;line-height: 1.6; color: #f92672;&quot;&gt;char&lt;/span&gt; replrunid[REDIS_RUN_ID_SIZE+&lt;span style=&quot;line-height: 1.6; color: #ae81ff;&quot;&gt;1&lt;/span&gt;]; &lt;span style=&quot;line-height: 1.6; color: #75715e;&quot;&gt;/* master run id if this is a master */&lt;/span&gt;
    &lt;span style=&quot;line-height: 1.6; color: #f92672;&quot;&gt;int&lt;/span&gt; slave_listening_port; &lt;span style=&quot;line-height: 1.6; color: #75715e;&quot;&gt;/* As configured with: SLAVECONF listening-port */&lt;/span&gt;
    multiState mstate;      &lt;span style=&quot;line-height: 1.6; color: #75715e;&quot;&gt;/* MULTI/EXEC state */&lt;/span&gt;
    &lt;span style=&quot;line-height: 1.6; color: #f92672;&quot;&gt;int&lt;/span&gt; btype;              &lt;span style=&quot;line-height: 1.6; color: #75715e;&quot;&gt;/* Type of blocking op if REDIS_BLOCKED. */&lt;/span&gt;
    blockingState bpop;     &lt;span style=&quot;line-height: 1.6; color: #75715e;&quot;&gt;/* blocking state */&lt;/span&gt;
    &lt;span style=&quot;line-height: 1.6; color: #f92672;&quot;&gt;long&lt;/span&gt; &lt;span style=&quot;line-height: 1.6; color: #f92672;&quot;&gt;long&lt;/span&gt; woff;         &lt;span style=&quot;line-height: 1.6; color: #75715e;&quot;&gt;/* Last write global replication offset. */&lt;/span&gt;
    &lt;span style=&quot;line-height: 1.6; color: #e6db74;&quot;&gt;list&lt;/span&gt; *watched_keys;     &lt;span style=&quot;line-height: 1.6; color: #75715e;&quot;&gt;/* Keys WATCHED for MULTI/EXEC CAS */&lt;/span&gt;
    dict *pubsub_channels;  &lt;span style=&quot;line-height: 1.6; color: #75715e;&quot;&gt;/* channels a client is interested in (SUBSCRIBE) */&lt;/span&gt;
    &lt;span style=&quot;line-height: 1.6; color: #e6db74;&quot;&gt;list&lt;/span&gt; *pubsub_patterns;  &lt;span style=&quot;line-height: 1.6; color: #75715e;&quot;&gt;/* patterns a client is interested in (SUBSCRIBE) */&lt;/span&gt;
    sds peerid;             &lt;span style=&quot;line-height: 1.6; color: #75715e;&quot;&gt;/* Cached peer ID. */&lt;/span&gt;

    &lt;span style=&quot;line-height: 1.6; color: #75715e;&quot;&gt;/* Response buffer */&lt;/span&gt;
    &lt;span style=&quot;line-height: 1.6; color: #f92672;&quot;&gt;int&lt;/span&gt; bufpos;
    &lt;span style=&quot;line-height: 1.6; color: #f92672;&quot;&gt;char&lt;/span&gt; buf[REDIS_REPLY_CHUNK_BYTES];
} redisClient;
&lt;/code&gt;&lt;/pre&gt;

&lt;p style=&quot;margin: 0 0 1.1em; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;레디스 클라이언트는 각각의 접속한 클라이언트의 상태를 저장하기 위해 사용하는 구조체였다. 이를 이용하여 명령들이나 블록상태, 혹은 pub/sub까지 관리하는 것으로 보인다. 주석을 보니 클라이언트들은 링크드리스트로 관리된다고 한다.&lt;/p&gt;&lt;p style=&quot;margin: 0 0 1.1em; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;다시 본론으로 돌아와서, &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;setCommand&lt;/code&gt;를 찾아보자. &lt;/p&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 1.6;&quot;&gt;

&lt;pre style=&quot;word-break: break-word; font-family: 'Source Code Pro',monospace; white-space: pre-wrap; display: block; background-color: rgba(102,128,153,0.05); color: #333; word-wrap: break-word; font-size: .9em; background: #f6f6f6; line-height: 1.6; margin: 0 0 1.1em; padding: 2px; border: 0; border-radius: 5px; text-align: start;&quot;&gt;&lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: inherit; background-color: transparent; white-space: pre-wrap; border-radius: 0; color: #f8f8f2; display: block; background: #23241f; padding: 18px 28px;&quot;&gt;// t_string.c

&lt;span style=&quot;line-height: 1.6; color: #75715e;&quot;&gt;#define REDIS_SET_NO_FLAGS 0&lt;/span&gt;
&lt;span style=&quot;line-height: 1.6; color: #75715e;&quot;&gt;#define REDIS_SET_NX (1&amp;lt;&amp;lt;0)     /* Set if key not exists. */    // 비트 : 01&lt;/span&gt;
&lt;span style=&quot;line-height: 1.6; color: #75715e;&quot;&gt;#define REDIS_SET_XX (1&amp;lt;&amp;lt;1)     /* Set if key exists. */        // 비트 : 10&lt;/span&gt;

void setGenericCommand(redisClient *c, int flags, robj *key, robj *val, robj *expire, int unit, robj *ok_reply, robj *abort_reply) {
    // &lt;span style=&quot;line-height: 1.6; color: #f92672;&quot;&gt;...&lt;/span&gt; 중략 &lt;span style=&quot;line-height: 1.6; color: #f92672;&quot;&gt;...&lt;/span&gt;
}

/* SET key value [NX] [XX] [EX &amp;lt;seconds&amp;gt;] [PX &amp;lt;milliseconds&amp;gt;] */
void setCommand(redisClient *c) {
    int j;
    robj *expire = &lt;span style=&quot;line-height: 1.6; color: #ae81ff;&quot;&gt;NULL&lt;/span&gt;;
    int unit = UNIT_SECONDS;
    int flags = REDIS_SET_NO_FLAGS;

    &lt;span style=&quot;line-height: 1.6; color: #f92672;&quot;&gt;for&lt;/span&gt; (j = &lt;span style=&quot;line-height: 1.6; color: #ae81ff;&quot;&gt;3&lt;/span&gt;; j &amp;lt; c-&amp;gt;argc; j++) {
        char *a = c-&amp;gt;argv[j]-&amp;gt;ptr;
        robj *&lt;span style=&quot;line-height: 1.6; color: #f92672;&quot;&gt;next&lt;/span&gt; = (j == c-&amp;gt;argc-&lt;span style=&quot;line-height: 1.6; color: #ae81ff;&quot;&gt;1&lt;/span&gt;) ? &lt;span style=&quot;line-height: 1.6; color: #ae81ff;&quot;&gt;NULL&lt;/span&gt; : c-&amp;gt;argv[j+&lt;span style=&quot;line-height: 1.6; color: #ae81ff;&quot;&gt;1&lt;/span&gt;];

        &lt;span style=&quot;line-height: 1.6; color: #f92672;&quot;&gt;if&lt;/span&gt; ((a[&lt;span style=&quot;line-height: 1.6; color: #ae81ff;&quot;&gt;0&lt;/span&gt;] == &lt;span style=&quot;line-height: 1.6; color: #e6db74;&quot;&gt;'n'&lt;/span&gt; || a[&lt;span style=&quot;line-height: 1.6; color: #ae81ff;&quot;&gt;0&lt;/span&gt;] == &lt;span style=&quot;line-height: 1.6; color: #e6db74;&quot;&gt;'N'&lt;/span&gt;) &amp;amp;&amp;amp;
            (a[&lt;span style=&quot;line-height: 1.6; color: #ae81ff;&quot;&gt;1&lt;/span&gt;] == &lt;span style=&quot;line-height: 1.6; color: #e6db74;&quot;&gt;'x'&lt;/span&gt; || a[&lt;span style=&quot;line-height: 1.6; color: #ae81ff;&quot;&gt;1&lt;/span&gt;] == &lt;span style=&quot;line-height: 1.6; color: #e6db74;&quot;&gt;'X'&lt;/span&gt;) &amp;amp;&amp;amp; a[&lt;span style=&quot;line-height: 1.6; color: #ae81ff;&quot;&gt;2&lt;/span&gt;] == &lt;span style=&quot;line-height: 1.6; color: #e6db74;&quot;&gt;'\0'&lt;/span&gt;) {
            flags |= REDIS_SET_NX;
        } &lt;span style=&quot;line-height: 1.6; color: #f92672;&quot;&gt;else&lt;/span&gt; &lt;span style=&quot;line-height: 1.6; color: #f92672;&quot;&gt;if&lt;/span&gt; ((a[&lt;span style=&quot;line-height: 1.6; color: #ae81ff;&quot;&gt;0&lt;/span&gt;] == &lt;span style=&quot;line-height: 1.6; color: #e6db74;&quot;&gt;'x'&lt;/span&gt; || a[&lt;span style=&quot;line-height: 1.6; color: #ae81ff;&quot;&gt;0&lt;/span&gt;] == &lt;span style=&quot;line-height: 1.6; color: #e6db74;&quot;&gt;'X'&lt;/span&gt;) &amp;amp;&amp;amp;
                   (a[&lt;span style=&quot;line-height: 1.6; color: #ae81ff;&quot;&gt;1&lt;/span&gt;] == &lt;span style=&quot;line-height: 1.6; color: #e6db74;&quot;&gt;'x'&lt;/span&gt; || a[&lt;span style=&quot;line-height: 1.6; color: #ae81ff;&quot;&gt;1&lt;/span&gt;] == &lt;span style=&quot;line-height: 1.6; color: #e6db74;&quot;&gt;'X'&lt;/span&gt;) &amp;amp;&amp;amp; a[&lt;span style=&quot;line-height: 1.6; color: #ae81ff;&quot;&gt;2&lt;/span&gt;] == &lt;span style=&quot;line-height: 1.6; color: #e6db74;&quot;&gt;'\0'&lt;/span&gt;) {
            flags |= REDIS_SET_XX;
        } &lt;span style=&quot;line-height: 1.6; color: #f92672;&quot;&gt;else&lt;/span&gt; &lt;span style=&quot;line-height: 1.6; color: #f92672;&quot;&gt;if&lt;/span&gt; ((a[&lt;span style=&quot;line-height: 1.6; color: #ae81ff;&quot;&gt;0&lt;/span&gt;] == &lt;span style=&quot;line-height: 1.6; color: #e6db74;&quot;&gt;'e'&lt;/span&gt; || a[&lt;span style=&quot;line-height: 1.6; color: #ae81ff;&quot;&gt;0&lt;/span&gt;] == &lt;span style=&quot;line-height: 1.6; color: #e6db74;&quot;&gt;'E'&lt;/span&gt;) &amp;amp;&amp;amp;
                   (a[&lt;span style=&quot;line-height: 1.6; color: #ae81ff;&quot;&gt;1&lt;/span&gt;] == &lt;span style=&quot;line-height: 1.6; color: #e6db74;&quot;&gt;'x'&lt;/span&gt; || a[&lt;span style=&quot;line-height: 1.6; color: #ae81ff;&quot;&gt;1&lt;/span&gt;] == &lt;span style=&quot;line-height: 1.6; color: #e6db74;&quot;&gt;'X'&lt;/span&gt;) &amp;amp;&amp;amp; a[&lt;span style=&quot;line-height: 1.6; color: #ae81ff;&quot;&gt;2&lt;/span&gt;] == &lt;span style=&quot;line-height: 1.6; color: #e6db74;&quot;&gt;'\0'&lt;/span&gt; &amp;amp;&amp;amp; &lt;span style=&quot;line-height: 1.6; color: #f92672;&quot;&gt;next&lt;/span&gt;) {
            unit = UNIT_SECONDS;
            expire = &lt;span style=&quot;line-height: 1.6; color: #f92672;&quot;&gt;next&lt;/span&gt;;
            j++;
        } &lt;span style=&quot;line-height: 1.6; color: #f92672;&quot;&gt;else&lt;/span&gt; &lt;span style=&quot;line-height: 1.6; color: #f92672;&quot;&gt;if&lt;/span&gt; ((a[&lt;span style=&quot;line-height: 1.6; color: #ae81ff;&quot;&gt;0&lt;/span&gt;] == &lt;span style=&quot;line-height: 1.6; color: #e6db74;&quot;&gt;'p'&lt;/span&gt; || a[&lt;span style=&quot;line-height: 1.6; color: #ae81ff;&quot;&gt;0&lt;/span&gt;] == &lt;span style=&quot;line-height: 1.6; color: #e6db74;&quot;&gt;'P'&lt;/span&gt;) &amp;amp;&amp;amp;
                   (a[&lt;span style=&quot;line-height: 1.6; color: #ae81ff;&quot;&gt;1&lt;/span&gt;] == &lt;span style=&quot;line-height: 1.6; color: #e6db74;&quot;&gt;'x'&lt;/span&gt; || a[&lt;span style=&quot;line-height: 1.6; color: #ae81ff;&quot;&gt;1&lt;/span&gt;] == &lt;span style=&quot;line-height: 1.6; color: #e6db74;&quot;&gt;'X'&lt;/span&gt;) &amp;amp;&amp;amp; a[&lt;span style=&quot;line-height: 1.6; color: #ae81ff;&quot;&gt;2&lt;/span&gt;] == &lt;span style=&quot;line-height: 1.6; color: #e6db74;&quot;&gt;'\0'&lt;/span&gt; &amp;amp;&amp;amp; &lt;span style=&quot;line-height: 1.6; color: #f92672;&quot;&gt;next&lt;/span&gt;) {
            unit = UNIT_MILLISECONDS;
            expire = &lt;span style=&quot;line-height: 1.6; color: #f92672;&quot;&gt;next&lt;/span&gt;;
            j++;
        } &lt;span style=&quot;line-height: 1.6; color: #f92672;&quot;&gt;else&lt;/span&gt; {
            addReply(c,shared.syntaxerr);
            &lt;span style=&quot;line-height: 1.6; color: #f92672;&quot;&gt;return&lt;/span&gt;;
        }
    }

    c-&amp;gt;argv[&lt;span style=&quot;line-height: 1.6; color: #ae81ff;&quot;&gt;2&lt;/span&gt;] = tryObjectEncoding(c-&amp;gt;argv[&lt;span style=&quot;line-height: 1.6; color: #ae81ff;&quot;&gt;2&lt;/span&gt;]); // 얘는 뭔가?
    setGenericCommand(c,flags,c-&amp;gt;argv[&lt;span style=&quot;line-height: 1.6; color: #ae81ff;&quot;&gt;1&lt;/span&gt;],c-&amp;gt;argv[&lt;span style=&quot;line-height: 1.6; color: #ae81ff;&quot;&gt;2&lt;/span&gt;],expire,unit,&lt;span style=&quot;line-height: 1.6; color: #ae81ff;&quot;&gt;NULL&lt;/span&gt;,&lt;span style=&quot;line-height: 1.6; color: #ae81ff;&quot;&gt;NULL&lt;/span&gt;);
}
&lt;/code&gt;&lt;/pre&gt;

&lt;p style=&quot;margin: 0 0 1.1em; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;&lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;setCommand&lt;/code&gt;를 알기 위해서는 &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;setGenericCommand&lt;/code&gt;함수도 알아야 한다. 왜냐하면, 아래와 같은 이유다!&lt;/p&gt;

&lt;blockquote style=&quot;padding: 15px 20px; margin: 0 0 1.1em; border-left: 5px solid rgba(102,128,153,0.075); border-left-width: 10px; background-color: rgba(102,128,153,0.05); border-top-right-radius: 5px; border-bottom-right-radius: 5px;&quot;&gt;
  &lt;p style=&quot;margin: 0 0 1.1em; font-size: 1em; font-weight: 300; margin-bottom: 0; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;setGenericCommand() 함수는 SET 연산을 구현합니다. 이때, 각기다른 옵션과 약간의 변형된 형태도 처리합니다. 이 함수는 SET, SETEX, PSETEX, SETNX를 처리하기 위해 call됩니다.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p style=&quot;margin: 0 0 1.1em; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;쟤가 진짜 처리하는 애니까! 그래도 &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;setCommand&lt;/code&gt;를 보기로 했으니 먼저 보자. 조금 있다가 &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;setGenericCommand&lt;/code&gt;도 함께 보자.&lt;/p&gt;&lt;p style=&quot;margin: 0 0 1.1em; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;&lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;char *a&lt;/code&gt;는 명령어 문자열이라 생각하자. NX인지 XX인지, EX인지, PX인지 확인하는 제어문인거 같다. 그냥 넘어가자. 그리고 나면 나오는 &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;tryObjectEncoding&lt;/code&gt;이 함수가 무엇을 하는지 찾아야하는데,  찾아가보자.&lt;/p&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 1.6;&quot;&gt;

&lt;h2 style=&quot;font-family: inherit; font-weight: bold; line-height: 1.1; margin-top: 21px; margin-bottom: 10.5px; font-size: 2.15em; margin: 1.2em 0 .6em 0; text-align: start; color: rgba(0,0,0,0.8);&quot;&gt;tryObjectEncoding 함수에 대하여&lt;/h2&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 1.6;&quot;&gt;

&lt;pre style=&quot;word-break: break-word; font-family: 'Source Code Pro',monospace; white-space: pre-wrap; display: block; background-color: rgba(102,128,153,0.05); color: #333; word-wrap: break-word; font-size: .9em; background: #f6f6f6; line-height: 1.6; margin: 0 0 1.1em; padding: 2px; border: 0; border-radius: 5px; text-align: start;&quot;&gt;&lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: inherit; background-color: transparent; white-space: pre-wrap; border-radius: 0; color: #f8f8f2; display: block; background: #23241f; padding: 18px 28px;&quot;&gt;&lt;span style=&quot;line-height: 1.6; color: #75715e;&quot;&gt;// obejct.c&lt;/span&gt;

robj *tryObjectEncoding(robj *o) {
    long value;
    sds s = o-&amp;gt;ptr;
    size_t len;

    redisAssertWithInfo(NULL,o,o-&amp;gt;&lt;span style=&quot;line-height: 1.6; color: #f92672;&quot;&gt;type&lt;/span&gt; == REDIS_STRING); &lt;span style=&quot;line-height: 1.6; color: #75715e;&quot;&gt;// string 맞는지 확인.&lt;/span&gt;

    &lt;span style=&quot;line-height: 1.6; color: #f92672;&quot;&gt;if&lt;/span&gt; (!sdsEncodedObject(o)) &lt;span style=&quot;line-height: 1.6; color: #f92672;&quot;&gt;return&lt;/span&gt; o; &lt;span style=&quot;line-height: 1.6; color: #75715e;&quot;&gt;// RAW나 EMBSTR 인코딩 된 애들이 아니면, 그냥 반환.&lt;/span&gt;

    &lt;span style=&quot;line-height: 1.6; color: #f92672;&quot;&gt;if&lt;/span&gt; (o-&amp;gt;refcount &amp;gt; &lt;span style=&quot;line-height: 1.6; color: #ae81ff;&quot;&gt;1&lt;/span&gt;) &lt;span style=&quot;line-height: 1.6; color: #f92672;&quot;&gt;return&lt;/span&gt; o; &lt;span style=&quot;line-height: 1.6; color: #75715e;&quot;&gt;// 혹시 이 string을 참조하는 애가 있는지 확인. 있으면 그냥 반환.&lt;/span&gt;

    &lt;span style=&quot;line-height: 1.6; color: #75715e;&quot;&gt;/* 21자리가 넘는지 확인. 넘으면 INT일 수 없으니까.
     * 그리고 long으로 처리될 수 있는지, string2l 유틸 함수로 시도해봄.
     * 그리고 long으로 처리된 값을 value에 집어넣음. 처리 실패시 0(false)반환. */&lt;/span&gt;
    len = sdslen(s);
    &lt;span style=&quot;line-height: 1.6; color: #f92672;&quot;&gt;if&lt;/span&gt; (len &amp;lt;= &lt;span style=&quot;line-height: 1.6; color: #ae81ff;&quot;&gt;21&lt;/span&gt; &amp;amp;&amp;amp; string2l(s,len,&amp;amp;value)) {
        &lt;span style=&quot;line-height: 1.6; color: #f92672;&quot;&gt;if&lt;/span&gt; ((server.maxmemory == &lt;span style=&quot;line-height: 1.6; color: #ae81ff;&quot;&gt;0&lt;/span&gt; ||
             (server.maxmemory_policy != REDIS_MAXMEMORY_VOLATILE_LRU &amp;amp;&amp;amp;
              server.maxmemory_policy != REDIS_MAXMEMORY_ALLKEYS_LRU)) &amp;amp;&amp;amp;
            value &amp;gt;= &lt;span style=&quot;line-height: 1.6; color: #ae81ff;&quot;&gt;0&lt;/span&gt; &amp;amp;&amp;amp;
            value &amp;lt; REDIS_SHARED_INTEGERS) &lt;span style=&quot;line-height: 1.6; color: #75715e;&quot;&gt;// 공유된 INTEGER 값으로 처리 가능한지 확인.&lt;/span&gt;
        { &lt;span style=&quot;line-height: 1.6; color: #75715e;&quot;&gt;// 공유된 INTEGER값으로 처리 가능!&lt;/span&gt;
            decrRefCount(o); &lt;span style=&quot;line-height: 1.6; color: #75715e;&quot;&gt;// 참조를 지우고, 메모리 할당 해제.&lt;/span&gt;
            incrRefCount(shared.integers[value]); &lt;span style=&quot;line-height: 1.6; color: #75715e;&quot;&gt;// 공유된 INTEGER 값 ref count 증가.&lt;/span&gt;
            &lt;span style=&quot;line-height: 1.6; color: #f92672;&quot;&gt;return&lt;/span&gt; shared.integers[value]; &lt;span style=&quot;line-height: 1.6; color: #75715e;&quot;&gt;// 공유된 INTEGER 반환.&lt;/span&gt;
        } &lt;span style=&quot;line-height: 1.6; color: #f92672;&quot;&gt;else&lt;/span&gt; { &lt;span style=&quot;line-height: 1.6; color: #75715e;&quot;&gt;// 공유된 INTEGER론 불가능하지만 long으로 가능하다면,&lt;/span&gt;
            &lt;span style=&quot;line-height: 1.6; color: #f92672;&quot;&gt;if&lt;/span&gt; (o-&amp;gt;encoding == REDIS_ENCODING_RAW) sdsfree(o-&amp;gt;ptr); &lt;span style=&quot;line-height: 1.6; color: #75715e;&quot;&gt;// 메모리 해제&lt;/span&gt;
            o-&amp;gt;encoding = REDIS_ENCODING_INT; &lt;span style=&quot;line-height: 1.6; color: #75715e;&quot;&gt;// INT로 인코딩 타입 변경&lt;/span&gt;
            o-&amp;gt;ptr = (void*) value; &lt;span style=&quot;line-height: 1.6; color: #75715e;&quot;&gt;// 위에서 string2l로 만든 value 할당.&lt;/span&gt;
            &lt;span style=&quot;line-height: 1.6; color: #f92672;&quot;&gt;return&lt;/span&gt; o;
        }
    }

    &lt;span style=&quot;line-height: 1.6; color: #f92672;&quot;&gt;if&lt;/span&gt; (len &amp;lt;= REDIS_ENCODING_EMBSTR_SIZE_LIMIT) { &lt;span style=&quot;line-height: 1.6; color: #75715e;&quot;&gt;// 위에꺼 실패하고 EMBSTR 제한 사이즈의 최댓값보다 작으면,&lt;/span&gt;
        robj *emb;

        &lt;span style=&quot;line-height: 1.6; color: #f92672;&quot;&gt;if&lt;/span&gt; (o-&amp;gt;encoding == REDIS_ENCODING_EMBSTR) &lt;span style=&quot;line-height: 1.6; color: #f92672;&quot;&gt;return&lt;/span&gt; o; &lt;span style=&quot;line-height: 1.6; color: #75715e;&quot;&gt;// 이미 EMBSTR이면 그냥 반환.&lt;/span&gt;
        emb = createEmbeddedStringObject(s,sdslen(s)); &lt;span style=&quot;line-height: 1.6; color: #75715e;&quot;&gt;// 아니면, EMBSTR로 다시 인코딩 해 생성.&lt;/span&gt;
        decrRefCount(o); &lt;span style=&quot;line-height: 1.6; color: #75715e;&quot;&gt;// 원래 애 메모리 해제&lt;/span&gt;
        &lt;span style=&quot;line-height: 1.6; color: #f92672;&quot;&gt;return&lt;/span&gt; emb; &lt;span style=&quot;line-height: 1.6; color: #75715e;&quot;&gt;// EMBSTR 반환.&lt;/span&gt;
    }

    &lt;span style=&quot;line-height: 1.6; color: #75715e;&quot;&gt;/* 어떤 인코딩도 해낼 수 없었다면, 마지막으로 최대한 공간을 적게 쓰기위해 SDS string을 컴팩션한다. */&lt;/span&gt;
    &lt;span style=&quot;line-height: 1.6; color: #f92672;&quot;&gt;if&lt;/span&gt; (o-&amp;gt;encoding == REDIS_ENCODING_RAW &amp;amp;&amp;amp;
        sdsavail(s) &amp;gt; len/&lt;span style=&quot;line-height: 1.6; color: #ae81ff;&quot;&gt;10&lt;/span&gt;)
    {
        o-&amp;gt;ptr = sdsRemoveFreeSpace(o-&amp;gt;ptr);
    }

    &lt;span style=&quot;line-height: 1.6; color: #f92672;&quot;&gt;return&lt;/span&gt; o;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;p style=&quot;margin: 0 0 1.1em; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;공간을 최대한 절약하기 위해 인코딩을 시도하는 함수다. 뭔저 저 &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;SDS&lt;/code&gt;혹은 &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;sds&lt;/code&gt;란 단어(함수앞에 엄청 많지 않은가.)에 대해 알아야겠는데, SDS가 뭔지 궁금해서 찾아보니, &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;simple danamic string&lt;/code&gt;이라는 라이브러리였다. 이 라이브러리는 C언어를 위한 스트링 라이브러린데, 바이너리 세이프하고, 더 쉽게 C언어에서 스트링을 사용할 수 있게 해준다고 한다. &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;Redis&lt;/code&gt;는 이 라이브러릴 사용해 스트링을 표현한다.&lt;/p&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 1.6;&quot;&gt;

&lt;pre style=&quot;word-break: break-word; font-family: 'Source Code Pro',monospace; white-space: pre-wrap; display: block; background-color: rgba(102,128,153,0.05); color: #333; word-wrap: break-word; font-size: .9em; background: #f6f6f6; line-height: 1.6; margin: 0 0 1.1em; padding: 2px; border: 0; border-radius: 5px; text-align: start;&quot;&gt;&lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: inherit; background-color: transparent; white-space: pre-wrap; border-radius: 0; color: #f8f8f2; display: block; background: #23241f; padding: 18px 28px;&quot;&gt;&lt;span style=&quot;line-height: 1.6; color: #a6e22e;&quot;&gt;+--------+&lt;/span&gt;-------------------------------&lt;span style=&quot;line-height: 1.6; color: #a6e22e;&quot;&gt;+-----------+&lt;/span&gt;
&lt;span style=&quot;line-height: 1.6; color: #f92672;&quot;&gt;| Header | Binary safe C alike string... | Null term |
+--------+-------------------------------+-----------+&lt;/span&gt;
&lt;span style=&quot;line-height: 1.6; color: #a6e22e;&quot;&gt;         |&lt;/span&gt;
&lt;span style=&quot;line-height: 1.6; color: #a6e22e;&quot;&gt;         `-&amp;gt; Pointer returned to the user.&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;p style=&quot;margin: 0 0 1.1em; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;&lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;sds&lt;/code&gt;는 이런 개념을 사용하여, 헤더에 메타 데이터를 저장할 수 있게 한다. 기존 C언어의 스트링이 사용하다보면 불편한게 한두가지가 아니다보니 쓰는 듯 하다. 아무튼 얘는 이렇게 생겨먹어서, 사용하다보면 공간이 남는 경우가 있는데, redis는 최대한의 메모리 활용을 위해 이 여유분이 10%를 넘으면, &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;Shrinking string&lt;/code&gt;(메모리를 컴팩션 하는.) 작업을 통해 최대한 메모리를 아낀다. 이때 호출하는 &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;sds&lt;/code&gt;라이브러리의 함수가 바로 &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;sds sdsRemoveFreeSpace(sds s);&lt;/code&gt;다. 과거(2.6버전)에는 이 작업이 없었던 것 같은데, 생겼다.&lt;/p&gt;&lt;p style=&quot;margin: 0 0 1.1em; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;과거에는 &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;EMBSTR&lt;/code&gt; 인코딩 타입이 없었으나 새로 생겼다. 이 새로생긴 이상한 이름의 인코딩 타입은, 정말 신박한 아이디어인데, redisObject와 연속적으로 이 &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;sds string&lt;/code&gt;을 위치 시키는 방법의 인코딩이다. 즉 연속적인 메모리에 함께 위치한다. 그리고 이 &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;sds string&lt;/code&gt;는 수정이 불가능하다. 아래 그림으로 어떤 말인지 살펴보자.&lt;/p&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 1.6;&quot;&gt;

&lt;pre style=&quot;word-break: break-word; font-family: 'Source Code Pro',monospace; white-space: pre-wrap; display: block; background-color: rgba(102,128,153,0.05); color: #333; word-wrap: break-word; font-size: .9em; background: #f6f6f6; line-height: 1.6; margin: 0 0 1.1em; padding: 2px; border: 0; border-radius: 5px; text-align: start;&quot;&gt;&lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: inherit; background-color: transparent; white-space: pre-wrap; border-radius: 0; color: #f8f8f2; display: block; background: #23241f; padding: 18px 28px;&quot;&gt;&lt;span style=&quot;line-height: 1.6; color: #a6e22e;&quot;&gt;+--------------+&lt;/span&gt;-----------&lt;span style=&quot;line-height: 1.6; color: #a6e22e;&quot;&gt;+------------+&lt;/span&gt;--------&lt;span style=&quot;line-height: 1.6; color: #a6e22e;&quot;&gt;+----+&lt;/span&gt;
&lt;span style=&quot;line-height: 1.6; color: #f92672;&quot;&gt;| robj data... | robj-&amp;gt;ptr | sds header | string | \0 |
+--------------+-----+-----+------------+--------+----+&lt;/span&gt;
&lt;span style=&quot;line-height: 1.6; color: #a6e22e;&quot;&gt;                     |                       ^&lt;/span&gt;
&lt;span style=&quot;line-height: 1.6; color: #a6e22e;&quot;&gt;                     +-----------------------+&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;p style=&quot;margin: 0 0 1.1em; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;이런식이다. 이 경우, 원래 스트링 처리 기법은 그대로 사용할 수 있으면서도,  &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;cache locality&lt;/code&gt;를 극대화 할 수 있어 유리하다고 한다. 이게 무슨말이냐면, 메모리 주소에 접근할 때, 보통 해당 주소 뿐만 아니라 주변까지 포함한 블록 전부를 캐시에 가져오게 되는데, 이렇게 &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;redisObject&lt;/code&gt;와 붙여놓으면 당연히 함께 캐시되니 퍼포먼스상 이득일 수 밖에 없다는 것이다. 또 시스템 콜(매우 느린)에서도 이득인데, 원래 할당을 을 &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;robj&lt;/code&gt;위해 한번, &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;robj-&amp;gt;ptr&lt;/code&gt;을 위해 한번 더, 총2번했어야하는데 이제 한방에 할 수 있다는 퍼포먼스상 이점이 있다.  당연히 초기화나 조회, 메모리 카피시도 매번 유리해진다. 이런 세심함! 레디스의 성능은 여기서 나오나보다.&lt;/p&gt;&lt;p style=&quot;margin: 0 0 1.1em; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;뿐만 아니라, 코드에서도 이런 세심함은 느껴진다. (물론 다들 이렇게 하긴 할건데… 내가 안하던거라..)&lt;/p&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 1.6;&quot;&gt;

&lt;pre style=&quot;word-break: break-word; font-family: 'Source Code Pro',monospace; white-space: pre-wrap; display: block; background-color: rgba(102,128,153,0.05); color: #333; word-wrap: break-word; font-size: .9em; background: #f6f6f6; line-height: 1.6; margin: 0 0 1.1em; padding: 2px; border: 0; border-radius: 5px; text-align: start;&quot;&gt;&lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: inherit; background-color: transparent; white-space: pre-wrap; border-radius: 0; color: #f8f8f2; display: block; background: #23241f; padding: 18px 28px;&quot;&gt;&lt;span style=&quot;line-height: 1.6; color: #75715e;&quot;&gt;// redis.h&lt;/span&gt;

&lt;span style=&quot;line-height: 1.6; color: #f8f8f2;&quot;&gt;#define&lt;/span&gt; redisAssertWithInfo(_c,_o,_e) ((_e)&lt;span style=&quot;line-height: 1.6; color: #e6db74;&quot;&gt;?&lt;/span&gt;(&lt;span style=&quot;line-height: 1.6; color: #ae81ff;&quot;&gt;void&lt;/span&gt;)&lt;span style=&quot;line-height: 1.6; color: #ae81ff;&quot;&gt;0&lt;/span&gt; : (_redisAssertWithInfo(_c,_o,&lt;span style=&quot;line-height: 1.6; color: #f8f8f2;&quot;&gt;#_e&lt;/span&gt;,__FILE__,__LINE__),_exit(&lt;span style=&quot;line-height: 1.6; color: #ae81ff;&quot;&gt;1&lt;/span&gt;)))

&lt;span style=&quot;line-height: 1.6; color: #f8f8f2;&quot;&gt;#define&lt;/span&gt; sdsEncodedObject(objptr) (objptr&lt;span style=&quot;line-height: 1.6; color: #e6db74;&quot;&gt;-&amp;gt;&lt;/span&gt;encoding &lt;span style=&quot;line-height: 1.6; color: #e6db74;&quot;&gt;==&lt;/span&gt; REDIS_ENCODING_RAW &lt;span style=&quot;line-height: 1.6; color: #e6db74;&quot;&gt;||&lt;/span&gt; objptr&lt;span style=&quot;line-height: 1.6; color: #e6db74;&quot;&gt;-&amp;gt;&lt;/span&gt;encoding &lt;span style=&quot;line-height: 1.6; color: #e6db74;&quot;&gt;==&lt;/span&gt; REDIS_ENCODING_EMBSTR)
&lt;/code&gt;&lt;/pre&gt;

&lt;p style=&quot;margin: 0 0 1.1em; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;&lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;redisAssertWithInfo&lt;/code&gt;나 &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;sdsEncodedObject&lt;/code&gt;같은 애들을 보면 레디스는 왠만한 애들은 함수를 안쓰고 &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;#define&lt;/code&gt;을 이용해 정의했다. 나라면 함수로 만들었을 것 같은데, 어떻게해서든 운영 자원을 아끼려는 노력의 일환으로 보였다.&lt;/p&gt;

&lt;/div&gt;
&lt;div style=&quot;line-height: 1.6;&quot;&gt;

&lt;h2 style=&quot;font-family: inherit; font-weight: bold; line-height: 1.1; margin-top: 21px; margin-bottom: 10.5px; font-size: 2.15em; margin: 1.2em 0 .6em 0; text-align: start; color: rgba(0,0,0,0.8);&quot;&gt;다시 돌아오자. setCommand로.&lt;/h2&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 1.6;&quot;&gt;

&lt;pre style=&quot;word-break: break-word; font-family: 'Source Code Pro',monospace; white-space: pre-wrap; display: block; background-color: rgba(102,128,153,0.05); color: #333; word-wrap: break-word; font-size: .9em; background: #f6f6f6; line-height: 1.6; margin: 0 0 1.1em; padding: 2px; border: 0; border-radius: 5px; text-align: start;&quot;&gt;&lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: inherit; background-color: transparent; white-space: pre-wrap; border-radius: 0; color: #f8f8f2; display: block; background: #23241f; padding: 18px 28px;&quot;&gt;// t_string.c

void setCommand(redisClient *c) {

    // &lt;span style=&quot;line-height: 1.6; color: #f92672;&quot;&gt;...&lt;/span&gt; 중략 &lt;span style=&quot;line-height: 1.6; color: #f92672;&quot;&gt;...&lt;/span&gt;

    c-&amp;gt;argv[&lt;span style=&quot;line-height: 1.6; color: #ae81ff;&quot;&gt;2&lt;/span&gt;] = tryObjectEncoding(c-&amp;gt;argv[&lt;span style=&quot;line-height: 1.6; color: #ae81ff;&quot;&gt;2&lt;/span&gt;]); // 얘는 뭔가?
    setGenericCommand(c,flags,c-&amp;gt;argv[&lt;span style=&quot;line-height: 1.6; color: #ae81ff;&quot;&gt;1&lt;/span&gt;],c-&amp;gt;argv[&lt;span style=&quot;line-height: 1.6; color: #ae81ff;&quot;&gt;2&lt;/span&gt;],expire,unit,&lt;span style=&quot;line-height: 1.6; color: #ae81ff;&quot;&gt;NULL&lt;/span&gt;,&lt;span style=&quot;line-height: 1.6; color: #ae81ff;&quot;&gt;NULL&lt;/span&gt;);
}
&lt;/code&gt;&lt;/pre&gt;

&lt;p style=&quot;margin: 0 0 1.1em; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;이제 그 인코딩 된 내용을 &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;c-&amp;gt;argv[2]&lt;/code&gt;에 집어넣는다는 것을 알게 됐다. 저기에는 &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;robj&lt;/code&gt;의 포인터가 저장된다. 아마, 그게 &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;set&lt;/code&gt;명령어의 인자로 쓰이는 것 같다. 이제 실제 일을 처리하는 &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;setGenericCommand&lt;/code&gt;을 살펴볼 차례다.&lt;/p&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 1.6;&quot;&gt;

&lt;pre style=&quot;word-break: break-word; font-family: 'Source Code Pro',monospace; white-space: pre-wrap; display: block; background-color: rgba(102,128,153,0.05); color: #333; word-wrap: break-word; font-size: .9em; background: #f6f6f6; line-height: 1.6; margin: 0 0 1.1em; padding: 2px; border: 0; border-radius: 5px; text-align: start;&quot;&gt;&lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: inherit; background-color: transparent; white-space: pre-wrap; border-radius: 0; color: #f8f8f2; display: block; background: #23241f; padding: 18px 28px;&quot;&gt;&lt;span style=&quot;line-height: 1.6; color: #75715e;&quot;&gt;// t_string.c&lt;/span&gt;

&lt;span style=&quot;line-height: 1.6; color: #ae81ff;&quot;&gt;void&lt;/span&gt; setGenericCommand(redisClient &lt;span style=&quot;line-height: 1.6; color: #e6db74;&quot;&gt;*&lt;/span&gt;c, int flags, robj &lt;span style=&quot;line-height: 1.6; color: #e6db74;&quot;&gt;*&lt;/span&gt;key, robj &lt;span style=&quot;line-height: 1.6; color: #e6db74;&quot;&gt;*&lt;/span&gt;val, robj &lt;span style=&quot;line-height: 1.6; color: #e6db74;&quot;&gt;*&lt;/span&gt;expire, int unit, robj &lt;span style=&quot;line-height: 1.6; color: #e6db74;&quot;&gt;*&lt;/span&gt;ok_reply, robj &lt;span style=&quot;line-height: 1.6; color: #e6db74;&quot;&gt;*&lt;/span&gt;abort_reply) {
    long long milliseconds &lt;span style=&quot;line-height: 1.6; color: #e6db74;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;line-height: 1.6; color: #ae81ff;&quot;&gt;0&lt;/span&gt;; &lt;span style=&quot;line-height: 1.6; color: #75715e;&quot;&gt;/* initialized to avoid any harmness warning */&lt;/span&gt;

    &lt;span style=&quot;line-height: 1.6; color: #f92672;&quot;&gt;if&lt;/span&gt; (expire) {
        &lt;span style=&quot;line-height: 1.6; color: #f92672;&quot;&gt;if&lt;/span&gt; (getLongLongFromObjectOrReply(c, expire, &lt;span style=&quot;line-height: 1.6; color: #e6db74;&quot;&gt;&amp;amp;&lt;/span&gt;milliseconds, &lt;span style=&quot;line-height: 1.6; color: #e6db74;&quot;&gt;NULL&lt;/span&gt;) &lt;span style=&quot;line-height: 1.6; color: #e6db74;&quot;&gt;!=&lt;/span&gt; REDIS_OK)
            &lt;span style=&quot;line-height: 1.6; color: #f92672;&quot;&gt;return&lt;/span&gt;;
        &lt;span style=&quot;line-height: 1.6; color: #f92672;&quot;&gt;if&lt;/span&gt; (milliseconds &lt;span style=&quot;line-height: 1.6; color: #e6db74;&quot;&gt;&amp;lt;=&lt;/span&gt; &lt;span style=&quot;line-height: 1.6; color: #ae81ff;&quot;&gt;0&lt;/span&gt;) {
            addReplyErrorFormat(c,&lt;span style=&quot;line-height: 1.6; color: #e6db74;&quot;&gt;&quot;invalid expire time in %s&quot;&lt;/span&gt;,c&lt;span style=&quot;line-height: 1.6; color: #e6db74;&quot;&gt;-&amp;gt;&lt;/span&gt;cmd&lt;span style=&quot;line-height: 1.6; color: #e6db74;&quot;&gt;-&amp;gt;&lt;/span&gt;name);
            &lt;span style=&quot;line-height: 1.6; color: #f92672;&quot;&gt;return&lt;/span&gt;;
        }
        &lt;span style=&quot;line-height: 1.6; color: #f92672;&quot;&gt;if&lt;/span&gt; (unit &lt;span style=&quot;line-height: 1.6; color: #e6db74;&quot;&gt;==&lt;/span&gt; UNIT_SECONDS) milliseconds &lt;span style=&quot;line-height: 1.6; color: #e6db74;&quot;&gt;*=&lt;/span&gt; &lt;span style=&quot;line-height: 1.6; color: #ae81ff;&quot;&gt;1000&lt;/span&gt;;
    }

    &lt;span style=&quot;line-height: 1.6; color: #f92672;&quot;&gt;if&lt;/span&gt; ((flags &lt;span style=&quot;line-height: 1.6; color: #e6db74;&quot;&gt;&amp;amp;&lt;/span&gt; REDIS_SET_NX &lt;span style=&quot;line-height: 1.6; color: #e6db74;&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; lookupKeyWrite(c&lt;span style=&quot;line-height: 1.6; color: #e6db74;&quot;&gt;-&amp;gt;&lt;/span&gt;db,key) &lt;span style=&quot;line-height: 1.6; color: #e6db74;&quot;&gt;!=&lt;/span&gt; &lt;span style=&quot;line-height: 1.6; color: #e6db74;&quot;&gt;NULL&lt;/span&gt;) &lt;span style=&quot;line-height: 1.6; color: #e6db74;&quot;&gt;||&lt;/span&gt;
        (flags &lt;span style=&quot;line-height: 1.6; color: #e6db74;&quot;&gt;&amp;amp;&lt;/span&gt; REDIS_SET_XX &lt;span style=&quot;line-height: 1.6; color: #e6db74;&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; lookupKeyWrite(c&lt;span style=&quot;line-height: 1.6; color: #e6db74;&quot;&gt;-&amp;gt;&lt;/span&gt;db,key) &lt;span style=&quot;line-height: 1.6; color: #e6db74;&quot;&gt;==&lt;/span&gt; &lt;span style=&quot;line-height: 1.6; color: #e6db74;&quot;&gt;NULL&lt;/span&gt;))
    {
        addReply(c, abort_reply &lt;span style=&quot;line-height: 1.6; color: #e6db74;&quot;&gt;?&lt;/span&gt; abort_reply : shared&lt;span style=&quot;line-height: 1.6; color: #e6db74;&quot;&gt;.&lt;/span&gt;nullbulk);
        &lt;span style=&quot;line-height: 1.6; color: #f92672;&quot;&gt;return&lt;/span&gt;;
    }
    setKey(c&lt;span style=&quot;line-height: 1.6; color: #e6db74;&quot;&gt;-&amp;gt;&lt;/span&gt;db,key,val);
    server&lt;span style=&quot;line-height: 1.6; color: #e6db74;&quot;&gt;.&lt;/span&gt;dirty&lt;span style=&quot;line-height: 1.6; color: #e6db74;&quot;&gt;++&lt;/span&gt;;
    &lt;span style=&quot;line-height: 1.6; color: #f92672;&quot;&gt;if&lt;/span&gt; (expire) setExpire(c&lt;span style=&quot;line-height: 1.6; color: #e6db74;&quot;&gt;-&amp;gt;&lt;/span&gt;db,key,mstime()&lt;span style=&quot;line-height: 1.6; color: #e6db74;&quot;&gt;+&lt;/span&gt;milliseconds);
    notifyKeyspaceEvent(REDIS_NOTIFY_STRING,&lt;span style=&quot;line-height: 1.6; color: #e6db74;&quot;&gt;&quot;set&quot;&lt;/span&gt;,key,c&lt;span style=&quot;line-height: 1.6; color: #e6db74;&quot;&gt;-&amp;gt;&lt;/span&gt;db&lt;span style=&quot;line-height: 1.6; color: #e6db74;&quot;&gt;-&amp;gt;&lt;/span&gt;id);
    &lt;span style=&quot;line-height: 1.6; color: #f92672;&quot;&gt;if&lt;/span&gt; (expire) notifyKeyspaceEvent(REDIS_NOTIFY_GENERIC,
        &lt;span style=&quot;line-height: 1.6; color: #e6db74;&quot;&gt;&quot;expire&quot;&lt;/span&gt;,key,c&lt;span style=&quot;line-height: 1.6; color: #e6db74;&quot;&gt;-&amp;gt;&lt;/span&gt;db&lt;span style=&quot;line-height: 1.6; color: #e6db74;&quot;&gt;-&amp;gt;&lt;/span&gt;id);
    addReply(c, ok_reply &lt;span style=&quot;line-height: 1.6; color: #e6db74;&quot;&gt;?&lt;/span&gt; ok_reply : shared&lt;span style=&quot;line-height: 1.6; color: #e6db74;&quot;&gt;.&lt;/span&gt;ok);
}&lt;/code&gt;&lt;/pre&gt;

&lt;p style=&quot;margin: 0 0 1.1em; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;&lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;expire&lt;/code&gt;와 관련된 구현은 다음에 살펴보기로하자. 지금 중요한 것은 &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;setKey&lt;/code&gt;함수다. &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;addReply&lt;/code&gt;함수는 &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;OK&lt;/code&gt;응답을 하는 함수다. 저기를 보면, default가 &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;shared.ok&lt;/code&gt;다.  그렇다. &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;SET&lt;/code&gt; 커맨드는 실패하지 않는다.&lt;/p&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 1.6;&quot;&gt;

&lt;pre style=&quot;word-break: break-word; font-family: 'Source Code Pro',monospace; white-space: pre-wrap; display: block; background-color: rgba(102,128,153,0.05); color: #333; word-wrap: break-word; font-size: .9em; background: #f6f6f6; line-height: 1.6; margin: 0 0 1.1em; padding: 2px; border: 0; border-radius: 5px; text-align: start;&quot;&gt;&lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: inherit; background-color: transparent; white-space: pre-wrap; border-radius: 0; color: #f8f8f2; display: block; background: #23241f; padding: 18px 28px;&quot;&gt;&lt;span style=&quot;line-height: 1.6; color: #75715e;&quot;&gt;// db.c&lt;/span&gt;

void setKey(redisDb *db, robj *key, robj *&lt;span style=&quot;line-height: 1.6; color: #f92672;&quot;&gt;&lt;span style=&quot;line-height: 1.6; color: #66d9ef;&quot;&gt;val&lt;/span&gt;) {&lt;/span&gt;
    &lt;span style=&quot;line-height: 1.6; color: #f92672;&quot;&gt;if&lt;/span&gt; (lookupKeyWrite(db,key) == &lt;span style=&quot;line-height: 1.6;&quot;&gt;NULL&lt;/span&gt;) {
        dbAdd(db,key,&lt;span style=&quot;line-height: 1.6; color: #f92672;&quot;&gt;&lt;span style=&quot;line-height: 1.6; color: #66d9ef;&quot;&gt;val&lt;/span&gt;);&lt;/span&gt;
    } &lt;span style=&quot;line-height: 1.6; color: #f92672;&quot;&gt;else&lt;/span&gt; {
        dbOverwrite(db,key,&lt;span style=&quot;line-height: 1.6; color: #f92672;&quot;&gt;&lt;span style=&quot;line-height: 1.6; color: #66d9ef;&quot;&gt;val&lt;/span&gt;);&lt;/span&gt;
    }
    incrRefCount(&lt;span style=&quot;line-height: 1.6; color: #f92672;&quot;&gt;&lt;span style=&quot;line-height: 1.6; color: #66d9ef;&quot;&gt;val&lt;/span&gt;);&lt;/span&gt;
    removeExpire(db,key);
    signalModifiedKey(db,key); &lt;span style=&quot;line-height: 1.6; color: #75715e;&quot;&gt;// client들에게 변경 이벤트를 알린다.&lt;/span&gt;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;p style=&quot;margin: 0 0 1.1em; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;&lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;setKey&lt;/code&gt; 함수는 고수준의 &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;Set operation&lt;/code&gt;을 표현하는 함수다. 이 함수는 현재 해당 키를 가진 object가 있는지 없는지 검사하고, 있다면 overwrite를, 없다면 새 object를 할당하는 역할을 한다.  &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;incrRefCount&lt;/code&gt;는 해당 값이 1회 참조됨을 의미하며, 저장되면서 &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;key&lt;/code&gt;에 참조됐음을 표현한다. 기존에 &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;key&lt;/code&gt;에 할당되어있던 &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;expire&lt;/code&gt;은 없앤다. (키에 새로운 값이 할당되었으므로 기존에 있던건 제거해야.)  &lt;/p&gt;&lt;p style=&quot;margin: 0 0 1.1em; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;&lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;signalModifiedKey&lt;/code&gt;는 다음에 알아보도록 하자.&lt;/p&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 1.6;&quot;&gt;

&lt;h2 style=&quot;font-family: inherit; font-weight: bold; line-height: 1.1; margin-top: 21px; margin-bottom: 10.5px; font-size: 2.15em; margin: 1.2em 0 .6em 0; text-align: start; color: rgba(0,0,0,0.8);&quot;&gt;getCommand도 알아보자.&lt;/h2&gt;

&lt;/div&gt;
&lt;div style=&quot;line-height: 1.6;&quot;&gt;

&lt;pre style=&quot;word-break: break-word; font-family: 'Source Code Pro',monospace; white-space: pre-wrap; display: block; background-color: rgba(102,128,153,0.05); color: #333; word-wrap: break-word; font-size: .9em; background: #f6f6f6; line-height: 1.6; margin: 0 0 1.1em; padding: 2px; border: 0; border-radius: 5px; text-align: start;&quot;&gt;&lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: inherit; background-color: transparent; white-space: pre-wrap; border-radius: 0; color: #f8f8f2; display: block; background: #23241f; padding: 18px 28px;&quot;&gt;int getGenericCommand(redisClient *&lt;span style=&quot;line-height: 1.6; color: #e6db74;&quot;&gt;c&lt;/span&gt;) {
    robj *o;

    &lt;span style=&quot;line-height: 1.6; color: #f92672;&quot;&gt;if&lt;/span&gt; ((o = lookupKeyReadOrReply(&lt;span style=&quot;line-height: 1.6; color: #e6db74;&quot;&gt;c&lt;/span&gt;,&lt;span style=&quot;line-height: 1.6; color: #e6db74;&quot;&gt;c&lt;/span&gt;-&amp;gt;argv[&lt;span style=&quot;line-height: 1.6; color: #ae81ff;&quot;&gt;1&lt;/span&gt;],shared.nullbulk)) == &lt;span style=&quot;line-height: 1.6;&quot;&gt;NULL&lt;/span&gt;)
        &lt;span style=&quot;line-height: 1.6; color: #f92672;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;line-height: 1.6;&quot;&gt;REDIS_OK&lt;/span&gt;;

    &lt;span style=&quot;line-height: 1.6; color: #f92672;&quot;&gt;if&lt;/span&gt; (o-&amp;gt;type != &lt;span style=&quot;line-height: 1.6;&quot;&gt;REDIS_STRING&lt;/span&gt;) {
        addReply(&lt;span style=&quot;line-height: 1.6; color: #e6db74;&quot;&gt;c&lt;/span&gt;,shared.wrongtypeerr);
        &lt;span style=&quot;line-height: 1.6; color: #f92672;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;line-height: 1.6;&quot;&gt;REDIS_ERR&lt;/span&gt;;
    } &lt;span style=&quot;line-height: 1.6; color: #f92672;&quot;&gt;else&lt;/span&gt; {
        addReplyBulk(&lt;span style=&quot;line-height: 1.6; color: #e6db74;&quot;&gt;c&lt;/span&gt;,o);
        &lt;span style=&quot;line-height: 1.6; color: #f92672;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;line-height: 1.6;&quot;&gt;REDIS_OK&lt;/span&gt;;
    }
}

void getCommand(redisClient *&lt;span style=&quot;line-height: 1.6; color: #e6db74;&quot;&gt;c&lt;/span&gt;) {
    getGenericCommand(&lt;span style=&quot;line-height: 1.6; color: #e6db74;&quot;&gt;c&lt;/span&gt;);
}&lt;/code&gt;&lt;/pre&gt;

&lt;p style=&quot;margin: 0 0 1.1em; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;비교적 매우 간단하다. &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;c-&amp;gt;argv[1]&lt;/code&gt;(redis command의 &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;GET&lt;/code&gt;다음 인자)가 key다. &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;lookupKeyReadOrReply&lt;/code&gt;로 DB를 확인해 해당 키를 조회한 후, 반환한다.&lt;/p&gt;

&lt;/div&gt;
&lt;div style=&quot;line-height: 1.6;&quot;&gt;

&lt;h2 style=&quot;font-family: inherit; font-weight: bold; line-height: 1.1; margin-top: 21px; margin-bottom: 10.5px; font-size: 2.15em; margin: 1.2em 0 .6em 0; text-align: start; color: rgba(0,0,0,0.8);&quot;&gt;끝&lt;/h2&gt;

&lt;p style=&quot;margin: 0 0 1.1em; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;기본적인 구현에 대한 내용은 알아보았다.  &lt;br /&gt;
천천히 좀 더 자세히 들어가보자. 초반부터 오바하다 지치지 않도록 천천히.&lt;/p&gt;&lt;p style=&quot;margin: 0 0 1.1em; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;&lt;/p&gt;&lt;p style=&quot;margin: 0 0 1.1em; color: rgba(0,0,0,0.8); line-height: 1.6;&quot;&gt;&lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; background-color: #f9f2f4; white-space: normal; padding: 2px 5px; border-radius: 0; color: #fff; background: rgba(44,63,81,0.3); margin-right: 6px;&quot;&gt;태그&lt;/code&gt; &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; background-color: #f9f2f4; white-space: normal; padding: 2px 5px; color: rgba(44,63,81,0.5); border-radius: 0; background: rgba(102,128,153,0.075);&quot;&gt;티스토리&lt;/code&gt; &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; background-color: #f9f2f4; white-space: normal; padding: 2px 5px; color: rgba(44,63,81,0.5); border-radius: 0; background: rgba(102,128,153,0.075);&quot;&gt;redis&lt;/code&gt; &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; background-color: #f9f2f4; white-space: normal; padding: 2px 5px; color: rgba(44,63,81,0.5); border-radius: 0; background: rgba(102,128,153,0.075);&quot;&gt;레디스&lt;/code&gt; &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; background-color: #f9f2f4; white-space: normal; padding: 2px 5px; color: rgba(44,63,81,0.5); border-radius: 0; background: rgba(102,128,153,0.075);&quot;&gt;아키텍쳐&lt;/code&gt; &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; background-color: #f9f2f4; white-space: normal; padding: 2px 5px; color: rgba(44,63,81,0.5); border-radius: 0; background: rgba(102,128,153,0.075);&quot;&gt;내부구조&lt;/code&gt; &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; background-color: #f9f2f4; white-space: normal; padding: 2px 5px; color: rgba(44,63,81,0.5); border-radius: 0; background: rgba(102,128,153,0.075);&quot;&gt;소스&lt;/code&gt; &lt;/p&gt;&lt;p style=&quot;margin: 0 0 1.1em; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 1.6;&quot;&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;center style=&quot;display:none&quot;&gt;%23%20Redis%28%uB808%uB514%uC2A4%29%uC758%20%uAD6C%uD604%uACFC%20%uB0B4%uBD80%20%uAD6C%uC870%2C%20%uC791%uB3D9%20%uC6D0%uB9AC%20-%201%0A%0A%uC0C8%uB85C%uC6B4%20%uD504%uB85C%uC81D%uD2B8%uC778%20Haffle%uC5D0%uC11C%20%uB808%uB514%uC2A4%uB97C%20%uBA54%uC778%20%uB370%uC774%uD130%uBCA0%uC774%uC2A4%uB85C%20%uC0AC%uC6A9%uD558%uAE30%uB85C%20%uACB0%uC815%uD588%uB2E4.%20%uAF64%20%uB3C4%uC804%uC801%uC778%20%uC120%uD0DD%uC774%uACE0%20%uB0B4%20%uAE30%uC900%uC5D0%uC11C%uB294%20%uC57D%uAC04%uC758%20%uAE30%uC220%uC801%20%uB3C4%uC804%uC774%uAE30%uB3C4%20%uD558%uB2E4.%20%uC5B4%uB5BB%uAC8C%20%uD574%uC57C%20%uB808%uB514%uC2A4%uB85C%20%uC778%uC2A4%uD0C0%uADF8%uB7A8%uCC98%uB7FC%20%uC798%20%uB9CC%uB4E4%20%uC218%20%uC788%uC744%uAE4C%20%uACE0%uBBFC%uD558%uB2E4%uAC00%20%uCF54%uB4DC%uB97C%20%uD55C%uBC88%20%uC539%uC5B4%uBA39%uC5B4%uBCF4%uAE30%uB85C%20%uD588%uB2E4.%20%uB808%uB514%uC2A4%uC758%20%uC5EC%uB7EC%20%uBA85%uB839%uC5B4%uB97C%20%uC0AC%uC6A9%uD558%uBA74%uC11C%uB3C4%20%uB808%uB514%uC2A4%uC758%20%uAD6C%uD604%uC5D0%20%uB300%uD574%uC11C%uB294%20%uBB34%uC9C0%uD588%uB294%uB370%2C%20%uC774%uC81C%uBD80%uD130%20%uB808%uB514%uC2A4%uC5D0%20%uB300%uD55C%20%uB0B4%uBD80%20%uAD6C%uC870%uC640%20%uC138%uBD80%20%uAD6C%uD604%uC5D0%20%uB300%uD574%20%uC18C%uC2A4%20%uCF54%uB4DC%uB97C%20%uBD84%uC11D%uD574%20%uBCF4%uACE0%uC790%20%uD55C%uB2E4.%20%uC798%uBABB%uB41C%20%uB0B4%uC6A9%uC774%20%uC788%uC744%uC2DC%20%uC54C%uB824%uC8FC%uAE38%20%uBC14%uB780%uB2E4%21%0A%0A*%uB808%uB514%uC2A4%203.XX%20%uAE30%uC900%20%uC18C%uC2A4%uCF54%uB4DC%uC774%uB2E4.*%0A%0A%23%23%20%uB808%uB514%uC2A4%20%uAC1D%uCCB4%0A%0A%60%60%60%0A//%20redis.h%0A%0A%23define%20REDIS_LRU_BITS%2024%0A%23define%20REDIS_LRU_CLOCK_MAX%20%28%281%3C%3CREDIS_LRU_BITS%29-1%29%20/*%20Max%20value%20of%20obj-%3Elru%20*/%0A%23define%20REDIS_LRU_CLOCK_RESOLUTION%201000%20/*%20LRU%20clock%20resolution%20in%20ms%20*/%0Atypedef%20struct%20redisObject%20%7B%0A%20%20%20%20unsigned%20type%3A4%3B%0A%20%20%20%20unsigned%20encoding%3A4%3B%0A%20%20%20%20unsigned%20lru%3AREDIS_LRU_BITS%3B%20/*%20lru%20time%20%28relative%20to%20server.lruclock%29%20*/%0A%20%20%20%20int%20refcount%3B%0A%20%20%20%20void%20*ptr%3B%0A%7D%20robj%3B%0A%60%60%60%0Aredis.h%20%uC5D0%uC11C%20%uB808%uB514%uC2A4%uAC00%20%uC800%uC7A5%uB41C%20%uB370%uC774%uD130%uB97C%20%uAD00%uB9AC%uD558%uAE30%uC704%uD574%20%uC0AC%uC6A9%uD558%uB294%20redisObject%uC758%20%uAD6C%uC870%uCCB4%20%uD615%uC2DD%uC744%20%uD655%uC778%uD560%20%uC218%20%uC788%uB2E4.%20%uC544%uB2C8%20%uC0AC%uC2E4%20%uBAA8%uB4E0%20%uB808%uB514%uC2A4%20%uC6B4%uC601%uC744%20%uC704%uD55C%20%uBAA8%uB4E0%20%uBCC0%uC218%uB3C4%20%uC774%uAC78%uB85C%20%uAD00%uB9AC%uB41C%uB2E4.%20redis.h%uC5D0%uC11C%20%uCC98%uC74C%uC73C%uB85C%20%uB098%uC624%uB294%20%uAD6C%uC870%uCCB4%uAE30%uB3C4%20%uD558%uB2E4.%20%uB808%uB514%uC2A4%uB294%20%uBE44%uD2B8%uD544%uB4DC%uB97C%20%uC0AC%uC6A9%uD558%uC5EC%2C%20type%20%uAD6C%uBCC4%284%uBE44%uD2B8%29%uACFC%20%uC778%uCF54%uB529%20%uD0C0%uC785%20%uAD6C%uBCC4%284%uBE44%uD2B8%29%uC744%20%uC704%uD574%2C%20%uADF8%uB9AC%uACE0%20LRU%uB97C%20%uC704%uD55C%20%uC2DC%uAC04%20%uC800%uC7A5%uACF5%uAC04%2824%uBE44%uD2B8%29%uC744%20%uC0AC%uC6A9%uD558%uB294%uB370%2C%20%uC815%uB9D0%20%uC544%uB07C%uACE0%20%uC544%uAEF4%20%uACE0%uC791%20%uC800%uAC78%20%uB2E4%20%uD569%uCCD0%uC11C%2032%uBE44%uD2B8%uBC16%uC5D0%20%uC548%uC0AC%uC6A9%uD55C%uB2E4.%20%uB808%uB514%uC2A4%uB294%20%uBA54%uBAA8%uB9AC%uC5D0%uC11C%20%uB3D9%uC791%uD558%uACE0%20%uBA54%uBAA8%uB9AC%uB294%20%uC2DC%uC2A4%uD15C%20%uC790%uC6D0%20%uC911%20%uB9E4%uC6B0%20%uBE44%uC2FC%uD3B8%uC5D0%20%uC18D%uD55C%uB2E4.%20%uC774%uB97C%20%uC54C%uACE0%20%uCD5C%uC18C%uD55C%uC73C%uB85C%20%uC0AC%uC6A9%uD558%uB824%uB294%20%uB178%uB825%uC774%20%uB3CB%uBCF4%uC778%uB2E4.%20%28%uBC18%uC131%uD574%uC57C%uD55C%uB2E4%20%uB098%uB294.%29%20%uACFC%uAC70%282.6%uB300%29%uC5D0%uB294%202%uBE44%uD2B8%uB97C%20notUsed%20%uD544%uB4DC%uB85C%20%uB0A8%uACA8%uB480%uB294%uB370%203.XX%20%uBC84%uC804%uB300%uB85C%20%uC624%uBA74%uC11C%20lru%uB97C%20%uC704%uD574%20%uD560%uB2F9%uD55C%20%uB4EF%20%uD558%uB2E4.%20refcount%uB294%20%uD574%uB2F9%20%uAC1D%uCCB4%uAC00%20%uCC38%uC870%uB2F9%uD558%uB294%20%uD69F%uC218%uB85C%20%uD30C%uC545%uB418%uACE0%2C%20ptr%uC774%20%uC2E4%uC81C%20%uB370%uC774%uD130%uB97C%20%uAC00%uB9AC%uD0A4%uB294%20%uC6A9%uB3C4%uB85C%20%uC0AC%uC6A9%uB418%uB294%20%uD3EC%uC778%uD130%uB85C%20%uBCF4%uC778%uB2E4.%0A%0A%uC5EC%uAE30%uC11C%20encoding%uC740%20%uBB34%uC5C7%uC778%uAC00%3F%20type%uC740%20%uB610%20%uBB34%uC5C7%uC778%uAC00%3F%0A%0A%23%23%20%uB808%uB514%uC2A4%uC758%20%uC790%uB8CC%20%uAD6C%uC870%28%uD0C0%uC785%29%uACFC%20%uC778%uCF54%uB529%0A%0A%60%60%60%0A//%20redis.h%0A%0A/*%20Object%20types%20*/%0A%23define%20REDIS_STRING%200%20//%uC2A4%uD2B8%uB9C1%0A%23define%20REDIS_LIST%201%20//%uB9AC%uC2A4%uD2B8%0A%23define%20REDIS_SET%202%20//%uC9D1%uD569%28%uC14B%29%0A%23define%20REDIS_ZSET%203%20//%uC815%uB82C%uB41C%20%uB9AC%uC2A4%uD2B8%0A%23define%20REDIS_HASH%204%20//%uD574%uC2DC%uD14C%uC774%uBE14%0A%0A%23define%20REDIS_ENCODING_RAW%200%20%20%20%20%20/*%20Raw%20representation%20*/%0A%23define%20REDIS_ENCODING_INT%201%20%20%20%20%20/*%20Encoded%20as%20integer%20*/%0A%23define%20REDIS_ENCODING_HT%202%20%20%20%20%20%20/*%20Encoded%20as%20hash%20table%20*/%0A%23define%20REDIS_ENCODING_ZIPMAP%203%20%20/*%20Encoded%20as%20zipmap%20*/%0A%23define%20REDIS_ENCODING_LINKEDLIST%204%20/*%20Encoded%20as%20regular%20linked%20list%20*/%0A%23define%20REDIS_ENCODING_ZIPLIST%205%20/*%20Encoded%20as%20ziplist%20*/%0A%23define%20REDIS_ENCODING_INTSET%206%20%20/*%20Encoded%20as%20intset%20*/%0A%23define%20REDIS_ENCODING_SKIPLIST%207%20%20/*%20Encoded%20as%20skiplist%20*/%0A%23define%20REDIS_ENCODING_EMBSTR%208%20%20/*%20Embedded%20sds%20string%20encoding%20*/%0A%0A%60%60%60%0A%0Aredis.h%uC758%20179%uBC88%uC9F8%20%uC904%20%uBD80%uD130%20%uC2DC%uC791%uD558%uB294%20%uC0C1%uC218%uB97C%20%uBCF4%uC790.%20redis%uB294%204%uAC1C%uC758%20%uBE44%uD2B8%uB85C%20%uC544%uB9C8%20%uCD5C%uB300%2016%uAC1C%uC758%20%uC790%uB8CC%uAD6C%uC870%20%uD0C0%uC785%uC744%20%uD45C%uD604%uD560%20%uC218%20%uC788%uC744%20%uAC83%uC774%uB2E4.%20%uADF8%uB9AC%uACE0%20%uD604%uC7AC%uB294%20%uC704%uC758%205%uAC00%uC9C0%uB97C%20%uC9C0%uC6D0%uD558%uB294%20%uB4EF%20%uD558%uB2E4.%20%uACE7%20%uC704%uCE58%20%uAD00%uB828%20%uAD6C%uC870%uB3C4%20%uC9C0%uC6D0%uD55C%uB2E4%uB294%uB370%2C%20%uC774%uACF3%uC5D0%205%uBC88%uC73C%uB85C%20%uCD94%uAC00%uB418%uC9C0%20%uC54A%uC744%uAE4C.%0A%0A%uB808%uB514%uC2A4%uB294%20%uC778%uCF54%uB529%uD0C0%uC785%uC73C%uB85C%20%uD604%uC7AC%209%uAC00%uC9C0%uB97C%20%uC9C0%uC6D0%uD55C%uB2E4.%0A%0A-%20RAW%0A-%20INT%0A-%20%uD574%uC2DC%uD14C%uC774%uBE14%0A-%20%uC9D1%uB9F5%28%uC555%uCD95%uB41C%20%uD574%uC2DC%uD14C%uC774%uBE14%29%0A-%20%uC5F0%uACB0%uB9AC%uC2A4%uD2B8%0A-%20%uC9D1%uB9AC%uC2A4%uD2B8%28%uC555%uCD95%uB41C%20%uB9AC%uC2A4%uD2B8%29%0A-%20INT%uD615%20%uBCC0%uC218%uB9CC%20%uC788%uB294%20%uC9D1%uD569%28%uC14B%29%uC77C%20%uACBD%uC6B0%20%uC0AC%uC6A9%uB418%uB294%20%20INTSET%0A-%20SKIPLIST%0A-%20EMBSTR%0A%0A%uAC01%uAC01%uC758%20%uC778%uCF54%uB529%uC774%20%uBB34%uC5C7%uC778%uC9C0%uB294%20%uC815%uD655%uD788%20%uBAA8%uB974%uACA0%uC9C0%uB9CC%2C%20%uC5B4%uCA0B%uB4E0%20%uC774%uB7F0%20%uC778%uCF54%uB529%20%uD0C0%uC785%uC744%20%uC9C0%uC6D0%uD558%uB098%uBCF4%uB2E4.%20%uB370%uC774%uD130%uB97C%20%uAD70%uB354%uB354%uAE30%20%uC5C6%uC774%20%uCD5C%uC18C%uD55C%uC758%20%uACF5%uAC04%uB9CC%20%uC0AC%uC6A9%uD574%20%uC800%uC7A5%uD558%uB824%uB294%20%uB178%uB825%uC758%20%uC77C%uD658%uC778%20%uB4EF%20%uD558%uB2E4.%0A%0A%23%23%20%uBB38%uC790%uC5F4%20%uB370%uC774%uD130%20%uC778%uCF54%uB529%20%uB530%uB77C%uAC00%uAE30%0A%0A%uB808%uB514%uC2A4%uB294%20%uBB38%uC790%uC5F4%uC744%20%uC800%uC7A5%uD558%uAE30%20%uC704%uD574%20%uC544%uB798%202%uAC00%uC9C0%uC758%20%uC778%uCF54%uB529%uC744%20%uC9C0%uC6D0%uD55C%uB2E4.%20%0A%0A-%20RAW%0A-%20INT%0A%0A%uC5B4%uB5BB%uAC8C%20%uB3D9%uC791%uD558%uB294%uC9C0%20%uC0B4%uD3B4%uBCF4%uC790.%0A%0A%60%60%60%0A//%20redis.c%0A%0Astruct%20redisCommand%20redisCommandTable%5B%5D%20%3D%20%7B%0A%20%20%20%20%7B%22get%22%2CgetCommand%2C2%2C%22rF%22%2C0%2CNULL%2C1%2C1%2C1%2C0%2C0%7D%2C%0A%20%20%20%20%7B%22set%22%2CsetCommand%2C-3%2C%22wm%22%2C0%2CNULL%2C1%2C1%2C1%2C0%2C0%7D%2C%0A%09//%20...%20%uC911%uB7B5%20...%20%0A%20%20%20%20%7B%22pfselftest%22%2CpfselftestCommand%2C1%2C%22r%22%2C0%2CNULL%2C0%2C0%2C0%2C0%2C0%7D%2C%0A%20%20%20%20%7B%22pfadd%22%2CpfaddCommand%2C-2%2C%22wmF%22%2C0%2CNULL%2C1%2C1%2C1%2C0%2C0%7D%2C%0A%20%20%20%20%7B%22pfcount%22%2CpfcountCommand%2C-2%2C%22r%22%2C0%2CNULL%2C1%2C-1%2C1%2C0%2C0%7D%2C%0A%20%20%20%20%7B%22pfmerge%22%2CpfmergeCommand%2C-2%2C%22wm%22%2C0%2CNULL%2C1%2C-1%2C1%2C0%2C0%7D%2C%0A%20%20%20%20%7B%22pfdebug%22%2CpfdebugCommand%2C-3%2C%22w%22%2C0%2CNULL%2C0%2C0%2C0%2C0%2C0%7D%2C%0A%20%20%20%20%7B%22latency%22%2ClatencyCommand%2C-2%2C%22arslt%22%2C0%2CNULL%2C0%2C0%2C0%2C0%2C0%7D%0A%7D%3B%0A%0A%60%60%60%0A%0Aredis.c%uC5D0%uC11C%20%uBB38%uC790%uC5F4%20%uB370%uC774%uD130%uB97C%20%uC800%uC7A5%uD558%uB294%20%uBA85%uB839%uC5B4%uC778%20get%uACFC%20set%uC774%20%uD638%uCD9C%uB410%uC744%uB54C%20%uC2E4%uD589%uB418%uB294%20%uD568%uC218%uB97C%20%uD655%uC778%uD560%20%uC218%20%uC788%uB2E4.%20%60getCommand%60%uACFC%20%60setCommand%60%uC774%20%uADF8%uAC83%uC778%uB370%2C%20%uC774%20%uC18C%uC2A4%uB97C%20%uCC3E%uC544%uBCF4%uC790.%20%uBA3C%uC800%20%60setCommand%60%uAC00%20%uAD81%uAE08%uD558%uB2E4.%0A%0A%60%60%60%0A//%20t_string.c%0A%0Astatic%20int%20checkStringLength%28redisClient%20*c%2C%20long%20long%20size%29%20%7B%0A%20%20%20%20if%20%28size%20%3E%20512*1024*1024%29%20%7B%0A%20%20%20%20%20%20%20%20addReplyError%28c%2C%22string%20exceeds%20maximum%20allowed%20size%20%28512MB%29%22%29%3B%0A%20%20%20%20%20%20%20%20return%20REDIS_ERR%3B%0A%20%20%20%20%7D%0A%20%20%20%20return%20REDIS_OK%3B%0A%7D%0A%0A%60%60%60%0A%0A%60setCommand%60%uB97C%20%uCC3E%uC544%20%uB72F%uC5B4%uBCF4%uB2C8%2C%20%uCCAB%uC904%uC5D0%20%60checkStringLength%60%uD568%uC218%uAC00%20%uBCF4%uC778%uB2E4.%20512%uBA54%uAC00%uB97C%20%uB118%uB294%20%uC2A4%uD2B8%uB9C1%uC778%uAC00%uB97C%20%uAC80%uC0AC%uD558%uB294%uB370%2C%20%60redisClient%60%uD3EC%uC778%uD130%20%uAE4C%uC9C0%20%uC778%uC790%uB85C%20%uBC1B%uB294%uB2E4.%20%20%uB808%uB514%uC2A4%uC758%20Command%uC640%20%uAD00%uB828%uB41C%20%uBAA8%uB4E0%20%uD568%uC218%uB294%20%60redisClient%60%uB97C%20%uCC38%uC870%uD55C%uB2E4.%20%uC774%uAC8C%20%uBB58%uAE4C%3F%0A%0A%60%60%60%0A//%20redis.h%0A%0A/*%20With%20multiplexing%20we%20need%20to%20take%20per-client%20state.%0A%20*%20Clients%20are%20taken%20in%20a%20linked%20list.%20*/%0Atypedef%20struct%20redisClient%20%7B%0A%20%20%20%20uint64_t%20id%3B%20%20%20%20%20%20%20%20%20%20%20%20/*%20Client%20incremental%20unique%20ID.%20*/%0A%20%20%20%20int%20fd%3B%0A%20%20%20%20redisDb%20*db%3B%0A%20%20%20%20int%20dictid%3B%0A%20%20%20%20robj%20*name%3B%20%20%20%20%20%20%20%20%20%20%20%20%20/*%20As%20set%20by%20CLIENT%20SETNAME%20*/%0A%20%20%20%20sds%20querybuf%3B%0A%20%20%20%20size_t%20querybuf_peak%3B%20%20%20/*%20Recent%20%28100ms%20or%20more%29%20peak%20of%20querybuf%20size%20*/%0A%20%20%20%20int%20argc%3B%0A%20%20%20%20robj%20**argv%3B%0A%20%20%20%20struct%20redisCommand%20*cmd%2C%20*lastcmd%3B%0A%20%20%20%20int%20reqtype%3B%0A%20%20%20%20int%20multibulklen%3B%20%20%20%20%20%20%20/*%20number%20of%20multi%20bulk%20arguments%20left%20to%20read%20*/%0A%20%20%20%20long%20bulklen%3B%20%20%20%20%20%20%20%20%20%20%20/*%20length%20of%20bulk%20argument%20in%20multi%20bulk%20request%20*/%0A%20%20%20%20list%20*reply%3B%0A%20%20%20%20unsigned%20long%20reply_bytes%3B%20/*%20Tot%20bytes%20of%20objects%20in%20reply%20list%20*/%0A%20%20%20%20int%20sentlen%3B%20%20%20%20%20%20%20%20%20%20%20%20/*%20Amount%20of%20bytes%20already%20sent%20in%20the%20current%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20buffer%20or%20object%20being%20sent.%20*/%0A%20%20%20%20time_t%20ctime%3B%20%20%20%20%20%20%20%20%20%20%20/*%20Client%20creation%20time%20*/%0A%20%20%20%20time_t%20lastinteraction%3B%20/*%20time%20of%20the%20last%20interaction%2C%20used%20for%20timeout%20*/%0A%20%20%20%20time_t%20obuf_soft_limit_reached_time%3B%0A%20%20%20%20int%20flags%3B%20%20%20%20%20%20%20%20%20%20%20%20%20%20/*%20REDIS_SLAVE%20%7C%20REDIS_MONITOR%20%7C%20REDIS_MULTI%20...%20*/%0A%20%20%20%20int%20authenticated%3B%20%20%20%20%20%20/*%20when%20requirepass%20is%20non-NULL%20*/%0A%20%20%20%20int%20replstate%3B%20%20%20%20%20%20%20%20%20%20/*%20replication%20state%20if%20this%20is%20a%20slave%20*/%0A%20%20%20%20int%20repl_put_online_on_ack%3B%20/*%20Install%20slave%20write%20handler%20on%20ACK.%20*/%0A%20%20%20%20int%20repldbfd%3B%20%20%20%20%20%20%20%20%20%20%20/*%20replication%20DB%20file%20descriptor%20*/%0A%20%20%20%20off_t%20repldboff%3B%20%20%20%20%20%20%20%20/*%20replication%20DB%20file%20offset%20*/%0A%20%20%20%20off_t%20repldbsize%3B%20%20%20%20%20%20%20/*%20replication%20DB%20file%20size%20*/%0A%20%20%20%20sds%20replpreamble%3B%20%20%20%20%20%20%20/*%20replication%20DB%20preamble.%20*/%0A%20%20%20%20long%20long%20reploff%3B%20%20%20%20%20%20/*%20replication%20offset%20if%20this%20is%20our%20master%20*/%0A%20%20%20%20long%20long%20repl_ack_off%3B%20/*%20replication%20ack%20offset%2C%20if%20this%20is%20a%20slave%20*/%0A%20%20%20%20long%20long%20repl_ack_time%3B/*%20replication%20ack%20time%2C%20if%20this%20is%20a%20slave%20*/%0A%20%20%20%20char%20replrunid%5BREDIS_RUN_ID_SIZE+1%5D%3B%20/*%20master%20run%20id%20if%20this%20is%20a%20master%20*/%0A%20%20%20%20int%20slave_listening_port%3B%20/*%20As%20configured%20with%3A%20SLAVECONF%20listening-port%20*/%0A%20%20%20%20multiState%20mstate%3B%20%20%20%20%20%20/*%20MULTI/EXEC%20state%20*/%0A%20%20%20%20int%20btype%3B%20%20%20%20%20%20%20%20%20%20%20%20%20%20/*%20Type%20of%20blocking%20op%20if%20REDIS_BLOCKED.%20*/%0A%20%20%20%20blockingState%20bpop%3B%20%20%20%20%20/*%20blocking%20state%20*/%0A%20%20%20%20long%20long%20woff%3B%20%20%20%20%20%20%20%20%20/*%20Last%20write%20global%20replication%20offset.%20*/%0A%20%20%20%20list%20*watched_keys%3B%20%20%20%20%20/*%20Keys%20WATCHED%20for%20MULTI/EXEC%20CAS%20*/%0A%20%20%20%20dict%20*pubsub_channels%3B%20%20/*%20channels%20a%20client%20is%20interested%20in%20%28SUBSCRIBE%29%20*/%0A%20%20%20%20list%20*pubsub_patterns%3B%20%20/*%20patterns%20a%20client%20is%20interested%20in%20%28SUBSCRIBE%29%20*/%0A%20%20%20%20sds%20peerid%3B%20%20%20%20%20%20%20%20%20%20%20%20%20/*%20Cached%20peer%20ID.%20*/%0A%0A%20%20%20%20/*%20Response%20buffer%20*/%0A%20%20%20%20int%20bufpos%3B%0A%20%20%20%20char%20buf%5BREDIS_REPLY_CHUNK_BYTES%5D%3B%0A%7D%20redisClient%3B%0A%0A%60%60%60%0A%0A%uB808%uB514%uC2A4%20%uD074%uB77C%uC774%uC5B8%uD2B8%uB294%20%uAC01%uAC01%uC758%20%uC811%uC18D%uD55C%20%uD074%uB77C%uC774%uC5B8%uD2B8%uC758%20%uC0C1%uD0DC%uB97C%20%uC800%uC7A5%uD558%uAE30%20%uC704%uD574%20%uC0AC%uC6A9%uD558%uB294%20%uAD6C%uC870%uCCB4%uC600%uB2E4.%20%uC774%uB97C%20%uC774%uC6A9%uD558%uC5EC%20%uBA85%uB839%uB4E4%uC774%uB098%20%uBE14%uB85D%uC0C1%uD0DC%2C%20%uD639%uC740%20pub/sub%uAE4C%uC9C0%20%uAD00%uB9AC%uD558%uB294%20%uAC83%uC73C%uB85C%20%uBCF4%uC778%uB2E4.%20%uC8FC%uC11D%uC744%20%uBCF4%uB2C8%20%uD074%uB77C%uC774%uC5B8%uD2B8%uB4E4%uC740%20%uB9C1%uD06C%uB4DC%uB9AC%uC2A4%uD2B8%uB85C%20%uAD00%uB9AC%uB41C%uB2E4%uACE0%20%uD55C%uB2E4.%0A%0A%uB2E4%uC2DC%20%uBCF8%uB860%uC73C%uB85C%20%uB3CC%uC544%uC640%uC11C%2C%20%60setCommand%60%uB97C%20%uCC3E%uC544%uBCF4%uC790.%20%0A%0A%0A%60%60%60%0A//%20t_string.c%0A%0A%23define%20REDIS_SET_NO_FLAGS%200%0A%23define%20REDIS_SET_NX%20%281%3C%3C0%29%20%20%20%20%20/*%20Set%20if%20key%20not%20exists.%20*/%09//%20%uBE44%uD2B8%20%3A%2001%0A%23define%20REDIS_SET_XX%20%281%3C%3C1%29%20%20%20%20%20/*%20Set%20if%20key%20exists.%20*/%20%20%09%09//%20%uBE44%uD2B8%20%3A%2010%0A%0Avoid%20setGenericCommand%28redisClient%20*c%2C%20int%20flags%2C%20robj%20*key%2C%20robj%20*val%2C%20robj%20*expire%2C%20int%20unit%2C%20robj%20*ok_reply%2C%20robj%20*abort_reply%29%20%7B%0A%09//%20...%20%uC911%uB7B5%20...%0A%7D%0A%0A/*%20SET%20key%20value%20%5BNX%5D%20%5BXX%5D%20%5BEX%20%3Cseconds%3E%5D%20%5BPX%20%3Cmilliseconds%3E%5D%20*/%0Avoid%20setCommand%28redisClient%20*c%29%20%7B%0A%20%20%20%20int%20j%3B%0A%20%20%20%20robj%20*expire%20%3D%20NULL%3B%0A%20%20%20%20int%20unit%20%3D%20UNIT_SECONDS%3B%0A%20%20%20%20int%20flags%20%3D%20REDIS_SET_NO_FLAGS%3B%0A%0A%20%20%20%20for%20%28j%20%3D%203%3B%20j%20%3C%20c-%3Eargc%3B%20j++%29%20%7B%0A%20%20%20%20%20%20%20%20char%20*a%20%3D%20c-%3Eargv%5Bj%5D-%3Eptr%3B%0A%20%20%20%20%20%20%20%20robj%20*next%20%3D%20%28j%20%3D%3D%20c-%3Eargc-1%29%20%3F%20NULL%20%3A%20c-%3Eargv%5Bj+1%5D%3B%0A%0A%20%20%20%20%20%20%20%20if%20%28%28a%5B0%5D%20%3D%3D%20%27n%27%20%7C%7C%20a%5B0%5D%20%3D%3D%20%27N%27%29%20%26%26%0A%20%20%20%20%20%20%20%20%20%20%20%20%28a%5B1%5D%20%3D%3D%20%27x%27%20%7C%7C%20a%5B1%5D%20%3D%3D%20%27X%27%29%20%26%26%20a%5B2%5D%20%3D%3D%20%27%5C0%27%29%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20flags%20%7C%3D%20REDIS_SET_NX%3B%0A%20%20%20%20%20%20%20%20%7D%20else%20if%20%28%28a%5B0%5D%20%3D%3D%20%27x%27%20%7C%7C%20a%5B0%5D%20%3D%3D%20%27X%27%29%20%26%26%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%28a%5B1%5D%20%3D%3D%20%27x%27%20%7C%7C%20a%5B1%5D%20%3D%3D%20%27X%27%29%20%26%26%20a%5B2%5D%20%3D%3D%20%27%5C0%27%29%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20flags%20%7C%3D%20REDIS_SET_XX%3B%0A%20%20%20%20%20%20%20%20%7D%20else%20if%20%28%28a%5B0%5D%20%3D%3D%20%27e%27%20%7C%7C%20a%5B0%5D%20%3D%3D%20%27E%27%29%20%26%26%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%28a%5B1%5D%20%3D%3D%20%27x%27%20%7C%7C%20a%5B1%5D%20%3D%3D%20%27X%27%29%20%26%26%20a%5B2%5D%20%3D%3D%20%27%5C0%27%20%26%26%20next%29%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20unit%20%3D%20UNIT_SECONDS%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20expire%20%3D%20next%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20j++%3B%0A%20%20%20%20%20%20%20%20%7D%20else%20if%20%28%28a%5B0%5D%20%3D%3D%20%27p%27%20%7C%7C%20a%5B0%5D%20%3D%3D%20%27P%27%29%20%26%26%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%28a%5B1%5D%20%3D%3D%20%27x%27%20%7C%7C%20a%5B1%5D%20%3D%3D%20%27X%27%29%20%26%26%20a%5B2%5D%20%3D%3D%20%27%5C0%27%20%26%26%20next%29%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20unit%20%3D%20UNIT_MILLISECONDS%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20expire%20%3D%20next%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20j++%3B%0A%20%20%20%20%20%20%20%20%7D%20else%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20addReply%28c%2Cshared.syntaxerr%29%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20return%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%0A%0A%20%20%20%20c-%3Eargv%5B2%5D%20%3D%20tryObjectEncoding%28c-%3Eargv%5B2%5D%29%3B%20//%20%uC598%uB294%20%uBB54%uAC00%3F%0A%20%20%20%20setGenericCommand%28c%2Cflags%2Cc-%3Eargv%5B1%5D%2Cc-%3Eargv%5B2%5D%2Cexpire%2Cunit%2CNULL%2CNULL%29%3B%0A%7D%0A%0A%60%60%60%0A%0A%60setCommand%60%uB97C%20%uC54C%uAE30%20%uC704%uD574%uC11C%uB294%20%60setGenericCommand%60%uD568%uC218%uB3C4%20%uC54C%uC544%uC57C%20%uD55C%uB2E4.%20%uC65C%uB0D0%uD558%uBA74%2C%20%uC544%uB798%uC640%20%uAC19%uC740%20%uC774%uC720%uB2E4%21%0A%0A%3E%20setGenericCommand%28%29%20%uD568%uC218%uB294%20SET%20%uC5F0%uC0B0%uC744%20%uAD6C%uD604%uD569%uB2C8%uB2E4.%20%uC774%uB54C%2C%20%uAC01%uAE30%uB2E4%uB978%20%uC635%uC158%uACFC%20%uC57D%uAC04%uC758%20%uBCC0%uD615%uB41C%20%uD615%uD0DC%uB3C4%20%uCC98%uB9AC%uD569%uB2C8%uB2E4.%20%uC774%20%uD568%uC218%uB294%20SET%2C%20SETEX%2C%20PSETEX%2C%20SETNX%uB97C%20%uCC98%uB9AC%uD558%uAE30%20%uC704%uD574%20call%uB429%uB2C8%uB2E4.%0A%0A%uC7E4%uAC00%20%uC9C4%uC9DC%20%uCC98%uB9AC%uD558%uB294%20%uC560%uB2C8%uAE4C%21%20%uADF8%uB798%uB3C4%20%60setCommand%60%uB97C%20%uBCF4%uAE30%uB85C%20%uD588%uC73C%uB2C8%20%uBA3C%uC800%20%uBCF4%uC790.%20%uC870%uAE08%20%uC788%uB2E4%uAC00%20%60setGenericCommand%60%uB3C4%20%uD568%uAED8%20%uBCF4%uC790.%0A%0A%60char%20*a%60%uB294%20%uBA85%uB839%uC5B4%20%uBB38%uC790%uC5F4%uC774%uB77C%20%uC0DD%uAC01%uD558%uC790.%20NX%uC778%uC9C0%20XX%uC778%uC9C0%2C%20EX%uC778%uC9C0%2C%20PX%uC778%uC9C0%20%uD655%uC778%uD558%uB294%20%uC81C%uC5B4%uBB38%uC778%uAC70%20%uAC19%uB2E4.%20%uADF8%uB0E5%20%uB118%uC5B4%uAC00%uC790.%20%uADF8%uB9AC%uACE0%20%uB098%uBA74%20%uB098%uC624%uB294%20%60tryObjectEncoding%60%uC774%20%uD568%uC218%uAC00%20%uBB34%uC5C7%uC744%20%uD558%uB294%uC9C0%20%uCC3E%uC544%uC57C%uD558%uB294%uB370%2C%20%20%uCC3E%uC544%uAC00%uBCF4%uC790.%0A%0A%23%23%20tryObjectEncoding%20%uD568%uC218%uC5D0%20%uB300%uD558%uC5EC%0A%0A%60%60%60%0A//%20obejct.c%0A%0Arobj%20*tryObjectEncoding%28robj%20*o%29%20%7B%0A%20%20%20%20long%20value%3B%0A%20%20%20%20sds%20s%20%3D%20o-%3Eptr%3B%0A%20%20%20%20size_t%20len%3B%0A%0A%20%20%20%20redisAssertWithInfo%28NULL%2Co%2Co-%3Etype%20%3D%3D%20REDIS_STRING%29%3B%20//%20string%20%uB9DE%uB294%uC9C0%20%uD655%uC778.%0A%0A%20%20%20%20if%20%28%21sdsEncodedObject%28o%29%29%20return%20o%3B%20//%20RAW%uB098%20EMBSTR%20%uC778%uCF54%uB529%20%uB41C%20%uC560%uB4E4%uC774%20%uC544%uB2C8%uBA74%2C%20%uADF8%uB0E5%20%uBC18%uD658.%0A%0A%20%20%20%20if%20%28o-%3Erefcount%20%3E%201%29%20return%20o%3B%20//%20%uD639%uC2DC%20%uC774%20string%uC744%20%uCC38%uC870%uD558%uB294%20%uC560%uAC00%20%uC788%uB294%uC9C0%20%uD655%uC778.%20%uC788%uC73C%uBA74%20%uADF8%uB0E5%20%uBC18%uD658.%0A%0A%09/*%2021%uC790%uB9AC%uAC00%20%uB118%uB294%uC9C0%20%uD655%uC778.%20%uB118%uC73C%uBA74%20INT%uC77C%20%uC218%20%uC5C6%uC73C%uB2C8%uAE4C.%0A%09%20*%20%uADF8%uB9AC%uACE0%20long%uC73C%uB85C%20%uCC98%uB9AC%uB420%20%uC218%20%uC788%uB294%uC9C0%2C%20string2l%20%uC720%uD2F8%20%uD568%uC218%uB85C%20%uC2DC%uB3C4%uD574%uBD04.%0A%09%20*%20%uADF8%uB9AC%uACE0%20long%uC73C%uB85C%20%uCC98%uB9AC%uB41C%20%uAC12%uC744%20value%uC5D0%20%uC9D1%uC5B4%uB123%uC74C.%20%uCC98%uB9AC%20%uC2E4%uD328%uC2DC%200%28false%29%uBC18%uD658.%20*/%0A%20%20%20%20len%20%3D%20sdslen%28s%29%3B%0A%20%20%20%20if%20%28len%20%3C%3D%2021%20%26%26%20string2l%28s%2Clen%2C%26value%29%29%20%7B%0A%20%20%20%20%20%20%20%20if%20%28%28server.maxmemory%20%3D%3D%200%20%7C%7C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%28server.maxmemory_policy%20%21%3D%20REDIS_MAXMEMORY_VOLATILE_LRU%20%26%26%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20server.maxmemory_policy%20%21%3D%20REDIS_MAXMEMORY_ALLKEYS_LRU%29%29%20%26%26%0A%20%20%20%20%20%20%20%20%20%20%20%20value%20%3E%3D%200%20%26%26%0A%20%20%20%20%20%20%20%20%20%20%20%20value%20%3C%20REDIS_SHARED_INTEGERS%29%20//%20%uACF5%uC720%uB41C%20INTEGER%20%uAC12%uC73C%uB85C%20%uCC98%uB9AC%20%uAC00%uB2A5%uD55C%uC9C0%20%uD655%uC778.%0A%20%20%20%20%20%20%20%20%7B%20//%20%uACF5%uC720%uB41C%20INTEGER%uAC12%uC73C%uB85C%20%uCC98%uB9AC%20%uAC00%uB2A5%21%0A%20%20%20%20%20%20%20%20%20%20%20%20decrRefCount%28o%29%3B%20//%20%uCC38%uC870%uB97C%20%uC9C0%uC6B0%uACE0%2C%20%uBA54%uBAA8%uB9AC%20%uD560%uB2F9%20%uD574%uC81C.%0A%20%20%20%20%20%20%20%20%20%20%20%20incrRefCount%28shared.integers%5Bvalue%5D%29%3B%20//%20%uACF5%uC720%uB41C%20INTEGER%20%uAC12%20ref%20count%20%uC99D%uAC00.%0A%20%20%20%20%20%20%20%20%20%20%20%20return%20shared.integers%5Bvalue%5D%3B%20//%20%uACF5%uC720%uB41C%20INTEGER%20%uBC18%uD658.%0A%20%20%20%20%20%20%20%20%7D%20else%20%7B%20//%20%uACF5%uC720%uB41C%20INTEGER%uB860%20%uBD88%uAC00%uB2A5%uD558%uC9C0%uB9CC%20long%uC73C%uB85C%20%uAC00%uB2A5%uD558%uB2E4%uBA74%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20if%20%28o-%3Eencoding%20%3D%3D%20REDIS_ENCODING_RAW%29%20sdsfree%28o-%3Eptr%29%3B%20//%20%uBA54%uBAA8%uB9AC%20%uD574%uC81C%0A%20%20%20%20%20%20%20%20%20%20%20%20o-%3Eencoding%20%3D%20REDIS_ENCODING_INT%3B%20//%20INT%uB85C%20%uC778%uCF54%uB529%20%uD0C0%uC785%20%uBCC0%uACBD%0A%20%20%20%20%20%20%20%20%20%20%20%20o-%3Eptr%20%3D%20%28void*%29%20value%3B%20//%20%uC704%uC5D0%uC11C%20string2l%uB85C%20%uB9CC%uB4E0%20value%20%uD560%uB2F9.%0A%20%20%20%20%20%20%20%20%20%20%20%20return%20o%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%0A%0A%20%20%20%20if%20%28len%20%3C%3D%20REDIS_ENCODING_EMBSTR_SIZE_LIMIT%29%20%7B%20//%20%uC704%uC5D0%uAEBC%20%uC2E4%uD328%uD558%uACE0%20EMBSTR%20%uC81C%uD55C%20%uC0AC%uC774%uC988%uC758%20%uCD5C%uB313%uAC12%uBCF4%uB2E4%20%uC791%uC73C%uBA74%2C%0A%20%20%20%20%20%20%20%20robj%20*emb%3B%0A%0A%20%20%20%20%20%20%20%20if%20%28o-%3Eencoding%20%3D%3D%20REDIS_ENCODING_EMBSTR%29%20return%20o%3B%20//%20%uC774%uBBF8%20EMBSTR%uC774%uBA74%20%uADF8%uB0E5%20%uBC18%uD658.%0A%20%20%20%20%20%20%20%20emb%20%3D%20createEmbeddedStringObject%28s%2Csdslen%28s%29%29%3B%20//%20%uC544%uB2C8%uBA74%2C%20EMBSTR%uB85C%20%uB2E4%uC2DC%20%uC778%uCF54%uB529%20%uD574%20%uC0DD%uC131.%0A%20%20%20%20%20%20%20%20decrRefCount%28o%29%3B%20//%20%uC6D0%uB798%20%uC560%20%uBA54%uBAA8%uB9AC%20%uD574%uC81C%0A%20%20%20%20%20%20%20%20return%20emb%3B%20//%20EMBSTR%20%uBC18%uD658.%0A%20%20%20%20%7D%0A%0A%09/*%20%uC5B4%uB5A4%20%uC778%uCF54%uB529%uB3C4%20%uD574%uB0BC%20%uC218%20%uC5C6%uC5C8%uB2E4%uBA74%2C%20%uB9C8%uC9C0%uB9C9%uC73C%uB85C%20%uCD5C%uB300%uD55C%20%uACF5%uAC04%uC744%20%uC801%uAC8C%20%uC4F0%uAE30%uC704%uD574%20SDS%20string%uC744%20%uCEF4%uD329%uC158%uD55C%uB2E4.%20*/%0A%20%20%20%20if%20%28o-%3Eencoding%20%3D%3D%20REDIS_ENCODING_RAW%20%26%26%0A%20%20%20%20%20%20%20%20sdsavail%28s%29%20%3E%20len/10%29%0A%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20o-%3Eptr%20%3D%20sdsRemoveFreeSpace%28o-%3Eptr%29%3B%0A%20%20%20%20%7D%0A%0A%20%20%20%20return%20o%3B%0A%7D%0A%0A%60%60%60%0A%0A%0A%uACF5%uAC04%uC744%20%uCD5C%uB300%uD55C%20%uC808%uC57D%uD558%uAE30%20%uC704%uD574%20%uC778%uCF54%uB529%uC744%20%uC2DC%uB3C4%uD558%uB294%20%uD568%uC218%uB2E4.%20%uBB54%uC800%20%uC800%20%60SDS%60%uD639%uC740%20%60sds%60%uB780%20%uB2E8%uC5B4%28%uD568%uC218%uC55E%uC5D0%20%uC5C4%uCCAD%20%uB9CE%uC9C0%20%uC54A%uC740%uAC00.%29%uC5D0%20%uB300%uD574%20%uC54C%uC544%uC57C%uACA0%uB294%uB370%2C%20SDS%uAC00%20%uBB54%uC9C0%20%uAD81%uAE08%uD574%uC11C%20%uCC3E%uC544%uBCF4%uB2C8%2C%20%60simple%20danamic%20string%60%uC774%uB77C%uB294%20%uB77C%uC774%uBE0C%uB7EC%uB9AC%uC600%uB2E4.%20%uC774%20%uB77C%uC774%uBE0C%uB7EC%uB9AC%uB294%20C%uC5B8%uC5B4%uB97C%20%uC704%uD55C%20%uC2A4%uD2B8%uB9C1%20%uB77C%uC774%uBE0C%uB7EC%uB9B0%uB370%2C%20%uBC14%uC774%uB108%uB9AC%20%uC138%uC774%uD504%uD558%uACE0%2C%20%uB354%20%uC27D%uAC8C%20C%uC5B8%uC5B4%uC5D0%uC11C%20%uC2A4%uD2B8%uB9C1%uC744%20%uC0AC%uC6A9%uD560%20%uC218%20%uC788%uAC8C%20%uD574%uC900%uB2E4%uACE0%20%uD55C%uB2E4.%20%60Redis%60%uB294%20%uC774%20%uB77C%uC774%uBE0C%uB7EC%uB9B4%20%uC0AC%uC6A9%uD574%20%uC2A4%uD2B8%uB9C1%uC744%20%uD45C%uD604%uD55C%uB2E4.%0A%0A%60%60%60%0A+--------+-------------------------------+-----------+%0A%7C%20Header%20%7C%20Binary%20safe%20C%20alike%20string...%20%7C%20Null%20term%20%7C%0A+--------+-------------------------------+-----------+%0A%20%20%20%20%20%20%20%20%20%7C%0A%20%20%20%20%20%20%20%20%20%60-%3E%20Pointer%20returned%20to%20the%20user.%0A%0A%60%60%60%0A%0A%60sds%60%uB294%20%uC774%uB7F0%20%uAC1C%uB150%uC744%20%uC0AC%uC6A9%uD558%uC5EC%2C%20%uD5E4%uB354%uC5D0%20%uBA54%uD0C0%20%uB370%uC774%uD130%uB97C%20%uC800%uC7A5%uD560%20%uC218%20%uC788%uAC8C%20%uD55C%uB2E4.%20%uAE30%uC874%20C%uC5B8%uC5B4%uC758%20%uC2A4%uD2B8%uB9C1%uC774%20%uC0AC%uC6A9%uD558%uB2E4%uBCF4%uBA74%20%uBD88%uD3B8%uD55C%uAC8C%20%uD55C%uB450%uAC00%uC9C0%uAC00%20%uC544%uB2C8%uB2E4%uBCF4%uB2C8%20%uC4F0%uB294%20%uB4EF%20%uD558%uB2E4.%20%uC544%uBB34%uD2BC%20%uC598%uB294%20%uC774%uB807%uAC8C%20%uC0DD%uACA8%uBA39%uC5B4%uC11C%2C%20%uC0AC%uC6A9%uD558%uB2E4%uBCF4%uBA74%20%uACF5%uAC04%uC774%20%uB0A8%uB294%20%uACBD%uC6B0%uAC00%20%uC788%uB294%uB370%2C%20redis%uB294%20%uCD5C%uB300%uD55C%uC758%20%uBA54%uBAA8%uB9AC%20%uD65C%uC6A9%uC744%20%uC704%uD574%20%uC774%20%uC5EC%uC720%uBD84%uC774%2010%25%uB97C%20%uB118%uC73C%uBA74%2C%20%60Shrinking%20string%60%28%uBA54%uBAA8%uB9AC%uB97C%20%uCEF4%uD329%uC158%20%uD558%uB294.%29%20%uC791%uC5C5%uC744%20%uD1B5%uD574%20%uCD5C%uB300%uD55C%20%uBA54%uBAA8%uB9AC%uB97C%20%uC544%uB080%uB2E4.%20%uC774%uB54C%20%uD638%uCD9C%uD558%uB294%20%60sds%60%uB77C%uC774%uBE0C%uB7EC%uB9AC%uC758%20%uD568%uC218%uAC00%20%uBC14%uB85C%20%60sds%20sdsRemoveFreeSpace%28sds%20s%29%3B%60%uB2E4.%20%uACFC%uAC70%282.6%uBC84%uC804%29%uC5D0%uB294%20%uC774%20%uC791%uC5C5%uC774%20%uC5C6%uC5C8%uB358%20%uAC83%20%uAC19%uC740%uB370%2C%20%uC0DD%uACBC%uB2E4.%0A%0A%20%uACFC%uAC70%uC5D0%uB294%20%60EMBSTR%60%20%uC778%uCF54%uB529%20%uD0C0%uC785%uC774%20%uC5C6%uC5C8%uC73C%uB098%20%uC0C8%uB85C%20%uC0DD%uACBC%uB2E4.%20%uC774%20%uC0C8%uB85C%uC0DD%uAE34%20%uC774%uC0C1%uD55C%20%uC774%uB984%uC758%20%uC778%uCF54%uB529%20%uD0C0%uC785%uC740%2C%20%uC815%uB9D0%20%uC2E0%uBC15%uD55C%20%uC544%uC774%uB514%uC5B4%uC778%uB370%2C%20redisObject%uC640%20%uC5F0%uC18D%uC801%uC73C%uB85C%20%uC774%20%60sds%20string%60%uC744%20%uC704%uCE58%20%uC2DC%uD0A4%uB294%20%uBC29%uBC95%uC758%20%uC778%uCF54%uB529%uC774%uB2E4.%20%uC989%20%uC5F0%uC18D%uC801%uC778%20%uBA54%uBAA8%uB9AC%uC5D0%20%uD568%uAED8%20%uC704%uCE58%uD55C%uB2E4.%20%uADF8%uB9AC%uACE0%20%uC774%20%60sds%20string%60%uB294%20%uC218%uC815%uC774%20%uBD88%uAC00%uB2A5%uD558%uB2E4.%20%uC544%uB798%20%uADF8%uB9BC%uC73C%uB85C%20%uC5B4%uB5A4%20%uB9D0%uC778%uC9C0%20%uC0B4%uD3B4%uBCF4%uC790.%0A%0A%60%60%60%0A+--------------+-----------+------------+--------+----+%0A%7C%20robj%20data...%20%7C%20robj-%3Eptr%20%7C%20sds%20header%20%7C%20string%20%7C%20%5C0%20%7C%0A+--------------+-----+-----+------------+--------+----+%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7C%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%5E%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20+-----------------------+%0A%60%60%60%0A%0A%uC774%uB7F0%uC2DD%uC774%uB2E4.%20%uC774%20%uACBD%uC6B0%2C%20%uC6D0%uB798%20%uC2A4%uD2B8%uB9C1%20%uCC98%uB9AC%20%uAE30%uBC95%uC740%20%uADF8%uB300%uB85C%20%uC0AC%uC6A9%uD560%20%uC218%20%uC788%uC73C%uBA74%uC11C%uB3C4%2C%20%20%60cache%20locality%60%uB97C%20%uADF9%uB300%uD654%20%uD560%20%uC218%20%uC788%uC5B4%20%uC720%uB9AC%uD558%uB2E4%uACE0%20%uD55C%uB2E4.%20%uC774%uAC8C%20%uBB34%uC2A8%uB9D0%uC774%uB0D0%uBA74%2C%20%uBA54%uBAA8%uB9AC%20%uC8FC%uC18C%uC5D0%20%uC811%uADFC%uD560%20%uB54C%2C%20%uBCF4%uD1B5%20%uD574%uB2F9%20%uC8FC%uC18C%20%uBFD0%uB9CC%20%uC544%uB2C8%uB77C%20%uC8FC%uBCC0%uAE4C%uC9C0%20%uD3EC%uD568%uD55C%20%uBE14%uB85D%20%uC804%uBD80%uB97C%20%uCE90%uC2DC%uC5D0%20%uAC00%uC838%uC624%uAC8C%20%uB418%uB294%uB370%2C%20%uC774%uB807%uAC8C%20%60redisObject%60%uC640%20%uBD99%uC5EC%uB193%uC73C%uBA74%20%uB2F9%uC5F0%uD788%20%uD568%uAED8%20%uCE90%uC2DC%uB418%uB2C8%20%uD37C%uD3EC%uBA3C%uC2A4%uC0C1%20%uC774%uB4DD%uC77C%20%uC218%20%uBC16%uC5D0%20%uC5C6%uB2E4%uB294%20%uAC83%uC774%uB2E4.%20%uB610%20%uC2DC%uC2A4%uD15C%20%uCF5C%28%uB9E4%uC6B0%20%uB290%uB9B0%29%uC5D0%uC11C%uB3C4%20%uC774%uB4DD%uC778%uB370%2C%20%uC6D0%uB798%20%uD560%uB2F9%uC744%20%uC744%20%60robj%60%uC704%uD574%20%uD55C%uBC88%2C%20%60robj-%3Eptr%60%uC744%20%uC704%uD574%20%uD55C%uBC88%20%uB354%2C%20%uCD1D2%uBC88%uD588%uC5B4%uC57C%uD558%uB294%uB370%20%uC774%uC81C%20%uD55C%uBC29%uC5D0%20%uD560%20%uC218%20%uC788%uB2E4%uB294%20%uD37C%uD3EC%uBA3C%uC2A4%uC0C1%20%uC774%uC810%uC774%20%uC788%uB2E4.%20%20%uB2F9%uC5F0%uD788%20%uCD08%uAE30%uD654%uB098%20%uC870%uD68C%2C%20%uBA54%uBAA8%uB9AC%20%uCE74%uD53C%uC2DC%uB3C4%20%uB9E4%uBC88%20%uC720%uB9AC%uD574%uC9C4%uB2E4.%20%uC774%uB7F0%20%uC138%uC2EC%uD568%21%20%uB808%uB514%uC2A4%uC758%20%uC131%uB2A5%uC740%20%uC5EC%uAE30%uC11C%20%uB098%uC624%uB098%uBCF4%uB2E4.%0A%0A%uBFD0%uB9CC%20%uC544%uB2C8%uB77C%2C%20%uCF54%uB4DC%uC5D0%uC11C%uB3C4%20%uC774%uB7F0%20%uC138%uC2EC%uD568%uC740%20%uB290%uAEF4%uC9C4%uB2E4.%20%28%uBB3C%uB860%20%uB2E4%uB4E4%20%uC774%uB807%uAC8C%20%uD558%uAE34%20%uD560%uAC74%uB370...%20%uB0B4%uAC00%20%uC548%uD558%uB358%uAC70%uB77C..%29%0A%0A%60%60%60%0A//%20redis.h%0A%0A%23define%20redisAssertWithInfo%28_c%2C_o%2C_e%29%20%28%28_e%29%3F%28void%290%20%3A%20%28_redisAssertWithInfo%28_c%2C_o%2C%23_e%2C__FILE__%2C__LINE__%29%2C_exit%281%29%29%29%0A%0A%23define%20sdsEncodedObject%28objptr%29%20%28objptr-%3Eencoding%20%3D%3D%20REDIS_ENCODING_RAW%20%7C%7C%20objptr-%3Eencoding%20%3D%3D%20REDIS_ENCODING_EMBSTR%29%0A%0A%60%60%60%0A%0A%60redisAssertWithInfo%60%uB098%20%60sdsEncodedObject%60%uAC19%uC740%20%uC560%uB4E4%uC744%20%uBCF4%uBA74%20%uB808%uB514%uC2A4%uB294%20%uC660%uB9CC%uD55C%20%uC560%uB4E4%uC740%20%uD568%uC218%uB97C%20%uC548%uC4F0%uACE0%20%60%23define%60%uC744%20%uC774%uC6A9%uD574%20%uC815%uC758%uD588%uB2E4.%20%uB098%uB77C%uBA74%20%uD568%uC218%uB85C%20%uB9CC%uB4E4%uC5C8%uC744%20%uAC83%20%uAC19%uC740%uB370%2C%20%uC5B4%uB5BB%uAC8C%uD574%uC11C%uB4E0%20%uC6B4%uC601%20%uC790%uC6D0%uC744%20%uC544%uB07C%uB824%uB294%20%uB178%uB825%uC758%20%uC77C%uD658%uC73C%uB85C%20%uBCF4%uC600%uB2E4.%0A%0A%23%23%20%uB2E4%uC2DC%20%uB3CC%uC544%uC624%uC790.%20setCommand%uB85C.%0A%0A%60%60%60%0A//%20t_string.c%0A%0Avoid%20setCommand%28redisClient%20*c%29%20%7B%0A%0A%20%20%20%20//%20...%20%uC911%uB7B5%20...%0A%0A%20%20%20%20c-%3Eargv%5B2%5D%20%3D%20tryObjectEncoding%28c-%3Eargv%5B2%5D%29%3B%20//%20%uC598%uB294%20%uBB54%uAC00%3F%0A%20%20%20%20setGenericCommand%28c%2Cflags%2Cc-%3Eargv%5B1%5D%2Cc-%3Eargv%5B2%5D%2Cexpire%2Cunit%2CNULL%2CNULL%29%3B%0A%7D%0A%0A%60%60%60%0A%0A%uC774%uC81C%20%uADF8%20%uC778%uCF54%uB529%20%uB41C%20%uB0B4%uC6A9%uC744%20%60c-%3Eargv%5B2%5D%60%uC5D0%20%uC9D1%uC5B4%uB123%uB294%uB2E4%uB294%20%uAC83%uC744%20%uC54C%uAC8C%20%uB410%uB2E4.%20%uC800%uAE30%uC5D0%uB294%20%60robj%60%uC758%20%uD3EC%uC778%uD130%uAC00%20%uC800%uC7A5%uB41C%uB2E4.%20%uC544%uB9C8%2C%20%uADF8%uAC8C%20%60set%60%uBA85%uB839%uC5B4%uC758%20%uC778%uC790%uB85C%20%uC4F0%uC774%uB294%20%uAC83%20%uAC19%uB2E4.%20%uC774%uC81C%20%uC2E4%uC81C%20%uC77C%uC744%20%uCC98%uB9AC%uD558%uB294%20%60setGenericCommand%60%uC744%20%uC0B4%uD3B4%uBCFC%20%uCC28%uB840%uB2E4.%0A%0A%60%60%60%0A//%20t_string.c%0A%0Avoid%20setGenericCommand%28redisClient%20*c%2C%20int%20flags%2C%20robj%20*key%2C%20robj%20*val%2C%20robj%20*expire%2C%20int%20unit%2C%20robj%20*ok_reply%2C%20robj%20*abort_reply%29%20%7B%0A%20%20%20%20long%20long%20milliseconds%20%3D%200%3B%20/*%20initialized%20to%20avoid%20any%20harmness%20warning%20*/%0A%0A%20%20%20%20if%20%28expire%29%20%7B%0A%20%20%20%20%20%20%20%20if%20%28getLongLongFromObjectOrReply%28c%2C%20expire%2C%20%26milliseconds%2C%20NULL%29%20%21%3D%20REDIS_OK%29%0A%20%20%20%20%20%20%20%20%20%20%20%20return%3B%0A%20%20%20%20%20%20%20%20if%20%28milliseconds%20%3C%3D%200%29%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20addReplyErrorFormat%28c%2C%22invalid%20expire%20time%20in%20%25s%22%2Cc-%3Ecmd-%3Ename%29%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20return%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20if%20%28unit%20%3D%3D%20UNIT_SECONDS%29%20milliseconds%20*%3D%201000%3B%0A%20%20%20%20%7D%0A%0A%20%20%20%20if%20%28%28flags%20%26%20REDIS_SET_NX%20%26%26%20lookupKeyWrite%28c-%3Edb%2Ckey%29%20%21%3D%20NULL%29%20%7C%7C%0A%20%20%20%20%20%20%20%20%28flags%20%26%20REDIS_SET_XX%20%26%26%20lookupKeyWrite%28c-%3Edb%2Ckey%29%20%3D%3D%20NULL%29%29%0A%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20addReply%28c%2C%20abort_reply%20%3F%20abort_reply%20%3A%20shared.nullbulk%29%3B%0A%20%20%20%20%20%20%20%20return%3B%0A%20%20%20%20%7D%0A%20%20%20%20setKey%28c-%3Edb%2Ckey%2Cval%29%3B%0A%20%20%20%20server.dirty++%3B%0A%20%20%20%20if%20%28expire%29%20setExpire%28c-%3Edb%2Ckey%2Cmstime%28%29+milliseconds%29%3B%0A%20%20%20%20notifyKeyspaceEvent%28REDIS_NOTIFY_STRING%2C%22set%22%2Ckey%2Cc-%3Edb-%3Eid%29%3B%0A%20%20%20%20if%20%28expire%29%20notifyKeyspaceEvent%28REDIS_NOTIFY_GENERIC%2C%0A%20%20%20%20%20%20%20%20%22expire%22%2Ckey%2Cc-%3Edb-%3Eid%29%3B%0A%20%20%20%20addReply%28c%2C%20ok_reply%20%3F%20ok_reply%20%3A%20shared.ok%29%3B%0A%7D%0A%60%60%60%0A%0A%60expire%60%uC640%20%uAD00%uB828%uB41C%20%uAD6C%uD604%uC740%20%uB2E4%uC74C%uC5D0%20%uC0B4%uD3B4%uBCF4%uAE30%uB85C%uD558%uC790.%20%uC9C0%uAE08%20%uC911%uC694%uD55C%20%uAC83%uC740%20%60setKey%60%uD568%uC218%uB2E4.%20%60addReply%60%uD568%uC218%uB294%20%60OK%60%uC751%uB2F5%uC744%20%uD558%uB294%20%uD568%uC218%uB2E4.%20%uC800%uAE30%uB97C%20%uBCF4%uBA74%2C%20default%uAC00%20%60shared.ok%60%uB2E4.%20%20%uADF8%uB807%uB2E4.%20%60SET%60%20%uCEE4%uB9E8%uB4DC%uB294%20%uC2E4%uD328%uD558%uC9C0%20%uC54A%uB294%uB2E4.%0A%0A%60%60%60%0A//%20db.c%0A%0Avoid%20setKey%28redisDb%20*db%2C%20robj%20*key%2C%20robj%20*val%29%20%7B%0A%20%20%20%20if%20%28lookupKeyWrite%28db%2Ckey%29%20%3D%3D%20NULL%29%20%7B%0A%20%20%20%20%20%20%20%20dbAdd%28db%2Ckey%2Cval%29%3B%0A%20%20%20%20%7D%20else%20%7B%0A%20%20%20%20%20%20%20%20dbOverwrite%28db%2Ckey%2Cval%29%3B%0A%20%20%20%20%7D%0A%20%20%20%20incrRefCount%28val%29%3B%0A%20%20%20%20removeExpire%28db%2Ckey%29%3B%0A%20%20%20%20signalModifiedKey%28db%2Ckey%29%3B%20//%20client%uB4E4%uC5D0%uAC8C%20%uBCC0%uACBD%20%uC774%uBCA4%uD2B8%uB97C%20%uC54C%uB9B0%uB2E4.%0A%7D%0A%0A%60%60%60%0A%0A%60setKey%60%20%uD568%uC218%uB294%20%uACE0%uC218%uC900%uC758%20%60Set%20operation%60%uC744%20%uD45C%uD604%uD558%uB294%20%uD568%uC218%uB2E4.%20%uC774%20%uD568%uC218%uB294%20%uD604%uC7AC%20%uD574%uB2F9%20%uD0A4%uB97C%20%uAC00%uC9C4%20object%uAC00%20%uC788%uB294%uC9C0%20%uC5C6%uB294%uC9C0%20%uAC80%uC0AC%uD558%uACE0%2C%20%uC788%uB2E4%uBA74%20overwrite%uB97C%2C%20%uC5C6%uB2E4%uBA74%20%uC0C8%20object%uB97C%20%uD560%uB2F9%uD558%uB294%20%uC5ED%uD560%uC744%20%uD55C%uB2E4.%20%20%60incrRefCount%60%uB294%20%uD574%uB2F9%20%uAC12%uC774%201%uD68C%20%uCC38%uC870%uB428%uC744%20%uC758%uBBF8%uD558%uBA70%2C%20%uC800%uC7A5%uB418%uBA74%uC11C%20%60key%60%uC5D0%20%uCC38%uC870%uB410%uC74C%uC744%20%uD45C%uD604%uD55C%uB2E4.%20%uAE30%uC874%uC5D0%20%60key%60%uC5D0%20%uD560%uB2F9%uB418%uC5B4%uC788%uB358%20%60expire%60%uC740%20%uC5C6%uC564%uB2E4.%20%28%uD0A4%uC5D0%20%uC0C8%uB85C%uC6B4%20%uAC12%uC774%20%uD560%uB2F9%uB418%uC5C8%uC73C%uBBC0%uB85C%20%uAE30%uC874%uC5D0%20%uC788%uB358%uAC74%20%uC81C%uAC70%uD574%uC57C.%29%20%20%0A%0A%60signalModifiedKey%60%uB294%20%uB2E4%uC74C%uC5D0%20%uC54C%uC544%uBCF4%uB3C4%uB85D%20%uD558%uC790.%0A%0A%23%23%20getCommand%uB3C4%20%uC54C%uC544%uBCF4%uC790.%0A%0A%60%60%60%0Aint%20getGenericCommand%28redisClient%20*c%29%20%7B%0A%20%20%20%20robj%20*o%3B%0A%0A%20%20%20%20if%20%28%28o%20%3D%20lookupKeyReadOrReply%28c%2Cc-%3Eargv%5B1%5D%2Cshared.nullbulk%29%29%20%3D%3D%20NULL%29%0A%20%20%20%20%20%20%20%20return%20REDIS_OK%3B%0A%0A%20%20%20%20if%20%28o-%3Etype%20%21%3D%20REDIS_STRING%29%20%7B%0A%20%20%20%20%20%20%20%20addReply%28c%2Cshared.wrongtypeerr%29%3B%0A%20%20%20%20%20%20%20%20return%20REDIS_ERR%3B%0A%20%20%20%20%7D%20else%20%7B%0A%20%20%20%20%20%20%20%20addReplyBulk%28c%2Co%29%3B%0A%20%20%20%20%20%20%20%20return%20REDIS_OK%3B%0A%20%20%20%20%7D%0A%7D%0A%0Avoid%20getCommand%28redisClient%20*c%29%20%7B%0A%20%20%20%20getGenericCommand%28c%29%3B%0A%7D%0A%60%60%60%0A%0A%uBE44%uAD50%uC801%20%uB9E4%uC6B0%20%uAC04%uB2E8%uD558%uB2E4.%20%60c-%3Eargv%5B1%5D%60%28redis%20command%uC758%20%60GET%60%uB2E4%uC74C%20%uC778%uC790%29%uAC00%20key%uB2E4.%20%60lookupKeyReadOrReply%60%uB85C%20DB%uB97C%20%uD655%uC778%uD574%20%uD574%uB2F9%20%uD0A4%uB97C%20%uC870%uD68C%uD55C%20%uD6C4%2C%20%uBC18%uD658%uD55C%uB2E4.%0A%0A%23%23%20%uB05D%0A%0A%uAE30%uBCF8%uC801%uC778%20%uAD6C%uD604%uC5D0%20%uB300%uD55C%20%uB0B4%uC6A9%uC740%20%uC54C%uC544%uBCF4%uC558%uB2E4.%20%0A%uCC9C%uCC9C%uD788%20%uC880%20%uB354%20%uC790%uC138%uD788%20%uB4E4%uC5B4%uAC00%uBCF4%uC790.%20%uCD08%uBC18%uBD80%uD130%20%uC624%uBC14%uD558%uB2E4%20%uC9C0%uCE58%uC9C0%20%uC54A%uB3C4%uB85D%20%uCC9C%uCC9C%uD788.%0A%0A@%28%uD0DC%uADF8%29%5B%uD2F0%uC2A4%uD1A0%uB9AC%7Credis%7C%uB808%uB514%uC2A4%7C%uC544%uD0A4%uD14D%uCCD0%7C%uB0B4%uBD80%uAD6C%uC870%7C%uC18C%uC2A4%5D&lt;/center&gt;
&lt;br /&gt;&lt;/en-note&gt;</description>
      <category>Develop</category>
      <category>nosql</category>
      <category>redis</category>
      <category>내부구조</category>
      <category>레디스</category>
      <category>소스</category>
      <category>아키텍쳐</category>
      <author>youngkyu.cho</author>
      <guid isPermaLink="true">https://youngkyu.tistory.com/35</guid>
      <comments>https://youngkyu.tistory.com/35#entry35comment</comments>
      <pubDate>Sun, 23 Aug 2015 05:05:47 +0900</pubDate>
    </item>
    <item>
      <title>nodejs로 Azure(애저) 클라우드 알림 허브 푸시알림 보내기</title>
      <link>https://youngkyu.tistory.com/34</link>
      <description>&lt;en-note lang=&quot;v2&quot; style=&quot;color: #2c3f51; font-family: 'Helvetica Neue', Arial, 'Hiragino Sans GB', STHeiti, 'Microsoft YaHei', 'WenQuanYi Micro Hei', SimSun, Song, sans-serif; line-height: 1.6;&quot;&gt;&lt;del style=&quot;position:relative;display:block&quot;&gt;&lt;a style=&quot;position: absolute;color: #FFF;text-decoration: none;font-size: 12px;height: 25px;border-radius: 0;margin-top: -20px;right: 15px;background: rgba(0, 0, 0, 0);border-left: 10px solid #BB3A34;border-right: 10px solid #BB3A34;border-bottom: 5px solid rgba(0, 0, 0, 0);width: 0;text-indent:-100000px;&quot; href=&quot;http://marxi.co/#/?provider=evernote_int&amp;amp;guid=b72cc48a-d080-4cdd-a199-b47a5c069784&quot;&gt;Edit&lt;/a&gt;&lt;/del&gt;&lt;div style=&quot;color: #2c3f51; font-family: 'Helvetica Neue', Arial, 'Hiragino Sans GB', STHeiti, 'Microsoft YaHei', 'WenQuanYi Micro Hei', SimSun, Song, sans-serif; line-height: 1.6;&quot;&gt;


&lt;p&gt;&lt;/p&gt;&lt;h2 style=&quot;font-family: inherit; font-weight: bold; line-height: 1.1; font-size: 2.15em; margin-top: 1.2em; margin-right: 0px; margin-bottom: 0.6em; text-align: start; color: rgba(0, 0, 0, 0.8);&quot;&gt;알림 허브&lt;/h2&gt;

&lt;p style=&quot;margin: 0 0 1.1em; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;애저가 한국에서 많은 사람들이 사용하는 인기있는 서비스가 아니라, 뭔가 하나 하려면 생각보다 많은 공을 들여야 했다. 일단 내가 삽질을 헀으니, 다음 사람은 삽질하질 않길 바라는 마음으로 자주 &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;Azure(애저)&lt;/code&gt;와 관련된 글을 올리려 한다. &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;MS&lt;/code&gt;를 좋아하지 않았지만, 최근 행보와 서비스가 참 마음에 들었다. 특히 아마존 그 언저리되는 수준의 애저 서비스는 상당히 인상 깊었다. 그래서 최근 내가 운영하는 스타트업 &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;Haffle&lt;/code&gt;은 &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;슈퍼레디&lt;/code&gt;라는 서비스를 만들며 이 애저를 이용하기로 했다. &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;슈퍼레디&lt;/code&gt; 특성상 꼭 필요했던 서비스가 바로 푸시 알림이다. 이것을 구현하기는 어렵지 않겠지만, 다수의 사용자가 어떻게 알림을 구독하는지를 제어하고 이를 한 사용자의 다수의 각기 다른 디바이스에 알림을 골고루 뿌리는 일이 꽤 번거롭게 생각됐다. 아니, 본질인 서비스를 만드는 것 보다 오히려 여기에 상당한 시간을 들여야 한다 생각이 들었다.&lt;/p&gt;&lt;p style=&quot;margin: 0 0 1.1em; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;그러다 알게된 서비스가 바로 애저의 &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;알림허브&lt;/code&gt;다. 알림 허브는 다양한 플랫폼에서 지원되는 푸시 알림 인프라 서비스로,  &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;tag&lt;/code&gt;를 이용해 마치 검색하듯 알림을 손쉽게 보낼 수 있다. 빠르고 저렴하며, 우리가 제작하는 것 보다 안정적이라는 점이 상당히 마음에 들었다.  애저를 이용해 알림 인프라를 구축하는 비용보다 저렴하면서도 필요한 모든 기능이 제공됐다.&lt;/p&gt;&lt;p style=&quot;margin: 0 0 1.1em; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;어찌됐든 쓰기로하고 나서 막상 개발하려니 막막했는데, 문서화가 잘 되어있지 않은 점 때문이었다. 당연하게도 C#쪽 문서는 완벽했지만 nodejs쪽은 불친절한 API 문서 외에는 거의 뭐 설명서가 제대로 없었다. 공식 사이트에선 찾을 수 없어서 이리저리 뒤져봤는데 원하는 만큼의 딱 들어맞는 예시는 찾을 수 없었다. 생각보다 구글에서 영어로 찾아도 잘 안찾아지는? 그래서 내가 쓴다.&lt;/p&gt;&lt;p style=&quot;margin: 0 0 1.1em; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;뭔가 멋지게 설명하고 싶은데, 어차피 예제 코드만 볼 것 같아, 코드만 쫙 보여주는 식으로 쓰겠다. 안드로이드와 아이폰만 우리가 필요해서 두개의 코드만 있는데, 원래는 엄청 다양한 플랫폼을 지원한다.&lt;/p&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 1.6;&quot;&gt;

&lt;h2 style=&quot;font-family: inherit; font-weight: bold; line-height: 1.1; margin-top: 21px; margin-bottom: 10.5px; font-size: 2.15em; margin: 1.2em 0 .6em 0; text-align: start; color: rgba(0,0,0,0.8);&quot;&gt;먼저,&lt;/h2&gt;

&lt;p style=&quot;margin: 0 0 1.1em; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;당연히 애저에 가입하고, 관리 포털을 접속하여 알림허브 서비스를 구성해야한다. &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;서비스 버스&lt;/code&gt; 메뉴에서 알림허브를 만들 수 있다.&lt;/p&gt;&lt;p style=&quot;margin: 0 0 1.1em; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;그리고 나면 &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;npm&lt;/code&gt;으로 &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;azure&lt;/code&gt; 패키지를 설치한다.&lt;/p&gt;

&lt;pre style=&quot;word-break: break-word; font-family: 'Source Code Pro',monospace; white-space: pre-wrap; display: block; background-color: rgba(102,128,153,0.05); color: #333; word-wrap: break-word; font-size: .9em; line-height: 1.6; margin: 0 0 1.1em; padding: 2px; border: 0; border-radius: 5px; text-align: start;&quot;&gt;&lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: inherit; white-space: pre-wrap; border-radius: 0; color: #000; background-color: #f0f0f0; display: block; padding: 18px 28px;&quot;&gt;sudo npm &lt;span style=&quot;line-height: 1.6; font-weight: bold;&quot;&gt;install&lt;/span&gt; azure
&lt;/code&gt;&lt;/pre&gt;

&lt;p style=&quot;margin: 0 0 1.1em; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;이후,  서브라임 텍스트 같은 편집기를 켜서 작업을 시작한다. 첫 줄에 먼저 모듈을 로드한다.&lt;/p&gt;

&lt;pre style=&quot;word-break: break-word; font-family: 'Source Code Pro',monospace; white-space: pre-wrap; display: block; background-color: rgba(102,128,153,0.05); color: #333; word-wrap: break-word; font-size: .9em; line-height: 1.6; margin: 0 0 1.1em; padding: 2px; border: 0; border-radius: 5px; text-align: start;&quot;&gt;&lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: inherit; white-space: pre-wrap; border-radius: 0; color: #000; background-color: #f0f0f0; display: block; padding: 18px 28px;&quot;&gt;&lt;span style=&quot;line-height: 1.6;&quot;&gt;var&lt;/span&gt; azure = &lt;span style=&quot;line-height: 1.6; font-weight: bold;&quot;&gt;require&lt;/span&gt;(&lt;span style=&quot;line-height: 1.6; color: #800;&quot;&gt;'azure'&lt;/span&gt;);
&lt;/code&gt;&lt;/pre&gt;

&lt;p style=&quot;margin: 0 0 1.1em; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;그리고 알림 허브와 연결을 하고, 명령을 처리해줄 객체를 만들어야한다.&lt;/p&gt;

&lt;pre style=&quot;word-break: break-word; font-family: 'Source Code Pro',monospace; white-space: pre-wrap; display: block; background-color: rgba(102,128,153,0.05); color: #333; word-wrap: break-word; font-size: .9em; line-height: 1.6; margin: 0 0 1.1em; padding: 2px; border: 0; border-radius: 5px; text-align: start;&quot;&gt;&lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: inherit; white-space: pre-wrap; border-radius: 0; color: #000; background-color: #f0f0f0; display: block; padding: 18px 28px;&quot;&gt;&lt;span style=&quot;line-height: 1.6; font-weight: bold;&quot;&gt;var&lt;/span&gt; notificationHubService = azure.createNotificationHubService(&lt;span style=&quot;line-height: 1.6; color: #800;&quot;&gt;'hubname'&lt;/span&gt;,&lt;span style=&quot;line-height: 1.6; color: #800;&quot;&gt;'connectionstring'&lt;/span&gt;);
&lt;/code&gt;&lt;/pre&gt;

&lt;p style=&quot;margin: 0 0 1.1em; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;저기서 파라매터로 들어가는 &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;hubname&lt;/code&gt;과 &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;connectionstring&lt;/code&gt;은  Azure 관리 포털에서 알 수 있다. &lt;br /&gt;
&lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;hubname&lt;/code&gt;은 &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;서비스 허브&lt;/code&gt;에서 구성할 때 입력한 이름이고, &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;connectionstring&lt;/code&gt;은 알림 허브 대시보드 어딘가에 보이는 &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;연결 문자열 보기&lt;/code&gt;를 클릭하면 알 수 있다. 그 긴 &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;연결 문자열&lt;/code&gt;을 복붙하면 된다.&lt;/p&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 1.6;&quot;&gt;

&lt;h2 style=&quot;font-family: inherit; font-weight: bold; line-height: 1.1; margin-top: 21px; margin-bottom: 10.5px; font-size: 2.15em; margin: 1.2em 0 .6em 0; text-align: start; color: rgba(0,0,0,0.8);&quot;&gt;태그란?&lt;/h2&gt;

&lt;p style=&quot;margin: 0 0 1.1em; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;잠깐 알아야할 게 있다. 애저는 태그를 사용해 푸시 알림의 스코프를 관리한다. 모든 사용자에게 브로드캐스트 할 수도 있지만, 어떨 때는 딱 한 명한태만 하고 싶을 때도 있다. 예를들어 나는 아이폰과 아이패드, 그리고 안드로이드 폰 세개를 쓰는데, 내게 와야할 알림이 아이패드만 오거나 아이폰에만 오면 안되고 3개의 디바이스 모두에 와야하지 않겠는가. 이럴때 &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;tag&lt;/code&gt;를 &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;youngkyu&lt;/code&gt;라고 쓰고, &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;youngkyu&lt;/code&gt;란 태그에 푸시를 쏘면 모든 &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;youngkyu&lt;/code&gt;의 디바이스에 푸시 알림이 도착한다.&lt;/p&gt;

&lt;/div&gt;
&lt;div style=&quot;line-height: 1.6;&quot;&gt;

&lt;h2 style=&quot;font-family: inherit; font-weight: bold; line-height: 1.1; margin-top: 21px; margin-bottom: 10.5px; font-size: 2.15em; margin: 1.2em 0 .6em 0; text-align: start; color: rgba(0,0,0,0.8);&quot;&gt;서비스 버스 알림 허브에 시그니처와 API 키 등록&lt;/h2&gt;

&lt;p style=&quot;margin: 0 0 1.1em; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;알림 허브에 &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;구성&lt;/code&gt;을 클릭하면 APNS와 GCM의 시그니처와 키를 등록하는 곳이 있다. 여기에 해당 파일과 키를 올려줘야 애저에서 처리할 수 있는 환경이 조성된다.&lt;/p&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 1.6;&quot;&gt;

&lt;h2 style=&quot;font-family: inherit; font-weight: bold; line-height: 1.1; margin-top: 21px; margin-bottom: 10.5px; font-size: 2.15em; margin: 1.2em 0 .6em 0; text-align: start; color: rgba(0,0,0,0.8);&quot;&gt;디바이스 등록하기&lt;/h2&gt;

&lt;p style=&quot;margin: 0 0 1.1em; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;먼저 디바이스를 등록해야한다. 이때 &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;youngkyu&lt;/code&gt;로 예시를 들었던 &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;tag&lt;/code&gt;도 설정한다. 잘 추상화되어있어서, 푸시알림의 과정을 정확히 이해하지 못해도 원활히 사용할 수 있다. 이 과정에 대한 얘기는 다음에 포스팅하겠다.&lt;/p&gt;

&lt;/div&gt;
&lt;div style=&quot;line-height: 1.6;&quot;&gt;

&lt;h3 style=&quot;font-family: inherit; font-weight: bold; margin-top: 21px; margin-bottom: 10.5px; font-size: 1.7em; margin: 1.2em 0 .6em 0; text-align: start; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;아이폰&lt;/h3&gt;

&lt;p style=&quot;margin: 0 0 1.1em; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;먼저 아이폰의 &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;deviceToken&lt;/code&gt;이 필요하다. 이건 애저와 관련이 없으므로 여기서 설명하지 않는다.&lt;/p&gt;

&lt;pre style=&quot;word-break: break-word; font-family: 'Source Code Pro',monospace; white-space: pre-wrap; display: block; background-color: rgba(102,128,153,0.05); color: #333; word-wrap: break-word; font-size: .9em; line-height: 1.6; margin: 0 0 1.1em; padding: 2px; border: 0; border-radius: 5px; text-align: start;&quot;&gt;&lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: inherit; white-space: pre-wrap; border-radius: 0; color: #000; background-color: #f0f0f0; display: block; padding: 18px 28px;&quot;&gt;notificationHubService.apns
    .createNativeRegistration(deviceToken,tags,&lt;span style=&quot;line-height: 1.6; color: #080;&quot;&gt;null&lt;/span&gt;,&lt;span style=&quot;line-height: 1.6;&quot;&gt;&lt;span style=&quot;line-height: 1.6; font-weight: bold;&quot;&gt;function&lt;/span&gt;&lt;span style=&quot;line-height: 1.6;&quot;&gt;(error)&lt;/span&gt;&lt;/span&gt;{
    &lt;span style=&quot;line-height: 1.6; color: #888;&quot;&gt;// To do&lt;/span&gt;
});
&lt;/code&gt;&lt;/pre&gt;

&lt;p style=&quot;margin: 0 0 1.1em; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;여기서 파라매터에 &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;deviceToken&lt;/code&gt;은 받아온 토큰을 집어넣고, &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;tags&lt;/code&gt;에는 배열에 담은 태그들을 집어넣는다. 세번째 &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;null&lt;/code&gt;은 &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;option&lt;/code&gt;으로 중요하지 않다. 제대로 설명도 안되있어서 아직 기능이 크게는 없는 듯 하다. 마지막 &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;callback&lt;/code&gt;에 이후 할 작업 함수를 넣는다.&lt;/p&gt;&lt;p style=&quot;margin: 0 0 1.1em; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;아래는 내가 쓴 코드 일부다.&lt;/p&gt;

&lt;pre style=&quot;word-break: break-word; font-family: 'Source Code Pro',monospace; white-space: pre-wrap; display: block; background-color: rgba(102,128,153,0.05); color: #333; word-wrap: break-word; font-size: .9em; line-height: 1.6; margin: 0 0 1.1em; padding: 2px; border: 0; border-radius: 5px; text-align: start;&quot;&gt;&lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: inherit; white-space: pre-wrap; border-radius: 0; color: #000; background-color: #f0f0f0; display: block; padding: 18px 28px;&quot;&gt;notificationHubService.gcm
    .createNativeRegistration(deviceToken,[&lt;span style=&quot;line-height: 1.6; color: #800;&quot;&gt;&quot;user&quot;&lt;/span&gt;,&lt;span style=&quot;line-height: 1.6; color: #800;&quot;&gt;&quot;user.&quot;&lt;/span&gt;+userId],&lt;span style=&quot;line-height: 1.6; color: #080;&quot;&gt;null&lt;/span&gt;,&lt;span style=&quot;line-height: 1.6;&quot;&gt;&lt;span style=&quot;line-height: 1.6; font-weight: bold;&quot;&gt;function&lt;/span&gt;(&lt;/span&gt;&lt;span style=&quot;line-height: 1.6; font-weight: bold;&quot;&gt;error&lt;/span&gt;){
    &lt;span style=&quot;line-height: 1.6; font-weight: bold;&quot;&gt;if&lt;/span&gt;(!&lt;span style=&quot;line-height: 1.6; font-weight: bold;&quot;&gt;error&lt;/span&gt;) {

    }
});
&lt;/code&gt;&lt;/pre&gt;

&lt;p style=&quot;margin: 0 0 1.1em; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;태그에 &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;[&quot;user&quot;,&quot;user.&quot;+userId]&lt;/code&gt;가 보이는가. 이렇게 적게되면 이후 &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;&quot;user&quot;&lt;/code&gt;라는 태그에 푸시를 때리면 모든 &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;&quot;user&quot;&lt;/code&gt;태그를 가진 디바이스가     받게 된다. 그리고 &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;&quot;user.12&quot;&lt;/code&gt;라고 하면 12번 유저 아이디의 사용자만 받게 되는 식이다.&lt;/p&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 1.6;&quot;&gt;

&lt;h3 style=&quot;font-family: inherit; font-weight: bold; margin-top: 21px; margin-bottom: 10.5px; font-size: 1.7em; margin: 1.2em 0 .6em 0; text-align: start; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;안드로이드&lt;/h3&gt;

&lt;p style=&quot;margin: 0 0 1.1em; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;마찬가지로 &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;deviceToken&lt;/code&gt;인 &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;gcmRegistrationId&lt;/code&gt;가 먼저 필요하다.&lt;/p&gt;

&lt;pre style=&quot;word-break: break-word; font-family: 'Source Code Pro',monospace; white-space: pre-wrap; display: block; background-color: rgba(102,128,153,0.05); color: #333; word-wrap: break-word; font-size: .9em; line-height: 1.6; margin: 0 0 1.1em; padding: 2px; border: 0; border-radius: 5px; text-align: start;&quot;&gt;&lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: inherit; white-space: pre-wrap; border-radius: 0; color: #000; background-color: #f0f0f0; display: block; padding: 18px 28px;&quot;&gt;notificationHubService.gcm
    .createNativeRegistration(gcmRegistrationId,tags,&lt;span style=&quot;line-height: 1.6; color: #080;&quot;&gt;null&lt;/span&gt;,&lt;span style=&quot;line-height: 1.6;&quot;&gt;&lt;span style=&quot;line-height: 1.6; font-weight: bold;&quot;&gt;function&lt;/span&gt;&lt;span style=&quot;line-height: 1.6;&quot;&gt;(error)&lt;/span&gt;&lt;/span&gt;{
    &lt;span style=&quot;line-height: 1.6; color: #888;&quot;&gt;// To do&lt;/span&gt;
});
&lt;/code&gt;&lt;/pre&gt;

&lt;p style=&quot;margin: 0 0 1.1em; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;위와 똑같다. &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;gcm&lt;/code&gt;만 빼고.&lt;/p&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 1.6;&quot;&gt;

&lt;h2 style=&quot;font-family: inherit; font-weight: bold; line-height: 1.1; margin-top: 21px; margin-bottom: 10.5px; font-size: 2.15em; margin: 1.2em 0 .6em 0; text-align: start; color: rgba(0,0,0,0.8);&quot;&gt;푸시 보내기&lt;/h2&gt;

&lt;p style=&quot;margin: 0 0 1.1em; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;등록이 끝나고 나면, 아래 코드를 실행해본다.&lt;/p&gt;

&lt;pre style=&quot;word-break: break-word; font-family: 'Source Code Pro',monospace; white-space: pre-wrap; display: block; background-color: rgba(102,128,153,0.05); color: #333; word-wrap: break-word; font-size: .9em; line-height: 1.6; margin: 0 0 1.1em; padding: 2px; border: 0; border-radius: 5px; text-align: start;&quot;&gt;&lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: inherit; white-space: pre-wrap; border-radius: 0; color: #000; background-color: #f0f0f0; display: block; padding: 18px 28px;&quot;&gt;&lt;span style=&quot;line-height: 1.6; font-weight: bold;&quot;&gt;var&lt;/span&gt; payload = {
    alert : &lt;span style=&quot;line-height: 1.6; color: #800;&quot;&gt;&quot;hello noti!&quot;&lt;/span&gt;,
    sound : &lt;span style=&quot;line-height: 1.6; color: #800;&quot;&gt;&quot;default&quot;&lt;/span&gt;
}
notificationHubService.apns.send(&lt;span style=&quot;line-height: 1.6; color: #080;&quot;&gt;null&lt;/span&gt;,payload,&lt;span style=&quot;line-height: 1.6;&quot;&gt;&lt;span style=&quot;line-height: 1.6; font-weight: bold;&quot;&gt;function&lt;/span&gt;&lt;span style=&quot;line-height: 1.6;&quot;&gt;(error)&lt;/span&gt;&lt;/span&gt;{});
&lt;/code&gt;&lt;/pre&gt;

&lt;p style=&quot;margin: 0 0 1.1em; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;띵똥. 푸시가 왔는가? &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;payload&lt;/code&gt;에 &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;sound&lt;/code&gt;가 소리를 내는 역할을 하고, &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;alert&lt;/code&gt;이 글을 표현한다. 그리고 &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;send()&lt;/code&gt;의 첫번째 인자는 &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;tag&lt;/code&gt;인데, &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;null&lt;/code&gt;이면 브로드캐스트다. 모든 등록된 아이폰/IOS 디바이스에 전송한다. 따라서 받게 되는 것이다.&lt;/p&gt;

&lt;pre style=&quot;word-break: break-word; font-family: 'Source Code Pro',monospace; white-space: pre-wrap; display: block; background-color: rgba(102,128,153,0.05); color: #333; word-wrap: break-word; font-size: .9em; line-height: 1.6; margin: 0 0 1.1em; padding: 2px; border: 0; border-radius: 5px; text-align: start;&quot;&gt;&lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: inherit; white-space: pre-wrap; border-radius: 0; color: #000; background-color: #f0f0f0; display: block; padding: 18px 28px;&quot;&gt;&lt;span style=&quot;line-height: 1.6; font-weight: bold;&quot;&gt;var&lt;/span&gt; payload = {
    alert : &lt;span style=&quot;line-height: 1.6; color: #800;&quot;&gt;&quot;hello users!&quot;&lt;/span&gt;,
    sound : &lt;span style=&quot;line-height: 1.6; color: #800;&quot;&gt;&quot;default&quot;&lt;/span&gt;
}
notificationHubService.apns.send(&lt;span style=&quot;line-height: 1.6; color: #800;&quot;&gt;&quot;user&quot;&lt;/span&gt;,payload,&lt;span style=&quot;line-height: 1.6;&quot;&gt;&lt;span style=&quot;line-height: 1.6; font-weight: bold;&quot;&gt;function&lt;/span&gt;&lt;span style=&quot;line-height: 1.6;&quot;&gt;(error)&lt;/span&gt;&lt;/span&gt;{});
&lt;/code&gt;&lt;/pre&gt;

&lt;p style=&quot;margin: 0 0 1.1em; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;위와 같이 보내면 &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;user&lt;/code&gt;태그를 가진 디바이스만 받게 된다. 만약 태그를 여러개 지정하고 싶다면, 아래와 같은 규칙을 쓰면 된다.&lt;/p&gt;

&lt;ul style=&quot;margin-top: 0; margin-bottom: 1.1em; line-height: 1.6;&quot;&gt;
&lt;li style=&quot;line-height: 1.6;&quot;&gt;여러 태그들에 : “user.12||user.23||user.24”&lt;/li&gt;
&lt;li style=&quot;line-height: 1.6;&quot;&gt;두 태그 다 가지고 있는 : “user||post.15”&lt;/li&gt;
&lt;/ul&gt;

&lt;p style=&quot;margin: 0 0 1.1em; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;간단하다.&lt;/p&gt;

&lt;/div&gt;
&lt;div style=&quot;line-height: 1.6;&quot;&gt;

&lt;h2 style=&quot;font-family: inherit; font-weight: bold; line-height: 1.1; margin-top: 21px; margin-bottom: 10.5px; font-size: 2.15em; margin: 1.2em 0 .6em 0; text-align: start; color: rgba(0,0,0,0.8);&quot;&gt;끝!&lt;/h2&gt;

&lt;p style=&quot;margin: 0 0 1.1em; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;아주 간단하지만 많이 당황스러웠다. 섬세히 알려주는 튜토리얼 하나 없이 고작 API문서 딸랑 하나보고 시작했으니. 어쨌든 쉽다. 그리고 매우 강력하다. 푸시 시스템을 직접 만들면 더 저렴했을지 모르지만 (실은 그렇지도 않을 거다) 기회 비용이 상당히 높게된다. 서비스를 만드는 회사니 서비스에 집중해야하는데 말이다. API 문서는 아래 주소를 눌러 볼 수 있다. 다음 포스트에서는 초기에 설정한 &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;tag&lt;/code&gt;이외의 &lt;code style=&quot;font-family: 'Source Code Pro',monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;tag&lt;/code&gt;들을 추가해보자.&lt;/p&gt;&lt;p style=&quot;margin: 0 0 1.1em; line-height: 1.6; color: rgba(0,0,0,0.8);&quot;&gt;&lt;a href=&quot;http://dl.windowsazure.com/nodedocs/NotificationHubService.html&quot; target=&quot;_blank&quot; style=&quot;background: transparent; color: #1980e6; text-decoration: none;&quot;&gt;http://dl.windowsazure.com/nodedocs/NotificationHubService.html&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;div style=&quot;line-height: 1.6;&quot;&gt;&lt;/div&gt;

&lt;center style=&quot;display:none&quot;&gt;%23%20nodejs%uB85C%20Azure%28%uC560%uC800%29%20%uD074%uB77C%uC6B0%uB4DC%20%uC54C%uB9BC%20%uD5C8%uBE0C%20%uD478%uC2DC%uC54C%uB9BC%20%uBCF4%uB0B4%uAE30%0A%0A@%28%uD0DC%uADF8%29%5B%uC560%uC800%7CAzure%7C%uD478%uC2DC%uC54C%uB9BC%7C%uC54C%uB9BC%uD5C8%uBE0C%7Cnodejs%7C%uD2F0%uC2A4%uD1A0%uB9AC%5D%0A%0A%23%23%20%uC54C%uB9BC%20%uD5C8%uBE0C%0A%0A%uC560%uC800%uAC00%20%uD55C%uAD6D%uC5D0%uC11C%20%uB9CE%uC740%20%uC0AC%uB78C%uB4E4%uC774%20%uC0AC%uC6A9%uD558%uB294%20%uC778%uAE30%uC788%uB294%20%uC11C%uBE44%uC2A4%uAC00%20%uC544%uB2C8%uB77C%2C%20%uBB54%uAC00%20%uD558%uB098%20%uD558%uB824%uBA74%20%uC0DD%uAC01%uBCF4%uB2E4%20%uB9CE%uC740%20%uACF5%uC744%20%uB4E4%uC5EC%uC57C%20%uD588%uB2E4.%20%uC77C%uB2E8%20%uB0B4%uAC00%20%uC0BD%uC9C8%uC744%20%uD5C0%uC73C%uB2C8%2C%20%uB2E4%uC74C%20%uC0AC%uB78C%uC740%20%uC0BD%uC9C8%uD558%uC9C8%20%uC54A%uAE38%20%uBC14%uB77C%uB294%20%uB9C8%uC74C%uC73C%uB85C%20%uC790%uC8FC%20%60Azure%28%uC560%uC800%29%60%uC640%20%uAD00%uB828%uB41C%20%uAE00%uC744%20%uC62C%uB9AC%uB824%20%uD55C%uB2E4.%20%60MS%60%uB97C%20%uC88B%uC544%uD558%uC9C0%20%uC54A%uC558%uC9C0%uB9CC%2C%20%uCD5C%uADFC%20%uD589%uBCF4%uC640%20%uC11C%uBE44%uC2A4%uAC00%20%uCC38%20%uB9C8%uC74C%uC5D0%20%uB4E4%uC5C8%uB2E4.%20%uD2B9%uD788%20%uC544%uB9C8%uC874%20%uADF8%20%uC5B8%uC800%uB9AC%uB418%uB294%20%uC218%uC900%uC758%20%uC560%uC800%20%uC11C%uBE44%uC2A4%uB294%20%uC0C1%uB2F9%uD788%20%uC778%uC0C1%20%uAE4A%uC5C8%uB2E4.%20%uADF8%uB798%uC11C%20%uCD5C%uADFC%20%uB0B4%uAC00%20%uC6B4%uC601%uD558%uB294%20%uC2A4%uD0C0%uD2B8%uC5C5%20%60Haffle%60%uC740%20%60%uC288%uD37C%uB808%uB514%60%uB77C%uB294%20%uC11C%uBE44%uC2A4%uB97C%20%uB9CC%uB4E4%uBA70%20%uC774%20%uC560%uC800%uB97C%20%uC774%uC6A9%uD558%uAE30%uB85C%20%uD588%uB2E4.%20%60%uC288%uD37C%uB808%uB514%60%20%uD2B9%uC131%uC0C1%20%uAF2D%20%uD544%uC694%uD588%uB358%20%uC11C%uBE44%uC2A4%uAC00%20%uBC14%uB85C%20%uD478%uC2DC%20%uC54C%uB9BC%uC774%uB2E4.%20%uC774%uAC83%uC744%20%uAD6C%uD604%uD558%uAE30%uB294%20%uC5B4%uB835%uC9C0%20%uC54A%uACA0%uC9C0%uB9CC%2C%20%uB2E4%uC218%uC758%20%uC0AC%uC6A9%uC790%uAC00%20%uC5B4%uB5BB%uAC8C%20%uC54C%uB9BC%uC744%20%uAD6C%uB3C5%uD558%uB294%uC9C0%uB97C%20%uC81C%uC5B4%uD558%uACE0%20%uC774%uB97C%20%uD55C%20%uC0AC%uC6A9%uC790%uC758%20%uB2E4%uC218%uC758%20%uAC01%uAE30%20%uB2E4%uB978%20%uB514%uBC14%uC774%uC2A4%uC5D0%20%uC54C%uB9BC%uC744%20%uACE8%uACE0%uB8E8%20%uBFCC%uB9AC%uB294%20%uC77C%uC774%20%uAF64%20%uBC88%uAC70%uB86D%uAC8C%20%uC0DD%uAC01%uB410%uB2E4.%20%uC544%uB2C8%2C%20%uBCF8%uC9C8%uC778%20%uC11C%uBE44%uC2A4%uB97C%20%uB9CC%uB4DC%uB294%20%uAC83%20%uBCF4%uB2E4%20%uC624%uD788%uB824%20%uC5EC%uAE30%uC5D0%20%uC0C1%uB2F9%uD55C%20%uC2DC%uAC04%uC744%20%uB4E4%uC5EC%uC57C%20%uD55C%uB2E4%20%uC0DD%uAC01%uC774%20%uB4E4%uC5C8%uB2E4.%0A%0A%uADF8%uB7EC%uB2E4%20%uC54C%uAC8C%uB41C%20%uC11C%uBE44%uC2A4%uAC00%20%uBC14%uB85C%20%uC560%uC800%uC758%20%60%uC54C%uB9BC%uD5C8%uBE0C%60%uB2E4.%20%uC54C%uB9BC%20%uD5C8%uBE0C%uB294%20%uB2E4%uC591%uD55C%20%uD50C%uB7AB%uD3FC%uC5D0%uC11C%20%uC9C0%uC6D0%uB418%uB294%20%uD478%uC2DC%20%uC54C%uB9BC%20%uC778%uD504%uB77C%20%uC11C%uBE44%uC2A4%uB85C%2C%20%20%60tag%60%uB97C%20%uC774%uC6A9%uD574%20%uB9C8%uCE58%20%uAC80%uC0C9%uD558%uB4EF%20%uC54C%uB9BC%uC744%20%uC190%uC27D%uAC8C%20%uBCF4%uB0BC%20%uC218%20%uC788%uB2E4.%20%uBE60%uB974%uACE0%20%uC800%uB834%uD558%uBA70%2C%20%uC6B0%uB9AC%uAC00%20%uC81C%uC791%uD558%uB294%20%uAC83%20%uBCF4%uB2E4%20%uC548%uC815%uC801%uC774%uB77C%uB294%20%uC810%uC774%20%uC0C1%uB2F9%uD788%20%uB9C8%uC74C%uC5D0%20%uB4E4%uC5C8%uB2E4.%20%20%uC560%uC800%uB97C%20%uC774%uC6A9%uD574%20%uC54C%uB9BC%20%uC778%uD504%uB77C%uB97C%20%uAD6C%uCD95%uD558%uB294%20%uBE44%uC6A9%uBCF4%uB2E4%20%uC800%uB834%uD558%uBA74%uC11C%uB3C4%20%uD544%uC694%uD55C%20%uBAA8%uB4E0%20%uAE30%uB2A5%uC774%20%uC81C%uACF5%uB410%uB2E4.%0A%0A%uC5B4%uCC0C%uB410%uB4E0%20%uC4F0%uAE30%uB85C%uD558%uACE0%20%uB098%uC11C%20%uB9C9%uC0C1%20%uAC1C%uBC1C%uD558%uB824%uB2C8%20%uB9C9%uB9C9%uD588%uB294%uB370%2C%20%uBB38%uC11C%uD654%uAC00%20%uC798%20%uB418%uC5B4%uC788%uC9C0%20%uC54A%uC740%20%uC810%20%uB54C%uBB38%uC774%uC5C8%uB2E4.%20%uB2F9%uC5F0%uD558%uAC8C%uB3C4%20C%23%uCABD%20%uBB38%uC11C%uB294%20%uC644%uBCBD%uD588%uC9C0%uB9CC%20nodejs%uCABD%uC740%20%uBD88%uCE5C%uC808%uD55C%20API%20%uBB38%uC11C%20%uC678%uC5D0%uB294%20%uAC70%uC758%20%uBB50%20%uC124%uBA85%uC11C%uAC00%20%uC81C%uB300%uB85C%20%uC5C6%uC5C8%uB2E4.%20%uACF5%uC2DD%20%uC0AC%uC774%uD2B8%uC5D0%uC120%20%uCC3E%uC744%20%uC218%20%uC5C6%uC5B4%uC11C%20%uC774%uB9AC%uC800%uB9AC%20%uB4A4%uC838%uBD24%uB294%uB370%20%uC6D0%uD558%uB294%20%uB9CC%uD07C%uC758%20%uB531%20%uB4E4%uC5B4%uB9DE%uB294%20%uC608%uC2DC%uB294%20%uCC3E%uC744%20%uC218%20%uC5C6%uC5C8%uB2E4.%20%uC0DD%uAC01%uBCF4%uB2E4%20%uAD6C%uAE00%uC5D0%uC11C%20%uC601%uC5B4%uB85C%20%uCC3E%uC544%uB3C4%20%uC798%20%uC548%uCC3E%uC544%uC9C0%uB294%3F%20%uADF8%uB798%uC11C%20%uB0B4%uAC00%20%uC4F4%uB2E4.%0A%0A%uBB54%uAC00%20%uBA4B%uC9C0%uAC8C%20%uC124%uBA85%uD558%uACE0%20%uC2F6%uC740%uB370%2C%20%uC5B4%uCC28%uD53C%20%uC608%uC81C%20%uCF54%uB4DC%uB9CC%20%uBCFC%20%uAC83%20%uAC19%uC544%2C%20%uCF54%uB4DC%uB9CC%20%uCAD9%20%uBCF4%uC5EC%uC8FC%uB294%20%uC2DD%uC73C%uB85C%20%uC4F0%uACA0%uB2E4.%20%uC548%uB4DC%uB85C%uC774%uB4DC%uC640%20%uC544%uC774%uD3F0%uB9CC%20%uC6B0%uB9AC%uAC00%20%uD544%uC694%uD574%uC11C%20%uB450%uAC1C%uC758%20%uCF54%uB4DC%uB9CC%20%uC788%uB294%uB370%2C%20%uC6D0%uB798%uB294%20%uC5C4%uCCAD%20%uB2E4%uC591%uD55C%20%uD50C%uB7AB%uD3FC%uC744%20%uC9C0%uC6D0%uD55C%uB2E4.%0A%0A%23%23%20%uBA3C%uC800%2C%0A%0A%uB2F9%uC5F0%uD788%20%uC560%uC800%uC5D0%20%uAC00%uC785%uD558%uACE0%2C%20%uAD00%uB9AC%20%uD3EC%uD138%uC744%20%uC811%uC18D%uD558%uC5EC%20%uC54C%uB9BC%uD5C8%uBE0C%20%uC11C%uBE44%uC2A4%uB97C%20%uAD6C%uC131%uD574%uC57C%uD55C%uB2E4.%20%60%uC11C%uBE44%uC2A4%20%uBC84%uC2A4%60%20%uBA54%uB274%uC5D0%uC11C%20%uC54C%uB9BC%uD5C8%uBE0C%uB97C%20%uB9CC%uB4E4%20%uC218%20%uC788%uB2E4.%0A%0A%uADF8%uB9AC%uACE0%20%uB098%uBA74%20%60npm%60%uC73C%uB85C%20%60azure%60%20%uD328%uD0A4%uC9C0%uB97C%20%uC124%uCE58%uD55C%uB2E4.%0A%0A%09sudo%20npm%20install%20azure%0A%0A%uC774%uD6C4%2C%20%20%uC11C%uBE0C%uB77C%uC784%20%uD14D%uC2A4%uD2B8%20%uAC19%uC740%20%uD3B8%uC9D1%uAE30%uB97C%20%uCF1C%uC11C%20%uC791%uC5C5%uC744%20%uC2DC%uC791%uD55C%uB2E4.%20%uCCAB%20%uC904%uC5D0%20%uBA3C%uC800%20%uBAA8%uB4C8%uC744%20%uB85C%uB4DC%uD55C%uB2E4.%0A%0A%09var%20azure%20%3D%20require%28%27azure%27%29%3B%0A%0A%uADF8%uB9AC%uACE0%20%uC54C%uB9BC%20%uD5C8%uBE0C%uC640%20%uC5F0%uACB0%uC744%20%uD558%uACE0%2C%20%uBA85%uB839%uC744%20%uCC98%uB9AC%uD574%uC904%20%uAC1D%uCCB4%uB97C%20%uB9CC%uB4E4%uC5B4%uC57C%uD55C%uB2E4.%0A%0A%09var%20notificationHubService%20%3D%20azure.createNotificationHubService%28%27hubname%27%2C%27connectionstring%27%29%3B%0A%0A%uC800%uAE30%uC11C%20%uD30C%uB77C%uB9E4%uD130%uB85C%20%uB4E4%uC5B4%uAC00%uB294%20%60hubname%60%uACFC%20%60connectionstring%60%uC740%20%20Azure%20%uAD00%uB9AC%20%uD3EC%uD138%uC5D0%uC11C%20%uC54C%20%uC218%20%uC788%uB2E4.%0A%60hubname%60%uC740%20%60%uC11C%uBE44%uC2A4%20%uD5C8%uBE0C%60%uC5D0%uC11C%20%uAD6C%uC131%uD560%20%uB54C%20%uC785%uB825%uD55C%20%uC774%uB984%uC774%uACE0%2C%20%60connectionstring%60%uC740%20%uC54C%uB9BC%20%uD5C8%uBE0C%20%uB300%uC2DC%uBCF4%uB4DC%20%uC5B4%uB518%uAC00%uC5D0%20%uBCF4%uC774%uB294%20%60%uC5F0%uACB0%20%uBB38%uC790%uC5F4%20%uBCF4%uAE30%60%uB97C%20%uD074%uB9AD%uD558%uBA74%20%uC54C%20%uC218%20%uC788%uB2E4.%20%uADF8%20%uAE34%20%60%uC5F0%uACB0%20%uBB38%uC790%uC5F4%60%uC744%20%uBCF5%uBD99%uD558%uBA74%20%uB41C%uB2E4.%0A%0A%23%23%20%uD0DC%uADF8%uB780%3F%0A%0A%uC7A0%uAE50%20%uC54C%uC544%uC57C%uD560%20%uAC8C%20%uC788%uB2E4.%20%uC560%uC800%uB294%20%uD0DC%uADF8%uB97C%20%uC0AC%uC6A9%uD574%20%uD478%uC2DC%20%uC54C%uB9BC%uC758%20%uC2A4%uCF54%uD504%uB97C%20%uAD00%uB9AC%uD55C%uB2E4.%20%uBAA8%uB4E0%20%uC0AC%uC6A9%uC790%uC5D0%uAC8C%20%uBE0C%uB85C%uB4DC%uCE90%uC2A4%uD2B8%20%uD560%20%uC218%uB3C4%20%uC788%uC9C0%uB9CC%2C%20%uC5B4%uB5A8%20%uB54C%uB294%20%uB531%20%uD55C%20%uBA85%uD55C%uD0DC%uB9CC%20%uD558%uACE0%20%uC2F6%uC744%20%uB54C%uB3C4%20%uC788%uB2E4.%20%uC608%uB97C%uB4E4%uC5B4%20%uB098%uB294%20%uC544%uC774%uD3F0%uACFC%20%uC544%uC774%uD328%uB4DC%2C%20%uADF8%uB9AC%uACE0%20%uC548%uB4DC%uB85C%uC774%uB4DC%20%uD3F0%20%uC138%uAC1C%uB97C%20%uC4F0%uB294%uB370%2C%20%uB0B4%uAC8C%20%uC640%uC57C%uD560%20%uC54C%uB9BC%uC774%20%uC544%uC774%uD328%uB4DC%uB9CC%20%uC624%uAC70%uB098%20%uC544%uC774%uD3F0%uC5D0%uB9CC%20%uC624%uBA74%20%uC548%uB418%uACE0%203%uAC1C%uC758%20%uB514%uBC14%uC774%uC2A4%20%uBAA8%uB450%uC5D0%20%uC640%uC57C%uD558%uC9C0%20%uC54A%uACA0%uB294%uAC00.%20%uC774%uB7F4%uB54C%20%60tag%60%uB97C%20%60youngkyu%60%uB77C%uACE0%20%uC4F0%uACE0%2C%20%60youngkyu%60%uB780%20%uD0DC%uADF8%uC5D0%20%uD478%uC2DC%uB97C%20%uC3D8%uBA74%20%uBAA8%uB4E0%20%60youngkyu%60%uC758%20%uB514%uBC14%uC774%uC2A4%uC5D0%20%uD478%uC2DC%20%uC54C%uB9BC%uC774%20%uB3C4%uCC29%uD55C%uB2E4.%0A%0A%23%23%20%uC11C%uBE44%uC2A4%20%uBC84%uC2A4%20%uC54C%uB9BC%20%uD5C8%uBE0C%uC5D0%20%uC2DC%uADF8%uB2C8%uCC98%uC640%20API%20%uD0A4%20%uB4F1%uB85D%0A%0A%uC54C%uB9BC%20%uD5C8%uBE0C%uC5D0%20%60%uAD6C%uC131%60%uC744%20%uD074%uB9AD%uD558%uBA74%20APNS%uC640%20GCM%uC758%20%uC2DC%uADF8%uB2C8%uCC98%uC640%20%uD0A4%uB97C%20%uB4F1%uB85D%uD558%uB294%20%uACF3%uC774%20%uC788%uB2E4.%20%uC5EC%uAE30%uC5D0%20%uD574%uB2F9%20%uD30C%uC77C%uACFC%20%uD0A4%uB97C%20%uC62C%uB824%uC918%uC57C%20%uC560%uC800%uC5D0%uC11C%20%uCC98%uB9AC%uD560%20%uC218%20%uC788%uB294%20%uD658%uACBD%uC774%20%uC870%uC131%uB41C%uB2E4.%0A%0A%23%23%20%uB514%uBC14%uC774%uC2A4%20%uB4F1%uB85D%uD558%uAE30%0A%0A%uBA3C%uC800%20%uB514%uBC14%uC774%uC2A4%uB97C%20%uB4F1%uB85D%uD574%uC57C%uD55C%uB2E4.%20%uC774%uB54C%20%60youngkyu%60%uB85C%20%uC608%uC2DC%uB97C%20%uB4E4%uC5C8%uB358%20%60tag%60%uB3C4%20%uC124%uC815%uD55C%uB2E4.%20%uC798%20%uCD94%uC0C1%uD654%uB418%uC5B4%uC788%uC5B4%uC11C%2C%20%uD478%uC2DC%uC54C%uB9BC%uC758%20%uACFC%uC815%uC744%20%uC815%uD655%uD788%20%uC774%uD574%uD558%uC9C0%20%uBABB%uD574%uB3C4%20%uC6D0%uD65C%uD788%20%uC0AC%uC6A9%uD560%20%uC218%20%uC788%uB2E4.%20%uC774%20%uACFC%uC815%uC5D0%20%uB300%uD55C%20%uC598%uAE30%uB294%20%uB2E4%uC74C%uC5D0%20%uD3EC%uC2A4%uD305%uD558%uACA0%uB2E4.%0A%0A%23%23%23%20%uC544%uC774%uD3F0%0A%0A%uBA3C%uC800%20%uC544%uC774%uD3F0%uC758%20%60deviceToken%60%uC774%20%uD544%uC694%uD558%uB2E4.%20%uC774%uAC74%20%uC560%uC800%uC640%20%uAD00%uB828%uC774%20%uC5C6%uC73C%uBBC0%uB85C%20%uC5EC%uAE30%uC11C%20%uC124%uBA85%uD558%uC9C0%20%uC54A%uB294%uB2E4.%0A%0A%20%20%20%20notificationHubService.apns%0A%09%09.createNativeRegistration%28deviceToken%2Ctags%2Cnull%2Cfunction%28error%29%7B%0A%09%09//%20To%20do%0A%09%7D%29%3B%0A%0A%uC5EC%uAE30%uC11C%20%uD30C%uB77C%uB9E4%uD130%uC5D0%20%60deviceToken%60%uC740%20%uBC1B%uC544%uC628%20%uD1A0%uD070%uC744%20%uC9D1%uC5B4%uB123%uACE0%2C%20%60tags%60%uC5D0%uB294%20%uBC30%uC5F4%uC5D0%20%uB2F4%uC740%20%uD0DC%uADF8%uB4E4%uC744%20%uC9D1%uC5B4%uB123%uB294%uB2E4.%20%uC138%uBC88%uC9F8%20%60null%60%uC740%20%60option%60%uC73C%uB85C%20%uC911%uC694%uD558%uC9C0%20%uC54A%uB2E4.%20%uC81C%uB300%uB85C%20%uC124%uBA85%uB3C4%20%uC548%uB418%uC788%uC5B4%uC11C%20%uC544%uC9C1%20%uAE30%uB2A5%uC774%20%uD06C%uAC8C%uB294%20%uC5C6%uB294%20%uB4EF%20%uD558%uB2E4.%20%uB9C8%uC9C0%uB9C9%20%60callback%60%uC5D0%20%uC774%uD6C4%20%uD560%20%uC791%uC5C5%20%uD568%uC218%uB97C%20%uB123%uB294%uB2E4.%0A%0A%uC544%uB798%uB294%20%uB0B4%uAC00%20%uC4F4%20%uCF54%uB4DC%20%uC77C%uBD80%uB2E4.%0A%0A%09notificationHubService.gcm%0A%09%09.createNativeRegistration%28deviceToken%2C%5B%22user%22%2C%22user.%22+userId%5D%2Cnull%2Cfunction%28error%29%7B%0A%09%20%20%20%20if%28%21error%29%20%7B%0A%20%20%20%20%0A%09%20%20%20%20%7D%0A%09%7D%29%3B%0A%0A%uD0DC%uADF8%uC5D0%20%60%5B%22user%22%2C%22user.%22+userId%5D%60%uAC00%20%uBCF4%uC774%uB294%uAC00.%20%uC774%uB807%uAC8C%20%uC801%uAC8C%uB418%uBA74%20%uC774%uD6C4%20%60%22user%22%60%uB77C%uB294%20%uD0DC%uADF8%uC5D0%20%uD478%uC2DC%uB97C%20%uB54C%uB9AC%uBA74%20%uBAA8%uB4E0%20%60%22user%22%60%uD0DC%uADF8%uB97C%20%uAC00%uC9C4%20%uB514%uBC14%uC774%uC2A4%uAC00%20%09%uBC1B%uAC8C%20%uB41C%uB2E4.%20%uADF8%uB9AC%uACE0%20%60%22user.12%22%60%uB77C%uACE0%20%uD558%uBA74%2012%uBC88%20%uC720%uC800%20%uC544%uC774%uB514%uC758%20%uC0AC%uC6A9%uC790%uB9CC%20%uBC1B%uAC8C%20%uB418%uB294%20%uC2DD%uC774%uB2E4.%0A%0A%23%23%23%20%uC548%uB4DC%uB85C%uC774%uB4DC%0A%0A%uB9C8%uCC2C%uAC00%uC9C0%uB85C%20%60deviceToken%60%uC778%20%60gcmRegistrationId%60%uAC00%20%uBA3C%uC800%20%uD544%uC694%uD558%uB2E4.%0A%0A%09notificationHubService.gcm%0A%09%09.createNativeRegistration%28gcmRegistrationId%2Ctags%2Cnull%2Cfunction%28error%29%7B%0A%09%09//%20To%20do%0A%09%7D%29%3B%0A%0A%uC704%uC640%20%uB611%uAC19%uB2E4.%20%60gcm%60%uB9CC%20%uBE7C%uACE0.%0A%0A%23%23%20%uD478%uC2DC%20%uBCF4%uB0B4%uAE30%0A%0A%uB4F1%uB85D%uC774%20%uB05D%uB098%uACE0%20%uB098%uBA74%2C%20%uC544%uB798%20%uCF54%uB4DC%uB97C%20%uC2E4%uD589%uD574%uBCF8%uB2E4.%0A%0A%09var%20payload%20%3D%20%7B%0A%09%20%20%20%20alert%20%3A%20%22hello%20noti%21%22%2C%0A%09%20%20%20%20sound%20%3A%20%22default%22%0A%09%7D%0A%09notificationHubService.apns.send%28null%2Cpayload%2Cfunction%28error%29%7B%7D%29%3B%0A%0A%uB775%uB625.%20%uD478%uC2DC%uAC00%20%uC654%uB294%uAC00%3F%20%60payload%60%uC5D0%20%60sound%60%uAC00%20%uC18C%uB9AC%uB97C%20%uB0B4%uB294%20%uC5ED%uD560%uC744%20%uD558%uACE0%2C%20%60alert%60%uC774%20%uAE00%uC744%20%uD45C%uD604%uD55C%uB2E4.%20%uADF8%uB9AC%uACE0%20%60send%28%29%60%uC758%20%uCCAB%uBC88%uC9F8%20%uC778%uC790%uB294%20%60tag%60%uC778%uB370%2C%20%60null%60%uC774%uBA74%20%uBE0C%uB85C%uB4DC%uCE90%uC2A4%uD2B8%uB2E4.%20%uBAA8%uB4E0%20%uB4F1%uB85D%uB41C%20%uC544%uC774%uD3F0/IOS%20%uB514%uBC14%uC774%uC2A4%uC5D0%20%uC804%uC1A1%uD55C%uB2E4.%20%uB530%uB77C%uC11C%20%uBC1B%uAC8C%20%uB418%uB294%20%uAC83%uC774%uB2E4.%0A%0A%09var%20payload%20%3D%20%7B%0A%09%20%20%20%20alert%20%3A%20%22hello%20users%21%22%2C%0A%09%20%20%20%20sound%20%3A%20%22default%22%0A%09%7D%0A%09notificationHubService.apns.send%28%22user%22%2Cpayload%2Cfunction%28error%29%7B%7D%29%3B%0A%0A%uC704%uC640%20%uAC19%uC774%20%uBCF4%uB0B4%uBA74%20%60user%60%uD0DC%uADF8%uB97C%20%uAC00%uC9C4%20%uB514%uBC14%uC774%uC2A4%uB9CC%20%uBC1B%uAC8C%20%uB41C%uB2E4.%20%uB9CC%uC57D%20%uD0DC%uADF8%uB97C%20%uC5EC%uB7EC%uAC1C%20%uC9C0%uC815%uD558%uACE0%20%uC2F6%uB2E4%uBA74%2C%20%uC544%uB798%uC640%20%uAC19%uC740%20%uADDC%uCE59%uC744%20%uC4F0%uBA74%20%uB41C%uB2E4.%0A%0A-%20%uC5EC%uB7EC%20%uD0DC%uADF8%uB4E4%uC5D0%20%3A%20%22user.12%7C%7Cuser.23%7C%7Cuser.24%22%0A-%20%uB450%20%uD0DC%uADF8%20%uB2E4%20%uAC00%uC9C0%uACE0%20%uC788%uB294%20%3A%20%22user%7C%7Cpost.15%22%0A%0A%uAC04%uB2E8%uD558%uB2E4.%0A%0A%23%23%20%uB05D%21%0A%0A%uC544%uC8FC%20%uAC04%uB2E8%uD558%uC9C0%uB9CC%20%uB9CE%uC774%20%uB2F9%uD669%uC2A4%uB7EC%uC6E0%uB2E4.%20%uC12C%uC138%uD788%20%uC54C%uB824%uC8FC%uB294%20%uD29C%uD1A0%uB9AC%uC5BC%20%uD558%uB098%20%uC5C6%uC774%20%uACE0%uC791%20API%uBB38%uC11C%20%uB538%uB791%20%uD558%uB098%uBCF4%uACE0%20%uC2DC%uC791%uD588%uC73C%uB2C8.%20%uC5B4%uCA0C%uB4E0%20%uC27D%uB2E4.%20%uADF8%uB9AC%uACE0%20%uB9E4%uC6B0%20%uAC15%uB825%uD558%uB2E4.%20%uD478%uC2DC%20%uC2DC%uC2A4%uD15C%uC744%20%uC9C1%uC811%20%uB9CC%uB4E4%uBA74%20%uB354%20%uC800%uB834%uD588%uC744%uC9C0%20%uBAA8%uB974%uC9C0%uB9CC%20%28%uC2E4%uC740%20%uADF8%uB807%uC9C0%uB3C4%20%uC54A%uC744%20%uAC70%uB2E4%29%20%uAE30%uD68C%20%uBE44%uC6A9%uC774%20%uC0C1%uB2F9%uD788%20%uB192%uAC8C%uB41C%uB2E4.%20%uC11C%uBE44%uC2A4%uB97C%20%uB9CC%uB4DC%uB294%20%uD68C%uC0AC%uB2C8%20%uC11C%uBE44%uC2A4%uC5D0%20%uC9D1%uC911%uD574%uC57C%uD558%uB294%uB370%20%uB9D0%uC774%uB2E4.%20API%20%uBB38%uC11C%uB294%20%uC544%uB798%20%uC8FC%uC18C%uB97C%20%uB20C%uB7EC%20%uBCFC%20%uC218%20%uC788%uB2E4.%20%uB2E4%uC74C%20%uD3EC%uC2A4%uD2B8%uC5D0%uC11C%uB294%20%uCD08%uAE30%uC5D0%20%uC124%uC815%uD55C%20%60tag%60%uC774%uC678%uC758%20%60tag%60%uB4E4%uC744%20%uCD94%uAC00%uD574%uBCF4%uC790.%0A%0Ahttp%3A//dl.windowsazure.com/nodedocs/NotificationHubService.html&lt;/center&gt;
&lt;br /&gt;&lt;/en-note&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</description>
      <category>Develop</category>
      <category>AZURE</category>
      <category>nodejs</category>
      <category>알림허브</category>
      <category>애저</category>
      <category>푸시</category>
      <category>푸시알림</category>
      <author>youngkyu.cho</author>
      <guid isPermaLink="true">https://youngkyu.tistory.com/34</guid>
      <comments>https://youngkyu.tistory.com/34#entry34comment</comments>
      <pubDate>Wed, 20 May 2015 03:18:09 +0900</pubDate>
    </item>
    <item>
      <title>우분투 시작시 자동으로 특정 명령 실행하기.</title>
      <link>https://youngkyu.tistory.com/33</link>
      <description>&lt;en-note style=&quot;line-height: 1.6; color: #2c3f51; font-family: Helvetica Neue, Arial, Hiragino Sans GB, STHeiti, Microsoft YaHei, WenQuanYi Micro Hei, SimSun, Song, sans-serif;&quot; lang=&quot;v2&quot;&gt;&lt;del style=&quot;position:relative;display:block&quot;&gt;&lt;a style=&quot;position: absolute;color: #FFF;text-decoration: none;font-size: 12px;height: 25px;border-radius: 0;margin-top: -20px;right: 15px;background: rgba(0, 0, 0, 0);border-left: 10px solid #BB3A34;border-right: 10px solid #BB3A34;border-bottom: 5px solid rgba(0, 0, 0, 0);width: 0;text-indent:-100000px;&quot; href=&quot;http://marxi.co/#/?provider=evernote_int&amp;amp;guid=3d15bd41-447a-4d88-b440-b024274242b6&quot;&gt;Edit&lt;/a&gt;&lt;/del&gt;&lt;div style=&quot;line-height: 1.5; color: #2c3f51; font-family: Helvetica Neue, Arial, Hiragino Sans GB, STHeiti, Microsoft YaHei, WenQuanYi Micro Hei, SimSun, Song, sans-serif;&quot;&gt;
                        &lt;div&gt;&lt;/div&gt;
                    &lt;div&gt;

&lt;/div&gt;

&lt;div&gt;

&lt;h2 style=&quot;font-family: inherit; font-weight: bold; line-height: 1.1; color: inherit; font-size: 2.15em; margin-top: 1.2em; margin-right: 0px; margin-bottom: 1.2em; text-align: start;&quot;&gt;부제 : 맥 트랙패드처럼 우분투 트랙패드 스크롤 방향 바꾸기.&lt;/h2&gt;

&lt;p style=&quot;margin: 0 0 1.1em;&quot;&gt;우분투를 썼었는데 최근 맥북 프로 레티나를 사며 너무 좋아서 계속 맥만 썼다. &lt;br /&gt;
그런데 15인치를 샀더니 들고다니기가 너무 무거워서 맥북 에어를 살까 고민하던 와중에 &lt;code style=&quot;font-family: Source Code Pro,monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;맥북&lt;/code&gt;이 나온다는 소문을 듣고 조금 참고 기다리다가 &lt;code style=&quot;font-family: Source Code Pro,monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;맥북&lt;/code&gt;을 사야지라고 마음을 먹었다.&lt;/p&gt;&lt;p style=&quot;margin: 0 0 1.1em;&quot;&gt;그리고 집에 있던 가벼운 LG울트라북 Z330을 꺼내 일단 잠시 쓰기로 하였다. 윈도우는 조금 느린감이 있어서 답답했고, 또 터미널도 없고해서 우분투를 기반으로한 배포판 &lt;code style=&quot;font-family: Source Code Pro,monospace; font-size: .9em; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: normal; border-radius: 4px;&quot;&gt;Elemantary OS&lt;/code&gt;를 깔기로 결정했다!&lt;/p&gt;&lt;p style=&quot;margin: 0 0 1.1em;&quot;&gt;그래, 한글 문제는 어찌저찌 해결해야지.. 리눅스가 그렇지머.. 라고 열심히 세팅을 다하고 막 쓰려는데!!!&lt;/p&gt;&lt;p style=&quot;margin: 0 0 1.1em;&quot;&gt;&lt;em&gt;예전엔 없던 문제가 생겼다.&lt;/em&gt;&lt;/p&gt;&lt;p style=&quot;margin: 0 0 1.1em;&quot;&gt;내가 맥의 트랙패드 스크롤에 익숙해져 버린 것이다. 맥의 스크롤 방향은 위로 올리면 스크롤이 아래로 내려간다. 내리면 올라가고. 이거 어쩐담…&lt;/p&gt;&lt;p style=&quot;margin: 0 0 1.1em;&quot;&gt;&lt;em&gt;아래의 스크립트를 실행하면 된다!&lt;/em&gt;&lt;/p&gt;

&lt;pre style=&quot;font-family: Source Code Pro,monospace; font-size: .9em; white-space: pre-wrap; display: block; padding: 2px; margin: 0 0 1.1em; line-height: 1.45; word-break: break-word; word-wrap: break-word; color: #333; background-color: rgba(102,128,153,0.05); border: 0; border-radius: 5px; text-align: start;&quot;&gt;&lt;code style=&quot;font-family: Source Code Pro,monospace; font-size: inherit; padding: 18px 28px; color: #000; background-color: #f0f0f0; white-space: pre-wrap; border-radius: 0; display: block;&quot;&gt;&lt;span&gt; synclient VertScrollDelta&lt;/span&gt;=&lt;span style=&quot;color: #800;&quot;&gt;-100
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;p style=&quot;margin: 0 0 1.1em;&quot;&gt;굿굿!&lt;/p&gt;&lt;p style=&quot;margin: 0 0 1.1em;&quot;&gt;아… 그런데 또 문제 발생… 껏다키니 다시 원래대로 돌아오네?&lt;/p&gt;&lt;p style=&quot;margin: 0 0 1.1em;&quot;&gt;시작시 바로 명령어로 입력되게 하자!&lt;/p&gt;

&lt;/div&gt;
&lt;div&gt;

&lt;h2 style=&quot;font-family: inherit; font-weight: bold; line-height: 1.1; color: inherit; margin-top: 21px; margin-bottom: 10.5px; font-size: 2.15em; margin: 1.2em 0; text-align: start;&quot;&gt;/etc/rc.local&lt;/h2&gt;

&lt;p style=&quot;margin: 0 0 1.1em;&quot;&gt;쟤를 찾아라. 얘를 고치면 된다! 여기다 적어라 쟤를!&lt;/p&gt;

&lt;pre style=&quot;font-family: Source Code Pro,monospace; font-size: .9em; white-space: pre-wrap; display: block; padding: 2px; margin: 0 0 1.1em; line-height: 1.45; word-break: break-word; word-wrap: break-word; color: #333; background-color: rgba(102,128,153,0.05); border: 0; border-radius: 5px; text-align: start;&quot;&gt;&lt;code style=&quot;font-family: Source Code Pro,monospace; font-size: inherit; padding: 18px 28px; color: #000; background-color: #f0f0f0; white-space: pre-wrap; border-radius: 0; display: block;&quot;&gt;&lt;span&gt; synclient VertScrollDelta&lt;/span&gt;=&lt;span style=&quot;color: #800;&quot;&gt;-100
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;p style=&quot;margin: 0 0 1.1em;&quot;&gt;이때, 거기 밑에 원래 있던 &lt;/p&gt;

&lt;pre style=&quot;font-family: Source Code Pro,monospace; font-size: .9em; white-space: pre-wrap; display: block; padding: 2px; margin: 0 0 1.1em; line-height: 1.45; word-break: break-word; word-wrap: break-word; color: #333; background-color: rgba(102,128,153,0.05); border: 0; border-radius: 5px; text-align: start;&quot;&gt;&lt;code style=&quot;font-family: Source Code Pro,monospace; font-size: inherit; padding: 18px 28px; color: #000; background-color: #f0f0f0; white-space: pre-wrap; border-radius: 0; display: block;&quot;&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;exit&lt;/span&gt; &lt;span style=&quot;color: #080;&quot;&gt;0&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;p style=&quot;margin: 0 0 1.1em;&quot;&gt;는 반드시 지워주어야 실행된다.로그아웃 후 다시 들어오면 정상적으로 작동됨을 확인할 수있다.&lt;/p&gt;
&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;center style=&quot;display:none&quot;&gt;%23%uC6B0%uBD84%uD22C%20%uC2DC%uC791%uC2DC%20%uC790%uB3D9%uC73C%uB85C%20%uD2B9%uC815%20%uBA85%uB839%20%uC2E4%uD589%uD558%uAE30.%0A%0A%23%23%uBD80%uC81C%20%3A%20%uB9E5%20%uD2B8%uB799%uD328%uB4DC%uCC98%uB7FC%20%uC6B0%uBD84%uD22C%20%uD2B8%uB799%uD328%uB4DC%20%uC2A4%uD06C%uB864%20%uBC29%uD5A5%20%uBC14%uAFB8%uAE30.%0A%0A%uC6B0%uBD84%uD22C%uB97C%20%uC37C%uC5C8%uB294%uB370%20%uCD5C%uADFC%20%uB9E5%uBD81%20%uD504%uB85C%20%uB808%uD2F0%uB098%uB97C%20%uC0AC%uBA70%20%uB108%uBB34%20%uC88B%uC544%uC11C%20%uACC4%uC18D%20%uB9E5%uB9CC%20%uC37C%uB2E4.%0A%uADF8%uB7F0%uB370%2015%uC778%uCE58%uB97C%20%uC0C0%uB354%uB2C8%20%uB4E4%uACE0%uB2E4%uB2C8%uAE30%uAC00%20%uB108%uBB34%20%uBB34%uAC70%uC6CC%uC11C%20%uB9E5%uBD81%20%uC5D0%uC5B4%uB97C%20%uC0B4%uAE4C%20%uACE0%uBBFC%uD558%uB358%20%uC640%uC911%uC5D0%20%60%uB9E5%uBD81%60%uC774%20%uB098%uC628%uB2E4%uB294%20%uC18C%uBB38%uC744%20%uB4E3%uACE0%20%uC870%uAE08%20%uCC38%uACE0%20%uAE30%uB2E4%uB9AC%uB2E4%uAC00%20%60%uB9E5%uBD81%60%uC744%20%uC0AC%uC57C%uC9C0%uB77C%uACE0%20%uB9C8%uC74C%uC744%20%uBA39%uC5C8%uB2E4.%0A%0A%uADF8%uB9AC%uACE0%20%uC9D1%uC5D0%20%uC788%uB358%20%uAC00%uBCBC%uC6B4%20LG%uC6B8%uD2B8%uB77C%uBD81%20Z330%uC744%20%uAEBC%uB0B4%20%uC77C%uB2E8%20%uC7A0%uC2DC%20%uC4F0%uAE30%uB85C%20%uD558%uC600%uB2E4.%20%uC708%uB3C4%uC6B0%uB294%20%uC870%uAE08%20%uB290%uB9B0%uAC10%uC774%20%uC788%uC5B4%uC11C%20%uB2F5%uB2F5%uD588%uACE0%2C%20%uB610%20%uD130%uBBF8%uB110%uB3C4%20%uC5C6%uACE0%uD574%uC11C%20%uC6B0%uBD84%uD22C%uB97C%20%uAE30%uBC18%uC73C%uB85C%uD55C%20%uBC30%uD3EC%uD310%20%60Elemantary%20OS%60%uB97C%20%uAE54%uAE30%uB85C%20%uACB0%uC815%uD588%uB2E4%21%0A%0A%uADF8%uB798%2C%20%uD55C%uAE00%20%uBB38%uC81C%uB294%20%uC5B4%uCC0C%uC800%uCC0C%20%uD574%uACB0%uD574%uC57C%uC9C0..%20%uB9AC%uB205%uC2A4%uAC00%20%uADF8%uB807%uC9C0%uBA38..%20%uB77C%uACE0%20%uC5F4%uC2EC%uD788%20%uC138%uD305%uC744%20%uB2E4%uD558%uACE0%20%uB9C9%20%uC4F0%uB824%uB294%uB370%21%21%21%0A%0A*%uC608%uC804%uC5D4%20%uC5C6%uB358%20%uBB38%uC81C%uAC00%20%uC0DD%uACBC%uB2E4.*%0A%0A%uB0B4%uAC00%20%uB9E5%uC758%20%uD2B8%uB799%uD328%uB4DC%20%uC2A4%uD06C%uB864%uC5D0%20%uC775%uC219%uD574%uC838%20%uBC84%uB9B0%20%uAC83%uC774%uB2E4.%20%uB9E5%uC758%20%uC2A4%uD06C%uB864%20%uBC29%uD5A5%uC740%20%uC704%uB85C%20%uC62C%uB9AC%uBA74%20%uC2A4%uD06C%uB864%uC774%20%uC544%uB798%uB85C%20%uB0B4%uB824%uAC04%uB2E4.%20%uB0B4%uB9AC%uBA74%20%uC62C%uB77C%uAC00%uACE0.%20%uC774%uAC70%20%uC5B4%uCA50%uB2F4...%0A%0A*%uC544%uB798%uC758%20%uC2A4%uD06C%uB9BD%uD2B8%uB97C%20%uC2E4%uD589%uD558%uBA74%20%uB41C%uB2E4%21*%0A%0A%09%20synclient%20VertScrollDelta%3D-100%0A%0A%uAD7F%uAD7F%21%0A%0A%uC544...%20%uADF8%uB7F0%uB370%20%uB610%20%uBB38%uC81C%20%uBC1C%uC0DD...%20%uAECF%uB2E4%uD0A4%uB2C8%20%uB2E4%uC2DC%20%uC6D0%uB798%uB300%uB85C%20%uB3CC%uC544%uC624%uB124%3F%0A%0A%uC2DC%uC791%uC2DC%20%uBC14%uB85C%20%uBA85%uB839%uC5B4%uB85C%20%uC785%uB825%uB418%uAC8C%20%uD558%uC790%21%0A%0A%23%23/etc/rc.local%0A%0A%uC7E4%uB97C%20%uCC3E%uC544%uB77C.%20%uC598%uB97C%20%uACE0%uCE58%uBA74%20%uB41C%uB2E4%21%20%uC5EC%uAE30%uB2E4%20%uC801%uC5B4%uB77C%20%uC7E4%uB97C%21%0A%0A%09%20synclient%20VertScrollDelta%3D-100%0A%0A%uC774%uB54C%2C%20%uAC70%uAE30%20%uBC11%uC5D0%20%uC6D0%uB798%20%uC788%uB358%20%0A%0A%09exit%200%0A%0A%uB294%20%uBC18%uB4DC%uC2DC%20%uC9C0%uC6CC%uC8FC%uC5B4%uC57C%20%uC2E4%uD589%uB41C%uB2E4.%uB85C%uADF8%uC544%uC6C3%20%uD6C4%20%uB2E4%uC2DC%20%uB4E4%uC5B4%uC624%uBA74%20%uC815%uC0C1%uC801%uC73C%uB85C%20%uC791%uB3D9%uB428%uC744%20%uD655%uC778%uD560%20%uC218%uC788%uB2E4.%0A&lt;/center&gt;
&lt;br /&gt;&lt;/en-note&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</description>
      <category>Develop</category>
      <author>youngkyu.cho</author>
      <guid isPermaLink="true">https://youngkyu.tistory.com/33</guid>
      <comments>https://youngkyu.tistory.com/33#entry33comment</comments>
      <pubDate>Tue, 17 Mar 2015 16:02:30 +0900</pubDate>
    </item>
    <item>
      <title>도커란 무엇인가 / Docker 컨테이너 / Docker 이미지 / LXC / 가상화</title>
      <link>https://youngkyu.tistory.com/32</link>
      <description>&lt;div&gt;&lt;p style=&quot;color: rgb(60, 60, 60); font-family: 'Apple SD Gothic Neo', Helvetica, Georgia, serif; font-size: 17px;&quot;&gt;&lt;/p&gt;&lt;div&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;div&gt;&lt;p style=&quot;color: rgb(60, 60, 60); font-family: 'Apple SD Gothic Neo', Helvetica, Georgia, serif; font-size: 17px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;hr&gt;&lt;/div&gt;&lt;p&gt;본 포스트는 개인적으로 &lt;code&gt;가장 빨리 만나는 Docker(길벗 출판사 , 이재홍저)&lt;/code&gt;책을 공부하며 정리하는 포스트라는 것을 미리 밝힌다.&lt;/p&gt;

&lt;hr&gt;

&lt;h1&gt;Docker란 무엇인가?&lt;/h1&gt;

&lt;p&gt;도커는 2013년 3월에 출시한 오픈소스 컨테이너 프로젝트다. 현재 2년정도 지난 시점에 세계적으로 엄청난 인기를 구사중인 대단한 프로젝트기도 하다.&lt;/p&gt;
&lt;p&gt;서버시장이 클라우드 환경으로 옮겨가게 되면서 우리는 가상서버를 손쉽게 수백대를 구매하여 바로 사용할 수 있게 되었다. 그런데, 서버 갯수가 많아지면서 각각의 서버에 소프트웨어 설치와 설정이 큰 귀찮음으로 다가오게 됐다. 몇개 안됐다면 직접 할텐데 갯수가 엄청나니 이것을 처리할 무언가가 필요했다.&lt;/p&gt;
&lt;p&gt;초기에 쉘 스크립트를 통해 해결하려는 시도도 있었다. 이 방법으로 필자도 오랜기간 서버 관리를 해왔다. 그러나 쉘 스크립트는 복잡한 기능 구현은 거의 불가능 할 뿐더러(사실은 잘 못해서 그런거겠지만… ㅋㅋ) 자동화의 한계가 있다. 이를 어떻게 해결 할 것인가.&lt;/p&gt;
&lt;p&gt;이를 해결하기 위해 나온 아이디어가 바로 Immutable Infrastructure다. 그 서버에 깔린 OS(호스트 OS)와 &lt;code&gt;서비스 운영을 위한 환경&lt;/code&gt;(서버 운영을 위해 필요한 프로그램들; node js, mysql, java등)을 분리해 이 서비스 운영환경을 패키징 해 배포한다는 아이디어이다. 이때 이/ 패키지를 데몬툴즈같은 가상 이미지 파일과 비슷하다해서 &lt;code&gt;이미지&lt;/code&gt;라 부른다. 어쨋든 이런 생각을 구현한 것이 Docker다.&lt;/p&gt;
&lt;p&gt;이것은 엄청난 확장성을 가져다 준다. 클라우드 플랫폼에 이것을 적용하면 자동 확장이 가능해지고 마치 공장에서 틀에 물건을 찍어내듯 마구마구 서비스를 확장할 수 있다!&lt;/p&gt;

&lt;h1&gt;가상머신과는 뭐가 다른거야?&lt;/h1&gt;

&lt;p&gt;언뜻 들으면 가상머신과 똑같다. 가상 머신에 리눅스를 설치하고 그 가상 머신을 이미지화 해 여러 서버에 복사하면 똑같은 것 같지 않은가. &lt;em&gt;그런데 좀 다르다.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;가상머신&lt;/h2&gt;

&lt;p&gt;가상 머신은 편했다. 그러나 느렸다. 가상 머신 자체는 거의 완전한 컴퓨터다. 이게 무슨말이냐하면, 가상머신은 기본적으로 원래 컴퓨터 OS(호스트OS)위에서 돌아간다. 그리고 그 가상머신은 하이퍼바이저를 통해 그 위에서 수십개의 &lt;code&gt;게스트 OS&lt;/code&gt;를 돌린다. 즉 &lt;code&gt;게스트 OS&lt;/code&gt;가 독자적으로 돌아가는 가상 컴퓨터 인 것이다. 올리고 올라가고 올라가서 실행되니 느린건 당연지사.&lt;/p&gt;
&lt;p&gt;OS를 자체적으로 가지고 있다는 것은 OS를 가상 머신 이미지에 포함해야 했고, 이렇게 되다보니 이미지 용량이 상당히 컷다. 그리고 이것은 상당히 배포와 관리를 힘들게 했다. 인터넷이 빨라도 엄청난 용량은 부담인건 똑같으니까.&lt;/p&gt;

&lt;h2&gt;Docker는 뭐가 달라.&lt;/h2&gt;

&lt;p&gt;도커는 이를 더 가볍게 만들었다. 게스트 OS를 없애버렸다. Docker는 호스트 OS를 사용해서 동작한다. 즉 호스트 OS의 &lt;code&gt;시스템 콜&lt;/code&gt;을 직접 호출한다. 이것은 매우 빠른 속도로 작동할 수 있음을 의미한다(실제 빠른가는 별개의 문제기에).&lt;/p&gt;
&lt;p&gt;도커는 도커 &lt;code&gt;이미지&lt;/code&gt;에 서버 운영을 위한 프로그램과 라이브러리를 포함하고 있다. 이런 &lt;code&gt;이미지&lt;/code&gt;들은 도커로 각각 격리되어 설치된다. 즉 &lt;code&gt;도커 엔진&lt;/code&gt;이 도커 &lt;code&gt;이미지&lt;/code&gt;를 설치할 때, 마치 가상 머신처럼 분리 시켜준다는 것이다. 그러나 호스트 OS는 공유한다. 그게 다다.&lt;/p&gt;
&lt;p&gt;도커를 사용하면 &lt;code&gt;호스트OS&lt;/code&gt;위에서 바로 돌리는 것과 비슷한 성능 수준을 얻을 수 있다. 99%정도까지 유사하다고 한다.&lt;/p&gt;

&lt;h2&gt;도커가 제공하는 Docker Hub&lt;/h2&gt;

&lt;p&gt;도커는 이미지 생성과 배포에 특화된 기능을 제공한다. 마치 깃처럼 이것을 이용하면 이미지를 push/pull할 수 있다. 뿐만 아니라 이것들을 공유할 수 있는 깃헙과 같은 도커허브를 제공한다.&lt;/p&gt;

&lt;h1&gt;리눅스 컨테이너 이야기부터 해보자.&lt;/h1&gt;

&lt;p&gt;chroot라는 명령어가 있다. 이것은 파일 시스템에서 루티 디렉토리(/)를 바꾸는 것이다. chroot로 특정 디렉토리를 루트 디렉토리로 설정하면 &lt;code&gt;chroot jail&lt;/code&gt;이라 불리는 격리된 감옥이 생성된다. 이것을 활용하면 안에서 밖으로는 절대 나갈 수 없는 환경을 만들 수 있다. 이것으로 하이퍼바이저의 오버헤드를 피하면서 가벼운 가상화 비스므리한 환경을 조성할 수 있었다. 그러나 이것은 온갖 귀찮은 일을 해야 하게 만든다.&lt;/p&gt;
&lt;p&gt;일단 실행 파일과 라이브러리등을 직접 준비해 넣어줘야한다. 바꿔야 하는 설정이 있다면 해당 설정또한 바꿔야 한다. 해당 공간이 사용하는 정보들을 제대로 제공받지도 못할 뿐더러 호스트의 다른 프로세스의 어떤 문제가 직접적으로 영향을 끼친다. 아무튼! 사용자가 해야할 일이 엄청나다. 이것을 해결하기 위해 이것을 시스템 레벨에서 좀 더 잘 제공하자는 리눅스계의 움직임이 있었고, LXC(LinuX Container)라는 기능이 탄생한다.&lt;/p&gt;
&lt;p&gt;LXC는 기존 가상화와 달랐다. 이 공간에는 OS가 없기에 가상 머신이라 부르기도 좀 그랬다. 그래서 바구니/그릇(&lt;code&gt;컨테이너&lt;/code&gt;)정도로 부르기로 결정했다. 한국인이면 바구니라 불렀을지도 모르겠는데, 외국인이라 &lt;code&gt;컨테이너&lt;/code&gt;라 부른듯하다.&lt;/p&gt;
&lt;p&gt;이 LXC기능에 완전히 &lt;code&gt;격리&lt;/code&gt;된 가상 공간을 제공하고자 했다. 이를 위해 커널의 Control Group(cgroups) 기능을 통해 CPU도 메모리도, 디스크와 네트웍자원까지 할당할 수 있도록 했고, 커널의 Namespace isolation(혹은 namespaces)이란 기능으로 프로세스트리와 사용자계정, fs까지도 격리되도록 했다.&lt;/p&gt;
&lt;p&gt;그러나 이렇게 생성된 LXC기능은 공간 외에 서버 운영에 필요한 기능을 필요한 수준으로 제공치 못했다. 이에 따라 Docker가 등장한다.&lt;/p&gt;

&lt;h2&gt;LXC와 도커&lt;/h2&gt;

&lt;p&gt;기존에 LXC에 기능을 얹기 위해 구현된 도커는 0.9버전부터 libcontainer를 사용해 LXC를 대체하기 시작한다. 직접 LXC의 기능을 하기 시작한 것이다. 그리고 이를 exec driver라 부른다.&lt;/p&gt;
&lt;p&gt;실행옵션에 따라 LXC 또한 사용할 수 있다.&lt;/p&gt;

&lt;h1&gt;Docker 이미지 VS 컨테이너&lt;/h1&gt;

&lt;p&gt;도커에는 이미지와 컨테이너라는 2가지의 헷갈리는 단어가 존재한다. 또 &lt;code&gt;이미지&lt;/code&gt;는 &lt;code&gt;베이스 이미지&lt;/code&gt;와 &lt;code&gt;도커 이미지&lt;/code&gt;로 구분된다. &lt;/p&gt;

&lt;h2&gt;베이스 이미지&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;베이스 이미지&lt;/code&gt;란, 리눅스 배포판의 커널 영역을 제외한 사용자 공간/영역(유저랜드)만을 이미지에 포함한 파일을 의미한다. 이때 사용자공간/영역(&lt;code&gt;유저랜드&lt;/code&gt;)란, 커널 공간/영역과 관련된 것들을 제외한 부팅시 필요한 몇몇 실행파일과 라이브러리, 그리고 패키징 시스템(우분투의 apt같은)것들을 포괄해서 부르는 명칭이다. 이 &lt;code&gt;유저랜드&lt;/code&gt; 혹은 사용자공간/영역에 Redis나 Nginx등을 설치해서 &lt;code&gt;베이스 이미지&lt;/code&gt;로 배포하기도 한다.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;유저랜드&lt;/code&gt;에는 각 리눅스 배포판의 특징이 고스란히 있어서 각 배포판 고유의 패키징 툴도 그대로 활용 할 수 있다. 이 베이스 이미지는 변형되거나 뭔가가 추가 설치될 수 있는데 이렇게 해서 변형된 이미지를 &lt;code&gt;도커 이미지&lt;/code&gt;라 부른다.&lt;/p&gt;

&lt;h2&gt;도커 이미지&lt;/h2&gt;

&lt;p&gt;도커 이미지는 베이스 이미지에서 몇가지를 라이브러리, 프로그램, 소스 파일등을 추가/설치/저장한 이미지다. 도커 이미지는 베이스이미지부터 상속받듯이 만들어진다. 즉, 베이스이미지에서 추가되거나 변형되는 부분만 &lt;code&gt;도커 이미지&lt;/code&gt;에 저장된다. 이렇게 만들어진 &lt;code&gt;도커 이미지&lt;/code&gt;는 또 수정될 수 있는데, 이렇게 수정되면 또 그 변형된 부분만 다시 &lt;code&gt;도커 이미지&lt;/code&gt;에 저장된다.&lt;/p&gt;
&lt;p&gt;첫번째 변화후 저장된 &lt;code&gt;도커 이미지&lt;/code&gt;를 A라 하고, 두번째 변화후 저장된 &lt;code&gt;도커 이미지&lt;/code&gt;를 B라 하면,&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;베이스 이미지 + A + B
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;를 하여 &lt;code&gt;도커 이미지&lt;/code&gt; 실행이 시작된다. 이 때 도커는 필요한 파일을 부모이미지부터 자식이미지까지 싹 받아서 합친다. 이렇게하여 실행된 이미지를 우리는 &lt;code&gt;컨테이너&lt;/code&gt;라 부른다.&lt;/p&gt;

&lt;h2&gt;컨테이너&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;도커 컨테이너&lt;/code&gt;는 이미지가 실행된 상태를 뜻한다. 이미지 하나로는 수백개의 컨테이너를 생성할 수 있다. 마치 이 관계는 실행파일과 프로세스의 관계 같은 것이다.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;“ 다음 시간에는 도커를 설치해보자! ”&lt;/em&gt;&lt;/p&gt;</description>
      <category>Develop</category>
      <category>docker</category>
      <category>LXC</category>
      <category>VM</category>
      <category>가상머신</category>
      <category>가상화</category>
      <category>도커</category>
      <category>리눅스</category>
      <category>이미지</category>
      <category>컨테이너</category>
      <author>youngkyu.cho</author>
      <guid isPermaLink="true">https://youngkyu.tistory.com/32</guid>
      <comments>https://youngkyu.tistory.com/32#entry32comment</comments>
      <pubDate>Mon, 9 Mar 2015 20:13:42 +0900</pubDate>
    </item>
    <item>
      <title>브라우저 위치 정보 받아오기 / HTML5 Geolocation API</title>
      <link>https://youngkyu.tistory.com/31</link>
      <description>&lt;en-note lang=&quot;v2&quot; style=&quot;line-height:1.6;&quot;&gt;&lt;del style=&quot;position:relative;display:block&quot;&gt;&lt;a style=&quot;position: absolute;color: #FFF;text-decoration: none;font-size: 12px;height: 25px;border-radius: 0;margin-top: -20px;right: 15px;background: rgba(0, 0, 0, 0);border-left: 10px solid #BB3A34;border-right: 10px solid #BB3A34;border-bottom: 5px solid rgba(0, 0, 0, 0);width: 0;text-indent:-100000px;&quot; href=&quot;http://marxi.co/#/?provider=evernote_int&amp;amp;guid=2054371b-a4b1-44c6-9716-1d7d3fedd373&quot;&gt;Edit&lt;/a&gt;&lt;/del&gt;&lt;div style=&quot;line-height: 1.6; font-family: Helvetica Neue, Arial, Hiragino Sans GB, STHeiti, Microsoft YaHei, WenQuanYi Micro Hei, SimSun, Song, sans-serif;&quot;&gt;
&lt;h1 style=&quot;font-size: 36px; margin: 0.67em 0; font-family: inherit; font-weight: bold; line-height: 1.1; color: inherit; margin-top: 0px; margin-bottom: 20px;&quot;&gt;브라우저 위치 정보 받아오기 / HTML5 Geolocation API&lt;/h1&gt;
&lt;hr style=&quot;-moz-box-sizing: content-box; box-sizing: content-box; height: 0; line-height: 1.6; margin-top: 20px; margin-bottom: 20px; border: 0; border-top: 1px solid rgba(102, 128, 153, 0.15);&quot;&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;스마트폰이 보급되면서 브라우저에서도 위치 기반 서비스들이 다수 생겨났다. 이러한 서비스를 필자도 만들 필요가 있었는데, 이를 위해서 필요한 API가 바로 이 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px; margin-top: 0px;&quot;&gt;Geolocation API&lt;/code&gt;다.&lt;/p&gt;&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;해당 디바이스의 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px; margin-top: 0px;&quot;&gt;GPS&lt;/code&gt;, &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px;&quot;&gt;IP address&lt;/code&gt; 정보, &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px;&quot;&gt;Wi-Fi&lt;/code&gt;, &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px;&quot;&gt;GSM&lt;/code&gt;, &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px;&quot;&gt;CDMA&lt;/code&gt;망의 ID를 통해 위치를 대략적으로 예측하여 브라우저가 반환해주는 API로 어떤 디바이스건 관계없이 사용할 수 있다. 그러나 이렇다보니 정확한 위치정보 라는 것을 보장하지 않고, 또 어떤 방식으로 해당 위치가 얻어졌는지도 알 수 없다. 그러나 일반 사용자용 웹앱을 만들기 위해서는 이 정도면 충분하다.&lt;/p&gt;
&lt;hr style=&quot;-moz-box-sizing: content-box; box-sizing: content-box; height: 0; line-height: 1.6; margin-top: 20px; margin-bottom: 20px; border: 0; border-top: 1px solid rgba(102, 128, 153, 0.15);&quot;&gt;
&lt;h2 style=&quot;font-family: inherit; font-weight: bold; line-height: 1.1; color: inherit; margin-top: 30px; margin-bottom: 20px; font-size: 30px;&quot;&gt;Geolocation API&lt;/h2&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;Geoloaction API는 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px; margin-top: 0px;&quot;&gt;window.navigator&lt;/code&gt;에 정의되어 있다. &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px;&quot;&gt;IE 9&lt;/code&gt;이후, 파이어폭스, 크롬등에서도 지원하고 있다. 사생활 침해의 가능성으로 인해 위치정보를 제공받기 위해서는 사용자가 허가를 해야 한다.&lt;/p&gt;
&lt;h3 style=&quot;font-family: inherit; font-weight: bold; line-height: 1.1; color: inherit; margin-top: 30px; margin-bottom: 20px; font-size: 24px;&quot;&gt;1. 빠르게 현재  위치정보 가져오기&lt;/h3&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;이때 중요한게 우리가 사용할 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px; margin-top: 0px;&quot;&gt;Geolocation&lt;/code&gt; 객체가 존재하는지를 체킹하는 것인데 아래와 같은 방식으로 할 수 있다.&lt;/p&gt;
&lt;pre style=&quot;overflow: initial; font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 14px; display: block; padding: 0; margin: 0 0 10px; line-height: 1.6; word-break: break-all; word-wrap: break-word; color: #333333; background-color: #f5f5f5; border: none; border-radius: 0; white-space: pre-wrap;&quot;&gt;&lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: inherit; padding: 1em; color: #333; background-color: transparent; white-space: pre-wrap; border-radius: 0; display: block; background: #F6F6F6; margin-top: 0px;&quot;&gt;&lt;span style=&quot;color: #333; font-weight: bold; margin-top: 0px;&quot;&gt;if&lt;/span&gt;(&lt;span style=&quot;color: #dd1144;&quot;&gt;&quot;geolocation&quot;&lt;/span&gt; &lt;span style=&quot;color: #333; font-weight: bold;&quot;&gt;in&lt;/span&gt; navigator) { 
    &lt;span style=&quot;color: #998; font-style: italic;&quot;&gt;// Geolocation API가 있는 브라우저라면,&lt;/span&gt;
} &lt;span style=&quot;color: #333; font-weight: bold;&quot;&gt;else&lt;/span&gt; { 
    &lt;span style=&quot;color: #998; font-style: italic;&quot;&gt;// 없는 브라우저라면,&lt;/span&gt;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;일반적인 위치정보를 가져오기 위해서는 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px; margin-top: 0px;&quot;&gt;window.navigator&lt;/code&gt;객체의 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px;&quot;&gt;getCurrentPosition()&lt;/code&gt;함수를 사용하면 된다. 이때 사용하는 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px;&quot;&gt;getCurrentPosition()&lt;/code&gt;함수는 &lt;strong style=&quot;font-weight: bold;&quot;&gt;정확도&lt;/strong&gt;보다는 &lt;strong style=&quot;font-weight: bold;&quot;&gt;빠른 응답&lt;/strong&gt;에 초점을 둔다. GPS정보는 받아오는데 시간이 소요되기에 보통 이 함수는 IP address 또는 WI-FI에 기대어 위치를 추정한다.&lt;/p&gt;&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;먼저 이 함수 호출시 사용자의 위치 탐지를 시작하라는 명령을 비동기적으로 하드웨어에 요청한다. 위치가 확인이되면 콜백 함수가 실행이 되는 형태로 작동한다. 따라서 우리는 성공시 할 작업을 정의한 함수를 파라매터 콜백 함수(아래 예시 코드의 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px; margin-top: 0px;&quot;&gt;do_something&lt;/code&gt;)로 넣어준다.&lt;/p&gt;
&lt;pre style=&quot;overflow: initial; font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 14px; display: block; padding: 0; margin: 0 0 10px; line-height: 1.6; word-break: break-all; word-wrap: break-word; color: #333333; background-color: #f5f5f5; border: none; border-radius: 0; white-space: pre-wrap;&quot;&gt;&lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: inherit; padding: 1em; color: #333; background-color: transparent; white-space: pre-wrap; border-radius: 0; display: block; background: #F6F6F6; margin-top: 0px;&quot;&gt;navigator.geolocation.getCurrentPosition(&lt;span style=&quot;margin-top: 0px;&quot;&gt;&lt;span style=&quot;color: #333; font-weight: bold; margin-top: 0px;&quot;&gt;function&lt;/span&gt;&lt;span&gt;(position)&lt;/span&gt; &lt;/span&gt;{
    do_something(position.coords.latitude, position.coords.longitude);
});
&lt;/code&gt;&lt;/pre&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px; margin-top: 0px;&quot;&gt;Position&lt;/code&gt;객체가 콜백 함수의 파라매터로 넘어오면, 여기서 위치 정보를 꺼낼 수 있다.&lt;/p&gt;
&lt;h3 style=&quot;font-family: inherit; font-weight: bold; line-height: 1.1; color: inherit; margin-top: 30px; margin-bottom: 20px; font-size: 24px;&quot;&gt;2. 현재 위치 보정/갱신&lt;/h3&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;더 정확한 위치 정보가 추가적으로 도착해서 그 정보를 반영해 보정한다거나, 디바이스의 움직임에 따라 갱신된 위치 정보를 반영해 주고 싶다면 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px; margin-top: 0px;&quot;&gt;watchPostion()&lt;/code&gt;함수를 활용하면 된다. 이것은 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px;&quot;&gt;getCurrentPosition()&lt;/code&gt;과 동일한 사용방법을 가지고 있다. 디바이스가 움직여서 위치 정보가 변화된다거나, 혹은 더욱 정확도가 높은 위치정보를 계산해냈을 경우 갱신되어 여러번 콜백함수가 호출된다.&lt;/p&gt;&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px; margin-top: 0px;&quot;&gt;watchPostion()&lt;/code&gt;는 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px;&quot;&gt;getCurrentPosition()&lt;/code&gt;호출과 관계없이 사용할 수 있다.&lt;/p&gt;
&lt;pre style=&quot;overflow: initial; font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 14px; display: block; padding: 0; margin: 0 0 10px; line-height: 1.6; word-break: break-all; word-wrap: break-word; color: #333333; background-color: #f5f5f5; border: none; border-radius: 0; white-space: pre-wrap;&quot;&gt;&lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: inherit; padding: 1em; color: #333; background-color: transparent; white-space: pre-wrap; border-radius: 0; display: block; background: #F6F6F6; margin-top: 0px;&quot;&gt;navigator.geolocation.watchPosition(&lt;span style=&quot;margin-top: 0px;&quot;&gt;&lt;span style=&quot;color: #333; font-weight: bold; margin-top: 0px;&quot;&gt;function&lt;/span&gt;&lt;span&gt;(position)&lt;/span&gt; &lt;/span&gt;{
    do_something(position.coords.latitude, position.coords.longitude);
});
&lt;/code&gt;&lt;/pre&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;그런데 이때 문제가 생긴다. 더 이상 디바이스 정보를 받아오는 것을 그만 두고 싶은 경우가 생기는 상황이 바로 그것인데, 이를 해결하기 위해 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px; margin-top: 0px;&quot;&gt;watchPosition()&lt;/code&gt; 함수는 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px;&quot;&gt;watcher ID&lt;/code&gt;를 반환한다.&lt;/p&gt;
&lt;pre style=&quot;overflow: initial; font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 14px; display: block; padding: 0; margin: 0 0 10px; line-height: 1.6; word-break: break-all; word-wrap: break-word; color: #333333; background-color: #f5f5f5; border: none; border-radius: 0; white-space: pre-wrap;&quot;&gt;&lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: inherit; padding: 1em; color: #333; background-color: transparent; white-space: pre-wrap; border-radius: 0; display: block; background: #F6F6F6; margin-top: 0px;&quot;&gt;&lt;span style=&quot;color: #333; font-weight: bold; margin-top: 0px;&quot;&gt;var&lt;/span&gt; watcherID = navigator.geolocation.watchPosition(&lt;span&gt;&lt;span style=&quot;color: #333; font-weight: bold; margin-top: 0px;&quot;&gt;function&lt;/span&gt;&lt;span&gt;(position)&lt;/span&gt; &lt;/span&gt;{
    do_something(position.coords.latitude, position.coords.longitude);
});

navigator.geolocation.clearWatch(watchID); &lt;span style=&quot;color: #998; font-style: italic;&quot;&gt;// 위치 갱신 그만 두기&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt; 이 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px; margin-top: 0px;&quot;&gt;watcherID&lt;/code&gt;를 통해 우리는 사용자 위치 갱신을 그만 둘 수 있다. 아래 코드가 그 방법이다.&lt;/p&gt;
&lt;h3 style=&quot;font-family: inherit; font-weight: bold; line-height: 1.1; color: inherit; margin-top: 30px; margin-bottom: 20px; font-size: 24px;&quot;&gt;3. 위치 정보의 세부 옵션&lt;/h3&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt; &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px; margin-top: 0px;&quot;&gt;getCurrentPosition()&lt;/code&gt;과 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px;&quot;&gt;watchPosition()&lt;/code&gt;은 둘다 성공시의 콜백, 실패시의 콜백(이 실패시의 콜백의 경우, &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px;&quot;&gt;watchPosition()&lt;/code&gt;에서 실패시 여러번 호출되지 않고 한번만 호출된다.), 그리고 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px;&quot;&gt;PositionOptions&lt;/code&gt; 객체를 파라매터로 받는다.&lt;/p&gt;
&lt;pre style=&quot;overflow: initial; font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 14px; display: block; padding: 0; margin: 0 0 10px; line-height: 1.6; word-break: break-all; word-wrap: break-word; color: #333333; background-color: #f5f5f5; border: none; border-radius: 0; white-space: pre-wrap;&quot;&gt;&lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: inherit; padding: 1em; color: #333; background-color: transparent; white-space: pre-wrap; border-radius: 0; display: block; background: #F6F6F6; margin-top: 0px;&quot;&gt;&lt;span style=&quot;margin-top: 0px;&quot;&gt;&lt;span style=&quot;color: #333; font-weight: bold; margin-top: 0px;&quot;&gt;function&lt;/span&gt; &lt;span style=&quot;color: #333; font-weight: normal;&quot;&gt;geo_success&lt;/span&gt;&lt;span&gt;(position)&lt;/span&gt; &lt;/span&gt;{
    do_something(position.coords.latitude, position.coords.longitude);
}

&lt;span&gt;&lt;span style=&quot;color: #333; font-weight: bold; margin-top: 0px;&quot;&gt;function&lt;/span&gt; &lt;span style=&quot;color: #333; font-weight: normal;&quot;&gt;geo_error&lt;/span&gt;&lt;span&gt;()&lt;/span&gt; &lt;/span&gt;{
    alert(&lt;span style=&quot;color: #dd1144;&quot;&gt;&quot;위치 정보를 사용할 수 없습니다.&quot;&lt;/span&gt;);
}

&lt;span style=&quot;color: #333; font-weight: bold;&quot;&gt;var&lt;/span&gt; geo_options = {
    enableHighAccuracy: &lt;span&gt;true&lt;/span&gt;, &lt;span style=&quot;color: #998; font-style: italic;&quot;&gt;// 불리언&lt;/span&gt;
    maximumAge        : &lt;span style=&quot;color: #099;&quot;&gt;30000&lt;/span&gt;, &lt;span style=&quot;color: #998; font-style: italic;&quot;&gt;// 천분의 1초 단위&lt;/span&gt;
    timeout           : &lt;span style=&quot;color: #099;&quot;&gt;27000&lt;/span&gt; &lt;span style=&quot;color: #998; font-style: italic;&quot;&gt;// 천분의 1초 단위&lt;/span&gt;
};

&lt;span style=&quot;color: #333; font-weight: bold;&quot;&gt;var&lt;/span&gt; wpid = navigator.geolocation.watchPosition(geo_success, geo_error, geo_options);
&lt;/code&gt;&lt;/pre&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;위 코드는 예시다. &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px; margin-top: 0px;&quot;&gt;geo_options&lt;/code&gt;라는 변수명으로 표현된 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px;&quot;&gt;PositionOptions&lt;/code&gt; 객체에 대해 세부적 프로퍼티의 의미를 알아보자.&lt;/p&gt;&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;strong style=&quot;font-weight: bold; margin-top: 0px;&quot;&gt;enableHighAccuracy&lt;/strong&gt; : 정확도를 높게 받을지에 관한 값이다. &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px;&quot;&gt;true&lt;/code&gt;로 설정시 응답이 느려지거나 전력 소비가 증가되는 등의 부작용이 발생할 수 있다. &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px;&quot;&gt;false&lt;/code&gt;라면 디바이스 스스로 자원을 분배해 사용한다.&lt;/p&gt;&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;strong style=&quot;font-weight: bold; margin-top: 0px;&quot;&gt;timeout&lt;/strong&gt; : 위치를 받아올 때까지의 대기 시간을 의미한다. 기본값은 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px;&quot;&gt;Infinity&lt;/code&gt;다.&lt;/p&gt;&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;strong style=&quot;font-weight: bold; margin-top: 0px;&quot;&gt;maximumAge&lt;/strong&gt; : 캐시된 위치 값의 유효시간을 의미한다. 0을 지정하면 캐시된 위치를 사용치 말라는 것이고, &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px;&quot;&gt;Infinity&lt;/code&gt;를 지정하면 캐시된 위치가 언제 수집된 건지 개의치 않고 반환한다.&lt;/p&gt;
&lt;h3 style=&quot;font-family: inherit; font-weight: bold; line-height: 1.1; color: inherit; margin-top: 30px; margin-bottom: 20px; font-size: 24px;&quot;&gt;4. Position 객체와 PositionError 객체.&lt;/h3&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px; margin-top: 0px;&quot;&gt;Position&lt;/code&gt;는 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px;&quot;&gt;coords&lt;/code&gt; 객체와 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px;&quot;&gt;timestamp&lt;/code&gt;(수집된 시간)를 프로퍼티로 가진다.&lt;/p&gt;&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;그리고 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px; margin-top: 0px;&quot;&gt;coords&lt;/code&gt; 객체는 아래와 같은 프로퍼티들을 가진다.&lt;/p&gt;&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;strong style=&quot;font-weight: bold; margin-top: 0px;&quot;&gt;latitude&lt;/strong&gt; : 경도&lt;br /&gt;&lt;strong style=&quot;font-weight: bold;&quot;&gt;longitude&lt;/strong&gt; : 위도&lt;br /&gt;&lt;strong style=&quot;font-weight: bold;&quot;&gt;altitude&lt;/strong&gt; : 고도&lt;br /&gt;&lt;strong style=&quot;font-weight: bold;&quot;&gt;accuracy&lt;/strong&gt; : 미터로 표현한 위,경도의 정확도&lt;br /&gt;&lt;strong style=&quot;font-weight: bold;&quot;&gt;altitudeAccuracy&lt;/strong&gt; : 미터로 표현한 고도의 정확도&lt;br /&gt;&lt;strong style=&quot;font-weight: bold;&quot;&gt;heading&lt;/strong&gt; : 장치가 움직이는 방향을 나타내는 숫자. 이 값은 정북에서 시계방향으로 벗어난 각의 크기를 나타낸다. (정북향 0도, 동쪽 90도, 서쪽 270도)&lt;br /&gt;&lt;strong style=&quot;font-weight: bold;&quot;&gt;speed&lt;/strong&gt; : 장치의 속도&lt;/p&gt;&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px; margin-top: 0px;&quot;&gt;PositionError&lt;/code&gt; 객체는 에러 콜백 함수에 첫번째 파라매터로 전달 되는 객체다.&lt;/p&gt;
&lt;pre style=&quot;overflow: initial; font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 14px; display: block; padding: 0; margin: 0 0 10px; line-height: 1.6; word-break: break-all; word-wrap: break-word; color: #333333; background-color: #f5f5f5; border: none; border-radius: 0; white-space: pre-wrap;&quot;&gt;&lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: inherit; padding: 1em; color: #333; background-color: transparent; white-space: pre-wrap; border-radius: 0; display: block; background: #F6F6F6; margin-top: 0px;&quot;&gt;&lt;span style=&quot;margin-top: 0px;&quot;&gt;&lt;span style=&quot;color: #333; font-weight: bold; margin-top: 0px;&quot;&gt;function&lt;/span&gt; &lt;span style=&quot;color: #333; font-weight: normal;&quot;&gt;errorCallback&lt;/span&gt;&lt;span&gt;(error)&lt;/span&gt; &lt;/span&gt;{
    alert(&lt;span style=&quot;color: #dd1144;&quot;&gt;'ERROR('&lt;/span&gt; + error.code + &lt;span style=&quot;color: #dd1144;&quot;&gt;'): '&lt;/span&gt; + error.message);
};
&lt;/code&gt;&lt;/pre&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px; margin-top: 0px;&quot;&gt;code&lt;/code&gt;(1 : permission denied, 2 : unavailable, 3 : timeout)와 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px;&quot;&gt;message&lt;/code&gt;(문자열로 표현된 에러 메세지)를 프로퍼티로 가진다.&lt;/p&gt;
&lt;/div&gt;
&lt;center style=&quot;display:none&quot;&gt;%23%uBE0C%uB77C%uC6B0%uC800%20%uC704%uCE58%20%uC815%uBCF4%20%uBC1B%uC544%uC624%uAE30%20/%20HTML5%20Geolocation%20API%0A%0A---%0A%uC2A4%uB9C8%uD2B8%uD3F0%uC774%20%uBCF4%uAE09%uB418%uBA74%uC11C%20%uBE0C%uB77C%uC6B0%uC800%uC5D0%uC11C%uB3C4%20%uC704%uCE58%20%uAE30%uBC18%20%uC11C%uBE44%uC2A4%uB4E4%uC774%20%uB2E4%uC218%20%uC0DD%uACA8%uB0AC%uB2E4.%20%uC774%uB7EC%uD55C%20%uC11C%uBE44%uC2A4%uB97C%20%uD544%uC790%uB3C4%20%uB9CC%uB4E4%20%uD544%uC694%uAC00%20%uC788%uC5C8%uB294%uB370%2C%20%uC774%uB97C%20%uC704%uD574%uC11C%20%uD544%uC694%uD55C%20API%uAC00%20%uBC14%uB85C%20%uC774%20%60Geolocation%20API%60%uB2E4.%0A%0A%uD574%uB2F9%20%uB514%uBC14%uC774%uC2A4%uC758%20%60GPS%60%2C%20%60IP%20address%60%20%uC815%uBCF4%2C%20%60Wi-Fi%60%2C%20%60GSM%60%2C%20%60CDMA%60%uB9DD%uC758%20ID%uB97C%20%uD1B5%uD574%20%uC704%uCE58%uB97C%20%uB300%uB7B5%uC801%uC73C%uB85C%20%uC608%uCE21%uD558%uC5EC%20%uBE0C%uB77C%uC6B0%uC800%uAC00%20%uBC18%uD658%uD574%uC8FC%uB294%20API%uB85C%20%uC5B4%uB5A4%20%uB514%uBC14%uC774%uC2A4%uAC74%20%uAD00%uACC4%uC5C6%uC774%20%uC0AC%uC6A9%uD560%20%uC218%20%uC788%uB2E4.%20%uADF8%uB7EC%uB098%20%uC774%uB807%uB2E4%uBCF4%uB2C8%20%uC815%uD655%uD55C%20%uC704%uCE58%uC815%uBCF4%20%uB77C%uB294%20%uAC83%uC744%20%uBCF4%uC7A5%uD558%uC9C0%20%uC54A%uACE0%2C%20%uB610%20%uC5B4%uB5A4%20%uBC29%uC2DD%uC73C%uB85C%20%uD574%uB2F9%20%uC704%uCE58%uAC00%20%uC5BB%uC5B4%uC84C%uB294%uC9C0%uB3C4%20%uC54C%20%uC218%20%uC5C6%uB2E4.%20%uADF8%uB7EC%uB098%20%uC77C%uBC18%20%uC0AC%uC6A9%uC790%uC6A9%20%uC6F9%uC571%uC744%20%uB9CC%uB4E4%uAE30%20%uC704%uD574%uC11C%uB294%20%uC774%20%uC815%uB3C4%uBA74%20%uCDA9%uBD84%uD558%uB2E4.%0A%0A---%0A%0A%23%23Geolocation%20API%0AGeoloaction%20API%uB294%20%60window.navigator%60%uC5D0%20%uC815%uC758%uB418%uC5B4%20%uC788%uB2E4.%20%60IE%209%60%uC774%uD6C4%2C%20%uD30C%uC774%uC5B4%uD3ED%uC2A4%2C%20%uD06C%uB86C%uB4F1%uC5D0%uC11C%uB3C4%20%uC9C0%uC6D0%uD558%uACE0%20%uC788%uB2E4.%20%uC0AC%uC0DD%uD65C%20%uCE68%uD574%uC758%20%uAC00%uB2A5%uC131%uC73C%uB85C%20%uC778%uD574%20%uC704%uCE58%uC815%uBCF4%uB97C%20%uC81C%uACF5%uBC1B%uAE30%20%uC704%uD574%uC11C%uB294%20%uC0AC%uC6A9%uC790%uAC00%20%uD5C8%uAC00%uB97C%20%uD574%uC57C%20%uD55C%uB2E4.%0A%0A%23%23%231.%20%uBE60%uB974%uAC8C%20%uD604%uC7AC%20%20%uC704%uCE58%uC815%uBCF4%20%uAC00%uC838%uC624%uAE30%0A%uC774%uB54C%20%uC911%uC694%uD55C%uAC8C%20%uC6B0%uB9AC%uAC00%20%uC0AC%uC6A9%uD560%20%60Geolocation%60%20%uAC1D%uCCB4%uAC00%20%uC874%uC7AC%uD558%uB294%uC9C0%uB97C%20%uCCB4%uD0B9%uD558%uB294%20%uAC83%uC778%uB370%20%uC544%uB798%uC640%20%uAC19%uC740%20%uBC29%uC2DD%uC73C%uB85C%20%uD560%20%uC218%20%uC788%uB2E4.%0A%0A%20%20%20%20if%28%22geolocation%22%20in%20navigator%29%20%7B%20%0A%20%20%20%20%20%20%20%20//%20Geolocation%20API%uAC00%20%uC788%uB294%20%uBE0C%uB77C%uC6B0%uC800%uB77C%uBA74%2C%0A%20%20%20%20%7D%20else%20%7B%20%0A%20%20%20%20%20%20%20%20//%20%uC5C6%uB294%20%uBE0C%uB77C%uC6B0%uC800%uB77C%uBA74%2C%0A%20%20%20%20%7D%0A%0A%uC77C%uBC18%uC801%uC778%20%uC704%uCE58%uC815%uBCF4%uB97C%20%uAC00%uC838%uC624%uAE30%20%uC704%uD574%uC11C%uB294%20%60window.navigator%60%uAC1D%uCCB4%uC758%20%60getCurrentPosition%28%29%60%uD568%uC218%uB97C%20%uC0AC%uC6A9%uD558%uBA74%20%uB41C%uB2E4.%20%uC774%uB54C%20%uC0AC%uC6A9%uD558%uB294%20%60getCurrentPosition%28%29%60%uD568%uC218%uB294%20**%uC815%uD655%uB3C4**%uBCF4%uB2E4%uB294%20**%uBE60%uB978%20%uC751%uB2F5**%uC5D0%20%uCD08%uC810%uC744%20%uB454%uB2E4.%20GPS%uC815%uBCF4%uB294%20%uBC1B%uC544%uC624%uB294%uB370%20%uC2DC%uAC04%uC774%20%uC18C%uC694%uB418%uAE30%uC5D0%20%uBCF4%uD1B5%20%uC774%20%uD568%uC218%uB294%20IP%20address%20%uB610%uB294%20WI-FI%uC5D0%20%uAE30%uB300%uC5B4%20%uC704%uCE58%uB97C%20%uCD94%uC815%uD55C%uB2E4.%0A%0A%uBA3C%uC800%20%uC774%20%uD568%uC218%20%uD638%uCD9C%uC2DC%20%uC0AC%uC6A9%uC790%uC758%20%uC704%uCE58%20%uD0D0%uC9C0%uB97C%20%uC2DC%uC791%uD558%uB77C%uB294%20%uBA85%uB839%uC744%20%uBE44%uB3D9%uAE30%uC801%uC73C%uB85C%20%uD558%uB4DC%uC6E8%uC5B4%uC5D0%20%uC694%uCCAD%uD55C%uB2E4.%20%uC704%uCE58%uAC00%20%uD655%uC778%uC774%uB418%uBA74%20%uCF5C%uBC31%20%uD568%uC218%uAC00%20%uC2E4%uD589%uC774%20%uB418%uB294%20%uD615%uD0DC%uB85C%20%uC791%uB3D9%uD55C%uB2E4.%20%uB530%uB77C%uC11C%20%uC6B0%uB9AC%uB294%20%uC131%uACF5%uC2DC%20%uD560%20%uC791%uC5C5%uC744%20%uC815%uC758%uD55C%20%uD568%uC218%uB97C%20%uD30C%uB77C%uB9E4%uD130%20%uCF5C%uBC31%20%uD568%uC218%28%uC544%uB798%20%uC608%uC2DC%20%uCF54%uB4DC%uC758%20%60do_something%60%29%uB85C%20%uB123%uC5B4%uC900%uB2E4.%0A%0A%20%20%20%20navigator.geolocation.getCurrentPosition%28function%28position%29%20%7B%0A%20%20%20%20%20%20%20%20do_something%28position.coords.latitude%2C%20position.coords.longitude%29%3B%0A%20%20%20%20%7D%29%3B%0A%20%20%20%20%0A%60Position%60%uAC1D%uCCB4%uAC00%20%uCF5C%uBC31%20%uD568%uC218%uC758%20%uD30C%uB77C%uB9E4%uD130%uB85C%20%uB118%uC5B4%uC624%uBA74%2C%20%uC5EC%uAE30%uC11C%20%uC704%uCE58%20%uC815%uBCF4%uB97C%20%uAEBC%uB0BC%20%uC218%20%uC788%uB2E4.%0A%20%20%20%20%0A%23%23%232.%20%uD604%uC7AC%20%uC704%uCE58%20%uBCF4%uC815/%uAC31%uC2E0%0A%0A%uB354%20%uC815%uD655%uD55C%20%uC704%uCE58%20%uC815%uBCF4%uAC00%20%uCD94%uAC00%uC801%uC73C%uB85C%20%uB3C4%uCC29%uD574%uC11C%20%uADF8%20%uC815%uBCF4%uB97C%20%uBC18%uC601%uD574%20%uBCF4%uC815%uD55C%uB2E4%uAC70%uB098%2C%20%uB514%uBC14%uC774%uC2A4%uC758%20%uC6C0%uC9C1%uC784%uC5D0%20%uB530%uB77C%20%uAC31%uC2E0%uB41C%20%uC704%uCE58%20%uC815%uBCF4%uB97C%20%uBC18%uC601%uD574%20%uC8FC%uACE0%20%uC2F6%uB2E4%uBA74%20%60watchPostion%28%29%60%uD568%uC218%uB97C%20%uD65C%uC6A9%uD558%uBA74%20%uB41C%uB2E4.%20%uC774%uAC83%uC740%20%60getCurrentPosition%28%29%60%uACFC%20%uB3D9%uC77C%uD55C%20%uC0AC%uC6A9%uBC29%uBC95%uC744%20%uAC00%uC9C0%uACE0%20%uC788%uB2E4.%20%uB514%uBC14%uC774%uC2A4%uAC00%20%uC6C0%uC9C1%uC5EC%uC11C%20%uC704%uCE58%20%uC815%uBCF4%uAC00%20%uBCC0%uD654%uB41C%uB2E4%uAC70%uB098%2C%20%uD639%uC740%20%uB354%uC6B1%20%uC815%uD655%uB3C4%uAC00%20%uB192%uC740%20%uC704%uCE58%uC815%uBCF4%uB97C%20%uACC4%uC0B0%uD574%uB0C8%uC744%20%uACBD%uC6B0%20%uAC31%uC2E0%uB418%uC5B4%20%uC5EC%uB7EC%uBC88%20%uCF5C%uBC31%uD568%uC218%uAC00%20%uD638%uCD9C%uB41C%uB2E4.%0A%0A%60watchPostion%28%29%60%uB294%20%60getCurrentPosition%28%29%60%uD638%uCD9C%uACFC%20%uAD00%uACC4%uC5C6%uC774%20%uC0AC%uC6A9%uD560%20%uC218%20%uC788%uB2E4.%0A%0A%20%20%20%20navigator.geolocation.watchPosition%28function%28position%29%20%7B%0A%20%20%20%20%20%20%20%20do_something%28position.coords.latitude%2C%20position.coords.longitude%29%3B%0A%20%20%20%20%7D%29%3B%0A%20%20%20%20%0A%uADF8%uB7F0%uB370%20%uC774%uB54C%20%uBB38%uC81C%uAC00%20%uC0DD%uAE34%uB2E4.%20%uB354%20%uC774%uC0C1%20%uB514%uBC14%uC774%uC2A4%20%uC815%uBCF4%uB97C%20%uBC1B%uC544%uC624%uB294%20%uAC83%uC744%20%uADF8%uB9CC%20%uB450%uACE0%20%uC2F6%uC740%20%uACBD%uC6B0%uAC00%20%uC0DD%uAE30%uB294%20%uC0C1%uD669%uC774%20%uBC14%uB85C%20%uADF8%uAC83%uC778%uB370%2C%20%uC774%uB97C%20%uD574%uACB0%uD558%uAE30%20%uC704%uD574%20%60watchPosition%28%29%60%20%uD568%uC218%uB294%20%60watcher%20ID%60%uB97C%20%uBC18%uD658%uD55C%uB2E4.%0A%0A%20%20%20%20var%20watcherID%20%3D%20navigator.geolocation.watchPosition%28function%28position%29%20%7B%0A%20%20%20%20%20%20%20%20do_something%28position.coords.latitude%2C%20position.coords.longitude%29%3B%0A%20%20%20%20%7D%29%3B%0A%20%20%20%20%0A%20%20%20%20navigator.geolocation.clearWatch%28watchID%29%3B%20//%20%uC704%uCE58%20%uAC31%uC2E0%20%uADF8%uB9CC%20%uB450%uAE30%0A%0A%20%uC774%20%60watcherID%60%uB97C%20%uD1B5%uD574%20%uC6B0%uB9AC%uB294%20%uC0AC%uC6A9%uC790%20%uC704%uCE58%20%uAC31%uC2E0%uC744%20%uADF8%uB9CC%20%uB458%20%uC218%20%uC788%uB2E4.%20%uC544%uB798%20%uCF54%uB4DC%uAC00%20%uADF8%20%uBC29%uBC95%uC774%uB2E4.%0A%20%0A%20%23%23%233.%20%uC704%uCE58%20%uC815%uBCF4%uC758%20%uC138%uBD80%20%uC635%uC158%0A%20%0A%20%60getCurrentPosition%28%29%60%uACFC%20%60watchPosition%28%29%60%uC740%20%uB458%uB2E4%20%uC131%uACF5%uC2DC%uC758%20%uCF5C%uBC31%2C%20%uC2E4%uD328%uC2DC%uC758%20%uCF5C%uBC31%28%uC774%20%uC2E4%uD328%uC2DC%uC758%20%uCF5C%uBC31%uC758%20%uACBD%uC6B0%2C%20%60watchPosition%28%29%60%uC5D0%uC11C%20%uC2E4%uD328%uC2DC%20%uC5EC%uB7EC%uBC88%20%uD638%uCD9C%uB418%uC9C0%20%uC54A%uACE0%20%uD55C%uBC88%uB9CC%20%uD638%uCD9C%uB41C%uB2E4.%29%2C%20%uADF8%uB9AC%uACE0%20%60PositionOptions%60%20%uAC1D%uCCB4%uB97C%20%uD30C%uB77C%uB9E4%uD130%uB85C%20%uBC1B%uB294%uB2E4.%0A%20%0A%20%20%20%20function%20geo_success%28position%29%20%7B%0A%20%20%20%20%20%20%20%20do_something%28position.coords.latitude%2C%20position.coords.longitude%29%3B%0A%20%20%20%20%7D%0A%0A%20%20%20%20function%20geo_error%28%29%20%7B%0A%20%20%20%20%20%20%20%20alert%28%22%uC704%uCE58%20%uC815%uBCF4%uB97C%20%uC0AC%uC6A9%uD560%20%uC218%20%uC5C6%uC2B5%uB2C8%uB2E4.%22%29%3B%0A%20%20%20%20%7D%0A%0A%20%20%20%20var%20geo_options%20%3D%20%7B%0A%20%20%20%20%20%20%20%20enableHighAccuracy%3A%20true%2C%20//%20%uBD88%uB9AC%uC5B8%0A%20%20%20%20%20%20%20%20maximumAge%20%20%20%20%20%20%20%20%3A%2030000%2C%20//%20%uCC9C%uBD84%uC758%201%uCD08%20%uB2E8%uC704%0A%20%20%20%20%20%20%20%20timeout%20%20%20%20%20%20%20%20%20%20%20%3A%2027000%20//%20%uCC9C%uBD84%uC758%201%uCD08%20%uB2E8%uC704%0A%20%20%20%20%7D%3B%0A%0A%20%20%20%20var%20wpid%20%3D%20navigator.geolocation.watchPosition%28geo_success%2C%20geo_error%2C%20geo_options%29%3B%0A%20%20%20%20%0A%uC704%20%uCF54%uB4DC%uB294%20%uC608%uC2DC%uB2E4.%20%60geo_options%60%uB77C%uB294%20%uBCC0%uC218%uBA85%uC73C%uB85C%20%uD45C%uD604%uB41C%20%60PositionOptions%60%20%uAC1D%uCCB4%uC5D0%20%uB300%uD574%20%uC138%uBD80%uC801%20%uD504%uB85C%uD37C%uD2F0%uC758%20%uC758%uBBF8%uB97C%20%uC54C%uC544%uBCF4%uC790.%0A%0A**enableHighAccuracy**%20%3A%20%uC815%uD655%uB3C4%uB97C%20%uB192%uAC8C%20%uBC1B%uC744%uC9C0%uC5D0%20%uAD00%uD55C%20%uAC12%uC774%uB2E4.%20%60true%60%uB85C%20%uC124%uC815%uC2DC%20%uC751%uB2F5%uC774%20%uB290%uB824%uC9C0%uAC70%uB098%20%uC804%uB825%20%uC18C%uBE44%uAC00%20%uC99D%uAC00%uB418%uB294%20%uB4F1%uC758%20%uBD80%uC791%uC6A9%uC774%20%uBC1C%uC0DD%uD560%20%uC218%20%uC788%uB2E4.%20%60false%60%uB77C%uBA74%20%uB514%uBC14%uC774%uC2A4%20%uC2A4%uC2A4%uB85C%20%uC790%uC6D0%uC744%20%uBD84%uBC30%uD574%20%uC0AC%uC6A9%uD55C%uB2E4.%0A%0A**timeout**%20%3A%20%uC704%uCE58%uB97C%20%uBC1B%uC544%uC62C%20%uB54C%uAE4C%uC9C0%uC758%20%uB300%uAE30%20%uC2DC%uAC04%uC744%20%uC758%uBBF8%uD55C%uB2E4.%20%uAE30%uBCF8%uAC12%uC740%20%60Infinity%60%uB2E4.%0A%0A**maximumAge**%20%3A%20%uCE90%uC2DC%uB41C%20%uC704%uCE58%20%uAC12%uC758%20%uC720%uD6A8%uC2DC%uAC04%uC744%20%uC758%uBBF8%uD55C%uB2E4.%200%uC744%20%uC9C0%uC815%uD558%uBA74%20%uCE90%uC2DC%uB41C%20%uC704%uCE58%uB97C%20%uC0AC%uC6A9%uCE58%20%uB9D0%uB77C%uB294%20%uAC83%uC774%uACE0%2C%20%60Infinity%60%uB97C%20%uC9C0%uC815%uD558%uBA74%20%uCE90%uC2DC%uB41C%20%uC704%uCE58%uAC00%20%uC5B8%uC81C%20%uC218%uC9D1%uB41C%20%uAC74%uC9C0%20%uAC1C%uC758%uCE58%20%uC54A%uACE0%20%uBC18%uD658%uD55C%uB2E4.%0A%0A%23%23%234.%20Position%20%uAC1D%uCCB4%uC640%20PositionError%20%uAC1D%uCCB4.%0A%0A%60Position%60%uB294%20%60coords%60%20%uAC1D%uCCB4%uC640%20%60timestamp%60%28%uC218%uC9D1%uB41C%20%uC2DC%uAC04%29%uB97C%20%uD504%uB85C%uD37C%uD2F0%uB85C%20%uAC00%uC9C4%uB2E4.%0A%0A%uADF8%uB9AC%uACE0%20%60coords%60%20%uAC1D%uCCB4%uB294%20%uC544%uB798%uC640%20%uAC19%uC740%20%uD504%uB85C%uD37C%uD2F0%uB4E4%uC744%20%uAC00%uC9C4%uB2E4.%0A%0A**latitude**%20%3A%20%uACBD%uB3C4%0A**longitude**%20%3A%20%uC704%uB3C4%0A**altitude**%20%3A%20%uACE0%uB3C4%0A**accuracy**%20%3A%20%uBBF8%uD130%uB85C%20%uD45C%uD604%uD55C%20%uC704%2C%uACBD%uB3C4%uC758%20%uC815%uD655%uB3C4%0A**altitudeAccuracy**%20%3A%20%uBBF8%uD130%uB85C%20%uD45C%uD604%uD55C%20%uACE0%uB3C4%uC758%20%uC815%uD655%uB3C4%0A**heading**%20%3A%20%uC7A5%uCE58%uAC00%20%uC6C0%uC9C1%uC774%uB294%20%uBC29%uD5A5%uC744%20%uB098%uD0C0%uB0B4%uB294%20%uC22B%uC790.%20%uC774%20%uAC12%uC740%20%uC815%uBD81%uC5D0%uC11C%20%uC2DC%uACC4%uBC29%uD5A5%uC73C%uB85C%20%uBC97%uC5B4%uB09C%20%uAC01%uC758%20%uD06C%uAE30%uB97C%20%uB098%uD0C0%uB0B8%uB2E4.%20%28%uC815%uBD81%uD5A5%200%uB3C4%2C%20%uB3D9%uCABD%2090%uB3C4%2C%20%uC11C%uCABD%20270%uB3C4%29%20%0A**speed**%20%3A%20%uC7A5%uCE58%uC758%20%uC18D%uB3C4%0A%0A%60PositionError%60%20%uAC1D%uCCB4%uB294%20%uC5D0%uB7EC%20%uCF5C%uBC31%20%uD568%uC218%uC5D0%20%uCCAB%uBC88%uC9F8%20%uD30C%uB77C%uB9E4%uD130%uB85C%20%uC804%uB2EC%20%uB418%uB294%20%uAC1D%uCCB4%uB2E4.%0A%0A%20%20%20%20function%20errorCallback%28error%29%20%7B%0A%20%20%20%20%20%20%20%20alert%28%27ERROR%28%27%20+%20error.code%20+%20%27%29%3A%20%27%20+%20error.message%29%3B%0A%20%20%20%20%7D%3B%0A%20%20%20%20%0A%60code%60%281%20%3A%20permission%20denied%2C%202%20%3A%20unavailable%2C%203%20%3A%20timeout%29%uC640%20%60message%60%28%uBB38%uC790%uC5F4%uB85C%20%uD45C%uD604%uB41C%20%uC5D0%uB7EC%20%uBA54%uC138%uC9C0%29%uB97C%20%uD504%uB85C%uD37C%uD2F0%uB85C%20%uAC00%uC9C4%uB2E4.&lt;/center&gt;
&lt;br /&gt;&lt;/en-note&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</description>
      <category>Develop</category>
      <category>API</category>
      <category>Browser</category>
      <category>Geolocation</category>
      <category>getCurrentPosition</category>
      <category>GPS</category>
      <category>html5</category>
      <category>IE</category>
      <category>IE 8</category>
      <category>navigator</category>
      <category>객체</category>
      <category>브라우저</category>
      <category>사파리</category>
      <category>크롬</category>
      <category>파이어폭스</category>
      <author>youngkyu.cho</author>
      <guid isPermaLink="true">https://youngkyu.tistory.com/31</guid>
      <comments>https://youngkyu.tistory.com/31#entry31comment</comments>
      <pubDate>Sat, 3 Jan 2015 03:48:16 +0900</pubDate>
    </item>
    <item>
      <title>워드프레스 설치 준비하기 - 우분투와 MariaDB, Apache, PHP와 함께.</title>
      <link>https://youngkyu.tistory.com/30</link>
      <description>&lt;en-note lang=&quot;v2&quot; style=&quot;line-height:1.6;&quot;&gt;&lt;del style=&quot;position:relative;display:block&quot;&gt;&lt;a style=&quot;position: absolute;color: #FFF;text-decoration: none;font-size: 12px;height: 25px;border-radius: 0;margin-top: -20px;right: 15px;background: rgba(0, 0, 0, 0);border-left: 10px solid #BB3A34;border-right: 10px solid #BB3A34;border-bottom: 5px solid rgba(0, 0, 0, 0);width: 0;text-indent:-100000px;&quot; href=&quot;http://marxi.co/#/?provider=evernote_int&amp;amp;guid=1cd0f057-edbf-4672-be51-9a434c23cc21&quot;&gt;Edit&lt;/a&gt;&lt;/del&gt;&lt;div style=&quot;line-height: 1.6; font-family: Helvetica Neue, Arial, Hiragino Sans GB, STHeiti, Microsoft YaHei, WenQuanYi Micro Hei, SimSun, Song, sans-serif;&quot;&gt;
&lt;h1 style=&quot;font-size: 36px; margin: 0.67em 0; font-family: inherit; font-weight: bold; line-height: 1.1; color: inherit; margin-top: 0px; margin-bottom: 20px;&quot;&gt;워드프레스 설치 준비하기 - 우분투와 MariaDB, Apache, PHP와 함께.&lt;/h1&gt;
&lt;hr style=&quot;-moz-box-sizing: content-box; box-sizing: content-box; height: 0; line-height: 1.6; margin-top: 20px; margin-bottom: 20px; border: 0; border-top: 1px solid rgba(102, 128, 153, 0.15);&quot;&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;최근 한 프로젝트를 진행하면서 빠르게 기본적인 웹 기능을 구현해 컨텐츠에 집중하기위해 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px; margin-top: 0px;&quot;&gt;워드프레스&lt;/code&gt;를 쓰기로 결정했다. 매력적인 녀석인 것 같다 정말. 놀라울 정도다. 단순한 블로그엔진이고 그게 끝인줄 알았는데, 확장성이 엄청난다. &lt;/p&gt;&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;쨋든 워드프레스를 써보기 위해 과거 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px; margin-top: 0px;&quot;&gt;php&lt;/code&gt;를 공부하며 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px;&quot;&gt;APM&lt;/code&gt;으로 초고속으로 윈도우에서 대충 구축했던 개발환경을 클라우드 원격 서버 개발 환경인 우분투에서 다시 해야했다. 이 과정을 쓰려고 한다.&lt;/p&gt;&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;하는 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px; margin-top: 0px;&quot;&gt;MariaDB&lt;/code&gt;를 사용해봐야지 하며 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px;&quot;&gt;아파치&lt;/code&gt;+&lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px;&quot;&gt;php&lt;/code&gt;+&lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px;&quot;&gt;MariaDB&lt;/code&gt;를 붙여 세팅했다. &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px;&quot;&gt;MySQL&lt;/code&gt;보다 속도가 좀 잘 나오는 것 같아서필자는 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px;&quot;&gt;MariaDB&lt;/code&gt;를 항상 쓰고 있다. 특별하게 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px;&quot;&gt;MySQL&lt;/code&gt;을 고집하는 누군가가 없는 이상.&lt;/p&gt;
&lt;hr style=&quot;-moz-box-sizing: content-box; box-sizing: content-box; height: 0; line-height: 1.6; margin-top: 20px; margin-bottom: 20px; border: 0; border-top: 1px solid rgba(102, 128, 153, 0.15);&quot;&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;em style=&quot;margin-top: 0px;&quot;&gt;누군가에겐 이 글이 도움이 되겠지?&lt;/em&gt;&lt;br /&gt;&lt;em&gt;시작해보자.&lt;/em&gt;&lt;/p&gt;
&lt;h2 style=&quot;font-family: inherit; font-weight: bold; line-height: 1.1; color: inherit; margin-top: 30px; margin-bottom: 20px; font-size: 30px;&quot;&gt;1. Apache 설치&lt;/h2&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;a href=&quot;http://www.apache.org&quot; target=&quot;_blank&quot; style=&quot;background: transparent; margin-top: 0px;&quot;&gt;Apache&lt;/a&gt;를 설치하자. 유명하니 설명이 필요없는 웹서버다. 아마 아직도 점유율 1등 웹서버일게다.&lt;/p&gt;
&lt;pre style=&quot;overflow: initial; font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 14px; display: block; padding: 0; margin: 0 0 10px; line-height: 1.6; word-break: break-all; word-wrap: break-word; color: #333333; background-color: #f5f5f5; border: none; border-radius: 0; white-space: pre-wrap;&quot;&gt;&lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: inherit; padding: 1em; color: #333; background-color: transparent; white-space: pre-wrap; border-radius: 0; display: block; background: #F6F6F6; margin-top: 0px;&quot;&gt;$ sudo apt-get &lt;span style=&quot;margin-top: 0px;&quot;&gt;&lt;span style=&quot;color: #333; font-weight: bold; margin-top: 0px;&quot;&gt;install&lt;/span&gt; apache2&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;우분투의 놀라운 패키지 툴 덕분에 우리는 이것만 치면 된다. 뭐라고 뜨면 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px; margin-top: 0px;&quot;&gt;Y&lt;/code&gt;를 치고 엔터.&lt;/p&gt;
&lt;h2 style=&quot;font-family: inherit; font-weight: bold; line-height: 1.1; color: inherit; margin-top: 30px; margin-bottom: 20px; font-size: 30px;&quot;&gt;2. MariaDB 설치&lt;/h2&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;필자는 &lt;a href=&quot;http://www.mariadb.com&quot; target=&quot;_blank&quot; style=&quot;background: transparent; margin-top: 0px;&quot;&gt;MariaDB&lt;/a&gt;를 설치하려 한다. &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px;&quot;&gt;MySQL&lt;/code&gt;과 완벽히 연동되면서도 더 나은 성능을 지니고 있다. 최근 오라클의 행보를 보면서 그나마 남아있던 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px;&quot;&gt;MySQL&lt;/code&gt;에 대한 애정이 식어버렸다.&lt;/p&gt;&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;얘는 근데 설치가 조금 복잡하다. 그래도 그냥 따라오면 금방한다.&lt;/p&gt;&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px; margin-top: 0px;&quot;&gt;MariaDB&lt;/code&gt; 설치에 관한 원문은 &lt;a href=&quot;https://mariadb.com/kb/en/mariadb/documentation/getting-started/binary-packages/installing-mariadb-deb-files/&quot; target=&quot;_blank&quot; style=&quot;background: transparent;&quot;&gt;여기&lt;/a&gt;로 가면 볼 수 있다. &lt;/p&gt;&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;근데 이건 뭐 그냥 자세한 설치에 관한 설명이고, 우리가 필요한건 &lt;a href=&quot;https://downloads.mariadb.org/mariadb/repositories/#mirror=kaist&amp;amp;distro=Ubuntu&amp;amp;distro_release=utopic&amp;amp;version=10.0&quot; target=&quot;_blank&quot; style=&quot;background: transparent; margin-top: 0px;&quot;&gt;이거&lt;/a&gt;다.&lt;/p&gt;&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;자신의 우분투 버전과 필요한 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px; margin-top: 0px;&quot;&gt;MariaDB&lt;/code&gt;버전을 보고 그 아래 명령을 줄줄이 치면된다.&lt;/p&gt;&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px; margin-top: 0px;&quot;&gt;Ubuntu14.04&lt;/code&gt;에 버전 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px;&quot;&gt;5.5&lt;/code&gt;를, 그리고 카이스트 서버에서 받아서 설치하고자 한다면 아래를 그대로 입력하면 된다.&lt;/p&gt;
&lt;pre style=&quot;overflow: initial; font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 14px; display: block; padding: 0; margin: 0 0 10px; line-height: 1.6; word-break: break-all; word-wrap: break-word; color: #333333; background-color: #f5f5f5; border: none; border-radius: 0; white-space: pre-wrap;&quot;&gt;&lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: inherit; padding: 1em; color: #333; background-color: transparent; white-space: pre-wrap; border-radius: 0; display: block; background: #F6F6F6; margin-top: 0px;&quot;&gt;$ sudo apt-get &lt;span style=&quot;margin-top: 0px;&quot;&gt;&lt;span style=&quot;color: #333; font-weight: bold; margin-top: 0px;&quot;&gt;install&lt;/span&gt; software-properties-common
$ sudo apt-&lt;span style=&quot;color: #333; font-weight: bold;&quot;&gt;key&lt;/span&gt; adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:&lt;span style=&quot;color: #099;&quot;&gt;80&lt;/span&gt; &lt;span style=&quot;color: #099;&quot;&gt;0xcbcb082a1bb943db&lt;/span&gt;
$ sudo &lt;span style=&quot;color: #333; font-weight: bold;&quot;&gt;add&lt;/span&gt;-apt-repository &lt;span style=&quot;color: #dd1144;&quot;&gt;'deb http://ftp.kaist.ac.kr/mariadb/repo/5.5/ubuntu trusty main'&lt;/span&gt;
$ sudo apt-&lt;span style=&quot;color: #333; font-weight: bold;&quot;&gt;get&lt;/span&gt; &lt;span style=&quot;color: #333; font-weight: bold;&quot;&gt;update&lt;/span&gt;
$ sudo apt-&lt;span style=&quot;color: #333; font-weight: bold;&quot;&gt;get&lt;/span&gt; &lt;span style=&quot;color: #333; font-weight: bold;&quot;&gt;install&lt;/span&gt; mariadb-&lt;span style=&quot;color: #333; font-weight: bold;&quot;&gt;server&lt;/span&gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;굿. 끝이다.&lt;/p&gt;
&lt;h2 style=&quot;font-family: inherit; font-weight: bold; line-height: 1.1; color: inherit; margin-top: 30px; margin-bottom: 20px; font-size: 30px;&quot;&gt;3. PHP 설치&lt;/h2&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;a href=&quot;http://www.php.net&quot; target=&quot;_blank&quot; style=&quot;background: transparent; margin-top: 0px;&quot;&gt;PHP&lt;/a&gt; 설치는 이 명령 한줄이면 끝이다.&lt;/p&gt;
&lt;pre style=&quot;overflow: initial; font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 14px; display: block; padding: 0; margin: 0 0 10px; line-height: 1.6; word-break: break-all; word-wrap: break-word; color: #333333; background-color: #f5f5f5; border: none; border-radius: 0; white-space: pre-wrap;&quot;&gt;&lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: inherit; padding: 1em; color: #333; background-color: transparent; white-space: pre-wrap; border-radius: 0; display: block; background: #F6F6F6; margin-top: 0px;&quot;&gt;$ apt-get &lt;span style=&quot;margin-top: 0px;&quot;&gt;&lt;span style=&quot;color: #333; font-weight: bold; margin-top: 0px;&quot;&gt;install&lt;/span&gt; php5-common php5 libapache2-&lt;span style=&quot;color: #333; font-weight: bold;&quot;&gt;mod&lt;/span&gt;-php5&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;이제 가장 기초적인 준비가 끝났다.&lt;/p&gt;
&lt;h2 style=&quot;font-family: inherit; font-weight: bold; line-height: 1.1; color: inherit; margin-top: 30px; margin-bottom: 20px; font-size: 30px;&quot;&gt;4. MariaDB와 PHP의 연동.&lt;/h2&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;둘을 연동 시키기 위해서는 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px; margin-top: 0px;&quot;&gt;php5-mysql&lt;/code&gt; 란 모듈이 필요하다. 설치하자. 설치만 하면된다.&lt;/p&gt;
&lt;pre style=&quot;overflow: initial; font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 14px; display: block; padding: 0; margin: 0 0 10px; line-height: 1.6; word-break: break-all; word-wrap: break-word; color: #333333; background-color: #f5f5f5; border: none; border-radius: 0; white-space: pre-wrap;&quot;&gt;&lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: inherit; padding: 1em; color: #333; background-color: transparent; white-space: pre-wrap; border-radius: 0; display: block; background: #F6F6F6; margin-top: 0px;&quot;&gt;apt-get &lt;span style=&quot;margin-top: 0px;&quot;&gt;&lt;span style=&quot;color: #333; font-weight: bold; margin-top: 0px;&quot;&gt;install&lt;/span&gt; php5-mysql&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;h2 style=&quot;font-family: inherit; font-weight: bold; line-height: 1.1; color: inherit; margin-top: 30px; margin-bottom: 20px; font-size: 30px;&quot;&gt;5. 재시작&lt;/h2&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;모든 것이 준비됐다. 설치되면 자동으로 각각이 실행된다. 따라서 추가적으로 설치해준 것들을 반영시켜주기위해 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px; margin-top: 0px;&quot;&gt;Apache&lt;/code&gt;와 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px;&quot;&gt;MariaDB&lt;/code&gt;를 재시작 시켜주어야 한다. &lt;/p&gt;&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;먼저 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px; margin-top: 0px;&quot;&gt;Apache&lt;/code&gt;를 재시작 시키자.&lt;/p&gt;
&lt;pre style=&quot;overflow: initial; font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 14px; display: block; padding: 0; margin: 0 0 10px; line-height: 1.6; word-break: break-all; word-wrap: break-word; color: #333333; background-color: #f5f5f5; border: none; border-radius: 0; white-space: pre-wrap;&quot;&gt;&lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: inherit; padding: 1em; color: #333; background-color: transparent; white-space: pre-wrap; border-radius: 0; display: block; background: #F6F6F6; margin-top: 0px;&quot;&gt;&lt;span style=&quot;color: #008080; margin-top: 0px;&quot;&gt;$ &lt;/span&gt;service apache2 restart
&lt;/code&gt;&lt;/pre&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;그리고 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px; margin-top: 0px;&quot;&gt;MariaDB&lt;/code&gt;를 재시작 시키자.&lt;br /&gt;이때 사용하는 명령어에 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px;&quot;&gt;mysql&lt;/code&gt;이 보이는 이유는, &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px;&quot;&gt;MariaDB&lt;/code&gt;가 호환성을 100%로 만들기 위해 모든 명령을 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px;&quot;&gt;mysql&lt;/code&gt;과 똑같이 했기 때문이다.&lt;/p&gt;
&lt;pre style=&quot;overflow: initial; font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 14px; display: block; padding: 0; margin: 0 0 10px; line-height: 1.6; word-break: break-all; word-wrap: break-word; color: #333333; background-color: #f5f5f5; border: none; border-radius: 0; white-space: pre-wrap;&quot;&gt;&lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: inherit; padding: 1em; color: #333; background-color: transparent; white-space: pre-wrap; border-radius: 0; display: block; background: #F6F6F6; margin-top: 0px;&quot;&gt;&lt;span style=&quot;color: #008080; margin-top: 0px;&quot;&gt;$ &lt;/span&gt;service mysql restart
&lt;/code&gt;&lt;/pre&gt;
&lt;h2 style=&quot;font-family: inherit; font-weight: bold; line-height: 1.1; color: inherit; margin-top: 30px; margin-bottom: 20px; font-size: 30px;&quot;&gt;6. 작동 확인&lt;/h2&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;이제 모든 것이 설치됐고 다 끝났다. 정말 잘 연동되고 실행되고 설치됐는지 확인해볼 차례다.&lt;/p&gt;&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;아파치의 루트로 가자.&lt;/p&gt;
&lt;pre style=&quot;overflow: initial; font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 14px; display: block; padding: 0; margin: 0 0 10px; line-height: 1.6; word-break: break-all; word-wrap: break-word; color: #333333; background-color: #f5f5f5; border: none; border-radius: 0; white-space: pre-wrap;&quot;&gt;&lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: inherit; padding: 1em; color: #333; background-color: transparent; white-space: pre-wrap; border-radius: 0; display: block; background: #F6F6F6; margin-top: 0px;&quot;&gt;$ cd /&lt;span style=&quot;color: #333; font-weight: bold; margin-top: 0px;&quot;&gt;var&lt;/span&gt;/www
&lt;/code&gt;&lt;/pre&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;그리고 거기에 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px; margin-top: 0px;&quot;&gt;html&lt;/code&gt;폴더로 들어간다.&lt;/p&gt;
&lt;pre style=&quot;overflow: initial; font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 14px; display: block; padding: 0; margin: 0 0 10px; line-height: 1.6; word-break: break-all; word-wrap: break-word; color: #333333; background-color: #f5f5f5; border: none; border-radius: 0; white-space: pre-wrap;&quot;&gt;&lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: inherit; padding: 1em; color: #333; background-color: transparent; white-space: pre-wrap; border-radius: 0; display: block; background: #F6F6F6; margin-top: 0px;&quot;&gt;$ &lt;span style=&quot;color: #0086b3; margin-top: 0px;&quot;&gt;cd&lt;/span&gt; html
&lt;/code&gt;&lt;/pre&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;그리고 거기에 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px; margin-top: 0px;&quot;&gt;test.php&lt;/code&gt;를 만들자. 이걸 요청해 보면 전체가 제대로 설치됐는지 알 수 있다. 아래는 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px;&quot;&gt;test.php&lt;/code&gt;코드다. 복붙하라.&lt;/p&gt;
&lt;pre style=&quot;overflow: initial; font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 14px; display: block; padding: 0; margin: 0 0 10px; line-height: 1.6; word-break: break-all; word-wrap: break-word; color: #333333; background-color: #f5f5f5; border: none; border-radius: 0; white-space: pre-wrap;&quot;&gt;&lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: inherit; padding: 1em; color: #333; background-color: transparent; white-space: pre-wrap; border-radius: 0; display: block; background: #F6F6F6; margin-top: 0px;&quot;&gt;&lt;span style=&quot;margin-top: 0px;&quot;&gt;&lt;span style=&quot;color: #999; font-weight: bold; margin-top: 0px;&quot;&gt;&amp;lt;?php&lt;/span&gt;
    phpinfo();
&lt;span style=&quot;color: #999; font-weight: bold;&quot;&gt;?&amp;gt;&lt;/span&gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;그리고 우리는 브라우저에서 확인해보면된다.&lt;/p&gt;&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;이 작업을 한 서버 IP주소가 1.2.3.4 라고 가정하면, 브라우저 주소창에&lt;/p&gt;
&lt;pre style=&quot;overflow: initial; font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 14px; display: block; padding: 0; margin: 0 0 10px; line-height: 1.6; word-break: break-all; word-wrap: break-word; color: #333333; background-color: #f5f5f5; border: none; border-radius: 0; white-space: pre-wrap;&quot;&gt;&lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: inherit; padding: 1em; color: #333; background-color: transparent; white-space: pre-wrap; border-radius: 0; display: block; background: #F6F6F6; margin-top: 0px;&quot;&gt;http:&lt;span style=&quot;color: #998; font-style: italic; margin-top: 0px;&quot;&gt;//1.2.3.4/test.php&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;라고 요청하면 된다. 도메인이라면,&lt;/p&gt;
&lt;pre style=&quot;overflow: initial; font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 14px; display: block; padding: 0; margin: 0 0 10px; line-height: 1.6; word-break: break-all; word-wrap: break-word; color: #333333; background-color: #f5f5f5; border: none; border-radius: 0; white-space: pre-wrap;&quot;&gt;&lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: inherit; padding: 1em; color: #333; background-color: transparent; white-space: pre-wrap; border-radius: 0; display: block; background: #F6F6F6; margin-top: 0px;&quot;&gt;http:&lt;span style=&quot;color: #998; font-style: italic; margin-top: 0px;&quot;&gt;//example.com/test.php&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;이런식으로 하면 된다.&amp;nbsp;&lt;/p&gt;&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;margin: 0px 0px 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word; text-align: center; clear: none; float: none;&quot;&gt;&lt;span class=&quot;imageblock&quot; style=&quot;display: inline-block; width: 700px;  height: auto; max-width: 100%;&quot;&gt;&lt;img src=&quot;https://t1.daumcdn.net/cfile/tistory/2113903C54A3006F35&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Ft1.daumcdn.net%2Fcfile%2Ftistory%2F2113903C54A3006F35&quot; width=&quot;700&quot; height=&quot;369&quot; filename=&quot;캡처1.PNG&quot; filemime=&quot;image/jpeg&quot; style=&quot;&quot;/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;제대로 뭔가 보라색 테이블이 나오면 쭉 내려서 &lt;strong style=&quot;font-weight: bold; margin-top: 0px;&quot;&gt;mysql&lt;/strong&gt;이라는 제목을 찾아라.&lt;/p&gt;&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;거기에 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px; margin-top: 0px;&quot;&gt;MariaDB&lt;/code&gt;라는 단어가 보인다면 연동도 잘 된 것이다.&lt;/p&gt;
&lt;/div&gt;
&lt;center style=&quot;display:none&quot;&gt;%23%uC6CC%uB4DC%uD504%uB808%uC2A4%20%uC124%uCE58%20%uC900%uBE44%uD558%uAE30%20-%20%uC6B0%uBD84%uD22C%uC640%20MariaDB%2C%20Apache%2C%20PHP%uC640%20%uD568%uAED8.%0A%0A---%0A%0A%uCD5C%uADFC%20%uD55C%20%uD504%uB85C%uC81D%uD2B8%uB97C%20%uC9C4%uD589%uD558%uBA74%uC11C%20%uBE60%uB974%uAC8C%20%uAE30%uBCF8%uC801%uC778%20%uC6F9%20%uAE30%uB2A5%uC744%20%uAD6C%uD604%uD574%20%uCEE8%uD150%uCE20%uC5D0%20%uC9D1%uC911%uD558%uAE30%uC704%uD574%20%60%uC6CC%uB4DC%uD504%uB808%uC2A4%60%uB97C%20%uC4F0%uAE30%uB85C%20%uACB0%uC815%uD588%uB2E4.%20%uB9E4%uB825%uC801%uC778%20%uB140%uC11D%uC778%20%uAC83%20%uAC19%uB2E4%20%uC815%uB9D0.%20%uB180%uB77C%uC6B8%20%uC815%uB3C4%uB2E4.%20%uB2E8%uC21C%uD55C%20%uBE14%uB85C%uADF8%uC5D4%uC9C4%uC774%uACE0%20%uADF8%uAC8C%20%uB05D%uC778%uC904%20%uC54C%uC558%uB294%uB370%2C%20%uD655%uC7A5%uC131%uC774%20%uC5C4%uCCAD%uB09C%uB2E4.%20%0A%0A%uCA0B%uB4E0%20%uC6CC%uB4DC%uD504%uB808%uC2A4%uB97C%20%uC368%uBCF4%uAE30%20%uC704%uD574%20%uACFC%uAC70%20%60php%60%uB97C%20%uACF5%uBD80%uD558%uBA70%20%60APM%60%uC73C%uB85C%20%uCD08%uACE0%uC18D%uC73C%uB85C%20%uC708%uB3C4%uC6B0%uC5D0%uC11C%20%uB300%uCDA9%20%uAD6C%uCD95%uD588%uB358%20%uAC1C%uBC1C%uD658%uACBD%uC744%20%uD074%uB77C%uC6B0%uB4DC%20%uC6D0%uACA9%20%uC11C%uBC84%20%uAC1C%uBC1C%20%uD658%uACBD%uC778%20%uC6B0%uBD84%uD22C%uC5D0%uC11C%20%uB2E4%uC2DC%20%uD574%uC57C%uD588%uB2E4.%20%uC774%20%uACFC%uC815%uC744%20%uC4F0%uB824%uACE0%20%uD55C%uB2E4.%0A%0A%uD558%uB294%20%60MariaDB%60%uB97C%20%uC0AC%uC6A9%uD574%uBD10%uC57C%uC9C0%20%uD558%uBA70%20%60%uC544%uD30C%uCE58%60+%60php%60+%60MariaDB%60%uB97C%20%uBD99%uC5EC%20%uC138%uD305%uD588%uB2E4.%20%60MySQL%60%uBCF4%uB2E4%20%uC18D%uB3C4%uAC00%20%uC880%20%uC798%20%uB098%uC624%uB294%20%uAC83%20%uAC19%uC544%uC11C%uD544%uC790%uB294%20%60MariaDB%60%uB97C%20%uD56D%uC0C1%20%uC4F0%uACE0%20%uC788%uB2E4.%20%uD2B9%uBCC4%uD558%uAC8C%20%60MySQL%60%uC744%20%uACE0%uC9D1%uD558%uB294%20%uB204%uAD70%uAC00%uAC00%20%uC5C6%uB294%20%uC774%uC0C1.%0A%0A---%0A%0A*%uB204%uAD70%uAC00%uC5D0%uAC90%20%uC774%20%uAE00%uC774%20%uB3C4%uC6C0%uC774%20%uB418%uACA0%uC9C0%3F*%0A*%uC2DC%uC791%uD574%uBCF4%uC790.*%0A%0A%23%23%201.%20Apache%20%uC124%uCE58%0A%0A%5BApache%5D%28http%3A//www.apache.org%29%uB97C%20%uC124%uCE58%uD558%uC790.%20%uC720%uBA85%uD558%uB2C8%20%uC124%uBA85%uC774%20%uD544%uC694%uC5C6%uB294%20%uC6F9%uC11C%uBC84%uB2E4.%20%uC544%uB9C8%20%uC544%uC9C1%uB3C4%20%uC810%uC720%uC728%201%uB4F1%20%uC6F9%uC11C%uBC84%uC77C%uAC8C%uB2E4.%0A%0A%20%20%20%20%24%20sudo%20apt-get%20install%20apache2%0A%20%20%20%20%0A%uC6B0%uBD84%uD22C%uC758%20%uB180%uB77C%uC6B4%20%uD328%uD0A4%uC9C0%20%uD234%20%uB355%uBD84%uC5D0%20%uC6B0%uB9AC%uB294%20%uC774%uAC83%uB9CC%20%uCE58%uBA74%20%uB41C%uB2E4.%20%uBB50%uB77C%uACE0%20%uB728%uBA74%20%60Y%60%uB97C%20%uCE58%uACE0%20%uC5D4%uD130.%0A%0A%23%23%202.%20MariaDB%20%uC124%uCE58%0A%0A%uD544%uC790%uB294%20%5BMariaDB%5D%28http%3A//www.mariadb.com%29%uB97C%20%uC124%uCE58%uD558%uB824%20%uD55C%uB2E4.%20%60MySQL%60%uACFC%20%uC644%uBCBD%uD788%20%uC5F0%uB3D9%uB418%uBA74%uC11C%uB3C4%20%uB354%20%uB098%uC740%20%uC131%uB2A5%uC744%20%uC9C0%uB2C8%uACE0%20%uC788%uB2E4.%20%uCD5C%uADFC%20%uC624%uB77C%uD074%uC758%20%uD589%uBCF4%uB97C%20%uBCF4%uBA74%uC11C%20%uADF8%uB098%uB9C8%20%uB0A8%uC544%uC788%uB358%20%60MySQL%60%uC5D0%20%uB300%uD55C%20%uC560%uC815%uC774%20%uC2DD%uC5B4%uBC84%uB838%uB2E4.%0A%0A%uC598%uB294%20%uADFC%uB370%20%uC124%uCE58%uAC00%20%uC870%uAE08%20%uBCF5%uC7A1%uD558%uB2E4.%20%uADF8%uB798%uB3C4%20%uADF8%uB0E5%20%uB530%uB77C%uC624%uBA74%20%uAE08%uBC29%uD55C%uB2E4.%0A%0A%60MariaDB%60%20%uC124%uCE58%uC5D0%20%uAD00%uD55C%20%uC6D0%uBB38%uC740%20%5B%uC5EC%uAE30%5D%28https%3A//mariadb.com/kb/en/mariadb/documentation/getting-started/binary-packages/installing-mariadb-deb-files/%29%uB85C%20%uAC00%uBA74%20%uBCFC%20%uC218%20%uC788%uB2E4.%20%0A%0A%uADFC%uB370%20%uC774%uAC74%20%uBB50%20%uADF8%uB0E5%20%uC790%uC138%uD55C%20%uC124%uCE58%uC5D0%20%uAD00%uD55C%20%uC124%uBA85%uC774%uACE0%2C%20%uC6B0%uB9AC%uAC00%20%uD544%uC694%uD55C%uAC74%20%5B%uC774%uAC70%5D%28https%3A//downloads.mariadb.org/mariadb/repositories/%23mirror%3Dkaist%26distro%3DUbuntu%26distro_release%3Dutopic%26version%3D10.0%29%uB2E4.%0A%0A%uC790%uC2E0%uC758%20%uC6B0%uBD84%uD22C%20%uBC84%uC804%uACFC%20%uD544%uC694%uD55C%20%60MariaDB%60%uBC84%uC804%uC744%20%uBCF4%uACE0%20%uADF8%20%uC544%uB798%20%uBA85%uB839%uC744%20%uC904%uC904%uC774%20%uCE58%uBA74%uB41C%uB2E4.%0A%0A%60Ubuntu14.04%60%uC5D0%20%uBC84%uC804%20%605.5%60%uB97C%2C%20%uADF8%uB9AC%uACE0%20%uCE74%uC774%uC2A4%uD2B8%20%uC11C%uBC84%uC5D0%uC11C%20%uBC1B%uC544%uC11C%20%uC124%uCE58%uD558%uACE0%uC790%20%uD55C%uB2E4%uBA74%20%uC544%uB798%uB97C%20%uADF8%uB300%uB85C%20%uC785%uB825%uD558%uBA74%20%uB41C%uB2E4.%0A%0A%20%20%20%20%24%20sudo%20apt-get%20install%20software-properties-common%0A%20%20%20%20%24%20sudo%20apt-key%20adv%20--recv-keys%20--keyserver%20hkp%3A//keyserver.ubuntu.com%3A80%200xcbcb082a1bb943db%0A%20%20%20%20%24%20sudo%20add-apt-repository%20%27deb%20http%3A//ftp.kaist.ac.kr/mariadb/repo/5.5/ubuntu%20trusty%20main%27%0A%20%20%20%20%24%20sudo%20apt-get%20update%0A%20%20%20%20%24%20sudo%20apt-get%20install%20mariadb-server%0A%0A%uAD7F.%20%uB05D%uC774%uB2E4.%0A%0A%23%233.%20PHP%20%uC124%uCE58%0A%0A%5BPHP%5D%28http%3A//www.php.net%29%20%uC124%uCE58%uB294%20%uC774%20%uBA85%uB839%20%uD55C%uC904%uC774%uBA74%20%uB05D%uC774%uB2E4.%0A%0A%20%20%20%20%24%20apt-get%20install%20php5-common%20php5%20libapache2-mod-php5%0A%20%20%20%20%0A%uC774%uC81C%20%uAC00%uC7A5%20%uAE30%uCD08%uC801%uC778%20%uC900%uBE44%uAC00%20%uB05D%uB0AC%uB2E4.%0A%0A%23%234.%20MariaDB%uC640%20PHP%uC758%20%uC5F0%uB3D9.%0A%0A%uB458%uC744%20%uC5F0%uB3D9%20%uC2DC%uD0A4%uAE30%20%uC704%uD574%uC11C%uB294%20%60php5-mysql%60%20%uB780%20%uBAA8%uB4C8%uC774%20%uD544%uC694%uD558%uB2E4.%20%uC124%uCE58%uD558%uC790.%20%uC124%uCE58%uB9CC%20%uD558%uBA74%uB41C%uB2E4.%0A%0A%20%20%20%20apt-get%20install%20php5-mysql%0A%20%20%20%20%0A%23%235.%20%uC7AC%uC2DC%uC791%0A%0A%uBAA8%uB4E0%20%uAC83%uC774%20%uC900%uBE44%uB410%uB2E4.%20%uC124%uCE58%uB418%uBA74%20%uC790%uB3D9%uC73C%uB85C%20%uAC01%uAC01%uC774%20%uC2E4%uD589%uB41C%uB2E4.%20%uB530%uB77C%uC11C%20%uCD94%uAC00%uC801%uC73C%uB85C%20%uC124%uCE58%uD574%uC900%20%uAC83%uB4E4%uC744%20%uBC18%uC601%uC2DC%uCF1C%uC8FC%uAE30%uC704%uD574%20%60Apache%60%uC640%20%60MariaDB%60%uB97C%20%uC7AC%uC2DC%uC791%20%uC2DC%uCF1C%uC8FC%uC5B4%uC57C%20%uD55C%uB2E4.%20%0A%0A%uBA3C%uC800%20%60Apache%60%uB97C%20%uC7AC%uC2DC%uC791%20%uC2DC%uD0A4%uC790.%0A%0A%20%20%20%20%24%20service%20apache2%20restart%0A%20%20%20%20%0A%uADF8%uB9AC%uACE0%20%60MariaDB%60%uB97C%20%uC7AC%uC2DC%uC791%20%uC2DC%uD0A4%uC790.%0A%uC774%uB54C%20%uC0AC%uC6A9%uD558%uB294%20%uBA85%uB839%uC5B4%uC5D0%20%60mysql%60%uC774%20%uBCF4%uC774%uB294%20%uC774%uC720%uB294%2C%20%60MariaDB%60%uAC00%20%uD638%uD658%uC131%uC744%20100%25%uB85C%20%uB9CC%uB4E4%uAE30%20%uC704%uD574%20%uBAA8%uB4E0%20%uBA85%uB839%uC744%20%60mysql%60%uACFC%20%uB611%uAC19%uC774%20%uD588%uAE30%20%uB54C%uBB38%uC774%uB2E4.%0A%0A%20%20%20%20%24%20service%20mysql%20restart%0A%20%20%20%20%0A%23%236.%20%uC791%uB3D9%20%uD655%uC778%0A%0A%uC774%uC81C%20%uBAA8%uB4E0%20%uAC83%uC774%20%uC124%uCE58%uB410%uACE0%20%uB2E4%20%uB05D%uB0AC%uB2E4.%20%uC815%uB9D0%20%uC798%20%uC5F0%uB3D9%uB418%uACE0%20%uC2E4%uD589%uB418%uACE0%20%uC124%uCE58%uB410%uB294%uC9C0%20%uD655%uC778%uD574%uBCFC%20%uCC28%uB840%uB2E4.%0A%0A%uC544%uD30C%uCE58%uC758%20%uB8E8%uD2B8%uB85C%20%uAC00%uC790.%0A%0A%20%20%20%20%24%20cd%20/var/www%0A%20%20%20%20%0A%uADF8%uB9AC%uACE0%20%uAC70%uAE30%uC5D0%20%60html%60%uD3F4%uB354%uB85C%20%uB4E4%uC5B4%uAC04%uB2E4.%0A%0A%20%20%20%20%24%20cd%20html%0A%20%20%20%20%0A%uADF8%uB9AC%uACE0%20%uAC70%uAE30%uC5D0%20%60test.php%60%uB97C%20%uB9CC%uB4E4%uC790.%20%uC774%uAC78%20%uC694%uCCAD%uD574%20%uBCF4%uBA74%20%uC804%uCCB4%uAC00%20%uC81C%uB300%uB85C%20%uC124%uCE58%uB410%uB294%uC9C0%20%uC54C%20%uC218%20%uC788%uB2E4.%20%uC544%uB798%uB294%20%60test.php%60%uCF54%uB4DC%uB2E4.%20%uBCF5%uBD99%uD558%uB77C.%0A%0A%20%20%20%20%3C%3Fphp%0A%20%20%20%20%20%20%20%20phpinfo%28%29%3B%0A%20%20%20%20%3F%3E%0A%20%20%20%20%0A%uADF8%uB9AC%uACE0%20%uC6B0%uB9AC%uB294%20%uBE0C%uB77C%uC6B0%uC800%uC5D0%uC11C%20%uD655%uC778%uD574%uBCF4%uBA74%uB41C%uB2E4.%0A%0A%uC774%20%uC791%uC5C5%uC744%20%uD55C%20%uC11C%uBC84%20IP%uC8FC%uC18C%uAC00%201.2.3.4%20%uB77C%uACE0%20%uAC00%uC815%uD558%uBA74%2C%20%uBE0C%uB77C%uC6B0%uC800%20%uC8FC%uC18C%uCC3D%uC5D0%0A%0A%20%20%20%20http%3A//1.2.3.4/test.php%0A%20%20%20%20%0A%uB77C%uACE0%20%uC694%uCCAD%uD558%uBA74%20%uB41C%uB2E4.%20%uB3C4%uBA54%uC778%uC774%uB77C%uBA74%2C%0A%0A%0A%20%20%20%20http%3A//example.com/test.php%0A%20%20%20%20%0A%uC774%uB7F0%uC2DD%uC73C%uB85C%20%uD558%uBA74%20%uB41C%uB2E4.%20%uC81C%uB300%uB85C%20%uBB54%uAC00%20%uBCF4%uB77C%uC0C9%20%uD14C%uC774%uBE14%uC774%20%uB098%uC624%uBA74%20%uCB49%20%uB0B4%uB824%uC11C%20**mysql**%uC774%uB77C%uB294%20%uC81C%uBAA9%uC744%20%uCC3E%uC544%uB77C.%0A%0A%uAC70%uAE30%uC5D0%20%60MariaDB%60%uB77C%uB294%20%uB2E8%uC5B4%uAC00%20%uBCF4%uC778%uB2E4%uBA74%20%uC5F0%uB3D9%uB3C4%20%uC798%20%uB41C%20%uAC83%uC774%uB2E4.&lt;/center&gt;
&lt;br /&gt;&lt;/en-note&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</description>
      <category>Develop</category>
      <category>apache</category>
      <category>APM</category>
      <category>mariadb</category>
      <category>MySQL</category>
      <category>php</category>
      <category>ubuntu</category>
      <category>마리아DB</category>
      <category>아파치</category>
      <category>우분투</category>
      <category>워드프레스</category>
      <author>youngkyu.cho</author>
      <guid isPermaLink="true">https://youngkyu.tistory.com/30</guid>
      <comments>https://youngkyu.tistory.com/30#entry30comment</comments>
      <pubDate>Wed, 31 Dec 2014 04:02:50 +0900</pubDate>
    </item>
    <item>
      <title>린 스타트업으로 스타트업 시작하기. - 2 / 3가지의 원칙을 만들자. / 린 캔버스</title>
      <link>https://youngkyu.tistory.com/29</link>
      <description>&lt;en-note lang=&quot;v2&quot; style=&quot;line-height:1.6;&quot;&gt;&lt;del style=&quot;position:relative;display:block&quot;&gt;&lt;a style=&quot;position: absolute;color: #FFF;text-decoration: none;font-size: 12px;height: 25px;border-radius: 0;margin-top: -20px;right: 15px;background: rgba(0, 0, 0, 0);border-left: 10px solid #BB3A34;border-right: 10px solid #BB3A34;border-bottom: 5px solid rgba(0, 0, 0, 0);width: 0;text-indent:-100000px;&quot; href=&quot;http://marxi.co/#/?provider=evernote_int&amp;amp;guid=54ad242b-7122-4a71-933d-8a8e14af0dc5&quot;&gt;Edit&lt;/a&gt;&lt;/del&gt;&lt;div style=&quot;line-height: 1.6; font-family: Helvetica Neue, Arial, Hiragino Sans GB, STHeiti, Microsoft YaHei, WenQuanYi Micro Hei, SimSun, Song, sans-serif;&quot;&gt;
&lt;h1 style=&quot;font-size: 36px; margin: 0.67em 0; font-family: inherit; font-weight: bold; line-height: 1.1; color: inherit; margin-top: 0px; margin-bottom: 20px;&quot;&gt;린 스타트업으로 스타트업 시작하기. - 2&lt;/h1&gt;
&lt;h3 style=&quot;font-family: inherit; font-weight: bold; line-height: 1.1; color: inherit; margin-top: 30px; margin-bottom: 20px; font-size: 24px;&quot;&gt;3가지의 원칙을 만들자.&lt;/h3&gt;
&lt;hr style=&quot;-moz-box-sizing: content-box; box-sizing: content-box; height: 0; line-height: 1.6; margin-top: 20px; margin-bottom: 20px; border: 0; border-top: 1px solid rgba(102, 128, 153, 0.15);&quot;&gt;
&lt;h3 style=&quot;font-family: inherit; font-weight: bold; line-height: 1.1; color: inherit; margin-top: 30px; margin-bottom: 20px; font-size: 24px;&quot;&gt;포스팅 전에.&lt;/h3&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;먼저 포스팅 전에 확실히 해 둘 것이 있다. 필자는 스타트업을 진행하며 린 스타트업 프로세스를 따르려한다. 이에 교과서가 필요했고, &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px; margin-top: 0px;&quot;&gt;한빛 미디어&lt;/code&gt;의 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px;&quot;&gt;오라일리&lt;/code&gt; 번역서인 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px;&quot;&gt;RUNNING LEAN:린 스타트업&lt;/code&gt;를 선택해 공부하고 있다. 이 포스팅은 개인적 공부의 흔적이며, 해당 책의 순서를 따르지만, 필자가 이해한대로 재 기술해 내용은 동일하지 않다.&lt;/p&gt;
&lt;hr style=&quot;-moz-box-sizing: content-box; box-sizing: content-box; height: 0; line-height: 1.6; margin-top: 20px; margin-bottom: 20px; border: 0; border-top: 1px solid rgba(102, 128, 153, 0.15);&quot;&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;린 경영의 중요한 개념들을 짚어봤다. 이제 린 경영을 실천할 수 있는 핵심 문장으로 만나보자.&lt;/p&gt;
&lt;h2 style=&quot;font-family: inherit; font-weight: bold; line-height: 1.1; color: inherit; margin-top: 30px; margin-bottom: 20px; font-size: 30px;&quot;&gt;린 경영의 핵심.&lt;/h2&gt;
&lt;h3 style=&quot;font-family: inherit; font-weight: bold; line-height: 1.1; color: inherit; margin-top: 30px; margin-bottom: 20px; font-size: 24px;&quot;&gt;1. 플랜 A의 문서화&lt;/h3&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;불행히도 당신의 첫 플랜이었던 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px; margin-top: 0px;&quot;&gt;플랜 A&lt;/code&gt;는 생각보다 훨씬 적절치 못하다. 혼자 믿는 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px;&quot;&gt;신념&lt;/code&gt;따위가 아닌 명확한 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px;&quot;&gt;사실&lt;/code&gt;에 기반해 확실한 목표와 분명한 취지를 세워야한다. 이것만이 충분히 강한 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px;&quot;&gt;비전&lt;/code&gt;이 될 수 있다. 문서화는 그를 위한 시작이다.&lt;/p&gt;
&lt;h4 style=&quot;font-family: inherit; font-weight: bold; line-height: 1.1; color: inherit; margin-top: 25px; margin-bottom: 15px; font-size: 18px;&quot;&gt;사업 모델이 바탕으로 하는 가설은?&lt;/h4&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;대부분의 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px; margin-top: 0px;&quot;&gt;플랜 A&lt;/code&gt;는 형편이 없다. 아마 엄청나게 많은 허무맹랑한 가설이 뒷받침 된 상태에서 생각된 사업 모델일 것이기 때문이다.&lt;/p&gt;&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;우리는 현실을 왜곡 시켜 생각하는 경우가 많다. 우리가 생각한 아이디어를 보호하기 위한 무의식적인 반응이다. 따라서 이것들을 걷어내기 위해 우리는 타인과 이야기해야한다. 많이 부딧혀서 왜곡을 걷어내야한다. 그러기 위해서 문서화는 필수다.&lt;/p&gt;
&lt;h4 style=&quot;font-family: inherit; font-weight: bold; line-height: 1.1; color: inherit; margin-top: 25px; margin-bottom: 15px; font-size: 18px;&quot;&gt;융통성있게 린 캔버스 활용하기.&lt;/h4&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;고작 타인과 이야기 한번 나누기위해 60장의 사업계획서는 낭비다. 상대는 읽어줄 생각도 없을 것이고, 나는 힘들 것이 분명하니까. 따라서 린 캔버스로 간단히 나타내는 것은 매우 효율적이다. 모든 것이 표현되면서 한눈에 들어오니 말이다.&lt;/p&gt;&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;margin: 0px 0px 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word; text-align: center; clear: none; float: none;&quot;&gt;&lt;span class=&quot;imageblock&quot; style=&quot;display: inline-block; width: 600px;  height: auto; max-width: 100%;&quot;&gt;&lt;img src=&quot;https://t1.daumcdn.net/cfile/tistory/2754283354944D3A2D&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Ft1.daumcdn.net%2Fcfile%2Ftistory%2F2754283354944D3A2D&quot; width=&quot;600&quot; height=&quot;511&quot; filename=&quot;1350435571@001.jpg&quot; filemime=&quot;image/jpeg&quot;/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;h4 style=&quot;font-family: inherit; font-weight: bold; line-height: 1.1; color: inherit; margin-top: 25px; margin-bottom: 15px; font-size: 18px;&quot;&gt;만들어야 할 것은 사업모델.&lt;/h4&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;만들어야 할 것은 제품이 아니다. 저 캔버스의 모든 요소들, 즉 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px; margin-top: 0px;&quot;&gt;사업 모델&lt;/code&gt;이다. 고객은 여러분의 솔루션엔 관심이 없다. 오직 자신의 문제에만 관심이 있다. 따라서 솔루션에 지나치게 시간을 소모해서는 안된다. 모든 요소 전체가 충분한 검토를 만나야한다.&lt;/p&gt;&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;이 모든 사업모델을 하나하나 정복해 나가는 것이 바로 우리의 일인 것이다.&lt;/p&gt;
&lt;h2 style=&quot;font-family: inherit; font-weight: bold; line-height: 1.1; color: inherit; margin-top: 30px; margin-bottom: 20px; font-size: 30px;&quot;&gt;2. 사업 계획의 위험부분을 찾아라.&lt;/h2&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;가장 위험한 부분을 찾아내라. 그리고 먼저 다뤄라. 그러나 아마 대부분의 스타트업에서 가장 큰 위험을 안고 있는 부분은 아마&lt;/p&gt;&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;em style=&quot;margin-top: 0px;&quot;&gt;아무도 원하지 않는 것을 만드는 것&lt;/em&gt;&lt;/p&gt;&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;일 것이다.&lt;/p&gt;
&lt;h3 style=&quot;font-family: inherit; font-weight: bold; line-height: 1.1; color: inherit; margin-top: 30px; margin-bottom: 20px; font-size: 24px;&quot;&gt;스타트업의 3단계 프로세스&lt;/h3&gt;
&lt;ol style=&quot;margin-top: 0; margin-bottom: 10px; line-height: 1.6;&quot;&gt;
&lt;li style=&quot;line-height: 1.6; margin-top: 0px;&quot;&gt;문제와 솔루션에 대한 적합성 검증을 거치고 제품을 개발해 &lt;/li&gt;
&lt;li style=&quot;line-height: 1.6;&quot;&gt;제품과 시장에 대한 적합성 검증을 거치고,&lt;/li&gt;
&lt;li style=&quot;line-height: 1.6;&quot;&gt;규모를 확장해 나가야 한다.&lt;/li&gt;
&lt;/ol&gt;
&lt;h4 style=&quot;font-family: inherit; font-weight: bold; line-height: 1.1; color: inherit; margin-top: 25px; margin-bottom: 15px; font-size: 18px;&quot;&gt;1. 문제/솔루션의 적합성&lt;/h4&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;어떤 문제가 해결할 가치가 있는지를 판단해야한다. 그것을 판단하려면 다음과 같은 세가지 질문에 명확히 답변을 해보면 된다.&lt;/p&gt;
&lt;ul style=&quot;margin-top: 0; margin-bottom: 10px; line-height: 1.6;&quot;&gt;
&lt;li style=&quot;line-height: 1.6; margin-top: 0px;&quot;&gt;고객이 원하는 것인가? (&lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px; margin-top: 0px;&quot;&gt;필수성&lt;/code&gt;)&lt;/li&gt;
&lt;li style=&quot;line-height: 1.6;&quot;&gt;고객이 돈을 내고 구입할 것인가? 그렇지 않다면 누가 구입할 것인가? (&lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px; margin-top: 0px;&quot;&gt;실효성&lt;/code&gt;)&lt;/li&gt;
&lt;li style=&quot;line-height: 1.6;&quot;&gt;문제를 해결 할 수 있을 것인가? (&lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px; margin-top: 0px;&quot;&gt;실현가능성&lt;/code&gt;)&lt;/li&gt;
&lt;/ul&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;이것으로 부터 문제를 해결하기 위한 최소 기능 집합을 도출해 낼 수 있을 것이다. 그것을 모아 product를 만든 것을 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px; margin-top: 0px;&quot;&gt;MVP&lt;/code&gt;(Minimum Viable Product)라 한다.&lt;/p&gt;
&lt;h4 style=&quot;font-family: inherit; font-weight: bold; line-height: 1.1; color: inherit; margin-top: 25px; margin-bottom: 15px; font-size: 18px;&quot;&gt;2. 제품/시장의 적합성&lt;/h4&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;이것에 대한 질문은 하나다.&lt;/p&gt;
&lt;ul style=&quot;margin-top: 0; margin-bottom: 10px; line-height: 1.6;&quot;&gt;
&lt;li style=&quot;line-height: 1.6; margin-top: 0px;&quot;&gt;사람들이 원하는 솔루션을 개발하는가?&lt;/li&gt;
&lt;/ul&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;개발한 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px; margin-top: 0px;&quot;&gt;MVP&lt;/code&gt;가 얼마나 잘 문제를 해결하는가, 즉 그것이 사람들이 원하는 것인가에 대한 물음이다. 이 단계까지 도달하면 아마 스타트업은 고객을 유치하고 유지하며 매출을 확보해 낼 것이다. 그리고 나면 마지막 확장이다.&lt;/p&gt;
&lt;h4 style=&quot;font-family: inherit; font-weight: bold; line-height: 1.1; color: inherit; margin-top: 25px; margin-bottom: 15px; font-size: 18px;&quot;&gt;3. 규모의 확장&lt;/h4&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;이것은 성장에 관한 것이다.&lt;/p&gt;
&lt;ul style=&quot;margin-top: 0; margin-bottom: 10px; line-height: 1.6;&quot;&gt;
&lt;li style=&quot;line-height: 1.6; margin-top: 0px;&quot;&gt;어떻게 성장을 가속화 할 것인가?&lt;/li&gt;
&lt;/ul&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;일정 수준의 성공은 보장되었다. 이제 성장해야한다. &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px; margin-top: 0px;&quot;&gt;사업 모델&lt;/code&gt;의 초첨은 지금부터는 규모의 확장인 것이다.&lt;/p&gt;
&lt;h4 style=&quot;font-family: inherit; font-weight: bold; line-height: 1.1; color: inherit; margin-top: 25px; margin-bottom: 15px; font-size: 18px;&quot;&gt;제품/시장 적합성 확보 전엔 PIVOT&lt;/h4&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;제품과 시장의 적합성을 명확히 하지 못했다면 고객의 피드백, 즉 고객 학습을 바탕으로 방향을 전환 해 나간다. 이것을 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px; margin-top: 0px;&quot;&gt;PIVOT(피벗)&lt;/code&gt;이라 한다. 방향 전환이란 효과적인 계획을 찾아나가는 일이다. 더 나은 방향으로 경로를 수정하는 일이다. 그리고 검증을 해 나가는 일이다.&lt;/p&gt;
&lt;h4 style=&quot;font-family: inherit; font-weight: bold; line-height: 1.1; color: inherit; margin-top: 25px; margin-bottom: 15px; font-size: 18px;&quot;&gt;모든 적합성 확보 후엔 최적화를.&lt;/h4&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;최적화란 계획을 더욱 가속화 시키는 것이다. 즉, 규모의 확장 단계에 하는 일이다. &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px; margin-top: 0px;&quot;&gt;사업 모델&lt;/code&gt;을 개선하고, 더욱 확장하며, 효율성을 증대시키는 것을 의미한다.&lt;/p&gt;
&lt;h4 style=&quot;font-family: inherit; font-weight: bold; line-height: 1.1; color: inherit; margin-top: 25px; margin-bottom: 15px; font-size: 18px;&quot;&gt;학습을 극대화하려면 과감하게.&lt;/h4&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;결과를 예측하기 어려워질수록 학습은 더욱 극대화된다. 더 많은 것을 학습 할 수 있다. 두려워하지말고 질러라.&lt;/p&gt;&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;다양한 고객군을 대상으로 다양한 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px; margin-top: 0px;&quot;&gt;MVP&lt;/code&gt;들을 실험해보라. 다양한 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px;&quot;&gt;UVP&lt;/code&gt;(Unique Value Proposition;고유가치제안)을 설정하고 학습을 위해 다양한 고객군에 실험해보라.&lt;/p&gt;
&lt;h4 style=&quot;font-family: inherit; font-weight: bold; line-height: 1.1; color: inherit; margin-top: 25px; margin-bottom: 15px; font-size: 18px;&quot;&gt;이상적 외부 투자 유치 시점은 적합성 확보 이후.&lt;/h4&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;파워포인트 몇 장으로 일정 수준의 검증도 이루어지지않은 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px; margin-top: 0px;&quot;&gt;사업 모델&lt;/code&gt;을 투자자에게 설득해 내는 것은 시간낭비일 뿐.&lt;/p&gt;&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;문제와 솔루션에 대한 적합성이 확보되고, 제품이 개발되고 그것에 대한 제품/시장 적합성이 확보되었다면 그때가 가장 적합한 외부 투자 유치 시점이다.&lt;/p&gt;&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;기존 자원을 최대한 활용해서 스타트업은 적합성을 확보해 내야한다. 즉 스타트업 초기엔 투자가 아니라, &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px; margin-top: 0px;&quot;&gt;사업 모델&lt;/code&gt;을 고객에게 테스트하고 검증을 시작할 수 있을 만큼의 자금을 마련해 내는 것을 목표로 삼아야한다.&lt;/p&gt;
&lt;h3 style=&quot;font-family: inherit; font-weight: bold; line-height: 1.1; color: inherit; margin-top: 30px; margin-bottom: 20px; font-size: 24px;&quot;&gt;3. 계획을 체계적으로 테스트하라.&lt;/h3&gt;
&lt;h4 style=&quot;font-family: inherit; font-weight: bold; line-height: 1.1; color: inherit; margin-top: 25px; margin-bottom: 15px; font-size: 18px;&quot;&gt;유효 학습 고리&lt;/h4&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;실험이란 유효한 학습고리의 사이클로 구성된다.&lt;/p&gt;
&lt;ul style=&quot;margin-top: 0; margin-bottom: 10px; line-height: 1.6;&quot;&gt;
&lt;li style=&quot;line-height: 1.6; margin-top: 0px;&quot;&gt;아이디어를 내고,&lt;/li&gt;
&lt;li style=&quot;line-height: 1.6;&quot;&gt;개발을 하며,&lt;/li&gt;
&lt;li style=&quot;line-height: 1.6;&quot;&gt;제품을 만들어내고,&lt;/li&gt;
&lt;li style=&quot;line-height: 1.6;&quot;&gt;사용자 반응을 측정해,&lt;/li&gt;
&lt;li style=&quot;line-height: 1.6;&quot;&gt;측정 데이터를 분석하고,&lt;/li&gt;
&lt;li style=&quot;line-height: 1.6;&quot;&gt;학습한다.&lt;/li&gt;
&lt;li style=&quot;line-height: 1.6;&quot;&gt;그리고 다시 아이디어를 낸다.&lt;/li&gt;
&lt;li style=&quot;line-height: 1.6;&quot;&gt;반복한다.&lt;/li&gt;
&lt;/ul&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;어떤 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px; margin-top: 0px;&quot;&gt;가설&lt;/code&gt; 혹은 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px;&quot;&gt;아이디어&lt;/code&gt;를 테스트하려면 실물 모형, 코드, 랜딩 페이지등을 만드는데 상용할 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px;&quot;&gt;아이디어&lt;/code&gt;, &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px;&quot;&gt;가설&lt;/code&gt;이 필요하다. 어쨌든, 이것들을 만들고 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px;&quot;&gt;정성적&lt;/code&gt;이고 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px;&quot;&gt;정량적&lt;/code&gt;인 방법으로 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px;&quot;&gt;가설&lt;/code&gt; 혹은 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px;&quot;&gt;아이디어&lt;/code&gt;의 고객 반응을 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px;&quot;&gt;측정&lt;/code&gt;해 내고, 이 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px;&quot;&gt;데이터&lt;/code&gt;를 분석하고 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px;&quot;&gt;학습&lt;/code&gt;한다. 이를 근거로 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px;&quot;&gt;가설&lt;/code&gt; 혹은 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px;&quot;&gt;아이디어&lt;/code&gt;의 유효성을 검증하거나 반박해내는 과정을 되풀이한다.&lt;/p&gt;&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;이게 바로 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px; margin-top: 0px;&quot;&gt;유효 학습 고리&lt;/code&gt;다.&lt;/p&gt;
&lt;h4 style=&quot;font-family: inherit; font-weight: bold; line-height: 1.1; color: inherit; margin-top: 25px; margin-bottom: 15px; font-size: 18px;&quot;&gt;반복 메타 패턴&lt;/h4&gt;
&lt;pre style=&quot;overflow: initial; font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 14px; display: block; padding: 0; margin: 0 0 10px; line-height: 1.6; word-break: break-all; word-wrap: break-word; color: #333333; background-color: #f5f5f5; border: none; border-radius: 0; white-space: pre-wrap;&quot;&gt;&lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: inherit; padding: 1em; color: #333; background-color: transparent; white-space: pre-wrap; border-radius: 0; display: block; background: #F6F6F6; margin-top: 0px;&quot;&gt; 문제 이해&lt;span style=&quot;margin-top: 0px;&quot;&gt; -&amp;gt;&lt;/span&gt; 솔루션 정의

 그후

 정성적 검증&lt;span&gt; -&amp;gt;&lt;/span&gt; 정량적 확인
&lt;/code&gt;&lt;/pre&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt; 위의 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px; margin-top: 0px;&quot;&gt;유효 학습 고리&lt;/code&gt;의 연장선상이다. 문제를 이해하고 솔루션을 정의하며, 정성적인 방법(&lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px;&quot;&gt;미시적 범위&lt;/code&gt;에서의 접근)과 정량적인 방법(&lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px;&quot;&gt;거시적 범위&lt;/code&gt;에서의 접근)을 통해 검증을 해 나가는 것이다. 이것을 반복 메타 패턴이라고 한다.&lt;/p&gt;&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt; 문제 이해와 솔루션 정의를  &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px; margin-top: 0px;&quot;&gt;적합성 확보하기&lt;/code&gt;과정,&lt;/p&gt;&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt; 그 다음 사람들이 원하는지를 정성적(미시적)으로 검증, 정량적(거시적)으로 확인하는 것을 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px; margin-top: 0px;&quot;&gt;테스트&lt;/code&gt;의 과정이라 생각하면 된다.&lt;/p&gt;
&lt;/div&gt;
&lt;center style=&quot;display:none&quot;&gt;%23%uB9B0%20%uC2A4%uD0C0%uD2B8%uC5C5%uC73C%uB85C%20%uC2A4%uD0C0%uD2B8%uC5C5%20%uC2DC%uC791%uD558%uAE30.%20-%202%0A%23%23%233%uAC00%uC9C0%uC758%20%uC6D0%uCE59%uC744%20%uB9CC%uB4E4%uC790.%0A%0A---%0A%23%23%23%uD3EC%uC2A4%uD305%20%uC804%uC5D0.%0A%uBA3C%uC800%20%uD3EC%uC2A4%uD305%20%uC804%uC5D0%20%uD655%uC2E4%uD788%20%uD574%20%uB458%20%uAC83%uC774%20%uC788%uB2E4.%20%uD544%uC790%uB294%20%uC2A4%uD0C0%uD2B8%uC5C5%uC744%20%uC9C4%uD589%uD558%uBA70%20%uB9B0%20%uC2A4%uD0C0%uD2B8%uC5C5%20%uD504%uB85C%uC138%uC2A4%uB97C%20%uB530%uB974%uB824%uD55C%uB2E4.%20%uC774%uC5D0%20%uAD50%uACFC%uC11C%uAC00%20%uD544%uC694%uD588%uACE0%2C%20%60%uD55C%uBE5B%20%uBBF8%uB514%uC5B4%60%uC758%20%60%uC624%uB77C%uC77C%uB9AC%60%20%uBC88%uC5ED%uC11C%uC778%20%60RUNNING%20LEAN%3A%uB9B0%20%uC2A4%uD0C0%uD2B8%uC5C5%60%uB97C%20%uC120%uD0DD%uD574%20%uACF5%uBD80%uD558%uACE0%20%uC788%uB2E4.%20%uC774%20%uD3EC%uC2A4%uD305%uC740%20%uAC1C%uC778%uC801%20%uACF5%uBD80%uC758%20%uD754%uC801%uC774%uBA70%2C%20%uD574%uB2F9%20%uCC45%uC758%20%uC21C%uC11C%uB97C%20%uB530%uB974%uC9C0%uB9CC%2C%20%uD544%uC790%uAC00%20%uC774%uD574%uD55C%uB300%uB85C%20%uC7AC%20%uAE30%uC220%uD574%20%uB0B4%uC6A9%uC740%20%uB3D9%uC77C%uD558%uC9C0%20%uC54A%uB2E4.%0A%0A---%0A%0A%uB9B0%20%uACBD%uC601%uC758%20%uC911%uC694%uD55C%20%uAC1C%uB150%uB4E4%uC744%20%uC9DA%uC5B4%uBD24%uB2E4.%20%uC774%uC81C%20%uB9B0%20%uACBD%uC601%uC744%20%uC2E4%uCC9C%uD560%20%uC218%20%uC788%uB294%20%uD575%uC2EC%20%uBB38%uC7A5%uC73C%uB85C%20%uB9CC%uB098%uBCF4%uC790.%0A%0A%23%23%uB9B0%20%uACBD%uC601%uC758%20%uD575%uC2EC.%0A%0A%23%23%231.%20%uD50C%uB79C%20A%uC758%20%uBB38%uC11C%uD654%0A%0A%uBD88%uD589%uD788%uB3C4%20%uB2F9%uC2E0%uC758%20%uCCAB%20%uD50C%uB79C%uC774%uC5C8%uB358%20%60%uD50C%uB79C%20A%60%uB294%20%uC0DD%uAC01%uBCF4%uB2E4%20%uD6E8%uC52C%20%uC801%uC808%uCE58%20%uBABB%uD558%uB2E4.%20%uD63C%uC790%20%uBBFF%uB294%20%60%uC2E0%uB150%60%uB530%uC704%uAC00%20%uC544%uB2CC%20%uBA85%uD655%uD55C%20%60%uC0AC%uC2E4%60%uC5D0%20%uAE30%uBC18%uD574%20%uD655%uC2E4%uD55C%20%uBAA9%uD45C%uC640%20%uBD84%uBA85%uD55C%20%uCDE8%uC9C0%uB97C%20%uC138%uC6CC%uC57C%uD55C%uB2E4.%20%uC774%uAC83%uB9CC%uC774%20%uCDA9%uBD84%uD788%20%uAC15%uD55C%20%60%uBE44%uC804%60%uC774%20%uB420%20%uC218%20%uC788%uB2E4.%20%uBB38%uC11C%uD654%uB294%20%uADF8%uB97C%20%uC704%uD55C%20%uC2DC%uC791%uC774%uB2E4.%0A%0A%23%23%23%23%uC0AC%uC5C5%20%uBAA8%uB378%uC774%20%uBC14%uD0D5%uC73C%uB85C%20%uD558%uB294%20%uAC00%uC124%uC740%3F%0A%0A%uB300%uBD80%uBD84%uC758%20%60%uD50C%uB79C%20A%60%uB294%20%uD615%uD3B8%uC774%20%uC5C6%uB2E4.%20%uC544%uB9C8%20%uC5C4%uCCAD%uB098%uAC8C%20%uB9CE%uC740%20%uD5C8%uBB34%uB9F9%uB791%uD55C%20%uAC00%uC124%uC774%20%uB4B7%uBC1B%uCE68%20%uB41C%20%uC0C1%uD0DC%uC5D0%uC11C%20%uC0DD%uAC01%uB41C%20%uC0AC%uC5C5%20%uBAA8%uB378%uC77C%20%uAC83%uC774%uAE30%20%uB54C%uBB38%uC774%uB2E4.%0A%0A%uC6B0%uB9AC%uB294%20%uD604%uC2E4%uC744%20%uC65C%uACE1%20%uC2DC%uCF1C%20%uC0DD%uAC01%uD558%uB294%20%uACBD%uC6B0%uAC00%20%uB9CE%uB2E4.%20%uC6B0%uB9AC%uAC00%20%uC0DD%uAC01%uD55C%20%uC544%uC774%uB514%uC5B4%uB97C%20%uBCF4%uD638%uD558%uAE30%20%uC704%uD55C%20%uBB34%uC758%uC2DD%uC801%uC778%20%uBC18%uC751%uC774%uB2E4.%20%uB530%uB77C%uC11C%20%uC774%uAC83%uB4E4%uC744%20%uAC77%uC5B4%uB0B4%uAE30%20%uC704%uD574%20%uC6B0%uB9AC%uB294%20%uD0C0%uC778%uACFC%20%uC774%uC57C%uAE30%uD574%uC57C%uD55C%uB2E4.%20%uB9CE%uC774%20%uBD80%uB527%uD600%uC11C%20%uC65C%uACE1%uC744%20%uAC77%uC5B4%uB0B4%uC57C%uD55C%uB2E4.%20%uADF8%uB7EC%uAE30%20%uC704%uD574%uC11C%20%uBB38%uC11C%uD654%uB294%20%uD544%uC218%uB2E4.%0A%0A%23%23%23%23%uC735%uD1B5%uC131%uC788%uAC8C%20%uB9B0%20%uCE94%uBC84%uC2A4%20%uD65C%uC6A9%uD558%uAE30.%0A%0A%uACE0%uC791%20%uD0C0%uC778%uACFC%20%uC774%uC57C%uAE30%20%uD55C%uBC88%20%uB098%uB204%uAE30%uC704%uD574%2060%uC7A5%uC758%20%uC0AC%uC5C5%uACC4%uD68D%uC11C%uB294%20%uB0AD%uBE44%uB2E4.%20%uC0C1%uB300%uB294%20%uC77D%uC5B4%uC904%20%uC0DD%uAC01%uB3C4%20%uC5C6%uC744%20%uAC83%uC774%uACE0%2C%20%uB098%uB294%20%uD798%uB4E4%20%uAC83%uC774%20%uBD84%uBA85%uD558%uB2C8%uAE4C.%20%uB530%uB77C%uC11C%20%uB9B0%20%uCE94%uBC84%uC2A4%uB85C%20%uAC04%uB2E8%uD788%20%uB098%uD0C0%uB0B4%uB294%20%uAC83%uC740%20%uB9E4%uC6B0%20%uD6A8%uC728%uC801%uC774%uB2E4.%20%uBAA8%uB4E0%20%uAC83%uC774%20%uD45C%uD604%uB418%uBA74%uC11C%20%uD55C%uB208%uC5D0%20%uB4E4%uC5B4%uC624%uB2C8%20%uB9D0%uC774%uB2E4.%0A%0A%23%23%23%23%uB9CC%uB4E4%uC5B4%uC57C%20%uD560%20%uAC83%uC740%20%uC0AC%uC5C5%uBAA8%uB378.%0A%0A%uB9CC%uB4E4%uC5B4%uC57C%20%uD560%20%uAC83%uC740%20%uC81C%uD488%uC774%20%uC544%uB2C8%uB2E4.%20%uC800%20%uCE94%uBC84%uC2A4%uC758%20%uBAA8%uB4E0%20%uC694%uC18C%uB4E4%2C%20%uC989%20%60%uC0AC%uC5C5%20%uBAA8%uB378%60%uC774%uB2E4.%20%uACE0%uAC1D%uC740%20%uC5EC%uB7EC%uBD84%uC758%20%uC194%uB8E8%uC158%uC5D4%20%uAD00%uC2EC%uC774%20%uC5C6%uB2E4.%20%uC624%uC9C1%20%uC790%uC2E0%uC758%20%uBB38%uC81C%uC5D0%uB9CC%20%uAD00%uC2EC%uC774%20%uC788%uB2E4.%20%uB530%uB77C%uC11C%20%uC194%uB8E8%uC158%uC5D0%20%uC9C0%uB098%uCE58%uAC8C%20%uC2DC%uAC04%uC744%20%uC18C%uBAA8%uD574%uC11C%uB294%20%uC548%uB41C%uB2E4.%20%uBAA8%uB4E0%20%uC694%uC18C%20%uC804%uCCB4%uAC00%20%uCDA9%uBD84%uD55C%20%uAC80%uD1A0%uB97C%20%uB9CC%uB098%uC57C%uD55C%uB2E4.%0A%0A%uC774%20%uBAA8%uB4E0%20%uC0AC%uC5C5%uBAA8%uB378%uC744%20%uD558%uB098%uD558%uB098%20%uC815%uBCF5%uD574%20%uB098%uAC00%uB294%20%uAC83%uC774%20%uBC14%uB85C%20%uC6B0%uB9AC%uC758%20%uC77C%uC778%20%uAC83%uC774%uB2E4.%0A%0A%23%232.%20%uC0AC%uC5C5%20%uACC4%uD68D%uC758%20%uC704%uD5D8%uBD80%uBD84%uC744%20%uCC3E%uC544%uB77C.%0A%0A%uAC00%uC7A5%20%uC704%uD5D8%uD55C%20%uBD80%uBD84%uC744%20%uCC3E%uC544%uB0B4%uB77C.%20%uADF8%uB9AC%uACE0%20%uBA3C%uC800%20%uB2E4%uB904%uB77C.%20%uADF8%uB7EC%uB098%20%uC544%uB9C8%20%uB300%uBD80%uBD84%uC758%20%uC2A4%uD0C0%uD2B8%uC5C5%uC5D0%uC11C%20%uAC00%uC7A5%20%uD070%20%uC704%uD5D8%uC744%20%uC548%uACE0%20%uC788%uB294%20%uBD80%uBD84%uC740%20%uC544%uB9C8%0A%0A*%uC544%uBB34%uB3C4%20%uC6D0%uD558%uC9C0%20%uC54A%uB294%20%uAC83%uC744%20%uB9CC%uB4DC%uB294%20%uAC83*%0A%0A%uC77C%20%uAC83%uC774%uB2E4.%0A%0A%23%23%23%uC2A4%uD0C0%uD2B8%uC5C5%uC758%203%uB2E8%uACC4%20%uD504%uB85C%uC138%uC2A4%0A%0A1.%20%uBB38%uC81C%uC640%20%uC194%uB8E8%uC158%uC5D0%20%uB300%uD55C%20%uC801%uD569%uC131%20%uAC80%uC99D%uC744%20%uAC70%uCE58%uACE0%20%uC81C%uD488%uC744%20%uAC1C%uBC1C%uD574%20%0A2.%20%uC81C%uD488%uACFC%20%uC2DC%uC7A5%uC5D0%20%uB300%uD55C%20%uC801%uD569%uC131%20%uAC80%uC99D%uC744%20%uAC70%uCE58%uACE0%2C%0A3.%20%uADDC%uBAA8%uB97C%20%uD655%uC7A5%uD574%20%uB098%uAC00%uC57C%20%uD55C%uB2E4.%0A%0A%23%23%23%231.%20%uBB38%uC81C/%uC194%uB8E8%uC158%uC758%20%uC801%uD569%uC131%0A%uC5B4%uB5A4%20%uBB38%uC81C%uAC00%20%uD574%uACB0%uD560%20%uAC00%uCE58%uAC00%20%uC788%uB294%uC9C0%uB97C%20%uD310%uB2E8%uD574%uC57C%uD55C%uB2E4.%20%uADF8%uAC83%uC744%20%uD310%uB2E8%uD558%uB824%uBA74%20%uB2E4%uC74C%uACFC%20%uAC19%uC740%20%uC138%uAC00%uC9C0%20%uC9C8%uBB38%uC5D0%20%uBA85%uD655%uD788%20%uB2F5%uBCC0%uC744%20%uD574%uBCF4%uBA74%20%uB41C%uB2E4.%0A%0A-%20%uACE0%uAC1D%uC774%20%uC6D0%uD558%uB294%20%uAC83%uC778%uAC00%3F%20%28%60%uD544%uC218%uC131%60%29%0A-%20%uACE0%uAC1D%uC774%20%uB3C8%uC744%20%uB0B4%uACE0%20%uAD6C%uC785%uD560%20%uAC83%uC778%uAC00%3F%20%uADF8%uB807%uC9C0%20%uC54A%uB2E4%uBA74%20%uB204%uAC00%20%uAD6C%uC785%uD560%20%uAC83%uC778%uAC00%3F%20%28%60%uC2E4%uD6A8%uC131%60%29%0A-%20%uBB38%uC81C%uB97C%20%uD574%uACB0%20%uD560%20%uC218%20%uC788%uC744%20%uAC83%uC778%uAC00%3F%20%28%60%uC2E4%uD604%uAC00%uB2A5%uC131%60%29%0A%0A%uC774%uAC83%uC73C%uB85C%20%uBD80%uD130%20%uBB38%uC81C%uB97C%20%uD574%uACB0%uD558%uAE30%20%uC704%uD55C%20%uCD5C%uC18C%20%uAE30%uB2A5%20%uC9D1%uD569%uC744%20%uB3C4%uCD9C%uD574%20%uB0BC%20%uC218%20%uC788%uC744%20%uAC83%uC774%uB2E4.%20%uADF8%uAC83%uC744%20%uBAA8%uC544%20product%uB97C%20%uB9CC%uB4E0%20%uAC83%uC744%20%60MVP%60%28Minimum%20Viable%20Product%29%uB77C%20%uD55C%uB2E4.%0A%0A%23%23%23%232.%20%uC81C%uD488/%uC2DC%uC7A5%uC758%20%uC801%uD569%uC131%0A%0A%uC774%uAC83%uC5D0%20%uB300%uD55C%20%uC9C8%uBB38%uC740%20%uD558%uB098%uB2E4.%0A%0A-%20%uC0AC%uB78C%uB4E4%uC774%20%uC6D0%uD558%uB294%20%uC194%uB8E8%uC158%uC744%20%uAC1C%uBC1C%uD558%uB294%uAC00%3F%0A%0A%uAC1C%uBC1C%uD55C%20%60MVP%60%uAC00%20%uC5BC%uB9C8%uB098%20%uC798%20%uBB38%uC81C%uB97C%20%uD574%uACB0%uD558%uB294%uAC00%2C%20%uC989%20%uADF8%uAC83%uC774%20%uC0AC%uB78C%uB4E4%uC774%20%uC6D0%uD558%uB294%20%uAC83%uC778%uAC00%uC5D0%20%uB300%uD55C%20%uBB3C%uC74C%uC774%uB2E4.%20%uC774%20%uB2E8%uACC4%uAE4C%uC9C0%20%uB3C4%uB2EC%uD558%uBA74%20%uC544%uB9C8%20%uC2A4%uD0C0%uD2B8%uC5C5%uC740%20%uACE0%uAC1D%uC744%20%uC720%uCE58%uD558%uACE0%20%uC720%uC9C0%uD558%uBA70%20%uB9E4%uCD9C%uC744%20%uD655%uBCF4%uD574%20%uB0BC%20%uAC83%uC774%uB2E4.%20%uADF8%uB9AC%uACE0%20%uB098%uBA74%20%uB9C8%uC9C0%uB9C9%20%uD655%uC7A5%uC774%uB2E4.%0A%0A%23%23%23%233.%20%uADDC%uBAA8%uC758%20%uD655%uC7A5%0A%0A%uC774%uAC83%uC740%20%uC131%uC7A5%uC5D0%20%uAD00%uD55C%20%uAC83%uC774%uB2E4.%0A%0A-%20%uC5B4%uB5BB%uAC8C%20%uC131%uC7A5%uC744%20%uAC00%uC18D%uD654%20%uD560%20%uAC83%uC778%uAC00%3F%0A%0A%uC77C%uC815%20%uC218%uC900%uC758%20%uC131%uACF5%uC740%20%uBCF4%uC7A5%uB418%uC5C8%uB2E4.%20%uC774%uC81C%20%uC131%uC7A5%uD574%uC57C%uD55C%uB2E4.%20%60%uC0AC%uC5C5%20%uBAA8%uB378%60%uC758%20%uCD08%uCCA8%uC740%20%uC9C0%uAE08%uBD80%uD130%uB294%20%uADDC%uBAA8%uC758%20%uD655%uC7A5%uC778%20%uAC83%uC774%uB2E4.%0A%0A%23%23%23%23%uC81C%uD488/%uC2DC%uC7A5%20%uC801%uD569%uC131%20%uD655%uBCF4%20%uC804%uC5D4%20PIVOT%0A%uC81C%uD488%uACFC%20%uC2DC%uC7A5%uC758%20%uC801%uD569%uC131%uC744%20%uBA85%uD655%uD788%20%uD558%uC9C0%20%uBABB%uD588%uB2E4%uBA74%20%uACE0%uAC1D%uC758%20%uD53C%uB4DC%uBC31%2C%20%uC989%20%uACE0%uAC1D%20%uD559%uC2B5%uC744%20%uBC14%uD0D5%uC73C%uB85C%20%uBC29%uD5A5%uC744%20%uC804%uD658%20%uD574%20%uB098%uAC04%uB2E4.%20%uC774%uAC83%uC744%20%60PIVOT%28%uD53C%uBC97%29%60%uC774%uB77C%20%uD55C%uB2E4.%20%uBC29%uD5A5%20%uC804%uD658%uC774%uB780%20%uD6A8%uACFC%uC801%uC778%20%uACC4%uD68D%uC744%20%uCC3E%uC544%uB098%uAC00%uB294%20%uC77C%uC774%uB2E4.%20%uB354%20%uB098%uC740%20%uBC29%uD5A5%uC73C%uB85C%20%uACBD%uB85C%uB97C%20%uC218%uC815%uD558%uB294%20%uC77C%uC774%uB2E4.%20%uADF8%uB9AC%uACE0%20%uAC80%uC99D%uC744%20%uD574%20%uB098%uAC00%uB294%20%uC77C%uC774%uB2E4.%0A%0A%23%23%23%23%uBAA8%uB4E0%20%uC801%uD569%uC131%20%uD655%uBCF4%20%uD6C4%uC5D4%20%uCD5C%uC801%uD654%uB97C.%0A%uCD5C%uC801%uD654%uB780%20%uACC4%uD68D%uC744%20%uB354%uC6B1%20%uAC00%uC18D%uD654%20%uC2DC%uD0A4%uB294%20%uAC83%uC774%uB2E4.%20%uC989%2C%20%uADDC%uBAA8%uC758%20%uD655%uC7A5%20%uB2E8%uACC4%uC5D0%20%uD558%uB294%20%uC77C%uC774%uB2E4.%20%60%uC0AC%uC5C5%20%uBAA8%uB378%60%uC744%20%uAC1C%uC120%uD558%uACE0%2C%20%uB354%uC6B1%20%uD655%uC7A5%uD558%uBA70%2C%20%uD6A8%uC728%uC131%uC744%20%uC99D%uB300%uC2DC%uD0A4%uB294%20%uAC83%uC744%20%uC758%uBBF8%uD55C%uB2E4.%0A%0A%23%23%23%23%uD559%uC2B5%uC744%20%uADF9%uB300%uD654%uD558%uB824%uBA74%20%uACFC%uAC10%uD558%uAC8C.%0A%uACB0%uACFC%uB97C%20%uC608%uCE21%uD558%uAE30%20%uC5B4%uB824%uC6CC%uC9C8%uC218%uB85D%20%uD559%uC2B5%uC740%20%uB354%uC6B1%20%uADF9%uB300%uD654%uB41C%uB2E4.%20%uB354%20%uB9CE%uC740%20%uAC83%uC744%20%uD559%uC2B5%20%uD560%20%uC218%20%uC788%uB2E4.%20%uB450%uB824%uC6CC%uD558%uC9C0%uB9D0%uACE0%20%uC9C8%uB7EC%uB77C.%0A%0A%uB2E4%uC591%uD55C%20%uACE0%uAC1D%uAD70%uC744%20%uB300%uC0C1%uC73C%uB85C%20%uB2E4%uC591%uD55C%20%60MVP%60%uB4E4%uC744%20%uC2E4%uD5D8%uD574%uBCF4%uB77C.%20%uB2E4%uC591%uD55C%20%60UVP%60%28Unique%20Value%20Proposition%3B%uACE0%uC720%uAC00%uCE58%uC81C%uC548%29%uC744%20%uC124%uC815%uD558%uACE0%20%uD559%uC2B5%uC744%20%uC704%uD574%20%uB2E4%uC591%uD55C%20%uACE0%uAC1D%uAD70%uC5D0%20%uC2E4%uD5D8%uD574%uBCF4%uB77C.%0A%0A%23%23%23%23%uC774%uC0C1%uC801%20%uC678%uBD80%20%uD22C%uC790%20%uC720%uCE58%20%uC2DC%uC810%uC740%20%uC801%uD569%uC131%20%uD655%uBCF4%20%uC774%uD6C4.%0A%0A%uD30C%uC6CC%uD3EC%uC778%uD2B8%20%uBA87%20%uC7A5%uC73C%uB85C%20%uC77C%uC815%20%uC218%uC900%uC758%20%uAC80%uC99D%uB3C4%20%uC774%uB8E8%uC5B4%uC9C0%uC9C0%uC54A%uC740%20%60%uC0AC%uC5C5%20%uBAA8%uB378%60%uC744%20%uD22C%uC790%uC790%uC5D0%uAC8C%20%uC124%uB4DD%uD574%20%uB0B4%uB294%20%uAC83%uC740%20%uC2DC%uAC04%uB0AD%uBE44%uC77C%20%uBFD0.%0A%0A%uBB38%uC81C%uC640%20%uC194%uB8E8%uC158%uC5D0%20%uB300%uD55C%20%uC801%uD569%uC131%uC774%20%uD655%uBCF4%uB418%uACE0%2C%20%uC81C%uD488%uC774%20%uAC1C%uBC1C%uB418%uACE0%20%uADF8%uAC83%uC5D0%20%uB300%uD55C%20%uC81C%uD488/%uC2DC%uC7A5%20%uC801%uD569%uC131%uC774%20%uD655%uBCF4%uB418%uC5C8%uB2E4%uBA74%20%uADF8%uB54C%uAC00%20%uAC00%uC7A5%20%uC801%uD569%uD55C%20%uC678%uBD80%20%uD22C%uC790%20%uC720%uCE58%20%uC2DC%uC810%uC774%uB2E4.%0A%0A%uAE30%uC874%20%uC790%uC6D0%uC744%20%uCD5C%uB300%uD55C%20%uD65C%uC6A9%uD574%uC11C%20%uC2A4%uD0C0%uD2B8%uC5C5%uC740%20%uC801%uD569%uC131%uC744%20%uD655%uBCF4%uD574%20%uB0B4%uC57C%uD55C%uB2E4.%20%uC989%20%uC2A4%uD0C0%uD2B8%uC5C5%20%uCD08%uAE30%uC5D4%20%uD22C%uC790%uAC00%20%uC544%uB2C8%uB77C%2C%20%60%uC0AC%uC5C5%20%uBAA8%uB378%60%uC744%20%uACE0%uAC1D%uC5D0%uAC8C%20%uD14C%uC2A4%uD2B8%uD558%uACE0%20%uAC80%uC99D%uC744%20%uC2DC%uC791%uD560%20%uC218%20%uC788%uC744%20%uB9CC%uD07C%uC758%20%uC790%uAE08%uC744%20%uB9C8%uB828%uD574%20%uB0B4%uB294%20%uAC83%uC744%20%uBAA9%uD45C%uB85C%20%uC0BC%uC544%uC57C%uD55C%uB2E4.%0A%0A%23%23%233.%20%uACC4%uD68D%uC744%20%uCCB4%uACC4%uC801%uC73C%uB85C%20%uD14C%uC2A4%uD2B8%uD558%uB77C.%0A%0A%23%23%23%23%uC720%uD6A8%20%uD559%uC2B5%20%uACE0%uB9AC%0A%0A%uC2E4%uD5D8%uC774%uB780%20%uC720%uD6A8%uD55C%20%uD559%uC2B5%uACE0%uB9AC%uC758%20%uC0AC%uC774%uD074%uB85C%20%uAD6C%uC131%uB41C%uB2E4.%0A%0A-%20%uC544%uC774%uB514%uC5B4%uB97C%20%uB0B4%uACE0%2C%0A-%20%uAC1C%uBC1C%uC744%20%uD558%uBA70%2C%0A-%20%uC81C%uD488%uC744%20%uB9CC%uB4E4%uC5B4%uB0B4%uACE0%2C%0A-%20%uC0AC%uC6A9%uC790%20%uBC18%uC751%uC744%20%uCE21%uC815%uD574%2C%0A-%20%uCE21%uC815%20%uB370%uC774%uD130%uB97C%20%uBD84%uC11D%uD558%uACE0%2C%0A-%20%uD559%uC2B5%uD55C%uB2E4.%0A-%20%uADF8%uB9AC%uACE0%20%uB2E4%uC2DC%20%uC544%uC774%uB514%uC5B4%uB97C%20%uB0B8%uB2E4.%0A-%20%uBC18%uBCF5%uD55C%uB2E4.%0A%0A%uC5B4%uB5A4%20%60%uAC00%uC124%60%20%uD639%uC740%20%60%uC544%uC774%uB514%uC5B4%60%uB97C%20%uD14C%uC2A4%uD2B8%uD558%uB824%uBA74%20%uC2E4%uBB3C%20%uBAA8%uD615%2C%20%uCF54%uB4DC%2C%20%uB79C%uB529%20%uD398%uC774%uC9C0%uB4F1%uC744%20%uB9CC%uB4DC%uB294%uB370%20%uC0C1%uC6A9%uD560%20%60%uC544%uC774%uB514%uC5B4%60%2C%20%60%uAC00%uC124%60%uC774%20%uD544%uC694%uD558%uB2E4.%20%uC5B4%uCA0C%uB4E0%2C%20%uC774%uAC83%uB4E4%uC744%20%uB9CC%uB4E4%uACE0%20%60%uC815%uC131%uC801%60%uC774%uACE0%20%60%uC815%uB7C9%uC801%60%uC778%20%uBC29%uBC95%uC73C%uB85C%20%60%uAC00%uC124%60%20%uD639%uC740%20%60%uC544%uC774%uB514%uC5B4%60%uC758%20%uACE0%uAC1D%20%uBC18%uC751%uC744%20%60%uCE21%uC815%60%uD574%20%uB0B4%uACE0%2C%20%uC774%20%60%uB370%uC774%uD130%60%uB97C%20%uBD84%uC11D%uD558%uACE0%20%60%uD559%uC2B5%60%uD55C%uB2E4.%20%uC774%uB97C%20%uADFC%uAC70%uB85C%20%60%uAC00%uC124%60%20%uD639%uC740%20%60%uC544%uC774%uB514%uC5B4%60%uC758%20%uC720%uD6A8%uC131%uC744%20%uAC80%uC99D%uD558%uAC70%uB098%20%uBC18%uBC15%uD574%uB0B4%uB294%20%uACFC%uC815%uC744%20%uB418%uD480%uC774%uD55C%uB2E4.%0A%0A%uC774%uAC8C%20%uBC14%uB85C%20%60%uC720%uD6A8%20%uD559%uC2B5%20%uACE0%uB9AC%60%uB2E4.%0A%0A%20%23%23%23%23%uBC18%uBCF5%20%uBA54%uD0C0%20%uD328%uD134%0A%20%0A%20%20%20%20%20%uBB38%uC81C%20%uC774%uD574%20-%3E%20%uC194%uB8E8%uC158%20%uC815%uC758%0A%20%20%20%20%20%0A%20%20%20%20%20%uADF8%uD6C4%0A%20%20%20%20%20%0A%20%20%20%20%20%uC815%uC131%uC801%20%uAC80%uC99D%20-%3E%20%uC815%uB7C9%uC801%20%uD655%uC778%0A%20%0A%20%uC704%uC758%20%60%uC720%uD6A8%20%uD559%uC2B5%20%uACE0%uB9AC%60%uC758%20%uC5F0%uC7A5%uC120%uC0C1%uC774%uB2E4.%20%uBB38%uC81C%uB97C%20%uC774%uD574%uD558%uACE0%20%uC194%uB8E8%uC158%uC744%20%uC815%uC758%uD558%uBA70%2C%20%uC815%uC131%uC801%uC778%20%uBC29%uBC95%28%60%uBBF8%uC2DC%uC801%20%uBC94%uC704%60%uC5D0%uC11C%uC758%20%uC811%uADFC%29%uACFC%20%uC815%uB7C9%uC801%uC778%20%uBC29%uBC95%28%60%uAC70%uC2DC%uC801%20%uBC94%uC704%60%uC5D0%uC11C%uC758%20%uC811%uADFC%29%uC744%20%uD1B5%uD574%20%uAC80%uC99D%uC744%20%uD574%20%uB098%uAC00%uB294%20%uAC83%uC774%uB2E4.%20%uC774%uAC83%uC744%20%uBC18%uBCF5%20%uBA54%uD0C0%20%uD328%uD134%uC774%uB77C%uACE0%20%uD55C%uB2E4.%0A%20%0A%20%uBB38%uC81C%20%uC774%uD574%uC640%20%uC194%uB8E8%uC158%20%uC815%uC758%uB97C%20%20%60%uC801%uD569%uC131%20%uD655%uBCF4%uD558%uAE30%60%uACFC%uC815%2C%0A%20%0A%20%uADF8%20%uB2E4%uC74C%20%uC0AC%uB78C%uB4E4%uC774%20%uC6D0%uD558%uB294%uC9C0%uB97C%20%uC815%uC131%uC801%28%uBBF8%uC2DC%uC801%29%uC73C%uB85C%20%uAC80%uC99D%2C%20%uC815%uB7C9%uC801%28%uAC70%uC2DC%uC801%29%uC73C%uB85C%20%uD655%uC778%uD558%uB294%20%uAC83%uC744%20%60%uD14C%uC2A4%uD2B8%60%uC758%20%uACFC%uC815%uC774%uB77C%20%uC0DD%uAC01%uD558%uBA74%20%uB41C%uB2E4.&lt;/center&gt;
&lt;br /&gt;&lt;/en-note&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</description>
      <category>Startup</category>
      <category>lean canvas</category>
      <category>Lean StartUp</category>
      <category>Startup</category>
      <category>린 경영</category>
      <category>린 스타트업</category>
      <category>린 캔버스</category>
      <category>사업 모델</category>
      <category>스타트업</category>
      <author>youngkyu.cho</author>
      <guid isPermaLink="true">https://youngkyu.tistory.com/29</guid>
      <comments>https://youngkyu.tistory.com/29#entry29comment</comments>
      <pubDate>Sat, 20 Dec 2014 01:07:26 +0900</pubDate>
    </item>
    <item>
      <title>린 스타트업으로 스타트업 시작하기. - 1 / 워밍업하기. / 고객개발 / 부트스트래핑</title>
      <link>https://youngkyu.tistory.com/28</link>
      <description>&lt;en-note lang=&quot;v2&quot; style=&quot;line-height:1.6;&quot;&gt;&lt;del style=&quot;position:relative;display:block&quot;&gt;&lt;a style=&quot;position: absolute;color: #FFF;text-decoration: none;font-size: 12px;height: 25px;border-radius: 0;margin-top: -20px;right: 15px;background: rgba(0, 0, 0, 0);border-left: 10px solid #BB3A34;border-right: 10px solid #BB3A34;border-bottom: 5px solid rgba(0, 0, 0, 0);width: 0;text-indent:-100000px;&quot; href=&quot;http://marxi.co/#/?provider=evernote_int&amp;amp;guid=aef9931e-8b0f-4136-b326-5421a2d61ba1&quot;&gt;Edit&lt;/a&gt;&lt;/del&gt;&lt;div style=&quot;line-height: 1.6; font-family: Helvetica Neue, Arial, Hiragino Sans GB, STHeiti, Microsoft YaHei, WenQuanYi Micro Hei, SimSun, Song, sans-serif;&quot;&gt;
&lt;h1 style=&quot;font-size: 36px; margin: 0.67em 0; font-family: inherit; font-weight: bold; line-height: 1.1; color: inherit; margin-top: 0px; margin-bottom: 20px;&quot;&gt;린 스타트업으로 스타트업 시작하기. - 1&lt;/h1&gt;
&lt;h3 style=&quot;font-family: inherit; font-weight: bold; line-height: 1.1; color: inherit; margin-top: 30px; margin-bottom: 20px; font-size: 24px;&quot;&gt;워밍업하기.&lt;/h3&gt;
&lt;hr style=&quot;-moz-box-sizing: content-box; box-sizing: content-box; height: 0; line-height: 1.6; margin-top: 20px; margin-bottom: 20px; border: 0; border-top: 1px solid rgba(102, 128, 153, 0.15);&quot;&gt;
&lt;h3 style=&quot;font-family: inherit; font-weight: bold; line-height: 1.1; color: inherit; margin-top: 30px; margin-bottom: 20px; font-size: 24px;&quot;&gt;포스팅 전에.&lt;/h3&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;먼저 포스팅 전에 확실히 해 둘 것이 있다. 필자는 스타트업을 진행하며 린 스타트업 프로세스를 따르려한다. 이에 교과서가 필요했고, &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px; margin-top: 0px;&quot;&gt;한빛 미디어&lt;/code&gt;의 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px;&quot;&gt;오라일리&lt;/code&gt; 번역서인 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px;&quot;&gt;RUNNING LEAN:린 스타트업&lt;/code&gt;를 선택해 공부하고 있다. 이 포스팅은 개인적 공부의 흔적이며, 해당 책의 순서를 따르지만, 필자가 이해한대로 재 기술해 내용은 동일하지 않다.&lt;/p&gt;
&lt;hr style=&quot;-moz-box-sizing: content-box; box-sizing: content-box; height: 0; line-height: 1.6; margin-top: 20px; margin-bottom: 20px; border: 0; border-top: 1px solid rgba(102, 128, 153, 0.15);&quot;&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;오늘 날 우리는 허무맹랑한 것이 아니라면 상상할 수 있는 그 어떤 것이든 만들어 낼 수 있다. 우리는 제품을 만들 때 더 이상 만들 수 있을 지 고민하지 않아도 된다. 이제 우리가 고민할 것은&lt;/p&gt;&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;em style=&quot;margin-top: 0px;&quot;&gt;&quot;이것이 세상에 태어날 필요가 있는가?&quot;&lt;/em&gt;&lt;/p&gt;&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;다.&lt;/p&gt;&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;우리는 성공하는 스타트업에 대해 잘못 이해하고 있다. 처음부터 완벽한 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px; margin-top: 0px;&quot;&gt;플랜 A&lt;/code&gt;를 설계하고 시작해서 성공했다고 생각하거나, 그들이 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px;&quot;&gt;플랜 A&lt;/code&gt;를 시도하는 과정에서 우연히, 혹은 직감적으로 다른 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px;&quot;&gt;플랜 B&lt;/code&gt;를 발견했다는 등의 생각이 바로 그것이다. 물론 그런 회사가 있다는 것은 부정하지 않지만 성공은 운 뿐만이 아니다. &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px;&quot;&gt;플랜 A&lt;/code&gt;의 엄격한 검증과 체계적 과정을 통해 다른 플랜으로의 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px;&quot;&gt;방향 전환&lt;/code&gt;, 혹은 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px;&quot;&gt;완벽한 계획&lt;/code&gt;에 가까이 가는 것이 가능한 것이다.&lt;/p&gt;
&lt;h2 style=&quot;font-family: inherit; font-weight: bold; line-height: 1.1; color: inherit; margin-top: 30px; margin-bottom: 20px; font-size: 30px;&quot;&gt;스타트업이 성공하려면.&lt;/h2&gt;
&lt;h3 style=&quot;font-family: inherit; font-weight: bold; line-height: 1.1; color: inherit; margin-top: 30px; margin-bottom: 20px; font-size: 24px;&quot;&gt;점진적 혁신, 실패와 학습.&lt;/h3&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;미래를 내다보고 완벽한 과정을 설계해 내는 천재적인 사람 따위는 없다. 점진적인 혁신과 실패를 통해서 배워가야 한다.&lt;/p&gt;
&lt;h3 style=&quot;font-family: inherit; font-weight: bold; line-height: 1.1; color: inherit; margin-top: 30px; margin-bottom: 20px; font-size: 24px;&quot;&gt;고객의 피드백을 자주 받아라.&lt;/h3&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;초기 요구 사항 수집단계 이후, &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px; margin-top: 0px;&quot;&gt;고객 검증&lt;/code&gt;은 제품 완성 후 단계로 미뤄지는 경우가 많다. 스타트업이 제품을 만들고 테스트 할 동안(이를 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px;&quot;&gt;중간단계&lt;/code&gt;라 한다.) 고객과 격리된다. 이는 매우 좋지않은데, 이 사이에 고객이 원하지 않는 제품으로 바뀔 확률이 매우 높기 때문이다. 이를 막기위해 최대한 고객과 자주 만나야한다.&lt;/p&gt;
&lt;h3 style=&quot;font-family: inherit; font-weight: bold; line-height: 1.1; color: inherit; margin-top: 30px; margin-bottom: 20px; font-size: 24px;&quot;&gt;단지 묻기만 해서는 안된다.&lt;/h3&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;고객이 원하는 것은 고객도 알지 못한다. 그것을 정확히 캐치해 내는 것은 우리의 일이다. 헨리포드는 이런 말을 했다.&lt;/p&gt;&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;em style=&quot;margin-top: 0px;&quot;&gt;만약 사람들에게 무엇을 원하는지 물었다면, 사람들은 더 빠른 말이 필요하다고 답했을 것이다.&lt;/em&gt;&lt;/p&gt;&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;이 말을 고객이 원하는 것은 고객도 모르니 물어볼 필요가 없다고 해석해선 안된다. 더 빠른 말이 대안적인 더 빠른 무엇인가라는걸 캐치하고 그것이 니즈라는 걸 파악해야 한다. 고객은 답을 알고 있지만 그냥 주지 않으며, 그 답을 정리해서 내놓는 것은 고객의 일이 아니다.&lt;/p&gt;
&lt;h2 style=&quot;font-family: inherit; font-weight: bold; line-height: 1.1; color: inherit; margin-top: 30px; margin-bottom: 20px; font-size: 30px;&quot;&gt;린 경영의 중요한 세가지 개념.&lt;/h2&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px; margin-top: 0px;&quot;&gt;린 경영&lt;/code&gt;이란 아이디어를 검토해 더 빠르게 성공적인 제품을 만들어가는 방법이다. 즉 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px;&quot;&gt;플랜 A&lt;/code&gt;를 좀 더 완벽히 만들어가거나, 성공적인 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px;&quot;&gt;플랜 B&lt;/code&gt;로 바꿔나가거나 하는 것을 가능하게 해주는 것이다.&lt;/p&gt;
&lt;h3 style=&quot;font-family: inherit; font-weight: bold; line-height: 1.1; color: inherit; margin-top: 30px; margin-bottom: 20px; font-size: 24px;&quot;&gt;1. 고객개발&lt;/h3&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;간단히 말해&lt;/p&gt;&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;em style=&quot;margin-top: 0px;&quot;&gt;사무실 밖으로 나가라&lt;/em&gt;&lt;/p&gt;&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;다. 고객을 만나란 뜻이다. 고객과 계속해서 피드백을 하는 피드백의 고리를 구축해라. 그것이 가장 중요한 첫 번째 린 경영의 핵심 개념이다.&lt;/p&gt;
&lt;h3 style=&quot;font-family: inherit; font-weight: bold; line-height: 1.1; color: inherit; margin-top: 30px; margin-bottom: 20px; font-size: 24px;&quot;&gt;2. 린 스타트업&lt;/h3&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;시간의 사용을 최적화 하는데 주력하는 것을 의미한다. 목표는 단위 시간당 고객에 대한 학습의 극대화를 추구하는 것이며, 빠른 반복 개선 작업으로 빠르게 가설 혹은 아이디어를 검증해 나가는 과정을 일컫는다.&lt;/p&gt;
&lt;h3 style=&quot;font-family: inherit; font-weight: bold; line-height: 1.1; color: inherit; margin-top: 30px; margin-bottom: 20px; font-size: 24px;&quot;&gt;3. 부트스트래핑&lt;/h3&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;외부 투자, 혹은 자금 규모를 최소화 하는 것을 위해서는 매출을 통해 자금울 충당하여야 한다. 이를 위한 기법들의 집합을 의미한다. &lt;/p&gt;&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;참고로 사전적인 부트스트래핑의 의미는 단순한 것을 기반으로 점점 복잡한 것으로 나아가는 것을 의미한다.&lt;/p&gt;
&lt;h2 style=&quot;font-family: inherit; font-weight: bold; line-height: 1.1; color: inherit; margin-top: 30px; margin-bottom: 20px; font-size: 30px;&quot;&gt;비밀리에 제품을 구축하지마라.&lt;/h2&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;멍청한 생각이다. 아이디어를 훔칠지도 모른다고 걱정하는데, 상대방은 당신의 이야기를 듣고 그 아이디어에 대해 정확한 잠재력을 가늠치도 못하며, 사실은 상대는 당신 아이디어 따위에 관심도 없다. 이야기를 듣고 개선해 나가는 것이 더욱 중요하다.&lt;/p&gt;
&lt;/div&gt;
&lt;center style=&quot;display:none&quot;&gt;%23%uB9B0%20%uC2A4%uD0C0%uD2B8%uC5C5%uC73C%uB85C%20%uC2A4%uD0C0%uD2B8%uC5C5%20%uC2DC%uC791%uD558%uAE30.%20-%201%0A%23%23%23%uC6CC%uBC0D%uC5C5%uD558%uAE30.%0A%0A---%0A%23%23%23%uD3EC%uC2A4%uD305%20%uC804%uC5D0.%0A%uBA3C%uC800%20%uD3EC%uC2A4%uD305%20%uC804%uC5D0%20%uD655%uC2E4%uD788%20%uD574%20%uB458%20%uAC83%uC774%20%uC788%uB2E4.%20%uD544%uC790%uB294%20%uC2A4%uD0C0%uD2B8%uC5C5%uC744%20%uC9C4%uD589%uD558%uBA70%20%uB9B0%20%uC2A4%uD0C0%uD2B8%uC5C5%20%uD504%uB85C%uC138%uC2A4%uB97C%20%uB530%uB974%uB824%uD55C%uB2E4.%20%uC774%uC5D0%20%uAD50%uACFC%uC11C%uAC00%20%uD544%uC694%uD588%uACE0%2C%20%60%uD55C%uBE5B%20%uBBF8%uB514%uC5B4%60%uC758%20%60%uC624%uB77C%uC77C%uB9AC%60%20%uBC88%uC5ED%uC11C%uC778%20%60RUNNING%20LEAN%3A%uB9B0%20%uC2A4%uD0C0%uD2B8%uC5C5%60%uB97C%20%uC120%uD0DD%uD574%20%uACF5%uBD80%uD558%uACE0%20%uC788%uB2E4.%20%uC774%20%uD3EC%uC2A4%uD305%uC740%20%uAC1C%uC778%uC801%20%uACF5%uBD80%uC758%20%uD754%uC801%uC774%uBA70%2C%20%uD574%uB2F9%20%uCC45%uC758%20%uC21C%uC11C%uB97C%20%uB530%uB974%uC9C0%uB9CC%2C%20%uD544%uC790%uAC00%20%uC774%uD574%uD55C%uB300%uB85C%20%uC7AC%20%uAE30%uC220%uD574%20%uB0B4%uC6A9%uC740%20%uB3D9%uC77C%uD558%uC9C0%20%uC54A%uB2E4.%0A%0A---%0A%0A%uC624%uB298%20%uB0A0%20%uC6B0%uB9AC%uB294%20%uD5C8%uBB34%uB9F9%uB791%uD55C%20%uAC83%uC774%20%uC544%uB2C8%uB77C%uBA74%20%uC0C1%uC0C1%uD560%20%uC218%20%uC788%uB294%20%uADF8%20%uC5B4%uB5A4%20%uAC83%uC774%uB4E0%20%uB9CC%uB4E4%uC5B4%20%uB0BC%20%uC218%20%uC788%uB2E4.%20%uC6B0%uB9AC%uB294%20%uC81C%uD488%uC744%20%uB9CC%uB4E4%20%uB54C%20%uB354%20%uC774%uC0C1%20%uB9CC%uB4E4%20%uC218%20%uC788%uC744%20%uC9C0%20%uACE0%uBBFC%uD558%uC9C0%20%uC54A%uC544%uB3C4%20%uB41C%uB2E4.%20%uC774%uC81C%20%uC6B0%uB9AC%uAC00%20%uACE0%uBBFC%uD560%20%uAC83%uC740%0A%0A*%22%uC774%uAC83%uC774%20%uC138%uC0C1%uC5D0%20%uD0DC%uC5B4%uB0A0%20%uD544%uC694%uAC00%20%uC788%uB294%uAC00%3F%22*%0A%0A%uB2E4.%0A%0A%uC6B0%uB9AC%uB294%20%uC131%uACF5%uD558%uB294%20%uC2A4%uD0C0%uD2B8%uC5C5%uC5D0%20%uB300%uD574%20%uC798%uBABB%20%uC774%uD574%uD558%uACE0%20%uC788%uB2E4.%20%uCC98%uC74C%uBD80%uD130%20%uC644%uBCBD%uD55C%20%60%uD50C%uB79C%20A%60%uB97C%20%uC124%uACC4%uD558%uACE0%20%uC2DC%uC791%uD574%uC11C%20%uC131%uACF5%uD588%uB2E4%uACE0%20%uC0DD%uAC01%uD558%uAC70%uB098%2C%20%uADF8%uB4E4%uC774%20%60%uD50C%uB79C%20A%60%uB97C%20%uC2DC%uB3C4%uD558%uB294%20%uACFC%uC815%uC5D0%uC11C%20%uC6B0%uC5F0%uD788%2C%20%uD639%uC740%20%uC9C1%uAC10%uC801%uC73C%uB85C%20%uB2E4%uB978%20%60%uD50C%uB79C%20B%60%uB97C%20%uBC1C%uACAC%uD588%uB2E4%uB294%20%uB4F1%uC758%20%uC0DD%uAC01%uC774%20%uBC14%uB85C%20%uADF8%uAC83%uC774%uB2E4.%20%uBB3C%uB860%20%uADF8%uB7F0%20%uD68C%uC0AC%uAC00%20%uC788%uB2E4%uB294%20%uAC83%uC740%20%uBD80%uC815%uD558%uC9C0%20%uC54A%uC9C0%uB9CC%20%uC131%uACF5%uC740%20%uC6B4%20%uBFD0%uB9CC%uC774%20%uC544%uB2C8%uB2E4.%20%60%uD50C%uB79C%20A%60%uC758%20%uC5C4%uACA9%uD55C%20%uAC80%uC99D%uACFC%20%uCCB4%uACC4%uC801%20%uACFC%uC815%uC744%20%uD1B5%uD574%20%uB2E4%uB978%20%uD50C%uB79C%uC73C%uB85C%uC758%20%60%uBC29%uD5A5%20%uC804%uD658%60%2C%20%uD639%uC740%20%60%uC644%uBCBD%uD55C%20%uACC4%uD68D%60%uC5D0%20%uAC00%uAE4C%uC774%20%uAC00%uB294%20%uAC83%uC774%20%uAC00%uB2A5%uD55C%20%uAC83%uC774%uB2E4.%0A%0A%23%23%uC2A4%uD0C0%uD2B8%uC5C5%uC774%20%uC131%uACF5%uD558%uB824%uBA74.%0A%0A%23%23%23%uC810%uC9C4%uC801%20%uD601%uC2E0%2C%20%uC2E4%uD328%uC640%20%uD559%uC2B5.%0A%uBBF8%uB798%uB97C%20%uB0B4%uB2E4%uBCF4%uACE0%20%uC644%uBCBD%uD55C%20%uACFC%uC815%uC744%20%uC124%uACC4%uD574%20%uB0B4%uB294%20%uCC9C%uC7AC%uC801%uC778%20%uC0AC%uB78C%20%uB530%uC704%uB294%20%uC5C6%uB2E4.%20%uC810%uC9C4%uC801%uC778%20%uD601%uC2E0%uACFC%20%uC2E4%uD328%uB97C%20%uD1B5%uD574%uC11C%20%uBC30%uC6CC%uAC00%uC57C%20%uD55C%uB2E4.%0A%0A%23%23%23%uACE0%uAC1D%uC758%20%uD53C%uB4DC%uBC31%uC744%20%uC790%uC8FC%20%uBC1B%uC544%uB77C.%0A%uCD08%uAE30%20%uC694%uAD6C%20%uC0AC%uD56D%20%uC218%uC9D1%uB2E8%uACC4%20%uC774%uD6C4%2C%20%60%uACE0%uAC1D%20%uAC80%uC99D%60%uC740%20%uC81C%uD488%20%uC644%uC131%20%uD6C4%20%uB2E8%uACC4%uB85C%20%uBBF8%uB904%uC9C0%uB294%20%uACBD%uC6B0%uAC00%20%uB9CE%uB2E4.%20%uC2A4%uD0C0%uD2B8%uC5C5%uC774%20%uC81C%uD488%uC744%20%uB9CC%uB4E4%uACE0%20%uD14C%uC2A4%uD2B8%20%uD560%20%uB3D9%uC548%28%uC774%uB97C%20%60%uC911%uAC04%uB2E8%uACC4%60%uB77C%20%uD55C%uB2E4.%29%20%uACE0%uAC1D%uACFC%20%uACA9%uB9AC%uB41C%uB2E4.%20%uC774%uB294%20%uB9E4%uC6B0%20%uC88B%uC9C0%uC54A%uC740%uB370%2C%20%uC774%20%uC0AC%uC774%uC5D0%20%uACE0%uAC1D%uC774%20%uC6D0%uD558%uC9C0%20%uC54A%uB294%20%uC81C%uD488%uC73C%uB85C%20%uBC14%uB014%20%uD655%uB960%uC774%20%uB9E4%uC6B0%20%uB192%uAE30%20%uB54C%uBB38%uC774%uB2E4.%20%uC774%uB97C%20%uB9C9%uAE30%uC704%uD574%20%uCD5C%uB300%uD55C%20%uACE0%uAC1D%uACFC%20%uC790%uC8FC%20%uB9CC%uB098%uC57C%uD55C%uB2E4.%0A%0A%23%23%23%uB2E8%uC9C0%20%uBB3B%uAE30%uB9CC%20%uD574%uC11C%uB294%20%uC548%uB41C%uB2E4.%0A%0A%uACE0%uAC1D%uC774%20%uC6D0%uD558%uB294%20%uAC83%uC740%20%uACE0%uAC1D%uB3C4%20%uC54C%uC9C0%20%uBABB%uD55C%uB2E4.%20%uADF8%uAC83%uC744%20%uC815%uD655%uD788%20%uCE90%uCE58%uD574%20%uB0B4%uB294%20%uAC83%uC740%20%uC6B0%uB9AC%uC758%20%uC77C%uC774%uB2E4.%20%uD5E8%uB9AC%uD3EC%uB4DC%uB294%20%uC774%uB7F0%20%uB9D0%uC744%20%uD588%uB2E4.%0A%0A*%uB9CC%uC57D%20%uC0AC%uB78C%uB4E4%uC5D0%uAC8C%20%uBB34%uC5C7%uC744%20%uC6D0%uD558%uB294%uC9C0%20%uBB3C%uC5C8%uB2E4%uBA74%2C%20%uC0AC%uB78C%uB4E4%uC740%20%uB354%20%uBE60%uB978%20%uB9D0%uC774%20%uD544%uC694%uD558%uB2E4%uACE0%20%uB2F5%uD588%uC744%20%uAC83%uC774%uB2E4.*%0A%0A%uC774%20%uB9D0%uC744%20%uACE0%uAC1D%uC774%20%uC6D0%uD558%uB294%20%uAC83%uC740%20%uACE0%uAC1D%uB3C4%20%uBAA8%uB974%uB2C8%20%uBB3C%uC5B4%uBCFC%20%uD544%uC694%uAC00%20%uC5C6%uB2E4%uACE0%20%uD574%uC11D%uD574%uC120%20%uC548%uB41C%uB2E4.%20%uB354%20%uBE60%uB978%20%uB9D0%uC774%20%uB300%uC548%uC801%uC778%20%uB354%20%uBE60%uB978%20%uBB34%uC5C7%uC778%uAC00%uB77C%uB294%uAC78%20%uCE90%uCE58%uD558%uACE0%20%uADF8%uAC83%uC774%20%uB2C8%uC988%uB77C%uB294%20%uAC78%20%uD30C%uC545%uD574%uC57C%20%uD55C%uB2E4.%20%uACE0%uAC1D%uC740%20%uB2F5%uC744%20%uC54C%uACE0%20%uC788%uC9C0%uB9CC%20%uADF8%uB0E5%20%uC8FC%uC9C0%20%uC54A%uC73C%uBA70%2C%20%uADF8%20%uB2F5%uC744%20%uC815%uB9AC%uD574%uC11C%20%uB0B4%uB193%uB294%20%uAC83%uC740%20%uACE0%uAC1D%uC758%20%uC77C%uC774%20%uC544%uB2C8%uB2E4.%0A%0A%23%23%uB9B0%20%uACBD%uC601%uC758%20%uC911%uC694%uD55C%20%uC138%uAC00%uC9C0%20%uAC1C%uB150.%0A%0A%60%uB9B0%20%uACBD%uC601%60%uC774%uB780%20%uC544%uC774%uB514%uC5B4%uB97C%20%uAC80%uD1A0%uD574%20%uB354%20%uBE60%uB974%uAC8C%20%uC131%uACF5%uC801%uC778%20%uC81C%uD488%uC744%20%uB9CC%uB4E4%uC5B4%uAC00%uB294%20%uBC29%uBC95%uC774%uB2E4.%20%uC989%20%60%uD50C%uB79C%20A%60%uB97C%20%uC880%20%uB354%20%uC644%uBCBD%uD788%20%uB9CC%uB4E4%uC5B4%uAC00%uAC70%uB098%2C%20%uC131%uACF5%uC801%uC778%20%60%uD50C%uB79C%20B%60%uB85C%20%uBC14%uAFD4%uB098%uAC00%uAC70%uB098%20%uD558%uB294%20%uAC83%uC744%20%uAC00%uB2A5%uD558%uAC8C%20%uD574%uC8FC%uB294%20%uAC83%uC774%uB2E4.%0A%0A%23%23%231.%20%uACE0%uAC1D%uAC1C%uBC1C%0A%0A%uAC04%uB2E8%uD788%20%uB9D0%uD574%0A%0A*%uC0AC%uBB34%uC2E4%20%uBC16%uC73C%uB85C%20%uB098%uAC00%uB77C*%0A%0A%uB2E4.%20%uACE0%uAC1D%uC744%20%uB9CC%uB098%uB780%20%uB73B%uC774%uB2E4.%20%uACE0%uAC1D%uACFC%20%uACC4%uC18D%uD574%uC11C%20%uD53C%uB4DC%uBC31%uC744%20%uD558%uB294%20%uD53C%uB4DC%uBC31%uC758%20%uACE0%uB9AC%uB97C%20%uAD6C%uCD95%uD574%uB77C.%20%uADF8%uAC83%uC774%20%uAC00%uC7A5%20%uC911%uC694%uD55C%20%uCCAB%20%uBC88%uC9F8%20%uB9B0%20%uACBD%uC601%uC758%20%uD575%uC2EC%20%uAC1C%uB150%uC774%uB2E4.%0A%0A%23%23%232.%20%uB9B0%20%uC2A4%uD0C0%uD2B8%uC5C5%0A%0A%uC2DC%uAC04%uC758%20%uC0AC%uC6A9%uC744%20%uCD5C%uC801%uD654%20%uD558%uB294%uB370%20%uC8FC%uB825%uD558%uB294%20%uAC83%uC744%20%uC758%uBBF8%uD55C%uB2E4.%20%uBAA9%uD45C%uB294%20%uB2E8%uC704%20%uC2DC%uAC04%uB2F9%20%uACE0%uAC1D%uC5D0%20%uB300%uD55C%20%uD559%uC2B5%uC758%20%uADF9%uB300%uD654%uB97C%20%uCD94%uAD6C%uD558%uB294%20%uAC83%uC774%uBA70%2C%20%uBE60%uB978%20%uBC18%uBCF5%20%uAC1C%uC120%20%uC791%uC5C5%uC73C%uB85C%20%uBE60%uB974%uAC8C%20%uAC00%uC124%20%uD639%uC740%20%uC544%uC774%uB514%uC5B4%uB97C%20%uAC80%uC99D%uD574%20%uB098%uAC00%uB294%20%uACFC%uC815%uC744%20%uC77C%uCEEB%uB294%uB2E4.%0A%0A%23%23%233.%20%uBD80%uD2B8%uC2A4%uD2B8%uB798%uD551%0A%0A%uC678%uBD80%20%uD22C%uC790%2C%20%uD639%uC740%20%uC790%uAE08%20%uADDC%uBAA8%uB97C%20%uCD5C%uC18C%uD654%20%uD558%uB294%20%uAC83%uC744%20%uC704%uD574%uC11C%uB294%20%uB9E4%uCD9C%uC744%20%uD1B5%uD574%20%uC790%uAE08%uC6B8%20%uCDA9%uB2F9%uD558%uC5EC%uC57C%20%uD55C%uB2E4.%20%uC774%uB97C%20%uC704%uD55C%20%uAE30%uBC95%uB4E4%uC758%20%uC9D1%uD569%uC744%20%uC758%uBBF8%uD55C%uB2E4.%20%0A%0A%uCC38%uACE0%uB85C%20%uC0AC%uC804%uC801%uC778%20%uBD80%uD2B8%uC2A4%uD2B8%uB798%uD551%uC758%20%uC758%uBBF8%uB294%20%uB2E8%uC21C%uD55C%20%uAC83%uC744%20%uAE30%uBC18%uC73C%uB85C%20%uC810%uC810%20%uBCF5%uC7A1%uD55C%20%uAC83%uC73C%uB85C%20%uB098%uC544%uAC00%uB294%20%uAC83%uC744%20%uC758%uBBF8%uD55C%uB2E4.%0A%0A%23%23%uBE44%uBC00%uB9AC%uC5D0%20%uC81C%uD488%uC744%20%uAD6C%uCD95%uD558%uC9C0%uB9C8%uB77C.%0A%0A%uBA4D%uCCAD%uD55C%20%uC0DD%uAC01%uC774%uB2E4.%20%uC544%uC774%uB514%uC5B4%uB97C%20%uD6D4%uCE60%uC9C0%uB3C4%20%uBAA8%uB978%uB2E4%uACE0%20%uAC71%uC815%uD558%uB294%uB370%2C%20%uC0C1%uB300%uBC29%uC740%20%uB2F9%uC2E0%uC758%20%uC774%uC57C%uAE30%uB97C%20%uB4E3%uACE0%20%uADF8%20%uC544%uC774%uB514%uC5B4%uC5D0%20%uB300%uD574%20%uC815%uD655%uD55C%20%uC7A0%uC7AC%uB825%uC744%20%uAC00%uB2A0%uCE58%uB3C4%20%uBABB%uD558%uBA70%2C%20%uC0AC%uC2E4%uC740%20%uC0C1%uB300%uB294%20%uB2F9%uC2E0%20%uC544%uC774%uB514%uC5B4%20%uB530%uC704%uC5D0%20%uAD00%uC2EC%uB3C4%20%uC5C6%uB2E4.%20%uC774%uC57C%uAE30%uB97C%20%uB4E3%uACE0%20%uAC1C%uC120%uD574%20%uB098%uAC00%uB294%20%uAC83%uC774%20%uB354%uC6B1%20%uC911%uC694%uD558%uB2E4.&lt;/center&gt;
&lt;br /&gt;&lt;/en-note&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</description>
      <category>Startup</category>
      <category>lean canvas</category>
      <category>Lean StartUp</category>
      <category>Startup</category>
      <category>고객개발</category>
      <category>린</category>
      <category>린 경영</category>
      <category>린스타트업</category>
      <category>부트스트래핑</category>
      <category>스타트업</category>
      <author>youngkyu.cho</author>
      <guid isPermaLink="true">https://youngkyu.tistory.com/28</guid>
      <comments>https://youngkyu.tistory.com/28#entry28comment</comments>
      <pubDate>Sat, 20 Dec 2014 01:05:04 +0900</pubDate>
    </item>
    <item>
      <title>Introducing. Stack. / 스택 자료구조</title>
      <link>https://youngkyu.tistory.com/27</link>
      <description>&lt;en-note lang=&quot;v2&quot; style=&quot;line-height:1.6;&quot;&gt;&lt;del style=&quot;position:relative;display:block&quot;&gt;&lt;a style=&quot;position: absolute;color: #FFF;text-decoration: none;font-size: 12px;height: 25px;border-radius: 0;margin-top: -20px;right: 15px;background: rgba(0, 0, 0, 0);border-left: 10px solid #BB3A34;border-right: 10px solid #BB3A34;border-bottom: 5px solid rgba(0, 0, 0, 0);width: 0;text-indent:-100000px;&quot; href=&quot;http://marxi.co/#/?provider=evernote_int&amp;amp;guid=bf9f44c0-91cc-41cc-a779-e7369e563d92&quot;&gt;Edit&lt;/a&gt;&lt;/del&gt;&lt;div style=&quot;line-height: 1.6; font-family: Helvetica Neue, Arial, Hiragino Sans GB, STHeiti, Microsoft YaHei, WenQuanYi Micro Hei, SimSun, Song, sans-serif;&quot;&gt;
&lt;h1 style=&quot;font-size: 36px; margin: 0.67em 0; font-family: inherit; font-weight: bold; line-height: 1.1; color: inherit; margin-top: 0px; margin-bottom: 20px;&quot;&gt;Introducing. Stack.&lt;/h1&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;본 스터디는 &lt;em style=&quot;margin-top: 0px;&quot;&gt;열혈강의 자료구조 - 프리렉&lt;/em&gt;이란 교재로 진행된다. 더욱 자세한 내용은 해당 책을 참고하기 바란다. 정말 괜찮은 책이다.&lt;/p&gt;
&lt;hr style=&quot;-moz-box-sizing: content-box; box-sizing: content-box; height: 0; line-height: 1.6; margin-top: 20px; margin-bottom: 20px; border: 0; border-top: 1px solid rgba(102, 128, 153, 0.15);&quot;&gt;
&lt;h2 style=&quot;font-family: inherit; font-weight: bold; line-height: 1.1; color: inherit; margin-top: 30px; margin-bottom: 20px; font-size: 30px;&quot;&gt;스택을 소개합니다.&lt;/h2&gt;
&lt;ul style=&quot;margin-top: 0; margin-bottom: 10px; line-height: 1.6;&quot;&gt;
&lt;li style=&quot;line-height: 1.6; margin-top: 0px;&quot;&gt;영어 단어로 더미(Stack).&lt;/li&gt;
&lt;li style=&quot;line-height: 1.6;&quot;&gt;가장 대표적 성질은 나중에 들어간게 먼저 나온다. (Last-In-First-Out;LIFO;리포)&lt;/li&gt;
&lt;li style=&quot;line-height: 1.6;&quot;&gt;같은 성질인데 말을 조금 바꾸면 ‘먼저 들어간게 나중에 나온다’ (First-In-Last-Out;FILO)&lt;/li&gt;
&lt;li style=&quot;line-height: 1.6;&quot;&gt;선형 자료구조 : 앞뒤 자료가 1:1&lt;/li&gt;
&lt;li style=&quot;line-height: 1.6;&quot;&gt;꺼내는 것(반환)과 삭제, 추가는 스택의 제일 위에서만 가능하다.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 style=&quot;font-family: inherit; font-weight: bold; line-height: 1.1; color: inherit; margin-top: 30px; margin-bottom: 20px; font-size: 24px;&quot;&gt;스택의 개념&lt;/h3&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;/p&gt;&lt;p style=&quot;text-align: center; clear: none; float: none;&quot;&gt;&lt;span class=&quot;imageblock&quot; style=&quot;display: inline-block; width: 391px;  height: auto; max-width: 100%;&quot;&gt;&lt;img src=&quot;https://t1.daumcdn.net/cfile/tistory/27313F39545CCDB226&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Ft1.daumcdn.net%2Fcfile%2Ftistory%2F27313F39545CCDB226&quot; width=&quot;391&quot; height=&quot;281&quot; filename=&quot;http://upload.wikimedia.org/wikipedia/commons/thumb/2/29/Data_stack.svg/391px-Data_stack.svg.png&quot; filemime=&quot;image/png&quot;/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;em style=&quot;margin-top: 0px;&quot;&gt;위키피디아에서 설명하는 스택.&lt;/em&gt;&lt;/p&gt;&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;스택은 한방향으로 쌓는 자료 구조이다. 새로운 자료를 스택에 추가하는 것을 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px; margin-top: 0px;&quot;&gt;push&lt;/code&gt;라고 한다. 그리고 스택에서 자료를 꺼내는 것을 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px;&quot;&gt;pop&lt;/code&gt;이라고 한다. 이때 꺼내지는 자료는 최상단(가장 마지막에 들어간)의 자료다. 이때 말하는 가장 마지막에 삽입된 자료를 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px;&quot;&gt;top&lt;/code&gt;이라 한다. 그리고 그 마지막 자료를 꺼내지 않고 보기만 하는 것을 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px;&quot;&gt;peek&lt;/code&gt;라 한다.&lt;/p&gt;
&lt;h4 style=&quot;font-family: inherit; font-weight: bold; line-height: 1.1; color: inherit; margin-top: 25px; margin-bottom: 15px; font-size: 18px;&quot;&gt;푸시(push)연산.&lt;/h4&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;|&lt;strong style=&quot;font-weight: bold; margin-top: 0px;&quot;&gt;  &lt;/strong&gt;|&lt;br /&gt;|&lt;strong style=&quot;font-weight: bold;&quot;&gt;  &lt;/strong&gt;|&lt;br /&gt;|&lt;strong style=&quot;font-weight: bold;&quot;&gt;B&lt;/strong&gt;|  &amp;lt;- top&lt;br /&gt;|&lt;strong style=&quot;font-weight: bold;&quot;&gt;A&lt;/strong&gt;|&lt;/p&gt;&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;이렇게 생긴 스택 공간이 있다고 하자. 자료 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px; margin-top: 0px;&quot;&gt;C&lt;/code&gt;를 추가하게 되면,&lt;/p&gt;&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;|&lt;strong style=&quot;font-weight: bold; margin-top: 0px;&quot;&gt;  &lt;/strong&gt;|&lt;br /&gt;|&lt;strong style=&quot;font-weight: bold;&quot;&gt;C&lt;/strong&gt;|  &amp;lt;- top&lt;br /&gt;|&lt;strong style=&quot;font-weight: bold;&quot;&gt;B&lt;/strong&gt;|&lt;br /&gt;|&lt;strong style=&quot;font-weight: bold;&quot;&gt;A&lt;/strong&gt;|&lt;/p&gt;&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;로 바뀌게 된다. 아래서 부터 인덱스를 붙이면 2번자리에 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px; margin-top: 0px;&quot;&gt;C&lt;/code&gt;가 저장됨을 알 수 있다.&lt;/p&gt;&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;스택의 크기란 스택에 저장할 수 있는 최대의 자료 개수를 말한다. 최대 갯수가 제한이 있기 때문에 이 한도를 초과해서 추가하려고하면 추가될 수 없는 경우가 발생한다. 이 경우를 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px; margin-top: 0px;&quot;&gt;overflow&lt;/code&gt;현상이라 이야기한다.&lt;/p&gt;
&lt;h4 style=&quot;font-family: inherit; font-weight: bold; line-height: 1.1; color: inherit; margin-top: 25px; margin-bottom: 15px; font-size: 18px;&quot;&gt;팝(pop)연산.&lt;/h4&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;다음으로 팝 연산에 대해 살펴보도록 하자. 팝은 스택에서 자료를 꺼내는 것을 말한다. 이러한 팝 연산은 스택의 제일 위에서만 발생한다.&lt;/p&gt;&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;|&lt;strong style=&quot;font-weight: bold; margin-top: 0px;&quot;&gt;  &lt;/strong&gt;|&lt;br /&gt;|&lt;strong style=&quot;font-weight: bold;&quot;&gt;C&lt;/strong&gt;|  -&amp;gt; pop&lt;br /&gt;|&lt;strong style=&quot;font-weight: bold;&quot;&gt;B&lt;/strong&gt;|  &amp;lt;- top&lt;br /&gt;|&lt;strong style=&quot;font-weight: bold;&quot;&gt;A&lt;/strong&gt;|&lt;/p&gt;&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;|&lt;strong style=&quot;font-weight: bold; margin-top: 0px;&quot;&gt;  &lt;/strong&gt;|&lt;br /&gt;|&lt;strong style=&quot;font-weight: bold;&quot;&gt;  &lt;/strong&gt;|&lt;br /&gt;|&lt;strong style=&quot;font-weight: bold;&quot;&gt;B&lt;/strong&gt;|  &amp;lt;- top&lt;br /&gt;|&lt;strong style=&quot;font-weight: bold;&quot;&gt;A&lt;/strong&gt;|&lt;/p&gt;&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;위는 저장된 자료가 팝 연산에 의해 반환 되는 과정이다.&lt;/p&gt;&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;만약 아무 자료가 저장되지 않은 상태(&lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px; margin-top: 0px;&quot;&gt;empty 상태&lt;/code&gt;)에서 팝 연산을 호출하면 어떻게 되야할까? 아마도 아무자료가 없으니 제거할 자료가 없는 상황이 될 것이다. 이런 상황을 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px;&quot;&gt;underflow&lt;/code&gt;현상이라고 말한다.&lt;/p&gt;
&lt;h4 style=&quot;font-family: inherit; font-weight: bold; line-height: 1.1; color: inherit; margin-top: 25px; margin-bottom: 15px; font-size: 18px;&quot;&gt;피크(peek)연산.&lt;/h4&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;팝과 유사한 연산이다. 그러나 자료를 제거하지않고 단지 반환만 받을 수 있다는 점에서 차이가 있다.&lt;/p&gt;&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;|&lt;strong style=&quot;font-weight: bold; margin-top: 0px;&quot;&gt;  &lt;/strong&gt;|&lt;br /&gt;|&lt;strong style=&quot;font-weight: bold;&quot;&gt;C&lt;/strong&gt;|    &amp;lt;- top / -&amp;gt; peek&lt;br /&gt;|&lt;strong style=&quot;font-weight: bold;&quot;&gt;B&lt;/strong&gt;|&lt;br /&gt;|&lt;strong style=&quot;font-weight: bold;&quot;&gt;A&lt;/strong&gt;|&lt;/p&gt;&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;|&lt;strong style=&quot;font-weight: bold; margin-top: 0px;&quot;&gt;  &lt;/strong&gt;|&lt;br /&gt;|&lt;strong style=&quot;font-weight: bold;&quot;&gt;C&lt;/strong&gt;|  &amp;lt;- top&lt;br /&gt;|&lt;strong style=&quot;font-weight: bold;&quot;&gt;B&lt;/strong&gt;|&lt;br /&gt;|&lt;strong style=&quot;font-weight: bold;&quot;&gt;A&lt;/strong&gt;|&lt;/p&gt;&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;탑을 이용하여 스택의 최상위에 있는 가장 최근에 삽입된 자료를 반환한다. 오직 반환만 한다는 점에 주목하라.&lt;/p&gt;
&lt;h3 style=&quot;font-family: inherit; font-weight: bold; line-height: 1.1; color: inherit; margin-top: 30px; margin-bottom: 20px; font-size: 24px;&quot;&gt;스택의 추상 자료형&lt;/h3&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;스택을 실제 사용하기 위해서는 다음 표에 있는 기능들이 필요하다.&lt;/p&gt;
&lt;table style=&quot;border-collapse: collapse; border-spacing: 0; margin-bottom: 20px;&quot;&gt;
&lt;thead style=&quot;margin-top: 0px;&quot;&gt;
&lt;tr style=&quot;margin-top: 0px;&quot;&gt;
&lt;th style=&quot;text-align: left; padding: 8px; line-height: 20px; vertical-align: top; border: 1px solid #DDD; margin-top: 0px;&quot;&gt;이름&lt;/th&gt;
&lt;th style=&quot;padding: 8px; line-height: 20px; text-align: left; vertical-align: top; border: 1px solid #DDD;&quot;&gt;Operation&lt;/th&gt;
&lt;th style=&quot;text-align: left; padding: 8px; line-height: 20px; vertical-align: top; border: 1px solid #DDD;&quot;&gt;Input&lt;/th&gt;
&lt;th style=&quot;text-align: left; padding: 8px; line-height: 20px; vertical-align: top; border: 1px solid #DDD;&quot;&gt;Output&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr style=&quot;margin-top: 0px;&quot;&gt;
&lt;td style=&quot;text-align: left; padding: 8px; line-height: 20px; vertical-align: top; border: 1px solid #DDD; margin-top: 0px;&quot;&gt;스택 생성&lt;/td&gt;
&lt;td style=&quot;padding: 8px; line-height: 20px; text-align: left; vertical-align: top; border: 1px solid #DDD;&quot;&gt;createStack()&lt;/td&gt;
&lt;td style=&quot;text-align: left; padding: 8px; line-height: 20px; vertical-align: top; border: 1px solid #DDD;&quot;&gt;스택의 크기 n&lt;/td&gt;
&lt;td style=&quot;text-align: left; padding: 8px; line-height: 20px; vertical-align: top; border: 1px solid #DDD;&quot;&gt;스택 s&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;text-align: left; padding: 8px; line-height: 20px; vertical-align: top; border: 1px solid #DDD; margin-top: 0px;&quot;&gt;스택 삭제&lt;/td&gt;
&lt;td style=&quot;padding: 8px; line-height: 20px; text-align: left; vertical-align: top; border: 1px solid #DDD;&quot;&gt;deleteStack()&lt;/td&gt;
&lt;td style=&quot;text-align: left; padding: 8px; line-height: 20px; vertical-align: top; border: 1px solid #DDD;&quot;&gt;스택 s&lt;/td&gt;
&lt;td style=&quot;text-align: left; padding: 8px; line-height: 20px; vertical-align: top; border: 1px solid #DDD;&quot;&gt;N/A&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;text-align: left; padding: 8px; line-height: 20px; vertical-align: top; border: 1px solid #DDD; margin-top: 0px;&quot;&gt;원소 추가 가능 여부&lt;/td&gt;
&lt;td style=&quot;padding: 8px; line-height: 20px; text-align: left; vertical-align: top; border: 1px solid #DDD;&quot;&gt;isFull()&lt;/td&gt;
&lt;td style=&quot;text-align: left; padding: 8px; line-height: 20px; vertical-align: top; border: 1px solid #DDD;&quot;&gt;스택 s&lt;/td&gt;
&lt;td style=&quot;text-align: left; padding: 8px; line-height: 20px; vertical-align: top; border: 1px solid #DDD;&quot;&gt;T/F&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;text-align: left; padding: 8px; line-height: 20px; vertical-align: top; border: 1px solid #DDD; margin-top: 0px;&quot;&gt;공백 스택인지 여부&lt;/td&gt;
&lt;td style=&quot;padding: 8px; line-height: 20px; text-align: left; vertical-align: top; border: 1px solid #DDD;&quot;&gt;isEmpty()&lt;/td&gt;
&lt;td style=&quot;text-align: left; padding: 8px; line-height: 20px; vertical-align: top; border: 1px solid #DDD;&quot;&gt;스택 s&lt;/td&gt;
&lt;td style=&quot;text-align: left; padding: 8px; line-height: 20px; vertical-align: top; border: 1px solid #DDD;&quot;&gt;T/F&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;text-align: left; padding: 8px; line-height: 20px; vertical-align: top; border: 1px solid #DDD; margin-top: 0px;&quot;&gt;푸스&lt;/td&gt;
&lt;td style=&quot;padding: 8px; line-height: 20px; text-align: left; vertical-align: top; border: 1px solid #DDD;&quot;&gt;push()&lt;/td&gt;
&lt;td style=&quot;text-align: left; padding: 8px; line-height: 20px; vertical-align: top; border: 1px solid #DDD;&quot;&gt;스택 s, 원소 e&lt;/td&gt;
&lt;td style=&quot;text-align: left; padding: 8px; line-height: 20px; vertical-align: top; border: 1px solid #DDD;&quot;&gt;성공/실패 여부&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;text-align: left; padding: 8px; line-height: 20px; vertical-align: top; border: 1px solid #DDD; margin-top: 0px;&quot;&gt;팝&lt;/td&gt;
&lt;td style=&quot;padding: 8px; line-height: 20px; text-align: left; vertical-align: top; border: 1px solid #DDD;&quot;&gt;pop()&lt;/td&gt;
&lt;td style=&quot;text-align: left; padding: 8px; line-height: 20px; vertical-align: top; border: 1px solid #DDD;&quot;&gt;스택 s&lt;/td&gt;
&lt;td style=&quot;text-align: left; padding: 8px; line-height: 20px; vertical-align: top; border: 1px solid #DDD;&quot;&gt;원소 e&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;text-align: left; padding: 8px; line-height: 20px; vertical-align: top; border: 1px solid #DDD; margin-top: 0px;&quot;&gt;피크&lt;/td&gt;
&lt;td style=&quot;padding: 8px; line-height: 20px; text-align: left; vertical-align: top; border: 1px solid #DDD;&quot;&gt;peek()&lt;/td&gt;
&lt;td style=&quot;text-align: left; padding: 8px; line-height: 20px; vertical-align: top; border: 1px solid #DDD;&quot;&gt;스택 s&lt;/td&gt;
&lt;td style=&quot;text-align: left; padding: 8px; line-height: 20px; vertical-align: top; border: 1px solid #DDD;&quot;&gt;원소 e&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;center style=&quot;display:none&quot;&gt;%23Introducing.%20Stack.%0A%0A%uBCF8%20%uC2A4%uD130%uB514%uB294%20*%uC5F4%uD608%uAC15%uC758%20%uC790%uB8CC%uAD6C%uC870%20-%20%uD504%uB9AC%uB809*%uC774%uB780%20%uAD50%uC7AC%uB85C%20%uC9C4%uD589%uB41C%uB2E4.%20%uB354%uC6B1%20%uC790%uC138%uD55C%20%uB0B4%uC6A9%uC740%20%uD574%uB2F9%20%uCC45%uC744%20%uCC38%uACE0%uD558%uAE30%20%uBC14%uB780%uB2E4.%20%uC815%uB9D0%20%uAD1C%uCC2E%uC740%20%uCC45%uC774%uB2E4.%0A%0A---%0A%0A%23%23%uC2A4%uD0DD%uC744%20%uC18C%uAC1C%uD569%uB2C8%uB2E4.%0A%0A-%20%uC601%uC5B4%20%uB2E8%uC5B4%uB85C%20%uB354%uBBF8%28Stack%29.%0A-%20%uAC00%uC7A5%20%uB300%uD45C%uC801%20%uC131%uC9C8%uC740%20%uB098%uC911%uC5D0%20%uB4E4%uC5B4%uAC04%uAC8C%20%uBA3C%uC800%20%uB098%uC628%uB2E4.%20%28Last-In-First-Out%3BLIFO%3B%uB9AC%uD3EC%29%0A-%20%uAC19%uC740%20%uC131%uC9C8%uC778%uB370%20%uB9D0%uC744%20%uC870%uAE08%20%uBC14%uAFB8%uBA74%20%u2018%uBA3C%uC800%20%uB4E4%uC5B4%uAC04%uAC8C%20%uB098%uC911%uC5D0%20%uB098%uC628%uB2E4%u2019%20%28First-In-Last-Out%3BFILO%29%0A-%20%uC120%uD615%20%uC790%uB8CC%uAD6C%uC870%20%3A%20%uC55E%uB4A4%20%uC790%uB8CC%uAC00%201%3A1%0A-%20%uAEBC%uB0B4%uB294%20%uAC83%28%uBC18%uD658%29%uACFC%20%uC0AD%uC81C%2C%20%uCD94%uAC00%uB294%20%uC2A4%uD0DD%uC758%20%uC81C%uC77C%20%uC704%uC5D0%uC11C%uB9CC%20%uAC00%uB2A5%uD558%uB2E4.%0A%0A%23%23%23%uC2A4%uD0DD%uC758%20%uAC1C%uB150%0A%0A%21%5BAlt%20text%5D%28http%3A//upload.wikimedia.org/wikipedia/commons/thumb/2/29/Data_stack.svg/391px-Data_stack.svg.png%29%0A%0A*%uC704%uD0A4%uD53C%uB514%uC544%uC5D0%uC11C%20%uC124%uBA85%uD558%uB294%20%uC2A4%uD0DD.*%0A%0A%uC2A4%uD0DD%uC740%20%uD55C%uBC29%uD5A5%uC73C%uB85C%20%uC313%uB294%20%uC790%uB8CC%20%uAD6C%uC870%uC774%uB2E4.%20%uC0C8%uB85C%uC6B4%20%uC790%uB8CC%uB97C%20%uC2A4%uD0DD%uC5D0%20%uCD94%uAC00%uD558%uB294%20%uAC83%uC744%20%60push%60%uB77C%uACE0%20%uD55C%uB2E4.%20%uADF8%uB9AC%uACE0%20%uC2A4%uD0DD%uC5D0%uC11C%20%uC790%uB8CC%uB97C%20%uAEBC%uB0B4%uB294%20%uAC83%uC744%20%60pop%60%uC774%uB77C%uACE0%20%uD55C%uB2E4.%20%uC774%uB54C%20%uAEBC%uB0B4%uC9C0%uB294%20%uC790%uB8CC%uB294%20%uCD5C%uC0C1%uB2E8%28%uAC00%uC7A5%20%uB9C8%uC9C0%uB9C9%uC5D0%20%uB4E4%uC5B4%uAC04%29%uC758%20%uC790%uB8CC%uB2E4.%20%uC774%uB54C%20%uB9D0%uD558%uB294%20%uAC00%uC7A5%20%uB9C8%uC9C0%uB9C9%uC5D0%20%uC0BD%uC785%uB41C%20%uC790%uB8CC%uB97C%20%60top%60%uC774%uB77C%20%uD55C%uB2E4.%20%uADF8%uB9AC%uACE0%20%uADF8%20%uB9C8%uC9C0%uB9C9%20%uC790%uB8CC%uB97C%20%uAEBC%uB0B4%uC9C0%20%uC54A%uACE0%20%uBCF4%uAE30%uB9CC%20%uD558%uB294%20%uAC83%uC744%20%60peek%60%uB77C%20%uD55C%uB2E4.%0A%0A%23%23%23%23%uD478%uC2DC%28push%29%uC5F0%uC0B0.%0A%0A%7C**%20%20**%7C%0A%7C**%20%20**%7C%0A%7C**B**%7C%20%20%3C-%20top%0A%7C**A**%7C%0A%0A%uC774%uB807%uAC8C%20%uC0DD%uAE34%20%uC2A4%uD0DD%20%uACF5%uAC04%uC774%20%uC788%uB2E4%uACE0%20%uD558%uC790.%20%uC790%uB8CC%20%60C%60%uB97C%20%uCD94%uAC00%uD558%uAC8C%20%uB418%uBA74%2C%0A%0A%7C**%20%20**%7C%0A%7C**C**%7C%20%20%3C-%20top%0A%7C**B**%7C%0A%7C**A**%7C%0A%0A%uB85C%20%uBC14%uB00C%uAC8C%20%uB41C%uB2E4.%20%uC544%uB798%uC11C%20%uBD80%uD130%20%uC778%uB371%uC2A4%uB97C%20%uBD99%uC774%uBA74%202%uBC88%uC790%uB9AC%uC5D0%20%60C%60%uAC00%20%uC800%uC7A5%uB428%uC744%20%uC54C%20%uC218%20%uC788%uB2E4.%0A%0A%uC2A4%uD0DD%uC758%20%uD06C%uAE30%uB780%20%uC2A4%uD0DD%uC5D0%20%uC800%uC7A5%uD560%20%uC218%20%uC788%uB294%20%uCD5C%uB300%uC758%20%uC790%uB8CC%20%uAC1C%uC218%uB97C%20%uB9D0%uD55C%uB2E4.%20%uCD5C%uB300%20%uAC2F%uC218%uAC00%20%uC81C%uD55C%uC774%20%uC788%uAE30%20%uB54C%uBB38%uC5D0%20%uC774%20%uD55C%uB3C4%uB97C%20%uCD08%uACFC%uD574%uC11C%20%uCD94%uAC00%uD558%uB824%uACE0%uD558%uBA74%20%uCD94%uAC00%uB420%20%uC218%20%uC5C6%uB294%20%uACBD%uC6B0%uAC00%20%uBC1C%uC0DD%uD55C%uB2E4.%20%uC774%20%uACBD%uC6B0%uB97C%20%60overflow%60%uD604%uC0C1%uC774%uB77C%20%uC774%uC57C%uAE30%uD55C%uB2E4.%0A%0A%23%23%23%23%uD31D%28pop%29%uC5F0%uC0B0.%0A%0A%uB2E4%uC74C%uC73C%uB85C%20%uD31D%20%uC5F0%uC0B0%uC5D0%20%uB300%uD574%20%uC0B4%uD3B4%uBCF4%uB3C4%uB85D%20%uD558%uC790.%20%uD31D%uC740%20%uC2A4%uD0DD%uC5D0%uC11C%20%uC790%uB8CC%uB97C%20%uAEBC%uB0B4%uB294%20%uAC83%uC744%20%uB9D0%uD55C%uB2E4.%20%uC774%uB7EC%uD55C%20%uD31D%20%uC5F0%uC0B0%uC740%20%uC2A4%uD0DD%uC758%20%uC81C%uC77C%20%uC704%uC5D0%uC11C%uB9CC%20%uBC1C%uC0DD%uD55C%uB2E4.%0A%0A%7C**%20%20**%7C%0A%7C**C**%7C%20%20-%3E%20pop%0A%7C**B**%7C%20%20%3C-%20top%0A%7C**A**%7C%0A%0A%7C**%20%20**%7C%0A%7C**%20%20**%7C%0A%7C**B**%7C%20%20%3C-%20top%0A%7C**A**%7C%0A%0A%uC704%uB294%20%uC800%uC7A5%uB41C%20%uC790%uB8CC%uAC00%20%uD31D%20%uC5F0%uC0B0%uC5D0%20%uC758%uD574%20%uBC18%uD658%20%uB418%uB294%20%uACFC%uC815%uC774%uB2E4.%0A%0A%uB9CC%uC57D%20%uC544%uBB34%20%uC790%uB8CC%uAC00%20%uC800%uC7A5%uB418%uC9C0%20%uC54A%uC740%20%uC0C1%uD0DC%28%60empty%20%uC0C1%uD0DC%60%29%uC5D0%uC11C%20%uD31D%20%uC5F0%uC0B0%uC744%20%uD638%uCD9C%uD558%uBA74%20%uC5B4%uB5BB%uAC8C%20%uB418%uC57C%uD560%uAE4C%3F%20%uC544%uB9C8%uB3C4%20%uC544%uBB34%uC790%uB8CC%uAC00%20%uC5C6%uC73C%uB2C8%20%uC81C%uAC70%uD560%20%uC790%uB8CC%uAC00%20%uC5C6%uB294%20%uC0C1%uD669%uC774%20%uB420%20%uAC83%uC774%uB2E4.%20%uC774%uB7F0%20%uC0C1%uD669%uC744%20%60underflow%60%uD604%uC0C1%uC774%uB77C%uACE0%20%uB9D0%uD55C%uB2E4.%0A%0A%23%23%23%23%uD53C%uD06C%28peek%29%uC5F0%uC0B0.%0A%0A%uD31D%uACFC%20%uC720%uC0AC%uD55C%20%uC5F0%uC0B0%uC774%uB2E4.%20%uADF8%uB7EC%uB098%20%uC790%uB8CC%uB97C%20%uC81C%uAC70%uD558%uC9C0%uC54A%uACE0%20%uB2E8%uC9C0%20%uBC18%uD658%uB9CC%20%uBC1B%uC744%20%uC218%20%uC788%uB2E4%uB294%20%uC810%uC5D0%uC11C%20%uCC28%uC774%uAC00%20%uC788%uB2E4.%0A%0A%7C**%20%20**%7C%0A%7C**C**%7C%20%20%20%20%3C-%20top%20/%20-%3E%20peek%0A%7C**B**%7C%0A%7C**A**%7C%0A%0A%7C**%20%20**%7C%0A%7C**C**%7C%20%20%3C-%20top%0A%7C**B**%7C%0A%7C**A**%7C%0A%0A%uD0D1%uC744%20%uC774%uC6A9%uD558%uC5EC%20%uC2A4%uD0DD%uC758%20%uCD5C%uC0C1%uC704%uC5D0%20%uC788%uB294%20%uAC00%uC7A5%20%uCD5C%uADFC%uC5D0%20%uC0BD%uC785%uB41C%20%uC790%uB8CC%uB97C%20%uBC18%uD658%uD55C%uB2E4.%20%uC624%uC9C1%20%uBC18%uD658%uB9CC%20%uD55C%uB2E4%uB294%20%uC810%uC5D0%20%uC8FC%uBAA9%uD558%uB77C.%0A%0A%23%23%23%uC2A4%uD0DD%uC758%20%uCD94%uC0C1%20%uC790%uB8CC%uD615%0A%0A%uC2A4%uD0DD%uC744%20%uC2E4%uC81C%20%uC0AC%uC6A9%uD558%uAE30%20%uC704%uD574%uC11C%uB294%20%uB2E4%uC74C%20%uD45C%uC5D0%20%uC788%uB294%20%uAE30%uB2A5%uB4E4%uC774%20%uD544%uC694%uD558%uB2E4.%0A%0A%7C%uC774%uB984%7COperation%7CInput%7COutput%7C%0A%7C%3A--%7C%3A%7C%3A--%7C%3A--%7C%0A%7C%uC2A4%uD0DD%20%uC0DD%uC131%7CcreateStack%28%29%7C%uC2A4%uD0DD%uC758%20%uD06C%uAE30%20n%7C%uC2A4%uD0DD%20s%7C%0A%7C%uC2A4%uD0DD%20%uC0AD%uC81C%7CdeleteStack%28%29%7C%uC2A4%uD0DD%20s%7CN/A%7C%0A%7C%uC6D0%uC18C%20%uCD94%uAC00%20%uAC00%uB2A5%20%uC5EC%uBD80%7CisFull%28%29%7C%uC2A4%uD0DD%20s%7CT/F%7C%0A%7C%uACF5%uBC31%20%uC2A4%uD0DD%uC778%uC9C0%20%uC5EC%uBD80%7CisEmpty%28%29%7C%uC2A4%uD0DD%20s%7CT/F%7C%0A%7C%uD478%uC2A4%7Cpush%28%29%7C%uC2A4%uD0DD%20s%2C%20%uC6D0%uC18C%20e%7C%uC131%uACF5/%uC2E4%uD328%20%uC5EC%uBD80%7C%0A%7C%uD31D%7Cpop%28%29%7C%uC2A4%uD0DD%20s%7C%uC6D0%uC18C%20e%7C%0A%7C%uD53C%uD06C%7Cpeek%28%29%7C%uC2A4%uD0DD%20s%7C%uC6D0%uC18C%20e%7C&lt;/center&gt;
&lt;br /&gt;&lt;/en-note&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</description>
      <category>Engineering</category>
      <category>data</category>
      <category>stack</category>
      <category>structure</category>
      <category>데이터구조</category>
      <category>스택</category>
      <category>자료구조</category>
      <category>태그를 입력해 주세요.</category>
      <category>팝</category>
      <category>푸시</category>
      <category>피크</category>
      <author>youngkyu.cho</author>
      <guid isPermaLink="true">https://youngkyu.tistory.com/27</guid>
      <comments>https://youngkyu.tistory.com/27#entry27comment</comments>
      <pubDate>Fri, 7 Nov 2014 22:49:13 +0900</pubDate>
    </item>
    <item>
      <title>Introducing. List. / 리스트 자료구조</title>
      <link>https://youngkyu.tistory.com/26</link>
      <description>&lt;en-note lang=&quot;v2&quot; style=&quot;line-height: 1.6; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;&quot; xml:lang=&quot;v2&quot;&gt;
&lt;del style=&quot;position:relative;display:block&quot;&gt;&lt;a style=&quot;position: absolute;color: #FFF;text-decoration: none;font-size: 12px;height: 25px;border-radius: 0;margin-top: -20px;right: 15px;background: rgba(0, 0, 0, 0);border-left: 10px solid #BB3A34;border-right: 10px solid #BB3A34;border-bottom: 5px solid rgba(0, 0, 0, 0);width: 0;text-indent:-100000px;&quot; href=&quot;http://marxi.co/#/?provider=evernote_int&amp;amp;guid=a9160d54-bb1b-4dc6-94b8-d5d92b8e5ca8&quot;&gt;Edit&lt;/a&gt;&lt;/del&gt;
&lt;div style=&quot;line-height: 1.6; font-family: Helvetica Neue, Arial, Hiragino Sans GB, STHeiti, Microsoft YaHei, WenQuanYi Micro Hei, SimSun, Song, sans-serif;&quot;&gt;
&lt;h1 style=&quot;font-size: 36px; margin: 0.67em 0; font-family: inherit; font-weight: bold; line-height: 1.1; color: inherit; margin-top: 0px; margin-bottom: 20px;&quot;&gt;Introducing. List.&lt;/h1&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;본 스터디는 &lt;em style=&quot;margin-top: 0px;&quot;&gt;열혈강의 자료구조 - 프리렉&lt;/em&gt;이란 교재로 진행된다. 더욱 자세한 내용은 해당 책을 참고하기 바란다. 정말 괜찮은 책이다.&lt;/p&gt;
&lt;hr style=&quot;-moz-box-sizing: content-box; box-sizing: content-box; height: 0; line-height: 1.6; margin-top: 20px; margin-bottom: 20px; border: 0; border-top: 1px solid rgba(102, 128, 153, 0.15);&quot;&gt;
&lt;h2 style=&quot;font-family: inherit; font-weight: bold; line-height: 1.1; color: inherit; margin-top: 30px; margin-bottom: 20px; font-size: 30px;&quot;&gt;Introducing. List.&lt;/h2&gt;
&lt;h3 style=&quot;font-family: inherit; font-weight: bold; line-height: 1.1; color: inherit; margin-top: 30px; margin-bottom: 20px; font-size: 24px;&quot;&gt;리스트 자료구조.&lt;/h3&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;strong style=&quot;font-weight: bold; margin-top: 0px;&quot;&gt;리스트&lt;/strong&gt; : 가장 단순한 자료구조지만 가장 널리 사용되고 기초적인 자료구조. 스택, 큐, 트리, 그래프 등 다른 여러 자료구조 구현에도 사용됨.&lt;/p&gt;&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;리스트는 자료가 &lt;em style=&quot;margin-top: 0px;&quot;&gt;Sequential하게&lt;/em&gt; 연결된 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px;&quot;&gt;선형구조&lt;/code&gt;를 의미.&lt;/p&gt;&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;em style=&quot;margin-top: 0px;&quot;&gt;배열&lt;/em&gt;은 가장 쉬운 &lt;em&gt;리스트 자료구조&lt;/em&gt;이다.&lt;/p&gt;
&lt;h3 style=&quot;font-family: inherit; font-weight: bold; line-height: 1.1; color: inherit; margin-top: 30px; margin-bottom: 20px; font-size: 24px;&quot;&gt;자료의 제거.&lt;/h3&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;예를 들어 배열(Array)에 자료가 순서대로 정리되어 있다 생각해 보자.&lt;/p&gt;&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;|&lt;strong style=&quot;font-weight: bold; margin-top: 0px;&quot;&gt;A&lt;/strong&gt;|&lt;strong style=&quot;font-weight: bold;&quot;&gt;B&lt;/strong&gt;|&lt;strong style=&quot;font-weight: bold;&quot;&gt;C&lt;/strong&gt;|&lt;strong style=&quot;font-weight: bold;&quot;&gt;D&lt;/strong&gt;|&lt;strong style=&quot;font-weight: bold;&quot;&gt;E&lt;/strong&gt;|&lt;/p&gt;&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;여기에서 내가 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px; margin-top: 0px;&quot;&gt;C&lt;/code&gt;를 제거하게되면, 그 자리가 비게되고, 그걸 매꾸기위해 뒤에서부터 차례대로 한칸씩 앞으로 밀어줘야한다.&lt;/p&gt;&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;|&lt;strong style=&quot;font-weight: bold; margin-top: 0px;&quot;&gt;A&lt;/strong&gt;|&lt;strong style=&quot;font-weight: bold;&quot;&gt;B&lt;/strong&gt;| |&lt;strong style=&quot;font-weight: bold;&quot;&gt;D&lt;/strong&gt;|&lt;strong style=&quot;font-weight: bold;&quot;&gt;E&lt;/strong&gt;| =&amp;gt; |&lt;strong style=&quot;font-weight: bold;&quot;&gt;A&lt;/strong&gt;|&lt;strong style=&quot;font-weight: bold;&quot;&gt;B&lt;/strong&gt;|&lt;strong style=&quot;font-weight: bold;&quot;&gt;D&lt;/strong&gt;|&lt;strong style=&quot;font-weight: bold;&quot;&gt;E&lt;/strong&gt;| |&lt;/p&gt;&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;em style=&quot;margin-top: 0px;&quot;&gt;3번째 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px; margin-top: 0px;&quot;&gt;C&lt;/code&gt;자리게 계속 그냥 비어있어도 되지 않을까?&lt;/em&gt;&lt;br /&gt;
그런데 그렇게 되면 문제가 생긴다. 배열상에 공간이 있지만 그 공간이 비어있는지를 확인할 수 없어 그 자리에 자료를 추가하기가 힘들어진다.&lt;/p&gt;
&lt;h3 style=&quot;font-family: inherit; font-weight: bold; line-height: 1.1; color: inherit; margin-top: 30px; margin-bottom: 20px; font-size: 24px;&quot;&gt;자료의 추가.&lt;/h3&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;마찬가지 예시를 보며 확인해 보자.&lt;/p&gt;&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;|&lt;strong style=&quot;font-weight: bold; margin-top: 0px;&quot;&gt;A&lt;/strong&gt;|&lt;strong style=&quot;font-weight: bold;&quot;&gt;B&lt;/strong&gt;|&lt;strong style=&quot;font-weight: bold;&quot;&gt;C&lt;/strong&gt;|&lt;strong style=&quot;font-weight: bold;&quot;&gt;D&lt;/strong&gt;|&lt;strong style=&quot;font-weight: bold;&quot;&gt;E&lt;/strong&gt;|&lt;/p&gt;&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;여기에 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px; margin-top: 0px;&quot;&gt;X&lt;/code&gt;를 추가하고 싶다고 하자. 하필 추가하고 싶은 곳이 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px;&quot;&gt;C&lt;/code&gt;와 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px;&quot;&gt;D&lt;/code&gt; 사이라면 어떨까?&lt;/p&gt;&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;|&lt;strong style=&quot;font-weight: bold; margin-top: 0px;&quot;&gt;A&lt;/strong&gt;|&lt;strong style=&quot;font-weight: bold;&quot;&gt;B&lt;/strong&gt;|&lt;strong style=&quot;font-weight: bold;&quot;&gt;C&lt;/strong&gt;|&lt;strong style=&quot;font-weight: bold;&quot;&gt;D&lt;/strong&gt;|&lt;strong style=&quot;font-weight: bold;&quot;&gt;E&lt;/strong&gt;| |&lt;br /&gt;
|&lt;strong style=&quot;font-weight: bold;&quot;&gt;A&lt;/strong&gt;|&lt;strong style=&quot;font-weight: bold;&quot;&gt;B&lt;/strong&gt;|&lt;strong style=&quot;font-weight: bold;&quot;&gt;C&lt;/strong&gt;| |&lt;strong style=&quot;font-weight: bold;&quot;&gt;D&lt;/strong&gt;|&lt;strong style=&quot;font-weight: bold;&quot;&gt;E&lt;/strong&gt;|&lt;br /&gt;
|&lt;strong style=&quot;font-weight: bold;&quot;&gt;A&lt;/strong&gt;|&lt;strong style=&quot;font-weight: bold;&quot;&gt;B&lt;/strong&gt;|&lt;strong style=&quot;font-weight: bold;&quot;&gt;C&lt;/strong&gt;|&lt;strong style=&quot;font-weight: bold;&quot;&gt;X&lt;/strong&gt;|&lt;strong style=&quot;font-weight: bold;&quot;&gt;D&lt;/strong&gt;|&lt;strong style=&quot;font-weight: bold;&quot;&gt;E&lt;/strong&gt;|&lt;/p&gt;&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;먼저 한칸씩 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px; margin-top: 0px;&quot;&gt;D&lt;/code&gt;와 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px;&quot;&gt;E&lt;/code&gt;를 밀어서 자리를 확보한다. 물론 이때 배열에 여유 공간이 있어야 한다. 없다면 추가가 불가능하다. 그리고 삽입하면 끝.&lt;/p&gt;
&lt;h3 style=&quot;font-family: inherit; font-weight: bold; line-height: 1.1; color: inherit; margin-top: 30px; margin-bottom: 20px; font-size: 24px;&quot;&gt;리스트 자료구조의 포인터를 이용한 구현.&lt;/h3&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;리스트 자료구조는 아래 모식도와 같이 포인터를 이용하여 구현도 가능하다. 포인터로 구현시 배열과 달리 고정된 사이즈가 아니므로, 동적으로 할당하여 제한 없이 자료를 저장할 수 있다. 뿐만 아니라 중간에 있는 자료를 제거하거나 추가할 때, 포인터만 재설정하면 되므로 배열 리스트에서 처럼 중간 공백을 없애기 위한 자료의 이동도 불필요하다.&lt;/p&gt;
&lt;h3 style=&quot;font-family: inherit; font-weight: bold; line-height: 1.1; color: inherit; margin-top: 30px; margin-bottom: 20px; font-size: 24px;&quot;&gt;리스트의 추상 자료형.&lt;/h3&gt;
&lt;table style=&quot;border-collapse: collapse; border-spacing: 0; margin-bottom: 20px;&quot;&gt;
&lt;thead style=&quot;margin-top: 0px;&quot;&gt;
&lt;tr style=&quot;margin-top: 0px;&quot;&gt;
&lt;th style=&quot;text-align: right; padding: 8px; line-height: 20px; vertical-align: top; border: 1px solid #DDD; margin-top: 0px;&quot;&gt;&lt;/th&gt;
&lt;th style=&quot;text-align: center; padding: 8px; line-height: 20px; vertical-align: top; border: 1px solid #DDD;&quot;&gt;Operation&lt;/th&gt;
&lt;th style=&quot;text-align: left; padding: 8px; line-height: 20px; vertical-align: top; border: 1px solid #DDD;&quot;&gt;입력(input)&lt;/th&gt;
&lt;th style=&quot;text-align: left; padding: 8px; line-height: 20px; vertical-align: top; border: 1px solid #DDD;&quot;&gt;출력(Output)&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr style=&quot;margin-top: 0px;&quot;&gt;
&lt;td style=&quot;text-align: right; padding: 8px; line-height: 20px; vertical-align: top; border: 1px solid #DDD; margin-top: 0px;&quot;&gt;&lt;strong style=&quot;font-weight: bold; margin-top: 0px;&quot;&gt;리스트 생성&lt;/strong&gt;&lt;/td&gt;
&lt;td style=&quot;text-align: center; padding: 8px; line-height: 20px; vertical-align: top; border: 1px solid #DDD;&quot;&gt;createList()&lt;/td&gt;
&lt;td style=&quot;text-align: left; padding: 8px; line-height: 20px; vertical-align: top; border: 1px solid #DDD;&quot;&gt;최대 원소 개수 n&lt;/td&gt;
&lt;td style=&quot;text-align: left; padding: 8px; line-height: 20px; vertical-align: top; border: 1px solid #DDD;&quot;&gt;리스트 l&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;text-align: right; padding: 8px; line-height: 20px; vertical-align: top; border: 1px solid #DDD; margin-top: 0px;&quot;&gt;&lt;strong style=&quot;font-weight: bold; margin-top: 0px;&quot;&gt;리스트 삭제&lt;/strong&gt;&lt;/td&gt;
&lt;td style=&quot;text-align: center; padding: 8px; line-height: 20px; vertical-align: top; border: 1px solid #DDD;&quot;&gt;deleteList()&lt;/td&gt;
&lt;td style=&quot;text-align: left; padding: 8px; line-height: 20px; vertical-align: top; border: 1px solid #DDD;&quot;&gt;리스트 l&lt;/td&gt;
&lt;td style=&quot;text-align: left; padding: 8px; line-height: 20px; vertical-align: top; border: 1px solid #DDD;&quot;&gt;N/A&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;text-align: right; padding: 8px; line-height: 20px; vertical-align: top; border: 1px solid #DDD; margin-top: 0px;&quot;&gt;&lt;strong style=&quot;font-weight: bold; margin-top: 0px;&quot;&gt;원소 추가 가능 여부&lt;/strong&gt;&lt;/td&gt;
&lt;td style=&quot;text-align: center; padding: 8px; line-height: 20px; vertical-align: top; border: 1px solid #DDD;&quot;&gt;isFull()&lt;/td&gt;
&lt;td style=&quot;text-align: left; padding: 8px; line-height: 20px; vertical-align: top; border: 1px solid #DDD;&quot;&gt;리스트 l&lt;/td&gt;
&lt;td style=&quot;text-align: left; padding: 8px; line-height: 20px; vertical-align: top; border: 1px solid #DDD;&quot;&gt;T/F&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;text-align: right; padding: 8px; line-height: 20px; vertical-align: top; border: 1px solid #DDD; margin-top: 0px;&quot;&gt;&lt;strong style=&quot;font-weight: bold; margin-top: 0px;&quot;&gt;원소 추가&lt;/strong&gt;&lt;/td&gt;
&lt;td style=&quot;text-align: center; padding: 8px; line-height: 20px; vertical-align: top; border: 1px solid #DDD;&quot;&gt;addElement()&lt;/td&gt;
&lt;td style=&quot;text-align: left; padding: 8px; line-height: 20px; vertical-align: top; border: 1px solid #DDD;&quot;&gt;리스트 l, 원소 위치 p, 원소 e&lt;/td&gt;
&lt;td style=&quot;text-align: left; padding: 8px; line-height: 20px; vertical-align: top; border: 1px solid #DDD;&quot;&gt;성공 or 실패 여부(T/F)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;text-align: right; padding: 8px; line-height: 20px; vertical-align: top; border: 1px solid #DDD; margin-top: 0px;&quot;&gt;&lt;strong style=&quot;font-weight: bold; margin-top: 0px;&quot;&gt;원소 제거&lt;/strong&gt;&lt;/td&gt;
&lt;td style=&quot;text-align: center; padding: 8px; line-height: 20px; vertical-align: top; border: 1px solid #DDD;&quot;&gt;removeElement()&lt;/td&gt;
&lt;td style=&quot;text-align: left; padding: 8px; line-height: 20px; vertical-align: top; border: 1px solid #DDD;&quot;&gt;리스트 l, 원소 위치 p&lt;/td&gt;
&lt;td style=&quot;text-align: left; padding: 8px; line-height: 20px; vertical-align: top; border: 1px solid #DDD;&quot;&gt;성공 or 실패 여부(T/F)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;text-align: right; padding: 8px; line-height: 20px; vertical-align: top; border: 1px solid #DDD; margin-top: 0px;&quot;&gt;&lt;strong style=&quot;font-weight: bold; margin-top: 0px;&quot;&gt;리스트 초기화&lt;/strong&gt;&lt;/td&gt;
&lt;td style=&quot;text-align: center; padding: 8px; line-height: 20px; vertical-align: top; border: 1px solid #DDD;&quot;&gt;clearList()&lt;/td&gt;
&lt;td style=&quot;text-align: left; padding: 8px; line-height: 20px; vertical-align: top; border: 1px solid #DDD;&quot;&gt;리스트 l&lt;/td&gt;
&lt;td style=&quot;text-align: left; padding: 8px; line-height: 20px; vertical-align: top; border: 1px solid #DDD;&quot;&gt;N/A&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;text-align: right; padding: 8px; line-height: 20px; vertical-align: top; border: 1px solid #DDD; margin-top: 0px;&quot;&gt;&lt;strong style=&quot;font-weight: bold; margin-top: 0px;&quot;&gt;원소 갯수&lt;/strong&gt;&lt;/td&gt;
&lt;td style=&quot;text-align: center; padding: 8px; line-height: 20px; vertical-align: top; border: 1px solid #DDD;&quot;&gt;getListLength()&lt;/td&gt;
&lt;td style=&quot;text-align: left; padding: 8px; line-height: 20px; vertical-align: top; border: 1px solid #DDD;&quot;&gt;리스트 l&lt;/td&gt;
&lt;td style=&quot;text-align: left; padding: 8px; line-height: 20px; vertical-align: top; border: 1px solid #DDD;&quot;&gt;원소의 개수&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;text-align: right; padding: 8px; line-height: 20px; vertical-align: top; border: 1px solid #DDD; margin-top: 0px;&quot;&gt;&lt;strong style=&quot;font-weight: bold; margin-top: 0px;&quot;&gt;원소 반환&lt;/strong&gt;&lt;/td&gt;
&lt;td style=&quot;text-align: center; padding: 8px; line-height: 20px; vertical-align: top; border: 1px solid #DDD;&quot;&gt;getElement()&lt;/td&gt;
&lt;td style=&quot;text-align: left; padding: 8px; line-height: 20px; vertical-align: top; border: 1px solid #DDD;&quot;&gt;리스트 l, 원소 위치 p&lt;/td&gt;
&lt;td style=&quot;text-align: left; padding: 8px; line-height: 20px; vertical-align: top; border: 1px solid #DDD;&quot;&gt;원소 e&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;em style=&quot;margin-top: 0px;&quot;&gt;책 저자가 객체 지향 프로그래머라 그 스타일을 쓰려고 하는지, 굳이 동적으로 배열을 할당하고 해제한다. 깊이 담긴 이유는 모르겠다. 그냥 미리 선언된 배열로 해도 되는데.&lt;/em&gt;&lt;/p&gt;&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;인덱스는 0번부터 시작(&lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px; margin-top: 0px;&quot;&gt;0-based-index&lt;/code&gt;)하는게 원칙이다. 따라서 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px;&quot;&gt;원소 위치 p&lt;/code&gt;는 0번부터 시작해야한다.&lt;br /&gt;
그리고 디버깅 용도로 사용할 전체 원소를 보여주는 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px;&quot;&gt;displayList()&lt;/code&gt;등이 필요할 수도 있다.&lt;/p&gt;
&lt;/div&gt;&lt;/en-note&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</description>
      <category>Engineering</category>
      <category>data</category>
      <category>structure</category>
      <category>데이터구조</category>
      <category>리스트</category>
      <category>배열</category>
      <category>연결리스트</category>
      <category>자료구조</category>
      <author>youngkyu.cho</author>
      <guid isPermaLink="true">https://youngkyu.tistory.com/26</guid>
      <comments>https://youngkyu.tistory.com/26#entry26comment</comments>
      <pubDate>Fri, 7 Nov 2014 22:48:03 +0900</pubDate>
    </item>
    <item>
      <title>TF-IDF(Term Frequency - Inverse Document Frequency) / 단어 빈도와 역문서 빈도.</title>
      <link>https://youngkyu.tistory.com/25</link>
      <description>&lt;en-note lang=&quot;v2&quot; style=&quot;line-height:1.6;&quot;&gt;&lt;del style=&quot;position:relative;display:block&quot;&gt;&lt;a style=&quot;position: absolute;color: #FFF;text-decoration: none;font-size: 12px;height: 25px;border-radius: 0;margin-top: -20px;right: 15px;background: rgba(0, 0, 0, 0);border-left: 10px solid #BB3A34;border-right: 10px solid #BB3A34;border-bottom: 5px solid rgba(0, 0, 0, 0);width: 0;text-indent:-100000px;&quot; href=&quot;http://marxi.co/#/?provider=evernote_int&amp;amp;guid=8f6cc6a6-6514-4814-a9eb-e7e97b3107cf&quot;&gt;Edit&lt;/a&gt;&lt;/del&gt;&lt;div style=&quot;line-height: 1.6; font-family: Helvetica Neue, Arial, Hiragino Sans GB, STHeiti, Microsoft YaHei, WenQuanYi Micro Hei, SimSun, Song, sans-serif;&quot;&gt;
&lt;h1 style=&quot;font-size: 36px; margin: 0.67em 0; font-family: inherit; font-weight: bold; line-height: 1.1; color: inherit; margin-top: 0px; margin-bottom: 20px;&quot;&gt;TF-IDF(Term Frequency - Inverse Document Frequency) / 단어 빈도와 역문서 빈도.&lt;/h1&gt;
&lt;hr style=&quot;-moz-box-sizing: content-box; box-sizing: content-box; height: 0; line-height: 1.6; margin-top: 20px; margin-bottom: 20px; border: 0; border-top: 1px solid rgba(102, 128, 153, 0.15);&quot;&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;뉴스 추천 알고리즘을 설계하면서 초기에는 크게 고려하지 않았지만 차차 고려하게된 부분이 바로 이 TF-IDF이다. 뉴스 추천을 하기위해 각 기사에 들어있는 단어들(키워드 혹은 엔티티들)을 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px; margin-top: 0px;&quot;&gt;은전한닢&lt;/code&gt;이라는 형태소 분석기를 사용하여 분리했는데, 이 형태소 분석기의 단어 분류가 정확하지 못해 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px;&quot;&gt;은전한닢&lt;/code&gt;이 자체 제공하는 단어 분류 tag만으로는 제대로 분리할 수 없었다. 이를 보완하기 위해 모든 &lt;strong style=&quot;font-weight: bold;&quot;&gt;명사&lt;/strong&gt;단어들을 뽑아내려고 했는데, 이때 의미없는 엔티티가 포함될 확률이 매우 높았다. 이것을 해결하기 위해 고민하던 중 정보검색 분야에서 사용되는 TF-IDF를 알게 되었다.&lt;/p&gt;
&lt;h2 style=&quot;font-family: inherit; font-weight: bold; line-height: 1.1; color: inherit; margin-top: 30px; margin-bottom: 20px; font-size: 30px;&quot;&gt;TF-IDF(Term Frequency - Inverse Document Frequency)&lt;/h2&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;보통 정보 검색이나 텍스트 마이닝에서 주로 사용한다. 이것을 이용하면 해당 엔티티(단어)가 가지는 중요도를 알아낼 수 있다. 어떤 단어가 특정 문서 내에서 얼마나 중요한 것인지를 표현해 주기 때문이다.&lt;/p&gt;&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;TF는 단어빈도로, 특정 단어가 문서내에 얼만큼의 빈도로 등장하는지를 나타낸다. 당연하게도 문서에 자주 등장하는 엔티티라면 엔티티로서의 값어치가 높다고 예상할 수 있다. 매우 직관적으로 이해할 수 있는 관계다.&lt;/p&gt;&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;IDF는 문서 빈도의 역수다. 전체 문서 갯수를 해당 엔티티가 포함된 문서의 갯수로 나누는 것이다. 이것은 해당 문서군의 특징을 보여주는 척도가 될 수 있다. 어떤 문서 내에 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px; margin-top: 0px;&quot;&gt;클라라&lt;/code&gt;라는 단어가 자주 등장했다고 생각해보자. 아마 이 문서군은 연애 기사들의 모음일 가능성이 충분히 있을 것이다. 따라서 이 값을 통하여 해당 문서군에서 가치 있는 엔티티를 찾아낼 수 있는데, 만약 해당 문서군에서 드물게 등장하는 단어가 무엇인지 알수 있다면, 아마 그 단어가 어떤 그 문서군에서 특정 한 문서를 유니크 할 수 있도록 해주고, 눈에 띄게해주는 단어일 확률이 높기 때문이다.&lt;/p&gt;
&lt;h2 style=&quot;font-family: inherit; font-weight: bold; line-height: 1.1; color: inherit; margin-top: 30px; margin-bottom: 20px; font-size: 30px;&quot;&gt;구하는 법.&lt;/h2&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;TF-IDF는 단어빈도와 역문서 빈도의 곱이다. 처음 접할 때는 -가 있어서 둘이 빼는 건가 했는데 그게 아니었다.&lt;/p&gt;
&lt;h3 style=&quot;font-family: inherit; font-weight: bold; line-height: 1.1; color: inherit; margin-top: 30px; margin-bottom: 20px; font-size: 24px;&quot;&gt;Term Frequency&lt;/h3&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;두 값을 산출하는 방법에는 여러가지가 있는데, 단어를 나타내는 id값을 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px; margin-top: 0px;&quot;&gt;t&lt;/code&gt;라고 하고, 문서(도큐먼트)에 특정히 할당된 id값을 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px;&quot;&gt;d&lt;/code&gt;라고 해보자. 말이 어려운데 간단하게 말하면 그 문서 일련번호고, 단어 일련번호다.&lt;/p&gt;&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;그리고 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px; margin-top: 0px;&quot;&gt;d&lt;/code&gt;와 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px;&quot;&gt;t&lt;/code&gt;를 입력 받아 단어 빈도를 계산하는 함수 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px;&quot;&gt;tf()&lt;/code&gt;를 생각해보자. &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px;&quot;&gt;tf(t,d)&lt;/code&gt;라 쓸 수 있을 것이다. &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px;&quot;&gt;tf(t,d)&lt;/code&gt;를 내부적으로 구현하는 방법은 여러가지다. &lt;/p&gt;&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;그중 가장 간단한 아이디어를 보자. 당연하게도 단어 빈도이므로, &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px; margin-top: 0px;&quot;&gt;d&lt;/code&gt;문서 내의 단어 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px;&quot;&gt;t&lt;/code&gt;의 총빈도를 구해주는 함수를 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px;&quot;&gt;f(t,d)&lt;/code&gt;라 하면, 이는 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px;&quot;&gt;tf(t,d)&lt;/code&gt;와 같은 함수라 생각할 수 있다. 그러나 이 값은 너무 커질 수도 있고 정규화가 전혀 되지 못한 값이라 다루기 불편하다. 예를들면 그 문서에 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px;&quot;&gt;애플&lt;/code&gt;이 10번 나오면 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px;&quot;&gt;10&lt;/code&gt;을 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px;&quot;&gt;tf()값&lt;/code&gt;으로 쓰는 것이다. 더 커지면 어쩌나.. 따라서 조금 더 발전된 방법이 필요할 수 있다. 사실 필자는 이 아이디어 그대로를 유사 기사를 묶는 기능의 코드에서 사용하였는데, 간단한 아이디어임에도 매우 높은 정확도를 보여주었다.&lt;/p&gt;&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;다른 방법으로는 &lt;strong style=&quot;font-weight: bold; margin-top: 0px;&quot;&gt;불린 빈도&lt;/strong&gt;라는 방식이 있다. 단어 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px;&quot;&gt;t&lt;/code&gt;가 도큐먼트 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px;&quot;&gt;d&lt;/code&gt;에 한번이라도 나타나면 1, 나타나지 않으면 0으로 표기하는 방법이다. 이 방법의 단점은 아무래도 한번 나타난 애나, 3번 나타난 애나 똑같은 무게를 가진다는 점일 것이다.&lt;/p&gt;&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;숫자가 너무 커질 수 있으므로 작게 만드는 매우 기본적인 아이디어는 로그다. log를 씌우게 되면 매우 작은 수로 숫자를 바꿀 수 있다. 이를 &lt;strong style=&quot;font-weight: bold; margin-top: 0px;&quot;&gt;로그 스케일 빈도&lt;/strong&gt;라 한다.&lt;/p&gt;&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;strong style=&quot;font-weight: bold; margin-top: 0px;&quot;&gt;증가 빈도&lt;/strong&gt;라는 것도 있는데, 이것은 문서의 길이에 따른 단어의 상대적 빈도를 표현해주는 방식이다. 이 방식을 이용하면 스케일이 최대 1로 고정되는 효과를 얻을 수 있다. 실제로 필자가 뉴스 추천를 위해 엔티티의 TF-IDF를 구현하면서 사용한 방식이기도 하다. 수학 식은 따로 있지만 이해하기 좋도록 한국말(?)로 적었다.&lt;/p&gt;
&lt;pre style=&quot;overflow: initial; font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 14px; display: block; padding: 0; margin: 0 0 10px; line-height: 1.6; word-break: break-all; word-wrap: break-word; color: #333333; background-color: #f5f5f5; border: none; border-radius: 0; white-space: pre-wrap;&quot;&gt;&lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: inherit; padding: 0; color: inherit; background-color: transparent; white-space: pre-wrap; border-radius: 0; margin-top: 0px;&quot;&gt;tf(t,d) = 0.5 + 0.5 x f(t,d) / (문서 내 단어들의 f(t,d) 값 중 최댓값) 
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 style=&quot;font-family: inherit; font-weight: bold; line-height: 1.1; color: inherit; margin-top: 30px; margin-bottom: 20px; font-size: 24px;&quot;&gt;Inversed Document Frequency&lt;/h3&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;역문서 빈도는 단어가 문서 집합 내에서 얼마나 자주 등장하는지를 나타낸다. 전체 문서 중 발생하는 빈도를 역수 취한 값으로,  역수를 취하다 보니 값이 무한히 커질 수 있기에 이를 방지하려고 log를 씌워 값을 줄인다.&lt;/p&gt;&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px; margin-top: 0px;&quot;&gt;D&lt;/code&gt;는 전체 문서들의 집합을 의미한다.&lt;/p&gt;
&lt;pre style=&quot;overflow: initial; font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 14px; display: block; padding: 0; margin: 0 0 10px; line-height: 1.6; word-break: break-all; word-wrap: break-word; color: #333333; background-color: #f5f5f5; border: none; border-radius: 0; white-space: pre-wrap;&quot;&gt;&lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: inherit; padding: 1em; color: #333; background-color: transparent; white-space: pre-wrap; border-radius: 0; display: block; background: #F6F6F6; margin-top: 0px;&quot;&gt;idf(t,D) = &lt;span style=&quot;color: #0086b3; margin-top: 0px;&quot;&gt;log&lt;/span&gt; ( 전체 문서의 갯수 / 단어 t가 포함된 문서의 수 )
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 style=&quot;font-family: inherit; font-weight: bold; line-height: 1.1; color: inherit; margin-top: 30px; margin-bottom: 20px; font-size: 24px;&quot;&gt;TF-IDF&lt;/h3&gt;
&lt;pre style=&quot;overflow: initial; font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 14px; display: block; padding: 0; margin: 0 0 10px; line-height: 1.6; word-break: break-all; word-wrap: break-word; color: #333333; background-color: #f5f5f5; border: none; border-radius: 0; white-space: pre-wrap;&quot;&gt;&lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: inherit; padding: 0; color: inherit; background-color: transparent; white-space: pre-wrap; border-radius: 0; margin-top: 0px;&quot;&gt;tfidf(t,d,D) = tf(t,d) x idf(t,D)
&lt;/code&gt;&lt;/pre&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;간단히 구한 두개의 함수를 곱하면 된다. 특정 문서 내에서 단어 빈도가 높고, 전체 문서에서 그 단어가 포함된 문서가 적다면 이 값은 높아진다. 따라서 이 값을 이용하면 흔한 단어를 걸러 낼 수 있다. 특정 단어를 포함하는 문서가 많을수록 로그안의 값(&lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px; margin-top: 0px;&quot;&gt;idf()&lt;/code&gt;에서)이 1에 가까워지게 되고, 이 경우 TF-IDF 값은 0에 가까워지게 된다.&lt;/p&gt;
&lt;h3 style=&quot;font-family: inherit; font-weight: bold; line-height: 1.1; color: inherit; margin-top: 30px; margin-bottom: 20px; font-size: 24px;&quot;&gt;실제로 구현하고 사용하며.&lt;/h3&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;파이썬으로 구현시 생각보다 매우 간단하게 구현이 가능하다. 그 값은 무한정 커질 수 있을 것 같았는데 5를 넘는 경우가 없었다. 이것은 문서 집합의 특성에 따라 달라 질 수 있다. 또 로그를 사용할 때 밑이 무슨 로그인지에 따라 다를 수 있다. 필자는 밑이 10인 상용로그를 취해주었다. 사실 이것은 상대적인 비교이므로 밑이 몇인 로그를 취하는가는 그렇게 중요한 문제는 아니라 생각된다. 아래는 필자의 코드다. 현재는 이것보다 훨씬 리팩토링 되어 본래의 구조를 조금 잃었지만, 이게 처음 짰을 때 코드다.&lt;/p&gt;
&lt;pre style=&quot;overflow: initial; font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 14px; display: block; padding: 0; margin: 0 0 10px; line-height: 1.6; word-break: break-all; word-wrap: break-word; color: #333333; background-color: #f5f5f5; border: none; border-radius: 0; white-space: pre-wrap;&quot;&gt;&lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: inherit; padding: 1em; color: #333; background-color: transparent; white-space: pre-wrap; border-radius: 0; display: block; background: #F6F6F6; margin-top: 0px;&quot;&gt;&lt;span style=&quot;margin-top: 0px;&quot;&gt;&lt;span style=&quot;color: #333; font-weight: bold; margin-top: 0px;&quot;&gt;def&lt;/span&gt; &lt;span style=&quot;color: #900; font-weight: bold;&quot;&gt;f&lt;/span&gt;&lt;span&gt;(t,d)&lt;/span&gt;:&lt;/span&gt;
    &lt;span style=&quot;color: #333; font-weight: bold;&quot;&gt;return&lt;/span&gt; float(article_entity_count_dict[d][t])

&lt;span&gt;&lt;span style=&quot;color: #333; font-weight: bold; margin-top: 0px;&quot;&gt;def&lt;/span&gt; &lt;span style=&quot;color: #900; font-weight: bold;&quot;&gt;tf&lt;/span&gt;&lt;span&gt;(t,d)&lt;/span&gt;:&lt;/span&gt;
    &lt;span style=&quot;color: #333; font-weight: bold;&quot;&gt;return&lt;/span&gt; &lt;span style=&quot;color: #099;&quot;&gt;0.5&lt;/span&gt; + ((&lt;span style=&quot;color: #099;&quot;&gt;0.5&lt;/span&gt;) * f(t, d) / max([f(w, d) &lt;span style=&quot;color: #333; font-weight: bold;&quot;&gt;for&lt;/span&gt; w, c &lt;span style=&quot;color: #333; font-weight: bold;&quot;&gt;in&lt;/span&gt; article_entity_count_dict[d].iteritems()]))

&lt;span&gt;&lt;span style=&quot;color: #333; font-weight: bold; margin-top: 0px;&quot;&gt;def&lt;/span&gt; &lt;span style=&quot;color: #900; font-weight: bold;&quot;&gt;idf&lt;/span&gt;&lt;span&gt;(t)&lt;/span&gt;:&lt;/span&gt;
    &lt;span style=&quot;color: #333; font-weight: bold;&quot;&gt;return&lt;/span&gt; math.log10(category_number_of_documents[entity_category_count_dict[t]] / len(entity_article_count_dict[t].keys()))
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;center style=&quot;display:none&quot;&gt;%23TF-IDF%28Term%20Frequency%20-%20Inverse%20Document%20Frequency%29%20/%20%uB2E8%uC5B4%20%uBE48%uB3C4%uC640%20%uC5ED%uBB38%uC11C%20%uBE48%uB3C4.%0A%0A----%0A%uB274%uC2A4%20%uCD94%uCC9C%20%uC54C%uACE0%uB9AC%uC998%uC744%20%uC124%uACC4%uD558%uBA74%uC11C%20%uCD08%uAE30%uC5D0%uB294%20%uD06C%uAC8C%20%uACE0%uB824%uD558%uC9C0%20%uC54A%uC558%uC9C0%uB9CC%20%uCC28%uCC28%20%uACE0%uB824%uD558%uAC8C%uB41C%20%uBD80%uBD84%uC774%20%uBC14%uB85C%20%uC774%20TF-IDF%uC774%uB2E4.%20%uB274%uC2A4%20%uCD94%uCC9C%uC744%20%uD558%uAE30%uC704%uD574%20%uAC01%20%uAE30%uC0AC%uC5D0%20%uB4E4%uC5B4%uC788%uB294%20%uB2E8%uC5B4%uB4E4%28%uD0A4%uC6CC%uB4DC%20%uD639%uC740%20%uC5D4%uD2F0%uD2F0%uB4E4%29%uC744%20%60%uC740%uC804%uD55C%uB2E2%60%uC774%uB77C%uB294%20%uD615%uD0DC%uC18C%20%uBD84%uC11D%uAE30%uB97C%20%uC0AC%uC6A9%uD558%uC5EC%20%uBD84%uB9AC%uD588%uB294%uB370%2C%20%uC774%20%uD615%uD0DC%uC18C%20%uBD84%uC11D%uAE30%uC758%20%uB2E8%uC5B4%20%uBD84%uB958%uAC00%20%uC815%uD655%uD558%uC9C0%20%uBABB%uD574%20%60%uC740%uC804%uD55C%uB2E2%60%uC774%20%uC790%uCCB4%20%uC81C%uACF5%uD558%uB294%20%uB2E8%uC5B4%20%uBD84%uB958%20tag%uB9CC%uC73C%uB85C%uB294%20%uC81C%uB300%uB85C%20%uBD84%uB9AC%uD560%20%uC218%20%uC5C6%uC5C8%uB2E4.%20%uC774%uB97C%20%uBCF4%uC644%uD558%uAE30%20%uC704%uD574%20%uBAA8%uB4E0%20**%uBA85%uC0AC**%uB2E8%uC5B4%uB4E4%uC744%20%uBF51%uC544%uB0B4%uB824%uACE0%20%uD588%uB294%uB370%2C%20%uC774%uB54C%20%uC758%uBBF8%uC5C6%uB294%20%uC5D4%uD2F0%uD2F0%uAC00%20%uD3EC%uD568%uB420%20%uD655%uB960%uC774%20%uB9E4%uC6B0%20%uB192%uC558%uB2E4.%20%uC774%uAC83%uC744%20%uD574%uACB0%uD558%uAE30%20%uC704%uD574%20%uACE0%uBBFC%uD558%uB358%20%uC911%20%uC815%uBCF4%uAC80%uC0C9%20%uBD84%uC57C%uC5D0%uC11C%20%uC0AC%uC6A9%uB418%uB294%20TF-IDF%uB97C%20%uC54C%uAC8C%20%uB418%uC5C8%uB2E4.%0A%0A%23%23TF-IDF%28Term%20Frequency%20-%20Inverse%20Document%20Frequency%29%0A%uBCF4%uD1B5%20%uC815%uBCF4%20%uAC80%uC0C9%uC774%uB098%20%uD14D%uC2A4%uD2B8%20%uB9C8%uC774%uB2DD%uC5D0%uC11C%20%uC8FC%uB85C%20%uC0AC%uC6A9%uD55C%uB2E4.%20%uC774%uAC83%uC744%20%uC774%uC6A9%uD558%uBA74%20%uD574%uB2F9%20%uC5D4%uD2F0%uD2F0%28%uB2E8%uC5B4%29%uAC00%20%uAC00%uC9C0%uB294%20%uC911%uC694%uB3C4%uB97C%20%uC54C%uC544%uB0BC%20%uC218%20%uC788%uB2E4.%20%uC5B4%uB5A4%20%uB2E8%uC5B4%uAC00%20%uD2B9%uC815%20%uBB38%uC11C%20%uB0B4%uC5D0%uC11C%20%uC5BC%uB9C8%uB098%20%uC911%uC694%uD55C%20%uAC83%uC778%uC9C0%uB97C%20%uD45C%uD604%uD574%20%uC8FC%uAE30%20%uB54C%uBB38%uC774%uB2E4.%0A%0ATF%uB294%20%uB2E8%uC5B4%uBE48%uB3C4%uB85C%2C%20%uD2B9%uC815%20%uB2E8%uC5B4%uAC00%20%uBB38%uC11C%uB0B4%uC5D0%20%uC5BC%uB9CC%uD07C%uC758%20%uBE48%uB3C4%uB85C%20%uB4F1%uC7A5%uD558%uB294%uC9C0%uB97C%20%uB098%uD0C0%uB0B8%uB2E4.%20%uB2F9%uC5F0%uD558%uAC8C%uB3C4%20%uBB38%uC11C%uC5D0%20%uC790%uC8FC%20%uB4F1%uC7A5%uD558%uB294%20%uC5D4%uD2F0%uD2F0%uB77C%uBA74%20%uC5D4%uD2F0%uD2F0%uB85C%uC11C%uC758%20%uAC12%uC5B4%uCE58%uAC00%20%uB192%uB2E4%uACE0%20%uC608%uC0C1%uD560%20%uC218%20%uC788%uB2E4.%20%uB9E4%uC6B0%20%uC9C1%uAD00%uC801%uC73C%uB85C%20%uC774%uD574%uD560%20%uC218%20%uC788%uB294%20%uAD00%uACC4%uB2E4.%0A%0AIDF%uB294%20%uBB38%uC11C%20%uBE48%uB3C4%uC758%20%uC5ED%uC218%uB2E4.%20%uC804%uCCB4%20%uBB38%uC11C%20%uAC2F%uC218%uB97C%20%uD574%uB2F9%20%uC5D4%uD2F0%uD2F0%uAC00%20%uD3EC%uD568%uB41C%20%uBB38%uC11C%uC758%20%uAC2F%uC218%uB85C%20%uB098%uB204%uB294%20%uAC83%uC774%uB2E4.%20%uC774%uAC83%uC740%20%uD574%uB2F9%20%uBB38%uC11C%uAD70%uC758%20%uD2B9%uC9D5%uC744%20%uBCF4%uC5EC%uC8FC%uB294%20%uCC99%uB3C4%uAC00%20%uB420%20%uC218%20%uC788%uB2E4.%20%uC5B4%uB5A4%20%uBB38%uC11C%20%uB0B4%uC5D0%20%60%uD074%uB77C%uB77C%60%uB77C%uB294%20%uB2E8%uC5B4%uAC00%20%uC790%uC8FC%20%uB4F1%uC7A5%uD588%uB2E4%uACE0%20%uC0DD%uAC01%uD574%uBCF4%uC790.%20%uC544%uB9C8%20%uC774%20%uBB38%uC11C%uAD70%uC740%20%uC5F0%uC560%20%uAE30%uC0AC%uB4E4%uC758%20%uBAA8%uC74C%uC77C%20%uAC00%uB2A5%uC131%uC774%20%uCDA9%uBD84%uD788%20%uC788%uC744%20%uAC83%uC774%uB2E4.%20%uB530%uB77C%uC11C%20%uC774%20%uAC12%uC744%20%uD1B5%uD558%uC5EC%20%uD574%uB2F9%20%uBB38%uC11C%uAD70%uC5D0%uC11C%20%uAC00%uCE58%20%uC788%uB294%20%uC5D4%uD2F0%uD2F0%uB97C%20%uCC3E%uC544%uB0BC%20%uC218%20%uC788%uB294%uB370%2C%20%uB9CC%uC57D%20%uD574%uB2F9%20%uBB38%uC11C%uAD70%uC5D0%uC11C%20%uB4DC%uBB3C%uAC8C%20%uB4F1%uC7A5%uD558%uB294%20%uB2E8%uC5B4%uAC00%20%uBB34%uC5C7%uC778%uC9C0%20%uC54C%uC218%20%uC788%uB2E4%uBA74%2C%20%uC544%uB9C8%20%uADF8%20%uB2E8%uC5B4%uAC00%20%uC5B4%uB5A4%20%uADF8%20%uBB38%uC11C%uAD70%uC5D0%uC11C%20%uD2B9%uC815%20%uD55C%20%uBB38%uC11C%uB97C%20%uC720%uB2C8%uD06C%20%uD560%20%uC218%20%uC788%uB3C4%uB85D%20%uD574%uC8FC%uACE0%2C%20%uB208%uC5D0%20%uB744%uAC8C%uD574%uC8FC%uB294%20%uB2E8%uC5B4%uC77C%20%uD655%uB960%uC774%20%uB192%uAE30%20%uB54C%uBB38%uC774%uB2E4.%0A%0A%23%23%uAD6C%uD558%uB294%20%uBC95.%0ATF-IDF%uB294%20%uB2E8%uC5B4%uBE48%uB3C4%uC640%20%uC5ED%uBB38%uC11C%20%uBE48%uB3C4%uC758%20%uACF1%uC774%uB2E4.%20%uCC98%uC74C%20%uC811%uD560%20%uB54C%uB294%20-%uAC00%20%uC788%uC5B4%uC11C%20%uB458%uC774%20%uBE7C%uB294%20%uAC74%uAC00%20%uD588%uB294%uB370%20%uADF8%uAC8C%20%uC544%uB2C8%uC5C8%uB2E4.%0A%0A%23%23%23Term%20Frequency%0A%uB450%20%uAC12%uC744%20%uC0B0%uCD9C%uD558%uB294%20%uBC29%uBC95%uC5D0%uB294%20%uC5EC%uB7EC%uAC00%uC9C0%uAC00%20%uC788%uB294%uB370%2C%20%uB2E8%uC5B4%uB97C%20%uB098%uD0C0%uB0B4%uB294%20id%uAC12%uC744%20%60t%60%uB77C%uACE0%20%uD558%uACE0%2C%20%uBB38%uC11C%28%uB3C4%uD050%uBA3C%uD2B8%29%uC5D0%20%uD2B9%uC815%uD788%20%uD560%uB2F9%uB41C%20id%uAC12%uC744%20%60d%60%uB77C%uACE0%20%uD574%uBCF4%uC790.%20%uB9D0%uC774%20%uC5B4%uB824%uC6B4%uB370%20%uAC04%uB2E8%uD558%uAC8C%20%uB9D0%uD558%uBA74%20%uADF8%20%uBB38%uC11C%20%uC77C%uB828%uBC88%uD638%uACE0%2C%20%uB2E8%uC5B4%20%uC77C%uB828%uBC88%uD638%uB2E4.%0A%0A%uADF8%uB9AC%uACE0%20%60d%60%uC640%20%60t%60%uB97C%20%uC785%uB825%20%uBC1B%uC544%20%uB2E8%uC5B4%20%uBE48%uB3C4%uB97C%20%uACC4%uC0B0%uD558%uB294%20%uD568%uC218%20%60tf%28%29%60%uB97C%20%uC0DD%uAC01%uD574%uBCF4%uC790.%20%60tf%28t%2Cd%29%60%uB77C%20%uC4F8%20%uC218%20%uC788%uC744%20%uAC83%uC774%uB2E4.%20%60tf%28t%2Cd%29%60%uB97C%20%uB0B4%uBD80%uC801%uC73C%uB85C%20%uAD6C%uD604%uD558%uB294%20%uBC29%uBC95%uC740%20%uC5EC%uB7EC%uAC00%uC9C0%uB2E4.%20%0A%0A%uADF8%uC911%20%uAC00%uC7A5%20%uAC04%uB2E8%uD55C%20%uC544%uC774%uB514%uC5B4%uB97C%20%uBCF4%uC790.%20%uB2F9%uC5F0%uD558%uAC8C%uB3C4%20%uB2E8%uC5B4%20%uBE48%uB3C4%uC774%uBBC0%uB85C%2C%20%60d%60%uBB38%uC11C%20%uB0B4%uC758%20%uB2E8%uC5B4%20%60t%60%uC758%20%uCD1D%uBE48%uB3C4%uB97C%20%uAD6C%uD574%uC8FC%uB294%20%uD568%uC218%uB97C%20%60f%28t%2Cd%29%60%uB77C%20%uD558%uBA74%2C%20%uC774%uB294%20%60tf%28t%2Cd%29%60%uC640%20%uAC19%uC740%20%uD568%uC218%uB77C%20%uC0DD%uAC01%uD560%20%uC218%20%uC788%uB2E4.%20%uADF8%uB7EC%uB098%20%uC774%20%uAC12%uC740%20%uB108%uBB34%20%uCEE4%uC9C8%20%uC218%uB3C4%20%uC788%uACE0%20%uC815%uADDC%uD654%uAC00%20%uC804%uD600%20%uB418%uC9C0%20%uBABB%uD55C%20%uAC12%uC774%uB77C%20%uB2E4%uB8E8%uAE30%20%uBD88%uD3B8%uD558%uB2E4.%20%uC608%uB97C%uB4E4%uBA74%20%uADF8%20%uBB38%uC11C%uC5D0%20%60%uC560%uD50C%60%uC774%2010%uBC88%20%uB098%uC624%uBA74%20%6010%60%uC744%20%60tf%28%29%uAC12%60%uC73C%uB85C%20%uC4F0%uB294%20%uAC83%uC774%uB2E4.%20%uB354%20%uCEE4%uC9C0%uBA74%20%uC5B4%uCA4C%uB098..%20%uB530%uB77C%uC11C%20%uC870%uAE08%20%uB354%20%uBC1C%uC804%uB41C%20%uBC29%uBC95%uC774%20%uD544%uC694%uD560%20%uC218%20%uC788%uB2E4.%20%uC0AC%uC2E4%20%uD544%uC790%uB294%20%uC774%20%uC544%uC774%uB514%uC5B4%20%uADF8%uB300%uB85C%uB97C%20%uC720%uC0AC%20%uAE30%uC0AC%uB97C%20%uBB36%uB294%20%uAE30%uB2A5%uC758%20%uCF54%uB4DC%uC5D0%uC11C%20%uC0AC%uC6A9%uD558%uC600%uB294%uB370%2C%20%uAC04%uB2E8%uD55C%20%uC544%uC774%uB514%uC5B4%uC784%uC5D0%uB3C4%20%uB9E4%uC6B0%20%uB192%uC740%20%uC815%uD655%uB3C4%uB97C%20%uBCF4%uC5EC%uC8FC%uC5C8%uB2E4.%0A%0A%uB2E4%uB978%20%uBC29%uBC95%uC73C%uB85C%uB294%20**%uBD88%uB9B0%20%uBE48%uB3C4**%uB77C%uB294%20%uBC29%uC2DD%uC774%20%uC788%uB2E4.%20%uB2E8%uC5B4%20%60t%60%uAC00%20%uB3C4%uD050%uBA3C%uD2B8%20%60d%60%uC5D0%20%uD55C%uBC88%uC774%uB77C%uB3C4%20%uB098%uD0C0%uB098%uBA74%201%2C%20%uB098%uD0C0%uB098%uC9C0%20%uC54A%uC73C%uBA74%200%uC73C%uB85C%20%uD45C%uAE30%uD558%uB294%20%uBC29%uBC95%uC774%uB2E4.%20%uC774%20%uBC29%uBC95%uC758%20%uB2E8%uC810%uC740%20%uC544%uBB34%uB798%uB3C4%20%uD55C%uBC88%20%uB098%uD0C0%uB09C%20%uC560%uB098%2C%203%uBC88%20%uB098%uD0C0%uB09C%20%uC560%uB098%20%uB611%uAC19%uC740%20%uBB34%uAC8C%uB97C%20%uAC00%uC9C4%uB2E4%uB294%20%uC810%uC77C%20%uAC83%uC774%uB2E4.%0A%0A%uC22B%uC790%uAC00%20%uB108%uBB34%20%uCEE4%uC9C8%20%uC218%20%uC788%uC73C%uBBC0%uB85C%20%uC791%uAC8C%20%uB9CC%uB4DC%uB294%20%uB9E4%uC6B0%20%uAE30%uBCF8%uC801%uC778%20%uC544%uC774%uB514%uC5B4%uB294%20%uB85C%uADF8%uB2E4.%20log%uB97C%20%uC50C%uC6B0%uAC8C%20%uB418%uBA74%20%uB9E4%uC6B0%20%uC791%uC740%20%uC218%uB85C%20%uC22B%uC790%uB97C%20%uBC14%uAFC0%20%uC218%20%uC788%uB2E4.%20%uC774%uB97C%20**%uB85C%uADF8%20%uC2A4%uCF00%uC77C%20%uBE48%uB3C4**%uB77C%20%uD55C%uB2E4.%0A%0A**%uC99D%uAC00%20%uBE48%uB3C4**%uB77C%uB294%20%uAC83%uB3C4%20%uC788%uB294%uB370%2C%20%uC774%uAC83%uC740%20%uBB38%uC11C%uC758%20%uAE38%uC774%uC5D0%20%uB530%uB978%20%uB2E8%uC5B4%uC758%20%uC0C1%uB300%uC801%20%uBE48%uB3C4%uB97C%20%uD45C%uD604%uD574%uC8FC%uB294%20%uBC29%uC2DD%uC774%uB2E4.%20%uC774%20%uBC29%uC2DD%uC744%20%uC774%uC6A9%uD558%uBA74%20%uC2A4%uCF00%uC77C%uC774%20%uCD5C%uB300%201%uB85C%20%uACE0%uC815%uB418%uB294%20%uD6A8%uACFC%uB97C%20%uC5BB%uC744%20%uC218%20%uC788%uB2E4.%20%uC2E4%uC81C%uB85C%20%uD544%uC790%uAC00%20%uB274%uC2A4%20%uCD94%uCC9C%uB97C%20%uC704%uD574%20%uC5D4%uD2F0%uD2F0%uC758%20TF-IDF%uB97C%20%uAD6C%uD604%uD558%uBA74%uC11C%20%uC0AC%uC6A9%uD55C%20%uBC29%uC2DD%uC774%uAE30%uB3C4%20%uD558%uB2E4.%20%uC218%uD559%20%uC2DD%uC740%20%uB530%uB85C%20%uC788%uC9C0%uB9CC%20%uC774%uD574%uD558%uAE30%20%uC88B%uB3C4%uB85D%20%uD55C%uAD6D%uB9D0%28%3F%29%uB85C%20%uC801%uC5C8%uB2E4.%0A%0A%20%20%20%20tf%28t%2Cd%29%20%3D%200.5%20+%200.5%20x%20f%28t%2Cd%29%20/%20%28%uBB38%uC11C%20%uB0B4%20%uB2E8%uC5B4%uB4E4%uC758%20f%28t%2Cd%29%20%uAC12%20%uC911%20%uCD5C%uB313%uAC12%29%20%0A%23%23%23Inversed%20Document%20Frequency%0A%uC5ED%uBB38%uC11C%20%uBE48%uB3C4%uB294%20%uB2E8%uC5B4%uAC00%20%uBB38%uC11C%20%uC9D1%uD569%20%uB0B4%uC5D0%uC11C%20%uC5BC%uB9C8%uB098%20%uC790%uC8FC%20%uB4F1%uC7A5%uD558%uB294%uC9C0%uB97C%20%uB098%uD0C0%uB0B8%uB2E4.%20%uC804%uCCB4%20%uBB38%uC11C%20%uC911%20%uBC1C%uC0DD%uD558%uB294%20%uBE48%uB3C4%uB97C%20%uC5ED%uC218%20%uCDE8%uD55C%20%uAC12%uC73C%uB85C%2C%20%20%uC5ED%uC218%uB97C%20%uCDE8%uD558%uB2E4%20%uBCF4%uB2C8%20%uAC12%uC774%20%uBB34%uD55C%uD788%20%uCEE4%uC9C8%20%uC218%20%uC788%uAE30%uC5D0%20%uC774%uB97C%20%uBC29%uC9C0%uD558%uB824%uACE0%20log%uB97C%20%uC50C%uC6CC%20%uAC12%uC744%20%uC904%uC778%uB2E4.%0A%0A%60D%60%uB294%20%uC804%uCCB4%20%uBB38%uC11C%uB4E4%uC758%20%uC9D1%uD569%uC744%20%uC758%uBBF8%uD55C%uB2E4.%0A%0A%20%20%20%20idf%28t%2CD%29%20%3D%20log%20%28%20%uC804%uCCB4%20%uBB38%uC11C%uC758%20%uAC2F%uC218%20/%20%uB2E8%uC5B4%20t%uAC00%20%uD3EC%uD568%uB41C%20%uBB38%uC11C%uC758%20%uC218%20%29%0A%0A%23%23%23TF-IDF%0A%0A%20%20%20%20tfidf%28t%2Cd%2CD%29%20%3D%20tf%28t%2Cd%29%20x%20idf%28t%2CD%29%0A%0A%uAC04%uB2E8%uD788%20%uAD6C%uD55C%20%uB450%uAC1C%uC758%20%uD568%uC218%uB97C%20%uACF1%uD558%uBA74%20%uB41C%uB2E4.%20%uD2B9%uC815%20%uBB38%uC11C%20%uB0B4%uC5D0%uC11C%20%uB2E8%uC5B4%20%uBE48%uB3C4%uAC00%20%uB192%uACE0%2C%20%uC804%uCCB4%20%uBB38%uC11C%uC5D0%uC11C%20%uADF8%20%uB2E8%uC5B4%uAC00%20%uD3EC%uD568%uB41C%20%uBB38%uC11C%uAC00%20%uC801%uB2E4%uBA74%20%uC774%20%uAC12%uC740%20%uB192%uC544%uC9C4%uB2E4.%20%uB530%uB77C%uC11C%20%uC774%20%uAC12%uC744%20%uC774%uC6A9%uD558%uBA74%20%uD754%uD55C%20%uB2E8%uC5B4%uB97C%20%uAC78%uB7EC%20%uB0BC%20%uC218%20%uC788%uB2E4.%20%uD2B9%uC815%20%uB2E8%uC5B4%uB97C%20%uD3EC%uD568%uD558%uB294%20%uBB38%uC11C%uAC00%20%uB9CE%uC744%uC218%uB85D%20%uB85C%uADF8%uC548%uC758%20%uAC12%28%60idf%28%29%60%uC5D0%uC11C%29%uC774%201%uC5D0%20%uAC00%uAE4C%uC6CC%uC9C0%uAC8C%20%uB418%uACE0%2C%20%uC774%20%uACBD%uC6B0%20TF-IDF%20%uAC12%uC740%200%uC5D0%20%uAC00%uAE4C%uC6CC%uC9C0%uAC8C%20%uB41C%uB2E4.%0A%0A%23%23%23%uC2E4%uC81C%uB85C%20%uAD6C%uD604%uD558%uACE0%20%uC0AC%uC6A9%uD558%uBA70.%0A%uD30C%uC774%uC36C%uC73C%uB85C%20%uAD6C%uD604%uC2DC%20%uC0DD%uAC01%uBCF4%uB2E4%20%uB9E4%uC6B0%20%uAC04%uB2E8%uD558%uAC8C%20%uAD6C%uD604%uC774%20%uAC00%uB2A5%uD558%uB2E4.%20%uADF8%20%uAC12%uC740%20%uBB34%uD55C%uC815%20%uCEE4%uC9C8%20%uC218%20%uC788%uC744%20%uAC83%20%uAC19%uC558%uB294%uB370%205%uB97C%20%uB118%uB294%20%uACBD%uC6B0%uAC00%20%uC5C6%uC5C8%uB2E4.%20%uC774%uAC83%uC740%20%uBB38%uC11C%20%uC9D1%uD569%uC758%20%uD2B9%uC131%uC5D0%20%uB530%uB77C%20%uB2EC%uB77C%20%uC9C8%20%uC218%20%uC788%uB2E4.%20%uB610%20%uB85C%uADF8%uB97C%20%uC0AC%uC6A9%uD560%20%uB54C%20%uBC11%uC774%20%uBB34%uC2A8%20%uB85C%uADF8%uC778%uC9C0%uC5D0%20%uB530%uB77C%20%uB2E4%uB97C%20%uC218%20%uC788%uB2E4.%20%uD544%uC790%uB294%20%uBC11%uC774%2010%uC778%20%uC0C1%uC6A9%uB85C%uADF8%uB97C%20%uCDE8%uD574%uC8FC%uC5C8%uB2E4.%20%uC0AC%uC2E4%20%uC774%uAC83%uC740%20%uC0C1%uB300%uC801%uC778%20%uBE44%uAD50%uC774%uBBC0%uB85C%20%uBC11%uC774%20%uBA87%uC778%20%uB85C%uADF8%uB97C%20%uCDE8%uD558%uB294%uAC00%uB294%20%uADF8%uB807%uAC8C%20%uC911%uC694%uD55C%20%uBB38%uC81C%uB294%20%uC544%uB2C8%uB77C%20%uC0DD%uAC01%uB41C%uB2E4.%20%uC544%uB798%uB294%20%uD544%uC790%uC758%20%uCF54%uB4DC%uB2E4.%20%uD604%uC7AC%uB294%20%uC774%uAC83%uBCF4%uB2E4%20%uD6E8%uC52C%20%uB9AC%uD329%uD1A0%uB9C1%20%uB418%uC5B4%20%uBCF8%uB798%uC758%20%uAD6C%uC870%uB97C%20%uC870%uAE08%20%uC783%uC5C8%uC9C0%uB9CC%2C%20%uC774%uAC8C%20%uCC98%uC74C%20%uC9F0%uC744%20%uB54C%20%uCF54%uB4DC%uB2E4.%0A%0A%20%20%20%20def%20f%28t%2Cd%29%3A%0A%20%20%20%20%20%20%20%20return%20float%28article_entity_count_dict%5Bd%5D%5Bt%5D%29%0A%0A%20%20%20%20def%20tf%28t%2Cd%29%3A%0A%20%20%20%20%20%20%20%20return%200.5%20+%20%28%280.5%29%20*%20f%28t%2C%20d%29%20/%20max%28%5Bf%28w%2C%20d%29%20for%20w%2C%20c%20in%20article_entity_count_dict%5Bd%5D.iteritems%28%29%5D%29%29%0A%0A%20%20%20%20def%20idf%28t%29%3A%0A%20%20%20%20%20%20%20%20return%20math.log10%28category_number_of_documents%5Bentity_category_count_dict%5Bt%5D%5D%20/%20len%28entity_article_count_dict%5Bt%5D.keys%28%29%29%29%0A%0A&lt;/center&gt;
&lt;br /&gt;&lt;/en-note&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</description>
      <category>Engineering</category>
      <category>df</category>
      <category>Document</category>
      <category>frequency</category>
      <category>IDF</category>
      <category>term</category>
      <category>TF</category>
      <category>검색엔진</category>
      <category>문서빈도</category>
      <category>역문서빈도</category>
      <author>youngkyu.cho</author>
      <guid isPermaLink="true">https://youngkyu.tistory.com/25</guid>
      <comments>https://youngkyu.tistory.com/25#entry25comment</comments>
      <pubDate>Fri, 7 Nov 2014 22:45:00 +0900</pubDate>
    </item>
    <item>
      <title>자료구조란? / 알고리즘이란? / 시간복잡도(Time complexity) / 빅오 표기법</title>
      <link>https://youngkyu.tistory.com/24</link>
      <description>&lt;en-note lang=&quot;v2&quot; style=&quot;line-height:1.6;&quot;&gt;&lt;del style=&quot;position:relative;display:block&quot;&gt;&lt;a style=&quot;position: absolute;color: #FFF;text-decoration: none;font-size: 12px;height: 25px;border-radius: 0;margin-top: -20px;right: 15px;background: rgba(0, 0, 0, 0);border-left: 10px solid #BB3A34;border-right: 10px solid #BB3A34;border-bottom: 5px solid rgba(0, 0, 0, 0);width: 0;text-indent:-100000px;&quot; href=&quot;http://marxi.co/#/?provider=evernote_int&amp;amp;guid=189e3699-ab4f-47f3-bd4c-6f7e7a4bda4a&quot;&gt;Edit&lt;/a&gt;&lt;/del&gt;&lt;div style=&quot;line-height: 1.6; font-family: Helvetica Neue, Arial, Hiragino Sans GB, STHeiti, Microsoft YaHei, WenQuanYi Micro Hei, SimSun, Song, sans-serif;&quot;&gt;
&lt;h1 style=&quot;font-size: 36px; margin: 0.67em 0; font-family: inherit; font-weight: bold; line-height: 1.1; color: inherit; margin-top: 0px; margin-bottom: 20px;&quot;&gt;Introducing. Data Structure&lt;/h1&gt;
&lt;h2 style=&quot;font-family: inherit; font-weight: bold; line-height: 1.1; color: inherit; margin-top: 30px; margin-bottom: 20px; font-size: 30px;&quot;&gt;Data structure(자료구조)란?&lt;/h2&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;컴퓨터 프로그램의 특징은 2가지로 크게 구별됨.&lt;/p&gt;
&lt;ol style=&quot;margin-top: 0; margin-bottom: 10px; line-height: 1.6;&quot;&gt;
&lt;li style=&quot;line-height: 1.6; margin-top: 0px;&quot;&gt;컴퓨터에 의해서 실행되는 명령들의 집합이란 점.&lt;/li&gt;
&lt;li style=&quot;line-height: 1.6;&quot;&gt;명령을 수행하기 위해 내부적으로 여러 자료를 저장한다는 점.&lt;/li&gt;
&lt;/ol&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;즉 프로그램이란 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px; margin-top: 0px;&quot;&gt;자료(데이터)&lt;/code&gt; 집합과 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px;&quot;&gt;명령(알고리즘)&lt;/code&gt; 집합의 집합&lt;/p&gt;
&lt;h2 style=&quot;font-family: inherit; font-weight: bold; line-height: 1.1; color: inherit; margin-top: 30px; margin-bottom: 20px; font-size: 30px;&quot;&gt;효율적 자료구조라는 것.&lt;/h2&gt;
&lt;ul style=&quot;margin-top: 0; margin-bottom: 10px; line-height: 1.6;&quot;&gt;
&lt;li style=&quot;line-height: 1.6; margin-top: 0px;&quot;&gt;
&lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px; margin-top: 0px;&quot;&gt;실행 시간 (Time complexity)&lt;/code&gt; 최소화.&lt;/li&gt;
&lt;li style=&quot;line-height: 1.6;&quot;&gt;
&lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px; margin-top: 0px;&quot;&gt;저장 공간 (Space complexity)&lt;/code&gt; 절약.&lt;/li&gt;
&lt;/ul&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;여기서 저장 공간의 절약이란 프로그램 실행에 필요한 메모리가 적다는 의미.&lt;br style=&quot;margin-top: 0px;&quot;&gt;실행 시간이란 특정 기능을 하는데 걸리는 시간을 의미.&lt;/p&gt;
&lt;h2 style=&quot;font-family: inherit; font-weight: bold; line-height: 1.1; color: inherit; margin-top: 30px; margin-bottom: 20px; font-size: 30px;&quot;&gt;알고리즘이란?&lt;/h2&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;컴퓨터 명령 자체의 효율성을 증가시키기 위한 절차나 방법.&lt;br style=&quot;margin-top: 0px;&quot;&gt;효율적 알고리즘을 위해서는 좋은 자료구조가 선행되어 바탕이되어야.&lt;/p&gt;
&lt;h2 style=&quot;font-family: inherit; font-weight: bold; line-height: 1.1; color: inherit; margin-top: 30px; margin-bottom: 20px; font-size: 30px;&quot;&gt;자료의 종류. (형태에 따라)&lt;/h2&gt;
&lt;ol style=&quot;margin-top: 0; margin-bottom: 10px; line-height: 1.6;&quot;&gt;
&lt;li style=&quot;line-height: 1.6; margin-top: 0px;&quot;&gt;단순 구조. (Primitive Data Structure &amp;amp;  Base Data Structure)&lt;br style=&quot;margin-top: 0px;&quot;&gt;&lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px;&quot;&gt;정수&lt;/code&gt;, &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px;&quot;&gt;문자열&lt;/code&gt;, &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px;&quot;&gt;실수&lt;/code&gt; 등&lt;/li&gt;
&lt;li style=&quot;line-height: 1.6;&quot;&gt;선형 구조. (Linear Data Structure)&lt;br style=&quot;margin-top: 0px;&quot;&gt;&lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px;&quot;&gt;리스트&lt;/code&gt;, &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px;&quot;&gt;스택&lt;/code&gt;, &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px;&quot;&gt;큐&lt;/code&gt;, &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px;&quot;&gt;덱&lt;/code&gt;&lt;br /&gt;각각의 자료구조가 선형적으로 연결되있는 것.&lt;br /&gt;앞자료와 뒷자료가 &lt;em&gt;1:1 관계&lt;/em&gt;.&lt;/li&gt;
&lt;li style=&quot;line-height: 1.6;&quot;&gt;비 선형 구조. (Non-linear Data Structure)&lt;br style=&quot;margin-top: 0px;&quot;&gt;&lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px;&quot;&gt;계층 구조(Hierarchical Structure)&lt;/code&gt; 혹은 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px;&quot;&gt;망 구조(Network  Structure)&lt;/code&gt;을 가지는 경우.&lt;br /&gt;트리와 그래프가 포함. 앞뒤자료의 선후관계가 1:1이 아님.&lt;/li&gt;
&lt;li style=&quot;line-height: 1.6;&quot;&gt;파일 구조. (File Organization)&lt;br style=&quot;margin-top: 0px;&quot;&gt;보조 기억장치에 저장되는 파일에 대한 자료구조.&lt;br /&gt;메모리에 한번에 올릴(Loading) 수 없는 대용량의 자료를 대상으로 함.&lt;br /&gt;&lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px;&quot;&gt;순차적 파일 구조(Sequential)&lt;/code&gt;, &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px;&quot;&gt;상대적 파일 구조(Relative)&lt;/code&gt;, &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px;&quot;&gt;색인 파일 구조(Indexed Sequential)&lt;/code&gt; 및 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px;&quot;&gt;다중키 파일 구조(Multi - key)&lt;/code&gt;등이 있다.&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 style=&quot;font-family: inherit; font-weight: bold; line-height: 1.1; color: inherit; margin-top: 30px; margin-bottom: 20px; font-size: 30px;&quot;&gt;추상 자료형. (Abstract Data Type.)&lt;/h2&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px; margin-top: 0px;&quot;&gt;정보은닉(Information Hiding)&lt;/code&gt;을 위해 사용. 중요한 정보만 나타내고 중요하지 않은 정보는 숨기는 방법.&lt;/p&gt;
&lt;h2 style=&quot;font-family: inherit; font-weight: bold; line-height: 1.1; color: inherit; margin-top: 30px; margin-bottom: 20px; font-size: 30px;&quot;&gt;자료와 자료형&lt;/h2&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;em style=&quot;margin-top: 0px;&quot;&gt;자료와 자료형은 다르다! 뭔가 별거아닌데 충격적.&lt;/em&gt;&lt;/p&gt;
&lt;ul style=&quot;margin-top: 0; margin-bottom: 10px; line-height: 1.6;&quot;&gt;
&lt;li style=&quot;line-height: 1.6; margin-top: 0px;&quot;&gt;자료 + 연산 = 자료형&lt;/li&gt;
&lt;li style=&quot;line-height: 1.6;&quot;&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word; margin-top: 0px;&quot;&gt;data + operation = data type&lt;/p&gt;&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;예) 정수 자료형 = 자료 (1,2,3,-1,-2등등) + 연산 (더하기, 빼기, 곱하기, 나누기, 나머지연산)&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 style=&quot;font-family: inherit; font-weight: bold; line-height: 1.1; color: inherit; margin-top: 30px; margin-bottom: 20px; font-size: 30px;&quot;&gt;추상자료형&lt;/h2&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;추상적으로 정의된 자료형. 미술에서 추상화는 사물을 사실적으로 그리지 않고 사물의 본질 혹은 두드러진 특성을 관념적으로 그리는 것 의미. 이와 유사하게 세부적이고 복잡한 것을 생략하고 중요한 것만 나타낸는 것.&lt;/p&gt;&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;예) &lt;strong style=&quot;font-weight: bold; margin-top: 0px;&quot;&gt;추상 자료형 콕 찌름 메세지(페이스북 콕 찌르기).&lt;/strong&gt;&lt;/p&gt;
&lt;ol style=&quot;margin-top: 0; margin-bottom: 10px; line-height: 1.6;&quot;&gt;
&lt;li style=&quot;line-height: 1.6; margin-top: 0px;&quot;&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word; margin-top: 0px;&quot;&gt;자료 3개.&lt;br style=&quot;margin-top: 0px;&quot;&gt;콕 찌른 시간.&lt;br /&gt;보내는 이.&lt;br /&gt;받는 이.&lt;/p&gt;
&lt;/li&gt;
&lt;li style=&quot;line-height: 1.6;&quot;&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word; margin-top: 0px;&quot;&gt;명령 :&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;table style=&quot;border-collapse: collapse; border-spacing: 0; margin-bottom: 20px;&quot;&gt;
&lt;thead style=&quot;margin-top: 0px;&quot;&gt;
&lt;tr style=&quot;margin-top: 0px;&quot;&gt;
&lt;th style=&quot;padding: 8px; line-height: 20px; text-align: left; vertical-align: top; border: 1px solid #DDD; margin-top: 0px;&quot;&gt;이름&lt;/th&gt;
&lt;th style=&quot;padding: 8px; line-height: 20px; text-align: left; vertical-align: top; border: 1px solid #DDD;&quot;&gt;입력&lt;/th&gt;
&lt;th style=&quot;padding: 8px; line-height: 20px; text-align: left; vertical-align: top; border: 1px solid #DDD;&quot;&gt;출력&lt;/th&gt;
&lt;th style=&quot;padding: 8px; line-height: 20px; text-align: left; vertical-align: top; border: 1px solid #DDD;&quot;&gt;설명&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr style=&quot;margin-top: 0px;&quot;&gt;
&lt;td style=&quot;padding: 8px; line-height: 20px; text-align: left; vertical-align: top; border: 1px solid #DDD; margin-top: 0px;&quot;&gt;변경()&lt;/td&gt;
&lt;td style=&quot;padding: 8px; line-height: 20px; text-align: left; vertical-align: top; border: 1px solid #DDD;&quot;&gt;찌름 메세지 p, 변경 보내는 이 s, 변경 받는 이 r, 변경 시간 t&lt;/td&gt;
&lt;td style=&quot;padding: 8px; line-height: 20px; text-align: left; vertical-align: top; border: 1px solid #DDD;&quot;&gt;T/F&lt;/td&gt;
&lt;td style=&quot;padding: 8px; line-height: 20px; text-align: left; vertical-align: top; border: 1px solid #DDD;&quot;&gt;보내는 이와 받는 이 변경. 존재하지 않는 회원일 경우 실패&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;padding: 8px; line-height: 20px; text-align: left; vertical-align: top; border: 1px solid #DDD; margin-top: 0px;&quot;&gt;비교()&lt;/td&gt;
&lt;td style=&quot;padding: 8px; line-height: 20px; text-align: left; vertical-align: top; border: 1px solid #DDD;&quot;&gt;찌름 메세지 p&lt;/td&gt;
&lt;td style=&quot;padding: 8px; line-height: 20px; text-align: left; vertical-align: top; border: 1px solid #DDD;&quot;&gt;T/F&lt;/td&gt;
&lt;td style=&quot;padding: 8px; line-height: 20px; text-align: left; vertical-align: top; border: 1px solid #DDD;&quot;&gt;두 메세지가 같은지 비교.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h2 style=&quot;font-family: inherit; font-weight: bold; line-height: 1.1; color: inherit; margin-top: 30px; margin-bottom: 20px; font-size: 30px;&quot;&gt;알고리즘&lt;/h2&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;문제를 해결하기위한 절차.&lt;br style=&quot;margin-top: 0px;&quot;&gt;5가지 특성을 필수로 가지게 됨.&lt;/p&gt;
&lt;ol style=&quot;margin-top: 0; margin-bottom: 10px; line-height: 1.6;&quot;&gt;
&lt;li style=&quot;line-height: 1.6; margin-top: 0px;&quot;&gt;
&lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px; margin-top: 0px;&quot;&gt;입력(Input)&lt;/code&gt; : 입력되는 자료가 0개 이상.&lt;/li&gt;
&lt;li style=&quot;line-height: 1.6;&quot;&gt;
&lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px; margin-top: 0px;&quot;&gt;출력(Output)&lt;/code&gt; : 1개 이상의 출력값 가져야.&lt;/li&gt;
&lt;li style=&quot;line-height: 1.6;&quot;&gt;
&lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px; margin-top: 0px;&quot;&gt;명백성(Definitenness)&lt;/code&gt; : 각 명령어는 모호하지 않아야.&lt;/li&gt;
&lt;li style=&quot;line-height: 1.6;&quot;&gt;
&lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px; margin-top: 0px;&quot;&gt;유한성(Finiteness)&lt;/code&gt; : 한정된 수 단계이후 종료되어야.&lt;/li&gt;
&lt;li style=&quot;line-height: 1.6;&quot;&gt;
&lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px; margin-top: 0px;&quot;&gt;유효성(Effectiveness)&lt;/code&gt; : 모든 명령은 실행 가능해야.&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 style=&quot;font-family: inherit; font-weight: bold; line-height: 1.1; color: inherit; margin-top: 30px; margin-bottom: 20px; font-size: 30px;&quot;&gt;알고리즘의 표현 방법.&lt;/h2&gt;
&lt;ol style=&quot;margin-top: 0; margin-bottom: 10px; line-height: 1.6;&quot;&gt;
&lt;li style=&quot;line-height: 1.6; margin-top: 0px;&quot;&gt;
&lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px; margin-top: 0px;&quot;&gt;자연어(Natural Language)&lt;/code&gt; : 사람이 사용하는 일반적 언어.&lt;/li&gt;
&lt;li style=&quot;line-height: 1.6;&quot;&gt;
&lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px; margin-top: 0px;&quot;&gt;순서도(Flow Chart)&lt;/code&gt; : 알고리즘의 도식화&lt;/li&gt;
&lt;li style=&quot;line-height: 1.6;&quot;&gt;
&lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px; margin-top: 0px;&quot;&gt;의사 코드(Psudo Code)&lt;/code&gt; : 가상의 프로그램 언어로 표현&lt;/li&gt;
&lt;li style=&quot;line-height: 1.6;&quot;&gt;&lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px; margin-top: 0px;&quot;&gt;프로그래밍 언어&lt;/code&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 style=&quot;font-family: inherit; font-weight: bold; line-height: 1.1; color: inherit; margin-top: 30px; margin-bottom: 20px; font-size: 30px;&quot;&gt;알고리즘의 분석 기준&lt;/h2&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;strong style=&quot;font-weight: bold; margin-top: 0px;&quot;&gt;&lt;em style=&quot;margin-top: 0px;&quot;&gt; == 시간 복잡도와 공간 복잡도&lt;/em&gt;&lt;/strong&gt;&lt;br /&gt;    현대의 컴퓨터 과학에서는 시간 복잡도를 공간 복잡도보다 대부분 우선시.&lt;/p&gt;&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px; margin-top: 0px;&quot;&gt;시간 복잡도&lt;/code&gt; : 알고리즘 실행에 걸리는 시간.&lt;br /&gt;        실제 시간 측정 or 실행되는 명령문의 개수를 계산.&lt;br /&gt;        실제 시간 측정의 경우 간단하게 측정 가능하지만 컴퓨터 성능에 종속적. -객관성 낮음&lt;br /&gt;        그래서 실행되는 명령문 개수를 기준으로 판단 --&amp;gt;&amp;gt; N에관한 관계식으로 표현.&lt;/p&gt;&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;strong style=&quot;font-weight: bold; margin-top: 0px;&quot;&gt;&lt;em style=&quot;margin-top: 0px;&quot;&gt;사실 일반적으로 시간 복잡도는 == O(빅 오;Big-Oh notation)다.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;h2 style=&quot;font-family: inherit; font-weight: bold; line-height: 1.1; color: inherit; margin-top: 30px; margin-bottom: 20px; font-size: 30px;&quot;&gt;연습문제&lt;/h2&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;strong style=&quot;font-weight: bold; margin-top: 0px;&quot;&gt;&lt;em style=&quot;margin-top: 0px;&quot;&gt;(in 열혈강의 자료구조 - 프리렉)&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;ol style=&quot;margin-top: 0; margin-bottom: 10px; line-height: 1.6;&quot;&gt;
&lt;li style=&quot;line-height: 1.6; margin-top: 0px;&quot;&gt;
&lt;strong style=&quot;font-weight: bold; margin-top: 0px;&quot;&gt;선형 구조에 속하는 자료구조와 비 선형 구조에 속하는 자료구조를 각각 적어보세요.&lt;/strong&gt;&lt;br /&gt;선형 구조 : 리스트, 스택, 큐, 덱&lt;br /&gt;비 선형 구조 : 트리 (Hierartchical Structure), 그래프 (Network Structure)&lt;/li&gt;
&lt;li style=&quot;line-height: 1.6;&quot;&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word; margin-top: 0px;&quot;&gt;&lt;strong style=&quot;font-weight: bold; margin-top: 0px;&quot;&gt;다음과 같은 연산자를 포함하는 MP3 플레이어의 추상 자료형을 설계해 보세요.&lt;/strong&gt;&lt;/p&gt;
&lt;pre style=&quot;overflow: initial; font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 14px; display: block; padding: 0; margin: 0 0 10px; line-height: 1.6; word-break: break-all; word-wrap: break-word; color: #333333; background-color: #f5f5f5; border: none; border-radius: 0; white-space: pre-wrap;&quot;&gt;&lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: inherit; padding: 1em; color: #333; background-color: transparent; white-space: pre-wrap; border-radius: 0; display: block; background: #F6F6F6; margin-top: 0px;&quot;&gt; Play, &lt;span style=&quot;margin-top: 0px;&quot;&gt;&lt;span style=&quot;color: #333; font-weight: bold; margin-top: 0px;&quot;&gt;Stop&lt;/span&gt;, Pause, Add_MP3, Delete_MP3, Get_MP3_Count&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;em style=&quot;margin-top: 0px;&quot;&gt;자료&lt;/em&gt; : 곡 목록, 불리언 형 플래그(재생중인지), 현재 재생 중 곡 번호,  재생 시간&lt;br /&gt;&lt;em&gt;연산&lt;/em&gt; :&lt;br /&gt;play(mp3) : 0번부터 재생.&lt;br /&gt;stop(mp3) : 멈춤.&lt;br /&gt;pause(mp3) : 현재 재생중 곡번호, 재생시간에 데이터 넣고 플래그 off로.&lt;br /&gt;Add_MP3(mp3) : 곡 목록 추가&lt;br /&gt;Delete_MP3(mp3) : 현재곡 삭제&lt;br /&gt;Get_MP3_Count(mp3) : 곡 목록 사이즈 반환.&lt;/p&gt;
&lt;/li&gt;
&lt;li style=&quot;line-height: 1.6;&quot;&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word; margin-top: 0px;&quot;&gt;&lt;strong style=&quot;font-weight: bold; margin-top: 0px;&quot;&gt;알고리즘의 정의는 무엇인가요? 그리고 알고리즘이 만족시켜야 할 5가지 특징은 무엇인가요?&lt;/strong&gt;&lt;br /&gt;문제를 해결해 나가는 절차.&lt;br /&gt;입력, 출력, 명백성(Definiteness), 유한성(Finiteness), 유효성(Effectiveness)&lt;/p&gt;
&lt;/li&gt;
&lt;li style=&quot;line-height: 1.6;&quot;&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word; margin-top: 0px;&quot;&gt;다음과 같은 소스가 있다고 할 때, 다음 질문에 답해보세요.&lt;br style=&quot;margin-top: 0px;&quot;&gt;(1) &lt;strong style=&quot;font-weight: bold;&quot;&gt;n에 대한 시간 복잡도 함수를 구해보세요. 단, 덧셈, 곱셈, 나눗셈등 연산 횟수를 정확히 고려해야 합니다.&lt;/strong&gt;&lt;/p&gt;
&lt;pre style=&quot;overflow: initial; font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 14px; display: block; padding: 0; margin: 0 0 10px; line-height: 1.6; word-break: break-all; word-wrap: break-word; color: #333333; background-color: #f5f5f5; border: none; border-radius: 0; white-space: pre-wrap;&quot;&gt;&lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: inherit; padding: 0; color: inherit; background-color: transparent; white-space: pre-wrap; border-radius: 0; margin-top: 0px;&quot;&gt; 2n *  3n + n + 1
&lt;/code&gt;&lt;/pre&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;= 6n^2 + n + 1&lt;br style=&quot;margin-top: 0px;&quot;&gt;(2) &lt;strong style=&quot;font-weight: bold;&quot;&gt;빅-오 표기법으로 시간 복잡도를 나타내 보세요.&lt;/strong&gt;&lt;/p&gt;
&lt;pre style=&quot;overflow: initial; font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 14px; display: block; padding: 0; margin: 0 0 10px; line-height: 1.6; word-break: break-all; word-wrap: break-word; color: #333333; background-color: #f5f5f5; border: none; border-radius: 0; white-space: pre-wrap;&quot;&gt;&lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: inherit; padding: 1em; color: #333; background-color: transparent; white-space: pre-wrap; border-radius: 0; display: block; background: #F6F6F6; margin-top: 0px;&quot;&gt; &lt;span style=&quot;color: #333; font-weight: bold; margin-top: 0px;&quot;&gt;for&lt;/span&gt;(;i&amp;lt;n;i&amp;lt;-i+&lt;span style=&quot;color: #099;&quot;&gt;1&lt;/span&gt;){
     &lt;span style=&quot;color: #333; font-weight: bold;&quot;&gt;for&lt;/span&gt;(j&amp;lt;-&lt;span style=&quot;color: #099;&quot;&gt;0&lt;/span&gt;;j&amp;lt;n;j&amp;lt;-j+&lt;span style=&quot;color: #099;&quot;&gt;1&lt;/span&gt;){
         sum &amp;lt;- sum + j;
     }
 }
&lt;/code&gt;&lt;/pre&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt; = O(n^2)&lt;/p&gt;
&lt;/li&gt;
&lt;li style=&quot;line-height: 1.6;&quot;&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word; margin-top: 0px;&quot;&gt;&lt;strong style=&quot;font-weight: bold; margin-top: 0px;&quot;&gt;다음 시간 복잡도 함수들을 빅-오 표기법으로 나타내 보세요.&lt;/strong&gt;&lt;/p&gt;
&lt;pre style=&quot;overflow: initial; font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 14px; display: block; padding: 0; margin: 0 0 10px; line-height: 1.6; word-break: break-all; word-wrap: break-word; color: #333333; background-color: #f5f5f5; border: none; border-radius: 0; white-space: pre-wrap;&quot;&gt;&lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: inherit; padding: 0; color: inherit; background-color: transparent; white-space: pre-wrap; border-radius: 0; margin-top: 0px;&quot;&gt; 6n^3 + n! + 5n + 4 O
&lt;/code&gt;&lt;/pre&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt; = n!&lt;/p&gt;
&lt;pre style=&quot;overflow: initial; font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 14px; display: block; padding: 0; margin: 0 0 10px; line-height: 1.6; word-break: break-all; word-wrap: break-word; color: #333333; background-color: #f5f5f5; border: none; border-radius: 0; white-space: pre-wrap;&quot;&gt;&lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: inherit; padding: 0; color: inherit; background-color: transparent; white-space: pre-wrap; border-radius: 0; margin-top: 0px;&quot;&gt; 4nlogn + 5n^2 + 2 O
&lt;/code&gt;&lt;/pre&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt; = n^2&lt;/p&gt;
&lt;pre style=&quot;overflow: initial; font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 14px; display: block; padding: 0; margin: 0 0 10px; line-height: 1.6; word-break: break-all; word-wrap: break-word; color: #333333; background-color: #f5f5f5; border: none; border-radius: 0; white-space: pre-wrap;&quot;&gt;&lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: inherit; padding: 0; color: inherit; background-color: transparent; white-space: pre-wrap; border-radius: 0; margin-top: 0px;&quot;&gt; 2^n + n^3 + 5 O
&lt;/code&gt;&lt;/pre&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt; = 2^n   &lt;/p&gt;
&lt;/li&gt;
&lt;li style=&quot;line-height: 1.6;&quot;&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word; margin-top: 0px;&quot;&gt;&lt;strong style=&quot;font-weight: bold; margin-top: 0px;&quot;&gt;다음을 실행 시간이 적게 걸리는 순으로 나열하세요.&lt;/strong&gt;&lt;/p&gt;
&lt;pre style=&quot;overflow: initial; font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 14px; display: block; padding: 0; margin: 0 0 10px; line-height: 1.6; word-break: break-all; word-wrap: break-word; color: #333333; background-color: #f5f5f5; border: none; border-radius: 0; white-space: pre-wrap;&quot;&gt;&lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: inherit; padding: 0; color: inherit; background-color: transparent; white-space: pre-wrap; border-radius: 0; margin-top: 0px;&quot;&gt; O(n)  O(n^2)  O(n^3)  O(n!)  O(logn)  O(2^n)  O(nlogn)
&lt;/code&gt;&lt;/pre&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;= O(logn)  O(n)  O(nlogn)  O(n^2)  O(n^3)  O(2^n)   O(n!)&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 style=&quot;font-family: inherit; font-weight: bold; line-height: 1.1; color: inherit; margin-top: 30px; margin-bottom: 20px; font-size: 30px;&quot;&gt;스터디에서 토론한 것.&lt;/h2&gt;
&lt;ul style=&quot;margin-top: 0; margin-bottom: 10px; line-height: 1.6;&quot;&gt;
&lt;li style=&quot;line-height: 1.6; margin-top: 0px;&quot;&gt;데이터구조는 알고리즘의 일부다. 그리고 알고리즘은 데이터 구조의 일부다. 서로가 서로에게 영향을 미치는 관계라고 생각한다.&lt;/li&gt;
&lt;li style=&quot;line-height: 1.6;&quot;&gt;알고리즘을 통해 데이터구조를 구현. 따라서 상호 보완적. 결국 서로는 서로와 동등한 지위를 갖는다 생각.&lt;/li&gt;
&lt;li style=&quot;line-height: 1.6;&quot;&gt;프로그램 랭귀지로 알고리즘 구현시 명백성을 자동으로 포함시킬 수 있다. 당연히 컴퓨터에 시켜야 하니까.&lt;/li&gt;
&lt;li style=&quot;line-height: 1.6;&quot;&gt;무한 동작한 행위는 알고리즘이라고 하지 않는다. 이게 좀 특이한 듯.&lt;/li&gt;
&lt;li style=&quot;line-height: 1.6;&quot;&gt;형식이 있다고들 하는데 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px; margin-top: 0px;&quot;&gt;psudo code&lt;/code&gt;는 형식이 필요없다고 생각한다. 사람마다 다를 수 있지만 서로 알아볼 수 있으면 된 것 아닌가?&lt;/li&gt;
&lt;li style=&quot;line-height: 1.6;&quot;&gt;자연어는 설명을 쭉 쓰는 건데 한 눈에 보기 힘들기에 별로 좋지 않을 수 있지만 전체적 흐름과 그 함수의 특성을 러프히 설명할 때 유용할 듯.&lt;ul style=&quot;margin-top: 0px; margin-bottom: 0; line-height: 1.6;&quot;&gt;
&lt;li style=&quot;line-height: 1.6; margin-top: 0px;&quot;&gt;그런데 그렇게 되면 알고리즘이 아니잖아. 명백성이 없어지니까.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li style=&quot;line-height: 1.6;&quot;&gt;프로그래밍언어는 알고리즘 표현에서 당연한 것.&lt;ul style=&quot;margin-top: 0px; margin-bottom: 0; line-height: 1.6;&quot;&gt;
&lt;li style=&quot;line-height: 1.6; margin-top: 0px;&quot;&gt;당연하지 않아. &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px; margin-top: 0px;&quot;&gt;psudo code&lt;/code&gt;나 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px;&quot;&gt;순서도&lt;/code&gt;로 표현하고 그걸 정리해서 구현 할 수도 있어. 반드시 코딩을 해야하는 건 아닌듯.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;center style=&quot;display:none&quot;&gt;%23Introducing.%20Data%20Structure%0A%23%23Data%20structure%28%uC790%uB8CC%uAD6C%uC870%29%uB780%3F%0A%0A%uCEF4%uD4E8%uD130%20%uD504%uB85C%uADF8%uB7A8%uC758%20%uD2B9%uC9D5%uC740%202%uAC00%uC9C0%uB85C%20%uD06C%uAC8C%20%uAD6C%uBCC4%uB428.%0A1.%20%uCEF4%uD4E8%uD130%uC5D0%20%uC758%uD574%uC11C%20%uC2E4%uD589%uB418%uB294%20%uBA85%uB839%uB4E4%uC758%20%uC9D1%uD569%uC774%uB780%20%uC810.%0A2.%20%uBA85%uB839%uC744%20%uC218%uD589%uD558%uAE30%20%uC704%uD574%20%uB0B4%uBD80%uC801%uC73C%uB85C%20%uC5EC%uB7EC%20%uC790%uB8CC%uB97C%20%uC800%uC7A5%uD55C%uB2E4%uB294%20%uC810.%0A%0A%uC989%20%uD504%uB85C%uADF8%uB7A8%uC774%uB780%20%60%uC790%uB8CC%28%uB370%uC774%uD130%29%60%20%uC9D1%uD569%uACFC%20%60%uBA85%uB839%28%uC54C%uACE0%uB9AC%uC998%29%60%20%uC9D1%uD569%uC758%20%uC9D1%uD569%0A%0A%23%23%uD6A8%uC728%uC801%20%uC790%uB8CC%uAD6C%uC870%uB77C%uB294%20%uAC83.%0A-%20%60%uC2E4%uD589%20%uC2DC%uAC04%20%28Time%20complexity%29%60%20%uCD5C%uC18C%uD654.%0A-%20%60%uC800%uC7A5%20%uACF5%uAC04%20%28Space%20complexity%29%60%20%uC808%uC57D.%0A%0A%uC5EC%uAE30%uC11C%20%uC800%uC7A5%20%uACF5%uAC04%uC758%20%uC808%uC57D%uC774%uB780%20%uD504%uB85C%uADF8%uB7A8%20%uC2E4%uD589%uC5D0%20%uD544%uC694%uD55C%20%uBA54%uBAA8%uB9AC%uAC00%20%uC801%uB2E4%uB294%20%uC758%uBBF8.%0A%uC2E4%uD589%20%uC2DC%uAC04%uC774%uB780%20%uD2B9%uC815%20%uAE30%uB2A5%uC744%20%uD558%uB294%uB370%20%uAC78%uB9AC%uB294%20%uC2DC%uAC04%uC744%20%uC758%uBBF8.%0A%0A%23%23%uC54C%uACE0%uB9AC%uC998%uC774%uB780%3F%0A%uCEF4%uD4E8%uD130%20%uBA85%uB839%20%uC790%uCCB4%uC758%20%uD6A8%uC728%uC131%uC744%20%uC99D%uAC00%uC2DC%uD0A4%uAE30%20%uC704%uD55C%20%uC808%uCC28%uB098%20%uBC29%uBC95.%0A%uD6A8%uC728%uC801%20%uC54C%uACE0%uB9AC%uC998%uC744%20%uC704%uD574%uC11C%uB294%20%uC88B%uC740%20%uC790%uB8CC%uAD6C%uC870%uAC00%20%uC120%uD589%uB418%uC5B4%20%uBC14%uD0D5%uC774%uB418%uC5B4%uC57C.%0A%0A%23%23%uC790%uB8CC%uC758%20%uC885%uB958.%20%28%uD615%uD0DC%uC5D0%20%uB530%uB77C%29%0A1.%20%uB2E8%uC21C%20%uAD6C%uC870.%20%28Primitive%20Data%20Structure%20%26%20%20Base%20Data%20Structure%29%0A%60%uC815%uC218%60%2C%20%60%uBB38%uC790%uC5F4%60%2C%20%60%uC2E4%uC218%60%20%uB4F1%0A2.%20%uC120%uD615%20%uAD6C%uC870.%20%28Linear%20Data%20Structure%29%0A%60%uB9AC%uC2A4%uD2B8%60%2C%20%60%uC2A4%uD0DD%60%2C%20%60%uD050%60%2C%20%60%uB371%60%0A%uAC01%uAC01%uC758%20%uC790%uB8CC%uAD6C%uC870%uAC00%20%uC120%uD615%uC801%uC73C%uB85C%20%uC5F0%uACB0%uB418%uC788%uB294%20%uAC83.%0A%uC55E%uC790%uB8CC%uC640%20%uB4B7%uC790%uB8CC%uAC00%20*1%3A1%20%uAD00%uACC4*.%0A3.%20%uBE44%20%uC120%uD615%20%uAD6C%uC870.%20%28Non-linear%20Data%20Structure%29%0A%60%uACC4%uCE35%20%uAD6C%uC870%28Hierarchical%20Structure%29%60%20%uD639%uC740%20%60%uB9DD%20%uAD6C%uC870%28Network%20%20Structure%29%60%uC744%20%uAC00%uC9C0%uB294%20%uACBD%uC6B0.%0A%uD2B8%uB9AC%uC640%20%uADF8%uB798%uD504%uAC00%20%uD3EC%uD568.%20%uC55E%uB4A4%uC790%uB8CC%uC758%20%uC120%uD6C4%uAD00%uACC4%uAC00%201%3A1%uC774%20%uC544%uB2D8.%0A4.%20%uD30C%uC77C%20%uAD6C%uC870.%20%28File%20Organization%29%0A%uBCF4%uC870%20%uAE30%uC5B5%uC7A5%uCE58%uC5D0%20%uC800%uC7A5%uB418%uB294%20%uD30C%uC77C%uC5D0%20%uB300%uD55C%20%uC790%uB8CC%uAD6C%uC870.%0A%uBA54%uBAA8%uB9AC%uC5D0%20%uD55C%uBC88%uC5D0%20%uC62C%uB9B4%28Loading%29%20%uC218%20%uC5C6%uB294%20%uB300%uC6A9%uB7C9%uC758%20%uC790%uB8CC%uB97C%20%uB300%uC0C1%uC73C%uB85C%20%uD568.%0A%60%uC21C%uCC28%uC801%20%uD30C%uC77C%20%uAD6C%uC870%28Sequential%29%60%2C%20%60%uC0C1%uB300%uC801%20%uD30C%uC77C%20%uAD6C%uC870%28Relative%29%60%2C%20%60%uC0C9%uC778%20%uD30C%uC77C%20%uAD6C%uC870%28Indexed%20Sequential%29%60%20%uBC0F%20%60%uB2E4%uC911%uD0A4%20%uD30C%uC77C%20%uAD6C%uC870%28Multi%20-%20key%29%60%uB4F1%uC774%20%uC788%uB2E4.%0A%0A%23%23%uCD94%uC0C1%20%uC790%uB8CC%uD615.%20%28Abstract%20Data%20Type.%29%0A%60%uC815%uBCF4%uC740%uB2C9%28Information%20Hiding%29%60%uC744%20%uC704%uD574%20%uC0AC%uC6A9.%20%uC911%uC694%uD55C%20%uC815%uBCF4%uB9CC%20%uB098%uD0C0%uB0B4%uACE0%20%uC911%uC694%uD558%uC9C0%20%uC54A%uC740%20%uC815%uBCF4%uB294%20%uC228%uAE30%uB294%20%uBC29%uBC95.%0A%0A%23%23%uC790%uB8CC%uC640%20%uC790%uB8CC%uD615%0A*%uC790%uB8CC%uC640%20%uC790%uB8CC%uD615%uC740%20%uB2E4%uB974%uB2E4%21%20%uBB54%uAC00%20%uBCC4%uAC70%uC544%uB2CC%uB370%20%uCDA9%uACA9%uC801.*%0A%0A-%20%20%20%uC790%uB8CC%20+%20%uC5F0%uC0B0%20%3D%20%uC790%uB8CC%uD615%0A-%20%20%20data%20+%20operation%20%3D%20data%20type%0A%0A%20%20%20%20%uC608%29%20%uC815%uC218%20%uC790%uB8CC%uD615%20%3D%20%uC790%uB8CC%20%281%2C2%2C3%2C-1%2C-2%uB4F1%uB4F1%29%20+%20%uC5F0%uC0B0%20%28%uB354%uD558%uAE30%2C%20%uBE7C%uAE30%2C%20%uACF1%uD558%uAE30%2C%20%uB098%uB204%uAE30%2C%20%uB098%uBA38%uC9C0%uC5F0%uC0B0%29%0A%0A%23%23%uCD94%uC0C1%uC790%uB8CC%uD615%0A%uCD94%uC0C1%uC801%uC73C%uB85C%20%uC815%uC758%uB41C%20%uC790%uB8CC%uD615.%20%uBBF8%uC220%uC5D0%uC11C%20%uCD94%uC0C1%uD654%uB294%20%uC0AC%uBB3C%uC744%20%uC0AC%uC2E4%uC801%uC73C%uB85C%20%uADF8%uB9AC%uC9C0%20%uC54A%uACE0%20%uC0AC%uBB3C%uC758%20%uBCF8%uC9C8%20%uD639%uC740%20%uB450%uB4DC%uB7EC%uC9C4%20%uD2B9%uC131%uC744%20%uAD00%uB150%uC801%uC73C%uB85C%20%uADF8%uB9AC%uB294%20%uAC83%20%uC758%uBBF8.%20%uC774%uC640%20%uC720%uC0AC%uD558%uAC8C%20%uC138%uBD80%uC801%uC774%uACE0%20%uBCF5%uC7A1%uD55C%20%uAC83%uC744%20%uC0DD%uB7B5%uD558%uACE0%20%uC911%uC694%uD55C%20%uAC83%uB9CC%20%uB098%uD0C0%uB0B8%uB294%20%uAC83.%0A%0A%uC608%29%20**%uCD94%uC0C1%20%uC790%uB8CC%uD615%20%uCF55%20%uCC0C%uB984%20%uBA54%uC138%uC9C0%28%uD398%uC774%uC2A4%uBD81%20%uCF55%20%uCC0C%uB974%uAE30%29.**%0A1.%20%uC790%uB8CC%203%uAC1C.%0A%uCF55%20%uCC0C%uB978%20%uC2DC%uAC04.%0A%uBCF4%uB0B4%uB294%20%uC774.%0A%uBC1B%uB294%20%uC774.%0A%0A2.%20%uBA85%uB839%20%3A%0A%0A%7C%uC774%uB984%7C%uC785%uB825%7C%uCD9C%uB825%7C%uC124%uBA85%7C%0A%7C%3A%7C%0A%7C%uBCC0%uACBD%28%29%7C%uCC0C%uB984%20%uBA54%uC138%uC9C0%20p%2C%20%uBCC0%uACBD%20%uBCF4%uB0B4%uB294%20%uC774%20s%2C%20%uBCC0%uACBD%20%uBC1B%uB294%20%uC774%20r%2C%20%uBCC0%uACBD%20%uC2DC%uAC04%20t%7CT/F%7C%uBCF4%uB0B4%uB294%20%uC774%uC640%20%uBC1B%uB294%20%uC774%20%uBCC0%uACBD.%20%uC874%uC7AC%uD558%uC9C0%20%uC54A%uB294%20%uD68C%uC6D0%uC77C%20%uACBD%uC6B0%20%uC2E4%uD328%7C%0A%7C%uBE44%uAD50%28%29%7C%uCC0C%uB984%20%uBA54%uC138%uC9C0%20p%7CT/F%7C%uB450%20%uBA54%uC138%uC9C0%uAC00%20%uAC19%uC740%uC9C0%20%uBE44%uAD50.%7C%0A%20%20%20%20%20%20%20%20%20%20%0A%23%23%uC54C%uACE0%uB9AC%uC998%0A%uBB38%uC81C%uB97C%20%uD574%uACB0%uD558%uAE30%uC704%uD55C%20%uC808%uCC28.%0A5%uAC00%uC9C0%20%uD2B9%uC131%uC744%20%uD544%uC218%uB85C%20%uAC00%uC9C0%uAC8C%20%uB428.%0A1.%20%60%uC785%uB825%28Input%29%60%20%3A%20%uC785%uB825%uB418%uB294%20%uC790%uB8CC%uAC00%200%uAC1C%20%uC774%uC0C1.%0A2.%20%60%uCD9C%uB825%28Output%29%60%20%3A%201%uAC1C%20%uC774%uC0C1%uC758%20%uCD9C%uB825%uAC12%20%uAC00%uC838%uC57C.%0A3.%20%60%uBA85%uBC31%uC131%28Definitenness%29%60%20%3A%20%uAC01%20%uBA85%uB839%uC5B4%uB294%20%uBAA8%uD638%uD558%uC9C0%20%uC54A%uC544%uC57C.%0A4.%20%60%uC720%uD55C%uC131%28Finiteness%29%60%20%3A%20%uD55C%uC815%uB41C%20%uC218%20%uB2E8%uACC4%uC774%uD6C4%20%uC885%uB8CC%uB418%uC5B4%uC57C.%0A5.%20%60%uC720%uD6A8%uC131%28Effectiveness%29%60%20%3A%20%uBAA8%uB4E0%20%uBA85%uB839%uC740%20%uC2E4%uD589%20%uAC00%uB2A5%uD574%uC57C.%0A%0A%23%23%uC54C%uACE0%uB9AC%uC998%uC758%20%uD45C%uD604%20%uBC29%uBC95.%0A1.%20%60%uC790%uC5F0%uC5B4%28Natural%20Language%29%60%20%3A%20%uC0AC%uB78C%uC774%20%uC0AC%uC6A9%uD558%uB294%20%uC77C%uBC18%uC801%20%uC5B8%uC5B4.%0A2.%20%60%uC21C%uC11C%uB3C4%28Flow%20Chart%29%60%20%3A%20%uC54C%uACE0%uB9AC%uC998%uC758%20%uB3C4%uC2DD%uD654%0A3.%20%60%uC758%uC0AC%20%uCF54%uB4DC%28Psudo%20Code%29%60%20%3A%20%uAC00%uC0C1%uC758%20%uD504%uB85C%uADF8%uB7A8%20%uC5B8%uC5B4%uB85C%20%uD45C%uD604%0A4.%20%60%uD504%uB85C%uADF8%uB798%uBC0D%20%uC5B8%uC5B4%60%0A%0A%23%23%uC54C%uACE0%uB9AC%uC998%uC758%20%uBD84%uC11D%20%uAE30%uC900%0A***%20%3D%3D%20%uC2DC%uAC04%20%uBCF5%uC7A1%uB3C4%uC640%20%uACF5%uAC04%20%uBCF5%uC7A1%uB3C4***%0A%20%20%20%20%uD604%uB300%uC758%20%uCEF4%uD4E8%uD130%20%uACFC%uD559%uC5D0%uC11C%uB294%20%uC2DC%uAC04%20%uBCF5%uC7A1%uB3C4%uB97C%20%uACF5%uAC04%20%uBCF5%uC7A1%uB3C4%uBCF4%uB2E4%20%uB300%uBD80%uBD84%20%uC6B0%uC120%uC2DC.%0A%0A%60%uC2DC%uAC04%20%uBCF5%uC7A1%uB3C4%60%20%3A%20%uC54C%uACE0%uB9AC%uC998%20%uC2E4%uD589%uC5D0%20%uAC78%uB9AC%uB294%20%uC2DC%uAC04.%0A%20%20%20%20%20%20%20%20%uC2E4%uC81C%20%uC2DC%uAC04%20%uCE21%uC815%20or%20%uC2E4%uD589%uB418%uB294%20%uBA85%uB839%uBB38%uC758%20%uAC1C%uC218%uB97C%20%uACC4%uC0B0.%0A%20%20%20%20%20%20%20%20%uC2E4%uC81C%20%uC2DC%uAC04%20%uCE21%uC815%uC758%20%uACBD%uC6B0%20%uAC04%uB2E8%uD558%uAC8C%20%uCE21%uC815%20%uAC00%uB2A5%uD558%uC9C0%uB9CC%20%uCEF4%uD4E8%uD130%20%uC131%uB2A5%uC5D0%20%uC885%uC18D%uC801.%20-%uAC1D%uAD00%uC131%20%uB0AE%uC74C%0A%20%20%20%20%20%20%20%20%uADF8%uB798%uC11C%20%uC2E4%uD589%uB418%uB294%20%uBA85%uB839%uBB38%20%uAC1C%uC218%uB97C%20%uAE30%uC900%uC73C%uB85C%20%uD310%uB2E8%20--%3E%3E%20N%uC5D0%uAD00%uD55C%20%uAD00%uACC4%uC2DD%uC73C%uB85C%20%uD45C%uD604.%0A%0A***%uC0AC%uC2E4%20%uC77C%uBC18%uC801%uC73C%uB85C%20%uC2DC%uAC04%20%uBCF5%uC7A1%uB3C4%uB294%20%3D%3D%20O%28%uBE45%20%uC624%3BBig-Oh%20notation%29%uB2E4.***%0A%0A%0A%23%23%uC5F0%uC2B5%uBB38%uC81C%0A***%28in%20%uC5F4%uD608%uAC15%uC758%20%uC790%uB8CC%uAD6C%uC870%20-%20%uD504%uB9AC%uB809%29***%0A%0A1.%20**%uC120%uD615%20%uAD6C%uC870%uC5D0%20%uC18D%uD558%uB294%20%uC790%uB8CC%uAD6C%uC870%uC640%20%uBE44%20%uC120%uD615%20%uAD6C%uC870%uC5D0%20%uC18D%uD558%uB294%20%uC790%uB8CC%uAD6C%uC870%uB97C%20%uAC01%uAC01%20%uC801%uC5B4%uBCF4%uC138%uC694.**%0A%uC120%uD615%20%uAD6C%uC870%20%3A%20%uB9AC%uC2A4%uD2B8%2C%20%uC2A4%uD0DD%2C%20%uD050%2C%20%uB371%0A%uBE44%20%uC120%uD615%20%uAD6C%uC870%20%3A%20%uD2B8%uB9AC%20%28Hierartchical%20Structure%29%2C%20%uADF8%uB798%uD504%20%28Network%20Structure%29%0A2.%20**%uB2E4%uC74C%uACFC%20%uAC19%uC740%20%uC5F0%uC0B0%uC790%uB97C%20%uD3EC%uD568%uD558%uB294%20MP3%20%uD50C%uB808%uC774%uC5B4%uC758%20%uCD94%uC0C1%20%uC790%uB8CC%uD615%uC744%20%uC124%uACC4%uD574%20%uBCF4%uC138%uC694.**%0A%0A%20%20%20%20%20%20%20%20Play%2C%20Stop%2C%20Pause%2C%20Add_MP3%2C%20Delete_MP3%2C%20Get_MP3_Count%0A*%uC790%uB8CC*%20%3A%20%uACE1%20%uBAA9%uB85D%2C%20%uBD88%uB9AC%uC5B8%20%uD615%20%uD50C%uB798%uADF8%28%uC7AC%uC0DD%uC911%uC778%uC9C0%29%2C%20%uD604%uC7AC%20%uC7AC%uC0DD%20%uC911%20%uACE1%20%uBC88%uD638%2C%20%20%uC7AC%uC0DD%20%uC2DC%uAC04%0A*%uC5F0%uC0B0*%20%3A%0Aplay%28mp3%29%20%3A%200%uBC88%uBD80%uD130%20%uC7AC%uC0DD.%0Astop%28mp3%29%20%3A%20%uBA48%uCDA4.%0Apause%28mp3%29%20%3A%20%uD604%uC7AC%20%uC7AC%uC0DD%uC911%20%uACE1%uBC88%uD638%2C%20%uC7AC%uC0DD%uC2DC%uAC04%uC5D0%20%uB370%uC774%uD130%20%uB123%uACE0%20%uD50C%uB798%uADF8%20off%uB85C.%0AAdd_MP3%28mp3%29%20%3A%20%uACE1%20%uBAA9%uB85D%20%uCD94%uAC00%0ADelete_MP3%28mp3%29%20%3A%20%uD604%uC7AC%uACE1%20%uC0AD%uC81C%0AGet_MP3_Count%28mp3%29%20%3A%20%uACE1%20%uBAA9%uB85D%20%uC0AC%uC774%uC988%20%uBC18%uD658.%0A%0A3.%20**%uC54C%uACE0%uB9AC%uC998%uC758%20%uC815%uC758%uB294%20%uBB34%uC5C7%uC778%uAC00%uC694%3F%20%uADF8%uB9AC%uACE0%20%uC54C%uACE0%uB9AC%uC998%uC774%20%uB9CC%uC871%uC2DC%uCF1C%uC57C%20%uD560%205%uAC00%uC9C0%20%uD2B9%uC9D5%uC740%20%uBB34%uC5C7%uC778%uAC00%uC694%3F**%0A%uBB38%uC81C%uB97C%20%uD574%uACB0%uD574%20%uB098%uAC00%uB294%20%uC808%uCC28.%0A%uC785%uB825%2C%20%uCD9C%uB825%2C%20%uBA85%uBC31%uC131%28Definiteness%29%2C%20%uC720%uD55C%uC131%28Finiteness%29%2C%20%uC720%uD6A8%uC131%28Effectiveness%29%0A%0A4.%20%uB2E4%uC74C%uACFC%20%uAC19%uC740%20%uC18C%uC2A4%uAC00%20%uC788%uB2E4%uACE0%20%uD560%20%uB54C%2C%20%uB2E4%uC74C%20%uC9C8%uBB38%uC5D0%20%uB2F5%uD574%uBCF4%uC138%uC694.%0A%281%29%20**n%uC5D0%20%uB300%uD55C%20%uC2DC%uAC04%20%uBCF5%uC7A1%uB3C4%20%uD568%uC218%uB97C%20%uAD6C%uD574%uBCF4%uC138%uC694.%20%uB2E8%2C%20%uB367%uC148%2C%20%uACF1%uC148%2C%20%uB098%uB217%uC148%uB4F1%20%uC5F0%uC0B0%20%uD69F%uC218%uB97C%20%uC815%uD655%uD788%20%uACE0%uB824%uD574%uC57C%20%uD569%uB2C8%uB2E4.**%0A%20%20%20%20%20%20%20%202n%20*%20%203n%20+%20n%20+%201%0A%3D%206n%5E2%20+%20n%20+%201%0A%282%29%20**%uBE45-%uC624%20%uD45C%uAE30%uBC95%uC73C%uB85C%20%uC2DC%uAC04%20%uBCF5%uC7A1%uB3C4%uB97C%20%uB098%uD0C0%uB0B4%20%uBCF4%uC138%uC694.**%0A%0A%20%20%20%20%20%20%20%20for%28%3Bi%3Cn%3Bi%3C-i+1%29%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20for%28j%3C-0%3Bj%3Cn%3Bj%3C-j+1%29%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20sum%20%3C-%20sum%20+%20j%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%3D%20O%28n%5E2%29%0A5.%20**%uB2E4%uC74C%20%uC2DC%uAC04%20%uBCF5%uC7A1%uB3C4%20%uD568%uC218%uB4E4%uC744%20%uBE45-%uC624%20%uD45C%uAE30%uBC95%uC73C%uB85C%20%uB098%uD0C0%uB0B4%20%uBCF4%uC138%uC694.**%0A%0A%20%20%20%20%20%20%20%206n%5E3%20+%20n%21%20+%205n%20+%204%20O%0A%20%20%20%20%3D%20n%21%0A%20%20%20%20%20%20%20%204nlogn%20+%205n%5E2%20+%202%20O%0A%20%20%20%20%3D%20n%5E2%0A%20%20%20%20%20%20%20%202%5En%20+%20n%5E3%20+%205%20O%0A%20%20%20%20%3D%202%5En%20%20%20%0A6.%20**%uB2E4%uC74C%uC744%20%uC2E4%uD589%20%uC2DC%uAC04%uC774%20%uC801%uAC8C%20%uAC78%uB9AC%uB294%20%uC21C%uC73C%uB85C%20%uB098%uC5F4%uD558%uC138%uC694.**%0A%0A%20%20%20%20%20%20%20%20O%28n%29%20%20O%28n%5E2%29%20%20O%28n%5E3%29%20%20O%28n%21%29%20%20O%28logn%29%20%20O%282%5En%29%20%20O%28nlogn%29%0A%3D%20O%28logn%29%20%20O%28n%29%20%20O%28nlogn%29%20%20O%28n%5E2%29%20%20O%28n%5E3%29%20%20O%282%5En%29%20%20%20O%28n%21%29%0A%0A%23%23%uC2A4%uD130%uB514%uC5D0%uC11C%20%uD1A0%uB860%uD55C%20%uAC83.%0A%0A-%20%uB370%uC774%uD130%uAD6C%uC870%uB294%20%uC54C%uACE0%uB9AC%uC998%uC758%20%uC77C%uBD80%uB2E4.%20%uADF8%uB9AC%uACE0%20%uC54C%uACE0%uB9AC%uC998%uC740%20%uB370%uC774%uD130%20%uAD6C%uC870%uC758%20%uC77C%uBD80%uB2E4.%20%uC11C%uB85C%uAC00%20%uC11C%uB85C%uC5D0%uAC8C%20%uC601%uD5A5%uC744%20%uBBF8%uCE58%uB294%20%uAD00%uACC4%uB77C%uACE0%20%uC0DD%uAC01%uD55C%uB2E4.%0A-%20%uC54C%uACE0%uB9AC%uC998%uC744%20%uD1B5%uD574%20%uB370%uC774%uD130%uAD6C%uC870%uB97C%20%uAD6C%uD604.%20%uB530%uB77C%uC11C%20%uC0C1%uD638%20%uBCF4%uC644%uC801.%20%uACB0%uAD6D%20%uC11C%uB85C%uB294%20%uC11C%uB85C%uC640%20%uB3D9%uB4F1%uD55C%20%uC9C0%uC704%uB97C%20%uAC16%uB294%uB2E4%20%uC0DD%uAC01.%0A-%20%uD504%uB85C%uADF8%uB7A8%20%uB7AD%uADC0%uC9C0%uB85C%20%uC54C%uACE0%uB9AC%uC998%20%uAD6C%uD604%uC2DC%20%uBA85%uBC31%uC131%uC744%20%uC790%uB3D9%uC73C%uB85C%20%uD3EC%uD568%uC2DC%uD0AC%20%uC218%20%uC788%uB2E4.%20%uB2F9%uC5F0%uD788%20%uCEF4%uD4E8%uD130%uC5D0%20%uC2DC%uCF1C%uC57C%20%uD558%uB2C8%uAE4C.%0A-%20%uBB34%uD55C%20%uB3D9%uC791%uD55C%20%uD589%uC704%uB294%20%uC54C%uACE0%uB9AC%uC998%uC774%uB77C%uACE0%20%uD558%uC9C0%20%uC54A%uB294%uB2E4.%20%uC774%uAC8C%20%uC880%20%uD2B9%uC774%uD55C%20%uB4EF.%0A-%20%uD615%uC2DD%uC774%20%uC788%uB2E4%uACE0%uB4E4%20%uD558%uB294%uB370%20%60psudo%20code%60%uB294%20%uD615%uC2DD%uC774%20%uD544%uC694%uC5C6%uB2E4%uACE0%20%uC0DD%uAC01%uD55C%uB2E4.%20%uC0AC%uB78C%uB9C8%uB2E4%20%uB2E4%uB97C%20%uC218%20%uC788%uC9C0%uB9CC%20%uC11C%uB85C%20%uC54C%uC544%uBCFC%20%uC218%20%uC788%uC73C%uBA74%20%uB41C%20%uAC83%20%uC544%uB2CC%uAC00%3F%0A-%20%uC790%uC5F0%uC5B4%uB294%20%uC124%uBA85%uC744%20%uCB49%20%uC4F0%uB294%20%uAC74%uB370%20%uD55C%20%uB208%uC5D0%20%uBCF4%uAE30%20%uD798%uB4E4%uAE30%uC5D0%20%uBCC4%uB85C%20%uC88B%uC9C0%20%uC54A%uC744%20%uC218%20%uC788%uC9C0%uB9CC%20%uC804%uCCB4%uC801%20%uD750%uB984%uACFC%20%uADF8%20%uD568%uC218%uC758%20%uD2B9%uC131%uC744%20%uB7EC%uD504%uD788%20%uC124%uBA85%uD560%20%uB54C%20%uC720%uC6A9%uD560%20%uB4EF.%0A%20%20%20%20-%20%uADF8%uB7F0%uB370%20%uADF8%uB807%uAC8C%20%uB418%uBA74%20%uC54C%uACE0%uB9AC%uC998%uC774%20%uC544%uB2C8%uC796%uC544.%20%uBA85%uBC31%uC131%uC774%20%uC5C6%uC5B4%uC9C0%uB2C8%uAE4C.%0A-%20%uD504%uB85C%uADF8%uB798%uBC0D%uC5B8%uC5B4%uB294%20%uC54C%uACE0%uB9AC%uC998%20%uD45C%uD604%uC5D0%uC11C%20%uB2F9%uC5F0%uD55C%20%uAC83.%0A%20%20%20%20-%20%uB2F9%uC5F0%uD558%uC9C0%20%uC54A%uC544.%20%60psudo%20code%60%uB098%20%60%uC21C%uC11C%uB3C4%60%uB85C%20%uD45C%uD604%uD558%uACE0%20%uADF8%uAC78%20%uC815%uB9AC%uD574%uC11C%20%uAD6C%uD604%20%uD560%20%uC218%uB3C4%20%uC788%uC5B4.%20%uBC18%uB4DC%uC2DC%20%uCF54%uB529%uC744%20%uD574%uC57C%uD558%uB294%20%uAC74%20%uC544%uB2CC%uB4EF.%0A%0A%0A%0A%0A%0A&lt;/center&gt;
&lt;br /&gt;&lt;/en-note&gt;</description>
      <category>Engineering</category>
      <category>Data sturcture</category>
      <category>space complexity</category>
      <category>time complexity</category>
      <category>데이터 구조</category>
      <category>시간복잡도</category>
      <category>알고리즘</category>
      <category>알고리즘 분석 기준</category>
      <category>자료구조</category>
      <author>youngkyu.cho</author>
      <guid isPermaLink="true">https://youngkyu.tistory.com/24</guid>
      <comments>https://youngkyu.tistory.com/24#entry24comment</comments>
      <pubDate>Wed, 29 Oct 2014 02:47:57 +0900</pubDate>
    </item>
    <item>
      <title>Pymongo tutorial (파이몽고 사용하기) / pymongo 번역</title>
      <link>https://youngkyu.tistory.com/23</link>
      <description>&lt;en-note lang=&quot;v2&quot; style=&quot;line-height:1.6;&quot;&gt;&lt;del style=&quot;position:relative;display:block&quot;&gt;&lt;a style=&quot;position: absolute;color: #FFF;text-decoration: none;font-size: 12px;height: 25px;border-radius: 0;margin-top: -20px;right: 15px;background: rgba(0, 0, 0, 0);border-left: 10px solid #BB3A34;border-right: 10px solid #BB3A34;border-bottom: 5px solid rgba(0, 0, 0, 0);width: 0;text-indent:-100000px;&quot; href=&quot;http://marxi.co/#/?provider=evernote_int&amp;amp;guid=81941369-ac03-443c-9dad-e48cfb22978d&quot;&gt;Edit&lt;/a&gt;&lt;/del&gt;&lt;div style=&quot;line-height: 1.6; font-family: Helvetica Neue, Arial, Hiragino Sans GB, STHeiti, Microsoft YaHei, WenQuanYi Micro Hei, SimSun, Song, sans-serif;&quot;&gt;
&lt;h1 style=&quot;font-size: 36px; margin: 0.67em 0; font-family: inherit; font-weight: bold; line-height: 1.1; color: inherit; margin-top: 0px; margin-bottom: 20px;&quot;&gt;Pymongo tutorial (파이몽고 사용하기)&lt;/h1&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;em style=&quot;margin-top: 0px;&quot;&gt;파이 몽고란 파이썬 몽고 디비 드라이버이다. 버전 2.7.2 기준으로 작성되었다.&lt;/em&gt;&lt;/p&gt;&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;소프트웨어 마에스트로 프로젝트를 하면서 사용자의 로그를 빠르게 수집해 그것을 처리하기 위해 선택한 디비가 바로 몽고디비다. 이를 컨트롤 하기 위해서는 파이썬 백엔드 언어로 사용하기에 파이썬 몽고 디비 드라이버가 필요했다. 딱 구글신께 물어보니 파이몽고를 알려주사, 튜토리얼을 따라해보기로 했다.&lt;/p&gt;&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;하는 김에 번역도 해봤다. DogFoot번역이므로 필요하면 &lt;a href=&quot;http://api.mongodb.org/python/current/tutorial.html&quot; target=&quot;_blank&quot; style=&quot;background: transparent; margin-top: 0px;&quot;&gt;여기&lt;/a&gt;서 원문을 볼 수 있다. 그래도 번역가처럼 이해하기 좋게 의역도 해놔서 보기는 좋을 듯.&lt;/p&gt;
&lt;h2 style=&quot;font-family: inherit; font-weight: bold; line-height: 1.1; color: inherit; margin-top: 30px; margin-bottom: 20px; font-size: 30px;&quot;&gt;Tutorial&lt;/h2&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;이 튜토리얼에서 몽고디비와 파이몽고의 작동에 대해 배울 수 있을 것이다.&lt;/p&gt;
&lt;h2 style=&quot;font-family: inherit; font-weight: bold; line-height: 1.1; color: inherit; margin-top: 30px; margin-bottom: 20px; font-size: 30px;&quot;&gt;준비물.&lt;/h2&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;먼저 시작하기전에 파이몽고를 깔아야하지 않겠습니까. 파이썬 쉘을 열고 아래의 명령어를 쳐서 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px; margin-top: 0px;&quot;&gt;Exception&lt;/code&gt;이 발생하지 않는지 확인하자.&lt;/p&gt;
&lt;pre style=&quot;overflow: initial; font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 14px; display: block; padding: 0; margin: 0 0 10px; line-height: 1.6; word-break: break-all; word-wrap: break-word; color: #333333; background-color: #f5f5f5; border: none; border-radius: 0; white-space: pre-wrap;&quot;&gt;&lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: inherit; padding: 1em; color: #333; background-color: transparent; white-space: pre-wrap; border-radius: 0; display: block; background: #F6F6F6; margin-top: 0px;&quot;&gt;&lt;span style=&quot;color: #333; font-weight: bold; margin-top: 0px;&quot;&gt;import&lt;/span&gt; pymongo
&lt;/code&gt;&lt;/pre&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;이 튜토리얼은 몽고디비 인스턴스가 &lt;strong style=&quot;font-weight: bold; margin-top: 0px;&quot;&gt;디폴트 포트와 호스트&lt;/strong&gt;에서 돌아감을 가정하고 진행한다. 몽고디비는 당연히 준비됐겠지? 몽고디비를 실행하라.&lt;/p&gt;
&lt;pre style=&quot;overflow: initial; font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 14px; display: block; padding: 0; margin: 0 0 10px; line-height: 1.6; word-break: break-all; word-wrap: break-word; color: #333333; background-color: #f5f5f5; border: none; border-radius: 0; white-space: pre-wrap;&quot;&gt;&lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: inherit; padding: 1em; color: #333; background-color: transparent; white-space: pre-wrap; border-radius: 0; display: block; background: #F6F6F6; margin-top: 0px;&quot;&gt;&lt;span style=&quot;color: #008080; margin-top: 0px;&quot;&gt;$ &lt;/span&gt;mongod
&lt;/code&gt;&lt;/pre&gt;
&lt;h2 style=&quot;font-family: inherit; font-weight: bold; line-height: 1.1; color: inherit; margin-top: 30px; margin-bottom: 20px; font-size: 30px;&quot;&gt;MongoClient를 가지고 몽고디비에 연결해보자.&lt;/h2&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;첫번째 스탭은 파이몽고의 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px; margin-top: 0px;&quot;&gt;MongoClient&lt;/code&gt;를 돌고있는 mongod 인스턴스를 위해 만들어주는 것이다. 아래를 따라해라.&lt;/p&gt;
&lt;pre style=&quot;overflow: initial; font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 14px; display: block; padding: 0; margin: 0 0 10px; line-height: 1.6; word-break: break-all; word-wrap: break-word; color: #333333; background-color: #f5f5f5; border: none; border-radius: 0; white-space: pre-wrap;&quot;&gt;&lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: inherit; padding: 1em; color: #333; background-color: transparent; white-space: pre-wrap; border-radius: 0; display: block; background: #F6F6F6; margin-top: 0px;&quot;&gt;&lt;span style=&quot;color: #333; font-weight: bold; margin-top: 0px;&quot;&gt;from&lt;/span&gt; pymongo &lt;span style=&quot;color: #333; font-weight: bold;&quot;&gt;import&lt;/span&gt; MongoClient
client = MongoClient()
&lt;/code&gt;&lt;/pre&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;위 코드는 디폴트 호스트와 포트에 연결 할 것이다. 만약에 디폴트 설정이 아니거나 명시적으로 표시해주고 싶다면 아래를 참고할 것.&lt;/p&gt;
&lt;pre style=&quot;overflow: initial; font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 14px; display: block; padding: 0; margin: 0 0 10px; line-height: 1.6; word-break: break-all; word-wrap: break-word; color: #333333; background-color: #f5f5f5; border: none; border-radius: 0; white-space: pre-wrap;&quot;&gt;&lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: inherit; padding: 1em; color: #333; background-color: transparent; white-space: pre-wrap; border-radius: 0; display: block; background: #F6F6F6; margin-top: 0px;&quot;&gt;&lt;span style=&quot;color: #333; font-weight: bold; margin-top: 0px;&quot;&gt;client&lt;/span&gt; = MongoClient(&lt;span style=&quot;color: #dd1144;&quot;&gt;'localhost'&lt;/span&gt;, &lt;span style=&quot;color: #099;&quot;&gt;27017&lt;/span&gt;)
&lt;/code&gt;&lt;/pre&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;혹은 몽고디비 URI 포멧을 이용하여 적을 수도 있다!&lt;/p&gt;
&lt;pre style=&quot;overflow: initial; font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 14px; display: block; padding: 0; margin: 0 0 10px; line-height: 1.6; word-break: break-all; word-wrap: break-word; color: #333333; background-color: #f5f5f5; border: none; border-radius: 0; white-space: pre-wrap;&quot;&gt;&lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: inherit; padding: 1em; color: #333; background-color: transparent; white-space: pre-wrap; border-radius: 0; display: block; background: #F6F6F6; margin-top: 0px;&quot;&gt;&lt;span style=&quot;color: #333; font-weight: bold; margin-top: 0px;&quot;&gt;client&lt;/span&gt; = MongoClient(&lt;span style=&quot;color: #dd1144;&quot;&gt;'mongodb://localhost:27017/'&lt;/span&gt;)
&lt;/code&gt;&lt;/pre&gt;
&lt;h2 style=&quot;font-family: inherit; font-weight: bold; line-height: 1.1; color: inherit; margin-top: 30px; margin-bottom: 20px; font-size: 30px;&quot;&gt;데이터베이스 얻어오기.&lt;/h2&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;몽고디비의 한 인스턴스는 독립적인 데이터베이스를 여러개 만들 수 있도록 해준다. 따라서 그중 어떤 데이터베이스를 가져올지는 아래를 따라해라. &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px; margin-top: 0px;&quot;&gt;MongoClient&lt;/code&gt; 인스턴스를 이용해서.&lt;/p&gt;
&lt;pre style=&quot;overflow: initial; font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 14px; display: block; padding: 0; margin: 0 0 10px; line-height: 1.6; word-break: break-all; word-wrap: break-word; color: #333333; background-color: #f5f5f5; border: none; border-radius: 0; white-space: pre-wrap;&quot;&gt;&lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: inherit; padding: 1em; color: #333; background-color: transparent; white-space: pre-wrap; border-radius: 0; display: block; background: #F6F6F6; margin-top: 0px;&quot;&gt;&lt;span style=&quot;color: #333; font-weight: bold; margin-top: 0px;&quot;&gt;db&lt;/span&gt; = client.test_database
&lt;/code&gt;&lt;/pre&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;test_database에 넣고 싶은걸 넣어라. 설마 저걸 따라치면 안된다.&lt;br style=&quot;margin-top: 0px;&quot;&gt;만약 데이터베이스 이름이 저런식으로 표현이 안된다면 아래처럼도 가능하다.&lt;/p&gt;
&lt;pre style=&quot;overflow: initial; font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 14px; display: block; padding: 0; margin: 0 0 10px; line-height: 1.6; word-break: break-all; word-wrap: break-word; color: #333333; background-color: #f5f5f5; border: none; border-radius: 0; white-space: pre-wrap;&quot;&gt;&lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: inherit; padding: 1em; color: #333; background-color: transparent; white-space: pre-wrap; border-radius: 0; display: block; background: #F6F6F6; margin-top: 0px;&quot;&gt;&lt;span style=&quot;color: #333; font-weight: bold; margin-top: 0px;&quot;&gt;db&lt;/span&gt; = client[&lt;span style=&quot;color: #dd1144;&quot;&gt;&quot;test_database&quot;&lt;/span&gt;]
&lt;/code&gt;&lt;/pre&gt;
&lt;h2 style=&quot;font-family: inherit; font-weight: bold; line-height: 1.1; color: inherit; margin-top: 30px; margin-bottom: 20px; font-size: 30px;&quot;&gt;컬렉션 가져오기.&lt;/h2&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;컬렉션은 도큐먼트의 그룹이다. RDB의 데이터베이스와 얼추 비슷하게 생각하면 된다. 파이몽고로 컬렉션을 가져오는 방법은 아래와 같다.&lt;/p&gt;
&lt;pre style=&quot;overflow: initial; font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 14px; display: block; padding: 0; margin: 0 0 10px; line-height: 1.6; word-break: break-all; word-wrap: break-word; color: #333333; background-color: #f5f5f5; border: none; border-radius: 0; white-space: pre-wrap;&quot;&gt;&lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: inherit; padding: 1em; color: #333; background-color: transparent; white-space: pre-wrap; border-radius: 0; display: block; background: #F6F6F6; margin-top: 0px;&quot;&gt;&lt;span style=&quot;color: #333; font-weight: bold; margin-top: 0px;&quot;&gt;collection&lt;/span&gt; = db.test_collection
&lt;/code&gt;&lt;/pre&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;당연하다. test_collection이라 넣으면 안된다. 넣고싶은걸 넣어라.&lt;br style=&quot;margin-top: 0px;&quot;&gt;혹은 위에 데이터베이스에서 가져왔듯이 아래처럼도 가능하다.&lt;/p&gt;
&lt;pre style=&quot;overflow: initial; font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 14px; display: block; padding: 0; margin: 0 0 10px; line-height: 1.6; word-break: break-all; word-wrap: break-word; color: #333333; background-color: #f5f5f5; border: none; border-radius: 0; white-space: pre-wrap;&quot;&gt;&lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: inherit; padding: 1em; color: #333; background-color: transparent; white-space: pre-wrap; border-radius: 0; display: block; background: #F6F6F6; margin-top: 0px;&quot;&gt;&lt;span style=&quot;color: #333; font-weight: bold; margin-top: 0px;&quot;&gt;collection&lt;/span&gt; = db[&lt;span style=&quot;color: #dd1144;&quot;&gt;&quot;test_collection&quot;&lt;/span&gt;]
&lt;/code&gt;&lt;/pre&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;몽고디비의 컬렉션이나 데이터베이스에서 중요한 것은 게으르게 생성된다는 것이다. (필요할 때가 되서야 억지로 생성된다는 것!) 위의 명령중 어느것도 몽고디비와 실제로 어떤 일도 수행하지 않는다. 컬렉션과 데이터베이스들은 첫 도큐먼트가 걔네들에 insert될 때 생성된다.&lt;/p&gt;
&lt;h2 style=&quot;font-family: inherit; font-weight: bold; line-height: 1.1; color: inherit; margin-top: 30px; margin-bottom: 20px; font-size: 30px;&quot;&gt;도큐먼트(문서)&lt;/h2&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;몽고디비 안에 데이터는 JSON스타일로 저장된다. 파이 몽고는 파이썬의 딕셔너리를 활용해서 표현한다. 아래 예시처럼 말이다. 블로그 포스트를 의미하는 예시다.&lt;/p&gt;
&lt;pre style=&quot;overflow: initial; font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 14px; display: block; padding: 0; margin: 0 0 10px; line-height: 1.6; word-break: break-all; word-wrap: break-word; color: #333333; background-color: #f5f5f5; border: none; border-radius: 0; white-space: pre-wrap;&quot;&gt;&lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: inherit; padding: 1em; color: #333; background-color: transparent; white-space: pre-wrap; border-radius: 0; display: block; background: #F6F6F6; margin-top: 0px;&quot;&gt;&lt;span style=&quot;margin-top: 0px;&quot;&gt;import&lt;/span&gt; datetime
post = {
    &lt;span style=&quot;color: #dd1144;&quot;&gt;&quot;author&quot;&lt;/span&gt; : &lt;span style=&quot;color: #dd1144;&quot;&gt;&quot;Mike&quot;&lt;/span&gt;,
    &lt;span style=&quot;color: #dd1144;&quot;&gt;&quot;text&quot;&lt;/span&gt; : &lt;span style=&quot;color: #dd1144;&quot;&gt;&quot;My first blog post!&quot;&lt;/span&gt;,
    &lt;span style=&quot;color: #dd1144;&quot;&gt;&quot;tags&quot;&lt;/span&gt; : [&lt;span style=&quot;color: #dd1144;&quot;&gt;&quot;mongodb&quot;&lt;/span&gt;, &lt;span style=&quot;color: #dd1144;&quot;&gt;&quot;python&quot;&lt;/span&gt;, &lt;span style=&quot;color: #dd1144;&quot;&gt;&quot;pymongo&quot;&lt;/span&gt;],
    &lt;span style=&quot;color: #dd1144;&quot;&gt;&quot;date&quot;&lt;/span&gt;: datetime.datetime.utcnow()
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;기억하라. 도큐먼트(문서)는 네이티브 파이썬 타입(위의 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px; margin-top: 0px;&quot;&gt;datetime.datetime&lt;/code&gt; 인스턴스 같은)을 가지고 있을 수 있다. 이것은 자동적으로 BSON 타입으로 컨버팅되고, 또 컨버팅해서 가져온다.&lt;/p&gt;
&lt;h2 style=&quot;font-family: inherit; font-weight: bold; line-height: 1.1; color: inherit; margin-top: 30px; margin-bottom: 20px; font-size: 30px;&quot;&gt;도큐먼트에 Insert를 해보자.&lt;/h2&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;도큐먼트에 insert를 하기 위해서 우리는 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px; margin-top: 0px;&quot;&gt;insert()&lt;/code&gt;란 메소드를 쓸거다.&lt;/p&gt;
&lt;pre style=&quot;overflow: initial; font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 14px; display: block; padding: 0; margin: 0 0 10px; line-height: 1.6; word-break: break-all; word-wrap: break-word; color: #333333; background-color: #f5f5f5; border: none; border-radius: 0; white-space: pre-wrap;&quot;&gt;&lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: inherit; padding: 1em; color: #333; background-color: transparent; white-space: pre-wrap; border-radius: 0; display: block; background: #F6F6F6; margin-top: 0px;&quot;&gt;&lt;span style=&quot;margin-top: 0px;&quot;&gt;posts&lt;/span&gt; = db.posts
&lt;span&gt;post_id&lt;/span&gt; = posts.insert(post)
&lt;/code&gt;&lt;/pre&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;매우 간단하다. 만약 도큐먼트가 _id키를 가지고 있지 않다면 몽고디비가 알아서 도큐먼트에 특별한 _id 키를 부여해서 자동으로 인서트 된다. _id는 무조건 유니크해야한다. insert 메소드는 insert시 특별히 부여된 _id를 반환한다. 더 많은 정보가 필요하다면 &lt;a href=&quot;http://docs.mongodb.org/manual/reference/object-id/&quot; target=&quot;_blank&quot; style=&quot;background: transparent; margin-top: 0px;&quot;&gt;몽고디비 사이트의 _id&lt;/a&gt;를 보라.&lt;/p&gt;&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;이게 처음 넣은 것이므로 그제서야 &lt;em style=&quot;margin-top: 0px;&quot;&gt;posts&lt;/em&gt;컬렉션이 실제로 몽고디비서버에 생성된다. 우리는 이제서야 우리 database에 &lt;em&gt;posts&lt;/em&gt; 컬렉션이 리스트에 있음을 확인 할 수 있다. &lt;/p&gt;
&lt;pre style=&quot;overflow: initial; font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 14px; display: block; padding: 0; margin: 0 0 10px; line-height: 1.6; word-break: break-all; word-wrap: break-word; color: #333333; background-color: #f5f5f5; border: none; border-radius: 0; white-space: pre-wrap;&quot;&gt;&lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: inherit; padding: 1em; color: #333; background-color: transparent; white-space: pre-wrap; border-radius: 0; display: block; background: #F6F6F6; margin-top: 0px;&quot;&gt;&lt;span style=&quot;color: #990073; margin-top: 0px;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;db.collection_names()
[&lt;span style=&quot;color: #dd1144;&quot;&gt;u'system.indexes'&lt;/span&gt;, &lt;span style=&quot;color: #dd1144;&quot;&gt;u'posts'&lt;/span&gt;]
&lt;/code&gt;&lt;/pre&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;strong style=&quot;font-weight: bold; margin-top: 0px;&quot;&gt;&lt;em style=&quot;margin-top: 0px;&quot;&gt;system.indexes 컬렉션은 스페셜한 내부 컬렉션으로 자동으로 생성된다.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;h2 style=&quot;font-family: inherit; font-weight: bold; line-height: 1.1; color: inherit; margin-top: 30px; margin-bottom: 20px; font-size: 30px;&quot;&gt;find_one()으로 한 도큐먼트 얻어오기.&lt;/h2&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;가장 기본적인 타입의 몽고디비 쿼리가 바로 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px; margin-top: 0px;&quot;&gt;find_one()&lt;/code&gt;이다. 이 메소드는 쿼리가 매칭되는 하나의 도큐먼트(문서)를 가져오는 애다.&lt;br /&gt;&lt;em&gt;(mysql-connector를 파이썬에서 써봤다면 select_one()과 비슷한 애.)&lt;/em&gt;&lt;br /&gt;만약 매치되는게 없다면 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px;&quot;&gt;None&lt;/code&gt; 을 반환한다.&lt;/p&gt;&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;이것은 매우 유용한데 네가 만약 처음 매칭되는 도큐먼트나, 그 쿼리와 딱 맞게 하나만 존재하는 도큐먼트를 들고오고 싶을 때 정말 딱이다. 여기는 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px; margin-top: 0px;&quot;&gt;find_one()&lt;/code&gt;으로 &lt;em&gt;posts&lt;/em&gt;컬렉션의 첫번째 도큐먼트를 들고오는 예제다.&lt;/p&gt;
&lt;pre style=&quot;overflow: initial; font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 14px; display: block; padding: 0; margin: 0 0 10px; line-height: 1.6; word-break: break-all; word-wrap: break-word; color: #333333; background-color: #f5f5f5; border: none; border-radius: 0; white-space: pre-wrap;&quot;&gt;&lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: inherit; padding: 1em; color: #333; background-color: transparent; white-space: pre-wrap; border-radius: 0; display: block; background: #F6F6F6; margin-top: 0px;&quot;&gt;&lt;span style=&quot;color: #990073; margin-top: 0px;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;posts.find_one()
{&lt;span style=&quot;color: #dd1144;&quot;&gt;u'date'&lt;/span&gt;: datetime.datetime(...), &lt;span style=&quot;color: #dd1144;&quot;&gt;u'text'&lt;/span&gt;: &lt;span style=&quot;color: #dd1144;&quot;&gt;u'My first blog post!'&lt;/span&gt;, &lt;span style=&quot;color: #dd1144;&quot;&gt;u'_id'&lt;/span&gt;: ObjectId(&lt;span style=&quot;color: #dd1144;&quot;&gt;'...'&lt;/span&gt;), &lt;span style=&quot;color: #dd1144;&quot;&gt;u'author'&lt;/span&gt;: &lt;span style=&quot;color: #dd1144;&quot;&gt;u'Mike'&lt;/span&gt;, &lt;span style=&quot;color: #dd1144;&quot;&gt;u'tags'&lt;/span&gt;: [&lt;span style=&quot;color: #dd1144;&quot;&gt;u'mongodb'&lt;/span&gt;, &lt;span style=&quot;color: #dd1144;&quot;&gt;u'python'&lt;/span&gt;, &lt;span style=&quot;color: #dd1144;&quot;&gt;u'pymongo'&lt;/span&gt;]}
&lt;/code&gt;&lt;/pre&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;이 결과는 파이썬 딕셔너리로 반환된다.&lt;br style=&quot;margin-top: 0px;&quot;&gt;&lt;strong style=&quot;font-weight: bold;&quot;&gt;&lt;em style=&quot;margin-top: 0px;&quot;&gt;리턴되는 도큐먼트에는 자동적으로 insert시 부여된 _id값이 같이 딸려온다.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px; margin-top: 0px;&quot;&gt;find_one()&lt;/code&gt;은 특정 성분(앨리먼트)의 매칭 쿼리도 지원한다. 아래는 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px;&quot;&gt;&quot;Mike&quot;&lt;/code&gt;가 author인 거 들고오는 예제다.&lt;/p&gt;
&lt;pre style=&quot;overflow: initial; font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 14px; display: block; padding: 0; margin: 0 0 10px; line-height: 1.6; word-break: break-all; word-wrap: break-word; color: #333333; background-color: #f5f5f5; border: none; border-radius: 0; white-space: pre-wrap;&quot;&gt;&lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: inherit; padding: 1em; color: #333; background-color: transparent; white-space: pre-wrap; border-radius: 0; display: block; background: #F6F6F6; margin-top: 0px;&quot;&gt;&lt;span style=&quot;color: #990073; margin-top: 0px;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;posts.find_one({&lt;span style=&quot;color: #dd1144;&quot;&gt;&quot;author&quot;&lt;/span&gt;: &lt;span style=&quot;color: #dd1144;&quot;&gt;&quot;Mike&quot;&lt;/span&gt;})
{&lt;span style=&quot;color: #dd1144;&quot;&gt;u'date'&lt;/span&gt;: datetime.datetime(...), &lt;span style=&quot;color: #dd1144;&quot;&gt;u'text'&lt;/span&gt;: &lt;span style=&quot;color: #dd1144;&quot;&gt;u'My first blog post!'&lt;/span&gt;, &lt;span style=&quot;color: #dd1144;&quot;&gt;u'_id'&lt;/span&gt;: ObjectId(&lt;span style=&quot;color: #dd1144;&quot;&gt;'...'&lt;/span&gt;), &lt;span style=&quot;color: #dd1144;&quot;&gt;u'author'&lt;/span&gt;: &lt;span style=&quot;color: #dd1144;&quot;&gt;u'Mike'&lt;/span&gt;, &lt;span style=&quot;color: #dd1144;&quot;&gt;u'tags'&lt;/span&gt;: [&lt;span style=&quot;color: #dd1144;&quot;&gt;u'mongodb'&lt;/span&gt;, &lt;span style=&quot;color: #dd1144;&quot;&gt;u'python'&lt;/span&gt;, &lt;span style=&quot;color: #dd1144;&quot;&gt;u'pymongo'&lt;/span&gt;]}
&lt;/code&gt;&lt;/pre&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;만약 없는 author를 시도한다면 아무 결과물도 안나올 것이다.&lt;/p&gt;
&lt;pre style=&quot;overflow: initial; font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 14px; display: block; padding: 0; margin: 0 0 10px; line-height: 1.6; word-break: break-all; word-wrap: break-word; color: #333333; background-color: #f5f5f5; border: none; border-radius: 0; white-space: pre-wrap;&quot;&gt;&lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: inherit; padding: 1em; color: #333; background-color: transparent; white-space: pre-wrap; border-radius: 0; display: block; background: #F6F6F6; margin-top: 0px;&quot;&gt;&lt;span style=&quot;color: #990073; margin-top: 0px;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;posts.find_one({&lt;span style=&quot;color: #dd1144;&quot;&gt;&quot;author&quot;&lt;/span&gt;: &lt;span style=&quot;color: #dd1144;&quot;&gt;&quot;Eliot&quot;&lt;/span&gt;})
&amp;gt;&amp;gt;&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;h2 style=&quot;font-family: inherit; font-weight: bold; line-height: 1.1; color: inherit; margin-top: 30px; margin-bottom: 20px; font-size: 30px;&quot;&gt;ObjectId로 쿼리하기.&lt;/h2&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;우리는 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px; margin-top: 0px;&quot;&gt;_id&lt;/code&gt;로도 쿼리할 수 있다. &lt;/p&gt;
&lt;pre style=&quot;overflow: initial; font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 14px; display: block; padding: 0; margin: 0 0 10px; line-height: 1.6; word-break: break-all; word-wrap: break-word; color: #333333; background-color: #f5f5f5; border: none; border-radius: 0; white-space: pre-wrap;&quot;&gt;&lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: inherit; padding: 1em; color: #333; background-color: transparent; white-space: pre-wrap; border-radius: 0; display: block; background: #F6F6F6; margin-top: 0px;&quot;&gt;&lt;span style=&quot;color: #990073; margin-top: 0px;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;post_id
ObjectId(...)
&lt;span style=&quot;color: #990073;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;posts.find_one({&lt;span style=&quot;color: #dd1144;&quot;&gt;&quot;_id&quot;&lt;/span&gt;: post_id})
{&lt;span style=&quot;color: #dd1144;&quot;&gt;u'date'&lt;/span&gt;: datetime.datetime(...), &lt;span style=&quot;color: #dd1144;&quot;&gt;u'text'&lt;/span&gt;: &lt;span style=&quot;color: #dd1144;&quot;&gt;u'My first blog post!'&lt;/span&gt;, &lt;span style=&quot;color: #dd1144;&quot;&gt;u'_id'&lt;/span&gt;: ObjectId(&lt;span style=&quot;color: #dd1144;&quot;&gt;'...'&lt;/span&gt;), &lt;span style=&quot;color: #dd1144;&quot;&gt;u'author'&lt;/span&gt;: &lt;span style=&quot;color: #dd1144;&quot;&gt;u'Mike'&lt;/span&gt;, &lt;span style=&quot;color: #dd1144;&quot;&gt;u'tags'&lt;/span&gt;: [&lt;span style=&quot;color: #dd1144;&quot;&gt;u'mongodb'&lt;/span&gt;, &lt;span style=&quot;color: #dd1144;&quot;&gt;u'python'&lt;/span&gt;, &lt;span style=&quot;color: #dd1144;&quot;&gt;u'pymongo'&lt;/span&gt;]}
&lt;/code&gt;&lt;/pre&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;strong style=&quot;font-weight: bold; margin-top: 0px;&quot;&gt;&lt;em style=&quot;margin-top: 0px;&quot;&gt;ObjectId오브젝트 아이디는 string이 아니다.&lt;/em&gt;&lt;/strong&gt;&lt;br /&gt;만약 아래와 같이 쿼리하면 아무것도 안나온다.&lt;/p&gt;
&lt;pre style=&quot;overflow: initial; font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 14px; display: block; padding: 0; margin: 0 0 10px; line-height: 1.6; word-break: break-all; word-wrap: break-word; color: #333333; background-color: #f5f5f5; border: none; border-radius: 0; white-space: pre-wrap;&quot;&gt;&lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: inherit; padding: 1em; color: #333; background-color: transparent; white-space: pre-wrap; border-radius: 0; display: block; background: #F6F6F6; margin-top: 0px;&quot;&gt;&lt;span style=&quot;color: #990073; margin-top: 0px;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;post_id_as_str = str(post_id)
&lt;span style=&quot;color: #990073;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;posts.find_one({&lt;span style=&quot;color: #dd1144;&quot;&gt;&quot;_id&quot;&lt;/span&gt;: post_id_as_str}) &lt;span style=&quot;color: #998; font-style: italic;&quot;&gt;# No result&lt;/span&gt;
&amp;gt;&amp;gt;&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;웹 애플리케이션에서 가장 많이 하는 작업은 아마 ObjectId을 요청 URL을 가지고 받아와 매칭되는 도큐먼트를 찾는 일일 것이다. 이때는 ObjectId로 string을 바꿔서 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px; margin-top: 0px;&quot;&gt;find_one()&lt;/code&gt;에 줘야 한다.&lt;/p&gt;
&lt;pre style=&quot;overflow: initial; font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 14px; display: block; padding: 0; margin: 0 0 10px; line-height: 1.6; word-break: break-all; word-wrap: break-word; color: #333333; background-color: #f5f5f5; border: none; border-radius: 0; white-space: pre-wrap;&quot;&gt;&lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: inherit; padding: 1em; color: #333; background-color: transparent; white-space: pre-wrap; border-radius: 0; display: block; background: #F6F6F6; margin-top: 0px;&quot;&gt;&lt;span style=&quot;color: #333; font-weight: bold; margin-top: 0px;&quot;&gt;from&lt;/span&gt; bson.objectid &lt;span style=&quot;color: #333; font-weight: bold;&quot;&gt;import&lt;/span&gt; ObjectId

&lt;span style=&quot;color: #998; font-style: italic;&quot;&gt;# 웹 프레임워크로부터 post_id 받아오기. 이건 string일 것.&lt;/span&gt;
&lt;span&gt;&lt;span style=&quot;color: #333; font-weight: bold; margin-top: 0px;&quot;&gt;def&lt;/span&gt; &lt;span style=&quot;color: #900; font-weight: bold;&quot;&gt;get&lt;/span&gt;&lt;span&gt;(post_id)&lt;/span&gt;:&lt;/span&gt;
    &lt;span style=&quot;color: #998; font-style: italic;&quot;&gt;# string을 ObjectId로 바꾸기.&lt;/span&gt;
    document = client.db.collection.find_one({&lt;span style=&quot;color: #dd1144;&quot;&gt;'_id'&lt;/span&gt;: ObjectId(post_id)})
&lt;/code&gt;&lt;/pre&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;em style=&quot;margin-top: 0px;&quot;&gt;참고&lt;/em&gt; : &lt;a href=&quot;http://api.mongodb.org/python/current/faq.html#web-application-querying-by-objectid&quot; target=&quot;_blank&quot; style=&quot;background: transparent;&quot;&gt;When I query for a document by ObjectId in my web application I get no result&lt;/a&gt;&lt;/p&gt;
&lt;h2 style=&quot;font-family: inherit; font-weight: bold; line-height: 1.1; color: inherit; margin-top: 30px; margin-bottom: 20px; font-size: 30px;&quot;&gt;유니코드 String에서 주의할 점.&lt;/h2&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;파이썬 string을 우리가 저장할 때 다른 형태로 저장된다는 걸 너는 아마 눈치 챘을 것이다. &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px; margin-top: 0px;&quot;&gt;u'Mike'&lt;/code&gt;같이 원래&lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px;&quot;&gt;'Mike'&lt;/code&gt;였던 애를 이상한 기호를 붙여 저장 하는 것 같이 말이다. 꺼내 올 때도 그렇게 보일 것이다. 여기서 짧게 설명 좀 하고 가야겠다.&lt;/p&gt;&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;몽고디비에 저장된 데이터는 BSON 포멧이다. 이 포멧의 string은 UTF-8로 인코딩되어 있는데, 파이몽고가 유효한 UTF-8 데이터만을 담아서 전달해 준것이다. 물론 이 과정에서 원래의 string(&lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px; margin-top: 0px;&quot;&gt;&amp;lt;type 'str'&amp;gt;&lt;/code&gt;)의 정보는 전혀 바뀌지 않는다. 유니코드(&lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px;&quot;&gt;&amp;lt;type ‘unicode’&amp;gt;&lt;/code&gt;)는 UTF-8로 우선 인코딩된다. 우리의 예제의 string들이 u가 앞에 붙은 형태로 string이 나타나는 것은 pyMongo가 BSON string을 파이썬의 unicode로 바꿔 보여주기 때문이다. &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px;&quot;&gt;'Mike'&lt;/code&gt;와 같은 일반적인 string이 아니라!&lt;/p&gt;&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;더 궁금한 사항은 &lt;a href=&quot;https://docs.python.org/2/howto/unicode.html&quot; target=&quot;_blank&quot; style=&quot;background: transparent; margin-top: 0px;&quot;&gt;여기&lt;/a&gt;를 참고하라.&lt;/p&gt;
&lt;h2 style=&quot;font-family: inherit; font-weight: bold; line-height: 1.1; color: inherit; margin-top: 30px; margin-bottom: 20px; font-size: 30px;&quot;&gt;통째로 insert하기.&lt;/h2&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;몇개의 도큐먼트를 동시에 인서트해보자. 우리는 &lt;em style=&quot;margin-top: 0px;&quot;&gt;bulk insert operations&lt;/em&gt;를 하나의 도큐먼트를 넣는 것 처럼 할 수 있다. &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px;&quot;&gt;insert()&lt;/code&gt;에 첫번째 인자로 iterable을 넣기만 하면 준비 끝! 이것은 각 도큐먼트를 돌며 알아서 insert해 줄 것이다. 하나의 명령으로 말이다.&lt;/p&gt;
&lt;pre style=&quot;overflow: initial; font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 14px; display: block; padding: 0; margin: 0 0 10px; line-height: 1.6; word-break: break-all; word-wrap: break-word; color: #333333; background-color: #f5f5f5; border: none; border-radius: 0; white-space: pre-wrap;&quot;&gt;&lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: inherit; padding: 1em; color: #333; background-color: transparent; white-space: pre-wrap; border-radius: 0; display: block; background: #F6F6F6; margin-top: 0px;&quot;&gt;&lt;span style=&quot;color: #990073; margin-top: 0px;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;new_posts = [{&lt;span style=&quot;color: #dd1144;&quot;&gt;&quot;author&quot;&lt;/span&gt;: &lt;span style=&quot;color: #dd1144;&quot;&gt;&quot;Mike&quot;&lt;/span&gt;,
&lt;span style=&quot;color: #990073;&quot;&gt;... &lt;/span&gt;              &lt;span style=&quot;color: #dd1144;&quot;&gt;&quot;text&quot;&lt;/span&gt;: &lt;span style=&quot;color: #dd1144;&quot;&gt;&quot;Another post!&quot;&lt;/span&gt;,
&lt;span style=&quot;color: #990073;&quot;&gt;... &lt;/span&gt;              &lt;span style=&quot;color: #dd1144;&quot;&gt;&quot;tags&quot;&lt;/span&gt;: [&lt;span style=&quot;color: #dd1144;&quot;&gt;&quot;bulk&quot;&lt;/span&gt;, &lt;span style=&quot;color: #dd1144;&quot;&gt;&quot;insert&quot;&lt;/span&gt;],
&lt;span style=&quot;color: #990073;&quot;&gt;... &lt;/span&gt;              &lt;span style=&quot;color: #dd1144;&quot;&gt;&quot;date&quot;&lt;/span&gt;: datetime.datetime(&lt;span style=&quot;color: #099;&quot;&gt;2009&lt;/span&gt;, &lt;span style=&quot;color: #099;&quot;&gt;11&lt;/span&gt;, &lt;span style=&quot;color: #099;&quot;&gt;12&lt;/span&gt;, &lt;span style=&quot;color: #099;&quot;&gt;11&lt;/span&gt;, &lt;span style=&quot;color: #099;&quot;&gt;14&lt;/span&gt;)},
&lt;span style=&quot;color: #990073;&quot;&gt;... &lt;/span&gt;             {&lt;span style=&quot;color: #dd1144;&quot;&gt;&quot;author&quot;&lt;/span&gt;: &lt;span style=&quot;color: #dd1144;&quot;&gt;&quot;Eliot&quot;&lt;/span&gt;,
&lt;span style=&quot;color: #990073;&quot;&gt;... &lt;/span&gt;              &lt;span style=&quot;color: #dd1144;&quot;&gt;&quot;title&quot;&lt;/span&gt;: &lt;span style=&quot;color: #dd1144;&quot;&gt;&quot;MongoDB is fun&quot;&lt;/span&gt;,
&lt;span style=&quot;color: #990073;&quot;&gt;... &lt;/span&gt;              &lt;span style=&quot;color: #dd1144;&quot;&gt;&quot;text&quot;&lt;/span&gt;: &lt;span style=&quot;color: #dd1144;&quot;&gt;&quot;and pretty easy too!&quot;&lt;/span&gt;,
&lt;span style=&quot;color: #990073;&quot;&gt;... &lt;/span&gt;              &lt;span style=&quot;color: #dd1144;&quot;&gt;&quot;date&quot;&lt;/span&gt;: datetime.datetime(&lt;span style=&quot;color: #099;&quot;&gt;2009&lt;/span&gt;, &lt;span style=&quot;color: #099;&quot;&gt;11&lt;/span&gt;, &lt;span style=&quot;color: #099;&quot;&gt;10&lt;/span&gt;, &lt;span style=&quot;color: #099;&quot;&gt;10&lt;/span&gt;, &lt;span style=&quot;color: #099;&quot;&gt;45&lt;/span&gt;)}]
&lt;span style=&quot;color: #990073;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;posts.insert(new_posts)
[ObjectId(&lt;span style=&quot;color: #dd1144;&quot;&gt;'...'&lt;/span&gt;), ObjectId(&lt;span style=&quot;color: #dd1144;&quot;&gt;'...'&lt;/span&gt;)]
&lt;/code&gt;&lt;/pre&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;이 예제에 관한 흥미로운 사실 2개가 있다.&lt;/p&gt;
&lt;ul style=&quot;margin-top: 0; margin-bottom: 10px; line-height: 1.6;&quot;&gt;
&lt;li style=&quot;line-height: 1.6; margin-top: 0px;&quot;&gt;
&lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px; margin-top: 0px;&quot;&gt;insert()&lt;/code&gt;를 여기서 부르면 2개의 들어간 각각의 ObjectId가 반환된다.&lt;/li&gt;
&lt;li style=&quot;line-height: 1.6;&quot;&gt;
&lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px; margin-top: 0px;&quot;&gt;news_posts[1]&lt;/code&gt;은 모양이 조금 다른데, tag가 아닌 title을 가지고 있다. 이게 바로 몽고디비에서 맨날 말하는 그 &lt;strong style=&quot;font-weight: bold;&quot;&gt;'스키마가 없다'&lt;/strong&gt;다!&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 style=&quot;font-family: inherit; font-weight: bold; line-height: 1.1; color: inherit; margin-top: 30px; margin-bottom: 20px; font-size: 30px;&quot;&gt;한 도큐먼트 이상에게 쿼리 던지기&lt;/h2&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px; margin-top: 0px;&quot;&gt;find()&lt;/code&gt;함수를 통하면 한개의 도큐먼트 이상을 위한 쿼리를 던질 수 있다. &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px;&quot;&gt;find()&lt;/code&gt;는 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px;&quot;&gt;Cuser Instance&lt;/code&gt;를 반환하는데, 이것은 도큐먼트들을 순회(iterate)할 수 있도록 해준다. 예를들어 아래처럼 우리는 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px;&quot;&gt;posts&lt;/code&gt; 컬렉션을 싹 순회할 수 있다. (iterate 할 수 있다.)&lt;/p&gt;
&lt;pre style=&quot;overflow: initial; font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 14px; display: block; padding: 0; margin: 0 0 10px; line-height: 1.6; word-break: break-all; word-wrap: break-word; color: #333333; background-color: #f5f5f5; border: none; border-radius: 0; white-space: pre-wrap;&quot;&gt;&lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: inherit; padding: 1em; color: #333; background-color: transparent; white-space: pre-wrap; border-radius: 0; display: block; background: #F6F6F6; margin-top: 0px;&quot;&gt;&lt;span style=&quot;color: #990073; margin-top: 0px;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span style=&quot;color: #333; font-weight: bold;&quot;&gt;for&lt;/span&gt; post &lt;span style=&quot;color: #333; font-weight: bold;&quot;&gt;in&lt;/span&gt; posts.find():
&lt;span style=&quot;color: #990073;&quot;&gt;... &lt;/span&gt;  post
...
{&lt;span style=&quot;color: #dd1144;&quot;&gt;u'date'&lt;/span&gt;: datetime.datetime(...), &lt;span style=&quot;color: #dd1144;&quot;&gt;u'text'&lt;/span&gt;: &lt;span style=&quot;color: #dd1144;&quot;&gt;u'My first blog post!'&lt;/span&gt;, &lt;span style=&quot;color: #dd1144;&quot;&gt;u'_id'&lt;/span&gt;: ObjectId(&lt;span style=&quot;color: #dd1144;&quot;&gt;'...'&lt;/span&gt;), &lt;span style=&quot;color: #dd1144;&quot;&gt;u'author'&lt;/span&gt;: &lt;span style=&quot;color: #dd1144;&quot;&gt;u'Mike'&lt;/span&gt;, &lt;span style=&quot;color: #dd1144;&quot;&gt;u'tags'&lt;/span&gt;: [&lt;span style=&quot;color: #dd1144;&quot;&gt;u'mongodb'&lt;/span&gt;, &lt;span style=&quot;color: #dd1144;&quot;&gt;u'python'&lt;/span&gt;, &lt;span style=&quot;color: #dd1144;&quot;&gt;u'pymongo'&lt;/span&gt;]}
{&lt;span style=&quot;color: #dd1144;&quot;&gt;u'date'&lt;/span&gt;: datetime.datetime(&lt;span style=&quot;color: #099;&quot;&gt;2009&lt;/span&gt;, &lt;span style=&quot;color: #099;&quot;&gt;11&lt;/span&gt;, &lt;span style=&quot;color: #099;&quot;&gt;12&lt;/span&gt;, &lt;span style=&quot;color: #099;&quot;&gt;11&lt;/span&gt;, &lt;span style=&quot;color: #099;&quot;&gt;14&lt;/span&gt;), &lt;span style=&quot;color: #dd1144;&quot;&gt;u'text'&lt;/span&gt;: &lt;span style=&quot;color: #dd1144;&quot;&gt;u'Another post!'&lt;/span&gt;, &lt;span style=&quot;color: #dd1144;&quot;&gt;u'_id'&lt;/span&gt;: ObjectId(&lt;span style=&quot;color: #dd1144;&quot;&gt;'...'&lt;/span&gt;), &lt;span style=&quot;color: #dd1144;&quot;&gt;u'author'&lt;/span&gt;: &lt;span style=&quot;color: #dd1144;&quot;&gt;u'Mike'&lt;/span&gt;, &lt;span style=&quot;color: #dd1144;&quot;&gt;u'tags'&lt;/span&gt;: [&lt;span style=&quot;color: #dd1144;&quot;&gt;u'bulk'&lt;/span&gt;, &lt;span style=&quot;color: #dd1144;&quot;&gt;u'insert'&lt;/span&gt;]}
{&lt;span style=&quot;color: #dd1144;&quot;&gt;u'date'&lt;/span&gt;: datetime.datetime(&lt;span style=&quot;color: #099;&quot;&gt;2009&lt;/span&gt;, &lt;span style=&quot;color: #099;&quot;&gt;11&lt;/span&gt;, &lt;span style=&quot;color: #099;&quot;&gt;10&lt;/span&gt;, &lt;span style=&quot;color: #099;&quot;&gt;10&lt;/span&gt;, &lt;span style=&quot;color: #099;&quot;&gt;45&lt;/span&gt;), &lt;span style=&quot;color: #dd1144;&quot;&gt;u'text'&lt;/span&gt;: &lt;span style=&quot;color: #dd1144;&quot;&gt;u'and pretty easy too!'&lt;/span&gt;, &lt;span style=&quot;color: #dd1144;&quot;&gt;u'_id'&lt;/span&gt;: ObjectId(&lt;span style=&quot;color: #dd1144;&quot;&gt;'...'&lt;/span&gt;), &lt;span style=&quot;color: #dd1144;&quot;&gt;u'author'&lt;/span&gt;: &lt;span style=&quot;color: #dd1144;&quot;&gt;u'Eliot'&lt;/span&gt;, &lt;span style=&quot;color: #dd1144;&quot;&gt;u'title'&lt;/span&gt;: &lt;span style=&quot;color: #dd1144;&quot;&gt;u'MongoDB is fun'&lt;/span&gt;}
&lt;/code&gt;&lt;/pre&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px; margin-top: 0px;&quot;&gt;find_one()&lt;/code&gt;처럼 우리는 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px;&quot;&gt;find()&lt;/code&gt;를 통해 결과에 필터(제한)을 걸 수 있다. 예를 들어 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px;&quot;&gt;MIKE&lt;/code&gt;라는 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px;&quot;&gt;author&lt;/code&gt;를 꺼내보자.&lt;/p&gt;
&lt;pre style=&quot;overflow: initial; font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 14px; display: block; padding: 0; margin: 0 0 10px; line-height: 1.6; word-break: break-all; word-wrap: break-word; color: #333333; background-color: #f5f5f5; border: none; border-radius: 0; white-space: pre-wrap;&quot;&gt;&lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: inherit; padding: 1em; color: #333; background-color: transparent; white-space: pre-wrap; border-radius: 0; display: block; background: #F6F6F6; margin-top: 0px;&quot;&gt;&lt;span style=&quot;color: #990073; margin-top: 0px;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span style=&quot;color: #333; font-weight: bold;&quot;&gt;for&lt;/span&gt; post &lt;span style=&quot;color: #333; font-weight: bold;&quot;&gt;in&lt;/span&gt; posts.find({&lt;span style=&quot;color: #dd1144;&quot;&gt;&quot;author&quot;&lt;/span&gt;: &lt;span style=&quot;color: #dd1144;&quot;&gt;&quot;Mike&quot;&lt;/span&gt;}):
&lt;span style=&quot;color: #990073;&quot;&gt;... &lt;/span&gt;  post
...
{&lt;span style=&quot;color: #dd1144;&quot;&gt;u'date'&lt;/span&gt;: datetime.datetime(...), &lt;span style=&quot;color: #dd1144;&quot;&gt;u'text'&lt;/span&gt;: &lt;span style=&quot;color: #dd1144;&quot;&gt;u'My first blog post!'&lt;/span&gt;, &lt;span style=&quot;color: #dd1144;&quot;&gt;u'_id'&lt;/span&gt;: ObjectId(&lt;span style=&quot;color: #dd1144;&quot;&gt;'...'&lt;/span&gt;), &lt;span style=&quot;color: #dd1144;&quot;&gt;u'author'&lt;/span&gt;: &lt;span style=&quot;color: #dd1144;&quot;&gt;u'Mike'&lt;/span&gt;, &lt;span style=&quot;color: #dd1144;&quot;&gt;u'tags'&lt;/span&gt;: [&lt;span style=&quot;color: #dd1144;&quot;&gt;u'mongodb'&lt;/span&gt;, &lt;span style=&quot;color: #dd1144;&quot;&gt;u'python'&lt;/span&gt;, &lt;span style=&quot;color: #dd1144;&quot;&gt;u'pymongo'&lt;/span&gt;]}
{&lt;span style=&quot;color: #dd1144;&quot;&gt;u'date'&lt;/span&gt;: datetime.datetime(&lt;span style=&quot;color: #099;&quot;&gt;2009&lt;/span&gt;, &lt;span style=&quot;color: #099;&quot;&gt;11&lt;/span&gt;, &lt;span style=&quot;color: #099;&quot;&gt;12&lt;/span&gt;, &lt;span style=&quot;color: #099;&quot;&gt;11&lt;/span&gt;, &lt;span style=&quot;color: #099;&quot;&gt;14&lt;/span&gt;), &lt;span style=&quot;color: #dd1144;&quot;&gt;u'text'&lt;/span&gt;: &lt;span style=&quot;color: #dd1144;&quot;&gt;u'Another post!'&lt;/span&gt;, &lt;span style=&quot;color: #dd1144;&quot;&gt;u'_id'&lt;/span&gt;: ObjectId(&lt;span style=&quot;color: #dd1144;&quot;&gt;'...'&lt;/span&gt;), &lt;span style=&quot;color: #dd1144;&quot;&gt;u'author'&lt;/span&gt;: &lt;span style=&quot;color: #dd1144;&quot;&gt;u'Mike'&lt;/span&gt;, &lt;span style=&quot;color: #dd1144;&quot;&gt;u'tags'&lt;/span&gt;: [&lt;span style=&quot;color: #dd1144;&quot;&gt;u'bulk'&lt;/span&gt;, &lt;span style=&quot;color: #dd1144;&quot;&gt;u'insert'&lt;/span&gt;]}
&lt;/code&gt;&lt;/pre&gt;
&lt;h2 style=&quot;font-family: inherit; font-weight: bold; line-height: 1.1; color: inherit; margin-top: 30px; margin-bottom: 20px; font-size: 30px;&quot;&gt;갯수 세기.&lt;/h2&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;만약에 쿼리에 매칭되는 도큐먼트의 갯수만 궁금하다면, 너는 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px; margin-top: 0px;&quot;&gt;count()&lt;/code&gt;를 사용해서 긴 쿼리를 통하지 않고도 알아 낼 수 있다.&lt;/p&gt;
&lt;pre style=&quot;overflow: initial; font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 14px; display: block; padding: 0; margin: 0 0 10px; line-height: 1.6; word-break: break-all; word-wrap: break-word; color: #333333; background-color: #f5f5f5; border: none; border-radius: 0; white-space: pre-wrap;&quot;&gt;&lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: inherit; padding: 1em; color: #333; background-color: transparent; white-space: pre-wrap; border-radius: 0; display: block; background: #F6F6F6; margin-top: 0px;&quot;&gt;&lt;span style=&quot;color: #990073; margin-top: 0px;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;posts.count()
&lt;span style=&quot;color: #099;&quot;&gt;3&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;혹은 상세 쿼리를 던져서도 알아낼 수 있다.&lt;/p&gt;
&lt;pre style=&quot;overflow: initial; font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 14px; display: block; padding: 0; margin: 0 0 10px; line-height: 1.6; word-break: break-all; word-wrap: break-word; color: #333333; background-color: #f5f5f5; border: none; border-radius: 0; white-space: pre-wrap;&quot;&gt;&lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: inherit; padding: 1em; color: #333; background-color: transparent; white-space: pre-wrap; border-radius: 0; display: block; background: #F6F6F6; margin-top: 0px;&quot;&gt;&lt;span style=&quot;color: #990073; margin-top: 0px;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;posts.find({&lt;span style=&quot;color: #dd1144;&quot;&gt;&quot;author&quot;&lt;/span&gt;: &lt;span style=&quot;color: #dd1144;&quot;&gt;&quot;Mike&quot;&lt;/span&gt;}).count()
&lt;span style=&quot;color: #099;&quot;&gt;2&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;h2 style=&quot;font-family: inherit; font-weight: bold; line-height: 1.1; color: inherit; margin-top: 30px; margin-bottom: 20px; font-size: 30px;&quot;&gt;다양한 쿼리를 쓸 수 있다.&lt;/h2&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;몽고디비는 다양한 향상된 쿼리를 제공한다. 해당 날짜 이후의 도큐먼트들을 날짜 순으로 정렬하고 그걸 또 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px; margin-top: 0px;&quot;&gt;author&lt;/code&gt;순으로도 정렬하는 예를 보라.&lt;/p&gt;
&lt;pre style=&quot;overflow: initial; font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 14px; display: block; padding: 0; margin: 0 0 10px; line-height: 1.6; word-break: break-all; word-wrap: break-word; color: #333333; background-color: #f5f5f5; border: none; border-radius: 0; white-space: pre-wrap;&quot;&gt;&lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: inherit; padding: 1em; color: #333; background-color: transparent; white-space: pre-wrap; border-radius: 0; display: block; background: #F6F6F6; margin-top: 0px;&quot;&gt;&lt;span style=&quot;color: #990073; margin-top: 0px;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;d = datetime.datetime(&lt;span style=&quot;color: #099;&quot;&gt;2009&lt;/span&gt;, &lt;span style=&quot;color: #099;&quot;&gt;11&lt;/span&gt;, &lt;span style=&quot;color: #099;&quot;&gt;12&lt;/span&gt;, &lt;span style=&quot;color: #099;&quot;&gt;12&lt;/span&gt;)
&lt;span style=&quot;color: #990073;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span style=&quot;color: #333; font-weight: bold;&quot;&gt;for&lt;/span&gt; post &lt;span style=&quot;color: #333; font-weight: bold;&quot;&gt;in&lt;/span&gt; posts.find({&lt;span style=&quot;color: #dd1144;&quot;&gt;&quot;date&quot;&lt;/span&gt;: {&lt;span style=&quot;color: #dd1144;&quot;&gt;&quot;$lt&quot;&lt;/span&gt;: d}}).sort(&lt;span style=&quot;color: #dd1144;&quot;&gt;&quot;author&quot;&lt;/span&gt;):
&lt;span style=&quot;color: #990073;&quot;&gt;... &lt;/span&gt;  &lt;span style=&quot;color: #333; font-weight: bold;&quot;&gt;print&lt;/span&gt; post
...
{&lt;span style=&quot;color: #dd1144;&quot;&gt;u'date'&lt;/span&gt;: datetime.datetime(&lt;span style=&quot;color: #099;&quot;&gt;2009&lt;/span&gt;, &lt;span style=&quot;color: #099;&quot;&gt;11&lt;/span&gt;, &lt;span style=&quot;color: #099;&quot;&gt;10&lt;/span&gt;, &lt;span style=&quot;color: #099;&quot;&gt;10&lt;/span&gt;, &lt;span style=&quot;color: #099;&quot;&gt;45&lt;/span&gt;), &lt;span style=&quot;color: #dd1144;&quot;&gt;u'text'&lt;/span&gt;: &lt;span style=&quot;color: #dd1144;&quot;&gt;u'and pretty easy too!'&lt;/span&gt;, &lt;span style=&quot;color: #dd1144;&quot;&gt;u'_id'&lt;/span&gt;: ObjectId(&lt;span style=&quot;color: #dd1144;&quot;&gt;'...'&lt;/span&gt;), &lt;span style=&quot;color: #dd1144;&quot;&gt;u'author'&lt;/span&gt;: &lt;span style=&quot;color: #dd1144;&quot;&gt;u'Eliot'&lt;/span&gt;, &lt;span style=&quot;color: #dd1144;&quot;&gt;u'title'&lt;/span&gt;: &lt;span style=&quot;color: #dd1144;&quot;&gt;u'MongoDB is fun'&lt;/span&gt;}
{&lt;span style=&quot;color: #dd1144;&quot;&gt;u'date'&lt;/span&gt;: datetime.datetime(&lt;span style=&quot;color: #099;&quot;&gt;2009&lt;/span&gt;, &lt;span style=&quot;color: #099;&quot;&gt;11&lt;/span&gt;, &lt;span style=&quot;color: #099;&quot;&gt;12&lt;/span&gt;, &lt;span style=&quot;color: #099;&quot;&gt;11&lt;/span&gt;, &lt;span style=&quot;color: #099;&quot;&gt;14&lt;/span&gt;), &lt;span style=&quot;color: #dd1144;&quot;&gt;u'text'&lt;/span&gt;: &lt;span style=&quot;color: #dd1144;&quot;&gt;u'Another post!'&lt;/span&gt;, &lt;span style=&quot;color: #dd1144;&quot;&gt;u'_id'&lt;/span&gt;: ObjectId(&lt;span style=&quot;color: #dd1144;&quot;&gt;'...'&lt;/span&gt;), &lt;span style=&quot;color: #dd1144;&quot;&gt;u'author'&lt;/span&gt;: &lt;span style=&quot;color: #dd1144;&quot;&gt;u'Mike'&lt;/span&gt;, &lt;span style=&quot;color: #dd1144;&quot;&gt;u'tags'&lt;/span&gt;: [&lt;span style=&quot;color: #dd1144;&quot;&gt;u'bulk'&lt;/span&gt;, &lt;span style=&quot;color: #dd1144;&quot;&gt;u'insert'&lt;/span&gt;]}
&lt;/code&gt;&lt;/pre&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;여기서 우리가 사용한 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px; margin-top: 0px;&quot;&gt;&amp;amp;lt&lt;/code&gt; 연산자가 쿼리의 범위를 제한하고 그걸 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px;&quot;&gt;sort()&lt;/code&gt;가 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px;&quot;&gt;author&lt;/code&gt;에 따라 순서대로 정렬했다.&lt;/p&gt;
&lt;h2 style=&quot;font-family: inherit; font-weight: bold; line-height: 1.1; color: inherit; margin-top: 30px; margin-bottom: 20px; font-size: 30px;&quot;&gt;인덱싱&lt;/h2&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;쿼리를 더 빠르게 실행시키기 위해 우리는 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px; margin-top: 0px;&quot;&gt;index&lt;/code&gt;를 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px;&quot;&gt;date&lt;/code&gt;나 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px;&quot;&gt;author&lt;/code&gt;에 대해 생성할 수 있다. 그러기위해 먼저 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px;&quot;&gt;explain()&lt;/code&gt; 메소드를 사용해서 몇가지 정보를 얻어보자. &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px;&quot;&gt;index&lt;/code&gt;없이 어느정도의 퍼포먼스가 나오는지 알 수 있다.&lt;/p&gt;
&lt;pre style=&quot;overflow: initial; font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 14px; display: block; padding: 0; margin: 0 0 10px; line-height: 1.6; word-break: break-all; word-wrap: break-word; color: #333333; background-color: #f5f5f5; border: none; border-radius: 0; white-space: pre-wrap;&quot;&gt;&lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: inherit; padding: 1em; color: #333; background-color: transparent; white-space: pre-wrap; border-radius: 0; display: block; background: #F6F6F6; margin-top: 0px;&quot;&gt;&lt;span style=&quot;color: #990073; margin-top: 0px;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;posts.find({&lt;span style=&quot;color: #dd1144;&quot;&gt;&quot;date&quot;&lt;/span&gt;: {&lt;span style=&quot;color: #dd1144;&quot;&gt;&quot;$lt&quot;&lt;/span&gt;: d}}).sort(&lt;span style=&quot;color: #dd1144;&quot;&gt;&quot;author&quot;&lt;/span&gt;).explain()[&lt;span style=&quot;color: #dd1144;&quot;&gt;&quot;cursor&quot;&lt;/span&gt;]
&lt;span style=&quot;color: #dd1144;&quot;&gt;u'BasicCursor'&lt;/span&gt;
&lt;span style=&quot;color: #990073;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;posts.find({&lt;span style=&quot;color: #dd1144;&quot;&gt;&quot;date&quot;&lt;/span&gt;: {&lt;span style=&quot;color: #dd1144;&quot;&gt;&quot;$lt&quot;&lt;/span&gt;: d}}).sort(&lt;span style=&quot;color: #dd1144;&quot;&gt;&quot;author&quot;&lt;/span&gt;).explain()[&lt;span style=&quot;color: #dd1144;&quot;&gt;&quot;nscanned&quot;&lt;/span&gt;]
&lt;span style=&quot;color: #099;&quot;&gt;3&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;이걸 보면 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px; margin-top: 0px;&quot;&gt;BasicCursor&lt;/code&gt;가 쿼리를 처리하고 있고, 걔가 컬렉션에 있는 3개의 도큐먼트를 쿼리를 처리하기 위해 스캐닝 했다는 점을 알 수 있다.&lt;br /&gt;이제 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px;&quot;&gt;index&lt;/code&gt;를 걸어보자.&lt;/p&gt;
&lt;pre style=&quot;overflow: initial; font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 14px; display: block; padding: 0; margin: 0 0 10px; line-height: 1.6; word-break: break-all; word-wrap: break-word; color: #333333; background-color: #f5f5f5; border: none; border-radius: 0; white-space: pre-wrap;&quot;&gt;&lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: inherit; padding: 1em; color: #333; background-color: transparent; white-space: pre-wrap; border-radius: 0; display: block; background: #F6F6F6; margin-top: 0px;&quot;&gt;&lt;span style=&quot;color: #990073; margin-top: 0px;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;&lt;span style=&quot;color: #333; font-weight: bold;&quot;&gt;from&lt;/span&gt; pymongo &lt;span style=&quot;color: #333; font-weight: bold;&quot;&gt;import&lt;/span&gt; ASCENDING, DESCENDING
&lt;span style=&quot;color: #990073;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;posts.create_index([(&lt;span style=&quot;color: #dd1144;&quot;&gt;&quot;date&quot;&lt;/span&gt;, DESCENDING), (&lt;span style=&quot;color: #dd1144;&quot;&gt;&quot;author&quot;&lt;/span&gt;, ASCENDING)])
&lt;span style=&quot;color: #dd1144;&quot;&gt;u'date_-1_author_1'&lt;/span&gt;
&lt;span style=&quot;color: #990073;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;posts.find({&lt;span style=&quot;color: #dd1144;&quot;&gt;&quot;date&quot;&lt;/span&gt;: {&lt;span style=&quot;color: #dd1144;&quot;&gt;&quot;$lt&quot;&lt;/span&gt;: d}}).sort(&lt;span style=&quot;color: #dd1144;&quot;&gt;&quot;author&quot;&lt;/span&gt;).explain()[&lt;span style=&quot;color: #dd1144;&quot;&gt;&quot;cursor&quot;&lt;/span&gt;]
&lt;span style=&quot;color: #dd1144;&quot;&gt;u'BtreeCursor date_-1_author_1'&lt;/span&gt;
&lt;span style=&quot;color: #990073;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/span&gt;posts.find({&lt;span style=&quot;color: #dd1144;&quot;&gt;&quot;date&quot;&lt;/span&gt;: {&lt;span style=&quot;color: #dd1144;&quot;&gt;&quot;$lt&quot;&lt;/span&gt;: d}}).sort(&lt;span style=&quot;color: #dd1144;&quot;&gt;&quot;author&quot;&lt;/span&gt;).explain()[&lt;span style=&quot;color: #dd1144;&quot;&gt;&quot;nscanned&quot;&lt;/span&gt;]
&lt;span style=&quot;color: #099;&quot;&gt;2&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;이제 쿼리를 &lt;code style=&quot;font-family: Menlo, Monaco, Consolas, Courier New, monospace; font-size: 90%; padding: 2px 4px; color: #c7254e; background-color: #f9f2f4; white-space: nowrap; border-radius: 4px; margin-top: 0px;&quot;&gt;BtreeCursor (인덱스)&lt;/code&gt;를 처리하고, 오직 두개의 도큐먼트만이 스캐닝 되었다는 사실을 알 수 있다.&lt;/p&gt;
&lt;/div&gt;
&lt;center style=&quot;display:none&quot;&gt;%23Pymongo%20tutorial%20%28%uD30C%uC774%uBABD%uACE0%20%uC0AC%uC6A9%uD558%uAE30%29%0A%0A*%uD30C%uC774%20%uBABD%uACE0%uB780%20%uD30C%uC774%uC36C%20%uBABD%uACE0%20%uB514%uBE44%20%uB4DC%uB77C%uC774%uBC84%uC774%uB2E4.%20%uBC84%uC804%202.7.2%20%uAE30%uC900%uC73C%uB85C%20%uC791%uC131%uB418%uC5C8%uB2E4.*%0A%0A%uC18C%uD504%uD2B8%uC6E8%uC5B4%20%uB9C8%uC5D0%uC2A4%uD2B8%uB85C%20%uD504%uB85C%uC81D%uD2B8%uB97C%20%uD558%uBA74%uC11C%20%uC0AC%uC6A9%uC790%uC758%20%uB85C%uADF8%uB97C%20%uBE60%uB974%uAC8C%20%uC218%uC9D1%uD558%uACE0%20%uCC98%uB9AC%uD558%uAE30%20%uC704%uD574%20%uC120%uD0DD%uD55C%20%uB514%uBE44%uAC00%20%uBC14%uB85C%20%uBABD%uACE0%uB514%uBE44%uB2E4.%20%uC774%uB97C%20%uCEE8%uD2B8%uB864%20%uD558%uAE30%20%uC704%uD574%uC11C%uB294%20%uD30C%uC774%uC36C%20%uBC31%uC5D4%uB4DC%20%uC5B8%uC5B4%uB85C%20%uC0AC%uC6A9%uD558%uAE30%uC5D0%20%uD30C%uC774%uC36C%20%uBABD%uACE0%20%uB514%uBE44%20%uB4DC%uB77C%uC774%uBC84%uAC00%20%uD544%uC694%uD588%uB2E4.%20%uB531%20%uAD6C%uAE00%uC2E0%uAED8%20%uBB3C%uC5B4%uBCF4%uB2C8%20%uD30C%uC774%uBABD%uACE0%uB97C%20%uC54C%uB824%uC8FC%uC0AC%2C%20%uD29C%uD1A0%uB9AC%uC5BC%uC744%20%uB530%uB77C%uD574%uBCF4%uAE30%uB85C%20%uD588%uB2E4.%0A%0A%uD558%uB294%20%uAE40%uC5D0%20%uBC88%uC5ED%uB3C4%20%uD574%uBD24%uB2E4.%20DogFoot%uBC88%uC5ED%uC774%uBBC0%uB85C%20%uD544%uC694%uD558%uBA74%20%5B%uC5EC%uAE30%5D%28http%3A//api.mongodb.org/python/current/tutorial.html%29%uC11C%20%uC6D0%uBB38%uC744%20%uBCFC%20%uC218%20%uC788%uB2E4.%20%uADF8%uB798%uB3C4%20%uBC88%uC5ED%uAC00%uCC98%uB7FC%20%uC774%uD574%uD558%uAE30%20%uC88B%uAC8C%20%uC758%uC5ED%uB3C4%20%uD574%uB194%uC11C%20%uBCF4%uAE30%uB294%20%uC88B%uC744%20%uB4EF.%0A%0A%23%23Tutorial%0A%uC774%20%uD29C%uD1A0%uB9AC%uC5BC%uC5D0%uC11C%20%uBABD%uACE0%uB514%uBE44%uC640%20%uD30C%uC774%uBABD%uACE0%uC758%20%uC791%uB3D9%uC5D0%20%uB300%uD574%20%uBC30%uC6B8%20%uC218%20%uC788%uC744%20%uAC83%uC774%uB2E4.%0A%0A%23%23%uC900%uBE44%uBB3C.%0A%uBA3C%uC800%20%uC2DC%uC791%uD558%uAE30%uC804%uC5D0%20%uD30C%uC774%uBABD%uACE0%uB97C%20%uAE54%uC544%uC57C%uD558%uC9C0%20%uC54A%uACA0%uC2B5%uB2C8%uAE4C.%20%uD30C%uC774%uC36C%20%uC258%uC744%20%uC5F4%uACE0%20%uC544%uB798%uC758%20%uBA85%uB839%uC5B4%uB97C%20%uCCD0%uC11C%20%60Exception%60%uC774%20%uBC1C%uC0DD%uD558%uC9C0%20%uC54A%uB294%uC9C0%20%uD655%uC778%uD558%uC790.%0A%0A%20%20%20%20import%20pymongo%0A%0A%uC774%20%uD29C%uD1A0%uB9AC%uC5BC%uC740%20%uBABD%uACE0%uB514%uBE44%20%uC778%uC2A4%uD134%uC2A4%uAC00%20**%uB514%uD3F4%uD2B8%20%uD3EC%uD2B8%uC640%20%uD638%uC2A4%uD2B8**%uC5D0%uC11C%20%uB3CC%uC544%uAC10%uC744%20%uAC00%uC815%uD558%uACE0%20%uC9C4%uD589%uD55C%uB2E4.%20%uBABD%uACE0%uB514%uBE44%uB294%20%uB2F9%uC5F0%uD788%20%uC900%uBE44%uB410%uACA0%uC9C0%3F%20%uBABD%uACE0%uB514%uBE44%uB97C%20%uC2E4%uD589%uD558%uB77C.%0A%0A%20%20%20%20%24%20mongod%0A%0A%23%23MongoClient%uB97C%20%uAC00%uC9C0%uACE0%20%uBABD%uACE0%uB514%uBE44%uC5D0%20%uC5F0%uACB0%uD574%uBCF4%uC790.%0A%0A%uCCAB%uBC88%uC9F8%20%uC2A4%uD0ED%uC740%20%uD30C%uC774%uBABD%uACE0%uC758%20%60MongoClient%60%uB97C%20%uB3CC%uACE0%uC788%uB294%20mongod%20%uC778%uC2A4%uD134%uC2A4%uB97C%20%uC704%uD574%20%uB9CC%uB4E4%uC5B4%uC8FC%uB294%20%uAC83%uC774%uB2E4.%20%uC544%uB798%uB97C%20%uB530%uB77C%uD574%uB77C.%0A%0A%20%20%20%20from%20pymongo%20import%20MongoCleint%0A%20%20%20%20client%20%3D%20MongoClient%28%29%0A%20%20%20%20%0A%uC704%20%uCF54%uB4DC%uB294%20%uB514%uD3F4%uD2B8%20%uD638%uC2A4%uD2B8%uC640%20%uD3EC%uD2B8%uC5D0%20%uC5F0%uACB0%20%uD560%20%uAC83%uC774%uB2E4.%20%uB9CC%uC57D%uC5D0%20%uB514%uD3F4%uD2B8%20%uC124%uC815%uC774%20%uC544%uB2C8%uAC70%uB098%20%uBA85%uC2DC%uC801%uC73C%uB85C%20%uD45C%uC2DC%uD574%uC8FC%uACE0%20%uC2F6%uB2E4%uBA74%20%uC544%uB798%uB97C%20%uCC38%uACE0%uD560%20%uAC83.%0A%0A%20%20%20%20client%20%3D%20MongoClient%28%27localhost%27%2C%2027017%29%0A%20%20%20%20%0A%uD639%uC740%20%uBABD%uACE0%uB514%uBE44%20URI%20%uD3EC%uBA67%uC744%20%uC774%uC6A9%uD558%uC5EC%20%uC801%uC744%20%uC218%uB3C4%20%uC788%uB2E4%21%0A%0A%20%20%20%20client%20%3D%20MongoClient%28%27mongodb%3A//localhost%3A27017/%27%29%0A%20%20%20%20%0A%23%23%uB370%uC774%uD130%uBCA0%uC774%uC2A4%20%uC5BB%uC5B4%uC624%uAE30.%0A%0A%uBABD%uACE0%uB514%uBE44%uC758%20%uD55C%20%uC778%uC2A4%uD134%uC2A4%uB294%20%uB3C5%uB9BD%uC801%uC778%20%uB370%uC774%uD130%uBCA0%uC774%uC2A4%uB97C%20%uC5EC%uB7EC%uAC1C%20%uB9CC%uB4E4%20%uC218%20%uC788%uB3C4%uB85D%20%uD574%uC900%uB2E4.%20%uB530%uB77C%uC11C%20%uADF8%uC911%20%uC5B4%uB5A4%20%uB370%uC774%uD130%uBCA0%uC774%uC2A4%uB97C%20%uAC00%uC838%uC62C%uC9C0%uB294%20%uC544%uB798%uB97C%20%uB530%uB77C%uD574%uB77C.%20%60MongoClient%60%20%uC778%uC2A4%uD134%uC2A4%uB97C%20%uC774%uC6A9%uD574%uC11C.%0A%0A%20%20%20%20db%20%3D%20client.test_database%0A%20%20%20%20%0Atest_database%uC5D0%20%uB123%uACE0%20%uC2F6%uC740%uAC78%20%uB123%uC5B4%uB77C.%20%uC124%uB9C8%20%uC800%uAC78%20%uB530%uB77C%uCE58%uBA74%20%uC548%uB41C%uB2E4.%0A%uB9CC%uC57D%20%uB370%uC774%uD130%uBCA0%uC774%uC2A4%20%uC774%uB984%uC774%20%uC800%uB7F0%uC2DD%uC73C%uB85C%20%uD45C%uD604%uC774%20%uC548%uB41C%uB2E4%uBA74%20%uC544%uB798%uCC98%uB7FC%uB3C4%20%uAC00%uB2A5%uD558%uB2E4.%0A%0A%20%20%20%20db%20%3D%20client%5B%22test_database%22%5D%0A%0A%23%23%uCEEC%uB809%uC158%20%uAC00%uC838%uC624%uAE30.%0A%0A%uCEEC%uB809%uC158%uC740%20%uB3C4%uD050%uBA3C%uD2B8%uC758%20%uADF8%uB8F9%uC774%uB2E4.%20RDB%uC758%20%uB370%uC774%uD130%uBCA0%uC774%uC2A4%uC640%20%uC5BC%uCD94%20%uBE44%uC2B7%uD558%uAC8C%20%uC0DD%uAC01%uD558%uBA74%20%uB41C%uB2E4.%20%uD30C%uC774%uBABD%uACE0%uB85C%20%uCEEC%uB809%uC158%uC744%20%uAC00%uC838%uC624%uB294%20%uBC29%uBC95%uC740%20%uC544%uB798%uC640%20%uAC19%uB2E4.%0A%0A%20%20%20%20collection%20%3D%20db.test_collection%0A%20%20%20%20%0A%uB2F9%uC5F0%uD558%uB2E4.%20test_collection%uC774%uB77C%20%uB123%uC73C%uBA74%20%uC548%uB41C%uB2E4.%20%uB123%uACE0%uC2F6%uC740%uAC78%20%uB123%uC5B4%uB77C.%0A%uD639%uC740%20%uC704%uC5D0%20%uB370%uC774%uD130%uBCA0%uC774%uC2A4%uC5D0%uC11C%20%uAC00%uC838%uC654%uB4EF%uC774%20%uC544%uB798%uCC98%uB7FC%uB3C4%20%uAC00%uB2A5%uD558%uB2E4.%0A%0A%20%20%20%20collection%20%3D%20db%5B%22test_collection%22%5D%0A%0A%uBABD%uACE0%uB514%uBE44%uC758%20%uCEEC%uB809%uC158%uC774%uB098%20%uB370%uC774%uD130%uBCA0%uC774%uC2A4%uC5D0%uC11C%20%uC911%uC694%uD55C%20%uAC83%uC740%20%uAC8C%uC73C%uB974%uAC8C%20%uC0DD%uC131%uB41C%uB2E4%uB294%20%uAC83%uC774%uB2E4.%20%28%uD544%uC694%uD560%20%uB54C%uAC00%20%uB418%uC11C%uC57C%20%uC5B5%uC9C0%uB85C%20%uC0DD%uC131%uB41C%uB2E4%uB294%20%uAC83%21%29%20%uC704%uC758%20%uBA85%uB839%uC911%20%uC5B4%uB290%uAC83%uB3C4%20%uBABD%uACE0%uB514%uBE44%uC640%20%uC2E4%uC81C%uB85C%20%uC5B4%uB5A4%20%uC77C%uB3C4%20%uC218%uD589%uD558%uC9C0%20%uC54A%uB294%uB2E4.%20%uCEEC%uB809%uC158%uACFC%20%uB370%uC774%uD130%uBCA0%uC774%uC2A4%uB4E4%uC740%20%uCCAB%20%uB3C4%uD050%uBA3C%uD2B8%uAC00%20%uAC54%uB124%uB4E4%uC5D0%20insert%uB420%20%uB54C%20%uC0DD%uC131%uB41C%uB2E4.%0A%0A%23%23%uB3C4%uD050%uBA3C%uD2B8%28%uBB38%uC11C%29%0A%0A%uBABD%uACE0%uB514%uBE44%20%uC548%uC5D0%20%uB370%uC774%uD130%uB294%20JSON%uC2A4%uD0C0%uC77C%uB85C%20%uC800%uC7A5%uB41C%uB2E4.%20%uD30C%uC774%20%uBABD%uACE0%uB294%20%uD30C%uC774%uC36C%uC758%20%uB515%uC154%uB108%uB9AC%uB97C%20%uD65C%uC6A9%uD574%uC11C%20%uD45C%uD604%uD55C%uB2E4.%20%uC544%uB798%20%uC608%uC2DC%uCC98%uB7FC%20%uB9D0%uC774%uB2E4.%20%uBE14%uB85C%uADF8%20%uD3EC%uC2A4%uD2B8%uB97C%20%uC758%uBBF8%uD558%uB294%20%uC608%uC2DC%uB2E4.%0A%0A%20%20%20%20import%20datetime%0A%20%20%20%20post%20%3D%20%7B%0A%20%20%20%20%20%20%20%20%22author%22%20%3A%20%22Mike%22%2C%0A%20%20%20%20%20%20%20%20%22text%22%20%3A%20%22My%20first%20blog%20post%21%22%2C%0A%20%20%20%20%20%20%20%20%22tags%22%20%3A%20%5B%22mongodb%22%2C%20%22python%22%2C%20%22pymongo%22%5D%2C%0A%20%20%20%20%20%20%20%20%22date%22%3A%20datetime.datetime.utcnow%28%29%0A%20%20%20%20%7D%0A%20%20%20%20%0A%uAE30%uC5B5%uD558%uB77C.%20%uB3C4%uD050%uBA3C%uD2B8%28%uBB38%uC11C%29%uB294%20%uB124%uC774%uD2F0%uBE0C%20%uD30C%uC774%uC36C%20%uD0C0%uC785%28%uC704%uC758%20%60datetime.datetime%60%20%uC778%uC2A4%uD134%uC2A4%20%uAC19%uC740%29%uC744%20%uAC00%uC9C0%uACE0%20%uC788%uC744%20%uC218%20%uC788%uB2E4.%20%uC774%uAC83%uC740%20%uC790%uB3D9%uC801%uC73C%uB85C%20BSON%20%uD0C0%uC785%uC73C%uB85C%20%uCEE8%uBC84%uD305%uB418%uACE0%2C%20%uB610%20%uCEE8%uBC84%uD305%uD574%uC11C%20%uAC00%uC838%uC628%uB2E4.%0A%0A%23%23%uB3C4%uD050%uBA3C%uD2B8%uC5D0%20Insert%uB97C%20%uD574%uBCF4%uC790.%0A%uB3C4%uD050%uBA3C%uD2B8%uC5D0%20insert%uB97C%20%uD558%uAE30%20%uC704%uD574%uC11C%20%uC6B0%uB9AC%uB294%20%60insert%28%29%60%uB780%20%uBA54%uC18C%uB4DC%uB97C%20%uC4F8%uAC70%uB2E4.%0A%20%20%20%20%0A%20%20%20%20posts%20%3D%20db.posts%0A%20%20%20%20post_id%20%3D%20posts.insert%28post%29%0A%20%20%20%20%0A%uB9E4%uC6B0%20%uAC04%uB2E8%uD558%uB2E4.%20%uB9CC%uC57D%20%uB3C4%uD050%uBA3C%uD2B8%uAC00%20_id%uD0A4%uB97C%20%uAC00%uC9C0%uACE0%20%uC788%uC9C0%20%uC54A%uB2E4%uBA74%20%uBABD%uACE0%uB514%uBE44%uAC00%20%uC54C%uC544%uC11C%20%uB3C4%uD050%uBA3C%uD2B8%uC5D0%20%uD2B9%uBCC4%uD55C%20_id%20%uD0A4%uB97C%20%uBD80%uC5EC%uD574%uC11C%20%uC790%uB3D9%uC73C%uB85C%20%uC778%uC11C%uD2B8%20%uB41C%uB2E4.%20_id%uB294%20%uBB34%uC870%uAC74%20%uC720%uB2C8%uD06C%uD574%uC57C%uD55C%uB2E4.%20insert%20%uBA54%uC18C%uB4DC%uB294%20insert%uC2DC%20%uD2B9%uBCC4%uD788%20%uBD80%uC5EC%uB41C%20_id%uB97C%20%uBC18%uD658%uD55C%uB2E4.%20%uB354%20%uB9CE%uC740%20%uC815%uBCF4%uAC00%20%uD544%uC694%uD558%uB2E4%uBA74%20%5B%uBABD%uACE0%uB514%uBE44%20%uC0AC%uC774%uD2B8%uC758%20_id%5D%28http%3A//docs.mongodb.org/manual/reference/object-id/%29%uB97C%20%uBCF4%uB77C.%0A%0A%uC774%uAC8C%20%uCC98%uC74C%20%uB123%uC740%20%uAC83%uC774%uBBC0%uB85C%20%uADF8%uC81C%uC11C%uC57C%20*posts*%uCEEC%uB809%uC158%uC774%20%uC2E4%uC81C%uB85C%20%uBABD%uACE0%uB514%uBE44%uC11C%uBC84%uC5D0%20%uC0DD%uC131%uB41C%uB2E4.%20%uC6B0%uB9AC%uB294%20%uC774%uC81C%uC11C%uC57C%20%uC6B0%uB9AC%20database%uC5D0%20*posts*%20%uCEEC%uB809%uC158%uC774%20%uB9AC%uC2A4%uD2B8%uC5D0%20%uC788%uC74C%uC744%20%uD655%uC778%20%uD560%20%uC218%20%uC788%uB2E4.%20%0A%0A%20%20%20%20%3E%3E%3E%20db.collection_names%28%29%0A%20%20%20%20%5Bu%27system.indexes%27%2C%20u%27posts%27%5D%0A%20%20%20%20%0A***system.indexes%20%uCEEC%uB809%uC158%uC740%20%uC2A4%uD398%uC15C%uD55C%20%uB0B4%uBD80%20%uCEEC%uB809%uC158%uC73C%uB85C%20%uC790%uB3D9%uC73C%uB85C%20%uC0DD%uC131%uB41C%uB2E4.***%0A%0A%23%23find_one%28%29%uC73C%uB85C%20%uD55C%20%uB3C4%uD050%uBA3C%uD2B8%20%uC5BB%uC5B4%uC624%uAE30.%0A%uAC00%uC7A5%20%uAE30%uBCF8%uC801%uC778%20%uD0C0%uC785%uC758%20%uBABD%uACE0%uB514%uBE44%20%uCFFC%uB9AC%uAC00%20%uBC14%uB85C%20%60find_one%28%29%60%uC774%uB2E4.%20%uC774%20%uBA54%uC18C%uB4DC%uB294%20%uCFFC%uB9AC%uAC00%20%uB9E4%uCE6D%uB418%uB294%20%uD558%uB098%uC758%20%uB3C4%uD050%uBA3C%uD2B8%28%uBB38%uC11C%29%uB97C%20%uAC00%uC838%uC624%uB294%20%uC560%uB2E4.%0A*%28mysql-connector%uB97C%20%uD30C%uC774%uC36C%uC5D0%uC11C%20%uC368%uBD24%uB2E4%uBA74%20select_one%28%29%uACFC%20%uBE44%uC2B7%uD55C%20%uC560.%29*%0A%uB9CC%uC57D%20%uB9E4%uCE58%uB418%uB294%uAC8C%20%uC5C6%uB2E4%uBA74%20%60None%60%20%uC744%20%uBC18%uD658%uD55C%uB2E4.%0A%0A%uC774%uAC83%uC740%20%uB9E4%uC6B0%20%uC720%uC6A9%uD55C%uB370%20%uB124%uAC00%20%uB9CC%uC57D%20%uCC98%uC74C%20%uB9E4%uCE6D%uB418%uB294%20%uB3C4%uD050%uBA3C%uD2B8%uB098%2C%20%uADF8%20%uCFFC%uB9AC%uC640%20%uB531%20%uB9DE%uAC8C%20%uD558%uB098%uB9CC%20%uC874%uC7AC%uD558%uB294%20%uB3C4%uD050%uBA3C%uD2B8%uB97C%20%uB4E4%uACE0%uC624%uACE0%20%uC2F6%uC744%20%uB54C%20%uC815%uB9D0%20%uB531%uC774%uB2E4.%20%uC5EC%uAE30%uB294%20%60find_one%28%29%60%uC73C%uB85C%20*posts*%uCEEC%uB809%uC158%uC758%20%uCCAB%uBC88%uC9F8%20%uB3C4%uD050%uBA3C%uD2B8%uB97C%20%uB4E4%uACE0%uC624%uB294%20%uC608%uC81C%uB2E4.%0A%0A%20%20%20%20%3E%3E%3E%20posts.find_one%28%29%0A%20%20%20%20%7Bu%27date%27%3A%20datetime.datetime%28...%29%2C%20u%27text%27%3A%20u%27My%20first%20blog%20post%21%27%2C%20u%27_id%27%3A%20ObjectId%28%27...%27%29%2C%20u%27author%27%3A%20u%27Mike%27%2C%20u%27tags%27%3A%20%5Bu%27mongodb%27%2C%20u%27python%27%2C%20u%27pymongo%27%5D%7D%0A%20%20%20%20%0A%uC774%20%uACB0%uACFC%uB294%20%uD30C%uC774%uC36C%20%uB515%uC154%uB108%uB9AC%uB85C%20%uBC18%uD658%uB41C%uB2E4.%0A***%uB9AC%uD134%uB418%uB294%20%uB3C4%uD050%uBA3C%uD2B8%uC5D0%uB294%20%uC790%uB3D9%uC801%uC73C%uB85C%20insert%uC2DC%20%uBD80%uC5EC%uB41C%20_id%uAC12%uC774%20%uAC19%uC774%20%uB538%uB824%uC628%uB2E4.***%0A%0A%60find_one%28%29%60%uC740%20%uD2B9%uC815%20%uC131%uBD84%28%uC568%uB9AC%uBA3C%uD2B8%29%uC758%20%uB9E4%uCE6D%20%uCFFC%uB9AC%uB3C4%20%uC9C0%uC6D0%uD55C%uB2E4.%20%uC544%uB798%uB294%20%60%22Mike%22%60%uAC00%20author%uC778%20%uAC70%20%uB4E4%uACE0%uC624%uB294%20%uC608%uC81C%uB2E4.%0A%0A%20%20%20%20%3E%3E%3E%20posts.find_one%28%7B%22author%22%3A%20%22Mike%22%7D%29%0A%20%20%20%20%7Bu%27date%27%3A%20datetime.datetime%28...%29%2C%20u%27text%27%3A%20u%27My%20first%20blog%20post%21%27%2C%20u%27_id%27%3A%20ObjectId%28%27...%27%29%2C%20u%27author%27%3A%20u%27Mike%27%2C%20u%27tags%27%3A%20%5Bu%27mongodb%27%2C%20u%27python%27%2C%20u%27pymongo%27%5D%7D%0A%20%20%20%20%0A%uB9CC%uC57D%20%uC5C6%uB294%20author%uB97C%20%uC2DC%uB3C4%uD55C%uB2E4%uBA74%20%uC544%uBB34%20%uACB0%uACFC%uBB3C%uB3C4%20%uC548%uB098%uC62C%20%uAC83%uC774%uB2E4.%0A%0A%20%20%20%20%3E%3E%3E%20posts.find_one%28%7B%22author%22%3A%20%22Eliot%22%7D%29%0A%20%20%20%20%3E%3E%3E%0A%0A%23%23ObjectId%uB85C%20%uCFFC%uB9AC%uD558%uAE30.%0A%uC6B0%uB9AC%uB294%20%60_id%60%uB85C%uB3C4%20%uCFFC%uB9AC%uD560%20%uC218%20%uC788%uB2E4.%20%0A%0A%20%20%20%20%3E%3E%3E%20post_id%0A%20%20%20%20ObjectId%28...%29%0A%20%20%20%20%3E%3E%3E%20posts.find_one%28%7B%22_id%22%3A%20post_id%7D%29%0A%20%20%20%20%7Bu%27date%27%3A%20datetime.datetime%28...%29%2C%20u%27text%27%3A%20u%27My%20first%20blog%20post%21%27%2C%20u%27_id%27%3A%20ObjectId%28%27...%27%29%2C%20u%27author%27%3A%20u%27Mike%27%2C%20u%27tags%27%3A%20%5Bu%27mongodb%27%2C%20u%27python%27%2C%20u%27pymongo%27%5D%7D%0A%20%20%20%20%0A***ObjectId%uC624%uBE0C%uC81D%uD2B8%20%uC544%uC774%uB514%uB294%20string%uC774%20%uC544%uB2C8%uB2E4.***%20%0A%uB9CC%uC57D%20%uC544%uB798%uC640%20%uAC19%uC774%20%uCFFC%uB9AC%uD558%uBA74%20%uC544%uBB34%uAC83%uB3C4%20%uC548%uB098%uC628%uB2E4.%0A%0A%20%20%20%20%3E%3E%3E%20post_id_as_str%20%3D%20str%28post_id%29%0A%20%20%20%20%3E%3E%3E%20posts.find_one%28%7B%22_id%22%3A%20post_id_as_str%7D%29%20%23%20No%20result%0A%20%20%20%20%3E%3E%3E%0A%0A%uC6F9%20%uC560%uD50C%uB9AC%uCF00%uC774%uC158%uC5D0%uC11C%20%uAC00%uC7A5%20%uB9CE%uC774%20%uD558%uB294%20%uC791%uC5C5%uC740%20%uC544%uB9C8%20ObjectId%uC744%20%uC694%uCCAD%20URL%uC744%20%uAC00%uC9C0%uACE0%20%uBC1B%uC544%uC640%20%uB9E4%uCE6D%uB418%uB294%20%uB3C4%uD050%uBA3C%uD2B8%uB97C%20%uCC3E%uB294%20%uC77C%uC77C%20%uAC83%uC774%uB2E4.%20%uC774%uB54C%uB294%20ObjectId%uB85C%20string%uC744%20%uBC14%uAFD4%uC11C%20%60find_one%28%29%60%uC5D0%20%uC918%uC57C%20%uD55C%uB2E4.%0A%0A%20%20%20%20from%20bson.objectid%20import%20ObjectId%0A%0A%20%20%20%20%23%20%uC6F9%20%uD504%uB808%uC784%uC6CC%uD06C%uB85C%uBD80%uD130%20post_id%20%uBC1B%uC544%uC624%uAE30.%20%uC774%uAC74%20string%uC77C%20%uAC83.%0A%20%20%20%20def%20get%28post_id%29%3A%0A%20%20%20%20%20%20%20%20%23%20string%uC744%20ObjectId%uB85C%20%uBC14%uAFB8%uAE30.%0A%20%20%20%20%20%20%20%20document%20%3D%20client.db.collection.find_one%28%7B%27_id%27%3A%20ObjectId%28post_id%29%7D%29%0A%20%20%20%20%20%20%20%20%0A*%uCC38%uACE0*%20%3A%20%5BWhen%20I%20query%20for%20a%20document%20by%20ObjectId%20in%20my%20web%20application%20I%20get%20no%20result%5D%28http%3A//api.mongodb.org/python/current/faq.html%23web-application-querying-by-objectid%29%0A%0A%23%23%uC720%uB2C8%uCF54%uB4DC%20String%uC5D0%uC11C%20%uC8FC%uC758%uD560%20%uC810.%0A%uD30C%uC774%uC36C%20string%uC744%20%uC6B0%uB9AC%uAC00%20%uC800%uC7A5%uD560%20%uB54C%20%uB2E4%uB978%20%uD615%uD0DC%uB85C%20%uC800%uC7A5%uB41C%uB2E4%uB294%20%uAC78%20%uB108%uB294%20%uC544%uB9C8%20%uB208%uCE58%20%uCC58%uC744%20%uAC83%uC774%uB2E4.%20%60u%27Mike%27%60%uAC19%uC774%20%uC6D0%uB798%60%27Mike%27%60%uC600%uB358%20%uC560%uB97C%20%uC774%uC0C1%uD55C%20%uAE30%uD638%uB97C%20%uBD99%uC5EC%20%uC800%uC7A5%20%uD558%uB294%20%uAC83%20%uAC19%uC774%20%uB9D0%uC774%uB2E4.%20%uAEBC%uB0B4%20%uC62C%20%uB54C%uB3C4%20%uADF8%uB807%uAC8C%20%uBCF4%uC77C%20%uAC83%uC774%uB2E4.%20%uC5EC%uAE30%uC11C%20%uC9E7%uAC8C%20%uC124%uBA85%20%uC880%20%uD558%uACE0%20%uAC00%uC57C%uACA0%uB2E4.%0A%0A%uBABD%uACE0%uB514%uBE44%uC5D0%20%uC800%uC7A5%uB41C%20%uB370%uC774%uD130%uB294%20BSON%20%uD3EC%uBA67%uC774%uB2E4.%20%uC774%20%uD3EC%uBA67%uC758%20string%uC740%20UTF-8%uB85C%20%uC778%uCF54%uB529%uB418%uC5B4%20%uC788%uB294%uB370%2C%20%uD30C%uC774%uBABD%uACE0%uAC00%20%uC720%uD6A8%uD55C%20UTF-8%20%uB370%uC774%uD130%uB9CC%uC744%20%uB2F4%uC544%uC11C%20%uC804%uB2EC%uD574%20%uC900%uAC83%uC774%uB2E4.%20%uBB3C%uB860%20%uC774%20%uACFC%uC815%uC5D0%uC11C%20%uC6D0%uB798%uC758%20string%28%60%3Ctype%20%27str%27%3E%60%29%uC758%20%uC815%uBCF4%uB294%20%uC804%uD600%20%uBC14%uB00C%uC9C0%20%uC54A%uB294%uB2E4.%20%uC720%uB2C8%uCF54%uB4DC%28%60%3Ctype%20%u2018unicode%u2019%3E%60%29%uB294%20UTF-8%uB85C%20%uC6B0%uC120%20%uC778%uCF54%uB529%uB41C%uB2E4.%20%uC6B0%uB9AC%uC758%20%uC608%uC81C%uC758%20string%uB4E4%uC774%20u%uAC00%20%uC55E%uC5D0%20%uBD99%uC740%20%uD615%uD0DC%uB85C%20string%uC774%20%uB098%uD0C0%uB098%uB294%20%uAC83%uC740%20pyMongo%uAC00%20BSON%20string%uC744%20%uD30C%uC774%uC36C%uC758%20unicode%uB85C%20%uBC14%uAFD4%20%uBCF4%uC5EC%uC8FC%uAE30%20%uB54C%uBB38%uC774%uB2E4.%20%60%27Mike%27%60%uC640%20%uAC19%uC740%20%uC77C%uBC18%uC801%uC778%20string%uC774%20%uC544%uB2C8%uB77C%21%0A%0A%uB354%20%uAD81%uAE08%uD55C%20%uC0AC%uD56D%uC740%20%5B%uC5EC%uAE30%5D%28https%3A//docs.python.org/2/howto/unicode.html%29%uB97C%20%uCC38%uACE0%uD558%uB77C.%0A%0A%23%23%uD1B5%uC9F8%uB85C%20insert%uD558%uAE30.%0A%uBA87%uAC1C%uC758%20%uB3C4%uD050%uBA3C%uD2B8%uB97C%20%uB3D9%uC2DC%uC5D0%20%uC778%uC11C%uD2B8%uD574%uBCF4%uC790.%20%uC6B0%uB9AC%uB294%20*bulk%20insert%20operations*%uB97C%20%uD558%uB098%uC758%20%uB3C4%uD050%uBA3C%uD2B8%uB97C%20%uB123%uB294%20%uAC83%20%uCC98%uB7FC%20%uD560%20%uC218%20%uC788%uB2E4.%20%60insert%28%29%60%uC5D0%20%uCCAB%uBC88%uC9F8%20%uC778%uC790%uB85C%20iterable%uC744%20%uB123%uAE30%uB9CC%20%uD558%uBA74%20%uC900%uBE44%20%uB05D%21%20%uC774%uAC83%uC740%20%uAC01%20%uB3C4%uD050%uBA3C%uD2B8%uB97C%20%uB3CC%uBA70%20%uC54C%uC544%uC11C%20insert%uD574%20%uC904%20%uAC83%uC774%uB2E4.%20%uD558%uB098%uC758%20%uBA85%uB839%uC73C%uB85C%20%uB9D0%uC774%uB2E4.%0A%0A%20%20%20%20%3E%3E%3E%20new_posts%20%3D%20%5B%7B%22author%22%3A%20%22Mike%22%2C%0A%20%20%20%20...%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22text%22%3A%20%22Another%20post%21%22%2C%0A%20%20%20%20...%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22tags%22%3A%20%5B%22bulk%22%2C%20%22insert%22%5D%2C%0A%20%20%20%20...%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22date%22%3A%20datetime.datetime%282009%2C%2011%2C%2012%2C%2011%2C%2014%29%7D%2C%0A%20%20%20%20...%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7B%22author%22%3A%20%22Eliot%22%2C%0A%20%20%20%20...%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22title%22%3A%20%22MongoDB%20is%20fun%22%2C%0A%20%20%20%20...%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22text%22%3A%20%22and%20pretty%20easy%20too%21%22%2C%0A%20%20%20%20...%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22date%22%3A%20datetime.datetime%282009%2C%2011%2C%2010%2C%2010%2C%2045%29%7D%5D%0A%20%20%20%20%3E%3E%3E%20posts.insert%28new_posts%29%0A%20%20%20%20%5BObjectId%28%27...%27%29%2C%20ObjectId%28%27...%27%29%5D%0A%20%20%20%20%0A%uC774%20%uC608%uC81C%uC5D0%20%uAD00%uD55C%20%uD765%uBBF8%uB85C%uC6B4%20%uC0AC%uC2E4%202%uAC1C%uAC00%20%uC788%uB2E4.%0A%0A-%20%60insert%28%29%60%uB97C%20%uC5EC%uAE30%uC11C%20%uBD80%uB974%uBA74%202%uAC1C%uC758%20%uB4E4%uC5B4%uAC04%20%uAC01%uAC01%uC758%20ObjectId%uAC00%20%uBC18%uD658%uB41C%uB2E4.%0A-%20%60news_posts%5B1%5D%60%uC740%20%uBAA8%uC591%uC774%20%uC870%uAE08%20%uB2E4%uB978%uB370%2C%20tag%uAC00%20%uC544%uB2CC%20title%uC744%20%uAC00%uC9C0%uACE0%20%uC788%uB2E4.%20%uC774%uAC8C%20%uBC14%uB85C%20%uBABD%uACE0%uB514%uBE44%uC5D0%uC11C%20%uB9E8%uB0A0%20%uB9D0%uD558%uB294%20%uADF8%20**%27%uC2A4%uD0A4%uB9C8%uAC00%20%uC5C6%uB2E4%27**%uB2E4%21%0A%0A%23%23%uD55C%20%uB3C4%uD050%uBA3C%uD2B8%20%uC774%uC0C1%uC5D0%uAC8C%20%uCFFC%uB9AC%20%uB358%uC9C0%uAE30%0A%60find%28%29%60%uD568%uC218%uB97C%20%uD1B5%uD558%uBA74%20%uD55C%uAC1C%uC758%20%uB3C4%uD050%uBA3C%uD2B8%20%uC774%uC0C1%uC744%20%uC704%uD55C%20%uCFFC%uB9AC%uB97C%20%uB358%uC9C8%20%uC218%20%uC788%uB2E4.%20%60find%28%29%60%uB294%20%60Cuser%20Instance%60%uB97C%20%uBC18%uD658%uD558%uB294%uB370%2C%20%uC774%uAC83%uC740%20%uB3C4%uD050%uBA3C%uD2B8%uB4E4%uC744%20%uC21C%uD68C%28iterate%29%uD560%20%uC218%20%uC788%uB3C4%uB85D%20%uD574%uC900%uB2E4.%20%uC608%uB97C%uB4E4%uC5B4%20%uC544%uB798%uCC98%uB7FC%20%uC6B0%uB9AC%uB294%20%60posts%60%20%uCEEC%uB809%uC158%uC744%20%uC2F9%20%uC21C%uD68C%uD560%20%uC218%20%uC788%uB2E4.%20%28iterate%20%uD560%20%uC218%20%uC788%uB2E4.%29%0A%0A%20%20%20%20%3E%3E%3E%20for%20post%20in%20posts.find%28%29%3A%0A%20%20%20%20...%20%20%20post%0A%20%20%20%20...%0A%20%20%20%20%7Bu%27date%27%3A%20datetime.datetime%28...%29%2C%20u%27text%27%3A%20u%27My%20first%20blog%20post%21%27%2C%20u%27_id%27%3A%20ObjectId%28%27...%27%29%2C%20u%27author%27%3A%20u%27Mike%27%2C%20u%27tags%27%3A%20%5Bu%27mongodb%27%2C%20u%27python%27%2C%20u%27pymongo%27%5D%7D%0A%20%20%20%20%7Bu%27date%27%3A%20datetime.datetime%282009%2C%2011%2C%2012%2C%2011%2C%2014%29%2C%20u%27text%27%3A%20u%27Another%20post%21%27%2C%20u%27_id%27%3A%20ObjectId%28%27...%27%29%2C%20u%27author%27%3A%20u%27Mike%27%2C%20u%27tags%27%3A%20%5Bu%27bulk%27%2C%20u%27insert%27%5D%7D%0A%20%20%20%20%7Bu%27date%27%3A%20datetime.datetime%282009%2C%2011%2C%2010%2C%2010%2C%2045%29%2C%20u%27text%27%3A%20u%27and%20pretty%20easy%20too%21%27%2C%20u%27_id%27%3A%20ObjectId%28%27...%27%29%2C%20u%27author%27%3A%20u%27Eliot%27%2C%20u%27title%27%3A%20u%27MongoDB%20is%20fun%27%7D%0A%20%20%20%20%0A%60find_one%28%29%60%uCC98%uB7FC%20%uC6B0%uB9AC%uB294%20%60find%28%29%60%uB97C%20%uD1B5%uD574%20%uACB0%uACFC%uC5D0%20%uD544%uD130%28%uC81C%uD55C%29%uC744%20%uAC78%20%uC218%20%uC788%uB2E4.%20%uC608%uB97C%20%uB4E4%uC5B4%20%60MIKE%60%uB77C%uB294%20%60author%60%uB97C%20%uAEBC%uB0B4%uBCF4%uC790.%0A%0A%20%20%20%20%3E%3E%3E%20for%20post%20in%20posts.find%28%7B%22author%22%3A%20%22Mike%22%7D%29%3A%0A%20%20%20%20...%20%20%20post%0A%20%20%20%20...%0A%20%20%20%20%7Bu%27date%27%3A%20datetime.datetime%28...%29%2C%20u%27text%27%3A%20u%27My%20first%20blog%20post%21%27%2C%20u%27_id%27%3A%20ObjectId%28%27...%27%29%2C%20u%27author%27%3A%20u%27Mike%27%2C%20u%27tags%27%3A%20%5Bu%27mongodb%27%2C%20u%27python%27%2C%20u%27pymongo%27%5D%7D%0A%20%20%20%20%7Bu%27date%27%3A%20datetime.datetime%282009%2C%2011%2C%2012%2C%2011%2C%2014%29%2C%20u%27text%27%3A%20u%27Another%20post%21%27%2C%20u%27_id%27%3A%20ObjectId%28%27...%27%29%2C%20u%27author%27%3A%20u%27Mike%27%2C%20u%27tags%27%3A%20%5Bu%27bulk%27%2C%20u%27insert%27%5D%7D%0A%20%20%20%20%0A%23%23%uAC2F%uC218%20%uC138%uAE30.%0A%uB9CC%uC57D%uC5D0%20%uCFFC%uB9AC%uC5D0%20%uB9E4%uCE6D%uB418%uB294%20%uB3C4%uD050%uBA3C%uD2B8%uC758%20%uAC2F%uC218%uB9CC%20%uAD81%uAE08%uD558%uB2E4%uBA74%2C%20%uB108%uB294%20%60count%28%29%60%uB97C%20%uC0AC%uC6A9%uD574%uC11C%20%uAE34%20%uCFFC%uB9AC%uB97C%20%uD1B5%uD558%uC9C0%20%uC54A%uACE0%uB3C4%20%uC54C%uC544%20%uB0BC%20%uC218%20%uC788%uB2E4.%0A%20%20%20%20%0A%20%20%20%20%3E%3E%3E%20posts.count%28%29%0A%20%20%20%203%0A%20%20%20%20%0A%uD639%uC740%20%uC0C1%uC138%20%uCFFC%uB9AC%uB97C%20%uB358%uC838%uC11C%uB3C4%20%uC54C%uC544%uB0BC%20%uC218%20%uC788%uB2E4.%0A%0A%20%20%20%20%3E%3E%3E%20posts.find%28%7B%22author%22%3A%20%22Mike%22%7D%29.count%28%29%0A%20%20%20%202%0A%20%20%20%20%0A%23%23%uB2E4%uC591%uD55C%20%uCFFC%uB9AC%uB97C%20%uC4F8%20%uC218%20%uC788%uB2E4.%0A%uBABD%uACE0%uB514%uBE44%uB294%20%uB2E4%uC591%uD55C%20%uD5A5%uC0C1%uB41C%20%uCFFC%uB9AC%uB97C%20%uC81C%uACF5%uD55C%uB2E4.%20%uD574%uB2F9%20%uB0A0%uC9DC%20%uC774%uD6C4%uC758%20%uB3C4%uD050%uBA3C%uD2B8%uB4E4%uC744%20%uB0A0%uC9DC%20%uC21C%uC73C%uB85C%20%uC815%uB82C%uD558%uACE0%20%uADF8%uAC78%20%uB610%20%60author%60%uC21C%uC73C%uB85C%uB3C4%20%uC815%uB82C%uD558%uB294%20%uC608%uB97C%20%uBCF4%uB77C.%0A%0A%20%20%20%20%3E%3E%3E%20d%20%3D%20datetime.datetime%282009%2C%2011%2C%2012%2C%2012%29%0A%20%20%20%20%3E%3E%3E%20for%20post%20in%20posts.find%28%7B%22date%22%3A%20%7B%22%24lt%22%3A%20d%7D%7D%29.sort%28%22author%22%29%3A%0A%20%20%20%20...%20%20%20print%20post%0A%20%20%20%20...%0A%20%20%20%20%7Bu%27date%27%3A%20datetime.datetime%282009%2C%2011%2C%2010%2C%2010%2C%2045%29%2C%20u%27text%27%3A%20u%27and%20pretty%20easy%20too%21%27%2C%20u%27_id%27%3A%20ObjectId%28%27...%27%29%2C%20u%27author%27%3A%20u%27Eliot%27%2C%20u%27title%27%3A%20u%27MongoDB%20is%20fun%27%7D%0A%20%20%20%20%7Bu%27date%27%3A%20datetime.datetime%282009%2C%2011%2C%2012%2C%2011%2C%2014%29%2C%20u%27text%27%3A%20u%27Another%20post%21%27%2C%20u%27_id%27%3A%20ObjectId%28%27...%27%29%2C%20u%27author%27%3A%20u%27Mike%27%2C%20u%27tags%27%3A%20%5Bu%27bulk%27%2C%20u%27insert%27%5D%7D%0A%20%20%20%20%0A%uC5EC%uAE30%uC11C%20%uC6B0%uB9AC%uAC00%20%uC0AC%uC6A9%uD55C%20%60%26lt%60%20%uC5F0%uC0B0%uC790%uAC00%20%uCFFC%uB9AC%uC758%20%uBC94%uC704%uB97C%20%uC81C%uD55C%uD558%uACE0%20%uADF8%uAC78%20%60sort%28%29%60%uAC00%20%60author%60%uC5D0%20%uB530%uB77C%20%uC21C%uC11C%uB300%uB85C%20%uC815%uB82C%uD588%uB2E4.%0A%0A%23%23%uC778%uB371%uC2F1%0A%uCFFC%uB9AC%uB97C%20%uB354%20%uBE60%uB974%uAC8C%20%uC2E4%uD589%uC2DC%uD0A4%uAE30%20%uC704%uD574%20%uC6B0%uB9AC%uB294%20%60index%60%uB97C%20%60date%60%uB098%20%60author%60%uC5D0%20%uB300%uD574%20%uC0DD%uC131%uD560%20%uC218%20%uC788%uB2E4.%20%uADF8%uB7EC%uAE30%uC704%uD574%20%uBA3C%uC800%20%60explain%28%29%60%20%uBA54%uC18C%uB4DC%uB97C%20%uC0AC%uC6A9%uD574%uC11C%20%uBA87%uAC00%uC9C0%20%uC815%uBCF4%uB97C%20%uC5BB%uC5B4%uBCF4%uC790.%20%60index%60%uC5C6%uC774%20%uC5B4%uB290%uC815%uB3C4%uC758%20%uD37C%uD3EC%uBA3C%uC2A4%uAC00%20%uB098%uC624%uB294%uC9C0%20%uC54C%20%uC218%20%uC788%uB2E4.%0A%0A%20%20%20%20%3E%3E%3E%20posts.find%28%7B%22date%22%3A%20%7B%22%24lt%22%3A%20d%7D%7D%29.sort%28%22author%22%29.explain%28%29%5B%22cursor%22%5D%0A%20%20%20%20u%27BasicCursor%27%0A%20%20%20%20%3E%3E%3E%20posts.find%28%7B%22date%22%3A%20%7B%22%24lt%22%3A%20d%7D%7D%29.sort%28%22author%22%29.explain%28%29%5B%22nscanned%22%5D%0A%20%20%20%203%0A%0A%uC774%uAC78%20%uBCF4%uBA74%20%60BasicCursor%60%uAC00%20%uCFFC%uB9AC%uB97C%20%uCC98%uB9AC%uD558%uACE0%20%uC788%uACE0%2C%20%uAC54%uAC00%20%uCEEC%uB809%uC158%uC5D0%20%uC788%uB294%203%uAC1C%uC758%20%uB3C4%uD050%uBA3C%uD2B8%uB97C%20%uCFFC%uB9AC%uB97C%20%uCC98%uB9AC%uD558%uAE30%20%uC704%uD574%20%uC2A4%uCE90%uB2DD%20%uD588%uB2E4%uB294%20%uC810%uC744%20%uC54C%20%uC218%20%uC788%uB2E4.%0A%uC774%uC81C%20%60index%60%uB97C%20%uAC78%uC5B4%uBCF4%uC790.%0A%0A%20%20%20%20%3E%3E%3E%20from%20pymongo%20import%20ASCENDING%2C%20DESCENDING%0A%20%20%20%20%3E%3E%3E%20posts.create_index%28%5B%28%22date%22%2C%20DESCENDING%29%2C%20%28%22author%22%2C%20ASCENDING%29%5D%29%0A%20%20%20%20u%27date_-1_author_1%27%0A%20%20%20%20%3E%3E%3E%20posts.find%28%7B%22date%22%3A%20%7B%22%24lt%22%3A%20d%7D%7D%29.sort%28%22author%22%29.explain%28%29%5B%22cursor%22%5D%0A%20%20%20%20u%27BtreeCursor%20date_-1_author_1%27%0A%20%20%20%20%3E%3E%3E%20posts.find%28%7B%22date%22%3A%20%7B%22%24lt%22%3A%20d%7D%7D%29.sort%28%22author%22%29.explain%28%29%5B%22nscanned%22%5D%0A%20%20%20%202%0A%20%20%20%20%0A%uC774%uC81C%20%uCFFC%uB9AC%uB97C%20%60BtreeCursor%20%28%uC778%uB371%uC2A4%29%60%uB97C%20%uCC98%uB9AC%uD558%uACE0%2C%20%uC624%uC9C1%20%uB450%uAC1C%uC758%20%uB3C4%uD050%uBA3C%uD2B8%uB9CC%uC774%20%uC2A4%uCE90%uB2DD%20%uB418%uC5C8%uB2E4%uB294%20%uC0AC%uC2E4%uC744%20%uC54C%20%uC218%20%uC788%uB2E4.&lt;/center&gt;
&lt;br /&gt;&lt;/en-note&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</description>
      <category>Develop</category>
      <category>MongoDB</category>
      <category>pymongo</category>
      <category>Python</category>
      <category>python monogodb</category>
      <category>Tutorial</category>
      <category>파이몽고</category>
      <category>파이썬</category>
      <author>youngkyu.cho</author>
      <guid isPermaLink="true">https://youngkyu.tistory.com/23</guid>
      <comments>https://youngkyu.tistory.com/23#entry23comment</comments>
      <pubDate>Wed, 29 Oct 2014 02:12:07 +0900</pubDate>
    </item>
    <item>
      <title>MongoDB(몽고 디비) 특징 공부하기 / 몽고 DB란 무엇인가?</title>
      <link>https://youngkyu.tistory.com/22</link>
      <description>&lt;en-note lang=&quot;v2&quot; style=&quot;line-height:1.6;&quot;&gt;&lt;del style=&quot;position:relative;display:block&quot;&gt;&lt;a style=&quot;position: absolute;color: #FFF;text-decoration: none;font-size: 12px;height: 25px;border-radius: 0;margin-top: -20px;right: 15px;background: rgba(0, 0, 0, 0);border-left: 10px solid #BB3A34;border-right: 10px solid #BB3A34;border-bottom: 5px solid rgba(0, 0, 0, 0);width: 0;text-indent:-100000px;&quot; href=&quot;http://marxi.co/#/?provider=evernote_int&amp;amp;guid=4e04bdd7-d69d-45e1-91fe-e6f4a7359e26&quot;&gt;Edit&lt;/a&gt;&lt;/del&gt;&lt;div style=&quot;line-height: 1.6; font-family: Helvetica Neue, Arial, Hiragino Sans GB, STHeiti, Microsoft YaHei, WenQuanYi Micro Hei, SimSun, Song, sans-serif;&quot;&gt;
&lt;h1 style=&quot;font-size: 36px; margin: 0.67em 0; font-family: inherit; font-weight: bold; line-height: 1.1; color: inherit; margin-top: 0px; margin-bottom: 20px;&quot;&gt;MongoDB(몽고 디비) 특징 공부하기.&lt;/h1&gt;
&lt;hr style=&quot;-moz-box-sizing: content-box; box-sizing: content-box; height: 0; line-height: 1.6; margin-top: 20px; margin-bottom: 20px; border: 0; border-top: 1px solid rgba(102, 128, 153, 0.15);&quot;&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;유명하다 못해 모르는 사람이 없을 만큼 많이 입에 오르내리는 디비 중 하나인 몽고디비는 예전부터, 아니 지금도 필자가 자주 사용해 오던 NoSQL이다. 해커톤같이 짧은 시간에 개발할 때에는 스키마가 없으면서 설정도 간단하고 빠른 성능을 가진 몽고디비가 강력강력강력 정말 &lt;strong style=&quot;font-weight: bold; margin-top: 0px;&quot;&gt;강력한&lt;/strong&gt; 데이터베이스로 사용될 수 있다. 두번 사용해야 한다. 그러나 안정성 문제가 거론되며 최근 뒷담하는 개발자가 많은 디비기도 하다. 이참에 특징에 대해 제대로 공부하고 싶어 책을 찾아가며, 인터넷을 뒤져가며 정리해보았다.&lt;/p&gt;
&lt;h2 style=&quot;font-family: inherit; font-weight: bold; line-height: 1.1; color: inherit; margin-top: 30px; margin-bottom: 20px; font-size: 30px;&quot;&gt;문서지향 데이터베이스.&lt;/h2&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;몽고 디비는 강력하고 유연하며 확장성이 높은 도큐먼트 베이스(문서 지향)의 데이터베이스이다. NoSQL 중 매우 유명한 놈이기도 하다. 문서 지향 데이터베이스에서는 행 개념 대신에 보다 유연한 모델인 문서를 이용하는데, &lt;strong style=&quot;font-weight: bold; margin-top: 0px;&quot;&gt;내장 문서&lt;/strong&gt;와 &lt;strong style=&quot;font-weight: bold;&quot;&gt;배열&lt;/strong&gt;따위의 표현이 가능해서 복잡한 객체의 계층 관계를 하나의 레코드(열)로 표현할 수 있다. 이것은 자바나 파이썬 같은 최신 객체지향 언어들을 사용하는 개발자에 매우 편리함을 가져다 준다.&lt;/p&gt;
&lt;h2 style=&quot;font-family: inherit; font-weight: bold; line-height: 1.1; color: inherit; margin-top: 30px; margin-bottom: 20px; font-size: 30px;&quot;&gt;스키마가 없다.&lt;/h2&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;몽고 디비의 특징 중 가장 유명한 것은 스키마가 없다는 것이다. 이것은 필요할 때 마다 필드를 추가하거나 제거하는 것이 매우 쉬워졌음을 의미한다. 사실은 필드라는게 없는거나 마찬가지니까. 따라서 개발 과정이 매우 단순해지고 빠르게 개발이 가능하게 된다.&lt;/p&gt;
&lt;h2 style=&quot;font-family: inherit; font-weight: bold; line-height: 1.1; color: inherit; margin-top: 30px; margin-bottom: 20px; font-size: 30px;&quot;&gt;스케일 아웃이 가능하다.&lt;/h2&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;소프트웨어 마에스트로에서 &lt;strong style=&quot;font-weight: bold; margin-top: 0px;&quot;&gt;뉴스 추천 서비스&lt;/strong&gt;를 프로젝트로 하고 있다. 언론사들을 크롤러가 돌며 뉴스를 수집하여 개인의 선호에 맞게 추천하는 서비스다. 이때 엄청난 양의 사용자 선호 로그데이터가 필요할 때 마다 필드를 바꾸며 빠른 속도로 쌓여야 하는데, 이때 매우 적합하다고 판정된게 몽고디비다. 데이터베이스에 엄청난 로그가 쌓여야하는데 Scale out도 가능할 뿐더러(디비 자체적으로 지원한다. 이를 염두에 두고 설계되었다. 알아서 문서를 재분배하고 라우팅까지 완벽히 처리한다.) 스키마가 없어 필요할 때 마다 필드를 변형 시킬 수 있기 때문이다.&lt;/p&gt;
&lt;h2 style=&quot;font-family: inherit; font-weight: bold; line-height: 1.1; color: inherit; margin-top: 30px; margin-bottom: 20px; font-size: 30px;&quot;&gt;범용 데이터베이스.&lt;/h2&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;몽고 디비는 범용 데이터베이스 목적으로 만들어 졌다. 따라서 CRUD의 작업외에도 다양한 기능을 제공한다. NoSQL이지만 쿼리가 있다. 조금 더럽긴 하지만. 아래는 몽고 디비가 제공하는 기능 중 일부이다.&lt;/p&gt;
&lt;ul style=&quot;margin-top: 0; margin-bottom: 10px; line-height: 1.6;&quot;&gt;
&lt;li style=&quot;line-height: 1.6; margin-top: 0px;&quot;&gt;인덱싱 제공.&lt;/li&gt;
&lt;li style=&quot;line-height: 1.6;&quot;&gt;집계 파이프라인의 지원&lt;/li&gt;
&lt;li style=&quot;line-height: 1.6;&quot;&gt;특수한 컬렉션 유형 제공. (TTL등과 고정크기 컬렉션 등.)&lt;/li&gt;
&lt;li style=&quot;line-height: 1.6;&quot;&gt;파일 저장소의 지원.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 style=&quot;font-family: inherit; font-weight: bold; line-height: 1.1; color: inherit; margin-top: 30px; margin-bottom: 20px; font-size: 30px;&quot;&gt;치명적이게도 조인과 트랜잭션 없음.&lt;/h2&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;관계형 데이터베이스에서 당연한듯 멋지게 지원하는 트랜잭션과 조인이 없다. 이것은 정말 치명적인데 몽고 디비는 분산 시스템을 위해 포기했다. 해당 기능들을 제공하는 데에 비용이 크기 때문이다.&lt;/p&gt;
&lt;h2 style=&quot;font-family: inherit; font-weight: bold; line-height: 1.1; color: inherit; margin-top: 30px; margin-bottom: 20px; font-size: 30px;&quot;&gt;매우 고성능이다.&lt;/h2&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;몽고디비는 쓰기와 읽기에서 기존의 RDB의 그것보다 수십배의 성능을 발휘한다. 당연하게도 여러 제약조건에 대한 처리가 없기 때문이기도 한데, 이것을 고스란히 애플리케이션 개발자 혹은 드라이버 개발자에게 맡겼다. 따라서 실제 서비스에서 사용하려면 상당히 많은 공이 필요하다. 손수 다 처리해야하므로. 트랜잭션까지........&lt;/p&gt;
&lt;h2 style=&quot;font-family: inherit; font-weight: bold; line-height: 1.1; color: inherit; margin-top: 30px; margin-bottom: 20px; font-size: 30px;&quot;&gt;낮은 진입장벽. 두번쓰자. 다시보자.&lt;/h2&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;개발에서 가장 힘든건 코딩이 아니라 번역이다. 정말 &lt;strong style=&quot;font-weight: bold; margin-top: 0px;&quot;&gt;번역&lt;/strong&gt;은 사람을 미치게한다. 영어 회화는 모르겠는데 영어 글은 좀 읽는다 생각했는데 안그래도 단어도 잘 모르는데 어려운 단어가 잔뜩 쓰여있는 문서는 곤욕이다. 게다가 쓸데없이 더럽고 사용하기 어렵게 만들어져 있는 API는 왜그리 많은지. 그런데 몽고디비는 깔끔하다. 진입장벽이 낮다. 정말이다.&lt;/p&gt;
&lt;h2 style=&quot;font-family: inherit; font-weight: bold; line-height: 1.1; color: inherit; margin-top: 30px; margin-bottom: 20px; font-size: 30px;&quot;&gt;문서는 RDB의 행(row)다.&lt;/h2&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;em style=&quot;margin-top: 0px;&quot;&gt;아니 사실은 그 이상이다.&lt;/em&gt; 엄청난 표현이 가능하다. 몽고디비의 핵심이기도 한 문서는 (키와 값)들의 집합이다. 키 + 값들이 아니라 (키+값)들이다. JSON을 생각하면 매우 간단하다. 그게 그러니까 한줄로 저장되는 거라 생각하면 된다. 어디에? RDB라면 테이블일텐데 여기서는 컬렉션이다. 그러나 &lt;em&gt;몽고디비에서는 데이터 형이 있다.&lt;/em&gt; &lt;/p&gt;
&lt;ul style=&quot;margin-top: 0; margin-bottom: 10px; line-height: 1.6;&quot;&gt;
&lt;li style=&quot;line-height: 1.6; margin-top: 0px;&quot;&gt;3와 &quot;3&quot;은 다르게 취급된다.&lt;/li&gt;
&lt;/ul&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;문서의 키/값의 쌍은 정렬되어 있기에 JSON으로 나타내어 똑같더라도 다르게 취급된다.&lt;/p&gt;
&lt;ul style=&quot;margin-top: 0; margin-bottom: 10px; line-height: 1.6;&quot;&gt;
&lt;li style=&quot;line-height: 1.6; margin-top: 0px;&quot;&gt;{a:1,b:2}와 {b:2,a:1}은 다르게 취급된다.&lt;/li&gt;
&lt;/ul&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;당연하게도 원래는 저게 똑같게 취급되는 경우가 더 많지만, 얘는 그렇다.&lt;/p&gt;
&lt;h2 style=&quot;font-family: inherit; font-weight: bold; line-height: 1.1; color: inherit; margin-top: 30px; margin-bottom: 20px; font-size: 30px;&quot;&gt;컬렉션은 테이블이다.&lt;/h2&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;문서들이 저장되는 장소가 컬렉션이다. 이름에서 느껴지듯 말이다. 컬렉션은 테이블과 달리 스키마가 없다. 아니 있긴 있다. 사실 아에 규칙없이 컬렉션에 문서를 모으면 재앙이다. 어떻게 컨트롤 할 것인가? 현대의 거의 모든 언어는 타입이 있고 담아올 VO들도 스키마가 있는데 말이다. 그러니 뭐 강제는 안하지만 몽고디비에도 스키마가 있긴 있는 거다.&lt;/p&gt;
&lt;ul style=&quot;margin-top: 0; margin-bottom: 10px; line-height: 1.6;&quot;&gt;
&lt;li style=&quot;line-height: 1.6; margin-top: 0px;&quot;&gt;컬렉션으로 구별해서 저장해 두라는 것. 데이터 지역성 측면에서도, 구분에서도 좋잖아. 그리고 그렇게 해야 인덱스도 효율적으로 만들 수 있다.&lt;/li&gt;
&lt;/ul&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;strong style=&quot;font-weight: bold; margin-top: 0px;&quot;&gt;&lt;em style=&quot;margin-top: 0px;&quot;&gt;뭐야 그럼, 어차피 있구만&lt;/em&gt;&lt;/strong&gt;&lt;br /&gt;이라고 생각할 수도 있는데 뭐 이런거다. 강제로 지키는 것과 자율적으로 지키는 것의 차이?&lt;/p&gt;
&lt;h2 style=&quot;font-family: inherit; font-weight: bold; line-height: 1.1; color: inherit; margin-top: 30px; margin-bottom: 20px; font-size: 30px;&quot;&gt;컬렉션은 테이블처럼 이름을 가진다.&lt;/h2&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;테이블 명 처럼 컬렉션 명이 있다. 이때 서브 컬렉션이라는게 있는데 이건 사실 말뿐인 것이다. RDB로 예를 들어보자. IMAGE가 있고 Thumbnail_IMAGE가 있는데 이걸 하나의 테이블에 넣진 않을 것이다. 그런데 둘다 이미지지 않은가? 몽고디비에서는 이를 위해 이름을 지을 때 '.'으로 둘을 구별하는 것을 권장한다. &lt;/p&gt;
&lt;h4 style=&quot;font-family: inherit; font-weight: bold; line-height: 1.1; color: inherit; margin-top: 25px; margin-bottom: 15px; font-size: 18px;&quot;&gt;서브 컬렉션이라는게 있다!&lt;/h4&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;em style=&quot;margin-top: 0px;&quot;&gt;image&lt;/em&gt;가 있고, &lt;em&gt;image.thumbnail&lt;/em&gt; 이런식으로 말이다. 근데 두 컬렉션이 관계있다는건 사람이 읽을 때 뿐이지, 몽고 디비가 저 두게를 연결 지어 관리하거나 그러지는 않는다. 전혀 무관. 그냥 이름에 점을 찍을 수 있는 거라고나 할까.&lt;/p&gt;
&lt;h2 style=&quot;font-family: inherit; font-weight: bold; line-height: 1.1; color: inherit; margin-top: 30px; margin-bottom: 20px; font-size: 30px;&quot;&gt;데이터베이스에 컬렉션을 그룹지어 놓는다.&lt;/h2&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;컬렉션은 알겠다. 데이터베이스는 뭐냐? 몽고 디비는 단일 인스턴스를 가지고 여러 데이터베이스를 호스팅 할 수 있다. 이건 뭐 MYSQL도 그렇지 않은가? 예를 들어 우리 팀 이름이 tworoom이라 Mysql과 똑같은 친척(?)인 MariaDB에 tworoom이란 디비를 만들어 두었다 생각해 보자. &lt;em style=&quot;margin-top: 0px;&quot;&gt;(실제로 소마에서 우리팀 이름이 tworoom이고 실제로 tworoom 디비가 있다!)&lt;/em&gt;&lt;/p&gt;&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;친구가 근데 해커톤을 한단다. 디비가 필요한데 없어서 디비하나만 임시로 만들어달라고 부탁해서 apple이라는 디비를 만들어줬다 치자. 가능한 시나리오지 않은가? 이것과 같은 맥락이다. 몽고디비도 그렇게 쓸 수 있다는 거다. 각 데이터베이스는 독립적으로 취급되며, 자체적인 권한 설정이 가능하고 따로 파일시스템에 하나의 파일로 저장된다. 따라서 64바이트 이내의 이름이 설정 가능하고, 빈 문자열은 불가능하며 파일 시스템에서 지원하지 않는 특수기호는 사용이 불가능하다! 물론 대소문자도 구별된다. 사진파일이나 텍스트 파일등 일반적인 파일이 그렇듯이!&lt;/p&gt;
&lt;h2 style=&quot;font-family: inherit; font-weight: bold; line-height: 1.1; color: inherit; margin-top: 30px; margin-bottom: 20px; font-size: 30px;&quot;&gt;특별한 데이터 베이스들이 있다.&lt;/h2&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;이미 몽고디비가 특수한 용도로 쓰려고 예약해둔 데이터 베이스들도 있다. &lt;/p&gt;
&lt;ul style=&quot;margin-top: 0; margin-bottom: 10px; line-height: 1.6;&quot;&gt;
&lt;li style=&quot;line-height: 1.6; margin-top: 0px;&quot;&gt;admin : 그냥 얘가 우리가 아는 root 데이터베이스다. 여기에 추가된 사용자는 전체 몽고디비 내의 모든 데이터베이스에 대하여 모든 권한을 획득한다. 서버 전역에 걸친 모든 명령어는 이곳에서만 실행 가능하다. 예를들어 디비 목록조회나 시작과 중지등등.&lt;/li&gt;
&lt;li style=&quot;line-height: 1.6;&quot;&gt;local : 이 디비는 특정 서버에만 보관하는 정보를 담는 곳이다. 복제가 불가능하다.&lt;/li&gt;
&lt;li style=&quot;line-height: 1.6;&quot;&gt;config : 몽고디비는 자체로 샤딩를 지원한다. 이 디비는 샤드 정보를 저장하는데 사용된다.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 style=&quot;font-family: inherit; font-weight: bold; line-height: 1.1; color: inherit; margin-top: 30px; margin-bottom: 20px; font-size: 30px;&quot;&gt;여기까지!&lt;/h2&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;공부를 오랜만에 해서 머리가 아프다. 몽고 디비를 막연히 사용만 했지 제대로 이해하려 한 적이 없었는데 기본적인 것을 훑고나니 조금 더 친해진 느낌이다. 더 친근하고 좋구만. 필자 뿐만 아니라 모두가 그랬으면 좋겠다! 더 잘 쓰지 못해 아쉽다.&lt;/p&gt;
&lt;h3 style=&quot;font-family: inherit; font-weight: bold; line-height: 1.1; color: inherit; margin-top: 30px; margin-bottom: 20px; font-size: 24px;&quot;&gt;&lt;em style=&quot;margin-top: 0px;&quot;&gt;다음 시간에는 튜토리얼을 같이 해보도록 하자!&lt;/em&gt;&lt;/h3&gt;
&lt;/div&gt;
&lt;center style=&quot;display:none&quot;&gt;%23MongoDB%28%uBABD%uACE0%20%uB514%uBE44%29%20%uD2B9%uC9D5%20%uACF5%uBD80%uD558%uAE30.%0A----%0A%uC720%uBA85%uD558%uB2E4%20%uBABB%uD574%20%uBAA8%uB974%uB294%20%uC0AC%uB78C%uC774%20%uC5C6%uC744%20%uB9CC%uD07C%20%uB9CE%uC774%20%uC785%uC5D0%20%uC624%uB974%uB0B4%uB9AC%uB294%20%uB514%uBE44%20%uC911%20%uD558%uB098%uC778%20%uBABD%uACE0%uB514%uBE44%uB294%20%uC608%uC804%uBD80%uD130%2C%20%uC544%uB2C8%20%uC9C0%uAE08%uB3C4%20%uD544%uC790%uAC00%20%uC790%uC8FC%20%uC0AC%uC6A9%uD574%20%uC624%uB358%20NoSQL%uC774%uB2E4.%20%uD574%uCEE4%uD1A4%uAC19%uC774%20%uC9E7%uC740%20%uC2DC%uAC04%uC5D0%20%uAC1C%uBC1C%uD560%20%uB54C%uC5D0%uB294%20%uC2A4%uD0A4%uB9C8%uAC00%20%uC5C6%uC73C%uBA74%uC11C%20%uC124%uC815%uB3C4%20%uAC04%uB2E8%uD558%uACE0%20%uBE60%uB978%20%uC131%uB2A5%uC744%20%uAC00%uC9C4%20%uBABD%uACE0%uB514%uBE44%uAC00%20%uAC15%uB825%uAC15%uB825%uAC15%uB825%20%uC815%uB9D0%20**%uAC15%uB825%uD55C**%20%uB370%uC774%uD130%uBCA0%uC774%uC2A4%uB85C%20%uC0AC%uC6A9%uB420%20%uC218%20%uC788%uB2E4.%20%uB450%uBC88%20%uC0AC%uC6A9%uD574%uC57C%20%uD55C%uB2E4.%20%uADF8%uB7EC%uB098%20%uC548%uC815%uC131%20%uBB38%uC81C%uAC00%20%uAC70%uB860%uB418%uBA70%20%uCD5C%uADFC%20%uB4B7%uB2F4%uD558%uB294%20%uAC1C%uBC1C%uC790%uAC00%20%uB9CE%uC740%20%uB514%uBE44%uAE30%uB3C4%20%uD558%uB2E4.%20%uC774%uCC38%uC5D0%20%uD2B9%uC9D5%uC5D0%20%uB300%uD574%20%uC81C%uB300%uB85C%20%uACF5%uBD80%uD558%uACE0%20%uC2F6%uC5B4%20%uCC45%uC744%20%uCC3E%uC544%uAC00%uBA70%2C%20%uC778%uD130%uB137%uC744%20%uB4A4%uC838%uAC00%uBA70%20%uC815%uB9AC%uD574%uBCF4%uC558%uB2E4.%0A%0A%23%23%20%uBB38%uC11C%uC9C0%uD5A5%20%uB370%uC774%uD130%uBCA0%uC774%uC2A4.%0A%uBABD%uACE0%20%uB514%uBE44%uB294%20%uAC15%uB825%uD558%uACE0%20%uC720%uC5F0%uD558%uBA70%20%uD655%uC7A5%uC131%uC774%20%uB192%uC740%20%uB3C4%uD050%uBA3C%uD2B8%20%uBCA0%uC774%uC2A4%28%uBB38%uC11C%20%uC9C0%uD5A5%29%uC758%20%uB370%uC774%uD130%uBCA0%uC774%uC2A4%uC774%uB2E4.%20NoSQL%20%uC911%20%uB9E4%uC6B0%20%uC720%uBA85%uD55C%20%uB188%uC774%uAE30%uB3C4%20%uD558%uB2E4.%20%uBB38%uC11C%20%uC9C0%uD5A5%20%uB370%uC774%uD130%uBCA0%uC774%uC2A4%uC5D0%uC11C%uB294%20%uD589%20%uAC1C%uB150%20%uB300%uC2E0%uC5D0%20%uBCF4%uB2E4%20%uC720%uC5F0%uD55C%20%uBAA8%uB378%uC778%20%uBB38%uC11C%uB97C%20%uC774%uC6A9%uD558%uB294%uB370%2C%20**%uB0B4%uC7A5%20%uBB38%uC11C**%uC640%20**%uBC30%uC5F4**%uB530%uC704%uC758%20%uD45C%uD604%uC774%20%uAC00%uB2A5%uD574%uC11C%20%uBCF5%uC7A1%uD55C%20%uAC1D%uCCB4%uC758%20%uACC4%uCE35%20%uAD00%uACC4%uB97C%20%uD558%uB098%uC758%20%uB808%uCF54%uB4DC%28%uC5F4%29%uB85C%20%uD45C%uD604%uD560%20%uC218%20%uC788%uB2E4.%20%uC774%uAC83%uC740%20%uC790%uBC14%uB098%20%uD30C%uC774%uC36C%20%uAC19%uC740%20%uCD5C%uC2E0%20%uAC1D%uCCB4%uC9C0%uD5A5%20%uC5B8%uC5B4%uB4E4%uC744%20%uC0AC%uC6A9%uD558%uB294%20%uAC1C%uBC1C%uC790%uC5D0%20%uB9E4%uC6B0%20%uD3B8%uB9AC%uD568%uC744%20%uAC00%uC838%uB2E4%20%uC900%uB2E4.%0A%0A%23%23%uC2A4%uD0A4%uB9C8%uAC00%20%uC5C6%uB2E4.%0A%uBABD%uACE0%20%uB514%uBE44%uC758%20%uD2B9%uC9D5%20%uC911%20%uAC00%uC7A5%20%uC720%uBA85%uD55C%20%uAC83%uC740%20%uC2A4%uD0A4%uB9C8%uAC00%20%uC5C6%uB2E4%uB294%20%uAC83%uC774%uB2E4.%20%uC774%uAC83%uC740%20%uD544%uC694%uD560%20%uB54C%20%uB9C8%uB2E4%20%uD544%uB4DC%uB97C%20%uCD94%uAC00%uD558%uAC70%uB098%20%uC81C%uAC70%uD558%uB294%20%uAC83%uC774%20%uB9E4%uC6B0%20%uC26C%uC6CC%uC84C%uC74C%uC744%20%uC758%uBBF8%uD55C%uB2E4.%20%uC0AC%uC2E4%uC740%20%uD544%uB4DC%uB77C%uB294%uAC8C%20%uC5C6%uB294%uAC70%uB098%20%uB9C8%uCC2C%uAC00%uC9C0%uB2C8%uAE4C.%20%uB530%uB77C%uC11C%20%uAC1C%uBC1C%20%uACFC%uC815%uC774%20%uB9E4%uC6B0%20%uB2E8%uC21C%uD574%uC9C0%uACE0%20%uBE60%uB974%uAC8C%20%uAC1C%uBC1C%uC774%20%uAC00%uB2A5%uD558%uAC8C%20%uB41C%uB2E4.%0A%0A%23%23%uC2A4%uCF00%uC77C%20%uC544%uC6C3%uC774%20%uAC00%uB2A5%uD558%uB2E4.%0A%uC18C%uD504%uD2B8%uC6E8%uC5B4%20%uB9C8%uC5D0%uC2A4%uD2B8%uB85C%uC5D0%uC11C%20**%uB274%uC2A4%20%uCD94%uCC9C%20%uC11C%uBE44%uC2A4**%uB97C%20%uD504%uB85C%uC81D%uD2B8%uB85C%20%uD558%uACE0%20%uC788%uB2E4.%20%uC5B8%uB860%uC0AC%uB4E4%uC744%20%uD06C%uB864%uB7EC%uAC00%20%uB3CC%uBA70%20%uB274%uC2A4%uB97C%20%uC218%uC9D1%uD558%uC5EC%20%uAC1C%uC778%uC758%20%uC120%uD638%uC5D0%20%uB9DE%uAC8C%20%uCD94%uCC9C%uD558%uB294%20%uC11C%uBE44%uC2A4%uB2E4.%20%uC774%uB54C%20%uC5C4%uCCAD%uB09C%20%uC591%uC758%20%uC0AC%uC6A9%uC790%20%uC120%uD638%20%uB85C%uADF8%uB370%uC774%uD130%uAC00%20%uD544%uC694%uD560%20%uB54C%20%uB9C8%uB2E4%20%uD544%uB4DC%uB97C%20%uBC14%uAFB8%uBA70%20%uBE60%uB978%20%uC18D%uB3C4%uB85C%20%uC313%uC5EC%uC57C%20%uD558%uB294%uB370%2C%20%uC774%uB54C%20%uB9E4%uC6B0%20%uC801%uD569%uD558%uB2E4%uACE0%20%uD310%uC815%uB41C%uAC8C%20%uBABD%uACE0%uB514%uBE44%uB2E4.%20%uB370%uC774%uD130%uBCA0%uC774%uC2A4%uC5D0%20%uC5C4%uCCAD%uB09C%20%uB85C%uADF8%uAC00%20%uC313%uC5EC%uC57C%uD558%uB294%uB370%20Scale%20out%uB3C4%20%uAC00%uB2A5%uD560%20%uBFD0%uB354%uB7EC%28%uB514%uBE44%20%uC790%uCCB4%uC801%uC73C%uB85C%20%uC9C0%uC6D0%uD55C%uB2E4.%20%uC774%uB97C%20%uC5FC%uB450%uC5D0%20%uB450%uACE0%20%uC124%uACC4%uB418%uC5C8%uB2E4.%20%uC54C%uC544%uC11C%20%uBB38%uC11C%uB97C%20%uC7AC%uBD84%uBC30%uD558%uACE0%20%uB77C%uC6B0%uD305%uAE4C%uC9C0%20%uC644%uBCBD%uD788%20%uCC98%uB9AC%uD55C%uB2E4.%29%20%uC2A4%uD0A4%uB9C8%uAC00%20%uC5C6%uC5B4%20%uD544%uC694%uD560%20%uB54C%20%uB9C8%uB2E4%20%uD544%uB4DC%uB97C%20%uBCC0%uD615%20%uC2DC%uD0AC%20%uC218%20%uC788%uAE30%20%uB54C%uBB38%uC774%uB2E4.%0A%0A%23%23%uBC94%uC6A9%20%uB370%uC774%uD130%uBCA0%uC774%uC2A4.%0A%uBABD%uACE0%20%uB514%uBE44%uB294%20%uBC94%uC6A9%20%uB370%uC774%uD130%uBCA0%uC774%uC2A4%20%uBAA9%uC801%uC73C%uB85C%20%uB9CC%uB4E4%uC5B4%20%uC84C%uB2E4.%20%uB530%uB77C%uC11C%20CRUD%uC758%20%uC791%uC5C5%uC678%uC5D0%uB3C4%20%uB2E4%uC591%uD55C%20%uAE30%uB2A5%uC744%20%uC81C%uACF5%uD55C%uB2E4.%20NoSQL%uC774%uC9C0%uB9CC%20%uCFFC%uB9AC%uAC00%20%uC788%uB2E4.%20%uC870%uAE08%20%uB354%uB7FD%uAE34%20%uD558%uC9C0%uB9CC.%20%uC544%uB798%uB294%20%uBABD%uACE0%20%uB514%uBE44%uAC00%20%uC81C%uACF5%uD558%uB294%20%uAE30%uB2A5%20%uC911%20%uC77C%uBD80%uC774%uB2E4.%0A-%20%uC778%uB371%uC2F1%20%uC81C%uACF5.%0A-%20%uC9D1%uACC4%20%uD30C%uC774%uD504%uB77C%uC778%uC758%20%uC9C0%uC6D0%0A-%20%uD2B9%uC218%uD55C%20%uCEEC%uB809%uC158%20%uC720%uD615%20%uC81C%uACF5.%20%28TTL%uB4F1%uACFC%20%uACE0%uC815%uD06C%uAE30%20%uCEEC%uB809%uC158%20%uB4F1.%29%0A-%20%uD30C%uC77C%20%uC800%uC7A5%uC18C%uC758%20%uC9C0%uC6D0.%0A%0A%23%23%uCE58%uBA85%uC801%uC774%uAC8C%uB3C4%20%uC870%uC778%uACFC%20%uD2B8%uB79C%uC7AD%uC158%20%uC5C6%uC74C.%0A%uAD00%uACC4%uD615%20%uB370%uC774%uD130%uBCA0%uC774%uC2A4%uC5D0%uC11C%20%uB2F9%uC5F0%uD55C%uB4EF%20%uBA4B%uC9C0%uAC8C%20%uC9C0%uC6D0%uD558%uB294%20%uD2B8%uB79C%uC7AD%uC158%uACFC%20%uC870%uC778%uC774%20%uC5C6%uB2E4.%20%uC774%uAC83%uC740%20%uC815%uB9D0%20%uCE58%uBA85%uC801%uC778%uB370%20%uBABD%uACE0%20%uB514%uBE44%uB294%20%uBD84%uC0B0%20%uC2DC%uC2A4%uD15C%uC744%20%uC704%uD574%20%uD3EC%uAE30%uD588%uB2E4.%20%uD574%uB2F9%20%uAE30%uB2A5%uB4E4%uC744%20%uC81C%uACF5%uD558%uB294%20%uB370%uC5D0%20%uBE44%uC6A9%uC774%20%uD06C%uAE30%20%uB54C%uBB38%uC774%uB2E4.%0A%0A%23%23%uB9E4%uC6B0%20%uACE0%uC131%uB2A5%uC774%uB2E4.%0A%uBABD%uACE0%uB514%uBE44%uB294%20%uC4F0%uAE30%uC640%20%uC77D%uAE30%uC5D0%uC11C%20%uAE30%uC874%uC758%20RDB%uC758%20%uADF8%uAC83%uBCF4%uB2E4%20%uC218%uC2ED%uBC30%uC758%20%uC131%uB2A5%uC744%20%uBC1C%uD718%uD55C%uB2E4.%20%uB2F9%uC5F0%uD558%uAC8C%uB3C4%20%uC5EC%uB7EC%20%uC81C%uC57D%uC870%uAC74%uC5D0%20%uB300%uD55C%20%uCC98%uB9AC%uAC00%20%uC5C6%uAE30%20%uB54C%uBB38%uC774%uAE30%uB3C4%20%uD55C%uB370%2C%20%uC774%uAC83%uC744%20%uACE0%uC2A4%uB780%uD788%20%uC560%uD50C%uB9AC%uCF00%uC774%uC158%20%uAC1C%uBC1C%uC790%20%uD639%uC740%20%uB4DC%uB77C%uC774%uBC84%20%uAC1C%uBC1C%uC790%uC5D0%uAC8C%20%uB9E1%uACBC%uB2E4.%20%uB530%uB77C%uC11C%20%uC2E4%uC81C%20%uC11C%uBE44%uC2A4%uC5D0%uC11C%20%uC0AC%uC6A9%uD558%uB824%uBA74%20%uC0C1%uB2F9%uD788%20%uB9CE%uC740%20%uACF5%uC774%20%uD544%uC694%uD558%uB2E4.%20%uC190%uC218%20%uB2E4%20%uCC98%uB9AC%uD574%uC57C%uD558%uBBC0%uB85C.%20%uD2B8%uB79C%uC7AD%uC158%uAE4C%uC9C0........%0A%0A%23%23%uB0AE%uC740%20%uC9C4%uC785%uC7A5%uBCBD.%20%uB450%uBC88%uC4F0%uC790.%20%uB2E4%uC2DC%uBCF4%uC790.%0A%uAC1C%uBC1C%uC5D0%uC11C%20%uAC00%uC7A5%20%uD798%uB4E0%uAC74%20%uCF54%uB529%uC774%20%uC544%uB2C8%uB77C%20%uBC88%uC5ED%uC774%uB2E4.%20%uC815%uB9D0%20**%uBC88%uC5ED**%uC740%20%uC0AC%uB78C%uC744%20%uBBF8%uCE58%uAC8C%uD55C%uB2E4.%20%uC601%uC5B4%20%uD68C%uD654%uB294%20%uBAA8%uB974%uACA0%uB294%uB370%20%uC601%uC5B4%20%uAE00%uC740%20%uC880%20%uC77D%uB294%uB2E4%20%uC0DD%uAC01%uD588%uB294%uB370%20%uC548%uADF8%uB798%uB3C4%20%uB2E8%uC5B4%uB3C4%20%uC798%20%uBAA8%uB974%uB294%uB370%20%uC5B4%uB824%uC6B4%20%uB2E8%uC5B4%uAC00%20%uC794%uB729%20%uC4F0%uC5EC%uC788%uB294%20%uBB38%uC11C%uB294%20%uACE4%uC695%uC774%uB2E4.%20%uAC8C%uB2E4%uAC00%20%uC4F8%uB370%uC5C6%uC774%20%uB354%uB7FD%uACE0%20%uC0AC%uC6A9%uD558%uAE30%20%uC5B4%uB835%uAC8C%20%uB9CC%uB4E4%uC5B4%uC838%20%uC788%uB294%20API%uB294%20%uC65C%uADF8%uB9AC%20%uB9CE%uC740%uC9C0.%20%uADF8%uB7F0%uB370%20%uBABD%uACE0%uB514%uBE44%uB294%20%uAE54%uB054%uD558%uB2E4.%20%uC9C4%uC785%uC7A5%uBCBD%uC774%20%uB0AE%uB2E4.%20%uC815%uB9D0%uC774%uB2E4.%0A%0A%23%23%uBB38%uC11C%uB294%20RDB%uC758%20%uD589%28row%29%uB2E4.%0A*%uC544%uB2C8%20%uC0AC%uC2E4%uC740%20%uADF8%20%uC774%uC0C1%uC774%uB2E4.*%20%uC5C4%uCCAD%uB09C%20%uD45C%uD604%uC774%20%uAC00%uB2A5%uD558%uB2E4.%20%uBABD%uACE0%uB514%uBE44%uC758%20%uD575%uC2EC%uC774%uAE30%uB3C4%20%uD55C%20%uBB38%uC11C%uB294%20%28%uD0A4%uC640%20%uAC12%29%uB4E4%uC758%20%uC9D1%uD569%uC774%uB2E4.%20%uD0A4%20+%20%uAC12%uB4E4%uC774%20%uC544%uB2C8%uB77C%20%28%uD0A4+%uAC12%29%uB4E4%uC774%uB2E4.%20JSON%uC744%20%uC0DD%uAC01%uD558%uBA74%20%uB9E4%uC6B0%20%uAC04%uB2E8%uD558%uB2E4.%20%uADF8%uAC8C%20%uADF8%uB7EC%uB2C8%uAE4C%20%uD55C%uC904%uB85C%20%uC800%uC7A5%uB418%uB294%20%uAC70%uB77C%20%uC0DD%uAC01%uD558%uBA74%20%uB41C%uB2E4.%20%uC5B4%uB514%uC5D0%3F%20RDB%uB77C%uBA74%20%uD14C%uC774%uBE14%uC77C%uD150%uB370%20%uC5EC%uAE30%uC11C%uB294%20%uCEEC%uB809%uC158%uC774%uB2E4.%20%uADF8%uB7EC%uB098%20*%uBABD%uACE0%uB514%uBE44%uC5D0%uC11C%uB294%20%uB370%uC774%uD130%20%uD615%uC774%20%uC788%uB2E4.*%20%0A-%203%uC640%20%223%22%uC740%20%uB2E4%uB974%uAC8C%20%uCDE8%uAE09%uB41C%uB2E4.%0A%0A%uBB38%uC11C%uC758%20%uD0A4/%uAC12%uC758%20%uC30D%uC740%20%uC815%uB82C%uB418%uC5B4%20%uC788%uAE30%uC5D0%20JSON%uC73C%uB85C%20%uB098%uD0C0%uB0B4%uC5B4%20%uB611%uAC19%uB354%uB77C%uB3C4%20%uB2E4%uB974%uAC8C%20%uCDE8%uAE09%uB41C%uB2E4.%0A-%20%7Ba%3A1%2Cb%3A2%7D%uC640%20%7Bb%3A2%2Ca%3A1%7D%uC740%20%uB2E4%uB974%uAC8C%20%uCDE8%uAE09%uB41C%uB2E4.%0A%0A%uB2F9%uC5F0%uD558%uAC8C%uB3C4%20%uC6D0%uB798%uB294%20%uC800%uAC8C%20%uB611%uAC19%uAC8C%20%uCDE8%uAE09%uB418%uB294%20%uACBD%uC6B0%uAC00%20%uB354%20%uB9CE%uC9C0%uB9CC%2C%20%uC598%uB294%20%uADF8%uB807%uB2E4.%0A%0A%23%23%uCEEC%uB809%uC158%uC740%20%uD14C%uC774%uBE14%uC774%uB2E4.%0A%uBB38%uC11C%uB4E4%uC774%20%uC800%uC7A5%uB418%uB294%20%uC7A5%uC18C%uAC00%20%uCEEC%uB809%uC158%uC774%uB2E4.%20%uC774%uB984%uC5D0%uC11C%20%uB290%uAEF4%uC9C0%uB4EF%20%uB9D0%uC774%uB2E4.%20%uCEEC%uB809%uC158%uC740%20%uD14C%uC774%uBE14%uACFC%20%uB2EC%uB9AC%20%uC2A4%uD0A4%uB9C8%uAC00%20%uC5C6%uB2E4.%20%uC544%uB2C8%20%uC788%uAE34%20%uC788%uB2E4.%20%uC0AC%uC2E4%20%uC544%uC5D0%20%uADDC%uCE59%uC5C6%uC774%20%uCEEC%uB809%uC158%uC5D0%20%uBB38%uC11C%uB97C%20%uBAA8%uC73C%uBA74%20%uC7AC%uC559%uC774%uB2E4.%20%uC5B4%uB5BB%uAC8C%20%uCEE8%uD2B8%uB864%20%uD560%20%uAC83%uC778%uAC00%3F%20%uD604%uB300%uC758%20%uAC70%uC758%20%uBAA8%uB4E0%20%uC5B8%uC5B4%uB294%20%uD0C0%uC785%uC774%20%uC788%uACE0%20%uB2F4%uC544%uC62C%20VO%uB4E4%uB3C4%20%uC2A4%uD0A4%uB9C8%uAC00%20%uC788%uB294%uB370%20%uB9D0%uC774%uB2E4.%20%uADF8%uB7EC%uB2C8%20%uBB50%20%uAC15%uC81C%uB294%20%uC548%uD558%uC9C0%uB9CC%20%uBABD%uACE0%uB514%uBE44%uC5D0%uB3C4%20%uC2A4%uD0A4%uB9C8%uAC00%20%uC788%uAE34%20%uC788%uB294%20%uAC70%uB2E4.%0A-%20%uCEEC%uB809%uC158%uC73C%uB85C%20%uAD6C%uBCC4%uD574%uC11C%20%uC800%uC7A5%uD574%20%uB450%uB77C%uB294%20%uAC83.%20%uB370%uC774%uD130%20%uC9C0%uC5ED%uC131%20%uCE21%uBA74%uC5D0%uC11C%uB3C4%2C%20%uAD6C%uBD84%uC5D0%uC11C%uB3C4%20%uC88B%uC796%uC544.%20%uADF8%uB9AC%uACE0%20%uADF8%uB807%uAC8C%20%uD574%uC57C%20%uC778%uB371%uC2A4%uB3C4%20%uD6A8%uC728%uC801%uC73C%uB85C%20%uB9CC%uB4E4%20%uC218%20%uC788%uB2E4.%0A%0A***%uBB50%uC57C%20%uADF8%uB7FC%2C%20%uC5B4%uCC28%uD53C%20%uC788%uAD6C%uB9CC***%0A%uC774%uB77C%uACE0%20%uC0DD%uAC01%uD560%20%uC218%uB3C4%20%uC788%uB294%uB370%20%uBB50%20%uC774%uB7F0%uAC70%uB2E4.%20%uAC15%uC81C%uB85C%20%uC9C0%uD0A4%uB294%20%uAC83%uACFC%20%uC790%uC728%uC801%uC73C%uB85C%20%uC9C0%uD0A4%uB294%20%uAC83%uC758%20%uCC28%uC774%3F%0A%0A%23%23%uCEEC%uB809%uC158%uC740%20%uD14C%uC774%uBE14%uCC98%uB7FC%20%uC774%uB984%uC744%20%uAC00%uC9C4%uB2E4.%0A%uD14C%uC774%uBE14%20%uBA85%20%uCC98%uB7FC%20%uCEEC%uB809%uC158%20%uBA85%uC774%20%uC788%uB2E4.%20%uC774%uB54C%20%uC11C%uBE0C%20%uCEEC%uB809%uC158%uC774%uB77C%uB294%uAC8C%20%uC788%uB294%uB370%20%uC774%uAC74%20%uC0AC%uC2E4%20%uB9D0%uBFD0%uC778%20%uAC83%uC774%uB2E4.%20RDB%uB85C%20%uC608%uB97C%20%uB4E4%uC5B4%uBCF4%uC790.%20IMAGE%uAC00%20%uC788%uACE0%20Thumbnail_IMAGE%uAC00%20%uC788%uB294%uB370%20%uC774%uAC78%20%uD558%uB098%uC758%20%uD14C%uC774%uBE14%uC5D0%20%uB123%uC9C4%20%uC54A%uC744%20%uAC83%uC774%uB2E4.%20%uADF8%uB7F0%uB370%20%uB458%uB2E4%20%uC774%uBBF8%uC9C0%uC9C0%20%uC54A%uC740%uAC00%3F%20%uBABD%uACE0%uB514%uBE44%uC5D0%uC11C%uB294%20%uC774%uB97C%20%uC704%uD574%20%uC774%uB984%uC744%20%uC9C0%uC744%20%uB54C%20%27.%27%uC73C%uB85C%20%uB458%uC744%20%uAD6C%uBCC4%uD558%uB294%20%uAC83%uC744%20%uAD8C%uC7A5%uD55C%uB2E4.%20%0A%23%23%23%23%uC11C%uBE0C%20%uCEEC%uB809%uC158%uC774%uB77C%uB294%uAC8C%20%uC788%uB2E4%21%0A*image*%uAC00%20%uC788%uACE0%2C%20*image.thumbnail*%20%uC774%uB7F0%uC2DD%uC73C%uB85C%20%uB9D0%uC774%uB2E4.%20%uADFC%uB370%20%uB450%20%uCEEC%uB809%uC158%uC774%20%uAD00%uACC4%uC788%uB2E4%uB294%uAC74%20%uC0AC%uB78C%uC774%20%uC77D%uC744%20%uB54C%20%uBFD0%uC774%uC9C0%2C%20%uBABD%uACE0%20%uB514%uBE44%uAC00%20%uC800%20%uB450%uAC8C%uB97C%20%uC5F0%uACB0%20%uC9C0%uC5B4%20%uAD00%uB9AC%uD558%uAC70%uB098%20%uADF8%uB7EC%uC9C0%uB294%20%uC54A%uB294%uB2E4.%20%uC804%uD600%20%uBB34%uAD00.%20%uADF8%uB0E5%20%uC774%uB984%uC5D0%20%uC810%uC744%20%uCC0D%uC744%20%uC218%20%uC788%uB294%20%uAC70%uB77C%uACE0%uB098%20%uD560%uAE4C.%0A%0A%23%23%uB370%uC774%uD130%uBCA0%uC774%uC2A4%uC5D0%20%uCF5C%uB809%uC158%uC744%20%uADF8%uB8F9%uC9C0%uC5B4%20%uB193%uB294%uB2E4.%0A%uCEEC%uB809%uC158%uC740%20%uC54C%uACA0%uB2E4.%20%uB370%uC774%uD130%uBCA0%uC774%uC2A4%uB294%20%uBB50%uB0D0%3F%20%uBABD%uACE0%20%uB514%uBE44%uB294%20%uB2E8%uC77C%20%uC778%uC2A4%uD134%uC2A4%uB97C%20%uAC00%uC9C0%uACE0%20%uC5EC%uB7EC%20%uB370%uC774%uD130%uBCA0%uC774%uC2A4%uB97C%20%uD638%uC2A4%uD305%20%uD560%20%uC218%20%uC788%uB2E4.%20%uC774%uAC74%20%uBB50%20MYSQL%uB3C4%20%uADF8%uB807%uC9C0%20%uC54A%uC740%uAC00%3F%20%uC608%uB97C%20%uB4E4%uC5B4%20%uC6B0%uB9AC%20%uD300%20%uC774%uB984%uC774%20tworoom%uC774%uB77C%20Mysql%uACFC%20%uB611%uAC19%uC740%20%uCE5C%uCC99%28%3F%29%uC778%20MariaDB%uC5D0%20tworoom%uC774%uB780%20%uB514%uBE44%uB97C%20%uB9CC%uB4E4%uC5B4%20%uB450%uC5C8%uB2E4%20%uC0DD%uAC01%uD574%20%uBCF4%uC790.%20*%28%uC2E4%uC81C%uB85C%20%uC18C%uB9C8%uC5D0%uC11C%20%uC6B0%uB9AC%uD300%20%uC774%uB984%uC774%20tworoom%uC774%uACE0%20%uC2E4%uC81C%uB85C%20tworoom%20%uB514%uBE44%uAC00%20%uC788%uB2E4%21%29*%0A%0A%uCE5C%uAD6C%uAC00%20%uADFC%uB370%20%uD574%uCEE4%uD1A4%uC744%20%uD55C%uB2E8%uB2E4.%20%uB514%uBE44%uAC00%20%uD544%uC694%uD55C%uB370%20%uC5C6%uC5B4%uC11C%20%uB514%uBE44%uD558%uB098%uB9CC%20%uC784%uC2DC%uB85C%20%uB9CC%uB4E4%uC5B4%uB2EC%uB77C%uACE0%20%uBD80%uD0C1%uD574%uC11C%20apple%uC774%uB77C%uB294%20%uB514%uBE44%uB97C%20%uB9CC%uB4E4%uC5B4%uC92C%uB2E4%20%uCE58%uC790.%20%uAC00%uB2A5%uD55C%20%uC2DC%uB098%uB9AC%uC624%uC9C0%20%uC54A%uC740%uAC00%3F%20%uC774%uAC83%uACFC%20%uAC19%uC740%20%uB9E5%uB77D%uC774%uB2E4.%20%uBABD%uACE0%uB514%uBE44%uB3C4%20%uADF8%uB807%uAC8C%20%uC4F8%20%uC218%20%uC788%uB2E4%uB294%20%uAC70%uB2E4.%20%uAC01%20%uB370%uC774%uD130%uBCA0%uC774%uC2A4%uB294%20%uB3C5%uB9BD%uC801%uC73C%uB85C%20%uCDE8%uAE09%uB418%uBA70%2C%20%uC790%uCCB4%uC801%uC778%20%uAD8C%uD55C%20%uC124%uC815%uC774%20%uAC00%uB2A5%uD558%uACE0%20%uB530%uB85C%20%uD30C%uC77C%uC2DC%uC2A4%uD15C%uC5D0%20%uD558%uB098%uC758%20%uD30C%uC77C%uB85C%20%uC800%uC7A5%uB41C%uB2E4.%20%uB530%uB77C%uC11C%2064%uBC14%uC774%uD2B8%20%uC774%uB0B4%uC758%20%uC774%uB984%uC774%20%uC124%uC815%20%uAC00%uB2A5%uD558%uACE0%2C%20%uBE48%20%uBB38%uC790%uC5F4%uC740%20%uBD88%uAC00%uB2A5%uD558%uBA70%20%uD30C%uC77C%20%uC2DC%uC2A4%uD15C%uC5D0%uC11C%20%uC9C0%uC6D0%uD558%uC9C0%20%uC54A%uB294%20%uD2B9%uC218%uAE30%uD638%uB294%20%uC0AC%uC6A9%uC774%20%uBD88%uAC00%uB2A5%uD558%uB2E4%21%20%uBB3C%uB860%20%uB300%uC18C%uBB38%uC790%uB3C4%20%uAD6C%uBCC4%uB41C%uB2E4.%20%uC0AC%uC9C4%uD30C%uC77C%uC774%uB098%20%uD14D%uC2A4%uD2B8%20%uD30C%uC77C%uB4F1%20%uC77C%uBC18%uC801%uC778%20%uD30C%uC77C%uC774%20%uADF8%uB807%uB4EF%uC774%21%0A%0A%23%23%uD2B9%uBCC4%uD55C%20%uB370%uC774%uD130%20%uBCA0%uC774%uC2A4%uB4E4%uC774%20%uC788%uB2E4.%0A%uC774%uBBF8%20%uBABD%uACE0%uB514%uBE44%uAC00%20%uD2B9%uC218%uD55C%20%uC6A9%uB3C4%uB85C%20%uC4F0%uB824%uACE0%20%uC608%uC57D%uD574%uB454%20%uB370%uC774%uD130%20%uBCA0%uC774%uC2A4%uB4E4%uB3C4%20%uC788%uB2E4.%20%0A-%20admin%20%3A%20%uADF8%uB0E5%20%uC598%uAC00%20%uC6B0%uB9AC%uAC00%20%uC544%uB294%20root%20%uB370%uC774%uD130%uBCA0%uC774%uC2A4%uB2E4.%20%uC5EC%uAE30%uC5D0%20%uCD94%uAC00%uB41C%20%uC0AC%uC6A9%uC790%uB294%20%uC804%uCCB4%20%uBABD%uACE0%uB514%uBE44%20%uB0B4%uC758%20%uBAA8%uB4E0%20%uB370%uC774%uD130%uBCA0%uC774%uC2A4%uC5D0%20%uB300%uD558%uC5EC%20%uBAA8%uB4E0%20%uAD8C%uD55C%uC744%20%uD68D%uB4DD%uD55C%uB2E4.%20%uC11C%uBC84%20%uC804%uC5ED%uC5D0%20%uAC78%uCE5C%20%uBAA8%uB4E0%20%uBA85%uB839%uC5B4%uB294%20%uC774%uACF3%uC5D0%uC11C%uB9CC%20%uC2E4%uD589%20%uAC00%uB2A5%uD558%uB2E4.%20%uC608%uB97C%uB4E4%uC5B4%20%uB514%uBE44%20%uBAA9%uB85D%uC870%uD68C%uB098%20%uC2DC%uC791%uACFC%20%uC911%uC9C0%uB4F1%uB4F1.%0A-%20local%20%3A%20%uC774%20%uB514%uBE44%uB294%20%uD2B9%uC815%20%uC11C%uBC84%uC5D0%uB9CC%20%uBCF4%uAD00%uD558%uB294%20%uC815%uBCF4%uB97C%20%uB2F4%uB294%20%uACF3%uC774%uB2E4.%20%uBCF5%uC81C%uAC00%20%uBD88%uAC00%uB2A5%uD558%uB2E4.%0A-%20config%20%3A%20%uBABD%uACE0%uB514%uBE44%uB294%20%uC790%uCCB4%uB85C%20%uC0E4%uB529%uB97C%20%uC9C0%uC6D0%uD55C%uB2E4.%20%uC774%20%uB514%uBE44%uB294%20%uC0E4%uB4DC%20%uC815%uBCF4%uB97C%20%uC800%uC7A5%uD558%uB294%uB370%20%uC0AC%uC6A9%uB41C%uB2E4.%0A%0A%23%23%uC5EC%uAE30%uAE4C%uC9C0%21%0A%uACF5%uBD80%uB97C%20%uC624%uB79C%uB9CC%uC5D0%20%uD574%uC11C%20%uBA38%uB9AC%uAC00%20%uC544%uD504%uB2E4.%20%uBABD%uACE0%20%uB514%uBE44%uB97C%20%uB9C9%uC5F0%uD788%20%uC0AC%uC6A9%uB9CC%20%uD588%uC9C0%20%uC81C%uB300%uB85C%20%uC774%uD574%uD558%uB824%20%uD55C%20%uC801%uC774%20%uC5C6%uC5C8%uB294%uB370%20%uAE30%uBCF8%uC801%uC778%20%uAC83%uC744%20%uD6D1%uACE0%uB098%uB2C8%20%uC870%uAE08%20%uB354%20%uCE5C%uD574%uC9C4%20%uB290%uB08C%uC774%uB2E4.%20%uB354%20%uCE5C%uADFC%uD558%uACE0%20%uC88B%uAD6C%uB9CC.%20%uD544%uC790%20%uBFD0%uB9CC%20%uC544%uB2C8%uB77C%20%uBAA8%uB450%uAC00%20%uADF8%uB7AC%uC73C%uBA74%20%uC88B%uACA0%uB2E4%21%20%uB354%20%uC798%20%uC4F0%uC9C0%20%uBABB%uD574%20%uC544%uC27D%uB2E4.%0A%23%23%23*%uB2E4%uC74C%20%uC2DC%uAC04%uC5D0%uB294%20%uD29C%uD1A0%uB9AC%uC5BC%uC744%20%uAC19%uC774%20%uD574%uBCF4%uB3C4%uB85D%20%uD558%uC790%21*&lt;/center&gt;
&lt;br /&gt;&lt;/en-note&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</description>
      <category>Develop</category>
      <category>mongo</category>
      <category>MongoDB</category>
      <category>nosql</category>
      <category>데이터베이스</category>
      <category>몽고</category>
      <category>몽고디비</category>
      <category>문서 지향</category>
      <author>youngkyu.cho</author>
      <guid isPermaLink="true">https://youngkyu.tistory.com/22</guid>
      <comments>https://youngkyu.tistory.com/22#entry22comment</comments>
      <pubDate>Mon, 20 Oct 2014 21:45:15 +0900</pubDate>
    </item>
    <item>
      <title>간단하게 만들어 본 맥용 지니 플레이어.</title>
      <link>https://youngkyu.tistory.com/21</link>
      <description>&lt;en-note lang=&quot;v2&quot; style=&quot;line-height: 1.6; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;&quot;&gt;&lt;del style=&quot;position:relative;display:block&quot;&gt;&lt;a href=&quot;http://marxi.co/#/?provider=evernote_int&amp;amp;amp;guid=93559599-a025-4f3f-b7e8-b4da9e67cac6&quot; style=&quot;position: absolute;color: #FFF;text-decoration: none;font-size: 12px;height: 25px;border-radius: 0;margin-top: -30px;right: 15px;background: rgba(0, 0, 0, 0);border-left: 10px solid #BB3A34;border-right: 10px solid #BB3A34;border-bottom: 5px solid rgba(0, 0, 0, 0);width: 0;&quot;&gt;&lt;/a&gt;&lt;/del&gt;&lt;/en-note&gt;&lt;en-note lang=&quot;v2&quot; style=&quot;line-height: 1.6; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;&quot;&gt;&lt;del style=&quot;position:relative;display:block&quot;&gt;&lt;a href=&quot;http://marxi.co/#/?provider=evernote_int&amp;amp;amp;guid=93559599-a025-4f3f-b7e8-b4da9e67cac6&quot; style=&quot;position: absolute;color: #FFF;text-decoration: none;font-size: 12px;height: 25px;border-radius: 0;margin-top: -30px;right: 15px;background: rgba(0, 0, 0, 0);border-left: 10px solid #BB3A34;border-right: 10px solid #BB3A34;border-bottom: 5px solid rgba(0, 0, 0, 0);width: 0;&quot;&gt;&lt;p&gt;&lt;span class=&quot;imageblock&quot; style=&quot;display: inline-block;   height: auto; max-width: 100%;&quot;&gt;&lt;a href=&quot;https://t1.daumcdn.net/cfile/tistory/224BA5335440FBF722&quot;&gt;&lt;img alt=&quot;&quot; src=&quot;https://i1.daumcdn.net/cfs.tistory/v/0/blog/image/extension/zip.gif&quot; style=&quot;vertical-align: middle;&quot; onerror=&quot;this.onerror=null; this.src='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png'; this.srcset='//t1.daumcdn.net/tistory_admin/static/images/no-image-v1.png';&quot;/&gt;GeniePlayer.zip&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;/a&gt;&lt;/del&gt;&lt;div style=&quot;line-height: 1.6; &quot;&gt;
&lt;h1 style=&quot;font-size: 36px; margin: 0.67em 0;font-weight: bold; line-height: 1.1; color: inherit; margin-top: 0px; margin-bottom: 20px;&quot;&gt;맥용 지니 플레이어.&lt;/h1&gt;
&lt;hr style=&quot;-moz-box-sizing: content-box; box-sizing: content-box; height: 0; line-height: 1.6; margin-top: 20px; margin-bottom: 20px; border: 0; border-top: 1px solid rgba(102, 128, 153, 0.15);&quot;&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;/p&gt;
&lt;p style=&quot;text-align: center; clear: none; float: none;&quot;&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot;text-align: center; clear: none; float: none;&quot;&gt;&lt;span class=&quot;imageblock&quot; style=&quot;display: inline-block; width: 599px;  height: auto; max-width: 100%;&quot;&gt;&lt;img src=&quot;https://t1.daumcdn.net/cfile/tistory/2311844A5443E4512B&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Ft1.daumcdn.net%2Fcfile%2Ftistory%2F2311844A5443E4512B&quot; width=&quot;599&quot; height=&quot;760&quot; filename=&quot;httpcfile2.uf.tistory.comimage272187465440F7AB1ECC59.jpg&quot; filemime=&quot;image/jpeg&quot;/&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;KT 유저가 사용하면 데이터를 무료로 사용할 수 있도록 해줘서 지니를 사용중인데, 맥용 지니 플레이어가 없어 웹으로 사용해야 했었다. 이게 평소에는 큰 문제가 없었는데, 크롬을 사용하는 나는 가끔 모르고 cmd+q를 눌러서 모두다 꺼버리기 일 수 였고, 이게 엄청난 스트레스였다.&lt;/p&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;strong style=&quot;font-weight: bold; margin-top: 0px;&quot;&gt;좋아하는 음악을 흥얼 거리다 갑자기 꺼져버리니 빡칠 수 밖에!&lt;/strong&gt;&lt;/p&gt;
&lt;h4 style=&quot;font-weight: bold; line-height: 1.1; color: inherit; margin-top: 25px; margin-bottom: 15px; font-size: 18px;&quot;&gt;결국 간단하게라도 만들어서 내가 사용해야 했다.&lt;/h4&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;목표는 2가지.&lt;/p&gt;
&lt;ol style=&quot;margin-top: 0; margin-bottom: 10px; line-height: 1.6;&quot;&gt;
&lt;li style=&quot;line-height: 1.6; margin-top: 0px;&quot;&gt;업무에 전혀 방해되지 않아야 한다. 알아서 꺼지고 필요할 때 열여야 하고 만들기 쉬워야 한다.&lt;/li&gt;
&lt;li style=&quot;line-height: 1.6;&quot;&gt;지니를 50%이상 정상적으로 이용 가능해야 한다.&lt;/li&gt;
&lt;/ol&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;서버 백엔드 개발을 해온터라 네이티브 클라이언트 개발은 처음이었고, 더욱이 Objective C는 생소하기 짝이 없었다.&lt;/p&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;그래서 내가 그나마 해왔던 자바를 가지고 어찌 만들 수 있는 방법을 찾던 중 자바FX를 알게 되었다. 웹뷰만 띄워서 지니 모바일 페이지를 보여주면 모든게 오케이리라 생각하며 자바 FX를 가지고 만들기 시작했고 첫 버전이 그렇게 완성되었다.&lt;/p&gt;
&lt;h4 style=&quot;font-weight: bold; line-height: 1.1; color: inherit; margin-top: 25px; margin-bottom: 15px; font-size: 18px;&quot;&gt;그런데 문제가 발생했다.&lt;/h4&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;이상하게도 내가 만든 지니 플레이어를 사용하기 시작하면서 부터 맥이 자주 다운되기 시작했다. 2번째쯤 다운되서 컴퓨터를 강제종료하게되자 원인을 찾기 시작했고 가장 의심스러운 후보인 나의 지니 플레이어를 검사하던 중, 메모리 누수가 엄청나게 일어난다는 사실을 깨닳았다. 거의 노래 1곡당 5메가 이상씩 메모리를 더 점유하고 있었고, 1G를 넘게 먹는 순간도 있었다. 구글링을 해보니 이게 자바FX의 웹뷰 버그인 듯 했다. 결국 방향을 바꿨다. Objective C로 짜자.&lt;/p&gt;
&lt;h4 style=&quot; font-weight: bold; line-height: 1.1; color: inherit; margin-top: 25px; margin-bottom: 15px; font-size: 18px;&quot;&gt;그렇게 Objective C를 얕게 공부하기 시작.&lt;/h4&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;꽤 얼마되지 않아 익숙해졌고 약간 다른 문법을 가졌을 뿐 생각보다 쉬웠다. 게다가 XCODE가 너무 좋아서 서브라임텍스트나 이클립스, 파이참등을 사용하던 나는 거의 신세계 수준이었다. (아직 얼마 안써서 그런가..) 사실 안드로이드를 조금 해봤었는데 이거 뭐 XCODE와 애플이 지원하는 거에 비하면 정말 ADT는 쓰레기임에 틀림없었다. 아무튼 왜 애플 앱들이 그렇게 안드로이드보다 좋은지 알게되는 순간이었다. XCODE가 이렇게 탄탄하니..&lt;/p&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;아무튼 2시간정도를 고군분투한 끝에 간단한 첫번째 버전이 완성되었다.&lt;/p&gt;
&lt;h4 style=&quot;inherit; font-weight: bold; line-height: 1.1; color: inherit; margin-top: 25px; margin-bottom: 15px; font-size: 18px;&quot;&gt;아주 간편하다. 지니가 제공하지 않는 건 제공하지 못했다.&lt;/h4&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;자동으로 포커스를 잃으면 윈도우 창이 숨는다. 그리고 독바에서 클릭을 하면 다시 윈도우 창이 뜬다. 메모리도 그나마 자바로 짰을때 보다는 적게먹는 편이고(웹뷰는 원래 꽤 먹는듯하다.) 누수도 없다.&lt;/p&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;몇가지 문제(?)는 존재하긴한다. 먼저 자동로그인이 안되고(지니가 제공하지 않는다.), 쿠키유지를 하지 않아서(이건 지니가 재생목록을 쿠키로 유지해서 벌어지는 문제다.. 왜 쿠키로 하지..) 재생목록이 계속 갱신된다. 물론 맥 특성상 자주 끄지않기때문에 플레이어를 종료하지 않는다면 계속 유지될 것들이라 크게 개의치는 않는다.&lt;/p&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;필요한 사람이 있을 까봐 여기에 올린다. 가져다가 유용히 쓰길!&lt;/p&gt;
&lt;/div&gt;
&lt;center style=&quot;display:none&quot;&gt;%23%uB9E5%uC6A9%20%uC9C0%uB2C8%20%uD50C%uB808%uC774%uC5B4.%0A----%0A%0A%21%5BAlt%20text%5D%28http%3A//cfile2.uf.tistory.com/image/272187465440F7AB1ECC59%29%0A%0AKT%20%uC720%uC800%uAC00%20%uC0AC%uC6A9%uD558%uBA74%20%uB370%uC774%uD130%uB97C%20%uBB34%uB8CC%uB85C%20%uC0AC%uC6A9%uD560%20%uC218%20%uC788%uB3C4%uB85D%20%uD574%uC918%uC11C%20%uC9C0%uB2C8%uB97C%20%uC0AC%uC6A9%uC911%uC778%uB370%2C%20%uB9E5%uC6A9%20%uC9C0%uB2C8%20%uD50C%uB808%uC774%uC5B4%uAC00%20%uC5C6%uC5B4%20%uC6F9%uC73C%uB85C%20%uC0AC%uC6A9%uD574%uC57C%20%uD588%uC5C8%uB2E4.%20%uC774%uAC8C%20%uD3C9%uC18C%uC5D0%uB294%20%uD070%20%uBB38%uC81C%uAC00%20%uC5C6%uC5C8%uB294%uB370%2C%20%uD06C%uB86C%uC744%20%uC0AC%uC6A9%uD558%uB294%20%uB098%uB294%20%uAC00%uB054%20%uBAA8%uB974%uACE0%20cmd+q%uB97C%20%uB20C%uB7EC%uC11C%20%uBAA8%uB450%uB2E4%20%uAEBC%uBC84%uB9AC%uAE30%20%uC77C%20%uC218%20%uC600%uACE0%2C%20%uC774%uAC8C%20%uC5C4%uCCAD%uB09C%20%uC2A4%uD2B8%uB808%uC2A4%uC600%uB2E4.%0A%0A**%uC88B%uC544%uD558%uB294%20%uC74C%uC545%uC744%20%uD765%uC5BC%20%uAC70%uB9AC%uB2E4%20%uAC11%uC790%uAE30%20%uAEBC%uC838%uBC84%uB9AC%uB2C8%20%uBE61%uCE60%20%uC218%20%uBC16%uC5D0%21**%0A%0A%23%23%23%23%uACB0%uAD6D%20%uAC04%uB2E8%uD558%uAC8C%uB77C%uB3C4%20%uB9CC%uB4E4%uC5B4%uC11C%20%uB0B4%uAC00%20%uC0AC%uC6A9%uD574%uC57C%20%uD588%uB2E4.%0A%0A%uBAA9%uD45C%uB294%202%uAC00%uC9C0.%0A1.%20%uC5C5%uBB34%uC5D0%20%uC804%uD600%20%uBC29%uD574%uB418%uC9C0%20%uC54A%uC544%uC57C%20%uD55C%uB2E4.%20%uC54C%uC544%uC11C%20%uAEBC%uC9C0%uACE0%20%uD544%uC694%uD560%20%uB54C%20%uC5F4%uC5EC%uC57C%20%uD558%uACE0%20%uB9CC%uB4E4%uAE30%20%uC26C%uC6CC%uC57C%20%uD55C%uB2E4.%0A2.%20%uC9C0%uB2C8%uB97C%2050%25%uC774%uC0C1%20%uC815%uC0C1%uC801%uC73C%uB85C%20%uC774%uC6A9%20%uAC00%uB2A5%uD574%uC57C%20%uD55C%uB2E4.%0A%0A%uC11C%uBC84%20%uBC31%uC5D4%uB4DC%20%uAC1C%uBC1C%uC744%20%uD574%uC628%uD130%uB77C%20%uB124%uC774%uD2F0%uBE0C%20%uD074%uB77C%uC774%uC5B8%uD2B8%20%uAC1C%uBC1C%uC740%20%uCC98%uC74C%uC774%uC5C8%uACE0%2C%20%uB354%uC6B1%uC774%20Objective%20C%uB294%20%uC0DD%uC18C%uD558%uAE30%20%uC9DD%uC774%20%uC5C6%uC5C8%uB2E4.%0A%0A%uADF8%uB798%uC11C%20%uB0B4%uAC00%20%uADF8%uB098%uB9C8%20%uD574%uC654%uB358%20%uC790%uBC14%uB97C%20%uAC00%uC9C0%uACE0%20%uC5B4%uCC0C%20%uB9CC%uB4E4%20%uC218%20%uC788%uB294%20%uBC29%uBC95%uC744%20%uCC3E%uB358%20%uC911%20%uC790%uBC14FX%uB97C%20%uC54C%uAC8C%20%uB418%uC5C8%uB2E4.%20%uC6F9%uBDF0%uB9CC%20%uB744%uC6CC%uC11C%20%uC9C0%uB2C8%20%uBAA8%uBC14%uC77C%20%uD398%uC774%uC9C0%uB97C%20%uBCF4%uC5EC%uC8FC%uBA74%20%uBAA8%uB4E0%uAC8C%20%uC624%uCF00%uC774%uB9AC%uB77C%20%uC0DD%uAC01%uD558%uBA70%20%uC790%uBC14%20FX%uB97C%20%uAC00%uC9C0%uACE0%20%uB9CC%uB4E4%uAE30%20%uC2DC%uC791%uD588%uACE0%20%uCCAB%20%uBC84%uC804%uC774%20%uADF8%uB807%uAC8C%20%uC644%uC131%uB418%uC5C8%uB2E4.%0A%0A%23%23%23%23%uADF8%uB7F0%uB370%20%uBB38%uC81C%uAC00%20%uBC1C%uC0DD%uD588%uB2E4.%0A%0A%uC774%uC0C1%uD558%uAC8C%uB3C4%20%uB0B4%uAC00%20%uB9CC%uB4E0%20%uC9C0%uB2C8%20%uD50C%uB808%uC774%uC5B4%uB97C%20%uC0AC%uC6A9%uD558%uAE30%20%uC2DC%uC791%uD558%uBA74%uC11C%20%uBD80%uD130%20%uB9E5%uC774%20%uC790%uC8FC%20%uB2E4%uC6B4%uB418%uAE30%20%uC2DC%uC791%uD588%uB2E4.%202%uBC88%uC9F8%uCBE4%20%uB2E4%uC6B4%uB418%uC11C%20%uCEF4%uD4E8%uD130%uB97C%20%uAC15%uC81C%uC885%uB8CC%uD558%uAC8C%uB418%uC790%20%uC6D0%uC778%uC744%20%uCC3E%uAE30%20%uC2DC%uC791%uD588%uACE0%20%uAC00%uC7A5%20%uC758%uC2EC%uC2A4%uB7EC%uC6B4%20%uD6C4%uBCF4%uC778%20%uB098%uC758%20%uC9C0%uB2C8%20%uD50C%uB808%uC774%uC5B4%uB97C%20%uAC80%uC0AC%uD558%uB358%20%uC911%2C%20%uBA54%uBAA8%uB9AC%20%uB204%uC218%uAC00%20%uC5C4%uCCAD%uB098%uAC8C%20%uC77C%uC5B4%uB09C%uB2E4%uB294%20%uC0AC%uC2E4%uC744%20%uAE68%uB2F3%uC558%uB2E4.%20%uAC70%uC758%20%uB178%uB798%201%uACE1%uB2F9%205%uBA54%uAC00%20%uC774%uC0C1%uC529%20%uBA54%uBAA8%uB9AC%uB97C%20%uB354%20%uC810%uC720%uD558%uACE0%20%uC788%uC5C8%uACE0%2C%201G%uB97C%20%uB118%uAC8C%20%uBA39%uB294%20%uC21C%uAC04%uB3C4%20%uC788%uC5C8%uB2E4.%20%uAD6C%uAE00%uB9C1%uC744%20%uD574%uBCF4%uB2C8%20%uC774%uAC8C%20%uC790%uBC14FX%uC758%20%uC6F9%uBDF0%20%uBC84%uADF8%uC778%20%uB4EF%20%uD588%uB2E4.%20%uACB0%uAD6D%20%uBC29%uD5A5%uC744%20%uBC14%uAFE8%uB2E4.%20Objective%20C%uB85C%20%uC9DC%uC790.%0A%0A%23%23%23%23%uADF8%uB807%uAC8C%20Objective%20C%uB97C%20%uC595%uAC8C%20%uACF5%uBD80%uD558%uAE30%20%uC2DC%uC791.%0A%0A%uAF64%20%uC5BC%uB9C8%uB418%uC9C0%20%uC54A%uC544%20%uC775%uC219%uD574%uC84C%uACE0%20%uC57D%uAC04%20%uB2E4%uB978%20%uBB38%uBC95%uC744%20%uAC00%uC84C%uC744%20%uBFD0%20%uC0DD%uAC01%uBCF4%uB2E4%20%uC26C%uC6E0%uB2E4.%20%uAC8C%uB2E4%uAC00%20XCODE%uAC00%20%uB108%uBB34%20%uC88B%uC544%uC11C%20%uC11C%uBE0C%uB77C%uC784%uD14D%uC2A4%uD2B8%uB098%20%uC774%uD074%uB9BD%uC2A4%2C%20%uD30C%uC774%uCC38%uB4F1%uC744%20%uC0AC%uC6A9%uD558%uB358%20%uB098%uB294%20%uAC70%uC758%20%uC2E0%uC138%uACC4%20%uC218%uC900%uC774%uC5C8%uB2E4.%20%28%uC544%uC9C1%20%uC5BC%uB9C8%20%uC548%uC368%uC11C%20%uADF8%uB7F0%uAC00..%29%20%uC0AC%uC2E4%20%uC548%uB4DC%uB85C%uC774%uB4DC%uB97C%20%uC870%uAE08%20%uD574%uBD24%uC5C8%uB294%uB370%20%uC774%uAC70%20%uBB50%20XCODE%uC640%20%uC560%uD50C%uC774%20%uC9C0%uC6D0%uD558%uB294%20%uAC70%uC5D0%20%uBE44%uD558%uBA74%20%uC815%uB9D0%20ADT%uB294%20%uC4F0%uB808%uAE30%uC784%uC5D0%20%uD2C0%uB9BC%uC5C6%uC5C8%uB2E4.%20%uC544%uBB34%uD2BC%20%uC65C%20%uC560%uD50C%20%uC571%uB4E4%uC774%20%uADF8%uB807%uAC8C%20%uC548%uB4DC%uB85C%uC774%uB4DC%uBCF4%uB2E4%20%uC88B%uC740%uC9C0%20%uC54C%uAC8C%uB418%uB294%20%uC21C%uAC04%uC774%uC5C8%uB2E4.%20XCODE%uAC00%20%uC774%uB807%uAC8C%20%uD0C4%uD0C4%uD558%uB2C8..%0A%0A%uC544%uBB34%uD2BC%202%uC2DC%uAC04%uC815%uB3C4%uB97C%20%uACE0%uAD70%uBD84%uD22C%uD55C%20%uB05D%uC5D0%20%uAC04%uB2E8%uD55C%20%uCCAB%uBC88%uC9F8%20%uBC84%uC804%uC774%20%uC644%uC131%uB418%uC5C8%uB2E4.%0A%0A%23%23%23%23%uC544%uC8FC%20%uAC04%uD3B8%uD558%uB2E4.%20%uC9C0%uB2C8%uAC00%20%uC81C%uACF5%uD558%uC9C0%20%uC54A%uB294%20%uAC74%20%uC81C%uACF5%uD558%uC9C0%20%uBABB%uD588%uB2E4.%0A%0A%uC790%uB3D9%uC73C%uB85C%20%uD3EC%uCEE4%uC2A4%uB97C%20%uC783%uC73C%uBA74%20%uC708%uB3C4%uC6B0%20%uCC3D%uC774%20%uC228%uB294%uB2E4.%20%uADF8%uB9AC%uACE0%20%uB3C5%uBC14%uC5D0%uC11C%20%uD074%uB9AD%uC744%20%uD558%uBA74%20%uB2E4%uC2DC%20%uC708%uB3C4%uC6B0%20%uCC3D%uC774%20%uB72C%uB2E4.%20%uBA54%uBAA8%uB9AC%uB3C4%20%uADF8%uB098%uB9C8%20%uC790%uBC14%uB85C%20%uC9F0%uC744%uB54C%20%uBCF4%uB2E4%uB294%20%uC801%uAC8C%uBA39%uB294%20%uD3B8%uC774%uACE0%28%uC6F9%uBDF0%uB294%20%uC6D0%uB798%20%uAF64%20%uBA39%uB294%uB4EF%uD558%uB2E4.%29%20%uB204%uC218%uB3C4%20%uC5C6%uB2E4.%20%0A%0A%uBA87%uAC00%uC9C0%20%uBB38%uC81C%28%3F%29%uB294%20%uC874%uC7AC%uD558%uAE34%uD55C%uB2E4.%20%uBA3C%uC800%20%uC790%uB3D9%uB85C%uADF8%uC778%uC774%20%uC548%uB418%uACE0%2C%20%uCFE0%uD0A4%uC720%uC9C0%uB97C%20%uD558%uC9C0%20%uC54A%uC544%uC11C%20%uC7AC%uC0DD%uBAA9%uB85D%uC774%20%uACC4%uC18D%20%uAC31%uC2E0%uB41C%uB2E4.%20%uBB3C%uB860%20%uB9E5%20%uD2B9%uC131%uC0C1%20%uC790%uC8FC%20%uB044%uC9C0%uC54A%uAE30%uB54C%uBB38%uC5D0%20%uD50C%uB808%uC774%uC5B4%uB97C%20%uC885%uB8CC%uD558%uC9C0%20%uC54A%uB294%uB2E4%uBA74%20%uACC4%uC18D%20%uC720%uC9C0%uB420%20%uAC83%uB4E4%uC774%uB77C%20%uD06C%uAC8C%20%uAC1C%uC758%uCE58%uB294%20%uC54A%uB294%uB2E4.%0A%0A%uD544%uC694%uD55C%20%uC0AC%uB78C%uC774%20%uC788%uC744%20%uAE4C%uBD10%20%uC5EC%uAE30%uC5D0%20%uC62C%uB9B0%uB2E4.%20%uAC00%uC838%uB2E4%uAC00%20%uC720%uC6A9%uD788%20%uC4F0%uAE38%21&lt;/center&gt;
&lt;/en-note&gt;&lt;en-note lang=&quot;v2&quot; style=&quot;line-height: 1.6; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;&quot;&gt;
&lt;p style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;a href=&quot;http://dev.youngkyu.kr/attachment/cfile8.uf@224BA5335440FBF722691B.zip&quot; target=&quot;_blank&quot; class=&quot;tx-link&quot;&gt;지니플레이어 다운로드&lt;/a&gt;&lt;br /&gt;&lt;/en-note&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</description>
      <category>Culture</category>
      <category>Genie</category>
      <category>Mac</category>
      <category>MacBook</category>
      <category>맥용</category>
      <category>음악 플레이어</category>
      <category>지니</category>
      <category>지니 플레이어</category>
      <category>플레이어</category>
      <author>youngkyu.cho</author>
      <guid isPermaLink="true">https://youngkyu.tistory.com/21</guid>
      <comments>https://youngkyu.tistory.com/21#entry21comment</comments>
      <pubDate>Fri, 17 Oct 2014 20:23:36 +0900</pubDate>
    </item>
    <item>
      <title>RSS 피드 표준의 구조 ( 채널, 아이탬등 )</title>
      <link>https://youngkyu.tistory.com/18</link>
      <description>&lt;en-note lang=&quot;v2&quot; style=&quot;line-height:1.6;&quot;&gt;&lt;del style=&quot;position:relative;display:block&quot;&gt;&lt;a style=&quot;position: absolute;color: #FFF;text-decoration: none;font-size: 12px;height: 25px;border-radius: 0;margin-top: -30px;right: 15px;background: rgba(0, 0, 0, 0);border-left: 10px solid #BB3A34;border-right: 10px solid #BB3A34;border-bottom: 5px solid rgba(0, 0, 0, 0);width: 0;&quot; href=&quot;http://marxi.co/#/?provider=evernote_int&amp;amp;guid=e37e18f3-5140-4833-a852-2884dc1f389a&quot;&gt;&lt;/a&gt;&lt;/del&gt;&lt;div style=&quot;line-height: 1.6; font-family: Helvetica Neue, Arial, Hiragino Sans GB, STHeiti, Microsoft YaHei, WenQuanYi Micro Hei, SimSun, Song, sans-serif;&quot;&gt;
&lt;h1 style=&quot;font-size: 36px; margin: 0.67em 0; font-family: inherit; font-weight: bold; line-height: 1.1; color: inherit; margin-top: 0px; margin-bottom: 20px;&quot;&gt;RSS 표준의 구조&lt;/h1&gt;
&lt;blockquote style=&quot;padding: 15px 20px; margin: 0 0 15px 0; font-size: 14px; border-left: 5px solid #ddd; background-color: rgba(102, 128, 153, 0.05);&quot;&gt;
&lt;p style=&quot;margin: 0 0 10px; margin-bottom: 0; line-height: 1.6; font-size: 14px; font-weight: 300; white-space: pre-wrap; word-wrap: break-word; margin-top: 0px;&quot;&gt;RSS 피드는 크게 두가지로 구성된다. 채널과 아이템이 그것이다.&lt;br style=&quot;margin-top: 0px;&quot;&gt;블로그나 신문사는 채널이 되며, 포스팅과 기사는 아이템이 된다.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2 style=&quot;font-family: inherit; font-weight: bold; line-height: 1.1; color: inherit; margin-top: 30px; margin-bottom: 20px; font-size: 30px;&quot;&gt;Channel의 필수요소&lt;/h2&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;description : 채널의 개략적 설명&lt;br style=&quot;margin-top: 0px;&quot;&gt;link : 채널 사이트 URL&lt;br /&gt;title :  RSS 피드의 이름&lt;/p&gt;
&lt;h2 style=&quot;font-family: inherit; font-weight: bold; line-height: 1.1; color: inherit; margin-top: 30px; margin-bottom: 20px; font-size: 30px;&quot;&gt;Channel의 부가적 요소&lt;/h2&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;category : 채널의 카테고리&lt;br style=&quot;margin-top: 0px;&quot;&gt;cloud : cloud에 등록하면 채널의 내용이 업그레이드될 때마다 간단한 출판-구독 프로토콜에 따라 변경된 내용을 받아올 수 있다고 한다.&lt;br /&gt;copyright : 저작권 정보&lt;br /&gt;docs  : RSS 피드 관련 문서 주소&lt;br /&gt;generator : RSS  피드를 만든 프로그램의 이름&lt;br /&gt;image : 채널의 상징 이미지 파일의 주소&lt;br /&gt;language : 언어&lt;br /&gt;lastBuildDate : 내용 변경 시각&lt;br /&gt;managingEditor : RSS 관리자 이메일 주소&lt;br /&gt;pubDate : RSS  피드가 만들어진 날짜&lt;br /&gt;rating : 채널의 PICS 등급 &lt;a href=&quot;http://www.w3.org/PICS&quot; target=&quot;_blank&quot; style=&quot;background: transparent;&quot;&gt;http://www.w3.org/PICS&lt;/a&gt;&lt;br /&gt;skipDays : RSS 피드를 읽는 프로그램이 며칠만에 한번씩 변경내역을 확인하면 되는지 알려줌&lt;br /&gt;skipHours : RSS  피드를 읽는 프로그램이 몇시간에 한번씩 변경내역을 확인하면 되는지 알려줌&lt;br /&gt;textInput : 화면에 보여줄 텍스트 입력 필드를 지정&lt;br /&gt;ttl : TTL(Time to Live)은 내용을 업데이트 할때까지 얼마만큼의 시간이 남아있는지, 즉 내용을 몇 분까지 캐싱할 수 있는지를 뜻함.&lt;br /&gt;webmaster : 웹마스터의 이메일 주소&lt;/p&gt;
&lt;h2 style=&quot;font-family: inherit; font-weight: bold; line-height: 1.1; color: inherit; margin-top: 30px; margin-bottom: 20px; font-size: 30px;&quot;&gt;Item&lt;/h2&gt;
&lt;blockquote style=&quot;padding: 15px 20px; margin: 0 0 15px 0; font-size: 14px; border-left: 5px solid #ddd; background-color: rgba(102, 128, 153, 0.05);&quot;&gt;
&lt;p style=&quot;margin: 0 0 10px; margin-bottom: 0; line-height: 1.6; font-size: 14px; font-weight: 300; white-space: pre-wrap; word-wrap: break-word; margin-top: 0px;&quot;&gt;( 제목과 설명 둘중 하나는 반드시 존재해야한다. )&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p style=&quot;margin: 0 0 10px; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;author : 아이템을 작성한 작성자의 이메일 주소&lt;br style=&quot;margin-top: 0px;&quot;&gt;category : 아이템에 넣을 수 잇는 하나 이상의 분류&lt;br /&gt;comments : 해당 아이템에 대한 덧글을 볼 수 있는 페이지의 주소&lt;br /&gt;description : 아이템의 내용을 요약한 글&lt;br /&gt;enclosure : 아이템에 첨부된 미디어 파일을 가리킨다.&lt;br /&gt;guid : 아이템에 대한 유일한 아이디&lt;br /&gt;link : 아이템의 주소&lt;br /&gt;pubDate : 아이템을 작성한 날짜&lt;br /&gt;source : RSS 채널의 주소&lt;br /&gt;title : 아이템의 제목&lt;/p&gt;
&lt;/div&gt;
&lt;center style=&quot;display:none&quot;&gt;%23RSS%20%uD45C%uC900%uC758%20%uAD6C%uC870%0A%0A%3ERSS%20%uD53C%uB4DC%uB294%20%uD06C%uAC8C%20%uB450%uAC00%uC9C0%uB85C%20%uAD6C%uC131%uB41C%uB2E4.%20%uCC44%uB110%uACFC%20%uC544%uC774%uD15C%uC774%20%uADF8%uAC83%uC774%uB2E4.%0A%3E%uBE14%uB85C%uADF8%uB098%20%uC2E0%uBB38%uC0AC%uB294%20%uCC44%uB110%uC774%20%uB418%uBA70%2C%20%uD3EC%uC2A4%uD305%uACFC%20%uAE30%uC0AC%uB294%20%uC544%uC774%uD15C%uC774%20%uB41C%uB2E4.%0A%0A%23%23Channel%uC758%20%uD544%uC218%uC694%uC18C%0Adescription%20%3A%20%uCC44%uB110%uC758%20%uAC1C%uB7B5%uC801%20%uC124%uBA85%0Alink%20%3A%20%uCC44%uB110%20%uC0AC%uC774%uD2B8%20URL%0Atitle%20%3A%20%20RSS%20%uD53C%uB4DC%uC758%20%uC774%uB984%0A%0A%0A%23%23Channel%uC758%20%uBD80%uAC00%uC801%20%uC694%uC18C%0Acategory%20%3A%20%uCC44%uB110%uC758%20%uCE74%uD14C%uACE0%uB9AC%0Acloud%20%3A%20cloud%uC5D0%20%uB4F1%uB85D%uD558%uBA74%20%uCC44%uB110%uC758%20%uB0B4%uC6A9%uC774%20%uC5C5%uADF8%uB808%uC774%uB4DC%uB420%20%uB54C%uB9C8%uB2E4%20%uAC04%uB2E8%uD55C%20%uCD9C%uD310-%uAD6C%uB3C5%20%uD504%uB85C%uD1A0%uCF5C%uC5D0%20%uB530%uB77C%20%uBCC0%uACBD%uB41C%20%uB0B4%uC6A9%uC744%20%uBC1B%uC544%uC62C%20%uC218%20%uC788%uB2E4%uACE0%20%uD55C%uB2E4.%0Acopyright%20%3A%20%uC800%uC791%uAD8C%20%uC815%uBCF4%0Adocs%20%20%3A%20RSS%20%uD53C%uB4DC%20%uAD00%uB828%20%uBB38%uC11C%20%uC8FC%uC18C%0Agenerator%20%3A%20RSS%20%20%uD53C%uB4DC%uB97C%20%uB9CC%uB4E0%20%uD504%uB85C%uADF8%uB7A8%uC758%20%uC774%uB984%0Aimage%20%3A%20%uCC44%uB110%uC758%20%uC0C1%uC9D5%20%uC774%uBBF8%uC9C0%20%uD30C%uC77C%uC758%20%uC8FC%uC18C%0Alanguage%20%3A%20%uC5B8%uC5B4%0AlastBuildDate%20%3A%20%uB0B4%uC6A9%20%uBCC0%uACBD%20%uC2DC%uAC01%0AmanagingEditor%20%3A%20RSS%20%uAD00%uB9AC%uC790%20%uC774%uBA54%uC77C%20%uC8FC%uC18C%0ApubDate%20%3A%20RSS%20%20%uD53C%uB4DC%uAC00%20%uB9CC%uB4E4%uC5B4%uC9C4%20%uB0A0%uC9DC%0Arating%20%3A%20%uCC44%uB110%uC758%20PICS%20%uB4F1%uAE09%20http%3A//www.w3.org/PICS%0AskipDays%20%3A%20RSS%20%uD53C%uB4DC%uB97C%20%uC77D%uB294%20%uD504%uB85C%uADF8%uB7A8%uC774%20%uBA70%uCE60%uB9CC%uC5D0%20%uD55C%uBC88%uC529%20%uBCC0%uACBD%uB0B4%uC5ED%uC744%20%uD655%uC778%uD558%uBA74%20%uB418%uB294%uC9C0%20%uC54C%uB824%uC90C%0AskipHours%20%3A%20RSS%20%20%uD53C%uB4DC%uB97C%20%uC77D%uB294%20%uD504%uB85C%uADF8%uB7A8%uC774%20%uBA87%uC2DC%uAC04%uC5D0%20%uD55C%uBC88%uC529%20%uBCC0%uACBD%uB0B4%uC5ED%uC744%20%uD655%uC778%uD558%uBA74%20%uB418%uB294%uC9C0%20%uC54C%uB824%uC90C%0AtextInput%20%3A%20%uD654%uBA74%uC5D0%20%uBCF4%uC5EC%uC904%20%uD14D%uC2A4%uD2B8%20%uC785%uB825%20%uD544%uB4DC%uB97C%20%uC9C0%uC815%0Attl%20%3A%20TTL%28Time%20to%20Live%29%uC740%20%uB0B4%uC6A9%uC744%20%uC5C5%uB370%uC774%uD2B8%20%uD560%uB54C%uAE4C%uC9C0%20%uC5BC%uB9C8%uB9CC%uD07C%uC758%20%uC2DC%uAC04%uC774%20%uB0A8%uC544%uC788%uB294%uC9C0%2C%20%uC989%20%uB0B4%uC6A9%uC744%20%uBA87%20%uBD84%uAE4C%uC9C0%20%uCE90%uC2F1%uD560%20%uC218%20%uC788%uB294%uC9C0%uB97C%20%uB73B%uD568.%0Awebmaster%20%3A%20%uC6F9%uB9C8%uC2A4%uD130%uC758%20%uC774%uBA54%uC77C%20%uC8FC%uC18C%0A%0A%23%23Item%0A%3E%28%20%uC81C%uBAA9%uACFC%20%uC124%uBA85%20%uB458%uC911%20%uD558%uB098%uB294%20%uBC18%uB4DC%uC2DC%20%uC874%uC7AC%uD574%uC57C%uD55C%uB2E4.%20%29%0A%0Aauthor%20%3A%20%uC544%uC774%uD15C%uC744%20%uC791%uC131%uD55C%20%uC791%uC131%uC790%uC758%20%uC774%uBA54%uC77C%20%uC8FC%uC18C%0Acategory%20%3A%20%uC544%uC774%uD15C%uC5D0%20%uB123%uC744%20%uC218%20%uC787%uB294%20%uD558%uB098%20%uC774%uC0C1%uC758%20%uBD84%uB958%0Acomments%20%3A%20%uD574%uB2F9%20%uC544%uC774%uD15C%uC5D0%20%uB300%uD55C%20%uB367%uAE00%uC744%20%uBCFC%20%uC218%20%uC788%uB294%20%uD398%uC774%uC9C0%uC758%20%uC8FC%uC18C%0Adescription%20%3A%20%uC544%uC774%uD15C%uC758%20%uB0B4%uC6A9%uC744%20%uC694%uC57D%uD55C%20%uAE00%0Aenclosure%20%3A%20%uC544%uC774%uD15C%uC5D0%20%uCCA8%uBD80%uB41C%20%uBBF8%uB514%uC5B4%20%uD30C%uC77C%uC744%20%uAC00%uB9AC%uD0A8%uB2E4.%0Aguid%20%3A%20%uC544%uC774%uD15C%uC5D0%20%uB300%uD55C%20%uC720%uC77C%uD55C%20%uC544%uC774%uB514%0Alink%20%3A%20%uC544%uC774%uD15C%uC758%20%uC8FC%uC18C%0ApubDate%20%3A%20%uC544%uC774%uD15C%uC744%20%uC791%uC131%uD55C%20%uB0A0%uC9DC%0Asource%20%3A%20RSS%20%uCC44%uB110%uC758%20%uC8FC%uC18C%0Atitle%20%3A%20%uC544%uC774%uD15C%uC758%20%uC81C%uBAA9%0A&lt;/center&gt;
&lt;br /&gt;&lt;/en-note&gt;</description>
      <category>Engineering</category>
      <category>Feed</category>
      <category>RSS</category>
      <category>XML</category>
      <category>아이탬</category>
      <category>채널</category>
      <category>피드</category>
      <author>youngkyu.cho</author>
      <guid isPermaLink="true">https://youngkyu.tistory.com/18</guid>
      <comments>https://youngkyu.tistory.com/18#entry18comment</comments>
      <pubDate>Tue, 19 Aug 2014 16:37:02 +0900</pubDate>
    </item>
    <item>
      <title>Python MAC에 pypy 설치하기.</title>
      <link>https://youngkyu.tistory.com/17</link>
      <description>&lt;p style=&quot;text-align: center;&quot;&gt;&lt;span style=&quot;color: rgb(0, 0, 0); font-family: Dotum, 돋움; font-size: 10pt; line-height: 25.920000076293945px;&quot;&gt;PyPy is a&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference external&quot; href=&quot;http://speed.pypy.org/&quot; style=&quot;margin: 0px; padding: 0px; color: blue; text-decoration: underline; font-family: 'Lucida Grande', 'Lucida Sans Unicode', Optima, Verdana, sans-serif; font-size: 13px; line-height: 25.920000076293945px;&quot;&gt;&lt;span style=&quot;font-family: Dotum, 돋움; font-size: 10pt;&quot;&gt;fast&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: rgb(0, 0, 0); font-family: Dotum, 돋움; font-size: 10pt; line-height: 25.920000076293945px;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference external&quot; href=&quot;http://pypy.org/compat.html&quot; style=&quot;margin: 0px; padding: 0px; color: blue; text-decoration: underline; font-family: 'Lucida Grande', 'Lucida Sans Unicode', Optima, Verdana, sans-serif; font-size: 13px; line-height: 25.920000076293945px;&quot;&gt;&lt;span style=&quot;font-family: Dotum, 돋움; font-size: 10pt;&quot;&gt;compliant&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: rgb(0, 0, 0); font-family: Dotum, 돋움; font-size: 10pt; line-height: 25.920000076293945px;&quot;&gt;&amp;nbsp;alternative implementation of the&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;reference external&quot; href=&quot;http://python.org/&quot; style=&quot;margin: 0px; padding: 0px; color: blue; text-decoration: underline; font-family: 'Lucida Grande', 'Lucida Sans Unicode', Optima, Verdana, sans-serif; font-size: 13px; line-height: 25.920000076293945px;&quot;&gt;&lt;span style=&quot;font-family: Dotum, 돋움; font-size: 10pt;&quot;&gt;Python&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: rgb(0, 0, 0); font-family: Dotum, 돋움; font-size: 10pt; line-height: 25.920000076293945px;&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: Dotum, 돋움;&quot;&gt;&amp;nbsp;language&lt;/span&gt;&lt;span style=&quot;font-size: 10pt; font-family: Dotum, 돋움;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;color: rgb(0, 0, 0); font-family: 'Lucida Grande', 'Lucida Sans Unicode', Optima, Verdana, sans-serif; font-size: 13px; line-height: 25.920000076293945px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;font color=&quot;#000000&quot; face=&quot;Lucida Grande, Lucida Sans Unicode, Optima, Verdana, sans-serif&quot; size=&quot;2&quot;&gt;&lt;span style=&quot;line-height: 25.920000076293945px; font-family: Dotum, 돋움; font-size: 10pt;&quot;&gt;파이파이(pypy)는 파이썬으로 만들어진 파이썬 구현이다.&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font color=&quot;#000000&quot; face=&quot;Lucida Grande, Lucida Sans Unicode, Optima, Verdana, sans-serif&quot; size=&quot;2&quot;&gt;&lt;span style=&quot;line-height: 25.920000076293945px; font-family: Dotum, 돋움; font-size: 10pt;&quot;&gt;기존의 파이썬 구현인 CPython보다 매우 빠른 속도를 보인다.&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font color=&quot;#000000&quot; face=&quot;Lucida Grande, Lucida Sans Unicode, Optima, Verdana, sans-serif&quot; size=&quot;2&quot;&gt;&lt;span style=&quot;line-height: 25.920000076293945px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&lt;font color=&quot;#000000&quot; face=&quot;Lucida Grande, Lucida Sans Unicode, Optima, Verdana, sans-serif&quot; size=&quot;2&quot;&gt;&lt;span style=&quot;line-height: 25.920000076293945px;&quot;&gt;&lt;a href=&quot;https://mirror.enha.kr/wiki/PyPy&quot; target=&quot;_blank&quot; class=&quot;tx-link&quot;&gt;&lt;span style=&quot;font-family: Dotum, 돋움; font-size: 10pt;&quot;&gt;https://mirror.enha.kr/wiki/PyPy&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font color=&quot;#000000&quot; face=&quot;Lucida Grande, Lucida Sans Unicode, Optima, Verdana, sans-serif&quot; size=&quot;2&quot;&gt;&lt;span style=&quot;line-height: 25.920000076293945px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: Dotum, 돋움; font-size: 10pt;&quot;&gt;자세한 내용은 위의 URL을 통하여 확인할 수 있다.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: Dotum, 돋움; font-size: 10pt;&quot;&gt;당연하게도&amp;nbsp;pypy를 사용하기 위해서는 pypy를 먼저 다운로드 해야한다.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;font color=&quot;#000000&quot; face=&quot;Lucida Grande, Lucida Sans Unicode, Optima, Verdana, sans-serif&quot; size=&quot;2&quot;&gt;&lt;span style=&quot;line-height: 25.920000076293945px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&lt;font color=&quot;#000000&quot; face=&quot;Lucida Grande, Lucida Sans Unicode, Optima, Verdana, sans-serif&quot; size=&quot;2&quot;&gt;&lt;span style=&quot;line-height: 25.920000076293945px;&quot;&gt;&lt;a href=&quot;http://pypy.org/download.html&quot; target=&quot;_blank&quot; class=&quot;tx-link&quot;&gt;&lt;span style=&quot;font-family: Dotum, 돋움; font-size: 10pt;&quot;&gt;http://pypy.org/download.html&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font color=&quot;#000000&quot; face=&quot;Lucida Grande, Lucida Sans Unicode, Optima, Verdana, sans-serif&quot; size=&quot;2&quot;&gt;&lt;span style=&quot;line-height: 25.920000076293945px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font color=&quot;#000000&quot; face=&quot;Lucida Grande, Lucida Sans Unicode, Optima, Verdana, sans-serif&quot; size=&quot;2&quot;&gt;&lt;span style=&quot;line-height: 25.920000076293945px; font-family: Dotum, 돋움; font-size: 10pt;&quot;&gt;위의 URL을 통해 다운로드 받을 수 있다. pypy는 일반적으로 언급되는 설치라는 과정을 거치지 않고 바로 실행시킬 수 있다. 그러나 약간의 손을 봐서 일반 python처럼 사용할 수 있도록 설정해줄 것들이 있다.&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font color=&quot;#000000&quot; face=&quot;Lucida Grande, Lucida Sans Unicode, Optima, Verdana, sans-serif&quot; size=&quot;2&quot;&gt;&lt;span style=&quot;line-height: 25.920000076293945px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font color=&quot;#000000&quot; face=&quot;Lucida Grande, Lucida Sans Unicode, Optima, Verdana, sans-serif&quot; size=&quot;2&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;/p&gt;&lt;p style=&quot;text-align: center; clear: none; float: none;&quot;&gt;&lt;span class=&quot;imageblock&quot; style=&quot;display: inline-block; width: 710px;  height: auto; max-width: 100%;&quot;&gt;&lt;img src=&quot;https://t1.daumcdn.net/cfile/tistory/225FC94953C8C97F13&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Ft1.daumcdn.net%2Fcfile%2Ftistory%2F225FC94953C8C97F13&quot; width=&quot;710&quot; height=&quot;423&quot; filename=&quot;스크린샷 2014-07-18 오후 4.13.59.png&quot; filemime=&quot;image/jpeg&quot;/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: Dotum, 돋움; font-size: 10pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: Dotum, 돋움; font-size: 10pt;&quot;&gt;다운받은 압축 파일의 압축을 풀고 열면, bin이란 디렉토리 안에 pypy를 볼 수 있다.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: Dotum, 돋움; font-size: 10pt;&quot;&gt;위의 사진에는 다른 것들도 나와있지만 초기엔 pypy파일&amp;nbsp;외에 pip등등 다른 것들은&amp;nbsp;없다.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: Dotum, 돋움; font-size: 10pt;&quot;&gt;즉 pypy하나만 있을 것이다.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;gp&quot; style=&quot;box-sizing: border-box; color: rgb(85, 85, 85); font-family: Dotum, 돋움; font-size: 10pt; background-color: transparent;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-left: 2em;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;box-sizing: border-box; color: rgb(255, 255, 255); font-family: 'Courier New'; font-size: 10pt; background-color: rgb(0, 153, 153);&quot;&gt;$&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 255, 255); font-family: 'Courier New'; font-size: 10pt; background-color: rgb(0, 153, 153);&quot;&gt; ./pypy&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: Dotum, 돋움; font-size: 10pt;&quot;&gt;라고 쳐서 terminal에서&amp;nbsp;실행 시켜보라.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: Dotum, 돋움; font-size: 10pt;&quot;&gt;이후 이것을 global하게 접근하기 위해서(즉 아무곳에서나 terminal명령어로 실행시키기 위해서) 2가지 방법을 우리는 사용 할 수 있다.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: Dotum, 돋움; font-size: 10pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: Dotum, 돋움; font-size: 10pt;&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: Dotum, 돋움;&quot;&gt;첫번째 방법은,&lt;/span&gt;&lt;span style=&quot;font-size: 10pt; font-family: Dotum, 돋움;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: Dotum, 돋움; font-size: 10pt;&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: Dotum, 돋움;&quot;&gt;해당 폴더의 pypy를&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: 10pt; font-family: Dotum, 돋움;&quot;&gt;환경변수로&lt;/span&gt;&lt;span style=&quot;font-size: 10pt; font-family: Dotum, 돋움;&quot;&gt;&amp;nbsp;등록하여 사용하는 방법.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: Dotum, 돋움; font-size: 10pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: Dotum, 돋움; font-size: 10pt;&quot;&gt;두번째 방법은&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: Dotum, 돋움; font-size: 10pt;&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: Dotum, 돋움;&quot;&gt;pypy의 바로가기(Symbolic link&lt;/span&gt;&lt;span style=&quot;font-size: 10pt; font-family: Dotum, 돋움;&quot;&gt;)를 만들어 직접 os의 명령 프로그램들이 모인 bin(/usr/local/bin&lt;/span&gt;&lt;span style=&quot;font-size: 10pt; font-family: Dotum, 돋움;&quot;&gt;)에 등록하여&lt;/span&gt;&lt;span style=&quot;font-size: 10pt; font-family: Dotum, 돋움;&quot;&gt;&amp;nbsp;해당 파일에 접근 할 수 있도록 하는 방법이 있다.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: Dotum, 돋움; font-size: 10pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family: Dotum, 돋움; font-size: 10pt;&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: Dotum, 돋움;&quot;&gt;위의 디렉토리에 보이는&lt;/span&gt;&lt;span style=&quot;font-size: 10pt; font-family: Dotum, 돋움;&quot;&gt;&amp;nbsp;pypy를 바로 bin에 넣지 않는 이유는, pypy를이동할 시&lt;/span&gt;&lt;span style=&quot;font-size: 10pt; font-family: Dotum, 돋움;&quot;&gt;&amp;nbsp;pypy가 실행할 때&lt;/span&gt;&lt;span style=&quot;font-size: 10pt; font-family: Dotum, 돋움;&quot;&gt;&amp;nbsp;필요로 하는 라이브러리나 모듈을 pypy가&lt;/span&gt;&lt;span style=&quot;font-size: 10pt; font-family: Dotum, 돋움;&quot;&gt;&amp;nbsp;어디있는지 몰라 찾을 수 없게&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: 10pt; font-family: Dotum, 돋움;&quot;&gt;되어버리기 때문이다.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;font face=&quot;Dotum, 돋움&quot; size=&quot;2&quot;&gt;&lt;span style=&quot;line-height: 20px; font-size: 10pt; font-family: Dotum, 돋움;&quot;&gt;환경변수를 등록하는 것 보다는 바로가기로 처리하는 게 더 간편하고 정리가 쉬워 필자는 두번째 방법으로 처리했다.&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font face=&quot;Dotum, 돋움&quot; size=&quot;2&quot;&gt;&lt;span style=&quot;line-height: 20px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;&lt;p style=&quot;margin-left: 2em;&quot;&gt;&lt;span style=&quot;font-family: 'Courier New'; font-size: 10pt; line-height: 20px; color: rgb(255, 255, 255); background-color: rgb(0, 153, 153);&quot;&gt;$ &lt;/span&gt;&lt;span style=&quot;font-size: 10pt; font-family: 'Courier New'; color: rgb(255, 255, 255); background-color: rgb(0, 153, 153);&quot;&gt;cd /usr/local/bin&lt;/span&gt;&lt;span style=&quot;line-height: 20px; font-family: 'Courier New'; font-size: 10pt; color: rgb(255, 255, 255); background-color: rgb(0, 153, 153);&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-left: 2em;&quot;&gt;&lt;font face=&quot;Dotum, 돋움&quot; size=&quot;2&quot;&gt;&lt;span style=&quot;line-height: 20px; font-size: 10pt; font-family: 'Courier New'; color: rgb(255, 255, 255); background-color: rgb(0, 153, 153);&quot;&gt;$&amp;nbsp;&lt;/span&gt;&lt;/font&gt;&lt;span style=&quot;font-size: 10pt; line-height: 1.5; font-family: 'Courier New'; color: rgb(255, 255, 255); background-color: rgb(0, 153, 153);&quot;&gt;sudo ln -s ~/pypy-2.3.1-osx64/bin/pypy pypy&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 10pt; font-family: Dotum, 돋움;&quot;&gt;먼저 /usr/local/bin로 디렉토리를 바꾼다. 그곳에서 위 명령어를 통하여 바로가기를 만든다. 이때 주의할 점은&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: 9pt; line-height: 1.5; background-color: transparent;&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: Dotum, 돋움;&quot;&gt;~/pypy-2.3.1-osx64/bin/pypy에 자신&lt;/span&gt;&lt;span style=&quot;font-size: 10pt; font-family: Dotum, 돋움;&quot;&gt;의 컴퓨터의 pypy가 있는&lt;/span&gt;&lt;span style=&quot;font-size: 10pt; font-family: Dotum, 돋움;&quot;&gt;&amp;nbsp;경로를 적어야 한다는 것! 그대로 따라치면 안된다.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 9pt; line-height: 1.5; background-color: transparent;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 10pt; line-height: 1.5; font-family: Dotum, 돋움; background-color: transparent;&quot;&gt;이렇게 설치하고 나면,&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 9pt; line-height: 1.5; background-color: transparent;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-left: 2em;&quot;&gt;&lt;span style=&quot;font-size: 10pt; line-height: 1.5; font-family: 'Courier New'; color: rgb(255, 255, 255); background-color: rgb(0, 153, 153);&quot;&gt;$ pypy app.py&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 9pt; line-height: 1.5; background-color: transparent;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 9pt; line-height: 1.5; background-color: transparent;&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: Dotum, 돋움;&quot;&gt;라는 명령어로 파이썬 코드를 실행시킬 수 있다. 엄청난 속도를 보여준다. 실제로 웹 크롤러를 pypy로 돌렸더니 체감되는&lt;/span&gt;&lt;span style=&quot;font-size: 10pt; font-family: Dotum, 돋움;&quot;&gt;&amp;nbsp;속도가 훨씬 높아졌다.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 10pt; line-height: 1.5; font-family: Dotum, 돋움; background-color: transparent;&quot;&gt;그러나 이것으로 만족하면 안된다. pip와 easy_install이 필요하다.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span class=&quot;gp&quot; style=&quot;box-sizing: border-box; color: rgb(85, 85, 85); font-size: 10pt; font-family: Dotum, 돋움; background-color: transparent;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-left: 2em;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;box-sizing: border-box; color: rgb(255, 255, 255); font-size: 10pt; font-family: 'Courier New'; background-color: rgb(0, 153, 153);&quot;&gt;$&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 255, 255); font-size: 10pt; font-family: 'Courier New'; background-color: rgb(0, 153, 153);&quot;&gt; curl -O http://python-distribute.org/distribute_setup.py&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-left: 2em;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;box-sizing: border-box; color: rgb(255, 255, 255); font-size: 10pt; font-family: 'Courier New'; background-color: rgb(0, 153, 153);&quot;&gt;$&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 255, 255); font-size: 10pt; font-family: 'Courier New'; background-color: rgb(0, 153, 153);&quot;&gt; curl -O https://raw.githubusercontent.com/pypa/pip/master/contrib/get-pip.py&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-left: 2em;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;box-sizing: border-box; color: rgb(255, 255, 255); font-size: 10pt; font-family: 'Courier New'; background-color: rgb(0, 153, 153);&quot;&gt;$&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 255, 255); font-size: 10pt; font-family: 'Courier New'; background-color: rgb(0, 153, 153);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(255, 255, 255); font-size: 10pt; font-family: 'Courier New'; background-color: rgb(0, 153, 153);&quot;&gt;pypy distribute_setup.py&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-left: 2em;&quot;&gt;&lt;span class=&quot;gp&quot; style=&quot;box-sizing: border-box; color: rgb(255, 255, 255); font-size: 10pt; font-family: 'Courier New'; background-color: rgb(0, 153, 153);&quot;&gt;$&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 255, 255); font-size: 10pt; font-family: 'Courier New'; background-color: rgb(0, 153, 153);&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: rgb(255, 255, 255); font-size: 10pt; font-family: 'Courier New'; background-color: rgb(0, 153, 153);&quot;&gt;pypy get-pip.py&lt;/span&gt;&lt;/p&gt;&lt;span style=&quot;font-size: 10pt; font-family: Dotum, 돋움;&quot;&gt;
&lt;/span&gt;&lt;span style=&quot;font-size: 10pt; font-family: Dotum, 돋움;&quot;&gt;
&lt;/span&gt;&lt;span style=&quot;font-size: 10pt; font-family: Dotum, 돋움;&quot;&gt;
&lt;/span&gt;&lt;span style=&quot;font-size: 10pt; font-family: Dotum, 돋움;&quot;&gt;
&lt;/span&gt;&lt;span style=&quot;font-size: 10pt; font-family: Dotum, 돋움;&quot;&gt;
&lt;/span&gt;&lt;span style=&quot;font-size: 10pt; font-family: Dotum, 돋움;&quot;&gt;


&lt;/span&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 10pt; font-family: Dotum, 돋움;&quot;&gt;라고 친다. 디렉토리는 어디라도 좋다. 다 하고 나서 실제 pypy디렉토리(바로가기가 있는 곳 말고 진짜 pypy가 있는 곳; 예를들면&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: 10pt; line-height: 1.5; font-family: Dotum, 돋움; background-color: transparent;&quot;&gt;~/pypy-2.3.1-osx64/bin&lt;/span&gt;&lt;span style=&quot;font-size: 10pt; line-height: 1.5; font-family: Dotum, 돋움; background-color: transparent;&quot;&gt;)으로 가면&lt;/span&gt;&lt;span style=&quot;font-size: 9pt; line-height: 1.5; background-color: transparent;&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: Dotum, 돋움;&quot;&gt;, 제일 위의 사진 처럼 pip와 easy_install이 설치되어 있을 것이다. 아까와 똑같이 /usr/local/bin으로 간다. 그리고 바로가기를 생성한다. 이때 원래(컴퓨터에 이미 설치되어있는&lt;/span&gt;&lt;span style=&quot;font-size: 10pt; font-family: Dotum, 돋움;&quot;&gt;)의 python의 pip와 easy_install과 구분하기 위해 pypy-pip, pypy-easy_install이라고 지정한다.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 9pt; line-height: 1.5; background-color: transparent;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-left: 2em;&quot;&gt;&lt;span style=&quot;font-family: 'Courier New'; font-size: 10pt; line-height: 20px; color: rgb(255, 255, 255); background-color: rgb(0, 153, 153);&quot;&gt;$&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: 10pt; font-family: 'Courier New'; color: rgb(255, 255, 255); background-color: rgb(0, 153, 153);&quot;&gt;cd /usr/local/bin&lt;/span&gt;&lt;span style=&quot;line-height: 20px; font-family: 'Courier New'; font-size: 10pt; color: rgb(255, 255, 255); background-color: rgb(0, 153, 153);&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;p1&quot; style=&quot;margin-left: 2em;&quot;&gt;&lt;span style=&quot;font-size: 10pt; font-family: 'Courier New'; color: rgb(255, 255, 255); background-color: rgb(0, 153, 153);&quot;&gt;$ sudo ln -s ~/pypy-2.3.1-osx64/bin/pip pypy-pip&lt;/span&gt;&lt;/p&gt;&lt;p class=&quot;p1&quot; style=&quot;margin-left: 2em;&quot;&gt;&lt;span style=&quot;font-size: 10pt; line-height: 1.5; font-family: 'Courier New'; color: rgb(255, 255, 255); background-color: rgb(0, 153, 153);&quot;&gt;$ sudo ln -s ~/pypy-2.3.1-osx64/bin/easy_install pypy-easy_install&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;margin-left: 2em;&quot;&gt;&lt;span style=&quot;font-size: 9pt; line-height: 1.5; background-color: transparent;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 10pt; line-height: 1.5; font-family: Dotum, 돋움; background-color: transparent;&quot;&gt;마찬가지로 자신의 컴퓨터에 있는 경로를&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: 10pt; line-height: 1.5; font-family: Dotum, 돋움; background-color: transparent;&quot;&gt;~/pypy-2.3.1-osx64/bin/easy_install&lt;/span&gt;&lt;span style=&quot;font-size: 10pt; line-height: 1.5; font-family: Dotum, 돋움; background-color: transparent;&quot;&gt;여기에&lt;/span&gt;&lt;span style=&quot;font-size: 10pt; line-height: 1.5; font-family: Dotum, 돋움; background-color: transparent;&quot;&gt;&amp;nbsp;적어야 한다!&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 9pt; line-height: 1.5; background-color: transparent;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 10pt; line-height: 1.5; font-family: Dotum, 돋움; background-color: transparent;&quot;&gt;원래의 python과 100%호환된다. 뿐만 아니라 모든 것이 동일하게 지원되고, 속도는 빠르다!&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;margin-left: 2em;&quot;&gt;&lt;span style=&quot;font-size: 10pt; line-height: 1.5; font-family: 'Courier New'; color: rgb(255, 255, 255); background-color: rgb(0, 153, 153);&quot;&gt;$ python&amp;nbsp;app.py&lt;/span&gt;&lt;/p&gt;&lt;div&gt;&lt;p style=&quot;margin-left: 2em;&quot;&gt;&lt;span style=&quot;font-size: 10pt; line-height: 1.5; font-family: 'Courier New'; color: rgb(255, 255, 255); background-color: rgb(0, 153, 153);&quot;&gt;$ pypy app.py&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 10pt; line-height: 1.5; font-family: 'Courier New'; color: rgb(255, 255, 255); background-color: rgb(0, 153, 153);&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;p&gt;위의 명령어(python)를 아래(pypy)로만 바꾸면 된다.&lt;/p&gt;</description>
      <category>Develop</category>
      <category>CPython</category>
      <category>Cython</category>
      <category>Mac</category>
      <category>PyPy</category>
      <category>pypy 설치</category>
      <category>Python</category>
      <category>맥</category>
      <category>애플</category>
      <category>파이썬</category>
      <category>파이썬 성능</category>
      <category>파이파이</category>
      <author>youngkyu.cho</author>
      <guid isPermaLink="true">https://youngkyu.tistory.com/17</guid>
      <comments>https://youngkyu.tistory.com/17#entry17comment</comments>
      <pubDate>Fri, 18 Jul 2014 16:49:50 +0900</pubDate>
    </item>
    <item>
      <title>이제 윈도우폰도 쓸만하다. / 윈도우폰 필수 앱, 어플 추천 모음 / 반드시 받아야 할 윈도우폰 앱</title>
      <link>https://youngkyu.tistory.com/16</link>
      <description>&lt;p&gt;&lt;span style=&quot;font-size: 12pt; line-height: 1.5; background-color: transparent;&quot;&gt;&lt;b&gt;인트로&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;루미아 시리즈가 너무 예쁘게 생겨서 꼭 한번 써보고 싶었다. 그래서 구매한 루미아 1020. 5~6인치의 폰을 주로 사용하다보니 매우 작은 크기로 느껴졌다. 가장 걱정이었던 것은 사실 폰 자체보다는 앱!&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;다행히도 윈도우폰도 이제 쓸만한 것 같다. 루미아 1020을 구매하고 스토어의 이곳 저곳을 기웃거리며 얻은 결론이다. 안드로이드나 IOS에 버금갈 정도는 아닐지라도 충분히 필요한 대부분의 앱을 보유하고 있다.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;척박한(?) 윈도우폰 스토어에서 힘들게 찾은 진귀한 앱들을 소개하고자 한다.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: center; clear: none; float: none;&quot;&gt;&lt;span class=&quot;imageblock&quot; style=&quot;display: inline-block; width: 400px; width: 400px; height: 240px;; height: auto; max-width: 100%;&quot;&gt;&lt;img src=&quot;https://t1.daumcdn.net/cfile/tistory/272AB249538C00BE17&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Ft1.daumcdn.net%2Fcfile%2Ftistory%2F272AB249538C00BE17&quot; width=&quot;400&quot; height=&quot;240&quot; filename=&quot;1401636221015.jpg&quot; filemime=&quot;image/jpeg&quot; style=&quot;width: 400px; height: 240px;&quot;/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&quot;내 폰이지만 너무 예쁘다!&quot;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&lt;i&gt;&lt;u&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;참고로, 싹다 무료다.&lt;/span&gt;&lt;/u&gt;&lt;/i&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 12pt;&quot;&gt;나의 윈도우폰 홈화면. 정말 예쁘다.&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p style=&quot;text-align: center; clear: none; float: none;&quot;&gt;&lt;span class=&quot;imageblock&quot; style=&quot;display: inline-block; width: 710px;  height: auto; max-width: 100%;&quot;&gt;&lt;img src=&quot;https://t1.daumcdn.net/cfile/tistory/233B5844538C03591E&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Ft1.daumcdn.net%2Fcfile%2Ftistory%2F233B5844538C03591E&quot; width=&quot;710&quot; height=&quot;1183&quot; filename=&quot;wp_ss_20140602_0001.png&quot; filemime=&quot;image/jpeg&quot;/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: center; clear: none; float: none;&quot;&gt;&lt;span class=&quot;imageblock&quot; style=&quot;display: inline-block; width: 710px;  height: auto; max-width: 100%;&quot;&gt;&lt;img src=&quot;https://t1.daumcdn.net/cfile/tistory/2243CC44538C035B1E&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Ft1.daumcdn.net%2Fcfile%2Ftistory%2F2243CC44538C035B1E&quot; width=&quot;710&quot; height=&quot;1183&quot; filename=&quot;wp_ss_20140602_0006.png&quot; filemime=&quot;image/jpeg&quot;/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&lt;span style=&quot;font-size: 9pt; line-height: 1.5; background-color: transparent;&quot;&gt;&quot;아래의 앱 검색시, 아이콘을 참고하면 좋을 것 같다.&quot;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 12pt;&quot;&gt;버스와 지하철등 대중교통 정보 보기 - 대중 교통 허브&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p style=&quot;text-align: center; clear: none; float: none;&quot;&gt;&lt;span class=&quot;imageblock&quot; style=&quot;display: inline-block; width: 710px;  height: auto; max-width: 100%;&quot;&gt;&lt;img src=&quot;https://t1.daumcdn.net/cfile/tistory/21393D4D538C02452E&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Ft1.daumcdn.net%2Fcfile%2Ftistory%2F21393D4D538C02452E&quot; width=&quot;710&quot; height=&quot;1183&quot; filename=&quot;wp_ss_20140602_0005.png&quot; filemime=&quot;image/jpeg&quot;/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;말이 필요없는 애플리케이션이다. 경로 검색은 물론 버스 도착시간까지 정확하게 알려준다. 버스 정류장 별로 타일을 추가할 수 있는 점도 매력포인트! 윈폰 사용자라면, 대중교통을 타고 다닌다면 일단&amp;nbsp;다운로드하라!&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span style=&quot;font-size: 12pt;&quot;&gt;완전 무료 윈도우폰 음악,노래 앱 - MUSIC+ (&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;대문자&lt;/span&gt;라는 것에 유의)&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p style=&quot;text-align: center; clear: none; float: none;&quot;&gt;&lt;span class=&quot;imageblock&quot; style=&quot;display: inline-block; width: 710px;  height: auto; max-width: 100%;&quot;&gt;&lt;img src=&quot;https://t1.daumcdn.net/cfile/tistory/26344C4E538C02B82D&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Ft1.daumcdn.net%2Fcfile%2Ftistory%2F26344C4E538C02B82D&quot; width=&quot;710&quot; height=&quot;1183&quot; filename=&quot;wp_ss_20140602_0003.png&quot; filemime=&quot;image/jpeg&quot;/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;이 대문자 MUSIC+는 소문자 music+보다 조금 더 나은 UI와 UX를 제공한다. 모든 음악이 무료고, 한국음악도 왠만한 것은 다 있다. 음질도 좋고 다운로드 받아놓고 들을 수도 있어 데이터 또한 절약할 수 있다.&lt;/p&gt;&lt;p&gt;사실 윈도우폰에서 가장 빈약한 점을 꼽으라면 나는 멜론, 벅스등 국내 음악 서비스 업체들의 앱이 없다는 점이다. 벅스는 있는 줄 알고 구매했는데 후에 보니 벅스 앱이 없었다.. (으아!)&lt;/p&gt;&lt;p&gt;Mnet은 있긴 하지만 오류가 엄청나 쓸 수 없을 정도였고 그 속에서 찾은 보석같은 앱이다. 이걸 쓰고부터는 벅스를 해지해버렸다. 배신감이 장난이 아니었기 때문..&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 12pt;&quot;&gt;&lt;b&gt;유투브 앱, 단언컨대&amp;nbsp;이것보다 좋은 앱은 없다. - YouTube HD&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: center; clear: none; float: none;&quot;&gt;&lt;span class=&quot;imageblock&quot; style=&quot;display: inline-block; width: 710px;  height: auto; max-width: 100%;&quot;&gt;&lt;img src=&quot;https://t1.daumcdn.net/cfile/tistory/2213B14A538C046912&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Ft1.daumcdn.net%2Fcfile%2Ftistory%2F2213B14A538C046912&quot; width=&quot;710&quot; height=&quot;1183&quot; filename=&quot;wp_ss_20140602_0004.png&quot; filemime=&quot;image/jpeg&quot;/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;인터페이스가 정말 편하고 다운로드기능을 포함하고 있어 매우 유용하다. 뿐만 아니라 화질도 GOOD!! 다른 앱 좋다는 걸 다 써봤지만 이것보다 좋은 걸 찾지 못했다. 반드시 다운로드 받을 것! 구글 공식은 아닌 것 같지만 진짜 더 좋다.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span style=&quot;font-size: 12pt;&quot;&gt;구글 드라이브를 사용하는 분이라면, - Google Drive on WP&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p style=&quot;text-align: center; clear: none; float: none;&quot;&gt;&lt;span class=&quot;imageblock&quot; style=&quot;display: inline-block; width: 710px;  height: auto; max-width: 100%;&quot;&gt;&lt;img src=&quot;https://t1.daumcdn.net/cfile/tistory/2461044F538C04DA29&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Ft1.daumcdn.net%2Fcfile%2Ftistory%2F2461044F538C04DA29&quot; width=&quot;710&quot; height=&quot;1183&quot; filename=&quot;wp_ss_20140602_0007.png&quot; filemime=&quot;image/jpeg&quot;/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;구글 드라이브 공식앱이 윈도우폰에서는 지원되지 않는다. 그래서 다양한 앱을 다운받아 봤는데, 전부 브라우저 즐겨찾기와 다름없는 쓰레기들이었다. 그러던 중 진짜를 발견했는데 바로 이앱!&lt;/p&gt;&lt;p&gt;약간의 오류가 있긴 하지만 윈폰에서 이정도는 애교다.&amp;nbsp;사용이 편하고 여러 계정을 등록할 수 있어 매우 유용하다. 반드시 사용해 보시라!&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span style=&quot;font-size: 12pt;&quot;&gt;할말을 잃게 만드는 퀄리티의 날씨&amp;nbsp;앱 - 다원 날씨&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p style=&quot;text-align: center; clear: none; float: none;&quot;&gt;&lt;span class=&quot;imageblock&quot; style=&quot;display: inline-block; width: 710px;  height: auto; max-width: 100%;&quot;&gt;&lt;img src=&quot;https://t1.daumcdn.net/cfile/tistory/2577204A538C06FA10&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Ft1.daumcdn.net%2Fcfile%2Ftistory%2F2577204A538C06FA10&quot; width=&quot;710&quot; height=&quot;1183&quot; filename=&quot;wp_ss_20140602_0009.png&quot; filemime=&quot;image/jpeg&quot;/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;정말 자세한 날씨 정보를 알려준다. 안드로이드의 어떤 앱 보다 높은 퀄리티를 자랑한다.일기예보는 물론 주간날씨까지 알려주는 똑똑한 날씨앱 다원날씨. 반드시 다운 받을 것! 시작화면에 라이브 타일을 추가 할수 있는 점도 정말 마음에 든다.&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 9pt; line-height: 1.5; background-color: transparent;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 9pt; line-height: 1.5; background-color: transparent;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 9pt; line-height: 1.5; background-color: transparent;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 12pt;&quot;&gt;&lt;b&gt;마이크로소프트&amp;nbsp;제공&amp;nbsp;기본 뉴스앱 - 뉴스&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: center; clear: none; float: none;&quot;&gt;&lt;span class=&quot;imageblock&quot; style=&quot;display: inline-block; width: 710px;  height: auto; max-width: 100%;&quot;&gt;&lt;img src=&quot;https://t1.daumcdn.net/cfile/tistory/270B7C4D538C079915&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Ft1.daumcdn.net%2Fcfile%2Ftistory%2F270B7C4D538C079915&quot; width=&quot;710&quot; height=&quot;1183&quot; filename=&quot;wp_ss_20140602_0011.png&quot; filemime=&quot;image/jpeg&quot;/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 9pt; line-height: 1.5; background-color: transparent;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;정말 단순하지만 최고의 앱이다. 뉴스 볼 때 사용하는데 광고도 안봐도 되고 정말 만족스럽다. 반드시 다운받아 사용해 볼 것. 라이브타일을 지정할 수 있어 폰 꾸미기도 좋다.(라이브타일이 중요한 이슈기사를 보여주는 게 아니라서 딱히 유용치는 않기에 꾸미는 용도로만 사용중이다..)&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span style=&quot;font-size: 12pt;&quot;&gt;윈도우 폰에서도 웹툰앱이 된다는 것 - naver 웹툰&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p style=&quot;text-align: center; clear: none; float: none;&quot;&gt;&lt;span class=&quot;imageblock&quot; style=&quot;display: inline-block; width: 710px;  height: auto; max-width: 100%;&quot;&gt;&lt;img src=&quot;https://t1.daumcdn.net/cfile/tistory/2654754C538C08161A&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Ft1.daumcdn.net%2Fcfile%2Ftistory%2F2654754C538C08161A&quot; width=&quot;710&quot; height=&quot;1183&quot; filename=&quot;wp_ss_20140602_0010.png&quot; filemime=&quot;image/jpeg&quot;/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;나는 웹툰을 즐기지 않지만, 윈도우폰을 사려는분이나 혹시 모르는 분을 위해 올린다. 일반 안드로이드에서의 앱보다 더 높은 퀄리티를 자랑한다. UI 조작이 매우 부드럽고 빠르다. 웹툰을 즐긴다면 반드시 다운!&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span style=&quot;font-size: 12pt;&quot;&gt;SSH 클라이언트가 필요한 개발자라면 - The SSH Client&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p style=&quot;text-align: center; clear: none; float: none;&quot;&gt;&lt;span class=&quot;imageblock&quot; style=&quot;display: inline-block; width: 710px;  height: auto; max-width: 100%;&quot;&gt;&lt;img src=&quot;https://t1.daumcdn.net/cfile/tistory/255A1348538C096E18&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Ft1.daumcdn.net%2Fcfile%2Ftistory%2F255A1348538C096E18&quot; width=&quot;710&quot; height=&quot;426&quot; filename=&quot;wp_ss_20140602_0002.png&quot; filemime=&quot;image/jpeg&quot;/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: center; clear: none; float: none;&quot;&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;라즈베리파이 한마리를 집에서 키우고(?)&amp;nbsp;있는데 개인 파일 서버로 활용중인 이녀석이 가끔씩 죽거나 문제를 일으킨다. 그때마다 고쳐주기 위해 사용하는데 정말 만족스러운 앱이다. TAB을 어떻게 하는지 모르겠다는 점만 빼면 말이다.&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span style=&quot;font-size: 12pt;&quot;&gt;간단한 메모앱, 그러나 라이브 타일 메모기능까지 지원! - Sticky Notes HD&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p style=&quot;text-align: center; clear: none; float: none;&quot;&gt;&lt;span class=&quot;imageblock&quot; style=&quot;display: inline-block; width: 710px;  height: auto; max-width: 100%;&quot;&gt;&lt;img src=&quot;https://t1.daumcdn.net/cfile/tistory/223E7648538C09EB22&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Ft1.daumcdn.net%2Fcfile%2Ftistory%2F223E7648538C09EB22&quot; width=&quot;710&quot; height=&quot;1183&quot; filename=&quot;wp_ss_20140602_0012.png&quot; filemime=&quot;image/jpeg&quot;/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;단순하게 메모를 위한 앱인데, 라이브 타일을 지원해서 몇가지 중요한 이벤트를 기록하거나 사물함 자물쇠 비밀번호 정도를 기록할때 쓴다. 시작화면에 고정해두면 중요한 메모를 한눈에 볼수 있어 매우 유용하다. 강추 강추!&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span style=&quot;font-size: 12pt;&quot;&gt;아웃트로&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p style=&quot;text-align: center; clear: none; float: none;&quot;&gt;&lt;span class=&quot;imageblock&quot; style=&quot;display: inline-block; width: 710px;  height: auto; max-width: 100%;&quot;&gt;&lt;img src=&quot;https://t1.daumcdn.net/cfile/tistory/275E204D538C0AA73A&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Ft1.daumcdn.net%2Fcfile%2Ftistory%2F275E204D538C0AA73A&quot; width=&quot;710&quot; height=&quot;1183&quot; filename=&quot;wp_ss_20140602_0008.png&quot; filemime=&quot;image/jpeg&quot;/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;윈도우 폰에서 느끼는 불편함은 사실 거의 없다. 안드로이드를 오랫동안 사용하다 왔지만 필요한 모든 앱이 있었고, 몇가지 오류만 제외한다면 예쁜 UI와 MS의 최적화 덕분에 매우 만족스럽게 사용하고 있다.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&lt;i&gt;&lt;span style=&quot;font-size: 12pt;&quot;&gt;볼 때 마다 느끼지만 루미아 1020은 너무 예쁘다. 잠금 화면 까지도.&lt;/span&gt;&lt;/i&gt;&lt;/p&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&lt;i&gt;&lt;span style=&quot;font-size: 12pt;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/i&gt;&lt;/p&gt;</description>
      <category>Inspired</category>
      <category>WP</category>
      <category>구글 드라이브</category>
      <category>루미아</category>
      <category>루미아 1020</category>
      <category>애플리케이션</category>
      <category>앱 추천</category>
      <category>어플</category>
      <category>어플 추천</category>
      <category>어플리케이션</category>
      <category>윈도우폰</category>
      <category>윈도우폰 8</category>
      <category>윈폰 앱</category>
      <category>유투브 앱</category>
      <category>음악 앱</category>
      <category>필수 앱</category>
      <author>youngkyu.cho</author>
      <guid isPermaLink="true">https://youngkyu.tistory.com/16</guid>
      <comments>https://youngkyu.tistory.com/16#entry16comment</comments>
      <pubDate>Mon, 2 Jun 2014 14:32:20 +0900</pubDate>
    </item>
    <item>
      <title>리눅스 디바이스 드라이버 Linux device driver / 읽기 read() / 쓰기 write() / 열기 open() / 닫기 close() - 1</title>
      <link>https://youngkyu.tistory.com/15</link>
      <description>&lt;div&gt;&lt;span style=&quot;font-size: 12pt; line-height: 1.5; background-color: transparent;&quot;&gt;&lt;b&gt;인트로&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;p&gt;디바이스 드라이버에 관해 공부 중에 자료를 찾다보니 제대로 된 자료를 찾을 수 없었다. 쉬운 말로 이해되게 정리한 자료가 있었으면 했는데.. 그래서 직접 찾은 자료와 공부한 내용을 알기 쉽게 정리했다. 더 쉬운 설명에 대한 이야기나&amp;nbsp;잘못된&amp;nbsp;내용이 있다면 메일로 알려주거나 댓글을 달아 알려주길 바란다.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;span style=&quot;font-size: 12pt;&quot;&gt;리눅스에서의 디바이스&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;ul style=&quot;list-style-type: square;&quot;&gt;&lt;li&gt;리눅스에서 디바이스는 &lt;span style=&quot;color: rgb(255, 255, 255); background-color: rgb(0, 153, 153);&quot;&gt;특별한 하나의 파일&lt;/span&gt;처럼 취급된다. 따라서 &lt;span style=&quot;color: rgb(255, 255, 255); background-color: rgb(0, 153, 153);&quot;&gt;파일처럼 access가 가능&lt;/span&gt;하다.&lt;/li&gt;&lt;li&gt;/dev&amp;nbsp;에서 실제 파일처럼 확인이 가능하다.&lt;/li&gt;&lt;li&gt;각 디바이스들은&amp;nbsp;major number와 minor&amp;nbsp;number를 가지고 있다.&lt;/li&gt;&lt;li&gt;같은 디바이스들은 모두 같은 major&amp;nbsp;number를 가진다. 적합한 디바이스 드라이버를&amp;nbsp;연결 하기위해 사용한다.&amp;nbsp;&lt;/li&gt;&lt;li&gt;이렇게 뭉뚱그려 하나의 번호로 구분시&amp;nbsp;각각의 디바이스가 개별적으로 구분이 불가능하므로, minor&amp;nbsp;&lt;span style=&quot;font-size: 9pt; line-height: 1.5; background-color: transparent;&quot;&gt;number를 사용해 각각을 구분한다.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-size: 12pt;&quot;&gt;&lt;b&gt;디바이스 드라이버&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;ul style=&quot;list-style-type: square;&quot;&gt;&lt;li&gt;디바이스 드라이버란 디바이스를 구동시키는 프로그램을 의미한다.&lt;/li&gt;&lt;li&gt;그 종류에는 문자(character) 디바이스 드라이버, 블록(block) 디바이스 드라이버, 네트워크(network) 디바이스 드라이버가 있다.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;span style=&quot;font-size: 12pt;&quot;&gt;각각을 하나 하나 살펴보자.&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;ul style=&quot;list-style-type: square;&quot;&gt;&lt;li&gt;문자 디바이스 드라이버는 buffer cache를 사용하지 않으며 raw data를 제공한다. 예를 들어 Terminal, keyboard, sound card, scanner, printer 드라이버등이 있다.&lt;/li&gt;&lt;li&gt;블록 디바이스 드라이버는 random access가 가능하며 블록 단위로 입출력이 가능하다. 또한 file system에 의해 마운트되어 관리, 사용된다. 예를 들어 hard disk, RAM, CD-ROM등의 디바이스가&amp;nbsp;속한다.&lt;/li&gt;&lt;li&gt;네트워크 디바이스의 경우 위의 드라이버들이 사용하는 system call대신에 socket(), bind()등의 특별한 system call을 사용한다. 네트워크 다비이스는 통신을 통해 패킷을 송수신 할 수 있는 장치를 이야기하는데 Ethernet, ATM 등의 드라이버가 여기에 속한다.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;span style=&quot;font-size: 12pt;&quot;&gt;리눅스 디바이스 드라이버의 구조&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;간단하게 그림으로 나타내면 다음과 같다. 애플리케이션이 kernel이 제공하는 system call interface를 통해 Device driver를 제어하고 그 아래 하드웨어 계층의 Device를 제어한다. 실제로 애플리케이션이 사용하는 것은 system call interface다. 아래에 나올 함수들만 부르면 된다.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot;text-align: center; clear: none; float: none;&quot;&gt;&lt;span class=&quot;imageblock&quot; style=&quot;display: inline-block; width: 250px; width: 250px; height: 290px;; height: auto; max-width: 100%;&quot;&gt;&lt;img src=&quot;https://t1.daumcdn.net/cfile/tistory/267E13475385FA8B29&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Ft1.daumcdn.net%2Fcfile%2Ftistory%2F267E13475385FA8B29&quot; width=&quot;250&quot; height=&quot;290&quot; filename=&quot;그림1.png&quot; filemime=&quot;image/jpeg&quot; style=&quot;width: 250px; height: 290px;&quot;/&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;span style=&quot;font-size: 12pt;&quot;&gt;리눅스에서 디바이스 드라이버를&amp;nbsp;구현한다는 것.&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;ul style=&quot;list-style-type: square;&quot;&gt;&lt;li&gt;&lt;span style=&quot;font-size: 9pt; line-height: 1.5; background-color: transparent;&quot;&gt;각 디바이스들은 일반적인 파일과 유사한 인터페이스를 이용하여 관리된다.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;각 디바이스들은 실제로 파일형태로 존재하고 커널은 파일 operation을 이용하여 I/O를 수행하도록 인터페이스가 구성되어져 있다.&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;color: rgb(255, 255, 255); background-color: rgb(0, 153, 153);&quot;&gt;디바이스 드라이버를 구현한다는 것은 파일 operation&amp;nbsp;구조체에서 요구되는 기능들을 프로그래밍 한다는 것을 의미&lt;/span&gt;한다.&lt;/li&gt;&lt;li&gt;파일 operation&amp;nbsp;구조체는 파일 시스템을 통해 디바이스 드라이버와 프로그램을 연결 시켜주는 구조체이다.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;span style=&quot;font-size: 12pt;&quot;&gt;system call interface. (애플리케이션에서의 드라이버 실제 호출 함수)&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;다음과 같은 순서로 디바이스 드라이버를 이용하는&amp;nbsp;코드를&amp;nbsp;작성한다.&lt;/p&gt;
&lt;p&gt;여기서 나오는 함수들은 파일에서도 똑같이 사용한다. 왜냐하면 리눅스에서 디바이스들은 &lt;span style=&quot;color: rgb(255, 255, 255); background-color: rgb(0, 153, 153);&quot;&gt;일반적인 파일과 유사한 인터페이스를 사용&lt;/span&gt;하기 때문이다.&lt;/p&gt;&lt;ul style=&quot;list-style-type: disc;&quot;&gt;&lt;li&gt;1. open()을 이용하여 device driver file을 연다.&lt;/li&gt;&lt;li&gt;2.&amp;nbsp;write()를 이용하여 디바이스에 무엇인가 적어 디바이스를&amp;nbsp;제어한다.&lt;/li&gt;&lt;li&gt;3.&amp;nbsp;read()를 이용하여 디바이스에서 무엇인가 정보를 얻어온다.&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-size: 9pt; line-height: 1.5; background-color: transparent;&quot;&gt;4. close()를 이용하여 device driver file을 닫는다.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;당연하게도, 2번과 3번은 경우에 따라 둘 중 하나 혹은 둘 다&amp;nbsp;생략이 가능하다.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;p&gt;&lt;b style=&quot;font-size: 9pt; line-height: 1.5; background-color: transparent;&quot;&gt;&lt;span style=&quot;font-size: 12pt;&quot;&gt;이때, open() ?&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;파일 혹은 디바이스를&amp;nbsp;열기위해 사용한다. 열 때&amp;nbsp;다양한 옵션을&amp;nbsp;줄 수 있다.&amp;nbsp;&lt;span style=&quot;font-size: 9pt; line-height: 1.5; background-color: transparent;&quot;&gt;원래 C언어에서&amp;nbsp;파일을 열 때&amp;nbsp;fopen()이라는 표준함수를 제공한다. 이것은 C언어가 제공해주기에 조금 더 사용하기 쉽게 만들어져 있으며, open()에 비하여&amp;nbsp;portable하다. open()의 경우 리눅스의 system call이기 때문이다. fopen()도 내부적으로 결국은 open()을 호출하지만, 한겹 더 래핑되어 있어 타 운영체제에서도 사용할 수 있다.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;ul style=&quot;list-style-type: square;&quot;&gt;&lt;li&gt;&lt;i&gt;&lt;span style=&quot;font-size: 10pt;&quot;&gt;헤더&lt;/span&gt;&lt;/i&gt;&amp;nbsp;&lt;span style=&quot;background-color: transparent;&quot;&gt;:&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt; #include &amp;lt;&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;fcntl.h&lt;/span&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;ul style=&quot;list-style-type: square;&quot;&gt;&lt;li&gt;&lt;i&gt;&lt;span style=&quot;font-size: 10pt;&quot;&gt;형태&lt;/span&gt;&lt;/i&gt; :&amp;nbsp;int open (const char *FILENAME, intFLAGS) /&amp;nbsp;int open (const char *FILENAME, intFLAGS[, mode_t MODE])&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;ul style=&quot;list-style-type: square;&quot;&gt;&lt;li&gt;&lt;i&gt;&lt;span style=&quot;font-size: 10pt;&quot;&gt;옵션&lt;/span&gt;&lt;/i&gt; :&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;table class=&quot;txc-table&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot; style=&quot;width:100%;border:none;border-collapse:collapse;;font-family:돋움;font-size:12px&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;width: 673px; height: 24px; border: 1px solid rgb(204, 204, 204);&quot; colspan=&quot;2&quot; rowspan=&quot;1&quot;&gt;&lt;p&gt; 반드시 처음에 써주어야 하는 옵션&lt;/p&gt;&lt;/td&gt;

&lt;/tr&gt;
&lt;tr&gt;&lt;td style=&quot; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgb(204, 204, 204); border-right-width: 1px; border-right-style: solid; border-right-color: rgb(204, 204, 204); border-left-width: 1px; border-left-style: solid; border-left-color: rgb(204, 204, 204);&quot;&gt;&lt;p&gt;&amp;nbsp;O_RDONLY&lt;/p&gt;&lt;/td&gt;
&lt;td style=&quot;width: 523px; height: 24px; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgb(204, 204, 204); border-right-width: 1px; border-right-style: solid; border-right-color: rgb(204, 204, 204);&quot;&gt;&lt;p&gt;&amp;nbsp;ReaD only. (읽기만 하겠다.)&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;&lt;td style=&quot; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgb(204, 204, 204); border-right-width: 1px; border-right-style: solid; border-right-color: rgb(204, 204, 204); border-left-width: 1px; border-left-style: solid; border-left-color: rgb(204, 204, 204);&quot;&gt;&lt;p&gt;&amp;nbsp;O_WRONLY&lt;/p&gt;&lt;/td&gt;
&lt;td style=&quot;width: 523px; height: 24px; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgb(204, 204, 204); border-right-width: 1px; border-right-style: solid; border-right-color: rgb(204, 204, 204);&quot;&gt;&lt;p&gt;&amp;nbsp;WRite only. (쓰기만 하겠다.)&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;&lt;td style=&quot; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgb(204, 204, 204); border-right-width: 1px; border-right-style: solid; border-right-color: rgb(204, 204, 204); border-left-width: 1px; border-left-style: solid; border-left-color: rgb(204, 204, 204);&quot;&gt;&lt;p&gt;&amp;nbsp;O_RDWR&lt;/p&gt;&lt;/td&gt;
&lt;td style=&quot;width: 523px; height: 24px; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgb(204, 204, 204); border-right-width: 1px; border-right-style: solid; border-right-color: rgb(204, 204, 204);&quot;&gt;&lt;p&gt;ReaD와 WRite를 하겠다. (읽기도 하고 쓰기도 하겠다.)&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;&lt;td style=&quot;width: 673px; height: 24px; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgb(204, 204, 204); border-right-width: 1px; border-right-style: solid; border-right-color: rgb(204, 204, 204); border-left-width: 1px; border-left-style: solid; border-left-color: rgb(204, 204, 204);&quot; colspan=&quot;2&quot; rowspan=&quot;1&quot;&gt;&lt;p&gt;&amp;nbsp;기타 추가 가능한 옵션 (반드시 처음에 써주어야 하는 옵션&amp;nbsp;| ##여기에 들어갈 옵션##&amp;nbsp;) - '|'기호다.&lt;/p&gt;&lt;/td&gt;

&lt;/tr&gt;
&lt;tr&gt;&lt;td style=&quot; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgb(204, 204, 204); border-right-width: 1px; border-right-style: solid; border-right-color: rgb(204, 204, 204); border-left-width: 1px; border-left-style: solid; border-left-color: rgb(204, 204, 204);&quot;&gt;&lt;p&gt;&amp;nbsp;O_CREAT&lt;/p&gt;&lt;/td&gt;
&lt;td style=&quot;width: 523px; height: 24px; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgb(204, 204, 204); border-right-width: 1px; border-right-style: solid; border-right-color: rgb(204, 204, 204);&quot;&gt;&lt;p&gt;&amp;nbsp;해당 파일이 없을시 생성한다. 이 경우 생성한 파일이다 보니&amp;nbsp;접근 권한을 명시해 주어야 한다. 만약 파일이 현재 존재한다면 파일을 덮어쓴다. (참고로 오타가 아니라 실제로 CREAT까지다. E 없다.)&lt;/p&gt;
&lt;p&gt;&lt;span style=&quot;font-size: 9pt; line-height: 1.5; background-color: transparent;&quot;&gt;예 : open( &quot;jwmx&quot;, O_WRONLY | OCREAT, 0644);&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;&lt;td style=&quot; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgb(204, 204, 204); border-right-width: 1px; border-right-style: solid; border-right-color: rgb(204, 204, 204); border-left-width: 1px; border-left-style: solid; border-left-color: rgb(204, 204, 204);&quot;&gt;&lt;p&gt;&amp;nbsp;O_EXCL&lt;/p&gt;&lt;/td&gt;
&lt;td style=&quot;width: 523px; height: 24px; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgb(204, 204, 204); border-right-width: 1px; border-right-style: solid; border-right-color: rgb(204, 204, 204);&quot;&gt;&lt;p&gt;&amp;nbsp;O_CREAT때 함께 사용하면 파일이 존재할 시 -1을 반환하여 open 되지 않도록 막는다.&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;&lt;td style=&quot; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgb(204, 204, 204); border-right-width: 1px; border-right-style: solid; border-right-color: rgb(204, 204, 204); border-left-width: 1px; border-left-style: solid; border-left-color: rgb(204, 204, 204);&quot;&gt;&lt;p&gt;&amp;nbsp;O_TRUNC&lt;/p&gt;&lt;/td&gt;
&lt;td style=&quot;width: 523px; height: 24px; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgb(204, 204, 204); border-right-width: 1px; border-right-style: solid; border-right-color: rgb(204, 204, 204);&quot;&gt;&lt;p&gt;&amp;nbsp;기존의 파일 내용을 모두 삭제한다.&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;&lt;td style=&quot; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgb(204, 204, 204); border-right-width: 1px; border-right-style: solid; border-right-color: rgb(204, 204, 204); border-left-width: 1px; border-left-style: solid; border-left-color: rgb(204, 204, 204);&quot;&gt;&lt;p&gt;&amp;nbsp;O_APPEND&lt;/p&gt;&lt;/td&gt;
&lt;td style=&quot;width: 523px; height: 24px; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgb(204, 204, 204); border-right-width: 1px; border-right-style: solid; border-right-color: rgb(204, 204, 204);&quot;&gt;&lt;p&gt;&amp;nbsp;파일을 첨부모드로 연다. 파일 쓰기 포인터(마커)가&amp;nbsp;파일 끝에 위치한다.&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;&lt;td style=&quot; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgb(204, 204, 204); border-right-width: 1px; border-right-style: solid; border-right-color: rgb(204, 204, 204); border-left-width: 1px; border-left-style: solid; border-left-color: rgb(204, 204, 204);&quot;&gt;&lt;p&gt;&amp;nbsp;&lt;span style=&quot;font-size: 9pt; line-height: 1.5; background-color: transparent;&quot;&gt;O_NOCITTY&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;
&lt;td style=&quot;width: 523px; height: 24px; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgb(204, 204, 204); border-right-width: 1px; border-right-style: solid; border-right-color: rgb(204, 204, 204);&quot;&gt;&lt;p&gt;&amp;nbsp;파일을 열&amp;nbsp;process에 대해 device를 제어 터미널에 할당하지 말라는 옵션. device가 현재의 terminal을 제어하지 못하도록 한다. 이는 통신시에 &amp;lt;CTRL&amp;gt;+C 문자가 와서 프로그램이 종료되지 않을 수 있도록 해준다. (이 말이 무슨 말인지 몰라도 된다. 이 글을 읽는 대부분의 독자에게는 필요없는 옵션이다.)&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;&lt;td style=&quot; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgb(204, 204, 204); border-right-width: 1px; border-right-style: solid; border-right-color: rgb(204, 204, 204); border-left-width: 1px; border-left-style: solid; border-left-color: rgb(204, 204, 204);&quot;&gt;&lt;p&gt;&amp;nbsp;O_NONBLOCK&lt;/p&gt;&lt;/td&gt;
&lt;td style=&quot;width: 523px; height: 24px; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgb(204, 204, 204); border-right-width: 1px; border-right-style: solid; border-right-color: rgb(204, 204, 204);&quot;&gt;&lt;p&gt;&amp;nbsp;읽을 내용이 없을 때 기다리지 않고 바로 리턴한다.&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;&lt;td style=&quot; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgb(204, 204, 204); border-right-width: 1px; border-right-style: solid; border-right-color: rgb(204, 204, 204); border-left-width: 1px; border-left-style: solid; border-left-color: rgb(204, 204, 204);&quot;&gt;&lt;p&gt;&amp;nbsp;O_SYNC&lt;/p&gt;&lt;/td&gt;
&lt;td style=&quot;width: 523px; height: 24px; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgb(204, 204, 204); border-right-width: 1px; border-right-style: solid; border-right-color: rgb(204, 204, 204);&quot;&gt;&lt;p&gt;&amp;nbsp;쓰기시 쓰기가 실제로 끝날 때까지 기다린다. 쓰기가 완료되어야 리턴한다.&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;ul style=&quot;list-style-type: square;&quot;&gt;&lt;li&gt;&lt;i&gt;&lt;span style=&quot;font-size: 10pt;&quot;&gt;인수&lt;/span&gt;&lt;/i&gt; :&amp;nbsp;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;table class=&quot;txc-table&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot; style=&quot;width:100%;border:none;border-collapse:collapse;;font-family:돋움;font-size:12px&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot; border: 1px solid rgb(204, 204, 204);&quot;&gt;&lt;p&gt;&amp;nbsp;&lt;span style=&quot;font-size: 9pt; line-height: 1.5; background-color: transparent;&quot;&gt;char *FILENAME&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;
&lt;td style=&quot;width: 521px; height: 24px; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgb(204, 204, 204); border-right-width: 1px; border-right-style: solid; border-right-color: rgb(204, 204, 204); border-top-width: 1px; border-top-style: solid; border-top-color: rgb(204, 204, 204);&quot;&gt;&lt;p&gt;&amp;nbsp;&lt;span style=&quot;font-size: 9pt; line-height: 1.5; background-color: transparent;&quot;&gt;파일 이름&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;&lt;td style=&quot; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgb(204, 204, 204); border-right-width: 1px; border-right-style: solid; border-right-color: rgb(204, 204, 204); border-left-width: 1px; border-left-style: solid; border-left-color: rgb(204, 204, 204);&quot;&gt;&lt;p&gt;&amp;nbsp;&lt;span style=&quot;font-size: 9pt; line-height: 1.5; background-color: transparent;&quot;&gt;int FLAGS&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;
&lt;td style=&quot;width: 521px; height: 24px; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgb(204, 204, 204); border-right-width: 1px; border-right-style: solid; border-right-color: rgb(204, 204, 204);&quot;&gt;&lt;p&gt;&amp;nbsp;&lt;span style=&quot;font-size: 9pt; line-height: 1.5; background-color: transparent;&quot;&gt;옵션이 여기에 들어간다.&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;&lt;td style=&quot; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgb(204, 204, 204); border-right-width: 1px; border-right-style: solid; border-right-color: rgb(204, 204, 204); border-left-width: 1px; border-left-style: solid; border-left-color: rgb(204, 204, 204);&quot;&gt;&lt;p&gt;&amp;nbsp;&lt;span style=&quot;font-size: 9pt; line-height: 1.5; background-color: transparent;&quot;&gt;[, mode_t MODE]&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;
&lt;td style=&quot;width: 521px; height: 24px; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgb(204, 204, 204); border-right-width: 1px; border-right-style: solid; border-right-color: rgb(204, 204, 204);&quot;&gt;&lt;p&gt;&amp;nbsp;&lt;span style=&quot;font-size: 9pt; line-height: 1.5; background-color: transparent;&quot;&gt;O_CREAT 때&amp;nbsp;파일 접근 권한 표시&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;ul style=&quot;list-style-type: square;&quot;&gt;&lt;li&gt;&lt;span style=&quot;font-size: 9pt; line-height: 1.5; background-color: transparent;&quot;&gt;&lt;i&gt;&lt;span style=&quot;font-size: 10pt;&quot;&gt;반환값&lt;/span&gt;&lt;/i&gt; : int (열기 성공시 양수 반환 ==&amp;nbsp;파일&amp;nbsp;디스크립터 반환, 실패시 -1 반환)&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;span style=&quot;font-size: 9pt; line-height: 1.5; background-color: transparent;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;ul style=&quot;list-style-type: square;&quot;&gt;&lt;li&gt;&lt;span style=&quot;font-size: 9pt; line-height: 1.5; background-color: transparent;&quot;&gt;&lt;i&gt;&lt;span style=&quot;font-size: 10pt;&quot;&gt;참고&lt;/span&gt;&lt;/i&gt; : 파일 디스크립터란 파일 혹은 디바이스, 소켓등을 운영체제가 관리하기위해 필요로하는 정보를 가지고 있는 FCB(file control block)에 부여된&amp;nbsp;숫자를 가리킨다. 기본적으로 양의 정수로 부여된다. 일련번호 혹은 아이디라 생각하면 된다. 운영체제가 관리를 위해 정보를 가지고 있는 블록에 부여된 일련번호 혹은 아이디.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p style=&quot;text-align: right;&quot;&gt;&lt;span style=&quot;font-size: 8pt;&quot;&gt;-&amp;nbsp;&lt;a href=&quot;http://taesun1114.tistory.com/12&quot; target=&quot;_blank&quot; class=&quot;tx-link&quot;&gt;http://taesun1114.tistory.com/12&lt;/a&gt;&amp;nbsp;참조&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;text-align: right;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;ul style=&quot;list-style-type: square;&quot;&gt;&lt;li&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;i&gt;&lt;span style=&quot;font-size: 10pt;&quot;&gt;사용 예 &lt;/span&gt;&lt;/i&gt;:&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot;text-align: left;&quot;&gt;&lt;table class=&quot;txc-table&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot; style=&quot;width:100%;border:none;border-collapse:collapse;;font-family:돋움;font-size:12px&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;width:674;height:24;border-bottom:1px solid #ccc;border-right:1px solid #ccc;border-top:1px solid #ccc;border-left:1px solid #ccc;;&quot;&gt;&lt;p style=&quot;text-align: center;&quot;&gt;int fd = open( &quot;test1.txt&quot;, O_WRONLY | O_CREAT |&amp;nbsp;O_EXCL, 0644);&lt;/p&gt;
&lt;p style=&quot;text-align: center;&quot;&gt;혹은&lt;/p&gt;
&lt;p style=&quot;text-align: center;&quot;&gt;int fd = open( &quot;test2.txt&quot;, O_RDWR&amp;nbsp;);&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;/p&gt;
&lt;p style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;span style=&quot;font-size: 12pt;&quot;&gt;이떄, write() ?&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;open() 함수로 열기를 한 디바이스 혹은 파일에 쓰기 작업을 한다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;ul style=&quot;list-style-type: square;&quot;&gt;&lt;li&gt;&lt;i&gt;&lt;span style=&quot;font-size: 10pt;&quot;&gt;헤더&lt;/span&gt;&lt;/i&gt;&amp;nbsp;&lt;span style=&quot;background-color: transparent;&quot;&gt;: &lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;#include &amp;lt;unistd.h&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;span style=&quot;background-color: transparent;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;ul style=&quot;list-style-type: square;&quot;&gt;&lt;li&gt;&lt;span style=&quot;background-color: transparent;&quot;&gt;&lt;i&gt;&lt;span style=&quot;font-size: 10pt;&quot;&gt;형태&lt;/span&gt;&lt;/i&gt; :&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: transparent;&quot;&gt;ssize_t write (int fd, const void *buf, size_t n)&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;span style=&quot;background-color: transparent;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;background-color: transparent;&quot;&gt;&lt;ul style=&quot;list-style-type: square;&quot;&gt;&lt;li&gt;&lt;i&gt;&lt;span style=&quot;font-size: 10pt;&quot;&gt;인수&lt;/span&gt;&lt;/i&gt; :&amp;nbsp;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;p&gt;&lt;table class=&quot;txc-table&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot; style=&quot;width:100%;border:none;border-collapse:collapse;;font-family:돋움;font-size:12px&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot; border: 1px solid rgb(204, 204, 204);&quot;&gt;&lt;p&gt;&amp;nbsp;&lt;span style=&quot;font-size: 9pt; line-height: 1.5; background-color: transparent;&quot;&gt;int fd&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;
&lt;td style=&quot; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgb(204, 204, 204); border-right-width: 1px; border-right-style: solid; border-right-color: rgb(204, 204, 204); border-top-width: 1px; border-top-style: solid; border-top-color: rgb(204, 204, 204);&quot;&gt;&lt;p&gt;&amp;nbsp;디스크립터. 번호. 오픈시에 받은.&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;&lt;td style=&quot; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgb(204, 204, 204); border-right-width: 1px; border-right-style: solid; border-right-color: rgb(204, 204, 204); border-left-width: 1px; border-left-style: solid; border-left-color: rgb(204, 204, 204);&quot;&gt;&lt;p&gt;&amp;nbsp;&lt;span style=&quot;font-size: 9pt; line-height: 1.5; background-color: transparent;&quot;&gt;void *buf&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;
&lt;td style=&quot; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgb(204, 204, 204); border-right-width: 1px; border-right-style: solid; border-right-color: rgb(204, 204, 204);&quot;&gt;&lt;p&gt;&amp;nbsp;&lt;span style=&quot;font-size: 9pt; line-height: 1.5; background-color: transparent;&quot;&gt;파일에 쓸&amp;nbsp;내용을 담은 버퍼&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;&lt;td style=&quot; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgb(204, 204, 204); border-right-width: 1px; border-right-style: solid; border-right-color: rgb(204, 204, 204); border-left-width: 1px; border-left-style: solid; border-left-color: rgb(204, 204, 204);&quot;&gt;&lt;p&gt;&amp;nbsp;&lt;span style=&quot;font-size: 9pt; line-height: 1.5; background-color: transparent;&quot;&gt;size_t n&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;
&lt;td style=&quot; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgb(204, 204, 204); border-right-width: 1px; border-right-style: solid; border-right-color: rgb(204, 204, 204);&quot;&gt;&lt;p&gt;&amp;nbsp;&lt;span style=&quot;font-size: 9pt; line-height: 1.5; background-color: transparent;&quot;&gt;쓰기할 바이트 수&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;ul style=&quot;list-style-type: square;&quot;&gt;&lt;li&gt;&lt;i&gt;&lt;span style=&quot;font-size: 10pt;&quot;&gt;반환값&lt;/span&gt;&lt;/i&gt;&amp;nbsp;:&amp;nbsp;ssize_t (정상적 쓰기를 했다면 쓰기를 한 바이트 개수를, 실패했다면 -1을 반환)&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;ul style=&quot;list-style-type: square;&quot;&gt;&lt;li&gt;&lt;i&gt;&lt;span style=&quot;font-size: 10pt;&quot;&gt;사용 예&lt;/span&gt;&lt;/i&gt; :&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;table class=&quot;txc-table&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot; style=&quot;width:100%;border:none;border-collapse:collapse;;font-family:돋움;font-size:12px&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;width: 674px; height: 37px; border: 1px solid rgb(204, 204, 204);&quot;&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&amp;nbsp;char &amp;nbsp;*temp = &quot;forum, falinux.comn&quot;;&lt;/p&gt;
&lt;p style=&quot;text-align: center;&quot;&gt;...생략&lt;/p&gt;
&lt;p style=&quot;text-align: center;&quot;&gt;write( fd, temp, strlen( temp) );&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;중요 :&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: 9pt; line-height: 1.5; color: rgb(255, 0, 0); background-color: transparent;&quot;&gt;황당하게도 open()함수는 fcntl.h 에 정의 되어 있지만 write(), read(), close()는 unistd.h에 정의 되어 있다.&lt;/span&gt;&lt;/p&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;p&gt;&lt;span style=&quot;font-size: 12pt;&quot;&gt;&lt;b&gt;이때, read() ?&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;open 디바이스 혹은 파일을 읽는다.&lt;/p&gt;
&lt;p style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;ul style=&quot;list-style-type: square;&quot;&gt;&lt;li&gt;&lt;i&gt;&lt;span style=&quot;font-size: 10pt;&quot;&gt;헤더&lt;/span&gt;&lt;/i&gt;&amp;nbsp;&lt;span style=&quot;background-color: transparent;&quot;&gt;:&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt; #include &amp;lt;unistd.h&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;span style=&quot;background-color: transparent;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;ul style=&quot;list-style-type: square;&quot;&gt;&lt;li&gt;&lt;span style=&quot;background-color: transparent;&quot;&gt;&lt;i&gt;&lt;span style=&quot;font-size: 10pt;&quot;&gt;형태&lt;/span&gt;&lt;/i&gt; :&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: transparent;&quot;&gt;ssize_t read (int fd, void *buf, size_t nbytes)&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;span style=&quot;background-color: transparent;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;background-color: transparent;&quot;&gt;&lt;ul style=&quot;list-style-type: square;&quot;&gt;&lt;li&gt;&lt;i&gt;&lt;span style=&quot;font-size: 10pt;&quot;&gt;인수&lt;/span&gt;&lt;/i&gt; :&amp;nbsp;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;table class=&quot;txc-table&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot; style=&quot;border: none; border-collapse: collapse; font-size: 12px;width:100%;&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot; border: 1px solid rgb(204, 204, 204);&quot;&gt;&lt;p&gt;&amp;nbsp;&lt;span style=&quot;font-size: 9pt; line-height: 1.5; background-color: transparent;&quot;&gt;int fd&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style=&quot; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgb(204, 204, 204); border-right-width: 1px; border-right-style: solid; border-right-color: rgb(204, 204, 204); border-top-width: 1px; border-top-style: solid; border-top-color: rgb(204, 204, 204);&quot;&gt;&lt;p&gt;&amp;nbsp;디스크립터. 번호. 오픈시에 받은.&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style=&quot; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgb(204, 204, 204); border-right-width: 1px; border-right-style: solid; border-right-color: rgb(204, 204, 204); border-left-width: 1px; border-left-style: solid; border-left-color: rgb(204, 204, 204);&quot;&gt;&lt;p&gt;&amp;nbsp;&lt;span style=&quot;font-size: 9pt; line-height: 1.5; background-color: transparent;&quot;&gt;void *buf&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;td style=&quot; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgb(204, 204, 204); border-right-width: 1px; border-right-style: solid; border-right-color: rgb(204, 204, 204);&quot;&gt;&lt;p&gt;&amp;nbsp;&lt;span style=&quot;font-size: 9pt; line-height: 1.5; background-color: transparent;&quot;&gt;파일에서 읽은&amp;nbsp;내용을 담은 버퍼&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td style=&quot; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgb(204, 204, 204); border-right-width: 1px; border-right-style: solid; border-right-color: rgb(204, 204, 204); border-left-width: 1px; border-left-style: solid; border-left-color: rgb(204, 204, 204);&quot;&gt;&lt;p&gt;&amp;nbsp;size_t nbytes&lt;/p&gt;&lt;/td&gt;&lt;td style=&quot; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: rgb(204, 204, 204); border-right-width: 1px; border-right-style: solid; border-right-color: rgb(204, 204, 204);&quot;&gt;&lt;p&gt;&amp;nbsp;읽기 할 바이트 수 (일반적으로는&amp;nbsp;버퍼의 크기랑 동일)&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;ul style=&quot;list-style-type: square;&quot;&gt;&lt;li&gt;&lt;i&gt;&lt;span style=&quot;font-size: 10pt;&quot;&gt;반환값&lt;/span&gt;&lt;/i&gt; :&amp;nbsp;ssize_t (정상적으로 실행되었다면 읽어들인 바이트 수를, 실패했다면 -1을 반환)&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;ul style=&quot;list-style-type: square;&quot;&gt;&lt;li&gt;&lt;i&gt;&lt;span style=&quot;font-size: 10pt;&quot;&gt;사용 예&lt;/span&gt;&lt;/i&gt; :&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;table class=&quot;txc-table&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot; style=&quot;width:100%;border: none; border-collapse: collapse; font-size: 12px;&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;width: 674px; height: 37px; border: 1px solid rgb(204, 204, 204);&quot;&gt;&lt;p style=&quot;text-align: center;&quot;&gt;#define &amp;nbsp;BUFF_SIZE &amp;nbsp; 1024&amp;nbsp;&lt;/p&gt;
&lt;p style=&quot;text-align: center;&quot;&gt;...생략&lt;/p&gt;
&lt;p style=&quot;text-align: center;&quot;&gt;char &amp;nbsp; buff[BUFF_SIZE];&lt;/p&gt;
&lt;p style=&quot;text-align: center;&quot;&gt;...생략&lt;/p&gt;
&lt;p style=&quot;text-align: center;&quot;&gt;read( fd, buff, BUFF_SIZE);&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;p&gt;&lt;b&gt;&lt;span style=&quot;font-size: 12pt;&quot;&gt;이때, close() ?&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;open된 디바이스던 파일이던 사용을 중지한다.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;ul style=&quot;list-style-type: square;&quot;&gt;&lt;li&gt;&lt;i&gt;&lt;span style=&quot;font-size: 10pt;&quot;&gt;헤더&lt;/span&gt;&lt;/i&gt;&amp;nbsp;&lt;span style=&quot;background-color: transparent;&quot;&gt;:&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt; #include &amp;lt;unistd.h&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;span style=&quot;background-color: transparent;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;ul style=&quot;list-style-type: square;&quot;&gt;&lt;li&gt;&lt;span style=&quot;background-color: transparent;&quot;&gt;&lt;i&gt;&lt;span style=&quot;font-size: 10pt;&quot;&gt;형태&lt;/span&gt;&lt;/i&gt; :&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: transparent;&quot;&gt;int close(int fd)&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;ul style=&quot;list-style-type: square;&quot;&gt;&lt;li&gt;&lt;i&gt;&lt;span style=&quot;font-size: 10pt;&quot;&gt;인수&lt;/span&gt;&lt;/i&gt; : int fd - 파일 디스크립터 (open때 받은 번호를 의미한다. )&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;ul style=&quot;list-style-type: square;&quot;&gt;&lt;li&gt;&lt;i&gt;&lt;span style=&quot;font-size: 10pt;&quot;&gt;반환값&lt;/span&gt;&lt;/i&gt; :&amp;nbsp;&lt;span style=&quot;background-color: transparent;&quot;&gt;int (&lt;/span&gt;&lt;span style=&quot;background-color: transparent;&quot;&gt;정상적으로 close 했다면 0을, 실패했다면 -1을 반환)&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;ul style=&quot;list-style-type: square;&quot;&gt;&lt;li&gt;&lt;i&gt;&lt;span style=&quot;font-size: 10pt;&quot;&gt;사용 예&lt;/span&gt;&lt;/i&gt; :&amp;nbsp;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;table class=&quot;txc-table&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; border=&quot;0&quot; style=&quot;border: none; border-collapse: collapse; font-size: 12px;width:100%&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;width:674;height:24;border-bottom:1px solid #ccc;border-right:1px solid #ccc;border-top:1px solid #ccc;border-left:1px solid #ccc;;&quot;&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&amp;nbsp;close( fd );&lt;/p&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot;text-align: right;&quot;&gt;&lt;span style=&quot;font-size: 8pt;&quot;&gt;- &lt;/span&gt;&lt;span style=&quot;font-size: 8pt;&quot;&gt;&lt;a href=&quot;http://forum.falinux.com/zbxe/index.php?mid=C_LIB&amp;amp;category=520909&amp;amp;page=2&amp;amp;document_srl=408451&quot; target=&quot;_blank&quot; class=&quot;tx-link&quot;&gt;FALINUX 포럼&lt;/a&gt;&amp;nbsp;참조&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</description>
      <category>Engineering</category>
      <category>C 라이브러리</category>
      <category>close()</category>
      <category>Device Driver</category>
      <category>linux driver</category>
      <category>open()</category>
      <category>read()</category>
      <category>system call</category>
      <category>write()</category>
      <category>드라이버</category>
      <category>디바이스</category>
      <category>디바이스 드라이버</category>
      <category>리눅스</category>
      <category>시스템 콜</category>
      <category>시스템 프로그래밍</category>
      <category>임베디드</category>
      <category>파일 디스크립터</category>
      <author>youngkyu.cho</author>
      <guid isPermaLink="true">https://youngkyu.tistory.com/15</guid>
      <comments>https://youngkyu.tistory.com/15#entry15comment</comments>
      <pubDate>Thu, 29 May 2014 02:58:33 +0900</pubDate>
    </item>
    <item>
      <title>Core network와 Access network</title>
      <link>https://youngkyu.tistory.com/13</link>
      <description>&lt;p&gt;&lt;span style=&quot;font-size: 12pt;&quot;&gt;&lt;b&gt;Core network와 Access network&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: center; clear: none; float: none;&quot;&gt;&lt;span class=&quot;imageblock&quot; style=&quot;display: inline-block; width: 710px;  height: auto; max-width: 100%;&quot;&gt;&lt;img src=&quot;https://t1.daumcdn.net/cfile/tistory/266145365327EF0B27&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Ft1.daumcdn.net%2Fcfile%2Ftistory%2F266145365327EF0B27&quot; width=&quot;710&quot; height=&quot;620&quot; filename=&quot;그림2.png&quot; filemime=&quot;image/jpeg&quot;/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Core network&lt;/p&gt;&lt;p&gt;- interconnect된 라우터들의 모임이다.&lt;/p&gt;&lt;p&gt;- 네트워크의 네트워크이다.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Access Network&lt;/p&gt;&lt;p&gt;- 앤드 시스템부터 첫번째 라우터까지를 이야기한다. (L2-switch가 가운데 있다면 그것도 Access Network이다.)&lt;/p&gt;&lt;p&gt;- ISP가 communication link를&amp;nbsp;제공한다.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</description>
      <category>Engineering</category>
      <category>access network</category>
      <category>core network</category>
      <author>youngkyu.cho</author>
      <guid isPermaLink="true">https://youngkyu.tistory.com/13</guid>
      <comments>https://youngkyu.tistory.com/13#entry13comment</comments>
      <pubDate>Tue, 18 Mar 2014 16:04:53 +0900</pubDate>
    </item>
    <item>
      <title>인터넷이란 무엇인가?(구성,서비스), 프로토콜이란 무엇인가?</title>
      <link>https://youngkyu.tistory.com/12</link>
      <description>&lt;p&gt;&lt;span style=&quot;background-color: transparent; font-size: 9pt; line-height: 1.5;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 12pt;&quot;&gt;인터넷(Internet)이&lt;/span&gt;&lt;span style=&quot;font-size: 12pt;&quot;&gt;란 무엇인가? - 어떤 것들이 인터넷을 구성하는가 (H/W &amp;amp; S/W)&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style=&quot;background-color: transparent; font-size: 9pt; line-height: 1.5;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style=&quot;background-color: transparent; font-size: 9pt; line-height: 1.5;&quot;&gt;인터넷이란 전세계 수많은 컴퓨터 디바이스들이 연결되어 소통하는 컴퓨터 네트워크이다. 얼마 되지 않은 과거엔 개인이 사용하는 linux workstation과 데스크톱 PC, 그리고 메일이나 웹페이즈를 전송하는&amp;nbsp;server가&amp;nbsp;가장 주요한 컴퓨팅 디바이스였으나, 현재는 노트북을 비롯하여, 스마트폰과 테블릿, 텔레비전, 게임, 웹 캠, 자동차, 환경 측정 센서, 카메라, 보안 시스템등이 모두 인터넷에 연결되어 있다. 우리는 이러한 디바이스를 호스트(&lt;b&gt;host&lt;/b&gt;), 혹은 앤드&amp;nbsp;시스템들(&lt;b&gt;end systems&lt;/b&gt;)이라 한다.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style=&quot;background-color: transparent; font-size: 9pt; line-height: 1.5;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;당연하게도 어떤 방식으로든 인터넷에 접근하려면 무언가 link가 필요하다.&amp;nbsp;이러한 앤드 시스템 혹은 호스트들은 인터넷에 연결하기 위해&amp;nbsp;wireless links(radio spectrum, satellite등을&amp;nbsp;이용한) 혹은 wired links(optical&amp;nbsp;fiber나 copper wire등을 이용한)로 불리는&amp;nbsp;&lt;b&gt;communication links&lt;/b&gt;를 이용하고, 이를 통해 접속한다. 서로 다른 재질들로 된 link들은 각각 다른 전송 rate를 가지고 있는데 이를 &lt;b&gt;transmission rate&lt;/b&gt;라 하며, bits/sec로 측정한다. 목적지가 header라는&amp;nbsp;곳에 명시되어 있는&amp;nbsp;&lt;span style=&quot;background-color: transparent; font-size: 9pt; line-height: 1.5;&quot;&gt;데이터의 덩어리&lt;/span&gt;&lt;span style=&quot;background-color: transparent; font-size: 9pt; line-height: 1.5;&quot;&gt;(chunks of data&lt;/span&gt;&lt;span style=&quot;background-color: transparent; font-size: 9pt; line-height: 1.5;&quot;&gt;)가&amp;nbsp;가공되어 패키징 된 &lt;b&gt;packet&lt;/b&gt;이라 불리는 것들은 network로 전송되고 목적지에의 호스트 혹은 앤드 시스템은 그것을 풀어서 원래의 data로 재조립한다.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style=&quot;background-color: transparent; font-size: 9pt; line-height: 1.5;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style=&quot;background-color: transparent; font-size: 9pt; line-height: 1.5;&quot;&gt;packet switch라는 것은 이러한 packet을 다른 communication link로 보내주는 역할을 한다. 이런 packet switch들은 여러 종류가 있지만,&amp;nbsp;오늘날 인터넷에는&amp;nbsp;&lt;b&gt;router&lt;/b&gt;와&lt;b&gt;&amp;nbsp;L2 switch(link-layer switch)&lt;/b&gt; 2가지를&amp;nbsp;사용하고 있다. 두 가지 모두 packet을&amp;nbsp;정해진 목적지에 보내는 역할을 한다.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style=&quot;background-color: transparent; font-size: 9pt; line-height: 1.5;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;L2 switch는 일반적으로 &lt;b&gt;Access network&lt;/b&gt;에 사용된다. 반면에 router는 network의 &lt;b&gt;core network&lt;/b&gt; 부분에 사용된다. packet이 목적지에 도달할 때 까지 경로를 path 혹은 route라 한다. (router는&lt;b&gt; L3 switch(ip-layer switch)&lt;/b&gt;라 불리기도 한다. 이는 뒤에 나올 OSI 7 layer중 3번째 layer와 관련 있기 때문이다. L2 switch 또한 OSI 7 layer의&amp;nbsp;2번째 layer와 관련 있기 때문에 그렇게 불린다.)&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot;text-align: right;&quot;&gt;참고 : &lt;a href=&quot;http://ko.wikipedia.org/wiki/OSI_%EB%AA%A8%ED%98%95&quot; target=&quot;_blank&quot; class=&quot;tx-link&quot;&gt;&lt;span&gt;위키백과 OSI 모형&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class=&quot;imageblock&quot; style=&quot;display: inline-block; width: 710px; text-align: center; background-color: transparent; font-size: 9pt; line-height: 1.5;; height: auto; max-width: 100%;&quot;&gt;&lt;img src=&quot;https://t1.daumcdn.net/cfile/tistory/2570D03A5327DA943F&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Ft1.daumcdn.net%2Fcfile%2Ftistory%2F2570D03A5327DA943F&quot; width=&quot;710&quot; height=&quot;620&quot; filename=&quot;그림2.png&quot; filemime=&quot;image/jpeg&quot; style=&quot;text-align: center; background-color: transparent; font-size: 9pt; line-height: 1.5;&quot;/&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot;text-align: center; clear: none; float: none;&quot;&gt;&lt;span class=&quot;imageblock&quot; style=&quot;display: inline-block; width: 710px;  height: auto; max-width: 100%;&quot;&gt;&lt;img src=&quot;https://t1.daumcdn.net/cfile/tistory/277C7C3C5327DAB414&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Ft1.daumcdn.net%2Fcfile%2Ftistory%2F277C7C3C5327DAB414&quot; width=&quot;710&quot; height=&quot;664&quot; filename=&quot;그림1.png&quot; filemime=&quot;image/jpeg&quot;/&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;end system은&lt;b&gt; ISP(Internet Service Provider)&lt;/b&gt;를 통해서 인터넷에 접속하는데, 이러한 ISP의 예로는 모두가 잘 아는 SK의 브로드밴드 혹은 올레, 유플러스, CJ등이 있다. 인터넷이란 이들 ISP들이&amp;nbsp;Interconnted된 것인데, network의 network라 생각 할 수 있다. 보통 ISP는 local적인 regional ISP를 의미하는데, 이들은 가입자들에게 Access network를 제공하며, 동적 IP를 할당해준다.(이러한 서비스를 제공하고 돈을 버는 사업을 하는 통신 사업자들이 ISP이다.)&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot;text-align: right;&quot;&gt;참고 : &lt;a href=&quot;http://ko.wikipedia.org/wiki/%EC%9D%B8%ED%84%B0%EB%84%B7_%EC%84%9C%EB%B9%84%EC%8A%A4_%EC%A0%9C%EA%B3%B5%EC%9E%90&quot; target=&quot;_blank&quot; class=&quot;tx-link&quot;&gt;&lt;span&gt;위키백과 인터넷 서비스 제공자&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot;text-align: center; clear: none; float: none;&quot;&gt;&lt;span class=&quot;imageblock&quot; style=&quot;display: inline-block; width: 710px;  height: auto; max-width: 100%;&quot;&gt;&lt;img src=&quot;https://t1.daumcdn.net/cfile/tistory/223EC0385327DF4104&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Ft1.daumcdn.net%2Fcfile%2Ftistory%2F223EC0385327DF4104&quot; width=&quot;710&quot; height=&quot;503&quot; filename=&quot;그림3.png&quot; filemime=&quot;image/jpeg&quot;/&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;인터넷에는 다양한 프로토콜들이 있다. 프로토콜이 무엇인가에 대해서는 뒤에서 알아보도록 하고, 간단히 어떤 약속이라 생각하자. 인터넷의 프로토콜 예시를 먼저 살펴보자면 TCP, IP, HTTP, Skype(스카이프가 사용하는 독자 프로토콜), 802.11 등이 있다. 이러한 프로토콜은 서로간의 약속이므로 누군가가 중재해서 어떤 약속인지를 명시할 필요가 있다. 인터넷에 관하여 명시된 약속을 우리는 Internet Standard라 하며, 이는&lt;b&gt; IETF(Internet Engineering Task Force)&lt;/b&gt;에 의해 만들어지고 개발되고 있다. IETF에서 만든 standard 문서를 &lt;b&gt;RFC(Request for comments)&lt;/b&gt;라 부른다.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;b style=&quot;font-size: 9pt; line-height: 1.5;&quot;&gt;&lt;span style=&quot;font-size: 12pt;&quot;&gt;인터넷(Internet)이&lt;/span&gt;&lt;span style=&quot;font-size: 12pt;&quot;&gt;란 무엇인가? - 서비스들의 관점에서 보자.&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;인터넷이란 App입장에서 보면 어떤&amp;nbsp;인프라(&lt;b&gt;Infrastructure&lt;/b&gt;)이다. 웹을 이용하는 App에는 web 관련 환경을 제공하며, email, 인터넷 전화, 게임등에 필요한 네트워크등을 제공한다. 페이스북과 트위터 같은 SNS 또한 Internet이라는 인프라 위에서 만들어지는 App의 한 형태이다.&amp;nbsp;&lt;span style=&quot;background-color: transparent; font-size: 9pt; line-height: 1.5;&quot;&gt;또한&amp;nbsp;인터넷은 &lt;b&gt;API(Application programming interface)&lt;/b&gt;도 제공하는데, 이 API에 대해서는 추후에 알아보도록 하자.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;span style=&quot;font-size: 12pt;&quot;&gt;프로토콜(protocol)이&lt;/span&gt;&lt;span style=&quot;font-size: 12pt;&quot;&gt;란 무엇인가?&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;protocol이란 어떤 약속인데, 어떻게 메세지를 보낼지, 그리고 그 메세지에 어떤 식으로 답할지에 관한 약속이다.&amp;nbsp;&quot;안녕?&quot; 라 하면 &quot;안녕!&quot;라고 대답하고, &quot;Hi!&quot;라 하면 &quot;oh, hi!&quot;라고 하는 것이 인간의 프로토콜이다. 영어로 물었기에 영어로, 한국어로 물었기에 한국어로 대답하는 이 행동이 프로토콜인 것이다. 또 '안녕'이라는 것에 대한 의미와 대답을 서로 인지하는 것 또한 어떤 프로토콜이며, 대답을 하고 질문을 하는 행위는 프로토콜을 서로 공유하기에 가능한 것이다.&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;네트워크에서 프로토콜은 기계가 이러한 행위를 할 수 있도록 하는 기계들의 약속인 것이다. Internet의 모든 커뮤니케이션은 정해진 프로토콜에 의해 가능한 것이다. sender가 보낸 내용을 receiver가 이해할 수 있어야 하기 때문이다.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;인터넷에서의 프로토콜이란 인터넷 entity들 사이의&amp;nbsp;메세지&amp;nbsp;format과 보내는 메세지, 받는 메세지의 순서, 어떻게 반응하고 전송하는지에 관한 전반적인 정의인 것이다.&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p style=&quot;text-align: right;&quot;&gt;참고 : &lt;span&gt;&lt;a href=&quot;http://www.terms.co.kr/protocol.htm&quot; target=&quot;_blank&quot; class=&quot;tx-link&quot;&gt;텀즈&amp;nbsp;&lt;/a&gt;&lt;a href=&quot;http://www.terms.co.kr/protocol.htm&quot; target=&quot;_blank&quot; class=&quot;tx-link&quot;&gt;프로토콜&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;</description>
      <category>Engineering</category>
      <category>access network</category>
      <category>core network</category>
      <category>end system</category>
      <category>host</category>
      <category>IETF</category>
      <category>ip-layer switch</category>
      <category>ISP</category>
      <category>L2 switch</category>
      <category>L3 switch</category>
      <category>link-layer switch</category>
      <category>osi</category>
      <category>OSI 7계층</category>
      <category>OSI 모형</category>
      <category>Packet</category>
      <category>path</category>
      <category>Protocol</category>
      <category>receiver</category>
      <category>RFC</category>
      <category>route</category>
      <category>Router</category>
      <category>sender</category>
      <category>switch</category>
      <category>라우터</category>
      <category>앤드 시스템</category>
      <category>인터넷</category>
      <category>컴퓨터 네트워크</category>
      <category>프로토콜</category>
      <category>호스트</category>
      <author>youngkyu.cho</author>
      <guid isPermaLink="true">https://youngkyu.tistory.com/12</guid>
      <comments>https://youngkyu.tistory.com/12#entry12comment</comments>
      <pubDate>Tue, 18 Mar 2014 15:24:25 +0900</pubDate>
    </item>
    <item>
      <title>CSS GENERATOR들 모음 / CSS Maker들 모음(border-radius,text-shadow,font-face,box-sizing,transition,transform,filter,960 grid system)</title>
      <link>https://youngkyu.tistory.com/11</link>
      <description>&lt;p style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;http://css3generator.com/&quot; target=&quot;_blank&quot; class=&quot;tx-link&quot;&gt;&lt;span style=&quot;font-size: 12pt;&quot;&gt;&lt;b&gt;CSS3 Ggenerator&lt;/b&gt;&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;http://css3generator.com/&quot; target=&quot;_blank&quot; class=&quot;tx-link&quot;&gt;&lt;span style=&quot;font-size: 9pt;&quot;&gt;&lt;b&gt;http://css3generator.com&lt;/b&gt;&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot;text-align: center; clear: none; float: none;&quot;&gt;&lt;span class=&quot;imageblock&quot; style=&quot;display: inline-block; width: 710px;  height: auto; max-width: 100%;&quot;&gt;&lt;img src=&quot;https://t1.daumcdn.net/cfile/tistory/2161B54E5327C41C06&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Ft1.daumcdn.net%2Fcfile%2Ftistory%2F2161B54E5327C41C06&quot; width=&quot;710&quot; height=&quot;354&quot; filename=&quot;K-20140318-465775.png&quot; filemime=&quot;image/jpeg&quot;/&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot;text-align: center;&quot;&gt;border-radius , box-shadow , text-shadow , rgba , font-face ,&lt;/p&gt;
&lt;p style=&quot;text-align: center;&quot;&gt;multiple colums , &amp;nbsp;box resize , box-sizing&lt;/p&gt;
&lt;p style=&quot;text-align: center;&quot;&gt;outline , transition , transform , gradient&lt;/p&gt;
&lt;p style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot;text-align: center;&quot;&gt;이런 것들을 직접 보면서 조절하면,&amp;nbsp;자동으로 CSS 코드를 생성시켜주는 generator다. 주로 필자는 text-shadow를 보면서 조절하기 위해 사용했는데, 웹 디자인시 많은 분들이 유용하게 사용 할 수 있을 것 같다.&lt;/p&gt;
&lt;p style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;http://html5-demos.appspot.com/static/css/filters/index.html&quot; target=&quot;_blank&quot; class=&quot;tx-link&quot;&gt;&lt;span style=&quot;font-size: 12pt;&quot;&gt;&lt;b&gt;CSS Filter Effects&lt;/b&gt;&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;http://html5-demos.appspot.com/static/css/filters/index.html&quot; target=&quot;_blank&quot; class=&quot;tx-link&quot;&gt;&lt;span style=&quot;font-size: 9pt;&quot;&gt;&lt;b&gt;http://html5-demos.appspot.com/static/css/filters/index.html&lt;/b&gt;&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot;text-align: center; clear: none; float: none;&quot;&gt;&lt;span class=&quot;imageblock&quot; style=&quot;display: inline-block; width: 710px;  height: auto; max-width: 100%;&quot;&gt;&lt;img src=&quot;https://t1.daumcdn.net/cfile/tistory/226AA34E5327C41C2D&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Ft1.daumcdn.net%2Fcfile%2Ftistory%2F226AA34E5327C41C2D&quot; width=&quot;710&quot; height=&quot;354&quot; filename=&quot;K-20140318-465874.png&quot; filemime=&quot;image/jpeg&quot;/&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;필자는 웹 디자이너가 아니다보니, 포토샵을 잘 다룰 줄 모른다. 아마도 대다수의 웹 개발하는 개발자가 그럴 것이다. 가끔 다양한 사진 효과를 사용해야할 경우가 있는데, 그럴 때 보통은 포토샵으로 편집해서 사용하면 되지만, 포토샵을 잘 다룰 줄 모르는 필자는 브라우저가 제공하는 filter 효과를 많이 사용한다. CSS를 외우고 있어도 햇갈릴 경우도 많고 적용 순서에 따라 효과가 천차만별이라 항상 오랜 시간이 걸려서 작업하곤 했는데, 이 generator는 편하게 보면서 필터 이펙트를 적용할 수 있게 해주고, 코드까지 완성해준다.&lt;/p&gt;
&lt;p&gt;CSS filter를 사용할 때 엄청 유용하다.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;http://www.css3maker.com/css3-animation.html&quot; target=&quot;_blank&quot; class=&quot;tx-link&quot;&gt;&lt;span style=&quot;font-size: 12pt;&quot;&gt;&lt;b&gt;CSS 3.0 MAKER&lt;/b&gt;&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;http://www.css3maker.com/css3-animation.html&quot; target=&quot;_blank&quot; class=&quot;tx-link&quot;&gt;&lt;span style=&quot;font-size: 9pt;&quot;&gt;&lt;b&gt;http://www.css3maker.com/css3-animation.html&lt;/b&gt;&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot;text-align: center; clear: none; float: none;&quot;&gt;&lt;span class=&quot;imageblock&quot; style=&quot;display: inline-block; width: 710px;  height: auto; max-width: 100%;&quot;&gt;&lt;img src=&quot;https://t1.daumcdn.net/cfile/tistory/21690A4E5327C41D2F&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Ft1.daumcdn.net%2Fcfile%2Ftistory%2F21690A4E5327C41D2F&quot; width=&quot;710&quot; height=&quot;354&quot; filename=&quot;K-20140318-465881.png&quot; filemime=&quot;image/jpeg&quot;/&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;위에 사이트와 비슷한 기능을 제공하는&amp;nbsp;css 3 메이커이다. 위와 마찬가지로&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;border-radius , gradient , css transform , css animation , css transition , rgba , text-shadow , box-shadow , text rotation, font face등을 보면서 설정하고 자동으로 CSS를 만들어주는 툴이다.&lt;/p&gt;
&lt;p&gt;보통 여기서 필자는 css animation을 설정해서 사용하곤 한다.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;http://www.cssmatic.com/noise-texture&quot; target=&quot;_blank&quot; class=&quot;tx-link&quot;&gt;&lt;span style=&quot;font-size: 12pt;&quot;&gt;&lt;b&gt;CSS MATIC&lt;/b&gt;&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;http://www.cssmatic.com/noise-texture&quot; target=&quot;_blank&quot; class=&quot;tx-link&quot;&gt;&lt;span style=&quot;font-size: 9pt;&quot;&gt;&lt;b&gt;http://www.cssmatic.com/noise-texture&lt;/b&gt;&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p style=&quot;text-align: center;&quot;&gt;&lt;/p&gt;
&lt;p style=&quot;text-align: center; clear: none; float: none;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot;text-align: center; clear: none; float: none;&quot;&gt;&lt;span class=&quot;imageblock&quot; style=&quot;display: inline-block; width: 710px;  height: auto; max-width: 100%;&quot;&gt;&lt;img src=&quot;https://t1.daumcdn.net/cfile/tistory/225A1A4E5327C41E09&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Ft1.daumcdn.net%2Fcfile%2Ftistory%2F225A1A4E5327C41E09&quot; width=&quot;710&quot; height=&quot;354&quot; filename=&quot;K-20140318-465896.png&quot; filemime=&quot;image/jpeg&quot;/&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;위에 사이트들에 없는 기능을 하나 제공하는 사이트이다. noise texture을 보면서 설정할 수 있는데, 이는 순수 CSS로 제작된게 아니라&amp;nbsp;thumbr라는 곳에서 제공하는 api를 사용하여 만들어내는 effect인 듯. 가서 확인해 보시라. 정말 유용하다!&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;http://grids.heroku.com/&quot; target=&quot;_blank&quot; class=&quot;tx-link&quot;&gt;&lt;span style=&quot;font-size: 12pt;&quot;&gt;&lt;b&gt;Grid SYSTEM&lt;/b&gt;&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p style=&quot;text-align: center; clear: none; float: none;&quot;&gt;&lt;a href=&quot;http://grids.heroku.com/&quot; target=&quot;_blank&quot; class=&quot;tx-link&quot;&gt;&lt;span style=&quot;font-size: 9pt;&quot;&gt;&lt;b&gt;http://grids.heroku.com/&lt;/b&gt;&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p style=&quot;text-align: center; clear: none; float: none;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot;text-align: center; clear: none; float: none;&quot;&gt;&lt;span class=&quot;imageblock&quot; style=&quot;display: inline-block; width: 710px;  height: auto; max-width: 100%;&quot;&gt;&lt;img src=&quot;https://t1.daumcdn.net/cfile/tistory/276F57425327C4E715&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Ft1.daumcdn.net%2Fcfile%2Ftistory%2F276F57425327C4E715&quot; width=&quot;710&quot; height=&quot;354&quot; filename=&quot;K-20140318-468248.png&quot; filemime=&quot;image/jpeg&quot;/&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;text-align: center; clear: none; float: none;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;레이아웃을 잡을 때, grid를 간단히 계산해 주는 툴이다. 별거 아닌 것 같지만, 노벨 평화상을 주고 싶을 만큼 짜증을 줄여준다. 항상&amp;nbsp;매우 유용히 사용해서 소개한다. CSS 파일 다운로드 기능도 제공한다.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</description>
      <category>Develop</category>
      <category>960</category>
      <category>Animation</category>
      <category>border-radius</category>
      <category>box resize</category>
      <category>box-shadow</category>
      <category>box-sizing</category>
      <category>CSS</category>
      <category>css 3.0</category>
      <category>css maker</category>
      <category>css3</category>
      <category>Filter</category>
      <category>font-face</category>
      <category>gen</category>
      <category>Generator</category>
      <category>gradient</category>
      <category>grid</category>
      <category>grid system</category>
      <category>multiple colums</category>
      <category>outline</category>
      <category>rgba</category>
      <category>text-shadow</category>
      <category>Transform</category>
      <category>transition</category>
      <category>Web Design</category>
      <author>youngkyu.cho</author>
      <guid isPermaLink="true">https://youngkyu.tistory.com/11</guid>
      <comments>https://youngkyu.tistory.com/11#entry11comment</comments>
      <pubDate>Tue, 18 Mar 2014 13:17:57 +0900</pubDate>
    </item>
    <item>
      <title>웹 디자인, 웹 개발시에 유용한 툴(useful tools) 모음 (색 배합,번역글 모음,무료 벡터 소스,무료 이미지,ICON,favicon,png to icon,랜덤 유저 생성)</title>
      <link>https://youngkyu.tistory.com/10</link>
      <description>&lt;p style=&quot;text-align: center;&quot;&gt;&lt;span style=&quot;font-size: 12pt;&quot;&gt;&lt;a href=&quot;https://kuler.adobe.com/create/color-wheel/&quot; target=&quot;_blank&quot; class=&quot;tx-link&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: rgb(90, 155, 170);&quot;&gt;ADOBE KULER&lt;/span&gt;&lt;/b&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://kuler.adobe.com&quot; target=&quot;_blank&quot; class=&quot;tx-link&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: rgb(90, 155, 170);&quot;&gt;https://kuler.adobe.com&lt;/span&gt;&lt;/b&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: center; clear: none; float: none;&quot;&gt;&lt;span class=&quot;imageblock&quot; style=&quot;display: inline-block; width: 710px;  height: auto; max-width: 100%;&quot;&gt;&lt;img src=&quot;https://t1.daumcdn.net/cfile/tistory/265D7B4453268DE21E&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Ft1.daumcdn.net%2Fcfile%2Ftistory%2F265D7B4453268DE21E&quot; width=&quot;710&quot; height=&quot;354&quot; filename=&quot;K-20140317-535572.png&quot; filemime=&quot;image/jpeg&quot;/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;웹 디자인을 전문적으로 하는 디자이너라면 하지 않을 고민일테지만, 개발을 하다 필요에 의해 웹 디자인을 하거나 어찌됐건 디자인을 하게 되는 개발자의 경우, 색감에 매우 둔감해 색상 배합을 엉망진창으로 사용하곤 한다. 색상에 대한 감각이 없기 때문이다. Adobe가 제공하는 Kuler 서비스는 이러한 개발자에게 멋진 색 조합을 추천해준다. 여러가지 옵션을 사용할 수 있다. 물론 개발자나 디자이너외에도 색을 배색할 일이 필요한 분들에게 유용할 것 같다.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&lt;span style=&quot;font-size: 12pt;&quot;&gt;&lt;a href=&quot;http://nolboo.github.io/trans/&quot; target=&quot;_blank&quot; class=&quot;tx-link&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: rgb(90, 155, 170);&quot;&gt;한글 번역글 모음 페이지&lt;/span&gt;&lt;/b&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;http://nolboo.github.io/trans/&quot; target=&quot;_blank&quot; class=&quot;tx-link&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: rgb(90, 155, 170);&quot;&gt;http://nolboo.github.io/trans&lt;/span&gt;&lt;/b&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: center; clear: none; float: none;&quot;&gt;&lt;span class=&quot;imageblock&quot; style=&quot;display: inline-block; width: 710px;  height: auto; max-width: 100%;&quot;&gt;&lt;img src=&quot;https://t1.daumcdn.net/cfile/tistory/2411D24453268DE303&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Ft1.daumcdn.net%2Fcfile%2Ftistory%2F2411D24453268DE303&quot; width=&quot;710&quot; height=&quot;354&quot; filename=&quot;K-20140317-535700.png&quot; filemime=&quot;image/jpeg&quot;/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;웹 디자인이나 웹 개발을 하며 자료를 찾다보면, 영어가 부족해 좌절할 때가 한 두번이 아니다. 그런 분들에게 소개하는 곳!&amp;nbsp;다양한 원서와 블로그, 외국 원문들을 번역해 제공하는 한글 번역글 모음 페이지이다. 아래는 이 번역글 페이지가 제공하는 대표글이다.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: center;&quot;&gt;---&lt;/p&gt;&lt;p style=&quot;text-align: center;&quot;&gt;부트스트랩 3 한글 번역 / 구글 웹폰트 빠르게 로드하는 팁 7 가지 / LESS 튜토리얼&lt;/p&gt;&lt;p style=&quot;text-align: center;&quot;&gt;최고의 워드프레스 개발자가 되는 방법 / 브라우저는 어떻게 동작하는가?&lt;/p&gt;&lt;p style=&quot;text-align: center;&quot;&gt;반응형 디자인 적용하기 / Pure CSS 번역 / Javascript 핵심&lt;/p&gt;&lt;p style=&quot;text-align: center;&quot;&gt;Angular.js는 왜 좋은가? / Angular JS의 MVC패턴 개요 / 루비 온 레일스 튜토리얼 번역&lt;/p&gt;&lt;p style=&quot;text-align: center;&quot;&gt;PHP의 올바른 방법 / GO 프로그래밍 입문 / 2시간만에 Perl 익히기&lt;/p&gt;&lt;p style=&quot;text-align: center;&quot;&gt;Perl 정규 표현식 / 파이썬 10분만에 배우기 / R 매뉴얼&lt;/p&gt;&lt;p style=&quot;text-align: center;&quot;&gt;GitHub 사용하는 방법 / 플랫UI&lt;/p&gt;&lt;p style=&quot;text-align: center;&quot;&gt;---&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&lt;font size=&quot;3&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;a href=&quot;http://www.freepik.com/&quot; target=&quot;_blank&quot; class=&quot;tx-link&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: rgb(90, 155, 170);&quot;&gt;Freepik.com&lt;/span&gt;&lt;/b&gt;&lt;/a&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;http://www.freepik.com/&quot; target=&quot;_blank&quot; class=&quot;tx-link&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: rgb(90, 155, 170);&quot;&gt;http://www.freepik.com&lt;/span&gt;&lt;/b&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: center; clear: none; float: none;&quot;&gt;&lt;span class=&quot;imageblock&quot; style=&quot;display: inline-block; width: 710px;  height: auto; max-width: 100%;&quot;&gt;&lt;img src=&quot;https://t1.daumcdn.net/cfile/tistory/247ACC4453268DE30E&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Ft1.daumcdn.net%2Fcfile%2Ftistory%2F247ACC4453268DE30E&quot; width=&quot;710&quot; height=&quot;354&quot; filename=&quot;K-20140317-535723.png&quot; filemime=&quot;image/jpeg&quot;/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;freepik은 사진과 벡터 이미지, PSD, ICON등을 한방에 찾을 수 있는 강력한 데이터 저장소이다. 게다가 무료!! 뿐만 아니라, 각 색상에 맞는 사진과 벡터이미지만을 골라 주는 기능도 있다. 검색 후 검색창 바로 아래에 세부적인 색상을 선택할 수 있는 기능이 있으니 활용한다면 위의 색 배합 서비스와 함께 유용하게 사용할 수 있을 것이다. 개인적으로&amp;nbsp;&lt;span style=&quot;background-color: transparent; font-size: 9pt; line-height: 1.5;&quot;&gt;웹 디자인을 하다보면 저작권에서 조금 자유로운 벡터 이미지와 아이콘들이 필요한데, 그럴 때 유용하게 필자가 찾는 사이트이다. PPT같은 프레젠테이션 파일을 만들거나 워드 작업시에 필요한 이미지를 구하는데도 매우 유용할 것 같다.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;background-color: transparent; font-size: 9pt; line-height: 1.5;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;background-color: transparent; font-size: 9pt; line-height: 1.5;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&lt;span style=&quot;font-size: 12pt;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: rgb(90, 155, 170);&quot;&gt;&lt;span style=&quot;color: rgb(90, 155, 170);&quot;&gt;&lt;/span&gt;&lt;a href=&quot;http://placehold.it/&quot; target=&quot;_blank&quot; class=&quot;tx-link&quot; style=&quot;color: rgb(90, 155, 170);&quot;&gt;&lt;span style=&quot;color: rgb(90, 155, 170);&quot;&gt;P&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;span style=&quot;color: rgb(90, 155, 170);&quot;&gt;&lt;a href=&quot;http://placehold.it/&quot; target=&quot;_blank&quot; class=&quot;tx-link&quot;&gt;&lt;span style=&quot;color: rgb(90, 155, 170);&quot;&gt;&lt;/span&gt;&lt;/a&gt;&lt;a href=&quot;http://placehold.it/&quot; target=&quot;_blank&quot; class=&quot;tx-link&quot;&gt;&lt;span style=&quot;color: rgb(90, 155, 170);&quot;&gt;LACEHOLD.IT&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;http://placehold.it/&quot; target=&quot;_blank&quot; class=&quot;tx-link&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: rgb(90, 155, 170);&quot;&gt;http://placehold.it&lt;/span&gt;&lt;/b&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: center; clear: none; float: none;&quot;&gt;&lt;span class=&quot;imageblock&quot; style=&quot;display: inline-block; width: 710px;  height: auto; max-width: 100%;&quot;&gt;&lt;img src=&quot;https://t1.daumcdn.net/cfile/tistory/213EFF4453268DE431&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Ft1.daumcdn.net%2Fcfile%2Ftistory%2F213EFF4453268DE431&quot; width=&quot;710&quot; height=&quot;354&quot; filename=&quot;K-20140317-535733.png&quot; filemime=&quot;image/jpeg&quot;/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;웹 페이지의 레이아웃을 구성하다보면 이미지를 넣을 장소긴 한데 아직 넣을 이미지를 구하지 못한 경우가 많다. 그럴 때 정해진 규격의 사이즈로 대신 박을 수 있는 Dummy 이미지를 제공한다. http://placehold.it/300x300 처럼 간단하게 img 테그의 src 어트리뷰트에 적어주면 사용할 수 있다. 아주 유용하다. 다른 Dummy 이미지 서비스들도 있지만 사이즈까지 표시해 줌으로 개인적으로는 가장 유용한 것 같다. (저 칙칙한 회색까지도 바꿔서 사용 할&amp;nbsp;수 있다는 점!!)&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 9pt; line-height: 1.5; background-color: transparent;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 9pt; line-height: 1.5; background-color: transparent;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 9pt; line-height: 1.5; background-color: transparent;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 9pt; line-height: 1.5; background-color: transparent;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&lt;font size=&quot;3&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;a href=&quot;http://www.alessioatzeni.com/metrize-icons/&quot; target=&quot;_blank&quot; class=&quot;tx-link&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: rgb(90, 155, 170);&quot;&gt;METRIZE ICONS&lt;/span&gt;&lt;/b&gt;&lt;/a&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;http://www.alessioatzeni.com/metrize-icons/&quot; target=&quot;_blank&quot; class=&quot;tx-link&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: rgb(90, 155, 170);&quot;&gt;http://placehold.it&lt;/span&gt;&lt;/b&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: center; clear: none; float: none;&quot;&gt;&lt;span class=&quot;imageblock&quot; style=&quot;display: inline-block; width: 710px;  height: auto; max-width: 100%;&quot;&gt;&lt;img src=&quot;https://t1.daumcdn.net/cfile/tistory/244FC04453268DE427&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Ft1.daumcdn.net%2Fcfile%2Ftistory%2F244FC04453268DE427&quot; width=&quot;710&quot; height=&quot;354&quot; filename=&quot;K-20140317-535779.png&quot; filemime=&quot;image/jpeg&quot;/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;레티나와 같은 고해상도 디바이스가 많이 나오고, 스마트폰으로 확대가 용이하다보니 고화질 이미지를 사용하거나 벡터 아이콘을 사용하는 경우가 많다. 필자의 경우 이때 마음에 드는 아이콘 찾기가 쉽지 않았는데,&amp;nbsp;Metrize는 필자가 좋아하는 스타일의 아이콘을 다양한 형태로 제공했고 매우 유용히 사용했다.&lt;/p&gt;&lt;p&gt;아름다운 아이콘을 SVG와 폰트, PDF, AI, EPS 파일까지 제공함으로 웹 디자인시 매우 유용하게, 간편히 활용 할 수 있다.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&lt;font size=&quot;3&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;a href=&quot;http://converticon.com/&quot; target=&quot;_blank&quot; class=&quot;tx-link&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: rgb(90, 155, 170);&quot;&gt;converticon.com&lt;/span&gt;&lt;/b&gt;&lt;/a&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;http://converticon.com/&quot; target=&quot;_blank&quot; class=&quot;tx-link&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: rgb(90, 155, 170);&quot;&gt;http://converticon.com/&lt;/span&gt;&lt;/b&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: center; clear: none; float: none;&quot;&gt;&lt;span class=&quot;imageblock&quot; style=&quot;display: inline-block; width: 710px;  height: auto; max-width: 100%;&quot;&gt;&lt;img src=&quot;https://t1.daumcdn.net/cfile/tistory/2346A44453268DE52C&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Ft1.daumcdn.net%2Fcfile%2Ftistory%2F2346A44453268DE52C&quot; width=&quot;710&quot; height=&quot;354&quot; filename=&quot;K-20140317-535804.png&quot; filemime=&quot;image/jpeg&quot;/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;페비콘을 만들 때 유용하게 사용하는 사이트이다. PNG파일이나 GIF, JPEG 포멧을 간단히 ICON으로 바꿔주는 웹앱이다. 반드시 즐겨찾기에 추가해 둘 툴!&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&lt;font size=&quot;3&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;a href=&quot;http://randomuser.me/&quot; target=&quot;_blank&quot; class=&quot;tx-link&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: rgb(90, 155, 170);&quot;&gt;RANDOM USER GENERATOR&lt;/span&gt;&lt;/b&gt;&lt;/a&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;&lt;p style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;http://randomuser.me/&quot; target=&quot;_blank&quot; class=&quot;tx-link&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: rgb(90, 155, 170);&quot;&gt;http://randomuser.me/&lt;/span&gt;&lt;/b&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: center; clear: none; float: none;&quot;&gt;&lt;span class=&quot;imageblock&quot; style=&quot;display: inline-block; width: 710px;  height: auto; max-width: 100%;&quot;&gt;&lt;img src=&quot;https://t1.daumcdn.net/cfile/tistory/2460934453268DE51D&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Ft1.daumcdn.net%2Fcfile%2Ftistory%2F2460934453268DE51D&quot; width=&quot;710&quot; height=&quot;354&quot; filename=&quot;K-20140317-535821.png&quot; filemime=&quot;image/jpeg&quot;/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;랜덤 유저를 생성해준다. 이름 뿐만 아니라, 사진과 전화번호등 다양한 정보를 제공한다. 웹 디자인 시 유용하게 사용 할 수 있을 것 같아 즐겨찾기에 추가해 두었는데, 아직 딱히 사용할 일은 없었지만 분명 웹 디자이너분들은 스킨 제작시&amp;nbsp;유용히 사용하리라 생각된다.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</description>
      <category>Develop</category>
      <category>angular 번역</category>
      <category>dummy</category>
      <category>gif</category>
      <category>Icon</category>
      <category>JPEG</category>
      <category>JPG</category>
      <category>png</category>
      <category>purecss 번역</category>
      <category>random</category>
      <category>개발자</category>
      <category>더미 이미지</category>
      <category>무료 벡터</category>
      <category>무료 이미지</category>
      <category>배색</category>
      <category>번역글</category>
      <category>벡터 소스</category>
      <category>부트스트랩 번역</category>
      <category>색상</category>
      <category>유저 생성</category>
      <category>이미지 자료</category>
      <category>팔렛트</category>
      <category>한국어 번역</category>
      <category>한글 번역</category>
      <author>youngkyu.cho</author>
      <guid isPermaLink="true">https://youngkyu.tistory.com/10</guid>
      <comments>https://youngkyu.tistory.com/10#entry10comment</comments>
      <pubDate>Mon, 17 Mar 2014 15:51:49 +0900</pubDate>
    </item>
    <item>
      <title>SIC/XE의 구조(Architecture), SIC과 어떻게 다른가?, Special symbols</title>
      <link>https://youngkyu.tistory.com/9</link>
      <description>&lt;p&gt;SIC과 SIC/XE&lt;/p&gt;&lt;p&gt;SIC/XE는 SIC의 업그레이드판이다. 따라서 많은 Feature은 동일하다. 몇가지 바뀌고 추가되고 변화된 부분을 알아보도록 하자.&amp;nbsp;메모리가 1Mega(2의 20승)로 SIC의 2의 15승보다 더욱 증가하였다. 뿐만 아니라 Instruction format과 addressing mode도 조금 변화되었다.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;레지스터(Register)가 추가되었다. -Additional registers&lt;/p&gt;&lt;p&gt;기존에 SIC이 가지고 있던 5개의 레지스터에 4개가 더 추가되어 총 9개가 되었다. F 레지스터를 제외한 모든 레지스터는 24bit이다.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: center; clear: none; float: none;&quot;&gt;&lt;span class=&quot;imageblock&quot; style=&quot;display: inline-block; width: 710px;  height: auto; max-width: 100%;&quot;&gt;&lt;img src=&quot;https://t1.daumcdn.net/cfile/tistory/211AA83653175EF822&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Ft1.daumcdn.net%2Fcfile%2Ftistory%2F211AA83653175EF822&quot; width=&quot;710&quot; height=&quot;428&quot; filename=&quot;그림2.png&quot; filemime=&quot;image/jpeg&quot;/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: center; clear: none; float: none;&quot;&gt;&lt;span class=&quot;imageblock&quot; style=&quot;display: inline-block; width: 710px;  height: auto; max-width: 100%;&quot;&gt;&lt;img src=&quot;https://t1.daumcdn.net/cfile/tistory/225B9B3653175EF93F&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Ft1.daumcdn.net%2Fcfile%2Ftistory%2F225B9B3653175EF93F&quot; width=&quot;710&quot; height=&quot;237&quot; filename=&quot;그림13.png&quot; filemime=&quot;image/jpeg&quot;/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;S와 T 레지스터는 오직 데이터를 저장만 할 수 있다. A 레지스터처럼 accumulator로 사용하는 것은 불가능하다. 또한 F 레지스터는 24bit가 아니라 48bit이다. 이것은 부동소수점(Floating-point)를 위한 레지스터이다. B 레지스터는 index를 붙여서 사용되는 경우가 많다.&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;부동소수점 데이터 타입(Floating-point data type)&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;SIC/XE는 SIC에서 48bit&amp;nbsp;부동소수점 데이터 타입이 추가되었다. 이것은 다음과 같은 포멧을 가진다.&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style=&quot;text-align: center; clear: none; float: none;&quot;&gt;&lt;span class=&quot;imageblock&quot; style=&quot;display: inline-block; width: 710px;  height: auto; max-width: 100%;&quot;&gt;&lt;img src=&quot;https://t1.daumcdn.net/cfile/tistory/216D76485317610705&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Ft1.daumcdn.net%2Fcfile%2Ftistory%2F216D76485317610705&quot; width=&quot;710&quot; height=&quot;214&quot; filename=&quot;그림14.png&quot; filemime=&quot;image/jpeg&quot;/&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;/p&gt;&lt;p style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;background-color: transparent; font-size: 9pt; line-height: 1.5;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;</description>
      <category>Engineering</category>
      <category>addressing mode</category>
      <category>architecture</category>
      <category>Floating-point</category>
      <category>Instruction format</category>
      <category>Register</category>
      <category>SIC</category>
      <category>SIC/XE</category>
      <author>youngkyu.cho</author>
      <guid isPermaLink="true">https://youngkyu.tistory.com/9</guid>
      <comments>https://youngkyu.tistory.com/9#entry9comment</comments>
      <pubDate>Thu, 6 Mar 2014 02:41:00 +0900</pubDate>
    </item>
    <item>
      <title>지식재산권(지적재산권)에서의 산업재산권(산재권)과 저작권</title>
      <link>https://youngkyu.tistory.com/8</link>
      <description>&lt;p&gt;&lt;span style=&quot;font-size: 9pt; font-family: Dotum, 돋움;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 12pt; color: rgb(127, 127, 127);&quot;&gt;지적재산권과 지식재산권&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 9pt; font-family: Dotum, 돋움;&quot;&gt;&lt;span style=&quot;color: rgb(127, 127, 127);&quot;&gt;법률 중 가장 으뜸가는 법은 &lt;/span&gt;&lt;a href=&quot;http://ko.wikipedia.org/wiki/%ED%97%8C%EB%B2%95&quot; target=&quot;_blank&quot; class=&quot;tx-link&quot;&gt;&lt;span style=&quot;color: rgb(127, 127, 127);&quot;&gt;헌법&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: rgb(127, 127, 127);&quot;&gt;이다. 그리고 그 아래로 여러가지 법들이 있지만, 공학 전공자로서 다른 무엇보다 정확히 알아야하고 중요한 법률은&amp;nbsp;'지식재산권'일 것이다. 과거에는 지적재산권이라는 이름으로 불리었으나, 형용사를 만들 때 사용하는 '~적'이라는 표현이 일본식 표현이고, '지적'이라는 표현이 직관적이지 못해(네이버 검색창에 지적까지만&amp;nbsp;치면 지적도가 나옴.) 지식재산권으로 몇년전에 바뀌었다. (쓸데없는 일을 했다고 표현하는 분들도 있는데, 개인적으로 법이 대중에 가까이 가는 방식으로 보여 매우 긍정적으로 보였다.)&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 9pt; font-family: Dotum, 돋움;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 12pt; color: rgb(127, 127, 127);&quot;&gt;지재권을 지탱하는 2개의 축:산재권과 저작권&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-size: 9pt; font-family: Dotum, 돋움; color: rgb(127, 127, 127);&quot;&gt;지식재산권, 줄여서 지재권(I&lt;/span&gt;&lt;span style=&quot;color: rgb(0, 0, 0); font-family: 굴림, gulim, helvetica, sans-serif; background-color: transparent; font-size: 9pt; line-height: 1.5;&quot;&gt;&lt;span style=&quot;font-size: 9pt; font-family: Dotum, 돋움; color: rgb(127, 127, 127);&quot;&gt;ntellectual property rights)은 2개의 축이 떠 받들고 있다. 그 첫번째 축은 산업적 관점에서 접근하는 지식재산권. 줄여서 산업재산권. 더 줄여서 &lt;/span&gt;&lt;a href=&quot;http://terms.naver.com/entry.nhn?docId=1168832&amp;amp;cid=40942&amp;amp;categoryId=31721&quot; target=&quot;_blank&quot; class=&quot;tx-link&quot;&gt;&lt;span style=&quot;font-size: 9pt; font-family: Dotum, 돋움; color: rgb(127, 127, 127);&quot;&gt;산재권&lt;/span&gt;&lt;/a&gt;&lt;a href=&quot;http://terms.naver.com/entry.nhn?docId=1168832&amp;amp;cid=40942&amp;amp;categoryId=31721&quot; target=&quot;_blank&quot; class=&quot;tx-link&quot;&gt;&lt;span style=&quot;font-size: 9pt; font-family: Dotum, 돋움; color: rgb(127, 127, 127);&quot;&gt;(&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;a href=&quot;http://terms.naver.com/entry.nhn?docId=1168832&amp;amp;cid=40942&amp;amp;categoryId=31721&quot; target=&quot;_blank&quot; class=&quot;tx-link&quot; style=&quot;font-family: 나눔고딕, NanumGothic, 굴림, Gulim, AppleGothic; font-size: 14px; line-height: 22px; text-align: center; background-color: transparent;&quot;&gt;&lt;span style=&quot;font-size: 9pt; font-family: Dotum, 돋움; color: rgb(127, 127, 127);&quot;&gt;industrial property&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;background-color: transparent; color: rgb(0, 0, 0); font-family: 굴림, gulim, helvetica, sans-serif; font-size: 9pt; line-height: 1.5;&quot;&gt;&lt;a href=&quot;http://terms.naver.com/entry.nhn?docId=1168832&amp;amp;cid=40942&amp;amp;categoryId=31721&quot; target=&quot;_blank&quot; class=&quot;tx-link&quot;&gt;&lt;span style=&quot;font-size: 9pt; font-family: Dotum, 돋움; color: rgb(127, 127, 127);&quot;&gt;)&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;font-size: 9pt; font-family: Dotum, 돋움; color: rgb(127, 127, 127);&quot;&gt;이다. 특허와 실용신안, 영업기밀, 상표권, 디자인권(의장권)이 여기에 속한다. 각 권리들은 각각을 보호하는 더 세부적인 개별법이 따로 있다.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: rgb(0, 0, 0); font-family: 굴림, gulim, helvetica, sans-serif; font-size: 9pt; line-height: 1.5;&quot;&gt;&lt;span style=&quot;font-size: 9pt; font-family: Dotum, 돋움; color: rgb(127, 127, 127);&quot;&gt;어떤 법이든 제1조는 그 법의 목적 조항인데, 개별법 중&amp;nbsp;특허법 제 1조는 &quot;발명을 보호함으로써 산업발전에 이바지함을 목적으로 한다&quot; 이다. 여기서 주목할 부분은 산업발전이다. 이것이 바로 산재권의 목적이기 때문이다. 특허법 제 1조와 산업재산권의 가장 기본적 목적이 산업발전에 이바지한다는 것을 알고 있다면, 다른 개별법들의 제 1조도 알 수 있다. 상표권은 &quot;상표를 보호함으로써&amp;nbsp;~ &quot; 일 것이고, 디자인권은 &quot;디자인을 보호함으로써 ~ &quot;일 것이다. 이 산업재산권은 특허청 관할이다. 두번째 축은 문화적 관점에서 접근하는 지식재산권인데, 이것을 줄여서 문화재산권이라하지않고, &lt;/span&gt;&lt;a href=&quot;http://terms.naver.com/entry.nhn?docId=1396644&amp;amp;cid=128&amp;amp;categoryId=128&quot; target=&quot;_blank&quot; class=&quot;tx-link&quot;&gt;&lt;span style=&quot;font-size: 9pt; font-family: Dotum, 돋움; color: rgb(127, 127, 127);&quot;&gt;저작권(copyright)&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;font-size: 9pt; font-family: Dotum, 돋움; color: rgb(127, 127, 127);&quot;&gt;이라 한다. 저작권은 문화 발전이 목표다. 따라서 저작권 제 1조는 아마 &quot;저작권을 보호함으로써 문화 발전에 이바지함을 목적으로 한다.&quot; 일 것이다. 이것은 문화를 관할하는 청에서 담당하는 법이다. ( 현&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: transparent;&quot;&gt;&lt;font color=&quot;#000000&quot; face=&quot;굴림, gulim, helvetica, sans-serif&quot;&gt;&lt;span style=&quot;font-size: 9pt; font-family: Dotum, 돋움;&quot;&gt;&lt;a href=&quot;http://www.mcst.go.kr/main.jsp&quot; target=&quot;_blank&quot; class=&quot;tx-link&quot;&gt;&lt;span style=&quot;color: rgb(127, 127, 127);&quot;&gt;문화체육관광부&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: rgb(127, 127, 127);&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/font&gt;&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: rgb(127, 127, 127); font-family: Dotum, 돋움; font-size: 9pt; line-height: 1.5;&quot;&gt;)&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;background-color: transparent; color: rgb(0, 0, 0); font-family: 굴림, gulim, helvetica, sans-serif; font-size: 9pt; line-height: 1.5;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;background-color: transparent; color: rgb(0, 0, 0); font-family: Dotum, 돋움; font-size: 12pt; line-height: 1.5;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: rgb(127, 127, 127);&quot;&gt;저작권, 시대가 바뀌었고 문화는 돈이 됐다.&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;font color=&quot;#000000&quot; face=&quot;Dotum, 돋움&quot;&gt;&lt;span style=&quot;color: rgb(127, 127, 127);&quot;&gt;원래 이 두개의 법이 지식재산권을 처음 지탱할 땐, 형이하학적인 장사, 사업, 돈과 관련된 산업 관점과, 형이상학적인 문화. 이렇게 2가지로 구별하였고 이것이 꽤 분류가 잘 되었다. 그러나 최근들어 문화산업 이라는 말이 생기기 시작하며, 문화가 하나의 형이하학적인 돈과 연계된 산업이 되어버렸다. 그러다보니 철학적 관점에서 나누었던 2개의 축이 조금 무너지기 시작한 것이다. 이에 따라 법은 저작권의 목적을 수정한다.&amp;nbsp;그렇게 저작권법 제 1조는 &quot;저작권을 보호함으로써 문화 발전 및 관련 산업 발전에 이바지함을 목적으로 한다&quot;로 변화되었다.&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font color=&quot;#000000&quot; face=&quot;Dotum, 돋움&quot;&gt;&lt;br /&gt;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font color=&quot;#000000&quot; face=&quot;Dotum, 돋움&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 12pt; color: rgb(127, 127, 127);&quot;&gt;왜 하나의 기관이 담당치 않고, 산재권과 저작권을 나눠 관리하는가?&lt;/span&gt;&lt;/b&gt;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font color=&quot;#000000&quot; face=&quot;Dotum, 돋움&quot;&gt;&lt;span style=&quot;color: rgb(127, 127, 127);&quot;&gt;지식재산권이라는 하나의 큰 범주에 속하는 2개가 각기 다른 곳에서 관리되는 것이 의아할 수 있다. 물론 하나의 기관이 관할하는 것이 옳을 수 있고 그것이 답일 수 있다. 지금&amp;nbsp;대한민국이&amp;nbsp;관점과 목적이 달라 다른 기관에서 담당한다는 것 뿐.&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;</description>
      <category>Culture</category>
      <category>문화체육관광부</category>
      <category>산업재산권</category>
      <category>산재권</category>
      <category>저작권</category>
      <category>지식재산권</category>
      <category>지재권</category>
      <category>지적재산권</category>
      <category>특허청</category>
      <author>youngkyu.cho</author>
      <guid isPermaLink="true">https://youngkyu.tistory.com/8</guid>
      <comments>https://youngkyu.tistory.com/8#entry8comment</comments>
      <pubDate>Thu, 6 Mar 2014 02:09:02 +0900</pubDate>
    </item>
    <item>
      <title>SIC(Simplified Instructional Computer)의 구조(Architecture), 명령어 포멧(Instruction formats), 주소 형식(Addressing modes)</title>
      <link>https://youngkyu.tistory.com/7</link>
      <description>&lt;p&gt;&lt;b&gt;&lt;span style=&quot;font-size: 12pt;&quot;&gt;SIC과 SIC/XE란?&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style=&quot;background-color: transparent;&quot;&gt;&lt;span style=&quot;font-size: 9pt; line-height: 1.5;&quot;&gt;기본적으로 시스템 프로그램(소프트웨어)들은 하드웨어와 밀접한 관련이 있다. 이러한 관련을 '기계 종속적'이라고 하며, 따라서 특정한 기기를 집어 학습하여야한다. 실제 Machine은 매우&amp;nbsp;복잡하여 학습하기 좋지 않고, 가장 기본적인 Feature들에 충실할 수 없으므로, SIC과 SIC/XE를 통해서 이해하도록 한다. 이때 SIC과 SIC/XE는&amp;nbsp;Hypothetical한(가상의) 컴퓨터로 실제 컴퓨터 명령어(&lt;/span&gt;Simplified&amp;nbsp;&lt;span style=&quot;font-size: 9pt; line-height: 1.5;&quot;&gt;Instructional Computer)를 단순화시켜 이해하기 수월하도록 만들어 놓은 것으로, 실제의 Machine에서 자주 쓰이는 특징들이 포함되어있다. 가상의 컴퓨터이나, 실제와 유사한 상황을 만들 수 있도록 기본 버전인 SIC 뿐만아니라, SIC의 확장된 형태의 SIC/XE를 동시에 사용하여 설명한다.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style=&quot;background-color: transparent; font-size: 9pt; line-height: 1.5;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;SIC은 가상 컴퓨터의 스탠다드 모델이며, SIC/XE는 확장된 모델인데, 이 두개의 컴퓨터는 상위호환(upward compatible)을 보장한다. SIC에서 작동되었던 프로그램들은 모두 SIC/XE에서 정상적으로 작동된다. 단 SIC/XE의 프로그램들이 SIC에서 작동된다는 것은 보장하지 않는다. 이는 이 가상의 컴퓨터들이&amp;nbsp;하위호환(b&lt;span style=&quot;background-color: transparent; font-size: 9pt; line-height: 1.5;&quot;&gt;ackward compatibility)&lt;/span&gt;&lt;span style=&quot;background-color: transparent; font-size: 9pt; line-height: 1.5;&quot;&gt;을 보장하지 않기 때문이다.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style=&quot;background-color: transparent; font-size: 9pt; line-height: 1.5;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;text-align: right;&quot;&gt;&lt;span style=&quot;background-color: transparent; font-size: 9pt; line-height: 1.5;&quot;&gt;추가정보 : &lt;a href=&quot;http://en.wikipedia.org/wiki/Simplified_Instructional_Computer&quot; target=&quot;_blank&quot; class=&quot;tx-link&quot;&gt;&lt;span&gt;위키피디아&amp;nbsp;SIC&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style=&quot;background-color: transparent; font-size: 9pt; line-height: 1.5;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;span style=&quot;font-size: 12pt;&quot;&gt;SIC의 구조(Architecture) - 메모리(Memory)&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot;text-align: center;&quot;&gt;&amp;lt;SIC Machine Architecture - Memory&amp;gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot;text-align: center; clear: none; float: none;&quot;&gt;&lt;span class=&quot;imageblock&quot; style=&quot;display: inline-block; width: 500px; width: 500px; height: 227px;; height: auto; max-width: 100%;&quot;&gt;&lt;img src=&quot;https://t1.daumcdn.net/cfile/tistory/23345D3E531720FE1C&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Ft1.daumcdn.net%2Fcfile%2Ftistory%2F23345D3E531720FE1C&quot; width=&quot;500&quot; height=&quot;227&quot; filename=&quot;그림1.png&quot; filemime=&quot;image/jpeg&quot; style=&quot;width: 500px; height: 227px;&quot;/&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;SIC은&amp;nbsp;8비트가 한 바이트로 이루어져 있다. 모든 주소는 바이트로 표현되며 저장된다. 3개의 consecutive한(이어진) Bytes를 Word라고 하며, Word를 구성하는&amp;nbsp;3바이트 중 최하위 바이트의 위치로 주소가 지정된다. SIC의 전체 메모리는 2의 15승이다.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style=&quot;background-color: transparent; font-size: 9pt; line-height: 1.5;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 12pt;&quot;&gt;SIC의 구조(Architecture) - 레지스터(Registers)&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;SIC에는 각각의 특수한 목적을 지닌 5개의 레지스터가 존재하며, 그 크기(길이)는 각각&amp;nbsp;24bit이다. 레지스터들은 숫자로 된 표현과 Character형식의 표현, 이렇게 두가지 다를&amp;nbsp;가지고 있다. 이때 Character 형태로 된 표현을&amp;nbsp;Mnemonic이라 한다.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot;text-align: center;&quot;&gt;&lt;span style=&quot;text-align: center;&quot;&gt;&amp;lt;SIC Machine Architecture - Register&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot;text-align: center; clear: none; float: none;&quot;&gt;&lt;span class=&quot;imageblock&quot; style=&quot;display: inline-block; width: 500px; width: 500px; height: 301px;; height: auto; max-width: 100%;&quot;&gt;&lt;img src=&quot;https://t1.daumcdn.net/cfile/tistory/25630C3C531726B50E&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Ft1.daumcdn.net%2Fcfile%2Ftistory%2F25630C3C531726B50E&quot; width=&quot;500&quot; height=&quot;301&quot; filename=&quot;그림2.png&quot; filemime=&quot;image/jpeg&quot; style=&quot;width: 500px; height: 301px;&quot;/&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;text-align: center; clear: none; float: none;&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;ul style=&quot;list-style-type: square;&quot;&gt;&lt;li&gt;&lt;p style=&quot;text-align: left; clear: none; float: none;&quot;&gt;A(0)는 일반적으로 사용되는 레지스터로, 기본적인 산술 연산에 활용된다. 누적기(Accumulator)이라 번역된다.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p style=&quot;text-align: left; clear: none; float: none;&quot;&gt;X(1)는&amp;nbsp;주소를 저장하고 계산하는데 사용되는 레지스터이다. 비유하자면, 'for(int i=0;i&amp;lt;10;i++){//code}'에서 i같은 역할을 한다.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p style=&quot;text-align: left; clear: none; float: none;&quot;&gt;L(2)은 Function call시 사용되던 스택과 같은 역할을 하는 것으로, 어떤 메모리로 점프 할지, return할 주소는 어디인지를 저장하는 역할을 한다. 링크 레지스터라고 한다.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p style=&quot;text-align: left; clear: none; float: none;&quot;&gt;PC(8)는 다음 작업(명령)이 저장되는 곳이다.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p style=&quot;text-align: left; clear: none; float: none;&quot;&gt;SW(9)는 컨디션 코드를 포함한 다양한 정보를 담고 있는 레지스터이다.&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p style=&quot;text-align: left; clear: none; float: none;&quot;&gt;SIC은 스택을 가지고 있지 않다. 따라서 linkage 레지스터에 돌아갈(return) Address를 저장한다. 그러다보니 recursive(재귀적) 프로그램은 작성하기가 쉽지않다.&lt;/p&gt;
&lt;p style=&quot;text-align: left; clear: none; float: none;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot;text-align: left; clear: none; float: none;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 12pt;&quot;&gt;SIC의 구조(Architecture) - 데이터 포멧(Data formats)&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p style=&quot;text-align: left; clear: none; float: none;&quot;&gt;SIC은 2가지의 데이터 포멧을 가지고 있다. Character과 Integer가 그것이다. Floating-point number는 지원하지 않는다. (확장된 버전인 SIC/XE에서는 지원한다.) 모든 Character는 8bit로 된 &lt;a href=&quot;http://en.wikipedia.org/wiki/ASCII&quot; target=&quot;_blank&quot; class=&quot;tx-link&quot;&gt;ASCII&lt;/a&gt;코드로 관리된다. Integer는 24bit의 2진수로 관리된다. 현대의 모든 컴퓨터들이 그렇듯, 음수는 2의 보수(&lt;a href=&quot;http://en.wikipedia.org/wiki/Two's_complement&quot; target=&quot;_blank&quot; class=&quot;tx-link&quot;&gt;2`s complement&lt;/a&gt;)로 표현한다.&lt;/p&gt;
&lt;p style=&quot;text-align: left; clear: none; float: none;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot;text-align: left; clear: none; float: none;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 12pt;&quot;&gt;SIC의 구조(Architecture) - 명령어 포멧(Instruction formats)과 주소 모드(Addressing mode)&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p style=&quot;text-align: left; clear: none; float: none;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot;text-align: center; clear: none; float: none;&quot;&gt;&lt;span style=&quot;text-align: center;&quot;&gt;&amp;lt;SIC Machine Architecture -&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;text-align: left;&quot;&gt;Instruction format&lt;/span&gt;&lt;span style=&quot;text-align: center;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;text-align: center; clear: none; float: none;&quot;&gt;&lt;span class=&quot;imageblock&quot; style=&quot;display: inline-block; width: 500px; width: 500px; height: 33px;; height: auto; max-width: 100%;&quot;&gt;&lt;img src=&quot;https://t1.daumcdn.net/cfile/tistory/22724A3753172DA715&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Ft1.daumcdn.net%2Fcfile%2Ftistory%2F22724A3753172DA715&quot; width=&quot;500&quot; height=&quot;33&quot; filename=&quot;그림3.png&quot; filemime=&quot;image/jpeg&quot; style=&quot;width: 500px; height: 33px;&quot;/&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;text-align: left; clear: none; float: none;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot;text-align: left; clear: none; float: none;&quot;&gt;명령어 포멧은 24bit로 되어 있다. 제일 앞 8자리는 opcode로 어떤 명령을 내릴 것인가를 나타내며, X는 Index-Address mode를 나타내는 플래그로, 1이면 Index-Address mode로 동작하며, 0이면 직접(Direct) 주소를 나타낸다. 직접 주소는 그 주소를 직접 사용하는데 반해, 인덱스 주소는 해당 주소에 Index 레지스터의 값을 더한 것을 주소로 사용한다. ( 주소 + X:인데스 레지스터의 주소&amp;nbsp;) 이러한 instruction format을 1세대 언어에서는 그대로 사용하였다.&lt;/p&gt;
&lt;p style=&quot;text-align: left; clear: none; float: none;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot;text-align: left; clear: none; float: none;&quot;&gt;&lt;span style=&quot;font-size: 12pt;&quot;&gt;&lt;b&gt;SIC Machine 명령어 종류(Instruction Type)&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;text-align: left; clear: none; float: none;&quot;&gt;1세대 언어에서는 위의 Instruction format을 그대로 사용하였지만, 우리는 &lt;a href=&quot;http://ko.wikipedia.org/wiki/%EC%96%B4%EC%85%88%EB%B8%94%EB%A6%AC%EC%96%B4&quot; target=&quot;_blank&quot; class=&quot;tx-link&quot;&gt;Aseembly&lt;/a&gt;라는 2세대 언어를 사용하여 학습을 진행할 것이다.&amp;nbsp;SIC의 &lt;a href=&quot;http://ko.wikipedia.org/wiki/%EC%96%B4%EC%85%88%EB%B8%94%EB%A6%AC%EC%96%B4&quot; target=&quot;_blank&quot; class=&quot;tx-link&quot;&gt;Assembly&lt;/a&gt;명령어를 크게 종류(type)로 구분하면, 6가지로 구분 할 수 있다.&lt;/p&gt;&lt;ul style=&quot;list-style-type: square;&quot;&gt;&lt;li&gt;&lt;p style=&quot;text-align: left; clear: none; float: none;&quot;&gt;Load와 Store&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p style=&quot;text-align: left; clear: none; float: none;&quot;&gt;Arithmetic &amp;amp; Logic&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p style=&quot;text-align: left; clear: none; float: none;&quot;&gt;Comparison&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p style=&quot;text-align: left; clear: none; float: none;&quot;&gt;Conditional Jumps&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p style=&quot;text-align: left; clear: none; float: none;&quot;&gt;Subroutine Linkage&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p style=&quot;text-align: left; clear: none; float: none;&quot;&gt;I/O&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div style=&quot;text-align: right;&quot;&gt;참고 :&amp;nbsp;&lt;a href=&quot;http://www-rohan.sdsu.edu/~stremler/2003_CS530/SicInstructions.html&quot; target=&quot;_blank&quot; class=&quot;tx-link&quot;&gt;http://www-rohan.sdsu.edu/~stremler/2003_CS530/SicInstructions.html&lt;/a&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;
&lt;p style=&quot;text-align: left; clear: none; float: none;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot;text-align: left; clear: none; float: none;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 12pt;&quot;&gt;SIC 명령어 -&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: transparent; font-size: 12pt; line-height: 1.5;&quot;&gt;Load와 Store&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p style=&quot;text-align: left; clear: none; float: none;&quot;&gt;LDA, LDX, STA, STX 이렇게 4가지만 우선&amp;nbsp;살펴보자. (다른 명령어도 존재한다.)&lt;/p&gt;
&lt;p style=&quot;text-align: left; clear: none; float: none;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot;text-align: center; clear: none; float: none;&quot;&gt;&lt;span class=&quot;imageblock&quot; style=&quot;display: inline-block; width: 500px; text-align: center; background-color: transparent; font-size: 9pt; line-height: 1.5; width: 500px; height: 106px;; height: auto; max-width: 100%;&quot;&gt;&lt;img src=&quot;https://t1.daumcdn.net/cfile/tistory/21785F3A5317339D26&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Ft1.daumcdn.net%2Fcfile%2Ftistory%2F21785F3A5317339D26&quot; width=&quot;500&quot; height=&quot;106&quot; filename=&quot;그림4.png&quot; filemime=&quot;image/jpeg&quot; style=&quot;text-align: center; background-color: transparent; font-size: 9pt; line-height: 1.5; width: 500px; height: 106px;&quot;/&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;text-align: left; clear: none; float: none;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot;text-align: left; clear: none; float: none;&quot;&gt;LDA ALPHA란 데이터를 ALPHA에 가서 값을&amp;nbsp;&lt;b&gt;L&lt;/b&gt;oa&lt;b&gt;D&lt;/b&gt;하여&lt;b&gt;&amp;nbsp;&lt;/b&gt;&lt;b style=&quot;font-size: 9pt; line-height: 1.5;&quot;&gt;A&lt;/b&gt;&lt;span style=&quot;font-size: 9pt; line-height: 1.5;&quot;&gt;에 집어넣어란 명령어이다. 이때, ALPHA에 가서라는 것은, 저 ALPHA의 주소로 가서 value를 읽어오라는 것을 의미한다.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: transparent; font-size: 9pt; line-height: 1.5;&quot;&gt;LDX도 조금 주체가 바뀔 뿐 동일하다.&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;text-align: left; clear: none; float: none;&quot;&gt;&lt;span style=&quot;background-color: transparent; font-size: 9pt; line-height: 1.5;&quot;&gt;STA GAMMA란 데이터를 &lt;b&gt;A&lt;/b&gt;가서 값을 읽어 &lt;b&gt;ST&lt;/b&gt;ore in&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: transparent; font-size: 9pt; line-height: 1.5;&quot;&gt;GAMMA&lt;/span&gt;&lt;span style=&quot;background-color: transparent; font-size: 9pt; line-height: 1.5;&quot;&gt;&amp;nbsp;하라는 의미이다. STX도 주체가 바뀌지만 역시 동일하다.&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;text-align: left; clear: none; float: none;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot;text-align: left; clear: none; float: none;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot;text-align: center; clear: none; float: none;&quot;&gt;&lt;span class=&quot;imageblock&quot; style=&quot;display: inline-block; width: 650px; width: 650px; height: 119px;; height: auto; max-width: 100%;&quot;&gt;&lt;img src=&quot;https://t1.daumcdn.net/cfile/tistory/27345F3A53173FD113&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Ft1.daumcdn.net%2Fcfile%2Ftistory%2F27345F3A53173FD113&quot; width=&quot;650&quot; height=&quot;119&quot; filename=&quot;그림6.png&quot; filemime=&quot;image/jpeg&quot; style=&quot;width: 650px; height: 119px;&quot;/&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;text-align: left; clear: none; float: none;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot;text-align: left; clear: none; float: none;&quot;&gt;위의 내용이 이해가 되었다면 아래 LDL,STL,STSW는 무리없이 이해할 수 있다. 그러나 LDCH와 STCH는 조금 고민해야하는데, register는 24bit고, 이곳에 byte(8bit)를 저장하기 위해서는 어딘가가 잘려야 한다. 이때 잘리는 부분은 앞의 16자리로, 맨 우측, 즉 가장 뒤의 8자리만 저장되고 로드된다. 이 부분만 이해하면 똑같이 STCH와 LDCH도 이해할 수 있을 것이다.&lt;/p&gt;
&lt;p style=&quot;text-align: left; clear: none; float: none;&quot;&gt;&lt;span style=&quot;background-color: transparent; font-size: 9pt; line-height: 1.5;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;text-align: left; clear: none; float: none;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 12pt;&quot;&gt;SIC 명령어 -&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: 12pt; line-height: 1.5; background-color: transparent;&quot;&gt;Arithmetic&lt;/span&gt;&lt;span style=&quot;background-color: transparent; font-size: 12pt; line-height: 1.5;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: transparent; font-size: 12pt; line-height: 1.5;&quot;&gt;&amp;amp; Logic&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p style=&quot;text-align: left; clear: none; float: none;&quot;&gt;이 명령어들은 모두 A 레지스터와 관련이 있는 것으로, A를 주어로 생각하면&amp;nbsp;해석하기 편하다. 항상 A는 생략되었다 생각하자.&lt;/p&gt;
&lt;p style=&quot;text-align: left; clear: none; float: none;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot;text-align: center; clear: none; float: none;&quot;&gt;&lt;span class=&quot;imageblock&quot; style=&quot;display: inline-block; width: 500px; width: 500px; height: 139px;; height: auto; max-width: 100%;&quot;&gt;&lt;img src=&quot;https://t1.daumcdn.net/cfile/tistory/23189241531737B525&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Ft1.daumcdn.net%2Fcfile%2Ftistory%2F23189241531737B525&quot; width=&quot;500&quot; height=&quot;139&quot; filename=&quot;그림5.png&quot; filemime=&quot;image/jpeg&quot; style=&quot;width: 500px; height: 139px;&quot;/&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;text-align: left; clear: none; float: none;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot;text-align: left; clear: none; float: none;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 12pt;&quot;&gt;SIC 명령어 -&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: transparent; font-size: 12pt; line-height: 1.5;&quot;&gt;Comparison&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p style=&quot;text-align: left; clear: none; float: none;&quot;&gt;이 타입엔 2가지 명령어가 있다. 하나는 COMP, 다른 하나는 TIX이다. COMP는 비교를 하는 것으로,&lt;/p&gt;
&lt;p style=&quot;text-align: left; clear: none; float: none;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot;text-align: center; clear: none; float: none;&quot;&gt;&lt;span class=&quot;imageblock&quot; style=&quot;display: inline-block; width: 500px; width: 500px; height: 79px;; height: auto; max-width: 100%;&quot;&gt;&lt;img src=&quot;https://t1.daumcdn.net/cfile/tistory/222E13435317426C2B&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Ft1.daumcdn.net%2Fcfile%2Ftistory%2F222E13435317426C2B&quot; width=&quot;500&quot; height=&quot;79&quot; filename=&quot;그림7.png&quot; filemime=&quot;image/jpeg&quot; style=&quot;width: 500px; height: 79px;&quot;/&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;text-align: left; clear: none; float: none;&quot;&gt;비교되어 나온 값(크다, 작다, 같다 같은.)을 SW 레지스터의 Condition code에 저장한다.&lt;/p&gt;
&lt;p style=&quot;text-align: left; clear: none; float: none;&quot;&gt;TIX는 X에 1을 증가시킨 후, X가 가리키는 값과 ALPHA를 비교 한다고 생각하면 된다.&lt;/p&gt;
&lt;p style=&quot;text-align: left; clear: none; float: none;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot;text-align: left; clear: none; float: none;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 12pt;&quot;&gt;SIC 명령어 -&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: transparent; font-size: 12pt; line-height: 1.5;&quot;&gt;Conditional Jumps&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;CC(of SW)에 따라 점프하는 명령어이다.&lt;/p&gt;
&lt;p style=&quot;text-align: center; clear: none; float: none;&quot;&gt;&lt;span class=&quot;imageblock&quot; style=&quot;display: inline-block; width: 500px; width: 500px; height: 126px;; height: auto; max-width: 100%;&quot;&gt;&lt;img src=&quot;https://t1.daumcdn.net/cfile/tistory/225B2C45531745230B&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Ft1.daumcdn.net%2Fcfile%2Ftistory%2F225B2C45531745230B&quot; width=&quot;500&quot; height=&quot;126&quot; filename=&quot;그림8.png&quot; filemime=&quot;image/jpeg&quot; style=&quot;width: 500px; height: 126px;&quot;/&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style=&quot;background-color: transparent; font-size: 9pt; line-height: 1.5;&quot;&gt;J는 CC에 관계없이 다음 명령인 PC에 ALPHA를 넣는다. JLT,JGT,JEQ는 조건에 따라 결정되는데, 이전 COMP명령어에서 A 레지스터가 주체였으므로, JLT는 'A레지스터 값이&amp;nbsp;더 작다면'으로, JGT는 'A레지스터 값이 더 크다면', JEQ는 'A레지스터 값과 같다면'으로 해석될 수 있다. (위의 예의 ALPHA와 이 예의 ALPHA는 다른 ALPHA로 아무런 관계가 없다. 편의상 사용한 것.)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style=&quot;background-color: transparent; font-size: 9pt; line-height: 1.5;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;span style=&quot;font-size: 12pt;&quot;&gt;SIC 명령어 - S&lt;/span&gt;&lt;span style=&quot;background-color: transparent; font-size: 12pt; line-height: 1.5;&quot;&gt;ubroutine Linkage&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p style=&quot;text-align: center; clear: none; float: none;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot;text-align: center; clear: none; float: none;&quot;&gt;&lt;span class=&quot;imageblock&quot; style=&quot;display: inline-block; width: 400px; width: 400px; height: 89px;; height: auto; max-width: 100%;&quot;&gt;&lt;img src=&quot;https://t1.daumcdn.net/cfile/tistory/215D123E5317494E26&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Ft1.daumcdn.net%2Fcfile%2Ftistory%2F215D123E5317494E26&quot; width=&quot;400&quot; height=&quot;89&quot; filename=&quot;그림10.png&quot; filemime=&quot;image/jpeg&quot; style=&quot;width: 400px; height: 89px;&quot;/&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;text-align: left; clear: none; float: none;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot;text-align: left; clear: none; float: none;&quot;&gt;위의 코드&amp;nbsp;&lt;span style=&quot;background-color: transparent; font-size: 9pt; line-height: 1.5;&quot;&gt;JSUB READ는 일단 L(링커; 리턴 할때 찾아 갈 값 보관용) 레지스터에 다음 할 명령이었던 PC를 저장해두고, PC에 READ란 서브루틴을 부른다. 그리고 READ의 명령들을 수행한 후, 다시 원래의 루틴으로 L레지스터의 값을 참조해 돌아온다.&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;text-align: left; clear: none; float: none;&quot;&gt;&lt;span style=&quot;background-color: transparent; font-size: 9pt; line-height: 1.5;&quot;&gt;RSUB는 리턴과 유사한 의미라 보면된다.&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;text-align: left; clear: none; float: none;&quot;&gt;&lt;span style=&quot;background-color: transparent; font-size: 9pt; line-height: 1.5;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;text-align: left; clear: none; float: none;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 12pt;&quot;&gt;SIC 명령어 - I/O&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p style=&quot;text-align: left; clear: none; float: none;&quot;&gt;인풋과 아웃풋은 한번에 1바이트씩만 전송되며, A레지스터의 마지막 1바이트(8비트)를 사용한다. 모든 디바이스는 각각을 구별하기위해 unique한 8비트의 코드가 부여된다. 따라서 구별되는 한도 내,&amp;nbsp;최대 2의 8승개의 디바이스가 붙을 수 있다.&lt;/p&gt;
&lt;p style=&quot;text-align: left; clear: none; float: none;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot;text-align: center; clear: none; float: none;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot;text-align: center; clear: none; float: none;&quot;&gt;&lt;span class=&quot;imageblock&quot; style=&quot;display: inline-block; width: 607px; width: 607px; height: 130px;; height: auto; max-width: 100%;&quot;&gt;&lt;img src=&quot;https://t1.daumcdn.net/cfile/tistory/267CD24A53174E030D&quot; srcset=&quot;https://img1.daumcdn.net/thumb/R1280x0/?scode=mtistory2&amp;fname=https%3A%2F%2Ft1.daumcdn.net%2Fcfile%2Ftistory%2F267CD24A53174E030D&quot; width=&quot;607&quot; height=&quot;130&quot; filename=&quot;그림12.png&quot; filemime=&quot;image/jpeg&quot; style=&quot;width: 607px; height: 130px;&quot;/&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot;text-align: center; clear: none; float: none;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot;text-align: left; clear: none; float: none;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot;text-align: left; clear: none; float: none;&quot;&gt;TD INDEV는 INDEV란 디바이스를 테스트하는 명령이다. 이 테스트의 결과는 CC에 저장되며, &amp;lt;(LT)라면 디바이스가 레디된 상태, =(EQ)라면 아직 준비가 되지 못한&amp;nbsp;상태를 뜻한다. RD는 디바이스에서 1byte를 읽어 A 레지스터 가장 마지막 1byte에 저장하란 뜻이고, WD는 A 레지스터의 값을 내보내는 명령이다. 1바이트씩만 처리되므로, 여러바이트는 반복으로&amp;nbsp;처리해주어야 한다.&lt;/p&gt;
&lt;p style=&quot;text-align: left; clear: none; float: none;&quot;&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p style=&quot;text-align: left; clear: none; float: none;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 12pt;&quot;&gt;Define Storage&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p style=&quot;text-align: left; clear: none; float: none;&quot;&gt;4가지로 Reserve를 할 수 있다.&lt;/p&gt;&lt;ul style=&quot;list-style-type: square;&quot;&gt;&lt;li&gt;&lt;p style=&quot;text-align: left; clear: none; float: none;&quot;&gt;BYTE : 문자 혹은 16진수 상수를 생성한다.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p style=&quot;text-align: left; clear: none; float: none;&quot;&gt;WORD : 한 워드 정수 상수를 생성한다.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p style=&quot;text-align: left; clear: none; float: none;&quot;&gt;RESB : 지정해준 수만큼의 바이트들을 예약한다.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p style=&quot;text-align: left; clear: none; float: none;&quot;&gt;RESW : 지정해준 수만큼의 워드들을 예약한다.&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;예를 들어 생각해보자.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;ALPHA&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;RESW&amp;nbsp; &amp;nbsp; 1&amp;nbsp; &amp;nbsp; =&amp;gt; 1 만큼의 워드를 예약.&lt;/div&gt;&lt;div&gt;FIVE&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;WORD&amp;nbsp; &amp;nbsp; 5&amp;nbsp; &amp;nbsp; =&amp;gt; 상수 5 생성.&lt;/div&gt;&lt;div&gt;CHARZ &amp;nbsp; BYTE&amp;nbsp; &amp;nbsp; C'Z'&amp;nbsp; &amp;nbsp; =&amp;gt; 캐릭터 상수 Z 생성.&lt;/div&gt;&lt;div&gt;C1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RESB&amp;nbsp; &amp;nbsp; 1&amp;nbsp; &amp;nbsp; =&amp;gt; 1만큼의 바이트 예약.&lt;/div&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</description>
      <category>Engineering</category>
      <category>addressing mode</category>
      <category>architecture</category>
      <category>Arithmetic</category>
      <category>Comparison</category>
      <category>Data Format</category>
      <category>Define Storage</category>
      <category>instruction</category>
      <category>JSUB</category>
      <category>LDCH</category>
      <category>load</category>
      <category>Memory</category>
      <category>Register</category>
      <category>RESB</category>
      <category>RESW</category>
      <category>rsub</category>
      <category>SIC</category>
      <category>SIC/XE</category>
      <category>STCH</category>
      <category>store</category>
      <category>Subroutine</category>
      <category>데이터 포멧</category>
      <category>레지스터</category>
      <category>메모리</category>
      <category>명령어 포멧</category>
      <category>주소 모드</category>
      <author>youngkyu.cho</author>
      <guid isPermaLink="true">https://youngkyu.tistory.com/7</guid>
      <comments>https://youngkyu.tistory.com/7#entry7comment</comments>
      <pubDate>Thu, 6 Mar 2014 01:39:26 +0900</pubDate>
    </item>
  </channel>
</rss>