<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <title>소프트웨어 이야기</title>
    <link>https://software-creator.tistory.com/</link>
    <description></description>
    <language>ko</language>
    <pubDate>Sun, 17 May 2026 07:50:28 +0900</pubDate>
    <generator>TISTORY</generator>
    <ttl>100</ttl>
    <managingEditor>에드 신</managingEditor>
    <image>
      <title>소프트웨어 이야기</title>
      <url>https://tistory1.daumcdn.net/tistory/2949782/attach/bcd93d9986bb4d829e254624a121c1ba</url>
      <link>https://software-creator.tistory.com</link>
    </image>
    <item>
      <title>현 시점에서 코딩 능력은 GPT Pro 코덱스 5.4가 클로드 오퍼스 4.6보다 훨 낫네요.</title>
      <link>https://software-creator.tistory.com/40</link>
      <description>&lt;p data-ke-size=&quot;size16&quot;&gt;다만 클로드가 시각화를 더 잘하고&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;말투가 이뻐서 그렇지&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;GPT 프로가 확실히 더 일잘러입니다.&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;저도 스타트업에서 일할때나&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;외주를 받아서 일을 할때&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;일단 UI부터, 디자인 작업부터 해주면&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;좋아했죠.&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;API, 백엔드, 스키마, 알고리즘 백날 이야기해도&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;고개는 끄덕이지만 소용 없었죠 ㅠㅠ&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;스택 오버플로우를 만든 분 중 한명인&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;제프&amp;nbsp;앳우드(Jeff&amp;nbsp;Atwood)도&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;IT 컨설턴트 및 개발자로 일할때&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;90퍼센트 내부 로직과 설계 해도&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;UI를 안 하면 사람들이&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;작업이 진행되지 않고 있다고 여겼다는 일화가 있죠.&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;이 현상이 현재 클로드 코드와 코덱스한테도&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;일어나고 있다고 봅니다.&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;개발 하시는 분들이나&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;리서치 하시는 분들은&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;코덱스(Codex)가 낫다는 점을 확연히 느끼실 거 같고&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;클로드 오퍼스는 할루시네이션도 있고&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;토큰 대비 좀 아쉽긴 합니다.&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;근데 이쁘게 나오는 건 클로드 ㄷㄷㄷ&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;장사는 클로드처럼..&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;</description>
      <category>기타</category>
      <category>Claude</category>
      <category>Codex</category>
      <category>코덱스</category>
      <category>클로드</category>
      <author>에드 신</author>
      <guid isPermaLink="true">https://software-creator.tistory.com/40</guid>
      <comments>https://software-creator.tistory.com/40#entry40comment</comments>
      <pubDate>Wed, 15 Apr 2026 18:35:24 +0900</pubDate>
    </item>
    <item>
      <title>엔비디아 창업자 젠슨황이 말하는 1000조원 가치의 기업을 만든 과정 - 비전은 중요하다</title>
      <link>https://software-creator.tistory.com/38</link>
      <description>&lt;div data-pm-slice=&quot;0 0 []&quot; data-en-clipboard=&quot;true&quot;&gt;평소 엔비디아(NVIDIA)가 어떻게 성장했는지 궁금했던 점이 많았습니다. 그러다 젠슨황이 2009년에 한 강의를 접하게 되었네요. 아직 엔비디아가 적당히 컸던 시절이지요. 그때 엔비디아 주식이 2달러니 지금까지 가지고 있으면 200배가 올랐겠네요.&lt;/div&gt;
&lt;div&gt;강의에선 엔비디아의 창업 과정과 미래에 대해 논합니다. 확실히 일반적인 사람과는 다르다는 생각이 들더군요. 통찰력이 있습니다. 다 듣고 나면 '관점'에 대해 생각해볼 수 있는 강의입니다.&amp;nbsp; 또한 어떤 결정을 내렸기에 인공지능 산업에서 없어서는 안될 필수품이 되었는지 뒷배경도 들어볼 수 있죠.&lt;/div&gt;
&lt;div&gt;그럼 젠슨황의 이야기를 들어보러 가실까요?&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;아래 내용은 2009년 스탠포드 기업가 정신 수업 중의 일부입니다. 참고로 약간의 축약과 의역이 있습니다.&lt;/div&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;------------------&lt;/p&gt;
&lt;div&gt;&lt;b&gt;티나&lt;/b&gt; : 오늘의 게스트를 소개합니다. NVIDIA(엔비디아)의 공동 창업자인 젠슨 황입니다. 18년전 그는 여러분이 앉아 있는 곳에 있었어요. 전자공학 석사 과정 학생으로 있었죠. 졸업 후 2년 뒤에 회사를 세웠습니다. 그때 이후로 CEO이자 이사회 일원으로 있었습니다.&amp;nbsp; 또 하나 놀라운 점은 엔지니어링 건물 빌딩을 위해 크게 기부 했다는 점입니다. 3천만 달러를&amp;nbsp; 기부했습니다. 여러분도 18년 뒤에 같은 일을 할 수 있기를 바랍니다. 그럼 젠슨황입니다.&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;&lt;b&gt;젠슨황&lt;/b&gt; : 감사합니다, 티나. 전 마지막 1원까지 다 빌딩에 주었습니다. 공식적으로 빈털털이죠.&amp;nbsp; 오늘은 회사 소개를 하지 않고, 여러분과 대화를 하려고 합니다. 질문이 있으면 무엇이든 상관없으니 얼마든지 질문을 해주세요.&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;많은 사람들이 창업에 대해 말합니다. 제가 직접 경험한 바에 따르면 회사를 세우는 건 대단히 기쁜 일입니다. 동시에 굉장히 힘듭니다. 회사를 만드는 과정은 광범위 합니다. 여러가지 다른 관점에서 말을 할 수 있죠.&amp;nbsp; 그렇기에 제 경험에 특히 중요하다고 생각되는 점을 다뤄보려고 합니다.&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;16년 전에, 엔비디아에는 3명이 있었습니다. 모두 엔지니어였죠. 저도 그 중 하나였구요. 그리고 우린 관점(perspective)이 있었습니다. 우리가 엔비디아를 시작했을때 어떠한 통찰이 있었는데 어떤 사람들은 이를 비전이라고 부릅니다. 비전은 내게 너무 커다란 말입니다. 비전은 너무 커다란 말인데 왜냐하면, 비전은 중요하기 때문입니다. 하지만 저는 관점(perspective)이라는 말을 쓰기를 더 좋아합니다. 왜냐하면 모든 사람이 관점을 가질 수 있기 때문입니다. 비전이란 말을 하면, 몇몇 선택된 비저너리들만 가질 수 있는 듯한 느낌을 줍니다. 하지만 모든 사람은 관점을 가지고 있습니다. 사실 이게 모든 비전이 의미하는 바입니다.&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;다른 사람과 다른 관점으로 세상을 보는 게 바로 관점입니다.&amp;nbsp; 남들이 보지 못하지만 당신이 중요하게 생각하는 기회를 보고, 그것을 추구하는게 관점입니다.&amp;nbsp; 1993년 당시 우리의&amp;nbsp; 관점은 이것이었습니다. 그때 PC는 윈도우즈 3.1이었고 CD롬은 막 소개되려던 참이었습니다. 인터넷이 있는 컴퓨터는 존재하지 않았죠. 무선 통신이라고 하면 FM라디오를 떠올리게 했습니다. 무선 인터넷은 없었죠. 가장 빠른 마이크프로세서는 486DX2 였고 66MZ (메가헤르츠)였습니다. 오늘날에는 테니스 신발에도 쓸 수 없는 수준이죠. 우리는 그 마이크로 프로세서로 컴퓨터를 돌렸습니다. PC는 사무실 자동화를 하기 위해 쓰이기 시작 했죠.&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;우리의 관점은 이 기기가 특별해질 거라는 점이었습니다. 프로그램을 돌리는 점에서요. 만약 PC에서 3D 그래픽 프로그램을 돌릴 수 있어, 새로운 세상을 탐험하고, 게임을 할 수 있게 된다면 어떨까요. 우리는 이런 계획을 가지고 사업을 시작했습니다. 우리는 가장 비싼 워크스테이션에서 돌릴 수 있는 기술을 저렴하게 만드는 게 목표였습니다. 킬러앱은 당연히 비디오 게임이었죠. 그래서 벤처투자자(Sand Hill Road )에게 이 아이디어를 이야기 했더니, 비디오 게임 시장이 없다더군요. 사람들은 게임을 하려고 회사를 시작하지 않는다면서요. 그리고 제 부모님은 회사를 시작한다는 소리를 듣고 물어보시더군요.&amp;nbsp; '너희들이 하려는게 뭐니?'.&amp;nbsp; 그래서 저는 대답했죠&amp;nbsp; '3D 그래픽 칩을 만들건데, 사람들이 이걸로 게임을 할거에요'&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;그랬더니 어머니가 말씀하셨죠.&amp;nbsp; '그냥 직장을 구하지 그러니?'&amp;nbsp;&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;물론 우리는 게임은 커다란 시장이 될거라고 믿었습니다. 우리는 다른 관점을 가졌는데 몇가지 이유에서였습니다. 일단 우리는 비디오 게임 세대였습니다. 비디오 게임을 하면서 자라났죠. 그래서 비디오 게임, 컴퓨터 게임이 주는 재미의 가치는 명백했죠. 이 시장이 얼마나 대단히 크게 될지 상상할 수 있었습니다. 대부분의 조금 더 나이든 사람에게는 이 감각이 존재하지 않았어요&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;비디오 게임이 가장 큰 미디어 산업이란 건 오늘날에는 명백한 사실입니다. 하지만 당시에는 우리가 가진 상식은 독특한 것이었습니다. 아무도 그 기술을 만들지 않은 상태였죠. 아무도 비디오 게임에 필요한 기술을 위해 회사를 세우지 않았습니다. 그게 바로 우리의 관점이었습니다. 우리는 비디오 게임 세계를 느꼈고, 기술의 발달을 느꼈습니다. 제가 가장 좋아했던 애플리케이션은 키홀(Keyhole)이라 불리는 회사였습니다. 5년전이었죠. 키홀은 가상현실에 대한 실리콘 밸리 회사인데 3D 가상 공간을 만드는 회사였습니다. 주소를 입력하기만 하면 어디서나 지구를 볼 수 있고, 어떤 장소든 볼 수 있습니다. 전 이 회사가 놀라운 일을 해낼 수 있다고 믿었지만 전혀 투자를 받지 못했습니다. 그래서 우리는 투자를 했습니다. 이 작은 회사는 결국 구글이 사갔고 구글 어스가 되었습니다. 구글 어스는 세상에서 가장 많이 다운로드 되었고 많이 쓰이는 어플리케이션 중 하나입니다. 2억 다운로드에 가까깝죠. 3D 그래픽은 비디오 게임 그 이상입니다.&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;비전 그러니까 당시 엔비디아의 관점은 독특했고, 팔기가 어려웠습니다. 우리는 벤처 투자자들에게 가서 설명하고, 이 기술이 어디까지 갈 수 있는지, 얼마나 시장은 클지 알려야 했습니다.&amp;nbsp; 어떻게 당시에는 시장 크기가 명백히 0인 시장의 크기를 잴 수 있을까요? 애널리스트 리포트나 마켓 리서치를 보면 시장이 0이라고 말합니다.&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;벤처 투자자들과 창업자들이&amp;nbsp; 함께 독려하고 방법을&amp;nbsp; 찾아내야 하는 일이었습니다. 세콰이어 캐피탈(Sequoia Capital)과 셔터 힐(Sutter Hill)이 투자를 해주었습니다. 이들과 함께 우린 2백만달러(25억)으로 회사를 시작하게 됩니다.&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;관점에 관해서는 흥미로운 이야기가 또 있습니다.&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;몇년 뒤의 일입니다. 세콰이아 캐피털이 제게 와서는 묻더군요. 스탠포드에 있는 애들인데, 뭔가 있는데 인터넷 관련된거라고 하더군요. 그래서 제가 말했죠. '노란색 페이지 말이죠?' 당시에는 여러 버전의 웹페이지가 있었습니다. 세콰이어 캐피털이 물어았습니다. '이 회사에 투자해야할까요?' 그래서 제가 말했죠. '이 친구들이 돈을 벌 수 있는 어떤 방법도 없어요. 이 웹사이트들은 공짜입니다. 그렇죠?' 그랬더니 세콰이어 캐피털이 말하길 '우리는 돈 벌 방법을 찾지 못하겠지만 엄청 비용이 들지는 않으니까요. 1백만 달러나 2백만 달러만 투자해 볼 거에요.'&amp;nbsp; 이 회사는 야후라고 불리는 회사가 됩니다.&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;제가 1가지에 대해 관점을 가지고는 있었지만 다른 것에 대해서는 관점이 없었다는 걸 알아 차렸을 겁니다.&amp;nbsp; 하나에 대해 비저너리라고 해서 모든 것에 대해 비저너리라는 건 아닙니다.&amp;nbsp; 당신의 관점은 당신만의 인생 경험에서 옵니다. 당신에게 상식적인 것이고, 흥미로운 것이고, 중요한 것이 있다면 당신에게도 비전이 있는 것입니다.&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;이 웹사이트들에 대해서 흥미로운 점이 있습니다. 야후의 이야기를 따라가보죠. 기억하겠지만, 전에는 여러 종류의 검색 엔진이 있었습니다. 알타 비스타(Alta Vista)도 있었고, 익사이트(Excite)도 있었고 라이코스(Lycos)도 있었죠. 이들은 각자 검색엔진 역할을 잘 수행했습니다. 그럼 이제 질문은 그들의 관점은 무엇이었냐는 것입니다. 이들의 관점은 각자 어떻게 달랐을까요?&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;한 웹사이트는 자신을 목적지로 보았습니다. 컨텐츠를 가져다 주는 곳으로 보았죠. 그러니 검색 엔진은 상품의 일부에 불과했습니다. 그래서 아웃소싱을 했습니다. 모든 검색 엔진은 검색으로 시작했지만 목적지로 변하거나, 포탈로 변했습니다. 이들은 검색을 아웃소싱 했습니다. 이 덕분에 구글이 시작할 수 있었습니다.&amp;nbsp; 알아차렸겠지만&amp;nbsp; 두 회사가 동일한 것을 시작합니다. 동일한 핵심 기술을 가지고 말이죠. 하지만 완전히 다른 곳에 도달하게 됩니다. 이들이 서로 다른 관점을 지녔기 때문이죠. 이들은 세상을 전혀 다르게 봅니다. 그러니 관점은 중요합니다. 비전도 중요합니다.&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;우리가 회사를 시작한 뒤 얼마 지나지 않아 PC용 3D 그래픽은 중요한 것이 됩니다. 뜨거운 감자였죠. 실리콘 밸리에 있는 모든 이들이 3D 그래픽 회사를 시작합니다. 엔비디아는 1993년에 유일한 3D 그래픽 회사였지만, 1995년이 끝날 즈음에는 아마도 50, 70여개의 회사가 같은 일을 하고 있었습니다. 시간이 지나고 우리는 200여개의 회사와 경쟁을 하게 되었죠.&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;엔비디아는 오늘날 유일하게 살아 남은 컴퓨터 그래픽 회사입니다. 우리의 질문은 무슨 일이 있었는가 입니다. 경쟁은 치열했습니다. 모두들 똑똑한 사람들이었죠. 모두들 돈이 있었습니다. 우리는 IBM과 경쟁했고,&amp;nbsp; HP와도 경쟁했습니다. 실리콘 그래픽스와도 경쟁했죠. 소니, 3DFX, S3, Cirrus Logic 등 크고 작고 세계적이고 지역에 있는 온갖 회사들과 경쟁했습니다. 제가 보기에 300개의 회사들은 동일한 기술이 있었고, 동일한 수준의 사람들이 있었고, 실행했습니다. 적어도 300개 회사 중 50%의 회사는 어느 시점에 실행을 했습니다. 하지만 1개의 회사만 살아남은 까닭은 무엇일까요?&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;제 생각에는 관점을 가졌다는 점 때문이었습니다. 예를 하나 들어보죠. 우린 언제나 '왜 사업이 되는가'를 이해해야 한다고 믿었습니다. 사업의 본질은 무엇일까? 무엇이 사업이 되게 할까? 제 사업의 기반은 반도체 기술이었습니다. 반도체 기술은 실리콘밸리에서 흔히 '무어의 법칙'이라고 불립니다. '무어의 법칙'은 물리적인 법칙은 아니지만, 경쟁에 관한 법칙입니다. 엔지니어들이 격려하고 도전하게 하는 법칙입니다. 속도를 정하는 것에 대한 법칙이죠. '무어의 법칙'은 매년이나 2년에 한번 2배씩 성능을 늘릴 수 있게 합니다. 이는 매년이나 2년에 1번, 사업의 요소를 2배 증가시키고, 가격을 매년 1/2로 낮춥니다. 그럼 어떻게해야 살아남는 사업을 만들 수 있을까요?&amp;nbsp; 우리의 관점은 3D 그래픽은 더 많이 요구한다는 것이었습니다.&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;더 많이 요구하기에 매년 2배로 만들 수 있었습니다. 고객들이 너무 비싸서 관심이 없다고 할때 조차요. 하루는 델(Dell)과 HP와 IBM, 게이트웨이(GateWay)에 우리의 제품을 가지고 갔더니 모두 비싸서 살 수 없다고 했습니다. 고객들이 무언가를 하지 말라고 할때, 무엇을 하는게 맞았을까요?&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;우리는 3D 그래픽은 더 많은 것을 필요로 하고, 무어의 법칙이 우리를 도와줄 거라는 관점이었습니다. 따라서 매년 그래픽 처리장치를 매년 2배씩 향상시켰습니다. 회사를 세우고 첫 5년 동안, 고객을 말을 무시한채요. 어떤 마케팅 수업에서 고객을 무시하라고 가르칠까요? 가끔씩은 고객을 무시할 필요가 있습니다. 고객들도 비즈니스의 본질을 아직 모르고 있고, 산업이 막 생기는 때였으니까요. 누구도 이 비즈니스의 룰을 모르는 상황이었습니다. 우리는 마지막 몇백만 달러를 써서 하나의 칩을 만들었습니다.&amp;nbsp; 너무 비싼 칩이라서 만들어진 칩을 보여주기 전까지는 어떤 고객도 사려고 하지 않았습니다. 우리는 온 힘을 다해 칩을 만들었습니다. 다음 세대의 제품이 이전의 것을 잡아 먹을 때까지 계속 만들었습니다. 그리고 우리는 몇년동안 계속해서 성장했습니다.&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;지금은 어떨까요?&amp;nbsp; 혁신은 다소 위험한 것입니다. 새로운 좋은 아이디어를 떠올리면, 다른 좋은 아이디어가 나오고 이걸 갈고 닦아 점점 더 좋아지게 됩니다. 혁신이 노트북이든, 자동차이든, 마이크로 프로세서이든, 우리의 경우는 그래픽 프로세서였는데 매년 점점 더 좋아집니다. 어느 시점이 되면 더 좋아지기 어려운 시점이 됩니다. 반도체 기술은 이미 놀라운 진보를 했고 더 좋아지기 어려워졌죠. 이는 엔비디아에게는 90년대 말이었는데 회사를 세운지 6,7년 되는 시점이었죠.&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;전 3D 그래픽 장치가 단순히 화면에 텍스처맵이나 폴리곤을 그리는 기기만 되어서는 지속가능하지 않다고 보았습니다. 우리 엔비디아는 3D 그래픽 프로세서를 프로그래밍 가능하게 만들기로 결정했습니다. 3D 그래픽 프로세서는&amp;nbsp; '예술적인 표현'이 가능한 '매체'( medium)가 될 가능성이 있었습니다. 이상한 말입니다. 여기 우리는 엔지니어링 회사를 가지고, '예술적인 표현'이 가능하도록 칩을 바꾸려고 하고 있습니다.&amp;nbsp; 예술적인 매체, 그러니까 모든 비디오 게임과 애플리케이션이 다른 방식으로 개발될 수 있었다는 뜻입니다. 스타일적으로요.&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;우리 엔비디아는 우리가 컨텐츠가 더 풍부하고 흥미롭고, 스타일적으로 다르게 만들 수 없다면 우리의 매체(칩)의 발전은 한계가 있다고 보았습니다.&amp;nbsp; 우리의 매체가 한계에 달하면, 선두주자로서 우리도 끝이었습니다. 우리는 GPU를 프로그래밍 가능하도록 했습니다. '매체'(칩)가 예술적인 표현을 할 수 있도록 말이죠. 또 우리는 프로그래밍 가능한 '쉐이더'라는 기술을 개발했습니다.&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;모든 비디오 게임 하나 하나에서 우리가 남긴 흔적을 찾아볼 수 있습니다. 엑스박스 360이건 플레이스테이션3이건 PC게임이건 말이죠. 프로그래밍 가능한 쉐이더를 통해 게임 산업에 활기를 불어넣었습니다. 쉐이더가 무엇을 가능하게 했는지 보실 수 있습니다. 하지만 한세대의 기술에서 다음 세대의 기술로 건너가는 건 회사를 망하게 할 수도 있는 일입니다.&amp;nbsp;새로운 아이디어로 이끌었던 관점은 회사를 재창조하기도 했고, 회사를 위험에 빠뜨리기도 했습니다. 이는 이야기해볼만한 흥미로운 점입니다. 따라서&amp;nbsp;관점은 중요합니다.&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;회사가 커짐에 따라, 창업자 또는 CEO는 새로운 것을 배우는 법을 배워야합니다. 많은 새로운 것은 처음에는 제품을 만드는 것이지만, 곧 회사를 만드는 법에 관한 것이 됩니다. 회사를 만드는 것은 설명하기 쉬우면서도 어렵습니다. 회사를 문화를 만드는 것은 무슨 의미일까요?&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;어떻게 한 회사의 문화가 다른 회사의 문화와 다를 수 있을까요? 왜 이 문화는 당신의 회사에는 좋은데, 다른 회사에는 좋지 않을까요? 회사의 문화를 찾는 건 중요합니다. 직접 찾아내고 만들고 발전시켜야합니다.&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;그럼 어떻게 회사를 조직해야할까요? 우리는 이에 대해서 이야기 했었습니다. 기능에 따라 조직 되어있나요? 사업 단위로 조직되어 있나요? 다양한 제품과 세계 곳곳에 따른 차이와 여러 고객을 어떻게 다뤄야할까요? 이게 회사를 만드는 과정입니다. 기계적이기도 하고 흥미롭기도 하죠. 많은 시도와 실패가 있습니다. 자연스럽게 나타나기도 합니다. 사람들이 중요하고, 성격도 중요합니다. 가장 중요한 1가지만 고르자면 이것입니다. 회사와 제품을 만들때는 스킬도 중요하고, 지적능력도 중요하고,&amp;nbsp; 훈련도 중요 합니다만, 이것만으로는 안 됩니다. 회사를 만드는 게 도전적인 일이고, 고통스러울 뿐더러, 종종 대단히 무서운 일이기도 하다는 걸 깨닫는 것입니다.&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;이렇기에 열정이 있지 않는한, 회사를 만들고 제품을 만들어 가는 과정을 사랑하지 않는한, 이는 굉장히 굉장히 힘든 일이 됩니다. 회사를 세우기로 결정했다면 스스로에게 묻기를 바랍니다. 회사를 세우는 목적이 무엇인가요? 회사를 세우고, 그 회사를 팔아서 큰돈을 벌기 위해서인가요? 회사를 주식시장에 공개(IPO)하기 위함인가요? 연속 창업가라면, 회사를 만들고 다른 사람이 운영하고, 팔기를 원하는가요? 이유가 무엇이든간에 자기 자신에게 솔직해지기를 바랍니다. 저의 경우에는 무언가를 만드는 과정을 사랑했고, 무언가의 일부가 되는 것을 사랑했을 뿐입니다.&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;엔비디아( NVIDA)의 일부가 되고, 같이 일하는 사람들의 일부가 되고, 저를 활기차게 하는 이유들의 일부가 되는 것이 바로 제가 매우 긴 시간동안 기꺼이 할 일 들입니다. 16년간 이 상태에 있었고, CEO가 되고 회사 창업자가 되며 많은 것을 배웠습니다. 이제 질문을 받을 시간이 되었네요. 어떤 질문이든 해주세요.&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;&lt;b&gt;질문자&lt;/b&gt; : 투자자들이 회사를 재창조 하는 과정에 대해 무슨 말을 했나요? 프로그래밍 가능한 쉐이더를 더하고, 프로덕트 카테고리를 바꾸는 위험을 감수했을때 투자자들이 무슨 말을 했나요?&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;&lt;b&gt;젠슨황 &lt;/b&gt;: 우선, 이런 종류의 대화는 투자자들과 잘 하지 않습니다. 먼저 경영팀과 대화를 가지고, 같이 일하는 사람들고 이야기를 하는데 2번째 이고, 이사회는 3번째입니다. 제가 주로 택하는 방식입니다. 하이 테크 산업에 있으면 알게 됩니다. 테크놀로지(기술)의 변화 속도가 빠르기에, 스스로 재창조하지 않으면 천천히 죽어가게 되죠. 불행하게도 '무어의 법칙'은 우리가 아는 변화의 속도 중에서 가장 빠릅니다. '무어의 법칙'이 주는 복리 효과는 믿을 수 없을 정도죠.&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;성공적인 제품을 가지고 있어 돈을 왕창 번다고 해보죠. 이는 무서운 일이란 걸 저는 압니다. 성공적인 제품이 있다면 어떻게 스스로 잡아먹을 수 있을까 질문을 던져야합니다. 스스로 잡아먹지 않는다면 누군가가 할 겁니다. 이건 너무나도 명백합니다. 시장의 선두 주자가 되고자 한다면, 가장 먼저 자신의 제품을 잡아먹어야 하고, 이전의 아이디어를 잡아먹을 새로운 아이디어를 가지고 있어야합니다.&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;우리는 고정된 함수만 쓸 수 있는 그래픽 프로세서에서 시작해,&amp;nbsp;&amp;nbsp;퀘이크3나 둠 같은 게임에 들어가는 텍스처 맵핑을 위한 엔진, 프로그래밍 가능한 쉐어더 아키텍처까지 만들었습니다. 우리의 첫번째 칩은 회사를 거의 망하게 할뻔 했습니다. 지포스Fx(GeForceFx) 라는 제품이었죠.&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;이 그래픽 카드를 가지고 있는 분이 여기에 있는지 모르겠습니다만, 지포스Fx는 프로세서인데, 엄마만 사랑할 수 있는 아기처럼, 엉망인 제품이었죠. 지포스Fx를 만드는 과정에서 우리는 거의 망할 뻔 했습니다. 하지만 이 칩을 만들지 않았다면 엔비디아는 오늘날 이미 망했을 겁니다. 저는 이를 아주 크게 확신합니다. 엔비디아 역사에서 가장 큰 도박이었죠. 우리는 API를 만드는 대신에, 언어가 있는 프로세서를 만들었습니다. 우리는 이를 CG(C for Graphics)와 컴파일러라고 불렀죠. 이는 프로세서의 일종입니다. 우리는 처음에는 사람들이 이해하지 못한 프로그래밍 패러다임을 소개했습니다. 많은 홍보와 마케팅, 교육이 필요했죠. 하지만 CG를 만든 것은 전혀 예상치 못한 곳으로 우리를 이끌었습니다.&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;오늘날 GPU와 관련된 가장 중요한 일은 범용 컴퓨팅 (General purpose computing - 특정 목적이 아니라 일반적인 목적을 위한 컴퓨팅) 입니다. 우리가 보는 놀라운 일들은 CG에서 비롯되었습니다. CG를 시작하지 않았다면 일어나지 않았을 일들입니다. 그러니 도약을 해야합니다. 다음 질문?&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;(주 - CG가 있어 GPU를 인공지능 개발에 쓸 수 있게 되었다)&lt;/div&gt;
&lt;div&gt;(주 - 지포스Fx는 엔비디아의 흑역사로 불린다)&lt;/div&gt;
&lt;div&gt;(주 - API는 정해진 것만 쓸 수 있는데, 프로그래밍 언어가 있으면 자유롭게 편집할 수 있다)&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;&lt;b&gt;질문자&lt;/b&gt; : 게임이 PC에서 콘솔로 이동해가는게 보인다고 합니다. 소니나 닌텐도와 협상하기는 어렵지 않나요? 개개인에게 그래픽 카드를 파는 것보다요.&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;&lt;b&gt;젠슨황&lt;/b&gt; : 우리가 가격을 정하지 않습니다. 경쟁이 가격을 정합니다. 시장이 가격을 정하지 않습니다. 경쟁이 가격을 정합니다. 그러니 경쟁자가 플레이 스테이션3를 만들고자 한다면 그렇게 하게 두세요. 경제적 요인으로 인해 험난할 것입니다. 그리곤 결정하게 하세요. 이건 당신에게 경제적 이유입니까? 예를 들면, 우리가 특정 콘솔을 더 선호하고, 특정 콘솔은 그렇지 않다는 루머가 있습니다. 이건 우리에게 달려있습니다. 우리의 자원은 한정되어 있습니다. 매니저로서 당신에게 부족한 자원은 무엇인가요?&amp;nbsp; 매니저는 최대의 결과를 얻기 위해 자원을 할당하는 일을 합니다. 우리의 자원의 경우는 제한된 수의 탁월한 엔지니어만 있다는 것입니다. 이들이 하루에 쓸 수 있는 시간은 정해져 있습니다. 어떤 기회를 추구하는 간에요.&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;우리의 엔지니어로 할 수 있는 일보다 시장의 수요가 많다면 저는 분명히 열정적으로 되겠지요. 반대의 경우, 경제적으로 끔찍한데 게임 콘솔을 만들거나 어떤 프로젝트를 하는 건 할 만한 가치가 있는 일이 아닙니다.&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;저는 이를 경쟁이랑 무관하게 봅니다. 경쟁은 가격을 정합니다. 하지만 이 프로젝트에 참여하고 싶을지 아닐지는 직접 정해야합니다. 당신은 CEO 역할을 하고 있지요? 그렇다면 경제적인지 판단해야하고, 일단 판단했다면 그렇다고 보아야합니다. 그러니 무엇이 가장 중요한 자원인지 신중하게 생각해야합니다. 시장의 수요보다 더 많은 자원을 가지고 있나요? 적게 가지고 있나요? 당신이 가진 자원보다 더 많은 기회가 있나요 더 적은 기회가 있나요? 무엇이 적절한 투자 대비 이득인지 생각해야합니다. 단지 비용만이 아니라, 기회 비용도요. 우리는 매번 그 관점에서 바라봅니다.&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;&lt;b&gt;질문&lt;/b&gt; : 엔비디아에서 만드려고 한 문화에 대해서 말해주실 수 있나요?&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;&lt;b&gt;젠슨황&lt;/b&gt; : 좋은 질문입니다. 질문은 우리가 엔비디아에서 만드려고 한 문화였죠? 엔비디아의 성공의 핵심은 혁신입니다. 많은 회사는 혁신이 중요하다고 말하고, 발명이 중요하다고 말합니다. 하지만 저는 위험을 감수하는 문화가 있지 않은 한, 혁신을 장려하는 문화를 가지고 있다고 생각하지 않습니다.&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;엔지니어를 이끌고 격려하고, 마케팅 팀이나 우리의 모든 직원들이 계산된 위험을 감수할 수 있게 해야합니다. 계산된 위험을 감수할 수 있게 하려면, 무엇보다도 어떻게 하는지 가르쳐야합니다. 계산된 위험을 감수하는 건 스킬입니다. 스킬의 문제죠. 2번째 부분은 용기의 문제입니다. 대부분 사람들은 실패하는 걸 죽도록 싫어합니다. 여러분도 동의하시죠?&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;성공하고 싶다면 실패에 대한 내성을 키워야합니다. 실패에 대한 내성이란, 낮 12시까지 자고, 숙제를 하나도 안 하고, 모든 수업을 빼먹는 걸 말하진 않습니다. 제가 말한 건 정확히 계산하는게 불가능한 일이더라도, 직감을 따라보라는 의미입니다. 그게 성공으로 이끌 수도 있으니까요. 창업자나 많은 직원들의 직감을 따르지 않았다면, 엔비디아가 여기에 있지도 않았고 세상에 존재하지 않았던 것을 만들지도 않았습니다. 그러니 위험에 대한 내성이 있는 문화를 만들어야합니다. 허나 너무 자주 실패하게 된다면, 당신은 실패 자체가 될 수도 있습니다. 이건 성공하는 것과는 다릅니다. 문제는 빠르게 실패하지만, 막다른 골목에 도달했을때를 알자마자 방향을 바꾸는 법을 어떻게 가르치냐 입니다. 이렇게 하는 방법을 우리는 지적 정직함( intellectual honesty)라고 부릅니다. 우린 무엇이 합당한지 합당하지 않은지 지속적으로 확인합니다. 만약 잘못된 결정이라면 생각을 바꿉니다. 많은 사람들이 말하길 CEO는 항상 옳고, 생각을 바꾸지 않는다고 합니다. 이건 적어도 저에게는 해당하지 않는 일입니다, 특히 우리 회사가 나아가려는 방향에서 벗어날때는 말이죠.&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;혁신적인 회사는 놀라운 것을 만들어내고, 세상이 있는 줄도 몰랐던 문제를 해결합니다. 혁신적인 일을 하고 싶다면, 위험을 감수하는 문화를 만들고, 적은 비용으로 빠르게 실패하는 법을 가르쳐야합니다. 직설적으로 이게 잘못된 방향인지, 무엇이 더 나은 방향인지 말할 수 있어야하고, 방향을 빠르게 바꿀 수 있을만큼 유연해야 합니다.&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;이런 문화는 오늘날 인터넷 기반 회사에서는 필수적입니다. 오늘날 회사는 전세계의 회사들과 경쟁하고 24시간 7일간 경쟁합니다.&amp;nbsp; 위험을 감수하고, 시장에 따라 생각을 바꿀 수 있지 않을만큼 유연해야만 살아남을 수 있습니다. 방금 저는 오래된 회사와 새로 생긴 회사의 속성을 이야기 했습니다. 현대의 회사는, 구글을 예로 들면, 언제나 '베타버전'입니다. 구글은 온갖것을 실험합니다. 만약 구글이 완성된 제품이라고 말하면, 사람들은 화를 낼 것입니다. 그래서 구글은 이를 '베타'라고 부릅니다. '베타'라고 부르기에 온갖 것을 하고, 실패하면 빼버립니다. 좋지 않아도 빼버리죠. 효과가 있으면 더 합니다. 이렇듯 혁신은 약간의 실험이 필요합니다. 실험은 탐험을 필요로 하죠. 탐험은 실패로 끝나기도 하는데, 실패에 대한 내성이 없다면 절대로 실험을 하지 못합니다. 실험을 하지 못하면 절대 혁신을 할 수 없습니다. 혁신이 없다면 성공할 수 없고, 지루한 사람이 되겠지요. 이게 혁신입니다. 다른 질문 있나요?&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;&lt;b&gt;질문자&lt;/b&gt; : 어떻게 창업자나 초기 팀을 정했나요?&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;&lt;b&gt;젠슨황&lt;/b&gt;: 완전히 믿는 사람이 아닌 이상 같이 사업을 하지 마세요. 저의 공동 창업자 둘은 가장 가까운 동료들이었고, 저는 그들을 완전히 신뢰했습니다. 오늘날에도 가장 좋은 친구들이기도 합니다.&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;CEO로서 99%의 일은 사람을 선택하는 일입니다. 어떤 애플리케이션이 범용 컴퓨팅의 수요를 이끌까요? 이건 산업의 다음 단계에 관한 것입니다. GPU 컴퓨팅에서 우리는 무엇을 보고 있을까요? GPU 컴퓨팅은 GPU를 단지 그래픽에만 쓰는 게 아닙니다. 그래픽을 처리하는 방법 중에는 컴퓨터 그래픽 연산이라는 방법이 있습니다. 이미지를 만들기 위해 프로그램을 사용하죠. 알고리즘은 더이상 실리콘 칩에 있지 않습니다. 알고리즘은 실제로는 소프트웨어입니다.&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;알고리즘은 엠비언트 오클루젼(ambient occlusion), 레이 트레이싱 (ray tracing), 사람들이 훗날 탐험할 모든 종류의 흥미로운 것일 수도 있습니다. 우리가 지포스FX를 만들었을때, 지포스는 그래픽처리에 있어 성공적인 GPU는 아니었습니다. 하지만 전세계의 연구자들은 GPU에 CG(C for graphics)라고 불리는 프로그래밍 언어가 있다는 걸 알아차렸죠. CG를 이용하면 GPU에 그래픽 처리말고 다른 것을 하게 할 수 있었습니다. 또 32비트 부동소숫점을 가지고 있었죠. 몇몇 똑똑한 연구자들, 많은 이들이 여기 스탠포드에 있는데, 그래픽 카드를 사서 프로그램을 작성하기 시작했습니다. 그리고 이 연구자들은 정말 열심히 일했고, 온갖 알고리즘 기술을 썼고, 20배나 빠르게 프로그램을 돌릴 수 있게 되었습니다. 어떻게 프로그램을 20배나 빠르게 할 수 있을까요?&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;(주 - 엠비언트 오클루젼은 &lt;span style=&quot;color: #202122;&quot;&gt;한 장면의 각 점이 &lt;/span&gt;&lt;a href=&quot;https://ko.wikipedia.org/wiki/%EC%85%B0%EC%9D%B4%EB%94%A9&quot;&gt;&lt;span style=&quot;color: #3366cc;&quot;&gt;앰비언트 라이팅&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #202122;&quot;&gt;(광원)에 얼마나 노출되어 있는지를 계산하기 위해 사용되는 셰이딩 및 &lt;/span&gt;&lt;a href=&quot;https://ko.wikipedia.org/wiki/%EB%A0%8C%EB%8D%94%EB%A7%81&quot;&gt;&lt;span style=&quot;color: #3366cc;&quot;&gt;렌더링 기법&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;color: #202122;&quot;&gt;이다.)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;color: #202122;&quot;&gt;(주 - 레이 트레이싱은 광선을 추적하는 알고리즘이다. 빛이 물체나 표면에 닿을 때 해당 물체나 표면, 또는 다른 광선의 표면과 상호 작용하는 방식이 알고리즘으로 계산된다.)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;color: #202122;&quot;&gt;우리는 흥미로운 관찰을 했는데, 우리는 3D 애플리케션을 빠르게 했는데 기본적으로 소프트웨어를 통한 것이었고, CPU를 쓰는 것보다 수천배는 빠른 것이었습니다. 만약 우리가 GPU에 있는 모든 병렬 프로세서를 프로그래밍 가능하게 하면 어떤 일이 일어날까요? C언어를 통해서요. 일단 C이고 훗날에는 C++이 될 수도 있죠. 이렇게 빠른 속도로 얼마나 많은 종류의 문제를 풀 수 있는지 상상해보세요. 날씨를 예측하거나, 지반을 분석하거나, CT 스캔을 해서 사람의 모습을 재구성할 수도 있습니다. 모든 종류의 계산 중심의 애플리케이션을 50배나 100배 빠르게 할 수 있습니다. 이제 우리의 관점을 놓고 보자면, 100배는 무어의 법칙에서는 10년입니다. 10년 어치의 컴퓨팅 자원을 과학자, 연구자, 엔지니어의 손에 쥐어 준다면 어떻게 될까요. 믿을 수 없는만큼 대단한 가치를 가져올 것입니다. &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;color: #202122;&quot;&gt;GPU를 좀 더 범용 컴퓨팅을 할 수 있게 만드는 건, 대단히 위험합니다. 매번 어떤 것을 특수한 분야가 아니라, 일반 목적으로 만들때마다 핵심 비즈니스에서 벗어나기 때문입니다. 스위스 만능칼과 같죠. 아주 좁은 시장(니치, niche) 에 집중하는게 보통은 낫습니다. 여러분이 마케팅 수업에서 마켓 세분화에 대해서 배우듯이 말이죠. 일반적인 것을 만들수록, 모든 사람을 위한 제품이 됩니다. 모든 것을 적당히 할 줄 알지만, 잘하는 건 하나도 없는 것과 같습니다. 범용 컴퓨팅을 만드는 건 대단히 대단히 위험한 행동입니다. 하지만 좀 더 GPU를 일반적으로 쓸 수 있게 만드는 건, 너무나도 중요해서 하지 않을 수 없었습니다. 우리는 하기로 결정했습니다. 이건 놀라운 결과를 가져왔습니다. 우리가 보는 것들은 그 결정들의 일부입니다. &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;color: #202122;&quot;&gt;(주 - GPU가 프로그래밍하게 되면서 인공지능에 쓰일 수 있게 됨. 이는 엔비디아의 새로운 성장을 이끔)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;color: #202122;&quot;&gt;아까 공동 창업자에 대한 질문에 답하자면, 우리 셋은 처음부터 친구였습니다. 지금도 친구죠. 어떻게 누가 적절한 자리에 있고, 어떻게 이윤을 나눌까요? 저는 농담은 하지 않겠습니다, 그래야 잘못 이해되지 않으니까요. 우리 창업자 셋의 월급은 동일했습니다. 엔비디아의 지분도 동일하게 가지고 시작했죠. 간단히 말해 공평함이었죠. 이제 문제는 지배구조였습니다. 지분은 공평함을 말하는 다른 말입니다. 우리는 동일한 급여를 받았습니다. 우리 셋은 모두 100,000달러를 매년 받았습니다. 우리는 회사의 동일한 부분을 가지고 있었죠. 그렇지만 이렇게 해서는 회사를 운영하고, 위대한 회사를 만들 수가 없었죠. 세 사람이 같은 비율로, 같은 책임으로 투표할 경우에는 불가능합니다. 이건 리더십의 문제가 되고, 경영의 문제가 되고, 위대한 회사를 만드는 것의 문제가 됩니다. 제는 정확한 대화를 기억하지는 않습니다. 아마도 이렇게 대화가 흘러갔습니다. '좋아, 젠슨 너가 CEO지?' 그렇게 결정되었죠. 이게 기본적인 과정이었습니다. &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;color: #202122;&quot;&gt;저는 특별히 성격적으로 외향적이지는 않습니다. 외향적인게 좋은 CEO의 필수조건은 아닙니다. 성격적으로, 저는 어떤 문제가 일어나기 전에 예상을 하는 편이었습니다. 그래야만 한다면요. 저는 흐릿하고 모호한 부분들을 볼 수 있었습니다. CEO들과 리더들은 모호함과 함께 하는데 편해야합니다. 모호함은 다른 말로, 미래는 앞으로 어떨까 보는 것입니다. 이는 말하기 어렵고 어떤 사람들은 하기 싫어합니다. 몇몇 사람은 말합니다. '젠슨, 그때까지 그 일을 하려면 얼마나 많은 자원이 있어야합니까?' 몇몇은 또 말하죠. '저기 기회가 있어요. 무엇인지는 얼마나 클지 확실하지 않지만요. 같이 가서 알아내고 비즈니스를 만들어가봐요.' 어떤 사람은 이런것에 매우 편안해 합니다. &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;color: #202122;&quot;&gt;모호함을 편안해 하는 건 중요합니다. 아주 성공한 CEO들은 모두 모호함을 편하게 다룬다고 생각합니다. 저 역시도 모호함을 편하게 여깁니다. &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: #202122;&quot;&gt;질문자&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #202122;&quot;&gt; : 얼마나 초기 투자를 직접 했습니까? 나머지 투자금은 어떻게 얻었나요? 몇번이나 투자를 받기 위해 제안을 했나요?&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: #202122;&quot;&gt;젠슨황 &lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #202122;&quot;&gt;: 저는 30살이었고, 단 1개의 비즈니스 관련 수업을 듣지 않았습니다. 마케팅 수업도 하나도 듣지 않았죠. 파워포인트도 써보지 않았죠. 그때는 '맥북'을 썼는데 맥에서 파워포인트는 '퍼슈에이젼' (Persuasion, 설득) 이라고 불렸습니다. 저는 '퍼슈에이젼'을 쓰기 위해 맥을 샀죠. 저는 회사 소개 프레젠이션을 만들어서, 벤처 투자자들에게 보여주려고 했습니다. 저의 공식적인 첫 업무일은 2월 17일, 제 30번째 생일이었죠. 우리는 자금을 받았습니다.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;color: #202122;&quot;&gt;일단 시작하고 나면, 질문은 '무엇을 할것이냐'가 되죠. 어떻게 모든 것을 할까? 어떻게 회사를 시작할까? 우리 셋은 매일 만났습니다. 프레몬트(Fremont, 캘리포니아의 도시)에 있는 창업자 중 1명의 집에서였죠. 우리는 매일 모였고, 달리 할 일이 없었죠. 무엇을 했을까요? 3명이 모여서 그냥 이야기를 했습니다. 어젯밤에는 무얼했니? 어제 저녁에는 무얼 먹었어? 이걸 6개월 동안 했습니다. 매일 가장 중요한 일은 '어디로 점심 먹으러갈까' 였죠. 필라델피아 치즈스테이크는 오늘이고, 중국 음식은 내일이나 다른날로 하자. 이건 큰 일이었죠. 한동안은 이랬죠. '아침에 냉장고에 도넛 좀 넣어둘 수 있을까?' 이건 몇달동안 계속되었습니다. &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;color: #202122;&quot;&gt;이게 부적절한건 알지만 실제로 그랬습니다. 왜냐하면 당시 저는 회사를 어떻게 시작하는가에 관한 책을 읽고 있었거든요. 저는 어떻게 하면 투자금을 모으고, 벤처 투자자는 무엇이고, 회사 설립은 어떻게 하는가와 같은 것이었죠. 곧 저는 변호사를 만났고, 쿨리 갓워드(Cooley Godward)라는 로펌에 갔습니다. 이들은 회사를 설립하는 걸 도왔습니다. 변호사가 말하길, 돈이 좀 있어야 회사의 가치를 정하고 회사를 설립할 수 있다더군요. &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;color: #202122;&quot;&gt;변호사가 묻더군요. '주머니에 얼마나 돈이 있나요?' &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;color: #202122;&quot;&gt;저는 대답했죠. '200달러 있는데요.'&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;color: #202122;&quot;&gt;변호사가 답했습니다. '좋아요. 200달러를 제게 주세요.'&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;color: #202122;&quot;&gt;그래서 저는 200달러를 그에게 주었습니다. &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;color: #202122;&quot;&gt;200달러로 저는 15%를 샀죠, 생각해보니 엔비디아의 20%였네요. &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;color: #202122;&quot;&gt;아주 좋은 거래였죠. 20%요.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;color: #202122;&quot;&gt;저는 집으로 돌아가 다른 2명에게 말했더니, 둘 다 200달러를 줬고, 둘 다 20%의 지분을 가졌습니다. 이게 우리가 했던 방식입니다. 문자 그대로요. 더 특별할 것도 없었죠. 저는 사업 계획을 끝내지 않았습니다. 우리 셋은 사업 계획을 다 마무리 짓지 못했죠. 솔직히 말해 어떻게 사업 계획을 마무리 짓는지 알아내지 못했습니다. &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;color: #202122;&quot;&gt;저는 보더스(서점이름)에 가서 고든 벨의 책을 샀습니다. '어떻게 고급 기술 회사를 시작하는가' (How to Start a High Tech Company)란 책이었죠. 한 손으로 못 잡을만큼 두꺼운 책이었습니다. 이 책을 다 읽어야했다면 저는 지금쯤 죽어있을 겁니다. 우리는 돈이 다 떨어졌고, 시간도 다 떨어졌겠죠. &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;color: #202122;&quot;&gt;저는 단지 앞의 3,4 챕터를 읽고 일하러 갔습니다. 이렇게 회사를 설립했죠. 그들은 2명의 벤처 투자자들에게 우리를 소개해 주었습니다.&amp;nbsp; 저는 투자자들의 사무실에 가서 제가 무얼 하려고 하는지 말했습니다. 회사에 투자를 받으려는 사람들은 몇가지를 기억하세요. 벤처 투자자들은 사업 계획에 투자하지 않습니다. 사업 계획서는 쓰기 쉽거든요. 저는 사업 계획서를 쓰지도 못했지만, 다른 사람들은 쓸 수 있었죠. 벤처 투자자들은 이것에 투자합니다. 뛰어난 사람들에게 투자하죠. 문제는 투자자들이 당신을 어떻게 믿느냐 입니다. &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;color: #202122;&quot;&gt;평판은 중요합니다. 당신이 살아온 역사도 중요하죠. 저는 앤디 벡톨샤임 (투자자)와 많은 일을 했었고, 시놉시스(실리콘 칩 디자인 도구를 만드는 회사)와 LSI 로직(반도체 제조 회사)의 창업자들과도 일했었습니다. 이들과의 일은 성공적이었죠. 당신의 평판은 당신을 앞질러 갑니다. 사업 계획서를 쓰는 스킬이 별로라고 해도 말이죠. &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;color: #202122;&quot;&gt;2번째는 투자할만큼 충분히 큰 비전이 있어야 한다는 것입니다. 통계에 따르면 스타트업의 성공 가능성은 낮습니다. 1000만 달러를 투자하는데, 시장의 크기가 겨우 2000만이라면, 투자자들은 충분한 양의 돈을 돌려받지 못합니다. 하지만 2000억 달러 크기의 시장이면 조금 다릅니다. 시장의 크기가 중요합니다. 그러니 투자자들은 알고 싶어합니다. 아직 시장을 발견하진 못했지만 충분히 시장이 큰 아이디어가 있는가. &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;color: #202122;&quot;&gt;마지막 부분은 이것입니다. 마지막으로 말한 이유는 엄청나게 중요하기 때문입니다. 시간이 흐름에 따라 계속 자기자신을 다시금 혁신해야 합니다. 자신을 다시 혁신하고 싶다면, 뛰어난 사람들이 필요합니다. 이게 뛰어난 사람들이 중요한 이유입니다. &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: #202122;&quot;&gt;질문자&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #202122;&quot;&gt; : 누가 회사를 시작할때 당신의 멘토였나요? 멘토들로부터 어떤 조언을 받았나요?&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: #202122;&quot;&gt;젠슨황&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #202122;&quot;&gt; : 질문은 누가 멘토이고, 받은 조언 중 어떤 게 최고였나죠? 저는 성공하려면 누구로부터든 배울 수 있어야한다고 진정으로 믿습니다. 저는 그랬습니다. 저는 누구로부터도 배웠습니다. 이건 매우 작은 걸 수도 있지만, 큰 것일수도 있습니다. 제 아이들이 아니었다면 저는 모든 인터넷 시대를 놓쳤을 겁니다. 유튜브를 놓치고, 페이스북도 놓치고 트워터도 놓쳤겠죠. &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;color: #202122;&quot;&gt;세계가 변하고 있으니, 누구로부터든 배울 수 있어야합니다. 저는 대단히 재능 있는 임원들과 온갖 직업을 지닌 사람들로 둘러쌓여 있습니다. 누구로부터든 기꺼이 배우려 한다는 걸 확실히 해야합니다. 제가 여러해동안 받은 조언 중 대단히 가치 있는 것은 '집중'(focus) 입니다. 레이저 빔 같은 집중입니다. 너무 많은 걸 하려고 하지 마세요. 몇개를 잘하고, 그걸 매우 탁월한 수준으로 하세요. 집중은 중요합니다. &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;color: #202122;&quot;&gt;제가 평소에 시간을 어떻게 쓰는지 본다면, 저는 매일 아침 일어나서 가장 먼저 하는 건 '엔비디아'이고, 마지막에 하는 것도 '엔비디아'입니다. 하루 24시간 일주일 7일 동안이요. 제가 앞으로 이걸 50년 동안 더 하는 방법을 알아 낸다면, 엔비디아는 계속해서 좋은 회사가 될 겁니다.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: #202122;&quot;&gt;질문자&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #202122;&quot;&gt; : 성공한 기업가로서 시간을 어떻게 쓰나요? 미래의 당신과 가족에게 있어,&amp;nbsp; 무엇이 가장 동기를 주고, 무엇이 가장 동기를 뺏나요? &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: #202122;&quot;&gt;젠슨황&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #202122;&quot;&gt; : 그녀의 질문은 제가 성공한 기업가이고, 무엇이 가장 큰 도전인가이죠? 저는 모호함을 좋아한다는 점을 고려하면, 회사의 미래와 저 자신에게 최상의 예상은 무엇일까요? 회사를 만들때 가장 큰 도전은 회사를 다시금 혁신해 내는 것입니다. 회사의 재창조이죠. 모든 성공적인 사업은 어떤 시점에서 무너지게 되어 있고, 새로 지어져야합니다. 불행한 일이지만, 이게 진실이죠.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;color: #202122;&quot;&gt;발명을 하는 과정은 종종 혼란스럽습니다. 실은 파괴적이기까지 하죠. 과거에 당신이 만들었던 걸 부수기도 합니다. 이렇기에 재창조 과정은 매우 힘듭니다. 속이 울렁거리는 일이죠.&amp;nbsp; 저는 재밌는 도전이라고 생각합니다. 저는 재창조의 과정을 사랑합니다. 회사에 대한 제 최선의 예측은 무엇일까요? 저는 엔비디아가 세상에서 가장 중요한 기술 회사가 될 기회가 있다고 봅니다. 그렇게 되기를 희망하죠. 제 최선의 예상은 80세가 되어서, 여기 학생들 앞에서 떠들고, 그때까지도 CEO이기를 바랍니다. &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: #202122;&quot;&gt;질문자&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #202122;&quot;&gt; : (소리가 들리지 않음)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: #202122;&quot;&gt;젠슨황&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #202122;&quot;&gt; : 매우 날카로운 질문입니다. 우선 살아남아야합니다. 지출을 처리할 현금이 있어야죠. 현금이 왕이에요. 생존은 항상 중요하고 현금은 왕입니다. CEO로서 돈을 벌거나, 돈을 절약하거나, 투자금을 모아와야합니다. 돈을 벌지 않거나, 돈을 절약하지 않거나, 투자금을 모아오지 않는다면 당장 이 3개를 해야합니다. 이 3개에 항상 집중하고 있어야합니다. &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;color: #202122;&quot;&gt;회사 초반, 저는 항상 투자금을 모으고 다녔습니다. 한번 투자를 받고 나면, 다음 투자를 받아야했죠. 항상 투자금을 모으고 있었습니다. 가끔 1주일 정도 쉬는때는 있었습니다만, 저는 항상 투자금을 모으고 있었죠. 스타트업은 언제나 사업이 중단될 수 있는 상황입니다. 이게 스타트업의 정의지요. 거의 항상 적자 상태인 기업이 바로 스타트업의 정의입니다. &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: #202122;&quot;&gt;질문자&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #202122;&quot;&gt; : 어떻게 리더 자리 승계를 준비하고 있나요?&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: #202122;&quot;&gt;젠슨황&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #202122;&quot;&gt; : 질문은 제가 어떻게 CEO 자리 승계를 다루느냐였죠? 저는 80살까지 이 일을 하고 싶다고 말했지만, 그건 농담이었습니다. CEO의 핵심적인 역할 중 하나는 새로운 리더를 키워내는 것입니다. 그래서 이들이 새로운 아이디어를 찾아내고, 새로운 사업을 키워낼 수 이으니까요. 이들은 다른 세계의 다른 지역에 있을 수도 있고, 다른 프로덕트 라인을 운영할 수도 있습니다. 저는 요즘은 많은 시간을 관리자들과 앉아서 전략적으로 생각하고, 도전들에 대해 고민할 수 있게 돕고 있습니다. 관리자들이 프로덕트 로드맵을 깊이 생각할 수 있게 하고, 변화에 대해 깊이 생각할 수 있게 하고, 오래도록 지속될 팀과 조직을 만드는 것을 돕고 있습니다. &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;우리 창업자 3중에 1명을 다음 리더로 뽑는 것보다 &lt;span style=&quot;color: #202122;&quot;&gt;다음 세대의 리더를 키우는 게 훨씬 더 나은 과정이라고 생각합니다. 제게 무슨 일이 일어나거나, 제가 더는 CEO로서 적절하지 않을때에요. 이사회는 많은 선택을 할 수 있습니다. 회사 밖에서 찾을 수도 있죠. 회사를 만들어 가는 과정에는 회사 승계를 생각하는 것도 포함되어 있다고 봅니다. &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: #202122;&quot;&gt;질문자&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #202122;&quot;&gt; : 적절한 질문인지 모르겠는데요. 제 친구들은 엔지니어인데, 아주 훌륭한 아이디어를 많이 가지고 있습니다. 그런데 친구들은 그다지 이미 가진 돈에 만족을 해요. 그러니 더 일을 추진하려고 하지 않아요.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: #202122;&quot;&gt;젠슨황&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;color: #202122;&quot;&gt; : 제가 질문을 다시 정리하도록 하죠. 친구들에게 많은 아이디어들이 있지만, 돈도 너무 많기에 굳이 그 아이디어로 무언가를 하려고 하지 않는다는 거네요. 우선 돈에 대해 말해보도록 하죠. 제가 당신의 질문에 답이 되었으면 하네요. 돈은 회사를 시작하지 말아야할 유일한 이유입니다. 왜냐하면 회사를 시작하는 건, 성공 확률이 매우 매우 매우 낮은 일이거든요. 당신이 큰 돈을 벌기 위해 회사를 세우고, 그게 이유라면 분명히 후회하게 될 테니까요. &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;color: #202122;&quot;&gt;당신은 아이디어를 믿기 때문에,&amp;nbsp; 회사를 세우고 회사를 만들어가야 합니다. 아이디어에 큰 열정을 가지고 있고, 무언가 훌륭한 것을 만들고 싶기에 회사를 시작해야합니다. 돈이 따라오는 것이면 괜찮긴 하죠. 저는 돈이 아주 많습니다. 근데 그게 저에게 동기를 주지는 않죠, 동기를 빼앗지도 않구요. 그건 제가 돈 때문에 회사를 시작하지 않았기 때문입니다. &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;color: #202122;&quot;&gt;저는 스스로에게 묻기를 강하게 권합니다. 당신의 친구들에게도요. 회사를 시작하고 싶은 목적이 무엇인가요? 아이디어는 널리고 널렸습니다. 세상엔 아주 많은 아이디어가 있습니다. 이 강의실에서도 무수한 아이디어를 얻을 수 있어요. 아이디어는 정말로 중요한게 아닙니다.&amp;nbsp; 당신만의 독특한 관점이 있어야합니다. 당신 스스로 그 관점에 대해 강하게 느끼고 있어야하죠. 그리고 어떤 도전이든 기꺼이 감당하고, 아이디어가 현실이 되게할 수 있어야합니다. 이게 회사를 시작하는 유일한 이유여야만 해요. &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;color: #202122;&quot;&gt;좋습니다. 모두들 감사합니다. 저는 이 시간을 즐겼습니다. &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;&lt;span style=&quot;color: #202122;&quot;&gt;&lt;b&gt;출처&lt;/b&gt; - 스탠포드 기업가 정신 수업, Jensen Huang, Vision Matters ( &lt;/span&gt;&lt;a href=&quot;https://ecorner.stanford.edu/podcasts/vision-matters/&quot;&gt;https://ecorner.stanford.edu/podcasts/vision-matters/&lt;/a&gt;&lt;span style=&quot;color: #202122;&quot;&gt; )&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;</description>
      <category>IT 발자취</category>
      <category>nvidia</category>
      <category>엔디비아1000조원</category>
      <category>엔디비아ceo</category>
      <category>엔비디아</category>
      <category>엔비디아스탠포드</category>
      <category>엔비디아창업</category>
      <category>엔비디아창업자</category>
      <category>젠슨황</category>
      <category>젠슨황스탠포드</category>
      <author>에드 신</author>
      <guid isPermaLink="true">https://software-creator.tistory.com/38</guid>
      <comments>https://software-creator.tistory.com/38#entry38comment</comments>
      <pubDate>Sun, 2 Jul 2023 19:24:33 +0900</pubDate>
    </item>
    <item>
      <title>오픈AI CEO인 샘알트만이 말하는 13가지 성공비법</title>
      <link>https://software-creator.tistory.com/37</link>
      <description>&lt;div&gt;샘알트만이 말하는 성공하는 13가지 방법입니다.&lt;/div&gt;
&lt;div&gt;읽다보니 좋은 글이라서 개인적으로 읽을겸 정리해보았습니다.&lt;/div&gt;
&lt;div&gt;IT분야에 적용되는 방법론이지만, 커리어에 관한 조언도 있습니다.&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;IT분야에서 일하고 있거나, 아직 커리어 초반인분들이 읽으면 많은 도움이 되겠더군요.&lt;/div&gt;
&lt;div&gt; 샘알트만이 어떻게 챗GPT를 성공시켰는지 궁금한 분은 글을 읽어보세요.&lt;/div&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;div&gt;--------------------------------------------------------&lt;/div&gt;
&lt;h3 data-ke-size=&quot;size23&quot;&gt;&lt;b&gt;&lt;span&gt;어떻게해야 성공하는가 (How to be successful)&lt;/span&gt;&lt;/b&gt;&lt;/h3&gt;
&lt;div&gt;난 수천명의 창업자들을 보았고, 어떤게 커다란 성공을 만드는지 생각해왔다. 여기서 성공은 엄청난 돈이나 대단히 중요한 것을 만드는 걸 말한다. 보통 사람들은 앞의 것을 원하며 시작하지만 뒤의 것을 원하게 된다.&lt;/div&gt;
&lt;div&gt;여기에 어떻게 하면 그런 예외적일만치 놀라운 성공을 만드는지에 관한 생각을 13가지로 정리해보았다. 모든 건 일정 기준의 성공을 (특권을 통해서든 노력을 통해서든)&amp;nbsp; 달성하면 점점 더 쉬워진다. 그리곤 그 일정 수준의 성공을 예외적일만한 성공으로 바꾸고 싶어진다. 남다른 케이스로 보이지만 누구에게나 적용할 수 있다고 본다.&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;text-align: start;&quot;&gt;&lt;b&gt;1.복리 효과를 믿어라 (&lt;span style=&quot;color: #555555;&quot;&gt;Compound yourself)&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;복리는 마법과도 같다. 복리는 어디서나 볼 수 있다. 지수적인 증가는 부의 창출의 열쇠이다. 매년 50% 크는 중간 크기의 사업은 순식간에 커다랗게 된다. 매우 적은 수의 사업만이 진정한 네트워크 효과가 있으며 극도로 확장성이 있다. 하지만 기술과 함께라면 더 많은 사업이 이렇게 될 것이다. 강한 복리 효과가 있는 사업을 찾고 만들어 가는건 매우 큰 노력을 들일만한 일이다.&lt;/div&gt;
&lt;div&gt;당신은 스스로를 지수적으로 발전시킬 수도 있다. 당신은 따를만한 가치가 있는 올바른 목적을 찾아야한다. 복리 효과가 있는 커리어를 택하는 게 중요하다. 대부분의 커리어는 선형적이다.&lt;/div&gt;
&lt;div&gt;당신은 2년 동안 일하면 20년 동안 일한것과 비슷해지는 분야에서 일하고 싶지는 않을 것이다. 배우는 속도는 언제나 빨라야한다. 커리어가 발전하면서 당신이 일하는 1단위는 점차 더 많은 결과를 만들게 된다. 이런 종류의 레버리지를 활용하는데는 여러 방법이 있다. 레버리지에는 자본, 기술, 브랜드, 네트워크 효과 그리고 사람들을 다루는 것이 있다.&lt;/div&gt;
&lt;div&gt;언제나 또다른 0을 너의 성공지표에 더하는 건 유용하다. 그 성공지표가 돈이든 지위든 세상에 영향을 주는 것이든 무엇이든 상관없다. 난 그 다음의 것(my next thing)을 찾는데 얼마든지 시간을 쓸 각오가 있다. 하지만 그 다음 것, 다음 프로젝트가 성공적이라면 나의 예전 커리어가 참고사항정도가 될정도인 프로젝트가 되기를 바란다.&lt;/div&gt;
&lt;div&gt;대부분의 사람들은 선형적인 기회에 붙잡혀있다. 작은 기회들을 기꺼이 보내버리고, 더 커다란 기회들에 집중해야한다.&lt;/div&gt;
&lt;div&gt;난 사업이든 개인의 커리어든 간에 가장 큰 경쟁력은 장기적으로 생각하는 것이라고 본다.&amp;nbsp; 세상에 존재하는 다른 시스템이 어떻게 함께 동작하는지 넓은 관점에서 바라보라. 복리 효과의 눈에 띌정도로 놀라운 점은 앞으로의 몇년이 가장 중요하다는 점이다.&lt;/div&gt;
&lt;div&gt;거의 대부분의 사람들이 진정으로 장기적으로 생각하지 않은 세상에서, 시장은 장기적으로 보는 사람에게 보상을 한다.&lt;/div&gt;
&lt;div&gt;지수적인 증가를 믿고, 인내심을 가지고, 기꺼이 놀라워 하기 바란다.&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;text-align: start;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #555555;&quot;&gt;2. 과할 정도로 자신을 믿어라 ( Have almost too much self-belief )&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;자신을 믿는 건 놀라울 정도로 강력하다. 내가 아는 가장 성공적인 사람들은 맛이간 수준일 정도로 자신을 믿었다.&lt;/div&gt;
&lt;div&gt;자신을 믿는 걸 일찍부터 발전 시켜라. 당신의 판단이 좋다는 증거가 쌓이고, 계속해서 좋은 결과를 만들어낼 수 있다면, 당신 자신을 더 믿어라. 스스로를 믿지 못한다면 미래에 대해 일반적인 믿음과 반대되는 아이디어를 가지기 매우 어렵다. 허나 대부분의 가치가 만들어지는 곳은 대중과 다른 미래에 대한 생각이다.&lt;/div&gt;
&lt;div&gt;난 몇년전 엘론 머스크가 스페이스 X의 공장을 견학시켜주었을 때를 기억한다. 엘론 머스크는 로켓을 만드는 아주 세부적인 과정을 말했는데, 1가지가 내 기억에 오랫동안 남아있었다. 엘론이 화성으로 커다란 로켓을 보내는 것에 대해 말할때&amp;nbsp; 보여준, 확신에 가득찬 엘론의 표정이었다. 이 일은 나를 숙고하게 했다. &quot;아, 이게 바로 신념이란게 무엇인지 보여주는 것이구나&quot;&lt;/div&gt;
&lt;div&gt;스스로의 사기를 관리하고, 팀의 사기또한 관리하라. 이는 수많은 노력 중에서 가장 어려운 것이기도 하다. 강한 자기 믿음 없이는 거의 불가능한 일이다. 불행하게도 당신이 더 야심적일수록, 세상은 당신을 더 부수러고 할 것이다.&lt;/div&gt;
&lt;div&gt;가장 성공적인 사람들은 적어도 1번은 미래에 관해서 맞았다. 사람들이 그들이 틀렸다고 생각할때 말이다. 만약 그렇지 않았다면 이들은 엄청난 경쟁에 부딪혔을 것이다.&lt;/div&gt;
&lt;div&gt;자기 확신은 객관적인 자기 인식과 균형을 잡아야 한다. 난 비판을 싫어했었고, 이를 일부러 피하기도 했다. 지금은 비판이 사실이라는 가정하에 들으려고 한다. 그리곤 비판을 다 들은 다음에 행동할지 안 할지 결정하려고 한다. 진실을 추구하는 건 어렵고 고통스러운 일이다. 하지만 비판을 받아들이는 게 자기 확신과 자기 망상을 구분짓는 점이다.&lt;/div&gt;
&lt;div&gt;이 균형은 특권의식이 있는 사람으로 보여지거나, 무지하게 느껴지는 것으로부터 벗어나게 도와줄 것이다.&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;text-align: start;&quot;&gt;&lt;b&gt;3. 스스로 생각하는 법을 배워라 (Learn to think independently)&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;기업가 정신은 가르치기 매우 어려운데, 독창적인 생각은 가르치기 아주 어렵기 때문이다. 학교는 기업가 정신을 가르치기 위해 세워지지 않았다. 사실은 기업가 정신과 반대되는 것에 보상한다. 이렇기에 기업가 정신을 스스로 키워야한다.&lt;/div&gt;
&lt;div&gt;제 1원리로부터 생각하고, 아이디어를 생각해내라, 그리곤 사람들은 찾아서 생각을 주고 받고 발전 시켜라. 다음 단계는 이 아이디어를 현실 세계에서 시험해보는 빠른 방법을 찾는 것이다.&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;&quot;무수히 실패하더라도 1번만 맞으면 된다&quot; 이게 바로 기업가의 방식이다. 자기 자신에게 행운을 잡을 기회를 여러번 주어라.&lt;/div&gt;
&lt;div&gt;내가 배운 가장 강력한 교훈은 아무런 답이 없는 것처럼 보이는 상황이여도 답을 찾을 수 있다는 것이다. 이 경험을 여러번 할 수록 자신을 더 믿게 될 것이다. '그릿'은 당신이 완전히 쓰러진 다음에도 다시 일어설 수 있다는 걸 배우는데서 온다.&lt;/div&gt;
&lt;div&gt;(제1원리 - first principle, 모든 것의 밑바닥이 되는 원리를 말한다. 다른 것에 영향을 받지 않은 가장 밑바닥에 있는 원리를 말한다. 엘론 머스크가 말하며 유명해졌다. 엘론 머스크는 스페이스X를 시작할때 왜 우주선이 비싼가 의문이 들었다고 한다. 그래서 우주선을 만드는 아주 밑바닥까지 파고 들었고 처음부터 만들기 시작하면 비쌀 이유가 없다는 걸 꺠달았다고 한다.)&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;text-align: start;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #555555;&quot;&gt;4. 세일즈에 능숙해져라 ( Get good at &amp;ldquo;sales&amp;rdquo;)&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;자기 확신만으로는 부족하다, 당신이 믿는 것을 다른 사람도 믿을 수 있도록 해야한다.&lt;/div&gt;
&lt;div&gt;모든 탁월한 커리어는, 어느 정도는, 판매하는 일이 되었다. 당신의 계획을 고객들, 잠재적 고용인, 언론, 투자자 등에게 널리 알려야한다. 이렇게 하려면 영감을 주는 비전, 강력한 의사소통 기술, 어느 정도의 카리스마, 그리고 실행 능력에 대한 증거가 필요하다.&lt;/div&gt;
&lt;div&gt;커뮤니케이션을 잘하게 되는것, 특히 글쓰기, 는 시간을 투자할만한 일이다. 커뮤니케이션에 대한 내 최선의 조언은 깔끔하고, 쉽고, 간결한 언어를 쓰라는 것이다.&lt;/div&gt;
&lt;div&gt;판매에 능하게 되는 가장 좋은 방법은 파는 것을 진정으로 믿는 것이다. 진정으로 믿는 것을 파는 것은 끝내주는 느낌이고, 뱀기름을 팔려고 하는것 최악이다.&lt;/div&gt;
&lt;div&gt;판매을 잘하게 되는 건 다른 기술을 향상시키는 것과 같다. 누구나 의도적인 연습을 하면 점점 더 잘하게 될 수 있다.&amp;nbsp; 하지만 몇몇 이유때문에, 아마도 역겹게 느껴지기에, 많은 사람들은 판매일을 배우지 않는다.&lt;/div&gt;
&lt;div&gt;내 다른 세일즈 팁은 어떤 일이 중요할때마다 직접 만나는 것이다. 내가 처음 시작할때는, 언제든 비행기를 타려고 했다. 직접적으로 만나는 게 대부분은 불 필요하기는 했지만,&amp;nbsp; 내 커리어를 완전히 바꿀 3번의 순간으로 이끌었다. 직접 만나지 않았다면 얻지 못했을 변화의 순간이었다.&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;text-align: start;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #555555;&quot;&gt;5.위험을 감수하기 쉽게 만들어라 ( Make it easy to take risks)&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;대부분의 사람들은 위험을 너무 크게 평가하고, 보상은 너무 낮게 평가한다. 위험을 감수하는 건 중요한데, 항상 정답일수는 없기 때문이다. 많은 것을 시도하고, 재빨리 적응하면서 더 많이 배울 수 있다.&lt;/div&gt;
&lt;div&gt;보통은 커리어 초반에 위험을 감수하기 더 쉽다. 잃을 게 별로 없기 때문이고 얻을 건 많기 때문이다. 일단 기본적인 의무를 만족할 수준이 되면 위험을 감수하기 쉽게 만들어야한다. 작은 베팅을 찾아라. 잃었을때는 1x (1배)를 잃고, 얻었을때는 100x(100배)를 얻을 수 있는 베팅 말이다. 그리곤 그 방향으로 더 큰 베팅을 해라.&lt;/div&gt;
&lt;div&gt;너무 오랫동안 돈을 모으기 위해 준비하지는 마라. YC(Y 콤비네이터)에서는 오랜시간 구글이나 페이스북에서 오래 일한 창업자들이 겪는 문제를 발견했다. 사람들이 안정적인 삶에 익숙해지고, 예측가능한 일, 어떤 일을 하든 성공한다는 평판을 얻게 되면, 이 모든 걸 뒤로 하고 떠나기가 매우 힘들어진다. 사람들은 자신의 라이프스타일을 내년 수입에 맞추는 놀라운 능력이 있다.&amp;nbsp; 이들이 회사를 떠나더라도, 되돌아가려는 유혹은 엄청나게 크다. 단기적 이득과 편리함을 먼 훗날의 만족감과 성취보다 우선하는 건 인간의 본성이다.&lt;/div&gt;
&lt;div&gt;만약 아직 트레드밀 위에 있지 않다면, 직감을 따르고 정말로 흥미로운 것에 시간을 쓸 수 있다.&amp;nbsp; 가능한 적게 쓰고 유연성을 가지는건 이런 일을 할 수 있게 해주는 강력한 방법이다. 하지만 이는 트레이드 오프가 있는 일이다.&lt;/div&gt;
&lt;div&gt;(트레드밀 -&amp;nbsp; 러닝머신을 말하며, 회사에서 반복적으로 일하며 살아가는 것을 말함. )&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;&lt;b&gt;6. 초점 (Focus)&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;초점은 일을 몇 배로 증폭시킨다.&lt;/div&gt;
&lt;div&gt;내가 만난 대부분의 뛰어난 인물들은 더 오랜 시간 일하는 것보다 어디에 초점을 맞출까를 생각하는데 시간을 쓴다. 올바른 방향으로 일하는 게 많은 시간을 일하는 것보다 훨씬 더 중요하다.&amp;nbsp; 대부분의 사람들은 별로 중요하지 않은데 시간을 쓴다.&lt;/div&gt;
&lt;div&gt;일단 어떤 것을 해야할지 알아낸 뒤에는 해결해야할 우선 순위가 높은 것들을 빠르게 끝내라. 나는 문제 해결에 뛰어난 데 느리게 움직이는 사람을 아직 만나본 적이 없다.&lt;/div&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;div style=&quot;text-align: start;&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;&lt;b&gt;7. 열심히 일하라 (Work Hard)&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;열심히 일하거나, 똑똑하게 일하면 상위 10퍼센트 안에 들 수 있다.&amp;nbsp; 이는 대단한 성취이기는 하다. 하지만 상위 1퍼센트에 들어가려면 열심히와 똑똑함 둘 다가 필요하다. 당신은 타고난 재능이 있는 이들과 경쟁하게 될 것이다. 탁월한 아이디어가 있으면서 많이 일하려는 이들 말이다.&lt;/div&gt;
&lt;div&gt;극단적인 사람들은 극단적인 결과를 얻는다. 많이 일하는 건 인생에 있어 커다란 트레이드 오프가 있고, 많이 일하지 않기로 결정하는 건 대단히 합리적인 일이다. 하지만 많이 일하는 건 큰 이점이 있다. 대부분의 경우에, 모멘텀은 점차 불어나고, 성공은 성공을 부른다.&lt;/div&gt;
&lt;div&gt;그리고 많이 일하는 건 종종 즐거운 일이다. 인생에서 가장 즐거운 일 중 하나는 삶의 목적을 찾는 것이고, 그것을 잘하게 되고,&amp;nbsp; 하는 일이 임팩트를 준다는 걸 발견하는 것이다. 한 YC 창업자는 대기업을 관두고, 얼마나 행복하고, 보람찬지 알고 놀라워했다. 그는 그가 줄 수 있는 최대치의 임팩트를 주기 위해 일하는 중이었다.&amp;nbsp; 이런 식으로 많이 일하는 건 축하받을 일이다.&lt;/div&gt;
&lt;div&gt;내겐 왜 많이 일하는 게, 미국의 어떤 곳에서는 나쁜 일로 취급받는지 이해가 되지 않을때가 있다.&lt;/div&gt;
&lt;div&gt;당신은 번아웃을 피하며 열심히 일하는 법을 알아내야한다. 사람들은 자신만의 전략을 찾아내곤 한다. 대부분의 경우는 오랜시간 같이 일해도 즐거운 사람들과 일을 하는 게 이 방법 중 하나이다. 난 열심히 일하지 않고 성공한 척 하는 이들이 매우 해롭다고 생각한다. 사실 일을 하는 체력이 장기간의 성공을 보여주는 가장 강력한 예측 지표라고 본다.&lt;/div&gt;
&lt;div&gt;열심히 일하는 것에 대한 1가지 생각을 더 말하자면, 커리어 초기에 하라는 것이다. 열심히 일하는 것은 복리 효과가 있어서 더 빨리 시작할 수록, 더 오랜시간 이득을 본다. 또한 책임이 적을때 열심히 일하는 게 더 쉽다.&lt;/div&gt;
&lt;div style=&quot;text-align: start;&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;text-align: start;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #555555;&quot;&gt;8.대담해 져라 ( Be bold)&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;난 어려운 스타트업을 하는게, 쉬운 스타트업을 하는 것보다 쉽다고 믿는다. 사람들은 놀라운 것의 일부가 되고 싶어하고, 자신의 일이 의미가 있다고 느끼기를 바란다. 만약 중요한 문제에 있어 진전을 만들고 있다면, 언제나 당신을 도와주려는 지원군을 만나게 될 것이다. 좀 더 야심을 가지고, 정말로 전념하고 싶은 일에 몰두해라.&lt;/div&gt;
&lt;div&gt;만약에 모든 사람이 '밈 회사'를 시작하고, 당신은 유전자 수정 회사를 만들고 싶다면, 유전자 회사를 시작하고 두번다시는 고민하지 마라. 호기심을 따라라. 당신을 설레게 하는 일은 종종 다른 사람도 설레게 한다.&lt;/div&gt;
&lt;div&gt;(밈 회사 - 유행하는 트렌드를 따라 세우는 회사)&lt;/div&gt;
&lt;div style=&quot;text-align: start;&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;text-align: start;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #555555;&quot;&gt;9. 의지를 밀고 나가라 ( Be willful)&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: start;&quot;&gt;&lt;span style=&quot;color: #555555;&quot;&gt;큰 비밀은 당신이 세상을 변화시킬 수 있다는 점이고, 얼마나 자주 바꿀수 있는지 비율을 알게 되면 놀랄 것이다. 대부분의 사람들은 시도도 하지 않고 있는 그대로를 받아들인다. 사람들은 무언가를 만들어낼 대단한 잠재력이 있다. 자기 의심과 빠른 포기, 강하게 푸시하지 않기가 합쳐지면 대부분은 잠재력 근처에 가지도 못한다. &lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: start;&quot;&gt;&lt;span style=&quot;color: #555555;&quot;&gt;원하는 걸 요청해보라. 물론 대부분은 얻지 못할 것이고, 거절은 고통스럽다. 하지만 얻게 된다면, 놀랄정도로 잘 풀리게 된다. &lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: start;&quot;&gt;&lt;span style=&quot;color: #555555;&quot;&gt;&quot;이 일을 끝낼때까지 계속할거야. 어떤 고난이 있더라도 난 방법을 알아낼거야&quot; 라고 말하고 실제로 행하는 이들은 해낸다. 이들은 행운이 이들 곁을 지나갈때까지 오랫동안 있을만큼 인내심이 있다. &lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: start;&quot;&gt;&lt;span style=&quot;color: #555555;&quot;&gt;에어비앤비는 이에 대한 예시다. 에어비앤비는 자신들의 온갖 이야기를 말할 것이다.&amp;nbsp; 1달러짜리 시리얼은 매끼니마다 먹었다거나 하는 이야기 말이다.&amp;nbsp; 이들은 행운을 잡을때까지 결국 살아남았다. &lt;/span&gt;의지를 강하게 가지려면,&amp;nbsp; 낙관적이어야한다. 다행히도 이는 훈련을 통해 좋아질 수 있는 성격적 특징이다. 나는 비관적인데 아주 성공적인 사람을 만나본 적이 없다.&lt;/div&gt;
&lt;div style=&quot;text-align: start;&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;text-align: start;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #555555;&quot;&gt;10. 경쟁하기 어렵도록 해라 ( Be hard to compete with)&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: start;&quot;&gt;&lt;span style=&quot;color: #555555;&quot;&gt;대부분의 사람들은 다른 회사가 따라하기 어려운 회사가 더 가치 있다는 걸 안다. 이건 분명한 사실이다. 하지만 이건 회사에만 적용되는 게 아니다. 개개인에게도 적용된다. 당신이 할 수 있는 일이 다른 사람이 쉽게할 수 있는 것이라면 결국에는 적은 돈만 지불받게 된다. &lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: start;&quot;&gt;&lt;span style=&quot;color: #555555;&quot;&gt;다른 사람이 따라올 수 없게 하는 최고의 방법은 레버리지를 하는 것이다. 예컨데 아주 강력한 퍼스널 브랜딩을 하거나, 여러 분야에 능통하게 되거나 하는 것이다. 여기에는 여러 전략이 있지만, 스스로 방법을 찾아내야한다. &lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: start;&quot;&gt;&lt;span style=&quot;color: #555555;&quot;&gt;대부분의 사람들은 같이 어울리는 사람이 하는 일을 한다. 이런 모방하는 행동은 보통은 실수이다. 다른 사람들이랑 똑같은 일을 한다면, 따라잡기 쉬워진다.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: start;&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;text-align: start;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #555555;&quot;&gt;11.네트워크를 만들어라 (Build a network)&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: start;&quot;&gt;&lt;span style=&quot;color: #555555;&quot;&gt;탁월한 일은 팀을 필요로 한다. 재능 있는 사람들의 네트워크를 만들고, 긴밀하게나 느슨하게 일하는 건, 커리어에 있어 핵심이다. 진정으로 재능있는 사람들과 얼마나 네트워크를 가지고 있느냐는 종종 얼마나 달성할 수 있는가를 한정짓기도 한다. &lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: start;&quot;&gt;&lt;span style=&quot;color: #555555;&quot;&gt;네트워크를 만드는 가장 쉬운 방법은 다른 사람들을 최대한 도와주는 것이다. 매우 오랜기간 동안 이렇게 하면은 기회가 온다. 내 커리상 최고의 기회 3번은 내가 한 4번의 투자에서 온 것이다. 난 계속해서 놀라곤 한다. 얼마나 다른 사람을 도와준 일이 보답을 받는지. 나에게 일어난 좋은 일 중 몇은 내가 10년전에 한 창업자를 도와줬기에 일어났다. &lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: start;&quot;&gt;&lt;span style=&quot;color: #555555;&quot;&gt;또 다른 네트워크를 만드는 방법은 같이 일하는 사람을 정말 신경 쓴다는 평판을 쌓는 것이다. 얻는 이득을 배푸는 데 있어서 과할 정도로 관대해져라. 이는 10배로 돌아올 것이다. 또한 다른 사람이 뛰어난 것이 무엇인지 아는 법도 배우고, 이들은 그 일에 배치해라. (이는 내가 경영에 대해 배운 가장 중요한 것이고,&amp;nbsp; 그다지 읽어보지 못한 것이기도 하다.) 당신은 다른 사람의 한계를 끌어내지만 번아웃 시키지는 않는다는 평판을 얻는 것도 원할 것이다. &lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: start;&quot;&gt;모든 사람은 적어도 무언가에 있어 다른 사람들보다 낫다. 강점이 무엇인지 파악하고, 단점은 신경 쓰지 마라. 약점을 인정하고 어떻게 대응할지를 알아내라. 하지만 약점이 당신을 막아서도록 하지는 마라. &quot;난 X를 잘하지 않으니 Y도 못해&quot; 라는 말을 많은 사업가들로부터 놀랄정도로 자주 들어왔다. 이는 거의 항상 창의성의 부족을 보여준다. 약점을 메꾸는 최고의 방법은 보완할 수 있는 사람들 팀멤버로 데려오는 것이다. 당신이 이미 잘하는 것을 잘하는 사람을 채용하는 것이 아니다.&lt;/div&gt;
&lt;div style=&quot;text-align: start;&quot;&gt;&lt;span style=&quot;color: #555555;&quot;&gt;특히 네트워크를 만드는 데 있어서 가치 있는 부분은 몰랐던 재능을 발견하는 일이다. 빠르게 다른 사람의 지적능력, 동기, 창의성을 발견하는 일은 숙련될 수록 점점 쉬워진다. 가장 빠르게 이를 익히는 방법은 그냥 많은 사람을 만나는 것이고, 누가 깊은 인상을 주는지, 누가 그렇지 않은지 쭉 기록하는 것이다. 성장하는 속도를 봐야한다는 걸 기억하고, 현재의 수준이나 과거의 성취를 너무 높게 평가하지 마라. &lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: start;&quot;&gt;&lt;span style=&quot;color: #555555;&quot;&gt;난 누군가를 만날때마다 내 스스로에게 묻고는 한다. &quot;이 사람이 '자연현상'인가&quot;. 이는 훌륭한 것을 만들어낼 수 있는 사람을 찾아내는 데 있어 대단히 유용한 직관이다. &lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: start;&quot;&gt;&lt;span style=&quot;color: #555555;&quot;&gt;(자연현상 - 원문에는 force of nature로 되어 있는데 자연적으로 발생하는 강한 힘, 현상을 말한다. 대단히 강하거나 독특한 성격의 사람을 말한다.)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;네트워크를 만드는 특이 케이스 중 하나는 당신에게 베팅할정도로 눈에 띄는 사람을 만나는 것이다. 커리어 초반에 만나는 게 이상적이다. 이렇게 하는 최선의 방법은, 놀랍지 않게도, 다른 사람에게 도움을 주는 것이다. 먼저 베풀어야지 나중에 돌아온다는 걸 기억하기 바란다.&lt;/div&gt;
&lt;div&gt;마지막으로, 긍정적이고 당신의 꿈을 도와줄 사람과 시간을 보내도록 하라.&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;text-align: start;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #555555;&quot;&gt;12.무언가를 소유해야 부를 얻는다 ( You get rich by owning things)&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;난 어린 시절 많은 월급을 받아야 부자가 되는 줄 알았는데, 이는 나의 가장 커다란 경제에 관한 착각이었다. 연예인 같은 몇몇 예외는 있지만, 포브스 명단에 있는 그 누구도 월급을 받아서 부를 얻지는 않았다. 당신은 가치가 빠르게 증가하는 무언가를 소유해야지 부를 얻을 수 있다.&lt;/div&gt;
&lt;div&gt;이건 사업의 일부일수도 있고, 부동산일수도 있고, 천연자원일수도 있고, 특허일수도 있고, 다른 비슷한 무언가일수도 있다. 어쩄든 시간을 파는 대신에 무언가의 일부를 소유할 필요가 있다. 시간은 선형적으로 증가한다.&lt;/div&gt;
&lt;div&gt;(선형적으로 - 갑자기 안 커지고 1,2,3,4,5처럼 순서대로 늘어남. )&lt;/div&gt;
&lt;div&gt;가치가 대단히 빠르게 커지는 무언가를 만드는 최고의 방법은 매우 많은 사람들이 원하는 걸 만드는 것이다.&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;text-align: start;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #555555;&quot;&gt;13. 내적으로 동기부여가 되라 ( Be internally driven)&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: start;&quot;&gt;&lt;span style=&quot;color: #555555;&quot;&gt;대부분의 사람들은 외적으로 동기부여 되어 있다. 사람들은 다른 사람을 감명시키기 위해 무언가를 한다. 이는 많은 이유에서 나쁜데, 그 중 2가지가 제일 큰 이유다. &lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: start;&quot;&gt;&lt;span style=&quot;color: #555555;&quot;&gt;(외적 동기 - 평판, 돈, 지위 등 외부로부터 오는 동기)&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: start;&quot;&gt;&lt;span style=&quot;color: #555555;&quot;&gt;(내적 동기 - 흥미, 목적 등 내부로부터 오는 동기)&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: start;&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;text-align: start;&quot;&gt;&lt;span style=&quot;color: #555555;&quot;&gt;첫째, 모든 사람들이 동의하고 모든 사람이 추구하는 커리어를 따라가게 된다. 또한 다른 사람의 시선을 매우 신경쓰게 된다. 이는 정말로 흥미진진한 일을 하는 것을 막는다. 비록 당신이 다른 사람을 따라 어떤 일을 해내더라도, 어쨌든 다른 이들이 결국은 했을 일이기에 큰 의미가 없다. &lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: start;&quot;&gt;&lt;span style=&quot;color: #555555;&quot;&gt;둘째, 위험 계산을 잘못하게 된다. 다른 사람을 따라가고, 경쟁에 뒤쳐지지 않는데 촛점을 맞추게 되기 때문이다. 심지어 단기간에도 그렇게 할 것이다.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: start;&quot;&gt;&lt;span style=&quot;color: #555555;&quot;&gt;영리한 사람들은 외적 동기를 따르는 위험에 쉽게 빠진다. 이에 주의하는 건 약간은 도움이 되지만, 다른 사람을 모방하는 함정에 빠지지 않으려면 매우 매우 노력해야한다. &lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: start;&quot;&gt;&lt;span style=&quot;color: #555555;&quot;&gt;내가 아는 가장 성공적인 사람들은 주로 내적 동기에 따른다. 그들은 자기 자신을 위해 일하고, 세상에 무언가를 만들어내고자 하는 충동이 있다. 원하는 걸 무엇이든 살 수 있을만큼 돈을 벌고, 원하는 사회적 지위를 얻은 뒤에도 , 내적 동기는 더 높은 수준의 성과를 만들어내는 유일한 힘이. &lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: start;&quot;&gt;&lt;span style=&quot;color: #555555;&quot;&gt;이게 바로 동기가 대단히 중요한 이유다. 난 사람들에게 동기가 무엇인지 맨먼저 물어본다. 그 사람을 알고자 할때면. 올바른 동기는 일정한 룰로 정의하기가 어렵지만, 그걸 보면 알게 될 것이다. &lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: start;&quot;&gt;&lt;span style=&quot;color: #555555;&quot;&gt;제시카 리빙스턴과 폴 그레이엄은 내가 본보기로 삼는 이들이다. YC는 처음 몇년동안 비웃음을 당하였고, 아무도 성공을 거둘거라고 생각하지 않았다. 하지만 제시카와 폴은 YC가 잘 돌아가기만 한다면 세상을 위해 좋을거라고 생각했다. 이들은 사람들을 돋는 걸 좋아했고, 이들의 새로운 모델 (YC가 스타트업을 키우는 방식)이 기존의 모델보다고 낫다고 믿었다. &lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: start;&quot;&gt;&lt;span style=&quot;color: #555555;&quot;&gt;(제시카 리빙스턴과 폴 그레이엄은 Y콤비네이터의 설립자이다)&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: start;&quot;&gt;&lt;span style=&quot;color: #555555;&quot;&gt;결국 당신은 자신이 중요하게 생각하는 분야에서 일을 하게 될 것이며, 이를 통해&amp;nbsp; 무엇이 당신에게 성공인지 정의하게 될 것이다. 더 빠르게 당신에게 중요한 방향으로 갈수록, 더 멀리갈 수 있다. 당신이 집착하지 않는 것에서 성공하기란 너무나 어렵기 때문이다.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: start;&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;text-align: start;&quot;&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;-------&lt;/div&gt;
&lt;div&gt;출처 (샘알트만 블로그 ) - &lt;a href=&quot;https://blog.samaltman.com/how-to-be-successful&quot;&gt;https://blog.samaltman.com/how-to-be-successful&lt;/a&gt;&lt;/div&gt;</description>
      <category>IT 발자취</category>
      <category>ChatGPT</category>
      <category>OpenAI</category>
      <category>샘알트만</category>
      <category>오픈AI</category>
      <category>오픈에이아이</category>
      <category>챗GPT</category>
      <author>에드 신</author>
      <guid isPermaLink="true">https://software-creator.tistory.com/37</guid>
      <comments>https://software-creator.tistory.com/37#entry37comment</comments>
      <pubDate>Mon, 12 Jun 2023 17:35:14 +0900</pubDate>
    </item>
    <item>
      <title>놀라운책, 프로그래머의 뇌를 읽고</title>
      <link>https://software-creator.tistory.com/36</link>
      <description>&lt;p&gt;모든 개발자가 읽어야할 책이 있을까?&lt;/p&gt;
&lt;p&gt;개발 분야는 다채롭고, 개발자의 경력과 실력에 따라 필요한 책이 다르기에&lt;/p&gt;
&lt;p&gt;&amp;#39;예&amp;#39;라고 말하기는 어렵다. 하지만 모든 개발자에게 권할 만한 책이 나왔다.&lt;/p&gt;
&lt;p&gt;바로 &amp;#39;프로그래머의 뇌&amp;#39;이다.&lt;/p&gt;
&lt;p&gt;뇌와 프로그래밍의 관계, 우리가 코딩을 하고 디버깅을 할때 두뇌에서 무슨 일이 일어나는지 적은 거의 유일한 책이다. 왜 어떤 코딩은 더 어렵고 어떤 코딩은 더 쉬운가와 같은 개발자가 항상 마주치는 의문을 이 책은 해소해준다.&lt;/p&gt;
&lt;p&gt;책 내용 중 버릴 게 없어 전부 다 인용하고 싶을 정도지만 공간이 협소하니&lt;/p&gt;
&lt;p&gt;책에 적힌 각종 과학적 사실, 코딩 테크닉 중 경험한 부분을 바탕으로 책을 읽은 후기를 적어보려고 한다.책에 설명된 뇌 관련 내용 중 중요한 것만 짧게 적어보겠다. 뒷내용을 이해하기 위해 필요하다.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;0. 간단한 뇌 구조 설명&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;우리 뇌에는 크게 3가지 기억이 있다.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;a.장기 기억(Long term memory, LTM )&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;b.단기 기억 (Short term memory, STM )&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;c.작업 기억 (Working memory )&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&amp;#39;&lt;strong&gt;장기 기억&lt;/strong&gt;&amp;#39;은 우리 두뇌 깊숙이 저장되어 있는 기억이다. 초등학교때 배웠던 것이나, 계속해서 반복적으로 배운 것들이 주로 장기기억에 저장이 된다.&lt;/p&gt;
&lt;p&gt;&amp;#39;&lt;strong&gt;단기 기억&lt;/strong&gt;&amp;#39;은 잠깐 기억할 필요가 있는 것을 말한다. 처음 듣는 전화번호나 처음 만나는 사람의 이름 같이 짧게 기억하는 정보가 단기 기억이다.&lt;/p&gt;
&lt;p&gt;&amp;#39;&lt;strong&gt;작업 기억&lt;/strong&gt;&amp;#39;은 어떠한 일을 하기 위해서  임시로 기억을 하는 것을 말한다. 뇌의 메모장이라고 보면 된다. 함수를 만들때 함수 이름을 기억하는 것 같은게 작업 기억이 하는 일이다. &lt;/p&gt;
&lt;p&gt;&amp;#39;작업 기억&amp;#39;과 &amp;#39;단기 기억&amp;#39;은 헷갈릴 수 있다. 똑같이 숫자를 기억하는 상황을 떠올려보자.  &amp;#39;단기기억&amp;#39;은 &amp;#39;010-123-4567&amp;#39; 처럼 단순히 전화번호를 기억하는 것이고, &amp;#39;작업기억&amp;#39;은  &amp;#39;456 + 23  - 85 + 1200&amp;#39;같은 숫자계산을 하기 위해 기억하는 걸 말한다.&lt;/p&gt;
&lt;p&gt;전화번호를 기억할때는 숫자만 차례대로 기억하면 되지만, 숫자 계산을 할때는 앞의 숫자와 뒤의 숫자가 어떻게 변하는지를 다 기억하고 있어야한다.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;한마디로 작업기억이 할일이 더 많은 셈이다.&lt;/strong&gt; &amp;#39;단기기억&amp;#39;과 &amp;#39;작업기억&amp;#39;은 둘 다 잠시 기억한다는 공통점이 있는데 이에 반해 &amp;#39;장기 기억&amp;#39;은 자고 나서, 며칠이나 몇달 뒤에도 기억하는 걸 말한다.&lt;/p&gt;
&lt;p&gt;우리가 어떤 문제를 해결할때는 3가지를 다 쓰게 되는데 보통 &amp;#39;장기 기억&amp;#39;을 먼저 확인하고 그 다음에 &amp;#39;단기 기억&amp;#39;을 본 뒤 필요할때 &amp;#39;작업 기억&amp;#39;을 활용하게 된다. &amp;#39;작업기억&amp;#39;을 쓰는 건 상당한 에너지가 필요하기 때문이다.&lt;/p&gt;
&lt;p&gt;가장 중요한 기억이 어떻게 분류 되는지 알았으니 책에 나온 방법을 일부 적어보겠다. 책내용 요약과 경험담이 섞여있다.여기 적힌건 내용의 1/10도 안되니 꼭 책을 구해서 읽어보기를 바란다. 그럴만한 가치가 있다.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;1.간단한 문법부터 외우며 수련하라&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;책에서는 상당수 개발자가 검색을 하면서 시간을 보낸다고 말한다. 이는 얼핏 보기에는 아무것도 아닌 것 같지만 상당히 비효율적이다.&lt;/p&gt;
&lt;p&gt;검색하는 데 작게 나마 시간이 들뿐더러, 뇌의 작업기억에 부하를 주기 때문이다.&lt;/p&gt;
&lt;p&gt;뇌가 쓸 수 있는 에너지는 한정적인데 장기 기억을 쓰는데는 별로 에너지가 안 들고&lt;/p&gt;
&lt;p&gt;단기 기억은 적게 들고 작업 기억은 많이 든다.&lt;/p&gt;
&lt;p&gt;작업 기억이 많이 필요한 일일수록, 두뇌가 다른 일을 하지 못한다. 문법이나 기초적인 기능을 머리에 담고 있느라 막상 중요한 문제를 해결하지 못하는 셈이다.  이렇기에 기본적인 문법이나 사용중인 프레임워크에서 자주 쓰는 기능은 외워버리는 게 좋다. 두뇌의 남는 에너지를 문제 풀이나 기능 개발에 쓸 수 있게 되기 때문이다.&lt;/p&gt;
&lt;p&gt;원래 나는 개발 문법 정도는 다 외웠지만 특별히 프레임워크의 기능 같은 걸 외우지는 않았다. 그러나 코딩 과외를 하게 되면서 라이브 코딩을 2-3시간은 해야되었고, 어떤 질문이 나올지 몰라 문법과 프레임워크의 기능을 외워서 갔다. 그런데 이상하게도 수업을 하면 할수록, 원래 본업으로 돌아와 개발을 하는 시간이 단축되었고 디버깅이 잘 되었다. 추측건데 단기기억에 머물렀던 문법들이 장기기억으로 넘어가면서 두뇌가 더 편하게 코딩을 할 수 있게 되었던 걸로 보인다. 남을 가르치다보면은 실력이 는다고 하는데 이런 원리이기 때문인걸로 보인다.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;2.두뇌는 개발툴의 온갖것을 다 참고해서 코드를 기억한다&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;두뇌는 코드를 기억할때 코드만 기억하지 않는다. 개발툴의 화면 구조나 색깔 등도 참고한다는 뜻이다.비주얼 스튜디오, 이클립스, XCode 같은 개발 툴을 쓰다보면 함수나 클래스, 폴더 등의 색이 다르다. 뇌는 이런 색, 구조도 같이 기억해두었다가 코드를 찾을때 활용한다. 장기기억이 작업의 환경까지도 기억하는 셈이다.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;fun add() {

var age = 35;

}&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;위와 같은 함수가 있다면 &amp;#39;fun&amp;#39;과 &amp;#39;add&amp;#39;를 읽고 무슨 함수일거라고 추측하는 게 아니라 &amp;#39;fun&amp;#39;과 &amp;#39;add&amp;#39;의 색깔을 보고 추측한다는 소리다. 노란색이면 변수고, 파란색이면 함수구나라고 두뇌에서 미루어 짐작하는 것이다. 평소 쓰던 개발툴이 아니라 다른 개발툴로 넘어가면 생산성이 급감하는데는 단순히 단축키가 달라서만은 아닌 것이다. 또한 상당수 개발자가 &amp;#39;종이, 화이트 보드에 코딩&amp;#39;을 하면 실력이 확 줄어드는 이유를 알 수 있다. 평상시 코딩 참고했던 것들이 화이트보드에는 없기 때문이다. 아마도 장기기억에 색깔 같은 것도 들어있는게 아닐까.&lt;/p&gt;
&lt;p&gt;실제로 개발툴을 바꾸면은 생산성이 떨어지는 경우가 많고, 개발툴의 테마를 바꾸면 이상하게 느려진듯한 느낌을 받곤 했는데 이때문인 걸로 보인다.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;3. 새로운 개발자는 왜 느리게 개발할까? 개발자 끼리도 서로 알고 있는 것에 대한 착각과 오해가 많다.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;새로 개발자가 팀에 합류하게 되면 기존의 코드에 대한 정보가 0인 상태이다. 반면 기존 개발자는 기존 코드를 대부분 파악하고 있다. 새로운 개발자가 아는 게 0이라면, 기존 개발자는 10,000정도 안다고 보면 된다. 새로운 개발자는 함수간의 연관 관계나 클래스는 어떤 식으로 구성되어 있는지, 어떤 식으로 개발을 해나갔는지를 모른다. 기능 추가 하는데도 상당히 오래걸린다. 새회사에서 1-2주는 코드 파악하느라 바쁘다.  기존 개발자는 어떤 함수가 어떻게 돌아가는지, 환경 세팅은 어떻게 하는지 알고 있기에 기능 추가하는데 오래 걸리지 않는다. 기존 개발자는 새로운 개발자가 버벅이는 모습을 보고 능력이 부족하다고 생각한다.&lt;/p&gt;
&lt;p&gt;&amp;quot;나는 기능 추가하는데 3일이면 되는데, 새로운 친구는 2주나 걸리네, 실력이 없구만.&amp;quot;&lt;/p&gt;
&lt;p&gt;이는 일반적인 개발회사에서 벌어지는 일이다. 실제 개발 능력은 비슷할 수 있지만 새로 들어온 개발자는 작업해야될 코드에 대한 지식이 없다. 반면 기존 개발자는 변수 이름, 폴더 구조, 코드들이 어떻게 연결되어 있는지 등에 대한 지식이 장기 기억에 들어 있다. 지식 차이를 인식하지 못하기에 오해가 생기는 셈이다.&lt;/p&gt;
&lt;p&gt;이런 오해를 줄이는 방법이 있다. 일반적으로 많이 쓰는 아키텍처를 사용해서 새로운 개발자가 학습하는데 걸리는 시간을 줄이면 된다. 디자인 패턴이나 일반적인 아키텍처를 쓰는 경우 코드 수정을 하는데 시간이 적게 들었다고 한다. 또 새로운 코드에 빨리 적응할 수 있게 코드 구조를 다룬 문서나 작업 기록을 공유할 필요가 있다. 일정 시간 기다리는 건 필수이다. 참고로 IT 선진국인 미국도 1/3 가량 회사가 &amp;#39;신규 개발자 적응 과정&amp;#39;이 없다고 한다. 우리나라에서는 더 적은수만이 적응과정이 있지 않을까.  이런 걸 보면 구글이 오픈소스를 많이 하는게 미리 구글 스타일 코드를 잘 아는 사람을 늘리기 위해서는 아닐까 하는 생각이 문득 든다.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;4.함수, 클래스 이름 등을 보며 어떤 기능인지 추측을 한다.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;못 보던 변수, 함수나 클래스를 보면 그 이름을 읽으며 얘가 어떤 기능이겠구나 예상을 한다.경험이 쌓이면 코드를 다 읽기 전에 일종의 &amp;#39;예측&amp;#39;을 하는 셈이다.&lt;/p&gt;
&lt;p&gt;&amp;#39;예측&amp;#39;과 실제 기능이 일치한다면 빠르게 코드를 읽고 넘어갈 수 있지만 함수가 예측과 다른 일을 많이 하면은 할수록 문제가 생긴다.  예를 하나 들어 보자.&lt;/p&gt;
&lt;p&gt;밑의 함수는 이메일이 제대로 되었는지 확인하는 함수이다.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;fun isValidEmail() {

// 블라블라

}&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&amp;#39;isValidEmail&amp;#39; 은 함수 내부를 보기 전에도 이메일을 검증하는 함수일거라고 대강 추측할 수 있다.그런데 추측과는 다르게 이메일을 수정하는 내용이 있다고 해보자. 이 경우에 이 함수에 문제가 있을거라고 생각하기도 어렵고 디버깅하는데 걸리는 시간도 오래 걸리게 된다. 이름을 잘 정하는 게 길게 보았을때 매우 중요한 일인 셈이다.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;5.초기 프로젝트 세팅이 끝까지 간다.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;윈도우즈를 개발할때 택했던 명명법은 &amp;#39;헝가리안 표기법&amp;#39;이었는데 이 방식은 한 논문에서 나온 것이었으나 막상 논문에 적힌 내용과는 조금 달랐다. 윈도우즈의 초기 개발진들이 논문의 일부를 잘못 이해했고, 찰즈 페졸즈가 쓴 &amp;#39;윈도우즈 프로그래밍&amp;#39;이 널리 팔리면서, 이 방식이널리 퍼지게 되었다.&lt;/p&gt;
&lt;p&gt;이건 윈도우즈만의 문제가 아니라 어떤 프로젝트든 초반의 구조가 끝까지 영향을 미치는 경우가 대단히 많다고 한다. 일단 구조가 한번 잡히면 이를 바꾸기는 상당히 어렵고 새로 합류하는 개발자들은 큰 고민없이 기존의 구조나 명명법을 따르기 마련이다.&lt;/p&gt;
&lt;p&gt;나중에 고치기 어렵다는 걸 감안하면 초반에 많은 공을 들이는게 낫다.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;6.개발자 간에도 이름 짓는 방식이 아주아주 다양하다.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;동일한 기능을 하는 함수를 설명하고 개발자들에게 이름 짓기를 했는데 30여건에서 단하나도 동일한 이름이 나오지 않았다.&lt;/p&gt;
&lt;p&gt;초반에 프로젝트를 설계할때 &amp;#39;이름짓는법&amp;#39;(네이밍)을 개발자끼리 정해 놓는 게 꼭 필요하다.&lt;/p&gt;
&lt;p&gt;개발자들에게 &amp;quot;매달 최대로 받을 수 있는 혜택&amp;quot;을 변수로 만들도록 했는데 10가지가 넘는 변수명이 나왔다.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;max_benefit&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;max_benefit_per_month&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;max_benefit_num&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;max_monthly_benefit&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;benefits&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;benefits_per_month&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;max_num_of_benefit&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;benefit_max_num&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;max_number_of_benefit&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;max_benefit_amount&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;max_acc_benefit&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;max_allowed_benefit&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;montly_benefit_limit&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;이에 대한 해결책은 이름짓기에 대한 규칙을 정하는 것이다. 변수 이름이 비슷하면 동일한 이름틀을 사용한다는 의미다.&lt;/p&gt;
&lt;p&gt;예를 들어 최대 이자 금액을 계산하는 변수에 &amp;quot;max_interest_amount&amp;quot;라는 이름을 주었다면, 최대와 관련된 변수는 &amp;quot;max_benefit_amount&amp;quot; , &amp;quot;max_cost_amount&amp;quot; 같은 식으로 짓는게 좋다. &amp;quot;interest_maximum&amp;quot;같은 식으로 이름을 지으면 두뇌의 장기기억에서 기존의 지식을 활용하기 어려워진다.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;7. 코드 정렬도 중요하다.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;코드 블록을 어떻게 만드는가에 따라서 코드를 파악하는 정도도 달라진다고 한다. 코드 블록은 탭은 얼마나 쓸지, 각종 열고 닫기는 어떤 시점에서 할지를 말한다.&lt;/p&gt;
&lt;p&gt;익숙한 코드 블록으로 된 코드를 보면 더 빠르게 코드를 파악하지만, 익숙하지 않다면 파악하는데 오래 걸린다. 여럿이서 하는 프로젝트라면 코드 블록도 정해놓고 하는게 좋다.&lt;/p&gt;
&lt;p&gt;C와 Java는 코드 블록이 미묘하게 다른데, 한쪽 언어를 주로 쓰다가 다른 언어를 쓰게 되면 주로 쓰던 언어의 스타일을 따라 가려는 경향이 있다. 한번 학습된 것을 잊기가 쉽지 않은 것이다.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;마무리&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;한분야의 전문지식을 다룬 분야와 연결하기는 매우 어렵다. 그런데 저자는 이 놀라운 일을 해냈다. 뇌과학과 프로그래밍이라는 하나도 알기 어려운 것을 연결시킨 것이다. 덕분에 우리 두뇌가 근본적으로 어떻게 코딩을 하는가, 어떻게 두뇌를 잘 활용해서 코딩할 수 있을까를 근본적으로 알수 있게 되었다. 경력 있는 개발자라면 꼭 한번 읽어보기를 권한다. 뇌과학적 용어 (fMRI 같은것)이 나오기는 하는데 검색 하면서 읽을 가치가 있다.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;인상깊은 구절&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&amp;quot;생소한 코드를 처음 접하면 누구나 어느정도 혼란을 느끼기 마련이다. 이러한 혼란은 3가지로 나눌 수 있다. 첫째는 지식의 부족이다. 프로그래밍 언어나 알고리즘 혹은 업무 영역에 대한 지식이 없는 경우 혼란이 생길 수 있다. 둘째는 정보의 부족이다. 코드를 이해하기 위해 필요한 정보를 충분히 가지고 있지 못하는 경우다. 요즘은 코드가 다양한 라이브러리를 사용하기 때문에 코드를 잘 이해하기 위해서는 이들에 대한 정보를 많이 찾아봐야하고, 찾아보는 일을 하기 전에 무엇을 하고 있었는지도 기억해야한다. 셋째, 처리 능력의 부족이다. 코드를 따라가다보면 어떤 동작들이 수행되는지 알기 어려울 때가 있다. 코드가 너무 복잡해서 혼란이 생기는 경우이다.&amp;quot;&lt;/p&gt;
&lt;p&gt;&amp;quot;전문가는 초보자보다 코드를 더 잘 기억한다. 전문가는 청크(덩어리) 단위로 기억을 한다.&amp;quot;&lt;/p&gt;
&lt;p&gt;&amp;quot;심지어 다른 프로그래밍 언어를 잘 아는 뛰어난 프로그래머조차, 아직 장기기억(LTM, long term memory)에 저장되지 않은 익숙하지 않은 키워드, 구조, 도메인 개념을 기억하는데 어려움을 겪는다&amp;quot;&lt;/p&gt;
&lt;p&gt;&amp;quot;프랑스어를 배울 수 있다면 파이썬도 배울 수 있다. &amp;quot;&lt;/p&gt;
&lt;p&gt;&amp;quot;fMRI 스캔을 통해 작업 기억 공간과 언어 처리에 관련 있는 두뇌의 영역이 프로그래밍과 연관된다는 것을 살펴봤다. 이 사실은 작업 기억 공간 용량이 크고 언어 능력이 좋은 사람이 더 뛰어난 프로그래머가 된다는 것을 암시하는 것일까?&amp;quot;&lt;/p&gt;
&lt;p&gt;&amp;quot;프랫의 연구팀이 발견한 사실이 어떤 프로그래머들에게는 놀라운 것일 수 있다. 계산 능력, 즉 수학적 능력을 적용해야 하는 지식과 기술은 프로그래밍 능력에 대한 예측력이 작았다. 실험 참여자들 사이에서 겨우 2의 분산(편차)이 나타났다. 언어 능력이 더 나은 예측요인으로 17% 분산이 나왔다. 이것은 흥미로운 결과다. 개발자들은 보통 수학 능력을 중요시하고, 필자가 아는 많은 프로그래머는 자신들이 언어에 소질이 없다고 말했기 때문이다. 세 가지 테스트 중에서 가장 뛰어난 예측력을 보인 요인은 작업 기억 공간 용량과 추론 능력이었다. 실험 참여자들 사이 분산이 34%였다.&amp;quot; - p87&lt;/p&gt;
&lt;p&gt;&amp;quot;학습률에 대한 측도는 언어 능력이 가장 큰 요인이었다. 학습률과 프로그래밍 능력은 서로 비례하는 상관관계를 보였다. 물론 이 연구에서 읽기 능력이 뛰어난 학생이 일반적으로 학습 성과가 좋고 반면에 읽기 능력이 부족한 학생은 빠르고 쉽게 학습하지 못한다는 사실이 근원적인 요인일 수 있다&amp;quot; - p87&lt;/p&gt;</description>
      <category>독서</category>
      <category>개발자</category>
      <category>뇌과학</category>
      <category>코딩뇌</category>
      <category>프로그래머의뇌</category>
      <author>에드 신</author>
      <guid isPermaLink="true">https://software-creator.tistory.com/36</guid>
      <comments>https://software-creator.tistory.com/36#entry36comment</comments>
      <pubDate>Fri, 24 Jun 2022 14:22:01 +0900</pubDate>
    </item>
    <item>
      <title>힐트 Hilt 안드로이드에서 의존성 관리하기</title>
      <link>https://software-creator.tistory.com/35</link>
      <description>&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;article class=&quot;markdown-body&quot;&gt;
&lt;h3 id=&quot;힐트-hilt---android-모듈-정리&quot; class=&quot;atx&quot; data-ke-size=&quot;size23&quot;&gt;&lt;b&gt;힐트&lt;/b&gt; Hilt - Android 모듈 정리&lt;/h3&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;Hilt는 의존성을 추가하는 (dependency injection, di)는 라이브러리이다. ''의존''이란 한 클래스가 다른 클래스를 참고한다는 뜻인데, 개발을 하다보면 여러 클래스끼리 연결되는 경우가 흔하게 있다. 한 클래스가 준비되어야 다른 클래스도 쓸 수 있는 것이다.&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;2개 정도의 클래스면 손으로 클래스끼리 연결을 해 줄 수도 있지만, 클래스의 수가 3개, 4개가 넘어가고 여러곳에서 연결이 생기면 일일이 객체를 만드는 것도 번거로운 일이 된다.&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;이런 어려움을 해결하기 위해 라이브러리를 써서 의존성을 관리한다. 라이브러리를 쓰면 알아서 객체를 만들어준다고, 연결해야될 클래스끼리 연결해준다는 뜻이다. 힐트(Hilt)는 안드로이드에서 쉽게 의존성을 관리할 수 있게 해주는 라이브러리이다. 기존에 많이 쓰이던 대거(Dagger)를 기반으로 만들어졌는데 쓰기가 훨씬 편하다.&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;사실 대거는 학습 난이도도 꽤 있고, 쓰다보면 일을 줄이려다 더 복잡하게 일을 만들어버리는 경향이 있었는데 힐트는 대거에 비해 상당히 단순하다.&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;구글에서도 적극 힐트를 밀고 있으니 빨리 힐트를 학습해보도록 하자.&lt;/p&gt;
&lt;h5 id=&quot;설정하기&quot; class=&quot;atx&quot;&gt;설정하기&lt;/h5&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;힐트 라이브러리를 추가해줘야 힐트를 쓸 수 있다. 2군데에 추가하면 된다&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;i&gt;build.gradle&lt;/i&gt; - 프로젝트의 그래들&lt;/p&gt;
&lt;pre class=&quot;gradle&quot;&gt;&lt;code&gt;buildscript {
    ext.hilt_version = '2.38.1'
    dependencies {
        classpath &quot;com.google.dagger:hilt-android-gradle-plugin:$hilt_version&quot;
    }
}&lt;/code&gt;&lt;/pre&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;i&gt;app/build.gradle&lt;/i&gt; - 앱의 그래들&lt;/p&gt;
&lt;pre class=&quot;nginx&quot;&gt;&lt;code&gt;apply plugin: 'kotlin-kapt'
apply plugin: 'dagger.hilt.android.plugin'


dependencies {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;implementation &quot;com.google.dagger:hilt-android:$hilt_version&quot;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;kapt &quot;com.google.dagger:hilt-android-compiler:$hilt_version&quot;
}&lt;/code&gt;&lt;/pre&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;설정이 되었으면 힐트를 써보자.힐트를 사용하려면 힐트를 쓴다는 걸 알려줘야한다. 다들 알다시피 안드로이드의 시작점은 Application이다.&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;Application에 @HiltAndroidApp 이라고 적으면 힐트를 쓸 준비가 된다.&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;i&gt;MainApplication.kt 파일&lt;/i&gt;&lt;/p&gt;
&lt;pre class=&quot;angelscript&quot;&gt;&lt;code&gt;@HiltAndroidApp
class MainApplication: Application() {

}&lt;/code&gt;&lt;/pre&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;MainApplication도 잊지말고 AndroidManifest에 추가해주자&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;i&gt;AndroidManifest.xml 파일&lt;/i&gt;&lt;/p&gt;
&lt;pre class=&quot;applescript&quot;&gt;&lt;code&gt;&amp;lt;application

 android:name=&quot;.MainApplication&quot;
 &amp;hellip;. 
/&amp;gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;이제 실행해보자. 잘 돌아가면 본격적으로 힐트를 적용해보겠다&lt;/p&gt;
&lt;hr data-ke-style=&quot;style1&quot; /&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;일단 기본적인 액티비티를 만들어보고 설명을 해보겠다.&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;2개 파일을 만들건데 데이터를 담을 Store 클래스와 MainActivity 클래스이다.&lt;/p&gt;
&lt;h5 id=&quot;힐트-적용전&quot; class=&quot;atx&quot;&gt;힐트 적용전&lt;/h5&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;i&gt;Store.kt&lt;/i&gt;&lt;/p&gt;
&lt;pre class=&quot;kotlin&quot;&gt;&lt;code&gt;const val TAG = &quot;STORE&quot;

class Store {

    fun open() {
        Log.i(TAG, &quot;OPEN&quot;)
    }

    fun close() {
        Log.i(TAG, &quot;CLOSE&quot;)
    }   
}&lt;/code&gt;&lt;/pre&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;i&gt;MainActivity.kt&lt;/i&gt;&lt;/p&gt;
&lt;pre class=&quot;kotlin&quot;&gt;&lt;code&gt;@AndroidEntryPoint
class MainActivity : AppCompatActivity() {

   lateinit var store: Store

   override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_main)

        store = Store() // 스토어 객체를 만듬
        store.opne()
   }
}&lt;/code&gt;&lt;/pre&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;액티비티를 보면 못 보던 것이 있다. 바로 &lt;i&gt;@AndroidEntryPoint&lt;/i&gt; 이다. @AndroidEntryPoint 는 액티비티나 프래그먼트 등에 붙여서 힐트가 쓰인다는 걸 알려준다.&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;현재까지는 액티비티(Activity), 프레그먼트(Fragment) , 뷰(View), 서비스(Service), 브로드캐스트(Broadcast)에 붙일 수 있다.&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;메인 액티비티에서 Store 클래스를 쓰려면 어떻게 해야할까? 보통때라면 미리 객체를 만들거나, onCreate 등 라이프 사이클에서 객체를 만들어 쓸 것이다.&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;지금은 Store 객체를 하나만 만들지만, Book 객체, Street 객체, Shop 객체 등 온갖 객체를 만들어야 된다고 상상해보자. 매우 번거로울 것이다.&lt;/p&gt;
&lt;h4 id=&quot;힐트-적용하기&quot; class=&quot;atx&quot; data-ke-size=&quot;size20&quot;&gt;힐트 적용하기&lt;/h4&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;i&gt;Store.kt&lt;/i&gt;&lt;/p&gt;
&lt;pre class=&quot;kotlin&quot;&gt;&lt;code&gt;class Store @Inject constructor() {
    fun open() {
        Log.i(TAG, &quot;OPEN&quot;)
    }

    fun close() {
        Log.i(TAG, &quot;CLOSE&quot;)
    }
}&lt;/code&gt;&lt;/pre&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;클래스 이름 뒤에 &lt;i&gt;@Inject&lt;/i&gt; 를 적어주고 &lt;i&gt;constructor()&lt;/i&gt; 를 적어주면은 된다. 여기서 @Inject 를 적으면 힐트가 이 클래스는 어딘가에서 쓰이겠구나를 알게 된다. 보통 코틀린에서 변수없는 생성자 (constructor)는 생략할 수 있는데 힐트를 쓸때는 꼭 constructor()를 써줘야한다&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;이제 액티비티에도 힐트를 적용해보자&lt;/p&gt;
&lt;pre class=&quot;kotlin&quot;&gt;&lt;code&gt;@AndroidEntryPoint
class MainActivity : AppCompatActivity() {

   @Inject lateinit var store: Store

   override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_main)

        store.opne()
   }
}&lt;/code&gt;&lt;/pre&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;사용할 객체 앞에 &lt;i&gt;@Inject&lt;/i&gt; 를 적어주면 힐트가 알아서 객체를 만들어준다.&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;여기서는 &lt;i&gt;lateinit var store&lt;/i&gt; 앞에 &lt;i&gt;@Inject&lt;/i&gt; 를 적어주자&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;이제 준비가 되었으니 앱을 실행해보자.&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;별 이상없이 로그가 찍히면 성공이다.&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;일반 클래스일 경우에는 이처럼 간단히 힐트를 적용할 수 있으나 인터페이스인 경우에는 조금 더 할 작업이 있다&lt;/p&gt;
&lt;h3 id=&quot;인터페이스에-힐트-적용하기&quot; class=&quot;atx&quot; data-ke-size=&quot;size23&quot;&gt;인터페이스에 힐트 적용하기&lt;/h3&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;가게 (Store)를 한종류만 열줄 알았는데, 옷가게 (Clothing Store)와 책방 (Book Store)도 열게 되었다. 옷가게와 책방은 비슷한점도 있기에 기존의 것을 재활용하고 싶다. 그래서 Store 클래스를 수정하고 ClothingStore와 BookStore 클래스를 만든다.&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;i&gt;Store.kt&lt;/i&gt;&lt;/p&gt;
&lt;pre class=&quot;kotlin&quot;&gt;&lt;code&gt;interface Store  {
    fun open()
    fun close()
}&lt;/code&gt;&lt;/pre&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;인터페이스로 수정하였다.&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;i&gt;ClothingStore.kt&lt;/i&gt;&lt;/p&gt;
&lt;pre class=&quot;kotlin&quot;&gt;&lt;code&gt;class ClothingStore @Inject constructor() : Store {
    override fun open() {
        Log.i(TAG, &quot;open clothing store&quot;)
    }

    override fun close() {
        Log.i(TAG, &quot;close clothing store&quot;)
    }

}&lt;/code&gt;&lt;/pre&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;Store 인터페이스를 구현하고 &lt;i&gt;@Inject&lt;/i&gt; 를 적어준다&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;i&gt;BookStore.kt&lt;/i&gt;&lt;/p&gt;
&lt;pre class=&quot;kotlin&quot;&gt;&lt;code&gt;class BookStore @Inject constructor() : Store {
    override fun open() {
        Log.i(TAG, &quot;open book store&quot;)
    }

    override fun close() {
        Log.i(TAG, &quot;close book store&quot;)
    }

}&lt;/code&gt;&lt;/pre&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;ClothingStore와 동일한 작업을 해준다&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;이제 액티비티로 가서 객체가 잘 만들어지는지 확인해보자&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;i&gt;MainAcitivity.kt&lt;/i&gt;&lt;/p&gt;
&lt;pre class=&quot;kotlin&quot;&gt;&lt;code&gt;@AndroidEntryPoint
class MainActivity : AppCompatActivity() {

    @Inject lateinit var store: BookStore // 잘 만들어진다 

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_main)

        store.open() // 에러 없음 
    }
}&lt;/code&gt;&lt;/pre&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;구현된 BookStore의 경우 객체가 잘 만들어진다. 힐트가 제대로 일을 한다.&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;반면 Store 인터페이스를 쓰려고 하면 빌드 단계에서부터 막힌다.&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;i&gt;MainAcitivity.kt&lt;/i&gt;&lt;/p&gt;
&lt;pre class=&quot;kotlin&quot;&gt;&lt;code&gt;@AndroidEntryPoint
class MainActivity : AppCompatActivity() {

    @Inject lateinit var store: Store // 에러 발

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_main)

        store.open()
    }
}&lt;/code&gt;&lt;/pre&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;힐트가 보았을때 Store가 BookStore인지, ClothingStore인지 구분할 수 없기에 에러가 생기는 것이다.&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;힐트가 이를 구분할 수 있게 하려면 '모듈'(Module)을 추가해주어야한다.&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;i&gt;StoreModule.kt&lt;/i&gt;&lt;/p&gt;
&lt;pre class=&quot;less&quot;&gt;&lt;code&gt;@Module
@InstallIn(ActivityComponent::class) // 모듈이 사용되는 범위를 정한다 
abstract class StoreModule {

    @Binds // 연결한다. 인터페이스의 구현을 제공한다고 보아도 된 
    abstract fun BookStoreImpl(bookStore: BookStore): Store
}&lt;/code&gt;&lt;/pre&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;여기서 &lt;i&gt;@Module&lt;/i&gt;은 모듈로 사용한다는 의미이고, &lt;i&gt;@InstallIn&lt;/i&gt;은 모듈이 어떤 범위에서 쓰이는가를 나타낸다. 범위에는 액티비티, 애플리케이션, 싱글턴 등 다양한 종류가 있으니 입맛에 맞게 골라쓰면 된다.&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;모듈을 추가했으면 다시 빌드를 해보자. 깔끔하게 빌드가 된다. 실행을 해도 잘된다. 힐트 정복이라고 말하고 끝내고 싶지만 문제가 남아 있다. 아직 Store가 BookStore인 ClothingStore인지 구분을 못하는 것이다. 난감하다. 기껏 인터페이스를 만든 의미가 없다.&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;다행히 퀄리파이어 (@Qualifier, 구분자) 추가하면 구분을 할 수 있게 된다.&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;StoreModule을 수정해주자.&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;i&gt;StoreModule.kt&lt;/i&gt;&lt;/p&gt;
&lt;pre class=&quot;less&quot;&gt;&lt;code&gt;@Module
@InstallIn(ActivityComponent::class)
abstract class StoreModule {

    @BookStoreQualifier
    @Binds // @Binds 는 연결한다는 뜻 
    abstract fun BookStoreImpl(bookStore: BookStore): Store

    @ClothingStoreQualifier
    @Binds
    abstract fun ClothingStoreImpl(clothingStore: ClothingStore): Store
}



@Qualifier
annotation class BookStoreQualifier

@Qualifier
annotation class ClothingStoreQualifier&lt;/code&gt;&lt;/pre&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;BookStoreQualifier와 ClothingStoreQualifier 라는 퀄리파이어를 만들었다.이 퀄리파이어를 각각의 다른 함수 BookStoreImpl와 ClothingStoreImpl에 붙여주면 이 표시(어노테이션)을 보고 어떤 인터페이스가 어떻게 구현되는지 힐트가 구분할 수 있게 된다.&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;이제 액티비티로 가보자.&lt;/p&gt;
&lt;pre class=&quot;less&quot;&gt;&lt;code&gt;@AndroidEntryPoint
class MainActivity : AppCompatActivity() {


    @BookStoreQualifier // 퀄리파이어 사용 
    @Inject lateinit var bookStore: Store

    @ClothingStoreQualifier  // 퀄리파이어 사용 
    @Inject lateinit var clothingStore: Store

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_main)

        bookStore.open()
        clothingStore.open()
   }
}&lt;/code&gt;&lt;/pre&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;위의 액티비티와는 코드가 좀 달라졌다. BookStore를 사용하고 싶을때는 BookStore를 구현한 퀄리파이어 &lt;i&gt;@BookStoreQualifier&lt;/i&gt; 를 붙였고, ClothingStore를 사용하고 싶을때는 &lt;i&gt;@ClothingStoreQualifier&lt;/i&gt;를 붙였다.&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;실행을 해보면 BookStore와 ClothingStore가 잘 구분이 되는 걸 알 수 있다. 각기 다른 로그가 나오면 성공이다.&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;직접 만든 클래스와 인터페이스를 연결하는 법을 알아보았다.&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;외부 라이브러리를 쓸때는 어떻게 해야할까? Retrofit이나 OkHttp 등등을 사용할때는 어떻게 해야할까&lt;/p&gt;
&lt;h3 id=&quot;외부-라이브러리-모듈로-만들기&quot; class=&quot;atx&quot; data-ke-size=&quot;size23&quot;&gt;외부 라이브러리 모듈로 만들기&lt;/h3&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;외부 라이브러리에 힐트를 적용하는건 약간 더 까다롭지만 어렵지는 않다.&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;많이 쓰이는 네트워크 라이브러리인 OkHttp 에 힐트를 적용해보겠다.&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;app의 build.gradle에 다음과 같이 추가해주자&lt;/p&gt;
&lt;pre class=&quot;clean&quot;&gt;&lt;code&gt;implementation 'com.squareup.retrofit2:retrofit:2.9.0'
implementation 'com.squareup.okhttp3:logging-interceptor:4.9.0'&lt;/code&gt;&lt;/pre&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;그리고 네트워크 관련된 코드를 담을 &lt;i&gt;NetworkModule.kt&lt;/i&gt; 파일을 만들어보자.&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;NetworkModule 파일에는 OkHttpClient 객체를 만드는 코드가 들어있다.&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;일단 코드를 보고 설명을 읽어보도록 하자&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;i&gt;NetworkModule.kt&lt;/i&gt;&lt;/p&gt;
&lt;pre class=&quot;less&quot;&gt;&lt;code&gt;@Module
@InstallIn(SingletonComponent::class)
class NetworkModule {

    @Provides // 다른 곳에서 사용될 객체를 만들어준다는 뜻이다  
    @Singleton
    fun provideHttpLoggingInterceptor() : HttpLoggingInterceptor =
        HttpLoggingInterceptor().setLevel(HttpLoggingInterceptor.Level.BODY)

    @Provides
    @Singleton
    fun provideOkHttpClient(
        @ApplicationContext context: Context,
        httpLoggingInterceptor: HttpLoggingInterceptor
    ): OkHttpClient =
        OkHttpClient.Builder().apply {
            interceptors().add(httpLoggingInterceptor)
        }.build()

}&lt;/code&gt;&lt;/pre&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;위의 StoreModule이 abstract class 였던 것과는 다르게 NetworkModule은 일반 클래스이다. 또 객체를 만들어주는 부분을 &lt;i&gt;@Provides&lt;/i&gt; 로 표시하였다. &lt;i&gt;@Provides&lt;/i&gt; 를 적어줘야 다른 곳에서 객체가 잘 만들어진다.&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;i&gt;provideOkHttpClient()&lt;/i&gt; 함수가 &lt;code&gt;OkHttpClient&lt;/code&gt; 객체를 만들어주는데, 잘보면 인자를 2개 받는다. 하나는 context인데 &lt;i&gt;@ApplicationContext*가 붙어있다. *@ApplicationContext&lt;/i&gt; 를 적어주면 힐트가 알아서 컨텍스트를 찾아주니 매우 편리하다 다른 인자 하나는 httpLoggingInterceptor 인데 바로 위의 &lt;i&gt;provideHttpLoggingInterceptor()&lt;/i&gt; 에서 &lt;code&gt;HttpLoggingInterceptor&lt;/code&gt; 객체를 만들어준다. 같은 모듈 안에 있는 것도 바로 바로 연결이 되는 것이다.&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;이제 액티비티로 가서 &lt;code&gt;OkHttpClient&lt;/code&gt; 객체가 잘 만들어지는지 확인해보자&lt;/p&gt;
&lt;pre class=&quot;kotlin&quot;&gt;&lt;code&gt;@AndroidEntryPoint
class MainActivity : AppCompatActivity() {
    @Inject lateinit var httpClient: OkHttpClient

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_main)

        // request 를 하기 위
        val request = Request.Builder()
            .url(&quot;https://www.google.com&quot;)
            .header(&quot;User-Agent&quot;, &quot;OkHttp Example&quot;)
            .build()    

       httpClient.newCall(request).enqueue(object : Callback {
            override fun onFailure(call: Call, e: IOException) {
                Log.i(TAG, &quot;Network call error - ${call}, err msg - ${e.message}&quot;)
            }

            override fun onResponse(call: Call, response: Response) {
                Log.i(TAG, &quot;Network call - ${response.body}&quot;)
            }

        })

    }

}&lt;/code&gt;&lt;/pre&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;요청을 하고 기다려보자.&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;로그에 request body 나오면 성공이다.&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;이번 글에서는 힐트의 사용법에 대해서 간단하게 알아보았다. 힐트를 쓰려는데&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;헷갈렸다면 이번 글을 통해 도움을 얻었으면 한다.&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;안드로이드 젯팩 (jetpack - viewmodel, workmanager)과의 연결이나 범위(scope) 등 좀 더 자세한 내용을 알고 싶다면 공식 문서를 참고하도록 하자&lt;/p&gt;
&lt;h3 id=&quot;참고&quot; class=&quot;atx&quot; data-ke-size=&quot;size23&quot;&gt;참고&lt;/h3&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;안드로이드 힐트 문서 - &lt;a href=&quot;https://developer.android.com/training/dependency-injection/hilt-android&quot;&gt;https://developer.android.com/training/dependency-injection/hilt-android&lt;/a&gt;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;대거 힐트 문서 - &lt;a href=&quot;https://dagger.dev/hilt/view-model&quot;&gt;https://dagger.dev/hilt/view-model&lt;/a&gt;&lt;/p&gt;
&lt;/article&gt;</description>
      <category>안드로이드 (Android)</category>
      <author>에드 신</author>
      <guid isPermaLink="true">https://software-creator.tistory.com/35</guid>
      <comments>https://software-creator.tistory.com/35#entry35comment</comments>
      <pubDate>Thu, 7 Apr 2022 21:56:25 +0900</pubDate>
    </item>
    <item>
      <title>개발자로 일하기에 좋은 성격이 있을까?</title>
      <link>https://software-creator.tistory.com/34</link>
      <description>&lt;p data-ke-size=&quot;size16&quot;&gt;빅파이브나 mbti 같은 각종 성격 분류법을 보다보니,&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;개발자로 일하면 유리한 성격이 있을거라는 생각이 들었다.&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;빅파이브 기반으로 이를 한번 분석해보고자 한다.&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;빅파이브는 사람의 성격이 크게 5가지로 구성되어 있다고 하는 이론이다.&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;심리학계에서 많이 쓴다.&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;다만 유념해야할 점은 어떤 성격이 있다고 해서 무조건 잘한다는 건 아니다.&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;잠재력이 있다 정도로 보는게 좋다.&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;땅에 과일을 심는 걸 생각해보자.&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;땅이 기름지고, 기후가 좋으면 같은 사과나무를 심더라도, 수확량이 많은 가능성이 높다.&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;허나 땅이 아무리 좋더라도, 심은 나무를 관리 안하면 병충해에 열매가 다 사라질수도 있다.&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;만약 나무를 한그루만 심는다면? 100그루를 심고 충실히 관리한 곳보다 훨씬 못할 것이다.&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;유리한 조건이 있을 수도 있지만, 활용을 못하는 경우도 매우 흔하다.&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;그리고 재능, 환경, 자존감 등도 차이가 난다.&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;성격 유형에 대한 글을 읽을 때는 이 점을 생각하면서 읽었으면 좋겠다.&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;빅 파이브에서는 사람의 성격을 5가지로 나누어 본다.&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;lsquo;성실성(C)&amp;rsquo;, &amp;lsquo;개방성(O)&amp;rsquo;, &amp;lsquo;신경성(N)&amp;rsquo;, &amp;lsquo;외향성(E)&amp;rsquo;, &amp;lsquo;우호성(A)&amp;rsquo;이다. 영어 약자는 C, O, N, E, A인데 앞으로 약자를 같이 쓰겠다.&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;빅 파이브 간략한 테스트는 '&lt;a href=&quot;https://together.kakao.com/big-five&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;여기&lt;/a&gt;'에서 할 수 있다.&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;5대 성격&lt;/b&gt;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;각 성격 특징을 간략히 설명해 보겠다.&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;lsquo;&lt;b&gt;성실성&lt;/b&gt;&amp;rsquo;은 얼마나 계획을 잘 세우고, 꾸준히 일하느냐를 말한다. 매일 10년동안 회사에 지각을 한번도 안 하고 꾸준히 다녔다면&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;lsquo;성실성&amp;rsquo;이 높다고 볼 수 있다. 매일매일 계획이 흐트러지며 약속을 잘 안 지킨다면 &amp;lsquo;성실성&amp;rsquo;이 낮다고 볼 수 있다. &amp;lsquo;성실성&amp;rsquo;이 높으면 계획을 잘 세우고 따라가며, &amp;lsquo;성실성&amp;rsquo;이 낮으면 기존의 계획도 잘 바꾼다. &amp;lsquo;성실성&amp;rsquo;이 낮은 사람이 유머 감각이 있다고 한다.&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;lsquo;&lt;b&gt;개방성&lt;/b&gt;&amp;rsquo;은 새로운 걸 얼마나 잘 받아들이느냐를 나타낸다. 보통 추상적인 철학, 미술, 책 등을 좋아하는 사람은&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;개방성이 높다. &amp;lsquo;개방성&amp;rsquo;이 높으면 새로운 분야를 배우는데 유리하지만, 너무 높으면 어떤 일이든 금방 질려 한다. &amp;lsquo;개방성&amp;rsquo;이 낮으면 반복적인 일을 잘 수행한다. &amp;lsquo;개방성&amp;rsquo;이 낮은 사람이 좀 더 실용적으로 보일 수 있다. 일반적으로 &amp;lsquo;개방성&amp;rsquo; 차이가 적을수록 친구나 연인이 되기 쉽다.&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;lsquo;&lt;b&gt;신경성&lt;/b&gt;&amp;rsquo;은 예민한 정도이다. 남이 한 말을 곱씹어 보고, 어떤 일이 해결 안 되었을때 자꾸 스트레스 받는다면 &amp;lsquo;신경성&amp;rsquo;이 높은 것이다.&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;다른 사람의 말이나 행동을 신경 안 쓴다면, &amp;lsquo;신경성&amp;rsquo;이 낮다고 보면 된다. &amp;lsquo;신경성&amp;rsquo;이 낮은 사람들은 웬만한 일에는 스트레스를 안 받는다.&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;lsquo;신경성&amp;rsquo;이 높으면 삶을 부정적으로 보고, 우울증에 걸릴 가능성이 높다. &amp;lsquo;신경성&amp;rsquo;이 높은 사람 중에 위대한 철학자, 예술가가 상당히 많다.&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;lsquo;신경성&amp;rsquo;이 높고, &amp;lsquo;개방성&amp;rsquo;도 높으면 창의적이 될 확률이 급격히 올라간다. 남다른 결과물을 만들어낼 가능성이 높지만, 삶이 불행한 경향이 있다.&amp;nbsp;베토벤, 고흐도 &amp;lsquo;신경성&amp;rsquo;이 매우 높았을 걸로 추정된다. &amp;lsquo;신경성&amp;rsquo;이 높으면 유산소 운동, 명상, 친밀한 대인 관계를 통해 스트레스를 다루는 법을 알 필요가 있다.&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;lsquo;&lt;b&gt;외향성&lt;/b&gt;&amp;rsquo;은 얼마나 외부 활동을 추구하느냐를 말한다. &amp;lsquo;외향성&amp;rsquo;이 높으면 밖으로 엄청 돌아다닌다.&amp;nbsp; 사람을 만나고, 여행을 가고, 외부 활동에 많은 시간과 에너지를 쓴다. 집에만 있는 날이 드물다. &amp;lsquo;외향성&amp;rsquo;이 낮으면 집에 주로 있거나, 밖으로 나가도 혼자서 있는다. 일이나 취미 활동도 혼자 하는 걸 선호한다.&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;lsquo;&lt;b&gt;우호성&lt;/b&gt;&amp;rsquo;은 다른 사람에게 동의하는 정도이다. &amp;lsquo;우호성&amp;rsquo;이 높으면 타인과 쉽게 친해지며, 의견 차이가 있더라도 관계를 생각해 넘어간다. 처음 봤는데도 친근해 보이는 사람이 있다면, 우호성이 높다고 보면 된다.&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;lsquo;우호성&amp;rsquo;이 낮으면 타인과 친해지는데 시간이 걸리고, 의견이 다를 경우 할말 다 하는 경향이 있다.&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;lsquo;우호성&amp;rsquo;이 너무 높으면 주관이 없어 보이고, &amp;lsquo;우호성&amp;rsquo;이 너무 낮으면 반골 기질이 있어보인다.&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;5개 성격적 특징에 대해 간략히 알아보았다.&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;이 특징들을 영어 알파벳으로 나타낼 건데&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;각각의 수치는 5개 ( ++, +, 무표시, -, &amp;mdash; )로 나타낸다.&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;C이면 중간의 성실성이고, C++면 계획에 집착할 정도로 성실한 경우다.&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;성격적 특징에 따른 차이&lt;/b&gt;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;1.성실성&lt;/b&gt;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;성실성 (C+) :&amp;nbsp; 일반적으로 성실도가 높으면 개발에 투자하는 시간이 많을 것이다.&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;개발 적성은 사람마다 차이가 있는데, 적성이 뛰어나도 투자하는 시간이 적으면 잘 못 배울 가능성이 높다.&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;개발적성이 10이지만 하루에 5시간 공부하는 사람과 개발 적성이 6이지만 하루에 9시간 공부하는 사람이 있다고 치자.&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;ul style=&quot;list-style-type: disc;&quot; data-ke-list-type=&quot;disc&quot;&gt;
&lt;li&gt;10 * 5 = 50&lt;/li&gt;
&lt;li&gt;6* 9 = 54&lt;/li&gt;
&lt;/ul&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;매일 4씩의 차이가 생기게 된다. 이 차이가 1년, 2년 쌓이면 어마어마진다.&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;시간이 지날수록 성실성이 높은 사람이 유리해지는 것이다.&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;또한 성실성이 높을수록 개발 일정이나 다른 직군과의 약속을 책임감 있게 준수할 가능성이 높다. 성실도가 낮으면 중간에 계획에서 벗어날 가능성이 높다.&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;다만 지나치게 성실한 것은 좋지 않을수가 있는데, 잘못된 방법을 택한 뒤 그것을 고수할 가능성이 높기 때문이다. 한마디로 융통성이 없는 것이다.&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;실제 프로그램을 만들때 버그가 생기면 재빨리 다른 수를 3~4개 생각해내고, 그것을 확인해보는 게 중요하다. 하지만 성실성이 과하게 높으면 엉뚱한 방법에 시간을 과하게 낭비할 가능성이 높다.&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;성실도가 C인 사람이 C+나 C++보다 디버깅은 잘할 가능성이 있다고 본다. 막혔을때 우회로를 찾아내는 능력이 있을 것이기 때문이다.&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;스티브 맥코넬은 책 &amp;lsquo;&lt;b&gt;코드 컴플리트&lt;/b&gt;&amp;rsquo;에서 개발자가 가지지 말아야할 덕목으로 &amp;lsquo;인내심&amp;rsquo;을 적었는데 개인적으로 동의한다.&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;성실도가 C++인 사람이 필요할때&amp;nbsp; C 정도로 바뀔 수 있으면 좋겠지만, 그런 경우는 잘 없다.&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;여러면을 종합했을때 C+ 인 사람이 가장 뛰어난 개발자가 될 가능성이 높아 보인다.&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;2.개방성&lt;/b&gt;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;개방성 (O++) : 개방성은 높을수록 좋다. 개방성은 새로운 걸 받아들이는 것을 말한다.&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;개발쪽은 배웠던 지식이 바뀌는 경우가 흔하다. 따라서 개방성은 무조건 높은 사람이 좋다.&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;개방성이 높은 사람은 항상 새로운 걸 시도하거나, 새로운 정보를 받아들이려고 한다.&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;평소 호기심이 많고, 여러 분야를 탐험하는 성격이라면 개방성이 높을 걸로 추정할 수 있다.&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;개방성은 낮은데(O - ), 성실성은 높다면 (C +)&amp;nbsp; 옛 기술을 고집하려는 성향이 나타날 수 있다.&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;개방성이 낮으면 의도적으로 신기술을 공부할 필요가 있다. 보통 언어 1개가 최고라고 주장하는 사람은 개방성이 낮다.&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;개방성이 매우 낮은 사람과 개방성이 매우 높은 사람은 서로를 이해 못한다.&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;개방성은 엄청 높은데 (O++), 성실성은 낮다면 (C-) 매번 새로운 언어를 배우거나,&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;새 프로젝트를 시작하느라 완결된게 하나도 없을 수 있다.&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;개방성이 높고 (O+), 성실성은 낮고 (C-), 외향성이 높다면 (E+, E++)&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;말로만 개발하는 입개발자가 될 수 있다.&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;참고로 개방성은 mbti에서 N과 S와 관계가 있다.&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;3.신경성&lt;/b&gt;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;신경성 (N- ) : 신경성은 낮을수록 좋다. 개발을 하다보면 과거에 되던게 안되거나,&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;문제가 없다고 생각했는데 큰 문제가 터지는 경우가 많다.&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;웬만한 일에는 정신이 나가지 않는 성향이 개발을 할때 매우 유리하다.&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;신경성이 매우 높다면 (N++), 함수 하나가 잘 안 짜이는것에 큰 스트레스를 받을 수 있다.&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;디버깅을 하다가 자괴감에 빠져서, 슬퍼하고 있을 수도 있다.&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;신경성이 낮고 ( N - ), 성실성이 높다면 ( C+ ) 실제 문제가 생겼을때 덤덤하게 수정을 할 것이다.&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;서버가 터졌을때 덤덤하게, 서버에 문제가 있구나 하고 표정 변화없이 수정하러 가는 사람을 생각하면 된다.&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;신경성이 낮고 (N &amp;mdash; ), 성실성이 낮고 ( C&amp;nbsp; - - ), 외향성이 매우 높다면 (E++)&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;서버가 멈춰도, &quot;서버가 문제가 있네. 다음에 고치자&quot; 하고 놀러갈 수도 있다. &amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;신경성이 높으면 정신 관리 차원에서 불리한데, 장점이 하나 있다.&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;신경성은 책임감이나 성실성 지표를 높여주는 역할을 한다.&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;실제 신경성이 높은 사람이 사회적 성공을 약간 더 한다는 연구 결과도 있다.&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;신경성이 높고 (N++), 성실성이 중간인 (C ) 사람은 코드가 신경 쓰여서 집에서 잠을 못잘 수도 있다.&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;본인은 스트레스 받지만 문제 해결력이 좋은 것이다.&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;신경성이 중간(N) 이고, 성실성이 중간( C ) 이상이거나&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;신경성이 낮고 (N - ) , 성실성이 높은 사람(C ++ )이 일을 아주 잘 완수할 가능성이 높다.&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;신경성이 매우 높고 (N ++), 성실성도 매우 높다면 (C ++ ) 강박증이 있을 수 있다. &amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;4. 외향성&lt;/b&gt;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;외향성 (E-) : 외향성은 낮을수록 좋다. 외향성이 높을수록 사회적 관계를 추구하고&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;앉아서 작업하는 시간이 적어지기 때문이다.&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;개발은 문제를 푸는 것과 비슷한 측면이 많은데, 외향성이 낮을수록 ( E - ), 시간 투자를 할 가능성이 높다.&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;영업인들에게 높은 외향성(E+)이 필요한 것과 정반대인 것이다.&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;성실성이 높고 (C+), 외향성이 낮다면 (E-) 탁월한 개발자가 될 가능성이 있다.&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;성실성이 높은데 (C++), 외향성이 높다면 (E+) 밖으로 나가려는 성향을 잘 제어할 것이다.&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;성실성이 중간이고 (C), 외향성이 낮다면 (E-) 준수한 실력이 있을 가능성이 있다.&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;외향성이 낮으면 직급이 올라갈수록 문제가 생길 수 있긴 하다. 의사소통에 들어가는 시간이 많아지기 때문이다.&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;CTO 는 외향성이 중간(E)은 되어야 문제 없이 일을 수행할 수 있다.&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;5.우호성&lt;/b&gt;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;우호성 (A-): 우호성이랑은 큰 관계가 없어보인다. 우호성이 높으면 남을 잘 받아들인다.&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;의심도 적게 한다. 우호성이 낮으면 의심을 많이 한다.&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;우호성이 높으면 (A+) 선생님이나 직장 상사의 말을 더 잘 받아들일 가능성이 높다.&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;우호성이 낮으면 (A-)&amp;nbsp; 권위 있는 사람의 말도 의심을 한다.&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;타인에게 도움을 청하는 건 우호성이 높은 사람이 더 잘한다.&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;우호성이 높다면 (A+) 개발을 시작할때는 배울만한 사람이 많은 학원을 찾는 게 좋을 것이고,&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;회사에 들어갈때는 선배 개발자가 많은 곳을 찾는 게 유리하다.&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;우호성이 낮다면 (A-) 도움을 청하는 법을 배우거나, 경쟁적인 환경으로 가는 게 좋다.&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;우호성이 낮다면 토론을 수용하는 곳에서 일하거나, 작은 조직을 택하는 게 나을 수 있다.&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;글을 끝내며&amp;nbsp;&lt;/b&gt;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;종합적으로 성실성이 높고 (C+), 개방성이 높고 ( O+ , O++), 내향적인 ( E - ) 사람이 탁월한 개발자가 될 가능성이 높다고 본다.&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;신경성과 우호성은 조합에 따라 달라지기에 뺐다.&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;이는 전반적인 프로파일이고, 직군이나 기업 규모에 따라&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;조금씩 다를 수 있다고 본다.&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;타직군과 협업을 많이 해야한다면, 좀 더 외향적이고 우호성이 있는게 좋고&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;시스템 프로그래밍처럼 아주 깊은 기술을 다룬다면, 극단적으로 내향적이고 개방성이 낮아도 상관없거나 유리할 수 있다고 본다.&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;사용자와 가까운 직군일수록 (프론트쪽), 개방성이 높은게 낫고,&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;사용자와 멀수록, 개방성이 낮아도 문제가 없다고 보면 된다.&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&lt;b&gt;참고책&lt;/b&gt;&lt;/p&gt;
&lt;ul style=&quot;list-style-type: disc;&quot; data-ke-list-type=&quot;disc&quot;&gt;
&lt;li&gt;성격의탄생, 다니엘리틀 ( &lt;a href=&quot;http://www.yes24.com/Product/Goods/80854209?OzSrank=1&quot;&gt;http://www.yes24.com/Product/Goods/80854209?OzSrank=1&lt;/a&gt; )&lt;/li&gt;
&lt;li&gt;마음을 읽는지도 빅파이브, 피어스 하워드 ( &lt;a href=&quot;http://www.yes24.com/Product/Goods/13655346?OzSrank=2&quot;&gt;http://www.yes24.com/Product/Goods/13655346?OzSrank=2&lt;/a&gt; )&lt;/li&gt;
&lt;/ul&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;</description>
      <category>코딩 배우는 법을 배우기</category>
      <category>mbti 개발자</category>
      <category>개발자</category>
      <category>개발자 성격</category>
      <category>빅파이브 성격</category>
      <category>코딩 mbti</category>
      <author>에드 신</author>
      <guid isPermaLink="true">https://software-creator.tistory.com/34</guid>
      <comments>https://software-creator.tistory.com/34#entry34comment</comments>
      <pubDate>Thu, 4 Nov 2021 19:08:54 +0900</pubDate>
    </item>
    <item>
      <title>개발 더 잘하기 - 초급자에서 중급자로 가기 위한 8가지 방법</title>
      <link>https://software-creator.tistory.com/33</link>
      <description>&lt;p data-ke-size=&quot;size16&quot;&gt;초보자에서 초중급자, 중급자로 넘어가는 방법을 정리해보았다.&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;1. 내가 쓰는 도구를 이해하자.&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;ul style=&quot;list-style-type: disc;&quot; data-ke-list-type=&quot;disc&quot;&gt;
&lt;li&gt;쓰는 툴에 대한 이해도가 높아질수록, 작업 속도가 빨라 진다.&lt;/li&gt;
&lt;li&gt;개발 툴의 단축키나 개발 툴의 보조도구 (플러그인, 익스텐션) 등을 알고 있을수록 생산성이 올라간다.&lt;/li&gt;
&lt;li&gt;의식적으로 내가 자주하는 작업을 생각하고, 이걸 쓰는 단축키가 있는지 알아보도록 하자.&lt;/li&gt;
&lt;li&gt;우선 자주 쓰는 단축키 ( 영어로는 short cut cheetsheet ) 를 검색해서, 남들이 쓰는 단축키를 알아보고, 10개정도만 적용해보자. 생산성이 달라진다.&lt;/li&gt;
&lt;/ul&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;2. 빌드 시스템을 이해하자.&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;ul style=&quot;list-style-type: disc;&quot; data-ke-list-type=&quot;disc&quot;&gt;
&lt;li&gt;프로젝트가 커질수록 빌드에서 문제가 생기는 경우가 많다.&lt;/li&gt;
&lt;li&gt;빌드 시스템에 대해서 따로 시간을 투자해서 공부하는 게 좋다. 빌드가 어떤 과정으로 되는지 알면, 빌드가 느려지는 원인이나 막혔을때 해결법을 알 수 있다.&lt;/li&gt;
&lt;li&gt;웹 개발자면 webpack (웹팩), 모바일이면 gradle (그래들), pod 를 이해하자.&lt;/li&gt;
&lt;li&gt;버전업 등으로 문제가 생기더라도 스스로 해결 할 수 있게 될 것이다. 적은 구글링 혹은 구글링 없이도 문제를 고칠 수 있게 된다.&lt;/li&gt;
&lt;li&gt;빌드 시스템 이해가 먼저고 CI/ CD 가 다음이다.&lt;/li&gt;
&lt;/ul&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;3. 라이브러리를 작성해 보자.&lt;/p&gt;
&lt;ul style=&quot;list-style-type: disc;&quot; data-ke-list-type=&quot;disc&quot;&gt;
&lt;li&gt;직접 라이브러리를 만들어보면 어떤 코드를 재활용하고,&amp;nbsp; 코드를 어떻게 나눠야 효과적인지 감이 잡히기 마련이다.&lt;/li&gt;
&lt;li&gt;라이브러리를 만들다보면 남이 만든 라이브러리도 자연스럽게 많이 읽게 되는데, 가져다 쓰기만 할때와는 다른 깊은 이해를 얻게 된다.&lt;/li&gt;
&lt;li&gt;이미 비슷한 라이브러리가 있다고 해도, 내가 라이브러리를 만들어보면은 많은 걸 배우게 된다.&lt;/li&gt;
&lt;li&gt;공개도 할 수 있으면 하자.&amp;nbsp; 공개하는 코드랑 개인적으로 쓰는 코드는 아무래도 질적인 면에서 차이가 나기 마련이다.&lt;/li&gt;
&lt;/ul&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;4. 다른 언어로 포팅을 해보자.&amp;nbsp;&lt;/p&gt;
&lt;ul style=&quot;list-style-type: disc;&quot; data-ke-list-type=&quot;disc&quot;&gt;
&lt;li&gt;한 언어로 구현된 코드를 다른 언어로 바꾸려면 많은 난관을 겪게 된다. 이전 언어의 라이브러리를 못 쓰는 경우도 많고, 문법 자체가 다른 경우도 많다.&lt;/li&gt;
&lt;li&gt;포팅을 하려면 결국 2언어를 다 이해해야 하는데, 한 언어로만 코딩하는 것에 비해 3~4배는 힘든 일이다.&lt;/li&gt;
&lt;li&gt;대신 성공만 하면 이전 언어에 대한 이해가 폭발적으로 좋아지고, 새 언어도 잘 쓰게 된다.&lt;/li&gt;
&lt;li&gt;파이썬으로 백엔드를 작성했다면, 노드나 스프링으로 작성해보도록 하자.&lt;/li&gt;
&lt;/ul&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;5. 개발 일지를 적어보자.&amp;nbsp;&lt;/p&gt;
&lt;ul style=&quot;list-style-type: disc;&quot; data-ke-list-type=&quot;disc&quot;&gt;
&lt;li&gt;내가 오늘 개발한것, 문제는 무엇이 있었는지를 적어보는 것이다.&amp;nbsp;해결책도 같이 적는게 좋다. 공개된 장소에 적어도 좋고, 개인 일기장에 적어도 좋다.&lt;/li&gt;
&lt;li&gt;개발 일지를 적으면, 같은 문제를 만났을때 해결하는 속도가 매우 빨라져서 좋다. 또 내가 반복적으로 잘못하고 있는 것을 알게 되어서 내가 범하는 명백한 실수를 없앨 수 있어서 좋다.&lt;/li&gt;
&lt;li&gt;개발일지를 오래 적을수록, 자신만의 지식창고 만들어지기에 생산성이 높아진다.&lt;/li&gt;
&lt;li&gt;우리 두뇌는 자신이 기록하고 정리한 것을 더 오래 기억하고, 쉽게 찾는다. 단기적으로는 시간을 좀 더 쓰는 것 같아도 장기적으로는 이득이다.&lt;/li&gt;
&lt;/ul&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;6. 컴파일을 덜 하자.&amp;nbsp;&lt;/p&gt;
&lt;ul style=&quot;list-style-type: disc;&quot; data-ke-list-type=&quot;disc&quot;&gt;
&lt;li&gt;1줄, 1줄 단위로 코드를 작성하고, 실행을 하면 결과를 바로 볼 수 있어서 편하지만&amp;nbsp;실행 전에 결과를 알지 못한다.&lt;/li&gt;
&lt;li&gt;반면 코딩을 여러 줄 혹은 블록 단위로 컴파일을 하게 되면 실행 전 결과를 예측이 가능해진다.&amp;nbsp; 머릿속으로 코딩 결과를 예측하는 습관이 들고 예측하는 범위가 커질수록 개발속도가 올라가게 된다.&lt;/li&gt;
&lt;/ul&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;7. 다른 시도를 해보자.&amp;nbsp;&lt;/p&gt;
&lt;ul style=&quot;list-style-type: disc;&quot; data-ke-list-type=&quot;disc&quot;&gt;
&lt;li&gt;테스팅을 소홀히 해왔다면 테스팅을 해보자. 안 하던 스타일로 리팩토링을 시도해봐도 좋다.&lt;/li&gt;
&lt;li&gt;서버 개발자면 클라 개발을 해보거나, 다른 분야 개발을 해보자.&lt;/li&gt;
&lt;li&gt;정적 언어만 했으면 스크립트 언어를 만져보거나, 스크립트 언어만 했다면 정적 언어를 해보자.&lt;/li&gt;
&lt;li&gt;다른 시도를 하면 실력이 일시적으로 줄어들게 되지만, 새 시도에 익숙해지고 나면 원래 쓰던 방법들을 더 잘 쓸 방법이나 응용할 방법을 알게 된다. 다른 분야의 지식이 새 분야로 옮겨가면서, 이전에 알던 부분을 더 나아지게 할 방법을 알게 된다.&lt;/li&gt;
&lt;/ul&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;8. 가르쳐보자.&lt;/p&gt;
&lt;ul style=&quot;list-style-type: disc;&quot; data-ke-list-type=&quot;disc&quot;&gt;
&lt;li&gt;가르치다보면 내가 실제로 알고 있다고 생각한게, 실제로 아는 게 아닌 걸 알 수 있다.&lt;/li&gt;
&lt;li&gt;다른 사람을 이해시키려면 풀어서 설명을 하게 되고, 설명을 하는 과정에서 깊이 알게 된다.&lt;/li&gt;
&lt;li&gt;가르치다보면 라이브 코딩을 많이 하게 되는데, 내가 예상치 못한 에러를 많이 만나게 된다. 이 에러를 해결해주는 과정에서 디버깅 실력이 올라간다.&lt;/li&gt;
&lt;li&gt;가르치다보면 질문에 대비하기 위해 준비를 더 많이 하게 된다. 일할때는 1만 알고 적당히 넘어 갔던 것을, 가르칠때는 4~5배 찾아보게 되는 경우가 흔하다. 이 과정에서 깊이가 생긴다.&lt;/li&gt;
&lt;li&gt;우리 두뇌는 무언가를 가르쳐야 한다고 생각하면 정보를 더 깊게 받아들인다. 우리 두뇌는 에너지 낭비를 싫어해서 안 중요하다고 여기면 무시한다. 가르쳐야 된다고 여기는 순간, 중요한 정보로 여겨 더 잘 기억한다.&lt;/li&gt;
&lt;/ul&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;&amp;nbsp;&lt;/p&gt;
&lt;p data-ke-size=&quot;size16&quot;&gt;개발을 공부할때 종종 쓰는 방법을 정리해보았다.&amp;nbsp; 이 글이 개발 실력을 높이는데 도움이 되었으면 한다.&lt;/p&gt;</description>
      <category>코딩 배우는 법을 배우기</category>
      <category>개발공부법</category>
      <author>에드 신</author>
      <guid isPermaLink="true">https://software-creator.tistory.com/33</guid>
      <comments>https://software-creator.tistory.com/33#entry33comment</comments>
      <pubDate>Wed, 1 Sep 2021 17:40:13 +0900</pubDate>
    </item>
    <item>
      <title>파이썬 정규표현식 배워보기</title>
      <link>https://software-creator.tistory.com/32</link>
      <description>&lt;!doctype html&gt;
&lt;html&gt;
&lt;head&gt;
&lt;meta charset='UTF-8'&gt;&lt;meta name='viewport' content='width=device-width initial-scale=1'&gt;
&lt;meta name=&quot;description&quot; content='정규 표현식은 특정 데이터를 추출하는데 아주 유용하다. 대량의 문서에서 원하는 데이터를 찾을때 정규 표현식 만한 게 있을까? 하지만 정규 표현식은 처음 배우기 까다롭고, 배웠어도 안 쓰다보면 쉽게 까먹는다. 이번 글을 통해 정규표현식에 대해 공부하고, 자주 쓰는 표현을 정리해보고자 한다.'&gt;
&lt;title&gt;04-reg&lt;/title&gt;&lt;link href='https://fonts.loli.net/css?family=Open+Sans:400italic,700italic,700,400&amp;subset=latin,latin-ext' rel='stylesheet' type='text/css' /&gt;&lt;style type='text/css'&gt;html {overflow-x: initial !important;}:root { --bg-color: #ffffff; --text-color: #333333; --select-text-bg-color: #B5D6FC; --select-text-font-color: auto; --monospace: &quot;Lucida Console&quot;,Consolas,&quot;Courier&quot;,monospace; --title-bar-height: 20px; }
.mac-os-11 { --title-bar-height: 28px; }
html { font-size: 14px; background-color: var(--bg-color); color: var(--text-color); font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; -webkit-font-smoothing: antialiased; }
body { margin: 0px; padding: 0px; height: auto; bottom: 0px; top: 0px; left: 0px; right: 0px; font-size: 1rem; line-height: 1.42857143; overflow-x: hidden; background-image: inherit; background-size: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: inherit; tab-size: 4; background-position: inherit inherit; background-repeat: inherit inherit; }
iframe { margin: auto; }
a.url { word-break: break-all; }
a:active, a:hover { outline: 0px; }
.in-text-selection, ::selection { text-shadow: none; background: var(--select-text-bg-color); color: var(--select-text-font-color); }
#write { margin: 0px auto; height: auto; width: inherit; word-break: normal; word-wrap: break-word; position: relative; white-space: normal; overflow-x: visible; padding-top: 36px; }
#write.first-line-indent p { text-indent: 2em; }
#write.first-line-indent li p, #write.first-line-indent p * { text-indent: 0px; }
#write.first-line-indent li { margin-left: 2em; }
.for-image #write { padding-left: 8px; padding-right: 8px; }
body.typora-export { padding-left: 30px; padding-right: 30px; }
.typora-export .footnote-line, .typora-export li, .typora-export p { white-space: pre-wrap; }
.typora-export .task-list-item input { pointer-events: none; }
@media screen and (max-width: 500px) { 
  body.typora-export { padding-left: 0px; padding-right: 0px; }
  #write { padding-left: 20px; padding-right: 20px; }
  .CodeMirror-sizer { margin-left: 0px !important; }
  .CodeMirror-gutters { display: none !important; }
}
#write li &gt; figure:last-child { margin-bottom: 0.5rem; }
#write ol, #write ul { position: relative; }
img { max-width: 100%; vertical-align: middle; }
button, input, select, textarea { color: inherit; font-family: inherit; font-size: inherit; font-style: inherit; font-variant-caps: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; }
input[type=&quot;checkbox&quot;], input[type=&quot;radio&quot;] { line-height: normal; padding: 0px; }
*, ::after, ::before { box-sizing: border-box; }
#write h1, #write h2, #write h3, #write h4, #write h5, #write h6, #write p, #write pre { width: inherit; }
#write h1, #write h2, #write h3, #write h4, #write h5, #write h6, #write p { position: relative; }
p { line-height: inherit; }
h1, h2, h3, h4, h5, h6 { break-after: avoid-page; break-inside: avoid; orphans: 4; }
p { orphans: 4; }
h1 { font-size: 2rem; }
h2 { font-size: 1.8rem; }
h3 { font-size: 1.6rem; }
h4 { font-size: 1.4rem; }
h5 { font-size: 1.2rem; }
h6 { font-size: 1rem; }
.md-math-block, .md-rawblock, h1, h2, h3, h4, h5, h6, p { margin-top: 1rem; margin-bottom: 1rem; }
.hidden { display: none; }
.md-blockmeta { color: rgb(204, 204, 204); font-weight: 700; font-style: italic; }
a { cursor: pointer; }
sup.md-footnote { padding: 2px 4px; background-color: rgba(238, 238, 238, 0.701961); color: rgb(85, 85, 85); border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; cursor: pointer; }
sup.md-footnote a, sup.md-footnote a:hover { color: inherit; text-transform: inherit; text-decoration: inherit; }
#write input[type=&quot;checkbox&quot;] { cursor: pointer; width: inherit; height: inherit; }
figure { overflow-x: auto; margin: 1.2em 0px; max-width: calc(100% + 16px); padding: 0px; }
figure &gt; table { margin: 0px; }
tr { break-inside: avoid; break-after: auto; }
thead { display: table-header-group; }
table { border-collapse: collapse; border-spacing: 0px; width: 100%; overflow: auto; break-inside: auto; text-align: left; }
table.md-table td { min-width: 32px; }
.CodeMirror-gutters { border-right-width: 0px; background-color: inherit; }
.CodeMirror-linenumber { }
.CodeMirror { text-align: left; }
.CodeMirror-placeholder { opacity: 0.3; }
.CodeMirror pre { padding: 0px 4px; }
.CodeMirror-lines { padding: 0px; }
div.hr:focus { cursor: none; }
#write pre { white-space: pre-wrap; }
#write.fences-no-line-wrapping pre { white-space: pre; }
#write pre.ty-contain-cm { white-space: normal; }
.CodeMirror-gutters { margin-right: 4px; }
.md-fences { font-size: 0.9rem; display: block; break-inside: avoid; text-align: left; overflow: visible; white-space: pre; background-image: inherit; background-size: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: inherit; position: relative !important; background-position: inherit inherit; background-repeat: inherit inherit; }
.md-diagram-panel { width: 100%; margin-top: 10px; text-align: center; padding-top: 0px; padding-bottom: 8px; overflow-x: auto; }
#write .md-fences.mock-cm { white-space: pre-wrap; }
.md-fences.md-fences-with-lineno { padding-left: 0px; }
#write.fences-no-line-wrapping .md-fences.mock-cm { white-space: pre; overflow-x: auto; }
.md-fences.mock-cm.md-fences-with-lineno { padding-left: 8px; }
.CodeMirror-line, twitterwidget { break-inside: avoid; }
.footnotes { opacity: 0.8; font-size: 0.9rem; margin-top: 1em; margin-bottom: 1em; }
.footnotes + .footnotes { margin-top: 0px; }
.md-reset { margin: 0px; padding: 0px; border: 0px; outline: 0px; vertical-align: top; text-decoration: none; text-shadow: none; float: none; position: static; width: auto; height: auto; white-space: nowrap; cursor: inherit; line-height: normal; font-weight: 400; text-align: left; box-sizing: content-box; direction: ltr; background-position: 0px 0px; background-repeat: initial initial; }
li div { padding-top: 0px; }
blockquote { margin: 1rem 0px; }
li .mathjax-block, li p { margin: 0.5rem 0px; }
li blockquote { margin: 1rem 0px; }
li { margin: 0px; position: relative; }
blockquote &gt; :last-child { margin-bottom: 0px; }
blockquote &gt; :first-child, li &gt; :first-child { margin-top: 0px; }
.footnotes-area { color: rgb(136, 136, 136); margin-top: 0.714rem; padding-bottom: 0.143rem; white-space: normal; }
#write .footnote-line { white-space: pre-wrap; }
@media print { 
  body, html { border: 1px solid transparent; height: 99%; break-after: avoid; break-before: avoid; font-variant-ligatures: no-common-ligatures; }
  #write { margin-top: 0px; padding-top: 0px; border-color: transparent !important; }
  .typora-export * { -webkit-print-color-adjust: exact; }
  .typora-export #write { break-after: avoid; }
  .typora-export #write::after { height: 0px; }
  .is-mac table { break-inside: avoid; }
}
.footnote-line { margin-top: 0.714em; font-size: 0.7em; }
a img, img a { cursor: pointer; }
pre.md-meta-block { font-size: 0.8rem; min-height: 0.8rem; white-space: pre-wrap; background-color: rgb(204, 204, 204); display: block; overflow-x: hidden; background-position: initial initial; background-repeat: initial initial; }
p &gt; .md-image:only-child:not(.md-img-error) img, p &gt; img:only-child { display: block; margin: auto; }
#write.first-line-indent p &gt; .md-image:only-child:not(.md-img-error) img { left: -2em; position: relative; }
p &gt; .md-image:only-child { display: inline-block; width: 100%; }
#write .MathJax_Display { margin: 0.8em 0px 0px; }
.md-math-block { width: 100%; }
.md-math-block:not(:empty)::after { display: none; }
.MathJax_ref { fill: currentcolor; }
[contenteditable=&quot;true&quot;]:active, [contenteditable=&quot;true&quot;]:focus, [contenteditable=&quot;false&quot;]:active, [contenteditable=&quot;false&quot;]:focus { outline: 0px; box-shadow: none; }
.md-task-list-item { position: relative; list-style-type: none; }
.task-list-item.md-task-list-item { padding-left: 0px; }
.md-task-list-item &gt; input { position: absolute; top: 0px; left: 0px; margin-left: -1.2em; margin-top: calc(1em - 10px); border: none; }
.math { font-size: 1rem; }
.md-toc { min-height: 3.58rem; position: relative; font-size: 0.9rem; border-top-left-radius: 10px; border-top-right-radius: 10px; border-bottom-right-radius: 10px; border-bottom-left-radius: 10px; }
.md-toc-content { position: relative; margin-left: 0px; }
.md-toc-content::after, .md-toc::after { display: none; }
.md-toc-item { display: block; color: rgb(65, 131, 196); }
.md-toc-item a { text-decoration: none; }
.md-toc-inner:hover { text-decoration: underline; }
.md-toc-inner { display: inline-block; cursor: pointer; }
.md-toc-h1 .md-toc-inner { margin-left: 0px; font-weight: 700; }
.md-toc-h2 .md-toc-inner { margin-left: 2em; }
.md-toc-h3 .md-toc-inner { margin-left: 4em; }
.md-toc-h4 .md-toc-inner { margin-left: 6em; }
.md-toc-h5 .md-toc-inner { margin-left: 8em; }
.md-toc-h6 .md-toc-inner { margin-left: 10em; }
@media screen and (max-width: 48em) { 
  .md-toc-h3 .md-toc-inner { margin-left: 3.5em; }
  .md-toc-h4 .md-toc-inner { margin-left: 5em; }
  .md-toc-h5 .md-toc-inner { margin-left: 6.5em; }
  .md-toc-h6 .md-toc-inner { margin-left: 8em; }
}
a.md-toc-inner { font-size: inherit; font-style: inherit; font-weight: inherit; line-height: inherit; }
.footnote-line a:not(.reversefootnote) { color: inherit; }
.md-attr { display: none; }
.md-fn-count::after { content: &quot;.&quot;; }
code, pre, samp, tt { font-family: var(--monospace); }
kbd { margin: 0px 0.1em; padding: 0.1em 0.6em; font-size: 0.8em; color: rgb(36, 39, 41); background-color: rgb(255, 255, 255); border: 1px solid rgb(173, 179, 185); border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; box-shadow: rgba(12, 13, 14, 0.2) 0px 1px 0px, rgb(255, 255, 255) 0px 0px 0px 2px inset; white-space: nowrap; vertical-align: middle; background-position: initial initial; background-repeat: initial initial; }
.md-comment { color: rgb(162, 127, 3); opacity: 0.8; font-family: var(--monospace); }
code { text-align: left; }
a.md-print-anchor { white-space: pre !important; border: none !important; display: inline-block !important; position: absolute !important; width: 1px !important; right: 0px !important; outline: 0px !important; text-shadow: initial !important; background-position: 0px 0px !important; background-repeat: initial initial !important; }
.md-inline-math .MathJax_SVG .noError { display: none !important; }
.html-for-mac .inline-math-svg .MathJax_SVG { vertical-align: 0.2px; }
.md-math-block .MathJax_SVG_Display { text-align: center; margin: 0px; position: relative; text-indent: 0px; max-width: none; max-height: none; min-height: 0px; min-width: 100%; width: auto; overflow-y: hidden; display: block !important; }
.MathJax_SVG_Display, .md-inline-math .MathJax_SVG_Display { width: auto; margin: inherit; display: inline-block !important; }
.MathJax_SVG .MJX-monospace { font-family: var(--monospace); }
.MathJax_SVG .MJX-sans-serif { font-family: sans-serif; }
.MathJax_SVG { display: inline; font-style: normal; font-weight: 400; line-height: normal; zoom: 90%; text-indent: 0px; text-align: left; text-transform: none; letter-spacing: normal; word-spacing: normal; word-wrap: normal; white-space: nowrap; float: none; direction: ltr; max-width: none; max-height: none; min-width: 0px; min-height: 0px; border: 0px; padding: 0px; margin: 0px; }
.MathJax_SVG * { transition: none; }
.MathJax_SVG_Display svg { vertical-align: middle !important; margin-bottom: 0px !important; margin-top: 0px !important; }
.os-windows.monocolor-emoji .md-emoji { font-family: &quot;Segoe UI Symbol&quot;, sans-serif; }
.md-diagram-panel &gt; svg { max-width: 100%; }
[lang=&quot;flow&quot;] svg, [lang=&quot;mermaid&quot;] svg { max-width: 100%; height: auto; }
[lang=&quot;mermaid&quot;] .node text { font-size: 1rem; }
table tr th { border-bottom-width: 0px; }
video { max-width: 100%; display: block; margin: 0px auto; }
iframe { max-width: 100%; width: 100%; border: none; }
.highlight td, .highlight tr { border: 0px; }
mark { background-color: rgb(255, 255, 0); color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; }
.md-html-inline .md-plain, .md-html-inline strong, mark .md-inline-math, mark strong { color: inherit; }
mark .md-meta { color: rgb(0, 0, 0); opacity: 0.3 !important; }
@media print { 
  .typora-export h1, .typora-export h2, .typora-export h3, .typora-export h4, .typora-export h5, .typora-export h6 { break-inside: avoid; }
}
.md-diagram-panel .messageText { stroke: none !important; }
.md-diagram-panel .start-state { fill: var(--node-fill); }
.md-diagram-panel .edgeLabel rect { opacity: 1 !important; }
.md-require-zoom-fix foreignObject { font-size: var(--mermaid-font-zoom); }


.CodeMirror { height: auto; }
.CodeMirror.cm-s-inner { background-image: inherit; background-size: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: inherit; background-position: inherit inherit; background-repeat: inherit inherit; }
.CodeMirror-scroll { overflow-y: hidden; overflow-x: auto; z-index: 3; }
.CodeMirror-gutter-filler, .CodeMirror-scrollbar-filler { background-color: rgb(255, 255, 255); }
.CodeMirror-gutters { border-right-width: 1px; border-right-style: solid; border-right-color: rgb(221, 221, 221); background-image: inherit; background-size: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: inherit; white-space: nowrap; background-position: inherit inherit; background-repeat: inherit inherit; }
.CodeMirror-linenumber { padding: 0px 3px 0px 5px; text-align: right; color: rgb(153, 153, 153); }
.cm-s-inner .cm-keyword { color: rgb(119, 0, 136); }
.cm-s-inner .cm-atom, .cm-s-inner.cm-atom { color: rgb(34, 17, 153); }
.cm-s-inner .cm-number { color: rgb(17, 102, 68); }
.cm-s-inner .cm-def { color: rgb(0, 0, 255); }
.cm-s-inner .cm-variable { color: rgb(0, 0, 0); }
.cm-s-inner .cm-variable-2 { color: rgb(0, 85, 170); }
.cm-s-inner .cm-variable-3 { color: rgb(0, 136, 85); }
.cm-s-inner .cm-string { color: rgb(170, 17, 17); }
.cm-s-inner .cm-property { color: rgb(0, 0, 0); }
.cm-s-inner .cm-operator { color: rgb(152, 26, 26); }
.cm-s-inner .cm-comment, .cm-s-inner.cm-comment { color: rgb(170, 85, 0); }
.cm-s-inner .cm-string-2 { color: rgb(255, 85, 0); }
.cm-s-inner .cm-meta { color: rgb(85, 85, 85); }
.cm-s-inner .cm-qualifier { color: rgb(85, 85, 85); }
.cm-s-inner .cm-builtin { color: rgb(51, 0, 170); }
.cm-s-inner .cm-bracket { color: rgb(153, 153, 119); }
.cm-s-inner .cm-tag { color: rgb(17, 119, 0); }
.cm-s-inner .cm-attribute { color: rgb(0, 0, 204); }
.cm-s-inner .cm-header, .cm-s-inner.cm-header { color: rgb(0, 0, 255); }
.cm-s-inner .cm-quote, .cm-s-inner.cm-quote { color: rgb(0, 153, 0); }
.cm-s-inner .cm-hr, .cm-s-inner.cm-hr { color: rgb(153, 153, 153); }
.cm-s-inner .cm-link, .cm-s-inner.cm-link { color: rgb(0, 0, 204); }
.cm-negative { color: rgb(221, 68, 68); }
.cm-positive { color: rgb(34, 153, 34); }
.cm-header, .cm-strong { font-weight: 700; }
.cm-del { text-decoration: line-through; }
.cm-em { font-style: italic; }
.cm-link { text-decoration: underline; }
.cm-error { color: red; }
.cm-invalidchar { color: red; }
.cm-constant { color: rgb(38, 139, 210); }
.cm-defined { color: rgb(181, 137, 0); }
div.CodeMirror span.CodeMirror-matchingbracket { color: rgb(0, 255, 0); }
div.CodeMirror span.CodeMirror-nonmatchingbracket { color: rgb(255, 34, 34); }
.cm-s-inner .CodeMirror-activeline-background { background-image: inherit; background-size: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: inherit; background-position: inherit inherit; background-repeat: inherit inherit; }
.CodeMirror { position: relative; overflow: hidden; }
.CodeMirror-scroll { height: 100%; outline: 0px; position: relative; box-sizing: content-box; background-image: inherit; background-size: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: inherit; background-position: inherit inherit; background-repeat: inherit inherit; }
.CodeMirror-sizer { position: relative; }
.CodeMirror-gutter-filler, .CodeMirror-hscrollbar, .CodeMirror-scrollbar-filler, .CodeMirror-vscrollbar { position: absolute; z-index: 6; display: none; }
.CodeMirror-vscrollbar { right: 0px; top: 0px; overflow: hidden; }
.CodeMirror-hscrollbar { bottom: 0px; left: 0px; overflow: hidden; }
.CodeMirror-scrollbar-filler { right: 0px; bottom: 0px; }
.CodeMirror-gutter-filler { left: 0px; bottom: 0px; }
.CodeMirror-gutters { position: absolute; left: 0px; top: 0px; padding-bottom: 30px; z-index: 3; }
.CodeMirror-gutter { white-space: normal; height: 100%; box-sizing: content-box; padding-bottom: 30px; margin-bottom: -32px; display: inline-block; }
.CodeMirror-gutter-wrapper { position: absolute; z-index: 4; border: none !important; background-position: 0px 0px !important; background-repeat: initial initial !important; }
.CodeMirror-gutter-background { position: absolute; top: 0px; bottom: 0px; z-index: 4; }
.CodeMirror-gutter-elt { position: absolute; cursor: default; z-index: 4; }
.CodeMirror-lines { cursor: text; }
.CodeMirror pre { border-top-left-radius: 0px; border-top-right-radius: 0px; border-bottom-right-radius: 0px; border-bottom-left-radius: 0px; border-width: 0px; font-family: inherit; font-size: inherit; margin: 0px; white-space: pre; word-wrap: normal; color: inherit; z-index: 2; position: relative; overflow: visible; background-position: 0px 0px; background-repeat: initial initial; }
.CodeMirror-wrap pre { word-wrap: break-word; white-space: pre-wrap; word-break: normal; }
.CodeMirror-code pre { border-right-width: 30px; border-right-style: solid; border-right-color: transparent; width: fit-content; }
.CodeMirror-wrap .CodeMirror-code pre { border-right-style: none; width: auto; }
.CodeMirror-linebackground { position: absolute; left: 0px; right: 0px; top: 0px; bottom: 0px; z-index: 0; }
.CodeMirror-linewidget { position: relative; z-index: 2; overflow: auto; }
.CodeMirror-wrap .CodeMirror-scroll { overflow-x: hidden; }
.CodeMirror-measure { position: absolute; width: 100%; height: 0px; overflow: hidden; visibility: hidden; }
.CodeMirror-measure pre { position: static; }
.CodeMirror div.CodeMirror-cursor { position: absolute; visibility: hidden; border-right-style: none; width: 0px; }
.CodeMirror div.CodeMirror-cursor { visibility: hidden; }
.CodeMirror-focused div.CodeMirror-cursor { visibility: inherit; }
.cm-searching { background-color: rgba(255, 255, 0, 0.4); background-position: initial initial; background-repeat: initial initial; }
@media print { 
  .CodeMirror div.CodeMirror-cursor { visibility: hidden; }
}


:root {
    --side-bar-bg-color: #fafafa;
    --control-text-color: #777;
}

@include-when-export url(https://fonts.loli.net/css?family=Open+Sans:400italic,700italic,700,400&amp;subset=latin,latin-ext);

/* open-sans-regular - latin-ext_latin */
  /* open-sans-italic - latin-ext_latin */
    /* open-sans-700 - latin-ext_latin */
    /* open-sans-700italic - latin-ext_latin */
  html {
    font-size: 16px;
}

body {
    font-family: &quot;Open Sans&quot;,&quot;Clear Sans&quot;, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;
    color: rgb(51, 51, 51);
    line-height: 1.6;
}

#write {
    max-width: 860px;
  	margin: 0 auto;
  	padding: 30px;
    padding-bottom: 100px;
}

@media only screen and (min-width: 1400px) {
	#write {
		max-width: 1024px;
	}
}

@media only screen and (min-width: 1800px) {
	#write {
		max-width: 1200px;
	}
}

#write &gt; ul:first-child,
#write &gt; ol:first-child{
    margin-top: 30px;
}

a {
    color: #4183C4;
}
h1,
h2,
h3,
h4,
h5,
h6 {
    position: relative;
    margin-top: 1rem;
    margin-bottom: 1rem;
    font-weight: bold;
    line-height: 1.4;
    cursor: text;
}
h1:hover a.anchor,
h2:hover a.anchor,
h3:hover a.anchor,
h4:hover a.anchor,
h5:hover a.anchor,
h6:hover a.anchor {
    text-decoration: none;
}
h1 tt,
h1 code {
    font-size: inherit;
}
h2 tt,
h2 code {
    font-size: inherit;
}
h3 tt,
h3 code {
    font-size: inherit;
}
h4 tt,
h4 code {
    font-size: inherit;
}
h5 tt,
h5 code {
    font-size: inherit;
}
h6 tt,
h6 code {
    font-size: inherit;
}
h1 {
    font-size: 2.25em;
    line-height: 1.2;
    border-bottom: 1px solid #eee;
}
h2 {
    font-size: 1.75em;
    line-height: 1.225;
    border-bottom: 1px solid #eee;
}

/*@media print {
    .typora-export h1,
    .typora-export h2 {
        border-bottom: none;
        padding-bottom: initial;
    }

    .typora-export h1::after,
    .typora-export h2::after {
        content: &quot;&quot;;
        display: block;
        height: 100px;
        margin-top: -96px;
        border-top: 1px solid #eee;
    }
}*/

h3 {
    font-size: 1.5em;
    line-height: 1.43;
}
h4 {
    font-size: 1.25em;
}
h5 {
    font-size: 1em;
}
h6 {
   font-size: 1em;
    color: #777;
}
p,
blockquote,
ul,
ol,
dl,
table{
    margin: 0.8em 0;
}
li&gt;ol,
li&gt;ul {
    margin: 0 0;
}
hr {
    height: 2px;
    padding: 0;
    margin: 16px 0;
    background-color: #e7e7e7;
    border: 0 none;
    overflow: hidden;
    box-sizing: content-box;
}

li p.first {
    display: inline-block;
}
ul,
ol {
    padding-left: 30px;
}
ul:first-child,
ol:first-child {
    margin-top: 0;
}
ul:last-child,
ol:last-child {
    margin-bottom: 0;
}
blockquote {
    border-left: 4px solid #dfe2e5;
    padding: 0 15px;
    color: #777777;
}
blockquote blockquote {
    padding-right: 0;
}
table {
    padding: 0;
    word-break: initial;
}
table tr {
    border-top: 1px solid #dfe2e5;
    margin: 0;
    padding: 0;
}
table tr:nth-child(2n),
thead {
    background-color: #f8f8f8;
}
table th {
    font-weight: bold;
    border: 1px solid #dfe2e5;
    border-bottom: 0;
    margin: 0;
    padding: 6px 13px;
}
table td {
    border: 1px solid #dfe2e5;
    margin: 0;
    padding: 6px 13px;
}
table th:first-child,
table td:first-child {
    margin-top: 0;
}
table th:last-child,
table td:last-child {
    margin-bottom: 0;
}

.CodeMirror-lines {
    padding-left: 4px;
}

.code-tooltip {
    box-shadow: 0 1px 1px 0 rgba(0,28,36,.3);
    border-top: 1px solid #eef2f2;
}

.md-fences,
code,
tt {
    border: 1px solid #e7eaed;
    background-color: #f8f8f8;
    border-radius: 3px;
    padding: 0;
    padding: 2px 4px 0px 4px;
    font-size: 0.9em;
}

code {
    background-color: #f3f4f4;
    padding: 0 2px 0 2px;
}

.md-fences {
    margin-bottom: 15px;
    margin-top: 15px;
    padding-top: 8px;
    padding-bottom: 6px;
}


.md-task-list-item &gt; input {
  margin-left: -1.3em;
}

@media print {
    html {
        font-size: 13px;
    }
    table,
    pre {
        page-break-inside: avoid;
    }
    pre {
        word-wrap: break-word;
    }
}

.md-fences {
	background-color: #f8f8f8;
}
#write pre.md-meta-block {
	padding: 1rem;
    font-size: 85%;
    line-height: 1.45;
    background-color: #f7f7f7;
    border: 0;
    border-radius: 3px;
    color: #777777;
    margin-top: 0 !important;
}

.mathjax-block&gt;.code-tooltip {
	bottom: .375rem;
}

.md-mathjax-midline {
    background: #fafafa;
}

#write&gt;h3.md-focus:before{
	left: -1.5625rem;
	top: .375rem;
}
#write&gt;h4.md-focus:before{
	left: -1.5625rem;
	top: .285714286rem;
}
#write&gt;h5.md-focus:before{
	left: -1.5625rem;
	top: .285714286rem;
}
#write&gt;h6.md-focus:before{
	left: -1.5625rem;
	top: .285714286rem;
}
.md-image&gt;.md-meta {
    /*border: 1px solid #ddd;*/
    border-radius: 3px;
    padding: 2px 0px 0px 4px;
    font-size: 0.9em;
    color: inherit;
}

.md-tag {
    color: #a7a7a7;
    opacity: 1;
}

.md-toc { 
    margin-top:20px;
    padding-bottom:20px;
}

.sidebar-tabs {
    border-bottom: none;
}

#typora-quick-open {
    border: 1px solid #ddd;
    background-color: #f8f8f8;
}

#typora-quick-open-item {
    background-color: #FAFAFA;
    border-color: #FEFEFE #e5e5e5 #e5e5e5 #eee;
    border-style: solid;
    border-width: 1px;
}

/** focus mode */
.on-focus-mode blockquote {
    border-left-color: rgba(85, 85, 85, 0.12);
}

header, .context-menu, .megamenu-content, footer{
    font-family: &quot;Segoe UI&quot;, &quot;Arial&quot;, sans-serif;
}

.file-node-content:hover .file-node-icon,
.file-node-content:hover .file-node-open-state{
    visibility: visible;
}

.mac-seamless-mode #typora-sidebar {
    background-color: #fafafa;
    background-color: var(--side-bar-bg-color);
}

.md-lang {
    color: #b4654d;
}

.html-for-mac .context-menu {
    --item-hover-bg-color: #E6F0FE;
}

#md-notification .btn {
    border: 0;
}

.dropdown-menu .divider {
    border-color: #e5e5e5;
}

.ty-preferences .window-content {
    background-color: #fafafa;
}

.ty-preferences .nav-group-item.active {
    color: white;
    background: #999;
}

 :root {--mermaid-font-zoom:1em ;} 
&lt;/style&gt;
&lt;/head&gt;
&lt;body class='typora-export'&gt;
&lt;div id='write'  class=''&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span&gt;정규 표현식은 특정 데이터를 추출하는데 아주 유용하다. 대량의 문서에서 원하는 데이터를 찾을때 정규 표현식 만한 게 있을까?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;하지만 정규 표현식은 처음 배우기 까다롭고, 배웠어도 안 쓰다보면 쉽게 까먹는다. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;이번 글을 통해 정규표현식에 대해 공부하고, 자주 쓰는 표현을 정리해보고자 한다. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;정규표현식을 시작하거나, 관련 예제 (튜토리얼)를 찾고 있다면 도움이 될 글이다. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span&gt;이번 글에서는 다음과 같은 내용을 다룬다.&lt;/span&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;span&gt;정규표현식 기본 원리&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span&gt;정규표현식 기본 표현들 ( {n,m} , [a-zA-Z], [ㄱ-ㅎㅏ-ㅣ] , ()(),  ^abc ) &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span&gt;자주 쓰는 표현들 (이메일 추출, 전화번호 매칭, 한글 제거, 특수문자 제거 등)&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span&gt;그럼 시작해보자&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h3&gt;&lt;a name=&quot;1-정규-표현식이란&quot; class=&quot;md-header-anchor&quot;&gt;&lt;/a&gt;&lt;span&gt;1. 정규 표현식이란?&lt;/span&gt;&lt;/h3&gt;&lt;p&gt;&lt;span&gt;정규표현식은 특정한 규칙을 찾는데 쓰인다. 예컨데 한글로된 문서에서 영어 알파벳을 없애고 싶다거나, 이메일만 찾고 싶다거나 할때 쓰인다. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span&gt;예컨데 &amp;#39;안녕하세요 abc 좋은날이네요&amp;#39; 라는 문자열에서 abc만 찾고 싶다고 해보자. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;파이썬 함수를 사용할 경우에는 abc문자열의 위치를 알아내야하고, 찾아낸 문자열에 다른 문자는 섞이지 않았는지, 대문자는 아닌지 등 확인해야될 게 많다. 하지만 정규표현식을 사용하면 이 모든걸 한번에 해결할 수 있다. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span&gt;정규표현식은 원하는 문자열을 쉽게 찾기 위해, 기존의 문자열을 다른 방식으로 쓰곤 한다. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;span&gt;.&lt;/span&gt;&lt;/strong&gt;&lt;span&gt; 의 경우 일반 문자에서는 마침표로 쓰이지만 정규표현식에서 &lt;/span&gt;&lt;strong&gt;&lt;span&gt;.&lt;/span&gt;&lt;/strong&gt;&lt;span&gt;는 모든문자(줄바꿈은 제외)를 의미한다.  &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span&gt;다른 뜻으로 쓰이는 문자를 메타 문자라고 하는데 사용하다보면 익숙해진다. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt; &lt;/span&gt;&lt;strong&gt;&lt;em&gt;&lt;span&gt;메타문자&lt;/span&gt;&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;python&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;python&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;. &lt;span class=&quot;cm-operator&quot;&gt;^&lt;/span&gt; &lt;span class=&quot;cm-error&quot;&gt;$&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;cm-error&quot;&gt;?&lt;/span&gt; &lt;span class=&quot;cm-error&quot;&gt;\&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;|&lt;/span&gt; ( ) { } [ ]&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 22px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 22px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span&gt;메타문자는 12개가 있는데 일부만 설명하고 나머지는 파이썬과 함께 설명하도록 하겠다&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;span&gt;마침표 ( . )  메타문자&lt;/span&gt;&lt;/strong&gt;&lt;span&gt; - 일치하는 모든 문자열 (1개)&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;첫번째 문자열은 a고, 마지막 문자열은 c인 문자열을 찾고 싶으면 어떻게 해야할까.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;&amp;#39;&lt;/span&gt;&lt;strong&gt;&lt;span&gt;a&lt;/span&gt;&lt;/strong&gt;&lt;span&gt;b&lt;/span&gt;&lt;strong&gt;&lt;span&gt;c&lt;/span&gt;&lt;/strong&gt;&lt;span&gt;&amp;#39;, &amp;#39;&lt;/span&gt;&lt;strong&gt;&lt;span&gt;a&lt;/span&gt;&lt;/strong&gt;&lt;span&gt;e&lt;/span&gt;&lt;strong&gt;&lt;span&gt;c&lt;/span&gt;&lt;/strong&gt;&lt;span&gt;&amp;#39;, &amp;#39;&lt;/span&gt;&lt;strong&gt;&lt;span&gt;a&lt;/span&gt;&lt;/strong&gt;&lt;span&gt;f&lt;/span&gt;&lt;strong&gt;&lt;span&gt;c&lt;/span&gt;&lt;/strong&gt;&lt;span&gt;&amp;#39; 같은 문자열을 모두 찾고 싶다면?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span&gt;이때 사용하는게 마침표( &lt;/span&gt;&lt;strong&gt;&lt;span&gt;.&lt;/span&gt;&lt;/strong&gt;&lt;span&gt; ) 메타문자이다.  마침표 (.) 가 있으면 어떤 문자가 있어도 일치하는 걸로 여긴다. 이때 새로줄 표시(\n)는 제외이기는 하다. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt; &lt;/span&gt;&lt;code&gt;a.b&lt;/code&gt;&lt;span&gt;처럼 적혀있으면 정규표현식에서는 &lt;/span&gt;&lt;code&gt;a1b&lt;/code&gt;&lt;span&gt; 나 &lt;/span&gt;&lt;code&gt;aOb&lt;/code&gt;&lt;span&gt;나 같은 패턴으로 여겨진다. 동일한 패턴을 찾기에 효과적인 방식이라 할 수 있다. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;span&gt;곱하기 (*) 메타문자&lt;/span&gt;&lt;/strong&gt;&lt;span&gt; - 같은 문자열 반복&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;code&gt;abbc&lt;/code&gt;&lt;span&gt;, &lt;/span&gt;&lt;code&gt;abbbc&lt;/code&gt;&lt;span&gt; 처럼 같은 문자열이 반복되는 경우를 찾고 싶으면 어떻게 할까. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;이때는 &lt;/span&gt;&lt;strong&gt;&lt;span&gt;곱하기 (*)&lt;/span&gt;&lt;/strong&gt;&lt;span&gt; 메타문자를 쓰면 된다. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;code&gt;ab*c&lt;/code&gt;&lt;span&gt; 처럼 적혀 있으면 b가 0개든, 1개든, 100개든 같은 패턴으로 여겨진다. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;code&gt;abc&lt;/code&gt;&lt;span&gt; 랑 &lt;/span&gt;&lt;code&gt;abbbbbbbbbbbbc&lt;/code&gt;&lt;span&gt; 가 컴퓨터가 볼때는 같은 패턴인 것이다. 사람이 볼때는 다르지만.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span&gt;이처럼 메타문자를 쓰면 일반적으로는 표현하지 못했던 패턴들을 적고, 찾아낼 수 있다. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;그럼 파이썬에서 이런 정규표현식들이 어떻게 쓰이는지 알아보도록 하자. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;span&gt;더하기 (+) 메타문자&lt;/span&gt;&lt;/strong&gt;&lt;span&gt; - 1개 이상 같은 문자열 반복&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;더하기 (+) 메타문자는 곱하기(*)와 유사하나 1가지 차이점이 있다. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;1개 이상 문자열이 일치해야한다는 것이다. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;code&gt;a+c&lt;/code&gt;&lt;span&gt;의 경우 &lt;/span&gt;&lt;code&gt;abc&lt;/code&gt;&lt;span&gt; 는 일치하는 패턴이지만 &lt;/span&gt;&lt;code&gt;ac&lt;/code&gt;&lt;span&gt;는 아니다&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h3&gt;&lt;a name=&quot;2-파이썬에서의-정규표현식&quot; class=&quot;md-header-anchor&quot;&gt;&lt;/a&gt;&lt;span&gt;2. 파이썬에서의 정규표현식&lt;/span&gt;&lt;/h3&gt;&lt;h4&gt;&lt;a name=&quot;21-re-모듈과-메서드&quot; class=&quot;md-header-anchor&quot;&gt;&lt;/a&gt;&lt;span&gt;2.1. re 모듈과 메서드&lt;/span&gt;&lt;/h4&gt;&lt;p&gt;&lt;span&gt;파이썬에서 정규표현식은 re 모듈를 써서 활용한다.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;re 모듈에는 여러 함수가 있는데 주로 search, match, findall, compile을 사용한다. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;각각의 사용법을 알아보자&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;span&gt;match - 첫문자열부터 일치하는 패턴을 찾고 싶을때&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;문장에서 &lt;/span&gt;&lt;code&gt;abc&lt;/code&gt;&lt;span&gt;라는 문자열을 찾고 싶다면 어떻게 해야할까?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;특히 첫단어부터 일치하는 경우만 찾고 싶다면, match 함수를 사용하면 된다.&lt;/span&gt;&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;python&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;python&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;s&lt;/span&gt; = &lt;span class=&quot;cm-string&quot;&gt;'abc123'&lt;/span&gt; &amp;nbsp;&lt;span class=&quot;cm-operator&quot;&gt;//&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;검색하려는&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;문자열&lt;/span&gt;.&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-property&quot;&gt;m&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot;&gt;re&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;match&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;'abc'&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;s&lt;/span&gt;) &lt;span class=&quot;cm-operator&quot;&gt;//&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;문자열에&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;맞는&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;패턴이&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;있는지&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;확인&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;여기서는&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;abc가&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;패턴&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;m&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;group&lt;/span&gt;()) &lt;span class=&quot;cm-operator&quot;&gt;//&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;일치하는&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;패턴이&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;있는&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;경우&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;m에&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;값이&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;담겨&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;있고&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;group을&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;쓰면&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;일치하는&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;문자열이&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;출력됨&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 66px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 66px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;shell&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;shell&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;abc // 출력결과&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 22px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 22px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span&gt;match 함수의 사용법은 다음과 같다. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;내가 검색하려는 문자열을 정해 2번째인자로 넣고, 패턴을 match함수의 첫번째 인자로 넣어주면 된다. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;패턴( 예제에서는 abc )와 일치하는 문자가 있으면, m에 결과가 담기게 된다. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span&gt;다른 예제를 보도록 하자&lt;/span&gt;&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;python&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;python&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;s&lt;/span&gt; = &lt;span class=&quot;cm-string&quot;&gt;'abcd1004'&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;m&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot;&gt;re&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;match&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;'a.c'&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;s&lt;/span&gt;) &lt;span class=&quot;cm-operator&quot;&gt;//&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;a&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;c와&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;일치하는&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;문자열을&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;찾는다&lt;/span&gt;. &lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-property&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;m&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;group&lt;/span&gt;())&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 66px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 66px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;shell&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;shell&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;abc // 출력결과&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 22px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 22px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span&gt;이번에는 &lt;/span&gt;&lt;code&gt;a.c&lt;/code&gt;&lt;span&gt; 를 패턴으로 썼다. 마침표 ( . )이 있으니 이 부분에는 아무 문자가 들어가도 된다. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;문자열이 &lt;/span&gt;&lt;code&gt;abcd1004&lt;/code&gt;&lt;span&gt;이고 이 중에 &lt;/span&gt;&lt;code&gt;abc&lt;/code&gt;&lt;span&gt;이 일치하니 이 값을 출력하게 된다.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span&gt;이제 정규표현식을 좀 더 배우면 파이썬으로 원하는 문자를 찾는 건 쉬울것 같다.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;과연 그럴까? &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;다른 예제를 확인해보자&lt;/span&gt;&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;python&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;python&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;s&lt;/span&gt; = &lt;span class=&quot;cm-string&quot;&gt;'123abc456'&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;m&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot;&gt;re&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;match&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;'a.c'&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;s&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;m&lt;/span&gt;) &lt;span class=&quot;cm-operator&quot;&gt;//&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;출력결과&lt;/span&gt; : &lt;span class=&quot;cm-keyword&quot;&gt;None&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 66px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 66px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span&gt;위의 예제를 실행하면 아무값도 나오지 않는다. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;span&gt;match 함수&lt;/span&gt;&lt;/strong&gt;&lt;span&gt;는 패턴이 &lt;/span&gt;&lt;strong&gt;&lt;span&gt;첫&lt;/span&gt;&lt;/strong&gt;&lt;span&gt;문자열부터 일치해야지, 패턴을 찾은것으로 여기기 때문이다.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span&gt;이처럼 match 함수는 일반적으로 쓰이기에는 무리가 있기에 search 함수를 자주 쓴다. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;span&gt;search - 아무곳에서나 일치하는 문자열을 찾고 싶을때&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;위의 예제를 search 함수를 써서 실행해보자&lt;/span&gt;&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;python&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;python&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;s&lt;/span&gt; = &lt;span class=&quot;cm-string&quot;&gt;'123abc456'&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;m&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot;&gt;re&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;search&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;'abc'&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;s&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;m&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;group&lt;/span&gt;()) &lt;span class=&quot;cm-operator&quot;&gt;//&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;출력결과&lt;/span&gt; : &lt;span class=&quot;cm-variable&quot;&gt;abc&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 66px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 66px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;&lt;span&gt;아무 문제 없이, 문자열 abc를 찾는다. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;예제를 하나 더 보도록 하자&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;python&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;python&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;s&lt;/span&gt; = &lt;span class=&quot;cm-string&quot;&gt;'123def789'&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;//&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;검색&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;대상인&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;문자열&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;m&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot;&gt;re&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;search&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;'[a-f]e'&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;s&lt;/span&gt;) &lt;span class=&quot;cm-operator&quot;&gt;//&lt;/span&gt; [&lt;span class=&quot;cm-variable&quot;&gt;a&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;cm-variable&quot;&gt;f&lt;/span&gt;] &lt;span class=&quot;cm-variable&quot;&gt;는&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;a&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;~&lt;/span&gt;&lt;span class=&quot;cm-variable&quot;&gt;f까지&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;abcdef&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;중&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;일치하는&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;게&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;하나라도&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;있는지&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;확인한다는&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;뜻&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;m&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;group&lt;/span&gt;())&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 66px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 66px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;code&gt;[a-f]e&lt;/code&gt;&lt;span&gt; 을 찾고 싶은 패턴으로 썼는데, &lt;/span&gt;&lt;code&gt;[]&lt;/code&gt;&lt;span&gt; 는 여러 문자들 중 1개라도 일치하는지 확인하고 싶을때 쓰인다.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;code&gt;[abㅊ]&lt;/code&gt;&lt;span&gt; 라고 되어 있으면 a와 b와 ㅊ 중 한개라도 일치하면 되는 것이다. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span&gt; 위의 예제에서는&lt;/span&gt;&lt;code&gt;[a-f]&lt;/code&gt;&lt;span&gt; 라고 적었는데 &lt;/span&gt;&lt;code&gt;a-f&lt;/code&gt;&lt;span&gt;는&lt;/span&gt;&lt;code&gt;abcdef&lt;/code&gt;&lt;span&gt;  의 줄임말이다.  ( 요런 특수 표시는 나중에 더 정리하겠다.  )&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;즉 &lt;/span&gt;&lt;code&gt;[a-f]e&lt;/code&gt;&lt;span&gt; 는 ae, be, ce, &lt;/span&gt;&lt;strong&gt;&lt;span&gt;de&lt;/span&gt;&lt;/strong&gt;&lt;span&gt;, ee, fe 중 아무거나랑 하나라도 일치하는 것을 찾겠다는 뜻이다. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span&gt;문자열 &amp;#39;123&lt;/span&gt;&lt;strong&gt;&lt;span&gt;de&lt;/span&gt;&lt;/strong&gt;&lt;span&gt;f789&amp;#39; 에는 de 가 들어 있으므로, 패턴을 찾는데 성공한다. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span&gt;허나 search에도 문제가 있었으니, 일치하는 패턴을 1개만 찾을 수 있단 것이다. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;span&gt;find all - 패턴과 일치하는 여러 문자열을 찾고 싶을때&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;문자열에서 영어만 찾은 경우를 보자. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;이때는 &lt;/span&gt;&lt;code&gt;[a-zA-Z]+&lt;/code&gt;&lt;span&gt; 패턴을 쓰면 된다. &lt;/span&gt;&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;python&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;python&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;span&gt;&lt;span&gt;​&lt;/span&gt;x&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;s&lt;/span&gt; = &lt;span class=&quot;cm-string&quot;&gt;'hello-world-123-good-984'&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;m&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot;&gt;re&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;search&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;'[a-zA-Z]+'&lt;/span&gt;,&lt;span class=&quot;cm-variable&quot;&gt;s&lt;/span&gt;) &lt;span class=&quot;cm-operator&quot;&gt;//&lt;/span&gt; [&lt;span class=&quot;cm-variable&quot;&gt;a&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;cm-variable&quot;&gt;zA&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;cm-variable&quot;&gt;z&lt;/span&gt;]&lt;span class=&quot;cm-variable&quot;&gt;는&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;모든&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;알파벳을&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;뜻함&lt;/span&gt;. &lt;span class=&quot;cm-operator&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;cm-variable&quot;&gt;는&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;cm-variable&quot;&gt;개&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;이상&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;일치하는&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;문자열이&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;있는&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;경우&lt;/span&gt;.&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-property&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;m&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;group&lt;/span&gt;()) &lt;span class=&quot;cm-operator&quot;&gt;//&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;실행결과&lt;/span&gt; : &lt;span class=&quot;cm-variable&quot;&gt;hello&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 88px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 88px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span&gt;위의 예제를 실행하면 영어 hello가 출력된다. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;영어를 잘 찾기는 했지만 모든 영어 문자를 찾지는 못한다. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span&gt;모든 일치하는 문자열을 찾고 싶을때는 어떻게 해야할까. 이때 쓰이는 게 findall이다.&lt;/span&gt;&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;python&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;python&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;s&lt;/span&gt; = &lt;span class=&quot;cm-string&quot;&gt;'hello-world-123-good-984'&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;m&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot;&gt;re&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;findall&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;'[a-zA-Z]+'&lt;/span&gt;,&lt;span class=&quot;cm-variable&quot;&gt;s&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;m&lt;/span&gt;) &lt;span class=&quot;cm-operator&quot;&gt;//&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;출력결과&lt;/span&gt; [&lt;span class=&quot;cm-string&quot;&gt;'hello'&lt;/span&gt;, &lt;span class=&quot;cm-string&quot;&gt;'world'&lt;/span&gt;, &lt;span class=&quot;cm-string&quot;&gt;'good'&lt;/span&gt;]&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 66px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 66px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;&lt;span&gt;findall을 쓰면, 일치하는 모든 문자열을 찾아준다. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span&gt;10만자 짜리 문서에서 이메일만 여러개 찾아보고 싶다면, 써야될게 바로 findall 이다. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h4&gt;&lt;a name=&quot;22-메타문자와-파이썬&quot; class=&quot;md-header-anchor&quot;&gt;&lt;/a&gt;&lt;span&gt;2.2. 메타문자와 파이썬&lt;/span&gt;&lt;/h4&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span&gt;이제 파이썬과 정규표현식에 익숙해졌으니, 나머지 메타문자를 알아보고 조금 더 복잡한 정규표현식을 작성해보도록 하자.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;앞에서 알아본 메타문자에는 &lt;/span&gt;&lt;code&gt;. * + []&lt;/code&gt;&lt;span&gt;가 있었다.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;span&gt;? - 없거나 하나가 있을때&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;? 앞에 문자가 하나 있거나 없을때 매치가 된다. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;code&gt;go?d&lt;/code&gt;&lt;span&gt; 의 경우 &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;code&gt;gd&lt;/code&gt;&lt;span&gt;와 &lt;/span&gt;&lt;code&gt;god&lt;/code&gt;&lt;span&gt;는 일치로 처리되지만&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;code&gt;good&lt;/code&gt;&lt;span&gt;는 일치가 아니다. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span&gt;물음표 ( ? ) 메타문자 대신에 실제 물음표를 쓰려면 &lt;/span&gt;&lt;code&gt;\?&lt;/code&gt;&lt;span&gt; 식으로 적어주면 된다. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;밑에서 자세히 알아보겠다.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;span&gt;{n, m}  - 일정 갯수인 패턴 찾기&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;span&gt;. *&lt;/span&gt;&lt;/strong&gt;&lt;span&gt; 메타문자를 쓰면 반복되는 문자를 찾을 수 있지만 갯수 제한이 없는게 단점이다. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;만약 a가 4개, b가 2개인 문자열을 찾고 싶다면 어떻게 해야할까?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;이때 사용하는게 &lt;/span&gt;&lt;strong&gt;&lt;span&gt;{ n,  m }&lt;/span&gt;&lt;/strong&gt;&lt;span&gt; 메타문자이다. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;여기서 n과 m은 숫자를 가리킨다. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;{n,m} 앞의 문자열이 n번 이상, m번 이하 나타났다면 맞는 패턴으로 여겨진다. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;code&gt;x{2,5}&lt;/code&gt;&lt;span&gt; 처럼 정규표현식이 적혀있다면, &lt;/span&gt;&lt;code&gt;xx&lt;/code&gt;&lt;span&gt;, &lt;/span&gt;&lt;code&gt;xxx&lt;/code&gt;&lt;span&gt;, &lt;/span&gt;&lt;code&gt;xxxx&lt;/code&gt;&lt;span&gt; , &lt;/span&gt;&lt;code&gt;xxxxx&lt;/code&gt;&lt;span&gt; 가 일치하는 패턴이 된다.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span&gt;코드를 보며 좀 더 설명해보겠다&lt;/span&gt;&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;python&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;python&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;s&lt;/span&gt; = &lt;span class=&quot;cm-string&quot;&gt;'0aaa5'&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;m&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot;&gt;re&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;search&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;'a{3,4}'&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;s&lt;/span&gt;) &lt;span class=&quot;cm-operator&quot;&gt;//&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;a&lt;/span&gt;{&lt;span class=&quot;cm-number&quot;&gt;3&lt;/span&gt;,&lt;span class=&quot;cm-number&quot;&gt;4&lt;/span&gt;}&lt;span class=&quot;cm-variable&quot;&gt;는&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;범위를&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;나타내는&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;정규식&lt;/span&gt;. &lt;span class=&quot;cm-property&quot;&gt;a가&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;cm-variable&quot;&gt;번이상이고&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;4&lt;/span&gt;&lt;span class=&quot;cm-variable&quot;&gt;번&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;이하면&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;맞는&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;패턴으로&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;본다&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;m&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;group&lt;/span&gt;()) &lt;span class=&quot;cm-operator&quot;&gt;//&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;출력결과&lt;/span&gt; : &lt;span class=&quot;cm-variable&quot;&gt;aaa&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 66px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 66px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span&gt;위의 코드를 보면 &lt;/span&gt;&lt;code&gt;a{3,4}&lt;/code&gt;&lt;span&gt; 가 정규식인데, 맞는 패턴을 찾을 수 있었기에 &lt;/span&gt;&lt;code&gt;aaa&lt;/code&gt;&lt;span&gt; 가 출력된다. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;범위를 나타내는 정규표현식은 전화번호 찾기 등에 쓰일 수 있다. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;휴대폰 번호는 일반적으로 11자리지만, 집전화의 경우 10자리인 경우도 있다. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;이 경우 첫번째 전화 번호자리에 범위를 나타내는 정규식을 쓰면 쉽게 원하는 값만 추출할 수 있다.&lt;/span&gt;&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;python&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;python&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;s1&lt;/span&gt; = &lt;span class=&quot;cm-string&quot;&gt;'휴대전화에요.010-1234-9001'&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;m1&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot;&gt;re&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;search&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;'[0-9]{2,3}-[0-9]{4}-[0-9]{4}'&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;s1&lt;/span&gt;) &lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;m1&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;group&lt;/span&gt;()) &lt;span class=&quot;cm-operator&quot;&gt;//&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;출력결과&lt;/span&gt; : &lt;span class=&quot;cm-error&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;cm-number&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;cm-number&quot;&gt;1234&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;cm-number&quot;&gt;9001&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;s2&lt;/span&gt; = &lt;span class=&quot;cm-string&quot;&gt;'중국집이에요.02-2940-7001'&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;m2&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot;&gt;re&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;search&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;'[0-9]{2,3}-[0-9]{4}-[0-9]{4}'&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;s2&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;m2&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;group&lt;/span&gt;()) &lt;span class=&quot;cm-operator&quot;&gt;//&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;출력결과&lt;/span&gt; : &lt;span class=&quot;cm-error&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;cm-number&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;cm-number&quot;&gt;2940&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;cm-number&quot;&gt;7001&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 154px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 154px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span&gt;예제의 첫번째 패턴을 보면 &lt;/span&gt;&lt;code&gt;[0-9]{2,3}-[0-9]{4}-[0-9]{4}&lt;/code&gt;&lt;span&gt; 로 적혀있다.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;여기서 &lt;/span&gt;&lt;code&gt;[0-9]{2,3}&lt;/code&gt;&lt;span&gt; 는 숫자(0부터 9까지)가 2개 이상 3개 이하 있는 걸 말한다. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;마찬가지로  &lt;/span&gt;&lt;code&gt;[0-9]{4}&lt;/code&gt;&lt;span&gt;는 숫자가 4개 있는 걸 말한다. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;보통 전화번호 앞자리가 2자리거나 3자리이고,  뒷번호는 4자리씩이기에 이 정규식을 쓰면 전화번호를 적절히 찾을 수 있다.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;하지만 완벽한건 아니고 &lt;/span&gt;&lt;code&gt;-&lt;/code&gt;&lt;span&gt; 가 없는 경우나 다른 기호&lt;/span&gt;&lt;code&gt;()&lt;/code&gt;&lt;span&gt; 가 들어가 있는 경우, 국제 번호인 경우는 처리하지 못한다. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;span&gt;^ - 시작 문자가 일치하는 경우 찾기&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;특정 문자로 시작하는지 확인하고 싶을때는 어떻게 해야할까&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;예컨데 어떤 문장이 &amp;#39;안녕&amp;#39;이란 말로 시작하는지 알고 싶다면?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span&gt;이때 쓰이는게 &lt;/span&gt;&lt;strong&gt;&lt;span&gt;^&lt;/span&gt;&lt;/strong&gt;&lt;span&gt; 메타문자이다.&lt;/span&gt;&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;python&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;python&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;s&lt;/span&gt; = &lt;span class=&quot;cm-string&quot;&gt;'안녕하세요. 좋은 아침이에요'&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;m&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot;&gt;re&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;search&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;'^안녕'&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;s&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;m&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;group&lt;/span&gt;()) &lt;span class=&quot;cm-operator&quot;&gt;//&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;출력결과&lt;/span&gt; : &lt;span class=&quot;cm-variable&quot;&gt;안녕&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 66px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 66px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;&lt;code&gt;^안녕&lt;/code&gt;&lt;span&gt; 을 정규식으로 적었더니 &amp;#39;안녕하세요. 좋은 아침이에요&amp;#39; 란 문장에서&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;&amp;#39;&lt;/span&gt;&lt;em&gt;&lt;span&gt;안녕&lt;/span&gt;&lt;/em&gt;&lt;span&gt;&amp;#39; 으로 매칭되는 걸 알 수 있다. &amp;#39;안녕하세요&amp;#39;가 문장의 맨 앞에 있기때문이다. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;반면에 &amp;#39;안녕하세요&amp;#39;가 문장 안쪽에 있을때는 매칭이 안되는 걸 알 수 있다&lt;/span&gt;&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;python&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;python&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;s&lt;/span&gt; = &lt;span class=&quot;cm-string&quot;&gt;'좋은 아침이에요.안녕하세요'&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;m&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot;&gt;re&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;search&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;'^안녕'&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;s&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;m&lt;/span&gt;) &lt;span class=&quot;cm-operator&quot;&gt;//&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;출력결과&lt;/span&gt; : &lt;span class=&quot;cm-keyword&quot;&gt;None&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 66px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 66px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span&gt;^ 메타문자가 [] 안에서 쓰이면 다른 의미가 된다. 이 패턴은 제외한다는 뜻이 된다. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;code&gt;[0-9]&lt;/code&gt;&lt;span&gt;가 숫자인 패턴을 찾는 거라면 , &lt;/span&gt;&lt;code&gt;[^0-9]&lt;/code&gt;&lt;span&gt;  는 숫자는 패턴을 제외한는 뜻이다.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;span&gt;$ - 마지막 문자가 일치하는 문자열 찾기&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span&gt;그럼 첫 문자가 아니라, 마지막 문자가 일치하는 경우를 찾고 싶다면 어떻게 해야할까.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;예컨데 &amp;#39;요&amp;#39;로 끝나는 문장을 찾는 과제를 받았다고 상상해보자. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;이때 $ 메타문자를 쓰면 된다&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;예시를 보자&lt;/span&gt;&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;python&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;python&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;s&lt;/span&gt; = &lt;span class=&quot;cm-string&quot;&gt;'지금은 즐겁게 있어요'&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;m&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot;&gt;re&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;search&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;'[ㄱ-힣]+요$'&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;s&lt;/span&gt;) &lt;span class=&quot;cm-operator&quot;&gt;//&lt;/span&gt; [&lt;span class=&quot;cm-variable&quot;&gt;ㄱ&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;cm-variable&quot;&gt;힣&lt;/span&gt;] &lt;span class=&quot;cm-variable&quot;&gt;은&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;한글일때만&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;일치하는&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;걸로&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;본다는&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;뜻&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;m&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;group&lt;/span&gt;()) &lt;span class=&quot;cm-operator&quot;&gt;//&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;출력&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;결과&lt;/span&gt; : &lt;span class=&quot;cm-variable&quot;&gt;있어요&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 66px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 66px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;code&gt;&amp;#39;[ㄱ-힣]+요$&amp;#39;&lt;/code&gt;&lt;span&gt; 정규식은 &amp;#39;요&amp;#39;로 끝나는 한글을 찾겠다는 의미이다. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;code&gt;[ㄱ-힣]&lt;/code&gt;&lt;span&gt; 는 한글일때만 일치하는 걸로 본다는 뜻이고&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;code&gt;요$&lt;/code&gt;&lt;span&gt; 는 &amp;#39;요&amp;#39;로 끝나는 경우만, 일치하는 걸로 여긴다. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;&amp;#39;요&amp;#39;가 아니라 &amp;#39;요.&amp;#39; 이었으면 일치하지 않았을 것이다. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;span&gt;| - 여러개 조건 만족하는 패턴 찾기 (or, 또는)&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;정규식을 쓰다보면 여러 패턴과 일치하는지 확인하고 싶을때가 많다. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;이때 쓰이는 게 | 메타문자이다. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;| 앞 뒤에 적힌 정규식은 서로 다른 정규식으로 여겨진다.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span&gt;| 를 쓰면 원하는 만큼 정규식을 적을 수 있다.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;정규식1&lt;/span&gt;&lt;strong&gt;&lt;span&gt;|&lt;/span&gt;&lt;/strong&gt;&lt;span&gt; 정규식2 &lt;/span&gt;&lt;strong&gt;&lt;span&gt;|&lt;/span&gt;&lt;/strong&gt;&lt;span&gt; 정규식3  &lt;/span&gt;&lt;strong&gt;&lt;span&gt;|&lt;/span&gt;&lt;/strong&gt;&lt;span&gt; ...&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span&gt;예를 보도록 하자&lt;/span&gt;&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;python&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;python&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;s&lt;/span&gt; = &lt;span class=&quot;cm-string&quot;&gt;'There is a crow and bird'&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;m&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot;&gt;re&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;findall&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;'cro*w|bir+d'&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;s&lt;/span&gt;) &lt;span class=&quot;cm-operator&quot;&gt;//&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;|&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;앞뒤로&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;정규식이&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;cm-variable&quot;&gt;개&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;있다&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;m&lt;/span&gt;) &lt;span class=&quot;cm-operator&quot;&gt;//&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;출력결과&lt;/span&gt; : [&lt;span class=&quot;cm-string&quot;&gt;'crow'&lt;/span&gt;, &lt;span class=&quot;cm-string&quot;&gt;'bird'&lt;/span&gt;]&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 66px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 66px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;&lt;span&gt;예에서 쓰인 정규식은 &lt;/span&gt;&lt;code&gt;cro*w|bir+d&lt;/code&gt;&lt;span&gt;으로 2개의 정규식이 연결되어 있다. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;code&gt;cro*w&lt;/code&gt;&lt;span&gt; 랑 &lt;/span&gt;&lt;code&gt;bir+d&lt;/code&gt;&lt;span&gt; 중 하나만 일치해도, 맞는 패턴으로 본다.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;code&gt;There is a crow and bird&lt;/code&gt;&lt;span&gt; 에는 &lt;/span&gt;&lt;code&gt;crow&lt;/code&gt;&lt;span&gt;가 일치하고 &lt;/span&gt;&lt;code&gt;bird&lt;/code&gt;&lt;span&gt;도 일치하는 문자열이기에&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;code&gt;[&amp;#39;crow&amp;#39;, &amp;#39;bird&amp;#39;]&lt;/code&gt;&lt;span&gt; 가 결과로 출력된다.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;span&gt;() - 그룹으로 묶기&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;찾은 결과물에서 특정 부분만 빼내고 싶을때는 어떻게 해야할까.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;예컨데 날짜를 찾았는데 연도랑 월만 빼내고 싶다면?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;이 때 () 메타문자를 써서 그룹으로 묶으면 편리하다. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;python&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;python&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;s&lt;/span&gt; = &lt;span class=&quot;cm-string&quot;&gt;'안녕하세요. 새해 복 많이 받으세요. 글은 2021-01-06에 썼어요'&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;m&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot;&gt;re&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;search&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;'[0-9]{4}-[0-9]{2}-[0-9]{2}'&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;s&lt;/span&gt;) &lt;span class=&quot;cm-operator&quot;&gt;//&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;날짜를&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;찾기&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;위함&lt;/span&gt;. &lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-property&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;m&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;group&lt;/span&gt;()) &lt;span class=&quot;cm-operator&quot;&gt;//&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;출력결과&lt;/span&gt; : &lt;span class=&quot;cm-number&quot;&gt;2021&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;cm-error&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;cm-number&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;cm-error&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;cm-number&quot;&gt;6&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 66px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 66px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;&lt;span&gt;위의 예를 실행하면 &lt;/span&gt;&lt;code&gt;2021-01-06&lt;/code&gt;&lt;span&gt; 이 출력된다. 날짜를 찾아낸 것이다.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;하지만 우리는 연도랑 월만 원한다. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;이때 다른 함수로 문자열을 나눌 수도 있지만, () 로 묶어주면 구분하기 편리하다. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span&gt;()로 묶어주고 나면 &lt;/span&gt;&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;python&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;python&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;s&lt;/span&gt; = &lt;span class=&quot;cm-string&quot;&gt;'안녕하세요. 새해 복 많이 받으세요. 글은 2021-01-06에 썼어요'&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;m&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot;&gt;re&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;search&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;'([0-9]{4})-([0-9]{2})-([0-9]{2})'&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;s&lt;/span&gt;) &lt;span class=&quot;cm-operator&quot;&gt;//&lt;/span&gt; ()&lt;span class=&quot;cm-variable&quot;&gt;로&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;세번&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;묶어줌&lt;/span&gt;. &lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-property&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;m&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;group&lt;/span&gt;(&lt;span class=&quot;cm-number&quot;&gt;0&lt;/span&gt;)) &lt;span class=&quot;cm-operator&quot;&gt;//&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;출력결과&lt;/span&gt; : &lt;span class=&quot;cm-number&quot;&gt;2021&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;cm-error&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;cm-number&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;cm-error&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;cm-number&quot;&gt;6&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;m&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;group&lt;/span&gt;(&lt;span class=&quot;cm-number&quot;&gt;1&lt;/span&gt;)) &lt;span class=&quot;cm-operator&quot;&gt;//&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;출력결과&lt;/span&gt; : &lt;span class=&quot;cm-number&quot;&gt;2021&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;m&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;group&lt;/span&gt;(&lt;span class=&quot;cm-number&quot;&gt;2&lt;/span&gt;)) &lt;span class=&quot;cm-operator&quot;&gt;//&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;출력결과&lt;/span&gt; : &lt;span class=&quot;cm-error&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;cm-number&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 110px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 110px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span&gt;group(0) 을 쓰면 정규식과 일치하는 모든 문자를 다 가져온다. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span&gt;group(1) 은 정규식과 일치하는 첫번째 문자를 찾아서 가져온다. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;group(2)는 두번째, group(3)은 세번째인 식이다.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span&gt;여기서는 &lt;/span&gt;&lt;code&gt;2021&lt;/code&gt;&lt;span&gt;이 첫번째 패턴인  &lt;/span&gt;&lt;code&gt;([0-9]{4})&lt;/code&gt;&lt;span&gt; 과 일치하기에 &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;group(1) 은 2021를 출력한다. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span&gt;그룹으로 만드는 방식은 우편번호 앞자리만 찾거나, 이메일의 도메인만 찾는다든지 할때 유용하다. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span&gt;사실 그룹 기호가 섞인 정규식은 처음에 보면 꽤 헷갈리는데 &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;() 없는 정규식을 만들어보고, 내가 () 기호를 써서 정규식을 만들어보는 식으로 연습하면은&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;점차 눈에 익게 된다. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;span&gt;메타문자 ( .  ? $  )들을 원래 문자로 사용하기&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;물음표 (?)나 마침표(.)는 원래 문장에서도 쓰이는데 메타 문자로 쓰이고 있다. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;이 메타문자들을 문자열로 쓰고 싶다면 앞에 \를 붙여주면 된다. &lt;/span&gt;&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;python&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;python&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;s&lt;/span&gt; = &lt;span class=&quot;cm-string&quot;&gt;'오늘은 안녕하세요.안녕하세요?'&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;m1&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot;&gt;re&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;search&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;'안녕하세요\?'&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;s&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;m1&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;span&lt;/span&gt;()) &lt;span class=&quot;cm-operator&quot;&gt;//&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;span은&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;일치하는&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;범위를&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;말함&lt;/span&gt;. &lt;span class=&quot;cm-property&quot;&gt;span&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;-&lt;/span&gt; (&lt;span class=&quot;cm-number&quot;&gt;10&lt;/span&gt;, &lt;span class=&quot;cm-number&quot;&gt;16&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;m1&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;group&lt;/span&gt;()) &lt;span class=&quot;cm-operator&quot;&gt;//&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;출력결과&lt;/span&gt; : &lt;span class=&quot;cm-variable&quot;&gt;안녕하세요&lt;/span&gt;&lt;span class=&quot;cm-error&quot;&gt;?&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;m2&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot;&gt;re&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;search&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;'안녕하세요?'&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;s&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;m2&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;span&lt;/span&gt;()) &lt;span class=&quot;cm-operator&quot;&gt;//&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;span&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;-&lt;/span&gt; (&lt;span class=&quot;cm-number&quot;&gt;4&lt;/span&gt;, &lt;span class=&quot;cm-number&quot;&gt;9&lt;/span&gt;), &lt;span class=&quot;cm-variable&quot;&gt;위와는&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;span이&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;다르다&lt;/span&gt;. &lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 154px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 154px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span&gt;위의 예제를 보면 &lt;/span&gt;&lt;code&gt;\?&lt;/code&gt;&lt;span&gt; 를 쓰는가, &lt;/span&gt;&lt;code&gt;?&lt;/code&gt;&lt;span&gt; 를 쓰는가에 따라 &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;패턴이 매칭되는 곳이 달라진다. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;m1에서는 &lt;/span&gt;&lt;code&gt;\?&lt;/code&gt;&lt;span&gt;가 패턴이기에 실제 ?가 있는 곳에서 매칭이 되지만&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;m2는 ?는 메타문자이기에 앞쪽, 물음표 기호가 없는 곳에서 매칭이 된다.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;span&gt;\문자&lt;/span&gt;&lt;/strong&gt;&lt;span&gt; - 자주 쓰는 패턴을 나타낼때 사용한다&lt;/span&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;span&gt;\d : 숫자인 경우, &lt;/span&gt;&lt;code&gt;[0-9]&lt;/code&gt;&lt;span&gt;와 같다&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span&gt;\D: 숫자가 아닌 경우, &lt;/span&gt;&lt;code&gt;[^0-9]&lt;/code&gt;&lt;span&gt; 와 같다. &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span&gt;\s: 공백 문자인 경우.   띄어쓰기나, 탭 (\t ), 새로운 줄(\n, \r)인 경우&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span&gt;\S : 공백 문자가 아닌 경우&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span&gt;\w: 숫자 및 알파벳 문자인 경우. &lt;/span&gt;&lt;code&gt;[a-zA-Z0-9_]&lt;/code&gt;&lt;span&gt; 와 같다&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span&gt;\W: 숫자 및 알파벳 문자가 아닌 경우. &lt;/span&gt;&lt;code&gt;[^a-zA-Z0-9_]&lt;/code&gt;&lt;span&gt; 와 같다&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h3&gt;&lt;a name=&quot;3자주-쓰는-정규표현식-표현&quot; class=&quot;md-header-anchor&quot;&gt;&lt;/a&gt;&lt;span&gt;3.자주 쓰는 정규표현식 표현&lt;/span&gt;&lt;/h3&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h4&gt;&lt;a name=&quot;이메일-찾기&quot; class=&quot;md-header-anchor&quot;&gt;&lt;/a&gt;&lt;span&gt;이메일 찾기&lt;/span&gt;&lt;/h4&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span&gt;문서에서 이메일만 찾고 싶을때가 있다. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;이메일은 &amp;#39;@&amp;#39; 기호가 꼭 들어가고 영어 알파벳으로만 되어있다. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;이를 고려하면 정규식은&lt;/span&gt;&lt;code&gt;[\w]+@[\w]+&lt;/code&gt;&lt;span&gt;  처럼 될 것이다. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;code&gt;[\w]+&lt;/code&gt;&lt;span&gt; 은 알파벳이 1개 이상 있을때, 일치하는 걸로 본다는 뜻이다. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span&gt;그런데 &lt;/span&gt;&lt;code&gt;[\w]+@[\w]+&lt;/code&gt;&lt;span&gt;만으로는 이메일을 모두 찾을 수 없다. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;이메일에 &lt;/span&gt;&lt;code&gt;. -&lt;/code&gt;&lt;span&gt;  가 들어가 있는 경우가 있기 때문이다. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;code&gt;. -&lt;/code&gt;&lt;span&gt;가 있어도 이메일을 찾을 수 있게 정규식을 바꾸면&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;code&gt;[\w\.-]+@[\w\.-]+&lt;/code&gt;&lt;span&gt; 가 된다.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;pre lang=&quot;python&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; spellcheck=&quot;false&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;python&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;x&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;s&lt;/span&gt; = &lt;span class=&quot;cm-string&quot;&gt;'Ryan has sent an invoice email to john.d@yahoo.com by using his email id ryan.arjun@gmail.com and he also shared a copy to his boss rosy.gray@amazon.co.uk on the cc part.'&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;m&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot;&gt;re&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;findall&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;r'[\w\.-]+@[\w\.-]+'&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;s&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;m&lt;/span&gt;) &lt;span class=&quot;cm-operator&quot;&gt;//&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;출력&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;결과&lt;/span&gt; : [&lt;span class=&quot;cm-string&quot;&gt;'john.d@yahoo.com'&lt;/span&gt;, &lt;span class=&quot;cm-string&quot;&gt;'ryan.arjun@gmail.com'&lt;/span&gt;, &lt;span class=&quot;cm-string&quot;&gt;'rosy.gray@amazon.co.uk'&lt;/span&gt;]&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 110px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 110px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h4&gt;&lt;a name=&quot;맞는-이메일인지-확인하기&quot; class=&quot;md-header-anchor&quot;&gt;&lt;/a&gt;&lt;span&gt;맞는 이메일인지 확인하기&lt;/span&gt;&lt;/h4&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span&gt;회원 가입 페이지를 만들다 보면&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;맞는 이메일을 입력했는지 확인할 필요가 있다. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span&gt;이때도 정규표현식을 쓰면은 편리하다. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;일반적인 이메일은 &lt;/span&gt;&lt;code&gt;알파벳및숫자@도메인이름&lt;/code&gt;&lt;span&gt; 으로 되어 있다. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;도메인 이름은 abc.com  처럼 com이나 co.kr 로 끝나는 주소를 말한다.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt; &lt;/span&gt;&lt;code&gt;알파벳및숫자@도메인이름&lt;/code&gt;&lt;span&gt;  중에서 알파뱃및 숫자를 정규식으로 표현하면 &lt;/span&gt;&lt;code&gt;[a-z0-9]+&lt;/code&gt;&lt;span&gt; 이고&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;도메인 이름을 정규식 표현하면 &lt;/span&gt;&lt;code&gt;\w+[.]\w+[.]?\w$&lt;/code&gt;&lt;span&gt;이 된다. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;code&gt;\w+[.]\w+[.]?\w{2,4}$&lt;/code&gt;&lt;span&gt; 에서 &lt;/span&gt;&lt;code&gt;\w[.]&lt;/code&gt;&lt;span&gt; 까지는 도메인의 앞부분 ( naver.com에서 naver. 까지의 부분 )을 찾기 위함이다.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;그 뒤의  &lt;/span&gt;&lt;code&gt;\w+[.]?&lt;/code&gt;&lt;span&gt; 은 도메인에 . 이 2개인 경우 ( naver.com은 .이 한개이지만,  kbs.co.kr은 .이 두개이다 )를 찾기 위함이다. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;code&gt;[.]?&lt;/code&gt;&lt;span&gt; 은 &lt;/span&gt;&lt;code&gt;.&lt;/code&gt;&lt;span&gt; 이 있을 수도 있고 없을 수도 있다는 의미이다.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt; &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;마지막으로 com, org, uk,  kr 등의 최상위 도메인의 길이를 확인하면 되는데 &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;code&gt;\w{2,3}$&lt;/code&gt;&lt;span&gt; 정규표현식으로 확인하면 된다. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span&gt;이를 다 합치면 정규식 &lt;/span&gt;&lt;code&gt;^[a-z0-9]+[\._]?[a-z0-9]+[@]\w+[.]\w+[.]?\w{2,3}$&lt;/code&gt;&lt;span&gt; 이 된다&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;pre lang=&quot;python&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; spellcheck=&quot;false&quot; style=&quot;break-inside: unset;&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;python&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;x&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;cm-def&quot;&gt;valid_email&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;email&lt;/span&gt;):&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;regex&lt;/span&gt; = &lt;span class=&quot;cm-string&quot;&gt;r'^[a-z0-9]+[\._]?[a-z0-9]+[@]\w+[.]\w+[.]?\w{2,3}$'&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;valid&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot;&gt;re&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;search&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;regex&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;email&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;valid&lt;/span&gt;:&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;'valid email'&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;else&lt;/span&gt;:&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;'invalid email'&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;valid&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;email&lt;/span&gt; = &lt;span class=&quot;cm-string&quot;&gt;&quot;mysite.com&quot;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;valid_email&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;email&lt;/span&gt;) &lt;span class=&quot;cm-comment&quot;&gt;# 제대로 된 이메일이 아님&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;email&lt;/span&gt; = &lt;span class=&quot;cm-string&quot;&gt;&quot;mike@korea.co.kr&quot;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;valid_email&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;email&lt;/span&gt;) &lt;span class=&quot;cm-comment&quot;&gt;# 제대로 된 이메일&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;email&lt;/span&gt; = &lt;span class=&quot;cm-string&quot;&gt;&quot;mike@daum.net&quot;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;valid_email&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;email&lt;/span&gt;) &lt;span class=&quot;cm-comment&quot;&gt;# 제대로 된 이메일&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;email&lt;/span&gt; = &lt;span class=&quot;cm-string&quot;&gt;&quot;mike@good&quot;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;valid_email&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;email&lt;/span&gt;) &lt;span class=&quot;cm-comment&quot;&gt;# 제대로 된 이메일이 아님&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 528px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 528px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h4&gt;&lt;a name=&quot;한글-찾기-한글-제거&quot; class=&quot;md-header-anchor&quot;&gt;&lt;/a&gt;&lt;span&gt;한글 찾기, 한글 제거&lt;/span&gt;&lt;/h4&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span&gt;한글 찾기는 []를 사용한다. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;알파벳을 찾을때 &lt;/span&gt;&lt;code&gt;[a-z]&lt;/code&gt;&lt;span&gt; 를 써서 찾은 것처럼 &lt;/span&gt;&lt;code&gt;[ㄱ-힣]&lt;/code&gt;&lt;span&gt; 를 쓰면 한글을 찾을 수 있다.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;python&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;python&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;s&lt;/span&gt; = &lt;span class=&quot;cm-string&quot;&gt;'한글이에요. good morning. 안녕하세요'&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;m&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot;&gt;re&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;findall&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;'[ㄱ-힣]+'&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;s&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;m&lt;/span&gt;) &lt;span class=&quot;cm-operator&quot;&gt;//&lt;/span&gt; [&lt;span class=&quot;cm-string&quot;&gt;'한글이에요'&lt;/span&gt;, &lt;span class=&quot;cm-string&quot;&gt;'안녕하세요'&lt;/span&gt;]&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 66px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 66px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h3&gt;&lt;a name=&quot;마무리&quot; class=&quot;md-header-anchor&quot;&gt;&lt;/a&gt;&lt;span&gt;마무리&lt;/span&gt;&lt;/h3&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span&gt;정규표현식은 처음 배울때 난이도가 있지만&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;익혀두면 프로그래밍 언어에 상관없이 쓸 수 있어서 활용도가 높다. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;간단한 식부터 써보면서 차근차근 익혀보도록 하자.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;hr /&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span&gt; 참고글 - &lt;/span&gt;&lt;a href=' https://www.geeksforgeeks.org/check-if-email-address-valid-or-not-in-python/'&gt;&lt;span&gt;이메일 정규표현식으로 맞는지 확인하기&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;유용한 사이트 1 - &lt;/span&gt;&lt;a href='https://www.debuggex.com/cheatsheet/regex/python'&gt;&lt;span&gt;정규표현식 요약표 (Reg Cheet sheet)&lt;/span&gt;&lt;/a&gt;&lt;span&gt; &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;유용한 사이트 2 - &lt;/span&gt;&lt;a href='https://regexr.com/'&gt;&lt;span&gt;온라인 정규표현식 연습 사이트&lt;/span&gt;&lt;/a&gt;&lt;span&gt; &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;</description>
      <category>파이썬</category>
      <category>Python</category>
      <category>이메일추출</category>
      <category>정규표현식예제</category>
      <category>정규표현식튜토리얼</category>
      <category>파이썬</category>
      <category>파이썬정규표현식</category>
      <author>에드 신</author>
      <guid isPermaLink="true">https://software-creator.tistory.com/32</guid>
      <comments>https://software-creator.tistory.com/32#entry32comment</comments>
      <pubDate>Sat, 9 Jan 2021 15:48:44 +0900</pubDate>
    </item>
    <item>
      <title>처음 개발 시작하는 이들을 위한 6단계 로드맵</title>
      <link>https://software-creator.tistory.com/31</link>
      <description>&lt;p&gt;프로그래밍을 배우게 되면 분야에 따라서 조금은 다르지만 크게 6가지 과정을 거치게 된다.&lt;/p&gt;
&lt;p&gt;일단 기본기를 쌓고, 실무에 쓰이는 프레임워크 등을 배우며 개발을 맛보게 된다.&lt;/p&gt;
&lt;p&gt;이 과정은 순서대로 이뤄지기는 하지만, 한번에 끝나는 건 아니다.&lt;/p&gt;
&lt;p&gt;한번 진행되었다가, 이전 단계로 돌아가서 첨부터 시작하는 경우도 종종 있다.&lt;/p&gt;
&lt;p&gt;그럼 큰 그림에서 이 단계를 이해해 보자.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;1.기본 문법 배우기&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;프로그래밍 기본 문법을 배우는 기간이다. 변수, 클래스, 함수 등을 이해하는 시간이다 .&lt;/p&gt;
&lt;p&gt;이 과정에서 프로그래밍 언어를 처음 설치해보고, 각종 개발 툴도 처음 써보게 된다.&lt;/p&gt;
&lt;p&gt;어떤 언어를 쓰느냐에 따라 이 과정이 빨리 끝나기도 하고, 길게 걸리기도 한다.&lt;/p&gt;
&lt;p&gt;파이썬의 경우 1주일이 안 걸리는 경우가 대부분이고, 자바의 경우 1달 넘게 걸리는 경우도 흔하다.&lt;/p&gt;
&lt;p&gt;내가 빠르게 배울 수 있는 동적 타이핑 언어 (파이썬, 자바스크립트) 등 택했다면&lt;/p&gt;
&lt;p&gt;좀 더 기본을 탄탄하게 하는 게 좋고,&lt;/p&gt;
&lt;p&gt;배우는 데 시간이 걸리는 정적 타이핑 언어(자바, C, C#, C++, 코틀린, 다트 등)를 골랐다면&lt;/p&gt;
&lt;p&gt;클래스 정도까지 배운 뒤 프레임워크를 익혔다가 다시 문법 공부하는 게 나을 수 있다.&lt;/p&gt;
&lt;p&gt;보통 정적 언어 문법 배우다 지치는 경우가 많기 때문이다.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;2. 프레임 워크 사용 방법 배우기&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;컴퓨터 공학과를 간다면, 프레임워크 대신에 알고리즘이나 자료구조를 배우겠지만&lt;/p&gt;
&lt;p&gt;독학하거나 학원을 가는 경우 여기로 오게 된다.&lt;/p&gt;
&lt;p&gt;자바의 스프링이니, 스위프트의 iOS, 모바일의 안드로이드니, 자바스크립트의 리액트니 하는 것들은 모두 다 프레임워크다.&lt;/p&gt;
&lt;p&gt;프레임워크는 프로그래밍 언어 문법을 쓰기는 하지만 나름의 규칙이 있다.&lt;/p&gt;
&lt;p&gt;이 규칙들은 개발 환경( 모바일이냐 웹이냐, 급히 만들어야 했냐 따위 )이나 프레임 워크 개발사의 입맛에 따라 만들어진 경우가 대부분이다.&lt;/p&gt;
&lt;p&gt;환경에 대한 지식은 물론, 프레임워크 자체에 대해서도 배워야되는 순간이다.&lt;/p&gt;
&lt;p&gt;대게는 프레임워크 개발사 홈페이지에 들어가서 공식 문서를 보는 게 제일 확실하다.&lt;/p&gt;
&lt;p&gt;하지만 처음에 공식 문서를 보는 건 정말 난감하다. 공식 문서가 있다는 것 정도만 기억하고 &amp;#39;강의&amp;#39;를 보는 걸 추천한다.&lt;/p&gt;
&lt;p&gt;책도 좋지만, 책은 처음에는 너무 오래걸린다.&lt;/p&gt;
&lt;p&gt;특히 UI를 쓰는 프레임워크 ( 리액트, 안드로이드, ios, 플러터 등 )은 화면을 보면서 따라하는 게 효과적이다.&lt;/p&gt;
&lt;p&gt;보통 프레임워크를 훑어보는데 1~2달 정도 걸리는 편이다.&lt;/p&gt;
&lt;p&gt;여기서는 훑어본다는 말을 했는데, 처음에는 따라하느라 급급해 배우긴 배웠지만&lt;/p&gt;
&lt;p&gt;실제로 이해는 못하고 있는 상황이기 때문이다. 꼭 내가 시간을 들여서 따로 프로젝트를 해보아야한다.&lt;/p&gt;
&lt;p&gt;프레임워크를 배우는 과정에서 중간 중간에 문제 풀이를 많이 해보는 것도 중요하다.&lt;/p&gt;
&lt;p&gt;따로 문제가 있는 수업이면 더 좋고, 없다면 오늘 들은 수업을 내 마믐대로 바꿔보는 걸 추천한다.&lt;/p&gt;
&lt;p&gt;예컨데 오늘 화면을 그리는 수업을 했다면, 화면을 내 생각대로 조금씩 바꿔보는 것이다. 함수 이름을 바꿔도 되고, UI의 위치를 수정해 보아도 좋다. 그 과정에서 검색도 조금씩 해보게 되는데 이게 실제 개발에 가까워지는 과정이다.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;3. 프레임 워크 사용해서 간단한 포트폴리오 만들기&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;보통 프레임워크를 강의 등을 통해 배웠더라도 실제로 못 써먹는 경우가 상당히 많다.&lt;/p&gt;
&lt;p&gt;이건 지식을 완전히 내것으로 하지 못했기 때문이다.&lt;/p&gt;
&lt;p&gt;보통 들어서 아는 지식과 내 것인 지식은 큰 차이가 있는데,&lt;/p&gt;
&lt;p&gt;들어서 아는 지식은 내가 떠올리려고 하면 잘 생각이 안나지만, 누가 말하면 이야기할 수 있다.&lt;/p&gt;
&lt;p&gt;내 것인 지식은 누가 말안해도 쉽게 꺼내서 쓸 수 있는 걸 말한다.&lt;/p&gt;
&lt;p&gt;한마디로 책이나 강의를 보지 않고 웹사이트, 앱, 서버를 만들 수 있는 단계를 말한다.&lt;/p&gt;
&lt;p&gt;처음부터 이 단계에 도달하는 것은 어렵다. 따라서 아주 작은 프로젝트 (포트폴리오)부터 만드는 게 필요하다.&lt;/p&gt;
&lt;p&gt;내가 웹을 배운다면 3페이지짜리 간단한 웹을 만들어보겠다. 로그인도 없고, 회원가입도 없다.&lt;/p&gt;
&lt;p&gt;이 첫 웹페이지를 만들면 일단 아무데라도 호스팅을 해서 올려보겠다.&lt;/p&gt;
&lt;p&gt;첫 웹사이트가 어떻게든 돌아가는 상태가 되면, 프로젝트 규모를 키워보자.&lt;/p&gt;
&lt;p&gt;지도 기능을 넣어볼 수도 있고, 회원 가입 기능을 넣어볼 수도 있다.&lt;/p&gt;
&lt;p&gt;이전에 3페이지를 만들었다면 이번에는 5~6페이지정도 만들어보자.&lt;/p&gt;
&lt;p&gt;두번째 사이트가 만들어지면 세번째 사이트를 만들어보자.&lt;/p&gt;
&lt;p&gt;이번에는 좀 더 과감하게 글쓰기나 검색 기능을 넣어볼 수 있다.&lt;/p&gt;
&lt;p&gt;아니면 게시판 같은 걸 만들어보아도 좋다.&lt;/p&gt;
&lt;p&gt;여기서 포인트는 작게 만들되 완성을 하고, 좀 더 크게 만드는 것이다.&lt;/p&gt;
&lt;p&gt;이 과정을 통해 자연스럽게 지식이 내것이 되고, 개발 숙련도가 올라간다.&lt;/p&gt;
&lt;p&gt;이 때 괜히 스케일을 엄청 크게 해서 좌절하지 말자.&lt;/p&gt;
&lt;p&gt;여러분이 보는 서비스는 대게 많은 개발자들이 몇년씩 만든 것이다.&lt;/p&gt;
&lt;p&gt;너무 기획에 힘주지 말고, 기존에 있는 디자인이나 서비스를 따라하는 걸 권한다.&lt;/p&gt;
&lt;p&gt;보통 이 과정이 1~3개월 정도 걸린다. 컴퓨터 학원들은 여기까지 하고 끝나는 경우가 대부분이다.&lt;/p&gt;
&lt;p&gt;혹은 2번째 단계에서 끝나기도 한다. 일반적으로 3번째 단계까지 하면 취업은 그럭저럭 하는 편이다.&lt;/p&gt;
&lt;p&gt;빠른 취업이 목표라면 3단계까지 빠르게 마무리하는 걸 권한다.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;4.컴퓨터 공학 기초 지식 채우기&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;보통 프레임워크를 배우다보면 전반적인 컴퓨터 공학 지식을 얕게 배우게 된다.&lt;/p&gt;
&lt;p&gt;프레임워크는 모두 다 컴퓨터 공학에 기초를 두고 있기 떄문이다.&lt;/p&gt;
&lt;p&gt;프레임워크로 개발을 시작한 사람들은 2부류로 나뉘는데 하나는 적당히 돌아가는 코드에 만족하고, 막히면 스택 오버플로우를 뒤지는 스타일이다. 다른 하나는 원리까지 알고 해결하려는 스타일이다.&lt;/p&gt;
&lt;p&gt;대게는 후자가 시간이 갈수록 개발을 잘하는 편이다.&lt;/p&gt;
&lt;p&gt;전체 컴퓨터 공학을 다 배우는 건 시간이 없는 상태에서는 어려운 일이다.&lt;/p&gt;
&lt;p&gt;컴퓨터 공학을 전반적으로 빠르게 훑어볼 수 있는 &amp;#39;컴퓨터 과학 입문&amp;#39; 개통을 읽어보기를 권한다. 보통 대학교 1학년 필수 과목으로 지정되어 있다.&lt;/p&gt;
&lt;p&gt;시간이 있다면 컴퓨터 공학 전공 과목을 10개 정도 다 보는 것도 좋다.&lt;/p&gt;
&lt;p&gt;알고리즘, 자료구조, 데이터베이스, 운영체제, 이산수학, 네트워크, 컴퓨터 구조 등의 전공서적을 다 보는 것이다.&lt;/p&gt;
&lt;p&gt;보통 이 과정에 1개월 ~ 1년 정도 걸리는데, 프로젝트 하기와 병행하기를 권한다. 이것에만 집중하기에는 시간이 너무 오래걸리기 때문이다.&lt;/p&gt;
&lt;p&gt;대게의 컴퓨터 공학과 출신들은 4단계까지 하고 취업을 한다.&lt;/p&gt;
&lt;p&gt;일부 기업에서 불평을 하는 컴퓨터 공학과 학생들은 1단계와 4단계만 하고 일자리를 구한다.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;5. 다른 사람의 소스 많이 보면서, 패턴 배우기&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;남의 소스를 많이 보다보면, 많이 배운다.&lt;/p&gt;
&lt;p&gt;내가 무작정 코드를 작성하는 것도 좋지만, 이게 맞는 게 틀린건이 확신하기 어렵다.&lt;/p&gt;
&lt;p&gt;다행히도 온라인 상에 제대로 짜인 코드가 엄청나게 많다.&lt;/p&gt;
&lt;p&gt;구글 같은 거대 IT 기업이 친절하게도 최상급의 코드를 공개해놓고 있다.&lt;/p&gt;
&lt;p&gt;여기에 오픈소스는 말할 것도 없다.&lt;/p&gt;
&lt;p&gt;이 소스들을 내가 이해할 수 있는 선에서 읽어보며 분석해보자.&lt;/p&gt;
&lt;p&gt;따라해보는 것도 나쁘진 않지만 너무 많은 시간이 드니 읽어보면서&lt;/p&gt;
&lt;p&gt;이 사람들은 패키지를 이렇게 나누었고, 클래스는 여떤 식으로 나누었는지 읽어보기를 권한다.&lt;/p&gt;
&lt;p&gt;내가 본 코드들이 바로 내 코드에 적용은 안되겠지만 어느정도 큰 그림은 잡을 수 있을 것이다.&lt;/p&gt;
&lt;p&gt;틈틈히 디자인 패턴 등을 보아도 좋다. 하지만 너무 깊게 들어가지는 말자.&lt;/p&gt;
&lt;p&gt;보통 패턴이란 건, 어떤 문제를 계속 경험하다보면 눈에 들어오게 되는 것이다. 그 문제들의 해결책을 모은 게 패턴이다.&lt;/p&gt;
&lt;p&gt;그렇기에 패턴은 경험 있는 사람들이 보면 훌륭한 해결책이지만 초보들이 보기에는 이해가 잘 안될 수가 있다.&lt;/p&gt;
&lt;p&gt;왜 써야되는지 크게 와 닿지 않을수가 있다. 나중에 봐야겠다는 생각정도만 가져도 충분하다.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;6. 프로젝트 많이 하기 (출시 등)&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;실무를 하는게, 공부만 하는 것보다 낫다는 말을 한다.&lt;/p&gt;
&lt;p&gt;대게는 맞는 말이다. 실무를 하다보면 공부할 때는 적당히 넘어가는 일들도&lt;/p&gt;
&lt;p&gt;다 해결하고 넘어가야 되기에 문제 해결 능력이 좋아질 수 밖에 없다.&lt;/p&gt;
&lt;p&gt;또한 깊은 실용적 지식일수록 책이나 강의에는 안 적혀 있을 가능성이 높다.&lt;/p&gt;
&lt;p&gt;직접 일 하면서 배우는 게 중요하다. 직접 일을 하는 게 힘든 상황이라면 최대한 실제 상황과 유사하게 만들어가야한다.&lt;/p&gt;
&lt;p&gt;실제 제품에 근접하게 코드를 만들수록, 의외의 문제를 만나고 그 문제를 해결하는 과정에서 실력이 좋아지기 때문이다.&lt;/p&gt;
&lt;p&gt;마냥 프로젝트만 많이 한다고 실력이 늘지는 않는데, 기본이 없는 상태로 프로젝트의 양만 늘리거나&lt;/p&gt;
&lt;p&gt;동일한 난이도의 프로젝트만 반복하는 경우가 많기 때문이다.&lt;/p&gt;
&lt;p&gt;이 때는 의도적으로라도 자신의 프로젝트의 난이도를 조절하면은 좋다.&lt;/p&gt;
&lt;p&gt;안 쓰던 라이브러리를 써본다든지, 안 써본 언어를 써본다든지, 한 언어로 짜인 코드를 다른 언어로 바꿔본다든지, 프론트 엔드 개발자인데 백엔드쪽을 해본다는지 하는 식으로 말이다.&lt;/p&gt;
&lt;p&gt;난이도를 높였다가 낮추는 과정에서 내 원래 분야의 이해도도 올라가게 된다.&lt;/p&gt;
&lt;p&gt;세부적으로는 다른 면이 있더라도, 각각의 분야들은 하나의 뿌리에서 나왔기 때문이다.&lt;/p&gt;
&lt;p&gt;이 과정은 끝이 없기에 따로 기간은 적지 않겠다.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;기타. 더 깊게 배우기&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;이 단계가 되면 특별히 정형화된 공부방법은 없다.&lt;/p&gt;
&lt;p&gt;개발 방법론을 찾아볼 수도 있고, 각종 개발도구를 추가적으로 배워볼 수도 있다.&lt;/p&gt;
&lt;p&gt;혹은 일반 개발원리 ( 클린코드나 아키텍처) 같은 걸 보면서&lt;/p&gt;
&lt;p&gt;더 나은 개발은 무엇인지 연구해볼 수도 있다.&lt;/p&gt;
&lt;p&gt;예전에는 잘 모르고 넘어갔던 프레임워크를 더 깊이 공부하기도 하고&lt;/p&gt;
&lt;p&gt;적당히 쓰기만 했던 프레임워크 내부나 리눅스 커널을 뜯어보기도 하고&lt;/p&gt;
&lt;p&gt;테스팅을 배워볼 수도 있겠다.&lt;/p&gt;
&lt;p&gt;이 글을 쓰게 된 건 수업을 하다가 어디까지 공부해야&lt;/p&gt;
&lt;p&gt;개발자로 취업할 수 있나요란 질문을 받아서이다.&lt;/p&gt;
&lt;p&gt;예전부터 많이 듣던 질문이라 글로 한번 정리해보았다.&lt;/p&gt;
&lt;p&gt;큰 그림을 잡는 데 도움이 되었으면 하며, 글을 마친다.&lt;/p&gt;</description>
      <category>코딩 배우는 법을 배우기</category>
      <author>에드 신</author>
      <guid isPermaLink="true">https://software-creator.tistory.com/31</guid>
      <comments>https://software-creator.tistory.com/31#entry31comment</comments>
      <pubDate>Tue, 15 Sep 2020 15:24:00 +0900</pubDate>
    </item>
    <item>
      <title>내가 개발을 배워온 과정 - 3부 어둠 속의 희망</title>
      <link>https://software-creator.tistory.com/30</link>
      <description>&lt;p&gt;사실 29살때 있었던 일은&lt;/p&gt;
&lt;p&gt;여지껏 누구에게도 잘 말하지 않았다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;생각을 하는 것만으로도&amp;nbsp;&lt;/p&gt;
&lt;p&gt;우울한 맛이 있었기 때문이다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;이 글은 개발자로 취업하려는&lt;/p&gt;
&lt;p&gt;비공대생들에게 많은 도움이 될 것이다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;사람들이 쉬쉬하는 진실을 다루고 있기 때문이다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;화려한 광고에서는 말하지 않는 이야기다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;그럼 5년 전으로 돌아가보자.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;나는 학원을 마치고&amp;nbsp;&lt;/p&gt;
&lt;p&gt;바로 취업를 시도하지는 않았다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;아직 공부할 게 더 많이 남았다고 생각했기 때문이다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;학원은 12월 초에 끝났다. 포트폴리오도 만들었지만 좀 더 공부하기로 결정했다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;컴공 과목을 공부하면 좋다 생각해&amp;nbsp;&lt;/p&gt;
&lt;p&gt;네트워크, 운영체제, 데이터 베이스 전공서적을 구해서 읽었다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;그 외 이산수학이나 컴퓨터 구조, 디자인 패턴 책도 짬짬이 읽었다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;이때 대략 10개 정도 컴공 과목을 공부했는데&amp;nbsp;&lt;/p&gt;
&lt;p&gt;커리어적으로는 별로 좋은 선택은 아니었지만&lt;/p&gt;
&lt;p&gt;개발 실력을 탄탄하게 하는 데 있어서는 좋은 선택이었다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;학원에서 네트워크 프로그래밍을 하기는 했지만&lt;/p&gt;
&lt;p&gt;주로 구현이 치중했고, 이론은 깊이 다루지 않았다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;내가 네트워크를 따로 공부해두지 않았다면&lt;/p&gt;
&lt;p&gt;나중에 블루투스 (BLE)를 개발할때 디버깅을 아예 못했을 것이다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;운영체제를 공부하자&amp;nbsp;&lt;/p&gt;
&lt;p&gt;학원에서 따라서 쳤던 스레드가 왜 필요하고 어떻게 쓰이는지 알았다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;만약 내가 바로 일을 시작했다면, 메모리나 스레드 관리의 필요성을 몰랐을 수도 있다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;사실 커리어적으로는 학원이 끝나자마자 바로&lt;/p&gt;
&lt;p&gt;아무데나 취업하는 게 좋았다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;일단 경력이 1이라도 있는 것과&amp;nbsp;&lt;/p&gt;
&lt;p&gt;아예 없는 것을 사람들은 달리보기 마련이니깐.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;( tip - 오랫동안 개발을 하려면 컴공 과목을 배워보자 )&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;3월이 되자&amp;nbsp;&lt;/p&gt;
&lt;p&gt;일반적인 기업을 위주로 지원을 했다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;이 선택은 상당히 잘못된 것으로 드러나게 된다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;지금이었으면은 절대 택하지 않을 방식이다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;세상 사람들은 많은 편견이 있다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;그 편견에 의해 때론 이득을 보기도 하고, 때론 손해를 보기도 한다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;공식적인 경로로 취업을 하는 건&amp;nbsp;&lt;/p&gt;
&lt;p&gt;내가 택할 수 있는 방법 중에서도&amp;nbsp;&lt;/p&gt;
&lt;p&gt;가장 안 좋은 수였다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;만약 지금이라면&amp;nbsp;&lt;/p&gt;
&lt;p&gt;우회적인 방법을 택할 것이다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;이미 자리를 잡은 개발자들을 만날 수 있는 모임이나 스터디를 나갈 것이고&amp;nbsp;&lt;/p&gt;
&lt;p&gt;컨퍼런스 등에서 유명한 개발자들에게 다가가 질문을 할 것이다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;그러며 조언을 구할 것이다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;직접 만날 기회가 생기면 넌지시 일자리를 구하는 법이 있는지 물어볼 것이다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;일자리 추천을 받을수도 있고, 적어도 유용한 조언을 들을 수 있다.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;당장 일자리는 생기지 않더라도 나중에 제안을 받을 수도 있다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;사람들은 한번이라도 만나본 사람을 완전한 타인보다 선호하기 마련이다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;혹은 블로그나 책을 쓴 사람에게&amp;nbsp;&lt;/p&gt;
&lt;p&gt;연락해서 질문을 해볼 수 도 있다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;대게 그런 사람들에게는 제안이 많이 들어오기 마련이다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;그 사람에게는 안 맞더라도 나에게는 꽤 괜찮은 제안일 수도 있다.&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;아니면 잡코리아나 스타트업 채용 공고들을 뒤져서&lt;/p&gt;
&lt;p&gt;내 기술 스펙이랑 비슷한 회사의 리스트를 뽑아보겠다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;그래서 내 장점을 어필하는 메일을 가능한 많이 보내볼 것이다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;하지만 나는 그러지 않았다.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;당시에 나는 채용공고가 유일한 길인 줄 알았기에&amp;nbsp;&lt;/p&gt;
&lt;p&gt;다른 방법을 찾지 않았다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;3월이 되자 지원을 시작했다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;이름난 기업부터 시작해 덜 유명한 기업도 모두 지원했다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;이래저래 지원을 많이 했는데 연락이 오지 않았다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;당당했던 자신감은 사라진지 오래였다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;개발 공부는 계속하고 있었지만&amp;nbsp;&lt;/p&gt;
&lt;p&gt;연이은 서류 탈락에 조금씩 회의감이 들었다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;당시에는 주로 아침 9시 정도에 학교에 나가서&amp;nbsp;&lt;/p&gt;
&lt;p&gt;밤 11시 정도에 학교를 떠났다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;워낙 오래 학교에 있다보니&amp;nbsp;&lt;/p&gt;
&lt;p&gt;회계사 시험 준비하던 친구와 자주 마주쳤다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;서로 열심히 한다고 칭찬하고 위로를 해주었던 기억이 난다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;서류 준비와 개발 공부를 하고&amp;nbsp;&lt;br /&gt;남는 시간엔 컴퓨터 공학과 수업을 도강하기도 했다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;'인공지능'이랑 '데이터 마이닝' 수업이었는데&amp;nbsp;&lt;/p&gt;
&lt;p&gt;절반은 호기심에 절반은 컴퓨터 공학과에서 대체 무슨 수업을 하나 궁금해서 들었다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;처음엔 약간 어려웠는데&lt;/p&gt;
&lt;p&gt;수업에서 쓰는 교과서를 구해서&amp;nbsp;&lt;/p&gt;
&lt;p&gt;미리 예습을 하니 들을만 했다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;도강을 했지만 끝까지 걸리진 않았다.&lt;/p&gt;
&lt;p&gt;공대생 비슷한 나의 얼굴이 한 몫 한 것 같다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;거의 4개월 동안 아무 성과없이 6월말이 되었다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;나의 실력은 좋아지고 있었지만&lt;/p&gt;
&lt;p&gt;자존감이 정말 많이 떨어졌다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;지금 같으면 작은 기업 위주로 찾아보거나,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;제 3의 길을 찾아서 취업을 했겠지만&amp;nbsp;&lt;/p&gt;
&lt;p&gt;그때는 내 노력이나 실력이 부족했다고 생각했다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;그래서 지금도 나는 무작정 노력 하라는 말을 별로 좋아하지 않는다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;나에게 필요한 건, 올바른 방법과 조언이었다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;7월 즈음되자 회의감이 많이 들었다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;나는 왜 이런 사서 고생을 했는가.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;혼자 도서관에 앉아 있는데 괜히 서러움에 눈물이 나오곤 했다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;개발을 더 해야될지 말지 고민이 되었다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;때론 2014년이었고, 코딩을 하는 것 자체가 어리석은 것으로 비춰지던 떄였다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;나는 단호한 마음으로 시작했지만&lt;/p&gt;
&lt;p&gt;주변의 모든 신호들이 아니라고 했다.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;사실 나도 2달 정도 개발을 놓고 지냈다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;뭘할지 모르는 상황이라 아무거나 흥미 가는 걸 공부했다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;그때 내가 공부한 건 '기초 물리학'이었다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;당시 공대쪽은 적성검사에서 '과학' 지식을 물어보는 경우가 흔했고&amp;nbsp;&lt;/p&gt;
&lt;p&gt;나는 시험 통과를 위해 과학 공부를 약간했다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;고1 이후로는 과학책을 본 적이 없었으니 12년만에 한 것이었다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;바로 공대생들이 보는 책을 보기는 어려워&amp;nbsp;&lt;/p&gt;
&lt;p&gt;'수학 없는 물리' 라는 책을 보았는데 비유와 그림이 많아&amp;nbsp;&lt;/p&gt;
&lt;p&gt;재밌게 읽었다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;물리에 대해 좋은 기억이 있어&amp;nbsp;&lt;/p&gt;
&lt;p&gt;2달 동안은 기초 물리를 공부하면서 지냈다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;대학물리책도 보고, 전자 기학 책도 살짝 보았다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;지금 생각해도 뜬금없는 결정인데&amp;nbsp;&lt;/p&gt;
&lt;p&gt;시간을 마냥 보내기보다는 아무거라도 하는 게 낫다고 생각했다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;공부할때는 몰랐는데 기초 물리를 배워둔 게&amp;nbsp;&lt;/p&gt;
&lt;p&gt;나중에 가상현실 게임을 만들어볼때 큰 도움이 되었다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;요즘은 게임 개발을 다 엔진으로 하지만&lt;/p&gt;
&lt;p&gt;게임을 제대로 만드려면 기본 로직은 이해해야한다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;로직들은 다 물리를 기반으로 만들어졌다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;약간은 물리를 알아야&lt;/p&gt;
&lt;p&gt;3D 물체의 이동, 각도 계산, 쿼터니언, 그래픽스 이론 등을&lt;/p&gt;
&lt;p&gt;이해할 수 있다.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;잠시나마 게임 개발에 도전해볼 수 있었던 건&amp;nbsp;&lt;/p&gt;
&lt;p&gt;이때 물리를 배워둔 덕분이었다.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;하지만 그때 당시 나는 게임을 만들 생각이 1도 없었다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;난 물리책을 현실 도피용으로 읽었다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;누군가 이 일이 먼 훗날 도움이 될거라는 이야기를 해도&amp;nbsp;&lt;/p&gt;
&lt;p&gt;막상 어려움에 처해있는 당사자는 전혀 공감이 안 된다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;현재의 고통이 너무나도 크기 때문이다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;하지만 정말로 쓸데없을 것만 같았던 경험도&amp;nbsp;&lt;/p&gt;
&lt;p&gt;당시에 최선을 다했다면 도움이 되는 순간이 분명히 온다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;나는 그 사실을 분명히 말할 수 있다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;때로는 불운이 행운이고, 행운이 불운이다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;8월말이 되어 새로운 취업 시즌이 되었다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;난 계속 개발을 할지 말지 고민을 했다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;그러다 우연히 &quot;&lt;b&gt;싱가폴에서 개발자 모집. 알고리즘 시험 통과하면 연봉 6천만원&lt;/b&gt;&quot;이란 공고를 보게 된다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;나는 이 공고를 보고 눈이 멀었다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;고백하겠다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;내가 개발자를 다시 하겠다고 마음 먹은 것은&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;6천만원&lt;/b&gt;이 탐이 나서였다.....&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;이 회사의 알고리즘 시험을 준비하면서&amp;nbsp;&lt;/p&gt;
&lt;p&gt;오랜만에 코딩을 했다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;문제를 풀어가는 과정도 흥미로웠고&amp;nbsp;&lt;/p&gt;
&lt;p&gt;코딩에 몰입하는 순간이 좋았다.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;외부적인 요인때문에 개발을 잠시 놓았지만&lt;/p&gt;
&lt;p&gt;아직도 개발에 대한 관심과 애정이 남이 있었다.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;아쉽게도 알고리즘 시험은 떨어졌다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;내가 2달간 코딩을 손에서 놓지 않았다면&lt;/p&gt;
&lt;p&gt;충분히 통과했을 거란 확신이 있었다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;이 일을 계기로 전략을 바꿨다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;전공 지식을 테스트하는 곳만 지원하기로..&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;개발자의 세상은 실력 위주라 들었고&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;난 공고를 보고 채용과정에&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;'필기테스트&lt;/b&gt;'와 '&lt;b&gt;기술면접&lt;/b&gt;'이 포함되어 있으면 지원을 했다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;나의 예상은 반은 맞았고, 반은 틀렸다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;난 대부분 기술면접까지는 통과를 했다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;문제는 최종면접이었다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;내게 들어온 질문들은 비슷했다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&quot;경영학과인데 잘 할 수 있나요?&quot;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&quot;경영학과인데 사업을 하러 갈 것 아닌가요?&quot;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&quot;알고리즘이 무엇인지 아나요?&quot;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;나는 더 공부를 많이했다는 이야기를 했고&amp;nbsp;&lt;/p&gt;
&lt;p&gt;자신이 있다는 어필을 했지만 소용없었다.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;마치 나는 '&lt;b&gt;친환경 세제&lt;/b&gt;'와 같았다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;똑같은 세제라고 해도 친환경이라고 하면&lt;/p&gt;
&lt;p&gt;거품도 덜나고, 잘 안 씻길듯한 이미지가 있다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;돌이켜보면 나는 2가지 중 하나를 택해야했다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;실력을 압도적으로 키우거나&amp;nbsp;&lt;/p&gt;
&lt;p&gt;실력에 대한 의문을 부드럽게 해소하거나.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;근데 나는 둘 다 못했다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;신입 개발자에게 필요한 실력이 1이라면&lt;/p&gt;
&lt;p&gt;난 1.2 ~ 1.5 정도의 실력은 있었다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;문과생에 대한 선입견을 생각할 떄&amp;nbsp;&lt;/p&gt;
&lt;p&gt;3~4정도는 실력이 있어야했다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;난 그 사실을 몰랐다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;아니면 좀 더 부드럽게 면접관을 설득할 방법을 고민했어야했다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;지금은 웬만하면 개발 이야기를 많이 하거나&amp;nbsp;&lt;/p&gt;
&lt;p&gt;개발 지식을 어필한 뒤에&amp;nbsp;&lt;/p&gt;
&lt;p&gt;전공 이야기를 한다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;일단 개발 잘할듯한 이미지가 생기고 나면&lt;/p&gt;
&lt;p&gt;전공을 말해도 상관없다. 오히려 플러스가 된다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;하지만 반대로 말하면&lt;/p&gt;
&lt;p&gt;의심 가득한 표정을 보게 된다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;같은 내용이어도 순서에 따라&amp;nbsp;&lt;/p&gt;
&lt;p&gt;다른 결과가 나온다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;(&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;b&gt;tip&amp;nbsp;- 사람들은 비논리적이고 개발자들도 예외는 아니다&lt;/b&gt;&amp;nbsp;)&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;어쨌든 다시 취업 과정으로 돌아가보자.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;월화수목 최종면접을 보고&amp;nbsp;&lt;/p&gt;
&lt;p&gt;다 떨어지는 상황이 계속되니&amp;nbsp;&lt;/p&gt;
&lt;p&gt;멘탈이 완전히 너덜너덜 되었다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;원래 정신이 약한 사람은 아닌데&amp;nbsp;&lt;/p&gt;
&lt;p&gt;이때는 정신이 꽤나 약해졌었다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;12월말이 되었다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;마지막으로 기대했던 곳에서&amp;nbsp;&lt;/p&gt;
&lt;p&gt;탈락 통보를 받았을 때의 기분이란..&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;세상에 대한 원망이 없었다면&lt;/p&gt;
&lt;p&gt;거짓말일 것이다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;내가 악플러가 아니라 개발자가 된 건&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;어느 순간 생긴 자각 덕분이었다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;어떠한 일을 계속해서 하게 되면&amp;nbsp;&lt;/p&gt;
&lt;p&gt;작은 변화가 생겨난다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;나는 이것을 '&lt;b&gt;정체성&lt;/b&gt;'이라고 부른다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;내 스스로는 인식하지 못했지만&lt;/p&gt;
&lt;p&gt;나 자신을 '개발자'로 보고 있었다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;근 1년여간 개발을 공부하는 과정에서&amp;nbsp;&lt;/p&gt;
&lt;p&gt;개발 자체가 하나의 일상이 되었고&amp;nbsp;&lt;/p&gt;
&lt;p&gt;포기할 수 없는 한 부분이 되었다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;자신을 농부로 인식한 사람은&amp;nbsp;&lt;/p&gt;
&lt;p&gt;비가 와도 농사를 짓고, 가뭄이 와도 농사를 짓는다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;자신을 화가로 생각하는 사람은&lt;/p&gt;
&lt;p&gt;붓이 망가져도, 새로 붓을 사든, 붓을 만들어서든 그림을 그린다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;어떤 어려움이 왔을 때&amp;nbsp;&lt;/p&gt;
&lt;p&gt;관두지 않는 건 '&lt;b&gt;정체성&lt;/b&gt;'때문이다.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;나중에 내가 코딩을 가르치면서 알게 된 건데&amp;nbsp;&lt;/p&gt;
&lt;p&gt;현재 실력이랑 상관없이 계속 하는 사람도 있고&amp;nbsp;&lt;/p&gt;
&lt;p&gt;금방 포기하는 사람도 있다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;난 처음에는 끈기의 차이라고 생각했다.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;아니었다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;포기 하지 않는 사람들은 '&lt;b&gt;진지하게 개발이 필요하다&lt;/b&gt;'고 생각하는 사람이었고&amp;nbsp;&lt;/p&gt;
&lt;p&gt;쉽게 포기하는 사람들은 '&lt;b&gt;개발 공부가 유행하니 배워보자&lt;/b&gt;'는 사람이 대부분이었다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;한쪽은 절반정도 '개발자'의 정체성을 가지고 시작하는 반면&lt;/p&gt;
&lt;p&gt;다른 한쪽은 아니었다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;작은 마인드 차이지만 결과는 많이 달랐다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;내가 이걸 깨달은 건 한참후이다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;12월말 결과가 나온 뒤 생각을 바꿨다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;일단 나는 아무곳이라도 가서&amp;nbsp;&lt;/p&gt;
&lt;p&gt;일을 해보자고 마음 먹었다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;1년전에 했으면 좋았을 결정이었다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;당시 학교에서는 스타트업이나 중소기업과 인턴 연계 프로그램을 진행하고 있엇다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;그 중 SNS 앱을 만드는 회사에 지원을 했다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;다운로드 10만정도가 있는 곳이었다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;학교에서 일부 금액을 지원해주고, 회사에서는 20만원을 주는 조건이었다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;12월 말에 면접을 보고, 12월 30일 경에 출근을 했다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;직책은 안드로이드 개발 인턴이었다.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;회사 인원은 10여명 정도였고&amp;nbsp;&lt;/p&gt;
&lt;p&gt;개발자는 나까지 3명이었다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;안드로이드와 서버를 담당하는 CTO겸 공동창업자가 있었고&lt;/p&gt;
&lt;p&gt;아이폰 ( ios) 를 담당하는 사람이 한명 있었다.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;실제로 출시된 앱의 코드를 보는 건 처음이었다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;첫 임무는 간단한 편이었다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;앱의 UI를 일부 고치는 것이었다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;두번째 임무는 지금생각해도 살짝 난감한 것이었다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;SNS에 영상 업로드 기능을 추가하려고 하는데,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;영상 길이에 제한을 두고 싶다고 했다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;10초 까지만 영상을 올릴 수 있게&amp;nbsp;&lt;/p&gt;
&lt;p&gt;영상 편집 기능을 넣어달라고 했다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;아이폰은 금방 했다고 했다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;이전에 산업협력으로 인턴들이 다 만들어 두었으니&amp;nbsp;&lt;/p&gt;
&lt;p&gt;그 소스를 고치기만 한다고 하였다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;하지만 실제 소스를 열어보니 동작하지 않았고&amp;nbsp;&lt;/p&gt;
&lt;p&gt;깃허브에서 적당히 가져다 붙인 것이었다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;처음에는 안드로이드에서 mp4를 자를 수 있는 라이브러리를 써서 했었다.&lt;/p&gt;
&lt;p&gt;약간의 어려움은 있었지만 잘 돌아가는 걸 확인했다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;하지만 mp4 만 지원해서는 안 된다는 이야기를 들었고&amp;nbsp;&lt;/p&gt;
&lt;p&gt;다른 확장자도 자를 수 있어야 한다고 했다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;하지만 자바 라이브러리 중에 영상을 자를 수 있는 라이브러리가 없었다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;C 라이브러리를 써야만 했다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;결국 NDK를 써야했다.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;NDK는 안드로이드에서 C나 C++를 쓸 수 있게 해준다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;내 작업환경은 윈도우였기에 NDK를 바로 쓸 수 없었다. 시그윈을 써서 작업을 했다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;시그윈은 윈도우에서 리눅스 터미널을 쓸 수 있게 해주는데 실제 리눅스와는 미묘하게 다르다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;맥이나 리눅스에서 했으면 좀 더 쉬웠을 수도 있다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;내가 겪은 에러의 상당수는 시그윈 때문이었다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;CTO겸 공동창업자도 NDK나 FFMpeg은 다뤄본 적이 없었기에&amp;nbsp;&lt;/p&gt;
&lt;p&gt;혼자서 끙끙대면서 작업을 했다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;CTO에게 질문을 해도 피상적인 답변만 들었다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;나는 인턴을 뽑게 되면&amp;nbsp;&lt;/p&gt;
&lt;p&gt;최대한 세부적으로 알려줘야겠다는 생각을 했다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;이 다짐을 1번은 지켰고, 1번은 지키지 못했다.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;인턴일은 작업량이 상당했다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;안드로이드도 해야하고, C도 만지고, NDK도 만져야되서 상당히 스트레스를 받았다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;썼던 C 라이브러리는 FFmpeg 이었는데 역시나 처음 보는 것이었다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;9시에 나와서 10시나 10시 반까지 작업을 했다.&lt;/p&gt;
&lt;p&gt;할일이 너무 많아 주말에도 거의 일을 했다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;포기를 하려고 몇번이나 생각했는데&amp;nbsp;&lt;/p&gt;
&lt;p&gt;이상하게 관두려할때 즈음 조금씩 진전이 있었다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;한달 좀 넘게 지나서 기능 구현을 했다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;안될 것 같았는데 어떻게든 한 것이다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;기능 구현을 다 끝내고 고민을 많이 했다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;물어봐도 답이 없는 상황에 지쳐 있었다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;약속된 2달을 채워야하는 게 아닌가&amp;nbsp;&lt;/p&gt;
&lt;p&gt;고민을 했다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;그래서 CTO와 면담을 했다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;주 내용은 회사에서 주는 돈은 20만원인데&amp;nbsp;&lt;/p&gt;
&lt;p&gt;업무 내용이 너무 과한것 아니냐&lt;/p&gt;
&lt;p&gt;야근도 지나치게 많다는 이야기였다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;내가 들은 답변은 이랬다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&quot;IT 회사는 원래 이래요&quot;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;나는 조용히 짐을 쌌다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;약 5주간의 인턴 생활을 마치고 고민을 했다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;당당히 나오긴 했지만 미래에 대한 확신이 하나도 없었다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;그때가 2월 초였다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;나는 바람을 쐴 겸 강남쪽을 갔다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;여기저기 정처없이 돌아다니다가&amp;nbsp;&lt;/p&gt;
&lt;p&gt;삼성전자 스토어에 들어가게 된다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;스토어에선 '갤럭시 VR'을 전면에 놓고 홍보하고 있었다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;나는 가상현실에 대해서 들어보기는 했지만&amp;nbsp;&lt;/p&gt;
&lt;p&gt;실제 접한 건 처음이었다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;VR을 처음 써보고 놀라움을 금치 못했다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;이런 신세계가 있었다니.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;집에 돌아와서도 VR 생각이 머리를 떠나지 않았다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;내가 직접 만들어보면 어떨까?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;'유니티'를 쓰면 VR 개발을 할 수 있단 걸 알게 되었고&amp;nbsp;&lt;/p&gt;
&lt;p&gt;유니티 책을 찾아서 읽었다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;전에 잠깐 도서관에서 유니티 책을 빌려본 적이 있었는데&amp;nbsp;&lt;/p&gt;
&lt;p&gt;이해가 안 되어, 읽다가 반납을 했다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;하지만 이번에는 결심도 달랐고&amp;nbsp;다른 책을 골랐다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;전의 책은 유니티의 기능을 설명만 했는데&amp;nbsp;&lt;/p&gt;
&lt;p&gt;다른 책은 처음부터 따라하면 3D 총싸움 게임(FPS)이 만들어지는 구성이었다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;앞의 100쪽은 미니 2D 게임 하나, 중간의 100쪽은 3D 게임 하나, 나머지 300쪽에선 3D 총싸움 게임을 만든다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;프로젝트 형식으로 된 책을 따라하니&amp;nbsp;&lt;/p&gt;
&lt;p&gt;만드는 재미가 있었다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;기능만 설명하는 책을 보면&amp;nbsp;&lt;/p&gt;
&lt;p&gt;이걸 어떻게 합쳐야할지 감이 안온다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;프로젝트 형태였기에&amp;nbsp;&lt;/p&gt;
&lt;p&gt;아주 아주 작게나마 게임을 만드는 경험을 할 수 있었다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;(&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;b&gt;tip&amp;nbsp;- 초보라면 기능보다는 프로젝트 위주의 책을 고르자&lt;/b&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;)&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;책을 보고나서 간단히 게임을 만들기 시작했다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;책만으로 배운 것이기에 진도가 잘 나가지는 않았다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;그러다 우연히 오큘러스 잼이란 공모전을 알게 된다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;페이스북이 오큘러스를 인수한 후 VR 게임을 늘리기 위해&amp;nbsp;&lt;/p&gt;
&lt;p&gt;대회를 연 것이다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;팀원을 모집해야되나 고민하고 있을 무렵&amp;nbsp;&lt;/p&gt;
&lt;p&gt;네이버 까페에 올라온 글을 보게 된다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;3D 모델링 디자이너인데&amp;nbsp;&lt;/p&gt;
&lt;p&gt;같이 할 팀원을 구한다는 내용이었다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;게임의 컨셉은 비행기 VR 슈팅 게임이었다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;작은 비행기가 바다를 돌아다니면서&amp;nbsp;&lt;/p&gt;
&lt;p&gt;적 비행기를 잡고, 마지막에는 보스(배)를 처리하는 게임이었다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;공모전에는 스테이지 1개까지만 만들고 제출하고&amp;nbsp;&lt;/p&gt;
&lt;p&gt;상황에 따라 더 만들 계획이라고 했다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;디자이너 분을 만나서 대화를 나눈 뒤 같이 하기로 했다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;VR개발은 어려운 점도 있었지만&amp;nbsp;&lt;/p&gt;
&lt;p&gt;즐거운 점이 훨씬 더 많았다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;약간의 기술적 어려움은 있었지만 결국 다 돌파해냈다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;VR 개발의 가장 큰 문제점은&amp;nbsp;&lt;/p&gt;
&lt;p&gt;신기술이란 것이다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;신기술이었기에&amp;nbsp;&lt;/p&gt;
&lt;p&gt;딱히 검색해도 답이 안 나왔다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;페이스북이 적어놓은 공식 문서를 참고해서 개발을 했다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;사실 나는 이전까지는 책을 많이 활용했다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;이때 처음으로 책에 의지하지 않고 개발을 하는 법을 알게 되었다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;내가 구현한 기능들은 사실 기본적인 것들이었다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;비행기의 이동, 미사일 쏘고 맞았을때 처리하기,&lt;/p&gt;
&lt;p&gt;아주 간단한 적 비행기 인공지능,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;VR 멀미 줄이기, VR로 포팅하기 등등을 만들었다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;중간에 머리에 쓴 VR 기기가 미세하게&amp;nbsp;&lt;/p&gt;
&lt;p&gt;잘못 동작하는 문제가 있었다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;이틀 동안 끙끙거렸는데 답이 안 나왔다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;그러다&amp;nbsp;아주 작은 계산 실수가 있다는 걸 알고&amp;nbsp;&lt;/p&gt;
&lt;p&gt;고쳤더니 자연스럽게 돌아갔다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;그때의 희열이란..&lt;/p&gt;
&lt;p&gt;무엇과도 바꿀 수 없었다.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;가상현실 게임 개발을 하며&amp;nbsp;&lt;/p&gt;
&lt;p&gt;계속해서 개발을 하겠다는 강한 결심을 했다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;개발을 계속해야 되나 말아야 되나&amp;nbsp;&lt;/p&gt;
&lt;p&gt;고민을 하던 나에게 '빛'이 된 순간이었다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;루쉰이 쓴 소설 '고향'에는 이런 이야기가 나온다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;i&gt;&quot;원래 숲에는 길이 없었다.&amp;nbsp;&lt;/i&gt;&lt;/p&gt;
&lt;p&gt;&lt;i&gt;사람들이 다니다 보니 길이 된 것이다.&amp;nbsp;&lt;/i&gt;&lt;/p&gt;
&lt;p&gt;&lt;i&gt;희망도 같은 게 아닐까?&quot;&lt;/i&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;나도 조금씩 길을 만들어 가고 있었다.&lt;/p&gt;</description>
      <category>코딩 배우는 법을 배우기</category>
      <category>개발배우기</category>
      <category>개발자학원</category>
      <category>문과생코딩</category>
      <category>코딩배우기</category>
      <category>파이썬기초</category>
      <category>파이썬배우기</category>
      <author>에드 신</author>
      <guid isPermaLink="true">https://software-creator.tistory.com/30</guid>
      <comments>https://software-creator.tistory.com/30#entry30comment</comments>
      <pubDate>Sun, 26 Jul 2020 22:37:44 +0900</pubDate>
    </item>
    <item>
      <title>내가 개발을 배워온 과정 - 2부 두 갈래의 길</title>
      <link>https://software-creator.tistory.com/29</link>
      <description>&lt;p&gt;안드로이드는 책으로 시작했다.&lt;/p&gt;
&lt;p&gt;1300쪽짜리 두꺼운 책을 사서 읽었는데&amp;nbsp;&lt;/p&gt;
&lt;p&gt;이해가 잘 되지 않았다.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;원래 개발은 잘 이해가 되지 않은 것이란&lt;/p&gt;
&lt;p&gt;생각이 있었기에 그냥 참고 읽었다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;돌이켜보면 나의 학습 방법이 문제였다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;안드로이드는 그래픽 위주 프로그래밍이다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;책을 차근차근 따라가는 것보다는 '영상'을 따라하는 게 훨씬 유리하다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;각종 UI를 책을 보면서 열심히 타이핑하고&amp;nbsp;&lt;/p&gt;
&lt;p&gt;책이랑 틀린지 확인하고, 나중에 실행을 해야한다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;또한 개발 툴에서 어디를 눌러야할지도 모르기에 열심히 찾아야한다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;이 과정에서 오타도 나기 마련이며, 엉뚱한 부분을 누르기도 한다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;이에 반해 영상은 어디에 UI를 배치할지,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;어떤식으로 개발 툴을 다루면 될지 알려준다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;생각없이 따라하기만 하면 되는 것이다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;그래픽 관련 프로그래밍은&lt;/p&gt;
&lt;p&gt;&lt;b&gt;영상으로 배우는 게 책으로 배우는 거에 비해 5~10배는 쉽다.&amp;nbsp;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;다만&lt;b&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;영상은 휘발성이 강해&amp;nbsp;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;꼭 복습을 해야한다&lt;/b&gt;.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;이걸 아무도 알려준 적이 없었기에&amp;nbsp;&lt;/p&gt;
&lt;p&gt;나는 이해가 안 되는 책을 끙끙거리면서 읽었다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;게다가 고른 책도 문제였다. 안드로이드 기능(API) 위주로 설명이 되어 있었기에&amp;nbsp;&lt;/p&gt;
&lt;p&gt;책을 다 보더라도 앱을 하나 만들 수 없었다. 지금이라면 프로젝트 위주의 책을 골랐을 것이다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;어쨌든 대학 수업에 별 흥미가 없었기에&amp;nbsp;&lt;/p&gt;
&lt;p&gt;뒷자리에 앉아서 안드로이드 책을 열심히 따라했다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;만약 원래 전공에서 성적이 좋은 편이었다면&amp;nbsp;&lt;/p&gt;
&lt;p&gt;수업을 열심히 들었을 거 같다.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;하지만 나는 학점이 안 높아&lt;/p&gt;
&lt;p&gt;중간만 가자는 심정으로 딴짓을 했다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;낮은 학점이 포기하지 않은 원동력이 된 것이다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;그럭저럭 안드로이드 책을 다 따라하고 나니&lt;/p&gt;
&lt;p&gt;6월말이 되었다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;안드로이드 책을 1번 다 따라하기는 했지만&lt;/p&gt;
&lt;p&gt;이해도는 매우 낮은 상태였다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;내가 원하는 앱을 만들기는 커녕&amp;nbsp;&lt;/p&gt;
&lt;p&gt;책에 있는 내용도 기억이 잘 나지 않았다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;당시에 고민을 많이 했다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;내 주변 친구들은 취업준비를 하거나&amp;nbsp;&lt;/p&gt;
&lt;p&gt;인턴을 하고 있었다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;어디에 자기 소개서를 썼고, 면접을 보았는지 이야기를 많이 했다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;나는 사실 인턴도 거의 쓰지 않았는데&amp;nbsp;&lt;/p&gt;
&lt;p&gt;아직 뭘 할지 확신이 서지 않았기 때문이다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;지금 생각해도 믿을 수 없는 배짱이다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;좀 더 개발 공부를 해볼까, 원래 전공을 살려볼까 고민을 많이 했다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;친구들에게도 물어보았는데 대답은 한결같았다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&quot;컴퓨터 공학 전공을 한 사람도 있는데, 굳이 너를 쓸 이유가 있을까? 정신 차리고 전공을 택해&quot;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;이런 이야기를 많이 들었지만 천성적으로 반항을 잘하고&amp;nbsp;&lt;/p&gt;
&lt;p&gt;원래 전공을 안 좋아했기에&amp;nbsp;고민했다.&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;경영학 전공을 살리면, 마케팅이나 경영관리를 해야되는데 다 싫었다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;결국 나는 개발 공부를 좀 더 하기로 결정했다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;스터디만으로는 한계가 있는 듯해서 학원도 알아보았다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;7월 초부터 학원에 등록해서 다니기 시작했다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;역시나 친구들은 말렸지만, 초기 학원 생활은 나에게 큰 도움이 되었다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;지금 와서 보면 친구들도 무얼 모르는 상태에서 조언을 한 셈이었다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;실제 컴퓨터 공학과를 나온 사람중에서도 개발자가 되는 비중은 30% 정도 밖에 안된다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;친구들은 자신의 세계관을 바탕으로 대답을 했고&lt;/p&gt;
&lt;p&gt;나는&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;b&gt;우연히 맞아 떨어지는 선택&lt;/b&gt;을 한 것뿐이었다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;만약 공학 학위가 중요한 기계, 화학 분야의 일을 하려고 했다면 기회조차 얻지 못했을 것이다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;학원은 5개월간 다녔다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;지금이라면 유료 학원을 택했을 것 같지만&lt;/p&gt;
&lt;p&gt;당시에는 거의 대부분이 국비 지원 학원이었다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;유료 학원 자체가 없었다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;그래서 개강일이 가까운 곳으로 골랐다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;아무 생각없이 골랐는데 상당히 운이 좋았다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;탁월한 선생님을 만난 것이다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;50대 중반이었던 걸로 기억하는데&amp;nbsp;&lt;/p&gt;
&lt;p&gt;30년동안 개발을 하고, 창업을 중간에 3번했다 실패한 분이었다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;신기술이 나오면 먼저 찾아보는 스타일이었고&amp;nbsp;&lt;/p&gt;
&lt;p&gt;책도 없던 2010년에 안드로이드를 배워서 가르치고,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;스프링도 독학해서 은행권에 강의를 나가는 분이셨다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;지금 생각해도 믿을 수 없을만큼 열정을 지닌 분이었다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;학원에서 제일 늦게 가는 사람은 선생님이었다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;9시에 시작하는 학원인데, 9시 넘게 공부하고 계셨다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;사실 이런 선생님 앞에서&lt;/p&gt;
&lt;p&gt;대부분의 것들은 핑계로 보였다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;사람은 자기 주변 사람을 닮아간다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;열정적인 선생님을 만날 수 있었던 건 행운이었다.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;늦게라도 감사의 말을 드리고 싶다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;학원은 진도가 빠른 편이었다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;학원은 2주 만에 자바를 떼고, 2주 뒤에 데이터베이스를 익히고&amp;nbsp;&lt;/p&gt;
&lt;p&gt;2개월차에는 웹을 만들고 4~5개원에는 모바일을 하는 초스피드 압축 과정이었다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;첫주에 스레드를 배우고,&lt;/p&gt;
&lt;p&gt;2주차에는 2D 슈팅 게임을&amp;nbsp; 만드는&amp;nbsp;&lt;/p&gt;
&lt;p&gt;정신 나간 일정이었다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;아마 개발을 처음 배운 사람은 상당히 힘들어 했을 것이다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;다행히도 나는 미리 6개월 넘게 예습을 한 상태였고,&lt;/p&gt;
&lt;p&gt;직접 개발하는 것을 옆에서 보니 이해가 더욱 빠르게 되었다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;선생님이 개발하는 것을 하나하나 따라하면서 몰랐던 개념을 익혀갔다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;객체지향이나 클래스 개념도 좀 모호한 상태였는데&amp;nbsp;&lt;/p&gt;
&lt;p&gt;선생님 설명을 듣고, 추천해주신 책을 읽으면서&amp;nbsp;&lt;/p&gt;
&lt;p&gt;정리를 확실히 할 수 있었다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;남들이 4년동안 하는 걸 1년내에 끝내야겠다는 생각을 했다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;학원은 9시에서 6시까지였지만, 끝나고도 계속 공부를 했다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;내가 공부한 건 주로 컴퓨터 공학과에서 배우는 과목들이었다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;개발을 잘하려면 대학에서 배우는 걸 배워두면 좋겠다는 생각을 막연히 했다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;이때 공부해 둔 게 구글링 할 수 없는 문제를 만났을때, 해결하는데 도움이 많이 되었다.&amp;nbsp;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;하지만 그건 3년 뒤의 일이었다.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;컴퓨터 과목 중에서 알고리즘이 중요하다는 이야기도 들어서&amp;nbsp;&lt;/p&gt;
&lt;p&gt;알고리즘을 공부하려고 했다..&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;그런데 어려움이 있었다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;알고리즘과 자료구조 책이 죄다 C 였던 것이다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;자바로 된 책이 있었으면 좋았겠지만&lt;/p&gt;
&lt;p&gt;도서관을 아무리 뒤져도 없었다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;어쩔 수 없이 C언어를 한달정도 공부한뒤에 알고리즘을 공부했다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;알고리즘을 처음 접한 건 7월 경이었다.&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;고른 책은 '&lt;span&gt;&lt;b&gt;뇌를 자극하는 알고리즘&lt;/b&gt;'이었다.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;분명 뇌를 자극한다고 했는데, 머리가 터질 것 같았다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;아니, 다른 의미로 자극을 하는 것이었나.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;터지는 것도 뇌에 자극이 되기는 하는 것이니..&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;아침에 밥 먹으면서 알고리즘 책을 읽고&amp;nbsp;&lt;/p&gt;
&lt;p&gt;지하철 타고 가서면서도 읽고&amp;nbsp;&lt;/p&gt;
&lt;p&gt;집에 와는 책을 타이핑도 하고, 알고리즘 문제도 찾아서 조금씩 풀었다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;여전히 이해가 안되었다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;책만으로는 안될 것 같아서 코세라의 '알고리즘' 강의도 같이 들었다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;영어라 이해가 안될 것 같았는데 3번 정도 들으면 들을만 했다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;알고리즘 책을 읽다가 이해가 안되면 처음으로 되돌아가서 읽었다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;그러면 예전보다 좀 더 이해가 되었다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;책을 처음으로 다 읽은 건 '추석연휴'였다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;마지막 챕터의 코드를 다 타이핑하고&amp;nbsp;&lt;/p&gt;
&lt;p&gt;정상적으로 돌아가는 걸 확인하니&amp;nbsp;&lt;/p&gt;
&lt;p&gt;강한 희열이 몰려왔다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;뭔가 내가 해냈구나 하는 뿌듯함이 있었다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;그 뒤로 책을 한번 더 보았는데 예전보다 훨씬 쉽게 느껴졌고 기억에도 남았다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;나의 개인적인 공부와는 별개로 학원 수업은 계속 진행되었다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;1시간 정도 수업을 하고 나면은 꼭 문제풀이 시간을 가졌는데&amp;nbsp;&lt;/p&gt;
&lt;p&gt;도움이 많이 되었다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;수업을 들으며 따라하다보면&amp;nbsp;&lt;/p&gt;
&lt;p&gt;내가 이해를 다 한것처럼 느껴진다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;하지만 나 혼자 해보려 하면은&amp;nbsp;&lt;/p&gt;
&lt;p&gt;잘 안된다. 지식의 공백이 있는 것이다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;문제를 푸는 건 공백을 메우는 아주 좋은 방법이다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;내가 아는 부분과 모르는 부분을 정확히 알 수 있다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;우리의 기억은 뭔가를 더 배울때보다&lt;/p&gt;
&lt;p&gt;뭔가를 끄집어 낼때 더 강화된다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;무언가를 꺼내려고 노력하면&lt;/p&gt;
&lt;p&gt;뇌는 중요한 정보라고 생각해서&amp;nbsp;&lt;/p&gt;
&lt;p&gt;더 깊게 기억하기 때문이다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;이를 '인출효과'라고도 하는데, 단순히 여러번 수업을 듣는 것보다&amp;nbsp;&lt;/p&gt;
&lt;p&gt;시험을 여러번 치는 게 훨씬 낫다는 이야기다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;인출효과는 과학적으로도 효과가 있는 게 증명되었다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;(&amp;nbsp; 학습법에 대해서 알아보고 싶다면 책 '&lt;span&gt;&lt;b&gt;어떻게 공부할 것인가&lt;/b&gt;'를 읽어보기를 권한다.&amp;nbsp; )&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;내가 혼자 공부하거나, 스터디를 할 때는&amp;nbsp;&lt;/p&gt;
&lt;p&gt;문제 풀이를 많이 하지 않았다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;반면 학원을 다닐때는 하나의 개념을 배우더라도&amp;nbsp;&lt;/p&gt;
&lt;p&gt;문제를 꼭 풀었다. 당시에는 왜 늘었는지 이해를 못했지만&amp;nbsp;&lt;/p&gt;
&lt;p&gt;나중에 인지 심리학 책을 보면서 알았다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;개발 실력을 올리려면 무조건 문제를 많이 풀어보기를 권한다&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;당장 풀어야할 문제가 생각이 안난다면&lt;/p&gt;
&lt;p&gt;남들이 공개한 문제를 풀어보거나&amp;nbsp;&lt;/p&gt;
&lt;p&gt;이미 있는 소프트웨어를 모방해 보기를 권한다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;모방하는 과정이 하나의 문제 덩어리&lt;/b&gt;이기 때문이다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;어쩄든 학원 생활은 전반적으로 좋았다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;초반에는 벅찼던 문제풀이도 시간이 갈수록 쉬워졌고&amp;nbsp;&lt;/p&gt;
&lt;p&gt;1,2등으로 푸는 경우도 종종 생겼다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;이건 실력이 좋아서라기 보다는&amp;nbsp;&lt;/p&gt;
&lt;p&gt;무료 학원의 특성이 컸다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;무료 학원은 들어오는 사람들은 큰 투자를 안 하는 편이다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;사람들은 투자를 적게 할수록, 가치를 적게 느낀다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;그래서 조금 하다가 어려우면은 포기하는 경우도 많다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;학원에는 나오지만 다른 진로를 찾는 사람도 꽤 있다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;컴퓨터 공학과 학생들의 경우 다 아는 것이라고 '롤'을 하고 있는 경우도 있었다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;20명 정도가 있다면 10명 정도가 실제로 수업을 들었다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;상황이 이렇다 보니 열정적인 선생님도&amp;nbsp;&lt;/p&gt;
&lt;p&gt;열정이 조금씩 식어갔다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;3개월이 넘어가자 8시간 진행하던 수업도&amp;nbsp;&lt;/p&gt;
&lt;p&gt;5시간 진행하고 자습을 하고는 했다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;자습 시간에는 다양한 개발 공부를 했다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;C++의 창시자가 쓴 책도 읽어보고&lt;/p&gt;
&lt;p&gt;네트워크 책도 읽어보고, 미적분도 공부해봤다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;실제 프로젝트 보다는 이론쪽을 많이 판 셈이다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;학원에서 배우게 되면 장단점이 있는데&amp;nbsp;&lt;/p&gt;
&lt;p&gt;장점은 바로 써먹을만한 기술을 속성으로 배울 수 있단 점이다.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;단점은 학원에서 알려준 지름길 외에&lt;/p&gt;
&lt;p&gt;다른 상황에 처하면&lt;/p&gt;
&lt;p&gt;대처를 잘 못한다는 것이다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;나는 그 사실을 몰랐다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;개발 레벨이 99까지 있다면&lt;/p&gt;
&lt;p&gt;나는 레벨이 2~3이었는데 나중에야 알았다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;학원이 끝날 때 즈음에&amp;nbsp;&lt;/p&gt;
&lt;p&gt;난 자신감이 상당했다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;학원에서 누가 질문을 하더라도&amp;nbsp;&lt;/p&gt;
&lt;p&gt;잘 대답을 할 수 있었다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;문제 풀이도 매우 빨리 하는 편이었기 때문이다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;게다가 주말까지 공부하는 사람은 많지 않았다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;당시에는 나도 모르게 거만 했던 것 같다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;하지만 나의 자신감이 산산조각 나는 데는 그리 오랜 시간이 걸리지 않았다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;산골짜기에서 우수했던 학생이&amp;nbsp;&lt;/p&gt;
&lt;p&gt;도시의 명문 학교로 전학온 느낌이랄까.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;찬란한 미래가 올 것이라 생각했지만&lt;/p&gt;
&lt;p&gt;그렇지 않았다.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;개발의 배우는 것과는 다른 차원의 어려움이 있었다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;나의 29살은 상당히 어두웠다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;아마도 '&lt;b&gt;그것&lt;/b&gt;'이 없었다면 암울했던 1년을 버티지 못했을 것이다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;다른 분야에서 넘어와 개발자가 된 사람은 결국 '&lt;b&gt;그것&lt;/b&gt;'을 가졌던 사람들이었다.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;나 또한 '&lt;b&gt;그것&lt;/b&gt;'이 있었다&lt;/p&gt;</description>
      <category>코딩 배우는 법을 배우기</category>
      <category>개발공부</category>
      <category>개발공부법</category>
      <category>문과개발</category>
      <category>문과개발자</category>
      <category>비전공개발</category>
      <category>비전공자개발자</category>
      <author>에드 신</author>
      <guid isPermaLink="true">https://software-creator.tistory.com/29</guid>
      <comments>https://software-creator.tistory.com/29#entry29comment</comments>
      <pubDate>Tue, 21 Jul 2020 09:40:25 +0900</pubDate>
    </item>
    <item>
      <title>내가 개발을 배워온 과정 - 1부 우연한 선택</title>
      <link>https://software-creator.tistory.com/28</link>
      <description>&lt;p&gt;내가 IT에 관심을 갖게 된 건 2012년이었다.&lt;/p&gt;
&lt;p&gt;직접 써 본 IT 회사들의 서비스들은 몇년은 앞서 있었다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;지금은 너무나도 당연해진 '아마존', '인스타그램', '에어비앤비'를 처음 접하고 큰 충격을 받았다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;마치 미래를 보는 느낌이었다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;난 IT 쪽에서 일하면 무언가 기회가 생기지 않을까 하는 막연한 생각이 들었다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;10여개월의 미국 생활을 마무리하고 한국으로 돌아왔다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;당시 난 1학기만 남은 상황이었고 뭐든 진로를 명확히 해야했다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;개발을 배워보는 게 어떨까 하는 생각을 했다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;고민을 좀 해보았다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;지금해도 괜찮을까 하는 의문이 많이 들었다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;난 27살의 겨울을 맞이하고 있었다. 남들은 이미 진로를 확정한 경우가 많았다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;나이는 너무 많지 않을까, 경쟁력은 있지 않을까.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;고민이 되었다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;난 미래학 관련 책도 뒤져보고, 컴퓨터 공학의 인기도 찾아보았다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;다행히 카이스트 전산과 입학 성적은 5년째 하락중이었다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;경쟁이 덜 하고, 미래에 잘 될 산업이라면 해볼만하단 생각을 했다.&lt;/p&gt;
&lt;p&gt;천재들은 이 산업에 없겠다는 생각을 했다.&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;사실 꼭 개발자가 되겠다는 생각은 아니었고, 프로그래밍 언어를 배워두면 무언가 유용할 거란 생각을 했다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;적어도 IT 쪽에서 일할때 다른 사람들이랑 이야기 하기 편할 거라는 생각이 있었다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;어떤 언어를 고를까 고민하다가&amp;nbsp;&lt;/p&gt;
&lt;p&gt;MIT에선 파이썬으로 대학교 수업을 한다는 얘기가 있어&amp;nbsp;&lt;/p&gt;
&lt;p&gt;파이썬을 공부하기 시작했다. 파이썬이 쉽고 배우기에 좋다는 이야기가 많았다.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;코세라에 파이썬 기초 강의가 있어서 듣고 따라해보았는데 이해가 안 되었다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;약간 좌절하다가 코드카데미 (codecademy )를 알게 되었다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;코드카데미는 간단히 문법을 설명하고, 그걸 따라하는 방식이었다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;따라한 뒤에는 꼭 퀴즈를 풀어야했다. 퀴즈를 풀다보니 제대로 이해가 되었는지 확인이 되었고, 작게나마 성취감을 느꼈다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;돌이켜 보면 파이썬으로 시작한 건 상당한 행운이었다. 자바와 C로 개발 공부를 시작한 상당수의 사람들이 금새 포기를 하기 때문이다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;나는 프로그래밍의 어려움보다 흥미를 느끼며 시작을 했다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;코드카데미를 끝내는데 대략 한달정도 걸렸다. 파이썬 기초문법( 변수, 조건문, 클래스)등을 익히는 데 꽤 오랜시간이 걸린 것이다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;파이썬을 마치고, 그 다음에 뭘할지를 몰랐다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;지금이야 파이썬이 대중적이고 개발 공부법도 많이 나와있지만 당시엔 그런 게 없었다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;파이썬을 깊게 파거나, 실용적인 프로젝트를 했다면 좋았겠지만&amp;nbsp;&lt;/p&gt;
&lt;p&gt;조금은 아쉬운 선택을 하게 된다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;바로 &amp;lsquo;&lt;span&gt;자바&lt;/span&gt;&amp;rsquo;를 공부하기 시작한 것이다. 지금이었다면 파이썬으로 웹사이트를 만들어보거나 데이터 분석 프로젝트를 진행했을 것이다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;인터넷에 질문도 올려보고, 책을 뒤져보니 파이썬은 대중적인 언어가 아니라 배워봐야 쓸데 없다는 이야기를 들었다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;(&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;b&gt;교훈1 - 조언을 해주는 사람이 누구인지도 판단할 수 있어야 한다&lt;/b&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;)&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;조언에 따라 &amp;lsquo;&lt;span&gt;자바&lt;/span&gt;&amp;rsquo;를 공부하기로 맘먹고 서점에서&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;span&gt;자바&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;책을 읽어봤다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;어려웠다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;읽어도 하나도 이해가 되지 않았다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;읽다가 막히면 다시 앞으로 돌아가서 첨부터 읽었다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;10쪽 읽다가 처음으로 돌아가고, 50쪽 읽다가 처음으로 돌아가고의 반복이었다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;프로그래밍 책은 일본인이 번역한 영어 단어를 가져다 쓴 경우가 많다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;이 때문에 차라리 영어로 배우는 게 쉬울 수도 있는데 그걸 몰랐었다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;책에는 코딩은 쳐봐야 실력이 좋아진다고 적혀 있었다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;책에 있는&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;span&gt;자바&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;코드를 따라 쳐보았다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;책에서 시키는 대로 실행을 해보았는데 안 되었다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;책에선 메모장으로 코드를 적었다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;난 책을 따라 메모장으로 코딩을 했다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;저자가 &quot;메모장으로 개발해야 실력이는다는 믿음&quot;을 가진 사람이었기에 일어난 일이었다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;세미콜론이 빠진 경우가 많았기에, 여지없이 에러가 났다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;지금 생각해보면 초반에 큰 고통을 겪은 건 잘못된 책 때문이었다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;근데 그 고통 덕에 좀 더 흥미를 가진 것도 사실이다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;난 2개월 동안 공부해서 겨우겨우&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;span&gt;자바&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;책을 완독했다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;타이핑도 열심히 했지만 이해가 잘 안되었다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;혼자 공부하는 건 한계가 있다 생각했고&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;강의와 스터디를 알아보기 시작했다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;개발 커뮤니티는 몰랐기에 학교 커뮤니티를 뒤적거렸다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;마침 개강 직전이라 안드로이드 스터디를 모집하는 사람이 있었다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;반가운 마음에 메일을 보냈고, 스터디원들을 만나게 되었다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;스터디 장은 앱만들기 동아리를 운영하는 기계과 학생이었다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;동아리원 중 하나는 앱을 출시한 경험도 있었다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;난 스터디에 참여한 첫날 엄청나게 충격을 받게 된다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;이클립스라는 프로그램이 있으며, 개발자들은 이 프로그램을 써서 개발을 한다고 했다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;첫 모임이 끝나고 집에서 이클립스를 써보았다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;놀라웠다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;세상에 세미콜론을 뺴먹으면 알려주는 프로그램이 있다니&amp;hellip;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;영어 몇글자만 적으면 함수를 자동으로 만들어주는 프로그램이 있다니&amp;hellip;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;남극에서 평생 썰매를 끌던 에스키모가 처음 비행기를 타봤을때 이런 느낌이었까?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;자바&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;책에 있던 코드를 이클립스에 쳐보니 매우 쉽게 되었다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;난 감탄을 하며 흥미를 느꼈다. 책 저자가 살짝 원망스러워질 정도였다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;어렵기만 했던 책이 조금씩 이해가 되는 기분이었다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;스터디에 참여하고 나서, 나와 다른 스터디원의 차이를 알게 되었다.&lt;/p&gt;
&lt;p&gt;나는 미리 예습을 했고, 메모장에서 삽질을 많이 한 덕에 조금만 알아도 성취감을 느꼈다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;약간의 파이썬 경험과 메모장이 도움이 된 셈이다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;반면 다른 스터디원은&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;span&gt;자바&lt;/span&gt;부터 배우기 시작했고, 이클립스로 시작하다보니&amp;nbsp;&lt;/p&gt;
&lt;p&gt;많이 어려워했다. 안드로이드는 꿈도 못 꾸는 상황이었다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;2달정도 지나자 스터디를 제대로 나오는 사람은 나와 스터디장 밖에 없었다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;나머지는 다른 우선 순위가 있으면 그걸 우선시 했다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;사실 내가 자바를 재밌어한건 원래 메모장으로 프로그래밍하다가&amp;nbsp;&lt;/p&gt;
&lt;p&gt;이클립스를 쓰니 개발이 갑자기 쉬워져서였다. 나는 근데 그걸 재능이 있다고 착각을 했다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;내 주변의 많은 이들이 같은 이유로 직업 선택을 했다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;1학년때 우연히 들은 '회계원리' 성적이 좋아서 회계 시험을 준비하고 회계사가 된다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;그 반 학생들이 게을렀을수도 있고, 교수님이 학점을 뿌리는 스타일이었을수도 있다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;초등학교때 우연히 본 과학 만화에 흥미를 느껴&amp;nbsp;&lt;/p&gt;
&lt;p&gt;과학책을 많이 보다보니, 과학책이 쉽게 느껴진다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;그래서 이과를 가게 되고 물리학도, 생물학자가 된다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;이런 우연함이 쌓여 재능 혹은 능력이 된다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;이는 7년 정도 지나고, 나보다 탁월한 사람을 많이 만나서 깨달은 것이다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;생각보다 실력이 있는데 평범하다고 착각하거나, 평범한데 탁월하다고 착각하는 사람이 많다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;어쨌든 중간 고사가 끝나자 스터디는 흐지부지가 되었다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;난 조금은 자신이 생긴 상태라 안드로이드를 혼자서 공부하기 시작했다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;그러며 예상치 못한 문제점들을 만나게 되는데...&lt;/p&gt;</description>
      <category>코딩 배우는 법을 배우기</category>
      <category>개발공부</category>
      <category>자바공부</category>
      <category>코딩공부</category>
      <author>에드 신</author>
      <guid isPermaLink="true">https://software-creator.tistory.com/28</guid>
      <comments>https://software-creator.tistory.com/28#entry28comment</comments>
      <pubDate>Sun, 19 Jul 2020 16:41:26 +0900</pubDate>
    </item>
    <item>
      <title>Flutter - 5분안에 AndroidX 마이그레이션 하기</title>
      <link>https://software-creator.tistory.com/27</link>
      <description>&lt;h1&gt;5분 안에 Flutter AndroidX Migration 하기&lt;/h1&gt;
&lt;p&gt;플러터를 개발하다보면 안드로이드 X 문제를 종종 만나게 됩니다. &lt;/p&gt;
&lt;p&gt;사실 제일 쉬운 방법은 AndroidX 적용하기 전 라이브러리를 사용하는 거죠.&lt;/p&gt;
&lt;p&gt;플러터 공식 문서에도 Avoiding AndroidX 라는 섹션에 이전 버전들이 나와 있습니다.&lt;br&gt;(&lt;a href=&quot;https://flutter.dev/docs/development/packages-and-plugins/androidx-compatibility&quot;&gt;https://flutter.dev/docs/development/packages-and-plugins/androidx-compatibility&lt;/a&gt;)&lt;/p&gt;
&lt;p&gt;하지만 이건 임시 방편에 불과하죠. &lt;/p&gt;
&lt;p&gt;나중에 더 큰 문제를 일으킵니다. &lt;/p&gt;
&lt;p&gt;오래된 라이브러리를 쓰다보니 새로운 기능이나, 지원이 끝나는 문제도 생기구요.&lt;/p&gt;
&lt;p&gt;이번 글에서는 안드로이드 스튜디오로 손쉽게 마이그레이션(Migration) 하는 방법을 다룹니다. &lt;/p&gt;
&lt;p&gt;일단 새 플러터 프로젝트를 만들어주세요.&lt;/p&gt;
&lt;h4&gt;1. 프로젝트의 android 부분으로 가서 새롭게 Android Studio를 연다&lt;/h4&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/13621579/63660264-9d7ffd00-c7f0-11e9-86d7-4513ff12126a.png&quot; alt=&quot;androidx_01&quot;&gt;&lt;/p&gt;
&lt;p&gt;Flutter 프로젝트에서 android 쪽으로 가서 &lt;code&gt;Open for editing Android Studio&lt;/code&gt; 를 눌러주세요.&lt;/p&gt;
&lt;p&gt;Migration 기능을 제대로 쓰려면 플러터 프로젝트 중 android 부분만 따로 열 필요가 있습니다.&lt;/p&gt;
&lt;h4&gt;2. 안드로이드 스튜디오 써서 Migrate 하기&lt;/h4&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/13621579/63660266-a07aed80-c7f0-11e9-9ba9-6f0798fd8c0b.png&quot; alt=&quot;androidx_02&quot;&gt;&lt;/p&gt;
&lt;p&gt;상단의 Refactor 탭에 있는 &lt;code&gt;Migrate to Android&lt;/code&gt; 를 누르고 기다리면 됩니다. &lt;/p&gt;
&lt;p&gt;Migrate to Android가 활성화가 안 된 경우가 있는데요.&lt;br&gt;1분 ~ 5분 정도 지나면 활성화 됩니다(흰색으로 바뀜.).&lt;/p&gt;
&lt;p&gt;마이그레이션 작업은 보통 1분 ~ 5분 정도가 걸립니다.&lt;/p&gt;
&lt;p&gt;파일을 백업할거냐고 물어보기도 하는데요. &lt;/p&gt;
&lt;p&gt;백업해도 되고 안해도 됩니다. &lt;/p&gt;
&lt;p&gt;프로젝트 규모가 클수록 혹시 모르니 백업하는 게 좋습니다.&lt;/p&gt;
&lt;p&gt;방금 만든 프로젝트면 백업 안해도 상관 없습니다.&lt;/p&gt;
&lt;h4&gt;3. AndroidX 로 그래들이 바뀌었는지 확인&lt;/h4&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/13621579/63660270-a375de00-c7f0-11e9-97d0-e548cfea31fe.png&quot; alt=&quot;androidx_03&quot;&gt;&lt;/p&gt;
&lt;p&gt;작업이 끝났으면 &lt;code&gt;build.gradle&lt;/code&gt; 을 확인해 보세요.&lt;/p&gt;
&lt;p&gt;라이브러리들이 androidx 로 바뀌어 있으면 성공입니다.&lt;/p&gt;
&lt;p&gt;참고글 - &lt;a href=&quot;https://flutter.dev/docs/development/packages-and-plugins/androidx-compatibility&quot;&gt;https://flutter.dev/docs/development/packages-and-plugins/androidx-compatibility&lt;/a&gt;&lt;/p&gt;</description>
      <category>플러터(Flutter)</category>
      <author>에드 신</author>
      <guid isPermaLink="true">https://software-creator.tistory.com/27</guid>
      <comments>https://software-creator.tistory.com/27#entry27comment</comments>
      <pubDate>Mon, 26 Aug 2019 11:18:36 +0900</pubDate>
    </item>
    <item>
      <title>Flutter - Provider 패턴에 대해서 알아보자</title>
      <link>https://software-creator.tistory.com/26</link>
      <description>&lt;!doctype html&gt;
&lt;html&gt;
&lt;head&gt;
&lt;meta charset='UTF-8'&gt;&lt;meta name='viewport' content='width=device-width initial-scale=1'&gt;
&lt;meta name=&quot;description&quot; content=&quot;Provider 는 올해 Google IO (2019 Google IO) 에서 추천되면서 큰 주목을 받았습니다.원래 커뮤니티에서 만든 플러그인인데 구글에서 공식으로 추천을 한 거죠. 작년 구글 IO 떄 구글은 Bloc 패턴을 사용하길 권했습니다. Bloc 패턴은 UI와 데이터 처리 로직(비즈니스 로직)을 분리하는 방식입니다. 플러터는 UI도 코드다 보니, 잘 관리 안 해주면 코드가 한 클래스에 너무 많이 몰리는 문제가 있었습니다. 이를 해결하기 위해 나온 게 Bloc 패턴입니다.그런데 BLoc 패턴은 사용하기 너무 어렵다는 사람이 많았습니다. 단순한 로직을 짜려고 해도 4개 정도는 클래스를 만들어야 했죠.반면 Provider 패턴을 쓰면 데이터 공유나 로직의 분리를 좀 더 간단히 할 수 있습니다&quot;&gt;
&lt;title&gt;flutter_provider&lt;/title&gt;&lt;link href='https://fonts.loli.net/css?family=Open+Sans:400italic,700italic,700,400&amp;subset=latin,latin-ext' rel='stylesheet' type='text/css' /&gt;&lt;style type='text/css'&gt;html {overflow-x: initial !important;}:root { --bg-color: #ffffff; --text-color: #333333; --select-text-bg-color: #B5D6FC; --select-text-font-color: auto; --monospace: &quot;Lucida Console&quot;,Consolas,&quot;Courier&quot;,monospace; }
html { font-size: 14px; background-color: var(--bg-color); color: var(--text-color); font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; -webkit-font-smoothing: antialiased; }
body { margin: 0px; padding: 0px; height: auto; bottom: 0px; top: 0px; left: 0px; right: 0px; font-size: 1rem; line-height: 1.42857143; overflow-x: hidden; background-image: inherit; background-size: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: inherit; tab-size: 4; background-position: inherit inherit; background-repeat: inherit inherit; }
iframe { margin: auto; }
a.url { word-break: break-all; }
a:active, a:hover { outline: 0px; }
.in-text-selection, ::selection { text-shadow: none; background: var(--select-text-bg-color); color: var(--select-text-font-color); }
#write { margin: 0px auto; height: auto; width: inherit; word-break: normal; word-wrap: break-word; position: relative; white-space: normal; overflow-x: visible; padding-top: 40px; }
#write.first-line-indent p { text-indent: 2em; }
#write.first-line-indent li p, #write.first-line-indent p * { text-indent: 0px; }
#write.first-line-indent li { margin-left: 2em; }
.for-image #write { padding-left: 8px; padding-right: 8px; }
body.typora-export { padding-left: 30px; padding-right: 30px; }
.typora-export .footnote-line, .typora-export li, .typora-export p { white-space: pre-wrap; }
@media screen and (max-width: 500px) {
  body.typora-export { padding-left: 0px; padding-right: 0px; }
  #write { padding-left: 20px; padding-right: 20px; }
  .CodeMirror-sizer { margin-left: 0px !important; }
  .CodeMirror-gutters { display: none !important; }
}
#write li &gt; figure:last-child { margin-bottom: 0.5rem; }
#write ol, #write ul { position: relative; }
img { max-width: 100%; vertical-align: middle; }
button, input, select, textarea { color: inherit; font-family: inherit; font-size: inherit; font-style: inherit; font-variant-caps: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; }
input[type=&quot;checkbox&quot;], input[type=&quot;radio&quot;] { line-height: normal; padding: 0px; }
*, ::after, ::before { box-sizing: border-box; }
#write h1, #write h2, #write h3, #write h4, #write h5, #write h6, #write p, #write pre { width: inherit; }
#write h1, #write h2, #write h3, #write h4, #write h5, #write h6, #write p { position: relative; }
p { line-height: inherit; }
h1, h2, h3, h4, h5, h6 { break-after: avoid-page; break-inside: avoid; orphans: 2; }
p { orphans: 4; }
h1 { font-size: 2rem; }
h2 { font-size: 1.8rem; }
h3 { font-size: 1.6rem; }
h4 { font-size: 1.4rem; }
h5 { font-size: 1.2rem; }
h6 { font-size: 1rem; }
.md-math-block, .md-rawblock, h1, h2, h3, h4, h5, h6, p { margin-top: 1rem; margin-bottom: 1rem; }
.hidden { display: none; }
.md-blockmeta { color: rgb(204, 204, 204); font-weight: 700; font-style: italic; }
a { cursor: pointer; }
sup.md-footnote { padding: 2px 4px; background-color: rgba(238, 238, 238, 0.701961); color: rgb(85, 85, 85); border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; cursor: pointer; }
sup.md-footnote a, sup.md-footnote a:hover { color: inherit; text-transform: inherit; text-decoration: inherit; }
#write input[type=&quot;checkbox&quot;] { cursor: pointer; width: inherit; height: inherit; }
figure { overflow-x: auto; margin: 1.2em 0px; max-width: calc(100% + 16px); padding: 0px; }
figure &gt; table { margin: 0px !important; }
tr { break-inside: avoid; break-after: auto; }
thead { display: table-header-group; }
table { border-collapse: collapse; border-spacing: 0px; width: 100%; overflow: auto; break-inside: auto; text-align: left; }
table.md-table td { min-width: 32px; }
.CodeMirror-gutters { border-right-width: 0px; background-color: inherit; }
.CodeMirror-linenumber { }
.CodeMirror { text-align: left; }
.CodeMirror-placeholder { opacity: 0.3; }
.CodeMirror pre { padding: 0px 4px; }
.CodeMirror-lines { padding: 0px; }
div.hr:focus { cursor: none; }
#write pre { white-space: pre-wrap; }
#write.fences-no-line-wrapping pre { white-space: pre; }
#write pre.ty-contain-cm { white-space: normal; }
.CodeMirror-gutters { margin-right: 4px; }
.md-fences { font-size: 0.9rem; display: block; break-inside: avoid; text-align: left; overflow: visible; white-space: pre; background-image: inherit; background-size: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: inherit; position: relative !important; background-position: inherit inherit; background-repeat: inherit inherit; }
.md-diagram-panel { width: 100%; margin-top: 10px; text-align: center; padding-top: 0px; padding-bottom: 8px; overflow-x: auto; }
#write .md-fences.mock-cm { white-space: pre-wrap; }
.md-fences.md-fences-with-lineno { padding-left: 0px; }
#write.fences-no-line-wrapping .md-fences.mock-cm { white-space: pre; overflow-x: auto; }
.md-fences.mock-cm.md-fences-with-lineno { padding-left: 8px; }
.CodeMirror-line, twitterwidget { break-inside: avoid; }
.footnotes { opacity: 0.8; font-size: 0.9rem; margin-top: 1em; margin-bottom: 1em; }
.footnotes + .footnotes { margin-top: 0px; }
.md-reset { margin: 0px; padding: 0px; border: 0px; outline: 0px; vertical-align: top; text-decoration: none; text-shadow: none; float: none; position: static; width: auto; height: auto; white-space: nowrap; cursor: inherit; line-height: normal; font-weight: 400; text-align: left; box-sizing: content-box; direction: ltr; background-position: 0px 0px; background-repeat: initial initial; }
li div { padding-top: 0px; }
blockquote { margin: 1rem 0px; }
li .mathjax-block, li p { margin: 0.5rem 0px; }
li { margin: 0px; position: relative; }
blockquote &gt; :last-child { margin-bottom: 0px; }
blockquote &gt; :first-child, li &gt; :first-child { margin-top: 0px; }
.footnotes-area { color: rgb(136, 136, 136); margin-top: 0.714rem; padding-bottom: 0.143rem; white-space: normal; }
#write .footnote-line { white-space: pre-wrap; }
@media print {
  body, html { border: 1px solid transparent; height: 99%; break-after: avoid-page; break-before: avoid-page; }
  #write { margin-top: 0px; padding-top: 0px; border-color: transparent !important; }
  .typora-export * { -webkit-print-color-adjust: exact; }
  html.blink-to-pdf { font-size: 13px; }
  .typora-export #write { padding-left: 32px; padding-right: 32px; padding-bottom: 0px; break-after: avoid-page; }
  .typora-export #write::after { height: 0px; }
}
.footnote-line { margin-top: 0.714em; font-size: 0.7em; }
a img, img a { cursor: pointer; }
pre.md-meta-block { font-size: 0.8rem; min-height: 0.8rem; white-space: pre-wrap; background-color: rgb(204, 204, 204); display: block; overflow-x: hidden; background-position: initial initial; background-repeat: initial initial; }
p &gt; .md-image:only-child:not(.md-img-error) img, p &gt; img:only-child { display: block; margin: auto; }
p &gt; .md-image:only-child { display: inline-block; width: 100%; }
#write .MathJax_Display { margin: 0.8em 0px 0px; }
.md-math-block { width: 100%; }
.md-math-block:not(:empty)::after { display: none; }
[contenteditable=&quot;true&quot;]:active, [contenteditable=&quot;true&quot;]:focus { outline: 0px; box-shadow: none; }
.md-task-list-item { position: relative; list-style-type: none; }
.task-list-item.md-task-list-item { padding-left: 0px; }
.md-task-list-item &gt; input { position: absolute; top: 0px; left: 0px; margin-left: -1.2em; margin-top: calc(1em - 10px); border: none; }
.math { font-size: 1rem; }
.md-toc { min-height: 3.58rem; position: relative; font-size: 0.9rem; border-top-left-radius: 10px; border-top-right-radius: 10px; border-bottom-right-radius: 10px; border-bottom-left-radius: 10px; }
.md-toc-content { position: relative; margin-left: 0px; }
.md-toc-content::after, .md-toc::after { display: none; }
.md-toc-item { display: block; color: rgb(65, 131, 196); }
.md-toc-item a { text-decoration: none; }
.md-toc-inner:hover { text-decoration: underline; }
.md-toc-inner { display: inline-block; cursor: pointer; }
.md-toc-h1 .md-toc-inner { margin-left: 0px; font-weight: 700; }
.md-toc-h2 .md-toc-inner { margin-left: 2em; }
.md-toc-h3 .md-toc-inner { margin-left: 4em; }
.md-toc-h4 .md-toc-inner { margin-left: 6em; }
.md-toc-h5 .md-toc-inner { margin-left: 8em; }
.md-toc-h6 .md-toc-inner { margin-left: 10em; }
@media screen and (max-width: 48em) {
  .md-toc-h3 .md-toc-inner { margin-left: 3.5em; }
  .md-toc-h4 .md-toc-inner { margin-left: 5em; }
  .md-toc-h5 .md-toc-inner { margin-left: 6.5em; }
  .md-toc-h6 .md-toc-inner { margin-left: 8em; }
}
a.md-toc-inner { font-size: inherit; font-style: inherit; font-weight: inherit; line-height: inherit; }
.footnote-line a:not(.reversefootnote) { color: inherit; }
.md-attr { display: none; }
.md-fn-count::after { content: &quot;.&quot;; }
code, pre, samp, tt { font-family: var(--monospace); }
kbd { margin: 0px 0.1em; padding: 0.1em 0.6em; font-size: 0.8em; color: rgb(36, 39, 41); background-color: rgb(255, 255, 255); border: 1px solid rgb(173, 179, 185); border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; box-shadow: rgba(12, 13, 14, 0.2) 0px 1px 0px, rgb(255, 255, 255) 0px 0px 0px 2px inset; white-space: nowrap; vertical-align: middle; background-position: initial initial; background-repeat: initial initial; }
.md-comment { color: rgb(162, 127, 3); opacity: 0.8; font-family: var(--monospace); }
code { text-align: left; }
a.md-print-anchor { white-space: pre !important; border: none !important; display: inline-block !important; position: absolute !important; width: 1px !important; right: 0px !important; outline: 0px !important; text-shadow: initial !important; background-position: 0px 0px !important; background-repeat: initial initial !important; }
.md-inline-math .MathJax_SVG .noError { display: none !important; }
.html-for-mac .inline-math-svg .MathJax_SVG { vertical-align: 0.2px; }
.md-math-block .MathJax_SVG_Display { text-align: center; margin: 0px; position: relative; text-indent: 0px; max-width: none; max-height: none; min-height: 0px; min-width: 100%; width: auto; overflow-y: hidden; display: block !important; }
.MathJax_SVG_Display, .md-inline-math .MathJax_SVG_Display { width: auto; margin: inherit; display: inline-block !important; }
.MathJax_SVG .MJX-monospace { font-family: var(--monospace); }
.MathJax_SVG .MJX-sans-serif { font-family: sans-serif; }
.MathJax_SVG { display: inline; font-style: normal; font-weight: 400; line-height: normal; zoom: 90%; text-indent: 0px; text-align: left; text-transform: none; letter-spacing: normal; word-spacing: normal; word-wrap: normal; white-space: nowrap; float: none; direction: ltr; max-width: none; max-height: none; min-width: 0px; min-height: 0px; border: 0px; padding: 0px; margin: 0px; }
.MathJax_SVG * { transition: none; }
.MathJax_SVG_Display svg { vertical-align: middle !important; margin-bottom: 0px !important; margin-top: 0px !important; }
.os-windows.monocolor-emoji .md-emoji { font-family: &quot;Segoe UI Symbol&quot;, sans-serif; }
.md-diagram-panel &gt; svg { max-width: 100%; }
[lang=&quot;mermaid&quot;] svg, [lang=&quot;flow&quot;] svg { max-width: 100%; height: auto; }
[lang=&quot;mermaid&quot;] .node text { font-size: 1rem; }
table tr th { border-bottom-width: 0px; }
video { max-width: 100%; display: block; margin: 0px auto; }
iframe { max-width: 100%; width: 100%; border: none; }
.highlight td, .highlight tr { border: 0px; }


.CodeMirror { height: auto; }
.CodeMirror.cm-s-inner { background-image: inherit; background-size: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: inherit; background-position: inherit inherit; background-repeat: inherit inherit; }
.CodeMirror-scroll { overflow-y: hidden; overflow-x: auto; z-index: 3; }
.CodeMirror-gutter-filler, .CodeMirror-scrollbar-filler { background-color: rgb(255, 255, 255); }
.CodeMirror-gutters { border-right-width: 1px; border-right-style: solid; border-right-color: rgb(221, 221, 221); background-image: inherit; background-size: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: inherit; white-space: nowrap; background-position: inherit inherit; background-repeat: inherit inherit; }
.CodeMirror-linenumber { padding: 0px 3px 0px 5px; text-align: right; color: rgb(153, 153, 153); }
.cm-s-inner .cm-keyword { color: rgb(119, 0, 136); }
.cm-s-inner .cm-atom, .cm-s-inner.cm-atom { color: rgb(34, 17, 153); }
.cm-s-inner .cm-number { color: rgb(17, 102, 68); }
.cm-s-inner .cm-def { color: rgb(0, 0, 255); }
.cm-s-inner .cm-variable { color: rgb(0, 0, 0); }
.cm-s-inner .cm-variable-2 { color: rgb(0, 85, 170); }
.cm-s-inner .cm-variable-3 { color: rgb(0, 136, 85); }
.cm-s-inner .cm-string { color: rgb(170, 17, 17); }
.cm-s-inner .cm-property { color: rgb(0, 0, 0); }
.cm-s-inner .cm-operator { color: rgb(152, 26, 26); }
.cm-s-inner .cm-comment, .cm-s-inner.cm-comment { color: rgb(170, 85, 0); }
.cm-s-inner .cm-string-2 { color: rgb(255, 85, 0); }
.cm-s-inner .cm-meta { color: rgb(85, 85, 85); }
.cm-s-inner .cm-qualifier { color: rgb(85, 85, 85); }
.cm-s-inner .cm-builtin { color: rgb(51, 0, 170); }
.cm-s-inner .cm-bracket { color: rgb(153, 153, 119); }
.cm-s-inner .cm-tag { color: rgb(17, 119, 0); }
.cm-s-inner .cm-attribute { color: rgb(0, 0, 204); }
.cm-s-inner .cm-header, .cm-s-inner.cm-header { color: rgb(0, 0, 255); }
.cm-s-inner .cm-quote, .cm-s-inner.cm-quote { color: rgb(0, 153, 0); }
.cm-s-inner .cm-hr, .cm-s-inner.cm-hr { color: rgb(153, 153, 153); }
.cm-s-inner .cm-link, .cm-s-inner.cm-link { color: rgb(0, 0, 204); }
.cm-negative { color: rgb(221, 68, 68); }
.cm-positive { color: rgb(34, 153, 34); }
.cm-header, .cm-strong { font-weight: 700; }
.cm-del { text-decoration: line-through; }
.cm-em { font-style: italic; }
.cm-link { text-decoration: underline; }
.cm-error { color: red; }
.cm-invalidchar { color: red; }
.cm-constant { color: rgb(38, 139, 210); }
.cm-defined { color: rgb(181, 137, 0); }
div.CodeMirror span.CodeMirror-matchingbracket { color: rgb(0, 255, 0); }
div.CodeMirror span.CodeMirror-nonmatchingbracket { color: rgb(255, 34, 34); }
.cm-s-inner .CodeMirror-activeline-background { background-image: inherit; background-size: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: inherit; background-position: inherit inherit; background-repeat: inherit inherit; }
.CodeMirror { position: relative; overflow: hidden; }
.CodeMirror-scroll { height: 100%; outline: 0px; position: relative; box-sizing: content-box; background-image: inherit; background-size: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: inherit; background-position: inherit inherit; background-repeat: inherit inherit; }
.CodeMirror-sizer { position: relative; }
.CodeMirror-gutter-filler, .CodeMirror-hscrollbar, .CodeMirror-scrollbar-filler, .CodeMirror-vscrollbar { position: absolute; z-index: 6; display: none; }
.CodeMirror-vscrollbar { right: 0px; top: 0px; overflow: hidden; }
.CodeMirror-hscrollbar { bottom: 0px; left: 0px; overflow: hidden; }
.CodeMirror-scrollbar-filler { right: 0px; bottom: 0px; }
.CodeMirror-gutter-filler { left: 0px; bottom: 0px; }
.CodeMirror-gutters { position: absolute; left: 0px; top: 0px; padding-bottom: 30px; z-index: 3; }
.CodeMirror-gutter { white-space: normal; height: 100%; box-sizing: content-box; padding-bottom: 30px; margin-bottom: -32px; display: inline-block; }
.CodeMirror-gutter-wrapper { position: absolute; z-index: 4; border: none !important; background-position: 0px 0px !important; background-repeat: initial initial !important; }
.CodeMirror-gutter-background { position: absolute; top: 0px; bottom: 0px; z-index: 4; }
.CodeMirror-gutter-elt { position: absolute; cursor: default; z-index: 4; }
.CodeMirror-lines { cursor: text; }
.CodeMirror pre { border-top-left-radius: 0px; border-top-right-radius: 0px; border-bottom-right-radius: 0px; border-bottom-left-radius: 0px; border-width: 0px; font-family: inherit; font-size: inherit; margin: 0px; white-space: pre; word-wrap: normal; color: inherit; z-index: 2; position: relative; overflow: visible; background-position: 0px 0px; background-repeat: initial initial; }
.CodeMirror-wrap pre { word-wrap: break-word; white-space: pre-wrap; word-break: normal; }
.CodeMirror-code pre { border-right-width: 30px; border-right-style: solid; border-right-color: transparent; width: fit-content; }
.CodeMirror-wrap .CodeMirror-code pre { border-right-style: none; width: auto; }
.CodeMirror-linebackground { position: absolute; left: 0px; right: 0px; top: 0px; bottom: 0px; z-index: 0; }
.CodeMirror-linewidget { position: relative; z-index: 2; overflow: auto; }
.CodeMirror-wrap .CodeMirror-scroll { overflow-x: hidden; }
.CodeMirror-measure { position: absolute; width: 100%; height: 0px; overflow: hidden; visibility: hidden; }
.CodeMirror-measure pre { position: static; }
.CodeMirror div.CodeMirror-cursor { position: absolute; visibility: hidden; border-right-style: none; width: 0px; }
.CodeMirror div.CodeMirror-cursor { visibility: hidden; }
.CodeMirror-focused div.CodeMirror-cursor { visibility: inherit; }
.cm-searching { background-color: rgba(255, 255, 0, 0.4); background-position: initial initial; background-repeat: initial initial; }
@media print {
  .CodeMirror div.CodeMirror-cursor { visibility: hidden; }
}


:root {
    --side-bar-bg-color: #fafafa;
    --control-text-color: #777;
}

@include-when-export url(https://fonts.loli.net/css?family=Open+Sans:400italic,700italic,700,400&amp;subset=latin,latin-ext);

html {
    font-size: 16px;
}

body {
    font-family: &quot;Open Sans&quot;,&quot;Clear Sans&quot;,&quot;Helvetica Neue&quot;,Helvetica,Arial,sans-serif;
    color: rgb(51, 51, 51);
    line-height: 1.6;
}

#write {
    max-width: 860px;
  	margin: 0 auto;
  	padding: 30px;
    padding-bottom: 100px;
}
#write &gt; ul:first-child,
#write &gt; ol:first-child{
    margin-top: 30px;
}

a {
    color: #4183C4;
}
h1,
h2,
h3,
h4,
h5,
h6 {
    position: relative;
    margin-top: 1rem;
    margin-bottom: 1rem;
    font-weight: bold;
    line-height: 1.4;
    cursor: text;
}
h1:hover a.anchor,
h2:hover a.anchor,
h3:hover a.anchor,
h4:hover a.anchor,
h5:hover a.anchor,
h6:hover a.anchor {
    text-decoration: none;
}
h1 tt,
h1 code {
    font-size: inherit;
}
h2 tt,
h2 code {
    font-size: inherit;
}
h3 tt,
h3 code {
    font-size: inherit;
}
h4 tt,
h4 code {
    font-size: inherit;
}
h5 tt,
h5 code {
    font-size: inherit;
}
h6 tt,
h6 code {
    font-size: inherit;
}
h1 {
    padding-bottom: .3em;
    font-size: 2.25em;
    line-height: 1.2;
    border-bottom: 1px solid #eee;
}
h2 {
   padding-bottom: .3em;
    font-size: 1.75em;
    line-height: 1.225;
    border-bottom: 1px solid #eee;
}
h3 {
    font-size: 1.5em;
    line-height: 1.43;
}
h4 {
    font-size: 1.25em;
}
h5 {
    font-size: 1em;
}
h6 {
   font-size: 1em;
    color: #777;
}
p,
blockquote,
ul,
ol,
dl,
table{
    margin: 0.8em 0;
}
li&gt;ol,
li&gt;ul {
    margin: 0 0;
}
hr {
    height: 2px;
    padding: 0;
    margin: 16px 0;
    background-color: #e7e7e7;
    border: 0 none;
    overflow: hidden;
    box-sizing: content-box;
}

li p.first {
    display: inline-block;
}
ul,
ol {
    padding-left: 30px;
}
ul:first-child,
ol:first-child {
    margin-top: 0;
}
ul:last-child,
ol:last-child {
    margin-bottom: 0;
}
blockquote {
    border-left: 4px solid #dfe2e5;
    padding: 0 15px;
    color: #777777;
}
blockquote blockquote {
    padding-right: 0;
}
table {
    padding: 0;
    word-break: initial;
}
table tr {
    border-top: 1px solid #dfe2e5;
    margin: 0;
    padding: 0;
}
table tr:nth-child(2n),
thead {
    background-color: #f8f8f8;
}
table tr th {
    font-weight: bold;
    border: 1px solid #dfe2e5;
    border-bottom: 0;
    text-align: left;
    margin: 0;
    padding: 6px 13px;
}
table tr td {
    border: 1px solid #dfe2e5;
    text-align: left;
    margin: 0;
    padding: 6px 13px;
}
table tr th:first-child,
table tr td:first-child {
    margin-top: 0;
}
table tr th:last-child,
table tr td:last-child {
    margin-bottom: 0;
}

.CodeMirror-lines {
    padding-left: 4px;
}

.code-tooltip {
    box-shadow: 0 1px 1px 0 rgba(0,28,36,.3);
    border-top: 1px solid #eef2f2;
}

.md-fences,
code,
tt {
    border: 1px solid #e7eaed;
    background-color: #f8f8f8;
    border-radius: 3px;
    padding: 0;
    padding: 2px 4px 0px 4px;
    font-size: 0.9em;
}

code {
    background-color: #f3f4f4;
    padding: 0 2px 0 2px;
}

.md-fences {
    margin-bottom: 15px;
    margin-top: 15px;
    padding-top: 8px;
    padding-bottom: 6px;
}


.md-task-list-item &gt; input {
  margin-left: -1.3em;
}

@media print {
    html {
        font-size: 13px;
    }
    table,
    pre {
        page-break-inside: avoid;
    }
    pre {
        word-wrap: break-word;
    }
}

.md-fences {
	background-color: #f8f8f8;
}
#write pre.md-meta-block {
	padding: 1rem;
    font-size: 85%;
    line-height: 1.45;
    background-color: #f7f7f7;
    border: 0;
    border-radius: 3px;
    color: #777777;
    margin-top: 0 !important;
}

.mathjax-block&gt;.code-tooltip {
	bottom: .375rem;
}

.md-mathjax-midline {
    background: #fafafa;
}

#write&gt;h3.md-focus:before{
	left: -1.5625rem;
	top: .375rem;
}
#write&gt;h4.md-focus:before{
	left: -1.5625rem;
	top: .285714286rem;
}
#write&gt;h5.md-focus:before{
	left: -1.5625rem;
	top: .285714286rem;
}
#write&gt;h6.md-focus:before{
	left: -1.5625rem;
	top: .285714286rem;
}
.md-image&gt;.md-meta {
    /*border: 1px solid #ddd;*/
    border-radius: 3px;
    padding: 2px 0px 0px 4px;
    font-size: 0.9em;
    color: inherit;
}

.md-tag {
    color: #a7a7a7;
    opacity: 1;
}

.md-toc {
    margin-top:20px;
    padding-bottom:20px;
}

.sidebar-tabs {
    border-bottom: none;
}

#typora-quick-open {
    border: 1px solid #ddd;
    background-color: #f8f8f8;
}

#typora-quick-open-item {
    background-color: #FAFAFA;
    border-color: #FEFEFE #e5e5e5 #e5e5e5 #eee;
    border-style: solid;
    border-width: 1px;
}

/** focus mode */
.on-focus-mode blockquote {
    border-left-color: rgba(85, 85, 85, 0.12);
}

header, .context-menu, .megamenu-content, footer{
    font-family: &quot;Segoe UI&quot;, &quot;Arial&quot;, sans-serif;
}

.file-node-content:hover .file-node-icon,
.file-node-content:hover .file-node-open-state{
    visibility: visible;
}

.mac-seamless-mode #typora-sidebar {
    background-color: #fafafa;
    background-color: var(--side-bar-bg-color);
}

.md-lang {
    color: #b4654d;
}

.html-for-mac .context-menu {
    --item-hover-bg-color: #E6F0FE;
}

#md-notification .btn {
    border: 0;
}

.dropdown-menu .divider {
    border-color: #e5e5e5;
}

 .typora-export li, .typora-export p, .typora-export,  .footnote-line {white-space: normal;}
&lt;/style&gt;
&lt;/head&gt;
&lt;body class='typora-export' &gt;
&lt;div  id='write'  class = 'is-mac'&gt;&lt;h1&gt;&lt;a name=&quot;flutter-provider-%ED%8C%A8%ED%84%B4%EC%9D%B4%EB%9E%80?&quot; class=&quot;md-header-anchor&quot;&gt;&lt;/a&gt;&lt;span&gt;Flutter Provider 패턴이란?&lt;/span&gt;&lt;/h1&gt;&lt;ul&gt;&lt;li&gt;&lt;span&gt;Provider란? 데이터 생산과 소비&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span&gt;Provider 써보기&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span&gt;ChangeNotifierProvider로 변하는 데이터 다뤄보기&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span&gt;MultiProvider로 여러 프로바이더 관리하기&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h3&gt;&lt;a name=&quot;provider%EA%B0%80-%EC%A3%BC%EB%AA%A9%EB%B0%9B%EA%B2%8C%EB%90%9C-%EB%B0%B0%EA%B2%BD&quot; class=&quot;md-header-anchor&quot;&gt;&lt;/a&gt;&lt;span&gt;Provider가 주목받게된 배경&lt;/span&gt;&lt;/h3&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span&gt;Provider 는 올해 Google IO (2019 Google IO) 에서 추천되면서 큰 주목을 받았습니다. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;원래 커뮤니티에서 만든 플러그인인데 구글에서 공식으로 추천을 한 거죠. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span&gt;작년 구글 IO 떄 구글은 Bloc 패턴을 사용하길 권했습니다. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;Bloc 패턴은 UI와 데이터 처리 로직(비즈니스 로직)을 분리하는 방식입니다. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span&gt;플러터는 UI도 코드다 보니, 잘 관리 안 해주면 &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;코드가 한 클래스에 너무 많이 몰리는 문제가 있었습니다. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span&gt;이를 해결하기 위해 나온 게 Bloc 패턴입니다.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;그런데 BLoc 패턴은 사용하기 너무 어렵다는 사람이 많았습니다. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;단순한 로직을 짜려고 해도 4개 정도는 클래스를 만들어야 했죠. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span&gt;반면 Provider 패턴을 쓰면 데이터 공유나 로직의 분리를 좀 더 간단히 할 수 있습니다. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h3&gt;&lt;a name=&quot;%ED%94%84%EB%A1%9C%EB%B0%94%EC%9D%B4%EB%8D%94-%ED%8C%A8%ED%84%B4%EC%9D%84-%EC%93%B0%EB%8A%94-%EC%9D%B4%EC%9C%A0%EB%8A%94?&quot; class=&quot;md-header-anchor&quot;&gt;&lt;/a&gt;&lt;span&gt;프로바이더 패턴을 쓰는 이유는?&lt;/span&gt;&lt;/h3&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h5&gt;&lt;a name=&quot;a.-%EA%B4%80%EC%8B%AC%EC%82%AC%EC%9D%98-%EB%B6%84%EB%A6%AC-(separation-of-concerns)&quot; class=&quot;md-header-anchor&quot;&gt;&lt;/a&gt;&lt;span&gt;a. 관심사의 분리 (separation of concerns)&lt;/span&gt;&lt;/h5&gt;&lt;p&gt;&lt;span&gt;관심사의 분리는 디자인 원칙의 하나입니다. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;보통 관심사는 어떤 코드가 하는 일을 말합니다. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;UI를 담당하는 코드, 네트워크를 담당하는 코드, 데이터를 담당하는 코드 등 &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;코드를 역할에 따라 나눌 수 있죠. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span&gt;보통은 한 클래스가 여러 역할을 할 수록, 클래스가 커지고 관리가 어렵게 됩니다. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;따라서 클래스가 하나의 역할(관심)만 갖도록, 클래스를 나누죠.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span&gt;이게 바로 관심사의 분리입니다. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span&gt;Provider나 Bloc 패턴을 쓰는 이유는 관심사의 분리를 위해서에요.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h5&gt;&lt;a name=&quot;b.-%EB%8D%B0%EC%9D%B4%ED%84%B0%EC%9D%98-%EA%B3%B5%EC%9C%A0&quot; class=&quot;md-header-anchor&quot;&gt;&lt;/a&gt;&lt;span&gt;b. 데이터의 공유&lt;/span&gt;&lt;/h5&gt;&lt;p&gt;&lt;span&gt;하나의 데이터를 여러 페이지에서 공유하고 싶을 때가 있습니다. 유저 인증 정보의 경우 장바구니, 회원 등급 등 여러 페이지에서 쓰이죠. 근데 페이지마다 인증 정보를 새로 불러온다면 앱이 복잡해지고, 비용도 많이 들겠죠?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span&gt;이럴 때 데이터 공유가 필요합니다.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;Provider 패턴을 쓰면 데이터 공유를 쉽게 할 수 있습니다. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h5&gt;&lt;a name=&quot;c.-%EC%A2%80-%EB%8D%94-%EA%B0%84%EA%B2%B0%ED%95%9C-%EC%BD%94%EB%93%9C&quot; class=&quot;md-header-anchor&quot;&gt;&lt;/a&gt;&lt;span&gt;c. 좀 더 간결한 코드&lt;/span&gt;&lt;/h5&gt;&lt;p&gt;&lt;span&gt;Bloc 패턴의 경우 클래스들을 역할 별로 나누는 데는 좋지만&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;코드 자체가 복잡해지는 경향이 있습니다. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span&gt;Provider 패턴을 쓰면 좀 더 적은 코드로 &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;클래스들을 구분해서 쓸 수 있죠. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span&gt;구글에서도 중규모 프로젝트는 Provider 패턴을, 대규모 프로젝트는 Bloc 패턴을 추천하고 있습니다. &lt;/span&gt;&lt;/p&gt;&lt;hr /&gt;&lt;h3&gt;&lt;a name=&quot;1.-%ED%94%84%EB%A1%9C%EB%B0%94%EC%9D%B4%EB%8D%94%EC%9D%98-%EA%B5%AC%EC%A1%B0---%EB%8D%B0%EC%9D%B4%ED%84%B0-%EC%83%9D%EC%82%B0%EA%B3%BC-%EC%86%8C%EB%B9%84&quot; class=&quot;md-header-anchor&quot;&gt;&lt;/a&gt;&lt;span&gt;1. 프로바이더의 구조 - 데이터 생산과 소비&lt;/span&gt;&lt;/h3&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span&gt;Provider는 데이터를 &lt;/span&gt;&lt;strong&gt;&lt;span&gt;생산&lt;/span&gt;&lt;/strong&gt;&lt;span&gt;하고, &lt;/span&gt;&lt;strong&gt;&lt;span&gt;소비&lt;/span&gt;&lt;/strong&gt;&lt;span&gt;하는 2부분으로 되어 있습니다. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;어떤 데이터를 생산하느냐에 따라 Provider의 종류가 달라지죠. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;그냥 Provider가 되기도 하고  StreamProvider가 되기도 하고 합니다. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span&gt;Provider가 어떻게 데이터를 생산하고 소비하는 지 알아보고, 실제 앱에서 활용해 보도록 하겠습니다. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span&gt;일단 라이브러리부터 추가해주세요.&lt;/span&gt;&lt;/p&gt;&lt;h6&gt;&lt;a name=&quot;pubspec.yaml&quot; class=&quot;md-header-anchor&quot;&gt;&lt;/a&gt;&lt;span&gt;pubspec.yaml&lt;/span&gt;&lt;/h6&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;yaml&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;yaml&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-atom&quot;&gt;provider&lt;/span&gt;&lt;span class=&quot;cm-meta&quot;&gt;: &lt;/span&gt;^3.0.0+1&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 22px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 22px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h5&gt;&lt;a name=&quot;1.1-provider-%EB%8D%B0%EC%9D%B4%ED%84%B0-%EC%83%9D%EC%82%B0%ED%95%98%EA%B8%B0&quot; class=&quot;md-header-anchor&quot;&gt;&lt;/a&gt;&lt;span&gt;1.1 Provider 데이터 생산하기&lt;/span&gt;&lt;/h5&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;dart&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;dart&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;Provider&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-builtin&quot;&gt;int&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;gt;&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;value&lt;/span&gt;( &lt;span class=&quot;cm-comment&quot;&gt;// int 타입 사용&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;value&lt;/span&gt;: &lt;span class=&quot;cm-number&quot;&gt;5&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;child&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;Container&lt;/span&gt;(),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 88px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 88px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span&gt;데이터를 생산할 때는 꼭 데이터 타입을 적어줍니다. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;여기선 int 형태로 데이터를 만들었죠. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h5&gt;&lt;a name=&quot;1.2-provider-%EB%8D%B0%EC%9D%B4%ED%84%B0-%EC%86%8C%EB%B9%84%ED%95%98%EA%B8%B0&quot; class=&quot;md-header-anchor&quot;&gt;&lt;/a&gt;&lt;span&gt;1.2 Provider 데이터 소비하기&lt;/span&gt;&lt;/h5&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;dart&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;dart&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;data&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;Provider&lt;/span&gt;.&lt;span class=&quot;cm-keyword&quot;&gt;of&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-builtin&quot;&gt;int&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;gt;&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;context&lt;/span&gt;) &lt;span class=&quot;cm-comment&quot;&gt;// int 타입 사용. Provider를 만들 때 int 타입을 썼기에..&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 22px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 22px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span&gt;Provider에서 만든(제공하는) 데이터를 쓰려면&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;em&gt;&lt;span&gt;Provider.of&lt;/span&gt;&lt;T&gt;&lt;span&gt;(context)&lt;/span&gt;&lt;/em&gt;&lt;/strong&gt;&lt;span&gt; 나 &lt;/span&gt;&lt;strong&gt;&lt;em&gt;&lt;span&gt;Consumer()&lt;/span&gt;&lt;/em&gt;&lt;/strong&gt;&lt;span&gt; 위젯을 사용합니다. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span&gt;저는 &lt;/span&gt;&lt;strong&gt;&lt;span&gt;Provider.of&lt;/span&gt;&lt;T&gt;&lt;span&gt;(context)&lt;/span&gt;&lt;/strong&gt;&lt;span&gt; 가 더 쓰기 편해 이쪽을 더 선호합니다.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;그럼 간단히 앱을 만들어볼께요.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span&gt; 요런 디자인입니다 :)&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;img src='https://user-images.githubusercontent.com/13621579/62488450-46919400-b7ff-11e9-8cab-0fa3d8c3ecdc.png' alt='flutter_01' referrerPolicy='no-referrer' /&gt;&lt;/p&gt;&lt;h5&gt;&lt;a name=&quot;%EC%98%88%EC%A0%9C-1.1---%EA%B8%B0%EB%B3%B8-provider-%EC%82%AC%EC%9A%A9%ED%95%B4%EB%B3%B4%EA%B8%B0-:-%EB%8D%B0%EC%9D%B4%ED%84%B0-%EC%83%9D%EC%82%B0&quot; class=&quot;md-header-anchor&quot;&gt;&lt;/a&gt;&lt;span&gt;예제 1.1 - 기본 Provider 사용해보기 : 데이터 생산&lt;/span&gt;&lt;/h5&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;dart&quot; style=&quot;page-break-inside: unset;&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;dart&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;span&gt;&lt;span&gt;​&lt;/span&gt;x&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;main&lt;/span&gt;() {&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;runApp&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;SimpleApp&lt;/span&gt;());&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;SimpleApp&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;extends&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;StatelessWidget&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-meta&quot;&gt;@override&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;Widget&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;build&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;BuildContext&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;context&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;Provider&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-builtin&quot;&gt;int&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;gt;&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;value&lt;/span&gt;( &lt;span class=&quot;cm-comment&quot;&gt;// Provider로 위젯을 감싸면, 자식 위젯에서 그 값을 사용 가능.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;value&lt;/span&gt;: &lt;span class=&quot;cm-number&quot;&gt;5&lt;/span&gt;, &lt;span class=&quot;cm-comment&quot;&gt;// Provider에서 제공하는 값은 5&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;child&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;MaterialApp&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;home&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;SimplePage&lt;/span&gt;(),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;  ),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  );&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 330px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 330px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span&gt;Provider를 쓰려면 부모 위젯을 Provider로 감싸줘야합니다.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;전체 앱에서 사용하고 싶으면 MateriapApp을 감싸면 됩니다. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span&gt;Provider에서 어떤 값을 쓸지를 정해야 하는데요.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;전 5를 주었습니다. 지금은 value가 5로 고정되어 있지만, 변하는 값을 넣는 것도 얼마든지 가능합니다. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span&gt;이제 Provider가 제공한 데이터를 사용해보겠습니다.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h5&gt;&lt;a name=&quot;%EC%98%88%EC%A0%9C-1.2---%EA%B0%84%EB%8B%A8%ED%9E%88-provider-%EC%82%AC%EC%9A%A9%ED%95%B4%EB%B3%B4%EA%B8%B0-:-%EB%8D%B0%EC%9D%B4%ED%84%B0-%EC%86%8C%EB%B9%84&quot; class=&quot;md-header-anchor&quot;&gt;&lt;/a&gt;&lt;span&gt;예제 1.2 - 간단히 Provider 사용해보기 : 데이터 소비&lt;/span&gt;&lt;/h5&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;dart&quot; style=&quot;page-break-inside: unset;&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;dart&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;SimplePage&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;extends&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;StatelessWidget&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-meta&quot;&gt;@override&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;Widget&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;build&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;BuildContext&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;context&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;data&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;Provider&lt;/span&gt;.&lt;span class=&quot;cm-keyword&quot;&gt;of&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-builtin&quot;&gt;int&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;gt;&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;context&lt;/span&gt;); &lt;span class=&quot;cm-comment&quot;&gt;// 가까운 Provider로부터 값을 가져옵니다. &lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;Scaffold&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;appBar&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;AppBar&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;title&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;Text&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;'Simple app'&lt;/span&gt;),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;  ),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;body&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;Center&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;child&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;Text&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;'&lt;/span&gt;${&lt;span class=&quot;cm-variable&quot;&gt;data&lt;/span&gt;}&lt;span class=&quot;cm-string&quot;&gt;'&lt;/span&gt;), &lt;span class=&quot;cm-comment&quot;&gt;// 값이 표시됩니다 (여기서는 5)&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;  ),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  );&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 330px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 330px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;em&gt;&lt;span&gt;Provider.of&lt;/span&gt;&lt;int&gt;&lt;span&gt;(context)&lt;/span&gt;&lt;/em&gt;&lt;/strong&gt;&lt;span&gt; 함수를 통해 &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;데이터를 가져옵니다. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span&gt;이 값은 5 입니다. 부모 위젯에서 정한 값이죠. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;데이터를 만드는 곳과 쓰는 곳이 분리되어 있습니다. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span&gt;이게  Provider 패턴의 가장 큰 특징이죠. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;사실상 옵저버 패턴과 큰 차이가 없어요.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span&gt;그럼 Provider를 써서 &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;값이 변할 때 어떻게 하는지를 알아보겠습니다.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h4&gt;&lt;a name=&quot;2.-changenotifierprovider-%EC%82%AC%EC%9A%A9%ED%95%98%EA%B8%B0---%EB%B3%80%ED%95%98%EB%8A%94-%EA%B0%92-%EC%B2%98%EB%A6%AC%ED%95%98%EA%B8%B0&quot; class=&quot;md-header-anchor&quot;&gt;&lt;/a&gt;&lt;span&gt;2. ChangeNotifierProvider 사용하기 - 변하는 값 처리하기&lt;/span&gt;&lt;/h4&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span&gt;UI에 있는 값이 변했을 때,  UI를 변경해 줘야합니다. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;이를 &lt;/span&gt;&lt;em&gt;&lt;span&gt;setState()&lt;/span&gt;&lt;/em&gt;&lt;span&gt; 로 할 수도 있겠지만&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;em&gt;&lt;span&gt;ChangeNotifier&lt;/span&gt;&lt;/em&gt;&lt;span&gt; 를 쓰면 같은 일을 할 수 있습니다.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;em&gt;&lt;span&gt;ChangeNotifier&lt;/span&gt;&lt;/em&gt;&lt;span&gt;를 믹스인 (mixin) 한 클래스는&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;em&gt;&lt;span&gt;notifyListeners()&lt;/span&gt;&lt;/em&gt;&lt;span&gt; 함수를 부를 수 있습니다.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;이 함수를 쓰면 UI가 업데이트 됩니다. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span&gt;예제 2.1은  counter 값이 변할때, UI를 업데이트 하도록 만든 클래스입니다.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h5&gt;&lt;a name=&quot;%EC%98%88%EC%A0%9C-2.1----counter-%ED%81%B4%EB%9E%98%EC%8A%A4&quot; class=&quot;md-header-anchor&quot;&gt;&lt;/a&gt;&lt;span&gt;예제 2.1 -  Counter 클래스 &lt;/span&gt;&lt;/h5&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;dart&quot; style=&quot;page-break-inside: unset;&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;dart&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;cm-string&quot;&gt;'package:flutter/material.dart'&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;Counter&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;with&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;ChangeNotifier&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;_counter&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;Counter&lt;/span&gt;(&lt;span class=&quot;cm-keyword&quot;&gt;this&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;_counter&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;getCounter&lt;/span&gt;() &lt;span class=&quot;cm-operator&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;_counter&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;setCounter&lt;/span&gt;(&lt;span class=&quot;cm-builtin&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;counter&lt;/span&gt;) &lt;span class=&quot;cm-operator&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;_counter&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;counter&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;increment&lt;/span&gt;() {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;_counter&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;++&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;notifyListeners&lt;/span&gt;(); &lt;span class=&quot;cm-comment&quot;&gt;// 값이 변할 때마다 플러터 프레임워크에 알려줍니다.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;decrement&lt;/span&gt;() {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;_counter&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;--&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;notifyListeners&lt;/span&gt;(); &lt;span class=&quot;cm-comment&quot;&gt;// 값이 변할 때마다 플러터 프레임워크에 알려줍니다.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 440px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 440px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span&gt;Counter 클래스를 Provider에 넣어볼텐데요.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span&gt;Counter 클래스가 ChangeNotifier를 믹스인 했기에&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;em&gt;&lt;span&gt;ChangeNotifierProvider&lt;/span&gt;&lt;/em&gt;&lt;/strong&gt;&lt;span&gt; 를 사용해줘야합니다.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h5&gt;&lt;a name=&quot;%EC%98%88%EC%A0%9C-2.2---counterapp.&quot; class=&quot;md-header-anchor&quot;&gt;&lt;/a&gt;&lt;span&gt;예제 2.2 - CounterApp.   &lt;/span&gt;&lt;/h5&gt;&lt;h6&gt;&lt;a name=&quot;changenotifierprovider-%EB%A1%9C-%EC%9C%84%EC%A0%AF%EC%9D%84-%EA%B0%90%EC%8B%B8%EC%A4%8D%EB%8B%88%EB%8B%A4---%EB%8D%B0%EC%9D%B4%ED%84%B0-%EC%82%AC%EC%9A%A9%ED%95%A0-%EC%A4%80%EB%B9%84%ED%95%98%EA%B8%B0&quot; class=&quot;md-header-anchor&quot;&gt;&lt;/a&gt;&lt;span&gt;ChangeNotifierProvider 로 위젯을 감싸줍니다 - 데이터 사용할 준비하기&lt;/span&gt;&lt;/h6&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;dart&quot; style=&quot;page-break-inside: unset;&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;dart&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;CounterApp&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;extends&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;StatelessWidget&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-meta&quot;&gt;@override&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;Widget&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;build&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;BuildContext&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;context&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;ChangeNotifierProvider&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-variable&quot;&gt;Counter&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;gt;&lt;/span&gt;( &lt;span class=&quot;cm-comment&quot;&gt;// Counter 타입 사용. Counter 클래스의 데이터가 변하는지 보고 있다가 변하면 알려줍니다.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;builder&lt;/span&gt;: (&lt;span class=&quot;cm-variable&quot;&gt;_&lt;/span&gt;) &lt;span class=&quot;cm-operator&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;Counter&lt;/span&gt;(&lt;span class=&quot;cm-number&quot;&gt;0&lt;/span&gt;), &lt;span class=&quot;cm-comment&quot;&gt;// 초기값 정하기&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;child&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;MaterialApp&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;title&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;'Flutter Value'&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;theme&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;ThemeData&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;primarySwatch&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;Colors&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;blue&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;  ),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;home&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;HomePage&lt;/span&gt;(),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;  ),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  );&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 352px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 352px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span&gt;머터리얼 앱을 &lt;/span&gt;&lt;em&gt;&lt;span&gt;ChangeNotifierProvider&lt;/span&gt;&lt;/em&gt;&lt;span&gt;로 감싸고 있습니다.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;builder 속성에서 초기값을 정하고 이를 &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;자식 위젯들에서 사용합니다.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h5&gt;&lt;a name=&quot;%EC%98%88%EC%A0%9C-2.3-changenotifierprovider%EC%9D%98-%EA%B0%92-%EC%82%AC%EC%9A%A9%ED%95%98%EA%B8%B0&quot; class=&quot;md-header-anchor&quot;&gt;&lt;/a&gt;&lt;span&gt;예제 2.3 ChangeNotifierProvider의 값 사용하기&lt;/span&gt;&lt;/h5&gt;&lt;p&gt;&lt;span&gt;예제 2.2에서 제공하는 데이터를 위젯에서 보여줍니다. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;+,- 버튼을 누를 때마다 값이 바뀌죠.&lt;/span&gt;&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;dart&quot; style=&quot;page-break-inside: unset;&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;dart&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;HomePage&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;extends&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;StatefulWidget&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;HomePage&lt;/span&gt;({&lt;span class=&quot;cm-variable&quot;&gt;Key&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;key&lt;/span&gt;}) : &lt;span class=&quot;cm-keyword&quot;&gt;super&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;key&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;key&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-meta&quot;&gt;@override&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;_HomePageState&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;createState&lt;/span&gt;() &lt;span class=&quot;cm-operator&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;_HomePageState&lt;/span&gt;();&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;_HomePageState&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;extends&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;State&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-variable&quot;&gt;HomePage&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;gt;&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-meta&quot;&gt;@override&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;Widget&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;build&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;BuildContext&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;context&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;final&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;counter&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;Provider&lt;/span&gt;.&lt;span class=&quot;cm-keyword&quot;&gt;of&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-variable&quot;&gt;Counter&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;gt;&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;context&lt;/span&gt;); &lt;span class=&quot;cm-comment&quot;&gt;// Counter 타입의 데이터를 가져옴. &lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;Scaffold&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;appBar&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;AppBar&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;title&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;Text&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;&quot;Provider demo&quot;&lt;/span&gt;),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;  ),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;body&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;Center&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;child&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;Column&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;mainAxisAlignment&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;MainAxisAlignment&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;center&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;children&lt;/span&gt;: &lt;span class=&quot;cm-operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-variable&quot;&gt;Widget&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;gt;&lt;/span&gt;[&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;Text&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-string&quot;&gt;'&lt;/span&gt;${&lt;span class=&quot;cm-variable&quot;&gt;counter&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;getCounter&lt;/span&gt;()}&lt;span class=&quot;cm-string&quot;&gt;'&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;style&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;Theme&lt;/span&gt;.&lt;span class=&quot;cm-keyword&quot;&gt;of&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;context&lt;/span&gt;).&lt;span class=&quot;cm-variable&quot;&gt;textTheme&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;display1&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;  ),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;RaisedButton&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;onPressed&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;openFirstPage&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;child&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;Text&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;'first page'&lt;/span&gt;),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;  ),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;RaisedButton&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;onPressed&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;openSecondPage&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;child&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;Text&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;'second page'&lt;/span&gt;),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;  ),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;  ],&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;  ),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;  ),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;floatingActionButton&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;Column&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;mainAxisAlignment&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;MainAxisAlignment&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;end&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;children&lt;/span&gt;: &lt;span class=&quot;cm-operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-variable&quot;&gt;Widget&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;gt;&lt;/span&gt;[&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;FloatingActionButton&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;onPressed&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;counter&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;increment&lt;/span&gt;, &lt;span class=&quot;cm-comment&quot;&gt;// 버튼을 누를 때마다, 값이 증가합니다. notifyListeners()가 호출되기에 UI가 갱신됩니다.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;tooltip&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;'Increment'&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;child&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;Icon&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;Icons&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;add&lt;/span&gt;),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;heroTag&lt;/span&gt;: &lt;span class=&quot;cm-atom&quot;&gt;null&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;  ),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;SizedBox&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;height&lt;/span&gt;: &lt;span class=&quot;cm-number&quot;&gt;10&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;  ),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;FloatingActionButton&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;onPressed&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;counter&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;decrement&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;tooltip&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;'Decrement'&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;child&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;Icon&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;Icons&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;remove&lt;/span&gt;),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;heroTag&lt;/span&gt;: &lt;span class=&quot;cm-atom&quot;&gt;null&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;  )&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;  ],&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;  ),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  );&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-comment&quot;&gt;// 다른 페이지로 이동을 합니다. 이동한 페이지에서도 Counter의 값은 동일합니다.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;Future&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;openFirstPage&lt;/span&gt;() {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;Navigator&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;push&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;context&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;MaterialPageRoute&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;builder&lt;/span&gt;: (&lt;span class=&quot;cm-variable&quot;&gt;context&lt;/span&gt;) &lt;span class=&quot;cm-operator&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;FirstPage&lt;/span&gt;()),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  );&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;Future&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;openSecondPage&lt;/span&gt;() {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;Navigator&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;push&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;context&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;MaterialPageRoute&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;builder&lt;/span&gt;: (&lt;span class=&quot;cm-variable&quot;&gt;context&lt;/span&gt;) &lt;span class=&quot;cm-operator&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;SecondPage&lt;/span&gt;()),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  );&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 1650px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 1650px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span&gt;아래 그림 같은 UI 인데요.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;+, - 버튼을 누르면 중앙에 있는 값이 바뀝니다. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;img src='https://user-images.githubusercontent.com/13621579/62488455-498c8480-b7ff-11e9-9c72-82816eb2536c.png' alt='flutter_02' referrerPolicy='no-referrer' /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span&gt;그럼 다른 페이지에서도 Counter 값이 잘 공유되는지 알아볼께요.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h5&gt;&lt;a name=&quot;%EC%98%88%EC%A0%9C-2.4---firstpage--%EB%8B%A4%EB%A5%B8-%ED%8E%98%EC%9D%B4%EC%A7%80%EC%97%90%EC%84%9C%EB%8F%84-%EA%B0%92%EC%9D%B4-%EB%8F%99%EC%9D%BC%ED%95%9C%EC%A7%80-%ED%99%95%EC%9D%B8&quot; class=&quot;md-header-anchor&quot;&gt;&lt;/a&gt;&lt;span&gt;예제 2.4 - FirstPage  다른 페이지에서도 값이 동일한지 확인&lt;/span&gt;&lt;/h5&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;dart&quot; style=&quot;page-break-inside: unset;&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;dart&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;FirstPage&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;extends&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;StatefulWidget&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-meta&quot;&gt;@override&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;_FirstPageState&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;createState&lt;/span&gt;() &lt;span class=&quot;cm-operator&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;_FirstPageState&lt;/span&gt;();&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;_FirstPageState&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;extends&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;State&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-variable&quot;&gt;FirstPage&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;gt;&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-meta&quot;&gt;@override&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;Widget&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;build&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;BuildContext&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;context&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;final&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;counter&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;Provider&lt;/span&gt;.&lt;span class=&quot;cm-keyword&quot;&gt;of&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-variable&quot;&gt;Counter&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;gt;&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;context&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;Scaffold&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;appBar&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;AppBar&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;title&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;Text&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;'first page'&lt;/span&gt;),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;  ),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;body&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;Center&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;child&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;Container&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;child&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;Text&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;'first page counter &lt;/span&gt;${&lt;span class=&quot;cm-variable&quot;&gt;counter&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;getCounter&lt;/span&gt;()}&lt;span class=&quot;cm-string&quot;&gt;'&lt;/span&gt;),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;  ),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;  ),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  );&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 506px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 506px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;img src='https://user-images.githubusercontent.com/13621579/62488463-4d200b80-b7ff-11e9-95e3-1a18a835963e.png' alt='flutter_03' referrerPolicy='no-referrer' /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span&gt;다른 페이지에서도 값이 동일합니다.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;똑같이 5가 나오는 걸 알 수 있죠. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span&gt;생각보다 프로바이더 쓰는 건 간단합니다!!&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;다만 문제가 하나 있는데요. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span&gt;Provider가 여러개 일수록 관리가 어려워진다는 거죠.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;게다가 Provider 가 중첩될 경우엔 앱이 난잡해지기 쉽습니다. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span&gt;이때 쓰는 게 MultiProvider 에요.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h3&gt;&lt;a name=&quot;3.-multiprovider---%EC%97%AC%EB%9F%AC-%ED%94%84%EB%A1%9C%EB%B0%94%EC%9D%B4%EB%8D%94-%EA%B0%99%EC%9D%B4-%EC%82%AC%EC%9A%A9%ED%95%98%EA%B8%B0&quot; class=&quot;md-header-anchor&quot;&gt;&lt;/a&gt;&lt;span&gt;3. MultiProvider - 여러 프로바이더 같이 사용하기&lt;/span&gt;&lt;/h3&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span&gt;멀티 프로바이더를 쓰면 프로바이더 관리가 상당히 편해집니다. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;다른 위젯들이랑 섞일 일이 없어서 쓰기 편해지죠. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;사용법은 간단합니다.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span&gt;MultiProvider의 providers 속성에 원하는 프로바이더를 적어주면 됩니다.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;여러개 적을 수 있죠.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h5&gt;&lt;a name=&quot;multiprovider-%EC%82%AC%EC%9A%A9-%EC%98%88&quot; class=&quot;md-header-anchor&quot;&gt;&lt;/a&gt;&lt;span&gt;MultiProvider 사용 예&lt;/span&gt;&lt;/h5&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;dart&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;dart&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;Widget&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;build&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;BuildContext&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;context&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;MultiProvider&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;providers&lt;/span&gt;: [&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;Provider&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-builtin&quot;&gt;int&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;gt;&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;value&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;value&lt;/span&gt;: &lt;span class=&quot;cm-number&quot;&gt;50&lt;/span&gt;),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;Provider&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-builtin&quot;&gt;String&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;gt;&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;value&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;value&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;&quot;Hello World&quot;&lt;/span&gt;),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;  ],&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  );&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; }&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 176px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 176px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span&gt;프로바이더는 자료형으로 어떤 값을 가져올지 구분합니다. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;근데 멀티 프로바이더에 같은 자료형이 여러번 정의 된다면 어떻게 될까요?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h5&gt;&lt;a name=&quot;multiprovider---%EA%B0%99%EC%9D%80-%EC%9E%90%EB%A3%8C%ED%98%95%EC%9D%B4-%EC%97%AC%EB%9F%AC%EA%B0%9C%EB%A9%B4-%EA%B0%80%EC%9E%A5-%EB%B0%91%EC%97%90-%EC%9E%88%EB%8A%94-%EA%B2%83%EC%97%90-%EC%A0%91%EA%B7%BC.&quot; class=&quot;md-header-anchor&quot;&gt;&lt;/a&gt;&lt;span&gt;MultiProvider - 같은 자료형이 여러개면 가장 밑에 있는 것에 접근.&lt;/span&gt;&lt;/h5&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;dart&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;dart&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;MultiProvider&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;providers&lt;/span&gt;: [&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;Provider&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-builtin&quot;&gt;int&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;gt;&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;value&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;value&lt;/span&gt;: &lt;span class=&quot;cm-number&quot;&gt;50&lt;/span&gt;),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;Provider&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-builtin&quot;&gt;int&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;gt;&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;value&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;value&lt;/span&gt;: &lt;span class=&quot;cm-number&quot;&gt;100&lt;/span&gt;),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;Provider&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-builtin&quot;&gt;int&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;gt;&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;value&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;value&lt;/span&gt;: &lt;span class=&quot;cm-number&quot;&gt;300&lt;/span&gt;), &lt;span class=&quot;cm-comment&quot;&gt;// Provider.of&amp;lt;int&amp;gt; 로 접근하면 이 값만 가져옴. &lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;  ]&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 154px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 154px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span&gt;같은 자료형인 프로바이더가 여러개일 경우, 가장 밑에 값으로 처리합니다.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span&gt;그럼 좀 더 실용적인 예제를 만들어보겠습니다.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;파이어 스토어의 데이터를 받아서 보여주는 예제에요.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span&gt;화면 2개로 구성되어 있는데 1개는 로그인 화면, 1개는 유저 데이터를 보여주는 화면입니다.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h5&gt;&lt;a name=&quot;%EC%98%88%EC%A0%9C3.--%EB%A1%9C%EA%B7%B8%EC%9D%B8-%ED%99%94%EB%A9%B4---%EB%A1%9C%EA%B7%B8%EC%9D%B8-%EC%95%88-%EB%90%98%EC%97%88%EC%9D%84-%EB%95%8C-%EB%82%98%EC%98%B4&quot; class=&quot;md-header-anchor&quot;&gt;&lt;/a&gt;&lt;span&gt;예제3.  로그인 화면 - 로그인 안 되었을 때 나옴&lt;/span&gt;&lt;/h5&gt;&lt;p&gt;&lt;img src='https://user-images.githubusercontent.com/13621579/62490109-7fcc0300-b803-11e9-98c2-36270430daf3.png' alt='flutter_05' referrerPolicy='no-referrer' /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h5&gt;&lt;a name=&quot;%EC%98%88%EC%A0%9C3.--%EC%9C%A0%EC%A0%80-%EB%8D%B0%EC%9D%B4%ED%84%B0-%ED%99%94%EB%A9%B4---%EB%A1%9C%EA%B7%B8%EC%9D%B8-%EB%90%98%EB%A9%B4-%EB%82%98%EC%98%B4&quot; class=&quot;md-header-anchor&quot;&gt;&lt;/a&gt;&lt;span&gt;예제3.  유저 데이터 화면 - 로그인 되면 나옴&lt;/span&gt;&lt;/h5&gt;&lt;p&gt;&lt;img src='https://user-images.githubusercontent.com/13621579/62490105-7cd11280-b803-11e9-9a4f-81ca073297c9.png' alt='flutter_04' referrerPolicy='no-referrer' /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span&gt;우선 라이브러리부터 추가하겠습니다.&lt;/span&gt;&lt;/p&gt;&lt;h5&gt;&lt;a name=&quot;%EC%98%88%EC%A0%9C-3.1-pubspec.yaml&quot; class=&quot;md-header-anchor&quot;&gt;&lt;/a&gt;&lt;span&gt;예제 3.1 pubspec.yaml&lt;/span&gt;&lt;/h5&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;yaml&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;yaml&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-atom&quot;&gt; cloud_firestore&lt;/span&gt;&lt;span class=&quot;cm-meta&quot;&gt;: &lt;/span&gt;^0.12.9&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-atom&quot;&gt; firebase_auth&lt;/span&gt;&lt;span class=&quot;cm-meta&quot;&gt;: &lt;/span&gt;^0.14.0&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 44px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 44px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span&gt;이제 파이어 스토어에서 필요한 데이터를 만들어주세요.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;데이터는 아래 그림과 같은 형식입니다. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;em&gt;&lt;span&gt;User 콜렉션과 다큐먼트&lt;/span&gt;&lt;/em&gt;&lt;span&gt;를 만들어 주세요~!&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h5&gt;&lt;a name=&quot;%EC%98%88%EC%A0%9C-3.2--%ED%8C%8C%EC%9D%B4%EC%96%B4%EC%8A%A4%ED%86%A0%EC%96%B4%EC%97%90-%EB%8D%B0%EC%9D%B4%ED%84%B0-%EC%B6%94%EA%B0%80%ED%95%98%EA%B8%B0&quot; class=&quot;md-header-anchor&quot;&gt;&lt;/a&gt;&lt;span&gt;예제 3.2  파이어스토어에 데이터 추가하기&lt;/span&gt;&lt;/h5&gt;&lt;p&gt;&lt;img src='https://user-images.githubusercontent.com/13621579/62490667-dbe35700-b804-11e9-99b6-26d4adeb907e.png' alt='flutter_firestore' referrerPolicy='no-referrer' /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span&gt;파이어 스토어의 데이터를 앱에서 읽으려면 &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;그에 걸맞은 클래스가 필요하겠죠?&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;em&gt;&lt;span&gt;user.dart&lt;/span&gt;&lt;/em&gt;&lt;span&gt; 에서 이 일을 합니다. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h5&gt;&lt;a name=&quot;%EC%98%88%EC%A0%9C-3.3-user.dart----%EB%8D%B0%EC%9D%B4%ED%84%B0%EB%A5%BC-%EB%8B%B4%EC%9D%84-%ED%81%B4%EB%9E%98%EC%8A%A4&quot; class=&quot;md-header-anchor&quot;&gt;&lt;/a&gt;&lt;span&gt;예제 3.3 user.dart  - 데이터를 담을 클래스&lt;/span&gt;&lt;/h5&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;dart&quot; style=&quot;page-break-inside: unset;&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;dart&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;x&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;cm-string&quot;&gt;'package:cloud_firestore/cloud_firestore.dart'&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;User&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;final&lt;/span&gt; &lt;span class=&quot;cm-builtin&quot;&gt;String&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;name&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;final&lt;/span&gt; &lt;span class=&quot;cm-builtin&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;age&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;User&lt;/span&gt;({&lt;span class=&quot;cm-keyword&quot;&gt;this&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;name&lt;/span&gt;, &lt;span class=&quot;cm-keyword&quot;&gt;this&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;age&lt;/span&gt;});&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;factory&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;User&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;fromMap&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;Map&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;map&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;User&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;name&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;map&lt;/span&gt;[&lt;span class=&quot;cm-string&quot;&gt;'name'&lt;/span&gt;] &lt;span class=&quot;cm-operator&quot;&gt;??&lt;/span&gt; &lt;span class=&quot;cm-string&quot;&gt;''&lt;/span&gt;, &lt;span class=&quot;cm-comment&quot;&gt;// 디폴트 값은 '' 으로 했습니다.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;age&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;map&lt;/span&gt;[&lt;span class=&quot;cm-string&quot;&gt;'age'&lt;/span&gt;] &lt;span class=&quot;cm-operator&quot;&gt;??&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;0&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  );&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;factory&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;User&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;fromFireStore&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;DocumentSnapshot&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;doc&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;Map&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;map&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;doc&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;data&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;User&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;name&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;map&lt;/span&gt;[&lt;span class=&quot;cm-string&quot;&gt;'name'&lt;/span&gt;] &lt;span class=&quot;cm-operator&quot;&gt;??&lt;/span&gt; &lt;span class=&quot;cm-string&quot;&gt;''&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;age&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;map&lt;/span&gt;[&lt;span class=&quot;cm-string&quot;&gt;'age'&lt;/span&gt;] &lt;span class=&quot;cm-operator&quot;&gt;??&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;0&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  ) ;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 528px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 528px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span&gt;데이터 관리는 따로 클래스를 만들어서 하겠습니다.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;em&gt;&lt;span&gt;Database Provider&lt;/span&gt;&lt;/em&gt;&lt;span&gt; 라는 클래스인데요.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;파이어 스토어로부터 데이터를 읽어 들입니다.  &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h5&gt;&lt;a name=&quot;%EC%98%88%EC%A0%9C-3.4--database_provider.dart-----%ED%8C%8C%EC%9D%B4%EC%96%B4-%EC%8A%A4%ED%86%A0%EC%96%B4%EB%A5%BC-%EA%B4%80%EB%A6%AC%ED%95%A0-%ED%81%B4%EB%9E%98%EC%8A%A4&quot; class=&quot;md-header-anchor&quot;&gt;&lt;/a&gt;&lt;span&gt;예제 3.4  database_provider.dart   - 파이어 스토어를 관리할 클래스&lt;/span&gt;&lt;/h5&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;dart&quot; style=&quot;page-break-inside: unset;&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;dart&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;x&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;cm-string&quot;&gt;'package:cloud_firestore/cloud_firestore.dart'&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;cm-string&quot;&gt;'package:flutter_state_provider/model/user.dart'&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;DatabaseProvider&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;final&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;Firestore&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;_db&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;Firestore&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;instance&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-comment&quot;&gt;// User 1명의 데이터 읽기&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;Future&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-variable&quot;&gt;User&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;getUser&lt;/span&gt;(&lt;span class=&quot;cm-builtin&quot;&gt;String&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;id&lt;/span&gt;) &lt;span class=&quot;cm-keyword&quot;&gt;async&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;snap&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;await&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;_db&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;collection&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;'user'&lt;/span&gt;).&lt;span class=&quot;cm-variable&quot;&gt;document&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;id&lt;/span&gt;).&lt;span class=&quot;cm-keyword&quot;&gt;get&lt;/span&gt;();&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;User&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;fromMap&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;snap&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;data&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-comment&quot;&gt;// User 여러명의 데이터 읽기&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;Stream&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-variable&quot;&gt;List&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-variable&quot;&gt;User&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;getUsers&lt;/span&gt;() {&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-comment&quot;&gt;// DocumentSnapshot 으로 되어 있기에 이를 리스트 형식으로 바꿔줌.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;_db&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;collection&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;'user'&lt;/span&gt;).&lt;span class=&quot;cm-variable&quot;&gt;snapshots&lt;/span&gt;().&lt;span class=&quot;cm-variable&quot;&gt;map&lt;/span&gt;((&lt;span class=&quot;cm-variable&quot;&gt;list&lt;/span&gt;) &lt;span class=&quot;cm-operator&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;list&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;documents&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;map&lt;/span&gt;((&lt;span class=&quot;cm-variable&quot;&gt;doc&lt;/span&gt;) &lt;span class=&quot;cm-operator&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;User&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;fromFireStore&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;doc&lt;/span&gt;)).&lt;span class=&quot;cm-variable&quot;&gt;toList&lt;/span&gt;());&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 462px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 462px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span&gt;이제 프로바이더를 써서 데이터를 읽어들이도록 할께요.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;em&gt;&lt;span&gt;DatabaseProvider&lt;/span&gt;&lt;/em&gt;&lt;span&gt; 클래스에서 만든 함수 2개를 사용합니다.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h5&gt;&lt;a name=&quot;%EC%98%88%EC%A0%9C-3.5-login_app.dart----%EB%A1%9C%EA%B7%B8%EC%9D%B8-%ED%99%94%EB%A9%B4%EC%9D%84-%EC%B2%98%EB%A6%AC%ED%95%98%EA%B3%A0,-%EC%9C%A0%EC%A0%80-%EB%8D%B0%EC%9D%B4%ED%84%B0%EB%A5%BC-%EB%B3%B4%EC%97%AC%EC%A4%84-%ED%81%B4%EB%9E%98%EC%8A%A4&quot; class=&quot;md-header-anchor&quot;&gt;&lt;/a&gt;&lt;span&gt;예제 3.5 login_app.dart  - 로그인 화면을 처리하고, 유저 데이터를 보여줄 클래스&lt;/span&gt;&lt;/h5&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;dart&quot; style=&quot;page-break-inside: unset;&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;dart&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;x&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;cm-string&quot;&gt;'package:firebase_auth/firebase_auth.dart'&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;cm-string&quot;&gt;'package:flutter/material.dart'&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;cm-string&quot;&gt;'package:provider/provider.dart'&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;cm-string&quot;&gt;'database/database_provider.dart'&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;cm-string&quot;&gt;'model/user.dart'&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;LoginApp&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;extends&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;StatelessWidget&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;DatabaseProvider&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;db&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;DatabaseProvider&lt;/span&gt;();&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-meta&quot;&gt;@override&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;Widget&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;build&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;BuildContext&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;context&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;MultiProvider&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;providers&lt;/span&gt;: [&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-comment&quot;&gt;// 스트림 프로바이더로 인증 정보를 읽어들임. 인증 상태가 변하면, 변한 값이 출력됨.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;StreamProvider&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-variable&quot;&gt;FirebaseUser&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;gt;&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;value&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;value&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;FirebaseAuth&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;instance&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;onAuthStateChanged&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;  ),&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-comment&quot;&gt;// 스트림 프로바이더로 파이어스토어 데이터를 읽어들임.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;StreamProvider&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-variable&quot;&gt;List&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-variable&quot;&gt;User&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;value&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;value&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;db&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;getUsers&lt;/span&gt;(),&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;  ),&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;  ],&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;child&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;MaterialApp&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;title&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;'인증 프로바이더'&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;theme&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;ThemeData&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;primarySwatch&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;Colors&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;blue&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;  ),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;home&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;LoginPage&lt;/span&gt;(),&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;  ),&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  );&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;LoginPage&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;extends&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;StatefulWidget&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-meta&quot;&gt;@override&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;_LoginPageState&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;createState&lt;/span&gt;() &lt;span class=&quot;cm-operator&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;_LoginPageState&lt;/span&gt;();&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;_LoginPageState&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;extends&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;State&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-variable&quot;&gt;LoginPage&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;gt;&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;TextEditingController&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;emailCtrl&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;TextEditingController&lt;/span&gt;();&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;TextEditingController&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;passwordCtrl&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;TextEditingController&lt;/span&gt;();&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;Map&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;data&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;Map&lt;/span&gt;();&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;FirebaseAuth&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;auth&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;FirebaseAuth&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;instance&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-meta&quot;&gt;@override&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;Widget&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;build&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;BuildContext&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;context&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;user&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;Provider&lt;/span&gt;.&lt;span class=&quot;cm-keyword&quot;&gt;of&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-variable&quot;&gt;FirebaseUser&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;gt;&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;context&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;loggedIn&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;user&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;!=&lt;/span&gt; &lt;span class=&quot;cm-atom&quot;&gt;null&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;Scaffold&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;appBar&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;AppBar&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;title&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;Text&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-string&quot;&gt;&quot;로긴 페이지&quot;&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;style&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;TextStyle&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;color&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;Colors&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;white&lt;/span&gt;),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;  ),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;  ),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;body&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;Column&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;children&lt;/span&gt;: &lt;span class=&quot;cm-operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-variable&quot;&gt;Widget&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;gt;&lt;/span&gt;[&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-comment&quot;&gt;// 로그인(가입)된 유저일 경우만 UI에서 보여줌.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;if&lt;/span&gt; (&lt;span class=&quot;cm-variable&quot;&gt;loggedIn&lt;/span&gt;) ...[&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;RaisedButton&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;child&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;Text&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;&quot;Sign out&quot;&lt;/span&gt;), &lt;span class=&quot;cm-variable&quot;&gt;onPressed&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;auth&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;signOut&lt;/span&gt;),&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;UserList&lt;/span&gt;(), &lt;span class=&quot;cm-comment&quot;&gt;// User 데이터를 보여주는 위젯&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;  ],&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-comment&quot;&gt;// 로그인이 안 된 유저일 경우 보여주는 UI - 가입 화면&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;if&lt;/span&gt; (&lt;span class=&quot;cm-operator&quot;&gt;!&lt;/span&gt;&lt;span class=&quot;cm-variable&quot;&gt;loggedIn&lt;/span&gt;) ...[&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;TextFormField&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;controller&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;emailCtrl&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;decoration&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;InputDecoration&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;icon&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;Icon&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;Icons&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;email&lt;/span&gt;), &lt;span class=&quot;cm-variable&quot;&gt;hintText&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;'이메일을 적어주세요.'&lt;/span&gt;),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;  ),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;TextFormField&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;controller&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;passwordCtrl&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;decoration&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;InputDecoration&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;icon&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;Icon&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;Icons&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;keyboard&lt;/span&gt;), &lt;span class=&quot;cm-variable&quot;&gt;hintText&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;'비밀번호를 적어주세요.'&lt;/span&gt;),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;obscureText&lt;/span&gt;: &lt;span class=&quot;cm-atom&quot;&gt;true&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;  ),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;RaisedButton&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;child&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;Text&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;&quot;Sign up&quot;&lt;/span&gt;),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;onPressed&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;signUp&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;  )&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;  ]&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;  ],&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;  ),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  );&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;signUp&lt;/span&gt;() {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;String&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;email&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;emailCtrl&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;text&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;String&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;password&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;passwordCtrl&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;text&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;auth&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;createUserWithEmailAndPassword&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;email&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;email&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;password&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;password&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;emailCtrl&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;clear&lt;/span&gt;();&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;passwordCtrl&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;clear&lt;/span&gt;();&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 2156px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 2156px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span&gt;로그인이 되었으면 유저 데이터를 보여주고, &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;로그인이 안 되었으면 email, password 입력 화면이 나옵니다~! &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;Provider(프로바이더)를 쓰면 이런 상태 관리를 정말 쉽게 할 수 있죠.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span&gt;전 편의상 유저 데이터를 보여주는 위젯은 따로 클래스로 뺐습니다. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;이 부분까지만 하면 이 예제는 끝이에요.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h5&gt;&lt;a name=&quot;%EC%98%88%EC%A0%9C-3.6-user_list.dart-----%EC%9C%A0%EC%A0%80-%EB%8D%B0%EC%9D%B4%ED%84%B0%EB%A5%BC-%EB%B3%B4%EC%97%AC%EC%A4%84-%EC%9C%84%EC%A0%AF&quot; class=&quot;md-header-anchor&quot;&gt;&lt;/a&gt;&lt;span&gt;예제 3.6 user_list.dart   - 유저 데이터를 보여줄 위젯&lt;/span&gt;&lt;/h5&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;dart&quot; style=&quot;page-break-inside: unset;&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;dart&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;UserList&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;extends&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;StatefulWidget&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-meta&quot;&gt;@override&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;_UserListState&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;createState&lt;/span&gt;() &lt;span class=&quot;cm-operator&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;_UserListState&lt;/span&gt;();&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;_UserListState&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;extends&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;State&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-variable&quot;&gt;UserList&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;gt;&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-meta&quot;&gt;@override&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;Widget&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;build&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;BuildContext&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;context&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;users&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;Provider&lt;/span&gt;.&lt;span class=&quot;cm-keyword&quot;&gt;of&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-variable&quot;&gt;List&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-variable&quot;&gt;User&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;context&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;Container&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;height&lt;/span&gt;: &lt;span class=&quot;cm-number&quot;&gt;400&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;child&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;ListView&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;builder&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;itemCount&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;users&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;length&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;itemBuilder&lt;/span&gt;: (&lt;span class=&quot;cm-variable&quot;&gt;BuildContext&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;context&lt;/span&gt;, &lt;span class=&quot;cm-builtin&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;index&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;User&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;user&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;users&lt;/span&gt;[&lt;span class=&quot;cm-variable&quot;&gt;index&lt;/span&gt;];&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;ListTile&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;title&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;Text&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;&quot;이름 - &amp;nbsp;&lt;/span&gt;${&lt;span class=&quot;cm-variable&quot;&gt;user&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;name&lt;/span&gt;}&lt;span class=&quot;cm-string&quot;&gt;&quot;&lt;/span&gt;),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;leading&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;Text&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;&quot;나이 - &lt;/span&gt;${&lt;span class=&quot;cm-variable&quot;&gt;user&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;age&lt;/span&gt;}&lt;span class=&quot;cm-string&quot;&gt;&quot;&lt;/span&gt;),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;  );&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;  },&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;  ),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  );&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 572px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 572px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span&gt;이제까지 Provider 에 대해서 알아보았습니다.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;Bloc 패턴에 비하면 정말 간결합니다. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;Provider 패턴을 쓰면 좀 더 부담없이 깔끔한 코드를 작성할 수 있단 생각이 드네요!&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span&gt;이 글에 쓰인 소스는  &lt;/span&gt;&lt;a href='https://github.com/Hochul822/flutter_state_provider'&gt;&lt;span&gt;여기&lt;/span&gt;&lt;/a&gt;&lt;span&gt; 에서 찾아보실 수 있습니다.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span&gt;예제 1,2,3은 주석 처리를 지우면서 실행해 보세요!&lt;/span&gt;&lt;/p&gt;&lt;pre lang=&quot;dart&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; spellcheck=&quot;false&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;dart&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;main&lt;/span&gt;() {&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;runApp&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;SimpleApp&lt;/span&gt;()); &lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-comment&quot;&gt;//runApp(CounterApp());&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-comment&quot;&gt;//runApp(LoginApp());&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 132px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 132px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span&gt;이번 글에선 프로바이더에 대해서 알아보았는데요. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;다음 글에선 애니메이션이나 파이어베이스에 대해서 알아볼 예정입니다. &lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span&gt;여기까지 읽어주셔서 감사합니다.&lt;/span&gt;&lt;/p&gt;&lt;hr /&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h3&gt;&lt;a name=&quot;%EC%B0%B8%EA%B3%A0%ED%95%9C-%EC%9E%90%EB%A3%8C%EB%93%A4&quot; class=&quot;md-header-anchor&quot;&gt;&lt;/a&gt;&lt;span&gt;참고한 자료들&lt;/span&gt;&lt;/h3&gt;&lt;p&gt;&lt;span&gt;멀티 프로바이더 부분 참고 - 유튜브 Fireship 채널 영상 ( &lt;/span&gt;&lt;a href='https://www.youtube.com/watch?v=vFxk_KJCqgk' target='_blank' class='url'&gt;https://www.youtube.com/watch?v=vFxk_KJCqgk&lt;/a&gt;&lt;span&gt; )&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;프로바이더 아키텍처 - &lt;/span&gt;&lt;a href='https://medium.com/flutter-community/flutter-architecture-provider-implementation-guide-d33133a9a4e8' target='_blank' class='url'&gt;https://medium.com/flutter-community/flutter-architecture-provider-implementation-guide-d33133a9a4e8&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;</description>
      <category>플러터(Flutter)</category>
      <category>Flutter</category>
      <category>flutter bloc</category>
      <category>flutter provider</category>
      <category>flutterprovider</category>
      <category>플러터</category>
      <category>플러터프로바이더</category>
      <author>에드 신</author>
      <guid isPermaLink="true">https://software-creator.tistory.com/26</guid>
      <comments>https://software-creator.tistory.com/26#entry26comment</comments>
      <pubDate>Tue, 6 Aug 2019 16:28:52 +0900</pubDate>
    </item>
    <item>
      <title>코딩 잘하기 - 여러 언어 배우기 vs 1개 언어에 집중하기</title>
      <link>https://software-creator.tistory.com/25</link>
      <description>&lt;p&gt;&lt;span&gt;어느정도 프로그래밍 언어 하나에 익숙해지면&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;겪게 되는 고민이 있습니다.&amp;nbsp;&lt;/span&gt;&lt;span&gt;언어를 더 배워야 하는 건가?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;왜 이리 프로그래밍 언어는 이토록 많지?&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;개발자라면 당연히 C는 알아야 한다는데,&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;요즘 다트가 유행이라는데,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;인공지능 개발하려면 파이썬은 기본이라는데,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;서버는 Go언어로 짜야 성능이 좋다는데&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;이 모든 걸 다 배워야 될 것 같은 생각이 듭니다.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;심지어 폴 그레이엄은 그의 책, '해커와 화가'에서 자바만 아는 개발자는 심각한 문제라는 이야기도 하였죠.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;조엘 스폴스키는 '얼랭' 같은 특이한 언어를 배운 개발자를 뽑으라고 권하기도 했구요.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;여러 언어를 배우는 게 정답일까요?&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;그렇지 않습니다.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;언어는 2개 정도만 깊이 파고&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;언어 자체보다는 소프트웨어 자체를 만들기를 권합니다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;프로그래밍은 외국어와 비슷한 측면이 있습니다. &amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;외국어를 7개 국어 한다는 사람도 있지만&lt;/p&gt;
&lt;p&gt;모국어 수준으로 하는 건, 2~3개 정도이고&lt;/p&gt;
&lt;p&gt;나머지는 간단한 회화나 독해가 전부입니다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;안 쓰면 잊혀지기 때문이죠.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;프로그래밍 언어를 7~8개 한다는 사람을 실제로 봐도&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;문법을 아는 정도지,&amp;nbsp;&lt;/span&gt;&lt;span&gt;자유 자재로 상용 소프트웨어를 만드는 경우는 많지 않았습니다.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;(근데 다 하는 사람이 가끔 있긴 합니다 가끔요..)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;한 언어를 택해서, 그 언어의 숙련도를 높이는 게 좋습니다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;프론트 엔드 개발자가 목표라면, 바닥부터 웹사이트를 만들어보고 브라우저 원리도 공부해보고,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;네트워크로 데이터 주고 받기, 재사용성 높게 클래스 만들기, 내가 필요한 거 라이브러리로 만들어보기,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;실제 서비스 만들어 유저 받기 같은 걸 하는 게 낫습니다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;괜히 파이썬으로 rest api 짜다가, Vue가 뜬다고 하니 뷰하다가, 리액트가 낫다니 리액트 해보고&lt;/p&gt;
&lt;p&gt;이런 건 정말 안 좋습니다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;데이터 분석을 배운다면 데이터를 분석한 뒤&amp;nbsp;&lt;/p&gt;
&lt;p&gt;어떤 결론을 도출해 내거나, 보고서를 작성해 실제 서비스에 반영되도록 시도하는 게 낫습니다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;내가 분석한 내용이 실제 환경 (마케팅이든, 앱의 ui 든)에 적용된다면 그보다 나을 게 없죠.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;파이썬이 크롤링 하기 좋다니 파이썬 배우다가, R이 통계 기능이 낫다니 R 배우고,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;딥러닝 최적화 하려면 C++이 필수라고 하니 &amp;nbsp;C++ 배우고 이럼 진전이 없습니다. R이든 파이썬이든 하나 정해서 끝장을 보는 게 나아요.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;끝장을 본 다는 건 하나의 분야에서 a to z를 말합니다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;여러 언어를 배우는 건 중국어로 자기 소개 배운다음에, 스페인어로 자기소개 배우는 거랑 똑같아요.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;한 언어를 잘하고 난 다음에 다른 언어로 넘어가는 게 낫습니다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;저도 여러 언어를 배워봤는데 숙련도 차이가 큽니다. 어떤 언어는 컴파일을 안 해도 동작이 예상되지만, 어떤 언어는 한줄 한줄 쳐봐야 되죠.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;당연히 개발 속도나 질에서도 차이가 납니다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;이 글에서 언어 하나의 숙련도를 높이라고 했지만&lt;/p&gt;
&lt;p&gt;그래도 2~3개 정도는 아는 게 필수라고 생각합니다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;다른 언어를 배우면 주 언어를 더 깊이 이해할 수 있고&lt;/p&gt;
&lt;p&gt;어떤 언어에선 못하는 걸, 다른 언어에선 쉽게 할 수 있는 경우가 종종 있거든요.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;이럴 때를 대비해서 배워두면 필요에 따라 활용할 수 있습니다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;책 파이썬 '실전 스케일링 파이썬 프로그래밍&amp;rsquo;를 보면&amp;nbsp;&lt;/p&gt;
&lt;p&gt;async io 라이브러리 개발자의 인터뷰가 나옵니다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;그분도 &amp;ldquo;고성능 병렬 프로그램을 짤때는 GO&amp;rdquo;를 씁니다라고 하더군요.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;파이썬으로 멀티 프로세싱을 할 때는 어려움이 있다면서요.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;이렇듯 더 나은 문제 해결을 위해, 다른 언어를 알면 좋습니다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;동적 언어로 시작했으면 정적 언어를 배워보고&lt;/p&gt;
&lt;p&gt;정적 언어로 시작했으면 동적 언어를 배워보는 게 제일 효과적이라고 생각합니다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p style=&quot;font-size: 1.25em;&quot;&gt;&lt;b&gt;결론&amp;nbsp;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;처음 개발을 배우거나 아직 서비스를 만들어본 경험이 없다면&lt;/p&gt;
&lt;p&gt;언어 하나에 집중하자. 그치만 틈틈이 1~2개 정도는 추가로 배워두자.&amp;nbsp;&lt;/p&gt;</description>
      <category>코딩 배우는 법을 배우기</category>
      <category>코딩</category>
      <category>코딩배우기</category>
      <author>에드 신</author>
      <guid isPermaLink="true">https://software-creator.tistory.com/25</guid>
      <comments>https://software-creator.tistory.com/25#entry25comment</comments>
      <pubDate>Mon, 8 Jul 2019 23:35:51 +0900</pubDate>
    </item>
    <item>
      <title>Flutter - 다국어 지원하기 (Localization and Internalization)</title>
      <link>https://software-creator.tistory.com/24</link>
      <description>&lt;!doctype html&gt;
&lt;html&gt;
&lt;head&gt;
&lt;meta charset='UTF-8'&gt;&lt;meta name='viewport' content='width=device-width initial-scale=1'&gt;
&lt;meta name=&quot;description=&quot; content=&quot;플러터 다국어 지원은 좀 까다롭습니다. Intl.message를 .arb 파일로 바꾼 뒤 읽어들여야 하죠. arb(Application Resource Bundle)는 구글에서 만든, 파일 형식입니다. 언어 데이터를 저장했다가 번역하기 위해 쓰이죠. 단순한 형태의 json 파일이라고 보면 됩니다. 플러터에선 arb 말곤 다국어지원을 안해서, 어쨌든 arb 파일 다루는 법을 알아야합니다. Google Translators Toolkit도 .arb 파일형식을 지원하고 있습니다. intl은 다트에서 다국어 (internalization and localization)을 지원하는 패키지입니다. 언어 번역이나 단수/복수, 성별, 날짜/숫자를 그 지역이나 국가에 맞게 바꿀 때 씁니다. &quot;&gt;
&lt;title&gt;flutter_intl&lt;/title&gt;&lt;link href='https://fonts.loli.net/css?family=Open+Sans:400italic,700italic,700,400&amp;subset=latin,latin-ext' rel='stylesheet' type='text/css' /&gt;&lt;style type='text/css'&gt;html {overflow-x: initial !important;}:root { --bg-color: #ffffff; --text-color: #333333; --select-text-bg-color: #B5D6FC; --select-text-font-color: auto; --monospace: &quot;Lucida Console&quot;,Consolas,&quot;Courier&quot;,monospace; }
html { font-size: 14px; background-color: var(--bg-color); color: var(--text-color); font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; -webkit-font-smoothing: antialiased; }
body { margin: 0px; padding: 0px; height: auto; bottom: 0px; top: 0px; left: 0px; right: 0px; font-size: 1rem; line-height: 1.42857143; overflow-x: hidden; background-image: inherit; background-size: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: inherit; tab-size: 4; background-position: inherit inherit; background-repeat: inherit inherit; }
iframe { margin: auto; }
a.url { word-break: break-all; }
a:active, a:hover { outline: 0px; }
.in-text-selection, ::selection { text-shadow: none; background: var(--select-text-bg-color); color: var(--select-text-font-color); }
#write { margin: 0px auto; height: auto; width: inherit; word-break: normal; word-wrap: break-word; position: relative; white-space: normal; overflow-x: visible; padding-top: 40px; }
#write.first-line-indent p { text-indent: 2em; }
#write.first-line-indent li p, #write.first-line-indent p * { text-indent: 0px; }
#write.first-line-indent li { margin-left: 2em; }
.for-image #write { padding-left: 8px; padding-right: 8px; }
body.typora-export { padding-left: 30px; padding-right: 30px; }
.typora-export .footnote-line, .typora-export li, .typora-export p { white-space: pre-wrap; }
@media screen and (max-width: 500px) {
  body.typora-export { padding-left: 0px; padding-right: 0px; }
  #write { padding-left: 20px; padding-right: 20px; }
  .CodeMirror-sizer { margin-left: 0px !important; }
  .CodeMirror-gutters { display: none !important; }
}
#write li &gt; figure:last-child { margin-bottom: 0.5rem; }
#write ol, #write ul { position: relative; }
img { max-width: 100%; vertical-align: middle; }
button, input, select, textarea { color: inherit; font-family: inherit; font-size: inherit; font-style: inherit; font-variant-caps: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; }
input[type=&quot;checkbox&quot;], input[type=&quot;radio&quot;] { line-height: normal; padding: 0px; }
*, ::after, ::before { box-sizing: border-box; }
#write h1, #write h2, #write h3, #write h4, #write h5, #write h6, #write p, #write pre { width: inherit; }
#write h1, #write h2, #write h3, #write h4, #write h5, #write h6, #write p { position: relative; }
h1, h2, h3, h4, h5, h6 { break-after: avoid-page; break-inside: avoid; orphans: 2; }
p { orphans: 4; }
h1 { font-size: 2rem; }
h2 { font-size: 1.8rem; }
h3 { font-size: 1.6rem; }
h4 { font-size: 1.4rem; }
h5 { font-size: 1.2rem; }
h6 { font-size: 1rem; }
.md-math-block, .md-rawblock, h1, h2, h3, h4, h5, h6, p { margin-top: 1rem; margin-bottom: 1rem; }
.hidden { display: none; }
.md-blockmeta { color: rgb(204, 204, 204); font-weight: 700; font-style: italic; }
a { cursor: pointer; }
sup.md-footnote { padding: 2px 4px; background-color: rgba(238, 238, 238, 0.701961); color: rgb(85, 85, 85); border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; cursor: pointer; }
sup.md-footnote a, sup.md-footnote a:hover { color: inherit; text-transform: inherit; text-decoration: inherit; }
#write input[type=&quot;checkbox&quot;] { cursor: pointer; width: inherit; height: inherit; }
figure { overflow-x: auto; margin: 1.2em 0px; max-width: calc(100% + 16px); padding: 0px; }
figure &gt; table { margin: 0px !important; }
tr { break-inside: avoid; break-after: auto; }
thead { display: table-header-group; }
table { border-collapse: collapse; border-spacing: 0px; width: 100%; overflow: auto; break-inside: auto; text-align: left; }
table.md-table td { min-width: 32px; }
.CodeMirror-gutters { border-right-width: 0px; background-color: inherit; }
.CodeMirror-linenumber { }
.CodeMirror { text-align: left; }
.CodeMirror-placeholder { opacity: 0.3; }
.CodeMirror pre { padding: 0px 4px; }
.CodeMirror-lines { padding: 0px; }
div.hr:focus { cursor: none; }
#write pre { white-space: pre-wrap; }
#write.fences-no-line-wrapping pre { white-space: pre; }
#write pre.ty-contain-cm { white-space: normal; }
.CodeMirror-gutters { margin-right: 4px; }
.md-fences { font-size: 0.9rem; display: block; break-inside: avoid; text-align: left; overflow: visible; white-space: pre; background-image: inherit; background-size: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: inherit; position: relative !important; background-position: inherit inherit; background-repeat: inherit inherit; }
.md-diagram-panel { width: 100%; margin-top: 10px; text-align: center; padding-top: 0px; padding-bottom: 8px; overflow-x: auto; }
#write .md-fences.mock-cm { white-space: pre-wrap; }
.md-fences.md-fences-with-lineno { padding-left: 0px; }
#write.fences-no-line-wrapping .md-fences.mock-cm { white-space: pre; overflow-x: auto; }
.md-fences.mock-cm.md-fences-with-lineno { padding-left: 8px; }
.CodeMirror-line, twitterwidget { break-inside: avoid; }
.footnotes { opacity: 0.8; font-size: 0.9rem; margin-top: 1em; margin-bottom: 1em; }
.footnotes + .footnotes { margin-top: 0px; }
.md-reset { margin: 0px; padding: 0px; border: 0px; outline: 0px; vertical-align: top; text-decoration: none; text-shadow: none; float: none; position: static; width: auto; height: auto; white-space: nowrap; cursor: inherit; line-height: normal; font-weight: 400; text-align: left; box-sizing: content-box; direction: ltr; background-position: 0px 0px; background-repeat: initial initial; }
li div { padding-top: 0px; }
blockquote { margin: 1rem 0px; }
li .mathjax-block, li p { margin: 0.5rem 0px; }
li { margin: 0px; position: relative; }
blockquote &gt; :last-child { margin-bottom: 0px; }
blockquote &gt; :first-child, li &gt; :first-child { margin-top: 0px; }
.footnotes-area { color: rgb(136, 136, 136); margin-top: 0.714rem; padding-bottom: 0.143rem; white-space: normal; }
#write .footnote-line { white-space: pre-wrap; }
@media print {
  body, html { border: 1px solid transparent; height: 99%; break-after: avoid-page; break-before: avoid-page; }
  #write { margin-top: 0px; padding-top: 0px; border-color: transparent !important; }
  .typora-export * { -webkit-print-color-adjust: exact; }
  html.blink-to-pdf { font-size: 13px; }
  .typora-export #write { padding-left: 32px; padding-right: 32px; padding-bottom: 0px; break-after: avoid-page; }
  .typora-export #write::after { height: 0px; }
  @page { margin: 20mm 0px; }
}
.footnote-line { margin-top: 0.714em; font-size: 0.7em; }
a img, img a { cursor: pointer; }
pre.md-meta-block { font-size: 0.8rem; min-height: 0.8rem; white-space: pre-wrap; background-color: rgb(204, 204, 204); display: block; overflow-x: hidden; background-position: initial initial; background-repeat: initial initial; }
p &gt; .md-image:only-child:not(.md-img-error) img, p &gt; img:only-child { display: block; margin: auto; }
p &gt; .md-image:only-child { display: inline-block; width: 100%; }
#write .MathJax_Display { margin: 0.8em 0px 0px; }
.md-math-block { width: 100%; }
.md-math-block:not(:empty)::after { display: none; }
[contenteditable=&quot;true&quot;]:active, [contenteditable=&quot;true&quot;]:focus { outline: 0px; box-shadow: none; }
.md-task-list-item { position: relative; list-style-type: none; }
.task-list-item.md-task-list-item { padding-left: 0px; }
.md-task-list-item &gt; input { position: absolute; top: 0px; left: 0px; margin-left: -1.2em; margin-top: calc(1em - 10px); border: none; }
.math { font-size: 1rem; }
.md-toc { min-height: 3.58rem; position: relative; font-size: 0.9rem; border-top-left-radius: 10px; border-top-right-radius: 10px; border-bottom-right-radius: 10px; border-bottom-left-radius: 10px; }
.md-toc-content { position: relative; margin-left: 0px; }
.md-toc-content::after, .md-toc::after { display: none; }
.md-toc-item { display: block; color: rgb(65, 131, 196); }
.md-toc-item a { text-decoration: none; }
.md-toc-inner:hover { text-decoration: underline; }
.md-toc-inner { display: inline-block; cursor: pointer; }
.md-toc-h1 .md-toc-inner { margin-left: 0px; font-weight: 700; }
.md-toc-h2 .md-toc-inner { margin-left: 2em; }
.md-toc-h3 .md-toc-inner { margin-left: 4em; }
.md-toc-h4 .md-toc-inner { margin-left: 6em; }
.md-toc-h5 .md-toc-inner { margin-left: 8em; }
.md-toc-h6 .md-toc-inner { margin-left: 10em; }
@media screen and (max-width: 48em) {
  .md-toc-h3 .md-toc-inner { margin-left: 3.5em; }
  .md-toc-h4 .md-toc-inner { margin-left: 5em; }
  .md-toc-h5 .md-toc-inner { margin-left: 6.5em; }
  .md-toc-h6 .md-toc-inner { margin-left: 8em; }
}
a.md-toc-inner { font-size: inherit; font-style: inherit; font-weight: inherit; line-height: inherit; }
.footnote-line a:not(.reversefootnote) { color: inherit; }
.md-attr { display: none; }
.md-fn-count::after { content: &quot;.&quot;; }
code, pre, samp, tt { font-family: var(--monospace); }
kbd { margin: 0px 0.1em; padding: 0.1em 0.6em; font-size: 0.8em; color: rgb(36, 39, 41); background-color: rgb(255, 255, 255); border: 1px solid rgb(173, 179, 185); border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; box-shadow: rgba(12, 13, 14, 0.2) 0px 1px 0px, rgb(255, 255, 255) 0px 0px 0px 2px inset; white-space: nowrap; vertical-align: middle; background-position: initial initial; background-repeat: initial initial; }
.md-comment { color: rgb(162, 127, 3); opacity: 0.8; font-family: var(--monospace); }
code { text-align: left; }
a.md-print-anchor { white-space: pre !important; border: none !important; display: inline-block !important; position: absolute !important; width: 1px !important; right: 0px !important; outline: 0px !important; text-shadow: initial !important; background-position: 0px 0px !important; background-repeat: initial initial !important; }
.md-inline-math .MathJax_SVG .noError { display: none !important; }
.html-for-mac .inline-math-svg .MathJax_SVG { vertical-align: 0.2px; }
.md-math-block .MathJax_SVG_Display { text-align: center; margin: 0px; position: relative; text-indent: 0px; max-width: none; max-height: none; min-height: 0px; min-width: 100%; width: auto; overflow-y: hidden; display: block !important; }
.MathJax_SVG_Display, .md-inline-math .MathJax_SVG_Display { width: auto; margin: inherit; display: inline-block !important; }
.MathJax_SVG .MJX-monospace { font-family: var(--monospace); }
.MathJax_SVG .MJX-sans-serif { font-family: sans-serif; }
.MathJax_SVG { display: inline; font-style: normal; font-weight: 400; line-height: normal; zoom: 90%; text-indent: 0px; text-align: left; text-transform: none; letter-spacing: normal; word-spacing: normal; word-wrap: normal; white-space: nowrap; float: none; direction: ltr; max-width: none; max-height: none; min-width: 0px; min-height: 0px; border: 0px; padding: 0px; margin: 0px; }
.MathJax_SVG * { transition: none; }
.MathJax_SVG_Display svg { vertical-align: middle !important; margin-bottom: 0px !important; }
.os-windows.monocolor-emoji .md-emoji { font-family: &quot;Segoe UI Symbol&quot;, sans-serif; }
.md-diagram-panel &gt; svg { max-width: 100%; }
[lang=&quot;mermaid&quot;] svg, [lang=&quot;flow&quot;] svg { max-width: 100%; }
[lang=&quot;mermaid&quot;] .node text { font-size: 1rem; }
table tr th { border-bottom-width: 0px; }
video { max-width: 100%; display: block; margin: 0px auto; }
iframe { max-width: 100%; width: 100%; border: none; }
.highlight td, .highlight tr { border: 0px; }


.CodeMirror { height: auto; }
.CodeMirror.cm-s-inner { background-image: inherit; background-size: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: inherit; background-position: inherit inherit; background-repeat: inherit inherit; }
.CodeMirror-scroll { overflow-y: hidden; overflow-x: auto; z-index: 3; }
.CodeMirror-gutter-filler, .CodeMirror-scrollbar-filler { background-color: rgb(255, 255, 255); }
.CodeMirror-gutters { border-right-width: 1px; border-right-style: solid; border-right-color: rgb(221, 221, 221); background-image: inherit; background-size: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: inherit; white-space: nowrap; background-position: inherit inherit; background-repeat: inherit inherit; }
.CodeMirror-linenumber { padding: 0px 3px 0px 5px; text-align: right; color: rgb(153, 153, 153); }
.cm-s-inner .cm-keyword { color: rgb(119, 0, 136); }
.cm-s-inner .cm-atom, .cm-s-inner.cm-atom { color: rgb(34, 17, 153); }
.cm-s-inner .cm-number { color: rgb(17, 102, 68); }
.cm-s-inner .cm-def { color: rgb(0, 0, 255); }
.cm-s-inner .cm-variable { color: rgb(0, 0, 0); }
.cm-s-inner .cm-variable-2 { color: rgb(0, 85, 170); }
.cm-s-inner .cm-variable-3 { color: rgb(0, 136, 85); }
.cm-s-inner .cm-string { color: rgb(170, 17, 17); }
.cm-s-inner .cm-property { color: rgb(0, 0, 0); }
.cm-s-inner .cm-operator { color: rgb(152, 26, 26); }
.cm-s-inner .cm-comment, .cm-s-inner.cm-comment { color: rgb(170, 85, 0); }
.cm-s-inner .cm-string-2 { color: rgb(255, 85, 0); }
.cm-s-inner .cm-meta { color: rgb(85, 85, 85); }
.cm-s-inner .cm-qualifier { color: rgb(85, 85, 85); }
.cm-s-inner .cm-builtin { color: rgb(51, 0, 170); }
.cm-s-inner .cm-bracket { color: rgb(153, 153, 119); }
.cm-s-inner .cm-tag { color: rgb(17, 119, 0); }
.cm-s-inner .cm-attribute { color: rgb(0, 0, 204); }
.cm-s-inner .cm-header, .cm-s-inner.cm-header { color: rgb(0, 0, 255); }
.cm-s-inner .cm-quote, .cm-s-inner.cm-quote { color: rgb(0, 153, 0); }
.cm-s-inner .cm-hr, .cm-s-inner.cm-hr { color: rgb(153, 153, 153); }
.cm-s-inner .cm-link, .cm-s-inner.cm-link { color: rgb(0, 0, 204); }
.cm-negative { color: rgb(221, 68, 68); }
.cm-positive { color: rgb(34, 153, 34); }
.cm-header, .cm-strong { font-weight: 700; }
.cm-del { text-decoration: line-through; }
.cm-em { font-style: italic; }
.cm-link { text-decoration: underline; }
.cm-error { color: red; }
.cm-invalidchar { color: red; }
.cm-constant { color: rgb(38, 139, 210); }
.cm-defined { color: rgb(181, 137, 0); }
div.CodeMirror span.CodeMirror-matchingbracket { color: rgb(0, 255, 0); }
div.CodeMirror span.CodeMirror-nonmatchingbracket { color: rgb(255, 34, 34); }
.cm-s-inner .CodeMirror-activeline-background { background-image: inherit; background-size: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: inherit; background-position: inherit inherit; background-repeat: inherit inherit; }
.CodeMirror { position: relative; overflow: hidden; }
.CodeMirror-scroll { height: 100%; outline: 0px; position: relative; box-sizing: content-box; background-image: inherit; background-size: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: inherit; background-position: inherit inherit; background-repeat: inherit inherit; }
.CodeMirror-sizer { position: relative; }
.CodeMirror-gutter-filler, .CodeMirror-hscrollbar, .CodeMirror-scrollbar-filler, .CodeMirror-vscrollbar { position: absolute; z-index: 6; display: none; }
.CodeMirror-vscrollbar { right: 0px; top: 0px; overflow: hidden; }
.CodeMirror-hscrollbar { bottom: 0px; left: 0px; overflow: hidden; }
.CodeMirror-scrollbar-filler { right: 0px; bottom: 0px; }
.CodeMirror-gutter-filler { left: 0px; bottom: 0px; }
.CodeMirror-gutters { position: absolute; left: 0px; top: 0px; padding-bottom: 30px; z-index: 3; }
.CodeMirror-gutter { white-space: normal; height: 100%; box-sizing: content-box; padding-bottom: 30px; margin-bottom: -32px; display: inline-block; }
.CodeMirror-gutter-wrapper { position: absolute; z-index: 4; border: none !important; background-position: 0px 0px !important; background-repeat: initial initial !important; }
.CodeMirror-gutter-background { position: absolute; top: 0px; bottom: 0px; z-index: 4; }
.CodeMirror-gutter-elt { position: absolute; cursor: default; z-index: 4; }
.CodeMirror-lines { cursor: text; }
.CodeMirror pre { border-top-left-radius: 0px; border-top-right-radius: 0px; border-bottom-right-radius: 0px; border-bottom-left-radius: 0px; border-width: 0px; font-family: inherit; font-size: inherit; margin: 0px; white-space: pre; word-wrap: normal; color: inherit; z-index: 2; position: relative; overflow: visible; background-position: 0px 0px; background-repeat: initial initial; }
.CodeMirror-wrap pre { word-wrap: break-word; white-space: pre-wrap; word-break: normal; }
.CodeMirror-code pre { border-right-width: 30px; border-right-style: solid; border-right-color: transparent; width: fit-content; }
.CodeMirror-wrap .CodeMirror-code pre { border-right-style: none; width: auto; }
.CodeMirror-linebackground { position: absolute; left: 0px; right: 0px; top: 0px; bottom: 0px; z-index: 0; }
.CodeMirror-linewidget { position: relative; z-index: 2; overflow: auto; }
.CodeMirror-wrap .CodeMirror-scroll { overflow-x: hidden; }
.CodeMirror-measure { position: absolute; width: 100%; height: 0px; overflow: hidden; visibility: hidden; }
.CodeMirror-measure pre { position: static; }
.CodeMirror div.CodeMirror-cursor { position: absolute; visibility: hidden; border-right-style: none; width: 0px; }
.CodeMirror div.CodeMirror-cursor { visibility: hidden; }
.CodeMirror-focused div.CodeMirror-cursor { visibility: inherit; }
.cm-searching { background-color: rgba(255, 255, 0, 0.4); background-position: initial initial; background-repeat: initial initial; }
@media print {
  .CodeMirror div.CodeMirror-cursor { visibility: hidden; }
}


:root {
    --side-bar-bg-color: #fafafa;
    --control-text-color: #777;
}

@include-when-export url(https://fonts.loli.net/css?family=Open+Sans:400italic,700italic,700,400&amp;subset=latin,latin-ext);

html {
    font-size: 16px;
}

body {
    font-family: &quot;Open Sans&quot;,&quot;Clear Sans&quot;,&quot;Helvetica Neue&quot;,Helvetica,Arial,sans-serif;
    color: rgb(51, 51, 51);
    line-height: 1.6;
}

#write {
    max-width: 860px;
  	margin: 0 auto;
  	padding: 30px;
    padding-bottom: 100px;
}
#write &gt; ul:first-child,
#write &gt; ol:first-child{
    margin-top: 30px;
}

a {
    color: #4183C4;
}
h1,
h2,
h3,
h4,
h5,
h6 {
    position: relative;
    margin-top: 1rem;
    margin-bottom: 1rem;
    font-weight: bold;
    line-height: 1.4;
    cursor: text;
}
h1:hover a.anchor,
h2:hover a.anchor,
h3:hover a.anchor,
h4:hover a.anchor,
h5:hover a.anchor,
h6:hover a.anchor {
    text-decoration: none;
}
h1 tt,
h1 code {
    font-size: inherit;
}
h2 tt,
h2 code {
    font-size: inherit;
}
h3 tt,
h3 code {
    font-size: inherit;
}
h4 tt,
h4 code {
    font-size: inherit;
}
h5 tt,
h5 code {
    font-size: inherit;
}
h6 tt,
h6 code {
    font-size: inherit;
}
h1 {
    padding-bottom: .3em;
    font-size: 2.25em;
    line-height: 1.2;
    border-bottom: 1px solid #eee;
}
h2 {
   padding-bottom: .3em;
    font-size: 1.75em;
    line-height: 1.225;
    border-bottom: 1px solid #eee;
}
h3 {
    font-size: 1.5em;
    line-height: 1.43;
}
h4 {
    font-size: 1.25em;
}
h5 {
    font-size: 1em;
}
h6 {
   font-size: 1em;
    color: #777;
}
p,
blockquote,
ul,
ol,
dl,
table{
    margin: 0.8em 0;
}
li&gt;ol,
li&gt;ul {
    margin: 0 0;
}
hr {
    height: 2px;
    padding: 0;
    margin: 16px 0;
    background-color: #e7e7e7;
    border: 0 none;
    overflow: hidden;
    box-sizing: content-box;
}

li p.first {
    display: inline-block;
}
ul,
ol {
    padding-left: 30px;
}
ul:first-child,
ol:first-child {
    margin-top: 0;
}
ul:last-child,
ol:last-child {
    margin-bottom: 0;
}
blockquote {
    border-left: 4px solid #dfe2e5;
    padding: 0 15px;
    color: #777777;
}
blockquote blockquote {
    padding-right: 0;
}
table {
    padding: 0;
    word-break: initial;
}
table tr {
    border-top: 1px solid #dfe2e5;
    margin: 0;
    padding: 0;
}
table tr:nth-child(2n),
thead {
    background-color: #f8f8f8;
}
table tr th {
    font-weight: bold;
    border: 1px solid #dfe2e5;
    border-bottom: 0;
    text-align: left;
    margin: 0;
    padding: 6px 13px;
}
table tr td {
    border: 1px solid #dfe2e5;
    text-align: left;
    margin: 0;
    padding: 6px 13px;
}
table tr th:first-child,
table tr td:first-child {
    margin-top: 0;
}
table tr th:last-child,
table tr td:last-child {
    margin-bottom: 0;
}

.CodeMirror-lines {
    padding-left: 4px;
}

.code-tooltip {
    box-shadow: 0 1px 1px 0 rgba(0,28,36,.3);
    border-top: 1px solid #eef2f2;
}

.md-fences,
code,
tt {
    border: 1px solid #e7eaed;
    background-color: #f8f8f8;
    border-radius: 3px;
    padding: 0;
    padding: 2px 4px 0px 4px;
    font-size: 0.9em;
}

code {
    background-color: #f3f4f4;
    padding: 0 2px 0 2px;
}

.md-fences {
    margin-bottom: 15px;
    margin-top: 15px;
    padding-top: 8px;
    padding-bottom: 6px;
}


.md-task-list-item &gt; input {
  margin-left: -1.3em;
}

@media print {
    html {
        font-size: 13px;
    }
    table,
    pre {
        page-break-inside: avoid;
    }
    pre {
        word-wrap: break-word;
    }
}

.md-fences {
	background-color: #f8f8f8;
}
#write pre.md-meta-block {
	padding: 1rem;
    font-size: 85%;
    line-height: 1.45;
    background-color: #f7f7f7;
    border: 0;
    border-radius: 3px;
    color: #777777;
    margin-top: 0 !important;
}

.mathjax-block&gt;.code-tooltip {
	bottom: .375rem;
}

.md-mathjax-midline {
    background: #fafafa;
}

#write&gt;h3.md-focus:before{
	left: -1.5625rem;
	top: .375rem;
}
#write&gt;h4.md-focus:before{
	left: -1.5625rem;
	top: .285714286rem;
}
#write&gt;h5.md-focus:before{
	left: -1.5625rem;
	top: .285714286rem;
}
#write&gt;h6.md-focus:before{
	left: -1.5625rem;
	top: .285714286rem;
}
.md-image&gt;.md-meta {
    /*border: 1px solid #ddd;*/
    border-radius: 3px;
    padding: 2px 0px 0px 4px;
    font-size: 0.9em;
    color: inherit;
}

.md-tag {
    color: #a7a7a7;
    opacity: 1;
}

.md-toc {
    margin-top:20px;
    padding-bottom:20px;
}

.sidebar-tabs {
    border-bottom: none;
}

#typora-quick-open {
    border: 1px solid #ddd;
    background-color: #f8f8f8;
}

#typora-quick-open-item {
    background-color: #FAFAFA;
    border-color: #FEFEFE #e5e5e5 #e5e5e5 #eee;
    border-style: solid;
    border-width: 1px;
}

/** focus mode */
.on-focus-mode blockquote {
    border-left-color: rgba(85, 85, 85, 0.12);
}

header, .context-menu, .megamenu-content, footer{
    font-family: &quot;Segoe UI&quot;, &quot;Arial&quot;, sans-serif;
}

.file-node-content:hover .file-node-icon,
.file-node-content:hover .file-node-open-state{
    visibility: visible;
}

.mac-seamless-mode #typora-sidebar {
    background-color: #fafafa;
    background-color: var(--side-bar-bg-color);
}

.md-lang {
    color: #b4654d;
}

.html-for-mac .context-menu {
    --item-hover-bg-color: #E6F0FE;
}

#md-notification .btn {
    border: 0;
}

.dropdown-menu .divider {
    border-color: #e5e5e5;
}

 .typora-export li, .typora-export p, .typora-export,  .footnote-line {white-space: normal;}
&lt;/style&gt;
&lt;/head&gt;
&lt;body class='typora-export' &gt;
&lt;div  id='write'  class = 'is-mac'&gt;&lt;h3&gt;&lt;a name='header-n0' class='md-header-anchor '&gt;&lt;/a&gt;플러터 다국어 지원 - Flutter Internalization&lt;/h3&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;intl 패키지와 툴 써서 번역하기&lt;/p&gt;&lt;ul&gt;&lt;li&gt;arb란?&lt;/li&gt;&lt;li&gt;intl 이란?&lt;/li&gt;&lt;li&gt;intl - message, format, number&lt;/li&gt;&lt;li&gt;intl 툴로 arb 추출하기&lt;/li&gt;&lt;li&gt;app에 다국어 적용하기&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;플러터 다국어 지원은 좀 까다롭습니다. Intl.message를 .arb 파일로 바꾼 뒤 읽어들여야 하죠. &lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h6&gt;&lt;a name='header-n18' class='md-header-anchor '&gt;&lt;/a&gt;.arb 파일이란?&lt;/h6&gt;&lt;p&gt;arb(Application Resource Bundle)는 구글에서 만든, 파일 형식입니다. &lt;/p&gt;&lt;p&gt;언어 데이터를 저장했다가 번역하기 위해 쓰이죠. 단순한 형태의 json 파일이라고 보면 됩니다. &lt;/p&gt;&lt;p&gt;플러터에선 arb 말곤 다국어지원을 안해서, 어쨌든 arb 파일 다루는 법을 알아야합니다. &lt;/p&gt;&lt;p&gt;Google Translators Toolkit도 .arb 파일형식을 지원하고 있습니다. &lt;/p&gt;&lt;h5&gt;&lt;a name='header-n24' class='md-header-anchor '&gt;&lt;/a&gt;intl 란?&lt;/h5&gt;&lt;p&gt;intl은 다트에서 다국어 (internalization and localization)을 지원하는 패키지입니다. 언어 번역이나 단수/복수, 성별, 날짜/숫자를 그 지역이나 국가에 맞게 바꿀 때 씁니다. &lt;/p&gt;&lt;h3&gt;&lt;a name='header-n26' class='md-header-anchor '&gt;&lt;/a&gt;1. Intl.message&lt;/h3&gt;&lt;p&gt;일단 패키지들을 설치하고 설명을 따라해보세요.&lt;/p&gt;&lt;h6&gt;&lt;a name='header-n28' class='md-header-anchor '&gt;&lt;/a&gt;1.1 pubspec.yaml 설정&lt;/h6&gt;&lt;p&gt;intl 패캐지와 intl_translation 패키지를 추가해주세요.&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;pubspec.yaml&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;pubspec.yaml&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;span&gt;&lt;span&gt;​&lt;/span&gt;x&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;dependencies:&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  flutter:&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  sdk: flutter&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  flutter_localizations: &lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  sdk: flutter&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  intl: ^0.15.8&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;dev_dependencies:&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  flutter_test:&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  sdk: flutter&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  intl_translation: ^0.17.1&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 264px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 264px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;h6&gt;&lt;a name='header-n31' class='md-header-anchor '&gt;&lt;/a&gt;1.2 Intl.message() 사용해보기&lt;/h6&gt;&lt;p&gt;Messages는 번역할 문자들을 말합니다.
이 문자들을 필요할 때, 한번에 추출해 번역합니다. &lt;/p&gt;&lt;p&gt;Intl.message()은 문자를 담은 함수로 볼 수 있습니다. &lt;/p&gt;&lt;p&gt;이 함수를 한번 사용해볼께요.&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;dart&quot; style=&quot;page-break-inside: unset;&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;dart&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;cm-string&quot;&gt;'package:intl/intl.dart'&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;String&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;helloWorld&lt;/span&gt;() &lt;span class=&quot;cm-operator&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;Intl&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;message&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;&quot;Hello World&quot;&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;name&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;&quot;helloWorld&quot;&lt;/span&gt;, &lt;span class=&quot;cm-comment&quot;&gt;// 함수랑 동일&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;args&lt;/span&gt;: [],&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;desc&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;&quot;Hello world message&quot;&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;String&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;openButton&lt;/span&gt;() &lt;span class=&quot;cm-operator&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;Intl&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;message&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;&quot;open button&quot;&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;name&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;'openButton'&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;args&lt;/span&gt;: [],&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;desc&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;&quot;This is an open button&quot;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;main&lt;/span&gt;() {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;helloWorld&lt;/span&gt;());&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;openButton&lt;/span&gt;());&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 374px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 374px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;일반 문자랑 큰 차이없이 쓰이죠?
다만 Intl.message의 name은 꼭 함수이름이랑 일치해야지
나중에 .arb 파일로 추출할 수 있습니다.&lt;/p&gt;&lt;h6&gt;&lt;a name='header-n38' class='md-header-anchor '&gt;&lt;/a&gt;1.3 Flutter에서 Intl.message 사용해보기&lt;/h6&gt;&lt;p&gt;위젯 코드는 보통때처럼 main.dart에 작성하고&lt;/p&gt;&lt;p&gt;Intl.message는 i18n/messages 클래스에 작성하겠습니다. &lt;/p&gt;&lt;p&gt;&lt;strong&gt;main.dart 파일&lt;/strong&gt;&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;dart&quot; style=&quot;page-break-inside: unset;&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;dart&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;cm-string&quot;&gt;'package:flutter/material.dart'&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;cm-string&quot;&gt;'i18n/messages.dart'&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;main&lt;/span&gt;() &lt;span class=&quot;cm-operator&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;runApp&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;MyApp&lt;/span&gt;());&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;final&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;msg&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;Messages&lt;/span&gt;();&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;MyApp&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;extends&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;StatelessWidget&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-meta&quot;&gt;@override&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;Widget&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;build&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;BuildContext&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;context&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;MaterialApp&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;title&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;'Flutter Demo'&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;theme&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;ThemeData&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;primarySwatch&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;Colors&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;blue&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;  ),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;home&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;MyHomePage&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;title&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;'Flutter Demo Home Page'&lt;/span&gt;),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  );&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;MyHomePage&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;extends&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;StatefulWidget&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;MyHomePage&lt;/span&gt;({&lt;span class=&quot;cm-variable&quot;&gt;Key&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;key&lt;/span&gt;, &lt;span class=&quot;cm-keyword&quot;&gt;this&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;title&lt;/span&gt;}) : &lt;span class=&quot;cm-keyword&quot;&gt;super&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;key&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;key&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;final&lt;/span&gt; &lt;span class=&quot;cm-builtin&quot;&gt;String&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;title&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-meta&quot;&gt;@override&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;_MyHomePageState&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;createState&lt;/span&gt;() &lt;span class=&quot;cm-operator&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;_MyHomePageState&lt;/span&gt;();&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;_MyHomePageState&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;extends&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;State&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-variable&quot;&gt;MyHomePage&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;gt;&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-meta&quot;&gt;@override&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;initState&lt;/span&gt;() {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;msg&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;widgetMessage&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;super&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;initState&lt;/span&gt;();&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-meta&quot;&gt;@override&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;Widget&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;build&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;BuildContext&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;context&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;Scaffold&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;appBar&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;AppBar&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;title&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;Text&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;msg&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;appName&lt;/span&gt;),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;  ),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;body&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;Center&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;child&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;Column&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;mainAxisAlignment&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;MainAxisAlignment&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;center&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;children&lt;/span&gt;: &lt;span class=&quot;cm-operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-variable&quot;&gt;Widget&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;gt;&lt;/span&gt;[&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;Text&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-string&quot;&gt;'&lt;/span&gt;${&lt;span class=&quot;cm-variable&quot;&gt;msg&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;widgetMessage&lt;/span&gt;}&lt;span class=&quot;cm-string&quot;&gt;'&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;  ),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;  ],&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;  ),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;  ),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  );&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 1254px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 1254px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;Message에다가 Intl.message를 모아놓습니다. 이래야 관리하기 편하더군요.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;i18n/messages.dart 파일&lt;/strong&gt;&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;import 'package:intl/intl.dart';&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;class Messages {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  String get widgetMessage =&amp;gt; Intl.message(&quot;widget message&quot;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  name: &quot;widgetMessage&quot;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  );&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  String get appName =&amp;gt; Intl.message(&quot;widget message&quot;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;  name: &quot;appName&quot;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  );&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 264px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 264px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;h3&gt;&lt;a name='header-n46' class='md-header-anchor '&gt;&lt;/a&gt;2. 다국어 적용&lt;/h3&gt;&lt;p&gt;이제 문자열 번역을 해보겠습니다. &lt;/p&gt;&lt;p&gt;문자열 번역은 크게 4단계에요.&lt;/p&gt;&lt;p&gt;-1. intl message를 .arb로 추출하기
-2. arb로 파일들 번역하기
-3. arb를 message_xx.dart로 바꿔주기
-4. app에 적용하기 &lt;/p&gt;&lt;h6&gt;&lt;a name='header-n51' class='md-header-anchor '&gt;&lt;/a&gt;2.1 intl의 messages를 추출해 arb 파일 만들기&lt;/h6&gt;&lt;p&gt;intl_translation 패키지는 arb를 만드는 명령어를 지원합니다. &lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;em&gt;flutter pub run intl_translation:extract_to_arb --output-dir=[저장될 경로] [arb를 추출할 dart 파일]&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;같은 형식인데요. 경로와 파일을 정해줘야합니다. &lt;/p&gt;&lt;p&gt;아래 명령을 실행해볼께요.&lt;/p&gt;&lt;p&gt;파일에 있는 &lt;em&gt;Intl.messages()&lt;/em&gt;만 골라서 &lt;em&gt;arb&lt;/em&gt;로 바꿔주는 명령이에요.&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;shell&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;shell&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;flutter pub run intl_translation:extract_to_arb &lt;span class=&quot;cm-attribute&quot;&gt;--output-dir&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt;lib/i18n lib/i18n/messages.dart&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 44px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 44px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;실행하면 &lt;strong&gt;intl_messages.arb&lt;/strong&gt; 이 생깁니다.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;intl_messages.arb&lt;/strong&gt;를 열어볼께요.&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;json&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;json&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;{&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-string cm-property&quot;&gt;&quot;@@last_modified&quot;&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;&quot;2019-07-02T08:43:15.261695&quot;&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-string cm-property&quot;&gt;&quot;widgetMessage&quot;&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;&quot;widget message&quot;&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-string cm-property&quot;&gt;&quot;@widgetMessage&quot;&lt;/span&gt;: {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-string cm-property&quot;&gt;&quot;type&quot;&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;&quot;text&quot;&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-string cm-property&quot;&gt;&quot;placeholders&quot;&lt;/span&gt;: {}&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  },&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-string cm-property&quot;&gt;&quot;appName&quot;&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;&quot;widget message&quot;&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-string cm-property&quot;&gt;&quot;@appName&quot;&lt;/span&gt;: {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-string cm-property&quot;&gt;&quot;type&quot;&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;&quot;text&quot;&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-string cm-property&quot;&gt;&quot;placeholders&quot;&lt;/span&gt;: {}&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 286px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 286px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;&lt;strong&gt;messages.dart&lt;/strong&gt; 에서 정의했던 &lt;strong&gt;Intl.message()&lt;/strong&gt;들이 json 형태로 바뀌어 있습니다. &lt;/p&gt;&lt;h6&gt;&lt;a name='header-n62' class='md-header-anchor '&gt;&lt;/a&gt;2.2 arb로 파일들 번역하기&lt;/h6&gt;&lt;p&gt;이제 &lt;strong&gt;intl_messages.arb&lt;/strong&gt; 을 복사해 언어별 파일을 만듭니다. &lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;strong&gt;&lt;em&gt;intl_en.arb&lt;/em&gt;&lt;/strong&gt;&lt;/li&gt;&lt;li&gt;&lt;strong&gt;&lt;em&gt;intl_ko.arb&lt;/em&gt;&lt;/strong&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;만든 arb을 언어에 맞게 수정해주면 되겠죠. &lt;/p&gt;&lt;p&gt;arb를 수정하는 건 직접 해도 되고, Google Translate Toolkit을 써도 됩니다. &lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;em&gt;intl_ko.arb&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;&quot; style=&quot;page-break-inside: unset;&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;{&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  &quot;@@last_modified&quot;: &quot;2019-07-02T08:23:30.820815&quot;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  &quot;widgetMessage&quot;: &quot;위젯이에요&quot;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  &quot;@widgetMessage&quot;: {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  &quot;description&quot;: &quot;Explains that we will not proceed further until the user presses a key&quot;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  &quot;type&quot;: &quot;text&quot;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  &quot;placeholders&quot;: {}&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  },&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  &quot;appName&quot;: &quot;앱 이름입니다.&quot;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  &quot;@appName&quot;: {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  &quot;type&quot;: &quot;text&quot;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  &quot;placeholders&quot;: {}&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 330px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 330px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;&lt;strong&gt;&lt;em&gt;intl_en.arb&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;&quot; style=&quot;page-break-inside: unset;&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;{&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  &quot;@@last_modified&quot;: &quot;2019-07-02T08:23:30.820815&quot;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  &quot;widgetMessage&quot;: &quot;This is a new widget&quot;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  &quot;@widgetMessage&quot;: {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  &quot;description&quot;: &quot;Explains that we will not proceed further until the user presses a key&quot;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  &quot;type&quot;: &quot;text&quot;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  &quot;placeholders&quot;: {}&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  },&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  &quot;appName&quot;: &quot;My flutter app&quot;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  &quot;@appName&quot;: {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  &quot;type&quot;: &quot;text&quot;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  &quot;placeholders&quot;: {}&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 330px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 330px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;arb 파일을 직접 사용하진 못하고,
플러터에서 쓸 수 있게 dart 파일로 바꿔줘야해요.&lt;/p&gt;&lt;p&gt;arb로부터 변환된 dart 파일은 &lt;strong&gt;message_en.dart&lt;/strong&gt;, &lt;strong&gt;message_ko.dart&lt;/strong&gt; 형식이 됩니다. &lt;/p&gt;&lt;h6&gt;&lt;a name='header-n77' class='md-header-anchor '&gt;&lt;/a&gt;2.3 arb 파일을 dart로 바꾸기&lt;/h6&gt;&lt;p&gt;arb파일을 변환하려면 역시 intl_translation에서 지원하는 명령어를 써야합니다. &lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;em&gt;flutter pub run intl_translation:generate_from_arb --output-dir=[저장될 경로] --no-use-deferred-loading [문자열 있어 있는 다트파일] [번역된 arb 파일들]&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;실행해볼께요.&lt;/p&gt;&lt;p&gt;(맥,리눅스의 경우)&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;shell&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;shell&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;flutter pub run intl_translation:generate_from_arb &lt;span class=&quot;cm-attribute&quot;&gt;--output-dir&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt;lib/i18n &lt;span class=&quot;cm-attribute&quot;&gt;--no-use-deferred-loading&lt;/span&gt; lib/i18n/messages.dart lib/i18n/intl_*.arb&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 44px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 44px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;(윈도우의 경우)&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;shell&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;shell&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;flutter pub run intl_translation:generate_from_arb &lt;span class=&quot;cm-attribute&quot;&gt;--output-dir&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt;lib/i18n &lt;span class=&quot;cm-attribute&quot;&gt;--no-use-deferred-loading&lt;/span&gt; lib/i18n/messages.dart lib /i18n/intl_ko.arb lib/i18n/intl_en.arb&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 44px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 44px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;위 명령을 실행하면 &lt;strong&gt;&lt;em&gt;messages_all.dart, messages_ko.dart, message_en.dart&lt;/em&gt;&lt;/strong&gt; 가 만들어집니다. &lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h6&gt;&lt;a name='header-n87' class='md-header-anchor '&gt;&lt;/a&gt;2.4 app에 적용하기&lt;/h6&gt;&lt;p&gt;다국어 적용은 LocationDelegate 클래스를 써서 합니다. &lt;/p&gt;&lt;p&gt;번역된 message들을 읽어들이고, 어떤 언어를 지원하는지 알아내서 적용하죠.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;i18n/app_localizations.dart&lt;/strong&gt;&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;dart&quot; style=&quot;page-break-inside: unset;&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;dart&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;cm-string&quot;&gt;'dart:async'&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;cm-string&quot;&gt;'package:flutter/material.dart'&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;cm-string&quot;&gt;'package:intl/intl.dart'&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;cm-string&quot;&gt;'messages_all.dart'&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;AppLocalizations&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;Future&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-variable&quot;&gt;AppLocalizations&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;load&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;Locale&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;locale&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;final&lt;/span&gt; &lt;span class=&quot;cm-builtin&quot;&gt;String&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;name&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;locale&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;countryCode&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;cm-atom&quot;&gt;null&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;?&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;locale&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;languageCode&lt;/span&gt; : &lt;span class=&quot;cm-variable&quot;&gt;locale&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;toString&lt;/span&gt;();&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;final&lt;/span&gt; &lt;span class=&quot;cm-builtin&quot;&gt;String&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;localeName&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;Intl&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;canonicalizedLocale&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;name&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;initializeMessages&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;localeName&lt;/span&gt;).&lt;span class=&quot;cm-variable&quot;&gt;then&lt;/span&gt;((&lt;span class=&quot;cm-builtin&quot;&gt;bool&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;_&lt;/span&gt; ) {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;Intl&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;defaultLocale&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;localeName&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;AppLocalizations&lt;/span&gt;();&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  });&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;AppLocalizations&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;of&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;BuildContext&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;context&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;Localizations&lt;/span&gt;.&lt;span class=&quot;cm-keyword&quot;&gt;of&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-variable&quot;&gt;AppLocalizations&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;gt;&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;context&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;AppLocalizations&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;AppLocalizationDelegate&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;extends&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;LocalizationsDelegate&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-variable&quot;&gt;AppLocalizations&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;gt;&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-meta&quot;&gt;@override&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;bool&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;isSupported&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;Locale&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;locale&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;return&lt;/span&gt; [&lt;span class=&quot;cm-string&quot;&gt;'en'&lt;/span&gt;, &lt;span class=&quot;cm-string&quot;&gt;'ko'&lt;/span&gt;].&lt;span class=&quot;cm-variable&quot;&gt;contains&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;locale&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;languageCode&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-meta&quot;&gt;@override&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;Future&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-variable&quot;&gt;AppLocalizations&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;load&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;Locale&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;locale&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;AppLocalizations&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;load&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;locale&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-meta&quot;&gt;@override&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;bool&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;shouldReload&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;LocalizationsDelegate&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-variable&quot;&gt;AppLocalizations&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;old&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;cm-atom&quot;&gt;false&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 880px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 880px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;AppLocalizationDelegate()를 위젯에 적용해보도록 할께요.&lt;/p&gt;&lt;p&gt;MaterialApp()의 localizationsDelegates 속성과, supportedLocales 속성을 바꿔줘야합니다.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;main.dart&lt;/strong&gt;&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;dart&quot; style=&quot;page-break-inside: unset;&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;dart&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;cm-string&quot;&gt;'package:flutter/material.dart'&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;cm-string&quot;&gt;'package:flutter_localizations/flutter_localizations.dart'&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;cm-string&quot;&gt;'package:flutter_internalization/i18n/app_localizations.dart'&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;cm-string&quot;&gt;'i18n/messages.dart'&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;main&lt;/span&gt;() &lt;span class=&quot;cm-operator&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;runApp&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;MyApp&lt;/span&gt;());&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;final&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;msg&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;Messages&lt;/span&gt;();&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;MyApp&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;extends&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;StatelessWidget&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-meta&quot;&gt;@override&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;Widget&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;build&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;BuildContext&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;context&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;MaterialApp&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;title&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;'Flutter Demo'&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;localizationsDelegates&lt;/span&gt;: [&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;AppLocalizationDelegate&lt;/span&gt;(),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;GlobalMaterialLocalizations&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;delegate&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;GlobalWidgetsLocalizations&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;delegate&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;  ],&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;supportedLocales&lt;/span&gt;: [&lt;span class=&quot;cm-variable&quot;&gt;Locale&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;&quot;en&quot;&lt;/span&gt;), &lt;span class=&quot;cm-variable&quot;&gt;Locale&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;&quot;ko&quot;&lt;/span&gt;)],&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;theme&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;ThemeData&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;primarySwatch&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;Colors&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;blue&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;  ),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;home&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;MyHomePage&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;title&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;'Flutter Demo Home Page'&lt;/span&gt;),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  );&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 594px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 594px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;전체 프로젝트 구조입니다.&lt;/p&gt;&lt;p&gt;&lt;img src='https://user-images.githubusercontent.com/13621579/60474319-317b8f80-9cac-11e9-86fa-bae3f186ec61.png' alt='링크2' referrerPolicy='no-referrer' /&gt;&lt;/p&gt;&lt;hr /&gt;&lt;h3&gt;&lt;a name='header-n100' class='md-header-anchor '&gt;&lt;/a&gt;3. iOS의 경우&lt;/h3&gt;&lt;p&gt;ios의 경우 Info.plist 도 업데이트 해줘야합니다. &lt;/p&gt;&lt;p&gt;번역 하려는 locale을 추가해야합니다.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Info.plist&lt;/strong&gt;&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm&quot; lang=&quot;xml&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;xml&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;key&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;CFBundleLocalizations&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;key&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;array&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-tab&quot; role=&quot;presentation&quot; cm-text=&quot;	&quot;&gt;  &lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;string&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;en&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;string&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-tab&quot; role=&quot;presentation&quot; cm-text=&quot;	&quot;&gt;  &lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;string&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;ko&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;string&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;array&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 110px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 110px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;이번 글에서는 플러터 다국어 지원을 알아보았는데요. &lt;/p&gt;&lt;p&gt;xml 간단히 수정하던 안드로이드에 비하면 번거롭긴 합니다. &lt;/p&gt;&lt;p&gt;해외 출시를 계획중이라면 미리미리 다국어 지원을 해놓기를 권합니다. &lt;/p&gt;&lt;p&gt;한꺼번에 하려면 무척 할 일이 많더군요. (제가 그랬습니다.)&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;이번 글에 쓰인 코드는 &lt;a href='https://github.com/Hochul822/flutter_internalization_example'&gt;깃허브&lt;/a&gt; 에서 확인할 수 있습니다~!&lt;/p&gt;&lt;p&gt;그럼 다음 플러터 글에서 뵐께요 :)&lt;/p&gt;&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;</description>
      <category>플러터(Flutter)</category>
      <category>flutter internalization</category>
      <category>flutter localization</category>
      <category>플러터다국어</category>
      <category>플러터멀티랭귀지</category>
      <category>플러터언어</category>
      <category>플러터여러언어</category>
      <author>에드 신</author>
      <guid isPermaLink="true">https://software-creator.tistory.com/24</guid>
      <comments>https://software-creator.tistory.com/24#entry24comment</comments>
      <pubDate>Tue, 2 Jul 2019 13:42:55 +0900</pubDate>
    </item>
    <item>
      <title>Flutter - CustomPainter로 차트(그래프) 그려보기</title>
      <link>https://software-creator.tistory.com/23</link>
      <description>&lt;!doctype html&gt;
&lt;html&gt;
&lt;head&gt;
&lt;meta charset='UTF-8'&gt;&lt;meta name='viewport' content='width=device-width initial-scale=1'&gt;
&lt;meta name=&quot;description&quot; content=&quot;플러터를 쓰다보니 입맛에 딱 맞는 그래프 라이브러리가 없더군요.그래서 **CustomPainter(커스텀 페인터)**를 공부해서 직접 차트를 만들어보고 있습니다. 그 과정에서 정리한 걸 공유하려고 합니다!글을 마칠 때는 아래 같은 차트를 그릴 수 있게 될 거에요.&quot;/&gt;
&lt;title&gt;flutter-paint&lt;/title&gt;&lt;link href='https://fonts.loli.net/css?family=Open+Sans:400italic,700italic,700,400&amp;subset=latin,latin-ext' rel='stylesheet' type='text/css' /&gt;&lt;style type='text/css'&gt;html {overflow-x: initial !important;}:root { --bg-color: #ffffff; --text-color: #333333; --select-text-bg-color: #B5D6FC; --select-text-font-color: auto; --monospace: &quot;Lucida Console&quot;,Consolas,&quot;Courier&quot;,monospace; }
html { font-size: 14px; background-color: var(--bg-color); color: var(--text-color); font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; -webkit-font-smoothing: antialiased; }
body { margin: 0px; padding: 0px; height: auto; bottom: 0px; top: 0px; left: 0px; right: 0px; font-size: 1rem; line-height: 1.42857143; overflow-x: hidden; background-image: inherit; background-size: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: inherit; tab-size: 4; background-position: inherit inherit; background-repeat: inherit inherit; }
iframe { margin: auto; }
a.url { word-break: break-all; }
a:active, a:hover { outline: 0px; }
.in-text-selection, ::selection { text-shadow: none; background: var(--select-text-bg-color); color: var(--select-text-font-color); }
#write { margin: 0px auto; height: auto; width: inherit; word-break: normal; word-wrap: break-word; position: relative; white-space: normal; overflow-x: visible; padding-top: 40px; }
#write.first-line-indent p { text-indent: 2em; }
#write.first-line-indent li p, #write.first-line-indent p * { text-indent: 0px; }
#write.first-line-indent li { margin-left: 2em; }
.for-image #write { padding-left: 8px; padding-right: 8px; }
body.typora-export { padding-left: 30px; padding-right: 30px; }
.typora-export .footnote-line, .typora-export li, .typora-export p { white-space: pre-wrap; }
@media screen and (max-width: 500px) {
  body.typora-export { padding-left: 0px; padding-right: 0px; }
  #write { padding-left: 20px; padding-right: 20px; }
  .CodeMirror-sizer { margin-left: 0px !important; }
  .CodeMirror-gutters { display: none !important; }
}
#write li &gt; figure:last-child { margin-bottom: 0.5rem; }
#write ol, #write ul { position: relative; }
img { max-width: 100%; vertical-align: middle; }
button, input, select, textarea { color: inherit; font-family: inherit; font-size: inherit; font-style: inherit; font-variant-caps: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; }
input[type=&quot;checkbox&quot;], input[type=&quot;radio&quot;] { line-height: normal; padding: 0px; }
*, ::after, ::before { box-sizing: border-box; }
#write h1, #write h2, #write h3, #write h4, #write h5, #write h6, #write p, #write pre { width: inherit; }
#write h1, #write h2, #write h3, #write h4, #write h5, #write h6, #write p { position: relative; }
h1, h2, h3, h4, h5, h6 { break-after: avoid-page; break-inside: avoid; orphans: 2; }
p { orphans: 4; }
h1 { font-size: 2rem; }
h2 { font-size: 1.8rem; }
h3 { font-size: 1.6rem; }
h4 { font-size: 1.4rem; }
h5 { font-size: 1.2rem; }
h6 { font-size: 1rem; }
.md-math-block, .md-rawblock, h1, h2, h3, h4, h5, h6, p { margin-top: 1rem; margin-bottom: 1rem; }
.hidden { display: none; }
.md-blockmeta { color: rgb(204, 204, 204); font-weight: 700; font-style: italic; }
a { cursor: pointer; }
sup.md-footnote { padding: 2px 4px; background-color: rgba(238, 238, 238, 0.701961); color: rgb(85, 85, 85); border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; cursor: pointer; }
sup.md-footnote a, sup.md-footnote a:hover { color: inherit; text-transform: inherit; text-decoration: inherit; }
#write input[type=&quot;checkbox&quot;] { cursor: pointer; width: inherit; height: inherit; }
figure { overflow-x: auto; margin: 1.2em 0px; max-width: calc(100% + 16px); padding: 0px; }
figure &gt; table { margin: 0px !important; }
tr { break-inside: avoid; break-after: auto; }
thead { display: table-header-group; }
table { border-collapse: collapse; border-spacing: 0px; width: 100%; overflow: auto; break-inside: auto; text-align: left; }
table.md-table td { min-width: 32px; }
.CodeMirror-gutters { border-right-width: 0px; background-color: inherit; }
.CodeMirror-linenumber { }
.CodeMirror { text-align: left; }
.CodeMirror-placeholder { opacity: 0.3; }
.CodeMirror pre { padding: 0px 4px; }
.CodeMirror-lines { padding: 0px; }
div.hr:focus { cursor: none; }
#write pre { white-space: pre-wrap; }
#write.fences-no-line-wrapping pre { white-space: pre; }
#write pre.ty-contain-cm { white-space: normal; }
.CodeMirror-gutters { margin-right: 4px; }
.md-fences { font-size: 0.9rem; display: block; break-inside: avoid; text-align: left; overflow: visible; white-space: pre; background-image: inherit; background-size: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: inherit; position: relative !important; background-position: inherit inherit; background-repeat: inherit inherit; }
.md-diagram-panel { width: 100%; margin-top: 10px; text-align: center; padding-top: 0px; padding-bottom: 8px; overflow-x: auto; }
#write .md-fences.mock-cm { white-space: pre-wrap; }
.md-fences.md-fences-with-lineno { padding-left: 0px; }
#write.fences-no-line-wrapping .md-fences.mock-cm { white-space: pre; overflow-x: auto; }
.md-fences.mock-cm.md-fences-with-lineno { padding-left: 8px; }
.CodeMirror-line, twitterwidget { break-inside: avoid; }
.footnotes { opacity: 0.8; font-size: 0.9rem; margin-top: 1em; margin-bottom: 1em; }
.footnotes + .footnotes { margin-top: 0px; }
.md-reset { margin: 0px; padding: 0px; border: 0px; outline: 0px; vertical-align: top; text-decoration: none; text-shadow: none; float: none; position: static; width: auto; height: auto; white-space: nowrap; cursor: inherit; line-height: normal; font-weight: 400; text-align: left; box-sizing: content-box; direction: ltr; background-position: 0px 0px; background-repeat: initial initial; }
li div { padding-top: 0px; }
blockquote { margin: 1rem 0px; }
li .mathjax-block, li p { margin: 0.5rem 0px; }
li { margin: 0px; position: relative; }
blockquote &gt; :last-child { margin-bottom: 0px; }
blockquote &gt; :first-child, li &gt; :first-child { margin-top: 0px; }
.footnotes-area { color: rgb(136, 136, 136); margin-top: 0.714rem; padding-bottom: 0.143rem; white-space: normal; }
#write .footnote-line { white-space: pre-wrap; }
@media print {
  body, html { border: 1px solid transparent; height: 99%; break-after: avoid-page; break-before: avoid-page; }
  #write { margin-top: 0px; padding-top: 0px; border-color: transparent !important; }
  .typora-export * { -webkit-print-color-adjust: exact; }
  html.blink-to-pdf { font-size: 13px; }
  .typora-export #write { padding-left: 32px; padding-right: 32px; padding-bottom: 0px; break-after: avoid-page; }
  .typora-export #write::after { height: 0px; }
  @page { margin: 20mm 0px; }
}
.footnote-line { margin-top: 0.714em; font-size: 0.7em; }
a img, img a { cursor: pointer; }
pre.md-meta-block { font-size: 0.8rem; min-height: 0.8rem; white-space: pre-wrap; background-color: rgb(204, 204, 204); display: block; overflow-x: hidden; background-position: initial initial; background-repeat: initial initial; }
p &gt; .md-image:only-child:not(.md-img-error) img, p &gt; img:only-child { display: block; margin: auto; }
p &gt; .md-image:only-child { display: inline-block; width: 100%; }
#write .MathJax_Display { margin: 0.8em 0px 0px; }
.md-math-block { width: 100%; }
.md-math-block:not(:empty)::after { display: none; }
[contenteditable=&quot;true&quot;]:active, [contenteditable=&quot;true&quot;]:focus { outline: 0px; box-shadow: none; }
.md-task-list-item { position: relative; list-style-type: none; }
.task-list-item.md-task-list-item { padding-left: 0px; }
.md-task-list-item &gt; input { position: absolute; top: 0px; left: 0px; margin-left: -1.2em; margin-top: calc(1em - 10px); border: none; }
.math { font-size: 1rem; }
.md-toc { min-height: 3.58rem; position: relative; font-size: 0.9rem; border-top-left-radius: 10px; border-top-right-radius: 10px; border-bottom-right-radius: 10px; border-bottom-left-radius: 10px; }
.md-toc-content { position: relative; margin-left: 0px; }
.md-toc-content::after, .md-toc::after { display: none; }
.md-toc-item { display: block; color: rgb(65, 131, 196); }
.md-toc-item a { text-decoration: none; }
.md-toc-inner:hover { text-decoration: underline; }
.md-toc-inner { display: inline-block; cursor: pointer; }
.md-toc-h1 .md-toc-inner { margin-left: 0px; font-weight: 700; }
.md-toc-h2 .md-toc-inner { margin-left: 2em; }
.md-toc-h3 .md-toc-inner { margin-left: 4em; }
.md-toc-h4 .md-toc-inner { margin-left: 6em; }
.md-toc-h5 .md-toc-inner { margin-left: 8em; }
.md-toc-h6 .md-toc-inner { margin-left: 10em; }
@media screen and (max-width: 48em) {
  .md-toc-h3 .md-toc-inner { margin-left: 3.5em; }
  .md-toc-h4 .md-toc-inner { margin-left: 5em; }
  .md-toc-h5 .md-toc-inner { margin-left: 6.5em; }
  .md-toc-h6 .md-toc-inner { margin-left: 8em; }
}
a.md-toc-inner { font-size: inherit; font-style: inherit; font-weight: inherit; line-height: inherit; }
.footnote-line a:not(.reversefootnote) { color: inherit; }
.md-attr { display: none; }
.md-fn-count::after { content: &quot;.&quot;; }
code, pre, samp, tt { font-family: var(--monospace); }
kbd { margin: 0px 0.1em; padding: 0.1em 0.6em; font-size: 0.8em; color: rgb(36, 39, 41); background-color: rgb(255, 255, 255); border: 1px solid rgb(173, 179, 185); border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; box-shadow: rgba(12, 13, 14, 0.2) 0px 1px 0px, rgb(255, 255, 255) 0px 0px 0px 2px inset; white-space: nowrap; vertical-align: middle; background-position: initial initial; background-repeat: initial initial; }
.md-comment { color: rgb(162, 127, 3); opacity: 0.8; font-family: var(--monospace); }
code { text-align: left; }
a.md-print-anchor { white-space: pre !important; border: none !important; display: inline-block !important; position: absolute !important; width: 1px !important; right: 0px !important; outline: 0px !important; text-shadow: initial !important; background-position: 0px 0px !important; background-repeat: initial initial !important; }
.md-inline-math .MathJax_SVG .noError { display: none !important; }
.html-for-mac .inline-math-svg .MathJax_SVG { vertical-align: 0.2px; }
.md-math-block .MathJax_SVG_Display { text-align: center; margin: 0px; position: relative; text-indent: 0px; max-width: none; max-height: none; min-height: 0px; min-width: 100%; width: auto; overflow-y: hidden; display: block !important; }
.MathJax_SVG_Display, .md-inline-math .MathJax_SVG_Display { width: auto; margin: inherit; display: inline-block !important; }
.MathJax_SVG .MJX-monospace { font-family: var(--monospace); }
.MathJax_SVG .MJX-sans-serif { font-family: sans-serif; }
.MathJax_SVG { display: inline; font-style: normal; font-weight: 400; line-height: normal; zoom: 90%; text-indent: 0px; text-align: left; text-transform: none; letter-spacing: normal; word-spacing: normal; word-wrap: normal; white-space: nowrap; float: none; direction: ltr; max-width: none; max-height: none; min-width: 0px; min-height: 0px; border: 0px; padding: 0px; margin: 0px; }
.MathJax_SVG * { transition: none; }
.MathJax_SVG_Display svg { vertical-align: middle !important; margin-bottom: 0px !important; }
.os-windows.monocolor-emoji .md-emoji { font-family: &quot;Segoe UI Symbol&quot;, sans-serif; }
.md-diagram-panel &gt; svg { max-width: 100%; }
[lang=&quot;mermaid&quot;] svg, [lang=&quot;flow&quot;] svg { max-width: 100%; }
[lang=&quot;mermaid&quot;] .node text { font-size: 1rem; }
table tr th { border-bottom-width: 0px; }
video { max-width: 100%; display: block; margin: 0px auto; }
iframe { max-width: 100%; width: 100%; border: none; }
.highlight td, .highlight tr { border: 0px; }


.CodeMirror { height: auto; }
.CodeMirror.cm-s-inner { background-image: inherit; background-size: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: inherit; background-position: inherit inherit; background-repeat: inherit inherit; }
.CodeMirror-scroll { overflow-y: hidden; overflow-x: auto; z-index: 3; }
.CodeMirror-gutter-filler, .CodeMirror-scrollbar-filler { background-color: rgb(255, 255, 255); }
.CodeMirror-gutters { border-right-width: 1px; border-right-style: solid; border-right-color: rgb(221, 221, 221); background-image: inherit; background-size: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: inherit; white-space: nowrap; background-position: inherit inherit; background-repeat: inherit inherit; }
.CodeMirror-linenumber { padding: 0px 3px 0px 5px; text-align: right; color: rgb(153, 153, 153); }
.cm-s-inner .cm-keyword { color: rgb(119, 0, 136); }
.cm-s-inner .cm-atom, .cm-s-inner.cm-atom { color: rgb(34, 17, 153); }
.cm-s-inner .cm-number { color: rgb(17, 102, 68); }
.cm-s-inner .cm-def { color: rgb(0, 0, 255); }
.cm-s-inner .cm-variable { color: rgb(0, 0, 0); }
.cm-s-inner .cm-variable-2 { color: rgb(0, 85, 170); }
.cm-s-inner .cm-variable-3 { color: rgb(0, 136, 85); }
.cm-s-inner .cm-string { color: rgb(170, 17, 17); }
.cm-s-inner .cm-property { color: rgb(0, 0, 0); }
.cm-s-inner .cm-operator { color: rgb(152, 26, 26); }
.cm-s-inner .cm-comment, .cm-s-inner.cm-comment { color: rgb(170, 85, 0); }
.cm-s-inner .cm-string-2 { color: rgb(255, 85, 0); }
.cm-s-inner .cm-meta { color: rgb(85, 85, 85); }
.cm-s-inner .cm-qualifier { color: rgb(85, 85, 85); }
.cm-s-inner .cm-builtin { color: rgb(51, 0, 170); }
.cm-s-inner .cm-bracket { color: rgb(153, 153, 119); }
.cm-s-inner .cm-tag { color: rgb(17, 119, 0); }
.cm-s-inner .cm-attribute { color: rgb(0, 0, 204); }
.cm-s-inner .cm-header, .cm-s-inner.cm-header { color: rgb(0, 0, 255); }
.cm-s-inner .cm-quote, .cm-s-inner.cm-quote { color: rgb(0, 153, 0); }
.cm-s-inner .cm-hr, .cm-s-inner.cm-hr { color: rgb(153, 153, 153); }
.cm-s-inner .cm-link, .cm-s-inner.cm-link { color: rgb(0, 0, 204); }
.cm-negative { color: rgb(221, 68, 68); }
.cm-positive { color: rgb(34, 153, 34); }
.cm-header, .cm-strong { font-weight: 700; }
.cm-del { text-decoration: line-through; }
.cm-em { font-style: italic; }
.cm-link { text-decoration: underline; }
.cm-error { color: red; }
.cm-invalidchar { color: red; }
.cm-constant { color: rgb(38, 139, 210); }
.cm-defined { color: rgb(181, 137, 0); }
div.CodeMirror span.CodeMirror-matchingbracket { color: rgb(0, 255, 0); }
div.CodeMirror span.CodeMirror-nonmatchingbracket { color: rgb(255, 34, 34); }
.cm-s-inner .CodeMirror-activeline-background { background-image: inherit; background-size: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: inherit; background-position: inherit inherit; background-repeat: inherit inherit; }
.CodeMirror { position: relative; overflow: hidden; }
.CodeMirror-scroll { height: 100%; outline: 0px; position: relative; box-sizing: content-box; background-image: inherit; background-size: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: inherit; background-position: inherit inherit; background-repeat: inherit inherit; }
.CodeMirror-sizer { position: relative; }
.CodeMirror-gutter-filler, .CodeMirror-hscrollbar, .CodeMirror-scrollbar-filler, .CodeMirror-vscrollbar { position: absolute; z-index: 6; display: none; }
.CodeMirror-vscrollbar { right: 0px; top: 0px; overflow: hidden; }
.CodeMirror-hscrollbar { bottom: 0px; left: 0px; overflow: hidden; }
.CodeMirror-scrollbar-filler { right: 0px; bottom: 0px; }
.CodeMirror-gutter-filler { left: 0px; bottom: 0px; }
.CodeMirror-gutters { position: absolute; left: 0px; top: 0px; padding-bottom: 30px; z-index: 3; }
.CodeMirror-gutter { white-space: normal; height: 100%; box-sizing: content-box; padding-bottom: 30px; margin-bottom: -32px; display: inline-block; }
.CodeMirror-gutter-wrapper { position: absolute; z-index: 4; border: none !important; background-position: 0px 0px !important; background-repeat: initial initial !important; }
.CodeMirror-gutter-background { position: absolute; top: 0px; bottom: 0px; z-index: 4; }
.CodeMirror-gutter-elt { position: absolute; cursor: default; z-index: 4; }
.CodeMirror-lines { cursor: text; }
.CodeMirror pre { border-top-left-radius: 0px; border-top-right-radius: 0px; border-bottom-right-radius: 0px; border-bottom-left-radius: 0px; border-width: 0px; font-family: inherit; font-size: inherit; margin: 0px; white-space: pre; word-wrap: normal; color: inherit; z-index: 2; position: relative; overflow: visible; background-position: 0px 0px; background-repeat: initial initial; }
.CodeMirror-wrap pre { word-wrap: break-word; white-space: pre-wrap; word-break: normal; }
.CodeMirror-code pre { border-right-width: 30px; border-right-style: solid; border-right-color: transparent; width: fit-content; }
.CodeMirror-wrap .CodeMirror-code pre { border-right-style: none; width: auto; }
.CodeMirror-linebackground { position: absolute; left: 0px; right: 0px; top: 0px; bottom: 0px; z-index: 0; }
.CodeMirror-linewidget { position: relative; z-index: 2; overflow: auto; }
.CodeMirror-wrap .CodeMirror-scroll { overflow-x: hidden; }
.CodeMirror-measure { position: absolute; width: 100%; height: 0px; overflow: hidden; visibility: hidden; }
.CodeMirror-measure pre { position: static; }
.CodeMirror div.CodeMirror-cursor { position: absolute; visibility: hidden; border-right-style: none; width: 0px; }
.CodeMirror div.CodeMirror-cursor { visibility: hidden; }
.CodeMirror-focused div.CodeMirror-cursor { visibility: inherit; }
.cm-searching { background-color: rgba(255, 255, 0, 0.4); background-position: initial initial; background-repeat: initial initial; }
@media print {
  .CodeMirror div.CodeMirror-cursor { visibility: hidden; }
}


:root {
    --side-bar-bg-color: #fafafa;
    --control-text-color: #777;
}

@include-when-export url(https://fonts.loli.net/css?family=Open+Sans:400italic,700italic,700,400&amp;subset=latin,latin-ext);

html {
    font-size: 16px;
}

body {
    font-family: &quot;Open Sans&quot;,&quot;Clear Sans&quot;,&quot;Helvetica Neue&quot;,Helvetica,Arial,sans-serif;
    color: rgb(51, 51, 51);
    line-height: 1.6;
}

#write {
    max-width: 860px;
  	margin: 0 auto;
  	padding: 30px;
    padding-bottom: 100px;
}
#write &gt; ul:first-child,
#write &gt; ol:first-child{
    margin-top: 30px;
}

a {
    color: #4183C4;
}
h1,
h2,
h3,
h4,
h5,
h6 {
    position: relative;
    margin-top: 1rem;
    margin-bottom: 1rem;
    font-weight: bold;
    line-height: 1.4;
    cursor: text;
}
h1:hover a.anchor,
h2:hover a.anchor,
h3:hover a.anchor,
h4:hover a.anchor,
h5:hover a.anchor,
h6:hover a.anchor {
    text-decoration: none;
}
h1 tt,
h1 code {
    font-size: inherit;
}
h2 tt,
h2 code {
    font-size: inherit;
}
h3 tt,
h3 code {
    font-size: inherit;
}
h4 tt,
h4 code {
    font-size: inherit;
}
h5 tt,
h5 code {
    font-size: inherit;
}
h6 tt,
h6 code {
    font-size: inherit;
}
h1 {
    padding-bottom: .3em;
    font-size: 2.25em;
    line-height: 1.2;
    border-bottom: 1px solid #eee;
}
h2 {
   padding-bottom: .3em;
    font-size: 1.75em;
    line-height: 1.225;
    border-bottom: 1px solid #eee;
}
h3 {
    font-size: 1.5em;
    line-height: 1.43;
}
h4 {
    font-size: 1.25em;
}
h5 {
    font-size: 1em;
}
h6 {
   font-size: 1em;
    color: #777;
}
p,
blockquote,
ul,
ol,
dl,
table{
    margin: 0.8em 0;
}
li&gt;ol,
li&gt;ul {
    margin: 0 0;
}
hr {
    height: 2px;
    padding: 0;
    margin: 16px 0;
    background-color: #e7e7e7;
    border: 0 none;
    overflow: hidden;
    box-sizing: content-box;
}

li p.first {
    display: inline-block;
}
ul,
ol {
    padding-left: 30px;
}
ul:first-child,
ol:first-child {
    margin-top: 0;
}
ul:last-child,
ol:last-child {
    margin-bottom: 0;
}
blockquote {
    border-left: 4px solid #dfe2e5;
    padding: 0 15px;
    color: #777777;
}
blockquote blockquote {
    padding-right: 0;
}
table {
    padding: 0;
    word-break: initial;
}
table tr {
    border-top: 1px solid #dfe2e5;
    margin: 0;
    padding: 0;
}
table tr:nth-child(2n),
thead {
    background-color: #f8f8f8;
}
table tr th {
    font-weight: bold;
    border: 1px solid #dfe2e5;
    border-bottom: 0;
    text-align: left;
    margin: 0;
    padding: 6px 13px;
}
table tr td {
    border: 1px solid #dfe2e5;
    text-align: left;
    margin: 0;
    padding: 6px 13px;
}
table tr th:first-child,
table tr td:first-child {
    margin-top: 0;
}
table tr th:last-child,
table tr td:last-child {
    margin-bottom: 0;
}

.CodeMirror-lines {
    padding-left: 4px;
}

.code-tooltip {
    box-shadow: 0 1px 1px 0 rgba(0,28,36,.3);
    border-top: 1px solid #eef2f2;
}

.md-fences,
code,
tt {
    border: 1px solid #e7eaed;
    background-color: #f8f8f8;
    border-radius: 3px;
    padding: 0;
    padding: 2px 4px 0px 4px;
    font-size: 0.9em;
}

code {
    background-color: #f3f4f4;
    padding: 0 2px 0 2px;
}

.md-fences {
    margin-bottom: 15px;
    margin-top: 15px;
    padding-top: 8px;
    padding-bottom: 6px;
}


.md-task-list-item &gt; input {
  margin-left: -1.3em;
}

@media print {
    html {
        font-size: 13px;
    }
    table,
    pre {
        page-break-inside: avoid;
    }
    pre {
        word-wrap: break-word;
    }
}

.md-fences {
	background-color: #f8f8f8;
}
#write pre.md-meta-block {
	padding: 1rem;
    font-size: 85%;
    line-height: 1.45;
    background-color: #f7f7f7;
    border: 0;
    border-radius: 3px;
    color: #777777;
    margin-top: 0 !important;
}

.mathjax-block&gt;.code-tooltip {
	bottom: .375rem;
}

.md-mathjax-midline {
    background: #fafafa;
}

#write&gt;h3.md-focus:before{
	left: -1.5625rem;
	top: .375rem;
}
#write&gt;h4.md-focus:before{
	left: -1.5625rem;
	top: .285714286rem;
}
#write&gt;h5.md-focus:before{
	left: -1.5625rem;
	top: .285714286rem;
}
#write&gt;h6.md-focus:before{
	left: -1.5625rem;
	top: .285714286rem;
}
.md-image&gt;.md-meta {
    /*border: 1px solid #ddd;*/
    border-radius: 3px;
    padding: 2px 0px 0px 4px;
    font-size: 0.9em;
    color: inherit;
}

.md-tag {
    color: #a7a7a7;
    opacity: 1;
}

.md-toc {
    margin-top:20px;
    padding-bottom:20px;
}

.sidebar-tabs {
    border-bottom: none;
}

#typora-quick-open {
    border: 1px solid #ddd;
    background-color: #f8f8f8;
}

#typora-quick-open-item {
    background-color: #FAFAFA;
    border-color: #FEFEFE #e5e5e5 #e5e5e5 #eee;
    border-style: solid;
    border-width: 1px;
}

/** focus mode */
.on-focus-mode blockquote {
    border-left-color: rgba(85, 85, 85, 0.12);
}

header, .context-menu, .megamenu-content, footer{
    font-family: &quot;Segoe UI&quot;, &quot;Arial&quot;, sans-serif;
}

.file-node-content:hover .file-node-icon,
.file-node-content:hover .file-node-open-state{
    visibility: visible;
}

.mac-seamless-mode #typora-sidebar {
    background-color: #fafafa;
    background-color: var(--side-bar-bg-color);
}

.md-lang {
    color: #b4654d;
}

.html-for-mac .context-menu {
    --item-hover-bg-color: #E6F0FE;
}

#md-notification .btn {
    border: 0;
}

.dropdown-menu .divider {
    border-color: #e5e5e5;
}

 .typora-export li, .typora-export p, .typora-export,  .footnote-line {white-space: normal;}
&lt;/style&gt;
&lt;/head&gt;
&lt;body class='typora-export' &gt;
&lt;div  id='write'  class = 'is-mac'&gt;&lt;h3&gt;&lt;a name='header-n0' class='md-header-anchor '&gt;&lt;/a&gt;&lt;strong&gt;Flutter CustomPainter 및 차트 그려보기&lt;/strong&gt;&lt;/h3&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;custom painter란?&lt;/li&gt;&lt;li&gt;canvas, paint&lt;/li&gt;&lt;li&gt;drawLine 등 메소드 사용해보기&lt;/li&gt;&lt;li&gt;그래프 그려보기&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;이 글에 쓰인 소스 코드는  &lt;a href='https://github.com/Hochul822/flutter_chart_example'&gt;Github&lt;/a&gt; 에서찾아보실 수 있습니다.&lt;/p&gt;&lt;hr /&gt;&lt;p&gt;플러터를 쓰다보니 입맛에 딱 맞는 그래프 라이브러리가 없더군요. &lt;/p&gt;&lt;p&gt;그래서 커스텀 페인터를 공부해서 직접 차트를 만들어보고 있습니다. &lt;/p&gt;&lt;p&gt;그 과정에서 정리한 걸 공유하려고 합니다!&lt;/p&gt;&lt;p&gt;글을 마칠 때는 아래 같은 차트를 그릴 수 있게 될 거에요.&lt;/p&gt;&lt;p&gt;&lt;img src='https://user-images.githubusercontent.com/13621579/57852353-eef61480-781d-11e9-976c-865dd0878d08.png' alt='flutter_graph_resize' referrerPolicy='no-referrer' /&gt;&lt;/p&gt;&lt;p&gt;그럼 시작해 볼께요.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h4&gt;&lt;a name='header-n13' class='md-header-anchor '&gt;&lt;/a&gt;1.CustomPainter 란?&lt;/h4&gt;&lt;p&gt;커스텀 페인터는 화면에 직접 UI를 그릴 때 사용합니다. 기존의 UI로 만들기 어려운 화면을 만들고 싶을 때 유용해요.&lt;/p&gt;&lt;p&gt;개인적으론 그래프를 그릴 때 사용했습니다.&lt;/p&gt;&lt;p&gt;직접 UI를 그릴려면 CustomPaint와 CustomPainter 클래스가 있어야 합니다. &lt;/p&gt;&lt;p&gt;용어가 비슷해서 헷갈리는데 정리해볼께요.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h4&gt;&lt;a name='header-n19' class='md-header-anchor '&gt;&lt;/a&gt;1.1CustomPainter와 CustomPaint&lt;/h4&gt;&lt;p&gt;CustomPaint는 Container나, Center 같은 위젯이에요.&lt;/p&gt;&lt;p&gt;CustomPaint는 CustomPainter를 담는 그릇이라고 보면 됩니다. &lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;p&gt;CustomPaint &lt;/p&gt;&lt;ul&gt;&lt;li&gt;Container나, Center 같은 위젯입니다. &lt;/li&gt;&lt;li&gt;painter를 갖고 있습니다. painter에게 화면을 그리도록 합니다.&lt;/li&gt;&lt;li&gt;painter -&amp;gt; child -&amp;gt; foregroundPainter 순으로 화면을 그립니다. &lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;CustomPainter &lt;/p&gt;&lt;ul&gt;&lt;li&gt;canvas, paint, size등을 통해 실제 화면을 그릴 때 쓰인다. &lt;/li&gt;&lt;li&gt;선 그리기 (drawLine), 원 그리기 (drawCircle) 등 다양한 그리기 함수를 지원합니다. &lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;정의만 보니 어떤 뜻인지 잘 모르겠죠?&lt;/p&gt;&lt;p&gt;실제 코드로 확인해 볼께요.&lt;/p&gt;&lt;p&gt;화면에 직선을 그리는 코드입니다. &lt;/p&gt;&lt;p&gt;완성되면 아래 그림처럼 나올 거에요.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;img src='https://user-images.githubusercontent.com/13621579/56882890-fee0cb00-6a9f-11e9-9074-7ea2bd920598.png' alt='flutter_01' referrerPolicy='no-referrer' /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h5&gt;&lt;a name='header-n50' class='md-header-anchor '&gt;&lt;/a&gt;1.2.1 CustomPainter - 스크린에 선 긋기&lt;/h5&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;dart&quot; style=&quot;page-break-inside: unset;&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;dart&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;span&gt;&lt;span&gt;​&lt;/span&gt;x&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;MyPainter&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;extends&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;CustomPainter&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-meta&quot;&gt;@override&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;paint&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;Canvas&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;canvas&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;Size&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;size&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;Paint&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;paint&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;Paint&lt;/span&gt;() &lt;span class=&quot;cm-comment&quot;&gt;// Paint 클래스는 어떤 식으로 화면을 그릴지 정할 때 쓰임.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;  ..&lt;span class=&quot;cm-variable&quot;&gt;color&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;Colors&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;deepPurpleAccent&lt;/span&gt; &lt;span class=&quot;cm-comment&quot;&gt;// 색은 보라색&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;  ..&lt;span class=&quot;cm-variable&quot;&gt;strokeCap&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;StrokeCap&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;round&lt;/span&gt; &lt;span class=&quot;cm-comment&quot;&gt;// 선의 끝은 둥글게 함.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;  ..&lt;span class=&quot;cm-variable&quot;&gt;strokeWidth&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;4.0&lt;/span&gt;; &lt;span class=&quot;cm-comment&quot;&gt;// 선의 굵기는 4.0&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;Offset&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;p1&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;Offset&lt;/span&gt;(&lt;span class=&quot;cm-number&quot;&gt;0.0&lt;/span&gt;, &lt;span class=&quot;cm-number&quot;&gt;0.0&lt;/span&gt;); &lt;span class=&quot;cm-comment&quot;&gt;// 선을 그리기 위한 좌표값을 만듬. &lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;Offset&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;p2&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;Offset&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;size&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;width&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;size&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;height&lt;/span&gt;); &lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;canvas&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;drawLine&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;p1&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;p2&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;paint&lt;/span&gt;); &lt;span class=&quot;cm-comment&quot;&gt;// 선을 그림. &lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-meta&quot;&gt;@override&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;bool&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;shouldRepaint&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;CustomPainter&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;oldDelegate&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;cm-atom&quot;&gt;false&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 462px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 462px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;일단 CustomPainter 클래스를 정의해볼께요.&lt;/p&gt;&lt;p&gt;CustomPainter는 &lt;strong&gt;&lt;em&gt;paint(Canvas canvas, Size size)&lt;/em&gt;&lt;/strong&gt; 와 &lt;strong&gt;&lt;em&gt;shouldRepaint(CustomPainter oldDelegate)&lt;/em&gt;&lt;/strong&gt;를 구현해야합니다. &lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;paint()는 화면을 그릴 때 사용합니다. 화면을 새로 그릴때마다 호출되죠.&lt;/li&gt;&lt;li&gt;shouldRepaint()는 화면을 새로 그릴지 말지 정합니다. 예전에 위젯의 좌표값과 비교해, 좌표값이 변했을 때 그린다든지 원하는 대로 조건을 줄 수 있죠.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt; &lt;strong&gt;&lt;em&gt;paint(Canvas canvas, Size size)&lt;/em&gt;&lt;/strong&gt; 은 canvas 객체를 써서 화면을 그립니다. &lt;/p&gt;&lt;p&gt;canvas는 다양한 그리기용 함수를 지원합니다. 선그리기, 사각형 그리기 등 다양하죠.&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;dart&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;dart&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;canvas&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;drawLine&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;p1&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;p2&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;paint&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;canvas&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;drawRect&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;rect&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;paint&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 44px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 44px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;canvas는 항상 Paint클래스를 객체로 받는데요. Paint 클래스는 화면이 어떤식으로 그려질지 정합니다. &lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;dart&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;dart&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;Paint&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;paint&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;Paint&lt;/span&gt;() &lt;span class=&quot;cm-comment&quot;&gt;// Paint 클래스는 어떤 식으로 화면을 그릴지 정할 때 쓰임.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;  ..&lt;span class=&quot;cm-variable&quot;&gt;color&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;Colors&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;red&lt;/span&gt; &lt;span class=&quot;cm-comment&quot;&gt;// 색은 빨강색&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;  ..&lt;span class=&quot;cm-variable&quot;&gt;strokeWidth&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;8.0&lt;/span&gt; &lt;span class=&quot;cm-comment&quot;&gt;// 굵기는 8.0&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;  ..&lt;span class=&quot;cm-variable&quot;&gt;strokeCap&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;StrokeCap&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;round&lt;/span&gt;; &lt;span class=&quot;cm-comment&quot;&gt;// 선의 끝은 둥글게&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 88px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 88px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;그럼 방금 만든 MyPainter() 클래스를 사용해 보겠습니다.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h5&gt;&lt;a name='header-n70' class='md-header-anchor '&gt;&lt;/a&gt;1.2.2 CustomPaint 위젯 &lt;/h5&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;dart&quot; style=&quot;page-break-inside: unset;&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;dart&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;PainterPage&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;extends&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;StatelessWidget&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-meta&quot;&gt;@override&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;Widget&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;build&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;BuildContext&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;context&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;Scaffold&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;appBar&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;AppBar&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;title&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;Text&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;&quot;Chart Page&quot;&lt;/span&gt;),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;  ),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;body&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;CustomPaint&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;size&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;Size&lt;/span&gt;(&lt;span class=&quot;cm-number&quot;&gt;200&lt;/span&gt;, &lt;span class=&quot;cm-number&quot;&gt;200&lt;/span&gt;), &lt;span class=&quot;cm-comment&quot;&gt;// 위젯의 크기를 정함. &lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;painter&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;MyPainter&lt;/span&gt;(), &lt;span class=&quot;cm-comment&quot;&gt;// painter에 그리기를 담당할 클래스를 넣음.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;  ),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  );&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 330px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 330px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;CustomPaint() 위젯에 좀 전에 만든 MyPainter() 클래스를 넣어주면 됩니다. &lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;img src='https://user-images.githubusercontent.com/13621579/56882890-fee0cb00-6a9f-11e9-9074-7ea2bd920598.png' alt='flutter_01' referrerPolicy='no-referrer' /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;그림처럼 나오면 성공입니다.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;1.2.3 CustomPaint 위젯&lt;/strong&gt;  - painter와 foregroundPainter의 차이&lt;/p&gt;&lt;p&gt;CustomPaint()는 위젯의 크기를 정하고, 어떤 painter를 쓸지 결정합니다. &lt;/p&gt;&lt;p&gt;painter는 2 종류가 있습니다. &lt;/p&gt;&lt;p&gt;foregroundPainter, painter인데요.  &lt;/p&gt;&lt;p&gt;위젯이 그려지는 순서와 관련이 있습니다.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;painter : painter -&amp;gt; child 순으로 그려진다. 나중에 그려지는 위젯이 맨앞에 보인다. &lt;/li&gt;&lt;/ul&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;dart&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;dart&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;CustomPaint&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &lt;span class=&quot;cm-variable&quot;&gt;size&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;Size&lt;/span&gt;(&lt;span class=&quot;cm-number&quot;&gt;200&lt;/span&gt;, &lt;span class=&quot;cm-number&quot;&gt;200&lt;/span&gt;),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &lt;span class=&quot;cm-variable&quot;&gt;painter&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;MyPainter&lt;/span&gt;(), &lt;span class=&quot;cm-comment&quot;&gt;// painter -&amp;gt; child 순으로 그려진다. MyPainter()에서 선을 그림&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &lt;span class=&quot;cm-variable&quot;&gt;child&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;Container&lt;/span&gt;( &lt;span class=&quot;cm-comment&quot;&gt;// 더 늦게 그려지니 화면에 보인다. &lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;width&lt;/span&gt;: &lt;span class=&quot;cm-number&quot;&gt;200&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;height&lt;/span&gt;: &lt;span class=&quot;cm-number&quot;&gt;200&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;color&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;Colors&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;red&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; ),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 198px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 198px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;&lt;img src='https://user-images.githubusercontent.com/13621579/56882894-02745200-6aa0-11e9-8687-c6ba0e47a622.png' alt='flutter_02' referrerPolicy='no-referrer' /&gt;&lt;/p&gt;&lt;p&gt;선이 보이지 않네요. child 위젯이 가려서 그렇습니다. &lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;foregroundPainter: child -&amp;gt; foregroundPainter 순으로 그려짐.&lt;/li&gt;&lt;/ul&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;dart&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;dart&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;CustomPaint&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;size&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;Size&lt;/span&gt;(&lt;span class=&quot;cm-number&quot;&gt;200&lt;/span&gt;, &lt;span class=&quot;cm-number&quot;&gt;200&lt;/span&gt;),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;foregroundPainter&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;MyPainter&lt;/span&gt;(), &lt;span class=&quot;cm-comment&quot;&gt;// child -&amp;gt; foregroundPainter 순으로 그려진다. MyPainter()에서 선을 그림&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;child&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;Container&lt;/span&gt;( &lt;span class=&quot;cm-comment&quot;&gt;// child가 먼저 그려지니, 선이 화면에 보이게 된다.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;cm-variable&quot;&gt;width&lt;/span&gt;: &lt;span class=&quot;cm-number&quot;&gt;200&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;cm-variable&quot;&gt;height&lt;/span&gt;: &lt;span class=&quot;cm-number&quot;&gt;200&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;cm-variable&quot;&gt;color&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;Colors&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;red&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  ),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 220px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 220px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;img src='https://user-images.githubusercontent.com/13621579/56882896-04d6ac00-6aa0-11e9-96d8-b965dce51180.png' alt='flutter_03' referrerPolicy='no-referrer' /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;선이 잘 보이죠? CustomPainter(커스텀 페인터)가 child에 가려지는 걸 원치 않으면 &lt;strong&gt;&lt;em&gt;foregroundPainter&lt;/em&gt;&lt;/strong&gt;를 써주세요.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h5&gt;&lt;a name='header-n101' class='md-header-anchor '&gt;&lt;/a&gt;1.2.4 CustomPaint 위젯  - 위젯 크기 정하기 &lt;/h5&gt;&lt;p&gt;커스텀 페인트을 쓰다보면  헷갈리는 부분이 있습니다. &lt;/p&gt;&lt;p&gt;바로 위젯의 크기입니다. &lt;/p&gt;&lt;p&gt;크기가  부모나 자식 위젯때문에 쉽게 변하기에 혼란스럽죠.&lt;/p&gt;&lt;p&gt;위젯의 크기는 기본적으로 &lt;strong&gt;부모 &amp;gt; 자식(child) &amp;gt; size (CustomPaint의 속성)&lt;/strong&gt; 값을 따릅니다. &lt;/p&gt;&lt;p&gt;부모가 크기가 제일 중요하고, 그 다음이 자식이고, 아무것도 없으면 size 값에 따라 위젯의 크기를 정합니다. size도 없으면 위젯이 그려지지 않습니다. &lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h6&gt;&lt;a name='header-n108' class='md-header-anchor '&gt;&lt;/a&gt;부모, 자식, Size()가 다 있는 경우&lt;/h6&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;dart&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;dart&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;Container&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;width&lt;/span&gt;: &lt;span class=&quot;cm-number&quot;&gt;300&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;height&lt;/span&gt;: &lt;span class=&quot;cm-number&quot;&gt;300&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;child&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;CustomPaint&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;size&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;Size&lt;/span&gt;(&lt;span class=&quot;cm-number&quot;&gt;200&lt;/span&gt;, &lt;span class=&quot;cm-number&quot;&gt;200&lt;/span&gt;),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;foregroundPainter&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;MyPainter&lt;/span&gt;(),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;child&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;Container&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;width&lt;/span&gt;: &lt;span class=&quot;cm-number&quot;&gt;150&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;height&lt;/span&gt;: &lt;span class=&quot;cm-number&quot;&gt;150&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;  ),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;  ),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;  )&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 264px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 264px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;&lt;img src='https://user-images.githubusercontent.com/13621579/56883751-9515f080-6aa2-11e9-9357-b84f03cff16d.png' alt='flutter_04' referrerPolicy='no-referrer' /&gt;&lt;/p&gt;&lt;p&gt;부모가 있을 때는 부모의 크기 (넓이 300, 높이 300)로 위젯이 그려집니다. &lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h6&gt;&lt;a name='header-n113' class='md-header-anchor '&gt;&lt;/a&gt;자식과 Size()만 있는 경우&lt;/h6&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;dart&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;dart&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;CustomPaint&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;size&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;Size&lt;/span&gt;(&lt;span class=&quot;cm-number&quot;&gt;200&lt;/span&gt;, &lt;span class=&quot;cm-number&quot;&gt;200&lt;/span&gt;),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;foregroundPainter&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;MyPainter&lt;/span&gt;(),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;child&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;Container&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;width&lt;/span&gt;: &lt;span class=&quot;cm-number&quot;&gt;150&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;height&lt;/span&gt;: &lt;span class=&quot;cm-number&quot;&gt;150&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;  ),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;  )&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 176px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 176px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;img src='https://user-images.githubusercontent.com/13621579/56883752-95ae8700-6aa2-11e9-8f73-7776a39df00b.png' alt='flutter_05' referrerPolicy='no-referrer' /&gt;&lt;/p&gt;&lt;p&gt;자식이 있을 때는 자식의 크기 (넓이 150, 높이 150)로 위젯이 그려집니다. &lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h6&gt;&lt;a name='header-n120' class='md-header-anchor '&gt;&lt;/a&gt;Size()만 있는 경우&lt;/h6&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;dart&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;dart&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;CustomPaint&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;size&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;Size&lt;/span&gt;(&lt;span class=&quot;cm-number&quot;&gt;200&lt;/span&gt;, &lt;span class=&quot;cm-number&quot;&gt;200&lt;/span&gt;),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;foregroundPainter&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;MyPainter&lt;/span&gt;(),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;  )&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 88px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 88px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;img src='https://user-images.githubusercontent.com/13621579/56883760-99420e00-6aa2-11e9-89fd-9cdd05476d01.png' alt='flutter_06' referrerPolicy='no-referrer' /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Size만 있을 때는 Size의 크기에 따라 (넓이 150, 높이 150)로 위젯이 그려집니다. &lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Size가 우선순위가 제일 낮습니다.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h3&gt;&lt;a name='header-n133' class='md-header-anchor '&gt;&lt;/a&gt;2.그래프(차트 ) 그려보기&lt;/h3&gt;&lt;h4&gt;&lt;a name='header-n197' class='md-header-anchor '&gt;&lt;/a&gt;2.1 - 파이 차트 그려보기&lt;/h4&gt;&lt;p&gt;CustomPainter를 써서 직접 차트를 그려볼께요.&lt;/p&gt;&lt;p&gt;가장 먼저 그릴 차트는 파이 (원) 차트 입니다. &lt;/p&gt;&lt;p&gt;완성되면 아래 그림처럼 나올거에요.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;em&gt;그림 2-1. pie chart&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;img src='https://user-images.githubusercontent.com/13621579/57854756-f7e9e480-7823-11e9-9e36-2dad5d28a1c9.png' alt='flutter_pie_chart_r' referrerPolicy='no-referrer' /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;프로젝트 구조는 아래와 같습니다. &lt;/p&gt;&lt;p&gt;ui와 chart만 있는 간단한 구조입니다. &lt;/p&gt;&lt;p&gt;&lt;img src='https://user-images.githubusercontent.com/13621579/57872082-df8ac180-7845-11e9-9c6b-3006a5aa3b68.png' alt='flutter_chart_project' referrerPolicy='no-referrer' /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;일단 main을 정의해주세요.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;2.1 main.dart&lt;/strong&gt;&lt;/p&gt;&lt;pre lang=&quot;dart&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; spellcheck=&quot;false&quot; style=&quot;page-break-inside: unset;&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;dart&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;cm-string&quot;&gt;'package:flutter/material.dart'&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;cm-string&quot;&gt;'package:flutter_sketcher_app/ui/chart_page.dart'&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;main&lt;/span&gt;() &lt;span class=&quot;cm-operator&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;runApp&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;MyApp&lt;/span&gt;());&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;MyApp&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;extends&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;StatelessWidget&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-meta&quot;&gt;@override&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;Widget&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;build&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;BuildContext&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;context&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;MaterialApp&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;title&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;'Chart Demo'&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;theme&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;ThemeData&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;primarySwatch&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;Colors&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;blue&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;  ),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;home&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;ChartPage&lt;/span&gt;(),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;debugShowCheckedModeBanner&lt;/span&gt;: &lt;span class=&quot;cm-atom&quot;&gt;false&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  );&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  }&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 462px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 462px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;대부분의 코드는 &lt;strong&gt;chart_page.dart&lt;/strong&gt;에 작성할 거에요.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;2.1  chart_page.dart&lt;/strong&gt;&lt;/p&gt;&lt;pre lang=&quot;dart&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; spellcheck=&quot;false&quot; style=&quot;page-break-inside: unset;&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;dart&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;x&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;ChartPage&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;extends&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;StatelessWidget&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;List&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-builtin&quot;&gt;double&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;points&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; [&lt;span class=&quot;cm-number&quot;&gt;50&lt;/span&gt;, &lt;span class=&quot;cm-number&quot;&gt;0&lt;/span&gt;, &lt;span class=&quot;cm-number&quot;&gt;73&lt;/span&gt;, &lt;span class=&quot;cm-number&quot;&gt;100&lt;/span&gt;,&lt;span class=&quot;cm-number&quot;&gt;150&lt;/span&gt;, &lt;span class=&quot;cm-number&quot;&gt;120&lt;/span&gt;, &lt;span class=&quot;cm-number&quot;&gt;200&lt;/span&gt;, &lt;span class=&quot;cm-number&quot;&gt;80&lt;/span&gt;];&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-meta&quot;&gt;@override&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;Widget&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;build&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;BuildContext&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;context&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;Scaffold&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;appBar&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;AppBar&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;title&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;Text&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;&quot;Chart Page&quot;&lt;/span&gt;),&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;  ),&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;body&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;Container&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;padding&lt;/span&gt;: &lt;span class=&quot;cm-keyword&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;EdgeInsets&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;symmetric&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;vertical&lt;/span&gt;: &lt;span class=&quot;cm-number&quot;&gt;8.0&lt;/span&gt;),&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;child&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;Center&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;child&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;Column&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;children&lt;/span&gt;: &lt;span class=&quot;cm-operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-variable&quot;&gt;Widget&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;gt;&lt;/span&gt;[&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;Container&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;child&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;CustomPaint&lt;/span&gt;( &lt;span class=&quot;cm-comment&quot;&gt;// CustomPaint를 그리고 이 안에 차트를 그려줍니다.. &lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;size&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;Size&lt;/span&gt;(&lt;span class=&quot;cm-number&quot;&gt;150&lt;/span&gt;, &lt;span class=&quot;cm-number&quot;&gt;150&lt;/span&gt;), &lt;span class=&quot;cm-comment&quot;&gt;// CustomPaint의 크기는 가로 세로 150, 150으로 합니다. &lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;painter&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;PieChart&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;percentage&lt;/span&gt;: &lt;span class=&quot;cm-number&quot;&gt;50&lt;/span&gt;, &lt;span class=&quot;cm-comment&quot;&gt;// 파이 차트가 얼마나 칠해져 있는지 정하는 변수입니다.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;textScaleFactor&lt;/span&gt;: &lt;span class=&quot;cm-number&quot;&gt;1.0&lt;/span&gt;, &lt;span class=&quot;cm-comment&quot;&gt;// 파이 차트에 들어갈 텍스트 크기를 정합니다. &lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;textColor&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;Colors&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;blueGrey&lt;/span&gt;),&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;  ),&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;  ),&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;  ],&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;  ),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;  ),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;  ),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  );&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  }&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 682px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 682px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;파이 차트는 원을 2개 그리고, 그 안에 텍스트를 그려서 만듭니다.&lt;/p&gt;&lt;p&gt;원을 그릴 때는 drawCircle() 와 drawArc() 함수를 사용합니다. &lt;/p&gt;&lt;p&gt;drawCircle()는 정해진 위치에 원을 그릴 때 쓰고, &lt;/p&gt;&lt;p&gt;drawArc()는 타원이나, 열린 원(끝이 닫히지 않은 원)을 그릴 때 씁니다. &lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;2.1  pie_chart.dart&lt;/strong&gt;&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;dart&quot; style=&quot;page-break-inside: unset;&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;dart&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;PieChart&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;extends&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;CustomPainter&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;percentage&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;0&lt;/span&gt;; &lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;double&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;textScaleFactor&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;1.0&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-meta&quot;&gt;@override&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;paint&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;Canvas&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;canvas&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;Size&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;size&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;Paint&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;paint&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;Paint&lt;/span&gt;() &lt;span class=&quot;cm-comment&quot;&gt;// 화면에 그릴 때 쓸 Paint를 정의합니다. &lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;  ..&lt;span class=&quot;cm-variable&quot;&gt;color&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;Colors&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;orangeAccent&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;  ..&lt;span class=&quot;cm-variable&quot;&gt;strokeWidth&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;10.0&lt;/span&gt; &lt;span class=&quot;cm-comment&quot;&gt;// 선의 길이를 정합니다. &lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;  ..&lt;span class=&quot;cm-variable&quot;&gt;style&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;PaintingStyle&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;stroke&lt;/span&gt; &lt;span class=&quot;cm-comment&quot;&gt;// 선의 스타일을 정합니다. stroke면 외곽선만 그리고, fill이면 다 채웁니다. &lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;  ..&lt;span class=&quot;cm-variable&quot;&gt;strokeCap&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;StrokeCap&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;round&lt;/span&gt;; &lt;span class=&quot;cm-comment&quot;&gt;// stroke의 스타일을 정합니다. round를 고르면 stroke의 끝이 둥글게 됩니다. &lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;double&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;radius&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;min&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;size&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;width&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;/&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;2&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;paint&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;strokeWidth&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;/&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;2&lt;/span&gt; , &lt;span class=&quot;cm-variable&quot;&gt;size&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;height&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;/&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;2&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;paint&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;strokeWidth&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;/&lt;/span&gt;&lt;span class=&quot;cm-number&quot;&gt;2&lt;/span&gt;); &lt;span class=&quot;cm-comment&quot;&gt;// 원의 반지름을 구함. 선의 굵기에 영향을 받지 않게 보정함. &lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;Offset&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;center&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;Offset&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;size&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;width&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;/&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;2&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;size&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;height&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;/&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;2&lt;/span&gt;); &lt;span class=&quot;cm-comment&quot;&gt;// 원이 위젯의 가운데에 그려지게 좌표를 정함.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;canvas&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;drawCircle&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;center&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;radius&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;paint&lt;/span&gt;); &lt;span class=&quot;cm-comment&quot;&gt;// 원을 그림. &lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;double&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;arcAngle&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;2&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;pi&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;*&lt;/span&gt; (&lt;span class=&quot;cm-variable&quot;&gt;percentage&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;/&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;100&lt;/span&gt;); &lt;span class=&quot;cm-comment&quot;&gt;// 호(arc)의 각도를 정함. 정해진 각도만큼만 그리도록 함. &lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;paint&lt;/span&gt;..&lt;span class=&quot;cm-variable&quot;&gt;color&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;Colors&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;deepPurpleAccent&lt;/span&gt;; &lt;span class=&quot;cm-comment&quot;&gt;// 호를 그릴 때는 색을 바꿔줌. &lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;canvas&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;drawArc&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;Rect&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;fromCircle&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;center&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;center&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;radius&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;radius&lt;/span&gt;), &lt;span class=&quot;cm-operator&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;cm-variable&quot;&gt;pi&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;/&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;2&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;arcAngle&lt;/span&gt;, &lt;span class=&quot;cm-atom&quot;&gt;false&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;paint&lt;/span&gt;); &lt;span class=&quot;cm-comment&quot;&gt;// 호(arc)를 그림.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;drawText&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;canvas&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;size&lt;/span&gt;, &lt;span class=&quot;cm-string&quot;&gt;&quot;&lt;/span&gt;$&lt;span class=&quot;cm-variable&quot;&gt;percentage&lt;/span&gt; &lt;span class=&quot;cm-string&quot;&gt;/ 100&quot;&lt;/span&gt;); &lt;span class=&quot;cm-comment&quot;&gt;// 텍스트를 화면에 표시함.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  }&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-comment&quot;&gt;// 원의 중앙에 텍스트를 적음.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;drawText&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;Canvas&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;canvas&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;Size&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;size&lt;/span&gt;, &lt;span class=&quot;cm-builtin&quot;&gt;String&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;text&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;double&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;fontSize&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;getFontSize&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;size&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;text&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;TextSpan&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;sp&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;TextSpan&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;style&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;TextStyle&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;fontSize&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;fontSize&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;fontWeight&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;FontWeight&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;bold&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;color&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;Colors&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;black&lt;/span&gt;), &lt;span class=&quot;cm-variable&quot;&gt;text&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;text&lt;/span&gt;); &lt;span class=&quot;cm-comment&quot;&gt;// TextSpan은 Text위젯과 거의 동일하다. &lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;TextPainter&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;tp&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;TextPainter&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;text&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;sp&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;textDirection&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;TextDirection&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;ltr&lt;/span&gt;); &lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;tp&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;layout&lt;/span&gt;(); &lt;span class=&quot;cm-comment&quot;&gt;// 필수! 텍스트 페인터에 그려질 텍스트의 크기와 방향를 정함.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;double&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;dx&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;size&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;width&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;/&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;2&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;tp&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;width&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;/&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;2&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;double&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;dy&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;size&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;height&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;/&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;2&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;tp&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;height&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;/&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;2&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;Offset&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;offset&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;Offset&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;dx&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;dy&lt;/span&gt;); &lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;tp&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;paint&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;canvas&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;offset&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  }&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-comment&quot;&gt;// 화면 크기에 비례하도록 텍스트 폰트 크기를 정함.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;double&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;getFontSize&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;Size&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;size&lt;/span&gt;, &lt;span class=&quot;cm-builtin&quot;&gt;String&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;text&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;size&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;width&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;/&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;text&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;length&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;textScaleFactor&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  }&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-meta&quot;&gt;@override&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;bool&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;shouldRepaint&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;PieChart&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;old&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;old&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;percentage&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;!=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;percentage&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  }&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 1298px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 1298px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;텍스트를 그리는 부분만 볼께요. &lt;/p&gt;&lt;p&gt;CustomPainter에 텍스트를 적으려면 꼭 &lt;strong&gt;TextPainter&lt;/strong&gt;를 써야 합니다.&lt;/p&gt;&lt;p&gt;TextPainter()는 텍스트의 좌표를 정하는데 쓰입니다. &lt;/p&gt;&lt;p&gt;TextPainter를 쓸 땐 &lt;strong&gt;꼭 layout&lt;/strong&gt;() 함수를 호출해줘야 합니다. 그래야 텍스트의 크기와 방향을 에서 알 수 있습니다.&lt;/p&gt;&lt;p&gt;TextSpan()은 기존의 Text() 위젯과 거의 동일합니다. &lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;원과 글자가 제대로 나오나요?&lt;/p&gt;&lt;p&gt;그럼 다음에 그릴 차트는 라인 차트(선) 차트입니다.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h4&gt;&lt;a name='header-n345' class='md-header-anchor '&gt;&lt;/a&gt;2.2 라인 차트 그려보기&lt;/h4&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;라인 차트는 아래의 그림처럼 생겼습니다. &lt;/p&gt;&lt;p&gt;각각의 값이 점(포인트)로 표현되고, 점들을 연결하고 있습니다. &lt;/p&gt;&lt;p&gt;또한 최저값이랑 최고값을 표시합니다. &lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;img src='https://user-images.githubusercontent.com/13621579/57905497-be5fba80-78b1-11e9-9d06-a91fbfabe469.png' alt='flutter_line_chart_re' referrerPolicy='no-referrer' /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;라인 차트는 파이 차트랑 비슷한데요. &lt;/p&gt;&lt;p&gt;drawArc() 대신에 drawPath()와 drawPoints() 함수를 사용합니다.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;p&gt;drawPath(Path path, Paint paint) 선을 그릴 때 씁니다. path에 있는 좌표를 따라서 선을 그립니다.&lt;/p&gt;&lt;pre lang=&quot;dart&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; spellcheck=&quot;false&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;dart&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;x&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;Paint&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;paint&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;Paint&lt;/span&gt;()&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;  ..&lt;span class=&quot;cm-variable&quot;&gt;strokeWidth&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;5.0&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;  ..&lt;span class=&quot;cm-variable&quot;&gt;style&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;PaintingStyle&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;stroke&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;  ..&lt;span class=&quot;cm-variable&quot;&gt;color&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;Colors&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;red&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;Path&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;path&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;Path&lt;/span&gt;();&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;path&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;moveTo&lt;/span&gt;(&lt;span class=&quot;cm-number&quot;&gt;0.0&lt;/span&gt;, &lt;span class=&quot;cm-number&quot;&gt;0.0&lt;/span&gt;); &lt;span class=&quot;cm-comment&quot;&gt;// (0.0, 0.0) 좌표로 이동 &lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;path&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;lineTo&lt;/span&gt;(&lt;span class=&quot;cm-number&quot;&gt;120.0&lt;/span&gt;, &lt;span class=&quot;cm-number&quot;&gt;120.0&lt;/span&gt;); &lt;span class=&quot;cm-comment&quot;&gt;// 시작점에서 (120.0, 120.0) 까지 선을 그음&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;canvas&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;drawPath&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;path&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;paint&lt;/span&gt;); &lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 220px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 220px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;&lt;p&gt;drawPoints(PointMode pointMode, List&lt;Offset&gt; points, Paint paint) 은 점을 그릴 때 씁니다. &lt;/p&gt;&lt;pre lang=&quot;dart&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; spellcheck=&quot;false&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;dart&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;x&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;Paint&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;paint&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;Paint&lt;/span&gt;()&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;  ..&lt;span class=&quot;cm-variable&quot;&gt;strokeCap&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;StrokeCap&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;round&lt;/span&gt; &lt;span class=&quot;cm-comment&quot;&gt;// 선이 연결되는 지점이 둥글게 되도록 합니다. 점을 원으로 찍기 위해서 씁니다. &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;  ..&lt;span class=&quot;cm-variable&quot;&gt;color&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;Colors&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;yellow&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;  ..&lt;span class=&quot;cm-variable&quot;&gt;strokeWidth&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;30&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;List&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-variable&quot;&gt;Offset&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;offsetPoints&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; []; &lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;offsetPoints&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;add&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;Offset&lt;/span&gt;(&lt;span class=&quot;cm-number&quot;&gt;10&lt;/span&gt;, &lt;span class=&quot;cm-number&quot;&gt;10&lt;/span&gt;)); &lt;span class=&quot;cm-comment&quot;&gt;// 점의 위치를 더합니다. &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;offsetPoints&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;add&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;Offset&lt;/span&gt;(&lt;span class=&quot;cm-number&quot;&gt;60&lt;/span&gt;, &lt;span class=&quot;cm-number&quot;&gt;60&lt;/span&gt;));&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;offsetPoints&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;add&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;Offset&lt;/span&gt;(&lt;span class=&quot;cm-number&quot;&gt;160&lt;/span&gt;, &lt;span class=&quot;cm-number&quot;&gt;160&lt;/span&gt;));&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;canvas&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;drawPoints&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;PointMode&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;points&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;offsetPoints&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;paint&lt;/span&gt;); &lt;span class=&quot;cm-comment&quot;&gt;// 점을 화면에 그립니다. &lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 308px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 308px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;라인 차트에서 쓰는 주요 함수를 알아봤으니 직접 차트를 그려볼께요.&lt;/p&gt;&lt;p&gt;일단 chart_page.dart 에 라인 차트를 포함해주세요.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;2.2 chart_page.dart&lt;/strong&gt;&lt;/p&gt;&lt;pre lang=&quot;dart&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; spellcheck=&quot;false&quot; style=&quot;page-break-inside: unset;&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;dart&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;ChartPage&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;extends&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;StatelessWidget&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;List&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-builtin&quot;&gt;double&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;points&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; [&lt;span class=&quot;cm-number&quot;&gt;50&lt;/span&gt;, &lt;span class=&quot;cm-number&quot;&gt;0&lt;/span&gt;, &lt;span class=&quot;cm-number&quot;&gt;73&lt;/span&gt;, &lt;span class=&quot;cm-number&quot;&gt;100&lt;/span&gt;, &lt;span class=&quot;cm-number&quot;&gt;150&lt;/span&gt;, &lt;span class=&quot;cm-number&quot;&gt;120&lt;/span&gt;, &lt;span class=&quot;cm-number&quot;&gt;200&lt;/span&gt;, &lt;span class=&quot;cm-number&quot;&gt;80&lt;/span&gt;];&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-meta&quot;&gt;@override&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;Widget&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;build&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;BuildContext&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;context&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;Scaffold&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;appBar&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;AppBar&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;title&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;Text&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;&quot;Chart Page&quot;&lt;/span&gt;),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;  ),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;body&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;Container&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;padding&lt;/span&gt;: &lt;span class=&quot;cm-keyword&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;EdgeInsets&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;symmetric&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;vertical&lt;/span&gt;: &lt;span class=&quot;cm-number&quot;&gt;8.0&lt;/span&gt;),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;child&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;Center&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;child&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;Column&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;children&lt;/span&gt;: &lt;span class=&quot;cm-operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-variable&quot;&gt;Widget&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;gt;&lt;/span&gt;[&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;Container&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;child&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;CustomPaint&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;size&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;Size&lt;/span&gt;(&lt;span class=&quot;cm-number&quot;&gt;200&lt;/span&gt;, &lt;span class=&quot;cm-number&quot;&gt;200&lt;/span&gt;),&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;foregroundPainter&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;LineChart&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;points&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;points&lt;/span&gt;, &lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;pointSize&lt;/span&gt;: &lt;span class=&quot;cm-number&quot;&gt;15.0&lt;/span&gt;, &lt;span class=&quot;cm-comment&quot;&gt;// 점의 크기를 정합니다. &lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;lineWidth&lt;/span&gt;: &lt;span class=&quot;cm-number&quot;&gt;5.0&lt;/span&gt;, &lt;span class=&quot;cm-comment&quot;&gt;// 선의 굵기를 정합니다.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;lineColor&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;Colors&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;purpleAccent&lt;/span&gt;, &lt;span class=&quot;cm-comment&quot;&gt;// 선의 색을 정합니다.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;pointColor&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;Colors&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;purpleAccent&lt;/span&gt;)), &lt;span class=&quot;cm-comment&quot;&gt;// 점의 색을 정합니다.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;  )&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;  ],&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;  ),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;  ),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;  ),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  );&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 704px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 704px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;line_chart는 크게 4개의 함수로 되어 있습니다. &lt;/p&gt;&lt;ul&gt;&lt;li&gt;getCoordinates() : 좌표 구하기&lt;/li&gt;&lt;li&gt;drawText() : 텍스트 그리기&lt;/li&gt;&lt;li&gt;drawLines(): 선 그리기&lt;/li&gt;&lt;li&gt;drawPoints(): 점 그리기&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;2.2 line_chart.dart&lt;/strong&gt;&lt;/p&gt;&lt;pre lang=&quot;dart&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; spellcheck=&quot;false&quot; style=&quot;page-break-inside: unset;&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;dart&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;LineChart&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;extends&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;CustomPainter&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;List&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-builtin&quot;&gt;double&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;points&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;double&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;lineWidth&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;double&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;pointSize&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;Color&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;lineColor&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;Color&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;pointColor&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;maxValueIndex&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;minValueIndex&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;double&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;fontSize&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;18.0&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;LineChart&lt;/span&gt;({&lt;span class=&quot;cm-keyword&quot;&gt;this&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;points&lt;/span&gt;, &lt;span class=&quot;cm-keyword&quot;&gt;this&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;pointSize&lt;/span&gt;, &lt;span class=&quot;cm-keyword&quot;&gt;this&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;lineWidth&lt;/span&gt;, &lt;span class=&quot;cm-keyword&quot;&gt;this&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;lineColor&lt;/span&gt;, &lt;span class=&quot;cm-keyword&quot;&gt;this&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;pointColor&lt;/span&gt;});&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-meta&quot;&gt;@override&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;paint&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;Canvas&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;canvas&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;Size&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;size&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;List&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-variable&quot;&gt;Offset&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;offsets&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;getCoordinates&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;points&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;size&lt;/span&gt;); &lt;span class=&quot;cm-comment&quot;&gt;// 점들이 그려질 좌표를 구합니다.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-tab&quot; role=&quot;presentation&quot; cm-text=&quot;	&quot;&gt;  &lt;/span&gt;&lt;span class=&quot;cm-tab&quot; role=&quot;presentation&quot; cm-text=&quot;	&quot;&gt;  &lt;/span&gt;&lt;span class=&quot;cm-variable&quot;&gt;drawText&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;canvas&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;offsets&lt;/span&gt;); &lt;span class=&quot;cm-comment&quot;&gt;// 텍스트를 그립니다. 최저값과 최고값 위아래에 적은 텍스트입니다. &lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;drawLines&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;canvas&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;size&lt;/span&gt;, &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;offsets&lt;/span&gt;); &lt;span class=&quot;cm-comment&quot;&gt;// 구한 좌표를 바탕으로 선을 그립니다.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;drawPoints&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;canvas&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;size&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;offsets&lt;/span&gt;); &lt;span class=&quot;cm-comment&quot;&gt;// 좌표에 따라 점을 그립니다. &lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  }&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;drawLines&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;Canvas&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;canvas&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;Size&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;size&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;List&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-variable&quot;&gt;Offset&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;offsets&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;Paint&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;paint&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;Paint&lt;/span&gt;()&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;  ..&lt;span class=&quot;cm-variable&quot;&gt;color&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;lineColor&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;  ..&lt;span class=&quot;cm-variable&quot;&gt;strokeWidth&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;lineWidth&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;  ..&lt;span class=&quot;cm-variable&quot;&gt;style&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;PaintingStyle&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;stroke&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;  ..&lt;span class=&quot;cm-variable&quot;&gt;strokeCap&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;StrokeCap&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;round&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;Path&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;path&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;Path&lt;/span&gt;(); &lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;double&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;dx&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;offsets&lt;/span&gt;[&lt;span class=&quot;cm-number&quot;&gt;0&lt;/span&gt;].&lt;span class=&quot;cm-variable&quot;&gt;dx&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;double&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;dy&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;offsets&lt;/span&gt;[&lt;span class=&quot;cm-number&quot;&gt;0&lt;/span&gt;].&lt;span class=&quot;cm-variable&quot;&gt;dy&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;path&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;moveTo&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;dx&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;dy&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;offsets&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;map&lt;/span&gt;((&lt;span class=&quot;cm-variable&quot;&gt;offset&lt;/span&gt;) &lt;span class=&quot;cm-operator&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;path&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;lineTo&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;offset&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;dx&lt;/span&gt; , &lt;span class=&quot;cm-variable&quot;&gt;offset&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;dy&lt;/span&gt;)).&lt;span class=&quot;cm-variable&quot;&gt;toList&lt;/span&gt;();&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;canvas&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;drawPath&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;path&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;paint&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;drawPoints&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;Canvas&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;canvas&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;Size&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;size&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;List&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-variable&quot;&gt;Offset&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;offsets&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;Paint&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;paint&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;Paint&lt;/span&gt;()&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;  ..&lt;span class=&quot;cm-variable&quot;&gt;color&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;pointColor&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;  ..&lt;span class=&quot;cm-variable&quot;&gt;strokeCap&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;StrokeCap&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;round&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;  ..&lt;span class=&quot;cm-variable&quot;&gt;strokeWidth&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;pointSize&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;canvas&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;drawPoints&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;PointMode&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;points&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;offsets&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;paint&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  }&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;List&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-variable&quot;&gt;Offset&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;getCoordinates&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;List&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-builtin&quot;&gt;double&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;points&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;Size&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;size&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;List&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-variable&quot;&gt;Offset&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;coordinates&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; [];&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;double&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;spacing&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;size&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;width&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;/&lt;/span&gt; (&lt;span class=&quot;cm-variable&quot;&gt;points&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;length&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;1&lt;/span&gt;); &lt;span class=&quot;cm-comment&quot;&gt;// 좌표를 일정 간격으로 벌리지 위한 값을 구합니다.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;double&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;maxY&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;points&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;reduce&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;max&lt;/span&gt;); &lt;span class=&quot;cm-comment&quot;&gt;// 데이터 중 최소값을 구합니다. &lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;double&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;minY&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;points&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;reduce&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;min&lt;/span&gt;); &lt;span class=&quot;cm-comment&quot;&gt;// 데이터 중 최대값을 구합니다. &lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;double&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;bottomPadding&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;fontSize&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;2&lt;/span&gt;; &lt;span class=&quot;cm-comment&quot;&gt;// 텍스트가 들어갈 패딩(아랫쪽)을 구합니다.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;double&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;topPadding&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;bottomPadding&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;2&lt;/span&gt;; &lt;span class=&quot;cm-comment&quot;&gt;// 텍스트가 들어갈 패딩(위쪽)을 구합니다.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;double&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;h&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;size&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;height&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;topPadding&lt;/span&gt;; &lt;span class=&quot;cm-comment&quot;&gt;// 패딩을 제외한 화면의 높이를 구합니다. &lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;for&lt;/span&gt; (&lt;span class=&quot;cm-builtin&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;index&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;0&lt;/span&gt;; &lt;span class=&quot;cm-variable&quot;&gt;index&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;points&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;length&lt;/span&gt;; &lt;span class=&quot;cm-variable&quot;&gt;index&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;++&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;double&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;x&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;spacing&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;index&lt;/span&gt;; &lt;span class=&quot;cm-comment&quot;&gt;// x축 좌표를 구합니다. &lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;double&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;normalizedY&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;points&lt;/span&gt;[&lt;span class=&quot;cm-variable&quot;&gt;index&lt;/span&gt;] &lt;span class=&quot;cm-operator&quot;&gt;/&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;maxY&lt;/span&gt;; &lt;span class=&quot;cm-comment&quot;&gt;// 정규화한다. 정규화란 [0 ~ 1] 사이가 나오게 값을 변경하는 것.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;double&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;y&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;getYPos&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;h&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;bottomPadding&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;normalizedY&lt;/span&gt;); &lt;span class=&quot;cm-comment&quot;&gt;// Y축 좌표를 구합니다. 높이에 비례한 값입니다. &lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;Offset&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;coord&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;Offset&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;x&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;y&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;coordinates&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;add&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;coord&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;findMaxIndex&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;points&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;index&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;maxY&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;minY&lt;/span&gt;); &lt;span class=&quot;cm-comment&quot;&gt;// 텍스트(최대값)를 적기 위해, 최대값의 인덱스를 구해놓습니다. &lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;findMinIndex&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;points&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;index&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;maxY&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;minY&lt;/span&gt;); &lt;span class=&quot;cm-comment&quot;&gt;// 텍스트(최소값)를 적기 위해, 최대값의 인덱스를 구해놓습니다. &lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  }&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;coordinates&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  }&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;double&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;getYPos&lt;/span&gt;(&lt;span class=&quot;cm-builtin&quot;&gt;double&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;h&lt;/span&gt;, &lt;span class=&quot;cm-builtin&quot;&gt;double&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;bottomPadding&lt;/span&gt;, &lt;span class=&quot;cm-builtin&quot;&gt;double&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;normalizedY&lt;/span&gt;) &lt;span class=&quot;cm-operator&quot;&gt;=&amp;gt;&lt;/span&gt; (&lt;span class=&quot;cm-variable&quot;&gt;h&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;bottomPadding&lt;/span&gt;) &lt;span class=&quot;cm-operator&quot;&gt;-&lt;/span&gt; (&lt;span class=&quot;cm-variable&quot;&gt;normalizedY&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;h&lt;/span&gt;); &lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;findMaxIndex&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;List&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-builtin&quot;&gt;double&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;points&lt;/span&gt;, &lt;span class=&quot;cm-builtin&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;index&lt;/span&gt;, &lt;span class=&quot;cm-builtin&quot;&gt;double&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;maxY&lt;/span&gt;, &lt;span class=&quot;cm-builtin&quot;&gt;double&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;minY&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;if&lt;/span&gt; (&lt;span class=&quot;cm-variable&quot;&gt;maxY&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;points&lt;/span&gt;[&lt;span class=&quot;cm-variable&quot;&gt;index&lt;/span&gt;]) {&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;maxValueIndex&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;index&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;findMinIndex&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;List&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-builtin&quot;&gt;double&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;points&lt;/span&gt;, &lt;span class=&quot;cm-builtin&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;index&lt;/span&gt;, &lt;span class=&quot;cm-builtin&quot;&gt;double&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;maxY&lt;/span&gt;,&lt;span class=&quot;cm-builtin&quot;&gt;double&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;minY&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;if&lt;/span&gt; (&lt;span class=&quot;cm-variable&quot;&gt;minY&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;points&lt;/span&gt;[&lt;span class=&quot;cm-variable&quot;&gt;index&lt;/span&gt;]) {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;minValueIndex&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;index&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-tab&quot; role=&quot;presentation&quot; cm-text=&quot;	&quot;&gt;  &lt;/span&gt;&lt;span class=&quot;cm-builtin&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;drawText&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;Canvas&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;canvas&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;List&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-variable&quot;&gt;Offset&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;offsets&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;String&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;maxValue&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;points&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;reduce&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;max&lt;/span&gt;).&lt;span class=&quot;cm-variable&quot;&gt;toString&lt;/span&gt;();&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;String&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;minValue&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;points&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;reduce&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;min&lt;/span&gt;).&lt;span class=&quot;cm-variable&quot;&gt;toString&lt;/span&gt;();&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;drawTextValue&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;canvas&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;minValue&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;offsets&lt;/span&gt;[&lt;span class=&quot;cm-variable&quot;&gt;minValueIndex&lt;/span&gt;], &lt;span class=&quot;cm-atom&quot;&gt;false&lt;/span&gt;); &lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;drawTextValue&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;canvas&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;maxValue&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;offsets&lt;/span&gt;[&lt;span class=&quot;cm-variable&quot;&gt;maxValueIndex&lt;/span&gt;], &lt;span class=&quot;cm-atom&quot;&gt;true&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  }&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;drawTextValue&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;Canvas&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;canvas&lt;/span&gt;, &lt;span class=&quot;cm-builtin&quot;&gt;String&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;text&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;Offset&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;pos&lt;/span&gt;, &lt;span class=&quot;cm-builtin&quot;&gt;bool&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;textUpward&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;TextSpan&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;maxSpan&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;TextSpan&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;style&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;TextStyle&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;fontSize&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;fontSize&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;color&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;Colors&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;black&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;fontWeight&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;FontWeight&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;bold&lt;/span&gt;), &lt;span class=&quot;cm-variable&quot;&gt;text&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;text&lt;/span&gt;); &lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;TextPainter&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;tp&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;TextPainter&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;text&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;maxSpan&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;textDirection&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;TextDirection&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;ltr&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;tp&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;layout&lt;/span&gt;();&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;double&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;y&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;textUpward&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;?&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;cm-variable&quot;&gt;tp&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;height&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;1.5&lt;/span&gt;  : &lt;span class=&quot;cm-variable&quot;&gt;tp&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;height&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;0.5&lt;/span&gt;; &lt;span class=&quot;cm-comment&quot;&gt;// 텍스트의 방향을 고려해 y축 값을 보정해줍니다.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;double&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;dx&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;pos&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;dx&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;tp&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;width&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;/&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;2&lt;/span&gt;; &lt;span class=&quot;cm-comment&quot;&gt;// 텍스트의 위치를 고려해 x축 값을 보정해줍니다.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;double&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;dy&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;pos&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;dy&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;y&lt;/span&gt;; &lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;Offset&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;offset&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;Offset&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;dx&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;dy&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;tp&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;paint&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;canvas&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;offset&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  }&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-meta&quot;&gt;@override&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;bool&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;shouldRepaint&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;LineChart&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;oldDelegate&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;oldDelegate&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;points&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;!=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;points&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  }&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 2750px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 2750px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt; 차트가 잘 그려지나요?&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;이번엔 바 차트(막대 그래프)를 만들어보겠습니다&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h4&gt;&lt;a name='header-n445' class='md-header-anchor '&gt;&lt;/a&gt;2.3. 바 차트 그려보기&lt;/h4&gt;&lt;p&gt;바 차트는 가로와 세로에 텍스트를 적을 수 있게 만들었습니다. &lt;/p&gt;&lt;p&gt;연도별 제품 판매량이나 생산량 같은 걸 나타내기에 좋습니다. &lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;img src='https://user-images.githubusercontent.com/13621579/57917975-d5fa6b80-78d0-11e9-93a4-18c9d78e0fb6.png' alt='flutter_bar_chart_02_r' referrerPolicy='no-referrer' /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;2.3 chart_page.dart&lt;/strong&gt;&lt;/p&gt;&lt;pre lang=&quot;dart&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; spellcheck=&quot;false&quot; style=&quot;page-break-inside: unset;&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;dart&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;ChartPage&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;extends&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;StatelessWidget&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;List&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-builtin&quot;&gt;double&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;points&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; [&lt;span class=&quot;cm-number&quot;&gt;50&lt;/span&gt;, &lt;span class=&quot;cm-number&quot;&gt;90&lt;/span&gt;, &lt;span class=&quot;cm-number&quot;&gt;1003&lt;/span&gt;, &lt;span class=&quot;cm-number&quot;&gt;500&lt;/span&gt;, &lt;span class=&quot;cm-number&quot;&gt;150&lt;/span&gt;, &lt;span class=&quot;cm-number&quot;&gt;120&lt;/span&gt;, &lt;span class=&quot;cm-number&quot;&gt;200&lt;/span&gt;, &lt;span class=&quot;cm-number&quot;&gt;80&lt;/span&gt;];&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;List&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-builtin&quot;&gt;String&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;labels&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; [ &lt;span class=&quot;cm-comment&quot;&gt;// 가로축에 적을 텍스트(레이블)&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-string&quot;&gt;&quot;2012&quot;&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-string&quot;&gt;&quot;2013&quot;&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-string&quot;&gt;&quot;2014&quot;&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-string&quot;&gt;&quot;2015&quot;&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-string&quot;&gt;&quot;2016&quot;&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-string&quot;&gt;&quot;2017&quot;&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-string&quot;&gt;&quot;2018&quot;&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-string&quot;&gt;&quot;2019&quot;&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  ];&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-meta&quot;&gt;@override&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;Widget&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;build&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;BuildContext&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;context&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;Scaffold&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;appBar&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;AppBar&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;title&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;Text&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;&quot;Chart Page&quot;&lt;/span&gt;),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;  ),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;body&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;Container&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;padding&lt;/span&gt;: &lt;span class=&quot;cm-keyword&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;EdgeInsets&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;symmetric&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;vertical&lt;/span&gt;: &lt;span class=&quot;cm-number&quot;&gt;8.0&lt;/span&gt;),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;child&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;Center&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;child&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;Column&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;children&lt;/span&gt;: &lt;span class=&quot;cm-operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-variable&quot;&gt;Widget&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;gt;&lt;/span&gt;[&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;Container&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;child&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;CustomPaint&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;size&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;Size&lt;/span&gt;(&lt;span class=&quot;cm-number&quot;&gt;300&lt;/span&gt;, &lt;span class=&quot;cm-number&quot;&gt;300&lt;/span&gt;),&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;foregroundPainter&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;BarChart&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;data&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;points&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;labels&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;labels&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;color&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;Colors&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;pinkAccent&lt;/span&gt;)), &lt;span class=&quot;cm-comment&quot;&gt;// color - 막대 그래프의 색깔&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;  )&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;  ],&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;  ),&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;  ),&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;  ),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  );&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 880px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 880px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;바 차트는 3부분으로 되어 있습니다. &lt;/p&gt;&lt;ul&gt;&lt;li&gt;좌표를 구하는 부분 - 어디다 그래프를 그릴지 정합니다. &lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;그래프를 그리는 부분 - 실제 막대 그래프를 그립니다. 그래프를 그릴 때는 drawRect() 함수를 사용합니다. &lt;/li&gt;&lt;li&gt;텍스트를 그리는 부분 - x축과 y축에 텍스트를 그립니다. 이번엔 정해진 폰트 크기가 아니라, 화면 크기에 비례해 폰트 크기가 정해지도록 계산합니다. &lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;바 차트는 길어서 설명 보다는 주석으로 대체하였습니다. &lt;/p&gt;&lt;p&gt;코드를 따라하면서 익히시기를 권합니다. &lt;/p&gt;&lt;p&gt;&lt;strong&gt;2.3 bar_chart.dart&lt;/strong&gt;&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;dart&quot; style=&quot;page-break-inside: unset;&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;dart&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;x&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;BarChart&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;extends&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;CustomPainter&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;Color&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;color&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;double&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;textScaleFactorXAxis&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;1.0&lt;/span&gt;; &lt;span class=&quot;cm-comment&quot;&gt;// x축 텍스트의 비율을 정함. &lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;double&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;textScaleFactorYAxis&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;1.2&lt;/span&gt;; &lt;span class=&quot;cm-comment&quot;&gt;// y축 텍스트의 비율을 정함. &lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;List&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-builtin&quot;&gt;double&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;data&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; [];&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;List&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-builtin&quot;&gt;String&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;labels&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; [];&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;double&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;bottomPadding&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;0.0&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;double&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;leftPadding&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;0.0&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;BarChart&lt;/span&gt;({&lt;span class=&quot;cm-keyword&quot;&gt;this&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;data&lt;/span&gt;, &lt;span class=&quot;cm-keyword&quot;&gt;this&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;labels&lt;/span&gt;, &lt;span class=&quot;cm-keyword&quot;&gt;this&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;color&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;Colors&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;blue&lt;/span&gt;});&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-meta&quot;&gt;@override&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;paint&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;Canvas&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;canvas&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;Size&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;size&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;setTextPadding&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;size&lt;/span&gt;); &lt;span class=&quot;cm-comment&quot;&gt;// 텍스트를 공간을 미리 정함.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;List&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-variable&quot;&gt;Offset&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;coordinates&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;getCoordinates&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;size&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;drawBar&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;canvas&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;size&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;coordinates&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;drawXLabels&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;canvas&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;size&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;coordinates&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;drawYLabels&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;canvas&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;size&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;coordinates&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;drawLines&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;canvas&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;size&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;coordinates&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;setTextPadding&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;Size&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;size&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;bottomPadding&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;size&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;height&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;/&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;10&lt;/span&gt;; &lt;span class=&quot;cm-comment&quot;&gt;// 세로 크기의 1/10만큼만 텍스트 패딩을 줌&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;leftPadding&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;size&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;width&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;/&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;10&lt;/span&gt;; &lt;span class=&quot;cm-comment&quot;&gt;// 가로 길이의 1/10만큼 텍스트 패딩을 줌&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;drawBar&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;Canvas&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;canvas&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;Size&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;size&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;List&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-variable&quot;&gt;Offset&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;coordinates&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;Paint&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;paint&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;Paint&lt;/span&gt;()&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;  ..&lt;span class=&quot;cm-variable&quot;&gt;color&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;color&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;  ..&lt;span class=&quot;cm-variable&quot;&gt;style&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;PaintingStyle&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;fill&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;  ..&lt;span class=&quot;cm-variable&quot;&gt;strokeCap&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;StrokeCap&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;round&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;double&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;barWidthMargin&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; (&lt;span class=&quot;cm-variable&quot;&gt;size&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;width&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;0.09&lt;/span&gt;); &lt;span class=&quot;cm-comment&quot;&gt;// 막대 그래프가 겹치지 않게 간격을 줌. &lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;for&lt;/span&gt; (&lt;span class=&quot;cm-builtin&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;index&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;0&lt;/span&gt;; &lt;span class=&quot;cm-variable&quot;&gt;index&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;coordinates&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;length&lt;/span&gt;; &lt;span class=&quot;cm-variable&quot;&gt;index&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;++&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;Offset&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;offset&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;coordinates&lt;/span&gt;[&lt;span class=&quot;cm-variable&quot;&gt;index&lt;/span&gt;];&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;double&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;left&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;offset&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;dx&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;double&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;right&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;offset&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;dx&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;barWidthMargin&lt;/span&gt;; &lt;span class=&quot;cm-comment&quot;&gt;// 간격만큼 가로로 이동&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;double&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;top&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;offset&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;dy&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;double&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;bottom&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;size&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;height&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;bottomPadding&lt;/span&gt;; &lt;span class=&quot;cm-comment&quot;&gt;// 텍스트 크기만큼 패딩을 빼줘서, 텍스트와 겹치지 않게 함. &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;Rect&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;rect&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;Rect&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;fromLTRB&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;right&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;top&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;left&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;bottom&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;canvas&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;drawRect&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;rect&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;paint&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  }&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-comment&quot;&gt;// X축 텍스트(레이블)을 그림. &lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;drawXLabels&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;Canvas&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;canvas&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;Size&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;size&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;List&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-variable&quot;&gt;Offset&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;coordinates&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;double&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;fontSize&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;calculateFontSize&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;labels&lt;/span&gt;[&lt;span class=&quot;cm-number&quot;&gt;0&lt;/span&gt;], &lt;span class=&quot;cm-variable&quot;&gt;size&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;xAxis&lt;/span&gt;: &lt;span class=&quot;cm-atom&quot;&gt;true&lt;/span&gt;); &lt;span class=&quot;cm-comment&quot;&gt;// 화면 크기에 유동적으로 폰트 크기를 계산함. &lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;for&lt;/span&gt; (&lt;span class=&quot;cm-builtin&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;index&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;0&lt;/span&gt;; &lt;span class=&quot;cm-variable&quot;&gt;index&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;labels&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;length&lt;/span&gt;; &lt;span class=&quot;cm-variable&quot;&gt;index&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;++&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;TextSpan&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;span&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;TextSpan&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;style&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;TextStyle&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;color&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;Colors&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;black&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;fontSize&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;fontSize&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;fontFamily&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;'Roboto'&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;fontWeight&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;FontWeight&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;w400&lt;/span&gt;),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;text&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;labels&lt;/span&gt;[&lt;span class=&quot;cm-variable&quot;&gt;index&lt;/span&gt;]);&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;TextPainter&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;tp&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;TextPainter&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;text&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;span&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;textDirection&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;TextDirection&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;ltr&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;tp&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;layout&lt;/span&gt;();&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;Offset&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;offset&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;coordinates&lt;/span&gt;[&lt;span class=&quot;cm-variable&quot;&gt;index&lt;/span&gt;];&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;double&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;dx&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;offset&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;dx&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;double&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;dy&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;size&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;height&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;tp&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;height&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;tp&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;paint&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;canvas&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;Offset&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;dx&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;dy&lt;/span&gt;));&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-comment&quot;&gt;// Y축 텍스트(레이블)을 그림. 최저값과 최고값을 Y축에 표시함.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;drawYLabels&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;Canvas&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;canvas&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;Size&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;size&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;List&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-variable&quot;&gt;Offset&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;coordinates&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;double&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;bottomY&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;coordinates&lt;/span&gt;[&lt;span class=&quot;cm-number&quot;&gt;0&lt;/span&gt;].&lt;span class=&quot;cm-variable&quot;&gt;dy&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;double&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;topY&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;coordinates&lt;/span&gt;[&lt;span class=&quot;cm-number&quot;&gt;0&lt;/span&gt;].&lt;span class=&quot;cm-variable&quot;&gt;dy&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;indexOfMax&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;0&lt;/span&gt;; &lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;indexOfMin&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;0&lt;/span&gt;; &lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;for&lt;/span&gt; (&lt;span class=&quot;cm-builtin&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;index&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;0&lt;/span&gt;; &lt;span class=&quot;cm-variable&quot;&gt;index&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;coordinates&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;length&lt;/span&gt;; &lt;span class=&quot;cm-variable&quot;&gt;index&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;++&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;double&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;dy&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;coordinates&lt;/span&gt;[&lt;span class=&quot;cm-variable&quot;&gt;index&lt;/span&gt;].&lt;span class=&quot;cm-variable&quot;&gt;dy&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;if&lt;/span&gt; (&lt;span class=&quot;cm-variable&quot;&gt;bottomY&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;dy&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;bottomY&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;dy&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;indexOfMin&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;index&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;  }&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;if&lt;/span&gt; (&lt;span class=&quot;cm-variable&quot;&gt;topY&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;dy&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;topY&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;dy&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;indexOfMax&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;index&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;String&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;maxValue&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-string&quot;&gt;&quot;&lt;/span&gt;${&lt;span class=&quot;cm-variable&quot;&gt;data&lt;/span&gt;[&lt;span class=&quot;cm-variable&quot;&gt;indexOfMax&lt;/span&gt;].&lt;span class=&quot;cm-variable&quot;&gt;toInt&lt;/span&gt;()}&lt;span class=&quot;cm-string&quot;&gt;&quot;&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;String&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;minValue&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-string&quot;&gt;&quot;&lt;/span&gt;${&lt;span class=&quot;cm-variable&quot;&gt;data&lt;/span&gt;[&lt;span class=&quot;cm-variable&quot;&gt;indexOfMin&lt;/span&gt;].&lt;span class=&quot;cm-variable&quot;&gt;toInt&lt;/span&gt;()}&lt;span class=&quot;cm-string&quot;&gt;&quot;&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;double&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;fontSize&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;calculateFontSize&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;maxValue&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;size&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;xAxis&lt;/span&gt;: &lt;span class=&quot;cm-atom&quot;&gt;false&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;drawYText&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;canvas&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;maxValue&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;fontSize&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;topY&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;drawYText&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;canvas&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;minValue&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;fontSize&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;bottomY&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-comment&quot;&gt;// 화면 크기에 비례해 폰트 크기를 계산. &lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;double&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;calculateFontSize&lt;/span&gt;(&lt;span class=&quot;cm-builtin&quot;&gt;String&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;value&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;Size&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;size&lt;/span&gt;, {&lt;span class=&quot;cm-builtin&quot;&gt;bool&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;xAxis&lt;/span&gt;}) {&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;numberOfCharacters&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;value&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;length&lt;/span&gt;; &lt;span class=&quot;cm-comment&quot;&gt;// 글자수에 따라 폰트 크기를 계산하기 위함. &lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;double&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;fontSize&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; (&lt;span class=&quot;cm-variable&quot;&gt;size&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;width&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;/&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;numberOfCharacters&lt;/span&gt;) &lt;span class=&quot;cm-operator&quot;&gt;/&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;data&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;length&lt;/span&gt;; &lt;span class=&quot;cm-comment&quot;&gt;// width가 600일 때 100글자를 적어야 한다면, fontSize는 글자 하나당 6이어야겠죠. &lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;if&lt;/span&gt; (&lt;span class=&quot;cm-variable&quot;&gt;xAxis&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;fontSize&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;*=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;textScaleFactorXAxis&lt;/span&gt;; &lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  } &lt;span class=&quot;cm-keyword&quot;&gt;else&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;fontSize&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;*=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;textScaleFactorYAxis&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  }&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;fontSize&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  }&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-comment&quot;&gt;// x축과 y축을 구분하는 선을 긋습니다. &lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;drawLines&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;Canvas&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;canvas&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;Size&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;size&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;List&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-variable&quot;&gt;Offset&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;coordinates&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;Paint&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;paint&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;Paint&lt;/span&gt;()&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;  ..&lt;span class=&quot;cm-variable&quot;&gt;color&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;Colors&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;blueGrey&lt;/span&gt;[&lt;span class=&quot;cm-number&quot;&gt;100&lt;/span&gt;]&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;  ..&lt;span class=&quot;cm-variable&quot;&gt;strokeCap&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;StrokeCap&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;round&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;  ..&lt;span class=&quot;cm-variable&quot;&gt;style&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;PaintingStyle&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;stroke&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;  ..&lt;span class=&quot;cm-variable&quot;&gt;strokeWidth&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;1.8&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;double&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;bottom&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;size&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;height&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;bottomPadding&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;double&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;left&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;coordinates&lt;/span&gt;[&lt;span class=&quot;cm-number&quot;&gt;0&lt;/span&gt;].&lt;span class=&quot;cm-variable&quot;&gt;dx&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;Path&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;path&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;Path&lt;/span&gt;();&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;path&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;moveTo&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;left&lt;/span&gt;, &lt;span class=&quot;cm-number&quot;&gt;0&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;path&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;lineTo&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;left&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;bottom&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;path&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;lineTo&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;size&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;width&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;bottom&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;canvas&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;drawPath&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;path&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;paint&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;drawYText&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;Canvas&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;canvas&lt;/span&gt;, &lt;span class=&quot;cm-builtin&quot;&gt;String&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;text&lt;/span&gt;, &lt;span class=&quot;cm-builtin&quot;&gt;double&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;fontSize&lt;/span&gt;, &lt;span class=&quot;cm-builtin&quot;&gt;double&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;y&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;TextSpan&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;span&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;TextSpan&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;style&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;TextStyle&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;fontSize&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;fontSize&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;color&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;Colors&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;black&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;fontFamily&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;'Roboto'&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;fontWeight&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;FontWeight&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;w600&lt;/span&gt;),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;text&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;text&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  );&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;TextPainter&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;tp&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;TextPainter&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;text&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;span&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;textDirection&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;TextDirection&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;ltr&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;tp&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;layout&lt;/span&gt;();&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;Offset&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;offset&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;Offset&lt;/span&gt;(&lt;span class=&quot;cm-number&quot;&gt;0.0&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;y&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;tp&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;paint&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;canvas&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;offset&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;List&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-variable&quot;&gt;Offset&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;getCoordinates&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;Size&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;size&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;List&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-variable&quot;&gt;Offset&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;coordinates&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; [];&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;double&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;maxData&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;data&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;reduce&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;max&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;double&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;width&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;size&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;width&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;leftPadding&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;double&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;minBarWidth&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;width&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;/&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;data&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;length&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;for&lt;/span&gt; (&lt;span class=&quot;cm-builtin&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;index&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;0&lt;/span&gt;; &lt;span class=&quot;cm-variable&quot;&gt;index&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;data&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;length&lt;/span&gt;; &lt;span class=&quot;cm-variable&quot;&gt;index&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;++&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;double&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;left&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;minBarWidth&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;*&lt;/span&gt; (&lt;span class=&quot;cm-variable&quot;&gt;index&lt;/span&gt;) &lt;span class=&quot;cm-operator&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;leftPadding&lt;/span&gt;; &lt;span class=&quot;cm-comment&quot;&gt;// 그래프의 가로 위치를 정합니다. &lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;double&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;normalized&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;data&lt;/span&gt;[&lt;span class=&quot;cm-variable&quot;&gt;index&lt;/span&gt;] &lt;span class=&quot;cm-operator&quot;&gt;/&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;maxData&lt;/span&gt;; &lt;span class=&quot;cm-comment&quot;&gt;// 그래프의 높이가 [0~1] 사이가 되도록 정규화 합니다.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;double&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;height&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;size&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;height&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;bottomPadding&lt;/span&gt;; &lt;span class=&quot;cm-comment&quot;&gt;// x축에 표시되는 글자들과 겹치지 않게 높이에서 패딩을 제외합니다.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;double&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;top&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;height&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;normalized&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;height&lt;/span&gt;; &lt;span class=&quot;cm-comment&quot;&gt;// 정규화된 값을 통해 높이를 구해줍니다. &lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;Offset&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;offset&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;Offset&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;left&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;top&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;coordinates&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;add&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;offset&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;coordinates&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-meta&quot;&gt;@override&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;bool&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;shouldRepaint&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;BarChart&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;old&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;old&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;data&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;!=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;data&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  }&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 4114px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 4114px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;이제 커스텀 페인터를 쓰는 데 익숙해 졌나요?&lt;/p&gt;&lt;p&gt;이번 글에선 직접 차트를 만들어 보았습니다. &lt;/p&gt;&lt;p&gt;다음 번엔 애니메이션에 대해 알아보도록 하겠습니다. &lt;/p&gt;&lt;hr /&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;이 글에 쓰인 소스 코드는  &lt;a href='https://github.com/Hochul822/flutter_chart_example'&gt;Github&lt;/a&gt; 에서찾아보실 수 있습니다.&lt;/p&gt;&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;</description>
      <category>플러터(Flutter)</category>
      <category>Flutter</category>
      <category>flutter bar chart</category>
      <category>Flutter chart</category>
      <category>Flutter CustomPainter</category>
      <category>Flutter line chart</category>
      <category>Flutter pie chart</category>
      <category>Flutter TextPainter</category>
      <category>Flutter 차트</category>
      <category>플러터</category>
      <category>플러터 차트</category>
      <author>에드 신</author>
      <guid isPermaLink="true">https://software-creator.tistory.com/23</guid>
      <comments>https://software-creator.tistory.com/23#entry23comment</comments>
      <pubDate>Fri, 17 May 2019 18:33:30 +0900</pubDate>
    </item>
    <item>
      <title>파이썬 - 데이터 분석 라이브러리 (numpy, pandas, matplotlib) 익히기</title>
      <link>https://software-creator.tistory.com/22</link>
      <description>&lt;!doctype html&gt;
&lt;html&gt;
&lt;head&gt;
&lt;meta charset='UTF-8'&gt;&lt;meta name='viewport' content='width=device-width initial-scale=1'&gt;
&lt;meta name=&quot;content&quot; description=&quot;이번 글에선 파이썬 데이터 분석에 쓰이는 라이브러리 (numpy, pandas, matplotlib)의 사용법을 알아보겠습니다. 그 뒤 실제 데이터에 라이브러리를 써서, 간단히 분석을 해볼께요. numpy는 과학 연산을 위한 라이브러리입니다. 리스트, 배열, 매트릭스 연산을 빠르게 하는 걸 도와줍니다. 리스트와 넘파이의 속도 차이는 30~40배까지도 난다고 하네요.데이터가 커질수록 넘파이는 필수겠죠.데이터 프레임은 행과 열로 이루어진 표입니다. 데이터 프레임을 이용하면 각 열(칼럼)에 있는 값을 편하게 쓸 수 있습니다.
평균 나이를 구하거나, 성적이 상위 20%인 사람을 구하는 것도 쉽죠.데이터 프레임은 행과 열로 데이터를 구분합니다.행을 index(인덱스)리고 부르고, 열은 칼럼이라고 부르죠.&quot;&gt;
&lt;title&gt;data&lt;/title&gt;&lt;link href='https://fonts.loli.net/css?family=Open+Sans:400italic,700italic,700,400&amp;subset=latin,latin-ext' rel='stylesheet' type='text/css' /&gt;&lt;style type='text/css'&gt;html {overflow-x: initial !important;}:root { --bg-color: #ffffff; --text-color: #333333; --select-text-bg-color: #B5D6FC; --select-text-font-color: auto; --monospace: &quot;Lucida Console&quot;,Consolas,&quot;Courier&quot;,monospace; }
html { font-size: 14px; background-color: var(--bg-color); color: var(--text-color); font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; -webkit-font-smoothing: antialiased; }
body { margin: 0px; padding: 0px; height: auto; bottom: 0px; top: 0px; left: 0px; right: 0px; font-size: 1rem; line-height: 1.42857143; overflow-x: hidden; background-image: inherit; background-size: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: inherit; background-position: inherit inherit; background-repeat: inherit inherit; }
iframe { margin: auto; }
a.url { word-break: break-all; }
a:active, a:hover { outline: 0px; }
.in-text-selection, ::selection { text-shadow: none; background: var(--select-text-bg-color); color: var(--select-text-font-color); }
#write { margin: 0px auto; height: auto; width: inherit; word-break: normal; word-wrap: break-word; position: relative; white-space: normal; overflow-x: visible; padding-top: 40px; }
#write.first-line-indent p { text-indent: 2em; }
#write.first-line-indent li p, #write.first-line-indent p * { text-indent: 0px; }
#write.first-line-indent li { margin-left: 2em; }
.for-image #write { padding-left: 8px; padding-right: 8px; }
body.typora-export { padding-left: 30px; padding-right: 30px; }
.typora-export .footnote-line, .typora-export li, .typora-export p { white-space: pre-wrap; }
@media screen and (max-width: 500px) {
  body.typora-export { padding-left: 0px; padding-right: 0px; }
  #write { padding-left: 20px; padding-right: 20px; }
  .CodeMirror-sizer { margin-left: 0px !important; }
  .CodeMirror-gutters { display: none !important; }
}
#write li &gt; figure:first-child { margin-top: -20px; }
#write ol, #write ul { position: relative; }
img { max-width: 100%; vertical-align: middle; }
button, input, select, textarea { color: inherit; font-family: inherit; font-size: inherit; font-style: inherit; font-variant-caps: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; }
input[type=&quot;checkbox&quot;], input[type=&quot;radio&quot;] { line-height: normal; padding: 0px; }
*, ::after, ::before { box-sizing: border-box; }
#write h1, #write h2, #write h3, #write h4, #write h5, #write h6, #write p, #write pre { width: inherit; }
#write h1, #write h2, #write h3, #write h4, #write h5, #write h6, #write p { position: relative; }
h1, h2, h3, h4, h5, h6 { break-after: avoid-page; break-inside: avoid; orphans: 2; }
p { orphans: 4; }
h1 { font-size: 2rem; }
h2 { font-size: 1.8rem; }
h3 { font-size: 1.6rem; }
h4 { font-size: 1.4rem; }
h5 { font-size: 1.2rem; }
h6 { font-size: 1rem; }
.md-math-block, .md-rawblock, h1, h2, h3, h4, h5, h6, p { margin-top: 1rem; margin-bottom: 1rem; }
.hidden { display: none; }
.md-blockmeta { color: rgb(204, 204, 204); font-weight: 700; font-style: italic; }
a { cursor: pointer; }
sup.md-footnote { padding: 2px 4px; background-color: rgba(238, 238, 238, 0.701961); color: rgb(85, 85, 85); border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; cursor: pointer; }
sup.md-footnote a, sup.md-footnote a:hover { color: inherit; text-transform: inherit; text-decoration: inherit; }
#write input[type=&quot;checkbox&quot;] { cursor: pointer; width: inherit; height: inherit; }
figure { overflow-x: auto; margin: 1.2em 0px; max-width: calc(100% + 16px); padding: 0px; }
figure &gt; table { margin: 0px !important; }
tr { break-inside: avoid; break-after: auto; }
thead { display: table-header-group; }
table { border-collapse: collapse; border-spacing: 0px; width: 100%; overflow: auto; break-inside: auto; text-align: left; }
table.md-table td { min-width: 32px; }
.CodeMirror-gutters { border-right-width: 0px; background-color: inherit; }
.CodeMirror-linenumber { }
.CodeMirror { text-align: left; }
.CodeMirror-placeholder { opacity: 0.3; }
.CodeMirror pre { padding: 0px 4px; }
.CodeMirror-lines { padding: 0px; }
div.hr:focus { cursor: none; }
#write pre { white-space: pre-wrap; }
#write.fences-no-line-wrapping pre { white-space: pre; }
#write pre.ty-contain-cm { white-space: normal; }
.CodeMirror-gutters { margin-right: 4px; }
.md-fences { font-size: 0.9rem; display: block; break-inside: avoid; text-align: left; overflow: visible; white-space: pre; background-image: inherit; background-size: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: inherit; position: relative !important; background-position: inherit inherit; background-repeat: inherit inherit; }
.md-diagram-panel { width: 100%; margin-top: 10px; text-align: center; padding-top: 0px; padding-bottom: 8px; overflow-x: auto; }
#write .md-fences.mock-cm { white-space: pre-wrap; }
.md-fences.md-fences-with-lineno { padding-left: 0px; }
#write.fences-no-line-wrapping .md-fences.mock-cm { white-space: pre; overflow-x: auto; }
.md-fences.mock-cm.md-fences-with-lineno { padding-left: 8px; }
.CodeMirror-line, twitterwidget { break-inside: avoid; }
.footnotes { opacity: 0.8; font-size: 0.9rem; margin-top: 1em; margin-bottom: 1em; }
.footnotes + .footnotes { margin-top: 0px; }
.md-reset { margin: 0px; padding: 0px; border: 0px; outline: 0px; vertical-align: top; text-decoration: none; text-shadow: none; float: none; position: static; width: auto; height: auto; white-space: nowrap; cursor: inherit; line-height: normal; font-weight: 400; text-align: left; box-sizing: content-box; direction: ltr; background-position: 0px 0px; background-repeat: initial initial; }
li div { padding-top: 0px; }
blockquote { margin: 1rem 0px; }
li .mathjax-block, li p { margin: 0.5rem 0px; }
li { margin: 0px; position: relative; }
blockquote &gt; :last-child { margin-bottom: 0px; }
blockquote &gt; :first-child, li &gt; :first-child { margin-top: 0px; }
.footnotes-area { color: rgb(136, 136, 136); margin-top: 0.714rem; padding-bottom: 0.143rem; white-space: normal; }
#write .footnote-line { white-space: pre-wrap; }
@media print {
  body, html { border: 1px solid transparent; height: 99%; break-after: avoid-page; break-before: avoid-page; }
  #write { margin-top: 0px; padding-top: 0px; border-color: transparent !important; }
  .typora-export * { -webkit-print-color-adjust: exact; }
  html.blink-to-pdf { font-size: 13px; }
  .typora-export #write { padding-left: 32px; padding-right: 32px; padding-bottom: 0px; break-after: avoid-page; }
  .typora-export #write::after { height: 0px; }
  @page { margin: 20mm 0px; }
}
.footnote-line { margin-top: 0.714em; font-size: 0.7em; }
a img, img a { cursor: pointer; }
pre.md-meta-block { font-size: 0.8rem; min-height: 0.8rem; white-space: pre-wrap; background-color: rgb(204, 204, 204); display: block; overflow-x: hidden; background-position: initial initial; background-repeat: initial initial; }
p &gt; .md-image:only-child:not(.md-img-error) img, p &gt; img:only-child { display: block; margin: auto; }
p &gt; .md-image:only-child { display: inline-block; width: 100%; }
#write .MathJax_Display { margin: 0.8em 0px 0px; }
.md-math-block { width: 100%; }
.md-math-block:not(:empty)::after { display: none; }
[contenteditable=&quot;true&quot;]:active, [contenteditable=&quot;true&quot;]:focus { outline: 0px; box-shadow: none; }
.md-task-list-item { position: relative; list-style-type: none; }
.task-list-item.md-task-list-item { padding-left: 0px; }
.md-task-list-item &gt; input { position: absolute; top: 0px; left: 0px; margin-left: -1.2em; margin-top: calc(1em - 10px); border: none; }
.math { font-size: 1rem; }
.md-toc { min-height: 3.58rem; position: relative; font-size: 0.9rem; border-top-left-radius: 10px; border-top-right-radius: 10px; border-bottom-right-radius: 10px; border-bottom-left-radius: 10px; }
.md-toc-content { position: relative; margin-left: 0px; }
.md-toc-content::after, .md-toc::after { display: none; }
.md-toc-item { display: block; color: rgb(65, 131, 196); }
.md-toc-item a { text-decoration: none; }
.md-toc-inner:hover { text-decoration: underline; }
.md-toc-inner { display: inline-block; cursor: pointer; }
.md-toc-h1 .md-toc-inner { margin-left: 0px; font-weight: 700; }
.md-toc-h2 .md-toc-inner { margin-left: 2em; }
.md-toc-h3 .md-toc-inner { margin-left: 4em; }
.md-toc-h4 .md-toc-inner { margin-left: 6em; }
.md-toc-h5 .md-toc-inner { margin-left: 8em; }
.md-toc-h6 .md-toc-inner { margin-left: 10em; }
@media screen and (max-width: 48em) {
  .md-toc-h3 .md-toc-inner { margin-left: 3.5em; }
  .md-toc-h4 .md-toc-inner { margin-left: 5em; }
  .md-toc-h5 .md-toc-inner { margin-left: 6.5em; }
  .md-toc-h6 .md-toc-inner { margin-left: 8em; }
}
a.md-toc-inner { font-size: inherit; font-style: inherit; font-weight: inherit; line-height: inherit; }
.footnote-line a:not(.reversefootnote) { color: inherit; }
.md-attr { display: none; }
.md-fn-count::after { content: &quot;.&quot;; }
code, pre, samp, tt { font-family: var(--monospace); }
kbd { margin: 0px 0.1em; padding: 0.1em 0.6em; font-size: 0.8em; color: rgb(36, 39, 41); background-color: rgb(255, 255, 255); border: 1px solid rgb(173, 179, 185); border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; box-shadow: rgba(12, 13, 14, 0.2) 0px 1px 0px, rgb(255, 255, 255) 0px 0px 0px 2px inset; white-space: nowrap; vertical-align: middle; background-position: initial initial; background-repeat: initial initial; }
.md-comment { color: rgb(162, 127, 3); opacity: 0.8; font-family: var(--monospace); }
code { text-align: left; }
a.md-print-anchor { white-space: pre !important; border: none !important; display: inline-block !important; position: absolute !important; width: 1px !important; right: 0px !important; outline: 0px !important; text-shadow: initial !important; background-position: 0px 0px !important; background-repeat: initial initial !important; }
.md-inline-math .MathJax_SVG .noError { display: none !important; }
.html-for-mac .inline-math-svg .MathJax_SVG { vertical-align: 0.2px; }
.md-math-block .MathJax_SVG_Display { text-align: center; margin: 0px; position: relative; text-indent: 0px; max-width: none; max-height: none; min-height: 0px; min-width: 100%; width: auto; overflow-y: hidden; display: block !important; }
.MathJax_SVG_Display, .md-inline-math .MathJax_SVG_Display { width: auto; margin: inherit; display: inline-block !important; }
.MathJax_SVG .MJX-monospace { font-family: var(--monospace); }
.MathJax_SVG .MJX-sans-serif { font-family: sans-serif; }
.MathJax_SVG { display: inline; font-style: normal; font-weight: 400; line-height: normal; zoom: 90%; text-indent: 0px; text-align: left; text-transform: none; letter-spacing: normal; word-spacing: normal; word-wrap: normal; white-space: nowrap; float: none; direction: ltr; max-width: none; max-height: none; min-width: 0px; min-height: 0px; border: 0px; padding: 0px; margin: 0px; }
.MathJax_SVG * { transition: none; }
.MathJax_SVG_Display svg { vertical-align: middle !important; margin-bottom: 0px !important; }
.os-windows.monocolor-emoji .md-emoji { font-family: &quot;Segoe UI Symbol&quot;, sans-serif; }
.md-diagram-panel &gt; svg { max-width: 100%; }
[lang=&quot;mermaid&quot;] svg, [lang=&quot;flow&quot;] svg { max-width: 100%; }
[lang=&quot;mermaid&quot;] .node text { font-size: 1rem; }
table tr th { border-bottom-width: 0px; }
video { max-width: 100%; display: block; margin: 0px auto; }
iframe { max-width: 100%; width: 100%; border: none; }
.highlight td, .highlight tr { border: 0px; }


.CodeMirror { height: auto; }
.CodeMirror.cm-s-inner { background-image: inherit; background-size: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: inherit; background-position: inherit inherit; background-repeat: inherit inherit; }
.CodeMirror-scroll { overflow-y: hidden; overflow-x: auto; z-index: 3; }
.CodeMirror-gutter-filler, .CodeMirror-scrollbar-filler { background-color: rgb(255, 255, 255); }
.CodeMirror-gutters { border-right-width: 1px; border-right-style: solid; border-right-color: rgb(221, 221, 221); background-image: inherit; background-size: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: inherit; white-space: nowrap; background-position: inherit inherit; background-repeat: inherit inherit; }
.CodeMirror-linenumber { padding: 0px 3px 0px 5px; text-align: right; color: rgb(153, 153, 153); }
.cm-s-inner .cm-keyword { color: rgb(119, 0, 136); }
.cm-s-inner .cm-atom, .cm-s-inner.cm-atom { color: rgb(34, 17, 153); }
.cm-s-inner .cm-number { color: rgb(17, 102, 68); }
.cm-s-inner .cm-def { color: rgb(0, 0, 255); }
.cm-s-inner .cm-variable { color: rgb(0, 0, 0); }
.cm-s-inner .cm-variable-2 { color: rgb(0, 85, 170); }
.cm-s-inner .cm-variable-3 { color: rgb(0, 136, 85); }
.cm-s-inner .cm-string { color: rgb(170, 17, 17); }
.cm-s-inner .cm-property { color: rgb(0, 0, 0); }
.cm-s-inner .cm-operator { color: rgb(152, 26, 26); }
.cm-s-inner .cm-comment, .cm-s-inner.cm-comment { color: rgb(170, 85, 0); }
.cm-s-inner .cm-string-2 { color: rgb(255, 85, 0); }
.cm-s-inner .cm-meta { color: rgb(85, 85, 85); }
.cm-s-inner .cm-qualifier { color: rgb(85, 85, 85); }
.cm-s-inner .cm-builtin { color: rgb(51, 0, 170); }
.cm-s-inner .cm-bracket { color: rgb(153, 153, 119); }
.cm-s-inner .cm-tag { color: rgb(17, 119, 0); }
.cm-s-inner .cm-attribute { color: rgb(0, 0, 204); }
.cm-s-inner .cm-header, .cm-s-inner.cm-header { color: rgb(0, 0, 255); }
.cm-s-inner .cm-quote, .cm-s-inner.cm-quote { color: rgb(0, 153, 0); }
.cm-s-inner .cm-hr, .cm-s-inner.cm-hr { color: rgb(153, 153, 153); }
.cm-s-inner .cm-link, .cm-s-inner.cm-link { color: rgb(0, 0, 204); }
.cm-negative { color: rgb(221, 68, 68); }
.cm-positive { color: rgb(34, 153, 34); }
.cm-header, .cm-strong { font-weight: 700; }
.cm-del { text-decoration: line-through; }
.cm-em { font-style: italic; }
.cm-link { text-decoration: underline; }
.cm-error { color: red; }
.cm-invalidchar { color: red; }
.cm-constant { color: rgb(38, 139, 210); }
.cm-defined { color: rgb(181, 137, 0); }
div.CodeMirror span.CodeMirror-matchingbracket { color: rgb(0, 255, 0); }
div.CodeMirror span.CodeMirror-nonmatchingbracket { color: rgb(255, 34, 34); }
.cm-s-inner .CodeMirror-activeline-background { background-image: inherit; background-size: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: inherit; background-position: inherit inherit; background-repeat: inherit inherit; }
.CodeMirror { position: relative; overflow: hidden; }
.CodeMirror-scroll { height: 100%; outline: 0px; position: relative; box-sizing: content-box; background-image: inherit; background-size: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: inherit; background-position: inherit inherit; background-repeat: inherit inherit; }
.CodeMirror-sizer { position: relative; }
.CodeMirror-gutter-filler, .CodeMirror-hscrollbar, .CodeMirror-scrollbar-filler, .CodeMirror-vscrollbar { position: absolute; z-index: 6; display: none; }
.CodeMirror-vscrollbar { right: 0px; top: 0px; overflow: hidden; }
.CodeMirror-hscrollbar { bottom: 0px; left: 0px; overflow: hidden; }
.CodeMirror-scrollbar-filler { right: 0px; bottom: 0px; }
.CodeMirror-gutter-filler { left: 0px; bottom: 0px; }
.CodeMirror-gutters { position: absolute; left: 0px; top: 0px; padding-bottom: 30px; z-index: 3; }
.CodeMirror-gutter { white-space: normal; height: 100%; box-sizing: content-box; padding-bottom: 30px; margin-bottom: -32px; display: inline-block; }
.CodeMirror-gutter-wrapper { position: absolute; z-index: 4; border: none !important; background-position: 0px 0px !important; background-repeat: initial initial !important; }
.CodeMirror-gutter-background { position: absolute; top: 0px; bottom: 0px; z-index: 4; }
.CodeMirror-gutter-elt { position: absolute; cursor: default; z-index: 4; }
.CodeMirror-lines { cursor: text; }
.CodeMirror pre { border-top-left-radius: 0px; border-top-right-radius: 0px; border-bottom-right-radius: 0px; border-bottom-left-radius: 0px; border-width: 0px; font-family: inherit; font-size: inherit; margin: 0px; white-space: pre; word-wrap: normal; color: inherit; z-index: 2; position: relative; overflow: visible; background-position: 0px 0px; background-repeat: initial initial; }
.CodeMirror-wrap pre { word-wrap: break-word; white-space: pre-wrap; word-break: normal; }
.CodeMirror-code pre { border-right-width: 30px; border-right-style: solid; border-right-color: transparent; width: fit-content; }
.CodeMirror-wrap .CodeMirror-code pre { border-right-style: none; width: auto; }
.CodeMirror-linebackground { position: absolute; left: 0px; right: 0px; top: 0px; bottom: 0px; z-index: 0; }
.CodeMirror-linewidget { position: relative; z-index: 2; overflow: auto; }
.CodeMirror-wrap .CodeMirror-scroll { overflow-x: hidden; }
.CodeMirror-measure { position: absolute; width: 100%; height: 0px; overflow: hidden; visibility: hidden; }
.CodeMirror-measure pre { position: static; }
.CodeMirror div.CodeMirror-cursor { position: absolute; visibility: hidden; border-right-style: none; width: 0px; }
.CodeMirror div.CodeMirror-cursor { visibility: hidden; }
.CodeMirror-focused div.CodeMirror-cursor { visibility: inherit; }
.cm-searching { background-color: rgba(255, 255, 0, 0.4); background-position: initial initial; background-repeat: initial initial; }
@media print {
  .CodeMirror div.CodeMirror-cursor { visibility: hidden; }
}


:root {
    --side-bar-bg-color: #fafafa;
    --control-text-color: #777;
}

@include-when-export url(https://fonts.loli.net/css?family=Open+Sans:400italic,700italic,700,400&amp;subset=latin,latin-ext);

html {
    font-size: 16px;
}

body {
    font-family: &quot;Open Sans&quot;,&quot;Clear Sans&quot;,&quot;Helvetica Neue&quot;,Helvetica,Arial,sans-serif;
    color: rgb(51, 51, 51);
    line-height: 1.6;
}

#write {
    max-width: 860px;
  	margin: 0 auto;
  	padding: 30px;
    padding-bottom: 100px;
}
#write &gt; ul:first-child,
#write &gt; ol:first-child{
    margin-top: 30px;
}

a {
    color: #4183C4;
}
h1,
h2,
h3,
h4,
h5,
h6 {
    position: relative;
    margin-top: 1rem;
    margin-bottom: 1rem;
    font-weight: bold;
    line-height: 1.4;
    cursor: text;
}
h1:hover a.anchor,
h2:hover a.anchor,
h3:hover a.anchor,
h4:hover a.anchor,
h5:hover a.anchor,
h6:hover a.anchor {
    text-decoration: none;
}
h1 tt,
h1 code {
    font-size: inherit;
}
h2 tt,
h2 code {
    font-size: inherit;
}
h3 tt,
h3 code {
    font-size: inherit;
}
h4 tt,
h4 code {
    font-size: inherit;
}
h5 tt,
h5 code {
    font-size: inherit;
}
h6 tt,
h6 code {
    font-size: inherit;
}
h1 {
    padding-bottom: .3em;
    font-size: 2.25em;
    line-height: 1.2;
    border-bottom: 1px solid #eee;
}
h2 {
   padding-bottom: .3em;
    font-size: 1.75em;
    line-height: 1.225;
    border-bottom: 1px solid #eee;
}
h3 {
    font-size: 1.5em;
    line-height: 1.43;
}
h4 {
    font-size: 1.25em;
}
h5 {
    font-size: 1em;
}
h6 {
   font-size: 1em;
    color: #777;
}
p,
blockquote,
ul,
ol,
dl,
table{
    margin: 0.8em 0;
}
li&gt;ol,
li&gt;ul {
    margin: 0 0;
}
hr {
    height: 2px;
    padding: 0;
    margin: 16px 0;
    background-color: #e7e7e7;
    border: 0 none;
    overflow: hidden;
    box-sizing: content-box;
}

li p.first {
    display: inline-block;
}
ul,
ol {
    padding-left: 30px;
}
ul:first-child,
ol:first-child {
    margin-top: 0;
}
ul:last-child,
ol:last-child {
    margin-bottom: 0;
}
blockquote {
    border-left: 4px solid #dfe2e5;
    padding: 0 15px;
    color: #777777;
}
blockquote blockquote {
    padding-right: 0;
}
table {
    padding: 0;
    word-break: initial;
}
table tr {
    border-top: 1px solid #dfe2e5;
    margin: 0;
    padding: 0;
}
table tr:nth-child(2n),
thead {
    background-color: #f8f8f8;
}
table tr th {
    font-weight: bold;
    border: 1px solid #dfe2e5;
    border-bottom: 0;
    text-align: left;
    margin: 0;
    padding: 6px 13px;
}
table tr td {
    border: 1px solid #dfe2e5;
    text-align: left;
    margin: 0;
    padding: 6px 13px;
}
table tr th:first-child,
table tr td:first-child {
    margin-top: 0;
}
table tr th:last-child,
table tr td:last-child {
    margin-bottom: 0;
}

.CodeMirror-lines {
    padding-left: 4px;
}

.code-tooltip {
    box-shadow: 0 1px 1px 0 rgba(0,28,36,.3);
    border-top: 1px solid #eef2f2;
}

.md-fences,
code,
tt {
    border: 1px solid #e7eaed;
    background-color: #f8f8f8;
    border-radius: 3px;
    padding: 0;
    padding: 2px 4px 0px 4px;
    font-size: 0.9em;
}

code {
    background-color: #f3f4f4;
    padding: 0 2px 0 2px;
}

.md-fences {
    margin-bottom: 15px;
    margin-top: 15px;
    padding-top: 8px;
    padding-bottom: 6px;
}


.md-task-list-item &gt; input {
  margin-left: -1.3em;
}

@media print {
    html {
        font-size: 13px;
    }
    table,
    pre {
        page-break-inside: avoid;
    }
    pre {
        word-wrap: break-word;
    }
}

.md-fences {
	background-color: #f8f8f8;
}
#write pre.md-meta-block {
	padding: 1rem;
    font-size: 85%;
    line-height: 1.45;
    background-color: #f7f7f7;
    border: 0;
    border-radius: 3px;
    color: #777777;
    margin-top: 0 !important;
}

.mathjax-block&gt;.code-tooltip {
	bottom: .375rem;
}

.md-mathjax-midline {
    background: #fafafa;
}

#write&gt;h3.md-focus:before{
	left: -1.5625rem;
	top: .375rem;
}
#write&gt;h4.md-focus:before{
	left: -1.5625rem;
	top: .285714286rem;
}
#write&gt;h5.md-focus:before{
	left: -1.5625rem;
	top: .285714286rem;
}
#write&gt;h6.md-focus:before{
	left: -1.5625rem;
	top: .285714286rem;
}
.md-image&gt;.md-meta {
    /*border: 1px solid #ddd;*/
    border-radius: 3px;
    padding: 2px 0px 0px 4px;
    font-size: 0.9em;
    color: inherit;
}

.md-tag {
    color: #a7a7a7;
    opacity: 1;
}

.md-toc {
    margin-top:20px;
    padding-bottom:20px;
}

.sidebar-tabs {
    border-bottom: none;
}

#typora-quick-open {
    border: 1px solid #ddd;
    background-color: #f8f8f8;
}

#typora-quick-open-item {
    background-color: #FAFAFA;
    border-color: #FEFEFE #e5e5e5 #e5e5e5 #eee;
    border-style: solid;
    border-width: 1px;
}

/** focus mode */
.on-focus-mode blockquote {
    border-left-color: rgba(85, 85, 85, 0.12);
}

header, .context-menu, .megamenu-content, footer{
    font-family: &quot;Segoe UI&quot;, &quot;Arial&quot;, sans-serif;
}

.file-node-content:hover .file-node-icon,
.file-node-content:hover .file-node-open-state{
    visibility: visible;
}

.mac-seamless-mode #typora-sidebar {
    background-color: #fafafa;
    background-color: var(--side-bar-bg-color);
}

.md-lang {
    color: #b4654d;
}

.html-for-mac .context-menu {
    --item-hover-bg-color: #E6F0FE;
}

#md-notification .btn {
    border: 0;
}

.dropdown-menu .divider {
    border-color: #e5e5e5;
}

 .typora-export li, .typora-export p, .typora-export,  .footnote-line {white-space: normal;}
&lt;/style&gt;
&lt;/head&gt;
&lt;body class='typora-export' &gt;
&lt;div  id='write'  class = 'is-mac'&gt;&lt;h1&gt;&lt;a name='header-n1424' class='md-header-anchor '&gt;&lt;/a&gt;목차&lt;/h1&gt;&lt;ul&gt;&lt;li&gt;numpy&lt;/li&gt;&lt;li&gt;pandas&lt;/li&gt;&lt;li&gt;visualization&lt;/li&gt;&lt;li&gt;분석 예제 &lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;이번 글에선 파이썬 데이터 분석에 쓰이는 라이브러리 (numpy, pandas, matplotlib)의 사용법을 알아보겠습니다. &lt;/p&gt;&lt;p&gt;그 뒤 실제 데이터에 라이브러리를 써서, 간단히 분석을 해볼께요.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h1&gt;&lt;a name='header-n1436' class='md-header-anchor '&gt;&lt;/a&gt;0. dimension (차원)&lt;/h1&gt;&lt;p&gt;리스트를 쓰다보면 중첩된 구조를 쓰는 경우가 종종 있습니다.&lt;/p&gt;&lt;p&gt;중첩되었다는 건, 리스트 안에 리스트가 있는 건데요. &lt;/p&gt;&lt;p&gt;데이터 쪽에서는 중첩된 정도를 구분하기 위해 차원이란 말을 씁니다. &lt;/p&gt;&lt;p&gt;1번 중첩되면 1차원, 2번 중첩되면 2차원이죠.&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;python&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;python&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;[&lt;span class=&quot;cm-number&quot;&gt;1&lt;/span&gt;,&lt;span class=&quot;cm-number&quot;&gt;2&lt;/span&gt;,&lt;span class=&quot;cm-number&quot;&gt;3&lt;/span&gt;,&lt;span class=&quot;cm-number&quot;&gt;4&lt;/span&gt;] &lt;span class=&quot;cm-comment&quot;&gt;# 1차원&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;[[&lt;span class=&quot;cm-number&quot;&gt;10&lt;/span&gt;,&lt;span class=&quot;cm-number&quot;&gt;11&lt;/span&gt;,&lt;span class=&quot;cm-number&quot;&gt;12&lt;/span&gt;], [&lt;span class=&quot;cm-number&quot;&gt;30&lt;/span&gt;, &lt;span class=&quot;cm-number&quot;&gt;40&lt;/span&gt;, &lt;span class=&quot;cm-number&quot;&gt;50&lt;/span&gt;]] &lt;span class=&quot;cm-comment&quot;&gt;# 2차원&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;[&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; [[&lt;span class=&quot;cm-number&quot;&gt;100&lt;/span&gt;,&lt;span class=&quot;cm-number&quot;&gt;110&lt;/span&gt;,&lt;span class=&quot;cm-number&quot;&gt;120&lt;/span&gt;], [&lt;span class=&quot;cm-number&quot;&gt;130&lt;/span&gt;, &lt;span class=&quot;cm-number&quot;&gt;140&lt;/span&gt;, &lt;span class=&quot;cm-number&quot;&gt;150&lt;/span&gt;]], &lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; [[&lt;span class=&quot;cm-number&quot;&gt;200&lt;/span&gt;,&lt;span class=&quot;cm-number&quot;&gt;210&lt;/span&gt;,&lt;span class=&quot;cm-number&quot;&gt;220&lt;/span&gt;], [&lt;span class=&quot;cm-number&quot;&gt;230&lt;/span&gt;, &lt;span class=&quot;cm-number&quot;&gt;240&lt;/span&gt;, &lt;span class=&quot;cm-number&quot;&gt;250&lt;/span&gt;]]&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;] &lt;span class=&quot;cm-comment&quot;&gt;# 3차원&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 176px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 176px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;일반적인 리스트로는 중첩된 자료를 처리하는 게 느리고, 복잡해서 numpy(넘파이)라는 라이브러리를 많이 씁니다. &lt;/p&gt;&lt;h1&gt;&lt;a name='header-n1444' class='md-header-anchor '&gt;&lt;/a&gt;1. numpy (넘파이)&lt;/h1&gt;&lt;p&gt;numpy는 과학 연산을 위한 라이브러리입니다. 리스트, 배열, 매트릭스 연산을 빠르게 하는 걸 도와줍니다. &lt;/p&gt;&lt;p&gt;리스트와 넘파이의 속도 차이는 30~40배까지도 난다고 하네요.&lt;/p&gt;&lt;p&gt;데이터가 커질수록 넘파이는 필수겠죠. &lt;/p&gt;&lt;p&gt;numpy의 배열(array)를 쓰는 법을 알아볼께요.&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;python&quot; style=&quot;page-break-inside: unset;&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;python&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;numpy&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;as&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;np&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;a&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot;&gt;np&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;array&lt;/span&gt;([&lt;span class=&quot;cm-number&quot;&gt;1&lt;/span&gt;,&lt;span class=&quot;cm-number&quot;&gt;2&lt;/span&gt;,&lt;span class=&quot;cm-number&quot;&gt;3&lt;/span&gt;])&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-comment&quot;&gt;# 1행&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;a&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;shape&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;a&lt;/span&gt;[&lt;span class=&quot;cm-number&quot;&gt;0&lt;/span&gt;])&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;a&lt;/span&gt;[&lt;span class=&quot;cm-number&quot;&gt;1&lt;/span&gt;])&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;b&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot;&gt;np&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;array&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  [[&lt;span class=&quot;cm-number&quot;&gt;1&lt;/span&gt;,&lt;span class=&quot;cm-number&quot;&gt;2&lt;/span&gt;,&lt;span class=&quot;cm-number&quot;&gt;3&lt;/span&gt;], &lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  [&lt;span class=&quot;cm-number&quot;&gt;4&lt;/span&gt;,&lt;span class=&quot;cm-number&quot;&gt;5&lt;/span&gt;,&lt;span class=&quot;cm-number&quot;&gt;6&lt;/span&gt;]]&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-comment&quot;&gt;# 2행 3열&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;b&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;shape&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;b&lt;/span&gt;[&lt;span class=&quot;cm-number&quot;&gt;0&lt;/span&gt;])&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;b&lt;/span&gt;[&lt;span class=&quot;cm-number&quot;&gt;1&lt;/span&gt;])&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;b&lt;/span&gt;[&lt;span class=&quot;cm-number&quot;&gt;0&lt;/span&gt;, &lt;span class=&quot;cm-number&quot;&gt;1&lt;/span&gt;])&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;b&lt;/span&gt;[&lt;span class=&quot;cm-number&quot;&gt;1&lt;/span&gt;, &lt;span class=&quot;cm-number&quot;&gt;1&lt;/span&gt;])&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;c&lt;/span&gt; = [[&lt;span class=&quot;cm-number&quot;&gt;1&lt;/span&gt;,&lt;span class=&quot;cm-number&quot;&gt;2&lt;/span&gt;,&lt;span class=&quot;cm-number&quot;&gt;3&lt;/span&gt;], [&lt;span class=&quot;cm-number&quot;&gt;4&lt;/span&gt;,&lt;span class=&quot;cm-number&quot;&gt;5&lt;/span&gt;,&lt;span class=&quot;cm-number&quot;&gt;6&lt;/span&gt;]]&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;c&lt;/span&gt;[&lt;span class=&quot;cm-number&quot;&gt;0&lt;/span&gt;][&lt;span class=&quot;cm-number&quot;&gt;1&lt;/span&gt;]) &lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 550px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 550px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;넘파이도 리스트처럼, 인덱스로 원하는 값을 접근할 수 있습니다.
다만 2차원 넘파이부터는 데이터 접근 방식이 좀 다릅니다. &lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;python&quot; style=&quot;page-break-inside: unset;&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;python&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;numpy&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;as&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;np&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;a&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot;&gt;np&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;array&lt;/span&gt;([ &lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  [&lt;span class=&quot;cm-number&quot;&gt;1&lt;/span&gt;,&lt;span class=&quot;cm-number&quot;&gt;2&lt;/span&gt;],&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  [&lt;span class=&quot;cm-number&quot;&gt;3&lt;/span&gt;,&lt;span class=&quot;cm-number&quot;&gt;4&lt;/span&gt;],&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  [&lt;span class=&quot;cm-number&quot;&gt;5&lt;/span&gt;,&lt;span class=&quot;cm-number&quot;&gt;6&lt;/span&gt;]&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;])&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-comment&quot;&gt;# 조건을 적용할 수 있다. &lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;bool_idx&lt;/span&gt; = (&lt;span class=&quot;cm-variable&quot;&gt;a&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;2&lt;/span&gt; )&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;bool_idx&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-comment&quot;&gt;# 2보다 큰 값만 출력한다.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;a&lt;/span&gt;[ &lt;span class=&quot;cm-variable&quot;&gt;a&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;2&lt;/span&gt; ])&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 330px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 330px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;python&quot; style=&quot;page-break-inside: unset;&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;python&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;numpy&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;as&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;np&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;a&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot;&gt;np&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;array&lt;/span&gt;([&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  [&lt;span class=&quot;cm-number&quot;&gt;1&lt;/span&gt;,&lt;span class=&quot;cm-number&quot;&gt;2&lt;/span&gt;],&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  [&lt;span class=&quot;cm-number&quot;&gt;3&lt;/span&gt;,&lt;span class=&quot;cm-number&quot;&gt;4&lt;/span&gt;]&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;])&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;b&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot;&gt;np&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;array&lt;/span&gt;([&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  [&lt;span class=&quot;cm-number&quot;&gt;10&lt;/span&gt;, &lt;span class=&quot;cm-number&quot;&gt;11&lt;/span&gt;],&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  [&lt;span class=&quot;cm-number&quot;&gt;12&lt;/span&gt;, &lt;span class=&quot;cm-number&quot;&gt;13&lt;/span&gt;]&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;])&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;a&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;b&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;np&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;add&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;a&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;b&lt;/span&gt;))&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;a&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;b&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;np&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;subtract&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;a&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;b&lt;/span&gt;))&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;a&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;b&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;np&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;multiply&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;a&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;b&lt;/span&gt;))&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;a&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;/&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;b&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;np&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;multiply&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;a&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;b&lt;/span&gt;))&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 506px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 506px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;python&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;python&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;numpy&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;as&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;np&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;x&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot;&gt;np&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;array&lt;/span&gt;([ [&lt;span class=&quot;cm-number&quot;&gt;1&lt;/span&gt;,&lt;span class=&quot;cm-number&quot;&gt;2&lt;/span&gt;,&lt;span class=&quot;cm-number&quot;&gt;3&lt;/span&gt;], [&lt;span class=&quot;cm-number&quot;&gt;4&lt;/span&gt;,&lt;span class=&quot;cm-number&quot;&gt;5&lt;/span&gt;,&lt;span class=&quot;cm-number&quot;&gt;6&lt;/span&gt;] ])&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;np&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;sum&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;x&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;axis&lt;/span&gt;=&lt;span class=&quot;cm-number&quot;&gt;0&lt;/span&gt;)) &lt;span class=&quot;cm-comment&quot;&gt;# 열(column)끼리 값을 더합니다. &lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;np&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;sum&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;x&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;axis&lt;/span&gt;=&lt;span class=&quot;cm-number&quot;&gt;1&lt;/span&gt;)) &lt;span class=&quot;cm-comment&quot;&gt;# 행(row)끼리 값을 더합니다.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 110px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 110px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;h1&gt;&lt;a name='header-n1459' class='md-header-anchor '&gt;&lt;/a&gt;2. pandas (판다스)&lt;/h1&gt;&lt;p&gt;&lt;img src='https://cdn-images-1.medium.com/max/1760/1*6p6nF4_5XpHgcrYRrLYVAw.png' alt='alt text' referrerPolicy='no-referrer' /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h5&gt;&lt;a name='header-n1462' class='md-header-anchor '&gt;&lt;/a&gt;2.1 pandas - 열과 행 다뤄보기&lt;/h5&gt;&lt;p&gt;데이터 프레임은 행과 열로 이루어진 표입니다. 데이터 프레임을 이용하면 각 열(칼럼)에 있는 값을 편하게 쓸 수 있습니다.
평균 나이를 구하거나, 성적이 상위 20%인 사람을 구하는 것도 쉽죠.&lt;/p&gt;&lt;p&gt;데이터 프레임은 행과 열로 데이터를 구분합니다. &lt;/p&gt;&lt;p&gt;행을 index(인덱스)리고 부르고, 열은 칼럼이라고 부르죠.&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;python&quot; style=&quot;page-break-inside: unset;&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;python&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;pandas&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;as&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;pd&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-comment&quot;&gt;# 딕셔너리의 키를 열이름(칼럼명)으로 쓴다. &lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;df&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot;&gt;pd&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;DataFrame&lt;/span&gt;({&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-string&quot;&gt;'name'&lt;/span&gt;: [&lt;span class=&quot;cm-string&quot;&gt;'Bob'&lt;/span&gt;, &lt;span class=&quot;cm-string&quot;&gt;'Alice'&lt;/span&gt;, &lt;span class=&quot;cm-string&quot;&gt;'Jane'&lt;/span&gt;],&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-string&quot;&gt;'age'&lt;/span&gt;: [&lt;span class=&quot;cm-number&quot;&gt;71&lt;/span&gt;, &lt;span class=&quot;cm-number&quot;&gt;33&lt;/span&gt;, &lt;span class=&quot;cm-number&quot;&gt;58&lt;/span&gt;]&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;})&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;df&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-comment&quot;&gt;# (3,2) 출력. 3행 2열의 데이터 프레임이란 뜻이다.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;df&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;shape&lt;/span&gt;) &lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-comment&quot;&gt;# 열 별로 데이터를 이용할 수 있다.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;df&lt;/span&gt;[&lt;span class=&quot;cm-string&quot;&gt;'age'&lt;/span&gt;]) &lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;df&lt;/span&gt;[&lt;span class=&quot;cm-string&quot;&gt;'name'&lt;/span&gt;])&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;df&lt;/span&gt;[:&lt;span class=&quot;cm-number&quot;&gt;1&lt;/span&gt;])&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;df&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;index&lt;/span&gt;) &lt;span class=&quot;cm-comment&quot;&gt;# 인덱스 알아보기. &lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;df&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;columns&lt;/span&gt;) &lt;span class=&quot;cm-comment&quot;&gt;# 칼럼 알아보기.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 550px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 550px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h3&gt;&lt;a name='header-n1468' class='md-header-anchor '&gt;&lt;/a&gt;2.2 pandas - 필터링 및 정렬 하기&lt;/h3&gt;&lt;p&gt;데이터 프레임의 기본 기능을 사용하면 원하는 데이터만 쉽게 필터링 하고, 정렬할 수 있죠!&lt;/p&gt;&lt;p&gt;보통 엑셀을 많이 쓰는 이유가 정렬이나 필터링, vlookup 같은 기능 때문인데요. &lt;/p&gt;&lt;p&gt;파이썬을 쓰면 엑셀의 모든 기능을 쉽게 대체할 수 있습니다. &lt;/p&gt;&lt;p&gt;물론 속도는 파이썬이 비교할 수 없을 정도로 빠르구요.&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;python&quot; style=&quot;page-break-inside: unset;&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;python&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;pandas&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;as&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;pd&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;df&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot;&gt;pd&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;DataFrame&lt;/span&gt;({&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-string&quot;&gt;'weight'&lt;/span&gt;: [&lt;span class=&quot;cm-number&quot;&gt;91&lt;/span&gt;, &lt;span class=&quot;cm-number&quot;&gt;85&lt;/span&gt;, &lt;span class=&quot;cm-number&quot;&gt;100&lt;/span&gt;, &lt;span class=&quot;cm-number&quot;&gt;75&lt;/span&gt;, &lt;span class=&quot;cm-number&quot;&gt;43&lt;/span&gt;, &lt;span class=&quot;cm-number&quot;&gt;38&lt;/span&gt;],&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-string&quot;&gt;'height'&lt;/span&gt;: [&lt;span class=&quot;cm-number&quot;&gt;180&lt;/span&gt;, &lt;span class=&quot;cm-number&quot;&gt;173&lt;/span&gt;, &lt;span class=&quot;cm-number&quot;&gt;190&lt;/span&gt;, &lt;span class=&quot;cm-number&quot;&gt;170&lt;/span&gt;, &lt;span class=&quot;cm-number&quot;&gt;163&lt;/span&gt;, &lt;span class=&quot;cm-number&quot;&gt;152&lt;/span&gt;],&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-string&quot;&gt;'gender'&lt;/span&gt;: [&lt;span class=&quot;cm-string&quot;&gt;'male'&lt;/span&gt;,&lt;span class=&quot;cm-string&quot;&gt;'female'&lt;/span&gt;, &lt;span class=&quot;cm-string&quot;&gt;'male'&lt;/span&gt;, &lt;span class=&quot;cm-string&quot;&gt;'female'&lt;/span&gt;, &lt;span class=&quot;cm-string&quot;&gt;'female'&lt;/span&gt;, &lt;span class=&quot;cm-string&quot;&gt;'male'&lt;/span&gt;]&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;})&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;df&lt;/span&gt;[&lt;span class=&quot;cm-string&quot;&gt;'weight'&lt;/span&gt;] &lt;span class=&quot;cm-operator&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;80&lt;/span&gt;) &lt;span class=&quot;cm-comment&quot;&gt;# weight가 80 이상이면 True 아니면 False인 데이터 프레임을 만듬.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;df_filtered&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot;&gt;df&lt;/span&gt;[&lt;span class=&quot;cm-variable&quot;&gt;df&lt;/span&gt;[&lt;span class=&quot;cm-string&quot;&gt;'weight'&lt;/span&gt;] &lt;span class=&quot;cm-operator&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;80&lt;/span&gt;]&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;df_filtered&lt;/span&gt;) &lt;span class=&quot;cm-comment&quot;&gt;# weight가 80 이상인 값만 남았습니다.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;df_sorted&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot;&gt;df_filtered&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;sort_values&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;'weight'&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;ascending&lt;/span&gt;=&lt;span class=&quot;cm-keyword&quot;&gt;True&lt;/span&gt;) &lt;span class=&quot;cm-comment&quot;&gt;# weight 기준으로 오름차순으로 정렬. 몸무게가 적은 순으로 정렬&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;df_sorted&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;df_sorted&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot;&gt;df_filtered&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;sort_values&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;'height'&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;ascending&lt;/span&gt;=&lt;span class=&quot;cm-keyword&quot;&gt;False&lt;/span&gt;) &lt;span class=&quot;cm-comment&quot;&gt;# height 기준으로 내림차순으로 정렬. 키가 큰 순으로 정렬.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;df_grouped&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot;&gt;df&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;groupby&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;'gender'&lt;/span&gt;) &lt;span class=&quot;cm-comment&quot;&gt;# 데이터를 그룹으로 묶어줍니다. 성별에 따라 키와 몸무게를 그룹으로 만들겠죠.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;df_grouped_mean&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot;&gt;df_grouped&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;mean&lt;/span&gt;() &lt;span class=&quot;cm-comment&quot;&gt;# 성별에 따른 키와 몸무게의 평균&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;key&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;group&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;df_grouped&lt;/span&gt;:&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;key&lt;/span&gt;) &lt;span class=&quot;cm-comment&quot;&gt;# 그룹을 묶을 때 쓴 키입니다. &lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;group&lt;/span&gt;) &lt;span class=&quot;cm-comment&quot;&gt;# 키로 묶인 그룹입니다. &lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 594px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 594px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h3&gt;&lt;a name='header-n1476' class='md-header-anchor '&gt;&lt;/a&gt;2.3 pandas - 통계 관련 함수&lt;/h3&gt;&lt;p&gt;판다스는 다양한 내장 함수를 제공합니다. &lt;/p&gt;&lt;p&gt;기초적인 통계를 구할 때 유용하죠. &lt;/p&gt;&lt;p&gt;총합(sum), 평균(mean), 상관관계(correlation), 누적합(cursum), 요약(describe) 등 지원하는 함수가 많습니다. &lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;python&quot; style=&quot;page-break-inside: unset;&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;python&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;pandas&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;as&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;pd&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;df&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot;&gt;pd&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;DataFrame&lt;/span&gt;({&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-string&quot;&gt;'몸무게'&lt;/span&gt;: [&lt;span class=&quot;cm-number&quot;&gt;70&lt;/span&gt;, &lt;span class=&quot;cm-number&quot;&gt;80&lt;/span&gt;, &lt;span class=&quot;cm-number&quot;&gt;90&lt;/span&gt;, &lt;span class=&quot;cm-number&quot;&gt;82&lt;/span&gt;, &lt;span class=&quot;cm-number&quot;&gt;91&lt;/span&gt;],&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-string&quot;&gt;'키'&lt;/span&gt;: [&lt;span class=&quot;cm-number&quot;&gt;170&lt;/span&gt;, &lt;span class=&quot;cm-number&quot;&gt;181&lt;/span&gt;, &lt;span class=&quot;cm-number&quot;&gt;185&lt;/span&gt;, &lt;span class=&quot;cm-number&quot;&gt;168&lt;/span&gt;, &lt;span class=&quot;cm-number&quot;&gt;180&lt;/span&gt;]})&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;total_age&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot;&gt;df&lt;/span&gt;[&lt;span class=&quot;cm-string&quot;&gt;'몸무게'&lt;/span&gt;].&lt;span class=&quot;cm-property&quot;&gt;sum&lt;/span&gt;() &lt;span class=&quot;cm-comment&quot;&gt;# 몸무게 총합을 구한다.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;total_age&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;mean_age&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot;&gt;df&lt;/span&gt;[&lt;span class=&quot;cm-string&quot;&gt;'키'&lt;/span&gt;].&lt;span class=&quot;cm-property&quot;&gt;mean&lt;/span&gt;() &lt;span class=&quot;cm-comment&quot;&gt;#  키의 평균을 구한다.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;mean_age&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;df&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;describe&lt;/span&gt;()) &lt;span class=&quot;cm-comment&quot;&gt;# 요약된 통계 결과를 보여줍니다.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;corr&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot;&gt;df&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;corr&lt;/span&gt;() &lt;span class=&quot;cm-comment&quot;&gt;# 항목들간의 상관관계를 보여줍니다.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;corr&lt;/span&gt;) &lt;span class=&quot;cm-comment&quot;&gt;# 상관 계수가 1에 가까울 수록 양의 상관관계가 있고, -1에 가까울수록 음의 상관관계가 있고, 0에 가까울수록 서로 상관이 없습니다.(독립적)&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 374px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 374px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h3&gt;&lt;a name='header-n1482' class='md-header-anchor '&gt;&lt;/a&gt;2.4 pandas - csv 읽기와 저장하기&lt;/h3&gt;&lt;p&gt;csv 읽고 쓰는 건 정말 간단합니다. &lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;python&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;python&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;pandas&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;as&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;pd&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;df&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot;&gt;pd&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;read_csv&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;'my_csv.csv'&lt;/span&gt;) &lt;span class=&quot;cm-comment&quot;&gt;# 읽기&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;df&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 66px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 66px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;한줄이면 쓰기가 됩니다. &lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;python&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;python&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;pandas&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;as&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;pd&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;df&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot;&gt;pd&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;DataFrame&lt;/span&gt;({&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-string&quot;&gt;'name'&lt;/span&gt;: [&lt;span class=&quot;cm-string&quot;&gt;'Bob'&lt;/span&gt;, &lt;span class=&quot;cm-string&quot;&gt;'Jane'&lt;/span&gt;, &lt;span class=&quot;cm-string&quot;&gt;'Mike'&lt;/span&gt;],&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-string&quot;&gt;'age'&lt;/span&gt;: [&lt;span class=&quot;cm-number&quot;&gt;20&lt;/span&gt;, &lt;span class=&quot;cm-number&quot;&gt;33&lt;/span&gt;, &lt;span class=&quot;cm-number&quot;&gt;45&lt;/span&gt;]&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;})&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;df&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;to_csv&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;'my_data.csv'&lt;/span&gt;) &lt;span class=&quot;cm-comment&quot;&gt;# 쓰기&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 154px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 154px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;h1&gt;&lt;a name='header-n1488' class='md-header-anchor '&gt;&lt;/a&gt;3.  matplotlib - 시각화 라이브러리&lt;/h1&gt;&lt;p&gt;매트플롯은 데이터를 시각화 할 때 쓰는 라이브러리입니다. &lt;/p&gt;&lt;p&gt;곡선이나 원, 막대 그래프 등을 그릴 수 있죠.&lt;/p&gt;&lt;p&gt;&lt;em&gt;&lt;strong&gt;간단한 그래프 그려보기&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;python&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;python&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;matplotlib&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;pyplot&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;as&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;plt&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;x&lt;/span&gt; = [&lt;span class=&quot;cm-number&quot;&gt;1&lt;/span&gt;, &lt;span class=&quot;cm-number&quot;&gt;2&lt;/span&gt;, &lt;span class=&quot;cm-number&quot;&gt;3&lt;/span&gt;]&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;y&lt;/span&gt; = [&lt;span class=&quot;cm-number&quot;&gt;0&lt;/span&gt;, &lt;span class=&quot;cm-number&quot;&gt;1&lt;/span&gt;, &lt;span class=&quot;cm-number&quot;&gt;2&lt;/span&gt;]&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;plt&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;plot&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;x&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;y&lt;/span&gt;) &lt;span class=&quot;cm-comment&quot;&gt;# 그래프 그리기&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;plt&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;show&lt;/span&gt;() &lt;span class=&quot;cm-comment&quot;&gt;# 그래프 보여주기&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 154px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 154px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;&lt;em&gt;&lt;strong&gt;사인 곡선 그려보기&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;python&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;python&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;numpy&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;as&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;np&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;matplotlib&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;pyplot&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;as&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;plt&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;x&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot;&gt;np&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;arange&lt;/span&gt;(&lt;span class=&quot;cm-number&quot;&gt;0&lt;/span&gt;, &lt;span class=&quot;cm-number&quot;&gt;10&lt;/span&gt;, &lt;span class=&quot;cm-number&quot;&gt;0.1&lt;/span&gt;) &lt;span class=&quot;cm-comment&quot;&gt;# np.arange()는 리스트를 만들 때 씁니다.  np.arange(시작점,끝점,증가량)이죠.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;x&lt;/span&gt;) &lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;y&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot;&gt;np&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;sin&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;x&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;plt&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;plot&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;x&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;y&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;plt&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;show&lt;/span&gt;()&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 220px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 220px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;em&gt;&lt;strong&gt;여러 그래프 같이 그려보기&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;python&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;python&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;numpy&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;as&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;np&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;matplotlib&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;pyplot&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;as&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;plt&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;t&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot;&gt;np&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;arange&lt;/span&gt;(&lt;span class=&quot;cm-number&quot;&gt;0.&lt;/span&gt;, &lt;span class=&quot;cm-number&quot;&gt;10.&lt;/span&gt;, &lt;span class=&quot;cm-number&quot;&gt;0.2&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-comment&quot;&gt;# 여러 점 동시에 그리기. &lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;plt&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;plot&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;t&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;t&lt;/span&gt;, &lt;span class=&quot;cm-string&quot;&gt;'r--'&lt;/span&gt;, &lt;span class=&quot;cm-comment&quot;&gt;# x축 값은 t, y축 값은 y &lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;cm-variable&quot;&gt;t&lt;/span&gt;, &lt;span class=&quot;cm-number&quot;&gt;2&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;t&lt;/span&gt;, &lt;span class=&quot;cm-string&quot;&gt;'bs'&lt;/span&gt;, &amp;nbsp;&lt;span class=&quot;cm-comment&quot;&gt;# x축 값은 t, y축 값은 2 *t&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;cm-variable&quot;&gt;t&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;t&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;**&lt;/span&gt;&lt;span class=&quot;cm-number&quot;&gt;2&lt;/span&gt;, &lt;span class=&quot;cm-string&quot;&gt;'g^'&lt;/span&gt;) &lt;span class=&quot;cm-comment&quot;&gt;# x 축 값은 t, y 축 값은 t^2&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;plt&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;title&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;'several graphs'&lt;/span&gt;) &lt;span class=&quot;cm-comment&quot;&gt;# 그래프에 제목 붙이기 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;plt&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;show&lt;/span&gt;()&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 264px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 264px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;매트 플롯으로 이렇게 일일이 그래프를 그릴 수도 있지만&lt;/p&gt;&lt;p&gt;판다스 라이브러리는 매트 플롯을 통해 그래프 그리는 기능을 지원합니다. &lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;em&gt;막대 그래프 그려보기&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;python&quot; style=&quot;page-break-inside: unset;&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;python&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;numpy&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;as&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;np&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;pandas&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;as&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;pd&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;random&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;matplotlib&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;pyplot&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;as&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;plt&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;age&lt;/span&gt; = [&lt;span class=&quot;cm-variable&quot;&gt;random&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;randint&lt;/span&gt;(&lt;span class=&quot;cm-number&quot;&gt;20&lt;/span&gt;, &lt;span class=&quot;cm-number&quot;&gt;100&lt;/span&gt;) &lt;span class=&quot;cm-keyword&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;x&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;cm-builtin&quot;&gt;range&lt;/span&gt;(&lt;span class=&quot;cm-number&quot;&gt;0&lt;/span&gt;, &lt;span class=&quot;cm-number&quot;&gt;50&lt;/span&gt;)] &lt;span class=&quot;cm-comment&quot;&gt;# 랜덤인 정수(정수 범위 0~100)가 50개 있는 리스트를 만듭니다. &lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;weight&lt;/span&gt; = [&lt;span class=&quot;cm-variable&quot;&gt;random&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;randint&lt;/span&gt;(&lt;span class=&quot;cm-number&quot;&gt;40&lt;/span&gt;, &lt;span class=&quot;cm-number&quot;&gt;150&lt;/span&gt;) &lt;span class=&quot;cm-keyword&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;cm-builtin&quot;&gt;range&lt;/span&gt;(&lt;span class=&quot;cm-number&quot;&gt;0&lt;/span&gt;, &lt;span class=&quot;cm-number&quot;&gt;50&lt;/span&gt;)] &amp;nbsp; &lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;df&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot;&gt;pd&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;DataFrame&lt;/span&gt;({&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-string&quot;&gt;'age'&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;age&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-string&quot;&gt;'weight'&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;weight&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;})&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;df&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;plot&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;kind&lt;/span&gt;=&lt;span class=&quot;cm-string&quot;&gt;'bar'&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;subplots&lt;/span&gt;=&lt;span class=&quot;cm-keyword&quot;&gt;True&lt;/span&gt;) &lt;span class=&quot;cm-comment&quot;&gt;# pandas 라이브러리 써서 그래프 그림.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;plt&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;title&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;'Bar Chart'&lt;/span&gt;) &lt;span class=&quot;cm-comment&quot;&gt;# 차트에 제목 붙이기&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;plt&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;savefig&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;'bar_chart_random.png'&lt;/span&gt;) &lt;span class=&quot;cm-comment&quot;&gt;# 차트 이미지로 저장하기&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;plt&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;show&lt;/span&gt;() &lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 418px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 418px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;h1&gt;&lt;a name='header-n1502' class='md-header-anchor '&gt;&lt;/a&gt;4. 분석 예제 - 유제품 생산량 및 소비량 분석&lt;/h1&gt;&lt;p&gt;이 데이터는 매년 생산되는 유제품(치즈, 버터, 연유, 탈지분유 등)의 &lt;/p&gt;&lt;p&gt;생산량과 소비량을 나타내고 있습니다. &lt;/p&gt;&lt;p&gt;데이터의 항목은 년도(year), 유제품 종류(dairy), 생산량(production), 소비량(consumption) 으로 이뤄져 있습니다.&lt;/p&gt;&lt;p&gt;어떤 유제품이 더 많이 소비되는지를 보면 산업의 대략적인 흐름을 알 수 있겠죠?&lt;/p&gt;&lt;h1&gt;&lt;a name='header-n1507' class='md-header-anchor '&gt;&lt;/a&gt;4.1.1 유제품 전체 생산량, 소비량&lt;/h1&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;python&quot; style=&quot;page-break-inside: unset;&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;python&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;pandas&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;as&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;pd&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;data&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot;&gt;pd&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;read_csv&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;'csv/milk.csv'&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-comment&quot;&gt;# 위의 5개 데이터만 출력&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;data&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;head&lt;/span&gt;(&lt;span class=&quot;cm-number&quot;&gt;5&lt;/span&gt;)) &lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-comment&quot;&gt;# 열 이름 출력 - 'year', 'dairy', 'production', 'consumption'&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;data&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;columns&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;data&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot;&gt;data&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;set_index&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;'year'&lt;/span&gt;) &lt;span class=&quot;cm-comment&quot;&gt;# index를 year로 정합니다. index는 데이터를 구분할 때 쓰는 기준입니다.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;data&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;describe&lt;/span&gt;())&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;data&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;min&lt;/span&gt;())&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;data&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;max&lt;/span&gt;())&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 396px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 396px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;데이터를 묶어서 보니 의미를 알기가 어렵죠. &lt;/p&gt;&lt;p&gt;평균이랑 최대값을 구했는데도 어디에 써야할지 모르겠네요.&lt;/p&gt;&lt;p&gt;데이터를 좀 더 세분화해서 볼께요.&lt;/p&gt;&lt;h1&gt;&lt;a name='header-n1512' class='md-header-anchor '&gt;&lt;/a&gt;4.2.1 유제품 종류로 본 생산량, 소비량&lt;/h1&gt;&lt;p&gt;유제품 별로 나눠서 데이터를 보도록 하겠습니다. &lt;/p&gt;&lt;p&gt;&lt;a href='https://drive.google.com/open?id=1BPCH51EvE1od2MQgm30DR-s-OVGYZsbJ'&gt;다운로드&lt;/a&gt;&lt;/p&gt;&lt;p&gt;groupby() 함수를 쓸께요.&lt;/p&gt;&lt;p&gt;데이터 타입은 숫자형(numerical data), 범주형(categorical data)가 있는데요. &lt;/p&gt;&lt;p&gt;숫자형은 1,2,3 같은 숫자로 되어 있는 데이터 타입을 말합니다. 판매량, 가격 같은 게 숫자형이지요. &lt;/p&gt;&lt;p&gt;범주형은 몇개의 종류로 나눠진 데이터 형태를 말합니다. &lt;/p&gt;&lt;p&gt;셩별(남자/여자), 혈액형(A/B/O/AB), 영화장르(코미디/액션/로맨틱/호러), 성적(1등/2등/3등/4등/5등)&lt;/p&gt;&lt;p&gt;groupby()는 범주형 데이터에 적용해 주는 게 좋습니다. &lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;python&quot; style=&quot;page-break-inside: unset;&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;python&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;pandas&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;as&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;pd&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;data&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot;&gt;pd&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;read_csv&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;'csv/milk.csv'&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;grouped_dairy&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot;&gt;data&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;groupby&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;'dairy'&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-comment&quot;&gt;# 유제품들의 연평균 생산량과 소비량을 출력&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;grouped_dairy&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;mean&lt;/span&gt;())&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-comment&quot;&gt;# 유제품이 가장 적게 소비되고, 생산된 연도의 데이터를 출력&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;grouped_dairy&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;min&lt;/span&gt;())&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-comment&quot;&gt;# 유제품이 가장 많이 소비되고, 생산된 연도의 데이터를 출력&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;grouped_dairy&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;max&lt;/span&gt;())&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-comment&quot;&gt;# 특정 dairy의 값만 출력&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;grouped_dairy&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;get_group&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;'치즈'&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;grouped_dairy&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;get_group&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;'연유'&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;grouped_dairy&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;get_group&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;'연유'&lt;/span&gt;).&lt;span class=&quot;cm-property&quot;&gt;sort_values&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;'year'&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;ascending&lt;/span&gt;=&lt;span class=&quot;cm-keyword&quot;&gt;True&lt;/span&gt;) &lt;span class=&quot;cm-comment&quot;&gt;# sort_values() - 정렬함. 오른차순으로.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-comment&quot;&gt;# group by로 정렬 후, 특정 year의 값만 출력&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;grouped_year&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot;&gt;data&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;groupby&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;'year'&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;grouped_year&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;get_group&lt;/span&gt;(&lt;span class=&quot;cm-number&quot;&gt;2015&lt;/span&gt;) &lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;grouped_year&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;get_group&lt;/span&gt;(&lt;span class=&quot;cm-number&quot;&gt;2011&lt;/span&gt;) &lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 550px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 550px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;h1&gt;&lt;a name='header-n1523' class='md-header-anchor '&gt;&lt;/a&gt;4.2.2 시각화 하기 &lt;/h1&gt;&lt;p&gt;유제품별 생산량과 소비량을 그래프로 그려보겠습니다. &lt;/p&gt;&lt;p&gt;그래프로 그리면 어떤 제품이 생산량 대비 소비가 많은지 알 수 있겠죠. &lt;/p&gt;&lt;p&gt;소비량이 생산량보다 많으면 수입을 하겠죠? &lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;python&quot; style=&quot;page-break-inside: unset;&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;python&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;cm-def&quot;&gt;milk_graph&lt;/span&gt;():&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;pandas&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;as&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;pd&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;matplotlib&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;pyplot&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;as&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;plt&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;data&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot;&gt;pd&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;read_csv&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;'csv/milk.csv'&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;data&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot;&gt;data&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;set_index&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;'year'&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;grouped_dairy&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot;&gt;data&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;groupby&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;'dairy'&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;key&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;group&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;grouped_dairy&lt;/span&gt;:&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;group_sorted&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot;&gt;group&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;sort_values&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;'year'&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;ascending&lt;/span&gt;=&lt;span class=&quot;cm-keyword&quot;&gt;True&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;group_sorted&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;plot&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;kind&lt;/span&gt;=&lt;span class=&quot;cm-string&quot;&gt;'bar'&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;subplots&lt;/span&gt;=&lt;span class=&quot;cm-keyword&quot;&gt;False&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;plt&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;legend&lt;/span&gt;([&lt;span class=&quot;cm-string&quot;&gt;'production'&lt;/span&gt;, &lt;span class=&quot;cm-string&quot;&gt;'consumption'&lt;/span&gt;])&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;plt&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;xlabel&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;key&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;plt&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;savefig&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;'milk_graph_{}.png'&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;format&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;key&lt;/span&gt;))&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;plt&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;show&lt;/span&gt;()&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;plt&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;close&lt;/span&gt;()&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;milk_graph&lt;/span&gt;()&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 528px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 528px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;h1&gt;&lt;a name='header-n1528' class='md-header-anchor '&gt;&lt;/a&gt;5. 분석 예제 - 온라인 쇼핑몰 데이터 보기&lt;/h1&gt;&lt;p&gt;온라인 쇼핑몰 데이터를 분석해볼께요. &lt;/p&gt;&lt;p&gt;&lt;a href='https://drive.google.com/file/d/1ulAxw7DTozwwGQP9ftxW_bTF4J-gdq8T/view?usp=sharing'&gt;다운로드&lt;/a&gt;&lt;/p&gt;&lt;p&gt;공공 데이터 포털에서 구했구요. 아마도 네이버 스마트 스토어를 크롤링한 것 같아요.&lt;/p&gt;&lt;p&gt;제품의 id(good_id), 가격(sales_price), 제품 종류(pun_name) 등의 항목으로 구성되어 있습니다.&lt;/p&gt;&lt;p&gt;아래 코드를 보면서 어떤 데이터인지 알아볼께요.&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;python&quot; style=&quot;page-break-inside: unset;&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;python&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;pandas&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;as&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;pd&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;numpy&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;as&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;np&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;df&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot;&gt;pd&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;read_csv&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;'csv/commerce_20190301.csv'&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;df&lt;/span&gt;[&lt;span class=&quot;cm-variable&quot;&gt;df&lt;/span&gt;[&lt;span class=&quot;cm-string&quot;&gt;'sales_price'&lt;/span&gt;] &lt;span class=&quot;cm-operator&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;10000&lt;/span&gt;]) &lt;span class=&quot;cm-comment&quot;&gt;# 판매 가격이 10,000원 아래인 물품만 출력합니다. &lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;df_filtered&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot;&gt;df&lt;/span&gt;[&lt;span class=&quot;cm-variable&quot;&gt;df&lt;/span&gt;[&lt;span class=&quot;cm-string&quot;&gt;'sales_price'&lt;/span&gt;] &lt;span class=&quot;cm-operator&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;10000&lt;/span&gt;] &lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;df_sorted&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot;&gt;df_filtered&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;sort_values&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;'sales_price'&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;ascending&lt;/span&gt;=&lt;span class=&quot;cm-keyword&quot;&gt;False&lt;/span&gt;) &lt;span class=&quot;cm-comment&quot;&gt;# 판매가격이 10,000원 이하인 제품중에 싼 순으로 정렬합니다. &lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;df_sorted&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;head&lt;/span&gt;(&lt;span class=&quot;cm-number&quot;&gt;5&lt;/span&gt;)) &lt;span class=&quot;cm-comment&quot;&gt;# head()는 위에서부터 데이터 프레임을 잘라서 쓸 때 씁니다. head(5)는 5개만 데이터를 쓴다는 뜻이죠.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;category&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot;&gt;df&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;groupby&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;'pum_name'&lt;/span&gt;) &lt;span class=&quot;cm-comment&quot;&gt;# 항목별로 데이터를 묶습니다. &lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-comment&quot;&gt;# agg()는 데이터 프레임에 여러 함수를 적용할 때 씁니다. 최소값(min), 최대값(max), 평균(mean)을 한번에 구하고 있습니다. &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;category_agg&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot;&gt;category&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;agg&lt;/span&gt;([&lt;span class=&quot;cm-variable&quot;&gt;np&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;min&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;np&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;max&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;np&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;mean&lt;/span&gt;]) &lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;print&lt;/span&gt;( &lt;span class=&quot;cm-variable&quot;&gt;category_agg&lt;/span&gt;) &lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;print&lt;/span&gt;( &lt;span class=&quot;cm-variable&quot;&gt;category_agg&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;columns&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;print&lt;/span&gt;( &lt;span class=&quot;cm-variable&quot;&gt;category_agg&lt;/span&gt;[[&lt;span class=&quot;cm-string&quot;&gt;'sales_price'&lt;/span&gt;, &lt;span class=&quot;cm-string&quot;&gt;'discount_price'&lt;/span&gt;]] ) &lt;span class=&quot;cm-comment&quot;&gt;# sales_price와 discount_price 열만 확인합니다. &lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 506px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 506px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;데이터의 형태를 알아보았으니 &lt;/p&gt;&lt;p&gt;제품의 항목별로 나눠서 보도록 할께요. &lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;python&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;python&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;df&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot;&gt;pd&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;read_csv&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;'csv/commerce_20190301.csv'&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;grouped_by_category&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot;&gt;df&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;groupby&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;'pum_name'&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;running_suit&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot;&gt;grouped_by_category&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;get_group&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;'운동복'&lt;/span&gt;) &lt;span class=&quot;cm-comment&quot;&gt;# 제품 종류 중에서 운동복만 가져다 쓰려고 합니다.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;running_suit&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;running_suit&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;min&lt;/span&gt;())&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;running_suit&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;max&lt;/span&gt;())&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 154px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 154px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;운동복의 최저가는 4350인데, 최고가는 389,920 이네요.&lt;/p&gt;&lt;p&gt;여러 날의 데이터를 수집한다면 제품 가격의 변화를 알아내거나, 물가 변동을 알 수 있겠죠.&lt;/p&gt;&lt;p&gt;하루치 데이터라 분석이 좀 단순하긴 한데요. &lt;/p&gt;&lt;p&gt;크롤링과 합치면 분석을 응용할 곳이 많습니다. &lt;/p&gt;&lt;p&gt;해외에서 수입해서 중간 거래만 하는 사람이라면, 경쟁 상대가 상품을 얼마에 올리는가, &lt;/p&gt;&lt;p&gt;해외에선 동일한 제품이 얼마인가를 자동화 툴로 주시하다가 &lt;/p&gt;&lt;p&gt;이익이 날만한 제품만 올릴 수도 있죠. &lt;/p&gt;&lt;p&gt;특히 1일치 데이터 뿐만 아니라 장기간 데이터를 수집하면 가치가 더 올라갑니다. &lt;/p&gt;&lt;p&gt;경쟁상대는 몇명이 있는가, 가격이 올라가는 추세인가, 떨어지는 추세인가 알아볼 수 있죠.&lt;/p&gt;&lt;p&gt;다만 온라인 쇼핑 데이터 수집할 때는 단위(3kg, 50개)를 보고, 그 단위에 맞게 가격등을 조절해야합니다. &lt;/p&gt;&lt;p&gt;이 글에서는 하지 않았지만 직접 해보시기를 권합니다. &lt;/p&gt;&lt;p&gt;이번 글과 지난 글에서 정말 기본적인 크롤링과 분석 라이브러리 사용법을 알아보았습니다.&lt;/p&gt;&lt;p&gt;다음에는 크론잡으로 주기적으로 크롤링 하는 법을 알아보겠습니다.  &lt;/p&gt;&lt;p&gt;  &lt;/p&gt;&lt;p&gt;참고 사이트 - numpy 라이브러리 설명, 스탠포드 수업 ( &lt;a href='http://cs231n.github.io/python-numpy-tutorial/' target='_blank' class='url'&gt;http://cs231n.github.io/python-numpy-tutorial/&lt;/a&gt; )&lt;/p&gt;&lt;p&gt;참고 사이트 - 공공 데이터 포펄 ( &lt;a href='https://www.data.go.kr/search/index.do' target='_blank' class='url'&gt;https://www.data.go.kr/search/index.do&lt;/a&gt; )&lt;/p&gt;&lt;p&gt;추천 영상 - 인생은 짧아요. 엑셀 대신 파이썬 (&lt;a href='https://www.youtube.com/watch?v=w7Q_eKN5r-I&amp;list=PLp5Djnc0GE9FVYIi2WXNatf9AmZ0TWVOO&amp;index=2&amp;t=0s' target='_blank' class='url'&gt;https://www.youtube.com/watch?v=w7Q_eKN5r-I&amp;list=PLp5Djnc0GE9FVYIi2WXNatf9AmZ0TWVOO&amp;index=2&amp;t=0s&lt;/a&gt;)&lt;/p&gt;&lt;p&gt;용어 정리  - 공분산과 상관계수 ( &lt;a href='https://datascienceschool.net/view-notebook/4cab41c0d9cd4eafaff8a45f590592c5/' target='_blank' class='url'&gt;https://datascienceschool.net/view-notebook/4cab41c0d9cd4eafaff8a45f590592c5/&lt;/a&gt; )&lt;/p&gt;&lt;p&gt;이미지 출처 - The components of a DataFrame (&lt;a href='https://medium.com/epfl-extension-school/selecting-data-from-a-pandas-dataframe-53917dc39953' target='_blank' class='url'&gt;https://medium.com/epfl-extension-school/selecting-data-from-a-pandas-dataframe-53917dc39953&lt;/a&gt; ) &lt;/p&gt;&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;</description>
      <category>파이썬</category>
      <author>에드 신</author>
      <guid isPermaLink="true">https://software-creator.tistory.com/22</guid>
      <comments>https://software-creator.tistory.com/22#entry22comment</comments>
      <pubDate>Wed, 24 Apr 2019 16:48:44 +0900</pubDate>
    </item>
    <item>
      <title>Flutter - 유닛 테스트 해보기</title>
      <link>https://software-creator.tistory.com/21</link>
      <description>&lt;!doctype html&gt;
&lt;html&gt;
&lt;head&gt;
&lt;meta charset='UTF-8'&gt;&lt;meta name='viewport' content='width=device-width initial-scale=1'&gt;
&lt;meta name=&quot;description&quot; content=&quot;사실 다트의 테스팅도 다른 테스트와 비슷합니다. 용어가 조금 다를 뿐이죠. 이번 글을 통해 제가 개발하며 배운 테스팅을 정리해보려 합니다. 플러터에서 쓰이는 테스트 방식은 크게 3가지인데요.유닛 테스트, 위젯 테스트, 통합 테스트입니다. 뒤로 갈수록 테스팅의 규모가 커지는 대신, 시간이 더 오래걸리죠. 이번 글에선 유닛 테스팅을 알아보도록 할께요.&quot;&gt;
&lt;title&gt;flutter_testing&lt;/title&gt;&lt;link href='https://fonts.loli.net/css?family=Open+Sans:400italic,700italic,700,400&amp;subset=latin,latin-ext' rel='stylesheet' type='text/css' /&gt;&lt;style type='text/css'&gt;html {overflow-x: initial !important;}:root { --bg-color: #ffffff; --text-color: #333333; --select-text-bg-color: #B5D6FC; --select-text-font-color: auto; --monospace: &quot;Lucida Console&quot;,Consolas,&quot;Courier&quot;,monospace; }
html { font-size: 14px; background-color: var(--bg-color); color: var(--text-color); font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; -webkit-font-smoothing: antialiased; }
body { margin: 0px; padding: 0px; height: auto; bottom: 0px; top: 0px; left: 0px; right: 0px; font-size: 1rem; line-height: 1.42857143; overflow-x: hidden; background-image: inherit; background-size: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: inherit; background-position: inherit inherit; background-repeat: inherit inherit; }
iframe { margin: auto; }
a.url { word-break: break-all; }
a:active, a:hover { outline: 0px; }
.in-text-selection, ::selection { text-shadow: none; background: var(--select-text-bg-color); color: var(--select-text-font-color); }
#write { margin: 0px auto; height: auto; width: inherit; word-break: normal; word-wrap: break-word; position: relative; white-space: normal; overflow-x: visible; padding-top: 40px; }
#write.first-line-indent p { text-indent: 2em; }
#write.first-line-indent li p, #write.first-line-indent p * { text-indent: 0px; }
#write.first-line-indent li { margin-left: 2em; }
.for-image #write { padding-left: 8px; padding-right: 8px; }
body.typora-export { padding-left: 30px; padding-right: 30px; }
.typora-export .footnote-line, .typora-export li, .typora-export p { white-space: pre-wrap; }
@media screen and (max-width: 500px) {
  body.typora-export { padding-left: 0px; padding-right: 0px; }
  #write { padding-left: 20px; padding-right: 20px; }
  .CodeMirror-sizer { margin-left: 0px !important; }
  .CodeMirror-gutters { display: none !important; }
}
#write li &gt; figure:first-child { margin-top: -20px; }
#write ol, #write ul { position: relative; }
img { max-width: 100%; vertical-align: middle; }
button, input, select, textarea { color: inherit; font-family: inherit; font-size: inherit; font-style: inherit; font-variant-caps: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; }
input[type=&quot;checkbox&quot;], input[type=&quot;radio&quot;] { line-height: normal; padding: 0px; }
*, ::after, ::before { box-sizing: border-box; }
#write h1, #write h2, #write h3, #write h4, #write h5, #write h6, #write p, #write pre { width: inherit; }
#write h1, #write h2, #write h3, #write h4, #write h5, #write h6, #write p { position: relative; }
h1, h2, h3, h4, h5, h6 { break-after: avoid-page; break-inside: avoid; orphans: 2; }
p { orphans: 4; }
h1 { font-size: 2rem; }
h2 { font-size: 1.8rem; }
h3 { font-size: 1.6rem; }
h4 { font-size: 1.4rem; }
h5 { font-size: 1.2rem; }
h6 { font-size: 1rem; }
.md-math-block, .md-rawblock, h1, h2, h3, h4, h5, h6, p { margin-top: 1rem; margin-bottom: 1rem; }
.hidden { display: none; }
.md-blockmeta { color: rgb(204, 204, 204); font-weight: 700; font-style: italic; }
a { cursor: pointer; }
sup.md-footnote { padding: 2px 4px; background-color: rgba(238, 238, 238, 0.701961); color: rgb(85, 85, 85); border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; cursor: pointer; }
sup.md-footnote a, sup.md-footnote a:hover { color: inherit; text-transform: inherit; text-decoration: inherit; }
#write input[type=&quot;checkbox&quot;] { cursor: pointer; width: inherit; height: inherit; }
figure { overflow-x: auto; margin: 1.2em 0px; max-width: calc(100% + 16px); padding: 0px; }
figure &gt; table { margin: 0px !important; }
tr { break-inside: avoid; break-after: auto; }
thead { display: table-header-group; }
table { border-collapse: collapse; border-spacing: 0px; width: 100%; overflow: auto; break-inside: auto; text-align: left; }
table.md-table td { min-width: 32px; }
.CodeMirror-gutters { border-right-width: 0px; background-color: inherit; }
.CodeMirror-linenumber { }
.CodeMirror { text-align: left; }
.CodeMirror-placeholder { opacity: 0.3; }
.CodeMirror pre { padding: 0px 4px; }
.CodeMirror-lines { padding: 0px; }
div.hr:focus { cursor: none; }
#write pre { white-space: pre-wrap; }
#write.fences-no-line-wrapping pre { white-space: pre; }
#write pre.ty-contain-cm { white-space: normal; }
.CodeMirror-gutters { margin-right: 4px; }
.md-fences { font-size: 0.9rem; display: block; break-inside: avoid; text-align: left; overflow: visible; white-space: pre; background-image: inherit; background-size: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: inherit; position: relative !important; background-position: inherit inherit; background-repeat: inherit inherit; }
.md-diagram-panel { width: 100%; margin-top: 10px; text-align: center; padding-top: 0px; padding-bottom: 8px; overflow-x: auto; }
#write .md-fences.mock-cm { white-space: pre-wrap; }
.md-fences.md-fences-with-lineno { padding-left: 0px; }
#write.fences-no-line-wrapping .md-fences.mock-cm { white-space: pre; overflow-x: auto; }
.md-fences.mock-cm.md-fences-with-lineno { padding-left: 8px; }
.CodeMirror-line, twitterwidget { break-inside: avoid; }
.footnotes { opacity: 0.8; font-size: 0.9rem; margin-top: 1em; margin-bottom: 1em; }
.footnotes + .footnotes { margin-top: 0px; }
.md-reset { margin: 0px; padding: 0px; border: 0px; outline: 0px; vertical-align: top; text-decoration: none; text-shadow: none; float: none; position: static; width: auto; height: auto; white-space: nowrap; cursor: inherit; line-height: normal; font-weight: 400; text-align: left; box-sizing: content-box; direction: ltr; background-position: 0px 0px; background-repeat: initial initial; }
li div { padding-top: 0px; }
blockquote { margin: 1rem 0px; }
li .mathjax-block, li p { margin: 0.5rem 0px; }
li { margin: 0px; position: relative; }
blockquote &gt; :last-child { margin-bottom: 0px; }
blockquote &gt; :first-child, li &gt; :first-child { margin-top: 0px; }
.footnotes-area { color: rgb(136, 136, 136); margin-top: 0.714rem; padding-bottom: 0.143rem; white-space: normal; }
#write .footnote-line { white-space: pre-wrap; }
@media print {
  body, html { border: 1px solid transparent; height: 99%; break-after: avoid-page; break-before: avoid-page; }
  #write { margin-top: 0px; padding-top: 0px; border-color: transparent !important; }
  .typora-export * { -webkit-print-color-adjust: exact; }
  html.blink-to-pdf { font-size: 13px; }
  .typora-export #write { padding-left: 32px; padding-right: 32px; padding-bottom: 0px; break-after: avoid-page; }
  .typora-export #write::after { height: 0px; }
  @page { margin: 20mm 0px; }
}
.footnote-line { margin-top: 0.714em; font-size: 0.7em; }
a img, img a { cursor: pointer; }
pre.md-meta-block { font-size: 0.8rem; min-height: 0.8rem; white-space: pre-wrap; background-color: rgb(204, 204, 204); display: block; overflow-x: hidden; background-position: initial initial; background-repeat: initial initial; }
p &gt; .md-image:only-child:not(.md-img-error) img, p &gt; img:only-child { display: block; margin: auto; }
p &gt; .md-image:only-child { display: inline-block; width: 100%; }
#write .MathJax_Display { margin: 0.8em 0px 0px; }
.md-math-block { width: 100%; }
.md-math-block:not(:empty)::after { display: none; }
[contenteditable=&quot;true&quot;]:active, [contenteditable=&quot;true&quot;]:focus { outline: 0px; box-shadow: none; }
.md-task-list-item { position: relative; list-style-type: none; }
.task-list-item.md-task-list-item { padding-left: 0px; }
.md-task-list-item &gt; input { position: absolute; top: 0px; left: 0px; margin-left: -1.2em; margin-top: calc(1em - 10px); border: none; }
.math { font-size: 1rem; }
.md-toc { min-height: 3.58rem; position: relative; font-size: 0.9rem; border-top-left-radius: 10px; border-top-right-radius: 10px; border-bottom-right-radius: 10px; border-bottom-left-radius: 10px; }
.md-toc-content { position: relative; margin-left: 0px; }
.md-toc-content::after, .md-toc::after { display: none; }
.md-toc-item { display: block; color: rgb(65, 131, 196); }
.md-toc-item a { text-decoration: none; }
.md-toc-inner:hover { text-decoration: underline; }
.md-toc-inner { display: inline-block; cursor: pointer; }
.md-toc-h1 .md-toc-inner { margin-left: 0px; font-weight: 700; }
.md-toc-h2 .md-toc-inner { margin-left: 2em; }
.md-toc-h3 .md-toc-inner { margin-left: 4em; }
.md-toc-h4 .md-toc-inner { margin-left: 6em; }
.md-toc-h5 .md-toc-inner { margin-left: 8em; }
.md-toc-h6 .md-toc-inner { margin-left: 10em; }
@media screen and (max-width: 48em) {
  .md-toc-h3 .md-toc-inner { margin-left: 3.5em; }
  .md-toc-h4 .md-toc-inner { margin-left: 5em; }
  .md-toc-h5 .md-toc-inner { margin-left: 6.5em; }
  .md-toc-h6 .md-toc-inner { margin-left: 8em; }
}
a.md-toc-inner { font-size: inherit; font-style: inherit; font-weight: inherit; line-height: inherit; }
.footnote-line a:not(.reversefootnote) { color: inherit; }
.md-attr { display: none; }
.md-fn-count::after { content: &quot;.&quot;; }
code, pre, samp, tt { font-family: var(--monospace); }
kbd { margin: 0px 0.1em; padding: 0.1em 0.6em; font-size: 0.8em; color: rgb(36, 39, 41); background-color: rgb(255, 255, 255); border: 1px solid rgb(173, 179, 185); border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; box-shadow: rgba(12, 13, 14, 0.2) 0px 1px 0px, rgb(255, 255, 255) 0px 0px 0px 2px inset; white-space: nowrap; vertical-align: middle; background-position: initial initial; background-repeat: initial initial; }
.md-comment { color: rgb(162, 127, 3); opacity: 0.8; font-family: var(--monospace); }
code { text-align: left; }
a.md-print-anchor { white-space: pre !important; border: none !important; display: inline-block !important; position: absolute !important; width: 1px !important; right: 0px !important; outline: 0px !important; text-shadow: initial !important; background-position: 0px 0px !important; background-repeat: initial initial !important; }
.md-inline-math .MathJax_SVG .noError { display: none !important; }
.html-for-mac .inline-math-svg .MathJax_SVG { vertical-align: 0.2px; }
.md-math-block .MathJax_SVG_Display { text-align: center; margin: 0px; position: relative; text-indent: 0px; max-width: none; max-height: none; min-height: 0px; min-width: 100%; width: auto; overflow-y: hidden; display: block !important; }
.MathJax_SVG_Display, .md-inline-math .MathJax_SVG_Display { width: auto; margin: inherit; display: inline-block !important; }
.MathJax_SVG .MJX-monospace { font-family: var(--monospace); }
.MathJax_SVG .MJX-sans-serif { font-family: sans-serif; }
.MathJax_SVG { display: inline; font-style: normal; font-weight: 400; line-height: normal; zoom: 90%; text-indent: 0px; text-align: left; text-transform: none; letter-spacing: normal; word-spacing: normal; word-wrap: normal; white-space: nowrap; float: none; direction: ltr; max-width: none; max-height: none; min-width: 0px; min-height: 0px; border: 0px; padding: 0px; margin: 0px; }
.MathJax_SVG * { transition: none; }
.MathJax_SVG_Display svg { vertical-align: middle !important; margin-bottom: 0px !important; }
.os-windows.monocolor-emoji .md-emoji { font-family: &quot;Segoe UI Symbol&quot;, sans-serif; }
.md-diagram-panel &gt; svg { max-width: 100%; }
[lang=&quot;mermaid&quot;] svg, [lang=&quot;flow&quot;] svg { max-width: 100%; }
[lang=&quot;mermaid&quot;] .node text { font-size: 1rem; }
table tr th { border-bottom-width: 0px; }
video { max-width: 100%; display: block; margin: 0px auto; }
iframe { max-width: 100%; width: 100%; border: none; }
.highlight td, .highlight tr { border: 0px; }


.CodeMirror { height: auto; }
.CodeMirror.cm-s-inner { background-image: inherit; background-size: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: inherit; background-position: inherit inherit; background-repeat: inherit inherit; }
.CodeMirror-scroll { overflow-y: hidden; overflow-x: auto; z-index: 3; }
.CodeMirror-gutter-filler, .CodeMirror-scrollbar-filler { background-color: rgb(255, 255, 255); }
.CodeMirror-gutters { border-right-width: 1px; border-right-style: solid; border-right-color: rgb(221, 221, 221); background-image: inherit; background-size: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: inherit; white-space: nowrap; background-position: inherit inherit; background-repeat: inherit inherit; }
.CodeMirror-linenumber { padding: 0px 3px 0px 5px; text-align: right; color: rgb(153, 153, 153); }
.cm-s-inner .cm-keyword { color: rgb(119, 0, 136); }
.cm-s-inner .cm-atom, .cm-s-inner.cm-atom { color: rgb(34, 17, 153); }
.cm-s-inner .cm-number { color: rgb(17, 102, 68); }
.cm-s-inner .cm-def { color: rgb(0, 0, 255); }
.cm-s-inner .cm-variable { color: rgb(0, 0, 0); }
.cm-s-inner .cm-variable-2 { color: rgb(0, 85, 170); }
.cm-s-inner .cm-variable-3 { color: rgb(0, 136, 85); }
.cm-s-inner .cm-string { color: rgb(170, 17, 17); }
.cm-s-inner .cm-property { color: rgb(0, 0, 0); }
.cm-s-inner .cm-operator { color: rgb(152, 26, 26); }
.cm-s-inner .cm-comment, .cm-s-inner.cm-comment { color: rgb(170, 85, 0); }
.cm-s-inner .cm-string-2 { color: rgb(255, 85, 0); }
.cm-s-inner .cm-meta { color: rgb(85, 85, 85); }
.cm-s-inner .cm-qualifier { color: rgb(85, 85, 85); }
.cm-s-inner .cm-builtin { color: rgb(51, 0, 170); }
.cm-s-inner .cm-bracket { color: rgb(153, 153, 119); }
.cm-s-inner .cm-tag { color: rgb(17, 119, 0); }
.cm-s-inner .cm-attribute { color: rgb(0, 0, 204); }
.cm-s-inner .cm-header, .cm-s-inner.cm-header { color: rgb(0, 0, 255); }
.cm-s-inner .cm-quote, .cm-s-inner.cm-quote { color: rgb(0, 153, 0); }
.cm-s-inner .cm-hr, .cm-s-inner.cm-hr { color: rgb(153, 153, 153); }
.cm-s-inner .cm-link, .cm-s-inner.cm-link { color: rgb(0, 0, 204); }
.cm-negative { color: rgb(221, 68, 68); }
.cm-positive { color: rgb(34, 153, 34); }
.cm-header, .cm-strong { font-weight: 700; }
.cm-del { text-decoration: line-through; }
.cm-em { font-style: italic; }
.cm-link { text-decoration: underline; }
.cm-error { color: red; }
.cm-invalidchar { color: red; }
.cm-constant { color: rgb(38, 139, 210); }
.cm-defined { color: rgb(181, 137, 0); }
div.CodeMirror span.CodeMirror-matchingbracket { color: rgb(0, 255, 0); }
div.CodeMirror span.CodeMirror-nonmatchingbracket { color: rgb(255, 34, 34); }
.cm-s-inner .CodeMirror-activeline-background { background-image: inherit; background-size: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: inherit; background-position: inherit inherit; background-repeat: inherit inherit; }
.CodeMirror { position: relative; overflow: hidden; }
.CodeMirror-scroll { height: 100%; outline: 0px; position: relative; box-sizing: content-box; background-image: inherit; background-size: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: inherit; background-position: inherit inherit; background-repeat: inherit inherit; }
.CodeMirror-sizer { position: relative; }
.CodeMirror-gutter-filler, .CodeMirror-hscrollbar, .CodeMirror-scrollbar-filler, .CodeMirror-vscrollbar { position: absolute; z-index: 6; display: none; }
.CodeMirror-vscrollbar { right: 0px; top: 0px; overflow: hidden; }
.CodeMirror-hscrollbar { bottom: 0px; left: 0px; overflow: hidden; }
.CodeMirror-scrollbar-filler { right: 0px; bottom: 0px; }
.CodeMirror-gutter-filler { left: 0px; bottom: 0px; }
.CodeMirror-gutters { position: absolute; left: 0px; top: 0px; padding-bottom: 30px; z-index: 3; }
.CodeMirror-gutter { white-space: normal; height: 100%; box-sizing: content-box; padding-bottom: 30px; margin-bottom: -32px; display: inline-block; }
.CodeMirror-gutter-wrapper { position: absolute; z-index: 4; border: none !important; background-position: 0px 0px !important; background-repeat: initial initial !important; }
.CodeMirror-gutter-background { position: absolute; top: 0px; bottom: 0px; z-index: 4; }
.CodeMirror-gutter-elt { position: absolute; cursor: default; z-index: 4; }
.CodeMirror-lines { cursor: text; }
.CodeMirror pre { border-top-left-radius: 0px; border-top-right-radius: 0px; border-bottom-right-radius: 0px; border-bottom-left-radius: 0px; border-width: 0px; font-family: inherit; font-size: inherit; margin: 0px; white-space: pre; word-wrap: normal; color: inherit; z-index: 2; position: relative; overflow: visible; background-position: 0px 0px; background-repeat: initial initial; }
.CodeMirror-wrap pre { word-wrap: break-word; white-space: pre-wrap; word-break: normal; }
.CodeMirror-code pre { border-right-width: 30px; border-right-style: solid; border-right-color: transparent; width: fit-content; }
.CodeMirror-wrap .CodeMirror-code pre { border-right-style: none; width: auto; }
.CodeMirror-linebackground { position: absolute; left: 0px; right: 0px; top: 0px; bottom: 0px; z-index: 0; }
.CodeMirror-linewidget { position: relative; z-index: 2; overflow: auto; }
.CodeMirror-wrap .CodeMirror-scroll { overflow-x: hidden; }
.CodeMirror-measure { position: absolute; width: 100%; height: 0px; overflow: hidden; visibility: hidden; }
.CodeMirror-measure pre { position: static; }
.CodeMirror div.CodeMirror-cursor { position: absolute; visibility: hidden; border-right-style: none; width: 0px; }
.CodeMirror div.CodeMirror-cursor { visibility: hidden; }
.CodeMirror-focused div.CodeMirror-cursor { visibility: inherit; }
.cm-searching { background-color: rgba(255, 255, 0, 0.4); background-position: initial initial; background-repeat: initial initial; }
@media print {
  .CodeMirror div.CodeMirror-cursor { visibility: hidden; }
}


:root {
    --side-bar-bg-color: #fafafa;
    --control-text-color: #777;
}

@include-when-export url(https://fonts.loli.net/css?family=Open+Sans:400italic,700italic,700,400&amp;subset=latin,latin-ext);

html {
    font-size: 16px;
}

body {
    font-family: &quot;Open Sans&quot;,&quot;Clear Sans&quot;,&quot;Helvetica Neue&quot;,Helvetica,Arial,sans-serif;
    color: rgb(51, 51, 51);
    line-height: 1.6;
}

#write {
    max-width: 860px;
  	margin: 0 auto;
  	padding: 30px;
    padding-bottom: 100px;
}
#write &gt; ul:first-child,
#write &gt; ol:first-child{
    margin-top: 30px;
}

a {
    color: #4183C4;
}
h1,
h2,
h3,
h4,
h5,
h6 {
    position: relative;
    margin-top: 1rem;
    margin-bottom: 1rem;
    font-weight: bold;
    line-height: 1.4;
    cursor: text;
}
h1:hover a.anchor,
h2:hover a.anchor,
h3:hover a.anchor,
h4:hover a.anchor,
h5:hover a.anchor,
h6:hover a.anchor {
    text-decoration: none;
}
h1 tt,
h1 code {
    font-size: inherit;
}
h2 tt,
h2 code {
    font-size: inherit;
}
h3 tt,
h3 code {
    font-size: inherit;
}
h4 tt,
h4 code {
    font-size: inherit;
}
h5 tt,
h5 code {
    font-size: inherit;
}
h6 tt,
h6 code {
    font-size: inherit;
}
h1 {
    padding-bottom: .3em;
    font-size: 2.25em;
    line-height: 1.2;
    border-bottom: 1px solid #eee;
}
h2 {
   padding-bottom: .3em;
    font-size: 1.75em;
    line-height: 1.225;
    border-bottom: 1px solid #eee;
}
h3 {
    font-size: 1.5em;
    line-height: 1.43;
}
h4 {
    font-size: 1.25em;
}
h5 {
    font-size: 1em;
}
h6 {
   font-size: 1em;
    color: #777;
}
p,
blockquote,
ul,
ol,
dl,
table{
    margin: 0.8em 0;
}
li&gt;ol,
li&gt;ul {
    margin: 0 0;
}
hr {
    height: 2px;
    padding: 0;
    margin: 16px 0;
    background-color: #e7e7e7;
    border: 0 none;
    overflow: hidden;
    box-sizing: content-box;
}

li p.first {
    display: inline-block;
}
ul,
ol {
    padding-left: 30px;
}
ul:first-child,
ol:first-child {
    margin-top: 0;
}
ul:last-child,
ol:last-child {
    margin-bottom: 0;
}
blockquote {
    border-left: 4px solid #dfe2e5;
    padding: 0 15px;
    color: #777777;
}
blockquote blockquote {
    padding-right: 0;
}
table {
    padding: 0;
    word-break: initial;
}
table tr {
    border-top: 1px solid #dfe2e5;
    margin: 0;
    padding: 0;
}
table tr:nth-child(2n),
thead {
    background-color: #f8f8f8;
}
table tr th {
    font-weight: bold;
    border: 1px solid #dfe2e5;
    border-bottom: 0;
    text-align: left;
    margin: 0;
    padding: 6px 13px;
}
table tr td {
    border: 1px solid #dfe2e5;
    text-align: left;
    margin: 0;
    padding: 6px 13px;
}
table tr th:first-child,
table tr td:first-child {
    margin-top: 0;
}
table tr th:last-child,
table tr td:last-child {
    margin-bottom: 0;
}

.CodeMirror-lines {
    padding-left: 4px;
}

.code-tooltip {
    box-shadow: 0 1px 1px 0 rgba(0,28,36,.3);
    border-top: 1px solid #eef2f2;
}

.md-fences,
code,
tt {
    border: 1px solid #e7eaed;
    background-color: #f8f8f8;
    border-radius: 3px;
    padding: 0;
    padding: 2px 4px 0px 4px;
    font-size: 0.9em;
}

code {
    background-color: #f3f4f4;
    padding: 0 2px 0 2px;
}

.md-fences {
    margin-bottom: 15px;
    margin-top: 15px;
    padding-top: 8px;
    padding-bottom: 6px;
}


.md-task-list-item &gt; input {
  margin-left: -1.3em;
}

@media print {
    html {
        font-size: 13px;
    }
    table,
    pre {
        page-break-inside: avoid;
    }
    pre {
        word-wrap: break-word;
    }
}

.md-fences {
	background-color: #f8f8f8;
}
#write pre.md-meta-block {
	padding: 1rem;
    font-size: 85%;
    line-height: 1.45;
    background-color: #f7f7f7;
    border: 0;
    border-radius: 3px;
    color: #777777;
    margin-top: 0 !important;
}

.mathjax-block&gt;.code-tooltip {
	bottom: .375rem;
}

.md-mathjax-midline {
    background: #fafafa;
}

#write&gt;h3.md-focus:before{
	left: -1.5625rem;
	top: .375rem;
}
#write&gt;h4.md-focus:before{
	left: -1.5625rem;
	top: .285714286rem;
}
#write&gt;h5.md-focus:before{
	left: -1.5625rem;
	top: .285714286rem;
}
#write&gt;h6.md-focus:before{
	left: -1.5625rem;
	top: .285714286rem;
}
.md-image&gt;.md-meta {
    /*border: 1px solid #ddd;*/
    border-radius: 3px;
    padding: 2px 0px 0px 4px;
    font-size: 0.9em;
    color: inherit;
}

.md-tag {
    color: #a7a7a7;
    opacity: 1;
}

.md-toc {
    margin-top:20px;
    padding-bottom:20px;
}

.sidebar-tabs {
    border-bottom: none;
}

#typora-quick-open {
    border: 1px solid #ddd;
    background-color: #f8f8f8;
}

#typora-quick-open-item {
    background-color: #FAFAFA;
    border-color: #FEFEFE #e5e5e5 #e5e5e5 #eee;
    border-style: solid;
    border-width: 1px;
}

/** focus mode */
.on-focus-mode blockquote {
    border-left-color: rgba(85, 85, 85, 0.12);
}

header, .context-menu, .megamenu-content, footer{
    font-family: &quot;Segoe UI&quot;, &quot;Arial&quot;, sans-serif;
}

.file-node-content:hover .file-node-icon,
.file-node-content:hover .file-node-open-state{
    visibility: visible;
}

.mac-seamless-mode #typora-sidebar {
    background-color: #fafafa;
    background-color: var(--side-bar-bg-color);
}

.md-lang {
    color: #b4654d;
}

.html-for-mac .context-menu {
    --item-hover-bg-color: #E6F0FE;
}

#md-notification .btn {
    border: 0;
}

.dropdown-menu .divider {
    border-color: #e5e5e5;
}

 .typora-export li, .typora-export p, .typora-export,  .footnote-line {white-space: normal;}
&lt;/style&gt;
&lt;/head&gt;
&lt;body class='typora-export' &gt;
&lt;div  id='write'  class = 'is-mac'&gt;&lt;h3&gt;&lt;a name='header-n0' class='md-header-anchor '&gt;&lt;/a&gt;플러터 유닛 테스팅&lt;/h3&gt;&lt;ul&gt;&lt;li&gt;유닛 테스팅 (Unit Testing)&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;첨엔 핫리로딩의 효율성이 정말 좋다보니 테스팅을 할 필요성을 못 느꼈었는데요. &lt;/p&gt;&lt;p&gt;점차 코드를 추가하다보니 테스트를 해야겠단 생각이 들었습니다. &lt;/p&gt;&lt;p&gt;이번에 테스팅을 공부하면서 다트가 정말 잘 만들어졌구나 하는 걸 느꼈습니다. &lt;/p&gt;&lt;p&gt;사실 다트의 테스팅도 다른 테스트와 비슷합니다. 용어가 조금 다를 뿐이죠.&lt;/p&gt;&lt;p&gt;이번 글을 통해 제가 개발하며 배운 테스팅을 정리해보려 합니다. &lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;플러터에서 쓰이는 테스트 방식은 크게 3가지인데요.&lt;/p&gt;&lt;p&gt;유닛 테스트, 위젯 테스트, 통합 테스트입니다. &lt;/p&gt;&lt;p&gt;뒤로 갈수록 테스팅의 규모가 커지는 대신, 시간이 더 오래걸리죠. &lt;/p&gt;&lt;p&gt;이번 글에선 유닛 테스팅을 알아보도록 할께요.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h3&gt;&lt;a name='header-n21' class='md-header-anchor '&gt;&lt;/a&gt;&lt;strong&gt;1. Unit Testing&lt;/strong&gt;&lt;/h3&gt;&lt;p&gt;유닛 테스팅은 메소트나 클래스처럼 작은 단위를 테스트할 때 쓰입니다. 외부에 의존하지 않는 테스트를 말하죠. 보통 IO 처리를 하거나, 데이터베이스에 접근 하는 걸 외부에 의존한다고 하는데요. &lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;외부에 의존하는 경우는 Mockito 같은 테스트 프레임워크를 써서 테스트를 합니다. &lt;/p&gt;&lt;p&gt;일단 다트의 기본 테스트 프레임워크를 알아보도록 할께요. Mockito는 다른 글에서 알아보도록 하겠습니다.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h5&gt;&lt;a name='header-n26' class='md-header-anchor '&gt;&lt;/a&gt;1.1 Unit Testing - 다트 기본 테스트 프레임워크&lt;/h5&gt;&lt;h6&gt;&lt;a name='header-n27' class='md-header-anchor '&gt;&lt;/a&gt;1.1.1 설정 및 첫 테스트 실행하기&lt;/h6&gt;&lt;p&gt;우선 test 라이브러리를 추가해주세요.&lt;/p&gt;&lt;p&gt;&lt;code&gt;pubspec.yaml&lt;/code&gt;&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;yaml&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;yaml&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-atom&quot;&gt;dev_dependencies&lt;/span&gt;&lt;span class=&quot;cm-meta&quot;&gt;:&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-atom&quot;&gt;  test&lt;/span&gt;&lt;span class=&quot;cm-meta&quot;&gt;: &lt;/span&gt;any&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 44px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 44px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;test 폴더&lt;/strong&gt;에다가 테스트 파일(simple_test.dart)을 만들어주세요.&lt;/p&gt;&lt;p&gt;파일 이름은 &lt;strong&gt;항상 test로 끝나야합니다.&lt;/strong&gt;  &lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;em&gt;test/simple_test.dart&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;dart&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;dart&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;span&gt;&lt;span&gt;​&lt;/span&gt;x&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;cm-string&quot;&gt;'package:test/test.dart'&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;main&lt;/span&gt;() {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;test&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;'should be lowercase'&lt;/span&gt;, () { &lt;span class=&quot;cm-comment&quot;&gt;// 어떤 테스트를 할지 설명하고,안에 있는 테스트를 실행합니다. &lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;String&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;hello&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-string&quot;&gt;&quot;Hello World&quot;&lt;/span&gt;; &lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;expect&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;hello&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;toLowerCase&lt;/span&gt;(), &lt;span class=&quot;cm-string&quot;&gt;&quot;hello world&quot;&lt;/span&gt;); &lt;span class=&quot;cm-comment&quot;&gt;// 테스트를 실행했을 때의 기대값과 실제값을 비교합니다.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  });&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 198px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 198px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;테스트 코드는 &lt;strong&gt;&lt;em&gt;main()&lt;/em&gt;&lt;/strong&gt;에 적어주셔야합니다. &lt;/p&gt;&lt;p&gt;테스트 코드는 크게 &lt;strong&gt;&lt;em&gt;test()&lt;/em&gt;&lt;/strong&gt; 함수와 &lt;strong&gt;&lt;em&gt;expect()&lt;/em&gt;&lt;/strong&gt; 함수로 되어 있습니다. &lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;em&gt;test()&lt;/em&gt;&lt;/strong&gt;는 테스트를 실행할 때 쓰이는 함수고, &lt;strong&gt;&lt;em&gt;expect()&lt;/em&gt;&lt;/strong&gt;는 테스트 실행값과 기대값을 비교하는 함수입니다. &lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;그럼 테스트를 실행해보겠습니다. &lt;/p&gt;&lt;p&gt;이 테스트는 소문자로 잘 바뀌는지 확인해보는 테스트입니다.&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;shell&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;shell&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;flutter test test/simple_test.dart &lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 22px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 22px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;문제 없이 통과 되었네요.&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;shell&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;shell&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-number&quot;&gt;00&lt;/span&gt;:01 &lt;span class=&quot;cm-operator&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;cm-number&quot;&gt;1&lt;/span&gt;: All tests passed! &amp;nbsp;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 22px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 22px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;그럼 테스트할 때 쓰이는 기본적인 함수들을 알아보겠습니다.&lt;/p&gt;&lt;h6&gt;&lt;a name='header-n46' class='md-header-anchor '&gt;&lt;/a&gt;1.1.2 다트의 테스트 함수&lt;/h6&gt;&lt;ul&gt;&lt;li&gt;&lt;p&gt;test &lt;/p&gt;&lt;ul&gt;&lt;li&gt;테스트에 대한 설명과 실제 테스트 코드를 적습니다. &lt;/li&gt;&lt;li&gt;시간 제한(timeout) 이나 테스트 환경 (브라우저, OS) 등도 적어줄 수 있습니다. &lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;expect&lt;/p&gt;&lt;ul&gt;&lt;li&gt;expect(실제값, 기대값)&lt;/li&gt;&lt;li&gt;테스트의 기대값과 실제값을 비교합니다.&lt;/li&gt;&lt;li&gt;다른 언어의 assert 와 동일하다고 보시면 됩니다. &lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;setup&lt;/p&gt;&lt;ul&gt;&lt;li&gt;테스트를 시작하기 전에 설정을 해줍니다. &lt;/li&gt;&lt;li&gt;테스트 단위 하나마다 실행됩니다. ( &lt;strong&gt;&lt;em&gt;test()&lt;/em&gt;&lt;/strong&gt; 함수 하나가 테스트 단위 하나에요. 한 파일에 여러 &lt;strong&gt;&lt;em&gt;test()&lt;/em&gt;&lt;/strong&gt; 가 있으면 여러번 실행됩니다.  )&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;setupAll&lt;/p&gt;&lt;ul&gt;&lt;li&gt;테스트 시작하기 전에 설정을 해줍니다.&lt;/li&gt;&lt;li&gt;파일 하나에 한번만 실행됩니다. (데이터 베이스 설정할 때 쓰기 좋겠죠)&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;teardown&lt;/p&gt;&lt;ul&gt;&lt;li&gt;테스트를 마치고 할 작업을 정해줍니다.&lt;/li&gt;&lt;li&gt;테스트 단위 하나마다 실행됩니다 ( &lt;strong&gt;&lt;em&gt;setup()&lt;/em&gt;&lt;/strong&gt; 함수랑 동일합니다 )&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;teardownAll()&lt;/p&gt;&lt;ul&gt;&lt;li&gt;테스트를 마치고 할 작업을 정해줍니다.&lt;/li&gt;&lt;li&gt;파일 하나에 한번만 실행됩니다. ( &lt;strong&gt;&lt;em&gt;setupAll()&lt;/em&gt;&lt;/strong&gt; 함수랑 동일합니다 )&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;이 뿐만 아니라 테스트 시간 제한, 비동기 테스트 등 할 수 있는게 정말 많습니다. &lt;/p&gt;&lt;p&gt;자세한 건 다트 펍을 참고해주세요 (&lt;a href='https://pub.dartlang.org/packages/test' target='_blank' class='url'&gt;https://pub.dartlang.org/packages/test&lt;/a&gt;)&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h6&gt;&lt;a name='header-n94' class='md-header-anchor '&gt;&lt;/a&gt;1.1.3 테스트 예제 - 테스트 실패 해보기&lt;/h6&gt;&lt;p&gt;이번엔 테스트를 일부러 &lt;strong&gt;실패&lt;/strong&gt;해 보겠습니다.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;em&gt;test/simple_test.dart&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;dart&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;dart&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;main&lt;/span&gt;() {&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;test&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;'should be lowercase'&lt;/span&gt;, () {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;String&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;hello&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-string&quot;&gt;&quot;Hello World&quot;&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;expect&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;hello&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;toLowerCase&lt;/span&gt;(), &lt;span class=&quot;cm-string&quot;&gt;&quot;hello world&quot;&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  });&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;test&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;'should contain name'&lt;/span&gt;, () {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;String&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;hello&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-string&quot;&gt;&quot;Hello World, Mike&quot;&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;expect&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;hello&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;contains&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;'mike'&lt;/span&gt;), &lt;span class=&quot;cm-atom&quot;&gt;true&lt;/span&gt;); &lt;span class=&quot;cm-comment&quot;&gt;// 테스트 실패! 소문자 mike는 찾을 수 없다.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  });&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 286px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 286px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;테스트 실패시 기대값과 실제값이 어떻게 다른지 보여줍니다. &lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;shell&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;shell&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;Expected: &amp;lt;true&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  Actual: &amp;lt;false&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;package:test_api &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;  expect&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;test/simple_test.dart &lt;span class=&quot;cm-number&quot;&gt;13&lt;/span&gt;:5  main.&amp;lt;fn&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 110px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 110px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;어떤 점이 다른지 보여주니, 함수를 잘못 작성했다면 쉽게 고칠 수 있겠죠?&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h6&gt;&lt;a name='header-n402' class='md-header-anchor '&gt;&lt;/a&gt;1.1.4 테스트 예제 - 덧셈, 뺄쎔 함수 테스트 해보기&lt;/h6&gt;&lt;p&gt;덧셈 뺄쎔을 하는 함수를 만들어보고 테스트를 해보겠습니다. &lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;em&gt;group()&lt;/em&gt;&lt;/strong&gt; 함수로 여러 테스트를 묶어서 테스트 해보겠습니다.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;em&gt;calculator.dart&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;dart&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;dart&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;Calculator&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;add&lt;/span&gt;(&lt;span class=&quot;cm-builtin&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;x&lt;/span&gt;, &lt;span class=&quot;cm-builtin&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;y&lt;/span&gt;) &lt;span class=&quot;cm-operator&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;x&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;y&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;minus&lt;/span&gt;(&lt;span class=&quot;cm-builtin&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;x&lt;/span&gt;, &lt;span class=&quot;cm-builtin&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;y&lt;/span&gt;) &lt;span class=&quot;cm-operator&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;x&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;y&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;square&lt;/span&gt;(&lt;span class=&quot;cm-builtin&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;x&lt;/span&gt;) &lt;span class=&quot;cm-operator&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;x&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;x&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 154px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 154px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;em&gt;test/calculator_test.dart&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;dart&quot; style=&quot;page-break-inside: unset;&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;dart&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;cm-string&quot;&gt;'package:test/test.dart'&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;main&lt;/span&gt;() {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;group&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;'calculator'&lt;/span&gt;, () {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;Calculator&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;cal&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;Calculator&lt;/span&gt;();&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;test&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;'add should be equal to a + b'&lt;/span&gt;, () {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;expect&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;cal&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;add&lt;/span&gt;(&lt;span class=&quot;cm-number&quot;&gt;20&lt;/span&gt;, &lt;span class=&quot;cm-number&quot;&gt;30&lt;/span&gt;), &lt;span class=&quot;cm-number&quot;&gt;50&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  });&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;test&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;'minus should be equal to a - b'&lt;/span&gt;, () {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;expect&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;cal&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;minus&lt;/span&gt;(&lt;span class=&quot;cm-number&quot;&gt;30&lt;/span&gt;, &lt;span class=&quot;cm-number&quot;&gt;20&lt;/span&gt;), &lt;span class=&quot;cm-number&quot;&gt;10&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  });&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;test&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;'square should be equal to a * a'&lt;/span&gt;, () {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;expect&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;cal&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;square&lt;/span&gt;(&lt;span class=&quot;cm-number&quot;&gt;10&lt;/span&gt;), &lt;span class=&quot;cm-number&quot;&gt;10&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;10&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  });&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  });&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 462px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 462px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;3 케이스 다 통과 했습니다. &lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h6&gt;&lt;a name='header-n481' class='md-header-anchor '&gt;&lt;/a&gt;1.1.5 비동기 테스트 해보기&lt;/h6&gt;&lt;p&gt;플러터 개발을 하다보면 비동기 데이터를 확인할 일이 많습니다. &lt;/p&gt;&lt;p&gt;퓨처를 어떻게 테스트 하는지 알아보겠습니다.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;em&gt;asynchronous_test.dart&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;dart&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;dart&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;main&lt;/span&gt;() {&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;test&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;'new Future.value() returns the value'&lt;/span&gt;, () {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;value&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;Future&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;value&lt;/span&gt;(&lt;span class=&quot;cm-number&quot;&gt;10&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;expect&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;value&lt;/span&gt;, &lt;span class=&quot;cm-number&quot;&gt;10&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  });&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 154px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 154px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;이대로 테스트를 실행하면 어떻게 될까요?&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;shell&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;shell&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;Expected: &amp;lt;10&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  Actual: &amp;lt;Instance of &lt;span class=&quot;cm-string&quot;&gt;'Future&amp;lt;int&amp;gt;'&lt;/span&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 44px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 44px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;실패하네요.&lt;/p&gt;&lt;p&gt;expect()의 기대값을 바꿔주면 테스트를 통과할까요?&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;dart&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;dart&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;main&lt;/span&gt;() {&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;test&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;'new Future.value() returns the value'&lt;/span&gt;, () {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;value&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;Future&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;value&lt;/span&gt;(&lt;span class=&quot;cm-number&quot;&gt;10&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;expect&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;value&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;Future&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;value&lt;/span&gt;(&lt;span class=&quot;cm-number&quot;&gt;10&lt;/span&gt;));&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  });&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 176px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 176px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;또 실패합니다.&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;shell&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;shell&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;Expected: &amp;lt;Instance of &lt;span class=&quot;cm-string&quot;&gt;'Future&amp;lt;int&amp;gt;'&lt;/span&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  Actual: &amp;lt;Instance of &lt;span class=&quot;cm-string&quot;&gt;'Future&amp;lt;int&amp;gt;'&lt;/span&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 44px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 44px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;둘 다 퓨처의 인스턴스지만 같은 인스턴스는 아니라서 실패했습니다. &lt;/p&gt;&lt;p&gt;퓨처를 테스트할때는 &lt;strong&gt;expect(실제값, 기대값)&lt;/strong&gt; 중 기대값을 completion으로 해줘야합니다. &lt;/p&gt;&lt;p&gt;completion은 퓨처가 완료될 때까지 테스트를 종료하지 않도록 하죠.&lt;/p&gt;&lt;p&gt;테스트를 실행해볼께요.&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;dart&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;dart&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;main&lt;/span&gt;() {&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;test&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;'new Future.value() returns the value with completion'&lt;/span&gt;, () {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;value&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;Future&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;value&lt;/span&gt;(&lt;span class=&quot;cm-number&quot;&gt;10&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;expect&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;value&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;completion&lt;/span&gt;(&lt;span class=&quot;cm-number&quot;&gt;10&lt;/span&gt;));&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  });&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 132px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 132px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;테스트를 무사히 통과합니다.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;여태까지 간단한 테스트를 해보았는데요. &lt;/p&gt;&lt;p&gt;이젠  좀 더 실용적인 예제를 테스트 해볼께요.&lt;/p&gt;&lt;p&gt;맞는 주민 번호와 이메일인지 확인하는 함수를 작성하고 &lt;/p&gt;&lt;p&gt;테스트를 해보겠습니다.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h3&gt;&lt;a name='header-n564' class='md-header-anchor '&gt;&lt;/a&gt;2.이메일과 주민번호 테스트하기&lt;/h3&gt;&lt;h6&gt;&lt;a name='header-n139' class='md-header-anchor '&gt;&lt;/a&gt;2.1 테스트 예제 -  주민번호 확인하기  ( social security number validator )&lt;/h6&gt;&lt;p&gt;주민 번호는 앞에는 생년월일, 뒤에는 성별 및 주소로 되어 있죠.&lt;/p&gt;&lt;p&gt;이를 확인하는 정규표현식을 작성해 보겠습니다. &lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;em&gt;field_validator.dart&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;dart&quot; style=&quot;page-break-inside: unset;&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;dart&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;FieldValidator&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;cm-builtin&quot;&gt;bool&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;validateSocialSecurityNumber&lt;/span&gt;(&lt;span class=&quot;cm-builtin&quot;&gt;String&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;input&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;if&lt;/span&gt; (&lt;span class=&quot;cm-variable&quot;&gt;input&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;isEmpty&lt;/span&gt;) &lt;span class=&quot;cm-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;cm-atom&quot;&gt;false&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;Pattern&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;pattern&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-string&quot;&gt;r'^[0-9]{2}(0[1-9]|1[0-2])(0[1-9]|[12][0-9]|[3][01])-([1-4][0-9]{6})'&lt;/span&gt;; &lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;RegExp&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;exp&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;RegExp&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;pattern&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;if&lt;/span&gt; (&lt;span class=&quot;cm-variable&quot;&gt;exp&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;hasMatch&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;input&lt;/span&gt;)) &lt;span class=&quot;cm-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;cm-atom&quot;&gt;true&lt;/span&gt;; &lt;span class=&quot;cm-comment&quot;&gt;// 유효한 주민번호면 true 리턴&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;cm-atom&quot;&gt;false&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 308px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 308px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;정규표현식과 매칭되면 true를 반환하고 아니면 false를 반환합니다.. &lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;이제 함수를 테스트 해볼게요.&lt;/p&gt;&lt;p&gt;3가지 케이스를 테스트합니다. &lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;em&gt;911222-2110332 , 761031-1518312, 983015-1910312&lt;/em&gt;&lt;/strong&gt; 를 넣어볼건데요. &lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;em&gt;911222-2110332 , 761031-1518312&lt;/em&gt;&lt;/strong&gt; 은 true를 반환하고 &lt;/p&gt;&lt;p&gt;&lt;strong&gt;983015-1910312&lt;/strong&gt; 은 983015니 (30월이니) false를 반환해야겠죠. &lt;/p&gt;&lt;p&gt;정말 그런지 테스트 해볼께요.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;em&gt;test/field_validator_test.dart&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;dart&quot; style=&quot;page-break-inside: unset;&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;dart&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;main&lt;/span&gt;() {&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;group&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;'field validator test'&lt;/span&gt;, () {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;test&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;'validate Social Security Number'&lt;/span&gt;, () {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;final&lt;/span&gt; &lt;span class=&quot;cm-builtin&quot;&gt;String&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;socialNumber&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-string&quot;&gt;&quot;911222-2110332&quot;&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;expect&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;FieldValidator&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;validateSocialSecurityNumber&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;socialNumber&lt;/span&gt;), &lt;span class=&quot;cm-atom&quot;&gt;true&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;final&lt;/span&gt; &lt;span class=&quot;cm-builtin&quot;&gt;String&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;socialNumber2&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-string&quot;&gt;&quot;761031-1518312&quot;&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;expect&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;FieldValidator&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;validateSocialSecurityNumber&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;socialNumber2&lt;/span&gt;), &lt;span class=&quot;cm-atom&quot;&gt;true&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;final&lt;/span&gt; &lt;span class=&quot;cm-builtin&quot;&gt;String&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;socialNumber3&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-string&quot;&gt;&quot;983015-1910312&quot;&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;expect&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;FieldValidator&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;validateSocialSecurityNumber&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;socialNumber3&lt;/span&gt;), &lt;span class=&quot;cm-atom&quot;&gt;false&lt;/span&gt;); &lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  });&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  });&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 352px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 352px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;예상대로 테스트를 통과하네요.&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt;이해를 위해 테스트를 좀 더 해볼께요.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;이메일을 확인하는 함수를 작성하고 테스트 해보겠습니다. .&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h6&gt;&lt;a name='header-n167' class='md-header-anchor '&gt;&lt;/a&gt;2.2 테스트 예제 - 이메일 확인하기  ( email validator )&lt;/h6&gt;&lt;p&gt;아래 코드를 봐주세요.&lt;/p&gt;&lt;p&gt;validateEmail()는 이메일 형식에 맞으면 true를 반환하고, 아니면 false를 반환하는 함수입니다. &lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;em&gt;field_validator.dart&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;dart&quot; style=&quot;page-break-inside: unset;&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;dart&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;FieldValidator&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;cm-builtin&quot;&gt;bool&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;validateEmail&lt;/span&gt;(&lt;span class=&quot;cm-builtin&quot;&gt;String&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;email&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;if&lt;/span&gt; (&lt;span class=&quot;cm-variable&quot;&gt;email&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;isEmpty&lt;/span&gt;) &lt;span class=&quot;cm-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;cm-atom&quot;&gt;false&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;Pattern&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;pattern&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-string&quot;&gt;r'^\w+@[a-zA-Z_]+?\.[a-zA-Z]{2,3}$'&lt;/span&gt;; &lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;RegExp&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;exp&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;RegExp&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;pattern&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;if&lt;/span&gt; (&lt;span class=&quot;cm-variable&quot;&gt;exp&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;hasMatch&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;email&lt;/span&gt;)) &lt;span class=&quot;cm-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;cm-atom&quot;&gt;true&lt;/span&gt;; &lt;span class=&quot;cm-comment&quot;&gt;// 유효한 이메일이면 true 리턴&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;cm-atom&quot;&gt;false&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 308px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 308px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;테스트 케이스는 2개를 작성했습니다. &lt;/p&gt;&lt;p&gt;&lt;a href='mailto:goodday@gmail.com' target='_blank' class='url'&gt;goodday@gmail.com&lt;/a&gt;, badday#@gmail.com 란 입력인데요. &lt;/p&gt;&lt;p&gt;badday#@gmail.com 은 #이 들어있어서 유효한 이메일이 아닙니다. &lt;/p&gt;&lt;p&gt;2 케이스 다 통과할거라고 테스트 함수를 짜면, 하나는 실패하겠죠?&lt;/p&gt;&lt;p&gt;정말 그런지 볼께요.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;em&gt;test/field_validator_test.dart&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences mock-cm md-end-block&quot; lang=&quot;dart&quot; contenteditable=&quot;false&quot; cid=&quot;n284&quot; mdtype=&quot;fences&quot; style=&quot;page-break-inside: unset;&quot;&gt;import 'package:test/test.dart';
import '../src/field_validator.dart';


void main() {
  group('field validator test', () {

    test(&quot;validateEmail&quot;, (){
      const String email1 = &quot;goodday@gmail.com&quot;;

      expect(FieldValidator.validateEmail(email1), true); // 통과할거로 예상하고 통과

      const  String email2 = &quot;badday#@gmail.com&quot;;

      expect(FieldValidator.validateEmail(email2), true , reason: '# is a not valid character'); // 통과할 거로 예상했으나 통과하지 못하기에 test fail
    });
  });
}
&lt;/pre&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;em&gt;테스트 실행결과&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences mock-cm md-end-block&quot; lang=&quot;shell&quot; contenteditable=&quot;false&quot; cid=&quot;n343&quot; mdtype=&quot;fences&quot;&gt;Expected: &amp;lt;true&amp;gt;
  Actual: &amp;lt;false&amp;gt;
# is a not valid character
&lt;/pre&gt;&lt;p&gt;예상대로 이메일  &lt;em&gt;badday#@gmail.com&lt;/em&gt;는 테스트를 통과하지 못하네요.&lt;/p&gt;&lt;p&gt;이번엔 &lt;strong&gt;&lt;em&gt;expect()&lt;/em&gt;&lt;/strong&gt; 에다 &lt;em&gt;reason&lt;/em&gt; 을 적어줬습니다. reason을 적으면 테스트가 실패한 원인을 알려줍니다. &lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h3&gt;&lt;a name='header-n569' class='md-header-anchor '&gt;&lt;/a&gt;마무리 &lt;/h3&gt;&lt;p&gt;테스트 방식에는 크게 3가지가 있는데 &lt;/p&gt;&lt;p&gt;이번 글에선 단위 테스트만 알아보았습니다. &lt;/p&gt;&lt;p&gt;플러터의 위젯 테스트, 통합 테스트는 다음 번에 알아보도록 할께요! &lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;참고글 - &lt;a href='http://dartdoc.takyam.com/articles/dart-unit-tests/' target='_blank' class='url'&gt;http://dartdoc.takyam.com/articles/dart-unit-tests/&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;</description>
      <category>플러터(Flutter)</category>
      <category>TDD</category>
      <category>다트 단위 테스트</category>
      <category>다트 유닛 테스트</category>
      <category>플러터 단위 테스트</category>
      <category>플러터 유닛 테스트</category>
      <author>에드 신</author>
      <guid isPermaLink="true">https://software-creator.tistory.com/21</guid>
      <comments>https://software-creator.tistory.com/21#entry21comment</comments>
      <pubDate>Mon, 22 Apr 2019 01:21:29 +0900</pubDate>
    </item>
    <item>
      <title>파이썬 크롤링 시작하기 - html 구조와 간단한 크롤링</title>
      <link>https://software-creator.tistory.com/20</link>
      <description>&lt;!doctype html&gt;
&lt;html&gt;
&lt;head&gt;
&lt;meta charset='UTF-8'&gt;&lt;meta name='viewport' content='width=device-width initial-scale=1'&gt;
&lt;meta name=&quot;description&quot; content=&quot;크롤링은 웹상에서 데이터를 원하는 대로 받아올 수 있어, 활용도가 높은 기술이죠. 프로그래밍을 통한 자동화의 핵심도 크롤링인데요. 이번 글에서는 html 기본 구조를 알아보고, beautifoul soup를 통해 간단한 크롤링을 해워보도록 하겠습니다.&quot;/&gt;
&lt;title&gt;crawling&lt;/title&gt;&lt;link href='https://fonts.loli.net/css?family=Open+Sans:400italic,700italic,700,400&amp;subset=latin,latin-ext' rel='stylesheet' type='text/css' /&gt;&lt;style type='text/css'&gt;html {overflow-x: initial !important;}:root { --bg-color: #ffffff; --text-color: #333333; --select-text-bg-color: #B5D6FC; --select-text-font-color: auto; --monospace: &quot;Lucida Console&quot;,Consolas,&quot;Courier&quot;,monospace; }
html { font-size: 14px; background-color: var(--bg-color); color: var(--text-color); font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; -webkit-font-smoothing: antialiased; }
body { margin: 0px; padding: 0px; height: auto; bottom: 0px; top: 0px; left: 0px; right: 0px; font-size: 1rem; line-height: 1.42857143; overflow-x: hidden; background-image: inherit; background-size: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: inherit; background-position: inherit inherit; background-repeat: inherit inherit; }
iframe { margin: auto; }
a.url { word-break: break-all; }
a:active, a:hover { outline: 0px; }
.in-text-selection, ::selection { text-shadow: none; background: var(--select-text-bg-color); color: var(--select-text-font-color); }
#write { margin: 0px auto; height: auto; width: inherit; word-break: normal; word-wrap: break-word; position: relative; white-space: normal; overflow-x: visible; padding-top: 40px; }
#write.first-line-indent p { text-indent: 2em; }
#write.first-line-indent li p, #write.first-line-indent p * { text-indent: 0px; }
#write.first-line-indent li { margin-left: 2em; }
.for-image #write { padding-left: 8px; padding-right: 8px; }
body.typora-export { padding-left: 30px; padding-right: 30px; }
.typora-export .footnote-line, .typora-export li, .typora-export p { white-space: pre-wrap; }
@media screen and (max-width: 500px) {
  body.typora-export { padding-left: 0px; padding-right: 0px; }
  #write { padding-left: 20px; padding-right: 20px; }
  .CodeMirror-sizer { margin-left: 0px !important; }
  .CodeMirror-gutters { display: none !important; }
}
#write li &gt; figure:first-child { margin-top: -20px; }
#write ol, #write ul { position: relative; }
img { max-width: 100%; vertical-align: middle; }
button, input, select, textarea { color: inherit; font-family: inherit; font-size: inherit; font-style: inherit; font-variant-caps: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; }
input[type=&quot;checkbox&quot;], input[type=&quot;radio&quot;] { line-height: normal; padding: 0px; }
*, ::after, ::before { box-sizing: border-box; }
#write h1, #write h2, #write h3, #write h4, #write h5, #write h6, #write p, #write pre { width: inherit; }
#write h1, #write h2, #write h3, #write h4, #write h5, #write h6, #write p { position: relative; }
h1, h2, h3, h4, h5, h6 { break-after: avoid-page; break-inside: avoid; orphans: 2; }
p { orphans: 4; }
h1 { font-size: 2rem; }
h2 { font-size: 1.8rem; }
h3 { font-size: 1.6rem; }
h4 { font-size: 1.4rem; }
h5 { font-size: 1.2rem; }
h6 { font-size: 1rem; }
.md-math-block, .md-rawblock, h1, h2, h3, h4, h5, h6, p { margin-top: 1rem; margin-bottom: 1rem; }
.hidden { display: none; }
.md-blockmeta { color: rgb(204, 204, 204); font-weight: 700; font-style: italic; }
a { cursor: pointer; }
sup.md-footnote { padding: 2px 4px; background-color: rgba(238, 238, 238, 0.701961); color: rgb(85, 85, 85); border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; cursor: pointer; }
sup.md-footnote a, sup.md-footnote a:hover { color: inherit; text-transform: inherit; text-decoration: inherit; }
#write input[type=&quot;checkbox&quot;] { cursor: pointer; width: inherit; height: inherit; }
figure { overflow-x: auto; margin: 1.2em 0px; max-width: calc(100% + 16px); padding: 0px; }
figure &gt; table { margin: 0px !important; }
tr { break-inside: avoid; break-after: auto; }
thead { display: table-header-group; }
table { border-collapse: collapse; border-spacing: 0px; width: 100%; overflow: auto; break-inside: auto; text-align: left; }
table.md-table td { min-width: 32px; }
.CodeMirror-gutters { border-right-width: 0px; background-color: inherit; }
.CodeMirror-linenumber { }
.CodeMirror { text-align: left; }
.CodeMirror-placeholder { opacity: 0.3; }
.CodeMirror pre { padding: 0px 4px; }
.CodeMirror-lines { padding: 0px; }
div.hr:focus { cursor: none; }
#write pre { white-space: pre-wrap; }
#write.fences-no-line-wrapping pre { white-space: pre; }
#write pre.ty-contain-cm { white-space: normal; }
.CodeMirror-gutters { margin-right: 4px; }
.md-fences { font-size: 0.9rem; display: block; break-inside: avoid; text-align: left; overflow: visible; white-space: pre; background-image: inherit; background-size: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: inherit; position: relative !important; background-position: inherit inherit; background-repeat: inherit inherit; }
.md-diagram-panel { width: 100%; margin-top: 10px; text-align: center; padding-top: 0px; padding-bottom: 8px; overflow-x: auto; }
#write .md-fences.mock-cm { white-space: pre-wrap; }
.md-fences.md-fences-with-lineno { padding-left: 0px; }
#write.fences-no-line-wrapping .md-fences.mock-cm { white-space: pre; overflow-x: auto; }
.md-fences.mock-cm.md-fences-with-lineno { padding-left: 8px; }
.CodeMirror-line, twitterwidget { break-inside: avoid; }
.footnotes { opacity: 0.8; font-size: 0.9rem; margin-top: 1em; margin-bottom: 1em; }
.footnotes + .footnotes { margin-top: 0px; }
.md-reset { margin: 0px; padding: 0px; border: 0px; outline: 0px; vertical-align: top; text-decoration: none; text-shadow: none; float: none; position: static; width: auto; height: auto; white-space: nowrap; cursor: inherit; line-height: normal; font-weight: 400; text-align: left; box-sizing: content-box; direction: ltr; background-position: 0px 0px; background-repeat: initial initial; }
li div { padding-top: 0px; }
blockquote { margin: 1rem 0px; }
li .mathjax-block, li p { margin: 0.5rem 0px; }
li { margin: 0px; position: relative; }
blockquote &gt; :last-child { margin-bottom: 0px; }
blockquote &gt; :first-child, li &gt; :first-child { margin-top: 0px; }
.footnotes-area { color: rgb(136, 136, 136); margin-top: 0.714rem; padding-bottom: 0.143rem; white-space: normal; }
#write .footnote-line { white-space: pre-wrap; }
@media print {
  body, html { border: 1px solid transparent; height: 99%; break-after: avoid-page; break-before: avoid-page; }
  #write { margin-top: 0px; padding-top: 0px; border-color: transparent !important; }
  .typora-export * { -webkit-print-color-adjust: exact; }
  html.blink-to-pdf { font-size: 13px; }
  .typora-export #write { padding-left: 32px; padding-right: 32px; padding-bottom: 0px; break-after: avoid-page; }
  .typora-export #write::after { height: 0px; }
  @page { margin: 20mm 0px; }
}
.footnote-line { margin-top: 0.714em; font-size: 0.7em; }
a img, img a { cursor: pointer; }
pre.md-meta-block { font-size: 0.8rem; min-height: 0.8rem; white-space: pre-wrap; background-color: rgb(204, 204, 204); display: block; overflow-x: hidden; background-position: initial initial; background-repeat: initial initial; }
p &gt; .md-image:only-child:not(.md-img-error) img, p &gt; img:only-child { display: block; margin: auto; }
p &gt; .md-image:only-child { display: inline-block; width: 100%; }
#write .MathJax_Display { margin: 0.8em 0px 0px; }
.md-math-block { width: 100%; }
.md-math-block:not(:empty)::after { display: none; }
[contenteditable=&quot;true&quot;]:active, [contenteditable=&quot;true&quot;]:focus { outline: 0px; box-shadow: none; }
.md-task-list-item { position: relative; list-style-type: none; }
.task-list-item.md-task-list-item { padding-left: 0px; }
.md-task-list-item &gt; input { position: absolute; top: 0px; left: 0px; margin-left: -1.2em; margin-top: calc(1em - 10px); border: none; }
.math { font-size: 1rem; }
.md-toc { min-height: 3.58rem; position: relative; font-size: 0.9rem; border-top-left-radius: 10px; border-top-right-radius: 10px; border-bottom-right-radius: 10px; border-bottom-left-radius: 10px; }
.md-toc-content { position: relative; margin-left: 0px; }
.md-toc-content::after, .md-toc::after { display: none; }
.md-toc-item { display: block; color: rgb(65, 131, 196); }
.md-toc-item a { text-decoration: none; }
.md-toc-inner:hover { text-decoration: underline; }
.md-toc-inner { display: inline-block; cursor: pointer; }
.md-toc-h1 .md-toc-inner { margin-left: 0px; font-weight: 700; }
.md-toc-h2 .md-toc-inner { margin-left: 2em; }
.md-toc-h3 .md-toc-inner { margin-left: 4em; }
.md-toc-h4 .md-toc-inner { margin-left: 6em; }
.md-toc-h5 .md-toc-inner { margin-left: 8em; }
.md-toc-h6 .md-toc-inner { margin-left: 10em; }
@media screen and (max-width: 48em) {
  .md-toc-h3 .md-toc-inner { margin-left: 3.5em; }
  .md-toc-h4 .md-toc-inner { margin-left: 5em; }
  .md-toc-h5 .md-toc-inner { margin-left: 6.5em; }
  .md-toc-h6 .md-toc-inner { margin-left: 8em; }
}
a.md-toc-inner { font-size: inherit; font-style: inherit; font-weight: inherit; line-height: inherit; }
.footnote-line a:not(.reversefootnote) { color: inherit; }
.md-attr { display: none; }
.md-fn-count::after { content: &quot;.&quot;; }
code, pre, samp, tt { font-family: var(--monospace); }
kbd { margin: 0px 0.1em; padding: 0.1em 0.6em; font-size: 0.8em; color: rgb(36, 39, 41); background-color: rgb(255, 255, 255); border: 1px solid rgb(173, 179, 185); border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; box-shadow: rgba(12, 13, 14, 0.2) 0px 1px 0px, rgb(255, 255, 255) 0px 0px 0px 2px inset; white-space: nowrap; vertical-align: middle; background-position: initial initial; background-repeat: initial initial; }
.md-comment { color: rgb(162, 127, 3); opacity: 0.8; font-family: var(--monospace); }
code { text-align: left; }
a.md-print-anchor { white-space: pre !important; border: none !important; display: inline-block !important; position: absolute !important; width: 1px !important; right: 0px !important; outline: 0px !important; text-shadow: initial !important; background-position: 0px 0px !important; background-repeat: initial initial !important; }
.md-inline-math .MathJax_SVG .noError { display: none !important; }
.html-for-mac .inline-math-svg .MathJax_SVG { vertical-align: 0.2px; }
.md-math-block .MathJax_SVG_Display { text-align: center; margin: 0px; position: relative; text-indent: 0px; max-width: none; max-height: none; min-height: 0px; min-width: 100%; width: auto; overflow-y: hidden; display: block !important; }
.MathJax_SVG_Display, .md-inline-math .MathJax_SVG_Display { width: auto; margin: inherit; display: inline-block !important; }
.MathJax_SVG .MJX-monospace { font-family: var(--monospace); }
.MathJax_SVG .MJX-sans-serif { font-family: sans-serif; }
.MathJax_SVG { display: inline; font-style: normal; font-weight: 400; line-height: normal; zoom: 90%; text-indent: 0px; text-align: left; text-transform: none; letter-spacing: normal; word-spacing: normal; word-wrap: normal; white-space: nowrap; float: none; direction: ltr; max-width: none; max-height: none; min-width: 0px; min-height: 0px; border: 0px; padding: 0px; margin: 0px; }
.MathJax_SVG * { transition: none; }
.MathJax_SVG_Display svg { vertical-align: middle !important; margin-bottom: 0px !important; }
.os-windows.monocolor-emoji .md-emoji { font-family: &quot;Segoe UI Symbol&quot;, sans-serif; }
.md-diagram-panel &gt; svg { max-width: 100%; }
[lang=&quot;mermaid&quot;] svg, [lang=&quot;flow&quot;] svg { max-width: 100%; }
[lang=&quot;mermaid&quot;] .node text { font-size: 1rem; }
table tr th { border-bottom-width: 0px; }
video { max-width: 100%; display: block; margin: 0px auto; }
iframe { max-width: 100%; width: 100%; border: none; }
.highlight td, .highlight tr { border: 0px; }


.CodeMirror { height: auto; }
.CodeMirror.cm-s-inner { background-image: inherit; background-size: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: inherit; background-position: inherit inherit; background-repeat: inherit inherit; }
.CodeMirror-scroll { overflow-y: hidden; overflow-x: auto; z-index: 3; }
.CodeMirror-gutter-filler, .CodeMirror-scrollbar-filler { background-color: rgb(255, 255, 255); }
.CodeMirror-gutters { border-right-width: 1px; border-right-style: solid; border-right-color: rgb(221, 221, 221); background-image: inherit; background-size: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: inherit; white-space: nowrap; background-position: inherit inherit; background-repeat: inherit inherit; }
.CodeMirror-linenumber { padding: 0px 3px 0px 5px; text-align: right; color: rgb(153, 153, 153); }
.cm-s-inner .cm-keyword { color: rgb(119, 0, 136); }
.cm-s-inner .cm-atom, .cm-s-inner.cm-atom { color: rgb(34, 17, 153); }
.cm-s-inner .cm-number { color: rgb(17, 102, 68); }
.cm-s-inner .cm-def { color: rgb(0, 0, 255); }
.cm-s-inner .cm-variable { color: rgb(0, 0, 0); }
.cm-s-inner .cm-variable-2 { color: rgb(0, 85, 170); }
.cm-s-inner .cm-variable-3 { color: rgb(0, 136, 85); }
.cm-s-inner .cm-string { color: rgb(170, 17, 17); }
.cm-s-inner .cm-property { color: rgb(0, 0, 0); }
.cm-s-inner .cm-operator { color: rgb(152, 26, 26); }
.cm-s-inner .cm-comment, .cm-s-inner.cm-comment { color: rgb(170, 85, 0); }
.cm-s-inner .cm-string-2 { color: rgb(255, 85, 0); }
.cm-s-inner .cm-meta { color: rgb(85, 85, 85); }
.cm-s-inner .cm-qualifier { color: rgb(85, 85, 85); }
.cm-s-inner .cm-builtin { color: rgb(51, 0, 170); }
.cm-s-inner .cm-bracket { color: rgb(153, 153, 119); }
.cm-s-inner .cm-tag { color: rgb(17, 119, 0); }
.cm-s-inner .cm-attribute { color: rgb(0, 0, 204); }
.cm-s-inner .cm-header, .cm-s-inner.cm-header { color: rgb(0, 0, 255); }
.cm-s-inner .cm-quote, .cm-s-inner.cm-quote { color: rgb(0, 153, 0); }
.cm-s-inner .cm-hr, .cm-s-inner.cm-hr { color: rgb(153, 153, 153); }
.cm-s-inner .cm-link, .cm-s-inner.cm-link { color: rgb(0, 0, 204); }
.cm-negative { color: rgb(221, 68, 68); }
.cm-positive { color: rgb(34, 153, 34); }
.cm-header, .cm-strong { font-weight: 700; }
.cm-del { text-decoration: line-through; }
.cm-em { font-style: italic; }
.cm-link { text-decoration: underline; }
.cm-error { color: red; }
.cm-invalidchar { color: red; }
.cm-constant { color: rgb(38, 139, 210); }
.cm-defined { color: rgb(181, 137, 0); }
div.CodeMirror span.CodeMirror-matchingbracket { color: rgb(0, 255, 0); }
div.CodeMirror span.CodeMirror-nonmatchingbracket { color: rgb(255, 34, 34); }
.cm-s-inner .CodeMirror-activeline-background { background-image: inherit; background-size: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: inherit; background-position: inherit inherit; background-repeat: inherit inherit; }
.CodeMirror { position: relative; overflow: hidden; }
.CodeMirror-scroll { height: 100%; outline: 0px; position: relative; box-sizing: content-box; background-image: inherit; background-size: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: inherit; background-position: inherit inherit; background-repeat: inherit inherit; }
.CodeMirror-sizer { position: relative; }
.CodeMirror-gutter-filler, .CodeMirror-hscrollbar, .CodeMirror-scrollbar-filler, .CodeMirror-vscrollbar { position: absolute; z-index: 6; display: none; }
.CodeMirror-vscrollbar { right: 0px; top: 0px; overflow: hidden; }
.CodeMirror-hscrollbar { bottom: 0px; left: 0px; overflow: hidden; }
.CodeMirror-scrollbar-filler { right: 0px; bottom: 0px; }
.CodeMirror-gutter-filler { left: 0px; bottom: 0px; }
.CodeMirror-gutters { position: absolute; left: 0px; top: 0px; padding-bottom: 30px; z-index: 3; }
.CodeMirror-gutter { white-space: normal; height: 100%; box-sizing: content-box; padding-bottom: 30px; margin-bottom: -32px; display: inline-block; }
.CodeMirror-gutter-wrapper { position: absolute; z-index: 4; border: none !important; background-position: 0px 0px !important; background-repeat: initial initial !important; }
.CodeMirror-gutter-background { position: absolute; top: 0px; bottom: 0px; z-index: 4; }
.CodeMirror-gutter-elt { position: absolute; cursor: default; z-index: 4; }
.CodeMirror-lines { cursor: text; }
.CodeMirror pre { border-top-left-radius: 0px; border-top-right-radius: 0px; border-bottom-right-radius: 0px; border-bottom-left-radius: 0px; border-width: 0px; font-family: inherit; font-size: inherit; margin: 0px; white-space: pre; word-wrap: normal; color: inherit; z-index: 2; position: relative; overflow: visible; background-position: 0px 0px; background-repeat: initial initial; }
.CodeMirror-wrap pre { word-wrap: break-word; white-space: pre-wrap; word-break: normal; }
.CodeMirror-code pre { border-right-width: 30px; border-right-style: solid; border-right-color: transparent; width: fit-content; }
.CodeMirror-wrap .CodeMirror-code pre { border-right-style: none; width: auto; }
.CodeMirror-linebackground { position: absolute; left: 0px; right: 0px; top: 0px; bottom: 0px; z-index: 0; }
.CodeMirror-linewidget { position: relative; z-index: 2; overflow: auto; }
.CodeMirror-wrap .CodeMirror-scroll { overflow-x: hidden; }
.CodeMirror-measure { position: absolute; width: 100%; height: 0px; overflow: hidden; visibility: hidden; }
.CodeMirror-measure pre { position: static; }
.CodeMirror div.CodeMirror-cursor { position: absolute; visibility: hidden; border-right-style: none; width: 0px; }
.CodeMirror div.CodeMirror-cursor { visibility: hidden; }
.CodeMirror-focused div.CodeMirror-cursor { visibility: inherit; }
.cm-searching { background-color: rgba(255, 255, 0, 0.4); background-position: initial initial; background-repeat: initial initial; }
@media print {
  .CodeMirror div.CodeMirror-cursor { visibility: hidden; }
}


:root {
    --side-bar-bg-color: #fafafa;
    --control-text-color: #777;
}

@include-when-export url(https://fonts.loli.net/css?family=Open+Sans:400italic,700italic,700,400&amp;subset=latin,latin-ext);

html {
    font-size: 16px;
}

body {
    font-family: &quot;Open Sans&quot;,&quot;Clear Sans&quot;,&quot;Helvetica Neue&quot;,Helvetica,Arial,sans-serif;
    color: rgb(51, 51, 51);
    line-height: 1.6;
}

#write {
    max-width: 860px;
  	margin: 0 auto;
  	padding: 30px;
    padding-bottom: 100px;
}
#write &gt; ul:first-child,
#write &gt; ol:first-child{
    margin-top: 30px;
}

a {
    color: #4183C4;
}
h1,
h2,
h3,
h4,
h5,
h6 {
    position: relative;
    margin-top: 1rem;
    margin-bottom: 1rem;
    font-weight: bold;
    line-height: 1.4;
    cursor: text;
}
h1:hover a.anchor,
h2:hover a.anchor,
h3:hover a.anchor,
h4:hover a.anchor,
h5:hover a.anchor,
h6:hover a.anchor {
    text-decoration: none;
}
h1 tt,
h1 code {
    font-size: inherit;
}
h2 tt,
h2 code {
    font-size: inherit;
}
h3 tt,
h3 code {
    font-size: inherit;
}
h4 tt,
h4 code {
    font-size: inherit;
}
h5 tt,
h5 code {
    font-size: inherit;
}
h6 tt,
h6 code {
    font-size: inherit;
}
h1 {
    padding-bottom: .3em;
    font-size: 2.25em;
    line-height: 1.2;
    border-bottom: 1px solid #eee;
}
h2 {
   padding-bottom: .3em;
    font-size: 1.75em;
    line-height: 1.225;
    border-bottom: 1px solid #eee;
}
h3 {
    font-size: 1.5em;
    line-height: 1.43;
}
h4 {
    font-size: 1.25em;
}
h5 {
    font-size: 1em;
}
h6 {
   font-size: 1em;
    color: #777;
}
p,
blockquote,
ul,
ol,
dl,
table{
    margin: 0.8em 0;
}
li&gt;ol,
li&gt;ul {
    margin: 0 0;
}
hr {
    height: 2px;
    padding: 0;
    margin: 16px 0;
    background-color: #e7e7e7;
    border: 0 none;
    overflow: hidden;
    box-sizing: content-box;
}

li p.first {
    display: inline-block;
}
ul,
ol {
    padding-left: 30px;
}
ul:first-child,
ol:first-child {
    margin-top: 0;
}
ul:last-child,
ol:last-child {
    margin-bottom: 0;
}
blockquote {
    border-left: 4px solid #dfe2e5;
    padding: 0 15px;
    color: #777777;
}
blockquote blockquote {
    padding-right: 0;
}
table {
    padding: 0;
    word-break: initial;
}
table tr {
    border-top: 1px solid #dfe2e5;
    margin: 0;
    padding: 0;
}
table tr:nth-child(2n),
thead {
    background-color: #f8f8f8;
}
table tr th {
    font-weight: bold;
    border: 1px solid #dfe2e5;
    border-bottom: 0;
    text-align: left;
    margin: 0;
    padding: 6px 13px;
}
table tr td {
    border: 1px solid #dfe2e5;
    text-align: left;
    margin: 0;
    padding: 6px 13px;
}
table tr th:first-child,
table tr td:first-child {
    margin-top: 0;
}
table tr th:last-child,
table tr td:last-child {
    margin-bottom: 0;
}

.CodeMirror-lines {
    padding-left: 4px;
}

.code-tooltip {
    box-shadow: 0 1px 1px 0 rgba(0,28,36,.3);
    border-top: 1px solid #eef2f2;
}

.md-fences,
code,
tt {
    border: 1px solid #e7eaed;
    background-color: #f8f8f8;
    border-radius: 3px;
    padding: 0;
    padding: 2px 4px 0px 4px;
    font-size: 0.9em;
}

code {
    background-color: #f3f4f4;
    padding: 0 2px 0 2px;
}

.md-fences {
    margin-bottom: 15px;
    margin-top: 15px;
    padding-top: 8px;
    padding-bottom: 6px;
}


.md-task-list-item &gt; input {
  margin-left: -1.3em;
}

@media print {
    html {
        font-size: 13px;
    }
    table,
    pre {
        page-break-inside: avoid;
    }
    pre {
        word-wrap: break-word;
    }
}

.md-fences {
	background-color: #f8f8f8;
}
#write pre.md-meta-block {
	padding: 1rem;
    font-size: 85%;
    line-height: 1.45;
    background-color: #f7f7f7;
    border: 0;
    border-radius: 3px;
    color: #777777;
    margin-top: 0 !important;
}

.mathjax-block&gt;.code-tooltip {
	bottom: .375rem;
}

.md-mathjax-midline {
    background: #fafafa;
}

#write&gt;h3.md-focus:before{
	left: -1.5625rem;
	top: .375rem;
}
#write&gt;h4.md-focus:before{
	left: -1.5625rem;
	top: .285714286rem;
}
#write&gt;h5.md-focus:before{
	left: -1.5625rem;
	top: .285714286rem;
}
#write&gt;h6.md-focus:before{
	left: -1.5625rem;
	top: .285714286rem;
}
.md-image&gt;.md-meta {
    /*border: 1px solid #ddd;*/
    border-radius: 3px;
    padding: 2px 0px 0px 4px;
    font-size: 0.9em;
    color: inherit;
}

.md-tag {
    color: #a7a7a7;
    opacity: 1;
}

.md-toc {
    margin-top:20px;
    padding-bottom:20px;
}

.sidebar-tabs {
    border-bottom: none;
}

#typora-quick-open {
    border: 1px solid #ddd;
    background-color: #f8f8f8;
}

#typora-quick-open-item {
    background-color: #FAFAFA;
    border-color: #FEFEFE #e5e5e5 #e5e5e5 #eee;
    border-style: solid;
    border-width: 1px;
}

/** focus mode */
.on-focus-mode blockquote {
    border-left-color: rgba(85, 85, 85, 0.12);
}

header, .context-menu, .megamenu-content, footer{
    font-family: &quot;Segoe UI&quot;, &quot;Arial&quot;, sans-serif;
}

.file-node-content:hover .file-node-icon,
.file-node-content:hover .file-node-open-state{
    visibility: visible;
}

.mac-seamless-mode #typora-sidebar {
    background-color: #fafafa;
    background-color: var(--side-bar-bg-color);
}

.md-lang {
    color: #b4654d;
}

.html-for-mac .context-menu {
    --item-hover-bg-color: #E6F0FE;
}

#md-notification .btn {
    border: 0;
}

.dropdown-menu .divider {
    border-color: #e5e5e5;
}

 .typora-export li, .typora-export p, .typora-export,  .footnote-line {white-space: normal;}
&lt;/style&gt;
&lt;/head&gt;
&lt;body class='typora-export' &gt;
&lt;div  id='write'  class = 'is-mac'&gt;&lt;h1&gt;&lt;a name='header-n0' class='md-header-anchor '&gt;&lt;/a&gt;html 간단한 구조&lt;/h1&gt;&lt;ul&gt;&lt;li&gt;tag&lt;/li&gt;&lt;li&gt;head&lt;/li&gt;&lt;li&gt;title&lt;/li&gt;&lt;li&gt;body&lt;/li&gt;&lt;li&gt;p&lt;/li&gt;&lt;li&gt;a href&lt;/li&gt;&lt;li&gt;img&lt;/li&gt;&lt;li&gt;h1, h2, h3, h4&lt;/li&gt;&lt;li&gt;input&lt;/li&gt;&lt;li&gt;button&lt;/li&gt;&lt;/ul&gt;&lt;h1&gt;&lt;a name='header-n24' class='md-header-anchor '&gt;&lt;/a&gt;css란?&lt;/h1&gt;&lt;ul&gt;&lt;li&gt;tag별 스타일링&lt;/li&gt;&lt;li&gt;id, class&lt;/li&gt;&lt;/ul&gt;&lt;h1&gt;&lt;a name='header-n30' class='md-header-anchor '&gt;&lt;/a&gt;크롤링&lt;/h1&gt;&lt;ul&gt;&lt;li&gt;requests&lt;/li&gt;&lt;li&gt;beautiful soup&lt;/li&gt;&lt;/ul&gt;&lt;h1&gt;&lt;a name='header-n36' class='md-header-anchor '&gt;&lt;/a&gt;네이버 블로그 크롤링 해보기&lt;/h1&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;크롤링은 웹상에서 데이터를 원하는 대로 받아올 수 있어, 활용도가 높은 기술이죠. 프로그래밍을 통한 자동화의 핵심도 크롤링인데요. 이번 글에서는 html 기본 구조를 알아보고, beautifoul soup를 통해 간단한 크롤링을 해워보도록 하겠습니다. &lt;/p&gt;&lt;p&gt;마지막으론 실습 겸 네이브 블로그를 크롤링 해볼께요.&lt;/p&gt;&lt;h3&gt;&lt;a name='header-n40' class='md-header-anchor '&gt;&lt;/a&gt;1. html이란?&lt;/h3&gt;&lt;p&gt;HTML(Hypertext markup language) 은 웹페이지를 보여줄 때 사용하는 언어에요.&lt;/p&gt;&lt;p&gt;모든 웹사이트는 html을 기본적으로 써서 만들어졌습니다. &lt;/p&gt;&lt;p&gt;웹의 기본적인 구조를 알아야 크롤링을 할 수 있어요.&lt;/p&gt;&lt;p&gt;직접 html을 만들어 볼께요. &lt;/p&gt;&lt;p&gt;파일명은 index.html로 해주세요.&lt;/p&gt;&lt;h5&gt;&lt;a name='header-n46' class='md-header-anchor '&gt;&lt;/a&gt;index.html&lt;/h5&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;html&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;html&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;span&gt;&lt;span&gt;​&lt;/span&gt;x&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-meta&quot;&gt;&amp;lt;!DOCTYPE html&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;html&lt;/span&gt; &lt;span class=&quot;cm-attribute&quot;&gt;lang&lt;/span&gt;=&lt;span class=&quot;cm-string&quot;&gt;&quot;en&quot;&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;head&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;meta&lt;/span&gt; &lt;span class=&quot;cm-attribute&quot;&gt;charset&lt;/span&gt;=&lt;span class=&quot;cm-string&quot;&gt;&quot;UTF-8&quot;&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;title&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;Title&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;title&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;head&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;body&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;p&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;Hello 안녕하세요.&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;p&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;h1&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;간단한 문자 쓰기&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;h1&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;body&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;html&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 286px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 286px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;위의 html을 브라우저에 띄우면 &lt;/p&gt;&lt;p&gt;&amp;quot;Hello 안녕하세요.&amp;quot;란 문자가 표시됩니다. &lt;/p&gt;&lt;p&gt;html은 항상 열고 닫는 &amp;lt;태그&amp;gt;&amp;lt;태그/&amp;gt;로 구성되어 있습니다.&lt;/p&gt;&lt;p&gt;열었다가 닫는 &lt;code&gt;&amp;lt;body&amp;gt;&amp;lt;/body&amp;gt;&lt;/code&gt; 같은 걸 태그라고 하는데요. &lt;/p&gt;&lt;p&gt;html은 태그로 만들어진 문서입니다.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h5&gt;&lt;a name='header-n53' class='md-header-anchor '&gt;&lt;/a&gt;1.1 기본 태그 - html, head, body&lt;/h5&gt;&lt;p&gt;html 문서는 html 문서인 걸 표시하는 &lt;code&gt;&amp;lt;html&amp;gt;&amp;lt;/html&amp;gt;&lt;/code&gt;이 있고&lt;/p&gt;&lt;p&gt;필요한 데이터를 불러오거나, 문서 정보를 표시할 때 쓰는 &lt;code&gt;&amp;lt;head&amp;gt;&amp;lt;/head&amp;gt;&lt;/code&gt;, &lt;/p&gt;&lt;p&gt;웹 페에지를 표시할 때 쓰이는 &lt;code&gt;&amp;lt;body&amp;gt;&amp;lt;/body&amp;gt;&lt;/code&gt;로 구성되어 있습니다. &lt;/p&gt;&lt;p&gt;&lt;code&gt;&amp;lt;html&amp;gt;&amp;lt;head&amp;gt;&amp;lt;body&amp;gt;&lt;/code&gt;  &amp;lt;- 이 3개의 태그는 항상 있어야 되니 잊지 마세요.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h5&gt;&lt;a name='header-n59' class='md-header-anchor '&gt;&lt;/a&gt;1.2 기본 태그 (문자) - p, h1&lt;/h5&gt;&lt;p&gt;&lt;code&gt;&amp;lt;p&amp;gt;&amp;lt;/p&amp;gt;&lt;/code&gt; 는 문자를 적을 때 쓰는 태그고&lt;/p&gt;&lt;p&gt;&lt;code&gt;&amp;lt;h1&amp;gt;&amp;lt;/h1&amp;gt;&lt;/code&gt;도 문자를 적을 때 쓰는 태그인데 h1은 문자의 크기가 기본적으로 정해져 있는 태그에요.&lt;/p&gt;&lt;p&gt;h1,h2,h3,h4,h5,h6 같이 점점 작은 크기의 문자를 표시합니다. &lt;/p&gt;&lt;h5&gt;&lt;a name='header-n63' class='md-header-anchor '&gt;&lt;/a&gt;1.3 기본 태그 활용해보기 - img, a href, input&lt;/h5&gt;&lt;p&gt;모든 태그를 알아 볼 수는 없으니 자주 쓰는 태그만 몇 개 알아볼께요.&lt;/p&gt;&lt;p&gt;&lt;code&gt;&amp;lt;a&amp;gt;&amp;lt;/a&amp;gt;&lt;/code&gt;
a 태그는 다른 사이트에 링크를 걸 때 씁니다. &lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;code&gt;&amp;lt;a href=&amp;quot;https://www.naver.com&amp;quot;&amp;gt; 네이버 이동&amp;lt;/a&amp;gt;&lt;/code&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;input 태그는 입력을 받을 때 쓰여요. 버튼 같은 걸 만들 떄 씁니다.
&lt;code&gt;&amp;lt;input&amp;gt;&amp;lt;/input&amp;gt;&lt;/code&gt;&lt;/p&gt;&lt;p&gt;img 태그는 이미지를 표시할 때 쓰여요.
&lt;code&gt;&amp;lt;img src=&amp;quot;&amp;quot;/&amp;gt;&lt;/code&gt;&lt;/p&gt;&lt;p&gt;아래의 html을 실행시키고 확인해보세요.&lt;/p&gt;&lt;h5&gt;&lt;a name='header-n72' class='md-header-anchor '&gt;&lt;/a&gt;index.html&lt;/h5&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;html&quot; style=&quot;page-break-inside: unset;&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;html&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-meta&quot;&gt;&amp;lt;!DOCTYPE html&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;html&lt;/span&gt; &lt;span class=&quot;cm-attribute&quot;&gt;lang&lt;/span&gt;=&lt;span class=&quot;cm-string&quot;&gt;&quot;en&quot;&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;head&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;meta&lt;/span&gt; &lt;span class=&quot;cm-attribute&quot;&gt;charset&lt;/span&gt;=&lt;span class=&quot;cm-string&quot;&gt;&quot;UTF-8&quot;&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;title&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;Title&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;title&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;head&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;body&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;p&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;Hello 안녕하세요.&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;p&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;h1&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;h1 글씨&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;h1&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;h6&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;h6 글씨 &lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;h6&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;img&lt;/span&gt; &lt;span class=&quot;cm-attribute&quot;&gt;src&lt;/span&gt;=&lt;span class=&quot;cm-string&quot;&gt;&quot;https://images.unsplash.com/photo-1554659966-023466cbc607?ixlib=rb-1.2.1&amp;amp;auto=format&amp;amp;fit=crop&amp;amp;w=1225&amp;amp;q=80&quot;&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;a&lt;/span&gt; &lt;span class=&quot;cm-attribute&quot;&gt;href&lt;/span&gt;=&lt;span class=&quot;cm-string&quot;&gt;&quot;https://www.naver.com&quot;&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt; 네이버 이동&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;a&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;input&lt;/span&gt; &lt;span class=&quot;cm-attribute&quot;&gt;type&lt;/span&gt;=&lt;span class=&quot;cm-string&quot;&gt;&quot;button&quot;&lt;/span&gt; &lt;span class=&quot;cm-attribute&quot;&gt;name&lt;/span&gt;=&lt;span class=&quot;cm-string&quot;&gt;&quot;login&quot;&lt;/span&gt; &lt;span class=&quot;cm-attribute&quot;&gt;value&lt;/span&gt;=&lt;span class=&quot;cm-string&quot;&gt;&quot;login&quot;&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;body&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;html&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 484px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 484px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;h5&gt;&lt;a name='header-n74' class='md-header-anchor '&gt;&lt;/a&gt;문제 1.1 html을 새로 만들고, &lt;p&gt;태그를 3개 넣어보세요.&lt;/h5&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h5&gt;&lt;a name='header-n76' class='md-header-anchor '&gt;&lt;/a&gt;문제 1.2. html을 새로 만들고 &lt;a&gt;를 써서 구글로 이동하는 링크를 만들어보세요.&lt;/h5&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;모를 때는 w3school (&lt;a href='https://www.w3schools.com/' target='_blank' class='url'&gt;https://www.w3schools.com/&lt;/a&gt;) 을 참고하세요.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h3&gt;&lt;a name='header-n80' class='md-header-anchor '&gt;&lt;/a&gt;2. css - html 스타일링&lt;/h3&gt;&lt;p&gt;기본 html 태그를 써서 웹페이지를 만들면 밋밋합니다. &lt;/p&gt;&lt;p&gt;이럴 때 css를 써서 웹페이지를 스타일링합니다.&lt;/p&gt;&lt;p&gt;css를 쓰면 html 태그별로 스타일링을 할 수 있어요.&lt;/p&gt;&lt;p&gt;style.css란 파일을 만들어볼께요.&lt;/p&gt;&lt;h5&gt;&lt;a name='header-n85' class='md-header-anchor '&gt;&lt;/a&gt;style.css&lt;/h5&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;css&quot; style=&quot;page-break-inside: unset;&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;css&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-tag&quot;&gt;p&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-property&quot;&gt;font-size&lt;/span&gt;: &lt;span class=&quot;cm-number&quot;&gt;25px&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-property&quot;&gt;font-family&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;Verdana&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-tag&quot;&gt;img&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-property&quot;&gt;width&lt;/span&gt;: &lt;span class=&quot;cm-number&quot;&gt;200px&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-property&quot;&gt;height&lt;/span&gt;: &lt;span class=&quot;cm-number&quot;&gt;200px&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-tag&quot;&gt;a&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-property&quot;&gt;color&lt;/span&gt;: &lt;span class=&quot;cm-keyword&quot;&gt;cornflowerblue&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 308px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 308px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;css를 만들었으면 html에서 불러와야 됩니다. &lt;/p&gt; 안에다가 &lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;style.css&quot;&gt;를 적어주세요.&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;html&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;html&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;head&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;meta&lt;/span&gt; &lt;span class=&quot;cm-attribute&quot;&gt;charset&lt;/span&gt;=&lt;span class=&quot;cm-string&quot;&gt;&quot;UTF-8&quot;&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;title&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;Title&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;title&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;link&lt;/span&gt; &lt;span class=&quot;cm-attribute&quot;&gt;rel&lt;/span&gt;=&lt;span class=&quot;cm-string&quot;&gt;&quot;stylesheet&quot;&lt;/span&gt; &lt;span class=&quot;cm-attribute&quot;&gt;type&lt;/span&gt;=&lt;span class=&quot;cm-string&quot;&gt;&quot;text/css&quot;&lt;/span&gt; &lt;span class=&quot;cm-attribute&quot;&gt;href&lt;/span&gt;=&lt;span class=&quot;cm-string&quot;&gt;&quot;style.css&quot;&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;head&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 110px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 110px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;h5&gt;&lt;a name='header-n91' class='md-header-anchor '&gt;&lt;/a&gt;index.html&lt;/h5&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;html&quot; style=&quot;page-break-inside: unset;&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;html&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-meta&quot;&gt;&amp;lt;!DOCTYPE html&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;html&lt;/span&gt; &lt;span class=&quot;cm-attribute&quot;&gt;lang&lt;/span&gt;=&lt;span class=&quot;cm-string&quot;&gt;&quot;en&quot;&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;head&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;meta&lt;/span&gt; &lt;span class=&quot;cm-attribute&quot;&gt;charset&lt;/span&gt;=&lt;span class=&quot;cm-string&quot;&gt;&quot;UTF-8&quot;&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;title&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;Title&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;title&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;link&lt;/span&gt; &lt;span class=&quot;cm-attribute&quot;&gt;rel&lt;/span&gt;=&lt;span class=&quot;cm-string&quot;&gt;&quot;stylesheet&quot;&lt;/span&gt; &lt;span class=&quot;cm-attribute&quot;&gt;type&lt;/span&gt;=&lt;span class=&quot;cm-string&quot;&gt;&quot;text/css&quot;&lt;/span&gt; &lt;span class=&quot;cm-attribute&quot;&gt;href&lt;/span&gt;=&lt;span class=&quot;cm-string&quot;&gt;&quot;style.css&quot;&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;head&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;body&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;p&lt;/span&gt; &lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;Hello 안녕하세요.&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;p&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;p&lt;/span&gt; &lt;span class=&quot;cm-attribute&quot;&gt;id&lt;/span&gt;=&lt;span class=&quot;cm-string&quot;&gt;&quot;greeting&quot;&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;안녕하세요.&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;p&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;p&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;제 이름은 &lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;p&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;h1&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;h1 글씨&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;h1&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;h6&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;h6 글씨 &lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;h6&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;h6&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;날씨 예보&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;h6&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;h6&lt;/span&gt; &lt;span class=&quot;cm-attribute&quot;&gt;class&lt;/span&gt;=&lt;span class=&quot;cm-string&quot;&gt;&quot;textStyle&quot;&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;오늘 날씨는&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;h6&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;h6&lt;/span&gt; &lt;span class=&quot;cm-attribute&quot;&gt;class&lt;/span&gt;=&lt;span class=&quot;cm-string&quot;&gt;&quot;textStyle&quot;&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;맑고&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;h6&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;h6&lt;/span&gt; &lt;span class=&quot;cm-attribute&quot;&gt;class&lt;/span&gt;=&lt;span class=&quot;cm-string&quot;&gt;&quot;textStyle&quot;&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;화창합니다.&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;h6&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;img&lt;/span&gt; &lt;span class=&quot;cm-attribute&quot;&gt;id&lt;/span&gt;=&lt;span class=&quot;cm-string&quot;&gt;&quot;road-img&quot;&lt;/span&gt; &lt;span class=&quot;cm-attribute&quot;&gt;src&lt;/span&gt;=&lt;span class=&quot;cm-string&quot;&gt;&quot;https://images.unsplash.com/photo-1554659966-023466cbc607?ixlib=rb-1.2.1&amp;amp;auto=format&amp;amp;fit=crop&amp;amp;w=1225&amp;amp;q=80&quot;&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;img&lt;/span&gt; &lt;span class=&quot;cm-attribute&quot;&gt;src&lt;/span&gt;=&lt;span class=&quot;cm-string&quot;&gt;&quot;https://images.unsplash.com/photo-1554659966-023466cbc607?ixlib=rb-1.2.1&amp;amp;auto=format&amp;amp;fit=crop&amp;amp;w=1225&amp;amp;q=80&quot;&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;a&lt;/span&gt; &lt;span class=&quot;cm-attribute&quot;&gt;href&lt;/span&gt;=&lt;span class=&quot;cm-string&quot;&gt;&quot;https://www.naver.com&quot;&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt; 네이버 이동&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;a&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;input&lt;/span&gt; &lt;span class=&quot;cm-attribute&quot;&gt;type&lt;/span&gt;=&lt;span class=&quot;cm-string&quot;&gt;&quot;button&quot;&lt;/span&gt; &lt;span class=&quot;cm-attribute&quot;&gt;name&lt;/span&gt;=&lt;span class=&quot;cm-string&quot;&gt;&quot;login&quot;&lt;/span&gt; &lt;span class=&quot;cm-attribute&quot;&gt;value&lt;/span&gt;=&lt;span class=&quot;cm-string&quot;&gt;&quot;login&quot;&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;body&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;html&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 726px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 726px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h5&gt;&lt;a name='header-n94' class='md-header-anchor '&gt;&lt;/a&gt;문제 2.1 - html을 새로 만들고, css가 적용된 &lt;p&gt; 태그를 만들어보세요. &lt;/h5&gt;&lt;p&gt;모르겠으면 구글에 &amp;quot;css p tag&amp;quot; 라고 검색해보세요.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h3&gt;&lt;a name='header-n98' class='md-header-anchor '&gt;&lt;/a&gt;2.1 html, css -  id와 class의 차이점&lt;/h3&gt;&lt;p&gt;지금은 html 태그가 많지 않으니 괜찮지만&lt;/p&gt;&lt;p&gt;100개, 1000개가 될 때는 구분할 방법이 필요하겠죠?&lt;/p&gt;&lt;p&gt;이럴 때 쓰는 게 id와 class 입니다. &lt;/p&gt;&lt;p&gt;id와 class를 통해 html 속성에 접근하거나, 꾸미거나 변경을합니다. &lt;/p&gt;&lt;p&gt;id와 html의 차이는 간단합니다. html 태그당 1개씩 있는가, 여러 태그를 한꺼번에 다루는가입니다.      &lt;/p&gt;&lt;p&gt;id는 html 속성을 구분할 때 사용합니다. id는 한 html 페이지에 하나만 있을 수 있어요.&lt;/p&gt;&lt;p&gt;class도 html 속성을 구분할 때 사용합니다. class는 한 html 페이지에 여러개가 있을 수 있어요.&lt;/p&gt;&lt;p&gt;id는 &lt;code&gt;&amp;lt;p id=&amp;quot;my-id&amp;quot;&amp;gt; &amp;lt;/p&amp;gt;&lt;/code&gt; 같은 식으로 적고
class는 &lt;code&gt;&amp;lt;p class=&amp;quot;textStyle&amp;quot;&amp;gt;&amp;lt;/p&amp;gt;&lt;/code&gt; 같은 방식으로 적어줍니다. &lt;/p&gt;&lt;p&gt;그럼 html에 id와 class를 적고, 적은 id와 class를 css에서 활용해보도록 할께요.&lt;/p&gt;&lt;h4&gt;&lt;a name='header-n108' class='md-header-anchor '&gt;&lt;/a&gt;index.html&lt;/h4&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;html&quot; style=&quot;page-break-inside: unset;&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;html&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-meta&quot;&gt;&amp;lt;!DOCTYPE html&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;html&lt;/span&gt; &lt;span class=&quot;cm-attribute&quot;&gt;lang&lt;/span&gt;=&lt;span class=&quot;cm-string&quot;&gt;&quot;en&quot;&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;head&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;meta&lt;/span&gt; &lt;span class=&quot;cm-attribute&quot;&gt;charset&lt;/span&gt;=&lt;span class=&quot;cm-string&quot;&gt;&quot;UTF-8&quot;&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;title&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;Title&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;title&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;link&lt;/span&gt; &lt;span class=&quot;cm-attribute&quot;&gt;rel&lt;/span&gt;=&lt;span class=&quot;cm-string&quot;&gt;&quot;stylesheet&quot;&lt;/span&gt; &lt;span class=&quot;cm-attribute&quot;&gt;type&lt;/span&gt;=&lt;span class=&quot;cm-string&quot;&gt;&quot;text/css&quot;&lt;/span&gt; &lt;span class=&quot;cm-attribute&quot;&gt;href&lt;/span&gt;=&lt;span class=&quot;cm-string&quot;&gt;&quot;style.css&quot;&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;head&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;body&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;p&lt;/span&gt; &lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;Hello 안녕하세요.&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;p&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;p&lt;/span&gt; &lt;span class=&quot;cm-attribute&quot;&gt;id&lt;/span&gt;=&lt;span class=&quot;cm-string&quot;&gt;&quot;greeting&quot;&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;안녕하세요.&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;p&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;p&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;제 이름은 &lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;p&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;h1&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;h1 글씨&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;h1&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;h6&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;h6 글씨 &lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;h6&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;h6&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;날씨 예보&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;h6&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;h6&lt;/span&gt; &lt;span class=&quot;cm-attribute&quot;&gt;class&lt;/span&gt;=&lt;span class=&quot;cm-string&quot;&gt;&quot;textStyle&quot;&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;오늘 날씨는&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;h6&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;h6&lt;/span&gt; &lt;span class=&quot;cm-attribute&quot;&gt;class&lt;/span&gt;=&lt;span class=&quot;cm-string&quot;&gt;&quot;textStyle&quot;&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;맑고&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;h6&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;h6&lt;/span&gt; &lt;span class=&quot;cm-attribute&quot;&gt;class&lt;/span&gt;=&lt;span class=&quot;cm-string&quot;&gt;&quot;textStyle&quot;&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;화창합니다.&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;h6&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;img&lt;/span&gt; &lt;span class=&quot;cm-attribute&quot;&gt;id&lt;/span&gt;=&lt;span class=&quot;cm-string&quot;&gt;&quot;road-img&quot;&lt;/span&gt; &lt;span class=&quot;cm-attribute&quot;&gt;src&lt;/span&gt;=&lt;span class=&quot;cm-string&quot;&gt;&quot;https://images.unsplash.com/photo-1554659966-023466cbc607?ixlib=rb-1.2.1&amp;amp;auto=format&amp;amp;fit=crop&amp;amp;w=1225&amp;amp;q=80&quot;&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;img&lt;/span&gt; &lt;span class=&quot;cm-attribute&quot;&gt;src&lt;/span&gt;=&lt;span class=&quot;cm-string&quot;&gt;&quot;https://images.unsplash.com/photo-1554659966-023466cbc607?ixlib=rb-1.2.1&amp;amp;auto=format&amp;amp;fit=crop&amp;amp;w=1225&amp;amp;q=80&quot;&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;a&lt;/span&gt; &lt;span class=&quot;cm-attribute&quot;&gt;href&lt;/span&gt;=&lt;span class=&quot;cm-string&quot;&gt;&quot;https://www.naver.com&quot;&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt; 네이버 이동&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;a&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;input&lt;/span&gt; &lt;span class=&quot;cm-attribute&quot;&gt;type&lt;/span&gt;=&lt;span class=&quot;cm-string&quot;&gt;&quot;button&quot;&lt;/span&gt; &lt;span class=&quot;cm-attribute&quot;&gt;name&lt;/span&gt;=&lt;span class=&quot;cm-string&quot;&gt;&quot;login&quot;&lt;/span&gt; &lt;span class=&quot;cm-attribute&quot;&gt;value&lt;/span&gt;=&lt;span class=&quot;cm-string&quot;&gt;&quot;login&quot;&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;body&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;html&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 748px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 748px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;h5&gt;&lt;a name='header-n111' class='md-header-anchor '&gt;&lt;/a&gt;style.css&lt;/h5&gt;&lt;p&gt;css에서는 원하는 id와 class만 스타일링 해줄 수 있습니다. &lt;/p&gt;&lt;p&gt;id를 표시할 때는 #id 같은 식으로 쓰이구요.&lt;/p&gt;&lt;p&gt;클래스는 .class 같은 식으로 적습니다. &lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;css&quot; style=&quot;page-break-inside: unset;&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;css&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-tag&quot;&gt;p&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-property&quot;&gt;font-size&lt;/span&gt;: &lt;span class=&quot;cm-number&quot;&gt;25px&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-property&quot;&gt;font-family&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;Verdana&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-qualifier&quot;&gt;.textStyle&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-property&quot;&gt;font-size&lt;/span&gt;: &lt;span class=&quot;cm-number&quot;&gt;15px&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-property&quot;&gt;font-family&lt;/span&gt;: &lt;span class=&quot;cm-atom&quot;&gt;Serif&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-tag&quot;&gt;img&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-property&quot;&gt;width&lt;/span&gt;: &lt;span class=&quot;cm-number&quot;&gt;200px&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-property&quot;&gt;height&lt;/span&gt;: &lt;span class=&quot;cm-number&quot;&gt;200px&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-property&quot;&gt;border-radius&lt;/span&gt;: &lt;span class=&quot;cm-number&quot;&gt;8px&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-property&quot;&gt;border&lt;/span&gt;: &lt;span class=&quot;cm-number&quot;&gt;1px&lt;/span&gt; &lt;span class=&quot;cm-atom&quot;&gt;solid&lt;/span&gt; &lt;span class=&quot;cm-atom&quot;&gt;#cccccc&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-tag&quot;&gt;img&lt;/span&gt;&lt;span class=&quot;cm-builtin&quot;&gt;#road-img&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-property&quot;&gt;width&lt;/span&gt;: &lt;span class=&quot;cm-number&quot;&gt;300px&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-property&quot;&gt;height&lt;/span&gt;: &lt;span class=&quot;cm-number&quot;&gt;300px&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-tag&quot;&gt;img&lt;/span&gt;&lt;span class=&quot;cm-builtin&quot;&gt;#road-img&lt;/span&gt;:&lt;span class=&quot;cm-variable-3&quot;&gt;hover&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-property&quot;&gt;box-shadow&lt;/span&gt;: &lt;span class=&quot;cm-number&quot;&gt;0&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;0&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;3px&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;3px&lt;/span&gt; &lt;span class=&quot;cm-atom&quot;&gt;rgba&lt;/span&gt;(&lt;span class=&quot;cm-number&quot;&gt;200&lt;/span&gt;, &lt;span class=&quot;cm-number&quot;&gt;255&lt;/span&gt;, &lt;span class=&quot;cm-number&quot;&gt;255&lt;/span&gt;, &lt;span class=&quot;cm-number&quot;&gt;0.5&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-tag&quot;&gt;a&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-property&quot;&gt;color&lt;/span&gt;: &lt;span class=&quot;cm-atom&quot;&gt;#b4654d&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 638px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 638px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;h3&gt;&lt;a name='header-n117' class='md-header-anchor '&gt;&lt;/a&gt;2.3 CSS -  자식 태그에 접근하기 &lt;/h3&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;css&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;css&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-tag&quot;&gt;p&lt;/span&gt; &lt;span class=&quot;cm-tag&quot;&gt;em&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 22px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 22px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;p em은 em이 p보다 안쪽에 있는 경우면 다 해당됩니다. &lt;/p&gt;&lt;p&gt;이렇게 적든&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;html&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;html&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;p&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;Text &lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;em&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;foo&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;em&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt; bar&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;p&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 22px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 22px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;요렇게 적든 상관없죠.&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;html&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;html&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;p&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;strong&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;em&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;foo&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;em&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;strong&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;p&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 22px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 22px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;반면 &amp;gt; 기호가 있으면 바로 안쪽에 있는 경우만 해당됩니다. &lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;css&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;css&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-tag&quot;&gt;p&lt;/span&gt; &amp;gt; &lt;span class=&quot;cm-tag&quot;&gt;em&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 22px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 22px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;이것만 되고 &lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;html&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;html&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;p&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;Text &lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;em&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;foo&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;em&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt; bar&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;p&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 22px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 22px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;이건 안되요. p와 em 사이에 strong이 있으니까요.&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;html&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;html&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;p&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;strong&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;em&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;foo&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;em&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;strong&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;p&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 22px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 22px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;css&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;css&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-tag&quot;&gt;p&lt;/span&gt; &amp;gt; &lt;span class=&quot;cm-tag&quot;&gt;em&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 66px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 66px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;html&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;html&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;p&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;Text &lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;em&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;foo&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;em&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt; bar&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;p&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 22px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 22px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;지금까지 html에 id와 class를 통해 css를 적용하는 방법을 알아보았습니다.&lt;/p&gt;&lt;p&gt;기본적인 html 구조는 알게 되었으니 이제 크롤링 하는 법을 알아보도록 할께요.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h3&gt;&lt;a name='header-n137' class='md-header-anchor '&gt;&lt;/a&gt;3. 크롤링하기&lt;/h3&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;- http request 보내기, response 받기&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;- beautiful soup&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;- save data&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 66px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 66px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;h5&gt;&lt;a name='header-n139' class='md-header-anchor '&gt;&lt;/a&gt;3.1.1 파이썬 라이브러리 설치&lt;/h5&gt;&lt;p&gt;이미 만들어진 함수들의 모음을 라이브러리라고 하는데, &lt;/p&gt;&lt;p&gt;파이썬으로 크롤링을 하려면 라이브러리를 설치해야 합니다. &lt;/p&gt;&lt;p&gt;커맨드 라인에서 pip를 써서 설치를 하거나 파이참에서 설치를 해주세요.&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;shell&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;shell&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;pip install beautifulsoup4 requests&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 22px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 22px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;파이참에서 라이브러리 설치하기 - &lt;a href='https://www.youtube.com/watch?v=HJ9bTO5yYw0' target='_blank' class='url'&gt;https://www.youtube.com/watch?v=HJ9bTO5yYw0&lt;/a&gt;&lt;/p&gt;&lt;p&gt;설치한 라이브러리는 requests와 Beautiful Soup입니다. &lt;/p&gt;&lt;p&gt;requests는 인터넷 상으로 데이터를 보내고, 받는 걸 쉽게 해줍니다.&lt;/p&gt;&lt;p&gt;웹사이트에서 html 문서를 받을 때 쓰죠.&lt;/p&gt;&lt;p&gt;Beautiful Soup(뷰티플 소프)은 받은 html 문서를 파싱할 때 씁니다.
파싱은 분해해서 다루기 편하게 만드는 걸 말합니다.
Beautiful Soup를 쓰면 원하는 html 태그를 쉽게 찾을 수 있습니다. &lt;/p&gt;&lt;h5&gt;&lt;a name='header-n149' class='md-header-anchor '&gt;&lt;/a&gt;3.1.2 requests 라이브러리&lt;/h5&gt;&lt;p&gt;인터넷은 http란 프로토콜로 만들어졌는데요. 프로토콜은 어떤일을 어떻게 하겠다는 약속입니다. &lt;/p&gt;&lt;p&gt;http는 통신을 하는 방식에 대한 약속이죠. &lt;/p&gt;&lt;p&gt;http는 크게 요청(request)과 응답(response)으로 이뤄져 있습니다.&lt;/p&gt;&lt;p&gt;간단히 말해 요청은 데이터를 달라는 말과 같습니다. &lt;/p&gt;&lt;p&gt;&amp;quot;내가 이 사이트에 접속할 테니 필요한 html을 줘!&amp;quot; 라고 웹사이트에 요청하는 거죠.&lt;/p&gt;&lt;p&gt;응답(response)는 내가 한 요청을 사이트가 처리해서 돌려주는 겁니다. &lt;/p&gt;&lt;p&gt;보통 응답에 html이나 에러(잘못된 페이지에요. 서버가 죽었어요) 등을 담아서 돌려주죠.&lt;/p&gt;&lt;p&gt;이런 요청과 응답을 쉽게 해주는 게 requests 라이브러리에요.&lt;/p&gt;&lt;p&gt;아래의 코드를 실행해 볼까요?  &lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;python&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;python&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;requests&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;response&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot;&gt;requests&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;get&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;'https://www.naver.com'&lt;/span&gt;) &lt;span class=&quot;cm-comment&quot;&gt;# 웹사이트에 리퀘스트를 보냄. 리퀘스트의 결과가 response에 저장&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;response&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;response&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;status_code&lt;/span&gt;) &lt;span class=&quot;cm-comment&quot;&gt;# 응답 코드 보여주기 200이면 성공!&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;response&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;text&lt;/span&gt;) &lt;span class=&quot;cm-comment&quot;&gt;# 응답 결과를 텍스트로 보여줌.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 198px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 198px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;**http 응답이 이해하기 어려우면&lt;/p&gt;&lt;p&gt;웹사이트 주소를 치면 데이터를 보내주고, &lt;/p&gt;&lt;p&gt;그 데이터를 분해해서 쓴다 정도로만 생각해도 됩니다.**&lt;/p&gt;&lt;p&gt;html 데이터를 받았으니 이제 파싱(쓰기 쉽게 분해)를 해볼께요. &lt;/p&gt;&lt;p&gt;그래야 나중에 분석이 가능하겠죠?&lt;/p&gt;&lt;h5&gt;&lt;a name='header-n167' class='md-header-anchor '&gt;&lt;/a&gt;3.2 Beautiful Soup 써보기&lt;/h5&gt;&lt;p&gt;BeautifulSoup는 파싱을 할 떄 사용합니다. &lt;/p&gt;&lt;p&gt;간단히 파싱을 해보도록 할께요.&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;python&quot; style=&quot;page-break-inside: unset;&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;python&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;html_doc&lt;/span&gt;=&lt;span class=&quot;cm-string&quot;&gt;&quot;&quot;&quot;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-string&quot;&gt;&amp;lt;html&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-string&quot;&gt; &amp;nbsp;  &amp;lt;head&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-string&quot;&gt; &amp;nbsp;  &amp;lt;/head&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-string&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;  &amp;lt;body&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-string&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;  &amp;lt;p&amp;gt; hello &amp;lt;/p&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-string&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;  &amp;lt;p&amp;gt; good day &amp;lt;/p&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-string&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;  &amp;lt;/body&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-string&quot;&gt;&amp;lt;/html&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-string&quot;&gt;&quot;&quot;&quot;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;bs4&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;BeautifulSoup&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;soup&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot;&gt;BeautifulSoup&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;html_doc&lt;/span&gt;, &lt;span class=&quot;cm-string&quot;&gt;'html.parser'&lt;/span&gt;) &lt;span class=&quot;cm-comment&quot;&gt;# &amp;lt;- html_doc은 파싱할 문서고, 'html.parser'는 파싱 방식이에요.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;p&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;soup&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;find&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;'p'&lt;/span&gt;):&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;p&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 418px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 418px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;html 문서에서 p 태그만 출력합니다. &lt;/p&gt;&lt;p&gt;근데 find() 함수를 쓰니 p 태그가 여러개 있어도 1개만 출력하네요.&lt;/p&gt;&lt;p&gt;이때는 find_all() 함수를 쓰면 됩니다.&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;python&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;python&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;bs4&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;BeautifulSoup&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;soup&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot;&gt;BeautifulSoup&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;html_doc&lt;/span&gt;, &lt;span class=&quot;cm-string&quot;&gt;'html.parser'&lt;/span&gt;) &lt;span class=&quot;cm-comment&quot;&gt;# &amp;lt;- html_doc은 파싱할 문서고, 'html.parser'는 파싱 방식이에요.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;p&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;soup&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;find_all&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;'p'&lt;/span&gt;):&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;p&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 154px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 154px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;모든 p 태그가 출력됩니다. &lt;/p&gt;&lt;h5&gt;&lt;a name='header-n178' class='md-header-anchor '&gt;&lt;/a&gt;3.2.1 Beautiful Soup - find, select 차이점. requests 사용&lt;/h5&gt;&lt;p&gt;Beautiful Soup (뷰티풀 소프)는 2가지 방식으로 html 문서를 파싱합니다.&lt;/p&gt;&lt;p&gt;find와 select인데요. find는 html tag를 통해서 원하는 부분을 찾습니다. &lt;/p&gt;&lt;p&gt;반면 select는 css를 통해 원하는 부분을 찾습니다.&lt;/p&gt;&lt;p&gt;find와 select는 기능적으로는 동일해요. 선택의 문제죠.&lt;/p&gt;&lt;p&gt;많은 메소드가 있지만 자주 함수는 4개에요.  &lt;/p&gt;&lt;ul&gt;&lt;li&gt;find : 1개의 태그만 찾음.&lt;/li&gt;&lt;li&gt;find_all : 모든 태그를 찾음.&lt;/li&gt;&lt;li&gt;select_one : 1개의 태그만 찾음. &lt;/li&gt;&lt;li&gt;select : 모든 태그를 찾음.&lt;/li&gt;&lt;/ul&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;python&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;python&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;requests&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;bs4&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;BeautifulSoup&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;response&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot;&gt;requests&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;get&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;'https://www.naver.com'&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;soup&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot;&gt;BeautifulSoup&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;response&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;text&lt;/span&gt;, &lt;span class=&quot;cm-string&quot;&gt;'html.parser'&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;p&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;soup&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;select&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;'p'&lt;/span&gt;):&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;p&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;link&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;soup&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;select&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;'a'&lt;/span&gt;):&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;link&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;get&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;'href'&lt;/span&gt;)) &lt;span class=&quot;cm-comment&quot;&gt;# a태그의 href를 전부 찾기&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 286px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 286px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h5&gt;&lt;a name='header-n195' class='md-header-anchor '&gt;&lt;/a&gt;문제 3.1 - Beautiful Soup를 써서  &lt;img&gt; 태그만 골라서 출력해보세요.&lt;/h5&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h5&gt;&lt;a name='header-n197' class='md-header-anchor '&gt;&lt;/a&gt;3.3 Chrome 써서 원하는 태그 쉽게 찾기&lt;/h5&gt;&lt;p&gt;크롬을 쓰면 웹에서 내가 찾고자 하는 부분을 쉽게 찾을 수 있어요.&lt;/p&gt;&lt;p&gt;일단 &amp;#39;개발자 도구&amp;#39;를 열도록 할께요. &lt;/p&gt;&lt;p&gt;마우스 오른쪽 키를 누르면 &amp;#39;검사&amp;#39;가 뜨는 데 검사를 누르면 됩니다. &lt;/p&gt;&lt;p&gt;새로 창이 생겼죠? 거기서 element 탭을 누르면 html 요소들을 확인할 수 있습니다. &lt;/p&gt;&lt;p&gt;내가 원하는 태그를 찾을 때도 비슷한 방법을 써요.&lt;/p&gt;&lt;p&gt;일단 마우스를 웹 페이지에 올리고 &amp;#39;검사&amp;#39; 버튼을 누르면 됩니다.&lt;/p&gt;&lt;p&gt;아래 이미지를 참고해주세요.&lt;/p&gt;&lt;p&gt;&lt;img src='https://user-images.githubusercontent.com/13621579/56201001-e4a7f580-607a-11e9-8d98-c56d2b111760.png' alt='alt text' referrerPolicy='no-referrer' /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;크롬 툴을 쓰면 편하게 html에 있는 요소들을 찾고, 편집할 수 있습니다.&lt;/p&gt;&lt;p&gt;내가 원하는 html 요소 찾는 법을 알았으니 이걸 크롤링하면 되겠죠?&lt;/p&gt;&lt;p&gt;아래 영상을 보거나&lt;/p&gt;&lt;iframe src=&quot;https://www.youtube.com/embed/w7dlNHmy08s&quot; width=&quot;560&quot; height=&quot;315&quot; allow=&quot;accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture&quot; frameborder=&quot;&quot; allowfullscreen=&quot;true&quot;&gt;&lt;/iframe&gt;&lt;p&gt;이 영상을 참고하세요 (&lt;a href='https://www.youtube.com/watch?v=mLPIcnFKD04' target='_blank' class='url'&gt;https://www.youtube.com/watch?v=mLPIcnFKD04&lt;/a&gt;)&lt;/p&gt;&lt;h3&gt;&lt;a name='header-n213' class='md-header-anchor '&gt;&lt;/a&gt;4. 네이버 블로그 크롤링 하기&lt;/h3&gt;&lt;p&gt;네이버에서 검색했을 때 나오는 블로그의 글을 크롤링해보도록 하겠습니다. &lt;/p&gt;&lt;p&gt;글의 제목과 내용정도만 간단히 크롤링해보려 합니다. &lt;/p&gt;&lt;p&gt;네이버 검색에서 &amp;#39;홍대 맛집&amp;#39;으로 검색하고 블로그 탭을 누르도록 합시다. &lt;/p&gt;&lt;p&gt;블로그 검색 결과만 주르륵 나옵니다 .&lt;/p&gt;&lt;p&gt;&lt;img src='https://user-images.githubusercontent.com/13621579/56263456-ed9dd300-611d-11e9-9f44-c41b3eb7517f.png' alt='alt text' referrerPolicy='no-referrer' /&gt;&lt;/p&gt;&lt;p&gt;이 검색 결과를 크롤링 하도록 할께요.&lt;/p&gt;&lt;p&gt;위의 사진처럼 검색 결과를 나타내는 주소 (&lt;a href='https://search.naver.com/search.naver?where=post&amp;sm=tab_jum&amp;query=%ED%99%8D%EB%8C%80+%EB%A7%9B%EC%A7%91' target='_blank' class='url'&gt;https://search.naver.com/search.naver?where=post&amp;sm=tab_jum&amp;query=%ED%99%8D%EB%8C%80+%EB%A7%9B%EC%A7%91&lt;/a&gt;)를 &lt;/p&gt;&lt;p&gt;복사해주세요.&lt;/p&gt;&lt;h5&gt;&lt;a name='header-n223' class='md-header-anchor '&gt;&lt;/a&gt;4.1 크롤링 함수 만들기&lt;/h5&gt;&lt;p&gt;블로그 검색 결과를 요청하는 함수를 만들어볼께요.&lt;/p&gt;&lt;h6&gt;&lt;a name='header-n225' class='md-header-anchor '&gt;&lt;/a&gt;4.1 step 1&lt;/h6&gt;&lt;p&gt;리퀘스트를 보내고 응답이 제대로 오는지 확인합시다. &lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;python&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;python&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;requests&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;bs4&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;BeautifulSoup&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;cm-def&quot;&gt;blog_crawling&lt;/span&gt;():&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;url&lt;/span&gt; = &lt;span class=&quot;cm-string&quot;&gt;'https://search.naver.com/search.naver?where=post&amp;amp;sm=tab_jum&amp;amp;query=%ED%99%8D%EB%8C%80+%EB%A7%9B%EC%A7%91'&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;response&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot;&gt;requests&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;get&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;url&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;response&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;text&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;blog_crawling&lt;/span&gt;()&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 264px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 264px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;h6&gt;&lt;a name='header-n228' class='md-header-anchor '&gt;&lt;/a&gt;4.1 step 2&lt;/h6&gt;&lt;p&gt;응답을 Beautiful Soup로 파싱해 봅시다.&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;python&quot; style=&quot;page-break-inside: unset;&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;python&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;requests&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;bs4&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;BeautifulSoup&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;cm-def&quot;&gt;blog_crawling&lt;/span&gt;():&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;url&lt;/span&gt; = &lt;span class=&quot;cm-string&quot;&gt;'https://search.naver.com/search.naver?where=post&amp;amp;sm=tab_jum&amp;amp;query=%ED%99%8D%EB%8C%80+%EB%A7%9B%EC%A7%91'&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;response&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot;&gt;requests&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;get&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;url&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;soup&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot;&gt;BeautifulSoup&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;response&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;text&lt;/span&gt;, &lt;span class=&quot;cm-string&quot;&gt;'html.parser'&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;soup&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;text&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;blog_crawling&lt;/span&gt;()&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 352px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 352px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;h6&gt;&lt;a name='header-n232' class='md-header-anchor '&gt;&lt;/a&gt;4.1 step 3&lt;/h6&gt;&lt;p&gt;검색 결과 중에서 블로그 제목만 파싱해 보도록 할께요.&lt;/p&gt;&lt;p&gt;&amp;#39;3.3 Chrome 써서 원하는 태그 쉽게 찾기&amp;#39;에 적은 대로 블로그 제목의 항목만 찾아주세요.&lt;/p&gt;&lt;p&gt;크롤링을 잘하려면 html 구조를 보고, 원하는 항목만 쉽게 볼 수 있어야 해요.&lt;/p&gt;&lt;p&gt;이건 연습이 필요합니다. &lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;python&quot; style=&quot;page-break-inside: unset;&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;python&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;requests&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;bs4&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;BeautifulSoup&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;cm-def&quot;&gt;blog_crawling&lt;/span&gt;():&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;url&lt;/span&gt; = &lt;span class=&quot;cm-string&quot;&gt;'https://search.naver.com/search.naver?where=post&amp;amp;sm=tab_jum&amp;amp;query=%ED%99%8D%EB%8C%80+%EB%A7%9B%EC%A7%91'&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;response&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot;&gt;requests&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;get&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;url&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;soup&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot;&gt;BeautifulSoup&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;response&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;text&lt;/span&gt;, &lt;span class=&quot;cm-string&quot;&gt;'html.parser'&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;links&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;soup&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;select&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;'li.sh_blog_top &amp;gt; dl'&lt;/span&gt;): &lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;title&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot;&gt;links&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;select&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;'dt &amp;gt; a'&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;title&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot;&gt;title&lt;/span&gt;[&lt;span class=&quot;cm-number&quot;&gt;0&lt;/span&gt;].&lt;span class=&quot;cm-property&quot;&gt;get&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;'title'&lt;/span&gt;) &lt;span class=&quot;cm-comment&quot;&gt;# select로 찾은 결과는 리스트로 표시되기에 [0]을 썼습니다. &lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;title&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;blog_crawling&lt;/span&gt;()&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 440px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 440px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h6&gt;&lt;a name='header-n239' class='md-header-anchor '&gt;&lt;/a&gt;4.1 step 4&lt;/h6&gt;&lt;p&gt;블로그 제목뿐만 아니라, 작성자, 내용까지 파싱해보도록 할께요.&lt;/p&gt;&lt;p&gt;블로그 데이터는 사전으로 만들고, 하나씩 리스트에 담겠습니다. &lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;python&quot; style=&quot;page-break-inside: unset;&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;python&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;requests&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;bs4&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;BeautifulSoup&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;cm-def&quot;&gt;blog_crawling&lt;/span&gt;():&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;url&lt;/span&gt; = &lt;span class=&quot;cm-string&quot;&gt;&quot;https://search.naver.com/search.naver?where=post&amp;amp;sm=tab_jum&amp;amp;query=%ED%99%8D%EB%8C%80+%EB%A7%9B%EC%A7%91&quot;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;response&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot;&gt;requests&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;get&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;url&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;soup&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot;&gt;BeautifulSoup&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;response&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;text&lt;/span&gt;, &lt;span class=&quot;cm-string&quot;&gt;'html.parser'&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;blog_post_list&lt;/span&gt; = []&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;links&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;soup&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;select&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;'li.sh_blog_top &amp;gt; dl'&lt;/span&gt;):&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;title&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot;&gt;links&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;select&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;'dt &amp;gt; a'&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;content&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot;&gt;links&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;select&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;'dd.sh_blog_passage'&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;author&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot;&gt;links&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;select&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;'dd.txt_block a'&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;title&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot;&gt;title&lt;/span&gt;[&lt;span class=&quot;cm-number&quot;&gt;0&lt;/span&gt;].&lt;span class=&quot;cm-property&quot;&gt;get&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;'title'&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;content&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot;&gt;content&lt;/span&gt;[&lt;span class=&quot;cm-number&quot;&gt;0&lt;/span&gt;].&lt;span class=&quot;cm-property&quot;&gt;text&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;author&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot;&gt;author&lt;/span&gt;[&lt;span class=&quot;cm-number&quot;&gt;0&lt;/span&gt;].&lt;span class=&quot;cm-property&quot;&gt;text&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;blog_post&lt;/span&gt; = {&lt;span class=&quot;cm-string&quot;&gt;'author'&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;author&lt;/span&gt;, &lt;span class=&quot;cm-string&quot;&gt;'title'&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;title&lt;/span&gt;, &lt;span class=&quot;cm-string&quot;&gt;'content'&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;content&lt;/span&gt;} &lt;span class=&quot;cm-comment&quot;&gt;# 블로그 데이터를 사전으로 만들어주었습니다.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;blog_post_list&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;append&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;blog_post&lt;/span&gt;) &lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;blog_post_list&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;blog_post_list&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot;&gt;blog_crawling&lt;/span&gt;() &lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 748px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 748px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;h6&gt;&lt;a name='header-n244' class='md-header-anchor '&gt;&lt;/a&gt;4.1 step 5&lt;/h6&gt;&lt;p&gt;추출한 데이터를 엑셀에 저장하도록 할께요.&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;python&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;python&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;csv&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;cm-def&quot;&gt;save_data&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;blog_post&lt;/span&gt;):&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;keys&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot;&gt;blog_post&lt;/span&gt;[&lt;span class=&quot;cm-number&quot;&gt;0&lt;/span&gt;].&lt;span class=&quot;cm-property&quot;&gt;keys&lt;/span&gt;()&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;with&lt;/span&gt; &lt;span class=&quot;cm-builtin&quot;&gt;open&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;'blog_crawling.csv'&lt;/span&gt;, &lt;span class=&quot;cm-string&quot;&gt;'w'&lt;/span&gt;) &lt;span class=&quot;cm-keyword&quot;&gt;as&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;file&lt;/span&gt;:&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;writer&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot;&gt;csv&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;DictWriter&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;file&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;keys&lt;/span&gt;) &lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;writer&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;writeheader&lt;/span&gt;()&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;writer&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;writerows&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;blog_post&lt;/span&gt;) &lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;blog_post_list&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot;&gt;blog_crawling&lt;/span&gt;() &lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;save_data&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;blog_post_list&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 242px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 242px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;h6&gt;&lt;a name='header-n248' class='md-header-anchor '&gt;&lt;/a&gt;4.1 step 6&lt;/h6&gt;&lt;p&gt;위의 코드는 검색 결과 중 1페이지만 저장했습니다. &lt;/p&gt;&lt;p&gt;여러 페이지를 저장할 수 있게 코드를 수정해볼께요.&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;python&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;python&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;cm-def&quot;&gt;blog_crawling&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;page&lt;/span&gt;=&lt;span class=&quot;cm-number&quot;&gt;1&lt;/span&gt;):&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;url&lt;/span&gt; = &lt;span class=&quot;cm-string&quot;&gt;&quot;https://search.naver.com/search.naver?date_from=&amp;amp;date_option=0&amp;amp;date_to=&amp;amp;dup_remove=1&amp;amp;nso=&amp;amp;post_blogurl=&amp;amp;post_blogurl_without=&amp;amp;query=%ED%99%8D%EB%8C%80%20%EB%A7%9B%EC%A7%91&amp;amp;sm=tab_pge&amp;amp;srchby=all&amp;amp;st=sim&amp;amp;where=post&amp;amp;start={}&quot;&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;format&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;page&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;blog_post_list&lt;/span&gt; = []&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;cm-builtin&quot;&gt;range&lt;/span&gt;(&lt;span class=&quot;cm-number&quot;&gt;1&lt;/span&gt;, &lt;span class=&quot;cm-number&quot;&gt;100&lt;/span&gt;, &lt;span class=&quot;cm-number&quot;&gt;10&lt;/span&gt;):&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;blog_post_list&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;extend&lt;/span&gt;( &lt;span class=&quot;cm-variable&quot;&gt;blog_crawling&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;page&lt;/span&gt;=&lt;span class=&quot;cm-variable&quot;&gt;i&lt;/span&gt;) )&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;time&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;sleep&lt;/span&gt;(&lt;span class=&quot;cm-number&quot;&gt;2&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;save_data&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;blog_post_list&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 264px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 264px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;100개 블로그의 데이터가 저장됩니다! &lt;/p&gt;&lt;h3&gt;&lt;a name='header-n254' class='md-header-anchor '&gt;&lt;/a&gt;네이버 블로그 크롤링 전체 코드 &lt;/h3&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;python&quot; style=&quot;page-break-inside: unset;&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;python&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;csv&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;requests&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;time&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;from&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;bs4&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;BeautifulSoup&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;cm-def&quot;&gt;blog_crawling&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;page&lt;/span&gt;=&lt;span class=&quot;cm-number&quot;&gt;1&lt;/span&gt;):&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;url&lt;/span&gt; = &lt;span class=&quot;cm-string&quot;&gt;&quot;https://search.naver.com/search.naver?date_from=&amp;amp;date_option=0&amp;amp;date_to=&amp;amp;dup_remove=1&amp;amp;nso=&amp;amp;post_blogurl=&amp;amp;post_blogurl_without=&amp;amp;query=%ED%99%8D%EB%8C%80%20%EB%A7%9B%EC%A7%91&amp;amp;sm=tab_pge&amp;amp;srchby=all&amp;amp;st=sim&amp;amp;where=post&amp;amp;start={}&quot;&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;format&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;page&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;response&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot;&gt;requests&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;get&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;url&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;soup&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot;&gt;BeautifulSoup&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;response&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;text&lt;/span&gt;, &lt;span class=&quot;cm-string&quot;&gt;'html.parser'&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;blog_post_list&lt;/span&gt; = []&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;links&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;soup&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;select&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;'li.sh_blog_top &amp;gt; dl'&lt;/span&gt;):&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;title&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot;&gt;links&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;select&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;'dt &amp;gt; a'&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;content&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot;&gt;links&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;select&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;'dd.sh_blog_passage'&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;author&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot;&gt;links&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;select&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;'dd.txt_block a'&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;title&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot;&gt;title&lt;/span&gt;[&lt;span class=&quot;cm-number&quot;&gt;0&lt;/span&gt;].&lt;span class=&quot;cm-property&quot;&gt;get&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;'title'&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;content&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot;&gt;content&lt;/span&gt;[&lt;span class=&quot;cm-number&quot;&gt;0&lt;/span&gt;].&lt;span class=&quot;cm-property&quot;&gt;text&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;author&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot;&gt;author&lt;/span&gt;[&lt;span class=&quot;cm-number&quot;&gt;0&lt;/span&gt;].&lt;span class=&quot;cm-property&quot;&gt;text&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;blog_post&lt;/span&gt; = {&lt;span class=&quot;cm-string&quot;&gt;'author'&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;author&lt;/span&gt;, &lt;span class=&quot;cm-string&quot;&gt;'title'&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;title&lt;/span&gt;, &lt;span class=&quot;cm-string&quot;&gt;'content'&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;content&lt;/span&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;blog_post_list&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;append&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;blog_post&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;blog_post_list&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;cm-def&quot;&gt;save_data&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;blog_post&lt;/span&gt;):&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;keys&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot;&gt;blog_post&lt;/span&gt;[&lt;span class=&quot;cm-number&quot;&gt;0&lt;/span&gt;].&lt;span class=&quot;cm-property&quot;&gt;keys&lt;/span&gt;()&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;with&lt;/span&gt; &lt;span class=&quot;cm-builtin&quot;&gt;open&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;'blog_crawling.csv'&lt;/span&gt;, &lt;span class=&quot;cm-string&quot;&gt;'w'&lt;/span&gt;) &lt;span class=&quot;cm-keyword&quot;&gt;as&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;file&lt;/span&gt;:&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;writer&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot;&gt;csv&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;DictWriter&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;file&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;keys&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;writer&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;writeheader&lt;/span&gt;()&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;writer&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;writerows&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;blog_post&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;blog_post_list&lt;/span&gt; = []&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;cm-builtin&quot;&gt;range&lt;/span&gt;(&lt;span class=&quot;cm-number&quot;&gt;1&lt;/span&gt;, &lt;span class=&quot;cm-number&quot;&gt;100&lt;/span&gt;, &lt;span class=&quot;cm-number&quot;&gt;10&lt;/span&gt;):&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;blog_post_list&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;extend&lt;/span&gt;( &lt;span class=&quot;cm-variable&quot;&gt;blog_crawling&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;page&lt;/span&gt;=&lt;span class=&quot;cm-variable&quot;&gt;i&lt;/span&gt;) )&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;time&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;sleep&lt;/span&gt;(&lt;span class=&quot;cm-number&quot;&gt;2&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;save_data&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;blog_post_list&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 1056px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 1056px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;참고사이트 : &lt;a href='https://www.w3schools.com/html/' target='_blank' class='url'&gt;https://www.w3schools.com/html/&lt;/a&gt;
참고글 : 파이썬 requests 라이브러리 예제 - &lt;a href='http://docs.python-requests.org/en/master/user/quickstart/' target='_blank' class='url'&gt;http://docs.python-requests.org/en/master/user/quickstart/&lt;/a&gt; &lt;/p&gt;&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;</description>
      <category>파이썬</category>
      <category>네이버 블로그 크롤링</category>
      <category>네이버 크롤링</category>
      <category>네이버블로그크롤링</category>
      <category>파이썬크롤링</category>
      <author>에드 신</author>
      <guid isPermaLink="true">https://software-creator.tistory.com/20</guid>
      <comments>https://software-creator.tistory.com/20#entry20comment</comments>
      <pubDate>Wed, 17 Apr 2019 15:33:21 +0900</pubDate>
    </item>
    <item>
      <title>Flutter - Zone이란?  프로그램 종료되지 않게 예외처리 하기.</title>
      <link>https://software-creator.tistory.com/19</link>
      <description>&lt;!doctype html&gt;
&lt;html&gt;
&lt;head&gt;
&lt;meta charset='UTF-8'&gt;&lt;meta name='viewport' content='width=device-width initial-scale=1'&gt;
&lt;meta name=&quot;description&quot; content=&quot;Zone이란? try ~ catch와의 차이점. 플러터 플러그인을 쓰다보면 runZone()를 쓰는 경우가 종종 있습니다.주로 아래처럼 쓰입니다.&quot;/&gt;
&lt;title&gt;flutter-zone&lt;/title&gt;&lt;link href='https://fonts.loli.net/css?family=Open+Sans:400italic,700italic,700,400&amp;subset=latin,latin-ext' rel='stylesheet' type='text/css' /&gt;&lt;style type='text/css'&gt;html {overflow-x: initial !important;}:root { --bg-color: #ffffff; --text-color: #333333; --select-text-bg-color: #B5D6FC; --select-text-font-color: auto; --monospace: &quot;Lucida Console&quot;,Consolas,&quot;Courier&quot;,monospace; }
html { font-size: 14px; background-color: var(--bg-color); color: var(--text-color); font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; -webkit-font-smoothing: antialiased; }
body { margin: 0px; padding: 0px; height: auto; bottom: 0px; top: 0px; left: 0px; right: 0px; font-size: 1rem; line-height: 1.42857143; overflow-x: hidden; background-image: inherit; background-size: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: inherit; background-position: inherit inherit; background-repeat: inherit inherit; }
iframe { margin: auto; }
a.url { word-break: break-all; }
a:active, a:hover { outline: 0px; }
.in-text-selection, ::selection { text-shadow: none; background: var(--select-text-bg-color); color: var(--select-text-font-color); }
#write { margin: 0px auto; height: auto; width: inherit; word-break: normal; word-wrap: break-word; position: relative; white-space: normal; overflow-x: visible; padding-top: 40px; }
#write.first-line-indent p { text-indent: 2em; }
#write.first-line-indent li p, #write.first-line-indent p * { text-indent: 0px; }
#write.first-line-indent li { margin-left: 2em; }
.for-image #write { padding-left: 8px; padding-right: 8px; }
body.typora-export { padding-left: 30px; padding-right: 30px; }
.typora-export .footnote-line, .typora-export li, .typora-export p { white-space: pre-wrap; }
@media screen and (max-width: 500px) {
  body.typora-export { padding-left: 0px; padding-right: 0px; }
  #write { padding-left: 20px; padding-right: 20px; }
  .CodeMirror-sizer { margin-left: 0px !important; }
  .CodeMirror-gutters { display: none !important; }
}
#write li &gt; figure:first-child { margin-top: -20px; }
#write ol, #write ul { position: relative; }
img { max-width: 100%; vertical-align: middle; }
button, input, select, textarea { color: inherit; font-family: inherit; font-size: inherit; font-style: inherit; font-variant-caps: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; }
input[type=&quot;checkbox&quot;], input[type=&quot;radio&quot;] { line-height: normal; padding: 0px; }
*, ::after, ::before { box-sizing: border-box; }
#write h1, #write h2, #write h3, #write h4, #write h5, #write h6, #write p, #write pre { width: inherit; }
#write h1, #write h2, #write h3, #write h4, #write h5, #write h6, #write p { position: relative; }
h1, h2, h3, h4, h5, h6 { break-after: avoid-page; break-inside: avoid; orphans: 2; }
p { orphans: 4; }
h1 { font-size: 2rem; }
h2 { font-size: 1.8rem; }
h3 { font-size: 1.6rem; }
h4 { font-size: 1.4rem; }
h5 { font-size: 1.2rem; }
h6 { font-size: 1rem; }
.md-math-block, .md-rawblock, h1, h2, h3, h4, h5, h6, p { margin-top: 1rem; margin-bottom: 1rem; }
.hidden { display: none; }
.md-blockmeta { color: rgb(204, 204, 204); font-weight: 700; font-style: italic; }
a { cursor: pointer; }
sup.md-footnote { padding: 2px 4px; background-color: rgba(238, 238, 238, 0.701961); color: rgb(85, 85, 85); border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; cursor: pointer; }
sup.md-footnote a, sup.md-footnote a:hover { color: inherit; text-transform: inherit; text-decoration: inherit; }
#write input[type=&quot;checkbox&quot;] { cursor: pointer; width: inherit; height: inherit; }
figure { overflow-x: auto; margin: 1.2em 0px; max-width: calc(100% + 16px); padding: 0px; }
figure &gt; table { margin: 0px !important; }
tr { break-inside: avoid; break-after: auto; }
thead { display: table-header-group; }
table { border-collapse: collapse; border-spacing: 0px; width: 100%; overflow: auto; break-inside: auto; text-align: left; }
table.md-table td { min-width: 32px; }
.CodeMirror-gutters { border-right-width: 0px; background-color: inherit; }
.CodeMirror-linenumber { }
.CodeMirror { text-align: left; }
.CodeMirror-placeholder { opacity: 0.3; }
.CodeMirror pre { padding: 0px 4px; }
.CodeMirror-lines { padding: 0px; }
div.hr:focus { cursor: none; }
#write pre { white-space: pre-wrap; }
#write.fences-no-line-wrapping pre { white-space: pre; }
#write pre.ty-contain-cm { white-space: normal; }
.CodeMirror-gutters { margin-right: 4px; }
.md-fences { font-size: 0.9rem; display: block; break-inside: avoid; text-align: left; overflow: visible; white-space: pre; background-image: inherit; background-size: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: inherit; position: relative !important; background-position: inherit inherit; background-repeat: inherit inherit; }
.md-diagram-panel { width: 100%; margin-top: 10px; text-align: center; padding-top: 0px; padding-bottom: 8px; overflow-x: auto; }
#write .md-fences.mock-cm { white-space: pre-wrap; }
.md-fences.md-fences-with-lineno { padding-left: 0px; }
#write.fences-no-line-wrapping .md-fences.mock-cm { white-space: pre; overflow-x: auto; }
.md-fences.mock-cm.md-fences-with-lineno { padding-left: 8px; }
.CodeMirror-line, twitterwidget { break-inside: avoid; }
.footnotes { opacity: 0.8; font-size: 0.9rem; margin-top: 1em; margin-bottom: 1em; }
.footnotes + .footnotes { margin-top: 0px; }
.md-reset { margin: 0px; padding: 0px; border: 0px; outline: 0px; vertical-align: top; text-decoration: none; text-shadow: none; float: none; position: static; width: auto; height: auto; white-space: nowrap; cursor: inherit; line-height: normal; font-weight: 400; text-align: left; box-sizing: content-box; direction: ltr; background-position: 0px 0px; background-repeat: initial initial; }
li div { padding-top: 0px; }
blockquote { margin: 1rem 0px; }
li .mathjax-block, li p { margin: 0.5rem 0px; }
li { margin: 0px; position: relative; }
blockquote &gt; :last-child { margin-bottom: 0px; }
blockquote &gt; :first-child, li &gt; :first-child { margin-top: 0px; }
.footnotes-area { color: rgb(136, 136, 136); margin-top: 0.714rem; padding-bottom: 0.143rem; white-space: normal; }
#write .footnote-line { white-space: pre-wrap; }
@media print {
  body, html { border: 1px solid transparent; height: 99%; break-after: avoid-page; break-before: avoid-page; }
  #write { margin-top: 0px; padding-top: 0px; border-color: transparent !important; }
  .typora-export * { -webkit-print-color-adjust: exact; }
  html.blink-to-pdf { font-size: 13px; }
  .typora-export #write { padding-left: 32px; padding-right: 32px; padding-bottom: 0px; break-after: avoid-page; }
  .typora-export #write::after { height: 0px; }
  @page { margin: 20mm 0px; }
}
.footnote-line { margin-top: 0.714em; font-size: 0.7em; }
a img, img a { cursor: pointer; }
pre.md-meta-block { font-size: 0.8rem; min-height: 0.8rem; white-space: pre-wrap; background-color: rgb(204, 204, 204); display: block; overflow-x: hidden; background-position: initial initial; background-repeat: initial initial; }
p &gt; .md-image:only-child:not(.md-img-error) img, p &gt; img:only-child { display: block; margin: auto; }
p &gt; .md-image:only-child { display: inline-block; width: 100%; }
#write .MathJax_Display { margin: 0.8em 0px 0px; }
.md-math-block { width: 100%; }
.md-math-block:not(:empty)::after { display: none; }
[contenteditable=&quot;true&quot;]:active, [contenteditable=&quot;true&quot;]:focus { outline: 0px; box-shadow: none; }
.md-task-list-item { position: relative; list-style-type: none; }
.task-list-item.md-task-list-item { padding-left: 0px; }
.md-task-list-item &gt; input { position: absolute; top: 0px; left: 0px; margin-left: -1.2em; margin-top: calc(1em - 10px); border: none; }
.math { font-size: 1rem; }
.md-toc { min-height: 3.58rem; position: relative; font-size: 0.9rem; border-top-left-radius: 10px; border-top-right-radius: 10px; border-bottom-right-radius: 10px; border-bottom-left-radius: 10px; }
.md-toc-content { position: relative; margin-left: 0px; }
.md-toc-content::after, .md-toc::after { display: none; }
.md-toc-item { display: block; color: rgb(65, 131, 196); }
.md-toc-item a { text-decoration: none; }
.md-toc-inner:hover { text-decoration: underline; }
.md-toc-inner { display: inline-block; cursor: pointer; }
.md-toc-h1 .md-toc-inner { margin-left: 0px; font-weight: 700; }
.md-toc-h2 .md-toc-inner { margin-left: 2em; }
.md-toc-h3 .md-toc-inner { margin-left: 4em; }
.md-toc-h4 .md-toc-inner { margin-left: 6em; }
.md-toc-h5 .md-toc-inner { margin-left: 8em; }
.md-toc-h6 .md-toc-inner { margin-left: 10em; }
@media screen and (max-width: 48em) {
  .md-toc-h3 .md-toc-inner { margin-left: 3.5em; }
  .md-toc-h4 .md-toc-inner { margin-left: 5em; }
  .md-toc-h5 .md-toc-inner { margin-left: 6.5em; }
  .md-toc-h6 .md-toc-inner { margin-left: 8em; }
}
a.md-toc-inner { font-size: inherit; font-style: inherit; font-weight: inherit; line-height: inherit; }
.footnote-line a:not(.reversefootnote) { color: inherit; }
.md-attr { display: none; }
.md-fn-count::after { content: &quot;.&quot;; }
code, pre, samp, tt { font-family: var(--monospace); }
kbd { margin: 0px 0.1em; padding: 0.1em 0.6em; font-size: 0.8em; color: rgb(36, 39, 41); background-color: rgb(255, 255, 255); border: 1px solid rgb(173, 179, 185); border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; box-shadow: rgba(12, 13, 14, 0.2) 0px 1px 0px, rgb(255, 255, 255) 0px 0px 0px 2px inset; white-space: nowrap; vertical-align: middle; background-position: initial initial; background-repeat: initial initial; }
.md-comment { color: rgb(162, 127, 3); opacity: 0.8; font-family: var(--monospace); }
code { text-align: left; }
a.md-print-anchor { white-space: pre !important; border: none !important; display: inline-block !important; position: absolute !important; width: 1px !important; right: 0px !important; outline: 0px !important; text-shadow: initial !important; background-position: 0px 0px !important; background-repeat: initial initial !important; }
.md-inline-math .MathJax_SVG .noError { display: none !important; }
.html-for-mac .inline-math-svg .MathJax_SVG { vertical-align: 0.2px; }
.md-math-block .MathJax_SVG_Display { text-align: center; margin: 0px; position: relative; text-indent: 0px; max-width: none; max-height: none; min-height: 0px; min-width: 100%; width: auto; overflow-y: hidden; display: block !important; }
.MathJax_SVG_Display, .md-inline-math .MathJax_SVG_Display { width: auto; margin: inherit; display: inline-block !important; }
.MathJax_SVG .MJX-monospace { font-family: var(--monospace); }
.MathJax_SVG .MJX-sans-serif { font-family: sans-serif; }
.MathJax_SVG { display: inline; font-style: normal; font-weight: 400; line-height: normal; zoom: 90%; text-indent: 0px; text-align: left; text-transform: none; letter-spacing: normal; word-spacing: normal; word-wrap: normal; white-space: nowrap; float: none; direction: ltr; max-width: none; max-height: none; min-width: 0px; min-height: 0px; border: 0px; padding: 0px; margin: 0px; }
.MathJax_SVG * { transition: none; }
.MathJax_SVG_Display svg { vertical-align: middle !important; margin-bottom: 0px !important; }
.os-windows.monocolor-emoji .md-emoji { font-family: &quot;Segoe UI Symbol&quot;, sans-serif; }
.md-diagram-panel &gt; svg { max-width: 100%; }
[lang=&quot;mermaid&quot;] svg, [lang=&quot;flow&quot;] svg { max-width: 100%; }
[lang=&quot;mermaid&quot;] .node text { font-size: 1rem; }
table tr th { border-bottom-width: 0px; }
video { max-width: 100%; display: block; margin: 0px auto; }
iframe { max-width: 100%; width: 100%; border: none; }
.highlight td, .highlight tr { border: 0px; }


.CodeMirror { height: auto; }
.CodeMirror.cm-s-inner { background-image: inherit; background-size: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: inherit; background-position: inherit inherit; background-repeat: inherit inherit; }
.CodeMirror-scroll { overflow-y: hidden; overflow-x: auto; z-index: 3; }
.CodeMirror-gutter-filler, .CodeMirror-scrollbar-filler { background-color: rgb(255, 255, 255); }
.CodeMirror-gutters { border-right-width: 1px; border-right-style: solid; border-right-color: rgb(221, 221, 221); background-image: inherit; background-size: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: inherit; white-space: nowrap; background-position: inherit inherit; background-repeat: inherit inherit; }
.CodeMirror-linenumber { padding: 0px 3px 0px 5px; text-align: right; color: rgb(153, 153, 153); }
.cm-s-inner .cm-keyword { color: rgb(119, 0, 136); }
.cm-s-inner .cm-atom, .cm-s-inner.cm-atom { color: rgb(34, 17, 153); }
.cm-s-inner .cm-number { color: rgb(17, 102, 68); }
.cm-s-inner .cm-def { color: rgb(0, 0, 255); }
.cm-s-inner .cm-variable { color: rgb(0, 0, 0); }
.cm-s-inner .cm-variable-2 { color: rgb(0, 85, 170); }
.cm-s-inner .cm-variable-3 { color: rgb(0, 136, 85); }
.cm-s-inner .cm-string { color: rgb(170, 17, 17); }
.cm-s-inner .cm-property { color: rgb(0, 0, 0); }
.cm-s-inner .cm-operator { color: rgb(152, 26, 26); }
.cm-s-inner .cm-comment, .cm-s-inner.cm-comment { color: rgb(170, 85, 0); }
.cm-s-inner .cm-string-2 { color: rgb(255, 85, 0); }
.cm-s-inner .cm-meta { color: rgb(85, 85, 85); }
.cm-s-inner .cm-qualifier { color: rgb(85, 85, 85); }
.cm-s-inner .cm-builtin { color: rgb(51, 0, 170); }
.cm-s-inner .cm-bracket { color: rgb(153, 153, 119); }
.cm-s-inner .cm-tag { color: rgb(17, 119, 0); }
.cm-s-inner .cm-attribute { color: rgb(0, 0, 204); }
.cm-s-inner .cm-header, .cm-s-inner.cm-header { color: rgb(0, 0, 255); }
.cm-s-inner .cm-quote, .cm-s-inner.cm-quote { color: rgb(0, 153, 0); }
.cm-s-inner .cm-hr, .cm-s-inner.cm-hr { color: rgb(153, 153, 153); }
.cm-s-inner .cm-link, .cm-s-inner.cm-link { color: rgb(0, 0, 204); }
.cm-negative { color: rgb(221, 68, 68); }
.cm-positive { color: rgb(34, 153, 34); }
.cm-header, .cm-strong { font-weight: 700; }
.cm-del { text-decoration: line-through; }
.cm-em { font-style: italic; }
.cm-link { text-decoration: underline; }
.cm-error { color: red; }
.cm-invalidchar { color: red; }
.cm-constant { color: rgb(38, 139, 210); }
.cm-defined { color: rgb(181, 137, 0); }
div.CodeMirror span.CodeMirror-matchingbracket { color: rgb(0, 255, 0); }
div.CodeMirror span.CodeMirror-nonmatchingbracket { color: rgb(255, 34, 34); }
.cm-s-inner .CodeMirror-activeline-background { background-image: inherit; background-size: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: inherit; background-position: inherit inherit; background-repeat: inherit inherit; }
.CodeMirror { position: relative; overflow: hidden; }
.CodeMirror-scroll { height: 100%; outline: 0px; position: relative; box-sizing: content-box; background-image: inherit; background-size: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: inherit; background-position: inherit inherit; background-repeat: inherit inherit; }
.CodeMirror-sizer { position: relative; }
.CodeMirror-gutter-filler, .CodeMirror-hscrollbar, .CodeMirror-scrollbar-filler, .CodeMirror-vscrollbar { position: absolute; z-index: 6; display: none; }
.CodeMirror-vscrollbar { right: 0px; top: 0px; overflow: hidden; }
.CodeMirror-hscrollbar { bottom: 0px; left: 0px; overflow: hidden; }
.CodeMirror-scrollbar-filler { right: 0px; bottom: 0px; }
.CodeMirror-gutter-filler { left: 0px; bottom: 0px; }
.CodeMirror-gutters { position: absolute; left: 0px; top: 0px; padding-bottom: 30px; z-index: 3; }
.CodeMirror-gutter { white-space: normal; height: 100%; box-sizing: content-box; padding-bottom: 30px; margin-bottom: -32px; display: inline-block; }
.CodeMirror-gutter-wrapper { position: absolute; z-index: 4; border: none !important; background-position: 0px 0px !important; background-repeat: initial initial !important; }
.CodeMirror-gutter-background { position: absolute; top: 0px; bottom: 0px; z-index: 4; }
.CodeMirror-gutter-elt { position: absolute; cursor: default; z-index: 4; }
.CodeMirror-lines { cursor: text; }
.CodeMirror pre { border-top-left-radius: 0px; border-top-right-radius: 0px; border-bottom-right-radius: 0px; border-bottom-left-radius: 0px; border-width: 0px; font-family: inherit; font-size: inherit; margin: 0px; white-space: pre; word-wrap: normal; color: inherit; z-index: 2; position: relative; overflow: visible; background-position: 0px 0px; background-repeat: initial initial; }
.CodeMirror-wrap pre { word-wrap: break-word; white-space: pre-wrap; word-break: normal; }
.CodeMirror-code pre { border-right-width: 30px; border-right-style: solid; border-right-color: transparent; width: fit-content; }
.CodeMirror-wrap .CodeMirror-code pre { border-right-style: none; width: auto; }
.CodeMirror-linebackground { position: absolute; left: 0px; right: 0px; top: 0px; bottom: 0px; z-index: 0; }
.CodeMirror-linewidget { position: relative; z-index: 2; overflow: auto; }
.CodeMirror-wrap .CodeMirror-scroll { overflow-x: hidden; }
.CodeMirror-measure { position: absolute; width: 100%; height: 0px; overflow: hidden; visibility: hidden; }
.CodeMirror-measure pre { position: static; }
.CodeMirror div.CodeMirror-cursor { position: absolute; visibility: hidden; border-right-style: none; width: 0px; }
.CodeMirror div.CodeMirror-cursor { visibility: hidden; }
.CodeMirror-focused div.CodeMirror-cursor { visibility: inherit; }
.cm-searching { background-color: rgba(255, 255, 0, 0.4); background-position: initial initial; background-repeat: initial initial; }
@media print {
  .CodeMirror div.CodeMirror-cursor { visibility: hidden; }
}


:root {
    --side-bar-bg-color: #fafafa;
    --control-text-color: #777;
}

@include-when-export url(https://fonts.loli.net/css?family=Open+Sans:400italic,700italic,700,400&amp;subset=latin,latin-ext);

html {
    font-size: 16px;
}

body {
    font-family: &quot;Open Sans&quot;,&quot;Clear Sans&quot;,&quot;Helvetica Neue&quot;,Helvetica,Arial,sans-serif;
    color: rgb(51, 51, 51);
    line-height: 1.6;
}

#write {
    max-width: 860px;
  	margin: 0 auto;
  	padding: 30px;
    padding-bottom: 100px;
}
#write &gt; ul:first-child,
#write &gt; ol:first-child{
    margin-top: 30px;
}

a {
    color: #4183C4;
}
h1,
h2,
h3,
h4,
h5,
h6 {
    position: relative;
    margin-top: 1rem;
    margin-bottom: 1rem;
    font-weight: bold;
    line-height: 1.4;
    cursor: text;
}
h1:hover a.anchor,
h2:hover a.anchor,
h3:hover a.anchor,
h4:hover a.anchor,
h5:hover a.anchor,
h6:hover a.anchor {
    text-decoration: none;
}
h1 tt,
h1 code {
    font-size: inherit;
}
h2 tt,
h2 code {
    font-size: inherit;
}
h3 tt,
h3 code {
    font-size: inherit;
}
h4 tt,
h4 code {
    font-size: inherit;
}
h5 tt,
h5 code {
    font-size: inherit;
}
h6 tt,
h6 code {
    font-size: inherit;
}
h1 {
    padding-bottom: .3em;
    font-size: 2.25em;
    line-height: 1.2;
    border-bottom: 1px solid #eee;
}
h2 {
   padding-bottom: .3em;
    font-size: 1.75em;
    line-height: 1.225;
    border-bottom: 1px solid #eee;
}
h3 {
    font-size: 1.5em;
    line-height: 1.43;
}
h4 {
    font-size: 1.25em;
}
h5 {
    font-size: 1em;
}
h6 {
   font-size: 1em;
    color: #777;
}
p,
blockquote,
ul,
ol,
dl,
table{
    margin: 0.8em 0;
}
li&gt;ol,
li&gt;ul {
    margin: 0 0;
}
hr {
    height: 2px;
    padding: 0;
    margin: 16px 0;
    background-color: #e7e7e7;
    border: 0 none;
    overflow: hidden;
    box-sizing: content-box;
}

li p.first {
    display: inline-block;
}
ul,
ol {
    padding-left: 30px;
}
ul:first-child,
ol:first-child {
    margin-top: 0;
}
ul:last-child,
ol:last-child {
    margin-bottom: 0;
}
blockquote {
    border-left: 4px solid #dfe2e5;
    padding: 0 15px;
    color: #777777;
}
blockquote blockquote {
    padding-right: 0;
}
table {
    padding: 0;
    word-break: initial;
}
table tr {
    border-top: 1px solid #dfe2e5;
    margin: 0;
    padding: 0;
}
table tr:nth-child(2n),
thead {
    background-color: #f8f8f8;
}
table tr th {
    font-weight: bold;
    border: 1px solid #dfe2e5;
    border-bottom: 0;
    text-align: left;
    margin: 0;
    padding: 6px 13px;
}
table tr td {
    border: 1px solid #dfe2e5;
    text-align: left;
    margin: 0;
    padding: 6px 13px;
}
table tr th:first-child,
table tr td:first-child {
    margin-top: 0;
}
table tr th:last-child,
table tr td:last-child {
    margin-bottom: 0;
}

.CodeMirror-lines {
    padding-left: 4px;
}

.code-tooltip {
    box-shadow: 0 1px 1px 0 rgba(0,28,36,.3);
    border-top: 1px solid #eef2f2;
}

.md-fences,
code,
tt {
    border: 1px solid #e7eaed;
    background-color: #f8f8f8;
    border-radius: 3px;
    padding: 0;
    padding: 2px 4px 0px 4px;
    font-size: 0.9em;
}

code {
    background-color: #f3f4f4;
    padding: 0 2px 0 2px;
}

.md-fences {
    margin-bottom: 15px;
    margin-top: 15px;
    padding-top: 8px;
    padding-bottom: 6px;
}


.md-task-list-item &gt; input {
  margin-left: -1.3em;
}

@media print {
    html {
        font-size: 13px;
    }
    table,
    pre {
        page-break-inside: avoid;
    }
    pre {
        word-wrap: break-word;
    }
}

.md-fences {
	background-color: #f8f8f8;
}
#write pre.md-meta-block {
	padding: 1rem;
    font-size: 85%;
    line-height: 1.45;
    background-color: #f7f7f7;
    border: 0;
    border-radius: 3px;
    color: #777777;
    margin-top: 0 !important;
}

.mathjax-block&gt;.code-tooltip {
	bottom: .375rem;
}

.md-mathjax-midline {
    background: #fafafa;
}

#write&gt;h3.md-focus:before{
	left: -1.5625rem;
	top: .375rem;
}
#write&gt;h4.md-focus:before{
	left: -1.5625rem;
	top: .285714286rem;
}
#write&gt;h5.md-focus:before{
	left: -1.5625rem;
	top: .285714286rem;
}
#write&gt;h6.md-focus:before{
	left: -1.5625rem;
	top: .285714286rem;
}
.md-image&gt;.md-meta {
    /*border: 1px solid #ddd;*/
    border-radius: 3px;
    padding: 2px 0px 0px 4px;
    font-size: 0.9em;
    color: inherit;
}

.md-tag {
    color: #a7a7a7;
    opacity: 1;
}

.md-toc {
    margin-top:20px;
    padding-bottom:20px;
}

.sidebar-tabs {
    border-bottom: none;
}

#typora-quick-open {
    border: 1px solid #ddd;
    background-color: #f8f8f8;
}

#typora-quick-open-item {
    background-color: #FAFAFA;
    border-color: #FEFEFE #e5e5e5 #e5e5e5 #eee;
    border-style: solid;
    border-width: 1px;
}

/** focus mode */
.on-focus-mode blockquote {
    border-left-color: rgba(85, 85, 85, 0.12);
}

header, .context-menu, .megamenu-content, footer{
    font-family: &quot;Segoe UI&quot;, &quot;Arial&quot;, sans-serif;
}

.file-node-content:hover .file-node-icon,
.file-node-content:hover .file-node-open-state{
    visibility: visible;
}

.mac-seamless-mode #typora-sidebar {
    background-color: #fafafa;
    background-color: var(--side-bar-bg-color);
}

.md-lang {
    color: #b4654d;
}

.html-for-mac .context-menu {
    --item-hover-bg-color: #E6F0FE;
}

#md-notification .btn {
    border: 0;
}

.dropdown-menu .divider {
    border-color: #e5e5e5;
}

 .typora-export li, .typora-export p, .typora-export,  .footnote-line {white-space: normal;}
&lt;/style&gt;
&lt;/head&gt;
&lt;body class='typora-export' &gt;
&lt;div  id='write'  class = 'is-mac'&gt;&lt;h3&gt;&lt;a name='header-n0' class='md-header-anchor '&gt;&lt;/a&gt;&lt;strong&gt;Flutter Zone이란? 종료되지 않게 예외처리 하기.&lt;/strong&gt;&lt;/h3&gt;&lt;ul&gt;&lt;li&gt;Zone이란?&lt;/li&gt;&lt;li&gt;try ~ catch와의 차이점&lt;/li&gt;&lt;li&gt;Zone 예제&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;플러터 플러그인을 쓰다보면&lt;/p&gt;&lt;p&gt;runZone()를 쓰는 경우가 종종 있습니다. &lt;/p&gt;&lt;p&gt;주로 아래처럼 쓰입니다.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;code&gt;flutter_crashlytics&lt;/code&gt; &lt;strong&gt;&lt;em&gt;플러그인&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;dart&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;dart&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;span&gt;&lt;span&gt;​&lt;/span&gt;x&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;main&lt;/span&gt;() &lt;span class=&quot;cm-keyword&quot;&gt;async&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;await&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;FlutterCrashlytics&lt;/span&gt;().&lt;span class=&quot;cm-variable&quot;&gt;initialize&lt;/span&gt;();&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;runZoned&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-variable&quot;&gt;Future&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-variable&quot;&gt;Null&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt;(() &lt;span class=&quot;cm-keyword&quot;&gt;async&lt;/span&gt; { &lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;runApp&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;MyApp&lt;/span&gt;());&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  }, &lt;span class=&quot;cm-variable&quot;&gt;onError&lt;/span&gt;: (&lt;span class=&quot;cm-variable&quot;&gt;error&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;stackTrace&lt;/span&gt;) &lt;span class=&quot;cm-keyword&quot;&gt;async&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;await&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;FlutterCrashlytics&lt;/span&gt;().&lt;span class=&quot;cm-variable&quot;&gt;reportCrash&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;error&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;stackTrace&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;forceCrash&lt;/span&gt;: &lt;span class=&quot;cm-atom&quot;&gt;false&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  });&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 220px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 220px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;저도 처음에는 별 생각없이 적용했는데 점점 zone이 무엇인가 궁금해지더군요.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;그래서 찾아봤습니다.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h4&gt;&lt;a name='header-n21' class='md-header-anchor '&gt;&lt;/a&gt;&lt;strong&gt;1. Zone이란?&lt;/strong&gt;&lt;/h4&gt;&lt;p&gt;zone은 프로그램이 예상치 못한 에러로부터 종료하는 걸 막을 때 쓰입니다. 일반적인 상황이면 프로그램이 종료되는 경우더라도 zone(존)을 쓰면 잘 돌아가게 되는 거죠.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h5&gt;&lt;a name='header-n24' class='md-header-anchor '&gt;&lt;/a&gt;1.1 try ~ catch를 사용한 경우&lt;/h5&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;dart&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;dart&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;main&lt;/span&gt;() {&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;try&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;Timer&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;run&lt;/span&gt;(() {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;throw&lt;/span&gt; &lt;span class=&quot;cm-string&quot;&gt;'throw error'&lt;/span&gt;; &lt;span class=&quot;cm-comment&quot;&gt;// 명시적으로 throw를 사용. 일반적이면 무조건 에러 발생.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  });&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  } &lt;span class=&quot;cm-keyword&quot;&gt;catch&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;e&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;e&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 220px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 220px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;에러가 생기고 프로그램이 중단됩니다. &lt;/p&gt;&lt;p&gt;하지만 Zone을 쓰면 계속 프로그램이 실행됩니다.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h5&gt;&lt;a name='header-n30' class='md-header-anchor '&gt;&lt;/a&gt;1.2 Zone을 사용한 경우&lt;/h5&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;dart&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;dart&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;main&lt;/span&gt;() {&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;runZoned&lt;/span&gt;(() {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;Timer&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;run&lt;/span&gt;(() {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;throw&lt;/span&gt; &lt;span class=&quot;cm-string&quot;&gt;'do not kill the program'&lt;/span&gt;; &lt;span class=&quot;cm-comment&quot;&gt;// Zone을 썼기에 프로그램이 죽지 않습니다.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  });&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  }, &lt;span class=&quot;cm-variable&quot;&gt;onError&lt;/span&gt;: (&lt;span class=&quot;cm-variable&quot;&gt;e&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;'Uncaught error &lt;/span&gt;${&lt;span class=&quot;cm-variable&quot;&gt;e&lt;/span&gt;}&lt;span class=&quot;cm-string&quot;&gt;'&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  });&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 286px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 286px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;명시적으로 Throw을 날렸지만 프로그램이 멀쩡히 돌아갑니다! &lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Zone은 실행되는 공간을 나눠서, 그 공간 안에 있는 한 안전하게 프로그램이 돌아가도록 합니다. &lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;크래시리틱스에서 runZone()을 쓴 건 정말 당연했네요. 크래시가 발생하더라도 이를 남기려면 프로그램이 종료되면 안되니까요.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Zone을 쓰는 예제를 몇개 더 적어보겠습니다.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;2.1 Stream이랑 Zone 같이 써보기 - 1&lt;/strong&gt;&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;dart&quot; style=&quot;page-break-inside: unset;&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;dart&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;main&lt;/span&gt;() {&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;stream&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;File&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;'data.text'&lt;/span&gt;).&lt;span class=&quot;cm-variable&quot;&gt;openRead&lt;/span&gt;()&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;  .&lt;span class=&quot;cm-variable&quot;&gt;map&lt;/span&gt;((&lt;span class=&quot;cm-variable&quot;&gt;x&lt;/span&gt;) &lt;span class=&quot;cm-operator&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;throw&lt;/span&gt; &lt;span class=&quot;cm-string&quot;&gt;'Callback throws'&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;stream&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;listen&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;print&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;runZoned&lt;/span&gt;(() {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;cm-variable&quot;&gt;stream&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;listen&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;print&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  }, &lt;span class=&quot;cm-variable&quot;&gt;onError&lt;/span&gt;: (&lt;span class=&quot;cm-variable&quot;&gt;e&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;cm-variable&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;'Caught error: &lt;/span&gt;$&lt;span class=&quot;cm-variable&quot;&gt;e&lt;/span&gt;&lt;span class=&quot;cm-string&quot;&gt;'&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  });&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 330px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 330px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;2.2 Stream이랑 Zone 같이 써보기 - 2&lt;/strong&gt;  &lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;dart&quot; style=&quot;page-break-inside: unset;&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;dart&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;main&lt;/span&gt;() &lt;span class=&quot;cm-keyword&quot;&gt;async&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;runZoned&lt;/span&gt;(() {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;countNumber&lt;/span&gt;();&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  }, &lt;span class=&quot;cm-variable&quot;&gt;onError&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;print&lt;/span&gt; );&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;Future&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;countNumber&lt;/span&gt;() &lt;span class=&quot;cm-keyword&quot;&gt;async&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;await&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;for&lt;/span&gt; ( &lt;span class=&quot;cm-builtin&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;cm-builtin&quot;&gt;num&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;numbers&lt;/span&gt;()) {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;'Num : &lt;/span&gt;$&lt;span class=&quot;cm-variable&quot;&gt;num&lt;/span&gt;&lt;span class=&quot;cm-string&quot;&gt;'&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;if&lt;/span&gt; (&lt;span class=&quot;cm-builtin&quot;&gt;num&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;10&lt;/span&gt;) &lt;span class=&quot;cm-keyword&quot;&gt;throw&lt;/span&gt; (&lt;span class=&quot;cm-string&quot;&gt;'error : &lt;/span&gt;$&lt;span class=&quot;cm-variable&quot;&gt;num&lt;/span&gt;&lt;span class=&quot;cm-string&quot;&gt;'&lt;/span&gt;); &lt;span class=&quot;cm-comment&quot;&gt;// 에러 일부러 발생시킴&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;Stream&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-builtin&quot;&gt;int&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;numbers&lt;/span&gt;() &lt;span class=&quot;cm-keyword&quot;&gt;async&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;*&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;duration&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;Duration&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;milliseconds&lt;/span&gt;: &lt;span class=&quot;cm-number&quot;&gt;30&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;for&lt;/span&gt; (&lt;span class=&quot;cm-builtin&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;x&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;0&lt;/span&gt;; &lt;span class=&quot;cm-variable&quot;&gt;x&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;100&lt;/span&gt;; &lt;span class=&quot;cm-variable&quot;&gt;x&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;++&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;await&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;Future&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;delayed&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;duration&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;yield&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;x&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 506px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 506px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;숫자 11때 에러가 생기지만 프로그램이 강제적으로 종료되지 않습니다.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;마무리&lt;/strong&gt; &lt;/p&gt;&lt;p&gt;이번 글에선 Zone에 대해 알아보았습니다. &lt;/p&gt;&lt;p&gt;Zone을 쓰면 종료 되지 않아야 되는 상황을 다루기가 쉬워집니다. &lt;/p&gt;&lt;p&gt;무작정 runZone()에 넣는 건 안 좋은 습관이지만, Zone을 쓰면 예측하기 어려운 상황을 다룰 때 도움이 되겠네요.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;참고글 : Zone에 관하여 (&lt;a href='https://www.dartlang.org/articles/libraries/zones' target='_blank' class='url'&gt;https://www.dartlang.org/articles/libraries/zones&lt;/a&gt;)&lt;/p&gt;&lt;p&gt;참고영상 : Tensor Programming채널의 Zone, Microtask ( &lt;a href='https://www.youtube.com/watch?time_continue=1083&amp;v=pHpvfaanrbw' target='_blank' class='url'&gt;https://www.youtube.com/watch?time_continue=1083&amp;v=pHpvfaanrbw&lt;/a&gt; )&lt;/p&gt;&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;</description>
      <category>플러터(Flutter)</category>
      <category>flutter error</category>
      <category>flutter runzone</category>
      <category>flutter try catch</category>
      <category>flutter zone</category>
      <category>플러터</category>
      <category>플러터 에러처리</category>
      <category>플러터 트라이캐치</category>
      <category>플러터존</category>
      <author>에드 신</author>
      <guid isPermaLink="true">https://software-creator.tistory.com/19</guid>
      <comments>https://software-creator.tistory.com/19#entry19comment</comments>
      <pubDate>Mon, 15 Apr 2019 18:17:47 +0900</pubDate>
    </item>
    <item>
      <title>파이썬 기초 문법 정리</title>
      <link>https://software-creator.tistory.com/18</link>
      <description>&lt;!doctype html&gt;
&lt;html&gt;
&lt;head&gt;
&lt;meta charset='UTF-8'&gt;
&lt;meta name='viewport' content='width=device-width initial-scale=1'&gt;
&lt;meta name=&quot;description&quot; content=&quot;크롤링이나 데이터 분석을 위한 간단한 파이썬 문법입니다.&quot;/&gt;
&lt;title&gt;파이썬 기초 문법 정리&lt;/title&gt;&lt;link href='https://fonts.loli.net/css?family=Open+Sans:400italic,700italic,700,400&amp;subset=latin,latin-ext' rel='stylesheet' type='text/css' /&gt;&lt;style type='text/css'&gt;html {overflow-x: initial !important;}:root { --bg-color: #ffffff; --text-color: #333333; --select-text-bg-color: #B5D6FC; --select-text-font-color: auto; --monospace: &quot;Lucida Console&quot;,Consolas,&quot;Courier&quot;,monospace; }
html { font-size: 14px; background-color: var(--bg-color); color: var(--text-color); font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; -webkit-font-smoothing: antialiased; }
body { margin: 0px; padding: 0px; height: auto; bottom: 0px; top: 0px; left: 0px; right: 0px; font-size: 1rem; line-height: 1.42857143; overflow-x: hidden; background-image: inherit; background-size: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: inherit; background-position: inherit inherit; background-repeat: inherit inherit; }
iframe { margin: auto; }
a.url { word-break: break-all; }
a:active, a:hover { outline: 0px; }
.in-text-selection, ::selection { text-shadow: none; background: var(--select-text-bg-color); color: var(--select-text-font-color); }
#write { margin: 0px auto; height: auto; width: inherit; word-break: normal; word-wrap: break-word; position: relative; white-space: normal; overflow-x: visible; padding-top: 40px; }
#write.first-line-indent p { text-indent: 2em; }
#write.first-line-indent li p, #write.first-line-indent p * { text-indent: 0px; }
#write.first-line-indent li { margin-left: 2em; }
.for-image #write { padding-left: 8px; padding-right: 8px; }
body.typora-export { padding-left: 30px; padding-right: 30px; }
.typora-export .footnote-line, .typora-export li, .typora-export p { white-space: pre-wrap; }
@media screen and (max-width: 500px) {
  body.typora-export { padding-left: 0px; padding-right: 0px; }
  #write { padding-left: 20px; padding-right: 20px; }
  .CodeMirror-sizer { margin-left: 0px !important; }
  .CodeMirror-gutters { display: none !important; }
}
#write li &gt; figure:first-child { margin-top: -20px; }
#write ol, #write ul { position: relative; }
img { max-width: 100%; vertical-align: middle; }
button, input, select, textarea { color: inherit; font-family: inherit; font-size: inherit; font-style: inherit; font-variant-caps: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; }
input[type=&quot;checkbox&quot;], input[type=&quot;radio&quot;] { line-height: normal; padding: 0px; }
*, ::after, ::before { box-sizing: border-box; }
#write h1, #write h2, #write h3, #write h4, #write h5, #write h6, #write p, #write pre { width: inherit; }
#write h1, #write h2, #write h3, #write h4, #write h5, #write h6, #write p { position: relative; }
h1, h2, h3, h4, h5, h6 { break-after: avoid-page; break-inside: avoid; orphans: 2; }
p { orphans: 4; }
h1 { font-size: 2rem; }
h2 { font-size: 1.8rem; }
h3 { font-size: 1.6rem; }
h4 { font-size: 1.4rem; }
h5 { font-size: 1.2rem; }
h6 { font-size: 1rem; }
.md-math-block, .md-rawblock, h1, h2, h3, h4, h5, h6, p { margin-top: 1rem; margin-bottom: 1rem; }
.hidden { display: none; }
.md-blockmeta { color: rgb(204, 204, 204); font-weight: 700; font-style: italic; }
a { cursor: pointer; }
sup.md-footnote { padding: 2px 4px; background-color: rgba(238, 238, 238, 0.701961); color: rgb(85, 85, 85); border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; cursor: pointer; }
sup.md-footnote a, sup.md-footnote a:hover { color: inherit; text-transform: inherit; text-decoration: inherit; }
#write input[type=&quot;checkbox&quot;] { cursor: pointer; width: inherit; height: inherit; }
figure { overflow-x: auto; margin: 1.2em 0px; max-width: calc(100% + 16px); padding: 0px; }
figure &gt; table { margin: 0px !important; }
tr { break-inside: avoid; break-after: auto; }
thead { display: table-header-group; }
table { border-collapse: collapse; border-spacing: 0px; width: 100%; overflow: auto; break-inside: auto; text-align: left; }
table.md-table td { min-width: 32px; }
.CodeMirror-gutters { border-right-width: 0px; background-color: inherit; }
.CodeMirror { text-align: left; }
.CodeMirror-placeholder { opacity: 0.3; }
.CodeMirror pre { padding: 0px 4px; }
.CodeMirror-lines { padding: 0px; }
div.hr:focus { cursor: none; }
#write pre { white-space: pre-wrap; }
#write.fences-no-line-wrapping pre { white-space: pre; }
#write pre.ty-contain-cm { white-space: normal; }
.CodeMirror-gutters { margin-right: 4px; }
.md-fences { font-size: 0.9rem; display: block; break-inside: avoid; text-align: left; overflow: visible; white-space: pre; background-image: inherit; background-size: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: inherit; position: relative !important; background-position: inherit inherit; background-repeat: inherit inherit; }
.md-diagram-panel { width: 100%; margin-top: 10px; text-align: center; padding-top: 0px; padding-bottom: 8px; overflow-x: auto; }
#write .md-fences.mock-cm { white-space: pre-wrap; }
.md-fences.md-fences-with-lineno { padding-left: 0px; }
#write.fences-no-line-wrapping .md-fences.mock-cm { white-space: pre; overflow-x: auto; }
.md-fences.mock-cm.md-fences-with-lineno { padding-left: 8px; }
.CodeMirror-line, twitterwidget { break-inside: avoid; }
.footnotes { opacity: 0.8; font-size: 0.9rem; margin-top: 1em; margin-bottom: 1em; }
.footnotes + .footnotes { margin-top: 0px; }
.md-reset { margin: 0px; padding: 0px; border: 0px; outline: 0px; vertical-align: top; text-decoration: none; text-shadow: none; float: none; position: static; width: auto; height: auto; white-space: nowrap; cursor: inherit; line-height: normal; font-weight: 400; text-align: left; box-sizing: content-box; direction: ltr; background-position: 0px 0px; background-repeat: initial initial; }
li div { padding-top: 0px; }
blockquote { margin: 1rem 0px; }
li .mathjax-block, li p { margin: 0.5rem 0px; }
li { margin: 0px; position: relative; }
blockquote &gt; :last-child { margin-bottom: 0px; }
blockquote &gt; :first-child, li &gt; :first-child { margin-top: 0px; }
.footnotes-area { color: rgb(136, 136, 136); margin-top: 0.714rem; padding-bottom: 0.143rem; white-space: normal; }
#write .footnote-line { white-space: pre-wrap; }
@media print {
  body, html { border: 1px solid transparent; height: 99%; break-after: avoid-page; break-before: avoid-page; }
  #write { margin-top: 0px; padding-top: 0px; border-color: transparent !important; }
  .typora-export * { -webkit-print-color-adjust: exact; }
  html.blink-to-pdf { font-size: 13px; }
  .typora-export #write { padding-left: 32px; padding-right: 32px; padding-bottom: 0px; break-after: avoid-page; }
  .typora-export #write::after { height: 0px; }
  @page { margin: 20mm 0px; }
}
.footnote-line { margin-top: 0.714em; font-size: 0.7em; }
a img, img a { cursor: pointer; }
pre.md-meta-block { font-size: 0.8rem; min-height: 0.8rem; white-space: pre-wrap; background-color: rgb(204, 204, 204); display: block; overflow-x: hidden; background-position: initial initial; background-repeat: initial initial; }
p &gt; .md-image:only-child:not(.md-img-error) img, p &gt; img:only-child { display: block; margin: auto; }
p &gt; .md-image:only-child { display: inline-block; width: 100%; }
#write .MathJax_Display { margin: 0.8em 0px 0px; }
.md-math-block { width: 100%; }
.md-math-block:not(:empty)::after { display: none; }
[contenteditable=&quot;true&quot;]:active, [contenteditable=&quot;true&quot;]:focus { outline: 0px; box-shadow: none; }
.md-task-list-item { position: relative; list-style-type: none; }
.task-list-item.md-task-list-item { padding-left: 0px; }
.md-task-list-item &gt; input { position: absolute; top: 0px; left: 0px; margin-left: -1.2em; margin-top: calc(1em - 10px); border: none; }
.math { font-size: 1rem; }
.md-toc { min-height: 3.58rem; position: relative; font-size: 0.9rem; border-top-left-radius: 10px; border-top-right-radius: 10px; border-bottom-right-radius: 10px; border-bottom-left-radius: 10px; }
.md-toc-content { position: relative; margin-left: 0px; }
.md-toc-content::after, .md-toc::after { display: none; }
.md-toc-item { display: block; color: rgb(65, 131, 196); }
.md-toc-item a { text-decoration: none; }
.md-toc-inner:hover { text-decoration: underline; }
.md-toc-inner { display: inline-block; cursor: pointer; }
.md-toc-h1 .md-toc-inner { margin-left: 0px; font-weight: 700; }
.md-toc-h2 .md-toc-inner { margin-left: 2em; }
.md-toc-h3 .md-toc-inner { margin-left: 4em; }
.md-toc-h4 .md-toc-inner { margin-left: 6em; }
.md-toc-h5 .md-toc-inner { margin-left: 8em; }
.md-toc-h6 .md-toc-inner { margin-left: 10em; }
@media screen and (max-width: 48em) {
  .md-toc-h3 .md-toc-inner { margin-left: 3.5em; }
  .md-toc-h4 .md-toc-inner { margin-left: 5em; }
  .md-toc-h5 .md-toc-inner { margin-left: 6.5em; }
  .md-toc-h6 .md-toc-inner { margin-left: 8em; }
}
a.md-toc-inner { font-size: inherit; font-style: inherit; font-weight: inherit; line-height: inherit; }
.footnote-line a:not(.reversefootnote) { color: inherit; }
.md-attr { display: none; }
.md-fn-count::after { content: &quot;.&quot;; }
code, pre, samp, tt { font-family: var(--monospace); }
kbd { margin: 0px 0.1em; padding: 0.1em 0.6em; font-size: 0.8em; color: rgb(36, 39, 41); background-color: rgb(255, 255, 255); border: 1px solid rgb(173, 179, 185); border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; box-shadow: rgba(12, 13, 14, 0.2) 0px 1px 0px, rgb(255, 255, 255) 0px 0px 0px 2px inset; white-space: nowrap; vertical-align: middle; background-position: initial initial; background-repeat: initial initial; }
.md-comment { color: rgb(162, 127, 3); opacity: 0.8; font-family: var(--monospace); }
code { text-align: left; }
a.md-print-anchor { white-space: pre !important; border: none !important; display: inline-block !important; position: absolute !important; width: 1px !important; right: 0px !important; outline: 0px !important; text-shadow: initial !important; background-position: 0px 0px !important; background-repeat: initial initial !important; }
.md-inline-math .MathJax_SVG .noError { display: none !important; }
.html-for-mac .inline-math-svg .MathJax_SVG { vertical-align: 0.2px; }
.md-math-block .MathJax_SVG_Display { text-align: center; margin: 0px; position: relative; text-indent: 0px; max-width: none; max-height: none; min-height: 0px; min-width: 100%; width: auto; overflow-y: hidden; display: block !important; }
.MathJax_SVG_Display, .md-inline-math .MathJax_SVG_Display { width: auto; margin: inherit; display: inline-block !important; }
.MathJax_SVG .MJX-monospace { font-family: var(--monospace); }
.MathJax_SVG .MJX-sans-serif { font-family: sans-serif; }
.MathJax_SVG { display: inline; font-style: normal; font-weight: 400; line-height: normal; zoom: 90%; text-indent: 0px; text-align: left; text-transform: none; letter-spacing: normal; word-spacing: normal; word-wrap: normal; white-space: nowrap; float: none; direction: ltr; max-width: none; max-height: none; min-width: 0px; min-height: 0px; border: 0px; padding: 0px; margin: 0px; }
.MathJax_SVG * { transition: none; }
.MathJax_SVG_Display svg { vertical-align: middle !important; margin-bottom: 0px !important; }
.os-windows.monocolor-emoji .md-emoji { font-family: &quot;Segoe UI Symbol&quot;, sans-serif; }
.md-diagram-panel &gt; svg { max-width: 100%; }
[lang=&quot;mermaid&quot;] svg, [lang=&quot;flow&quot;] svg { max-width: 100%; }
[lang=&quot;mermaid&quot;] .node text { font-size: 1rem; }
table tr th { border-bottom-width: 0px; }
video { max-width: 100%; display: block; margin: 0px auto; }
iframe { max-width: 100%; width: 100%; border: none; }
.highlight td, .highlight tr { border: 0px; }


.CodeMirror { height: auto; }
.CodeMirror.cm-s-inner { background-image: inherit; background-size: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: inherit; background-position: inherit inherit; background-repeat: inherit inherit; }
.CodeMirror-scroll { overflow-y: hidden; overflow-x: auto; z-index: 3; }
.CodeMirror-gutter-filler, .CodeMirror-scrollbar-filler { background-color: rgb(255, 255, 255); }
.CodeMirror-gutters { border-right-width: 1px; border-right-style: solid; border-right-color: rgb(221, 221, 221); background-image: inherit; background-size: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: inherit; white-space: nowrap; background-position: inherit inherit; background-repeat: inherit inherit; }
.CodeMirror-linenumber { padding: 0px 3px 0px 5px; text-align: right; color: rgb(153, 153, 153); }
.cm-s-inner .cm-keyword { color: rgb(119, 0, 136); }
.cm-s-inner .cm-atom, .cm-s-inner.cm-atom { color: rgb(34, 17, 153); }
.cm-s-inner .cm-number { color: rgb(17, 102, 68); }
.cm-s-inner .cm-def { color: rgb(0, 0, 255); }
.cm-s-inner .cm-variable { color: rgb(0, 0, 0); }
.cm-s-inner .cm-variable-2 { color: rgb(0, 85, 170); }
.cm-s-inner .cm-variable-3 { color: rgb(0, 136, 85); }
.cm-s-inner .cm-string { color: rgb(170, 17, 17); }
.cm-s-inner .cm-property { color: rgb(0, 0, 0); }
.cm-s-inner .cm-operator { color: rgb(152, 26, 26); }
.cm-s-inner .cm-comment, .cm-s-inner.cm-comment { color: rgb(170, 85, 0); }
.cm-s-inner .cm-string-2 { color: rgb(255, 85, 0); }
.cm-s-inner .cm-meta { color: rgb(85, 85, 85); }
.cm-s-inner .cm-qualifier { color: rgb(85, 85, 85); }
.cm-s-inner .cm-builtin { color: rgb(51, 0, 170); }
.cm-s-inner .cm-bracket { color: rgb(153, 153, 119); }
.cm-s-inner .cm-tag { color: rgb(17, 119, 0); }
.cm-s-inner .cm-attribute { color: rgb(0, 0, 204); }
.cm-s-inner .cm-header, .cm-s-inner.cm-header { color: rgb(0, 0, 255); }
.cm-s-inner .cm-quote, .cm-s-inner.cm-quote { color: rgb(0, 153, 0); }
.cm-s-inner .cm-hr, .cm-s-inner.cm-hr { color: rgb(153, 153, 153); }
.cm-s-inner .cm-link, .cm-s-inner.cm-link { color: rgb(0, 0, 204); }
.cm-negative { color: rgb(221, 68, 68); }
.cm-positive { color: rgb(34, 153, 34); }
.cm-header, .cm-strong { font-weight: 700; }
.cm-del { text-decoration: line-through; }
.cm-em { font-style: italic; }
.cm-link { text-decoration: underline; }
.cm-error { color: red; }
.cm-invalidchar { color: red; }
.cm-constant { color: rgb(38, 139, 210); }
.cm-defined { color: rgb(181, 137, 0); }
div.CodeMirror span.CodeMirror-matchingbracket { color: rgb(0, 255, 0); }
div.CodeMirror span.CodeMirror-nonmatchingbracket { color: rgb(255, 34, 34); }
.cm-s-inner .CodeMirror-activeline-background { background-image: inherit; background-size: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: inherit; background-position: inherit inherit; background-repeat: inherit inherit; }
.CodeMirror { position: relative; overflow: hidden; }
.CodeMirror-scroll { height: 100%; outline: 0px; position: relative; box-sizing: content-box; background-image: inherit; background-size: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: inherit; background-position: inherit inherit; background-repeat: inherit inherit; }
.CodeMirror-sizer { position: relative; }
.CodeMirror-gutter-filler, .CodeMirror-hscrollbar, .CodeMirror-scrollbar-filler, .CodeMirror-vscrollbar { position: absolute; z-index: 6; display: none; }
.CodeMirror-vscrollbar { right: 0px; top: 0px; overflow: hidden; }
.CodeMirror-hscrollbar { bottom: 0px; left: 0px; overflow: hidden; }
.CodeMirror-scrollbar-filler { right: 0px; bottom: 0px; }
.CodeMirror-gutter-filler { left: 0px; bottom: 0px; }
.CodeMirror-gutters { position: absolute; left: 0px; top: 0px; padding-bottom: 30px; z-index: 3; }
.CodeMirror-gutter { white-space: normal; height: 100%; box-sizing: content-box; padding-bottom: 30px; margin-bottom: -32px; display: inline-block; }
.CodeMirror-gutter-wrapper { position: absolute; z-index: 4; border: none !important; background-position: 0px 0px !important; background-repeat: initial initial !important; }
.CodeMirror-gutter-background { position: absolute; top: 0px; bottom: 0px; z-index: 4; }
.CodeMirror-gutter-elt { position: absolute; cursor: default; z-index: 4; }
.CodeMirror-lines { cursor: text; }
.CodeMirror pre { border-top-left-radius: 0px; border-top-right-radius: 0px; border-bottom-right-radius: 0px; border-bottom-left-radius: 0px; border-width: 0px; font-family: inherit; font-size: inherit; margin: 0px; white-space: pre; word-wrap: normal; color: inherit; z-index: 2; position: relative; overflow: visible; background-position: 0px 0px; background-repeat: initial initial; }
.CodeMirror-wrap pre { word-wrap: break-word; white-space: pre-wrap; word-break: normal; }
.CodeMirror-code pre { border-right-width: 30px; border-right-style: solid; border-right-color: transparent; width: fit-content; }
.CodeMirror-wrap .CodeMirror-code pre { border-right-style: none; width: auto; }
.CodeMirror-linebackground { position: absolute; left: 0px; right: 0px; top: 0px; bottom: 0px; z-index: 0; }
.CodeMirror-linewidget { position: relative; z-index: 2; overflow: auto; }
.CodeMirror-wrap .CodeMirror-scroll { overflow-x: hidden; }
.CodeMirror-measure { position: absolute; width: 100%; height: 0px; overflow: hidden; visibility: hidden; }
.CodeMirror-measure pre { position: static; }
.CodeMirror div.CodeMirror-cursor { position: absolute; visibility: hidden; border-right-style: none; width: 0px; }
.CodeMirror div.CodeMirror-cursor { visibility: hidden; }
.CodeMirror-focused div.CodeMirror-cursor { visibility: inherit; }
.cm-searching { background-color: rgba(255, 255, 0, 0.4); background-position: initial initial; background-repeat: initial initial; }
@media print {
  .CodeMirror div.CodeMirror-cursor { visibility: hidden; }
}


:root {
    --side-bar-bg-color: #fafafa;
    --control-text-color: #777;
}

@include-when-export url(https://fonts.loli.net/css?family=Open+Sans:400italic,700italic,700,400&amp;subset=latin,latin-ext);

html {
    font-size: 16px;
}

body {
    font-family: &quot;Open Sans&quot;,&quot;Clear Sans&quot;,&quot;Helvetica Neue&quot;,Helvetica,Arial,sans-serif;
    color: rgb(51, 51, 51);
    line-height: 1.6;
}

#write {
    max-width: 860px;
  	margin: 0 auto;
  	padding: 30px;
    padding-bottom: 100px;
}
#write &gt; ul:first-child,
#write &gt; ol:first-child{
    margin-top: 30px;
}

a {
    color: #4183C4;
}
h1,
h2,
h3,
h4,
h5,
h6 {
    position: relative;
    margin-top: 1rem;
    margin-bottom: 1rem;
    font-weight: bold;
    line-height: 1.4;
    cursor: text;
}
h1:hover a.anchor,
h2:hover a.anchor,
h3:hover a.anchor,
h4:hover a.anchor,
h5:hover a.anchor,
h6:hover a.anchor {
    text-decoration: none;
}
h1 tt,
h1 code {
    font-size: inherit;
}
h2 tt,
h2 code {
    font-size: inherit;
}
h3 tt,
h3 code {
    font-size: inherit;
}
h4 tt,
h4 code {
    font-size: inherit;
}
h5 tt,
h5 code {
    font-size: inherit;
}
h6 tt,
h6 code {
    font-size: inherit;
}
h1 {
    padding-bottom: .3em;
    font-size: 2.25em;
    line-height: 1.2;
    border-bottom: 1px solid #eee;
}
h2 {
   padding-bottom: .3em;
    font-size: 1.75em;
    line-height: 1.225;
    border-bottom: 1px solid #eee;
}
h3 {
    font-size: 1.5em;
    line-height: 1.43;
}
h4 {
    font-size: 1.25em;
}
h5 {
    font-size: 1em;
}
h6 {
   font-size: 1em;
    color: #777;
}
p,
blockquote,
ul,
ol,
dl,
table{
    margin: 0.8em 0;
}
li&gt;ol,
li&gt;ul {
    margin: 0 0;
}
hr {
    height: 2px;
    padding: 0;
    margin: 16px 0;
    background-color: #e7e7e7;
    border: 0 none;
    overflow: hidden;
    box-sizing: content-box;
}

li p.first {
    display: inline-block;
}
ul,
ol {
    padding-left: 30px;
}
ul:first-child,
ol:first-child {
    margin-top: 0;
}
ul:last-child,
ol:last-child {
    margin-bottom: 0;
}
blockquote {
    border-left: 4px solid #dfe2e5;
    padding: 0 15px;
    color: #777777;
}
blockquote blockquote {
    padding-right: 0;
}
table {
    padding: 0;
    word-break: initial;
}
table tr {
    border-top: 1px solid #dfe2e5;
    margin: 0;
    padding: 0;
}
table tr:nth-child(2n),
thead {
    background-color: #f8f8f8;
}
table tr th {
    font-weight: bold;
    border: 1px solid #dfe2e5;
    border-bottom: 0;
    text-align: left;
    margin: 0;
    padding: 6px 13px;
}
table tr td {
    border: 1px solid #dfe2e5;
    text-align: left;
    margin: 0;
    padding: 6px 13px;
}
table tr th:first-child,
table tr td:first-child {
    margin-top: 0;
}
table tr th:last-child,
table tr td:last-child {
    margin-bottom: 0;
}

.CodeMirror-lines {
    padding-left: 4px;
}

.code-tooltip {
    box-shadow: 0 1px 1px 0 rgba(0,28,36,.3);
    border-top: 1px solid #eef2f2;
}

.md-fences,
code,
tt {
    border: 1px solid #e7eaed;
    background-color: #f8f8f8;
    border-radius: 3px;
    padding: 0;
    padding: 2px 4px 0px 4px;
    font-size: 0.9em;
}

code {
    background-color: #f3f4f4;
    padding: 0 2px 0 2px;
}

.md-fences {
    margin-bottom: 15px;
    margin-top: 15px;
    padding-top: 8px;
    padding-bottom: 6px;
}


.md-task-list-item &gt; input {
  margin-left: -1.3em;
}

@media print {
    html {
        font-size: 13px;
    }
    table,
    pre {
        page-break-inside: avoid;
    }
    pre {
        word-wrap: break-word;
    }
}

.md-fences {
	background-color: #f8f8f8;
}
#write pre.md-meta-block {
	padding: 1rem;
    font-size: 85%;
    line-height: 1.45;
    background-color: #f7f7f7;
    border: 0;
    border-radius: 3px;
    color: #777777;
    margin-top: 0 !important;
}

.mathjax-block&gt;.code-tooltip {
	bottom: .375rem;
}

.md-mathjax-midline {
    background: #fafafa;
}

#write&gt;h3.md-focus:before{
	left: -1.5625rem;
	top: .375rem;
}
#write&gt;h4.md-focus:before{
	left: -1.5625rem;
	top: .285714286rem;
}
#write&gt;h5.md-focus:before{
	left: -1.5625rem;
	top: .285714286rem;
}
#write&gt;h6.md-focus:before{
	left: -1.5625rem;
	top: .285714286rem;
}
.md-image&gt;.md-meta {
    /*border: 1px solid #ddd;*/
    border-radius: 3px;
    padding: 2px 0px 0px 4px;
    font-size: 0.9em;
    color: inherit;
}

.md-tag {
    color: #a7a7a7;
    opacity: 1;
}

.md-toc {
    margin-top:20px;
    padding-bottom:20px;
}

.sidebar-tabs {
    border-bottom: none;
}

#typora-quick-open {
    border: 1px solid #ddd;
    background-color: #f8f8f8;
}

#typora-quick-open-item {
    background-color: #FAFAFA;
    border-color: #FEFEFE #e5e5e5 #e5e5e5 #eee;
    border-style: solid;
    border-width: 1px;
}

/** focus mode */
.on-focus-mode blockquote {
    border-left-color: rgba(85, 85, 85, 0.12);
}

header, .context-menu, .megamenu-content, footer{
    font-family: &quot;Segoe UI&quot;, &quot;Arial&quot;, sans-serif;
}

.file-node-content:hover .file-node-icon,
.file-node-content:hover .file-node-open-state{
    visibility: visible;
}

.mac-seamless-mode #typora-sidebar {
    background-color: #fafafa;
    background-color: var(--side-bar-bg-color);
}

.md-lang {
    color: #b4654d;
}

.html-for-mac .context-menu {
    --item-hover-bg-color: #E6F0FE;
}

#md-notification .btn {
    border: 0;
}

.dropdown-menu .divider {
    border-color: #e5e5e5;
}

 .typora-export li, .typora-export p, .typora-export,  .footnote-line {white-space: normal;}
&lt;/style&gt;
&lt;/head&gt;
&lt;body class='typora-export' &gt;
&lt;div  id='write'  class = 'is-mac'&gt;&lt;h3&gt;&lt;a name='header-n194' class='md-header-anchor '&gt;&lt;/a&gt;파이썬 문법 익히기&lt;/h3&gt;&lt;p&gt;파이썬은 가장 대중적이면서도 쉽게 다가갈 수 있는 언어 중 하나에요.&lt;/p&gt;&lt;p&gt;보통 프로그래밍 언어를 새로 깔면 &amp;#39;Hello World&amp;#39;를 출력해봅니다. &lt;/p&gt;&lt;p&gt;프로그래밍 언어가 제대로 설치 되었는지 확인하기 위해서요.&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;python&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;python&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;'Hello World'&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 22px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 22px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;위의 코드를 실행해 보세요.&lt;/p&gt;&lt;p&gt;잘 출력되나요? 파이썬 설치가 성공적으로 되었어요.&lt;/p&gt;&lt;p&gt;그럼 이제부터 기본적인 파이썬 문법을 알아보도록 할께요. &lt;/p&gt;&lt;p&gt;변수, 조건문, 리스트 등이 가장 기초적인 파이썬 문법입니다. &lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;h3&gt;&lt;a name='header-n205' class='md-header-anchor '&gt;&lt;/a&gt;변수&lt;/h3&gt;&lt;p&gt;프로그래밍은 기본적으로 어떤 데이터를 저장하고, 이를 자유롭게 처리하는 것이에요.&lt;/p&gt;&lt;p&gt;데이터를 쓰려면, 쓰기 전에 어딘가에 저장을 해두어야해요. &lt;/p&gt;&lt;p&gt;어떤 데이터가 들어간 공간을 변수라고 합니다.  &lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;python&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;python&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;a&lt;/span&gt; = &lt;span class=&quot;cm-number&quot;&gt;10&lt;/span&gt; &lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;a&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 66px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 66px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;a라는 변수에 10을 넣고 출력을 해보았습니다. &lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;python&quot; style=&quot;page-break-inside: unset;&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;python&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;a&lt;/span&gt; = &lt;span class=&quot;cm-number&quot;&gt;20&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;a&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;b&lt;/span&gt; = &lt;span class=&quot;cm-number&quot;&gt;30&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;b&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;sum&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot;&gt;a&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;b&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-builtin&quot;&gt;sum&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;c&lt;/span&gt; = &lt;span class=&quot;cm-number&quot;&gt;50&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;d&lt;/span&gt; = &lt;span class=&quot;cm-number&quot;&gt;40&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;result&lt;/span&gt; = &lt;span class=&quot;cm-number&quot;&gt;50&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;40&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;result&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 396px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 396px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;변수는 여러개를 만들 수 있고 더하고 뺄 수도 있어요.&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;python&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;python&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;a&lt;/span&gt; = &lt;span class=&quot;cm-number&quot;&gt;50&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;b&lt;/span&gt; = &lt;span class=&quot;cm-number&quot;&gt;40&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;result&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot;&gt;a&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;/&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;b&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;result&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;result&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot;&gt;a&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;//&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;b&lt;/span&gt; &lt;span class=&quot;cm-comment&quot;&gt;# 나눴을 때 몫입니다. #는 주석인데, #이 달려있으면 그 뒤에 있는 건 컴퓨터가 무시해요!&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;result&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;result&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot;&gt;a&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;%&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;b&lt;/span&gt; &lt;span class=&quot;cm-comment&quot;&gt;# 나누었을 때 나머지에요.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;result&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 242px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 242px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;곱하거나 나누어 줄 수도 있죠.&lt;/p&gt;&lt;p&gt;변수에는 정수뿐만 아니라 실수나 문자도 넣을 수 있습니다.&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;python&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;python&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;name&lt;/span&gt; = &lt;span class=&quot;cm-string&quot;&gt;'mike'&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;name&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;city&lt;/span&gt; = &lt;span class=&quot;cm-string&quot;&gt;'seoul'&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;city&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;a&lt;/span&gt; = &lt;span class=&quot;cm-number&quot;&gt;10.5&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;a&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 264px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 264px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;참 거짓을 나타내는 변수도 있죠.&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;python&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;python&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;live_in_seoul&lt;/span&gt; = &lt;span class=&quot;cm-keyword&quot;&gt;True&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;live_in_seoul&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;live_in_tokyo&lt;/span&gt; = &lt;span class=&quot;cm-keyword&quot;&gt;False&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;live_in_tokyo&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 132px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 132px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;h5&gt;&lt;a name='header-n220' class='md-header-anchor '&gt;&lt;/a&gt;문제 1.1&lt;/h5&gt;&lt;h6&gt;&lt;a name='header-n221' class='md-header-anchor '&gt;&lt;/a&gt;변수 a에 숫자 10을 넣고 출력해보세요.&lt;/h6&gt;&lt;h5&gt;&lt;a name='header-n222' class='md-header-anchor '&gt;&lt;/a&gt;문제 1.2&lt;/h5&gt;&lt;h6&gt;&lt;a name='header-n223' class='md-header-anchor '&gt;&lt;/a&gt;변수 city에 문자 seoul을 넣고 출력해보세요.&lt;/h6&gt;&lt;h5&gt;&lt;a name='header-n225' class='md-header-anchor '&gt;&lt;/a&gt;문제 1.3&lt;/h5&gt;&lt;h6&gt;&lt;a name='header-n226' class='md-header-anchor '&gt;&lt;/a&gt;변수 a에 20, 변수 b에 30을 넣고 둘을 더해보세요.&lt;/h6&gt;&lt;p&gt;변수는 데이터를 저장하는 가장 간단한 방법이에요.&lt;/p&gt;&lt;p&gt;근데 변수는 한번에 하나의 데이터만 담을 수 있습니다. &lt;/p&gt;&lt;p&gt;여러 데이터를 담고 싶으면 어떻게 해야할까요?&lt;/p&gt;&lt;h3&gt;&lt;a name='header-n230' class='md-header-anchor '&gt;&lt;/a&gt;리스트&lt;/h3&gt;&lt;p&gt;많은 데이터를 한꺼번에 다루려면 리스트를 사용합니다.&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;python&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;python&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;names&lt;/span&gt; = [&lt;span class=&quot;cm-string&quot;&gt;'mike'&lt;/span&gt;, &lt;span class=&quot;cm-string&quot;&gt;'jane'&lt;/span&gt;, &lt;span class=&quot;cm-string&quot;&gt;'tom'&lt;/span&gt;]&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;names&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;names&lt;/span&gt;[&lt;span class=&quot;cm-number&quot;&gt;0&lt;/span&gt;]) &lt;span class=&quot;cm-comment&quot;&gt;# 리스트의 첫번째 값을 가져옵니다. 컴퓨터는 항상 0부터 시작해요.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;names&lt;/span&gt;[&lt;span class=&quot;cm-number&quot;&gt;1&lt;/span&gt;])&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;names&lt;/span&gt;[&lt;span class=&quot;cm-number&quot;&gt;2&lt;/span&gt;])&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-comment&quot;&gt;# print(names[3]) # 에러가 생깁니다. 리스트의 길이보다 큰 인덱스에 접근하려고해서 그래요.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 220px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 220px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;리스트에 있는 값에 접근하려면 인덱스를 써야됩니다. &lt;/p&gt;&lt;p&gt;인덱스는 names[0]에서 [0] 같은 걸 말하는데요.&lt;/p&gt;&lt;p&gt;항상 0부터 시작하고, 리스트의 길이보다 작아야합니다. &lt;/p&gt;&lt;p&gt;names 리스트는 길이가 3이니 2까지만 쓸 수 있죠.&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;python&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;python&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;odd_number&lt;/span&gt; = [&lt;span class=&quot;cm-number&quot;&gt;1&lt;/span&gt;, &lt;span class=&quot;cm-number&quot;&gt;3&lt;/span&gt;, &lt;span class=&quot;cm-number&quot;&gt;5&lt;/span&gt;, &lt;span class=&quot;cm-number&quot;&gt;7&lt;/span&gt;, &lt;span class=&quot;cm-number&quot;&gt;9&lt;/span&gt;]&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;odd_number&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;user_data&lt;/span&gt; = [ &lt;span class=&quot;cm-number&quot;&gt;20&lt;/span&gt;, &lt;span class=&quot;cm-string&quot;&gt;'mike'&lt;/span&gt;, &lt;span class=&quot;cm-string&quot;&gt;'seoul'&lt;/span&gt; , &lt;span class=&quot;cm-keyword&quot;&gt;True&lt;/span&gt;]&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;user_data&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 132px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 132px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;리스트에는 같은 종류의 변수뿐만 아니라 다른 종류의 변수도 섞어 쓸 수 있어요.&lt;/p&gt;&lt;p&gt;숫자, 문자 섞어서 쓸 수 있어요.&lt;/p&gt;&lt;p&gt;리스트는 여러 데이터를 쓸 수 있어 편리하지만, 어느 위치에 있는지(인덱스)를 알아야해요.&lt;/p&gt;&lt;p&gt;인덱스를 모르고도 쓸 수 있는 저장 방식이 있을까요?&lt;/p&gt;&lt;h3&gt;&lt;a name='header-n244' class='md-header-anchor '&gt;&lt;/a&gt;사전 (딕셔너리)&lt;/h3&gt;&lt;p&gt;사전은 &amp;#39;키&amp;#39;를 써서 데이터를 접근하고 사용합니다. &lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;python&quot; style=&quot;page-break-inside: unset;&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;python&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;user&lt;/span&gt; = {}&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;user&lt;/span&gt;[&lt;span class=&quot;cm-string&quot;&gt;'age'&lt;/span&gt;] = &lt;span class=&quot;cm-number&quot;&gt;25&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;user&lt;/span&gt;[&lt;span class=&quot;cm-string&quot;&gt;'address'&lt;/span&gt;] = &lt;span class=&quot;cm-string&quot;&gt;'seoul'&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;user&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;user&lt;/span&gt;[&lt;span class=&quot;cm-string&quot;&gt;'age'&lt;/span&gt;])&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;user&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;get&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;'age'&lt;/span&gt;)) &lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;user&lt;/span&gt;[&lt;span class=&quot;cm-string&quot;&gt;'age'&lt;/span&gt;] = &lt;span class=&quot;cm-number&quot;&gt;90&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;user&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;get&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;'age'&lt;/span&gt;))&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 308px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 308px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;사전을 쓰려면 user = {} 처럼 적어줘야 합니다.
위 코드에선 &amp;#39;age&amp;#39; 와 &amp;#39;address&amp;#39;가 키로 쓰였습니다.&lt;/p&gt;&lt;p&gt;사전에서 값을 가져오는 방식은 2가지인데요.&lt;/p&gt;&lt;p&gt;user[&amp;#39;age&amp;#39;] 처럼 가져올 수도 있고, user.get(&amp;#39;age&amp;#39;)처럼 가져올 수도 있어요.&lt;/p&gt;&lt;p&gt;보통은 user.get(&amp;#39;age&amp;#39;)처럼 쓰는 걸 권장해요. 키가 없어도 에러가 생기지를 않거든요.&lt;/p&gt;&lt;p&gt;다음은 조건문에 대해서 알아볼께요.&lt;/p&gt;&lt;h5&gt;&lt;a name='header-n252' class='md-header-anchor '&gt;&lt;/a&gt;문제 2.1&lt;/h5&gt;&lt;h6&gt;&lt;a name='header-n253' class='md-header-anchor '&gt;&lt;/a&gt;홀수만 5개 있는 리스트를 만들어서 출력해보세요.&lt;/h6&gt;&lt;h5&gt;&lt;a name='header-n254' class='md-header-anchor '&gt;&lt;/a&gt;문제 2.1&lt;/h5&gt;&lt;h6&gt;&lt;a name='header-n255' class='md-header-anchor '&gt;&lt;/a&gt;도시 이름을 3개 넣은 리스트를 만들어서 출력해보세요.&lt;/h6&gt;&lt;h5&gt;&lt;a name='header-n256' class='md-header-anchor '&gt;&lt;/a&gt;문제 2.3&lt;/h5&gt;&lt;h5&gt;&lt;a name='header-n257' class='md-header-anchor '&gt;&lt;/a&gt;과일(fruit) 사전을 만들어보세요. 키는 color, size로 해주세요.&lt;/h5&gt;&lt;h3&gt;&lt;a name='header-n259' class='md-header-anchor '&gt;&lt;/a&gt;조건문 IF 문&lt;/h3&gt;&lt;p&gt;조건문은 어떤 조건을 만족할 때 실행되는 명령을 말합니다. &lt;/p&gt;&lt;p&gt;우리 일상으로 비유를 해보자면&lt;/p&gt;&lt;p&gt;&amp;quot;스타벅스에 가면, 아메리카노를 시킨다&amp;quot;
&amp;quot;아침 8시가 되면, 일어나서 아침을 먹는다&amp;quot;&lt;/p&gt;&lt;p&gt;같은 게 조건문이 될 수 있겠죠.&lt;/p&gt;&lt;p&gt;그럼 파이썬의 조건문을 알아볼께요.&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;python&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;python&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;live_in_seoul&lt;/span&gt; = &lt;span class=&quot;cm-keyword&quot;&gt;True&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;live_in_seoul&lt;/span&gt;:&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;'서울에 살아요'&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;live_in_seoul&lt;/span&gt; = &lt;span class=&quot;cm-keyword&quot;&gt;False&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;live_in_seoul&lt;/span&gt;:&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;'서울에 살아요'&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 220px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 220px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;조건문은 if문 안에 있는 조건을 만족하면 실행됩니다. &lt;/p&gt;&lt;p&gt;위의 코드에서 첫번째 if문은 실행되고 두번째는 실행되지 않겠죠&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;python&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;python&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;name&lt;/span&gt; = &lt;span class=&quot;cm-string&quot;&gt;'jane'&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;name&lt;/span&gt; == &lt;span class=&quot;cm-string&quot;&gt;'jane'&lt;/span&gt;:&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;'이름이 제인이에요'&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;else&lt;/span&gt;:&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;'이름이 제인이 아니에요.'&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 132px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 132px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;else 문은 if문과 함께 쓰이는데요. &lt;/p&gt;&lt;p&gt;if 문을 만족하지 못하는 경우에 실행됩니다. &lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences mock-cm md-end-block&quot; lang=&quot;python&quot; contenteditable=&quot;false&quot; cid=&quot;n272&quot; mdtype=&quot;fences&quot;&gt;age = 35

if age &amp;gt; 30:
    print('30살보다 많습니다.')
else:
    print('30살보다 적어요.')
&lt;/pre&gt;&lt;p&gt;if 문은 다양하게 응용이 가능하답니다. &lt;/p&gt;&lt;p&gt;기초 중의 기초라고 할 수 있죠.&lt;/p&gt;&lt;h3&gt;&lt;a name='header-n276' class='md-header-anchor '&gt;&lt;/a&gt;조건문 For 문&lt;/h3&gt;&lt;p&gt;다른 많이 쓰이는 조건문은 For 문입니다. &lt;/p&gt;&lt;p&gt;위에서 리스트를 사용할 때 인덱스 하나하나 접근을 했죠.&lt;/p&gt;&lt;p&gt;리스트가 작아서, 3,4개 데이터만 있으면 괜찮지만&lt;/p&gt;&lt;p&gt;100개, 1000개면 어떻게 처리할까요?&lt;/p&gt;&lt;p&gt;이럴 때 for 문이 필요합니다. &lt;/p&gt;&lt;p&gt;for 문은 반복적인 작업을 쉽게 처리할 수 있게 해줘요.&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences mock-cm md-end-block&quot; lang=&quot;python&quot; contenteditable=&quot;false&quot; cid=&quot;n283&quot; mdtype=&quot;fences&quot;&gt;odd_number = [1, 3, 5, 7, 9, 11, 13]

for num in odd_number: # num 은 odd_number에 있는 변수에요.
    print(odd_number)
&lt;/pre&gt;&lt;p&gt;odd_number란 리스트에 있는 숫자를 하나하나 확인하면서 출력을 합니다.
처음의 num은 1
다음의 num은 3
마지막 num은 13 &lt;/p&gt;&lt;p&gt;이런 식으로 되겠죠.&lt;/p&gt;&lt;p&gt;for문은 if문과 함께 쓰이는 경우가 많습니다. &lt;/p&gt;&lt;p&gt;짝수만 출력하는 함수를 만들어볼께요.&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;python&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;python&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;number&lt;/span&gt; = [&lt;span class=&quot;cm-number&quot;&gt;1&lt;/span&gt;,&lt;span class=&quot;cm-number&quot;&gt;2&lt;/span&gt;,&lt;span class=&quot;cm-number&quot;&gt;3&lt;/span&gt;,&lt;span class=&quot;cm-number&quot;&gt;4&lt;/span&gt;,&lt;span class=&quot;cm-number&quot;&gt;5&lt;/span&gt;,&lt;span class=&quot;cm-number&quot;&gt;6&lt;/span&gt;,&lt;span class=&quot;cm-number&quot;&gt;7&lt;/span&gt;]&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;num&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;number&lt;/span&gt;:&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;num&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;%&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;2&lt;/span&gt; == &lt;span class=&quot;cm-number&quot;&gt;0&lt;/span&gt;:&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;num&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 132px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 132px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;num을 2로 나눴을 때 0인것만 출력하고 있어요.&lt;/p&gt;&lt;p&gt;For문은 실행중에 멈출 수도 있는데요. break를 쓰면 되요.&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;python&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;python&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;ages&lt;/span&gt; = [&lt;span class=&quot;cm-number&quot;&gt;10&lt;/span&gt;, &lt;span class=&quot;cm-number&quot;&gt;21&lt;/span&gt;, &lt;span class=&quot;cm-number&quot;&gt;25&lt;/span&gt;, &lt;span class=&quot;cm-number&quot;&gt;33&lt;/span&gt;, &lt;span class=&quot;cm-number&quot;&gt;44&lt;/span&gt;, &lt;span class=&quot;cm-number&quot;&gt;55&lt;/span&gt;, &lt;span class=&quot;cm-number&quot;&gt;66&lt;/span&gt;]&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;ages&lt;/span&gt;:&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;30&lt;/span&gt;:&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;'여기서 멈출께요'&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;break&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 110px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 110px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;위의 코드는 리스트에 있는 값이 30을 넘는 순간 멈추도록 했습니다.&lt;/p&gt;&lt;p&gt;for 문은 원할 때 언제든지 끝낼 수 있어요. &lt;/p&gt;&lt;h5&gt;&lt;a name='header-n295' class='md-header-anchor '&gt;&lt;/a&gt;문제 3.1&lt;/h5&gt;&lt;h6&gt;&lt;a name='header-n296' class='md-header-anchor '&gt;&lt;/a&gt;For문을 써서 1부터 10까지의 합을 구한 뒤 출력하세요.&lt;/h6&gt;&lt;h5&gt;&lt;a name='header-n298' class='md-header-anchor '&gt;&lt;/a&gt;문제 3.2&lt;/h5&gt;&lt;h5&gt;&lt;a name='header-n299' class='md-header-anchor '&gt;&lt;/a&gt;For문과 If 문을 써서 홀수만 출력해보세요.(20까지만 출력하세요)&lt;/h5&gt;&lt;h3&gt;&lt;a name='header-n301' class='md-header-anchor '&gt;&lt;/a&gt;함수&lt;/h3&gt;&lt;p&gt;함수는 같은 일을 반복하지 않기 위해서 사용합니다.
예컨데 변수 3개를 더하는 경우를 생각해 볼께요.&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;python&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;python&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;a&lt;/span&gt; = &lt;span class=&quot;cm-number&quot;&gt;10&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;b&lt;/span&gt; = &lt;span class=&quot;cm-number&quot;&gt;20&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;c&lt;/span&gt; = &lt;span class=&quot;cm-number&quot;&gt;30&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;result&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot;&gt;a&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;b&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;c&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;result&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;d&lt;/span&gt; = &lt;span class=&quot;cm-number&quot;&gt;11&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;e&lt;/span&gt; = &lt;span class=&quot;cm-number&quot;&gt;21&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;f&lt;/span&gt; = &lt;span class=&quot;cm-number&quot;&gt;31&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;result&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 286px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 286px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;변수에 값을 넣고 더하는 작업으 반복하고 있죠. 엄청 번거로운 일입니다. &lt;/p&gt;&lt;p&gt;함수를 만들면 이런 번거로움을 덜 수 있어요.&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;python&quot; style=&quot;page-break-inside: unset;&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;python&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;cm-def&quot;&gt;add&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;x&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;y&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;z&lt;/span&gt;): &lt;span class=&quot;cm-comment&quot;&gt;# add 함수. x,y,z는 입력값&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;x&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;y&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;z&lt;/span&gt; &lt;span class=&quot;cm-comment&quot;&gt;# 함수 내에서 계산을 하고 함수 밖으로 내보냅니다. &lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;result&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot;&gt;add&lt;/span&gt;(&lt;span class=&quot;cm-number&quot;&gt;10&lt;/span&gt;, &lt;span class=&quot;cm-number&quot;&gt;30&lt;/span&gt; , &lt;span class=&quot;cm-number&quot;&gt;50&lt;/span&gt;) &lt;span class=&quot;cm-comment&quot;&gt;# 함수로 계산한 결과는 result에 들어가게 됩니다. &lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;result&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;result&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot;&gt;add&lt;/span&gt;(&lt;span class=&quot;cm-number&quot;&gt;5&lt;/span&gt;, &lt;span class=&quot;cm-number&quot;&gt;7&lt;/span&gt;, &lt;span class=&quot;cm-number&quot;&gt;11&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;result&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;result&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot;&gt;add&lt;/span&gt;(&lt;span class=&quot;cm-number&quot;&gt;1&lt;/span&gt;, &lt;span class=&quot;cm-number&quot;&gt;3&lt;/span&gt;, &lt;span class=&quot;cm-number&quot;&gt;4&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;result&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 396px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 396px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;함수를 항상 def를 앞에 적어줘야해요.&lt;/p&gt;&lt;p&gt;그리고 입력과 결과값(함수 내에서 계산한 값)이 있어야 합니다. &lt;/p&gt;&lt;p&gt;일단 여러 함수를 써보다 보면 개념이 이해가 될 거에요.&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;python&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;python&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;cm-def&quot;&gt;subtract&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;x&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;y&lt;/span&gt;):&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;x&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;y&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;result&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot;&gt;subtract&lt;/span&gt;(&lt;span class=&quot;cm-number&quot;&gt;20&lt;/span&gt; , &lt;span class=&quot;cm-number&quot;&gt;10&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;result&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;result&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot;&gt;subtract&lt;/span&gt;(&lt;span class=&quot;cm-number&quot;&gt;35&lt;/span&gt;, &lt;span class=&quot;cm-number&quot;&gt;22&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;result&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 220px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 220px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;곱하는 함수도 만들어볼께요.&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences mock-cm md-end-block&quot; lang=&quot;python&quot; contenteditable=&quot;false&quot; cid=&quot;n312&quot; mdtype=&quot;fences&quot;&gt;def multiply(w, x, y, z):
    return w * x * y * z


result = multiply(2, 3, 4, 5)
print(result)

result = multiply(10, 20, 30, 40)
print(result)
&lt;/pre&gt;&lt;p&gt;함수를 항상 만들어 쓸 필요는 없고 내장 함수(파이썬 언어를 만든 사람들이 미리 만든 함수)를 쓰면 편합니다.&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences mock-cm md-end-block&quot; lang=&quot;python&quot; contenteditable=&quot;false&quot; cid=&quot;n314&quot; mdtype=&quot;fences&quot; style=&quot;page-break-inside: unset;&quot;&gt;a = &quot;Good morning, man&quot;
a.upper() # - 대문자로 바꿔줍니다.



a.lower() #  소문자로 바꿔줍니다.
a.count('m') # m이 몇개나 있는지 세줍니다.


a = &quot;Life is too short&quot;
a.replace(&quot;Life&quot;, &quot;Your height&quot;)


a = &quot;I regret what I did to you&quot;
a.split()  # split은 문자열을 나누는 함수다.  값을 넣지 않으면 공백으로 잘라줍니다
['I', 'regret', 'what', 'I', 'did', 'to', 'you']

d = &quot;home,mother,sweet&quot;
d.split(&quot;,&quot;)
['home', 'mother', 'sweet']


a.swapcase() # 대문자와 소문자를 바꾸어준다.


str(3) # str은 문자열로 만들어주는 함수이다. str(3)을 실행하면 문자열이 된다.

len(&quot;hi&quot;) # 길이를 알려주는 함수이다.
&lt;/pre&gt;&lt;h5&gt;&lt;a name='header-n315' class='md-header-anchor '&gt;&lt;/a&gt;문제 4.1&lt;/h5&gt;&lt;h6&gt;&lt;a name='header-n316' class='md-header-anchor '&gt;&lt;/a&gt;삼각형의 넓이를 구하는 함수를 만들어보세요.&lt;/h6&gt;&lt;h1&gt;&lt;a name='header-n317' class='md-header-anchor '&gt;&lt;/a&gt;(삼각형 공식 : 밑변의 길이 x 높이 / 2)&lt;/h1&gt;&lt;h5&gt;&lt;a name='header-n319' class='md-header-anchor '&gt;&lt;/a&gt;문제 4.2&lt;/h5&gt;&lt;h6&gt;&lt;a name='header-n320' class='md-header-anchor '&gt;&lt;/a&gt;원의 넓이를 구하는 함수를 만들어보세요.&lt;/h6&gt;&lt;h1&gt;&lt;a name='header-n321' class='md-header-anchor '&gt;&lt;/a&gt;(원의 넓이 공식 : 3.14 x 반지름 x 반지름)&lt;/h1&gt;&lt;h3&gt;&lt;a name='header-n323' class='md-header-anchor '&gt;&lt;/a&gt;추천 사이트 및 책&lt;/h3&gt;&lt;ul&gt;&lt;li&gt;&lt;p&gt;기본적인 문법&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;p&gt;튜토리얼 포인트 : &lt;a href='https://www.tutorialspoint.com/python/' target='_blank' class='url'&gt;https://www.tutorialspoint.com/python/&lt;/a&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;문법을 간단하게 설명해주고 있어요.&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;코드카데미 : &lt;a href='https://www.codecademy.com/learn/learn-python' target='_blank' class='url'&gt;https://www.codecademy.com/learn/learn-python&lt;/a&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;하나 하나 실행해보며 파이썬 배우기 좋아요.&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;점프 투 파이썬 : &lt;a href='https://wikidocs.net/book/1' target='_blank' class='url'&gt;https://wikidocs.net/book/1&lt;/a&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;웹상의 무료 자료 중엔 좋습니다. &lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;크롤링&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;p&gt;파이썬으로 웹 크롤러 만들기, 라이언 미첼 : &lt;a href='http://www.yes24.com/Product/Goods/71047040?scode=032&amp;OzSrank=1' target='_blank' class='url'&gt;http://www.yes24.com/Product/Goods/71047040?scode=032&amp;OzSrank=1&lt;/a&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;전 1판으로 봤는데, 코드 깔끔하고 깊이가 있었습니다.&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;파이썬을 이용한 웹 크롤링과 스크레이핑, 카토 코타 : &lt;a href='http://www.yes24.com/Product/Goods/59307498?scode=032&amp;OzSrank=1' target='_blank' class='url'&gt;http://www.yes24.com/Product/Goods/59307498?scode=032&amp;OzSrank=1&lt;/a&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;번역 훌륭하고 따라해보기 좋아요&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;백엔드&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;p&gt;깔끔한 파이썬 탄탄한 백엔드, 송은우 : &lt;a href='http://www.yes24.com/Product/Goods/68713424?scode=032&amp;OzSrank=1' target='_blank' class='url'&gt;http://www.yes24.com/Product/Goods/68713424?scode=032&amp;OzSrank=1&lt;/a&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;저자의 뛰어난 역량과 쉬운 설명이 돋보입니다. &lt;/li&gt;&lt;li&gt;책 다 따라하면 레벨업 되어 있을 거에요.&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;데이터 분석&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;p&gt;파이썬 라이브러리를 활용한 데이터 분석 : &lt;a href='http://www.yes24.com/Product/Goods/11043328?scode=032&amp;OzSrank=1' target='_blank' class='url'&gt;http://www.yes24.com/Product/Goods/11043328?scode=032&amp;OzSrank=1&lt;/a&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;파이썬 데이터 분석 라이브러리 첨 배우기에 좋아요&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;업무 자동화&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;p&gt;파이썬과 비즈니스 자동화 : &lt;a href='http://www.yes24.com/Product/Goods/66368636?scode=032&amp;OzSrank=2' target='_blank' class='url'&gt;http://www.yes24.com/Product/Goods/66368636?scode=032&amp;OzSrank=2&lt;/a&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;좀만 응용하면 업무에 써먹을만한 수준의 코드를 알려줍니다.&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;일 잘하는 평사원의 업무 자동화 : &lt;a href='http://www.yes24.com/Product/Goods/60745026?scode=032&amp;OzSrank=3' target='_blank' class='url'&gt;http://www.yes24.com/Product/Goods/60745026?scode=032&amp;OzSrank=3&lt;/a&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;첫 책으로는 나쁘진 않는데 깊이가 좀 아쉬워요.. &lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h3&gt;&lt;a name='header-n388' class='md-header-anchor '&gt;&lt;/a&gt;문제 해답&lt;/h3&gt;&lt;h5&gt;&lt;a name='header-n389' class='md-header-anchor '&gt;&lt;/a&gt;문제 1.1&lt;/h5&gt;&lt;h6&gt;&lt;a name='header-n390' class='md-header-anchor '&gt;&lt;/a&gt;변수 a에 숫자 10을 넣고 출력해보세요.&lt;/h6&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences mock-cm md-end-block&quot; lang=&quot;python&quot; contenteditable=&quot;false&quot; cid=&quot;n391&quot; mdtype=&quot;fences&quot;&gt;a = 10
print(a)
&lt;/pre&gt;&lt;h5&gt;&lt;a name='header-n392' class='md-header-anchor '&gt;&lt;/a&gt;문제 1.2&lt;/h5&gt;&lt;h6&gt;&lt;a name='header-n393' class='md-header-anchor '&gt;&lt;/a&gt;변수 city에 문자 seoul을 넣고 출력해보세요.&lt;/h6&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences mock-cm md-end-block&quot; lang=&quot;python&quot; contenteditable=&quot;false&quot; cid=&quot;n394&quot; mdtype=&quot;fences&quot;&gt;city = 'seoul'
print(city)
&lt;/pre&gt;&lt;h5&gt;&lt;a name='header-n395' class='md-header-anchor '&gt;&lt;/a&gt;문제 1.3&lt;/h5&gt;&lt;h6&gt;&lt;a name='header-n396' class='md-header-anchor '&gt;&lt;/a&gt;변수 a에 20, 변수 b에 30을 넣고 둘을 더해보세요.&lt;/h6&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences mock-cm md-end-block&quot; lang=&quot;python&quot; contenteditable=&quot;false&quot; cid=&quot;n397&quot; mdtype=&quot;fences&quot;&gt;a = 20
b = 30
print(a + b)
&lt;/pre&gt;&lt;h5&gt;&lt;a name='header-n398' class='md-header-anchor '&gt;&lt;/a&gt;문제 2.1&lt;/h5&gt;&lt;h6&gt;&lt;a name='header-n399' class='md-header-anchor '&gt;&lt;/a&gt;홀수만 5개 있는 리스트를 만들어서 출력해보세요.&lt;/h6&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences mock-cm md-end-block&quot; lang=&quot;python&quot; contenteditable=&quot;false&quot; cid=&quot;n400&quot; mdtype=&quot;fences&quot;&gt;odd_number = [1, 3, 5, 7, 9]
print(odd_number)
&lt;/pre&gt;&lt;h5&gt;&lt;a name='header-n401' class='md-header-anchor '&gt;&lt;/a&gt;문제 2.1&lt;/h5&gt;&lt;h6&gt;&lt;a name='header-n402' class='md-header-anchor '&gt;&lt;/a&gt;도시 이름을 3개 넣은 리스트를 만들어서 출력해보세요.&lt;/h6&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences mock-cm md-end-block&quot; lang=&quot;python&quot; contenteditable=&quot;false&quot; cid=&quot;n403&quot; mdtype=&quot;fences&quot;&gt;cities = ['seoul', 'daegu', 'busan']
print(cities)
print(cities[2])
&lt;/pre&gt;&lt;h5&gt;&lt;a name='header-n404' class='md-header-anchor '&gt;&lt;/a&gt;문제 2.3&lt;/h5&gt;&lt;h6&gt;&lt;a name='header-n405' class='md-header-anchor '&gt;&lt;/a&gt;과일(fruit) 사전을 만들어보세요. 키는 color, size로 해주세요.&lt;/h6&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences mock-cm md-end-block&quot; lang=&quot;python&quot; contenteditable=&quot;false&quot; cid=&quot;n406&quot; mdtype=&quot;fences&quot;&gt;fruit = {'color': 'White' }
fruit['size'] = 20

print(fruit)
&lt;/pre&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h5&gt;&lt;a name='header-n408' class='md-header-anchor '&gt;&lt;/a&gt;문제 3.1&lt;/h5&gt;&lt;h6&gt;&lt;a name='header-n409' class='md-header-anchor '&gt;&lt;/a&gt;For문을 써서 1부터 10까지의 합을 구한 뒤 출력하세요.&lt;/h6&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences mock-cm md-end-block&quot; lang=&quot;python&quot; contenteditable=&quot;false&quot; cid=&quot;n410&quot; mdtype=&quot;fences&quot;&gt;sum = 0
for i in range(1, 10):
    sum += i

print(sum)
&lt;/pre&gt;&lt;h5&gt;&lt;a name='header-n411' class='md-header-anchor '&gt;&lt;/a&gt;문제 3.2&lt;/h5&gt;&lt;h6&gt;&lt;a name='header-n412' class='md-header-anchor '&gt;&lt;/a&gt;For문과 If 문을 써서 홀수만 출력해보세요.(20까지만 출력하세요)&lt;/h6&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;python&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;python&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;cm-builtin&quot;&gt;range&lt;/span&gt;(&lt;span class=&quot;cm-number&quot;&gt;1&lt;/span&gt;, &lt;span class=&quot;cm-number&quot;&gt;21&lt;/span&gt;):&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;i&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;%&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;2&lt;/span&gt; == &lt;span class=&quot;cm-number&quot;&gt;1&lt;/span&gt;:&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;i&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 66px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 66px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;h5&gt;&lt;a name='header-n414' class='md-header-anchor '&gt;&lt;/a&gt;문제 4.1&lt;/h5&gt;&lt;h6&gt;&lt;a name='header-n415' class='md-header-anchor '&gt;&lt;/a&gt;삼각형의 넓이를 구하는 함수를 만들어보세요.&lt;/h6&gt;&lt;h6&gt;&lt;a name='header-n416' class='md-header-anchor '&gt;&lt;/a&gt;(삼각형 공식 : 밑변의 길이 x 높이 / 2)&lt;/h6&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;python&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;python&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;cm-def&quot;&gt;triangle_area&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;width&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;height&lt;/span&gt;):&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;width&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;height&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;/&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;area&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot;&gt;triangle_area&lt;/span&gt;(&lt;span class=&quot;cm-number&quot;&gt;30&lt;/span&gt;, &lt;span class=&quot;cm-number&quot;&gt;10&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;area&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 110px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 110px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;h5&gt;&lt;a name='header-n418' class='md-header-anchor '&gt;&lt;/a&gt;문제 4.2&lt;/h5&gt;&lt;h6&gt;&lt;a name='header-n419' class='md-header-anchor '&gt;&lt;/a&gt;원의 넓이를 구하는 함수를 만들어보세요.&lt;/h6&gt;&lt;h6&gt;&lt;a name='header-n420' class='md-header-anchor '&gt;&lt;/a&gt;(원의 넓이 공식 : 3.14 x 반지름 x 반지름)&lt;/h6&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;python&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;python&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;cm-def&quot;&gt;circle_area&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;radius&lt;/span&gt;):&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;3.14&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;radius&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;radius&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;area&lt;/span&gt; = &lt;span class=&quot;cm-variable&quot;&gt;circle_area&lt;/span&gt;(&lt;span class=&quot;cm-number&quot;&gt;5&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;area&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 132px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 132px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;</description>
      <category>파이썬</category>
      <author>에드 신</author>
      <guid isPermaLink="true">https://software-creator.tistory.com/18</guid>
      <comments>https://software-creator.tistory.com/18#entry18comment</comments>
      <pubDate>Thu, 11 Apr 2019 00:12:22 +0900</pubDate>
    </item>
    <item>
      <title>서버리스 앱 개발하기 3 - 서버리스 프레임워크 써서 플러터 앱과 연결하기</title>
      <link>https://software-creator.tistory.com/17</link>
      <description>
&lt;meta charset=&quot;UTF-8&quot;&gt;&lt;meta name=&quot;viewport&quot; content=&quot;width=device-width initial-scale=1&quot;&gt;
&lt;meta name=&quot;description&quot; content=&quot;람다와 다이나모DB를 연결하기 전에 서버리스 프레임워크를 먼저 알아보도록 할께요. 웹 콘솔에서 aws 람다, api 게이트웨이 설정을 하는 건 불편하죠. 이를 코드로 편하게 배포할 수 있게 하는게 Serverless framwork입니다.&quot;&gt;
&lt;title&gt;aws-series-03-serverless-lambda-dynamodb&lt;/title&gt;&lt;link href=&quot;https://fonts.loli.net/css?family=Open+Sans:400italic,700italic,700,400&amp;amp;subset=latin,latin-ext&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot;&gt;&lt;style type=&quot;text/css&quot;&gt;html {overflow-x: initial !important;}:root { --bg-color: #ffffff; --text-color: #333333; --select-text-bg-color: #B5D6FC; --select-text-font-color: auto; --monospace: &quot;Lucida Console&quot;,Consolas,&quot;Courier&quot;,monospace; }
html { font-size: 14px; background-color: var(--bg-color); color: var(--text-color); font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; -webkit-font-smoothing: antialiased; }
body { margin: 0px; padding: 0px; height: auto; bottom: 0px; top: 0px; left: 0px; right: 0px; font-size: 1rem; line-height: 1.42857143; overflow-x: hidden; background-image: inherit; background-size: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: inherit; background-position: inherit inherit; background-repeat: inherit inherit; }
iframe { margin: auto; }
a.url { word-break: break-all; }
a:active, a:hover { outline: 0px; }
.in-text-selection, ::selection { text-shadow: none; background: var(--select-text-bg-color); color: var(--select-text-font-color); }
#write { margin: 0px auto; height: auto; width: inherit; word-break: normal; word-wrap: break-word; position: relative; white-space: normal; overflow-x: visible; padding-top: 40px; }
#write.first-line-indent p { text-indent: 2em; }
#write.first-line-indent li p, #write.first-line-indent p * { text-indent: 0px; }
#write.first-line-indent li { margin-left: 2em; }
.for-image #write { padding-left: 8px; padding-right: 8px; }
body.typora-export { padding-left: 30px; padding-right: 30px; }
.typora-export .footnote-line, .typora-export li, .typora-export p { white-space: pre-wrap; }
@media screen and (max-width: 500px) {
  body.typora-export { padding-left: 0px; padding-right: 0px; }
  #write { padding-left: 20px; padding-right: 20px; }
  .CodeMirror-sizer { margin-left: 0px !important; }
  .CodeMirror-gutters { display: none !important; }
}
#write li &gt; figure:first-child { margin-top: -20px; }
#write ol, #write ul { position: relative; }
img { max-width: 100%; vertical-align: middle; }
button, input, select, textarea { color: inherit; font-family: inherit; font-size: inherit; font-style: inherit; font-variant-caps: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; }
input[type=&quot;checkbox&quot;], input[type=&quot;radio&quot;] { line-height: normal; padding: 0px; }
*, ::after, ::before { box-sizing: border-box; }
#write h1, #write h2, #write h3, #write h4, #write h5, #write h6, #write p, #write pre { width: inherit; }
#write h1, #write h2, #write h3, #write h4, #write h5, #write h6, #write p { position: relative; }
h1, h2, h3, h4, h5, h6 { break-after: avoid-page; break-inside: avoid; orphans: 2; }
p { orphans: 4; }
h1 { font-size: 2rem; }
h2 { font-size: 1.8rem; }
h3 { font-size: 1.6rem; }
h4 { font-size: 1.4rem; }
h5 { font-size: 1.2rem; }
h6 { font-size: 1rem; }
.md-math-block, .md-rawblock, h1, h2, h3, h4, h5, h6, p { margin-top: 1rem; margin-bottom: 1rem; }
.hidden { display: none; }
.md-blockmeta { color: rgb(204, 204, 204); font-weight: 700; font-style: italic; }
a { cursor: pointer; }
sup.md-footnote { padding: 2px 4px; background-color: rgba(238, 238, 238, 0.701961); color: rgb(85, 85, 85); border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; cursor: pointer; }
sup.md-footnote a, sup.md-footnote a:hover { color: inherit; text-transform: inherit; text-decoration: inherit; }
#write input[type=&quot;checkbox&quot;] { cursor: pointer; width: inherit; height: inherit; }
figure { overflow-x: auto; margin: 1.2em 0px; max-width: calc(100% + 16px); padding: 0px; }
figure &gt; table { margin: 0px !important; }
tr { break-inside: avoid; break-after: auto; }
thead { display: table-header-group; }
table { border-collapse: collapse; border-spacing: 0px; width: 100%; overflow: auto; break-inside: auto; text-align: left; }
table.md-table td { min-width: 32px; }
.CodeMirror-gutters { border-right-width: 0px; background-color: inherit; }
.CodeMirror { text-align: left; }
.CodeMirror-placeholder { opacity: 0.3; }
.CodeMirror pre { padding: 0px 4px; }
.CodeMirror-lines { padding: 0px; }
div.hr:focus { cursor: none; }
#write pre { white-space: pre-wrap; }
#write.fences-no-line-wrapping pre { white-space: pre; }
#write pre.ty-contain-cm { white-space: normal; }
.CodeMirror-gutters { margin-right: 4px; }
.md-fences { font-size: 0.9rem; display: block; break-inside: avoid; text-align: left; overflow: visible; white-space: pre; background-image: inherit; background-size: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: inherit; position: relative !important; background-position: inherit inherit; background-repeat: inherit inherit; }
.md-diagram-panel { width: 100%; margin-top: 10px; text-align: center; padding-top: 0px; padding-bottom: 8px; overflow-x: auto; }
#write .md-fences.mock-cm { white-space: pre-wrap; }
.md-fences.md-fences-with-lineno { padding-left: 0px; }
#write.fences-no-line-wrapping .md-fences.mock-cm { white-space: pre; overflow-x: auto; }
.md-fences.mock-cm.md-fences-with-lineno { padding-left: 8px; }
.CodeMirror-line, twitterwidget { break-inside: avoid; }
.footnotes { opacity: 0.8; font-size: 0.9rem; margin-top: 1em; margin-bottom: 1em; }
.footnotes + .footnotes { margin-top: 0px; }
.md-reset { margin: 0px; padding: 0px; border: 0px; outline: 0px; vertical-align: top; text-decoration: none; text-shadow: none; float: none; position: static; width: auto; height: auto; white-space: nowrap; cursor: inherit; line-height: normal; font-weight: 400; text-align: left; box-sizing: content-box; direction: ltr; background-position: 0px 0px; background-repeat: initial initial; }
li div { padding-top: 0px; }
blockquote { margin: 1rem 0px; }
li .mathjax-block, li p { margin: 0.5rem 0px; }
li { margin: 0px; position: relative; }
blockquote &gt; :last-child { margin-bottom: 0px; }
blockquote &gt; :first-child, li &gt; :first-child { margin-top: 0px; }
.footnotes-area { color: rgb(136, 136, 136); margin-top: 0.714rem; padding-bottom: 0.143rem; white-space: normal; }
#write .footnote-line { white-space: pre-wrap; }
@media print {
  body, html { border: 1px solid transparent; height: 99%; break-after: avoid-page; break-before: avoid-page; }
  #write { margin-top: 0px; padding-top: 0px; border-color: transparent !important; }
  .typora-export * { -webkit-print-color-adjust: exact; }
  html.blink-to-pdf { font-size: 13px; }
  .typora-export #write { padding-left: 32px; padding-right: 32px; padding-bottom: 0px; break-after: avoid-page; }
  .typora-export #write::after { height: 0px; }
  @page { margin: 20mm 0px; }
}
.footnote-line { margin-top: 0.714em; font-size: 0.7em; }
a img, img a { cursor: pointer; }
pre.md-meta-block { font-size: 0.8rem; min-height: 0.8rem; white-space: pre-wrap; background-color: rgb(204, 204, 204); display: block; overflow-x: hidden; background-position: initial initial; background-repeat: initial initial; }
p &gt; .md-image:only-child:not(.md-img-error) img, p &gt; img:only-child { display: block; margin: auto; }
p &gt; .md-image:only-child { display: inline-block; width: 100%; }
#write .MathJax_Display { margin: 0.8em 0px 0px; }
.md-math-block { width: 100%; }
.md-math-block:not(:empty)::after { display: none; }
[contenteditable=&quot;true&quot;]:active, [contenteditable=&quot;true&quot;]:focus { outline: 0px; box-shadow: none; }
.md-task-list-item { position: relative; list-style-type: none; }
.task-list-item.md-task-list-item { padding-left: 0px; }
.md-task-list-item &gt; input { position: absolute; top: 0px; left: 0px; margin-left: -1.2em; margin-top: calc(1em - 10px); }
.math { font-size: 1rem; }
.md-toc { min-height: 3.58rem; position: relative; font-size: 0.9rem; border-top-left-radius: 10px; border-top-right-radius: 10px; border-bottom-right-radius: 10px; border-bottom-left-radius: 10px; }
.md-toc-content { position: relative; margin-left: 0px; }
.md-toc-content::after, .md-toc::after { display: none; }
.md-toc-item { display: block; color: rgb(65, 131, 196); }
.md-toc-item a { text-decoration: none; }
.md-toc-inner:hover { text-decoration: underline; }
.md-toc-inner { display: inline-block; cursor: pointer; }
.md-toc-h1 .md-toc-inner { margin-left: 0px; font-weight: 700; }
.md-toc-h2 .md-toc-inner { margin-left: 2em; }
.md-toc-h3 .md-toc-inner { margin-left: 4em; }
.md-toc-h4 .md-toc-inner { margin-left: 6em; }
.md-toc-h5 .md-toc-inner { margin-left: 8em; }
.md-toc-h6 .md-toc-inner { margin-left: 10em; }
@media screen and (max-width: 48em) {
  .md-toc-h3 .md-toc-inner { margin-left: 3.5em; }
  .md-toc-h4 .md-toc-inner { margin-left: 5em; }
  .md-toc-h5 .md-toc-inner { margin-left: 6.5em; }
  .md-toc-h6 .md-toc-inner { margin-left: 8em; }
}
a.md-toc-inner { font-size: inherit; font-style: inherit; font-weight: inherit; line-height: inherit; }
.footnote-line a:not(.reversefootnote) { color: inherit; }
.md-attr { display: none; }
.md-fn-count::after { content: &quot;.&quot;; }
code, pre, samp, tt { font-family: var(--monospace); }
kbd { margin: 0px 0.1em; padding: 0.1em 0.6em; font-size: 0.8em; color: rgb(36, 39, 41); background-color: rgb(255, 255, 255); border: 1px solid rgb(173, 179, 185); border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; box-shadow: rgba(12, 13, 14, 0.2) 0px 1px 0px, rgb(255, 255, 255) 0px 0px 0px 2px inset; white-space: nowrap; vertical-align: middle; background-position: initial initial; background-repeat: initial initial; }
.md-comment { color: rgb(162, 127, 3); opacity: 0.8; font-family: var(--monospace); }
code { text-align: left; }
a.md-print-anchor { white-space: pre !important; border: none !important; display: inline-block !important; position: absolute !important; width: 1px !important; right: 0px !important; outline: 0px !important; text-shadow: initial !important; background-position: 0px 0px !important; background-repeat: initial initial !important; }
.md-inline-math .MathJax_SVG .noError { display: none !important; }
.html-for-mac .inline-math-svg .MathJax_SVG { vertical-align: 0.2px; }
.md-math-block .MathJax_SVG_Display { text-align: center; margin: 0px; position: relative; text-indent: 0px; max-width: none; max-height: none; min-height: 0px; min-width: 100%; width: auto; overflow-y: hidden; display: block !important; }
.MathJax_SVG_Display, .md-inline-math .MathJax_SVG_Display { width: auto; margin: inherit; display: inline-block !important; }
.MathJax_SVG .MJX-monospace { font-family: var(--monospace); }
.MathJax_SVG .MJX-sans-serif { font-family: sans-serif; }
.MathJax_SVG { display: inline; font-style: normal; font-weight: 400; line-height: normal; zoom: 90%; text-indent: 0px; text-align: left; text-transform: none; letter-spacing: normal; word-spacing: normal; word-wrap: normal; white-space: nowrap; float: none; direction: ltr; max-width: none; max-height: none; min-width: 0px; min-height: 0px; border: 0px; padding: 0px; margin: 0px; }
.MathJax_SVG * { transition: none; }
.MathJax_SVG_Display svg { vertical-align: middle !important; margin-bottom: 0px !important; }
.os-windows.monocolor-emoji .md-emoji { font-family: &quot;Segoe UI Symbol&quot;, sans-serif; }
.md-diagram-panel &gt; svg { max-width: 100%; }
[lang=&quot;mermaid&quot;] svg, [lang=&quot;flow&quot;] svg { max-width: 100%; }
[lang=&quot;mermaid&quot;] .node text { font-size: 1rem; }
table tr th { border-bottom-width: 0px; }
video { max-width: 100%; display: block; margin: 0px auto; }
iframe { max-width: 100%; width: 100%; border: none; }
.highlight td, .highlight tr { border: 0px; }


.CodeMirror { height: auto; }
.CodeMirror.cm-s-inner { background-image: inherit; background-size: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: inherit; background-position: inherit inherit; background-repeat: inherit inherit; }
.CodeMirror-scroll { overflow-y: hidden; overflow-x: auto; z-index: 3; }
.CodeMirror-gutter-filler, .CodeMirror-scrollbar-filler { background-color: rgb(255, 255, 255); }
.CodeMirror-gutters { border-right-width: 1px; border-right-style: solid; border-right-color: rgb(221, 221, 221); background-image: inherit; background-size: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: inherit; white-space: nowrap; background-position: inherit inherit; background-repeat: inherit inherit; }
.CodeMirror-linenumber { padding: 0px 3px 0px 5px; text-align: right; color: rgb(153, 153, 153); }
.cm-s-inner .cm-keyword { color: rgb(119, 0, 136); }
.cm-s-inner .cm-atom, .cm-s-inner.cm-atom { color: rgb(34, 17, 153); }
.cm-s-inner .cm-number { color: rgb(17, 102, 68); }
.cm-s-inner .cm-def { color: rgb(0, 0, 255); }
.cm-s-inner .cm-variable { color: rgb(0, 0, 0); }
.cm-s-inner .cm-variable-2 { color: rgb(0, 85, 170); }
.cm-s-inner .cm-variable-3 { color: rgb(0, 136, 85); }
.cm-s-inner .cm-string { color: rgb(170, 17, 17); }
.cm-s-inner .cm-property { color: rgb(0, 0, 0); }
.cm-s-inner .cm-operator { color: rgb(152, 26, 26); }
.cm-s-inner .cm-comment, .cm-s-inner.cm-comment { color: rgb(170, 85, 0); }
.cm-s-inner .cm-string-2 { color: rgb(255, 85, 0); }
.cm-s-inner .cm-meta { color: rgb(85, 85, 85); }
.cm-s-inner .cm-qualifier { color: rgb(85, 85, 85); }
.cm-s-inner .cm-builtin { color: rgb(51, 0, 170); }
.cm-s-inner .cm-bracket { color: rgb(153, 153, 119); }
.cm-s-inner .cm-tag { color: rgb(17, 119, 0); }
.cm-s-inner .cm-attribute { color: rgb(0, 0, 204); }
.cm-s-inner .cm-header, .cm-s-inner.cm-header { color: rgb(0, 0, 255); }
.cm-s-inner .cm-quote, .cm-s-inner.cm-quote { color: rgb(0, 153, 0); }
.cm-s-inner .cm-hr, .cm-s-inner.cm-hr { color: rgb(153, 153, 153); }
.cm-s-inner .cm-link, .cm-s-inner.cm-link { color: rgb(0, 0, 204); }
.cm-negative { color: rgb(221, 68, 68); }
.cm-positive { color: rgb(34, 153, 34); }
.cm-header, .cm-strong { font-weight: 700; }
.cm-del { text-decoration: line-through; }
.cm-em { font-style: italic; }
.cm-link { text-decoration: underline; }
.cm-error { color: red; }
.cm-invalidchar { color: red; }
.cm-constant { color: rgb(38, 139, 210); }
.cm-defined { color: rgb(181, 137, 0); }
div.CodeMirror span.CodeMirror-matchingbracket { color: rgb(0, 255, 0); }
div.CodeMirror span.CodeMirror-nonmatchingbracket { color: rgb(255, 34, 34); }
.cm-s-inner .CodeMirror-activeline-background { background-image: inherit; background-size: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: inherit; background-position: inherit inherit; background-repeat: inherit inherit; }
.CodeMirror { position: relative; overflow: hidden; }
.CodeMirror-scroll { height: 100%; outline: 0px; position: relative; box-sizing: content-box; background-image: inherit; background-size: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: inherit; background-position: inherit inherit; background-repeat: inherit inherit; }
.CodeMirror-sizer { position: relative; }
.CodeMirror-gutter-filler, .CodeMirror-hscrollbar, .CodeMirror-scrollbar-filler, .CodeMirror-vscrollbar { position: absolute; z-index: 6; display: none; }
.CodeMirror-vscrollbar { right: 0px; top: 0px; overflow: hidden; }
.CodeMirror-hscrollbar { bottom: 0px; left: 0px; overflow: hidden; }
.CodeMirror-scrollbar-filler { right: 0px; bottom: 0px; }
.CodeMirror-gutter-filler { left: 0px; bottom: 0px; }
.CodeMirror-gutters { position: absolute; left: 0px; top: 0px; padding-bottom: 30px; z-index: 3; }
.CodeMirror-gutter { white-space: normal; height: 100%; box-sizing: content-box; padding-bottom: 30px; margin-bottom: -32px; display: inline-block; }
.CodeMirror-gutter-wrapper { position: absolute; z-index: 4; border: none !important; background-position: 0px 0px !important; background-repeat: initial initial !important; }
.CodeMirror-gutter-background { position: absolute; top: 0px; bottom: 0px; z-index: 4; }
.CodeMirror-gutter-elt { position: absolute; cursor: default; z-index: 4; }
.CodeMirror-lines { cursor: text; }
.CodeMirror pre { border-top-left-radius: 0px; border-top-right-radius: 0px; border-bottom-right-radius: 0px; border-bottom-left-radius: 0px; border-width: 0px; font-family: inherit; font-size: inherit; margin: 0px; white-space: pre; word-wrap: normal; color: inherit; z-index: 2; position: relative; overflow: visible; background-position: 0px 0px; background-repeat: initial initial; }
.CodeMirror-wrap pre { word-wrap: break-word; white-space: pre-wrap; word-break: normal; }
.CodeMirror-code pre { border-right-width: 30px; border-right-style: solid; border-right-color: transparent; width: fit-content; }
.CodeMirror-wrap .CodeMirror-code pre { border-right-style: none; width: auto; }
.CodeMirror-linebackground { position: absolute; left: 0px; right: 0px; top: 0px; bottom: 0px; z-index: 0; }
.CodeMirror-linewidget { position: relative; z-index: 2; overflow: auto; }
.CodeMirror-wrap .CodeMirror-scroll { overflow-x: hidden; }
.CodeMirror-measure { position: absolute; width: 100%; height: 0px; overflow: hidden; visibility: hidden; }
.CodeMirror-measure pre { position: static; }
.CodeMirror div.CodeMirror-cursor { position: absolute; visibility: hidden; border-right-style: none; width: 0px; }
.CodeMirror div.CodeMirror-cursor { visibility: hidden; }
.CodeMirror-focused div.CodeMirror-cursor { visibility: inherit; }
.cm-searching { background-color: rgba(255, 255, 0, 0.4); background-position: initial initial; background-repeat: initial initial; }
@media print {
  .CodeMirror div.CodeMirror-cursor { visibility: hidden; }
}


:root {
    --side-bar-bg-color: #fafafa;
    --control-text-color: #777;
}

@include-when-export url(https://fonts.loli.net/css?family=Open+Sans:400italic,700italic,700,400&amp;subset=latin,latin-ext);

html {
    font-size: 16px;
}

body {
    font-family: &quot;Open Sans&quot;,&quot;Clear Sans&quot;,&quot;Helvetica Neue&quot;,Helvetica,Arial,sans-serif;
    color: rgb(51, 51, 51);
    line-height: 1.6;
}

#write {
    max-width: 860px;
  	margin: 0 auto;
  	padding: 30px;
    padding-bottom: 100px;
}
#write &gt; ul:first-child,
#write &gt; ol:first-child{
    margin-top: 30px;
}

a {
    color: #4183C4;
}
h1,
h2,
h3,
h4,
h5,
h6 {
    position: relative;
    margin-top: 1rem;
    margin-bottom: 1rem;
    font-weight: bold;
    line-height: 1.4;
    cursor: text;
}
h1:hover a.anchor,
h2:hover a.anchor,
h3:hover a.anchor,
h4:hover a.anchor,
h5:hover a.anchor,
h6:hover a.anchor {
    text-decoration: none;
}
h1 tt,
h1 code {
    font-size: inherit;
}
h2 tt,
h2 code {
    font-size: inherit;
}
h3 tt,
h3 code {
    font-size: inherit;
}
h4 tt,
h4 code {
    font-size: inherit;
}
h5 tt,
h5 code {
    font-size: inherit;
}
h6 tt,
h6 code {
    font-size: inherit;
}
h1 {
    padding-bottom: .3em;
    font-size: 2.25em;
    line-height: 1.2;
    border-bottom: 1px solid #eee;
}
h2 {
   padding-bottom: .3em;
    font-size: 1.75em;
    line-height: 1.225;
    border-bottom: 1px solid #eee;
}
h3 {
    font-size: 1.5em;
    line-height: 1.43;
}
h4 {
    font-size: 1.25em;
}
h5 {
    font-size: 1em;
}
h6 {
   font-size: 1em;
    color: #777;
}
p,
blockquote,
ul,
ol,
dl,
table{
    margin: 0.8em 0;
}
li&gt;ol,
li&gt;ul {
    margin: 0 0;
}
hr {
    height: 2px;
    padding: 0;
    margin: 16px 0;
    background-color: #e7e7e7;
    border: 0 none;
    overflow: hidden;
    box-sizing: content-box;
}

li p.first {
    display: inline-block;
}
ul,
ol {
    padding-left: 30px;
}
ul:first-child,
ol:first-child {
    margin-top: 0;
}
ul:last-child,
ol:last-child {
    margin-bottom: 0;
}
blockquote {
    border-left: 4px solid #dfe2e5;
    padding: 0 15px;
    color: #777777;
}
blockquote blockquote {
    padding-right: 0;
}
table {
    padding: 0;
    word-break: initial;
}
table tr {
    border-top: 1px solid #dfe2e5;
    margin: 0;
    padding: 0;
}
table tr:nth-child(2n),
thead {
    background-color: #f8f8f8;
}
table tr th {
    font-weight: bold;
    border: 1px solid #dfe2e5;
    border-bottom: 0;
    text-align: left;
    margin: 0;
    padding: 6px 13px;
}
table tr td {
    border: 1px solid #dfe2e5;
    text-align: left;
    margin: 0;
    padding: 6px 13px;
}
table tr th:first-child,
table tr td:first-child {
    margin-top: 0;
}
table tr th:last-child,
table tr td:last-child {
    margin-bottom: 0;
}

.CodeMirror-lines {
    padding-left: 4px;
}

.code-tooltip {
    box-shadow: 0 1px 1px 0 rgba(0,28,36,.3);
    border-top: 1px solid #eef2f2;
}

.md-fences,
code,
tt {
    border: 1px solid #e7eaed;
    background-color: #f8f8f8;
    border-radius: 3px;
    padding: 0;
    padding: 2px 4px 0px 4px;
    font-size: 0.9em;
}

code {
    background-color: #f3f4f4;
    padding: 0 2px 0 2px;
}

.md-fences {
    margin-bottom: 15px;
    margin-top: 15px;
    padding-top: 8px;
    padding-bottom: 6px;
}


.md-task-list-item &gt; input {
  margin-left: -1.3em;
}

@media print {
    html {
        font-size: 13px;
    }
    table,
    pre {
        page-break-inside: avoid;
    }
    pre {
        word-wrap: break-word;
    }
}

.md-fences {
	background-color: #f8f8f8;
}
#write pre.md-meta-block {
	padding: 1rem;
    font-size: 85%;
    line-height: 1.45;
    background-color: #f7f7f7;
    border: 0;
    border-radius: 3px;
    color: #777777;
    margin-top: 0 !important;
}

.mathjax-block&gt;.code-tooltip {
	bottom: .375rem;
}

.md-mathjax-midline {
    background: #fafafa;
}

#write&gt;h3.md-focus:before{
	left: -1.5625rem;
	top: .375rem;
}
#write&gt;h4.md-focus:before{
	left: -1.5625rem;
	top: .285714286rem;
}
#write&gt;h5.md-focus:before{
	left: -1.5625rem;
	top: .285714286rem;
}
#write&gt;h6.md-focus:before{
	left: -1.5625rem;
	top: .285714286rem;
}
.md-image&gt;.md-meta {
    /*border: 1px solid #ddd;*/
    border-radius: 3px;
    padding: 2px 0px 0px 4px;
    font-size: 0.9em;
    color: inherit;
}

.md-tag {
    color: #a7a7a7;
    opacity: 1;
}

.md-toc {
    margin-top:20px;
    padding-bottom:20px;
}

.sidebar-tabs {
    border-bottom: none;
}

#typora-quick-open {
    border: 1px solid #ddd;
    background-color: #f8f8f8;
}

#typora-quick-open-item {
    background-color: #FAFAFA;
    border-color: #FEFEFE #e5e5e5 #e5e5e5 #eee;
    border-style: solid;
    border-width: 1px;
}

/** focus mode */
.on-focus-mode blockquote {
    border-left-color: rgba(85, 85, 85, 0.12);
}

header, .context-menu, .megamenu-content, footer{
    font-family: &quot;Segoe UI&quot;, &quot;Arial&quot;, sans-serif;
}

.file-node-content:hover .file-node-icon,
.file-node-content:hover .file-node-open-state{
    visibility: visible;
}

.mac-seamless-mode #typora-sidebar {
    background-color: #fafafa;
    background-color: var(--side-bar-bg-color);
}

.md-lang {
    color: #b4654d;
}

.html-for-mac .context-menu {
    --item-hover-bg-color: #E6F0FE;
}

#md-notification .btn {
    border: 0;
}

.dropdown-menu .divider {
    border-color: #e5e5e5;
}

 .typora-export li, .typora-export p, .typora-export,  .footnote-line {white-space: normal;}
&lt;/style&gt;


&lt;div id=&quot;write&quot; class=&quot;is-mac&quot;&gt;&lt;h2&gt;&lt;a name=&quot;header-n618&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;목차&lt;/h2&gt;&lt;ol start=&quot;&quot;&gt;&lt;li&gt;&lt;h4&gt;&lt;a name=&quot;header-n622&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;서버리스 프레임워크 소개&lt;/h4&gt;&lt;/li&gt;&lt;li&gt;&lt;h4&gt;&lt;a name=&quot;header-n624&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;API Gateway 와 다이나모 디비 (DynamoDB) 연결하기&lt;/h4&gt;&lt;/li&gt;&lt;li&gt;&lt;h4&gt;&lt;a name=&quot;header-n626&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;플러터 앱으로 데이터 보여주기&lt;/h4&gt;&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;이 글은 서버리스 프레임워크를 쓰는 법,&lt;/p&gt;&lt;p&gt;아마존 람다를 통해 다이나모 디비로부터 &lt;/p&gt;&lt;p&gt;데이터 불러오는 법을 다루고 있습니다.&lt;/p&gt;&lt;p&gt; (데이터 저장은 이 글을 참고해주세요 &lt;a href=&quot;https://software-creator.tistory.com/16&quot;&gt;2편 - 아마존 DynamoDB 시작하기. CRUD부터 Scan까지&lt;/a&gt; )&lt;/p&gt;&lt;p&gt;이 글을 끝까지 읽으면 아주 기초적인 서버리스 모바일(플러터) 앱을 만들어 볼 수 있습니다. &lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h2&gt;&lt;a name=&quot;header-n628&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;1.Serverless framwork&lt;/h2&gt;&lt;h3&gt;&lt;a name=&quot;header-n629&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;1.1. Serverless framwork 시작하기&lt;/h3&gt;&lt;p&gt;람다와 다이나모DB를 연결하기 전에 서버리스 프레임워크를 먼저 알아보도록 할께요.&lt;/p&gt;&lt;p&gt;웹 콘솔에서 aws 람다, api 게이트웨이 설정을 하는 건 불편하죠.&lt;/p&gt;&lt;p&gt;이를 코드로 편하게 배포할 수 있게 하는게 Serverless framwork &lt;a href=&quot;https://serverless.com/&quot;&gt;(링크)&lt;/a&gt; 입니다.&lt;/p&gt;&lt;h6&gt;&lt;a name=&quot;header-n633&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;1.1.1 Serverless 설치&lt;/h6&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;shell&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;shell&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;npm&lt;/span&gt; install serverless &lt;span class=&quot;cm-attribute&quot;&gt;-g&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 22px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 22px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;설치가 잘 되었는지 확인하려면 &lt;strong&gt;serverless -v &lt;/strong&gt;를 쳐보세요. 버전 확인이 되면 성공입니다.&lt;/p&gt;&lt;p&gt;서버리스 프레임워크로 aws를 관리하려면 접근 권한을 줘야해요.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h6&gt;&lt;a name=&quot;header-n638&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;1.1.2 AWS IAM에서 자격증명(Credential) 만들기&lt;/h6&gt;&lt;ul&gt;&lt;li&gt;&lt;ol start=&quot;&quot;&gt;&lt;li&gt;우선 AWS에 접속해서 IAM 페이지에 들어가 주세요.&lt;/li&gt;&lt;/ol&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;        유저를 하나 추가합니다.&lt;/p&gt;&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/13621579/49515359-0aa5d800-f8da-11e8-90eb-25a4bab6aafe.png&quot; alt=&quot;alt text&quot; referrerpolicy=&quot;no-referrer&quot;&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;ol start=&quot;2&quot;&gt;&lt;li&gt;유저를 추가할 때 꼭 &lt;strong&gt;Programmatic access&lt;/strong&gt;를 체크해줘야 됩니다. (아래 그림 참고)&lt;/li&gt;&lt;/ol&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/13621579/49515366-0ed1f580-f8da-11e8-808f-383769e232a3.png&quot; alt=&quot;alt text&quot; referrerpolicy=&quot;no-referrer&quot;&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;ol start=&quot;3&quot;&gt;&lt;li&gt;&lt;p&gt;유저 추가를 쭉 하다보면 접근 키(Access key, Secret key)를 받을 수 있는 페이지가 나옵니다.&lt;/p&gt;&lt;p&gt;키를 다운받은 다음에 잘 보관해주세요. 이 키들을 서버리스 프레임워크에서 쓸 겁니다.&lt;/p&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/13621579/49515370-11344f80-f8da-11e8-929b-0c184a81c941.png&quot; alt=&quot;alt text&quot; referrerpolicy=&quot;no-referrer&quot;&gt;&lt;/p&gt;&lt;p&gt;키를 받고 나면 iam 페이지에서 나오도록 합시다.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h6&gt;&lt;a name=&quot;header-n665&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;1.1.3. Serverless 접근 권한 주기&lt;/h6&gt;&lt;p&gt;아까 받은 키들을 서버리스에서 설정해주세요.&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;shell&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;shell&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;serverlsss login&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;serverless config &lt;span class=&quot;cm-attribute&quot;&gt;--provider&lt;/span&gt; aws &lt;span class=&quot;cm-attribute&quot;&gt;--key&lt;/span&gt; 액세스키 &lt;span class=&quot;cm-attribute&quot;&gt;--secret&lt;/span&gt; 시크릿액세스키&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 44px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 44px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h6&gt;&lt;a name=&quot;header-n669&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;1.1.4. serverless 기본 템플릿 만들어보기&lt;/h6&gt;&lt;p&gt;서버리스 프레임워크는 템플릿을 써서 기본적인 애플리케이션을 만들 수 있습니다.&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;shell&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;shell&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;serverless create &lt;span class=&quot;cm-attribute&quot;&gt;-t&lt;/span&gt; aws-nodejs &lt;span class=&quot;cm-attribute&quot;&gt;-p&lt;/span&gt; serverless-start&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;cd&lt;/span&gt; serverless-start&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 44px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 44px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;템플릿을 만들면 파일 2개가 생깁니다. &lt;strong&gt;handler.js&lt;/strong&gt;와 &lt;strong&gt;serverless.yml&lt;/strong&gt; 입니다.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;code&gt;handler.js&lt;/code&gt;&lt;/strong&gt; - 람다 실행 코드&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;javascript&quot; style=&quot;page-break-inside: unset;&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;javascript&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;span&gt;&lt;span&gt;​&lt;/span&gt;x&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-string&quot;&gt;'use strict'&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;module&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;exports&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;hello&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;async&lt;/span&gt; (&lt;span class=&quot;cm-def&quot;&gt;event&lt;/span&gt;, &lt;span class=&quot;cm-def&quot;&gt;context&lt;/span&gt;) &lt;span class=&quot;cm-operator&quot;&gt;=&amp;gt;&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;return&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-property&quot;&gt;statusCode&lt;/span&gt;: &lt;span class=&quot;cm-number&quot;&gt;200&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-property&quot;&gt;body&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;JSON&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;stringify&lt;/span&gt;({&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-property&quot;&gt;message&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;'Go Serverless v1.0! Your function executed successfully!'&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-property&quot;&gt;input&lt;/span&gt;: &lt;span class=&quot;cm-variable-2&quot;&gt;event&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  }),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  };&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-comment&quot;&gt;// Use this code if you don't use the http event with the LAMBDA-PROXY integration&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-comment&quot;&gt;// return { message: 'Go Serverless v1.0! Your function executed successfully!', event };&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;};&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 308px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 308px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;code&gt;serverless.yml&lt;/code&gt;&lt;/strong&gt; - 서버리스 프레임워크 설정파일&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;yml&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;yml&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-atom&quot;&gt;service&lt;/span&gt;&lt;span class=&quot;cm-meta&quot;&gt;: &lt;/span&gt;sls-start&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-atom&quot;&gt;provider&lt;/span&gt;&lt;span class=&quot;cm-meta&quot;&gt;:&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-atom&quot;&gt;  name&lt;/span&gt;&lt;span class=&quot;cm-meta&quot;&gt;: &lt;/span&gt;aws&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-atom&quot;&gt;  runtime&lt;/span&gt;&lt;span class=&quot;cm-meta&quot;&gt;: &lt;/span&gt;nodejs8.10&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-atom&quot;&gt;functions&lt;/span&gt;&lt;span class=&quot;cm-meta&quot;&gt;:&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-atom&quot;&gt;  hello&lt;/span&gt;&lt;span class=&quot;cm-meta&quot;&gt;:&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-atom&quot;&gt; &amp;nbsp;  handler&lt;/span&gt;&lt;span class=&quot;cm-meta&quot;&gt;: &lt;/span&gt;handler.hello // handler.js에 있는 hello 함수를 실행&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 154px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 154px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;serverless.yml을 조금 수정하고 배포를 해보겠습니다.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h6&gt;&lt;a name=&quot;header-n682&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;1.1.5. serverless.yml 수정 및 배포&lt;/h6&gt;&lt;p&gt;&lt;strong&gt;&lt;code&gt;serverless.yml&lt;/code&gt;&lt;/strong&gt; - 서버리스 프레임워크 설정파일&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;yaml&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;yaml&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-atom&quot;&gt;service&lt;/span&gt;&lt;span class=&quot;cm-meta&quot;&gt;: &lt;/span&gt;sls-start&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-atom&quot;&gt;provider&lt;/span&gt;&lt;span class=&quot;cm-meta&quot;&gt;:&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-atom&quot;&gt;  name&lt;/span&gt;&lt;span class=&quot;cm-meta&quot;&gt;: &lt;/span&gt;aws&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-atom&quot;&gt;  runtime&lt;/span&gt;&lt;span class=&quot;cm-meta&quot;&gt;: &lt;/span&gt;nodejs8.10&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-atom&quot;&gt;  region&lt;/span&gt;&lt;span class=&quot;cm-meta&quot;&gt;: &lt;/span&gt;ap-northeast-2&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-atom&quot;&gt;functions&lt;/span&gt;&lt;span class=&quot;cm-meta&quot;&gt;:&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-atom&quot;&gt;  hello&lt;/span&gt;&lt;span class=&quot;cm-meta&quot;&gt;:&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-atom&quot;&gt; &amp;nbsp;  handler&lt;/span&gt;&lt;span class=&quot;cm-meta&quot;&gt;: &lt;/span&gt;handler.hello&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-atom&quot;&gt; &amp;nbsp;  events&lt;/span&gt;&lt;span class=&quot;cm-meta&quot;&gt;: &lt;/span&gt;// rest api를 만들거니 events는 http로 하겠습니다.&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-meta&quot;&gt; &amp;nbsp; &amp;nbsp;  - &lt;/span&gt;&lt;span class=&quot;cm-atom&quot;&gt;http&lt;/span&gt;&lt;span class=&quot;cm-meta&quot;&gt;:&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-atom&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;  path&lt;/span&gt;&lt;span class=&quot;cm-meta&quot;&gt;: &lt;/span&gt;hello&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-atom&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;  method&lt;/span&gt;&lt;span class=&quot;cm-meta&quot;&gt;: &lt;/span&gt;get&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 264px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 264px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;이제 &lt;strong&gt;serverless deploy&lt;/strong&gt; 를 터미널에 입력해봅시다.&lt;/p&gt;&lt;p&gt;성공적으로 배포되면 아래처럼 뜰 거에요.&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;shell&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;shell&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;endpoints:&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  GET &lt;span class=&quot;cm-attribute&quot;&gt;-&lt;/span&gt; https://kzf2871d.execute-api.ap-northeast-2.amazonaws.com/dev/hello&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;functions:&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  hello: sls-start-dev-hello&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 88px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 88px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;GET 옆의 url을 브라우저에 붙여넣기해 봅시다.&lt;/p&gt;&lt;p&gt;응답이 나오면 성공이에요!&lt;/p&gt;&lt;p&gt;이제 다이나모 DB와 람다를 연결해보겠습니다.&lt;/p&gt;&lt;p&gt;이제부터 쓸 데이터는 &lt;a href=&quot;https://software-creator.tistory.com/16&quot;&gt;저번글&lt;/a&gt; 에서 다이나모 DB에 넣었던 Food 테이블의 데이터입니다.&lt;/p&gt;&lt;p&gt;Food 테이블에 데이터가 들어가 있다고 생각하고 설명할께요.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h3&gt;&lt;a name=&quot;header-n695&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;2 DynamoDB 와 람다 연결&lt;/h3&gt;&lt;h5&gt;&lt;a name=&quot;header-n696&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;2.1.  설정하기&lt;/h5&gt;&lt;p&gt;다이나모DB를 쓰려면 사용 권한(iam role 지정)이 있어야해요.&lt;/p&gt;&lt;p&gt; &lt;strong&gt;&lt;code&gt;serverless.yml&lt;/code&gt;&lt;/strong&gt; 을 수정해주도록 합시다.&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;yaml&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;yaml&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-atom&quot;&gt;service&lt;/span&gt;&lt;span class=&quot;cm-meta&quot;&gt;: &lt;/span&gt;sls-start&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-atom&quot;&gt;provider&lt;/span&gt;&lt;span class=&quot;cm-meta&quot;&gt;:&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-atom&quot;&gt;  name&lt;/span&gt;&lt;span class=&quot;cm-meta&quot;&gt;: &lt;/span&gt;aws&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-atom&quot;&gt;  runtime&lt;/span&gt;&lt;span class=&quot;cm-meta&quot;&gt;: &lt;/span&gt;nodejs8.10&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-atom&quot;&gt;  stage&lt;/span&gt;&lt;span class=&quot;cm-meta&quot;&gt;: &lt;/span&gt;dev&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-atom&quot;&gt;  region&lt;/span&gt;&lt;span class=&quot;cm-meta&quot;&gt;: &lt;/span&gt;ap-northeast-2&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-atom&quot;&gt;  iamRoleStatements&lt;/span&gt;&lt;span class=&quot;cm-meta&quot;&gt;:&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-meta&quot;&gt; &amp;nbsp;  - &lt;/span&gt;&lt;span class=&quot;cm-atom&quot;&gt;Effect&lt;/span&gt;&lt;span class=&quot;cm-meta&quot;&gt;: &lt;/span&gt;&lt;span class=&quot;cm-string&quot;&gt;&quot;Allow&quot;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-atom&quot;&gt; &amp;nbsp; &amp;nbsp;  Action&lt;/span&gt;&lt;span class=&quot;cm-meta&quot;&gt;:&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-meta&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;  - &lt;/span&gt;dynamodb:*&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-atom&quot;&gt; &amp;nbsp; &amp;nbsp;  Resource&lt;/span&gt;&lt;span class=&quot;cm-meta&quot;&gt;: &lt;/span&gt;&lt;span class=&quot;cm-string&quot;&gt;&quot;*&quot;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 242px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 242px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;배포를 해볼께요.&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;shell&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;shell&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;sls deploy&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 22px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 22px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;배포가 성공적으로 되었나요?&lt;/p&gt;&lt;p&gt;이제 다이나모 디비에 접근할 수 있습니다!&lt;/p&gt;&lt;p&gt;이를 위한 람다함수를 만들어보도록 할께요.&lt;/p&gt;&lt;p&gt;다 완성되면 아래 그림 같은 구조가 됩니다.&lt;/p&gt;&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/13621579/54141530-38666400-4469-11e9-8acb-e4d7fbd5b9e9.png&quot; alt=&quot;폴더 구조&quot; referrerpolicy=&quot;no-referrer&quot;&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h5&gt;&lt;a name=&quot;header-n710&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;2.2 람다함수 추가하기&lt;/h5&gt;&lt;p&gt;프레임워크 설정에다 어떤 람다 파일을 쓸지 추가해줄께요.&lt;/p&gt;&lt;h5&gt;&lt;a name=&quot;header-n712&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;&lt;code&gt;serverless.yml&lt;/code&gt;&lt;/h5&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;yaml&quot; style=&quot;page-break-inside: unset;&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;yaml&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-atom&quot;&gt;provider&lt;/span&gt;&lt;span class=&quot;cm-meta&quot;&gt;:&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-atom&quot;&gt;  name&lt;/span&gt;&lt;span class=&quot;cm-meta&quot;&gt;: &lt;/span&gt;aws&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-atom&quot;&gt;  runtime&lt;/span&gt;&lt;span class=&quot;cm-meta&quot;&gt;: &lt;/span&gt;nodejs8.10&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-atom&quot;&gt;  stage&lt;/span&gt;&lt;span class=&quot;cm-meta&quot;&gt;: &lt;/span&gt;dev&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-atom&quot;&gt;  region&lt;/span&gt;&lt;span class=&quot;cm-meta&quot;&gt;: &lt;/span&gt;ap-northeast-2&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-atom&quot;&gt;  iamRoleStatements&lt;/span&gt;&lt;span class=&quot;cm-meta&quot;&gt;:&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-meta&quot;&gt; &amp;nbsp;  - &lt;/span&gt;&lt;span class=&quot;cm-atom&quot;&gt;Effect&lt;/span&gt;&lt;span class=&quot;cm-meta&quot;&gt;: &lt;/span&gt;&lt;span class=&quot;cm-string&quot;&gt;&quot;Allow&quot;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-atom&quot;&gt; &amp;nbsp; &amp;nbsp;  Action&lt;/span&gt;&lt;span class=&quot;cm-meta&quot;&gt;:&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-meta&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;  - &lt;/span&gt;dynamodb:*&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-atom&quot;&gt; &amp;nbsp; &amp;nbsp;  Resource&lt;/span&gt;&lt;span class=&quot;cm-meta&quot;&gt;: &lt;/span&gt;&lt;span class=&quot;cm-string&quot;&gt;&quot;*&quot;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-atom&quot;&gt;functions&lt;/span&gt;&lt;span class=&quot;cm-meta&quot;&gt;:&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-atom&quot;&gt;  hello&lt;/span&gt;&lt;span class=&quot;cm-meta&quot;&gt;:&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-atom&quot;&gt; &amp;nbsp;  handler&lt;/span&gt;&lt;span class=&quot;cm-meta&quot;&gt;: &lt;/span&gt;handler.hello&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-atom&quot;&gt; &amp;nbsp;  events&lt;/span&gt;&lt;span class=&quot;cm-meta&quot;&gt;:&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-meta&quot;&gt; &amp;nbsp; &amp;nbsp;  - &lt;/span&gt;&lt;span class=&quot;cm-atom&quot;&gt;http&lt;/span&gt;&lt;span class=&quot;cm-meta&quot;&gt;:&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-atom&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;  path&lt;/span&gt;&lt;span class=&quot;cm-meta&quot;&gt;: &lt;/span&gt;hello&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-atom&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;  method&lt;/span&gt;&lt;span class=&quot;cm-meta&quot;&gt;: &lt;/span&gt;get&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-atom&quot;&gt;  get&lt;/span&gt;&lt;span class=&quot;cm-meta&quot;&gt;:&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-atom&quot;&gt; &amp;nbsp;  handler&lt;/span&gt;&lt;span class=&quot;cm-meta&quot;&gt;: &lt;/span&gt;api/recipes.get&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-atom&quot;&gt; &amp;nbsp;  events&lt;/span&gt;&lt;span class=&quot;cm-meta&quot;&gt;:&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-meta&quot;&gt; &amp;nbsp; &amp;nbsp;  - &lt;/span&gt;&lt;span class=&quot;cm-atom&quot;&gt;http&lt;/span&gt;&lt;span class=&quot;cm-meta&quot;&gt;:&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-atom&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;  path&lt;/span&gt;&lt;span class=&quot;cm-meta&quot;&gt;: &lt;/span&gt;recipes&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-atom&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;  method&lt;/span&gt;&lt;span class=&quot;cm-meta&quot;&gt;: &lt;/span&gt;get&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-atom&quot;&gt;  list&lt;/span&gt;&lt;span class=&quot;cm-meta&quot;&gt;:&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-atom&quot;&gt; &amp;nbsp;  handler&lt;/span&gt;&lt;span class=&quot;cm-meta&quot;&gt;: &lt;/span&gt;api/recipes.list&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-atom&quot;&gt; &amp;nbsp;  events&lt;/span&gt;&lt;span class=&quot;cm-meta&quot;&gt;:&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-meta&quot;&gt; &amp;nbsp; &amp;nbsp;  - &lt;/span&gt;&lt;span class=&quot;cm-atom&quot;&gt;http&lt;/span&gt;&lt;span class=&quot;cm-meta&quot;&gt;:&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-atom&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;  path&lt;/span&gt;&lt;span class=&quot;cm-meta&quot;&gt;: &lt;/span&gt;recipes/&lt;span class=&quot;cm-meta&quot;&gt;{&lt;/span&gt;type&lt;span class=&quot;cm-meta&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-atom&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;  method&lt;/span&gt;&lt;span class=&quot;cm-meta&quot;&gt;: &lt;/span&gt;get&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 660px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 660px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;functions&lt;/strong&gt; 부분에 get, list 함수를 추가했습니다.&lt;/p&gt;&lt;p&gt;get함수는 쿼리 스트링(queryString)에 따라 값을 불러오는 함수이구요.&lt;/p&gt;&lt;p&gt;list함수는 음식의 종류(type)에 따라 데이터를 불러옵니다.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;api 폴더에 recipes.js를 추가하고 배포해 볼께요.&lt;/p&gt;&lt;h5&gt;&lt;a name=&quot;header-n720&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;&lt;code&gt;api/recipes.js&lt;/code&gt;&lt;/h5&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;javascript&quot; style=&quot;page-break-inside: unset;&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;javascript&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-string&quot;&gt;'use strict'&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;cm-def&quot;&gt;AWS&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;require&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;'aws-sdk'&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;AWS&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;config&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;update&lt;/span&gt;({&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-property&quot;&gt;region&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;'ap-northeast-2'&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-property&quot;&gt;endPoint&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;'http://dynamodb.ap-northeast-2.amazonaws.com'&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;});&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;cm-def&quot;&gt;docClient&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;AWS&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;DynamoDB&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;DocumentClient&lt;/span&gt;();&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;cm-def&quot;&gt;TableName&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &amp;nbsp;&lt;span class=&quot;cm-string&quot;&gt;'Food'&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;module&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;exports&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;get&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;async&lt;/span&gt; (&lt;span class=&quot;cm-def&quot;&gt;event&lt;/span&gt;, &lt;span class=&quot;cm-def&quot;&gt;callback&lt;/span&gt;) &lt;span class=&quot;cm-operator&quot;&gt;=&amp;gt;&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;let&lt;/span&gt; &lt;span class=&quot;cm-def&quot;&gt;queryParam&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable-2&quot;&gt;event&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;queryStringParameters&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;let&lt;/span&gt; &amp;nbsp;&lt;span class=&quot;cm-def&quot;&gt;type&lt;/span&gt; &amp;nbsp;&lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable-2&quot;&gt;queryParam&lt;/span&gt;[&lt;span class=&quot;cm-string&quot;&gt;'type'&lt;/span&gt;];&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;cm-def&quot;&gt;name&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable-2&quot;&gt;queryParam&lt;/span&gt;[&lt;span class=&quot;cm-string&quot;&gt;'name'&lt;/span&gt;];&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;cm-def&quot;&gt;params&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-property&quot;&gt;TableName&lt;/span&gt; : &lt;span class=&quot;cm-variable&quot;&gt;TableName&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-property&quot;&gt;Key&lt;/span&gt; : {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-string cm-property&quot;&gt;&quot;type&quot;&lt;/span&gt;: &lt;span class=&quot;cm-variable-2&quot;&gt;type&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-string cm-property&quot;&gt;&quot;name&quot;&lt;/span&gt;: &lt;span class=&quot;cm-variable-2&quot;&gt;name&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;cm-def&quot;&gt;result&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;await&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;docClient&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;get&lt;/span&gt;(&lt;span class=&quot;cm-variable-2&quot;&gt;params&lt;/span&gt;).&lt;span class=&quot;cm-property&quot;&gt;promise&lt;/span&gt;();&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;cm-def&quot;&gt;response&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-property&quot;&gt;statusCode&lt;/span&gt;: &lt;span class=&quot;cm-number&quot;&gt;200&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-property&quot;&gt;body&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;JSON&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;stringify&lt;/span&gt;(&lt;span class=&quot;cm-variable-2&quot;&gt;result&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;cm-variable-2&quot;&gt;response&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;module&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;exports&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;query&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;async&lt;/span&gt; (&lt;span class=&quot;cm-def&quot;&gt;event&lt;/span&gt;, &lt;span class=&quot;cm-def&quot;&gt;callback&lt;/span&gt;) &lt;span class=&quot;cm-operator&quot;&gt;=&amp;gt;&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;const&lt;/span&gt; { &lt;span class=&quot;cm-def&quot;&gt;type&lt;/span&gt; } &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable-2&quot;&gt;event&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;pathParameters&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;cm-def&quot;&gt;params&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-property&quot;&gt;TableName&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;TableName&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-property&quot;&gt;KeyConditionExpression&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;&quot;#type = :type&quot;&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-property&quot;&gt;ExpressionAttributeNames&lt;/span&gt;: {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-string cm-property&quot;&gt;&quot;#type&quot;&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;&quot;type&quot;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;  },&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-property&quot;&gt;ExpressionAttributeValues&lt;/span&gt;: {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-string cm-property&quot;&gt;&quot;:type&quot;&lt;/span&gt;: &lt;span class=&quot;cm-variable-2&quot;&gt;type&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;cm-def&quot;&gt;result&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;await&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;docClient&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;query&lt;/span&gt;(&lt;span class=&quot;cm-variable-2&quot;&gt;params&lt;/span&gt;).&lt;span class=&quot;cm-property&quot;&gt;promise&lt;/span&gt;();&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;cm-def&quot;&gt;response&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-property&quot;&gt;statusCode&lt;/span&gt;: &lt;span class=&quot;cm-number&quot;&gt;200&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-property&quot;&gt;body&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;JSON&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;stringify&lt;/span&gt;(&lt;span class=&quot;cm-variable-2&quot;&gt;result&lt;/span&gt;[&lt;span class=&quot;cm-string&quot;&gt;'Items'&lt;/span&gt;])&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;console&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;log&lt;/span&gt;(&lt;span class=&quot;cm-variable-2&quot;&gt;result&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;cm-variable-2&quot;&gt;response&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 1298px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 1298px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;배포를 해볼께요.&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;shell&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;shell&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;sls deploy&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 22px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 22px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;배포가 끝났나요?&lt;/p&gt;&lt;p&gt;이제 함수가 제대로 동작하는지 테스트 해볼께요.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h5&gt;&lt;a name=&quot;header-n729&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;2.3.1 동작 테스트 - GET 함수&lt;/h5&gt;&lt;p&gt;우선 GET 함수는 아래의 주소를 브라우저에 붙여 넣어주세요.&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;shell&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;shell&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;https://kzf2871d.execute-api.ap-northeast-2.amazonaws.com/dev/recipes&lt;span class=&quot;cm-def&quot;&gt;?type&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt;Western&lt;span class=&quot;cm-def&quot;&gt;&amp;amp;name&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt;Carbonara&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 44px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 44px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;DB에 데이터가 있다면 아래처럼 나올 거에요.&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;json&quot; style=&quot;page-break-inside: unset;&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;json&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;{&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-string cm-property&quot;&gt;&quot;Item&quot;&lt;/span&gt;: {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-string cm-property&quot;&gt;&quot;ingredients&quot;&lt;/span&gt;: {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-string cm-property&quot;&gt;&quot;garlic&quot;&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;&quot;1&quot;&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-string cm-property&quot;&gt;&quot;bacon&quot;&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;&quot;50g&quot;&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-string cm-property&quot;&gt;&quot;spaghetti&quot;&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;&quot;90g&quot;&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-string cm-property&quot;&gt;&quot;egg&quot;&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;&quot;1&quot;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;  },&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-string cm-property&quot;&gt;&quot;price&quot;&lt;/span&gt;: &lt;span class=&quot;cm-number&quot;&gt;13000&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-string cm-property&quot;&gt;&quot;name&quot;&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;&quot;Carbonara&quot;&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-string cm-property&quot;&gt;&quot;type&quot;&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;&quot;Western&quot;&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-string cm-property&quot;&gt;&quot;orderCount&quot;&lt;/span&gt;: &lt;span class=&quot;cm-number&quot;&gt;50&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 308px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 308px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h5&gt;&lt;a name=&quot;header-n735&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;2.3.2 동작 테스트 - list 함수&lt;/h5&gt;&lt;p&gt;list 함수를 테스트 해볼께요.&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;shell&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;shell&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;https://kzf2871d.execute-api.ap-northeast-2.amazonaws.com/dev/recipes/Western&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 22px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 22px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;type이 Western인 아이템을 모두 조회하는 걸 알 수 있습니다.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;json&quot; style=&quot;page-break-inside: unset;&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;json&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;[&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-string cm-property&quot;&gt;&quot;ingredients&quot;&lt;/span&gt;: {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-string cm-property&quot;&gt;&quot;garlic&quot;&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;&quot;1&quot;&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-string cm-property&quot;&gt;&quot;bacon&quot;&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;&quot;50g&quot;&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-string cm-property&quot;&gt;&quot;spaghetti&quot;&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;&quot;90g&quot;&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-string cm-property&quot;&gt;&quot;egg&quot;&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;&quot;1&quot;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;  },&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-string cm-property&quot;&gt;&quot;price&quot;&lt;/span&gt;: &lt;span class=&quot;cm-number&quot;&gt;13000&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-string cm-property&quot;&gt;&quot;name&quot;&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;&quot;Carbonara&quot;&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-string cm-property&quot;&gt;&quot;type&quot;&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;&quot;Western&quot;&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-string cm-property&quot;&gt;&quot;orderCount&quot;&lt;/span&gt;: &lt;span class=&quot;cm-number&quot;&gt;50&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  },&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-string cm-property&quot;&gt;&quot;ingredients&quot;&lt;/span&gt;: {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-string cm-property&quot;&gt;&quot;honey maid graham cracker crumbs&quot;&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;&quot;1 3/4 cups&quot;&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-string cm-property&quot;&gt;&quot;eggs&quot;&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;&quot;3&quot;&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-string cm-property&quot;&gt;&quot;butter, melted&quot;&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;&quot;1/3 cup&quot;&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-string cm-property&quot;&gt;&quot;sugar, divided&quot;&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;&quot;1 1/4 cups&quot;&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-string cm-property&quot;&gt;&quot;philadelphia cream cheese&quot;&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;&quot;3 packages(8 ounce)&quot;&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-string cm-property&quot;&gt;&quot;vanilla&quot;&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;&quot;2 teaspoons vanilla&quot;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;  },&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-string cm-property&quot;&gt;&quot;price&quot;&lt;/span&gt;: &lt;span class=&quot;cm-number&quot;&gt;13000&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-string cm-property&quot;&gt;&quot;name&quot;&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;&quot;Cheese cake&quot;&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-string cm-property&quot;&gt;&quot;type&quot;&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;&quot;Western&quot;&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-string cm-property&quot;&gt;&quot;orderCount&quot;&lt;/span&gt;: &lt;span class=&quot;cm-number&quot;&gt;77&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;]&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 616px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 616px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h3&gt;&lt;a name=&quot;header-n743&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;3.플러터 앱에서 보여주기&lt;/h3&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;이번엔 API Gateway와 플러터 앱을 연결해 보도록 하겠습니다.&lt;/p&gt;&lt;p&gt;앱은 최대한 간단히 만들어보도록 할께요.&lt;/p&gt;&lt;p&gt;앱은 3개의 클래스로 구성되어 있습니다.&lt;/p&gt;&lt;ul&gt;&lt;li&gt;UI를 그리는 위젯 클래스(main.dart)&lt;/li&gt;&lt;li&gt;데이터 저장 하는 모델 클래스( recipe.dart)&lt;/li&gt;&lt;li&gt;http로 데이터 요청하는 api 클래스 (api.dart)&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h4&gt;&lt;a name=&quot;header-n757&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;플러터 구조&lt;/h4&gt;&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/13621579/54259761-2e984a00-45aa-11e9-9cfc-a3ad11d6dda5.png&quot; alt=&quot;image&quot; referrerpolicy=&quot;no-referrer&quot;&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;일단 http package를 설정 파일에 추가해주세요.&lt;/p&gt;&lt;p&gt;dart 2.0 부터는 http 패키지를 항상 추가해줘야합니다.&lt;/p&gt;&lt;h5&gt;&lt;a name=&quot;header-n762&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;&lt;code&gt;pubspec.yaml&lt;/code&gt;&lt;/h5&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;yaml&quot; style=&quot;page-break-inside: unset;&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;yaml&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-atom&quot;&gt;version&lt;/span&gt;&lt;span class=&quot;cm-meta&quot;&gt;: &lt;/span&gt;1.0.0+1&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-atom&quot;&gt;environment&lt;/span&gt;&lt;span class=&quot;cm-meta&quot;&gt;:&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-atom&quot;&gt;  sdk&lt;/span&gt;&lt;span class=&quot;cm-meta&quot;&gt;: &lt;/span&gt;&lt;span class=&quot;cm-string&quot;&gt;&quot;&amp;gt;=2.0.0-dev.68.0 &amp;lt;3.0.0&quot;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-atom&quot;&gt;dependencies&lt;/span&gt;&lt;span class=&quot;cm-meta&quot;&gt;:&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-atom&quot;&gt;  flutter&lt;/span&gt;&lt;span class=&quot;cm-meta&quot;&gt;:&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-atom&quot;&gt; &amp;nbsp;  sdk&lt;/span&gt;&lt;span class=&quot;cm-meta&quot;&gt;: &lt;/span&gt;flutter&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-atom&quot;&gt;  cupertino_icons&lt;/span&gt;&lt;span class=&quot;cm-meta&quot;&gt;: &lt;/span&gt;^0.1.2&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-atom&quot;&gt;  http&lt;/span&gt;&lt;span class=&quot;cm-meta&quot;&gt;: &lt;/span&gt;^0.12.0&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-atom&quot;&gt;dev_dependencies&lt;/span&gt;&lt;span class=&quot;cm-meta&quot;&gt;:&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-atom&quot;&gt;  flutter_test&lt;/span&gt;&lt;span class=&quot;cm-meta&quot;&gt;:&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-atom&quot;&gt; &amp;nbsp;  sdk&lt;/span&gt;&lt;span class=&quot;cm-meta&quot;&gt;: &lt;/span&gt;flutter&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 330px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 330px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;AWS로부터 받은 데이터를 저장하는 클래스를 만들어볼께요.&lt;/p&gt;&lt;h5&gt;&lt;a name=&quot;header-n766&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;&lt;code&gt;recipe.dart&lt;/code&gt;&lt;/h5&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;dart&quot; style=&quot;page-break-inside: unset;&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;dart&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;Recipe&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;String&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;name&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;String&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;type&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;orderCount&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;price&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;Map&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-builtin&quot;&gt;String&lt;/span&gt;, &lt;span class=&quot;cm-builtin&quot;&gt;dynamic&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;ingredients&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;Recipe&lt;/span&gt;({&lt;span class=&quot;cm-keyword&quot;&gt;this&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;price&lt;/span&gt;, &lt;span class=&quot;cm-keyword&quot;&gt;this&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;name&lt;/span&gt;, &lt;span class=&quot;cm-keyword&quot;&gt;this&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;type&lt;/span&gt;, &lt;span class=&quot;cm-keyword&quot;&gt;this&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;orderCount&lt;/span&gt;, &lt;span class=&quot;cm-keyword&quot;&gt;this&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;ingredients&lt;/span&gt;});&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;Recipe&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;fromJson&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;Map&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-builtin&quot;&gt;String&lt;/span&gt;, &lt;span class=&quot;cm-builtin&quot;&gt;dynamic&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;json&lt;/span&gt;) : &lt;span class=&quot;cm-comment&quot;&gt;// json데이터를 클래스 형식으로 변환&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;name&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;json&lt;/span&gt;[&lt;span class=&quot;cm-string&quot;&gt;'name'&lt;/span&gt;],&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;type&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;json&lt;/span&gt;[&lt;span class=&quot;cm-string&quot;&gt;'type'&lt;/span&gt;],&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;price&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;json&lt;/span&gt;[&lt;span class=&quot;cm-string&quot;&gt;'price'&lt;/span&gt;],&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;orderCount&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;json&lt;/span&gt;[&lt;span class=&quot;cm-string&quot;&gt;'orderCount'&lt;/span&gt;],&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;ingredients&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;json&lt;/span&gt;[&lt;span class=&quot;cm-string&quot;&gt;'ingredients'&lt;/span&gt;];&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 352px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 352px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h5&gt;&lt;a name=&quot;header-n770&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;&lt;code&gt;api.dart&lt;/code&gt;&lt;/h5&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;dart&quot; style=&quot;page-break-inside: unset;&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;dart&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;cm-string&quot;&gt;'dart:async'&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;cm-string&quot;&gt;'dart:convert'&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;cm-string&quot;&gt;'package:http/http.dart'&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;as&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;http&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;cm-string&quot;&gt;'model/recipe.dart'&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;API&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;String&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;baseUrl&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-string&quot;&gt;&quot;https://kzf2871d.execute-api.ap-northeast-2.amazonaws.com/dev&quot;&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;final&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;client&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;http&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;Client&lt;/span&gt;();&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;Future&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-variable&quot;&gt;Recipe&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;fetchRecipe&lt;/span&gt;(&lt;span class=&quot;cm-builtin&quot;&gt;String&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;type&lt;/span&gt;, &lt;span class=&quot;cm-builtin&quot;&gt;String&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;name&lt;/span&gt;) &lt;span class=&quot;cm-keyword&quot;&gt;async&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;path&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-string&quot;&gt;&quot;/recipes?type=&lt;/span&gt;${&lt;span class=&quot;cm-variable&quot;&gt;type&lt;/span&gt;}&lt;span class=&quot;cm-string&quot;&gt;&amp;amp;name=&lt;/span&gt;${&lt;span class=&quot;cm-variable&quot;&gt;name&lt;/span&gt;}&lt;span class=&quot;cm-string&quot;&gt;&quot;&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;url&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;baseUrl&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;path&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;final&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;response&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;await&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;client&lt;/span&gt;.&lt;span class=&quot;cm-keyword&quot;&gt;get&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;url&lt;/span&gt;); &lt;span class=&quot;cm-comment&quot;&gt;// http get 메소드로 리퀘스트를 보냅니다.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;data&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;json&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;decode&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;utf8&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;decode&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;response&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;bodyBytes&lt;/span&gt;)); &lt;span class=&quot;cm-comment&quot;&gt;// utf8로 디코딩해야 한글이 깨지지 않습니다.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;Recipe&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;fromJson&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;data&lt;/span&gt;[&lt;span class=&quot;cm-string&quot;&gt;'Item'&lt;/span&gt;]);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 484px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 484px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;response data를 utf8로 디코딩해야 한글이 깨지지 않습니다.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h5&gt;&lt;a name=&quot;header-n774&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;&lt;code&gt;main.dart&lt;/code&gt;&lt;/h5&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;dart&quot; style=&quot;page-break-inside: unset;&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;dart&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;cm-string&quot;&gt;'package:flutter/material.dart'&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;cm-string&quot;&gt;'package:flutter_api_gateway/model/recipe.dart'&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;cm-string&quot;&gt;'api.dart'&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;main&lt;/span&gt;() &lt;span class=&quot;cm-operator&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;runApp&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;MyApp&lt;/span&gt;());&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;MyApp&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;extends&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;StatelessWidget&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-meta&quot;&gt;@override&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;Widget&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;build&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;BuildContext&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;context&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;MaterialApp&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;title&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;'Flutter Demo'&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;theme&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;ThemeData&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;primarySwatch&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;Colors&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;blue&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;  ),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;home&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;MyHomePage&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;title&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;'Flutter Demo Home Page'&lt;/span&gt;),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  );&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;MyHomePage&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;extends&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;StatefulWidget&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;MyHomePage&lt;/span&gt;({&lt;span class=&quot;cm-variable&quot;&gt;Key&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;key&lt;/span&gt;, &lt;span class=&quot;cm-keyword&quot;&gt;this&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;title&lt;/span&gt;}) : &lt;span class=&quot;cm-keyword&quot;&gt;super&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;key&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;key&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;final&lt;/span&gt; &lt;span class=&quot;cm-builtin&quot;&gt;String&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;title&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;API&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;api&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;API&lt;/span&gt;();&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-meta&quot;&gt;@override&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;_MyHomePageState&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;createState&lt;/span&gt;() &lt;span class=&quot;cm-operator&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;_MyHomePageState&lt;/span&gt;();&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;_MyHomePageState&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;extends&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;State&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-variable&quot;&gt;MyHomePage&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;gt;&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;bool&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;loadRecipe&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-atom&quot;&gt;false&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-meta&quot;&gt;@override&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;Widget&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;build&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;BuildContext&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;context&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;Scaffold&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;appBar&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;AppBar&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;title&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;Text&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;widget&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;title&lt;/span&gt;),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;  ),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;body&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;Center&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;child&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;Column&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;mainAxisAlignment&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;MainAxisAlignment&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;start&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;children&lt;/span&gt;: &lt;span class=&quot;cm-operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-variable&quot;&gt;Widget&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;gt;&lt;/span&gt;[&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;loadRecipe&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-operator&quot;&gt;?&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;FutureBuilder&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-variable&quot;&gt;Recipe&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;gt;&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;future&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;widget&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;api&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;fetchRecipe&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;&quot;Western&quot;&lt;/span&gt;, &lt;span class=&quot;cm-string&quot;&gt;&quot;Carbonara&quot;&lt;/span&gt;),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;builder&lt;/span&gt;: (&lt;span class=&quot;cm-variable&quot;&gt;context&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;snapshot&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;if&lt;/span&gt; (&lt;span class=&quot;cm-variable&quot;&gt;snapshot&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;hasData&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;Recipe&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;recipe&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;snapshot&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;data&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;recipe&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;price&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;recipeView&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;recipe&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;  } &lt;span class=&quot;cm-keyword&quot;&gt;else&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;Text&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;&quot;no data!&quot;&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;  },&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;  )&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;  : &lt;span class=&quot;cm-variable&quot;&gt;Text&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;&quot;data is not loaded!&quot;&lt;/span&gt;),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;  ],&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;  ),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;  ),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;floatingActionButton&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;FloatingActionButton&lt;/span&gt;( &lt;span class=&quot;cm-comment&quot;&gt;// 버튼을 누르면 데이터를 불러옵니다.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;onPressed&lt;/span&gt;: () {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;setState&lt;/span&gt;(() {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;loadRecipe&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-atom&quot;&gt;true&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;  });&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;  },&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;tooltip&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;'Data Load'&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;child&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;Icon&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;Icons&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;add&lt;/span&gt;),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;  ), &lt;span class=&quot;cm-comment&quot;&gt;// This trailing comma makes auto-formatting nicer for build methods.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  );&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;Widget&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;recipeView&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;Recipe&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;recipe&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;Container&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;padding&lt;/span&gt;: &lt;span class=&quot;cm-keyword&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;EdgeInsets&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;symmetric&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;vertical&lt;/span&gt;: &lt;span class=&quot;cm-number&quot;&gt;18.0&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;horizontal&lt;/span&gt;: &lt;span class=&quot;cm-number&quot;&gt;9.0&lt;/span&gt;),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;child&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;Column&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;mainAxisAlignment&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;MainAxisAlignment&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;spaceEvenly&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;crossAxisAlignment&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;CrossAxisAlignment&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;start&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;children&lt;/span&gt;: &lt;span class=&quot;cm-operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-variable&quot;&gt;Widget&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;gt;&lt;/span&gt;[&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;Text&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;&quot;음식종류 : &lt;/span&gt;${&lt;span class=&quot;cm-variable&quot;&gt;recipe&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;type&lt;/span&gt;}&lt;span class=&quot;cm-string&quot;&gt;&quot;&lt;/span&gt;),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;Text&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;&quot;음식이름 : &lt;/span&gt;${&lt;span class=&quot;cm-variable&quot;&gt;recipe&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;name&lt;/span&gt;}&lt;span class=&quot;cm-string&quot;&gt;&quot;&lt;/span&gt;),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;Text&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;&quot;가격 : &lt;/span&gt;${&lt;span class=&quot;cm-variable&quot;&gt;recipe&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;price&lt;/span&gt;}&lt;span class=&quot;cm-string&quot;&gt;&quot;&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;  ],&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;  ),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;decoration&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;BoxDecoration&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;color&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;Colors&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;grey&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;withOpacity&lt;/span&gt;(&lt;span class=&quot;cm-number&quot;&gt;0.2&lt;/span&gt;),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;borderRadius&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;BorderRadius&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;all&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;Radius&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;circular&lt;/span&gt;(&lt;span class=&quot;cm-number&quot;&gt;10.0&lt;/span&gt;),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;  ),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;  ),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  );&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 2112px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 2112px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;버튼을 누르면 데이터가 화면에 표시됩니다.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/13621579/54260506-7324e500-45ac-11e9-955c-6db1f8d54b77.png&quot; alt=&quot;flutter_03&quot; referrerpolicy=&quot;no-referrer&quot;&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;생각보다 마지막편 업데이트가 늦었네요!&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;AWS 서버리스 시리즈는 3편으로 마무리하고&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;추후 새로운 내용이 있으면 연재하도록 하겠습니다.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;다음에는 플러터 글로 찾아뵙도록 하겠습니다!&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://software-creator.tistory.com/14&quot;&gt;1편 - AWS Lambda와 AWS Gateway 연결&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;https://software-creator.tistory.com/16&quot;&gt;2편 - 아마존 DynamoDB 시작하기. CRUD부터 Scan까지&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;</description>
      <category>서버</category>
      <category>aws api gateway</category>
      <category>aws dynamodb</category>
      <category>aws dynamodb flutter</category>
      <category>aws flutter</category>
      <category>AWS Lambda</category>
      <category>serverless framework</category>
      <category>서버리스</category>
      <category>서버리스 프레임워크</category>
      <category>서버리스 플러터</category>
      <category>아마존 다이나모디비</category>
      <author>에드 신</author>
      <guid isPermaLink="true">https://software-creator.tistory.com/17</guid>
      <comments>https://software-creator.tistory.com/17#entry17comment</comments>
      <pubDate>Wed, 13 Mar 2019 16:43:35 +0900</pubDate>
    </item>
    <item>
      <title>서버리스 앱 개발하기 2 - 아마존 DynamoDB 시작하기. CRUD부터 Scan까지</title>
      <link>https://software-creator.tistory.com/16</link>
      <description>&lt;!doctype html&gt;
&lt;html&gt;
&lt;head&gt;
&lt;meta charset='UTF-8'&gt;
&lt;meta name='viewport' content='width=device-width initial-scale=1'&gt;
&lt;meta name='description' content='DynamoDB(다이나모디비)는 키-밸류 데이터베이스입니다.NoSQL방식이라서 확장이 간편하고 사용한만큼만 요금을 내는 구조입니다.DynamoDB는 스키마를 복잡하게 잡지 않아도 되는 게 장점입니다.스키마와 상관없이 데이터를 추가가하는 게 가능하기 때문이에요.DynamoDB는 또한 빠르고 안정성 있게 확장이 가능합니다.다만 정렬용으로는 좀 맞지 않습니다.'&gt;
&lt;title&gt;AWS DynamoDB 시작하기 - 아마존 다이나모 디비 예제.aws-series-02-dynamodb&lt;/title&gt;&lt;link href='https://fonts.loli.net/css?family=Open+Sans:400italic,700italic,700,400&amp;subset=latin,latin-ext' rel='stylesheet' type='text/css' /&gt;&lt;style type='text/css'&gt;html {overflow-x: initial !important;}:root { --bg-color: #ffffff; --text-color: #333333; --select-text-bg-color: #B5D6FC; --select-text-font-color: auto; --monospace: &quot;Lucida Console&quot;,Consolas,&quot;Courier&quot;,monospace; }
html { font-size: 14px; background-color: var(--bg-color); color: var(--text-color); font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; -webkit-font-smoothing: antialiased; }
body { margin: 0px; padding: 0px; height: auto; bottom: 0px; top: 0px; left: 0px; right: 0px; font-size: 1rem; line-height: 1.42857143; overflow-x: hidden; background-image: inherit; background-size: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: inherit; background-position: inherit inherit; background-repeat: inherit inherit; }
iframe { margin: auto; }
a.url { word-break: break-all; }
a:active, a:hover { outline: 0px; }
.in-text-selection, ::selection { text-shadow: none; background: var(--select-text-bg-color); color: var(--select-text-font-color); }
#write { margin: 0px auto; height: auto; width: inherit; word-break: normal; word-wrap: break-word; position: relative; white-space: normal; overflow-x: visible; padding-top: 40px; }
#write.first-line-indent p { text-indent: 2em; }
#write.first-line-indent li p, #write.first-line-indent p * { text-indent: 0px; }
#write.first-line-indent li { margin-left: 2em; }
.for-image #write { padding-left: 8px; padding-right: 8px; }
body.typora-export { padding-left: 30px; padding-right: 30px; }
.typora-export .footnote-line, .typora-export li, .typora-export p { white-space: pre-wrap; }
@media screen and (max-width: 500px) {
  body.typora-export { padding-left: 0px; padding-right: 0px; }
  #write { padding-left: 20px; padding-right: 20px; }
  .CodeMirror-sizer { margin-left: 0px !important; }
  .CodeMirror-gutters { display: none !important; }
}
#write li &gt; figure:first-child { margin-top: -20px; }
#write ol, #write ul { position: relative; }
img { max-width: 100%; vertical-align: middle; }
button, input, select, textarea { color: inherit; font-family: inherit; font-size: inherit; font-style: inherit; font-variant-caps: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; }
input[type=&quot;checkbox&quot;], input[type=&quot;radio&quot;] { line-height: normal; padding: 0px; }
*, ::after, ::before { box-sizing: border-box; }
#write h1, #write h2, #write h3, #write h4, #write h5, #write h6, #write p, #write pre { width: inherit; }
#write h1, #write h2, #write h3, #write h4, #write h5, #write h6, #write p { position: relative; }
h1, h2, h3, h4, h5, h6 { break-after: avoid-page; break-inside: avoid; orphans: 2; }
p { orphans: 4; }
h1 { font-size: 2rem; }
h2 { font-size: 1.8rem; }
h3 { font-size: 1.6rem; }
h4 { font-size: 1.4rem; }
h5 { font-size: 1.2rem; }
h6 { font-size: 1rem; }
.md-math-block, .md-rawblock, h1, h2, h3, h4, h5, h6, p { margin-top: 1rem; margin-bottom: 1rem; }
.hidden { display: none; }
.md-blockmeta { color: rgb(204, 204, 204); font-weight: 700; font-style: italic; }
a { cursor: pointer; }
sup.md-footnote { padding: 2px 4px; background-color: rgba(238, 238, 238, 0.701961); color: rgb(85, 85, 85); border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; cursor: pointer; }
sup.md-footnote a, sup.md-footnote a:hover { color: inherit; text-transform: inherit; text-decoration: inherit; }
#write input[type=&quot;checkbox&quot;] { cursor: pointer; width: inherit; height: inherit; }
figure { overflow-x: auto; margin: 1.2em 0px; max-width: calc(100% + 16px); padding: 0px; }
figure &gt; table { margin: 0px !important; }
tr { break-inside: avoid; break-after: auto; }
thead { display: table-header-group; }
table { border-collapse: collapse; border-spacing: 0px; width: 100%; overflow: auto; break-inside: auto; text-align: left; }
table.md-table td { min-width: 32px; }
.CodeMirror-gutters { border-right-width: 0px; background-color: inherit; }
.CodeMirror { text-align: left; }
.CodeMirror-placeholder { opacity: 0.3; }
.CodeMirror pre { padding: 0px 4px; }
.CodeMirror-lines { padding: 0px; }
div.hr:focus { cursor: none; }
#write pre { white-space: pre-wrap; }
#write.fences-no-line-wrapping pre { white-space: pre; }
#write pre.ty-contain-cm { white-space: normal; }
.CodeMirror-gutters { margin-right: 4px; }
.md-fences { font-size: 0.9rem; display: block; break-inside: avoid; text-align: left; overflow: visible; white-space: pre; background-image: inherit; background-size: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: inherit; position: relative !important; background-position: inherit inherit; background-repeat: inherit inherit; }
.md-diagram-panel { width: 100%; margin-top: 10px; text-align: center; padding-top: 0px; padding-bottom: 8px; overflow-x: auto; }
#write .md-fences.mock-cm { white-space: pre-wrap; }
.md-fences.md-fences-with-lineno { padding-left: 0px; }
#write.fences-no-line-wrapping .md-fences.mock-cm { white-space: pre; overflow-x: auto; }
.md-fences.mock-cm.md-fences-with-lineno { padding-left: 8px; }
.CodeMirror-line, twitterwidget { break-inside: avoid; }
.footnotes { opacity: 0.8; font-size: 0.9rem; margin-top: 1em; margin-bottom: 1em; }
.footnotes + .footnotes { margin-top: 0px; }
.md-reset { margin: 0px; padding: 0px; border: 0px; outline: 0px; vertical-align: top; text-decoration: none; text-shadow: none; float: none; position: static; width: auto; height: auto; white-space: nowrap; cursor: inherit; line-height: normal; font-weight: 400; text-align: left; box-sizing: content-box; direction: ltr; background-position: 0px 0px; background-repeat: initial initial; }
li div { padding-top: 0px; }
blockquote { margin: 1rem 0px; }
li .mathjax-block, li p { margin: 0.5rem 0px; }
li { margin: 0px; position: relative; }
blockquote &gt; :last-child { margin-bottom: 0px; }
blockquote &gt; :first-child, li &gt; :first-child { margin-top: 0px; }
.footnotes-area { color: rgb(136, 136, 136); margin-top: 0.714rem; padding-bottom: 0.143rem; white-space: normal; }
#write .footnote-line { white-space: pre-wrap; }
@media print {
  body, html { border: 1px solid transparent; height: 99%; break-after: avoid-page; break-before: avoid-page; }
  #write { margin-top: 0px; padding-top: 0px; border-color: transparent !important; }
  .typora-export * { -webkit-print-color-adjust: exact; }
  html.blink-to-pdf { font-size: 13px; }
  .typora-export #write { padding-left: 32px; padding-right: 32px; padding-bottom: 0px; break-after: avoid-page; }
  .typora-export #write::after { height: 0px; }
  @page { margin: 20mm 0px; }
}
.footnote-line { margin-top: 0.714em; font-size: 0.7em; }
a img, img a { cursor: pointer; }
pre.md-meta-block { font-size: 0.8rem; min-height: 0.8rem; white-space: pre-wrap; background-color: rgb(204, 204, 204); display: block; overflow-x: hidden; background-position: initial initial; background-repeat: initial initial; }
p &gt; .md-image:only-child:not(.md-img-error) img, p &gt; img:only-child { display: block; margin: auto; }
p &gt; .md-image:only-child { display: inline-block; width: 100%; }
#write .MathJax_Display { margin: 0.8em 0px 0px; }
.md-math-block { width: 100%; }
.md-math-block:not(:empty)::after { display: none; }
[contenteditable=&quot;true&quot;]:active, [contenteditable=&quot;true&quot;]:focus { outline: 0px; box-shadow: none; }
.md-task-list-item { position: relative; list-style-type: none; }
.task-list-item.md-task-list-item { padding-left: 0px; }
.md-task-list-item &gt; input { position: absolute; top: 0px; left: 0px; margin-left: -1.2em; margin-top: calc(1em - 10px); }
.math { font-size: 1rem; }
.md-toc { min-height: 3.58rem; position: relative; font-size: 0.9rem; border-top-left-radius: 10px; border-top-right-radius: 10px; border-bottom-right-radius: 10px; border-bottom-left-radius: 10px; }
.md-toc-content { position: relative; margin-left: 0px; }
.md-toc-content::after, .md-toc::after { display: none; }
.md-toc-item { display: block; color: rgb(65, 131, 196); }
.md-toc-item a { text-decoration: none; }
.md-toc-inner:hover { text-decoration: underline; }
.md-toc-inner { display: inline-block; cursor: pointer; }
.md-toc-h1 .md-toc-inner { margin-left: 0px; font-weight: 700; }
.md-toc-h2 .md-toc-inner { margin-left: 2em; }
.md-toc-h3 .md-toc-inner { margin-left: 4em; }
.md-toc-h4 .md-toc-inner { margin-left: 6em; }
.md-toc-h5 .md-toc-inner { margin-left: 8em; }
.md-toc-h6 .md-toc-inner { margin-left: 10em; }
@media screen and (max-width: 48em) {
  .md-toc-h3 .md-toc-inner { margin-left: 3.5em; }
  .md-toc-h4 .md-toc-inner { margin-left: 5em; }
  .md-toc-h5 .md-toc-inner { margin-left: 6.5em; }
  .md-toc-h6 .md-toc-inner { margin-left: 8em; }
}
a.md-toc-inner { font-size: inherit; font-style: inherit; font-weight: inherit; line-height: inherit; }
.footnote-line a:not(.reversefootnote) { color: inherit; }
.md-attr { display: none; }
.md-fn-count::after { content: &quot;.&quot;; }
code, pre, samp, tt { font-family: var(--monospace); }
kbd { margin: 0px 0.1em; padding: 0.1em 0.6em; font-size: 0.8em; color: rgb(36, 39, 41); background-color: rgb(255, 255, 255); border: 1px solid rgb(173, 179, 185); border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; box-shadow: rgba(12, 13, 14, 0.2) 0px 1px 0px, rgb(255, 255, 255) 0px 0px 0px 2px inset; white-space: nowrap; vertical-align: middle; background-position: initial initial; background-repeat: initial initial; }
.md-comment { color: rgb(162, 127, 3); opacity: 0.8; font-family: var(--monospace); }
code { text-align: left; }
a.md-print-anchor { white-space: pre !important; border: none !important; display: inline-block !important; position: absolute !important; width: 1px !important; right: 0px !important; outline: 0px !important; text-shadow: initial !important; background-position: 0px 0px !important; background-repeat: initial initial !important; }
.md-inline-math .MathJax_SVG .noError { display: none !important; }
.html-for-mac .inline-math-svg .MathJax_SVG { vertical-align: 0.2px; }
.md-math-block .MathJax_SVG_Display { text-align: center; margin: 0px; position: relative; text-indent: 0px; max-width: none; max-height: none; min-height: 0px; min-width: 100%; width: auto; overflow-y: hidden; display: block !important; }
.MathJax_SVG_Display, .md-inline-math .MathJax_SVG_Display { width: auto; margin: inherit; display: inline-block !important; }
.MathJax_SVG .MJX-monospace { font-family: var(--monospace); }
.MathJax_SVG .MJX-sans-serif { font-family: sans-serif; }
.MathJax_SVG { display: inline; font-style: normal; font-weight: 400; line-height: normal; zoom: 90%; text-indent: 0px; text-align: left; text-transform: none; letter-spacing: normal; word-spacing: normal; word-wrap: normal; white-space: nowrap; float: none; direction: ltr; max-width: none; max-height: none; min-width: 0px; min-height: 0px; border: 0px; padding: 0px; margin: 0px; }
.MathJax_SVG * { transition: none; }
.MathJax_SVG_Display svg { vertical-align: middle !important; margin-bottom: 0px !important; }
.os-windows.monocolor-emoji .md-emoji { font-family: &quot;Segoe UI Symbol&quot;, sans-serif; }
.md-diagram-panel &gt; svg { max-width: 100%; }
[lang=&quot;mermaid&quot;] svg, [lang=&quot;flow&quot;] svg { max-width: 100%; }
[lang=&quot;mermaid&quot;] .node text { font-size: 1rem; }
table tr th { border-bottom-width: 0px; }
video { max-width: 100%; display: block; margin: 0px auto; }
iframe { max-width: 100%; width: 100%; border: none; }
.highlight td, .highlight tr { border: 0px; }


.CodeMirror { height: auto; }
.CodeMirror.cm-s-inner { background-image: inherit; background-size: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: inherit; background-position: inherit inherit; background-repeat: inherit inherit; }
.CodeMirror-scroll { overflow-y: hidden; overflow-x: auto; z-index: 3; }
.CodeMirror-gutter-filler, .CodeMirror-scrollbar-filler { background-color: rgb(255, 255, 255); }
.CodeMirror-gutters { border-right-width: 1px; border-right-style: solid; border-right-color: rgb(221, 221, 221); background-image: inherit; background-size: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: inherit; white-space: nowrap; background-position: inherit inherit; background-repeat: inherit inherit; }
.CodeMirror-linenumber { padding: 0px 3px 0px 5px; text-align: right; color: rgb(153, 153, 153); }
.cm-s-inner .cm-keyword { color: rgb(119, 0, 136); }
.cm-s-inner .cm-atom, .cm-s-inner.cm-atom { color: rgb(34, 17, 153); }
.cm-s-inner .cm-number { color: rgb(17, 102, 68); }
.cm-s-inner .cm-def { color: rgb(0, 0, 255); }
.cm-s-inner .cm-variable { color: rgb(0, 0, 0); }
.cm-s-inner .cm-variable-2 { color: rgb(0, 85, 170); }
.cm-s-inner .cm-variable-3 { color: rgb(0, 136, 85); }
.cm-s-inner .cm-string { color: rgb(170, 17, 17); }
.cm-s-inner .cm-property { color: rgb(0, 0, 0); }
.cm-s-inner .cm-operator { color: rgb(152, 26, 26); }
.cm-s-inner .cm-comment, .cm-s-inner.cm-comment { color: rgb(170, 85, 0); }
.cm-s-inner .cm-string-2 { color: rgb(255, 85, 0); }
.cm-s-inner .cm-meta { color: rgb(85, 85, 85); }
.cm-s-inner .cm-qualifier { color: rgb(85, 85, 85); }
.cm-s-inner .cm-builtin { color: rgb(51, 0, 170); }
.cm-s-inner .cm-bracket { color: rgb(153, 153, 119); }
.cm-s-inner .cm-tag { color: rgb(17, 119, 0); }
.cm-s-inner .cm-attribute { color: rgb(0, 0, 204); }
.cm-s-inner .cm-header, .cm-s-inner.cm-header { color: rgb(0, 0, 255); }
.cm-s-inner .cm-quote, .cm-s-inner.cm-quote { color: rgb(0, 153, 0); }
.cm-s-inner .cm-hr, .cm-s-inner.cm-hr { color: rgb(153, 153, 153); }
.cm-s-inner .cm-link, .cm-s-inner.cm-link { color: rgb(0, 0, 204); }
.cm-negative { color: rgb(221, 68, 68); }
.cm-positive { color: rgb(34, 153, 34); }
.cm-header, .cm-strong { font-weight: 700; }
.cm-del { text-decoration: line-through; }
.cm-em { font-style: italic; }
.cm-link { text-decoration: underline; }
.cm-error { color: red; }
.cm-invalidchar { color: red; }
.cm-constant { color: rgb(38, 139, 210); }
.cm-defined { color: rgb(181, 137, 0); }
div.CodeMirror span.CodeMirror-matchingbracket { color: rgb(0, 255, 0); }
div.CodeMirror span.CodeMirror-nonmatchingbracket { color: rgb(255, 34, 34); }
.cm-s-inner .CodeMirror-activeline-background { background-image: inherit; background-size: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: inherit; background-position: inherit inherit; background-repeat: inherit inherit; }
.CodeMirror { position: relative; overflow: hidden; }
.CodeMirror-scroll { height: 100%; outline: 0px; position: relative; box-sizing: content-box; background-image: inherit; background-size: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: inherit; background-position: inherit inherit; background-repeat: inherit inherit; }
.CodeMirror-sizer { position: relative; }
.CodeMirror-gutter-filler, .CodeMirror-hscrollbar, .CodeMirror-scrollbar-filler, .CodeMirror-vscrollbar { position: absolute; z-index: 6; display: none; }
.CodeMirror-vscrollbar { right: 0px; top: 0px; overflow: hidden; }
.CodeMirror-hscrollbar { bottom: 0px; left: 0px; overflow: hidden; }
.CodeMirror-scrollbar-filler { right: 0px; bottom: 0px; }
.CodeMirror-gutter-filler { left: 0px; bottom: 0px; }
.CodeMirror-gutters { position: absolute; left: 0px; top: 0px; padding-bottom: 30px; z-index: 3; }
.CodeMirror-gutter { white-space: normal; height: 100%; box-sizing: content-box; padding-bottom: 30px; margin-bottom: -32px; display: inline-block; }
.CodeMirror-gutter-wrapper { position: absolute; z-index: 4; border: none !important; background-position: 0px 0px !important; background-repeat: initial initial !important; }
.CodeMirror-gutter-background { position: absolute; top: 0px; bottom: 0px; z-index: 4; }
.CodeMirror-gutter-elt { position: absolute; cursor: default; z-index: 4; }
.CodeMirror-lines { cursor: text; }
.CodeMirror pre { border-top-left-radius: 0px; border-top-right-radius: 0px; border-bottom-right-radius: 0px; border-bottom-left-radius: 0px; border-width: 0px; font-family: inherit; font-size: inherit; margin: 0px; white-space: pre; word-wrap: normal; color: inherit; z-index: 2; position: relative; overflow: visible; background-position: 0px 0px; background-repeat: initial initial; }
.CodeMirror-wrap pre { word-wrap: break-word; white-space: pre-wrap; word-break: normal; }
.CodeMirror-code pre { border-right-width: 30px; border-right-style: solid; border-right-color: transparent; width: fit-content; }
.CodeMirror-wrap .CodeMirror-code pre { border-right-style: none; width: auto; }
.CodeMirror-linebackground { position: absolute; left: 0px; right: 0px; top: 0px; bottom: 0px; z-index: 0; }
.CodeMirror-linewidget { position: relative; z-index: 2; overflow: auto; }
.CodeMirror-wrap .CodeMirror-scroll { overflow-x: hidden; }
.CodeMirror-measure { position: absolute; width: 100%; height: 0px; overflow: hidden; visibility: hidden; }
.CodeMirror-measure pre { position: static; }
.CodeMirror div.CodeMirror-cursor { position: absolute; visibility: hidden; border-right-style: none; width: 0px; }
.CodeMirror div.CodeMirror-cursor { visibility: hidden; }
.CodeMirror-focused div.CodeMirror-cursor { visibility: inherit; }
.cm-searching { background-color: rgba(255, 255, 0, 0.4); background-position: initial initial; background-repeat: initial initial; }
@media print {
  .CodeMirror div.CodeMirror-cursor { visibility: hidden; }
}


:root {
    --side-bar-bg-color: #fafafa;
    --control-text-color: #777;
}

@include-when-export url(https://fonts.loli.net/css?family=Open+Sans:400italic,700italic,700,400&amp;subset=latin,latin-ext);

html {
    font-size: 16px;
}

body {
    font-family: &quot;Open Sans&quot;,&quot;Clear Sans&quot;,&quot;Helvetica Neue&quot;,Helvetica,Arial,sans-serif;
    color: rgb(51, 51, 51);
    line-height: 1.6;
}

#write {
    max-width: 860px;
  	margin: 0 auto;
  	padding: 30px;
    padding-bottom: 100px;
}
#write &gt; ul:first-child,
#write &gt; ol:first-child{
    margin-top: 30px;
}

a {
    color: #4183C4;
}
h1,
h2,
h3,
h4,
h5,
h6 {
    position: relative;
    margin-top: 1rem;
    margin-bottom: 1rem;
    font-weight: bold;
    line-height: 1.4;
    cursor: text;
}
h1:hover a.anchor,
h2:hover a.anchor,
h3:hover a.anchor,
h4:hover a.anchor,
h5:hover a.anchor,
h6:hover a.anchor {
    text-decoration: none;
}
h1 tt,
h1 code {
    font-size: inherit;
}
h2 tt,
h2 code {
    font-size: inherit;
}
h3 tt,
h3 code {
    font-size: inherit;
}
h4 tt,
h4 code {
    font-size: inherit;
}
h5 tt,
h5 code {
    font-size: inherit;
}
h6 tt,
h6 code {
    font-size: inherit;
}
h1 {
    padding-bottom: .3em;
    font-size: 2.25em;
    line-height: 1.2;
    border-bottom: 1px solid #eee;
}
h2 {
   padding-bottom: .3em;
    font-size: 1.75em;
    line-height: 1.225;
    border-bottom: 1px solid #eee;
}
h3 {
    font-size: 1.5em;
    line-height: 1.43;
}
h4 {
    font-size: 1.25em;
}
h5 {
    font-size: 1em;
}
h6 {
   font-size: 1em;
    color: #777;
}
p,
blockquote,
ul,
ol,
dl,
table{
    margin: 0.8em 0;
}
li&gt;ol,
li&gt;ul {
    margin: 0 0;
}
hr {
    height: 2px;
    padding: 0;
    margin: 16px 0;
    background-color: #e7e7e7;
    border: 0 none;
    overflow: hidden;
    box-sizing: content-box;
}

li p.first {
    display: inline-block;
}
ul,
ol {
    padding-left: 30px;
}
ul:first-child,
ol:first-child {
    margin-top: 0;
}
ul:last-child,
ol:last-child {
    margin-bottom: 0;
}
blockquote {
    border-left: 4px solid #dfe2e5;
    padding: 0 15px;
    color: #777777;
}
blockquote blockquote {
    padding-right: 0;
}
table {
    padding: 0;
    word-break: initial;
}
table tr {
    border-top: 1px solid #dfe2e5;
    margin: 0;
    padding: 0;
}
table tr:nth-child(2n),
thead {
    background-color: #f8f8f8;
}
table tr th {
    font-weight: bold;
    border: 1px solid #dfe2e5;
    border-bottom: 0;
    text-align: left;
    margin: 0;
    padding: 6px 13px;
}
table tr td {
    border: 1px solid #dfe2e5;
    text-align: left;
    margin: 0;
    padding: 6px 13px;
}
table tr th:first-child,
table tr td:first-child {
    margin-top: 0;
}
table tr th:last-child,
table tr td:last-child {
    margin-bottom: 0;
}

.CodeMirror-lines {
    padding-left: 4px;
}

.code-tooltip {
    box-shadow: 0 1px 1px 0 rgba(0,28,36,.3);
    border-top: 1px solid #eef2f2;
}

.md-fences,
code,
tt {
    border: 1px solid #e7eaed;
    background-color: #f8f8f8;
    border-radius: 3px;
    padding: 0;
    padding: 2px 4px 0px 4px;
    font-size: 0.9em;
}

code {
    background-color: #f3f4f4;
    padding: 0 2px 0 2px;
}

.md-fences {
    margin-bottom: 15px;
    margin-top: 15px;
    padding-top: 8px;
    padding-bottom: 6px;
}


.md-task-list-item &gt; input {
  margin-left: -1.3em;
}

@media print {
    html {
        font-size: 13px;
    }
    table,
    pre {
        page-break-inside: avoid;
    }
    pre {
        word-wrap: break-word;
    }
}

.md-fences {
	background-color: #f8f8f8;
}
#write pre.md-meta-block {
	padding: 1rem;
    font-size: 85%;
    line-height: 1.45;
    background-color: #f7f7f7;
    border: 0;
    border-radius: 3px;
    color: #777777;
    margin-top: 0 !important;
}

.mathjax-block&gt;.code-tooltip {
	bottom: .375rem;
}

.md-mathjax-midline {
    background: #fafafa;
}

#write&gt;h3.md-focus:before{
	left: -1.5625rem;
	top: .375rem;
}
#write&gt;h4.md-focus:before{
	left: -1.5625rem;
	top: .285714286rem;
}
#write&gt;h5.md-focus:before{
	left: -1.5625rem;
	top: .285714286rem;
}
#write&gt;h6.md-focus:before{
	left: -1.5625rem;
	top: .285714286rem;
}
.md-image&gt;.md-meta {
    /*border: 1px solid #ddd;*/
    border-radius: 3px;
    padding: 2px 0px 0px 4px;
    font-size: 0.9em;
    color: inherit;
}

.md-tag {
    color: #a7a7a7;
    opacity: 1;
}

.md-toc {
    margin-top:20px;
    padding-bottom:20px;
}

.sidebar-tabs {
    border-bottom: none;
}

#typora-quick-open {
    border: 1px solid #ddd;
    background-color: #f8f8f8;
}

#typora-quick-open-item {
    background-color: #FAFAFA;
    border-color: #FEFEFE #e5e5e5 #e5e5e5 #eee;
    border-style: solid;
    border-width: 1px;
}

/** focus mode */
.on-focus-mode blockquote {
    border-left-color: rgba(85, 85, 85, 0.12);
}

header, .context-menu, .megamenu-content, footer{
    font-family: &quot;Segoe UI&quot;, &quot;Arial&quot;, sans-serif;
}

.file-node-content:hover .file-node-icon,
.file-node-content:hover .file-node-open-state{
    visibility: visible;
}

.mac-seamless-mode #typora-sidebar {
    background-color: #fafafa;
    background-color: var(--side-bar-bg-color);
}

.md-lang {
    color: #b4654d;
}

.html-for-mac .context-menu {
    --item-hover-bg-color: #E6F0FE;
}

#md-notification .btn {
    border: 0;
}

.dropdown-menu .divider {
    border-color: #e5e5e5;
}

 .typora-export li, .typora-export p, .typora-export,  .footnote-line {white-space: normal;}
&lt;/style&gt;
&lt;/head&gt;
&lt;body class='typora-export' &gt;
&lt;div  id='write'  class = 'is-mac'&gt;&lt;h3&gt;&lt;a name='header-n0' class='md-header-anchor '&gt;&lt;/a&gt;목차&lt;/h3&gt;&lt;ul&gt;&lt;li&gt;1.DynamoDB 설명&lt;/li&gt;&lt;li&gt;2.DynamoDB 스키마&lt;/li&gt;&lt;li&gt;3.DynamoDB - CRUD, Query, Scan&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;hr /&gt;&lt;h4&gt;&lt;a name='header-n697' class='md-header-anchor '&gt;&lt;/a&gt;2019.03.11 업데이트&lt;/h4&gt;&lt;p&gt;로컬 보조 인덱스(Local Secondary index), 글로벌 보조 인덱스(Global Secondary Index) 부분 추가하였습니다.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;hr /&gt;&lt;p&gt;&lt;a href='https://software-creator.tistory.com/14'&gt;저번 시간&lt;/a&gt;에는 AWS Lambda와 API Gateway를 쓰는 법을 알아보았는데요.&lt;/p&gt;&lt;p&gt;이번 시간에는 DynamoDB 쓰는 법을 알아보도록 하겠습니다.&lt;/p&gt;&lt;p&gt;모든 튜토리얼이 끝나면 아래 그림과 같은 구조가 될 거에요!&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;img src='https://user-images.githubusercontent.com/13621579/49525336-e3a6d080-f8f0-11e8-90c5-b68b7e5e74a6.png' alt='alt text' referrerPolicy='no-referrer' /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;이 예제의 코드는 자바스크립트로 작성되었습니다. &lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h3&gt;&lt;a name='header-n17' class='md-header-anchor '&gt;&lt;/a&gt;DynamoDB란?&lt;/h3&gt;&lt;p&gt;DynamoDB(다이나모디비)는 키-밸류 데이터베이스입니다.&lt;/p&gt;&lt;p&gt;NoSQL방식이라서 확장이 간편하고 사용한만큼만 요금을 내는 구조입니다.&lt;/p&gt;&lt;p&gt;DynamoDB는 스키마를 복잡하게 잡지 않아도 되는 게 장점입니다.&lt;/p&gt;&lt;p&gt;스키마와 상관없이 데이터를 추가가하는 게 가능하기 때문이에요.&lt;/p&gt;&lt;p&gt;DynamoDB는 또한 빠르고 안정성 있게 확장이 가능합니다.&lt;/p&gt;&lt;p&gt;다만 정렬용으로는 좀 맞지 않습니다.&lt;/p&gt;&lt;p&gt;정렬을 다채롭게 하는 것도 가능하긴 한데, SQL 데이터베이스에 비하면 좀 까다롭습니다. &lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h3&gt;&lt;a name='header-n25' class='md-header-anchor '&gt;&lt;/a&gt;1. DynamoDB - 테이블 만들기&lt;/h3&gt;&lt;h4&gt;&lt;a name='header-n26' class='md-header-anchor '&gt;&lt;/a&gt;1.1 - Table&lt;/h4&gt;&lt;p&gt;테이블은 데이터를 담는 그릇입니다.&lt;/p&gt;&lt;p&gt;DynamoDB는 관계형 데이터베이스가 아니기에 조인이 없습니다.&lt;/p&gt;&lt;p&gt;대신 파티션 키 (Partition Key)와 정렬 키 (Sort Key)만 있으면 됩니다.&lt;/p&gt;&lt;ul&gt;&lt;li&gt;파티션 키 (Parition Key) :  무조건 있어야함. 테이블에 있는 아이템을 어디다가 나눌지 정할 때 쓰임.  Hash Key라고도 불림. 파티션 키는 1개만 있어야 됨.&lt;/li&gt;&lt;li&gt;정렬 키 (Sort Key) : 정렬할 때 쓰임. 꼭 있어야되는 건 아님. Range Key라고도 불림.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;파티션 키와 정렬 키는 한번 정해지면은 바꿀 수 없습니다.&lt;/p&gt;&lt;p&gt;영화 데이터를 담은 테이블을 만들어볼께요&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h4&gt;&lt;a name='header-n314' class='md-header-anchor '&gt;&lt;/a&gt;1.1 - Table. 파티션 키만 사용&lt;/h4&gt;&lt;figure&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;movie name (Partition Key)&lt;/th&gt;&lt;th&gt;duration (minute)&lt;/th&gt;&lt;th&gt;date&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;집으로 가는 날&lt;/td&gt;&lt;td&gt;90&lt;/td&gt;&lt;td&gt;2018.09.10&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;놀러 가기 좋은 날&lt;/td&gt;&lt;td&gt;120&lt;/td&gt;&lt;td&gt;2017.02.05&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;여행 가고 싶은 날&lt;/td&gt;&lt;td&gt;150&lt;/td&gt;&lt;td&gt;2016.01.03&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/figure&gt;&lt;p&gt;영화 이름을 파티션 키로 잡아 보았습니다.&lt;/p&gt;&lt;p&gt;파티션 키만 쓸 경우 간단히 테이블을 만들 수 있는 게 장점이지만, 중복된 키가 있을 때 문제가 됩니다. &lt;/p&gt;&lt;p&gt;( 아마존은 &lt;strong&gt;e-mail_id, employee_no, customer_id + product_id&lt;/strong&gt; 처럼 중복되는 값이 없는 걸 권장합니다. )&lt;/p&gt;&lt;p&gt;영화 이름이 같을 경우 문제가 되겠죠?&lt;/p&gt;&lt;p&gt;데이터를 추가하거나, 업데이트할 때 어떤 걸 할지 모르게 되니까요.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h4&gt;&lt;a name='header-n373' class='md-header-anchor '&gt;&lt;/a&gt;1.1 - Table. 파티션 키와 정렬 키 사용&lt;/h4&gt;&lt;p&gt;위의 테이블에 정렬 키를 더해 볼게요. 영화에 따라 고유하게 부여된 ID 입니다. &lt;/p&gt;&lt;p&gt;이젠 영화 이름이 같아도 데이터를 추가하는 데 없어집니다.&lt;/p&gt;&lt;figure&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;movie name (Partition Key)&lt;/th&gt;&lt;th&gt;movie id (Range Key)&lt;/th&gt;&lt;th&gt;duration (minute)&lt;/th&gt;&lt;th&gt;date&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;집으로 가는 날&lt;/td&gt;&lt;td&gt;a8273uerie&lt;/td&gt;&lt;td&gt;90&lt;/td&gt;&lt;td&gt;2018.09.10&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;놀러 가기 좋은 날&lt;/td&gt;&lt;td&gt;e9a928grjf&lt;/td&gt;&lt;td&gt;120&lt;/td&gt;&lt;td&gt;2017.03.05&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;여행 가고 싶은 날&lt;/td&gt;&lt;td&gt;d23a8beqo&lt;/td&gt;&lt;td&gt;150&lt;/td&gt;&lt;td&gt;2016.01.03&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;여행 가고 싶은 날&lt;/td&gt;&lt;td&gt;abc2913eu&lt;/td&gt;&lt;td&gt;125&lt;/td&gt;&lt;td&gt;2014.06.15&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/figure&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;이제부터 실습을 해보도록 할께요.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h4&gt;&lt;a name='header-n38' class='md-header-anchor '&gt;&lt;/a&gt;**1.1.2 - 실제 사용할 테이블 &lt;/h4&gt;&lt;p&gt;이 테이블은 음식 정보를 담은 테이블입니다. &lt;/p&gt;&lt;p&gt;음식을 구분하는 id, 종류, 이름, 가격 등이 나와 있죠.&lt;/p&gt;&lt;figure&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;&lt;u&gt;type&lt;/u&gt;&lt;/th&gt;&lt;th style='text-align:left;' &gt;name&lt;/th&gt;&lt;th&gt;price&lt;/th&gt;&lt;th&gt;size&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;양식 (Western Food)&lt;/td&gt;&lt;td style='text-align:left;' &gt;까르보나라&lt;/td&gt;&lt;td&gt;13000&lt;/td&gt;&lt;td&gt;소&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;한식 (Korean Food)&lt;/td&gt;&lt;td style='text-align:left;' &gt;족발&lt;/td&gt;&lt;td&gt;33000&lt;/td&gt;&lt;td&gt;중&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;중식 (Chinese Food)&lt;/td&gt;&lt;td style='text-align:left;' &gt;짜장면&lt;/td&gt;&lt;td&gt;55000&lt;/td&gt;&lt;td&gt;대&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/figure&gt;&lt;p&gt;테이블을 만들 때는 파티션 키 (Paritition Key, 필수)를 정해줘야합니다. 정렬 키(Sort Key)도 있으면 좋으니 만들도록 할께요.&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;p&gt;파티션키 (Partition Key) - &lt;strong&gt;type&lt;/strong&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;파티션키는 필수입니다!&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;정렬 키 (Sort key) - &lt;strong&gt;name&lt;/strong&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;필수는 아닙니다. &lt;/li&gt;&lt;li&gt;정렬할 때 써요.  &lt;/li&gt;&lt;li&gt;다른 키로 정렬하고 싶으면 두번째 정렬 키 (Local Secondary Index나, Global Secondary Index )를 정해주면 됩니다. &lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h4&gt;&lt;a name='header-n72' class='md-header-anchor '&gt;&lt;/a&gt;1.2 item(항목)&lt;/h4&gt;&lt;p&gt;아이템은 테이블에 있는 각각의 행을 말합니다.&lt;/p&gt;&lt;p&gt;위의 음식 테이블에서는 (1,양식,까르보나라,13000,소)가 아이템이 되겠지요.&lt;/p&gt;&lt;p&gt;아이템에 있는 항목은 키(partition key, sort key)만 뺴고 수정할 수 있습니다.&lt;/p&gt;&lt;p&gt;partition key와 sort key를 수정하려면 지우고 새로 만드는 수 밖에 없습니다.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h4&gt;&lt;a name='header-n78' class='md-header-anchor '&gt;&lt;/a&gt;1.3 데이터 타입&lt;/h4&gt;&lt;p&gt;DynamoDB의 데이터는 크게 3가지 타입이 있습니다.&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Scalar Type: Number(숫자, N으로 표시), String(문자, S로 표시), Binary(B로 표시), Boolean and Null&lt;/li&gt;&lt;li&gt;Document Types: 리스트와 맵&lt;/li&gt;&lt;li&gt;Set Types: 숫자 집합(Number Set),  문자 집합(String Set), Binary Set(이진자료형 집합)&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h3&gt;&lt;a name='header-n89' class='md-header-anchor '&gt;&lt;/a&gt;2. DynamoDB 테이블 만들기&lt;/h3&gt;&lt;h4&gt;&lt;a name='header-n90' class='md-header-anchor '&gt;&lt;/a&gt;2.1. module 설치&lt;/h4&gt;&lt;p&gt;이번 예제는 nodejs를 써서 진행하도록 하겠습니다.&lt;/p&gt;&lt;p&gt;일단 aws-sdk를 설치해주세요.&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;javascript&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;javascript&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;npm&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;install&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;cm-variable&quot;&gt;g&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;aws&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;cm-variable&quot;&gt;sdk&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 22px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 22px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;h4&gt;&lt;a name='header-n94' class='md-header-anchor '&gt;&lt;/a&gt;2.2. aws 설정하기&lt;/h4&gt;&lt;p&gt;aws-sdk가 설치되었으면 새로 자바크스립트 파일(&lt;strong&gt;dynamodb_start.js&lt;/strong&gt;)을 하나 만들어줍니다.&lt;/p&gt;&lt;p&gt;한국 리전을 설정해주고, 엔드포인트도 변경해줍니다.&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;javascript&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;javascript&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;span&gt;&lt;span&gt;​&lt;/span&gt;x&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-comment&quot;&gt;// dynamodb_start.js&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;cm-def&quot;&gt;AWS&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;require&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;'aws-sdk'&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;AWS&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;config&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;update&lt;/span&gt;({&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-property&quot;&gt;region&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;'ap-northeast-2'&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-property&quot;&gt;endpoint&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;&quot;http://dynamodb.ap-northeast-2.amazonaws.com&quot;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;})&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 154px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 154px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;h4&gt;&lt;a name='header-n98' class='md-header-anchor '&gt;&lt;/a&gt;2.3. 테이블 만들기&lt;/h4&gt;&lt;p&gt;이제 데이터베이스 테이블을 만들어볼께요.&lt;/p&gt;&lt;p&gt;일단 테이블을 어떻게 만들지 정합니다.&lt;/p&gt;&lt;p&gt;파티션 키나, 데이터 읽기 쓰기량을 정하는거죠.&lt;/p&gt;&lt;p&gt;지금 만들 테이블은 요리법이 담겨 있는 테이블입니다.&lt;/p&gt;&lt;p&gt;요리종류(type), 이름(name), 재료(ingredients) 등등이 들어있죠.&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;javascript&quot; style=&quot;page-break-inside: unset;&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;javascript&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;cm-def&quot;&gt;dynamodb&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;AWS&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;DynamoDB&lt;/span&gt;()&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;cm-def&quot;&gt;params&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-property&quot;&gt;TableName&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;tableName&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-property&quot;&gt;KeySchema&lt;/span&gt;: [&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;  {&lt;span class=&quot;cm-property&quot;&gt;AttributeName&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;&quot;type&quot;&lt;/span&gt;, &lt;span class=&quot;cm-property&quot;&gt;KeyType&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;&quot;HASH&quot;&lt;/span&gt;},&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;  {&lt;span class=&quot;cm-property&quot;&gt;AttributeName&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;&quot;name&quot;&lt;/span&gt;, &lt;span class=&quot;cm-property&quot;&gt;KeyType&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;&quot;RANGE&quot;&lt;/span&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  ],&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-property&quot;&gt;AttributeDefinitions&lt;/span&gt;: [&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;  {&lt;span class=&quot;cm-property&quot;&gt;AttributeName&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;&quot;type&quot;&lt;/span&gt;, &lt;span class=&quot;cm-property&quot;&gt;AttributeType&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;&quot;S&quot;&lt;/span&gt;},&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;  {&lt;span class=&quot;cm-property&quot;&gt;AttributeName&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;&quot;name&quot;&lt;/span&gt;, &lt;span class=&quot;cm-property&quot;&gt;AttributeType&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;&quot;S&quot;&lt;/span&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  ],&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-property&quot;&gt;ProvisionedThroughput&lt;/span&gt;: {&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-property&quot;&gt;ReadCapacityUnits&lt;/span&gt;: &lt;span class=&quot;cm-number&quot;&gt;1&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-property&quot;&gt;WriteCapacityUnits&lt;/span&gt;: &lt;span class=&quot;cm-number&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 374px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 374px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;정해진 설정을 바탕으로 테이블을 만듭니다.&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;javascript&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;javascript&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;dynamodb&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;createTable&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;params&lt;/span&gt;).&lt;span class=&quot;cm-property&quot;&gt;promise&lt;/span&gt;()&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  .&lt;span class=&quot;cm-property&quot;&gt;then&lt;/span&gt;(&lt;span class=&quot;cm-def&quot;&gt;req&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&amp;gt;&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;console&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;log&lt;/span&gt;(&lt;span class=&quot;cm-variable-2&quot;&gt;req&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  })&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  .&lt;span class=&quot;cm-property&quot;&gt;catch&lt;/span&gt;(&lt;span class=&quot;cm-def&quot;&gt;err&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&amp;gt;&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;console&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;log&lt;/span&gt;(&lt;span class=&quot;cm-variable-2&quot;&gt;err&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  })&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 154px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 154px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;제대로 만들어졌나요?&lt;/p&gt;&lt;p&gt;성공하면 아래와 같은 메시지가 나옵니다.&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;javascript&quot; style=&quot;page-break-inside: unset;&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;javascript&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;{ &lt;span class=&quot;cm-variable&quot;&gt;TableDescription&lt;/span&gt;:&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; { &lt;span class=&quot;cm-variable&quot;&gt;AttributeDefinitions&lt;/span&gt;:&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;  [ &amp;nbsp; { &lt;span class=&quot;cm-property&quot;&gt;AttributeName&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;'type'&lt;/span&gt;, &lt;span class=&quot;cm-property&quot;&gt;AttributeType&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;'S'&lt;/span&gt; },&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;  { &lt;span class=&quot;cm-property&quot;&gt;AttributeName&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;'name'&lt;/span&gt;, &lt;span class=&quot;cm-property&quot;&gt;AttributeType&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;'S'&lt;/span&gt; } ],&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;cm-variable&quot;&gt;TableName&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;'Food'&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;cm-variable&quot;&gt;KeySchema&lt;/span&gt;:&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;  [ { &lt;span class=&quot;cm-property&quot;&gt;AttributeName&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;'type'&lt;/span&gt;, &lt;span class=&quot;cm-property&quot;&gt;KeyType&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;'HASH'&lt;/span&gt; },&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;  { &lt;span class=&quot;cm-property&quot;&gt;AttributeName&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;'name'&lt;/span&gt;, &lt;span class=&quot;cm-property&quot;&gt;KeyType&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;'RANGE'&lt;/span&gt; } ],&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;cm-variable&quot;&gt;TableStatus&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;'CREATING'&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;cm-variable&quot;&gt;CreationDateTime&lt;/span&gt;: &lt;span class=&quot;cm-number&quot;&gt;2018&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;cm-number&quot;&gt;12&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;cm-number&quot;&gt;05&lt;/span&gt;&lt;span class=&quot;cm-variable&quot;&gt;T07&lt;/span&gt;:&lt;span class=&quot;cm-number&quot;&gt;25&lt;/span&gt;:&lt;span class=&quot;cm-number&quot;&gt;06.054&lt;/span&gt;&lt;span class=&quot;cm-variable&quot;&gt;Z&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;cm-variable&quot;&gt;ProvisionedThroughput&lt;/span&gt;:&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;  { &lt;span class=&quot;cm-variable&quot;&gt;NumberOfDecreasesToday&lt;/span&gt;: &lt;span class=&quot;cm-number&quot;&gt;0&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;ReadCapacityUnits&lt;/span&gt;: &lt;span class=&quot;cm-number&quot;&gt;1&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;WriteCapacityUnits&lt;/span&gt;: &lt;span class=&quot;cm-number&quot;&gt;1&lt;/span&gt; },&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;cm-variable&quot;&gt;TableSizeBytes&lt;/span&gt;: &lt;span class=&quot;cm-number&quot;&gt;0&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;cm-variable&quot;&gt;ItemCount&lt;/span&gt;: &lt;span class=&quot;cm-number&quot;&gt;0&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;cm-variable&quot;&gt;TableArn&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;'arn:aws:dynamodb:ap-northeast-2:xxxxxxxxxxxx:table/Food'&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;cm-variable&quot;&gt;TableId&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;'xxxxxxx-xxxx-xxxx-xxxx-xxxxxx'&lt;/span&gt; } }&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 396px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 396px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;이제 테이블에서 데이터(아이템)을 읽고, 쓰고, 업데이트 하는 걸 해보도록 할께요.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h3&gt;&lt;a name='header-n113' class='md-header-anchor '&gt;&lt;/a&gt;3. DynamoDB - 데이터 활용하기 (CRUD, QUERY)&lt;/h3&gt;&lt;h4&gt;&lt;a name='header-n114' class='md-header-anchor '&gt;&lt;/a&gt;3.1 CRUD 작업하기&lt;/h4&gt;&lt;h5&gt;&lt;a name='header-n115' class='md-header-anchor '&gt;&lt;/a&gt;3.1.1 ADD ITEM&lt;/h5&gt;&lt;p&gt;일단 아이템을 테이블에 넣어보도록 할께요.&lt;/p&gt;&lt;p&gt;아이템을 넣는 건 테이블을 만드는 거에 비하면 간단합니다.&lt;/p&gt;&lt;p&gt;아이템의 형태는 자유롭게 정할 수 있습니다만, partition key랑 sort key는 빼먹으면 안됩니다!&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;javascript&quot; style=&quot;page-break-inside: unset;&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;javascript&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;cm-def&quot;&gt;docClient&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;AWS&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;DynamoDB&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;DocumentClient&lt;/span&gt;()&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;cm-def&quot;&gt;tableName&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-string&quot;&gt;&quot;Food&quot;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;cm-def&quot;&gt;params&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-property&quot;&gt;TableName&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;tableName&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-property&quot;&gt;Item&lt;/span&gt;: {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-string cm-property&quot;&gt;&quot;type&quot;&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;&quot;Western&quot;&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-string cm-property&quot;&gt;&quot;name&quot;&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;&quot;Carbonara&quot;&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-string cm-property&quot;&gt;&quot;price&quot;&lt;/span&gt;: &lt;span class=&quot;cm-number&quot;&gt;13000&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-string cm-property&quot;&gt;&quot;ingredients&quot;&lt;/span&gt;: {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-string cm-property&quot;&gt;&quot;egg&quot;&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;&quot;1&quot;&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-string cm-property&quot;&gt;&quot;spaghetti&quot;&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;&quot;90g&quot;&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-string cm-property&quot;&gt;&quot;garlic&quot;&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;&quot;1&quot;&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-string cm-property&quot;&gt;&quot;bacon&quot;&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;&quot;50g&quot;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;docClient&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;put&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;params&lt;/span&gt;).&lt;span class=&quot;cm-property&quot;&gt;promise&lt;/span&gt;()&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;  .&lt;span class=&quot;cm-property&quot;&gt;then&lt;/span&gt;(&lt;span class=&quot;cm-def&quot;&gt;req&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&amp;gt;&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;console&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;log&lt;/span&gt;(&lt;span class=&quot;cm-variable-2&quot;&gt;req&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;  })&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;  .&lt;span class=&quot;cm-property&quot;&gt;catch&lt;/span&gt;(&lt;span class=&quot;cm-def&quot;&gt;err&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&amp;gt;&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;console&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;log&lt;/span&gt;(&lt;span class=&quot;cm-variable-2&quot;&gt;err&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;  })&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 550px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 550px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;잘 되었나요?&lt;/p&gt;&lt;p&gt;3개 정도 아이템을 더 더해보도록 하겠습니다.&lt;/p&gt;&lt;p&gt;이번에는 파일에서 읽을께요.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;code&gt;recipes.json&lt;/code&gt;&lt;/strong&gt;  - ingredients이 조금씩 달라요.&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;json&quot; style=&quot;page-break-inside: unset;&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;json&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;{&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-string cm-property&quot;&gt;&quot;items&quot;&lt;/span&gt;: [&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-string cm-property&quot;&gt;&quot;type&quot;&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;&quot;Western&quot;&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-string cm-property&quot;&gt;&quot;name&quot;&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;&quot;Carbonara&quot;&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-string cm-property&quot;&gt;&quot;price&quot;&lt;/span&gt;: &lt;span class=&quot;cm-number&quot;&gt;13000&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-string cm-property&quot;&gt;&quot;orderCount&quot;&lt;/span&gt;: &lt;span class=&quot;cm-number&quot;&gt;50&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-string cm-property&quot;&gt;&quot;ingredients&quot;&lt;/span&gt;: {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-string cm-property&quot;&gt;&quot;egg&quot;&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;&quot;1&quot;&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-string cm-property&quot;&gt;&quot;spaghetti&quot;&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;&quot;90g&quot;&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-string cm-property&quot;&gt;&quot;garlic&quot;&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;&quot;1&quot;&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-string cm-property&quot;&gt;&quot;bacon&quot;&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;&quot;50g&quot;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  },&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-string cm-property&quot;&gt;&quot;type&quot;&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;&quot;Korean&quot;&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-string cm-property&quot;&gt;&quot;name&quot;&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;&quot;Spicy chicken stew&quot;&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-string cm-property&quot;&gt;&quot;price&quot;&lt;/span&gt;: &lt;span class=&quot;cm-number&quot;&gt;25000&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-string cm-property&quot;&gt;&quot;orderCount&quot;&lt;/span&gt;: &lt;span class=&quot;cm-number&quot;&gt;12&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-string cm-property&quot;&gt;&quot;ingredients&quot;&lt;/span&gt;: {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-string cm-property&quot;&gt;&quot;chicken&quot;&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;&quot;1&quot;&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-string cm-property&quot;&gt;&quot;potato&quot;&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;&quot;2&quot;&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-string cm-property&quot;&gt;&quot;onion&quot;&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;&quot;1&quot;&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-string cm-property&quot;&gt;&quot;carrot&quot;&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;&quot;1/3&quot;&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-string cm-property&quot;&gt;&quot;green onion&quot;&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;&quot;2&quot;&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-string cm-property&quot;&gt;&quot;water&quot;&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;&quot;600ml&quot;&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-string cm-property&quot;&gt;&quot;sesame seeds&quot;&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;&quot;little&quot;&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-string cm-property&quot;&gt;&quot;red pepper&quot;&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;&quot;2spoons&quot;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  },&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-string cm-property&quot;&gt;&quot;type&quot;&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;&quot;Korean&quot;&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-string cm-property&quot;&gt;&quot;name&quot;&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;&quot;Soybean pastestew&quot;&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-string cm-property&quot;&gt;&quot;price&quot;&lt;/span&gt;: &lt;span class=&quot;cm-number&quot;&gt;6000&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-string cm-property&quot;&gt;&quot;orderCount&quot;&lt;/span&gt;: &lt;span class=&quot;cm-number&quot;&gt;25&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-string cm-property&quot;&gt;&quot;ingredients&quot;&lt;/span&gt;: {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-string cm-property&quot;&gt;&quot;fermented soybean paste&quot;&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;&quot;1T&quot;&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-string cm-property&quot;&gt;&quot;anchovy broth&quot;&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;&quot;500ml&quot;&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-string cm-property&quot;&gt;&quot;pumpkin&quot;&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;&quot;1&quot;&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-string cm-property&quot;&gt;&quot;marbled&quot;&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;&quot;2 pieces&quot;&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-string cm-property&quot;&gt;&quot;red peper&quot;&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;&quot;1T&quot;&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-string cm-property&quot;&gt;&quot;bean paste&quot;&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;&quot;0.3 spoon&quot;&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-string cm-property&quot;&gt;&quot;onion&quot;&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;&quot;1 tablespoon&quot;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  },&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-string cm-property&quot;&gt;&quot;type&quot;&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;&quot;Western&quot;&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-string cm-property&quot;&gt;&quot;name&quot;&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;&quot;Cheese cake&quot;&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-string cm-property&quot;&gt;&quot;price&quot;&lt;/span&gt;: &lt;span class=&quot;cm-number&quot;&gt;13000&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-string cm-property&quot;&gt;&quot;orderCount&quot;&lt;/span&gt;: &lt;span class=&quot;cm-number&quot;&gt;77&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-string cm-property&quot;&gt;&quot;ingredients&quot;&lt;/span&gt;: {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-string cm-property&quot;&gt;&quot;honey maid graham cracker crumbs&quot;&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;&quot;1 3/4 cups&quot;&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-string cm-property&quot;&gt;&quot;butter, melted&quot;&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;&quot;1/3 cup&quot;&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-string cm-property&quot;&gt;&quot;sugar, divided&quot;&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;&quot;1 1/4 cups&quot;&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-string cm-property&quot;&gt;&quot;philadelphia cream cheese&quot;&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;&quot;3 packages(8 ounce)&quot;&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-string cm-property&quot;&gt;&quot;vanilla&quot;&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;&quot;2 teaspoons vanilla&quot;&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-string cm-property&quot;&gt;&quot;eggs&quot;&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;&quot;3&quot;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  ]&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 1342px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 1342px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;javascript&quot; style=&quot;page-break-inside: unset;&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;javascript&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;cm-def&quot;&gt;data&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;fs&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;readFileSync&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;&quot;recipes.json&quot;&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;cm-def&quot;&gt;recipes&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;JSON&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;parse&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;data&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;for&lt;/span&gt;(&lt;span class=&quot;cm-keyword&quot;&gt;let&lt;/span&gt; &lt;span class=&quot;cm-def&quot;&gt;index&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;recipes&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;items&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;let&lt;/span&gt; &lt;span class=&quot;cm-def&quot;&gt;item&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;recipes&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;items&lt;/span&gt;[&lt;span class=&quot;cm-variable&quot;&gt;index&lt;/span&gt;]&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;cm-def&quot;&gt;params&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-property&quot;&gt;TableName&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;tableName&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-property&quot;&gt;Item&lt;/span&gt;: &lt;span class=&quot;cm-variable-2&quot;&gt;item&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;docClient&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;put&lt;/span&gt;(&lt;span class=&quot;cm-variable-2&quot;&gt;params&lt;/span&gt;).&lt;span class=&quot;cm-property&quot;&gt;promise&lt;/span&gt;()&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;  .&lt;span class=&quot;cm-property&quot;&gt;then&lt;/span&gt;(&lt;span class=&quot;cm-def&quot;&gt;req&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&amp;gt;&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;console&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;log&lt;/span&gt;(&lt;span class=&quot;cm-variable-2&quot;&gt;req&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;  })&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;  .&lt;span class=&quot;cm-property&quot;&gt;catch&lt;/span&gt;(&lt;span class=&quot;cm-def&quot;&gt;err&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&amp;gt;&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;console&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;log&lt;/span&gt;(&lt;span class=&quot;cm-variable-2&quot;&gt;err&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;  })&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 440px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 440px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Item의 ingredients가 다르더라도 큰 문제없이 추가가 됩니다.&lt;/p&gt;&lt;p&gt;이런 유연함이 다이나모 디비의 장점이죠.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h4&gt;&lt;a name='header-n130' class='md-header-anchor '&gt;&lt;/a&gt;3.1.2 get item&lt;/h4&gt;&lt;p&gt;추가한 아이템을 불러와 볼께요.&lt;/p&gt;&lt;p&gt;여러 아이템을 한꺼번에 불러오려면 다른 방법(query, scan)을 써야되지만&lt;/p&gt;&lt;p&gt;아이템 1개만 가져올땐 get을 쓰면 됩니다.&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;javascript&quot; style=&quot;page-break-inside: unset;&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;javascript&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;x&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;cm-def&quot;&gt;docClient&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;AWS&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;DynamoDB&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;DocumentClient&lt;/span&gt;()&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;cm-def&quot;&gt;params&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-property&quot;&gt;TableName&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;&quot;Food&quot;&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-property&quot;&gt;Key&lt;/span&gt;: {&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-string cm-property&quot;&gt;&quot;type&quot;&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;&quot;Western&quot;&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-tab&quot; role=&quot;presentation&quot; cm-text=&quot;	&quot;&gt;    &lt;/span&gt;&lt;span class=&quot;cm-tab&quot; role=&quot;presentation&quot; cm-text=&quot;	&quot;&gt;    &lt;/span&gt;&lt;span class=&quot;cm-string cm-property&quot;&gt;&quot;name&quot;&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;&quot;Carbonara&quot;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;docClient&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;get&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;params&lt;/span&gt;).&lt;span class=&quot;cm-property&quot;&gt;promise&lt;/span&gt;()&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  .&lt;span class=&quot;cm-property&quot;&gt;then&lt;/span&gt;(&lt;span class=&quot;cm-def&quot;&gt;req&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&amp;gt;&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;console&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;log&lt;/span&gt;(&lt;span class=&quot;cm-variable-2&quot;&gt;req&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  })&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  .&lt;span class=&quot;cm-property&quot;&gt;catch&lt;/span&gt;(&lt;span class=&quot;cm-def&quot;&gt;err&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&amp;gt;&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;console&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;log&lt;/span&gt;(&lt;span class=&quot;cm-variable-2&quot;&gt;err&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  })&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 374px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 374px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;get을 쓸땐 꼭 Key를 적어줘야합니다.&lt;/p&gt;&lt;p&gt;잘 되면은 아래처럼 나올거에요.&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;json&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;json&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;{ &lt;span class=&quot;cm-property&quot;&gt;Item&lt;/span&gt;:&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; { &lt;span class=&quot;cm-property&quot;&gt;ingredients&lt;/span&gt;: { &lt;span class=&quot;cm-property&quot;&gt;garlic&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;'1'&lt;/span&gt;, &lt;span class=&quot;cm-property&quot;&gt;bacon&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;'50g'&lt;/span&gt;, &lt;span class=&quot;cm-property&quot;&gt;spaghetti&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;'90g'&lt;/span&gt;, &lt;span class=&quot;cm-property&quot;&gt;egg&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;'1'&lt;/span&gt; },&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;cm-property&quot;&gt;price&lt;/span&gt;: &lt;span class=&quot;cm-number&quot;&gt;13000&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;cm-property&quot;&gt;name&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;'Carbonara'&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;cm-property&quot;&gt;type&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;'Western'&lt;/span&gt; } }&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 110px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 110px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h4&gt;&lt;a name='header-n139' class='md-header-anchor '&gt;&lt;/a&gt;3.1.3 update item&lt;/h4&gt;&lt;p&gt;이번엔 아이템의 값을 수정할께요.&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;javascript&quot; style=&quot;page-break-inside: unset;&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;javascript&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;cm-def&quot;&gt;docClient&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;AWS&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;DynamoDB&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;DocumentClient&lt;/span&gt;()&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;cm-def&quot;&gt;params&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-property&quot;&gt;TableName&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;&quot;Food&quot;&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-property&quot;&gt;Key&lt;/span&gt;: {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-string cm-property&quot;&gt;&quot;type&quot;&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;&quot;Western&quot;&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-string cm-property&quot;&gt;&quot;name&quot;&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;&quot;Carbonara&quot;&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  },&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-property&quot;&gt;UpdateExpression&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;&quot;set price = :price&quot;&lt;/span&gt;, &lt;span class=&quot;cm-comment&quot;&gt;// 어떤 걸 수정할지 정해줘야합니다.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-property&quot;&gt;ExpressionAttributeValues&lt;/span&gt;: { &amp;nbsp;&lt;span class=&quot;cm-comment&quot;&gt;// 수정할 것의 값을 정해줘야합니다.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-string cm-property&quot;&gt;&quot;:price&quot;&lt;/span&gt;: &lt;span class=&quot;cm-number&quot;&gt;15000&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;docClient&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;update&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;params&lt;/span&gt;).&lt;span class=&quot;cm-property&quot;&gt;promise&lt;/span&gt;()&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  .&lt;span class=&quot;cm-property&quot;&gt;then&lt;/span&gt;(&lt;span class=&quot;cm-def&quot;&gt;res&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&amp;gt;&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;console&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;log&lt;/span&gt;(&lt;span class=&quot;cm-variable-2&quot;&gt;res&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  })&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  .&lt;span class=&quot;cm-property&quot;&gt;catch&lt;/span&gt;(&lt;span class=&quot;cm-def&quot;&gt;err&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&amp;gt;&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;console&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;log&lt;/span&gt;(&lt;span class=&quot;cm-variable-2&quot;&gt;err&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  })&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 440px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 440px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;방금 수정한 아이템을 불러와 보겠습니다.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;pre lang=&quot;javascript&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; spellcheck=&quot;false&quot; style=&quot;page-break-inside: unset;&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;javascript&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;cm-def&quot;&gt;docClient&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;AWS&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;DynamoDB&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;DocumentClient&lt;/span&gt;()&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;cm-def&quot;&gt;params&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-property&quot;&gt;TableName&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;&quot;Food&quot;&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-property&quot;&gt;Key&lt;/span&gt;: {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-string cm-property&quot;&gt;&quot;type&quot;&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;&quot;Western&quot;&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-tab&quot; role=&quot;presentation&quot; cm-text=&quot;	&quot;&gt;    &lt;/span&gt;&lt;span class=&quot;cm-tab&quot; role=&quot;presentation&quot; cm-text=&quot;	&quot;&gt;    &lt;/span&gt;&lt;span class=&quot;cm-string cm-property&quot;&gt;&quot;name&quot;&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;&quot;Carbonara&quot;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;docClient&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;get&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;params&lt;/span&gt;).&lt;span class=&quot;cm-property&quot;&gt;promise&lt;/span&gt;()&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  .&lt;span class=&quot;cm-property&quot;&gt;then&lt;/span&gt;(&lt;span class=&quot;cm-def&quot;&gt;req&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&amp;gt;&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;console&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;log&lt;/span&gt;(&lt;span class=&quot;cm-variable-2&quot;&gt;req&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  })&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  .&lt;span class=&quot;cm-property&quot;&gt;catch&lt;/span&gt;(&lt;span class=&quot;cm-def&quot;&gt;err&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&amp;gt;&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;console&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;log&lt;/span&gt;(&lt;span class=&quot;cm-variable-2&quot;&gt;err&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  })&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 374px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 374px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;price&lt;/strong&gt; 가 바뀌었죠? &lt;/p&gt;&lt;p&gt;이처럼 일반 값은 얼마든지 수정할 수 있습니다. &lt;/p&gt;&lt;p&gt;하지만 키(key), 테이블명(table name)은 수정이 안됩니다.&lt;/p&gt;&lt;p&gt;키는 한번 정하면 끝이니 주의하세요.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h4&gt;&lt;a name='header-n147' class='md-header-anchor '&gt;&lt;/a&gt;3.1.4 delete item&lt;/h4&gt;&lt;p&gt;아이템을 지워보겠습니다.&lt;/p&gt;&lt;p&gt;단순히 지우는 게 아니라 조건을 넣어보겠습니다.&lt;/p&gt;&lt;p&gt;모든 아이템을 다 지우면 곤란하니까요.&lt;/p&gt;&lt;p&gt;sql에서 &lt;strong&gt;where&lt;/strong&gt;를 쓰는 거랑 비슷합니다.&lt;/p&gt;&lt;p&gt;조건은 &lt;strong&gt;ConditionExpression&lt;/strong&gt; 을 써서 정합니다.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;javascript&quot; style=&quot;page-break-inside: unset;&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;javascript&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;cm-def&quot;&gt;docClient&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;AWS&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;DynamoDB&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;DocumentClient&lt;/span&gt;()&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;cm-def&quot;&gt;params&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-property&quot;&gt;TableName&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;tableName&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-property&quot;&gt;Key&lt;/span&gt;: {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-string cm-property&quot;&gt;&quot;type&quot;&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;&quot;Korean&quot;&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-string cm-property&quot;&gt;&quot;name&quot;&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;&quot;Soybean pastestew&quot;&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  },&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-property&quot;&gt;ConditionExpression&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;&quot;price &amp;lt;= :price&quot;&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-property&quot;&gt;ExpressionAttributeValues&lt;/span&gt;: {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-string cm-property&quot;&gt;&quot;:price&quot;&lt;/span&gt;: &lt;span class=&quot;cm-number&quot;&gt;8000&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;docClient&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;delete&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;params&lt;/span&gt;).&lt;span class=&quot;cm-property&quot;&gt;promise&lt;/span&gt;()&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  .&lt;span class=&quot;cm-property&quot;&gt;then&lt;/span&gt;(&lt;span class=&quot;cm-def&quot;&gt;res&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&amp;gt;&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;console&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;log&lt;/span&gt;(&lt;span class=&quot;cm-variable-2&quot;&gt;res&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  })&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  .&lt;span class=&quot;cm-property&quot;&gt;catch&lt;/span&gt;(&lt;span class=&quot;cm-def&quot;&gt;err&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&amp;gt;&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;console&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;log&lt;/span&gt;(&lt;span class=&quot;cm-variable-2&quot;&gt;err&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  })&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 462px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 462px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;잘 지워졌나요?&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;지워진 아이템을 가져오려고 하면(get) 아무것도 안 나옵니다.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;javascript&quot; style=&quot;page-break-inside: unset;&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;javascript&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;cm-def&quot;&gt;params&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-property&quot;&gt;TableName&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;&quot;Food&quot;&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-property&quot;&gt;Key&lt;/span&gt;: {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-string cm-property&quot;&gt;&quot;type&quot;&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;&quot;Korean&quot;&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-string cm-property&quot;&gt;&quot;name&quot;&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;&quot;Soybean pastestew&quot;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;docClient&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;get&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;params&lt;/span&gt;).&lt;span class=&quot;cm-property&quot;&gt;promise&lt;/span&gt;()&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  .&lt;span class=&quot;cm-property&quot;&gt;then&lt;/span&gt;(&lt;span class=&quot;cm-def&quot;&gt;req&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&amp;gt;&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;console&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;log&lt;/span&gt;(&lt;span class=&quot;cm-variable-2&quot;&gt;req&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  })&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  .&lt;span class=&quot;cm-property&quot;&gt;catch&lt;/span&gt;(&lt;span class=&quot;cm-def&quot;&gt;err&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&amp;gt;&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;console&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;log&lt;/span&gt;(&lt;span class=&quot;cm-variable-2&quot;&gt;err&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  })&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 352px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 352px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;지금까지 기본적인 CRUD (Create, Read, Update, Delete)를 알아보았습니다.&lt;/p&gt;&lt;p&gt;이제 데이터를 조회하는 법에서 알아보도록 할께요.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h4&gt;&lt;a name='header-n161' class='md-header-anchor '&gt;&lt;/a&gt;3.2 데이터 조회하기&lt;/h4&gt;&lt;p&gt;데이터를 조회하는 방법은 2가지 입니다. 쿼리랑 스캔인데요. 쿼리는 파티션 키를 바탕으로 데이터를 찾습니다. 스캔은 전체 테이블에서 데이터를 찾을 때 쓰구요. 일단 쿼리부터 설명해보겠습니다.&lt;/p&gt;&lt;h4&gt;&lt;a name='header-n163' class='md-header-anchor '&gt;&lt;/a&gt;3.2.1 query&lt;/h4&gt;&lt;p&gt;쿼리를 잘 쓰려면 파티션 키를 잘 정해야합니다. 파티션 키를 통해 데이터를 분산하고, 조회할 때 쓰기 때문이죠.&lt;/p&gt;&lt;p&gt;위에서 파티션 키를 음식 종류(type)로 정했죠. 음식 종류에 따라 음식을 찾기 위해서 입니다. 한식이 500종류, 일식이 200종류, 양식이 1000종류 있는 경우를 생각해 봅시다. 유저가 50대 한국인이여서 한식만 찾는다면 어떤 쿼리를 써야할까요?&lt;/p&gt;&lt;p&gt;&lt;strong&gt;한식&lt;/strong&gt;을 키로 두고 쿼리를 쓰면 되겠죠?&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;javascript&quot; style=&quot;page-break-inside: unset;&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;javascript&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;cm-def&quot;&gt;params&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-property&quot;&gt;TableName&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;&quot;Food&quot;&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-property&quot;&gt;KeyConditionExpression&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;&quot;#type = :type&quot;&lt;/span&gt;, &lt;span class=&quot;cm-comment&quot;&gt;// 어떤 키로 조회할지 정합니다.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-property&quot;&gt;ExpressionAttributeNames&lt;/span&gt;: { &lt;span class=&quot;cm-comment&quot;&gt;// 조회할 때 쓸 키의 이름, 별명을 정합니다.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-string cm-property&quot;&gt;&quot;#type&quot;&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;&quot;type&quot;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  },&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-property&quot;&gt;ExpressionAttributeValues&lt;/span&gt;: { &lt;span class=&quot;cm-comment&quot;&gt;// 조회할 키의 값을 정합니다.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-string cm-property&quot;&gt;&quot;:type&quot;&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;&quot;Korean&quot;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  }&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;docClient&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;query&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;params&lt;/span&gt;).&lt;span class=&quot;cm-property&quot;&gt;promise&lt;/span&gt;()&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;  .&lt;span class=&quot;cm-property&quot;&gt;then&lt;/span&gt;(&lt;span class=&quot;cm-def&quot;&gt;res&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&amp;gt;&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable-2&quot;&gt;res&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;Items&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;forEach&lt;/span&gt;(&lt;span class=&quot;cm-def&quot;&gt;item&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&amp;gt;&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;console&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;log&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;&quot;name :&quot;&lt;/span&gt;, &lt;span class=&quot;cm-variable-2&quot;&gt;item&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;name&lt;/span&gt;, &lt;span class=&quot;cm-string&quot;&gt;&quot;, type :&quot;&lt;/span&gt;, &lt;span class=&quot;cm-variable-2&quot;&gt;item&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;type&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;  })&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;  })&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;  .&lt;span class=&quot;cm-property&quot;&gt;catch&lt;/span&gt;(&lt;span class=&quot;cm-def&quot;&gt;err&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&amp;gt;&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;console&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;log&lt;/span&gt;(&lt;span class=&quot;cm-variable-2&quot;&gt;err&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;  })&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 462px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 462px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;쿼리 결과는 아래와 같이 나옵니다. 어렵진 않죠.&lt;/p&gt;&lt;p&gt;다만 다이나모디비의 쿼리는 SQL의 SELECT처럼 자유롭게는 못 쓰고, 파티션 키의 영향을 크게 받는다는 걸 명심하세요.&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;shell&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;shell&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;name : Soybean pastestew , type : Korean&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;name : Spicy chicken stew , type : Korean&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 44px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 44px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h4&gt;&lt;a name='header-n473' class='md-header-anchor '&gt;&lt;/a&gt;3.2.2 query - 다른 키로 정렬하기, 보조 인덱스&lt;/h4&gt;&lt;p&gt;다이나모 디비는 정렬키로 데이터로 정렬합니다. 하지만 정렬키 만으로는 부족할 때가 있죠. &lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;그때는 새 인덱스를 추가해 정렬 할 때 씁니다. &lt;/p&gt;&lt;p&gt;새 인덱스를 더하는 방법은 2가지입니다. &lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;하나는 로컬 보조 인덱스 (Local Secondary Index, 두번째 지역 인덱스)이고&lt;/p&gt;&lt;p&gt;다른 하나는 글로벌 보조 인덱스 (Global Secondary Index, 글로벌 두번째 키) 입니다.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;p&gt;로컬 보조 인덱스&lt;/p&gt;&lt;ul&gt;&lt;li&gt;테이블을 만들 때 정해야됨&lt;/li&gt;&lt;li&gt;테이블을 만들고 추가 못함&lt;/li&gt;&lt;li&gt;인덱스를 써서 정렬해도, 읽기 쓰기 사용량이 늘어나지 않음&lt;/li&gt;&lt;li&gt;강력한 일관성과 최종 일관성(Eventual consistency)을 보장함.&lt;/li&gt;&lt;li&gt;인덱스 크기 제한이 있음 (10 GB 이하)&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;p&gt;글로벌 보조 인텍스&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;p&gt;테이블 만들고도 추가할 수 있음&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;테이블을 복제해서 새 인덱스를 추가함. &lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;추가할 때마다, 읽기 쓰기 사용량이 늘어남&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;최종 일관성만 보장함.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;인덱스 크기 제한이 없음 (No partition key size limits)&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;일단 로컬 보조 인덱스부터 알아볼께요.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h4&gt;&lt;a name='header-n563' class='md-header-anchor '&gt;&lt;/a&gt;3.2.3. query - Local Secondray Index&lt;/h4&gt;&lt;p&gt;로컬 보조 인덱스는 테이블을 만들때만 정할 수 있습니다. &lt;/p&gt;&lt;p&gt;전에 만든 테이블을 지우고, 새로 테이블을 만들어 볼께요.&lt;/p&gt;&lt;h5&gt;&lt;a name='header-n588' class='md-header-anchor '&gt;&lt;/a&gt;&lt;code&gt;테이블 삭제&lt;/code&gt;&lt;/h5&gt;&lt;pre lang=&quot;javascript&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; spellcheck=&quot;false&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;javascript&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;dynamodb&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;deleteTable&lt;/span&gt;({&lt;span class=&quot;cm-property&quot;&gt;TableName&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;'Food'&lt;/span&gt;}).&lt;span class=&quot;cm-property&quot;&gt;promise&lt;/span&gt;()&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;  .&lt;span class=&quot;cm-property&quot;&gt;then&lt;/span&gt;(&lt;span class=&quot;cm-def&quot;&gt;req&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&amp;gt;&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;console&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;log&lt;/span&gt;(&lt;span class=&quot;cm-variable-2&quot;&gt;req&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;  })&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;  .&lt;span class=&quot;cm-property&quot;&gt;catch&lt;/span&gt;(&lt;span class=&quot;cm-def&quot;&gt;err&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&amp;gt;&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;console&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;log&lt;/span&gt;(&lt;span class=&quot;cm-variable-2&quot;&gt;err&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;  })&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 154px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 154px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;음식의 가격별로 쿼리할 수 있게, price를 새로운 인덱스로 정하겠습니다.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h5&gt;&lt;a name='header-n582' class='md-header-anchor '&gt;&lt;/a&gt;&lt;code&gt;인덱스 있는 새 테이블 만들기&lt;/code&gt;&lt;/h5&gt;&lt;pre lang=&quot;javascript&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; spellcheck=&quot;false&quot; style=&quot;page-break-inside: unset;&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;javascript&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;x&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;cm-def&quot;&gt;params&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-property&quot;&gt;TableName&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;'Food'&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-property&quot;&gt;KeySchema&lt;/span&gt;: [&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;  { &lt;span class=&quot;cm-property&quot;&gt;AttributeName&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;&quot;type&quot;&lt;/span&gt;, &lt;span class=&quot;cm-property&quot;&gt;KeyType&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;&quot;HASH&quot;&lt;/span&gt; },&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;  { &lt;span class=&quot;cm-property&quot;&gt;AttributeName&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;&quot;name&quot;&lt;/span&gt;, &lt;span class=&quot;cm-property&quot;&gt;KeyType&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;&quot;RANGE&quot;&lt;/span&gt; },&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;  ],&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-property&quot;&gt;AttributeDefinitions&lt;/span&gt;: [&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;  { &lt;span class=&quot;cm-property&quot;&gt;AttributeName&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;&quot;type&quot;&lt;/span&gt;, &lt;span class=&quot;cm-property&quot;&gt;AttributeType&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;&quot;S&quot;&lt;/span&gt; },&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;  { &lt;span class=&quot;cm-property&quot;&gt;AttributeName&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;&quot;name&quot;&lt;/span&gt;, &lt;span class=&quot;cm-property&quot;&gt;AttributeType&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;&quot;S&quot;&lt;/span&gt; },&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;  { &lt;span class=&quot;cm-property&quot;&gt;AttributeName&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;&quot;price&quot;&lt;/span&gt;, &lt;span class=&quot;cm-property&quot;&gt;AttributeType&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;&quot;N&quot;&lt;/span&gt; } &lt;span class=&quot;cm-comment&quot;&gt;// 로컬 인덱스에 쓸 Attribute입니다.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;  ],&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-property&quot;&gt;LocalSecondaryIndexes&lt;/span&gt;: [&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;  {&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-property&quot;&gt;IndexName&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;&quot;IndexPrice&quot;&lt;/span&gt;, &lt;span class=&quot;cm-comment&quot;&gt;// Index 이름을 정해줘야합니다.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-property&quot;&gt;KeySchema&lt;/span&gt;: [&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;  { &lt;span class=&quot;cm-property&quot;&gt;AttributeName&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;&quot;type&quot;&lt;/span&gt;, &lt;span class=&quot;cm-property&quot;&gt;KeyType&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;&quot;HASH&quot;&lt;/span&gt; },&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;  { &lt;span class=&quot;cm-property&quot;&gt;AttributeName&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;&quot;price&quot;&lt;/span&gt;, &lt;span class=&quot;cm-property&quot;&gt;KeyType&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;&quot;RANGE&quot;&lt;/span&gt;} &lt;span class=&quot;cm-comment&quot;&gt;// price를 키로 정했습니다. &lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;  ],&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-property&quot;&gt;Projection&lt;/span&gt;: {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-property&quot;&gt;ProjectionType&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;&quot;ALL&quot;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;  ],&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-property&quot;&gt;ProvisionedThroughput&lt;/span&gt;: {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-property&quot;&gt;ReadCapacityUnits&lt;/span&gt;: &lt;span class=&quot;cm-number&quot;&gt;1&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-property&quot;&gt;WriteCapacityUnits&lt;/span&gt;: &lt;span class=&quot;cm-number&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;  },&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;dynamodb&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;createTable&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;params&lt;/span&gt;).&lt;span class=&quot;cm-property&quot;&gt;promise&lt;/span&gt;()&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;  .&lt;span class=&quot;cm-property&quot;&gt;then&lt;/span&gt;(&lt;span class=&quot;cm-def&quot;&gt;res&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&amp;gt;&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;console&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;log&lt;/span&gt;(&lt;span class=&quot;cm-variable-2&quot;&gt;res&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;  })&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;  .&lt;span class=&quot;cm-property&quot;&gt;catch&lt;/span&gt;(&lt;span class=&quot;cm-def&quot;&gt;err&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&amp;gt;&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;console&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;log&lt;/span&gt;(&lt;span class=&quot;cm-variable-2&quot;&gt;err&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;  })&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 858px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 858px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;테이블이 만들어졌나요?&lt;/p&gt;&lt;p&gt;이제 인덱스를 써서 쿼리를 할 수 있습니다.&lt;/p&gt;&lt;p&gt;테이블을 새로 만들었으니, 데이터를 넣어주세요 (위의 데이터 넣는 코드를 참고해주세요)&lt;/p&gt;&lt;p&gt;그럼 조회를 해보겠습니다. 가격 순으로 조회를 할거에요.&lt;/p&gt;&lt;h5&gt;&lt;a name='header-n615' class='md-header-anchor '&gt;&lt;/a&gt;&lt;code&gt;인덱스로 조회&lt;/code&gt;&lt;/h5&gt;&lt;pre lang=&quot;javascript&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; spellcheck=&quot;false&quot; style=&quot;page-break-inside: unset;&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;javascript&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;cm-def&quot;&gt;params&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-property&quot;&gt;TableName&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;'Food'&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-property&quot;&gt;IndexName&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;&quot;IndexPrice&quot;&lt;/span&gt;, &lt;span class=&quot;cm-comment&quot;&gt;// 어떤 인덱스를 쓸지 정해줘야합니다.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-property&quot;&gt;KeyConditionExpression&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;&quot;#type = :type&quot;&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-property&quot;&gt;ExpressionAttributeNames&lt;/span&gt;: {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-string cm-property&quot;&gt;&quot;#type&quot;&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;&quot;type&quot;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;  },&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-property&quot;&gt;ExpressionAttributeValues&lt;/span&gt; : {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-string cm-property&quot;&gt;&quot;:type&quot;&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;&quot;Korean&quot;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;  },&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-property&quot;&gt;ScanIndexForward&lt;/span&gt;: &lt;span class=&quot;cm-atom&quot;&gt;false&lt;/span&gt; &lt;span class=&quot;cm-comment&quot;&gt;// false면 내림차순, true면 오름차순입니다.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  }&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;docClient&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;query&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;params&lt;/span&gt;).&lt;span class=&quot;cm-property&quot;&gt;promise&lt;/span&gt;()&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;  .&lt;span class=&quot;cm-property&quot;&gt;then&lt;/span&gt;(&lt;span class=&quot;cm-def&quot;&gt;res&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&amp;gt;&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable-2&quot;&gt;res&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;Items&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;forEach&lt;/span&gt;(&lt;span class=&quot;cm-def&quot;&gt;item&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&amp;gt;&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;console&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;log&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;'item : '&lt;/span&gt;, &lt;span class=&quot;cm-variable-2&quot;&gt;item&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;  })&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;  })&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;  .&lt;span class=&quot;cm-property&quot;&gt;catch&lt;/span&gt;(&lt;span class=&quot;cm-def&quot;&gt;err&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&amp;gt;&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;console&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;log&lt;/span&gt;(&lt;span class=&quot;cm-variable-2&quot;&gt;err&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;  })&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 506px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 506px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;제대로 되었으면 음식이 가격순으로 나올 거에요.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h4&gt;&lt;a name='header-n492' class='md-header-anchor '&gt;&lt;/a&gt;3.2.3 query -  Global Secondary Index&lt;/h4&gt;&lt;p&gt;글로벌 보조 인덱스는 전에 만든 테이블을 써서 만듭니다. &lt;/p&gt;&lt;p&gt;인덱스로 쓰일 속성은 orderCount입니다. &lt;/p&gt;&lt;p&gt;주문량이 많은 음식순으로 정렬을 하려고 합니다~!&lt;/p&gt;&lt;pre lang=&quot;javascript&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; spellcheck=&quot;false&quot; style=&quot;page-break-inside: unset;&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;javascript&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;cm-def&quot;&gt;params&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-property&quot;&gt;TableName&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;tableName&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-property&quot;&gt;AttributeDefinitions&lt;/span&gt;: [&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;  { &lt;span class=&quot;cm-property&quot;&gt;AttributeName&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;&quot;type&quot;&lt;/span&gt;, &lt;span class=&quot;cm-property&quot;&gt;AttributeType&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;&quot;S&quot;&lt;/span&gt;},&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;  { &lt;span class=&quot;cm-property&quot;&gt;AttributeName&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;&quot;orderCount&quot;&lt;/span&gt;, &lt;span class=&quot;cm-property&quot;&gt;AttributeType&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;&quot;N&quot;&lt;/span&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;  ],&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-property&quot;&gt;GlobalSecondaryIndexUpdates&lt;/span&gt;: [ &lt;span class=&quot;cm-comment&quot;&gt;// 글로벌 인덱스를 정의합니다.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;  {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-string cm-property&quot;&gt;&quot;Create&quot;&lt;/span&gt;: {&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-property&quot;&gt;IndexName&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;&quot;IndexOrderCount&quot;&lt;/span&gt;, &lt;span class=&quot;cm-comment&quot;&gt;// 인덱스 이름을 정합니다.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-property&quot;&gt;KeySchema&lt;/span&gt;: [&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;  { &lt;span class=&quot;cm-property&quot;&gt;AttributeName&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;&quot;type&quot;&lt;/span&gt;, &lt;span class=&quot;cm-property&quot;&gt;KeyType&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;&quot;HASH&quot;&lt;/span&gt;  },&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;  { &lt;span class=&quot;cm-property&quot;&gt;AttributeName&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;&quot;orderCount&quot;&lt;/span&gt;, &lt;span class=&quot;cm-property&quot;&gt;KeyType&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;&quot;RANGE&quot;&lt;/span&gt; } &lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;  ],&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-property&quot;&gt;Projection&lt;/span&gt;: {&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-string cm-property&quot;&gt;&quot;ProjectionType&quot;&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;&quot;ALL&quot;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;  },&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-property&quot;&gt;ProvisionedThroughput&lt;/span&gt;: {&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-property&quot;&gt;ReadCapacityUnits&lt;/span&gt;: &lt;span class=&quot;cm-number&quot;&gt;1&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-property&quot;&gt;WriteCapacityUnits&lt;/span&gt;: &lt;span class=&quot;cm-number&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;  ]&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;dynamodb&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;updateTable&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;params&lt;/span&gt;).&lt;span class=&quot;cm-property&quot;&gt;promise&lt;/span&gt;() &lt;span class=&quot;cm-comment&quot;&gt;// 테이블을 업데이트합니다. 새로 만들지 않습니다.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;  .&lt;span class=&quot;cm-property&quot;&gt;then&lt;/span&gt;(&lt;span class=&quot;cm-def&quot;&gt;res&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&amp;gt;&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;console&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;log&lt;/span&gt;(&lt;span class=&quot;cm-variable-2&quot;&gt;res&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;  })&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;  .&lt;span class=&quot;cm-property&quot;&gt;catch&lt;/span&gt;(&lt;span class=&quot;cm-def&quot;&gt;err&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&amp;gt;&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;console&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;log&lt;/span&gt;(&lt;span class=&quot;cm-variable-2&quot;&gt;err&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;  })&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 726px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 726px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;글로벌 보조 인덱스를 만들었으니, 이 인덱스로 조회해 볼께요.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;pre lang=&quot;javascript&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; spellcheck=&quot;false&quot; style=&quot;page-break-inside: unset;&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;javascript&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;cm-def&quot;&gt;params&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-property&quot;&gt;TableName&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;tableName&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-property&quot;&gt;IndexName&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;&quot;IndexOrderCount&quot;&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-property&quot;&gt;KeyConditionExpression&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;&quot;#type =:type and #oc &amp;gt;= :orderCount&quot;&lt;/span&gt;, &lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-property&quot;&gt;ExpressionAttributeNames&lt;/span&gt;: {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-string cm-property&quot;&gt;&quot;#type&quot;&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;&quot;type&quot;&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-string cm-property&quot;&gt;&quot;#oc&quot;&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;&quot;orderCount&quot;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;  },&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-property&quot;&gt;ExpressionAttributeValues&lt;/span&gt;: {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-string cm-property&quot;&gt;&quot;:type&quot;&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;&quot;Korean&quot;&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-string cm-property&quot;&gt;&quot;:orderCount&quot;&lt;/span&gt;: &lt;span class=&quot;cm-number&quot;&gt;10&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;  }&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;docClient&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;query&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;params&lt;/span&gt;).&lt;span class=&quot;cm-property&quot;&gt;promise&lt;/span&gt;()&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;  .&lt;span class=&quot;cm-property&quot;&gt;then&lt;/span&gt;(&lt;span class=&quot;cm-def&quot;&gt;res&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&amp;gt;&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable-2&quot;&gt;res&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;Items&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;forEach&lt;/span&gt;(&lt;span class=&quot;cm-keyword&quot;&gt;function&lt;/span&gt; (&lt;span class=&quot;cm-def&quot;&gt;item&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;console&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;log&lt;/span&gt;(&lt;span class=&quot;cm-variable-2&quot;&gt;item&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;type&lt;/span&gt;, &lt;span class=&quot;cm-variable-2&quot;&gt;item&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;name&lt;/span&gt;, &lt;span class=&quot;cm-variable-2&quot;&gt;item&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;price&lt;/span&gt;, &lt;span class=&quot;cm-variable-2&quot;&gt;item&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;orderCount&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;  })&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;  })&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;  .&lt;span class=&quot;cm-property&quot;&gt;catch&lt;/span&gt;(&lt;span class=&quot;cm-def&quot;&gt;err&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&amp;gt;&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;console&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;log&lt;/span&gt;(&lt;span class=&quot;cm-variable-2&quot;&gt;err&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;  })&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 506px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 506px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;code&gt;조회 결과&lt;/code&gt; &lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;shell&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;shell&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;Korean Spicy chicken stew &lt;span class=&quot;cm-number&quot;&gt;25000&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;12&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;Korean Soybean pastestew &lt;span class=&quot;cm-number&quot;&gt;6000&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;25&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 44px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 44px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;orderCount(주문량) 순으로 조회가 되네요! &lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;이렇게 다이나모 디비도 정렬을 원하는 대로 할 수 있지만, &lt;/p&gt;&lt;p&gt;테이블 만들 때 인덱스를 정하거나, 나중에 추가해줘야하는 번거로움이 있습니다. &lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h4&gt;&lt;a name='header-n173' class='md-header-anchor '&gt;&lt;/a&gt;3.3 scan&lt;/h4&gt;&lt;p&gt;스캔은 전체 테이블에서 데이터를 찾을 때 사용합니다.&lt;/p&gt;&lt;p&gt;스캔은 데이터 양이 많을수록 처리량이 많아서 비효율적이 되죠.&lt;/p&gt;&lt;p&gt;그렇지만 필터를 쓰면 SQL을 쓰는 것처럼 편하게 데이터 조회가 가능한 게 장점입니다.&lt;/p&gt;&lt;p&gt;키를 지정하지 않아도 되는게 쿼리(query)와의 차이점이죠.&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;javascript&quot; style=&quot;page-break-inside: unset;&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;javascript&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-comment&quot;&gt;// scan시 쓰일 함수를 정의합니다.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;cm-def&quot;&gt;onScan&lt;/span&gt;(&lt;span class=&quot;cm-def&quot;&gt;err&lt;/span&gt;, &lt;span class=&quot;cm-def&quot;&gt;data&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;if&lt;/span&gt; (&lt;span class=&quot;cm-variable-2&quot;&gt;err&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;console&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;error&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;&quot;Unable to scan the table. Error JSON: &quot;&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;JSON&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;stringify&lt;/span&gt;(&lt;span class=&quot;cm-variable-2&quot;&gt;err&lt;/span&gt;, &lt;span class=&quot;cm-atom&quot;&gt;null&lt;/span&gt;, &lt;span class=&quot;cm-number&quot;&gt;2&lt;/span&gt;))&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  } &lt;span class=&quot;cm-keyword&quot;&gt;else&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;console&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;log&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;'Scan Succeeded'&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable-2&quot;&gt;data&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;Items&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;forEach&lt;/span&gt;(&lt;span class=&quot;cm-keyword&quot;&gt;function&lt;/span&gt;(&lt;span class=&quot;cm-def&quot;&gt;food&lt;/span&gt;){&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;console&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;log&lt;/span&gt;(&lt;span class=&quot;cm-variable-2&quot;&gt;food&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;  })&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;cm-def&quot;&gt;params&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &lt;span class=&quot;cm-property&quot;&gt;TableName&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;&quot;Food&quot;&lt;/span&gt;, &lt;span class=&quot;cm-comment&quot;&gt;// 스캔은 키가 없어도 됩니다.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;docClient&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;scan&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;params&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;onScan&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 418px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 418px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;실행을 하면 전체 데이터를 조회해서 출력합니다.&lt;/p&gt;&lt;p&gt;지금은 데이터가 몇개 안되지만 테이블이 클수록 양이 엄청나겠죠?&lt;/p&gt;&lt;p&gt;전체 데이터를 스캔하지 말고 필터해서 필요한 데이터만 쓰도록 할께요.&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;javascript&quot; style=&quot;page-break-inside: unset;&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;javascript&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;cm-def&quot;&gt;params&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-property&quot;&gt;TableName&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;&quot;Food&quot;&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-property&quot;&gt;ProjectionExpression&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;&quot;#name,#type,price&quot;&lt;/span&gt;, &lt;span class=&quot;cm-comment&quot;&gt;// 어떤 속성을 스캔할지 정함.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-property&quot;&gt;FilterExpression&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;&quot;price between :start_price and :end_price&quot;&lt;/span&gt;, &lt;span class=&quot;cm-comment&quot;&gt;// 데이터 필터링할 조건을 정함.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-property&quot;&gt;ExpressionAttributeNames&lt;/span&gt;: {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-string cm-property&quot;&gt;&quot;#name&quot;&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;&quot;name&quot;&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-string cm-property&quot;&gt;&quot;#type&quot;&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;&quot;type&quot;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  },&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-property&quot;&gt;ExpressionAttributeValues&lt;/span&gt;: {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-string cm-property&quot;&gt;&quot;:start_price&quot;&lt;/span&gt;: &lt;span class=&quot;cm-number&quot;&gt;5000&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-string cm-property&quot;&gt;&quot;:end_price&quot;&lt;/span&gt;: &lt;span class=&quot;cm-number&quot;&gt;20000&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;cm-def&quot;&gt;onScan&lt;/span&gt;(&lt;span class=&quot;cm-def&quot;&gt;err&lt;/span&gt;, &lt;span class=&quot;cm-def&quot;&gt;data&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;if&lt;/span&gt; (&lt;span class=&quot;cm-variable-2&quot;&gt;err&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;console&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;error&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;&quot;Unable to scan the table. Error JSON: &quot;&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;JSON&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;stringify&lt;/span&gt;(&lt;span class=&quot;cm-variable-2&quot;&gt;err&lt;/span&gt;, &lt;span class=&quot;cm-atom&quot;&gt;null&lt;/span&gt;, &lt;span class=&quot;cm-number&quot;&gt;2&lt;/span&gt;))&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  } &lt;span class=&quot;cm-keyword&quot;&gt;else&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;console&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;log&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;'Scan Succeeded'&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable-2&quot;&gt;data&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;Items&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;forEach&lt;/span&gt;(&lt;span class=&quot;cm-keyword&quot;&gt;function&lt;/span&gt; (&lt;span class=&quot;cm-def&quot;&gt;food&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;console&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;log&lt;/span&gt;(&lt;span class=&quot;cm-variable-2&quot;&gt;food&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;  })&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;docClient&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;scan&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;params&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;onScan&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 616px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 616px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;실행하면 아래처럼 나옵니다.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;json&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;json&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;{ &lt;span class=&quot;cm-property&quot;&gt;price&lt;/span&gt;: &lt;span class=&quot;cm-number&quot;&gt;15000&lt;/span&gt;, &lt;span class=&quot;cm-property&quot;&gt;name&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;'까르보나라'&lt;/span&gt;, &lt;span class=&quot;cm-property&quot;&gt;type&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;'Western'&lt;/span&gt; }&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;{ &lt;span class=&quot;cm-property&quot;&gt;price&lt;/span&gt;: &lt;span class=&quot;cm-number&quot;&gt;6000&lt;/span&gt;, &lt;span class=&quot;cm-property&quot;&gt;name&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;'차돌박이된장찌개'&lt;/span&gt;, &lt;span class=&quot;cm-property&quot;&gt;type&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;'Korean'&lt;/span&gt; }&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 44px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 44px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;필터링을 하면 필요한 값만 쓸 수 있습니다.&lt;/p&gt;&lt;p&gt;다만 필터링을 해도 테이블을 다 확인하는 건 동일하다고 하네요.&lt;/p&gt;&lt;p&gt;데이터베이스 입장에서는 필터를 하나, 안 하나 큰 차이가 없는 거지요.&lt;/p&gt;&lt;p&gt;스캔을 적게 써야하는 건 이때문입니다.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h3&gt;&lt;a name='header-n190' class='md-header-anchor '&gt;&lt;/a&gt;기타 주의할점 - 테이블명 짓기&lt;/h3&gt;&lt;p&gt;테이블이나 인덱스명을 정할 때는 규칙이 있습니다. 3~255자 사이의 글자여야하고, 다음의 문자만 포함할 수 있어요.&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;code&gt;a-z&lt;/code&gt;&lt;/li&gt;&lt;li&gt;&lt;code&gt;A-Z&lt;/code&gt;&lt;/li&gt;&lt;li&gt;&lt;code&gt;0-9&lt;/code&gt;&lt;/li&gt;&lt;li&gt;&lt;code&gt;_&lt;/code&gt; (underscore)&lt;/li&gt;&lt;li&gt;&lt;code&gt;-&lt;/code&gt; (dash)&lt;/li&gt;&lt;li&gt;&lt;code&gt;.&lt;/code&gt; (dot)&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;자세한 건 &lt;a href='https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/HowItWorks.NamingRulesDataTypes.html'&gt;아마존 공식 문서&lt;/a&gt; 를 참고해주세요.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h3&gt;&lt;a name='header-n208' class='md-header-anchor '&gt;&lt;/a&gt;기타 주의할점 - 다이나모 DB를 쓸 때 고려할점&lt;/h3&gt;&lt;p&gt;이 &lt;a href='https://emptystackdeveloper.wordpress.com/2015/08/16/dynamodb%EB%A5%BC-%EC%84%A0%ED%83%9D%ED%95%98%EA%B3%A0-%EC%8B%B6%EC%9D%80-%EB%8B%B9%EC%8B%A0%EC%97%90%EA%B2%8C-%ED%95%98%EA%B3%A0-%EC%8B%B6%EC%9D%80-%EB%A7%90/'&gt;글&lt;/a&gt;을 읽고 정리해 보았습니다. 공감이 가더군요.&lt;/p&gt;&lt;ul&gt;&lt;li&gt;SQL처럼 쿨하게 조회가 안된다. Key-Value 데이터베이스에 익숙하면 괜찮지만 RDMS에서 바로 왔으면 난감할 수도&lt;/li&gt;&lt;li&gt;개발 및 유지 보수가 간단하지 않다. 학습 곡선이 좀 있더군요.&lt;/li&gt;&lt;li&gt;해시키 잘 정해야한다. 중간에 못 바꾼다.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;장점은 꾸준히 빠르다. 확장이 편리하다 입니다.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h3&gt;&lt;a name='header-n219' class='md-header-anchor '&gt;&lt;/a&gt;기타 주의할점 - 스캔 효율적으로 쓰기&lt;/h3&gt;&lt;p&gt;아마존의 베스트 프랙티스를 요약해보았습니다.&lt;/p&gt;&lt;p&gt;&lt;a href='https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/bp-query-scan.html'&gt;Best Practice for Querying and Scanning&lt;/a&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;strong&gt;Reduce page size&lt;/strong&gt; - 스캔을 할 때는 페이지 크기를 줄이기를 권하고 있습니다. 기본값은 1mb인데 Limit 변수를 쓰면 한번에 읽는 페이지수를 조절할 수 있죠.&lt;/li&gt;&lt;li&gt;Isolate scan operations - 복제 테이블(shadow table)을 만들기를 권합니다. 특정 용도를 위해 테이블을 만들면 스캔때문에 생기는 병목 현상을 막을 수 있습니다. read capacity를 과도하게 쓰는 것도 피할 수 있죠.&lt;/li&gt;&lt;/ul&gt;&lt;h3&gt;&lt;a name='header-n228' class='md-header-anchor '&gt;&lt;/a&gt;마무리&lt;/h3&gt;&lt;p&gt;오늘은 다이나모 DB에 대해서 알아보았는데요.&lt;/p&gt;&lt;p&gt;다음에는 서버리스 프레임워크 (Serverless Framework)의 사용법과 람다, 다이나모 DB의 연결을 해보도록 하겠습니다.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;</description>
      <category>서버</category>
      <category>AWS</category>
      <category>aws dynamodb</category>
      <category>AWS Lambda</category>
      <category>dynamodb create</category>
      <category>dynamodb put</category>
      <category>dynamodb query</category>
      <category>dynamodb scan</category>
      <category>MySQL</category>
      <category>RDS</category>
      <category>다이나모디비 단점</category>
      <category>다이나모디비 장단점</category>
      <category>다이나모디비 장점</category>
      <category>서버리스</category>
      <category>서버리스 데이터베이스</category>
      <category>아마존 RDS</category>
      <category>아마존 다이나모db</category>
      <category>아마존 다이나모디비</category>
      <category>아마존 람다</category>
      <category>아마존 서버리스</category>
      <author>에드 신</author>
      <guid isPermaLink="true">https://software-creator.tistory.com/16</guid>
      <comments>https://software-creator.tistory.com/16#entry16comment</comments>
      <pubDate>Tue, 11 Dec 2018 01:31:38 +0900</pubDate>
    </item>
    <item>
      <title>더 효율적인 구글 검색을 위한 5가지 팁</title>
      <link>https://software-creator.tistory.com/15</link>
      <description>&lt;meta charset=&quot;UTF-8&quot;&gt;&lt;meta name=&quot;viewport&quot; content=&quot;width=device-width initial-scale=1&quot;&gt;
&lt;title&gt;더 효율적인 구글 검색을 위한 5가지 팁&lt;/title&gt;&lt;link href=&quot;https://fonts.loli.net/css?family=Open+Sans:400italic,700italic,700,400&amp;amp;subset=latin,latin-ext&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot;&gt;&lt;style type=&quot;text/css&quot;&gt;html {overflow-x: initial !important;}:root { --bg-color: #ffffff; --text-color: #333333; --select-text-bg-color: #B5D6FC; --select-text-font-color: auto; --monospace: &quot;Lucida Console&quot;,Consolas,&quot;Courier&quot;,monospace; }
html { font-size: 14px; background-color: var(--bg-color); color: var(--text-color); font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; -webkit-font-smoothing: antialiased; }
body { margin: 0px; padding: 0px; height: auto; bottom: 0px; top: 0px; left: 0px; right: 0px; font-size: 1rem; line-height: 1.42857143; overflow-x: hidden; background-image: inherit; background-size: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: inherit; background-position: inherit inherit; background-repeat: inherit inherit; }
iframe { margin: auto; }
a.url { word-break: break-all; }
a:active, a:hover { outline: 0px; }
.in-text-selection, ::selection { text-shadow: none; background: var(--select-text-bg-color); color: var(--select-text-font-color); }
#write { margin: 0px auto; height: auto; width: inherit; word-break: normal; word-wrap: break-word; position: relative; white-space: normal; overflow-x: visible; }
#write.first-line-indent p { text-indent: 2em; }
#write.first-line-indent li p, #write.first-line-indent p * { text-indent: 0px; }
#write.first-line-indent li { margin-left: 2em; }
.for-image #write { padding-left: 8px; padding-right: 8px; }
body.typora-export { padding-left: 30px; padding-right: 30px; }
.typora-export .footnote-line, .typora-export p { white-space: pre-wrap; }
@media screen and (max-width: 500px) { 
  body.typora-export { padding-left: 0px; padding-right: 0px; }
  .CodeMirror-sizer { margin-left: 0px !important; }
  .CodeMirror-gutters { display: none !important; }
}
#write li &gt; figure:first-child { margin-top: -20px; }
#write ol, #write ul { position: relative; }
img { max-width: 100%; vertical-align: middle; }
button, input, select, textarea { color: inherit; font-family: inherit; font-size: inherit; font-style: inherit; font-variant-caps: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; }
input[type=&quot;checkbox&quot;], input[type=&quot;radio&quot;] { line-height: normal; padding: 0px; }
*, ::after, ::before { box-sizing: border-box; }
#write h1, #write h2, #write h3, #write h4, #write h5, #write h6, #write p, #write pre { width: inherit; }
#write h1, #write h2, #write h3, #write h4, #write h5, #write h6, #write p { position: relative; }
h1, h2, h3, h4, h5, h6 { break-after: avoid-page; break-inside: avoid; orphans: 2; }
p { orphans: 4; }
h1 { font-size: 2rem; }
h2 { font-size: 1.8rem; }
h3 { font-size: 1.6rem; }
h4 { font-size: 1.4rem; }
h5 { font-size: 1.2rem; }
h6 { font-size: 1rem; }
.md-math-block, .md-rawblock, h1, h2, h3, h4, h5, h6, p { margin-top: 1rem; margin-bottom: 1rem; }
.hidden { display: none; }
.md-blockmeta { color: rgb(204, 204, 204); font-weight: 700; font-style: italic; }
a { cursor: pointer; }
sup.md-footnote { padding: 2px 4px; background-color: rgba(238, 238, 238, 0.701961); color: rgb(85, 85, 85); border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; cursor: pointer; }
sup.md-footnote a, sup.md-footnote a:hover { color: inherit; text-transform: inherit; text-decoration: inherit; }
#write input[type=&quot;checkbox&quot;] { cursor: pointer; width: inherit; height: inherit; }
figure { overflow-x: auto; margin: 1.2em 0px; max-width: calc(100% + 16px); padding: 0px; }
figure &gt; table { margin: 0px !important; }
tr { break-inside: avoid; break-after: auto; }
thead { display: table-header-group; }
table { border-collapse: collapse; border-spacing: 0px; width: 100%; overflow: auto; break-inside: auto; text-align: left; }
table.md-table td { min-width: 80px; }
.CodeMirror-gutters { border-right-width: 0px; background-color: inherit; }
.CodeMirror { text-align: left; }
.CodeMirror-placeholder { opacity: 0.3; }
.CodeMirror pre { padding: 0px 4px; }
.CodeMirror-lines { padding: 0px; }
div.hr:focus { cursor: none; }
#write pre { white-space: pre-wrap; }
#write.fences-no-line-wrapping pre { white-space: pre; }
#write pre.ty-contain-cm { white-space: normal; }
.CodeMirror-gutters { margin-right: 4px; }
.md-fences { font-size: 0.9rem; display: block; break-inside: avoid; text-align: left; overflow: visible; white-space: pre; background-image: inherit; background-size: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: inherit; position: relative !important; background-position: inherit inherit; background-repeat: inherit inherit; }
.md-diagram-panel { width: 100%; margin-top: 10px; text-align: center; padding-top: 0px; padding-bottom: 8px; overflow-x: auto; }
#write .md-fences.mock-cm { white-space: pre-wrap; }
.md-fences.md-fences-with-lineno { padding-left: 0px; }
#write.fences-no-line-wrapping .md-fences.mock-cm { white-space: pre; overflow-x: auto; }
.md-fences.mock-cm.md-fences-with-lineno { padding-left: 8px; }
.CodeMirror-line, twitterwidget { break-inside: avoid; }
.footnotes { opacity: 0.8; font-size: 0.9rem; margin-top: 1em; margin-bottom: 1em; }
.footnotes + .footnotes { margin-top: 0px; }
.md-reset { margin: 0px; padding: 0px; border: 0px; outline: 0px; vertical-align: top; text-decoration: none; text-shadow: none; float: none; position: static; width: auto; height: auto; white-space: nowrap; cursor: inherit; line-height: normal; font-weight: 400; text-align: left; box-sizing: content-box; direction: ltr; background-position: 0px 0px; background-repeat: initial initial; }
li div { padding-top: 0px; }
blockquote { margin: 1rem 0px; }
li .mathjax-block, li p { margin: 0.5rem 0px; }
li { margin: 0px; position: relative; }
blockquote &gt; :last-child { margin-bottom: 0px; }
blockquote &gt; :first-child, li &gt; :first-child { margin-top: 0px; }
.footnotes-area { color: rgb(136, 136, 136); margin-top: 0.714rem; padding-bottom: 0.143rem; white-space: normal; }
#write .footnote-line { white-space: pre-wrap; }
@media print { 
  body, html { border: 1px solid transparent; height: 99%; break-after: avoid-page; break-before: avoid-page; }
  #write { margin-top: 0px; border-color: transparent !important; }
  .typora-export * { -webkit-print-color-adjust: exact; }
  html.blink-to-pdf { font-size: 13px; }
  .typora-export #write { padding-left: 1cm; padding-right: 1cm; padding-bottom: 0px; break-after: avoid-page; }
  .typora-export #write::after { height: 0px; }
  @page { margin: 20mm 0px; }
}
.footnote-line { margin-top: 0.714em; font-size: 0.7em; }
a img, img a { cursor: pointer; }
pre.md-meta-block { font-size: 0.8rem; min-height: 0.8rem; white-space: pre-wrap; background-color: rgb(204, 204, 204); display: block; overflow-x: hidden; background-position: initial initial; background-repeat: initial initial; }
p &gt; .md-image:only-child:not(.md-img-error) img, p &gt; img:only-child { display: block; margin: auto; }
p &gt; .md-image:only-child { display: inline-block; width: 100%; }
#write .MathJax_Display { margin: 0.8em 0px 0px; }
.md-math-block { width: 100%; }
.md-math-block:not(:empty)::after { display: none; }
[contenteditable=&quot;true&quot;]:active, [contenteditable=&quot;true&quot;]:focus { outline: 0px; box-shadow: none; }
.md-task-list-item { position: relative; list-style-type: none; }
.task-list-item.md-task-list-item { padding-left: 0px; }
.md-task-list-item &gt; input { position: absolute; top: 0px; left: 0px; margin-left: -1.2em; margin-top: calc(1em - 10px); }
.math { font-size: 1rem; }
.md-toc { min-height: 3.58rem; position: relative; font-size: 0.9rem; border-top-left-radius: 10px; border-top-right-radius: 10px; border-bottom-right-radius: 10px; border-bottom-left-radius: 10px; }
.md-toc-content { position: relative; margin-left: 0px; }
.md-toc-content::after, .md-toc::after { display: none; }
.md-toc-item { display: block; color: rgb(65, 131, 196); }
.md-toc-item a { text-decoration: none; }
.md-toc-inner:hover { text-decoration: underline; }
.md-toc-inner { display: inline-block; cursor: pointer; }
.md-toc-h1 .md-toc-inner { margin-left: 0px; font-weight: 700; }
.md-toc-h2 .md-toc-inner { margin-left: 2em; }
.md-toc-h3 .md-toc-inner { margin-left: 4em; }
.md-toc-h4 .md-toc-inner { margin-left: 6em; }
.md-toc-h5 .md-toc-inner { margin-left: 8em; }
.md-toc-h6 .md-toc-inner { margin-left: 10em; }
@media screen and (max-width: 48em) { 
  .md-toc-h3 .md-toc-inner { margin-left: 3.5em; }
  .md-toc-h4 .md-toc-inner { margin-left: 5em; }
  .md-toc-h5 .md-toc-inner { margin-left: 6.5em; }
  .md-toc-h6 .md-toc-inner { margin-left: 8em; }
}
a.md-toc-inner { font-size: inherit; font-style: inherit; font-weight: inherit; line-height: inherit; }
.footnote-line a:not(.reversefootnote) { color: inherit; }
.md-attr { display: none; }
.md-fn-count::after { content: &quot;.&quot;; }
code, pre, samp, tt { font-family: var(--monospace); }
kbd { margin: 0px 0.1em; padding: 0.1em 0.6em; font-size: 0.8em; color: rgb(36, 39, 41); background-color: rgb(255, 255, 255); border: 1px solid rgb(173, 179, 185); border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; box-shadow: rgba(12, 13, 14, 0.2) 0px 1px 0px, rgb(255, 255, 255) 0px 0px 0px 2px inset; white-space: nowrap; vertical-align: middle; background-position: initial initial; background-repeat: initial initial; }
.md-comment { color: rgb(162, 127, 3); opacity: 0.8; font-family: var(--monospace); }
code { text-align: left; }
a.md-print-anchor { white-space: pre !important; border: none !important; display: inline-block !important; position: absolute !important; width: 1px !important; right: 0px !important; outline: 0px !important; text-shadow: initial !important; background-position: 0px 0px !important; background-repeat: initial initial !important; }
.md-inline-math .MathJax_SVG .noError { display: none !important; }
.md-math-block .MathJax_SVG_Display { text-align: center; margin: 0px; position: relative; text-indent: 0px; max-width: none; max-height: none; min-height: 0px; min-width: 100%; width: auto; overflow-y: hidden; display: block !important; }
.MathJax_SVG_Display, .md-inline-math .MathJax_SVG_Display { width: auto; margin: inherit; display: inline-block !important; }
.MathJax_SVG .MJX-monospace { font-family: var(--monospace); }
.MathJax_SVG .MJX-sans-serif { font-family: sans-serif; }
.MathJax_SVG { display: inline; font-style: normal; font-weight: 400; line-height: normal; zoom: 90%; text-indent: 0px; text-align: left; text-transform: none; letter-spacing: normal; word-spacing: normal; word-wrap: normal; white-space: nowrap; float: none; direction: ltr; max-width: none; max-height: none; min-width: 0px; min-height: 0px; border: 0px; padding: 0px; margin: 0px; }
.MathJax_SVG * { transition: none; }
.MathJax_SVG_Display svg { vertical-align: middle !important; margin-bottom: 0px !important; }
.os-windows.monocolor-emoji .md-emoji { font-family: &quot;Segoe UI Symbol&quot;, sans-serif; }
.md-diagram-panel &gt; svg { max-width: 100%; }
[lang=&quot;mermaid&quot;] svg, [lang=&quot;flow&quot;] svg { max-width: 100%; }
[lang=&quot;mermaid&quot;] .node text { font-size: 1rem; }
table tr th { border-bottom-width: 0px; }
video { max-width: 100%; display: block; margin: 0px auto; }
iframe { max-width: 100%; width: 100%; border: none; }
.highlight td, .highlight tr { border: 0px; }


:root {
    --side-bar-bg-color: #fafafa;
    --control-text-color: #777;
}

@include-when-export url(https://fonts.loli.net/css?family=Open+Sans:400italic,700italic,700,400&amp;subset=latin,latin-ext);

@font-face {
    font-family: 'Open Sans';
    font-style: normal;
    font-weight: normal;
    src: local('Open Sans Regular'),url('file:///Users/JcSnap/Library/Application%20Support/abnerworks.Typora/themes/github/400.woff') format('woff');
}

@font-face {
    font-family: 'Open Sans';
    font-style: italic;
    font-weight: normal;
    src: local('Open Sans Italic'),url('file:///Users/JcSnap/Library/Application%20Support/abnerworks.Typora/themes/github/400i.woff') format('woff');
}

@font-face {
    font-family: 'Open Sans';
    font-style: normal;
    font-weight: bold;
    src: local('Open Sans Bold'),url('file:///Users/JcSnap/Library/Application%20Support/abnerworks.Typora/themes/github/700.woff') format('woff');
}

@font-face {
    font-family: 'Open Sans';
    font-style: italic;
    font-weight: bold;
    src: local('Open Sans Bold Italic'),url('file:///Users/JcSnap/Library/Application%20Support/abnerworks.Typora/themes/github/700i.woff') format('woff');
}

html {
    font-size: 16px;
}

body {
    font-family: &quot;Open Sans&quot;,&quot;Clear Sans&quot;,&quot;Helvetica Neue&quot;,Helvetica,Arial,sans-serif;
    color: rgb(51, 51, 51);
    line-height: 1.6;
}

#write {
    max-width: 860px;
  	margin: 0 auto;
  	padding: 30px;
    padding-bottom: 100px;
}
#write &gt; ul:first-child,
#write &gt; ol:first-child{
    margin-top: 30px;
}

a {
    color: #4183C4;
}
h1,
h2,
h3,
h4,
h5,
h6 {
    position: relative;
    margin-top: 1rem;
    margin-bottom: 1rem;
    font-weight: bold;
    line-height: 1.4;
    cursor: text;
}
h1:hover a.anchor,
h2:hover a.anchor,
h3:hover a.anchor,
h4:hover a.anchor,
h5:hover a.anchor,
h6:hover a.anchor {
    /*background: url(&quot;file:///Users/JcSnap/Library/Application%20Support/images/modules/styleguide/para.png&quot;) no-repeat 10px center;*/
    text-decoration: none;
}
h1 tt,
h1 code {
    font-size: inherit;
}
h2 tt,
h2 code {
    font-size: inherit;
}
h3 tt,
h3 code {
    font-size: inherit;
}
h4 tt,
h4 code {
    font-size: inherit;
}
h5 tt,
h5 code {
    font-size: inherit;
}
h6 tt,
h6 code {
    font-size: inherit;
}
h1 {
    padding-bottom: .3em;
    font-size: 2.25em;
    line-height: 1.2;
    border-bottom: 1px solid #eee;
}
h2 {
   padding-bottom: .3em;
    font-size: 1.75em;
    line-height: 1.225;
    border-bottom: 1px solid #eee;
}
h3 {
    font-size: 1.5em;
    line-height: 1.43;
}
h4 {
    font-size: 1.25em;
}
h5 {
    font-size: 1em;
}
h6 {
   font-size: 1em;
    color: #777;
}
p,
blockquote,
ul,
ol,
dl,
table{
    margin: 0.8em 0;
}
li&gt;ol,
li&gt;ul {
    margin: 0 0;
}
hr {
    height: 2px;
    padding: 0;
    margin: 16px 0;
    background-color: #e7e7e7;
    border: 0 none;
    overflow: hidden;
    box-sizing: content-box;
}

li p.first {
    display: inline-block;
}
ul,
ol {
    padding-left: 30px;
}
ul:first-child,
ol:first-child {
    margin-top: 0;
}
ul:last-child,
ol:last-child {
    margin-bottom: 0;
}
blockquote {
    border-left: 4px solid #dfe2e5;
    padding: 0 15px;
    color: #777777;
}
blockquote blockquote {
    padding-right: 0;
}
table {
    padding: 0;
    word-break: initial;
}
table tr {
    border-top: 1px solid #dfe2e5;
    margin: 0;
    padding: 0;
}
table tr:nth-child(2n),
thead {
    background-color: #f8f8f8;
}
table tr th {
    font-weight: bold;
    border: 1px solid #dfe2e5;
    border-bottom: 0;
    text-align: left;
    margin: 0;
    padding: 6px 13px;
}
table tr td {
    border: 1px solid #dfe2e5;
    text-align: left;
    margin: 0;
    padding: 6px 13px;
}
table tr th:first-child,
table tr td:first-child {
    margin-top: 0;
}
table tr th:last-child,
table tr td:last-child {
    margin-bottom: 0;
}

.CodeMirror-lines {
    padding-left: 4px;
}

.code-tooltip {
    box-shadow: 0 1px 1px 0 rgba(0,28,36,.3);
    border-top: 1px solid #eef2f2;
}

.md-fences,
code,
tt {
    border: 1px solid #e7eaed;
    background-color: #f8f8f8;
    border-radius: 3px;
    padding: 0;
    padding: 2px 4px 0px 4px;
    font-size: 0.9em;
}

code {
    background-color: #f3f4f4;
    padding: 0 4px 2px 4px;
}

.md-fences {
    margin-bottom: 15px;
    margin-top: 15px;
    padding: 0.2em 1em;
    padding-top: 8px;
    padding-bottom: 6px;
}


.md-task-list-item &gt; input {
  margin-left: -1.3em;
}

@media print {
    html {
        font-size: 13px;
    }
    table,
    pre {
        page-break-inside: avoid;
    }
    pre {
        word-wrap: break-word;
    }
}

.md-fences {
	background-color: #f8f8f8;
}
#write pre.md-meta-block {
	padding: 1rem;
    font-size: 85%;
    line-height: 1.45;
    background-color: #f7f7f7;
    border: 0;
    border-radius: 3px;
    color: #777777;
    margin-top: 0 !important;
}

.mathjax-block&gt;.code-tooltip {
	bottom: .375rem;
}

.md-mathjax-midline {
    background: #fafafa;
}

#write&gt;h3.md-focus:before{
	left: -1.5625rem;
	top: .375rem;
}
#write&gt;h4.md-focus:before{
	left: -1.5625rem;
	top: .285714286rem;
}
#write&gt;h5.md-focus:before{
	left: -1.5625rem;
	top: .285714286rem;
}
#write&gt;h6.md-focus:before{
	left: -1.5625rem;
	top: .285714286rem;
}
.md-image&gt;.md-meta {
    /*border: 1px solid #ddd;*/
    border-radius: 3px;
    padding: 2px 0px 0px 4px;
    font-size: 0.9em;
    color: inherit;
}

.md-tag {
    color: #a7a7a7;
    opacity: 1;
}

.md-toc { 
    margin-top:20px;
    padding-bottom:20px;
}

.sidebar-tabs {
    border-bottom: none;
}

#typora-quick-open {
    border: 1px solid #ddd;
    background-color: #f8f8f8;
}

#typora-quick-open-item {
    background-color: #FAFAFA;
    border-color: #FEFEFE #e5e5e5 #e5e5e5 #eee;
    border-style: solid;
    border-width: 1px;
}

/** focus mode */
.on-focus-mode blockquote {
    border-left-color: rgba(85, 85, 85, 0.12);
}

header, .context-menu, .megamenu-content, footer{
    font-family: &quot;Segoe UI&quot;, &quot;Arial&quot;, sans-serif;
}

.file-node-content:hover .file-node-icon,
.file-node-content:hover .file-node-open-state{
    visibility: visible;
}

.mac-seamless-mode #typora-sidebar {
    background-color: #fafafa;
    background-color: var(--side-bar-bg-color);
}

.md-lang {
    color: #b4654d;
}

.html-for-mac .context-menu {
    --item-hover-bg-color: #E6F0FE;
}

#md-notification .btn {
    border: 0;
}

.dropdown-menu .divider {
    border-color: #e5e5e5;
}

 .typora-export p, .typora-export .footnote-line {white-space: normal;} 
&lt;/style&gt;


&lt;div id=&quot;write&quot; class=&quot;is-mac&quot;&gt;&lt;p&gt;&lt;span style=&quot;font-size: 24pt;&quot;&gt;더 효율적인 구글 검색을 위한 5가지 팁&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h3&gt;&lt;a name=&quot;header-n227&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;1. 영어 단어 뜻 검색하기 &lt;/h3&gt;&lt;p&gt;영어 뜻을 찾아볼때 구글을 쓰면 정말 편리합니다. &lt;/p&gt;
&lt;p&gt;바로 뜻이랑 발음이 다 나오죠. &lt;/p&gt;
&lt;p&gt;define: 을 쓰면 됩니다. &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;영어 공부할때 이만한 게 없습니다.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;define : collate&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/13621579/49059389-09c2d580-f24c-11e8-86f2-92b1e41b112d.png&quot; alt=&quot;alt text&quot; referrerpolicy=&quot;no-referrer&quot;&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;define : plummet&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/13621579/49059390-0cbdc600-f24c-11e8-9038-558d2df8dbf5.png&quot; alt=&quot;alt text&quot; referrerpolicy=&quot;no-referrer&quot;&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h3&gt;&lt;a name=&quot;header-n16&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;2. 사이트 내부 검색&lt;/h3&gt;&lt;p&gt;자주 가는 커뮤니티나 사이트에서 원하는 글을 찾고 싶지만 &lt;/p&gt;
&lt;p&gt;통합 검색이 없어서 아쉬운 경우가 종종 있죠. &lt;/p&gt;
&lt;p&gt;이때 사이트 내부 검색을 쓰면 좋습니다. &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;사이트 내부 검색은 site:를 쓰면 됩니다.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;페북에서 독서모임을 찾고 싶다면?&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;site:facebook.com 독서모임&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;페북에서 블록체인 관련 글을 찾아보고 싶다면?&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;site:facebook.com 블록체인&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;코딩에 대해 알아보고 싶다면?&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;site:tistory.com 코딩&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;퇴사 이야기를 듣고 싶다면?&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;site:brunch.co.kr 퇴사&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;아마존 클라우드를 공부하고 싶다면?&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;site:medium.com aws lambda&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h3&gt;&lt;a name=&quot;header-n127&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;3. 특정 종류의 파일만 검색하기&lt;/h3&gt;&lt;p&gt;pdf나 이미지, 영상만 검색해보고 싶을 때가 있죠.&lt;/p&gt;
&lt;p&gt;이럴 때는 filetype: 를 쓰면 좋습니다.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;이력서 양식이 궁금하다면?&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;filetype:doc 이력서양식&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;스위프트 프로그래밍 관련 pdf를 찾아보고 싶다면?&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;filetype:pdf swift&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;코틀린 프로그래밍 관련 pdf를 찾아보고 싶다면?&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;filetype:pdf kotlin&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h5&gt;&lt;a name=&quot;header-n94&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;관련된 사이트 모두 보기&lt;/h5&gt;&lt;p&gt;어떤 사이트랑 유사한 사이트를 찾고 싶다면&lt;/p&gt;
&lt;p&gt; related:  를 쓰면 됩니다. &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;디자인 관련 사이트를 하나만 알고 있는데 더 알고 싶은 상황이다. 이때 related: 를 쓰면 좋죠.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;디자인 참고 사이트를 찾는다면?&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;related: dribbble.com&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;숙박 관련 사이트를 찾는다면?&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;related:airbnb.com&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h3&gt;&lt;a name=&quot;header-n36&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;4. 내가 원하는 정확한 단어로 검색하기&lt;/h3&gt;&lt;p&gt;구글이 뛰어난 검색 엔진이지만 여러 단어를 검색하면 딱 원하는 결과가 안 나오는 경우가 종종 있습니다.&lt;/p&gt;
&lt;p&gt;이때 &quot;&quot;를 써서 단어들을 감싸주면 내가 찾는 정보가 정확히 검색되게 됩니다.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&quot;inbound marketing&quot;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&quot;performance marketing&quot;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&quot;퍼포먼스 마케팅&quot;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h3&gt;&lt;a name=&quot;header-n78&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;5. 특정 단어 뺴고 검색하기&lt;/h3&gt;&lt;p&gt;검색을 하다보면 내가 원하지 않는 내용이 나올 때가 있죠.&lt;/p&gt;
&lt;p&gt;이때 - (마이너스 기호)를 쓰면 그 내용은 빠지고 검색되게 됩니다.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;코딩 -파이썬&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;마케팅 -애플&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h5&gt;&lt;a name=&quot;header-n212&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;마무리&lt;/h5&gt;&lt;p&gt;지금까지 더 나은 구글 검색 방법을 알아보았습니다.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;이번에 알게 된 구글 검색 팁을 활용해서 더 빠르게 공부, 일을 끝내기를 바랍니다. &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;30분 적게 일하는 삶을 누릴 수 있기를! &lt;/p&gt;&lt;/div&gt;

&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</description>
      <category>기타</category>
      <category>google search tip</category>
      <category>google site:</category>
      <category>같은 사이트 검색</category>
      <category>구글 related:</category>
      <category>구글 site:</category>
      <category>구글 검색 잘하기</category>
      <category>구글 팁</category>
      <category>구글검색팁</category>
      <category>구글팁</category>
      <category>내부사이트검색</category>
      <category>더나은검색</category>
      <author>에드 신</author>
      <guid isPermaLink="true">https://software-creator.tistory.com/15</guid>
      <comments>https://software-creator.tistory.com/15#entry15comment</comments>
      <pubDate>Tue, 27 Nov 2018 14:04:29 +0900</pubDate>
    </item>
    <item>
      <title>서버리스 앱 개발하기 1 - AWS Lambda와 AWS Gateway 연결</title>
      <link>https://software-creator.tistory.com/14</link>
      <description>&lt;meta charset=&quot;UTF-8&quot;&gt;&lt;meta name=&quot;viewport&quot; content=&quot;width=device-width initial-scale=1&quot;&gt;
&lt;title&gt;서버리스 앱 개발하기 1 - AWS Lambda와 AWS Gateway 연결&lt;/title&gt;&lt;link href=&quot;https://fonts.loli.net/css?family=Open+Sans:400italic,700italic,700,400&amp;amp;subset=latin,latin-ext&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot;&gt;&lt;style type=&quot;text/css&quot;&gt;html {overflow-x: initial !important;}:root { --bg-color: #ffffff; --text-color: #333333; --select-text-bg-color: #B5D6FC; --select-text-font-color: auto; --monospace: &quot;Lucida Console&quot;,Consolas,&quot;Courier&quot;,monospace; }
html { font-size: 14px; background-color: var(--bg-color); color: var(--text-color); font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; -webkit-font-smoothing: antialiased; }
body { margin: 0px; padding: 0px; height: auto; bottom: 0px; top: 0px; left: 0px; right: 0px; font-size: 1rem; line-height: 1.42857143; overflow-x: hidden; background-image: inherit; background-size: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: inherit; background-position: inherit inherit; background-repeat: inherit inherit; }
iframe { margin: auto; }
a.url { word-break: break-all; }
a:active, a:hover { outline: 0px; }
.in-text-selection, ::selection { text-shadow: none; background: var(--select-text-bg-color); color: var(--select-text-font-color); }
#write { margin: 0px auto; height: auto; width: inherit; word-break: normal; word-wrap: break-word; position: relative; white-space: normal; overflow-x: visible; }
#write.first-line-indent p { text-indent: 2em; }
#write.first-line-indent li p, #write.first-line-indent p * { text-indent: 0px; }
#write.first-line-indent li { margin-left: 2em; }
.for-image #write { padding-left: 8px; padding-right: 8px; }
body.typora-export { padding-left: 30px; padding-right: 30px; }
.typora-export .footnote-line, .typora-export p { white-space: pre-wrap; }
@media screen and (max-width: 500px) { 
  body.typora-export { padding-left: 0px; padding-right: 0px; }
  .CodeMirror-sizer { margin-left: 0px !important; }
  .CodeMirror-gutters { display: none !important; }
}
#write li &gt; figure:first-child { margin-top: -20px; }
#write ol, #write ul { position: relative; }
img { max-width: 100%; vertical-align: middle; }
button, input, select, textarea { color: inherit; font-family: inherit; font-size: inherit; font-style: inherit; font-variant-caps: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; }
input[type=&quot;checkbox&quot;], input[type=&quot;radio&quot;] { line-height: normal; padding: 0px; }
*, ::after, ::before { box-sizing: border-box; }
#write h1, #write h2, #write h3, #write h4, #write h5, #write h6, #write p, #write pre { width: inherit; }
#write h1, #write h2, #write h3, #write h4, #write h5, #write h6, #write p { position: relative; }
h1, h2, h3, h4, h5, h6 { break-after: avoid-page; break-inside: avoid; orphans: 2; }
p { orphans: 4; }
h1 { font-size: 2rem; }
h2 { font-size: 1.8rem; }
h3 { font-size: 1.6rem; }
h4 { font-size: 1.4rem; }
h5 { font-size: 1.2rem; }
h6 { font-size: 1rem; }
.md-math-block, .md-rawblock, h1, h2, h3, h4, h5, h6, p { margin-top: 1rem; margin-bottom: 1rem; }
.hidden { display: none; }
.md-blockmeta { color: rgb(204, 204, 204); font-weight: 700; font-style: italic; }
a { cursor: pointer; }
sup.md-footnote { padding: 2px 4px; background-color: rgba(238, 238, 238, 0.701961); color: rgb(85, 85, 85); border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; cursor: pointer; }
sup.md-footnote a, sup.md-footnote a:hover { color: inherit; text-transform: inherit; text-decoration: inherit; }
#write input[type=&quot;checkbox&quot;] { cursor: pointer; width: inherit; height: inherit; }
figure { overflow-x: auto; margin: 1.2em 0px; max-width: calc(100% + 16px); padding: 0px; }
figure &gt; table { margin: 0px !important; }
tr { break-inside: avoid; break-after: auto; }
thead { display: table-header-group; }
table { border-collapse: collapse; border-spacing: 0px; width: 100%; overflow: auto; break-inside: auto; text-align: left; }
table.md-table td { min-width: 80px; }
.CodeMirror-gutters { border-right-width: 0px; background-color: inherit; }
.CodeMirror { text-align: left; }
.CodeMirror-placeholder { opacity: 0.3; }
.CodeMirror pre { padding: 0px 4px; }
.CodeMirror-lines { padding: 0px; }
div.hr:focus { cursor: none; }
#write pre { white-space: pre-wrap; }
#write.fences-no-line-wrapping pre { white-space: pre; }
#write pre.ty-contain-cm { white-space: normal; }
.CodeMirror-gutters { margin-right: 4px; }
.md-fences { font-size: 0.9rem; display: block; break-inside: avoid; text-align: left; overflow: visible; white-space: pre; background-image: inherit; background-size: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: inherit; position: relative !important; background-position: inherit inherit; background-repeat: inherit inherit; }
.md-diagram-panel { width: 100%; margin-top: 10px; text-align: center; padding-top: 0px; padding-bottom: 8px; overflow-x: auto; }
#write .md-fences.mock-cm { white-space: pre-wrap; }
.md-fences.md-fences-with-lineno { padding-left: 0px; }
#write.fences-no-line-wrapping .md-fences.mock-cm { white-space: pre; overflow-x: auto; }
.md-fences.mock-cm.md-fences-with-lineno { padding-left: 8px; }
.CodeMirror-line, twitterwidget { break-inside: avoid; }
.footnotes { opacity: 0.8; font-size: 0.9rem; margin-top: 1em; margin-bottom: 1em; }
.footnotes + .footnotes { margin-top: 0px; }
.md-reset { margin: 0px; padding: 0px; border: 0px; outline: 0px; vertical-align: top; text-decoration: none; text-shadow: none; float: none; position: static; width: auto; height: auto; white-space: nowrap; cursor: inherit; line-height: normal; font-weight: 400; text-align: left; box-sizing: content-box; direction: ltr; background-position: 0px 0px; background-repeat: initial initial; }
li div { padding-top: 0px; }
blockquote { margin: 1rem 0px; }
li .mathjax-block, li p { margin: 0.5rem 0px; }
li { margin: 0px; position: relative; }
blockquote &gt; :last-child { margin-bottom: 0px; }
blockquote &gt; :first-child, li &gt; :first-child { margin-top: 0px; }
.footnotes-area { color: rgb(136, 136, 136); margin-top: 0.714rem; padding-bottom: 0.143rem; white-space: normal; }
#write .footnote-line { white-space: pre-wrap; }
@media print { 
  body, html { border: 1px solid transparent; height: 99%; break-after: avoid-page; break-before: avoid-page; }
  #write { margin-top: 0px; border-color: transparent !important; }
  .typora-export * { -webkit-print-color-adjust: exact; }
  html.blink-to-pdf { font-size: 13px; }
  .typora-export #write { padding-left: 1cm; padding-right: 1cm; padding-bottom: 0px; break-after: avoid-page; }
  .typora-export #write::after { height: 0px; }
  @page { margin: 20mm 0px; }
}
.footnote-line { margin-top: 0.714em; font-size: 0.7em; }
a img, img a { cursor: pointer; }
pre.md-meta-block { font-size: 0.8rem; min-height: 0.8rem; white-space: pre-wrap; background-color: rgb(204, 204, 204); display: block; overflow-x: hidden; background-position: initial initial; background-repeat: initial initial; }
p &gt; .md-image:only-child:not(.md-img-error) img, p &gt; img:only-child { display: block; margin: auto; }
p &gt; .md-image:only-child { display: inline-block; width: 100%; }
#write .MathJax_Display { margin: 0.8em 0px 0px; }
.md-math-block { width: 100%; }
.md-math-block:not(:empty)::after { display: none; }
[contenteditable=&quot;true&quot;]:active, [contenteditable=&quot;true&quot;]:focus { outline: 0px; box-shadow: none; }
.md-task-list-item { position: relative; list-style-type: none; }
.task-list-item.md-task-list-item { padding-left: 0px; }
.md-task-list-item &gt; input { position: absolute; top: 0px; left: 0px; margin-left: -1.2em; margin-top: calc(1em - 10px); }
.math { font-size: 1rem; }
.md-toc { min-height: 3.58rem; position: relative; font-size: 0.9rem; border-top-left-radius: 10px; border-top-right-radius: 10px; border-bottom-right-radius: 10px; border-bottom-left-radius: 10px; }
.md-toc-content { position: relative; margin-left: 0px; }
.md-toc-content::after, .md-toc::after { display: none; }
.md-toc-item { display: block; color: rgb(65, 131, 196); }
.md-toc-item a { text-decoration: none; }
.md-toc-inner:hover { text-decoration: underline; }
.md-toc-inner { display: inline-block; cursor: pointer; }
.md-toc-h1 .md-toc-inner { margin-left: 0px; font-weight: 700; }
.md-toc-h2 .md-toc-inner { margin-left: 2em; }
.md-toc-h3 .md-toc-inner { margin-left: 4em; }
.md-toc-h4 .md-toc-inner { margin-left: 6em; }
.md-toc-h5 .md-toc-inner { margin-left: 8em; }
.md-toc-h6 .md-toc-inner { margin-left: 10em; }
@media screen and (max-width: 48em) { 
  .md-toc-h3 .md-toc-inner { margin-left: 3.5em; }
  .md-toc-h4 .md-toc-inner { margin-left: 5em; }
  .md-toc-h5 .md-toc-inner { margin-left: 6.5em; }
  .md-toc-h6 .md-toc-inner { margin-left: 8em; }
}
a.md-toc-inner { font-size: inherit; font-style: inherit; font-weight: inherit; line-height: inherit; }
.footnote-line a:not(.reversefootnote) { color: inherit; }
.md-attr { display: none; }
.md-fn-count::after { content: &quot;.&quot;; }
code, pre, samp, tt { font-family: var(--monospace); }
kbd { margin: 0px 0.1em; padding: 0.1em 0.6em; font-size: 0.8em; color: rgb(36, 39, 41); background-color: rgb(255, 255, 255); border: 1px solid rgb(173, 179, 185); border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; box-shadow: rgba(12, 13, 14, 0.2) 0px 1px 0px, rgb(255, 255, 255) 0px 0px 0px 2px inset; white-space: nowrap; vertical-align: middle; background-position: initial initial; background-repeat: initial initial; }
.md-comment { color: rgb(162, 127, 3); opacity: 0.8; font-family: var(--monospace); }
code { text-align: left; }
a.md-print-anchor { white-space: pre !important; border: none !important; display: inline-block !important; position: absolute !important; width: 1px !important; right: 0px !important; outline: 0px !important; text-shadow: initial !important; background-position: 0px 0px !important; background-repeat: initial initial !important; }
.md-inline-math .MathJax_SVG .noError { display: none !important; }
.md-math-block .MathJax_SVG_Display { text-align: center; margin: 0px; position: relative; text-indent: 0px; max-width: none; max-height: none; min-height: 0px; min-width: 100%; width: auto; overflow-y: hidden; display: block !important; }
.MathJax_SVG_Display, .md-inline-math .MathJax_SVG_Display { width: auto; margin: inherit; display: inline-block !important; }
.MathJax_SVG .MJX-monospace { font-family: var(--monospace); }
.MathJax_SVG .MJX-sans-serif { font-family: sans-serif; }
.MathJax_SVG { display: inline; font-style: normal; font-weight: 400; line-height: normal; zoom: 90%; text-indent: 0px; text-align: left; text-transform: none; letter-spacing: normal; word-spacing: normal; word-wrap: normal; white-space: nowrap; float: none; direction: ltr; max-width: none; max-height: none; min-width: 0px; min-height: 0px; border: 0px; padding: 0px; margin: 0px; }
.MathJax_SVG * { transition: none; }
.MathJax_SVG_Display svg { vertical-align: middle !important; margin-bottom: 0px !important; }
.os-windows.monocolor-emoji .md-emoji { font-family: &quot;Segoe UI Symbol&quot;, sans-serif; }
.md-diagram-panel &gt; svg { max-width: 100%; }
[lang=&quot;mermaid&quot;] svg, [lang=&quot;flow&quot;] svg { max-width: 100%; }
[lang=&quot;mermaid&quot;] .node text { font-size: 1rem; }
table tr th { border-bottom-width: 0px; }
video { max-width: 100%; display: block; margin: 0px auto; }
iframe { max-width: 100%; width: 100%; border: none; }
.highlight td, .highlight tr { border: 0px; }


.CodeMirror { height: auto; }
.CodeMirror.cm-s-inner { background-image: inherit; background-size: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: inherit; background-position: inherit inherit; background-repeat: inherit inherit; }
.CodeMirror-scroll { overflow-y: hidden; overflow-x: auto; z-index: 3; }
.CodeMirror-gutter-filler, .CodeMirror-scrollbar-filler { background-color: rgb(255, 255, 255); }
.CodeMirror-gutters { border-right-width: 1px; border-right-style: solid; border-right-color: rgb(221, 221, 221); background-image: inherit; background-size: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: inherit; white-space: nowrap; background-position: inherit inherit; background-repeat: inherit inherit; }
.CodeMirror-linenumber { padding: 0px 3px 0px 5px; text-align: right; color: rgb(153, 153, 153); }
.cm-s-inner .cm-keyword { color: rgb(119, 0, 136); }
.cm-s-inner .cm-atom, .cm-s-inner.cm-atom { color: rgb(34, 17, 153); }
.cm-s-inner .cm-number { color: rgb(17, 102, 68); }
.cm-s-inner .cm-def { color: rgb(0, 0, 255); }
.cm-s-inner .cm-variable { color: rgb(0, 0, 0); }
.cm-s-inner .cm-variable-2 { color: rgb(0, 85, 170); }
.cm-s-inner .cm-variable-3 { color: rgb(0, 136, 85); }
.cm-s-inner .cm-string { color: rgb(170, 17, 17); }
.cm-s-inner .cm-property { color: rgb(0, 0, 0); }
.cm-s-inner .cm-operator { color: rgb(152, 26, 26); }
.cm-s-inner .cm-comment, .cm-s-inner.cm-comment { color: rgb(170, 85, 0); }
.cm-s-inner .cm-string-2 { color: rgb(255, 85, 0); }
.cm-s-inner .cm-meta { color: rgb(85, 85, 85); }
.cm-s-inner .cm-qualifier { color: rgb(85, 85, 85); }
.cm-s-inner .cm-builtin { color: rgb(51, 0, 170); }
.cm-s-inner .cm-bracket { color: rgb(153, 153, 119); }
.cm-s-inner .cm-tag { color: rgb(17, 119, 0); }
.cm-s-inner .cm-attribute { color: rgb(0, 0, 204); }
.cm-s-inner .cm-header, .cm-s-inner.cm-header { color: rgb(0, 0, 255); }
.cm-s-inner .cm-quote, .cm-s-inner.cm-quote { color: rgb(0, 153, 0); }
.cm-s-inner .cm-hr, .cm-s-inner.cm-hr { color: rgb(153, 153, 153); }
.cm-s-inner .cm-link, .cm-s-inner.cm-link { color: rgb(0, 0, 204); }
.cm-negative { color: rgb(221, 68, 68); }
.cm-positive { color: rgb(34, 153, 34); }
.cm-header, .cm-strong { font-weight: 700; }
.cm-del { text-decoration: line-through; }
.cm-em { font-style: italic; }
.cm-link { text-decoration: underline; }
.cm-error { color: red; }
.cm-invalidchar { color: red; }
.cm-constant { color: rgb(38, 139, 210); }
.cm-defined { color: rgb(181, 137, 0); }
div.CodeMirror span.CodeMirror-matchingbracket { color: rgb(0, 255, 0); }
div.CodeMirror span.CodeMirror-nonmatchingbracket { color: rgb(255, 34, 34); }
.cm-s-inner .CodeMirror-activeline-background { background-image: inherit; background-size: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: inherit; background-position: inherit inherit; background-repeat: inherit inherit; }
.CodeMirror { position: relative; overflow: hidden; }
.CodeMirror-scroll { height: 100%; outline: 0px; position: relative; box-sizing: content-box; background-image: inherit; background-size: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: inherit; background-position: inherit inherit; background-repeat: inherit inherit; }
.CodeMirror-sizer { position: relative; }
.CodeMirror-gutter-filler, .CodeMirror-hscrollbar, .CodeMirror-scrollbar-filler, .CodeMirror-vscrollbar { position: absolute; z-index: 6; display: none; }
.CodeMirror-vscrollbar { right: 0px; top: 0px; overflow: hidden; }
.CodeMirror-hscrollbar { bottom: 0px; left: 0px; overflow: hidden; }
.CodeMirror-scrollbar-filler { right: 0px; bottom: 0px; }
.CodeMirror-gutter-filler { left: 0px; bottom: 0px; }
.CodeMirror-gutters { position: absolute; left: 0px; top: 0px; padding-bottom: 30px; z-index: 3; }
.CodeMirror-gutter { white-space: normal; height: 100%; box-sizing: content-box; padding-bottom: 30px; margin-bottom: -32px; display: inline-block; }
.CodeMirror-gutter-wrapper { position: absolute; z-index: 4; border: none !important; background-position: 0px 0px !important; background-repeat: initial initial !important; }
.CodeMirror-gutter-background { position: absolute; top: 0px; bottom: 0px; z-index: 4; }
.CodeMirror-gutter-elt { position: absolute; cursor: default; z-index: 4; }
.CodeMirror-lines { cursor: text; }
.CodeMirror pre { border-top-left-radius: 0px; border-top-right-radius: 0px; border-bottom-right-radius: 0px; border-bottom-left-radius: 0px; border-width: 0px; font-family: inherit; font-size: inherit; margin: 0px; white-space: pre; word-wrap: normal; color: inherit; z-index: 2; position: relative; overflow: visible; background-position: 0px 0px; background-repeat: initial initial; }
.CodeMirror-wrap pre { word-wrap: break-word; white-space: pre-wrap; word-break: normal; }
.CodeMirror-code pre { border-right-width: 30px; border-right-style: solid; border-right-color: transparent; width: fit-content; }
.CodeMirror-wrap .CodeMirror-code pre { border-right-style: none; width: auto; }
.CodeMirror-linebackground { position: absolute; left: 0px; right: 0px; top: 0px; bottom: 0px; z-index: 0; }
.CodeMirror-linewidget { position: relative; z-index: 2; overflow: auto; }
.CodeMirror-wrap .CodeMirror-scroll { overflow-x: hidden; }
.CodeMirror-measure { position: absolute; width: 100%; height: 0px; overflow: hidden; visibility: hidden; }
.CodeMirror-measure pre { position: static; }
.CodeMirror div.CodeMirror-cursor { position: absolute; visibility: hidden; border-right-style: none; width: 0px; }
.CodeMirror div.CodeMirror-cursor { visibility: hidden; }
.CodeMirror-focused div.CodeMirror-cursor { visibility: inherit; }
.cm-searching { background-color: rgba(255, 255, 0, 0.4); background-position: initial initial; background-repeat: initial initial; }
@media print { 
  .CodeMirror div.CodeMirror-cursor { visibility: hidden; }
}


:root {
    --side-bar-bg-color: #fafafa;
    --control-text-color: #777;
}

@include-when-export url(https://fonts.loli.net/css?family=Open+Sans:400italic,700italic,700,400&amp;subset=latin,latin-ext);

@font-face {
    font-family: 'Open Sans';
    font-style: normal;
    font-weight: normal;
    src: local('Open Sans Regular'),url('file:///Users/JcSnap/Library/Application%20Support/abnerworks.Typora/themes/github/400.woff') format('woff');
}

@font-face {
    font-family: 'Open Sans';
    font-style: italic;
    font-weight: normal;
    src: local('Open Sans Italic'),url('file:///Users/JcSnap/Library/Application%20Support/abnerworks.Typora/themes/github/400i.woff') format('woff');
}

@font-face {
    font-family: 'Open Sans';
    font-style: normal;
    font-weight: bold;
    src: local('Open Sans Bold'),url('file:///Users/JcSnap/Library/Application%20Support/abnerworks.Typora/themes/github/700.woff') format('woff');
}

@font-face {
    font-family: 'Open Sans';
    font-style: italic;
    font-weight: bold;
    src: local('Open Sans Bold Italic'),url('file:///Users/JcSnap/Library/Application%20Support/abnerworks.Typora/themes/github/700i.woff') format('woff');
}

html {
    font-size: 16px;
}

body {
    font-family: &quot;Open Sans&quot;,&quot;Clear Sans&quot;,&quot;Helvetica Neue&quot;,Helvetica,Arial,sans-serif;
    color: rgb(51, 51, 51);
    line-height: 1.6;
}

#write {
    max-width: 860px;
  	margin: 0 auto;
  	padding: 30px;
    padding-bottom: 100px;
}
#write &gt; ul:first-child,
#write &gt; ol:first-child{
    margin-top: 30px;
}

a {
    color: #4183C4;
}
h1,
h2,
h3,
h4,
h5,
h6 {
    position: relative;
    margin-top: 1rem;
    margin-bottom: 1rem;
    font-weight: bold;
    line-height: 1.4;
    cursor: text;
}
h1:hover a.anchor,
h2:hover a.anchor,
h3:hover a.anchor,
h4:hover a.anchor,
h5:hover a.anchor,
h6:hover a.anchor {
    /*background: url(&quot;file:///Users/JcSnap/Library/Application%20Support/images/modules/styleguide/para.png&quot;) no-repeat 10px center;*/
    text-decoration: none;
}
h1 tt,
h1 code {
    font-size: inherit;
}
h2 tt,
h2 code {
    font-size: inherit;
}
h3 tt,
h3 code {
    font-size: inherit;
}
h4 tt,
h4 code {
    font-size: inherit;
}
h5 tt,
h5 code {
    font-size: inherit;
}
h6 tt,
h6 code {
    font-size: inherit;
}
h1 {
    padding-bottom: .3em;
    font-size: 2.25em;
    line-height: 1.2;
    border-bottom: 1px solid #eee;
}
h2 {
   padding-bottom: .3em;
    font-size: 1.75em;
    line-height: 1.225;
    border-bottom: 1px solid #eee;
}
h3 {
    font-size: 1.5em;
    line-height: 1.43;
}
h4 {
    font-size: 1.25em;
}
h5 {
    font-size: 1em;
}
h6 {
   font-size: 1em;
    color: #777;
}
p,
blockquote,
ul,
ol,
dl,
table{
    margin: 0.8em 0;
}
li&gt;ol,
li&gt;ul {
    margin: 0 0;
}
hr {
    height: 2px;
    padding: 0;
    margin: 16px 0;
    background-color: #e7e7e7;
    border: 0 none;
    overflow: hidden;
    box-sizing: content-box;
}

li p.first {
    display: inline-block;
}
ul,
ol {
    padding-left: 30px;
}
ul:first-child,
ol:first-child {
    margin-top: 0;
}
ul:last-child,
ol:last-child {
    margin-bottom: 0;
}
blockquote {
    border-left: 4px solid #dfe2e5;
    padding: 0 15px;
    color: #777777;
}
blockquote blockquote {
    padding-right: 0;
}
table {
    padding: 0;
    word-break: initial;
}
table tr {
    border-top: 1px solid #dfe2e5;
    margin: 0;
    padding: 0;
}
table tr:nth-child(2n),
thead {
    background-color: #f8f8f8;
}
table tr th {
    font-weight: bold;
    border: 1px solid #dfe2e5;
    border-bottom: 0;
    text-align: left;
    margin: 0;
    padding: 6px 13px;
}
table tr td {
    border: 1px solid #dfe2e5;
    text-align: left;
    margin: 0;
    padding: 6px 13px;
}
table tr th:first-child,
table tr td:first-child {
    margin-top: 0;
}
table tr th:last-child,
table tr td:last-child {
    margin-bottom: 0;
}

.CodeMirror-lines {
    padding-left: 4px;
}

.code-tooltip {
    box-shadow: 0 1px 1px 0 rgba(0,28,36,.3);
    border-top: 1px solid #eef2f2;
}

.md-fences,
code,
tt {
    border: 1px solid #e7eaed;
    background-color: #f8f8f8;
    border-radius: 3px;
    padding: 0;
    padding: 2px 4px 0px 4px;
    font-size: 0.9em;
}

code {
    background-color: #f3f4f4;
    padding: 0 4px 2px 4px;
}

.md-fences {
    margin-bottom: 15px;
    margin-top: 15px;
    padding: 0.2em 1em;
    padding-top: 8px;
    padding-bottom: 6px;
}


.md-task-list-item &gt; input {
  margin-left: -1.3em;
}

@media print {
    html {
        font-size: 13px;
    }
    table,
    pre {
        page-break-inside: avoid;
    }
    pre {
        word-wrap: break-word;
    }
}

.md-fences {
	background-color: #f8f8f8;
}
#write pre.md-meta-block {
	padding: 1rem;
    font-size: 85%;
    line-height: 1.45;
    background-color: #f7f7f7;
    border: 0;
    border-radius: 3px;
    color: #777777;
    margin-top: 0 !important;
}

.mathjax-block&gt;.code-tooltip {
	bottom: .375rem;
}

.md-mathjax-midline {
    background: #fafafa;
}

#write&gt;h3.md-focus:before{
	left: -1.5625rem;
	top: .375rem;
}
#write&gt;h4.md-focus:before{
	left: -1.5625rem;
	top: .285714286rem;
}
#write&gt;h5.md-focus:before{
	left: -1.5625rem;
	top: .285714286rem;
}
#write&gt;h6.md-focus:before{
	left: -1.5625rem;
	top: .285714286rem;
}
.md-image&gt;.md-meta {
    /*border: 1px solid #ddd;*/
    border-radius: 3px;
    padding: 2px 0px 0px 4px;
    font-size: 0.9em;
    color: inherit;
}

.md-tag {
    color: #a7a7a7;
    opacity: 1;
}

.md-toc { 
    margin-top:20px;
    padding-bottom:20px;
}

.sidebar-tabs {
    border-bottom: none;
}

#typora-quick-open {
    border: 1px solid #ddd;
    background-color: #f8f8f8;
}

#typora-quick-open-item {
    background-color: #FAFAFA;
    border-color: #FEFEFE #e5e5e5 #e5e5e5 #eee;
    border-style: solid;
    border-width: 1px;
}

/** focus mode */
.on-focus-mode blockquote {
    border-left-color: rgba(85, 85, 85, 0.12);
}

header, .context-menu, .megamenu-content, footer{
    font-family: &quot;Segoe UI&quot;, &quot;Arial&quot;, sans-serif;
}

.file-node-content:hover .file-node-icon,
.file-node-content:hover .file-node-open-state{
    visibility: visible;
}

.mac-seamless-mode #typora-sidebar {
    background-color: #fafafa;
    background-color: var(--side-bar-bg-color);
}

.md-lang {
    color: #b4654d;
}

.html-for-mac .context-menu {
    --item-hover-bg-color: #E6F0FE;
}

#md-notification .btn {
    border: 0;
}

.dropdown-menu .divider {
    border-color: #e5e5e5;
}

 .typora-export p, .typora-export .footnote-line {white-space: normal;} 
&lt;/style&gt;


&lt;div id=&quot;write&quot; class=&quot;is-mac&quot;&gt;&lt;p&gt;&lt;span style=&quot;font-size: 1rem;&quot;&gt;앞으로 서버리스로 앱 개발이란 주제로 3회간 연재를 해보려 합니다.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style=&quot;font-size: 1rem;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;ol&gt;&lt;li&gt;AWS Lambda와 AWS Gateway 연결해보기&lt;/li&gt;&lt;/ol&gt;&lt;ol start=&quot;2&quot;&gt;&lt;li&gt;AWS Lambda와 DynamoDB 연결하기, Serverless 프레임워크 사용 &lt;/li&gt;&lt;/ol&gt;&lt;ol start=&quot;3&quot;&gt;&lt;li&gt;AWS Lambda와 Flutter 연결하기&lt;/li&gt;&lt;/ol&gt;&lt;div&gt;&lt;span style=&quot;orphans: 4; font-size: 1rem;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;p&gt;사용할 서비스는 AWS Lambda, AWS API Gateway, Flutter 입니다.  &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;기존에 저는 파이어베이스를 1년 넘게 사용했었는데  복잡한 쿼리가 안 되는 치명적인 단점이 있더군요.  &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;파이어베이스가 처음 개발할 때는 정말 좋은데 클라이언트 단에 코드가 몰리는 경향이  &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;강하고 데이터베이스에 있는 데이터 관리가 쉽지 않아  다른 서비스를 고려하기 시작했습니다.  &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;그러다가 AWS Lambda를 알게 되었죠.  &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;서버가 있는지 없는지 신경 쓰지 않고 함수만 호출하면 되는게 람다입니다.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;람다를 쓰게 되면 서버가 죽었을 때 살리는 걱정을 하지 않아도 되는 장점이 있었습니다.  &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;게다가 커스터마이징도 가능하구요.  &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;반면 좀 상대적으로 느리다고 합니다.  &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;바로 콜드 스타트와 핫스타트때문인데요.  &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;오랫동안 람다 함수를 쓰지 않으면 람다가 대기 상태에 있기에 &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;반응속도가 느려진다고 합니다.  &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;어떤 언어를 쓰느냐에 따라 다르지만 0.2 ~ 0.5초 가량 걸린다고 합니다.&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;h5&gt;&lt;a name=&quot;header-n245&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;AWS Lambda를 써도 좋은 곳 (람다의 장점) &lt;/h5&gt;&lt;ul&gt;&lt;li&gt;비용 예측이 어려운 곳 &lt;/li&gt;&lt;li&gt;조금은 느려도 좋은 앱 &lt;/li&gt;&lt;li&gt;확장을 적은 노력으로 빠르고 하고 싶을 때 &lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h5&gt;&lt;a name=&quot;header-n254&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;AWS Lambda 쓰지 말아야할곳 (람다의 단점) &lt;/h5&gt;&lt;ul&gt;&lt;li&gt;cpu 처리를 많이 하는 곳 &lt;/li&gt;&lt;li&gt;실시간 멀티 플레이를 하는 게임 (모바일 턴제 게임은 가능함) &lt;/li&gt;&lt;li&gt;속도가 중요한 앱 &lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;제 경우엔 크롤링 후 서버에서 데이터를 처리 후, 보여주는 앱을 만들고 있습니다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;속도가 크게 문제가 되지 않기에 람다를 택했습니다.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style=&quot;font-size: 1rem;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;h3&gt;&lt;a name=&quot;header-n266&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;AWS Lambda 시작하기 &lt;/h3&gt;&lt;p&gt;aws lambda는 콘솔에서 만들 수도 있고 cli 툴로 만들수도 있는데요.  &lt;/p&gt;
&lt;p&gt;일단은 콘솔에서 만들어보도록 하겠습니다. &lt;/p&gt;
&lt;p&gt;aws에 로그인하고 함수를 만드는 화면으로 이동합시다. &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/13621579/49022415-28878480-f1d8-11e8-901c-d05c397b64de.png&quot; alt=&quot;alt text&quot; referrerpolicy=&quot;no-referrer&quot;&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;create function을 누르면 람다 함수를 만드는 화면으로 넘어갑니다.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/13621579/49022417-2b827500-f1d8-11e8-963e-4775cd59e685.png&quot; alt=&quot;alt text&quot; referrerpolicy=&quot;no-referrer&quot;&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;함수 이름(Name)은 ‘myHello'로 하고 프로그래밍 언어는 node.js를 쓰도록 하겠습니다.  &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;nodejs의 버전은 8.1로 하겠습니다. 8.1로 해도 예전 코드가 돌아가더군요.  &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;웹 상의 예제 코드가 낮은 버전이라고 해도 신경 쓰지 마시고 최신 버전 노드를  쓰면 됩니다.  &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;새로 role을 만들거구요.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;roleName은 ‘myLambdaRole’로 하겠습니다. &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;람다 함수를 만들면 설정(lambda cofiguration) 화면으로 넘어오게 됩니다. &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;여기서 람다 함수를 변경해 줄 수도 있고, 람다와 연결할 트리거들을 정해줄 수 있습니다. &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/13621579/49022421-2e7d6580-f1d8-11e8-9d1b-862c30915e0f.png&quot; alt=&quot;alt text&quot; referrerpolicy=&quot;no-referrer&quot;&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;이 설정화면을 가장 많이 사용하게 될 건데요. &lt;/p&gt;
&lt;p&gt;현재는 따로 연결된 함수는 없습니다.&lt;/p&gt;
&lt;p&gt;오른쪽 상단을 보면 &lt;strong&gt;Test&lt;/strong&gt;와 &lt;strong&gt;Save&lt;/strong&gt; 버튼이 보이는데요. &lt;/p&gt;
&lt;p&gt;람다 함수를 실행할 때 쓰입니다. &lt;/p&gt;
&lt;p&gt;이제 화면을 내려서 &lt;/p&gt;
&lt;p&gt;실제 람다 코드를 보도록 합니다. &lt;/p&gt;&lt;pre lang=&quot;javascript&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; spellcheck=&quot;false&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;javascript&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;x&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;exports&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;handler&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;async&lt;/span&gt; (&lt;span class=&quot;cm-def&quot;&gt;event&lt;/span&gt;) &lt;span class=&quot;cm-operator&quot;&gt;=&amp;gt;&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-comment&quot;&gt;// TODO implement&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;cm-def&quot;&gt;response&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-property&quot;&gt;statusCode&lt;/span&gt;: &lt;span class=&quot;cm-number&quot;&gt;200&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-property&quot;&gt;body&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;JSON&lt;/span&gt;.&lt;span class=&quot;cm-property&quot;&gt;stringify&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;'Hello Lambda'&lt;/span&gt;),&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  };&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;cm-variable-2&quot;&gt;response&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;};&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 176px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 176px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;어떻게 동작하는지 알고 싶다면 &lt;strong&gt;Test&lt;/strong&gt; 버튼을 눌러보세요.&lt;/p&gt;
&lt;p&gt;이벤트를 설정하는 화면이 나올거에요.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/13621579/49022769-02161900-f1d9-11e8-9ef1-19619dce1e6f.png&quot; alt=&quot;alt text&quot; referrerpolicy=&quot;no-referrer&quot;&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;이벤트를 만들었으면 Save를 하고 다시 테스트를 해보세요.&lt;/p&gt;
&lt;p&gt;응답이 아래처럼 오면 성공이에요.&lt;/p&gt;&lt;pre lang=&quot;&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; spellcheck=&quot;false&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;x&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;Response:&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;{&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  &quot;statusCode&quot;: 200,&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  &quot;body&quot;: &quot;\&quot;Hello Lambda&quot;\&quot;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 110px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 110px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;아래는 전체 실제 람다 에디터에서 실행해본 화면이에요.&lt;/p&gt;
&lt;p&gt;소스 코드 밑에 response가 표시되어서 바로바로 결과를 확인할 수 있습니다.&lt;/p&gt;
&lt;p&gt;index.js를 수정해보면서 람다가 어떻게 동작하는지 확인해보도록 합시다. &lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/13621579/49022772-03dfdc80-f1d9-11e8-9ad0-b2e84d3d3e1e.png&quot; alt=&quot;alt text&quot; referrerpolicy=&quot;no-referrer&quot;&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;지금까지 가장 기초적인 람다를 만들었습니다.&lt;/p&gt;
&lt;p&gt;람다를 바로 쓸 수는 없고, 외부에서 접근하려면 AWS API Gateway와 연결을 해주어야합니다.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h3&gt;&lt;a name=&quot;header-n418&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;AWS API Gateway&lt;/h3&gt;&lt;p&gt;aws api gateway는 api를 만들때 쓰입니다. aws 내부의 서비스와 외부의 연결 통로를 만들 때 쓰이죠. aws lambda도 외부에서 쓰려면 api gateway와 연결해야합니다. &lt;/p&gt;&lt;h5&gt;&lt;a name=&quot;header-n471&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;1. 새 api 만들기&lt;/h5&gt;&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/13621579/49023914-997c6b80-f1db-11e8-8e53-79bf92d0bfd0.png&quot; alt=&quot;alt text&quot; referrerpolicy=&quot;no-referrer&quot;&gt;&lt;/p&gt;
&lt;p&gt;api gateway를 쓰려면 새 api를 정해줘야합니다. &lt;/p&gt;
&lt;p&gt;이름은 편한대로 정해주세요.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h5&gt;&lt;a name=&quot;header-n469&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;2. 리소스 만들기&lt;/h5&gt;&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/13621579/49023850-75208f00-f1db-11e8-81fb-9903e0936fcf.png&quot; alt=&quot;alt text&quot; referrerpolicy=&quot;no-referrer&quot;&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;리소스는 url을 말합니다. &lt;/p&gt;
&lt;p&gt;리소스를 통해 api에 접근하게 되는거죠&lt;/p&gt;
&lt;p&gt;여기서는 &lt;strong&gt;create Resource&lt;/strong&gt;를 택해줄께요.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h5&gt;&lt;a name=&quot;header-n504&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;3. 리소스 만들기 - 리소스 이름 정하기&lt;/h5&gt;&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/13621579/49023861-794cac80-f1db-11e8-811f-ab9a06317688.png&quot; alt=&quot;alt text&quot; referrerpolicy=&quot;no-referrer&quot;&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;리소스 이름(resource name)은 user로 하겠습니다. 이제 url에 user가 추가되었네요.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h5&gt;&lt;a name=&quot;header-n508&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;4. post 메소드 만들기&lt;/h5&gt;&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/13621579/49023873-7ea9f700-f1db-11e8-9abd-af2ba324f6d2.png&quot; alt=&quot;alt text&quot; referrerpolicy=&quot;no-referrer&quot;&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;리소스를 만들었으면(url을 정했으면)&lt;/p&gt;
&lt;p&gt;이제 메소드를 만들 겁니다. 메소드는 get, post, put, delete 등이 있는데 모두 rest 방식에서 쓰이는 것들입니다. &lt;/p&gt;
&lt;p&gt;user를 클릭하고 &lt;strong&gt;create method&lt;/strong&gt;를 눌러주세요.&lt;/p&gt;
&lt;p&gt; action을 고를 수 있는데 그 중에서 POST를 선택해줍니다.&lt;/p&gt;
&lt;p&gt;그리곤 어떤 람다함수와 연결할지를 정해주면 됩니다. &lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/13621579/49024446-d301a680-f1dc-11e8-99da-dd835d9d4173.png&quot; alt=&quot;alt text&quot; referrerpolicy=&quot;no-referrer&quot;&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;람다와 API 게이트웨이의 연결이 되었습니다. &lt;/p&gt;
&lt;p&gt;연결을 했다고 끝이 아니에요. Deploy를 해야 외부에서 람다를 사용할 수 있습니다. &lt;/p&gt;
&lt;p&gt;저도 디플로이 과정을 깜빡해서 엄청 삽질을 했었죠. &lt;/p&gt;&lt;h5&gt;&lt;a name=&quot;header-n592&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;6. API Deploy하기 &lt;/h5&gt;&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/13621579/49023894-8a95b900-f1db-11e8-8456-ee7f363054ca.png&quot; alt=&quot;alt text&quot; referrerpolicy=&quot;no-referrer&quot;&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Actions탭에서 &lt;strong&gt;Deploy API&lt;/strong&gt;를 골라주세요.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/13621579/49023902-8d90a980-f1db-11e8-941f-b0d292c7fb89.png&quot; alt=&quot;alt text&quot; referrerpolicy=&quot;no-referrer&quot;&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Deploy 설정에서는 이름만 정해주도록 할께요.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;디플로이가 끝나면 &lt;strong&gt;Stage&lt;/strong&gt;로 가봅시다.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Invoke URL이 생겼죠?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;이 URL에다가  HTTP 메소드(Post)를 써주면 이제 완성입니다!&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/13621579/49024961-f5e08a80-f1dd-11e8-9cd2-83e036eb03db.png&quot; alt=&quot;alt text&quot; referrerpolicy=&quot;no-referrer&quot;&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h5&gt;&lt;a name=&quot;header-n647&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;7.  API 테스트 하기&lt;/h5&gt;&lt;p&gt;저는 포스트맨을 이용해서 테스트를 해보겠습니다. &lt;/p&gt;
&lt;p&gt;Method를 포스트로 바꿔주고 &lt;strong&gt;Invoke URL&lt;/strong&gt;을 통해 요청을 보내 볼께요.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/13621579/49024966-f9741180-f1dd-11e8-8886-3765a38bfe24.png&quot; alt=&quot;alt text&quot; referrerpolicy=&quot;no-referrer&quot;&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;생각했던대로 응답이 오네요. &lt;/p&gt;
&lt;p&gt;실행 시간은 350ms 좀 걸리긴 하네요. &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h3&gt;&lt;a name=&quot;header-n662&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;마무리&lt;/h3&gt;&lt;p&gt;AWS Lambda가 개념 자체는 간단한데 &lt;/p&gt;
&lt;p&gt;아무래도 콘솔 창에 익숙해지는 좀 걸리더군요. &lt;/p&gt;
&lt;p&gt;앞으로는 콘솔 대신에 Serverless라는 프레임워크를 통해서 람다를 다뤄보도록 하겠습니다.&lt;/p&gt;
&lt;p&gt;대부분의 개발자분들은 서버리스 프레임워크가 더 편할 거에요.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;/div&gt;

&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</description>
      <category>서버</category>
      <category>AWS</category>
      <category>aws api</category>
      <category>aws api gateway</category>
      <category>AWS Lambda</category>
      <category>aws lambda api gateway</category>
      <category>aws lambda gateway</category>
      <category>aws lambda tutorial</category>
      <category>aws 람다</category>
      <category>aws 람다 튜토리얼</category>
      <category>람다</category>
      <category>람다 시작하기</category>
      <category>람다 예제</category>
      <category>람다 튜토리얼</category>
      <category>서버리스</category>
      <category>서버리스 튜토리얼</category>
      <category>아마존 람다</category>
      <category>아마존 서버리스</category>
      <author>에드 신</author>
      <guid isPermaLink="true">https://software-creator.tistory.com/14</guid>
      <comments>https://software-creator.tistory.com/14#entry14comment</comments>
      <pubDate>Tue, 27 Nov 2018 01:02:09 +0900</pubDate>
    </item>
    <item>
      <title>Flutter - 플러터에서 리액티브 프로그래밍,  Stream과 Bloc 패턴 적용하기</title>
      <link>https://software-creator.tistory.com/13</link>
      <description>&lt;meta charset=&quot;UTF-8&quot;&gt;&lt;meta name=&quot;viewport&quot; content=&quot;width=device-width initial-scale=1&quot;&gt;
&lt;title&gt;Flutter - 플러터에서 리액티브 프로그래밍,  Stream과 Bloc 패턴 적용하기&lt;/title&gt;&lt;link href=&quot;https://fonts.loli.net/css?family=Open+Sans:400italic,700italic,700,400&amp;amp;subset=latin,latin-ext&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot;&gt;&lt;style type=&quot;text/css&quot;&gt;html {overflow-x: initial !important;}:root { --node-fill:  #ECECFF; --node-border:  #CCCCFF; --note-fill:  #fff5ad; --note-border:  #aaaa33; --cluster-fill:  #ffffde  !important; --cluster-border:  #aaaa33  !important; }
.mermaid .label { color: var(--text-color); }
.node rect, .node circle, .node ellipse, .node polygon { fill: var(--node-fill); stroke: var(--node-border); stroke-width: 1px; }
.edgePath .path { stroke: var(--text-color); }
.edgeLabel { background-color: var(--bg-color); }
.cluster rect { fill: rgb(255, 255, 222) !important; rx: 4px !important; stroke: rgb(170, 170, 51) !important; stroke-width: 1px !important; }
.cluster text { fill: var(--text-color); }
.actor { stroke: var(--node-border); fill: var(--node-fill); }
text.actor { fill: var(--text-color); stroke: none; }
.actor-line { stroke: grey; }
.messageLine0 { stroke-width: 1.5px; stroke: var(--text-color); }
.messageLine1 { stroke-width: 1.5px; stroke: var(--text-color); }
#arrowhead { fill: var(--text-color); }
#crosshead path { fill: var(--text-color)  !important; stroke: var(--text-color)  !important; }
.messageText { fill: var(--text-color); stroke: none; }
.labelBox { stroke: var(--node-border); fill: var(--node-fill); }
.labelText { fill: var(--text-color); stroke: none; }
.loopText { fill: var(--text-color); stroke: none; }
.loopLine { stroke-width: 2px; stroke: var(--node-border); }
.note { stroke: var(--note-border); fill: var(--note-fill); }
.noteText { fill: var(--text-color); stroke: none; font-size: 14px; }
.section { stroke: none; opacity: 0.2; }
.section0 { fill: rgba(102, 102, 255, 0.490196); }
.section2 { fill: rgb(255, 244, 0); }
.section1, .section3 { fill: white; opacity: 0.2; }
.sectionTitle0 { fill: var(--text-color); }
.sectionTitle1 { fill: var(--text-color); }
.sectionTitle2 { fill: var(--text-color); }
.sectionTitle3 { fill: var(--text-color); }
.sectionTitle { text-anchor: start; font-size: 11px; }
.grid .tick { stroke: lightgrey; opacity: 0.3; shape-rendering: crispedges; }
.grid path { stroke-width: 0px; }
.today { fill: none; stroke: red; stroke-width: 2px; }
.task { stroke-width: 2px; }
.taskText { text-anchor: middle; font-size: 11px; }
.taskTextOutsideRight { fill: black; text-anchor: start; font-size: 11px; }
.taskTextOutsideLeft { fill: black; text-anchor: end; font-size: 11px; }
.taskText0, .taskText1, .taskText2, .taskText3 { fill: white; }
.task0, .task1, .task2, .task3 { fill: rgb(138, 144, 221); stroke: rgb(83, 79, 188); }
.taskTextOutside0, .taskTextOutside2 { fill: var(--text-color); }
.taskTextOutside1, .taskTextOutside3 { fill: var(--text-color); }
.active0, .active1, .active2, .active3 { fill: rgb(191, 199, 255); stroke: rgb(83, 79, 188); }
.activeText0, .activeText1, .activeText2, .activeText3 { fill: black !important; }
.done0, .done1, .done2, .done3 { stroke: grey; fill: lightgrey; stroke-width: 2px; }
.doneText0, .doneText1, .doneText2, .doneText3 { fill: black !important; }
.crit0, .crit1, .crit2, .crit3 { stroke: rgb(255, 136, 136); fill: red; stroke-width: 2px; }
.activeCrit0, .activeCrit1, .activeCrit2, .activeCrit3 { stroke: rgb(255, 136, 136); fill: rgb(191, 199, 255); stroke-width: 2px; }
.doneCrit0, .doneCrit1, .doneCrit2, .doneCrit3 { stroke: rgb(255, 136, 136); fill: lightgrey; stroke-width: 2px; cursor: pointer; shape-rendering: crispedges; }
.doneCritText0, .doneCritText1, .doneCritText2, .doneCritText3 { fill: black !important; }
.activeCritText0, .activeCritText1, .activeCritText2, .activeCritText3 { fill: black !important; }
.titleText { text-anchor: middle; font-size: 18px; fill: black; }
.node text { font-size: 14px; }
div.mermaidTooltip { position: absolute; text-align: center; max-width: 200px; padding: 2px; font-size: 12px; background-color: rgb(255, 255, 222); border: 1px solid rgb(170, 170, 51); border-top-left-radius: 2px; border-top-right-radius: 2px; border-bottom-right-radius: 2px; border-bottom-left-radius: 2px; pointer-events: none; z-index: 100; background-position: initial initial; background-repeat: initial initial; }
#write .md-diagram-panel .md-diagram-panel-preview div { }


:root { --bg-color: #ffffff; --text-color: #333333; --select-text-bg-color: #B5D6FC; --select-text-font-color: auto; --monospace: &quot;Lucida Console&quot;,Consolas,&quot;Courier&quot;,monospace; }
html { font-size: 14px; background-color: var(--bg-color); color: var(--text-color); font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; -webkit-font-smoothing: antialiased; }
body { margin: 0px; padding: 0px; height: auto; bottom: 0px; top: 0px; left: 0px; right: 0px; font-size: 1rem; line-height: 1.42857143; overflow-x: hidden; background-image: inherit; background-size: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: inherit; background-position: inherit inherit; background-repeat: inherit inherit; }
iframe { margin: auto; }
a.url { word-break: break-all; }
a:active, a:hover { outline: 0px; }
.in-text-selection, ::selection { text-shadow: none; background: var(--select-text-bg-color); color: var(--select-text-font-color); }
#write { margin: 0px auto; height: auto; width: inherit; word-break: normal; word-wrap: break-word; position: relative; white-space: normal; overflow-x: visible; }
#write.first-line-indent p { text-indent: 2em; }
#write.first-line-indent li p, #write.first-line-indent p * { text-indent: 0px; }
#write.first-line-indent li { margin-left: 2em; }
.for-image #write { padding-left: 8px; padding-right: 8px; }
body.typora-export { padding-left: 30px; padding-right: 30px; }
.typora-export .footnote-line, .typora-export p { white-space: pre-wrap; }
@media screen and (max-width: 500px) { 
  body.typora-export { padding-left: 0px; padding-right: 0px; }
  .CodeMirror-sizer { margin-left: 0px !important; }
  .CodeMirror-gutters { display: none !important; }
}
#write li &gt; figure:first-child { margin-top: -20px; }
#write ol, #write ul { position: relative; }
img { max-width: 100%; vertical-align: middle; }
button, input, select, textarea { color: inherit; font-family: inherit; font-size: inherit; font-style: inherit; font-variant-caps: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; }
input[type=&quot;checkbox&quot;], input[type=&quot;radio&quot;] { line-height: normal; padding: 0px; }
*, ::after, ::before { box-sizing: border-box; }
#write h1, #write h2, #write h3, #write h4, #write h5, #write h6, #write p, #write pre { width: inherit; }
#write h1, #write h2, #write h3, #write h4, #write h5, #write h6, #write p { position: relative; }
h1, h2, h3, h4, h5, h6 { break-after: avoid-page; break-inside: avoid; orphans: 2; }
p { orphans: 4; }
h1 { font-size: 2rem; }
h2 { font-size: 1.8rem; }
h3 { font-size: 1.6rem; }
h4 { font-size: 1.4rem; }
h5 { font-size: 1.2rem; }
h6 { font-size: 1rem; }
.md-math-block, .md-rawblock, h1, h2, h3, h4, h5, h6, p { margin-top: 1rem; margin-bottom: 1rem; }
.hidden { display: none; }
.md-blockmeta { color: rgb(204, 204, 204); font-weight: 700; font-style: italic; }
a { cursor: pointer; }
sup.md-footnote { padding: 2px 4px; background-color: rgba(238, 238, 238, 0.701961); color: rgb(85, 85, 85); border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; cursor: pointer; }
sup.md-footnote a, sup.md-footnote a:hover { color: inherit; text-transform: inherit; text-decoration: inherit; }
#write input[type=&quot;checkbox&quot;] { cursor: pointer; width: inherit; height: inherit; }
figure { overflow-x: auto; margin: 1.2em 0px; max-width: calc(100% + 16px); padding: 0px; }
figure &gt; table { margin: 0px !important; }
tr { break-inside: avoid; break-after: auto; }
thead { display: table-header-group; }
table { border-collapse: collapse; border-spacing: 0px; width: 100%; overflow: auto; break-inside: auto; text-align: left; }
table.md-table td { min-width: 80px; }
.CodeMirror-gutters { border-right-width: 0px; background-color: inherit; }
.CodeMirror { text-align: left; }
.CodeMirror-placeholder { opacity: 0.3; }
.CodeMirror pre { padding: 0px 4px; }
.CodeMirror-lines { padding: 0px; }
div.hr:focus { cursor: none; }
#write pre { white-space: pre-wrap; }
#write.fences-no-line-wrapping pre { white-space: pre; }
#write pre.ty-contain-cm { white-space: normal; }
.CodeMirror-gutters { margin-right: 4px; }
.md-fences { font-size: 0.9rem; display: block; break-inside: avoid; text-align: left; overflow: visible; white-space: pre; background-image: inherit; background-size: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: inherit; position: relative !important; background-position: inherit inherit; background-repeat: inherit inherit; }
.md-diagram-panel { width: 100%; margin-top: 10px; text-align: center; padding-top: 0px; padding-bottom: 8px; overflow-x: auto; }
#write .md-fences.mock-cm { white-space: pre-wrap; }
.md-fences.md-fences-with-lineno { padding-left: 0px; }
#write.fences-no-line-wrapping .md-fences.mock-cm { white-space: pre; overflow-x: auto; }
.md-fences.mock-cm.md-fences-with-lineno { padding-left: 8px; }
.CodeMirror-line, twitterwidget { break-inside: avoid; }
.footnotes { opacity: 0.8; font-size: 0.9rem; margin-top: 1em; margin-bottom: 1em; }
.footnotes + .footnotes { margin-top: 0px; }
.md-reset { margin: 0px; padding: 0px; border: 0px; outline: 0px; vertical-align: top; text-decoration: none; text-shadow: none; float: none; position: static; width: auto; height: auto; white-space: nowrap; cursor: inherit; line-height: normal; font-weight: 400; text-align: left; box-sizing: content-box; direction: ltr; background-position: 0px 0px; background-repeat: initial initial; }
li div { padding-top: 0px; }
blockquote { margin: 1rem 0px; }
li .mathjax-block, li p { margin: 0.5rem 0px; }
li { margin: 0px; position: relative; }
blockquote &gt; :last-child { margin-bottom: 0px; }
blockquote &gt; :first-child, li &gt; :first-child { margin-top: 0px; }
.footnotes-area { color: rgb(136, 136, 136); margin-top: 0.714rem; padding-bottom: 0.143rem; white-space: normal; }
#write .footnote-line { white-space: pre-wrap; }
@media print { 
  body, html { border: 1px solid transparent; height: 99%; break-after: avoid-page; break-before: avoid-page; }
  #write { margin-top: 0px; border-color: transparent !important; }
  .typora-export * { -webkit-print-color-adjust: exact; }
  html.blink-to-pdf { font-size: 13px; }
  .typora-export #write { padding-left: 1cm; padding-right: 1cm; padding-bottom: 0px; break-after: avoid-page; }
  .typora-export #write::after { height: 0px; }
  @page { margin: 20mm 0px; }
}
.footnote-line { margin-top: 0.714em; font-size: 0.7em; }
a img, img a { cursor: pointer; }
pre.md-meta-block { font-size: 0.8rem; min-height: 0.8rem; white-space: pre-wrap; background-color: rgb(204, 204, 204); display: block; overflow-x: hidden; background-position: initial initial; background-repeat: initial initial; }
p &gt; img:only-child { display: block; margin: auto; }
p &gt; .md-image:only-child { display: inline-block; width: 100%; text-align: center; }
#write .MathJax_Display { margin: 0.8em 0px 0px; }
.md-math-block { width: 100%; }
.md-math-block:not(:empty)::after { display: none; }
[contenteditable=&quot;true&quot;]:active, [contenteditable=&quot;true&quot;]:focus { outline: 0px; box-shadow: none; }
.md-task-list-item { position: relative; list-style-type: none; }
.task-list-item.md-task-list-item { padding-left: 0px; }
.md-task-list-item &gt; input { position: absolute; top: 0px; left: 0px; margin-left: -1.2em; margin-top: calc(1em - 10px); }
.math { font-size: 1rem; }
.md-toc { min-height: 3.58rem; position: relative; font-size: 0.9rem; border-top-left-radius: 10px; border-top-right-radius: 10px; border-bottom-right-radius: 10px; border-bottom-left-radius: 10px; }
.md-toc-content { position: relative; margin-left: 0px; }
.md-toc-content::after, .md-toc::after { display: none; }
.md-toc-item { display: block; color: rgb(65, 131, 196); }
.md-toc-item a { text-decoration: none; }
.md-toc-inner:hover { text-decoration: underline; }
.md-toc-inner { display: inline-block; cursor: pointer; }
.md-toc-h1 .md-toc-inner { margin-left: 0px; font-weight: 700; }
.md-toc-h2 .md-toc-inner { margin-left: 2em; }
.md-toc-h3 .md-toc-inner { margin-left: 4em; }
.md-toc-h4 .md-toc-inner { margin-left: 6em; }
.md-toc-h5 .md-toc-inner { margin-left: 8em; }
.md-toc-h6 .md-toc-inner { margin-left: 10em; }
@media screen and (max-width: 48em) { 
  .md-toc-h3 .md-toc-inner { margin-left: 3.5em; }
  .md-toc-h4 .md-toc-inner { margin-left: 5em; }
  .md-toc-h5 .md-toc-inner { margin-left: 6.5em; }
  .md-toc-h6 .md-toc-inner { margin-left: 8em; }
}
a.md-toc-inner { font-size: inherit; font-style: inherit; font-weight: inherit; line-height: inherit; }
.footnote-line a:not(.reversefootnote) { color: inherit; }
.md-attr { display: none; }
.md-fn-count::after { content: &quot;.&quot;; }
code, pre, samp, tt { font-family: var(--monospace); }
kbd { margin: 0px 0.1em; padding: 0.1em 0.6em; font-size: 0.8em; color: rgb(36, 39, 41); background-color: rgb(255, 255, 255); border: 1px solid rgb(173, 179, 185); border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; box-shadow: rgba(12, 13, 14, 0.2) 0px 1px 0px, rgb(255, 255, 255) 0px 0px 0px 2px inset; white-space: nowrap; vertical-align: middle; background-position: initial initial; background-repeat: initial initial; }
.md-comment { color: rgb(162, 127, 3); opacity: 0.8; font-family: var(--monospace); }
code { text-align: left; }
a.md-print-anchor { white-space: pre !important; border: none !important; display: inline-block !important; position: absolute !important; width: 1px !important; right: 0px !important; outline: 0px !important; text-shadow: initial !important; background-position: 0px 0px !important; background-repeat: initial initial !important; }
.md-inline-math .MathJax_SVG .noError { display: none !important; }
.md-math-block .MathJax_SVG_Display { text-align: center; margin: 0px; position: relative; text-indent: 0px; max-width: none; max-height: none; min-height: 0px; min-width: 100%; width: auto; overflow-y: hidden; display: block !important; }
.MathJax_SVG_Display, .md-inline-math .MathJax_SVG_Display { width: auto; margin: inherit; display: inline-block !important; }
.MathJax_SVG .MJX-monospace { font-family: var(--monospace); }
.MathJax_SVG .MJX-sans-serif { font-family: sans-serif; }
.MathJax_SVG { display: inline; font-style: normal; font-weight: 400; line-height: normal; zoom: 90%; text-indent: 0px; text-align: left; text-transform: none; letter-spacing: normal; word-spacing: normal; word-wrap: normal; white-space: nowrap; float: none; direction: ltr; max-width: none; max-height: none; min-width: 0px; min-height: 0px; border: 0px; padding: 0px; margin: 0px; }
.MathJax_SVG * { transition: none; }
.MathJax_SVG_Display svg { vertical-align: middle !important; margin-bottom: 0px !important; }
.os-windows.monocolor-emoji .md-emoji { font-family: &quot;Segoe UI Symbol&quot;, sans-serif; }
.md-diagram-panel &gt; svg { max-width: 100%; }
[lang=&quot;mermaid&quot;] svg, [lang=&quot;flow&quot;] svg { max-width: 100%; }
[lang=&quot;mermaid&quot;] .node text { font-size: 1rem; }
table tr th { border-bottom-width: 0px; }
video { max-width: 100%; display: block; margin: 0px auto; }
iframe { max-width: 100%; width: 100%; border: none; }
.highlight td, .highlight tr { border: 0px; }


.CodeMirror { height: auto; }
.CodeMirror.cm-s-inner { background-image: inherit; background-size: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: inherit; background-position: inherit inherit; background-repeat: inherit inherit; }
.CodeMirror-scroll { overflow-y: hidden; overflow-x: auto; z-index: 3; }
.CodeMirror-gutter-filler, .CodeMirror-scrollbar-filler { background-color: rgb(255, 255, 255); }
.CodeMirror-gutters { border-right-width: 1px; border-right-style: solid; border-right-color: rgb(221, 221, 221); background-image: inherit; background-size: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: inherit; white-space: nowrap; background-position: inherit inherit; background-repeat: inherit inherit; }
.CodeMirror-linenumber { padding: 0px 3px 0px 5px; text-align: right; color: rgb(153, 153, 153); }
.cm-s-inner .cm-keyword { color: rgb(119, 0, 136); }
.cm-s-inner .cm-atom, .cm-s-inner.cm-atom { color: rgb(34, 17, 153); }
.cm-s-inner .cm-number { color: rgb(17, 102, 68); }
.cm-s-inner .cm-def { color: rgb(0, 0, 255); }
.cm-s-inner .cm-variable { color: rgb(0, 0, 0); }
.cm-s-inner .cm-variable-2 { color: rgb(0, 85, 170); }
.cm-s-inner .cm-variable-3 { color: rgb(0, 136, 85); }
.cm-s-inner .cm-string { color: rgb(170, 17, 17); }
.cm-s-inner .cm-property { color: rgb(0, 0, 0); }
.cm-s-inner .cm-operator { color: rgb(152, 26, 26); }
.cm-s-inner .cm-comment, .cm-s-inner.cm-comment { color: rgb(170, 85, 0); }
.cm-s-inner .cm-string-2 { color: rgb(255, 85, 0); }
.cm-s-inner .cm-meta { color: rgb(85, 85, 85); }
.cm-s-inner .cm-qualifier { color: rgb(85, 85, 85); }
.cm-s-inner .cm-builtin { color: rgb(51, 0, 170); }
.cm-s-inner .cm-bracket { color: rgb(153, 153, 119); }
.cm-s-inner .cm-tag { color: rgb(17, 119, 0); }
.cm-s-inner .cm-attribute { color: rgb(0, 0, 204); }
.cm-s-inner .cm-header, .cm-s-inner.cm-header { color: rgb(0, 0, 255); }
.cm-s-inner .cm-quote, .cm-s-inner.cm-quote { color: rgb(0, 153, 0); }
.cm-s-inner .cm-hr, .cm-s-inner.cm-hr { color: rgb(153, 153, 153); }
.cm-s-inner .cm-link, .cm-s-inner.cm-link { color: rgb(0, 0, 204); }
.cm-negative { color: rgb(221, 68, 68); }
.cm-positive { color: rgb(34, 153, 34); }
.cm-header, .cm-strong { font-weight: 700; }
.cm-del { text-decoration: line-through; }
.cm-em { font-style: italic; }
.cm-link { text-decoration: underline; }
.cm-error { color: red; }
.cm-invalidchar { color: red; }
.cm-constant { color: rgb(38, 139, 210); }
.cm-defined { color: rgb(181, 137, 0); }
div.CodeMirror span.CodeMirror-matchingbracket { color: rgb(0, 255, 0); }
div.CodeMirror span.CodeMirror-nonmatchingbracket { color: rgb(255, 34, 34); }
.cm-s-inner .CodeMirror-activeline-background { background-image: inherit; background-size: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: inherit; background-position: inherit inherit; background-repeat: inherit inherit; }
.CodeMirror { position: relative; overflow: hidden; }
.CodeMirror-scroll { height: 100%; outline: 0px; position: relative; box-sizing: content-box; background-image: inherit; background-size: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: inherit; background-position: inherit inherit; background-repeat: inherit inherit; }
.CodeMirror-sizer { position: relative; }
.CodeMirror-gutter-filler, .CodeMirror-hscrollbar, .CodeMirror-scrollbar-filler, .CodeMirror-vscrollbar { position: absolute; z-index: 6; display: none; }
.CodeMirror-vscrollbar { right: 0px; top: 0px; overflow: hidden; }
.CodeMirror-hscrollbar { bottom: 0px; left: 0px; overflow: hidden; }
.CodeMirror-scrollbar-filler { right: 0px; bottom: 0px; }
.CodeMirror-gutter-filler { left: 0px; bottom: 0px; }
.CodeMirror-gutters { position: absolute; left: 0px; top: 0px; padding-bottom: 30px; z-index: 3; }
.CodeMirror-gutter { white-space: normal; height: 100%; box-sizing: content-box; padding-bottom: 30px; margin-bottom: -32px; display: inline-block; }
.CodeMirror-gutter-wrapper { position: absolute; z-index: 4; border: none !important; background-position: 0px 0px !important; background-repeat: initial initial !important; }
.CodeMirror-gutter-background { position: absolute; top: 0px; bottom: 0px; z-index: 4; }
.CodeMirror-gutter-elt { position: absolute; cursor: default; z-index: 4; }
.CodeMirror-lines { cursor: text; }
.CodeMirror pre { border-top-left-radius: 0px; border-top-right-radius: 0px; border-bottom-right-radius: 0px; border-bottom-left-radius: 0px; border-width: 0px; font-family: inherit; font-size: inherit; margin: 0px; white-space: pre; word-wrap: normal; color: inherit; z-index: 2; position: relative; overflow: visible; background-position: 0px 0px; background-repeat: initial initial; }
.CodeMirror-wrap pre { word-wrap: break-word; white-space: pre-wrap; word-break: normal; }
.CodeMirror-code pre { border-right-width: 30px; border-right-style: solid; border-right-color: transparent; width: fit-content; }
.CodeMirror-wrap .CodeMirror-code pre { border-right-style: none; width: auto; }
.CodeMirror-linebackground { position: absolute; left: 0px; right: 0px; top: 0px; bottom: 0px; z-index: 0; }
.CodeMirror-linewidget { position: relative; z-index: 2; overflow: auto; }
.CodeMirror-wrap .CodeMirror-scroll { overflow-x: hidden; }
.CodeMirror-measure { position: absolute; width: 100%; height: 0px; overflow: hidden; visibility: hidden; }
.CodeMirror-measure pre { position: static; }
.CodeMirror div.CodeMirror-cursor { position: absolute; visibility: hidden; border-right-style: none; width: 0px; }
.CodeMirror div.CodeMirror-cursor { visibility: hidden; }
.CodeMirror-focused div.CodeMirror-cursor { visibility: inherit; }
.cm-searching { background-color: rgba(255, 255, 0, 0.4); background-position: initial initial; background-repeat: initial initial; }
@media print { 
  .CodeMirror div.CodeMirror-cursor { visibility: hidden; }
}


:root {
    --side-bar-bg-color: #fafafa;
    --control-text-color: #777;
}

@include-when-export url(https://fonts.loli.net/css?family=Open+Sans:400italic,700italic,700,400&amp;subset=latin,latin-ext);

@font-face {
    font-family: 'Open Sans';
    font-style: normal;
    font-weight: normal;
    src: local('Open Sans Regular'),url('file:///Users/JcSnap/Library/Application%20Support/abnerworks.Typora/themes/github/400.woff') format('woff');
}

@font-face {
    font-family: 'Open Sans';
    font-style: italic;
    font-weight: normal;
    src: local('Open Sans Italic'),url('file:///Users/JcSnap/Library/Application%20Support/abnerworks.Typora/themes/github/400i.woff') format('woff');
}

@font-face {
    font-family: 'Open Sans';
    font-style: normal;
    font-weight: bold;
    src: local('Open Sans Bold'),url('file:///Users/JcSnap/Library/Application%20Support/abnerworks.Typora/themes/github/700.woff') format('woff');
}

@font-face {
    font-family: 'Open Sans';
    font-style: italic;
    font-weight: bold;
    src: local('Open Sans Bold Italic'),url('file:///Users/JcSnap/Library/Application%20Support/abnerworks.Typora/themes/github/700i.woff') format('woff');
}

html {
    font-size: 16px;
}

body {
    font-family: &quot;Open Sans&quot;,&quot;Clear Sans&quot;,&quot;Helvetica Neue&quot;,Helvetica,Arial,sans-serif;
    color: rgb(51, 51, 51);
    line-height: 1.6;
}

#write {
    max-width: 860px;
  	margin: 0 auto;
  	padding: 30px;
    padding-bottom: 100px;
}
#write &gt; ul:first-child,
#write &gt; ol:first-child{
    margin-top: 30px;
}

a {
    color: #4183C4;
}
h1,
h2,
h3,
h4,
h5,
h6 {
    position: relative;
    margin-top: 1rem;
    margin-bottom: 1rem;
    font-weight: bold;
    line-height: 1.4;
    cursor: text;
}
h1:hover a.anchor,
h2:hover a.anchor,
h3:hover a.anchor,
h4:hover a.anchor,
h5:hover a.anchor,
h6:hover a.anchor {
    /*background: url(&quot;file:///Users/JcSnap/Library/Application%20Support/images/modules/styleguide/para.png&quot;) no-repeat 10px center;*/
    text-decoration: none;
}
h1 tt,
h1 code {
    font-size: inherit;
}
h2 tt,
h2 code {
    font-size: inherit;
}
h3 tt,
h3 code {
    font-size: inherit;
}
h4 tt,
h4 code {
    font-size: inherit;
}
h5 tt,
h5 code {
    font-size: inherit;
}
h6 tt,
h6 code {
    font-size: inherit;
}
h1 {
    padding-bottom: .3em;
    font-size: 2.25em;
    line-height: 1.2;
    border-bottom: 1px solid #eee;
}
h2 {
   padding-bottom: .3em;
    font-size: 1.75em;
    line-height: 1.225;
    border-bottom: 1px solid #eee;
}
h3 {
    font-size: 1.5em;
    line-height: 1.43;
}
h4 {
    font-size: 1.25em;
}
h5 {
    font-size: 1em;
}
h6 {
   font-size: 1em;
    color: #777;
}
p,
blockquote,
ul,
ol,
dl,
table{
    margin: 0.8em 0;
}
li&gt;ol,
li&gt;ul {
    margin: 0 0;
}
hr {
    height: 2px;
    padding: 0;
    margin: 16px 0;
    background-color: #e7e7e7;
    border: 0 none;
    overflow: hidden;
    box-sizing: content-box;
}

li p.first {
    display: inline-block;
}
ul,
ol {
    padding-left: 30px;
}
ul:first-child,
ol:first-child {
    margin-top: 0;
}
ul:last-child,
ol:last-child {
    margin-bottom: 0;
}
blockquote {
    border-left: 4px solid #dfe2e5;
    padding: 0 15px;
    color: #777777;
}
blockquote blockquote {
    padding-right: 0;
}
table {
    padding: 0;
    word-break: initial;
}
table tr {
    border-top: 1px solid #dfe2e5;
    margin: 0;
    padding: 0;
}
table tr:nth-child(2n),
thead {
    background-color: #f8f8f8;
}
table tr th {
    font-weight: bold;
    border: 1px solid #dfe2e5;
    border-bottom: 0;
    text-align: left;
    margin: 0;
    padding: 6px 13px;
}
table tr td {
    border: 1px solid #dfe2e5;
    text-align: left;
    margin: 0;
    padding: 6px 13px;
}
table tr th:first-child,
table tr td:first-child {
    margin-top: 0;
}
table tr th:last-child,
table tr td:last-child {
    margin-bottom: 0;
}

.CodeMirror-lines {
    padding-left: 4px;
}

.code-tooltip {
    box-shadow: 0 1px 1px 0 rgba(0,28,36,.3);
    border-top: 1px solid #eef2f2;
}

.md-fences,
code,
tt {
    border: 1px solid #e7eaed;
    background-color: #f8f8f8;
    border-radius: 3px;
    padding: 0;
    padding: 2px 4px 0px 4px;
    font-size: 0.9em;
}

code {
    background-color: #f3f4f4;
    padding: 0 4px 2px 4px;
}

.md-fences {
    margin-bottom: 15px;
    margin-top: 15px;
    padding: 0.2em 1em;
    padding-top: 8px;
    padding-bottom: 6px;
}


.md-task-list-item &gt; input {
  margin-left: -1.3em;
}

@media print {
    html {
        font-size: 13px;
    }
    table,
    pre {
        page-break-inside: avoid;
    }
    pre {
        word-wrap: break-word;
    }
}

.md-fences {
	background-color: #f8f8f8;
}
#write pre.md-meta-block {
	padding: 1rem;
    font-size: 85%;
    line-height: 1.45;
    background-color: #f7f7f7;
    border: 0;
    border-radius: 3px;
    color: #777777;
    margin-top: 0 !important;
}

.mathjax-block&gt;.code-tooltip {
	bottom: .375rem;
}

.md-mathjax-midline {
    background: #fafafa;
}

#write&gt;h3.md-focus:before{
	left: -1.5625rem;
	top: .375rem;
}
#write&gt;h4.md-focus:before{
	left: -1.5625rem;
	top: .285714286rem;
}
#write&gt;h5.md-focus:before{
	left: -1.5625rem;
	top: .285714286rem;
}
#write&gt;h6.md-focus:before{
	left: -1.5625rem;
	top: .285714286rem;
}
.md-image&gt;.md-meta {
    /*border: 1px solid #ddd;*/
    border-radius: 3px;
    padding: 2px 0px 0px 4px;
    font-size: 0.9em;
    color: inherit;
}

.md-tag {
    color: #a7a7a7;
    opacity: 1;
}

.md-toc { 
    margin-top:20px;
    padding-bottom:20px;
}

.sidebar-tabs {
    border-bottom: none;
}

#typora-quick-open {
    border: 1px solid #ddd;
    background-color: #f8f8f8;
}

#typora-quick-open-item {
    background-color: #FAFAFA;
    border-color: #FEFEFE #e5e5e5 #e5e5e5 #eee;
    border-style: solid;
    border-width: 1px;
}

/** focus mode */
.on-focus-mode blockquote {
    border-left-color: rgba(85, 85, 85, 0.12);
}

header, .context-menu, .megamenu-content, footer{
    font-family: &quot;Segoe UI&quot;, &quot;Arial&quot;, sans-serif;
}

.file-node-content:hover .file-node-icon,
.file-node-content:hover .file-node-open-state{
    visibility: visible;
}

.mac-seamless-mode #typora-sidebar {
    background-color: #fafafa;
    background-color: var(--side-bar-bg-color);
}

.md-lang {
    color: #b4654d;
}

.html-for-mac .context-menu {
    --item-hover-bg-color: #E6F0FE;
}

#md-notification .btn {
    border: 0;
}

.dropdown-menu .divider {
    border-color: #e5e5e5;
}

 .typora-export p, .typora-export .footnote-line {white-space: normal;} 
&lt;/style&gt;


&lt;div id=&quot;write&quot; class=&quot;is-mac&quot;&gt;&lt;p&gt;플러터에서 리액티브 프로그래밍 - Stream, Bloc 패턴&lt;/p&gt;&lt;ul&gt;&lt;li&gt;리액티브 프로그래밍 정의&lt;/li&gt;&lt;li&gt;스트림 써보기&lt;/li&gt;&lt;li&gt;스트림 플러터에서 써보기&lt;/li&gt;&lt;li&gt;블록 패턴 적용해보기&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h3&gt;&lt;a name=&quot;header-n238&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;플러터에서의 리액티브 프로그래밍&lt;/h3&gt;&lt;p&gt;요즘 프로그래밍의 대세는 반응형 프로그래밍(Reactive Programming)입니다. &lt;/p&gt;
&lt;p&gt;반응형 프로그래밍은 비동기 데이터 처리를 효율적으로 하기 위해 만들어졌습니다. &lt;/p&gt;
&lt;p&gt;비동기 처리는 데이터가 언제 도착할지 모르는 http 호출이나, UI 클릭, 데이터 저장, 에러 처리 등을 할 때 쓰입니다. &lt;/p&gt;
&lt;p&gt;플러터에서도 반응형 프로그래밍을 할 수 있습니다. 보통 &lt;em&gt;Stream&lt;/em&gt;이나 &lt;em&gt;RxDart&lt;/em&gt;를 써서 합니다. &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h3&gt;&lt;a name=&quot;header-n243&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;Stream, StreamController&lt;/h3&gt;&lt;p&gt;스트림은 데이터가 들어오고 나가는 통로에요. &lt;/p&gt;
&lt;p&gt;데이터가 변하는 걸 보고 있다가 그에 맞춰 적절한 처리를 하죠. 필터링(where)이나 수정(map), 버퍼링(take) 같은 일을 합니다.&lt;/p&gt;
&lt;p&gt;스트림 컨트롤러는 여러 스트림을 관리하는 데 쓰여요. &lt;/p&gt;
&lt;p&gt;데이터가 추가되거나 이벤트가 종료되거나 할때 스트림 컨트롤러를 써서 처리해줄 수 있습니다.&lt;/p&gt;
&lt;p&gt;스트림 컨트롤러를 쓰는 예제를 보도록 할께요.&lt;/p&gt;
&lt;p&gt;스트림 컨트롤러에 데이터가 추가될때마다 출력하도록 했습니다. &lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;dart&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;dart&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;main&lt;/span&gt;() {&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;StreamController&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;ctrl&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;StreamController&lt;/span&gt;();&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;ctrl&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;stream&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;listen&lt;/span&gt;((&lt;span class=&quot;cm-variable&quot;&gt;data&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;data&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  });&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;ctrl&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;add&lt;/span&gt;(&lt;span class=&quot;cm-number&quot;&gt;10&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;ctrl&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;add&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;&quot;Good morning&quot;&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;ctrl&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;add&lt;/span&gt;({&lt;span class=&quot;cm-string&quot;&gt;&quot;age&quot;&lt;/span&gt;: &lt;span class=&quot;cm-number&quot;&gt;50&lt;/span&gt;, &lt;span class=&quot;cm-string&quot;&gt;&quot;name&quot;&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;&quot;Youngmi&quot;&lt;/span&gt;});&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;ctrl&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;close&lt;/span&gt;();&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 286px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 286px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;실행결과&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;10&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;Good morning&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;{age: 50, name: Youngmi}&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 66px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 66px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;간단히 데이터를 출력만 해주고 있습니다. &lt;/p&gt;
&lt;p&gt;그럼 스트림을 플러터에서 어떻게 쓸까요?&lt;/p&gt;
&lt;p&gt;스트림 빌더(StreamBuilder)를 써서 스트림 처리를 해요. &lt;/p&gt;
&lt;p&gt;스트림 빌더를 쓰면 &lt;em&gt;setState()&lt;/em&gt; 를 쓰지 않고도 UI를 업데이트 할 수 있습니다. &lt;/p&gt;
&lt;p&gt;또 항상 스트림의 최신값을 가져오니, 최신값을 확인할 필요가 없습니다.&lt;/p&gt;
&lt;p&gt;이제 실제 플러터에서 스트림 빌더를 어떻게 쓰는지 볼까요.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h5&gt;&lt;a name=&quot;header-n350&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;예제 1 - 스트림 빌더로 간단한 UI 만들어보기 &lt;/h5&gt;&lt;p&gt;스트림 빌더를 써서 UI 2개를 만들어볼께요.&lt;/p&gt;&lt;h5&gt;&lt;a name=&quot;header-n446&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;-  1. 버튼을 누를때 텍스트가 바뀌는 UI&lt;/h5&gt;&lt;h5&gt;&lt;a name=&quot;header-n447&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;-  2. 타이머로 1초마다 알아서 텍스트가 바뀌는 UI&lt;/h5&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h6&gt;&lt;a name=&quot;header-n461&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;예제1 - 완성 후 모습&lt;/h6&gt;&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/13621579/48539072-78716c00-e8f9-11e8-8ff0-9a266cf8d087.png&quot; alt=&quot;alt text&quot; referrerpolicy=&quot;no-referrer&quot;&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h6&gt;&lt;a name=&quot;header-n452&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;예제1 -  코드&lt;/h6&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;dart&quot; style=&quot;page-break-inside: unset;&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;dart&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;cm-string&quot;&gt;'dart:async'&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;cm-string&quot;&gt;'package:flutter/material.dart'&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;main&lt;/span&gt;() &lt;span class=&quot;cm-operator&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;runApp&lt;/span&gt;(&lt;span class=&quot;cm-keyword&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;MyApp&lt;/span&gt;());&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;MyApp&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;extends&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;StatelessWidget&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-comment&quot;&gt;// This widget is the root of your application.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-meta&quot;&gt;@override&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;Widget&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;build&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;BuildContext&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;context&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;MaterialApp&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;title&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;'Flutter Demo'&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;theme&lt;/span&gt;: &lt;span class=&quot;cm-keyword&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;ThemeData&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;primarySwatch&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;Colors&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;blue&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;  ),&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;home&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;CounterPage&lt;/span&gt;()&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  );&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  }&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;CounterPage&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;extends&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;StatefulWidget&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-meta&quot;&gt;@override&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;_CounterPageState&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;createState&lt;/span&gt;() &lt;span class=&quot;cm-operator&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;_CounterPageState&lt;/span&gt;();&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;_CounterPageState&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;extends&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;State&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-variable&quot;&gt;CounterPage&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;gt;&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;_counter&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;0&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;final&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;StreamController&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-builtin&quot;&gt;int&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;_streamController&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;StreamController&lt;/span&gt;();&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;final&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;StreamController&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-builtin&quot;&gt;int&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;_ctrl&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;StreamController&lt;/span&gt;();&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;final&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;Stream&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-builtin&quot;&gt;int&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;stream&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;Stream&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;periodic&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;Duration&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;seconds&lt;/span&gt;: &lt;span class=&quot;cm-number&quot;&gt;1&lt;/span&gt;), (&lt;span class=&quot;cm-builtin&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;x&lt;/span&gt;) &lt;span class=&quot;cm-operator&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;x&lt;/span&gt;); &lt;span class=&quot;cm-comment&quot;&gt;// 1초에 한번씩 업데이트&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-meta&quot;&gt;@override&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;Widget&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;build&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;BuildContext&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;context&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;Scaffold&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;appBar&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;AppBar&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;title&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;Text&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;'Stream version of the Counter App'&lt;/span&gt;)),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;body&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;Center&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;child&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;Column&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;children&lt;/span&gt;: &lt;span class=&quot;cm-operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-variable&quot;&gt;Widget&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;gt;&lt;/span&gt;[&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;Text&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;&quot;Hello&quot;&lt;/span&gt;),&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-comment&quot;&gt;// 1. 버튼 누를 때마다 텍스트 변경 &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;StreamBuilder&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-builtin&quot;&gt;int&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;gt;&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;stream&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;_streamController&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;stream&lt;/span&gt;, &lt;span class=&quot;cm-comment&quot;&gt;// 어떤 스트림을 쓸지 정함&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;initialData&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;_counter&lt;/span&gt;, &lt;span class=&quot;cm-comment&quot;&gt;// 초기값 정하기, 스트림에 값이 없을지도 모르니 초기값을 정함.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;builder&lt;/span&gt;: (&lt;span class=&quot;cm-variable&quot;&gt;BuildContext&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;context&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;AsyncSnapshot&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-builtin&quot;&gt;int&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;snapshot&lt;/span&gt;) { &lt;span class=&quot;cm-comment&quot;&gt;// UI 만드는 부분.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;Text&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;'You hit me &lt;/span&gt;${&lt;span class=&quot;cm-variable&quot;&gt;snapshot&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;data&lt;/span&gt;} &lt;span class=&quot;cm-string&quot;&gt;times'&lt;/span&gt;); &lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;  },&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;  ),&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-comment&quot;&gt;// 2. 1초마다 텍스트 변경&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;StreamBuilder&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-builtin&quot;&gt;int&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;gt;&lt;/span&gt; (&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;stream&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;stream&lt;/span&gt;, &lt;span class=&quot;cm-comment&quot;&gt;//&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;builder&lt;/span&gt;: (&lt;span class=&quot;cm-variable&quot;&gt;BuildContext&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;context&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;AsyncSnapshot&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-builtin&quot;&gt;int&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;snapshot&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;Text&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;'&lt;/span&gt;${&lt;span class=&quot;cm-variable&quot;&gt;snapshot&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;data&lt;/span&gt;} &lt;span class=&quot;cm-string&quot;&gt;seconds passed'&lt;/span&gt;); &lt;span class=&quot;cm-comment&quot;&gt;// 1초에 한번씩 업데이트 된다. &lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;  },&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;  )&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;  ],&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;  ),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;  ),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;floatingActionButton&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;FloatingActionButton&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;child&lt;/span&gt;: &lt;span class=&quot;cm-keyword&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;Icon&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;Icons&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;add&lt;/span&gt;),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;onPressed&lt;/span&gt;: () {&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;_streamController&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;sink&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;add&lt;/span&gt;(&lt;span class=&quot;cm-operator&quot;&gt;++&lt;/span&gt;&lt;span class=&quot;cm-variable&quot;&gt;_counter&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;  },&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;  ),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  );&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  }&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 1474px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 1474px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;위 예제에선 스트림을 2개 써보았어요.&lt;/p&gt;
&lt;p&gt;하나는 버튼을 누를 때마다 텍스트가 변경될 때 쓰였고,&lt;/p&gt;
&lt;p&gt;다른 하나는 1초마다 자동으로 텍스트가 업데이트 되도록 하였습니다.&lt;/p&gt;
&lt;p&gt;굳이 &lt;em&gt;setState()&lt;/em&gt;로 값이 변경되었다는 걸 알려주지 않아도 알아서 텍스트가 바뀝니다. &lt;/p&gt;
&lt;p&gt;UI를 다룰 때나, 네트워크 처리를 할 때 정말 유용하겠죠?&lt;/p&gt;
&lt;p&gt;이번엔 서버에서 데이터를 가져와 스트림 빌더로 파싱하는 예제를 만들어볼께요. &lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://jsonplaceholder.typicode.com/todos&quot; target=&quot;_blank&quot; class=&quot;url&quot;&gt;https://jsonplaceholder.typicode.com/todos&lt;/a&gt; 에 있는 데이터를 쓰도록 하겠습니다.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h5&gt;&lt;a name=&quot;header-n371&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;예제 2 - 스트림 빌더로 TodoList만들기&lt;/h5&gt;&lt;p&gt;이번엔 TodoList를 만들어보겠습니다. &lt;/p&gt;
&lt;p&gt;서버에서 데이터를 가져와서 TodoList를 만드는 예제에요.&lt;/p&gt;&lt;h6&gt;&lt;a name=&quot;header-n471&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;완성 후 모습&lt;/h6&gt;&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/13621579/48539078-80c9a700-e8f9-11e8-8ec6-88451449f2ce.png&quot; alt=&quot;alt text&quot; referrerpolicy=&quot;no-referrer&quot;&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;일단 Todo 데이터를 담을 클래스를 만들어 볼께요.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://jsonplaceholder.typicode.com/todos/1&quot; target=&quot;_blank&quot; class=&quot;url&quot;&gt;https://jsonplaceholder.typicode.com/todos/1&lt;/a&gt; 를 &lt;/p&gt;
&lt;p&gt;http request 하면 아래처럼 응답이 옵니다.&lt;/p&gt;&lt;pre lang=&quot;json&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; spellcheck=&quot;false&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;json&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;{&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-tab&quot; role=&quot;presentation&quot; cm-text=&quot;	&quot;&gt;    &lt;/span&gt;&lt;span class=&quot;cm-property&quot;&gt;userId&lt;/span&gt;: &lt;span class=&quot;cm-number&quot;&gt;1&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-tab&quot; role=&quot;presentation&quot; cm-text=&quot;	&quot;&gt;    &lt;/span&gt;&lt;span class=&quot;cm-property&quot;&gt;id&lt;/span&gt;: &lt;span class=&quot;cm-number&quot;&gt;1&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-tab&quot; role=&quot;presentation&quot; cm-text=&quot;	&quot;&gt;    &lt;/span&gt;&lt;span class=&quot;cm-property&quot;&gt;title&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;&quot;delectus aut autem&quot;&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-tab&quot; role=&quot;presentation&quot; cm-text=&quot;	&quot;&gt;    &lt;/span&gt;&lt;span class=&quot;cm-property&quot;&gt;completed&lt;/span&gt;: &lt;span class=&quot;cm-atom&quot;&gt;false&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;},&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 132px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 132px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;4개의 값이 응답 왔네요. &lt;/p&gt;
&lt;p&gt;이에 맞게 Todo클래스를 만들어주겠습니다. &lt;/p&gt;
&lt;p&gt;json처리를 위한 생성자를 추가적으로 만들었습니다!&lt;/p&gt;&lt;pre lang=&quot;dart&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; spellcheck=&quot;false&quot; style=&quot;page-break-inside: unset;&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;dart&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;Todo&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;userId&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;id&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;String&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;title&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;bool&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;completed&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;Todo&lt;/span&gt;(&lt;span class=&quot;cm-keyword&quot;&gt;this&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;userId&lt;/span&gt;, &lt;span class=&quot;cm-keyword&quot;&gt;this&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;id&lt;/span&gt;, &lt;span class=&quot;cm-keyword&quot;&gt;this&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;title&lt;/span&gt;, &lt;span class=&quot;cm-keyword&quot;&gt;this&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;completed&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;Todo&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;fromJson&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;Map&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;json&lt;/span&gt;) &lt;span class=&quot;cm-comment&quot;&gt;// named constructor&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  : &lt;span class=&quot;cm-variable&quot;&gt;userId&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;json&lt;/span&gt;[&lt;span class=&quot;cm-string&quot;&gt;'userId'&lt;/span&gt;],&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;id&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;json&lt;/span&gt;[&lt;span class=&quot;cm-string&quot;&gt;'id'&lt;/span&gt;],&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;title&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;json&lt;/span&gt;[&lt;span class=&quot;cm-string&quot;&gt;'title'&lt;/span&gt;],&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;completed&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;json&lt;/span&gt;[&lt;span class=&quot;cm-string&quot;&gt;'completed'&lt;/span&gt;];&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 308px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 308px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;이젠 UI 부분을 작업해볼께요. 버튼을 누르면 json 데이터를 서버에서 가져와 스트림 빌더에서 그려주는 구조입니다. &lt;/p&gt;
&lt;p&gt;스트림 빌더는 stream과 builder 부분으로 구성되어 있습니다. &lt;/p&gt;
&lt;p&gt;stream은 스트림 빌더에 쓰일 스트림을 정하는 일을 하고&lt;/p&gt;
&lt;p&gt; builder에서 스트림 데이터를 받아 UI 를 그리는 일을 합니다. &lt;/p&gt;&lt;pre lang=&quot;dart&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; spellcheck=&quot;false&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;dart&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;x&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;StreamBuilder&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;cm-variable&quot;&gt;stream&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;streamController&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;stream&lt;/span&gt;, &lt;span class=&quot;cm-comment&quot;&gt;// 스트림 빌더에서 쓰일 스트림을 지정&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;cm-variable&quot;&gt;builder&lt;/span&gt;: (&lt;span class=&quot;cm-variable&quot;&gt;BuildContext&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;context&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;AsyncSnapshot&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;snapshot&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-tab&quot; role=&quot;presentation&quot; cm-text=&quot;	&quot;&gt;    &lt;/span&gt;&lt;span class=&quot;cm-tab&quot; role=&quot;presentation&quot; cm-text=&quot;	&quot;&gt;    &lt;/span&gt;&lt;span class=&quot;cm-tab&quot; role=&quot;presentation&quot; cm-text=&quot;	&quot;&gt;    &lt;/span&gt;&lt;span class=&quot;cm-keyword&quot;&gt;if&lt;/span&gt; (&lt;span class=&quot;cm-variable&quot;&gt;snapshot&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;hasData&lt;/span&gt;) { &lt;span class=&quot;cm-comment&quot;&gt;// 스냅샷에 데이터가 있는지 확인&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span class=&quot;cm-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;Text&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;&quot;data&quot;&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;  } &lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; } &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;),&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 176px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 176px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h6&gt;&lt;a name=&quot;header-n757&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;예제2 - TodoList 전체 코드&lt;/h6&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;dart&quot; style=&quot;page-break-inside: unset;&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;dart&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;cm-string&quot;&gt;'dart:async'&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;cm-string&quot;&gt;'dart:convert'&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;cm-string&quot;&gt;'package:http/http.dart'&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;as&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;http&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;cm-string&quot;&gt;'package:flutter/material.dart'&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;TodoListPage&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;extends&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;StatefulWidget&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-meta&quot;&gt;@override&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;_TodoListPageState&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;createState&lt;/span&gt;() &lt;span class=&quot;cm-operator&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;_TodoListPageState&lt;/span&gt;();&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;_TodoListPageState&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;extends&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;State&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-variable&quot;&gt;TodoListPage&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;gt;&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;StreamController&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-variable&quot;&gt;List&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-variable&quot;&gt;Todo&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;streamController&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;StreamController&lt;/span&gt;(); &lt;span class=&quot;cm-comment&quot;&gt;// 데이터를 받아들이는 스트림.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;Future&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-variable&quot;&gt;List&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-variable&quot;&gt;Todo&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;getTodo&lt;/span&gt;() &lt;span class=&quot;cm-keyword&quot;&gt;async&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;String&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;url&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-string&quot;&gt;&quot;https://jsonplaceholder.typicode.com/todos&quot;&lt;/span&gt;; &lt;span class=&quot;cm-comment&quot;&gt;// http request를 보낼 url&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;http&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;Client&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;_client&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;http&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;Client&lt;/span&gt;(); &lt;span class=&quot;cm-comment&quot;&gt;// http 클라이언트 사용&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;List&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-variable&quot;&gt;Todo&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;list&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; [];&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;await&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;_client&lt;/span&gt;.&lt;span class=&quot;cm-keyword&quot;&gt;get&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;url&lt;/span&gt;) &lt;span class=&quot;cm-comment&quot;&gt;// http 리퀘스트를 보낸다.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  .&lt;span class=&quot;cm-variable&quot;&gt;then&lt;/span&gt;((&lt;span class=&quot;cm-variable&quot;&gt;res&lt;/span&gt;) &lt;span class=&quot;cm-operator&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;res&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;body&lt;/span&gt;) &lt;span class=&quot;cm-comment&quot;&gt;// http 응답을 받으면, 그 중에서 body만 가져옴&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  .&lt;span class=&quot;cm-variable&quot;&gt;then&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;json&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;decode&lt;/span&gt;) &lt;span class=&quot;cm-comment&quot;&gt;// json을 형태로 파싱하고&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  .&lt;span class=&quot;cm-variable&quot;&gt;then&lt;/span&gt;((&lt;span class=&quot;cm-variable&quot;&gt;todos&lt;/span&gt;) &lt;span class=&quot;cm-operator&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;todos&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;forEach&lt;/span&gt;((&lt;span class=&quot;cm-variable&quot;&gt;todo&lt;/span&gt;) &lt;span class=&quot;cm-operator&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;list&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;add&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;Todo&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;fromJson&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;todo&lt;/span&gt;))) &lt;span class=&quot;cm-comment&quot;&gt;// json을 클래스 형태로 바꿔서 리스트에 더해준다.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  );&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;list&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;Widget&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;_buildListTile&lt;/span&gt; (&lt;span class=&quot;cm-variable&quot;&gt;AsyncSnapshot&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;snapshot&lt;/span&gt;, &lt;span class=&quot;cm-builtin&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;index&lt;/span&gt;) { &lt;span class=&quot;cm-comment&quot;&gt;// 리스트 뷰에 들어갈 타일(작은 리스트뷰)를 만든다.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;id&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;snapshot&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;data&lt;/span&gt;[&lt;span class=&quot;cm-variable&quot;&gt;index&lt;/span&gt;].&lt;span class=&quot;cm-variable&quot;&gt;id&lt;/span&gt;; &lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;title&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;snapshot&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;data&lt;/span&gt;[&lt;span class=&quot;cm-variable&quot;&gt;index&lt;/span&gt;].&lt;span class=&quot;cm-variable&quot;&gt;title&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;bool&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;completed&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;snapshot&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;data&lt;/span&gt;[&lt;span class=&quot;cm-variable&quot;&gt;index&lt;/span&gt;].&lt;span class=&quot;cm-variable&quot;&gt;completed&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;ListTile&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;leading&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;Text&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;&quot;&lt;/span&gt;$&lt;span class=&quot;cm-variable&quot;&gt;id&lt;/span&gt;&lt;span class=&quot;cm-string&quot;&gt;&quot;&lt;/span&gt;),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;title&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;Text&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;&quot;&lt;/span&gt;$&lt;span class=&quot;cm-variable&quot;&gt;title&lt;/span&gt;&lt;span class=&quot;cm-string&quot;&gt;&quot;&lt;/span&gt;),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;subtitle&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;Text&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;&quot;completed &quot;&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;style&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;TextStyle&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;color&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;completed&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;?&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;Colors&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;lightBlue&lt;/span&gt; : &lt;span class=&quot;cm-variable&quot;&gt;Colors&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;red&lt;/span&gt;),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;  ),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  );&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-meta&quot;&gt;@override&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;Widget&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;build&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;BuildContext&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;context&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;Scaffold&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;appBar&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;AppBar&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;title&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;Text&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;&quot;Todo List&quot;&lt;/span&gt;)),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;body&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;Column&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;children&lt;/span&gt;: &lt;span class=&quot;cm-operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-variable&quot;&gt;Widget&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;gt;&lt;/span&gt;[&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;Center&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;child&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;RaisedButton&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;child&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;Text&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;&quot;Load&quot;&lt;/span&gt;),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;color&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;Colors&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;lightBlueAccent&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;textColor&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;Colors&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;white&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;onPressed&lt;/span&gt;: () { &lt;span class=&quot;cm-comment&quot;&gt;// 버튼을 누르면 서버에서 데이터를 가져옴&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;getTodo&lt;/span&gt;().&lt;span class=&quot;cm-variable&quot;&gt;then&lt;/span&gt;((&lt;span class=&quot;cm-variable&quot;&gt;todos&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;streamController&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;add&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;todos&lt;/span&gt;); &lt;span class=&quot;cm-comment&quot;&gt;// 스트림 컨트롤러에 데이터가 추가된다. &lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;  });&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;  },&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;  ),&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;  ),&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;Flexible&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;child&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;StreamBuilder&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;stream&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;streamController&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;stream&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;builder&lt;/span&gt;: (&lt;span class=&quot;cm-variable&quot;&gt;BuildContext&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;context&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;AsyncSnapshot&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;snapshot&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;if&lt;/span&gt; (&lt;span class=&quot;cm-operator&quot;&gt;!&lt;/span&gt;&lt;span class=&quot;cm-variable&quot;&gt;snapshot&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;hasData&lt;/span&gt;) { &lt;span class=&quot;cm-comment&quot;&gt;// 스냅샷에 데이터가 없으면 그냥 텍스트를 그린다.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;Text&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;&quot;no data&quot;&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;  } &lt;span class=&quot;cm-keyword&quot;&gt;else&lt;/span&gt; { &lt;span class=&quot;cm-comment&quot;&gt;// 스냅샷에 데이터가 있으면, 즉 스트림에 데이터가 추가되면 리스트뷰를 그린다. &lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;ListView&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;builder&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;itemCount&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;snapshot&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;data&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;length&lt;/span&gt;, &lt;span class=&quot;cm-comment&quot;&gt;// 스냅샷의 데이터 크기만큼 뷰 크기를 정한다. &lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;itemBuilder&lt;/span&gt;: (&lt;span class=&quot;cm-variable&quot;&gt;context&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;index&lt;/span&gt;) &lt;span class=&quot;cm-operator&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;_buildListTile&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;snapshot&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;index&lt;/span&gt;),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;  );&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot;CodeMirror-line&quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;  },&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;  ),&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;  ),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;  ],&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;  ));&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 1914px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 1914px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;이제 실행해볼까요?&lt;/p&gt;&lt;pre lang=&quot;dart&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; spellcheck=&quot;false&quot; style=&quot;page-break-inside: unset;&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;dart&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;x&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;cm-string&quot;&gt;'package:flutter/material.dart'&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;cm-string&quot;&gt;'todolist_page.dart'&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;main&lt;/span&gt;() &lt;span class=&quot;cm-operator&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;runApp&lt;/span&gt;(&lt;span class=&quot;cm-keyword&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;MyApp&lt;/span&gt;());&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;MyApp&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;extends&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;StatelessWidget&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-comment&quot;&gt;// This widget is the root of your application.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-meta&quot;&gt;@override&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;Widget&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;build&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;BuildContext&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;context&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;MaterialApp&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;title&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;'Flutter Demo'&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;theme&lt;/span&gt;: &lt;span class=&quot;cm-keyword&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;ThemeData&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;primarySwatch&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;Colors&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;blue&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;  ),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;home&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;TodoListPage&lt;/span&gt;(),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  );&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 396px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 396px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;화면 상단의 Load 버튼을 누르면 json파일을 서버에서 불러와서 보여줍니다. &lt;/p&gt;
&lt;p&gt;매끄럽게 처리가 되죠?&lt;/p&gt;
&lt;p&gt;스트림을 쓰면 비동기 데이터를 다루는 일이 한결 편해지는 걸 알 수 있습니다. &lt;/p&gt;
&lt;p&gt;다만 아쉬운 점은 스트림과 스트림 빌더가 앱에 추가되다 보니, UI 코드와 섞인단 거죠.&lt;/p&gt;
&lt;p&gt;앱의 크기가 커질수록 UI와 데이터 부분이 더 많이 섞이겠죠. &lt;/p&gt;
&lt;p&gt;이 문제를 해결하기 위해선 UI와 데이터 처리 부분을 분리해줘야합니다. &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h3&gt;&lt;a name=&quot;header-n539&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;Bloc 패턴&lt;/h3&gt;&lt;p&gt;Bloc은 비즈니스 로직 컴포턴트(Business Logic Component)의 약자입니다. &lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;p&gt;Bloc 패턴이 쓰이는 이유?&lt;/p&gt;&lt;ul&gt;&lt;li&gt;UI와 비즈니스 로직을 분리해 개발을 원활히 하고자 함입니다.&lt;/li&gt;&lt;li&gt;비즈니스 로직은 데이터베이스 조회나 서버와의 통신 등 데이터를 처리하는 부분을 말합니다.&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;UI와 비즈니스 로직을 분리하면, UI를 수정하는 일이 비즈니스 로직에 영향을 미치지 않고 비즈니스 로직의 변경이 UI에 영향을 미치지 않게 됩니다. 테스트가 용이해지고,  UI의 변경이 손쉬워집니다. 또한 위젯 &lt;em&gt;build&lt;/em&gt; 횟수가 줄어들게 됩니다. 성능면에서도 이점이 있죠. &lt;/li&gt;&lt;li&gt;기존의 MVC와 유사합니다.&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h6&gt;&lt;a name=&quot;header-n706&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;Bloc 패턴 그림 &lt;/h6&gt;&lt;div class=&quot;md-diagram-panel&quot;&gt;&lt;svg id=&quot;mermaidChart65&quot; width=&quot;233.21875&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot; height=&quot;333&quot; viewBox=&quot;0 0 233.21875 333&quot; style=&quot;height: 373px;&quot;&gt;&lt;style&gt;&lt;/style&gt;&lt;style&gt;#mermaidChart65 {
    color: rgb(51, 51, 51);
    font: normal normal normal normal 14.399999618530273px/23px &quot;Lucida Console&quot;, Consolas, Courier, monospace;
  }&lt;/style&gt;&lt;g transform=&quot;translate(32, 32)&quot;&gt;&lt;g class=&quot;output&quot;&gt;&lt;g class=&quot;clusters&quot;&gt;&lt;/g&gt;&lt;g class=&quot;edgePaths&quot;&gt;&lt;g class=&quot;edgePath&quot; style=&quot;opacity: 1;&quot;&gt;&lt;path class=&quot;path&quot; d=&quot;M79.9857190860215,63L74.609375,88L79.9857190860215,113&quot; marker-end=&quot;url(#arrowhead616)&quot; style=&quot;fill:none&quot;&gt;&lt;/path&gt;&lt;defs&gt;&lt;marker id=&quot;arrowhead616&quot; viewBox=&quot;0 0 10 10&quot; refX=&quot;9&quot; refY=&quot;5&quot; markerUnits=&quot;strokeWidth&quot; markerWidth=&quot;8&quot; markerHeight=&quot;6&quot; orient=&quot;auto&quot;&gt;&lt;path d=&quot;M 0 0 L 10 5 L 0 10 z&quot; class=&quot;arrowheadPath&quot; style=&quot;stroke-width: 1px; stroke-dasharray: 1px, 0px;&quot;&gt;&lt;/path&gt;&lt;/marker&gt;&lt;/defs&gt;&lt;/g&gt;&lt;g class=&quot;edgePath&quot; style=&quot;opacity: 1;&quot;&gt;&lt;path class=&quot;path&quot; d=&quot;M89.2330309139785,113L94.609375,88L89.2330309139785,63&quot; marker-end=&quot;url(#arrowhead617)&quot; style=&quot;fill:none&quot;&gt;&lt;/path&gt;&lt;defs&gt;&lt;marker id=&quot;arrowhead617&quot; viewBox=&quot;0 0 10 10&quot; refX=&quot;9&quot; refY=&quot;5&quot; markerUnits=&quot;strokeWidth&quot; markerWidth=&quot;8&quot; markerHeight=&quot;6&quot; orient=&quot;auto&quot;&gt;&lt;path d=&quot;M 0 0 L 10 5 L 0 10 z&quot; class=&quot;arrowheadPath&quot; style=&quot;stroke-width: 1px; stroke-dasharray: 1px, 0px;&quot;&gt;&lt;/path&gt;&lt;/marker&gt;&lt;/defs&gt;&lt;/g&gt;&lt;g class=&quot;edgePath&quot; style=&quot;opacity: 1;&quot;&gt;&lt;path class=&quot;path&quot; d=&quot;M89.2330309139785,206L94.609375,181L89.2330309139785,156&quot; marker-end=&quot;url(#arrowhead618)&quot; style=&quot;fill:none&quot;&gt;&lt;/path&gt;&lt;defs&gt;&lt;marker id=&quot;arrowhead618&quot; viewBox=&quot;0 0 10 10&quot; refX=&quot;9&quot; refY=&quot;5&quot; markerUnits=&quot;strokeWidth&quot; markerWidth=&quot;8&quot; markerHeight=&quot;6&quot; orient=&quot;auto&quot;&gt;&lt;path d=&quot;M 0 0 L 10 5 L 0 10 z&quot; class=&quot;arrowheadPath&quot; style=&quot;stroke-width: 1px; stroke-dasharray: 1px, 0px;&quot;&gt;&lt;/path&gt;&lt;/marker&gt;&lt;/defs&gt;&lt;/g&gt;&lt;g class=&quot;edgePath&quot; style=&quot;opacity: 1;&quot;&gt;&lt;path class=&quot;path&quot; d=&quot;M79.9857190860215,156L74.609375,181L79.9857190860215,206&quot; marker-end=&quot;url(#arrowhead619)&quot; style=&quot;fill:none&quot;&gt;&lt;/path&gt;&lt;defs&gt;&lt;marker id=&quot;arrowhead619&quot; viewBox=&quot;0 0 10 10&quot; refX=&quot;9&quot; refY=&quot;5&quot; markerUnits=&quot;strokeWidth&quot; markerWidth=&quot;8&quot; markerHeight=&quot;6&quot; orient=&quot;auto&quot;&gt;&lt;path d=&quot;M 0 0 L 10 5 L 0 10 z&quot; class=&quot;arrowheadPath&quot; style=&quot;stroke-width: 1px; stroke-dasharray: 1px, 0px;&quot;&gt;&lt;/path&gt;&lt;/marker&gt;&lt;/defs&gt;&lt;/g&gt;&lt;/g&gt;&lt;g class=&quot;edgeLabels&quot;&gt;&lt;g class=&quot;edgeLabel&quot; transform=&quot;&quot; style=&quot;opacity: 1;&quot;&gt;&lt;g transform=&quot;translate(0,0)&quot; class=&quot;label&quot;&gt;&lt;foreignObject width=&quot;0&quot; height=&quot;0&quot;&gt;&lt;div xmlns=&quot;http://www.w3.org/1999/xhtml&quot; style=&quot;display: inline-block; white-space: nowrap;&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;/foreignObject&gt;&lt;/g&gt;&lt;/g&gt;&lt;g class=&quot;edgeLabel&quot; transform=&quot;&quot; style=&quot;opacity: 1;&quot;&gt;&lt;g transform=&quot;translate(0,0)&quot; class=&quot;label&quot;&gt;&lt;foreignObject width=&quot;0&quot; height=&quot;0&quot;&gt;&lt;div xmlns=&quot;http://www.w3.org/1999/xhtml&quot; style=&quot;display: inline-block; white-space: nowrap;&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;/foreignObject&gt;&lt;/g&gt;&lt;/g&gt;&lt;g class=&quot;edgeLabel&quot; transform=&quot;&quot; style=&quot;opacity: 1;&quot;&gt;&lt;g transform=&quot;translate(0,0)&quot; class=&quot;label&quot;&gt;&lt;foreignObject width=&quot;0&quot; height=&quot;0&quot;&gt;&lt;div xmlns=&quot;http://www.w3.org/1999/xhtml&quot; style=&quot;display: inline-block; white-space: nowrap;&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;/foreignObject&gt;&lt;/g&gt;&lt;/g&gt;&lt;g class=&quot;edgeLabel&quot; transform=&quot;&quot; style=&quot;opacity: 1;&quot;&gt;&lt;g transform=&quot;translate(0,0)&quot; class=&quot;label&quot;&gt;&lt;foreignObject width=&quot;0&quot; height=&quot;0&quot;&gt;&lt;div xmlns=&quot;http://www.w3.org/1999/xhtml&quot; style=&quot;display: inline-block; white-space: nowrap;&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;/foreignObject&gt;&lt;/g&gt;&lt;/g&gt;&lt;/g&gt;&lt;g class=&quot;nodes&quot;&gt;&lt;g class=&quot;node&quot; id=&quot;A&quot; transform=&quot;translate(84.609375,41.5)&quot; style=&quot;opacity: 1;&quot;&gt;&lt;rect rx=&quot;5&quot; ry=&quot;5&quot; x=&quot;-47.8125&quot; y=&quot;-21.5&quot; width=&quot;95.625&quot; height=&quot;43&quot;&gt;&lt;/rect&gt;&lt;g class=&quot;label&quot; transform=&quot;translate(0,0)&quot;&gt;&lt;g transform=&quot;translate(-37.8125,-11.5)&quot;&gt;&lt;foreignObject width=&quot;75.625&quot; height=&quot;23&quot;&gt;&lt;div xmlns=&quot;http://www.w3.org/1999/xhtml&quot; style=&quot;display: inline-block; white-space: nowrap;&quot;&gt;UI Screen&lt;/div&gt;&lt;/foreignObject&gt;&lt;/g&gt;&lt;/g&gt;&lt;/g&gt;&lt;g class=&quot;node&quot; id=&quot;B&quot; transform=&quot;translate(84.609375,134.5)&quot; style=&quot;opacity: 1;&quot;&gt;&lt;rect rx=&quot;5&quot; ry=&quot;5&quot; x=&quot;-39.40625&quot; y=&quot;-21.5&quot; width=&quot;78.8125&quot; height=&quot;43&quot;&gt;&lt;/rect&gt;&lt;g class=&quot;label&quot; transform=&quot;translate(0,0)&quot;&gt;&lt;g transform=&quot;translate(-29.40625,-11.5)&quot;&gt;&lt;foreignObject width=&quot;58.8125&quot; height=&quot;23&quot;&gt;&lt;div xmlns=&quot;http://www.w3.org/1999/xhtml&quot; style=&quot;display: inline-block; white-space: nowrap;&quot;&gt;B L O C&lt;/div&gt;&lt;/foreignObject&gt;&lt;/g&gt;&lt;/g&gt;&lt;/g&gt;&lt;g class=&quot;node&quot; id=&quot;C&quot; transform=&quot;translate(84.609375,227.5)&quot; style=&quot;opacity: 1;&quot;&gt;&lt;rect rx=&quot;5&quot; ry=&quot;5&quot; x=&quot;-64.609375&quot; y=&quot;-21.5&quot; width=&quot;129.21875&quot; height=&quot;43&quot;&gt;&lt;/rect&gt;&lt;g class=&quot;label&quot; transform=&quot;translate(0,0)&quot;&gt;&lt;g transform=&quot;translate(-54.609375,-11.5)&quot;&gt;&lt;foreignObject width=&quot;109.21875&quot; height=&quot;23&quot;&gt;&lt;div xmlns=&quot;http://www.w3.org/1999/xhtml&quot; style=&quot;display: inline-block; white-space: nowrap;&quot;&gt;Data Provider&lt;/div&gt;&lt;/foreignObject&gt;&lt;/g&gt;&lt;/g&gt;&lt;/g&gt;&lt;/g&gt;&lt;/g&gt;&lt;/g&gt;&lt;/svg&gt;&lt;/div&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h5&gt;&lt;a name=&quot;header-n655&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;Bloc 패턴을 앱에다 어떻게 적용할까?&lt;/h5&gt;&lt;p&gt;앱에 블락 패턴을 쓰려면 3가지를 해야합니다. &lt;/p&gt;&lt;ol&gt;&lt;li&gt;Bloc을 만들고 필요한 로직을 구현한다. &lt;/li&gt;&lt;/ol&gt;&lt;ol start=&quot;2&quot;&gt;&lt;li&gt;BlocProvider을 만든다. BlocProvider는 로직(Bloc)을 UI에 건내주기만 합니다. Provider(제공자)란 이름에 맞는 역할이지요. &lt;/li&gt;&lt;/ol&gt;&lt;ol start=&quot;3&quot;&gt;&lt;li&gt;BlocProvider를 통해 건내받은 Bloc을 StreamBuilder와 연결합니다. &lt;/li&gt;&lt;/ol&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;실제 Bloc 패턴이 어떻게 쓰이는지 위에서 만든 TodoList 앱을 통해서 설명해볼께요.&lt;/p&gt;&lt;h5&gt;&lt;a name=&quot;header-n784&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;예제3. TodoList 만들기 - Bloc패턴 적용&lt;/h5&gt;&lt;p&gt;예제3의 소스는 &lt;a href=&quot;https://github.com/Hochul822/bloc_pattern&quot;&gt;여기 - github&lt;/a&gt; 서 확인하실 수 있습니다.&lt;/p&gt;
&lt;p&gt;폴더 구조는 다음과 같습니다. &lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/13621579/48624754-98378b80-e9f0-11e8-9139-23cab3d7b7a4.png&quot; alt=&quot;alt text&quot; referrerpolicy=&quot;no-referrer&quot;&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;UI, Bloc, Data를 다 분리해주었습니다.&lt;/p&gt;
&lt;p&gt;일단 Todo 데이터를 담을 클래스를 만들어줍니다. &lt;/p&gt;
&lt;p&gt;여기까지는 이전 예제와 큰 차이는 없습니다.&lt;/p&gt;&lt;h6&gt;&lt;a name=&quot;header-n760&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;todo.dart&lt;/h6&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;dart&quot; style=&quot;page-break-inside: unset;&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;dart&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;Todo&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;userId&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;id&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;String&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;title&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;bool&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;completed&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;Todo&lt;/span&gt;(&lt;span class=&quot;cm-keyword&quot;&gt;this&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;userId&lt;/span&gt;, &lt;span class=&quot;cm-keyword&quot;&gt;this&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;id&lt;/span&gt;, &lt;span class=&quot;cm-keyword&quot;&gt;this&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;title&lt;/span&gt;, &lt;span class=&quot;cm-keyword&quot;&gt;this&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;completed&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;Todo&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;fromJson&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;Map&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;json&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;  : &lt;span class=&quot;cm-variable&quot;&gt;userId&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;json&lt;/span&gt;[&lt;span class=&quot;cm-string&quot;&gt;'userId'&lt;/span&gt;],&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;id&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;json&lt;/span&gt;[&lt;span class=&quot;cm-string&quot;&gt;'id'&lt;/span&gt;],&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;title&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;json&lt;/span&gt;[&lt;span class=&quot;cm-string&quot;&gt;'title'&lt;/span&gt;],&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;completed&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;json&lt;/span&gt;[&lt;span class=&quot;cm-string&quot;&gt;'completed'&lt;/span&gt;];&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 308px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 308px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;json 데이터를 가져오는 api를 만들어볼께요.&lt;/p&gt;&lt;h6&gt;&lt;a name=&quot;header-n772&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;api.dart&lt;/h6&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;dart&quot; style=&quot;page-break-inside: unset;&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;dart&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;cm-string&quot;&gt;'dart:async'&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;cm-string&quot;&gt;'dart:convert'&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;cm-string&quot;&gt;'package:http/http.dart'&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;as&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;http&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;cm-string&quot;&gt;'../model/todo.dart'&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;API&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;final&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;http&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;Client&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;_client&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;http&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;Client&lt;/span&gt;();&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;cm-builtin&quot;&gt;String&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;_url&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-string&quot;&gt;&quot;https://jsonplaceholder.typicode.com/todos&quot;&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;Future&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-variable&quot;&gt;List&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-variable&quot;&gt;Todo&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;getTodo&lt;/span&gt;() &lt;span class=&quot;cm-keyword&quot;&gt;async&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;List&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-variable&quot;&gt;Todo&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;list&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; [];&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;await&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;_client&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;  .&lt;span class=&quot;cm-keyword&quot;&gt;get&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;Uri&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;parse&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;_url&lt;/span&gt;))&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;  .&lt;span class=&quot;cm-variable&quot;&gt;then&lt;/span&gt;((&lt;span class=&quot;cm-variable&quot;&gt;res&lt;/span&gt;) &lt;span class=&quot;cm-operator&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;res&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;body&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;  .&lt;span class=&quot;cm-variable&quot;&gt;then&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;json&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;decode&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;  .&lt;span class=&quot;cm-variable&quot;&gt;then&lt;/span&gt;((&lt;span class=&quot;cm-variable&quot;&gt;todos&lt;/span&gt;) &lt;span class=&quot;cm-operator&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;todos&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;forEach&lt;/span&gt;((&lt;span class=&quot;cm-variable&quot;&gt;todo&lt;/span&gt;) &lt;span class=&quot;cm-operator&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;list&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;add&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;Todo&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;fromJson&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;todo&lt;/span&gt;))&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;  ));&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;list&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 550px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 550px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;Bloc 부분이에요.&lt;/p&gt;
&lt;p&gt;데이터를 가져오면 그걸 스트림에 더해줍니다. &lt;/p&gt;
&lt;p&gt;이전 예제에서는 UI 부분이랑 섞여 있는 걸 분리했습니다.&lt;/p&gt;&lt;h6&gt;&lt;a name=&quot;header-n797&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;todo_bloc.dart&lt;/h6&gt;&lt;pre lang=&quot;dart&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; spellcheck=&quot;false&quot; style=&quot;page-break-inside: unset;&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;dart&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;cm-string&quot;&gt;'dart:async'&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;cm-string&quot;&gt;'../model/todo.dart'&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;cm-string&quot;&gt;'../repository/api.dart'&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;TodoBloc&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;final&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;API&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;api&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;StreamController&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-variable&quot;&gt;List&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-variable&quot;&gt;Todo&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;ctrl&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;StreamController&lt;/span&gt;();&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;Stream&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-variable&quot;&gt;List&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-variable&quot;&gt;Todo&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;get&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;results&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;ctrl&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;stream&lt;/span&gt;; &lt;span class=&quot;cm-comment&quot;&gt;// 바로 스트림에 접근하지 않기 위해 만들었습니다.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;TodoBloc&lt;/span&gt;(&lt;span class=&quot;cm-keyword&quot;&gt;this&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;api&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;dispose&lt;/span&gt;() { &lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;ctrl&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;close&lt;/span&gt;(); &lt;span class=&quot;cm-comment&quot;&gt;// 스트림은 안 쓸 때 닫아줘야합니다. &lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  }&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;getTodo&lt;/span&gt;() {&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;api&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;getTodo&lt;/span&gt;().&lt;span class=&quot;cm-variable&quot;&gt;then&lt;/span&gt;((&lt;span class=&quot;cm-variable&quot;&gt;todos&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;ctrl&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;add&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;todos&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  });&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  }&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 528px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 528px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;이제 Provider를 만들어볼께요. &lt;/p&gt;
&lt;p&gt;Bloc은 항상 Provider를 통해서 사용합니다. &lt;/p&gt;
&lt;p&gt;Provider는 &lt;em&gt;InheritedWidget&lt;/em&gt;을 상속받습니다. &lt;/p&gt;
&lt;p&gt;InheritedWidget을 쓰면 자식 위젯에서도 접근할 수 있기에, Bloc을 어디서나 접근할 수 있게 하려고 InheritedWidget을 썼습니다. &lt;/p&gt;&lt;h6&gt;&lt;a name=&quot;header-n817&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;TodoProvider.dart&lt;/h6&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;dart&quot; style=&quot;page-break-inside: unset;&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;dart&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;cm-string&quot;&gt;'package:flutter/material.dart'&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;cm-string&quot;&gt;'todo_bloc.dart'&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;cm-string&quot;&gt;'../repository/api.dart'&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;TodoProvider&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;extends&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;InheritedWidget&lt;/span&gt; { &lt;span class=&quot;cm-comment&quot;&gt;// 자식 위젯에서 접근하기 위함&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;final&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;TodoBloc&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;todoBloc&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-meta&quot;&gt;@override&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;bool&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;updateShouldNotify&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;InheritedWidget&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;oldWidget&lt;/span&gt;) &lt;span class=&quot;cm-operator&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;cm-atom&quot;&gt;true&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;TodoBloc&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;of&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;BuildContext&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;context&lt;/span&gt;) &lt;span class=&quot;cm-operator&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;  (&lt;span class=&quot;cm-variable&quot;&gt;context&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;inheritFromWidgetOfExactType&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;TodoProvider&lt;/span&gt;) &lt;span class=&quot;cm-keyword&quot;&gt;as&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;TodoProvider&lt;/span&gt;).&lt;span class=&quot;cm-variable&quot;&gt;todoBloc&lt;/span&gt;; &lt;span class=&quot;cm-comment&quot;&gt;// static으로 해서 1번만 초기화하도록 함. &lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;TodoProvider&lt;/span&gt;({&lt;span class=&quot;cm-variable&quot;&gt;Key&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;key&lt;/span&gt; , &lt;span class=&quot;cm-variable&quot;&gt;TodoBloc&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;todoBloc&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;Widget&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;child&lt;/span&gt; })&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  : &lt;span class=&quot;cm-keyword&quot;&gt;this&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;todoBloc&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;todoBloc&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;??&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;TodoBloc&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;API&lt;/span&gt;()),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;super&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;child&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;child&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;key&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;key&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 396px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 396px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;이제 UI 부분을 만들어볼께요. &lt;/p&gt;
&lt;p&gt;TodoList를 그리는 화면이고, StreamBuilder를 사용했습니다. &lt;/p&gt;
&lt;p&gt;todo_page.dart&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;dart&quot; style=&quot;page-break-inside: unset;&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;dart&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;cm-string&quot;&gt;'package:flutter/material.dart'&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;cm-string&quot;&gt;'../bloc/todo_provider.dart'&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;TodoPage&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;extends&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;StatefulWidget&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-meta&quot;&gt;@override&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;_TodoPageState&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;createState&lt;/span&gt;() &lt;span class=&quot;cm-operator&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;_TodoPageState&lt;/span&gt;();&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;_TodoPageState&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;extends&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;State&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-variable&quot;&gt;TodoPage&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;gt;&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;Widget&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;_buildListTile&lt;/span&gt; (&lt;span class=&quot;cm-variable&quot;&gt;AsyncSnapshot&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;snapshot&lt;/span&gt;, &lt;span class=&quot;cm-builtin&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;index&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;id&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;snapshot&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;data&lt;/span&gt;[&lt;span class=&quot;cm-variable&quot;&gt;index&lt;/span&gt;].&lt;span class=&quot;cm-variable&quot;&gt;id&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;title&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;snapshot&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;data&lt;/span&gt;[&lt;span class=&quot;cm-variable&quot;&gt;index&lt;/span&gt;].&lt;span class=&quot;cm-variable&quot;&gt;title&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;bool&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;completed&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;snapshot&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;data&lt;/span&gt;[&lt;span class=&quot;cm-variable&quot;&gt;index&lt;/span&gt;].&lt;span class=&quot;cm-variable&quot;&gt;completed&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;ListTile&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;leading&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;Text&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;&quot;&lt;/span&gt;$&lt;span class=&quot;cm-variable&quot;&gt;id&lt;/span&gt;&lt;span class=&quot;cm-string&quot;&gt;&quot;&lt;/span&gt;),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;title&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;Text&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;&quot;&lt;/span&gt;$&lt;span class=&quot;cm-variable&quot;&gt;title&lt;/span&gt;&lt;span class=&quot;cm-string&quot;&gt;&quot;&lt;/span&gt;),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;subtitle&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;Text&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;&quot;completed &quot;&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;style&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;TextStyle&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;color&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;completed&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;?&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;Colors&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;lightBlue&lt;/span&gt; : &lt;span class=&quot;cm-variable&quot;&gt;Colors&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;red&lt;/span&gt;),&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;  ),&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  );&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  }&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-meta&quot;&gt;@override&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;Widget&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;build&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;BuildContext&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;context&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;final&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;todoBloc&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;TodoProvider&lt;/span&gt;.&lt;span class=&quot;cm-keyword&quot;&gt;of&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;context&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;Scaffold&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;appBar&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;AppBar&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;title&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;Text&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;&quot;Title&quot;&lt;/span&gt;)),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;body&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;Center&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;child&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;Column&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;children&lt;/span&gt;: &lt;span class=&quot;cm-operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-variable&quot;&gt;Widget&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;gt;&lt;/span&gt;[&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;Text&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;&quot;Stream Builder with Bloc&quot;&lt;/span&gt;),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;RaisedButton&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;color&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;Colors&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;lightBlueAccent&lt;/span&gt;[&lt;span class=&quot;cm-number&quot;&gt;200&lt;/span&gt;],&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;child&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;Text&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-string&quot;&gt;&quot;Load Data&quot;&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;style&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;TextStyle&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;color&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;Colors&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;white&lt;/span&gt;),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;  ),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;onPressed&lt;/span&gt;: () {&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;todoBloc&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;getTodo&lt;/span&gt;();&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;  }),&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;Flexible&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;child&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;StreamBuilder&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;stream&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;todoBloc&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;results&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;builder&lt;/span&gt;: (&lt;span class=&quot;cm-variable&quot;&gt;context&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;snapshot&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;if&lt;/span&gt; (&lt;span class=&quot;cm-operator&quot;&gt;!&lt;/span&gt;&lt;span class=&quot;cm-variable&quot;&gt;snapshot&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;hasData&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;Text&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;&quot;No data&quot;&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;  } &lt;span class=&quot;cm-keyword&quot;&gt;else&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;ListView&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;builder&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;itemCount&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;snapshot&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;data&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;length&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;itemBuilder&lt;/span&gt;: (&lt;span class=&quot;cm-variable&quot;&gt;context&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;index&lt;/span&gt;) &lt;span class=&quot;cm-operator&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;_buildListTile&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;snapshot&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;index&lt;/span&gt;),&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;  );&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;  },&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;  ),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;  )&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;  ],&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;  ),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;  ),&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  );&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 1430px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 1430px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;마지막 메인 부분입니다. &lt;/p&gt;
&lt;p&gt;&lt;em&gt;MaterialApp&lt;/em&gt; 을 &lt;em&gt;TodoProvider&lt;/em&gt;가 감싸고 있는데, &lt;/p&gt;
&lt;p&gt;Bloc을 어디서나 쓸 수 있도록 하기 위함입니다. &lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;dart&quot; style=&quot;page-break-inside: unset;&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;dart&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;cm-string&quot;&gt;'package:flutter/material.dart'&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;cm-string&quot;&gt;'ui/todo_page.dart'&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;cm-string&quot;&gt;'bloc/todo_provider.dart'&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;cm-string&quot;&gt;'bloc/todo_bloc.dart'&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;cm-string&quot;&gt;'repository/api.dart'&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;main&lt;/span&gt;() &lt;span class=&quot;cm-operator&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;runApp&lt;/span&gt;(&lt;span class=&quot;cm-keyword&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;MyApp&lt;/span&gt;());&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;MyApp&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;extends&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;StatelessWidget&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-comment&quot;&gt;// This widget is the root of your application.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-meta&quot;&gt;@override&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;Widget&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;build&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;BuildContext&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;context&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;TodoProvider&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;todoBloc&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;TodoBloc&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;API&lt;/span&gt;()),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;child&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;MaterialApp&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;debugShowCheckedModeBanner&lt;/span&gt;: &lt;span class=&quot;cm-atom&quot;&gt;false&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;title&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;'Flutter Demo'&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;theme&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;ThemeData&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;primarySwatch&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;Colors&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;blue&lt;/span&gt;),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;home&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;TodoPage&lt;/span&gt;(),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;  ),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  );&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 528px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 528px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;실행을 해볼까요?&lt;/p&gt;
&lt;p&gt;실행 결과는 예제2와 동일합니다.&lt;/p&gt;
&lt;p&gt;하지만 UI코드를 분리하다보니 코드가 간결해진 걸 알 수 있습니다. &lt;/p&gt;
&lt;p&gt;이처럼 Bloc 패턴을 활용하면 보기 좋고, 깔끔한 코드를 만들 수 있습니다. &lt;/p&gt;&lt;h3&gt;&lt;a name=&quot;header-n878&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;마무리&lt;/h3&gt;&lt;p&gt;리액티브 프로그래밍은 플러터에서도 예외는 아니었습니다. &lt;/p&gt;
&lt;p&gt;저도 처음엔 왜 쓰나 했는데 적응 될 수록 코드가 간결해지는 맛이 있더군요. &lt;/p&gt;
&lt;p&gt;하지만 처음 플러터를 배울 때부터 Bloc 패턴을 적용하는 건 무리가 있단 생각이 드네요. &lt;/p&gt;
&lt;p&gt;처음에는 한 클래스에 넣다가, UI와 로직을 분리하고픈 생각이 들면 그때 Bloc패턴을 적용해봅시다!&lt;/p&gt;
&lt;p&gt;--&lt;/p&gt;
&lt;p&gt;참고&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://www.didierboelens.com/2018/08/reactive-programming---streams---bloc/&quot;&gt;리액티브 프로그래밍과 Bloc&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://www.youtube.com/watch?v=ALcbTxz3bUw&amp;amp;t=1s&quot;&gt;tensor programming의 유튜브 강의&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;/div&gt;</description>
      <category>플러터(Flutter)</category>
      <category>Flutter</category>
      <category>flutter android</category>
      <category>flutter bloc</category>
      <category>flutter ios</category>
      <category>flutter java</category>
      <category>flutter reactive programming</category>
      <category>flutter rxdart</category>
      <category>크로스 플랫폼 앱</category>
      <category>크로스플랫폼</category>
      <category>플러터</category>
      <category>플루터</category>
      <category>플루터 안드로이드</category>
      <author>에드 신</author>
      <guid isPermaLink="true">https://software-creator.tistory.com/13</guid>
      <comments>https://software-creator.tistory.com/13#entry13comment</comments>
      <pubDate>Fri, 16 Nov 2018 22:53:28 +0900</pubDate>
    </item>
    <item>
      <title>무료 국비 학원갈까 말까?</title>
      <link>https://software-creator.tistory.com/12</link>
      <description>&lt;meta charset=&quot;UTF-8&quot;&gt;&lt;meta name=&quot;viewport&quot; content=&quot;width=device-width initial-scale=1&quot;&gt;
&lt;title&gt;무료 국비 학원갈까 말까?&lt;/title&gt;&lt;link href=&quot;https://fonts.loli.net/css?family=Open+Sans:400italic,700italic,700,400&amp;amp;subset=latin,latin-ext&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot;&gt;&lt;style type=&quot;text/css&quot;&gt;html {overflow-x: initial !important;}:root { --bg-color: #ffffff; --text-color: #333333; --select-text-bg-color: #B5D6FC; --select-text-font-color: auto; --monospace: &quot;Lucida Console&quot;,Consolas,&quot;Courier&quot;,monospace; }
html { font-size: 14px; background-color: var(--bg-color); color: var(--text-color); font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; -webkit-font-smoothing: antialiased; }
body { margin: 0px; padding: 0px; height: auto; bottom: 0px; top: 0px; left: 0px; right: 0px; font-size: 1rem; line-height: 1.42857143; overflow-x: hidden; background-image: inherit; background-size: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: inherit; background-position: inherit inherit; background-repeat: inherit inherit; }
iframe { margin: auto; }
a.url { word-break: break-all; }
a:active, a:hover { outline: 0px; }
.in-text-selection, ::selection { text-shadow: none; background: var(--select-text-bg-color); color: var(--select-text-font-color); }
#write { margin: 0px auto; height: auto; width: inherit; word-break: normal; word-wrap: break-word; position: relative; white-space: normal; overflow-x: visible; }
#write.first-line-indent p { text-indent: 2em; }
#write.first-line-indent li p, #write.first-line-indent p * { text-indent: 0px; }
#write.first-line-indent li { margin-left: 2em; }
.for-image #write { padding-left: 8px; padding-right: 8px; }
body.typora-export { padding-left: 30px; padding-right: 30px; }
.typora-export .footnote-line, .typora-export p { white-space: pre-wrap; }
@media screen and (max-width: 500px) { 
  body.typora-export { padding-left: 0px; padding-right: 0px; }
  .CodeMirror-sizer { margin-left: 0px !important; }
  .CodeMirror-gutters { display: none !important; }
}
#write li &gt; figure:first-child { margin-top: -20px; }
#write ol, #write ul { position: relative; }
img { max-width: 100%; vertical-align: middle; }
button, input, select, textarea { color: inherit; font-family: inherit; font-size: inherit; font-style: inherit; font-variant-caps: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; }
input[type=&quot;checkbox&quot;], input[type=&quot;radio&quot;] { line-height: normal; padding: 0px; }
*, ::after, ::before { box-sizing: border-box; }
#write h1, #write h2, #write h3, #write h4, #write h5, #write h6, #write p, #write pre { width: inherit; }
#write h1, #write h2, #write h3, #write h4, #write h5, #write h6, #write p { position: relative; }
h1, h2, h3, h4, h5, h6 { break-after: avoid-page; break-inside: avoid; orphans: 2; }
p { orphans: 4; }
h1 { font-size: 2rem; }
h2 { font-size: 1.8rem; }
h3 { font-size: 1.6rem; }
h4 { font-size: 1.4rem; }
h5 { font-size: 1.2rem; }
h6 { font-size: 1rem; }
.md-math-block, .md-rawblock, h1, h2, h3, h4, h5, h6, p { margin-top: 1rem; margin-bottom: 1rem; }
.hidden { display: none; }
.md-blockmeta { color: rgb(204, 204, 204); font-weight: 700; font-style: italic; }
a { cursor: pointer; }
sup.md-footnote { padding: 2px 4px; background-color: rgba(238, 238, 238, 0.701961); color: rgb(85, 85, 85); border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; cursor: pointer; }
sup.md-footnote a, sup.md-footnote a:hover { color: inherit; text-transform: inherit; text-decoration: inherit; }
#write input[type=&quot;checkbox&quot;] { cursor: pointer; width: inherit; height: inherit; }
figure { overflow-x: auto; margin: 1.2em 0px; max-width: calc(100% + 16px); padding: 0px; }
figure &gt; table { margin: 0px !important; }
tr { break-inside: avoid; break-after: auto; }
thead { display: table-header-group; }
table { border-collapse: collapse; border-spacing: 0px; width: 100%; overflow: auto; break-inside: auto; text-align: left; }
table.md-table td { min-width: 80px; }
.CodeMirror-gutters { border-right-width: 0px; background-color: inherit; }
.CodeMirror { text-align: left; }
.CodeMirror-placeholder { opacity: 0.3; }
.CodeMirror pre { padding: 0px 4px; }
.CodeMirror-lines { padding: 0px; }
div.hr:focus { cursor: none; }
#write pre { white-space: pre-wrap; }
#write.fences-no-line-wrapping pre { white-space: pre; }
#write pre.ty-contain-cm { white-space: normal; }
.CodeMirror-gutters { margin-right: 4px; }
.md-fences { font-size: 0.9rem; display: block; break-inside: avoid; text-align: left; overflow: visible; white-space: pre; background-image: inherit; background-size: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: inherit; position: relative !important; background-position: inherit inherit; background-repeat: inherit inherit; }
.md-diagram-panel { width: 100%; margin-top: 10px; text-align: center; padding-top: 0px; padding-bottom: 8px; overflow-x: auto; }
#write .md-fences.mock-cm { white-space: pre-wrap; }
.md-fences.md-fences-with-lineno { padding-left: 0px; }
#write.fences-no-line-wrapping .md-fences.mock-cm { white-space: pre; overflow-x: auto; }
.md-fences.mock-cm.md-fences-with-lineno { padding-left: 8px; }
.CodeMirror-line, twitterwidget { break-inside: avoid; }
.footnotes { opacity: 0.8; font-size: 0.9rem; margin-top: 1em; margin-bottom: 1em; }
.footnotes + .footnotes { margin-top: 0px; }
.md-reset { margin: 0px; padding: 0px; border: 0px; outline: 0px; vertical-align: top; text-decoration: none; text-shadow: none; float: none; position: static; width: auto; height: auto; white-space: nowrap; cursor: inherit; line-height: normal; font-weight: 400; text-align: left; box-sizing: content-box; direction: ltr; background-position: 0px 0px; background-repeat: initial initial; }
li div { padding-top: 0px; }
blockquote { margin: 1rem 0px; }
li .mathjax-block, li p { margin: 0.5rem 0px; }
li { margin: 0px; position: relative; }
blockquote &gt; :last-child { margin-bottom: 0px; }
blockquote &gt; :first-child, li &gt; :first-child { margin-top: 0px; }
.footnotes-area { color: rgb(136, 136, 136); margin-top: 0.714rem; padding-bottom: 0.143rem; white-space: normal; }
#write .footnote-line { white-space: pre-wrap; }
@media print { 
  body, html { border: 1px solid transparent; height: 99%; break-after: avoid-page; break-before: avoid-page; }
  #write { margin-top: 0px; border-color: transparent !important; }
  .typora-export * { -webkit-print-color-adjust: exact; }
  html.blink-to-pdf { font-size: 13px; }
  .typora-export #write { padding-left: 1cm; padding-right: 1cm; padding-bottom: 0px; break-after: avoid-page; }
  .typora-export #write::after { height: 0px; }
  @page { margin: 20mm 0px; }
}
.footnote-line { margin-top: 0.714em; font-size: 0.7em; }
a img, img a { cursor: pointer; }
pre.md-meta-block { font-size: 0.8rem; min-height: 0.8rem; white-space: pre-wrap; background-color: rgb(204, 204, 204); display: block; overflow-x: hidden; background-position: initial initial; background-repeat: initial initial; }
p &gt; img:only-child { display: block; margin: auto; }
p &gt; .md-image:only-child { display: inline-block; width: 100%; text-align: center; }
#write .MathJax_Display { margin: 0.8em 0px 0px; }
.md-math-block { width: 100%; }
.md-math-block:not(:empty)::after { display: none; }
[contenteditable=&quot;true&quot;]:active, [contenteditable=&quot;true&quot;]:focus { outline: 0px; box-shadow: none; }
.md-task-list-item { position: relative; list-style-type: none; }
.task-list-item.md-task-list-item { padding-left: 0px; }
.md-task-list-item &gt; input { position: absolute; top: 0px; left: 0px; margin-left: -1.2em; margin-top: calc(1em - 10px); }
.math { font-size: 1rem; }
.md-toc { min-height: 3.58rem; position: relative; font-size: 0.9rem; border-top-left-radius: 10px; border-top-right-radius: 10px; border-bottom-right-radius: 10px; border-bottom-left-radius: 10px; }
.md-toc-content { position: relative; margin-left: 0px; }
.md-toc-content::after, .md-toc::after { display: none; }
.md-toc-item { display: block; color: rgb(65, 131, 196); }
.md-toc-item a { text-decoration: none; }
.md-toc-inner:hover { text-decoration: underline; }
.md-toc-inner { display: inline-block; cursor: pointer; }
.md-toc-h1 .md-toc-inner { margin-left: 0px; font-weight: 700; }
.md-toc-h2 .md-toc-inner { margin-left: 2em; }
.md-toc-h3 .md-toc-inner { margin-left: 4em; }
.md-toc-h4 .md-toc-inner { margin-left: 6em; }
.md-toc-h5 .md-toc-inner { margin-left: 8em; }
.md-toc-h6 .md-toc-inner { margin-left: 10em; }
@media screen and (max-width: 48em) { 
  .md-toc-h3 .md-toc-inner { margin-left: 3.5em; }
  .md-toc-h4 .md-toc-inner { margin-left: 5em; }
  .md-toc-h5 .md-toc-inner { margin-left: 6.5em; }
  .md-toc-h6 .md-toc-inner { margin-left: 8em; }
}
a.md-toc-inner { font-size: inherit; font-style: inherit; font-weight: inherit; line-height: inherit; }
.footnote-line a:not(.reversefootnote) { color: inherit; }
.md-attr { display: none; }
.md-fn-count::after { content: &quot;.&quot;; }
code, pre, samp, tt { font-family: var(--monospace); }
kbd { margin: 0px 0.1em; padding: 0.1em 0.6em; font-size: 0.8em; color: rgb(36, 39, 41); background-color: rgb(255, 255, 255); border: 1px solid rgb(173, 179, 185); border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; box-shadow: rgba(12, 13, 14, 0.2) 0px 1px 0px, rgb(255, 255, 255) 0px 0px 0px 2px inset; white-space: nowrap; vertical-align: middle; background-position: initial initial; background-repeat: initial initial; }
.md-comment { color: rgb(162, 127, 3); opacity: 0.8; font-family: var(--monospace); }
code { text-align: left; }
a.md-print-anchor { white-space: pre !important; border: none !important; display: inline-block !important; position: absolute !important; width: 1px !important; right: 0px !important; outline: 0px !important; text-shadow: initial !important; background-position: 0px 0px !important; background-repeat: initial initial !important; }
.md-inline-math .MathJax_SVG .noError { display: none !important; }
.md-math-block .MathJax_SVG_Display { text-align: center; margin: 0px; position: relative; text-indent: 0px; max-width: none; max-height: none; min-height: 0px; min-width: 100%; width: auto; overflow-y: hidden; display: block !important; }
.MathJax_SVG_Display, .md-inline-math .MathJax_SVG_Display { width: auto; margin: inherit; display: inline-block !important; }
.MathJax_SVG .MJX-monospace { font-family: var(--monospace); }
.MathJax_SVG .MJX-sans-serif { font-family: sans-serif; }
.MathJax_SVG { display: inline; font-style: normal; font-weight: 400; line-height: normal; zoom: 90%; text-indent: 0px; text-align: left; text-transform: none; letter-spacing: normal; word-spacing: normal; word-wrap: normal; white-space: nowrap; float: none; direction: ltr; max-width: none; max-height: none; min-width: 0px; min-height: 0px; border: 0px; padding: 0px; margin: 0px; }
.MathJax_SVG * { transition: none; }
.MathJax_SVG_Display svg { vertical-align: middle !important; margin-bottom: 0px !important; }
.os-windows.monocolor-emoji .md-emoji { font-family: &quot;Segoe UI Symbol&quot;, sans-serif; }
.md-diagram-panel &gt; svg { max-width: 100%; }
[lang=&quot;mermaid&quot;] svg, [lang=&quot;flow&quot;] svg { max-width: 100%; }
[lang=&quot;mermaid&quot;] .node text { font-size: 1rem; }
table tr th { border-bottom-width: 0px; }
video { max-width: 100%; display: block; margin: 0px auto; }
iframe { max-width: 100%; width: 100%; border: none; }
.highlight td, .highlight tr { border: 0px; }


:root {
    --side-bar-bg-color: #fafafa;
    --control-text-color: #777;
}

@include-when-export url(https://fonts.loli.net/css?family=Open+Sans:400italic,700italic,700,400&amp;subset=latin,latin-ext);

@font-face {
    font-family: 'Open Sans';
    font-style: normal;
    font-weight: normal;
    src: local('Open Sans Regular'),url('file:///Users/JcSnap/Library/Application%20Support/abnerworks.Typora/themes/github/400.woff') format('woff');
}

@font-face {
    font-family: 'Open Sans';
    font-style: italic;
    font-weight: normal;
    src: local('Open Sans Italic'),url('file:///Users/JcSnap/Library/Application%20Support/abnerworks.Typora/themes/github/400i.woff') format('woff');
}

@font-face {
    font-family: 'Open Sans';
    font-style: normal;
    font-weight: bold;
    src: local('Open Sans Bold'),url('file:///Users/JcSnap/Library/Application%20Support/abnerworks.Typora/themes/github/700.woff') format('woff');
}

@font-face {
    font-family: 'Open Sans';
    font-style: italic;
    font-weight: bold;
    src: local('Open Sans Bold Italic'),url('file:///Users/JcSnap/Library/Application%20Support/abnerworks.Typora/themes/github/700i.woff') format('woff');
}

html {
    font-size: 16px;
}

body {
    font-family: &quot;Open Sans&quot;,&quot;Clear Sans&quot;,&quot;Helvetica Neue&quot;,Helvetica,Arial,sans-serif;
    color: rgb(51, 51, 51);
    line-height: 1.6;
}

#write {
    max-width: 860px;
  	margin: 0 auto;
  	padding: 30px;
    padding-bottom: 100px;
}
#write &gt; ul:first-child,
#write &gt; ol:first-child{
    margin-top: 30px;
}

a {
    color: #4183C4;
}
h1,
h2,
h3,
h4,
h5,
h6 {
    position: relative;
    margin-top: 1rem;
    margin-bottom: 1rem;
    font-weight: bold;
    line-height: 1.4;
    cursor: text;
}
h1:hover a.anchor,
h2:hover a.anchor,
h3:hover a.anchor,
h4:hover a.anchor,
h5:hover a.anchor,
h6:hover a.anchor {
    /*background: url(&quot;file:///Users/JcSnap/Library/Application%20Support/images/modules/styleguide/para.png&quot;) no-repeat 10px center;*/
    text-decoration: none;
}
h1 tt,
h1 code {
    font-size: inherit;
}
h2 tt,
h2 code {
    font-size: inherit;
}
h3 tt,
h3 code {
    font-size: inherit;
}
h4 tt,
h4 code {
    font-size: inherit;
}
h5 tt,
h5 code {
    font-size: inherit;
}
h6 tt,
h6 code {
    font-size: inherit;
}
h1 {
    padding-bottom: .3em;
    font-size: 2.25em;
    line-height: 1.2;
    border-bottom: 1px solid #eee;
}
h2 {
   padding-bottom: .3em;
    font-size: 1.75em;
    line-height: 1.225;
    border-bottom: 1px solid #eee;
}
h3 {
    font-size: 1.5em;
    line-height: 1.43;
}
h4 {
    font-size: 1.25em;
}
h5 {
    font-size: 1em;
}
h6 {
   font-size: 1em;
    color: #777;
}
p,
blockquote,
ul,
ol,
dl,
table{
    margin: 0.8em 0;
}
li&gt;ol,
li&gt;ul {
    margin: 0 0;
}
hr {
    height: 2px;
    padding: 0;
    margin: 16px 0;
    background-color: #e7e7e7;
    border: 0 none;
    overflow: hidden;
    box-sizing: content-box;
}

li p.first {
    display: inline-block;
}
ul,
ol {
    padding-left: 30px;
}
ul:first-child,
ol:first-child {
    margin-top: 0;
}
ul:last-child,
ol:last-child {
    margin-bottom: 0;
}
blockquote {
    border-left: 4px solid #dfe2e5;
    padding: 0 15px;
    color: #777777;
}
blockquote blockquote {
    padding-right: 0;
}
table {
    padding: 0;
    word-break: initial;
}
table tr {
    border-top: 1px solid #dfe2e5;
    margin: 0;
    padding: 0;
}
table tr:nth-child(2n),
thead {
    background-color: #f8f8f8;
}
table tr th {
    font-weight: bold;
    border: 1px solid #dfe2e5;
    border-bottom: 0;
    text-align: left;
    margin: 0;
    padding: 6px 13px;
}
table tr td {
    border: 1px solid #dfe2e5;
    text-align: left;
    margin: 0;
    padding: 6px 13px;
}
table tr th:first-child,
table tr td:first-child {
    margin-top: 0;
}
table tr th:last-child,
table tr td:last-child {
    margin-bottom: 0;
}

.CodeMirror-lines {
    padding-left: 4px;
}

.code-tooltip {
    box-shadow: 0 1px 1px 0 rgba(0,28,36,.3);
    border-top: 1px solid #eef2f2;
}

.md-fences,
code,
tt {
    border: 1px solid #e7eaed;
    background-color: #f8f8f8;
    border-radius: 3px;
    padding: 0;
    padding: 2px 4px 0px 4px;
    font-size: 0.9em;
}

code {
    background-color: #f3f4f4;
    padding: 0 4px 2px 4px;
}

.md-fences {
    margin-bottom: 15px;
    margin-top: 15px;
    padding: 0.2em 1em;
    padding-top: 8px;
    padding-bottom: 6px;
}


.md-task-list-item &gt; input {
  margin-left: -1.3em;
}

@media print {
    html {
        font-size: 13px;
    }
    table,
    pre {
        page-break-inside: avoid;
    }
    pre {
        word-wrap: break-word;
    }
}

.md-fences {
	background-color: #f8f8f8;
}
#write pre.md-meta-block {
	padding: 1rem;
    font-size: 85%;
    line-height: 1.45;
    background-color: #f7f7f7;
    border: 0;
    border-radius: 3px;
    color: #777777;
    margin-top: 0 !important;
}

.mathjax-block&gt;.code-tooltip {
	bottom: .375rem;
}

.md-mathjax-midline {
    background: #fafafa;
}

#write&gt;h3.md-focus:before{
	left: -1.5625rem;
	top: .375rem;
}
#write&gt;h4.md-focus:before{
	left: -1.5625rem;
	top: .285714286rem;
}
#write&gt;h5.md-focus:before{
	left: -1.5625rem;
	top: .285714286rem;
}
#write&gt;h6.md-focus:before{
	left: -1.5625rem;
	top: .285714286rem;
}
.md-image&gt;.md-meta {
    /*border: 1px solid #ddd;*/
    border-radius: 3px;
    padding: 2px 0px 0px 4px;
    font-size: 0.9em;
    color: inherit;
}

.md-tag {
    color: #a7a7a7;
    opacity: 1;
}

.md-toc { 
    margin-top:20px;
    padding-bottom:20px;
}

.sidebar-tabs {
    border-bottom: none;
}

#typora-quick-open {
    border: 1px solid #ddd;
    background-color: #f8f8f8;
}

#typora-quick-open-item {
    background-color: #FAFAFA;
    border-color: #FEFEFE #e5e5e5 #e5e5e5 #eee;
    border-style: solid;
    border-width: 1px;
}

/** focus mode */
.on-focus-mode blockquote {
    border-left-color: rgba(85, 85, 85, 0.12);
}

header, .context-menu, .megamenu-content, footer{
    font-family: &quot;Segoe UI&quot;, &quot;Arial&quot;, sans-serif;
}

.file-node-content:hover .file-node-icon,
.file-node-content:hover .file-node-open-state{
    visibility: visible;
}

.mac-seamless-mode #typora-sidebar {
    background-color: #fafafa;
    background-color: var(--side-bar-bg-color);
}

.md-lang {
    color: #b4654d;
}

.html-for-mac .context-menu {
    --item-hover-bg-color: #E6F0FE;
}

#md-notification .btn {
    border: 0;
}

.dropdown-menu .divider {
    border-color: #e5e5e5;
}

 .typora-export p, .typora-export .footnote-line {white-space: normal;} 
&lt;/style&gt;


&lt;div id=&quot;write&quot; class=&quot;is-mac&quot;&gt;&lt;p&gt;처음 프로그래밍을 첨 배울 때 흔히 하는 고민이 학원 갈까 말까입니다. &lt;/p&gt;
&lt;p&gt;학원은 잘만 활용하면 상당한 도움이 됩니다.  &lt;/p&gt;
&lt;p&gt;특히 비전공자의 경우 개발 이야기를 할 사람도 적고, 어디서부터 시작할지 모르기 때문에 난감하죠.  &lt;/p&gt;
&lt;p&gt;학원을 잘 활용하면 도움이 많이 됩니다.  &lt;/p&gt;
&lt;p&gt;학원에 대해 고민하다 보면 국비 지원 학원을 고려하게 되죠. 아무래도 공짜니깐요. &lt;/p&gt;
&lt;p&gt;저는 2013년에 5개월간 국비 지원 학원을 다녔는데 그 때의 경험을 바탕으로  &lt;/p&gt;
&lt;p&gt;학원 가는 것의 장단점과 국비 지원 학원의 장단점을 적어보겠습니다.  &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h3&gt;&lt;a name=&quot;header-n9&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;학원 가는 것의 장점 &lt;/h3&gt;&lt;h5&gt;&lt;a name=&quot;header-n10&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;1. 커리큘럼을 따라간다.&lt;/h5&gt;&lt;p&gt;학원의 커리큘럼을 따라가다보면 자연스럽게 필요한 스킬들( 프로그래밍 언어, 데이터 베이스, 웹이나 앱 제작 기술) 등을 배울 수 있습니다.  &lt;/p&gt;
&lt;p&gt;뭘 알아야할지도 모르는 상황에서 누군가 갈 길을 알려주는 건 큰 도움이 되죠. 파이썬을 배워야한다, 자바를 배워야한다는 말을 듣더라도,  &lt;/p&gt;
&lt;p&gt;그 다음에 뭘 해야할지 모르는 경우가 많거든요. 커리큘럼을 차근차근 따라가다보면 전반적으로 어떤 걸 배워야할지 감이 잡힙니다.  &lt;/p&gt;
&lt;p&gt;이래서 프레임워크가 필요하구나, 웹 사이트를 이렇게 만드는 구나 하는 걸 알 수 있죠.  &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h5&gt;&lt;a name=&quot;header-n16&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;2. 물어볼 사람이 있다. &lt;/h5&gt;&lt;p&gt;막히는 부분은 선생님에게 물어볼 수도 있죠. 처음 개발을 배우면 사소한 데에서 에러가 생기기 마련입니다. &lt;/p&gt;
&lt;p&gt;세미콜론을 빼먹거나 함수를 잘못 쓴다거나 하는 것에서부터 sdk 버전이나 api 키를 잘못 가져온다든지 하는 식의 설정문제까지 단순한 곳에서 실수를 저지릅니다.  &lt;/p&gt;
&lt;p&gt;이때 잘하는 사람이 옆에서 봐주면 문제를 금방 해결할 수 있죠.  &lt;/p&gt;
&lt;p&gt;또 좋은 선생님을 만나면 롤모델이 되기도 합니다. 저는 다행히도 선생님은 정말 훌륭하신 분이었습니다.  &lt;/p&gt;
&lt;p&gt;나이가 55세가 넘으셨는데, 항상 먼저 배우고 알려주는 자세를 가지셨죠. 그 나이에도 배움을 멈추지 않았습니다.  &lt;/p&gt;
&lt;p&gt;코볼, 포트란 시절에 개발을 시작했는데 안드로이드, 스프링 등을 남들보다 빨리 배우고 가르치셨죠.  &lt;/p&gt;
&lt;p&gt;모르는 부분은 직접 실험해보고 가르치는 스타일이셨습니다.  &lt;/p&gt;
&lt;p&gt;학원 학생들에게 나중에 리눅스, 알고리즘 등을 추가로 공부하고 디자인 패턴 등도 알아야한다는 말을 계속 하셨습니다.  &lt;/p&gt;
&lt;p&gt;본보기가 되는 참 선생님이었습니다.  &lt;/p&gt;
&lt;p&gt;보통 학원에는 30대 학생들도 많은데 50살 넘게 열심히 가르치고 배우는 분이 선생님이니 학생들이 핑계를 댈 수 없었죠.  &lt;/p&gt;
&lt;p&gt;반면 안 좋은 선생님도 정말 많습니다. 적당히 시간만 때우는 경우도 많죠.  &lt;/p&gt;&lt;h5&gt;&lt;a name=&quot;header-n28&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;3. 같이 공부할 수 있다.&lt;/h5&gt;&lt;p&gt;혼자 개발을 배우면 개발 이야기 통하는 사람도 없고 갑갑할 때가 많죠. &lt;/p&gt;
&lt;p&gt;특히 비전공자의 경우 혼자만의 싸움이 되기 쉬운데  학원을 가게 되면 같이 개발 이야기도 나누고, 스터디할 사람이 생겨서 좋습니다. &lt;/p&gt;
&lt;p&gt;아무래도 불안한 심정을 나누기에 좋고, 성실한 사람끼리 만나면 서로 발전할 수 있습니다.  &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h5&gt;&lt;a name=&quot;header-n33&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;4.강제로 앉아서 공부를 한다.  &lt;/h5&gt;&lt;p&gt;평소 오래 앉아서 공부하는 습관이 든 사람이면 상관없습니다.  &lt;/p&gt;
&lt;p&gt;보통은 그렇지 못하죠.  &lt;/p&gt;
&lt;p&gt;학원에서 공부를 하면 짧게는 하루에 4시간에서 길게는 10시간, 12시간 공부를 하게 됩니다.  &lt;/p&gt;
&lt;p&gt;처음 개발 배울 때는 오래 앉아서 공부하는 게 정말 정말 중요합니다.  &lt;/p&gt;
&lt;p&gt;빨리 배우는 사람도 있지만 보통은 임계점이 있어서, 일정 시간 이상 배워야 코딩을 알게 됩니다.  &lt;/p&gt;
&lt;p&gt;임계점을 빨리 넘기려면 매일매일 공부하는 것만큼 좋은 게 없죠.  &lt;/p&gt;
&lt;p&gt;학원 다니면 코딩하는 습관을 키울 수 있습니다.  &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h3&gt;&lt;a name=&quot;header-n42&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;학원 가는 것의 단점 &lt;/h3&gt;&lt;h5&gt;&lt;a name=&quot;header-n43&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;1.학원별 차이가 크다.  &lt;/h5&gt;&lt;p&gt;학원에 따라서 수업 환경이 천차만별입니다.  &lt;/p&gt;
&lt;p&gt;직접 들어보기 전에는 알기가 어렵죠.  &lt;/p&gt;
&lt;p&gt;비싼 학원이 좋은 학원은 아닙니다.  &lt;/p&gt;
&lt;p&gt;경력이 좋거나 실력이 뛰어나다고 해서 잘 가르친다는 보장이 없구요.  &lt;/p&gt;
&lt;p&gt;요즘은 마케팅에 공을 들이는 학원이 많아서 실제 누가 잘 가르치는지 알기 어렵습니다.  &lt;/p&gt;
&lt;p&gt;과도하게 비용을 요구하는 곳도 많죠.  &lt;/p&gt;
&lt;p&gt;아이러니 하지만 좋은 학원을 파악하려면 어느정도는 개발을 알아야지 누가 과장광고를 하는지 알 수 있죠.  &lt;/p&gt;&lt;h5&gt;&lt;a name=&quot;header-n51&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;2.학원에서 안 배운 건 모른다.  &lt;/h5&gt;&lt;p&gt;학원은 빠르게 웹,앱을 만드는 법을 배우도록 커리큘럼을 짭니다.  &lt;/p&gt;
&lt;p&gt;필요하지 않다고 생각되는 언어의 세부사항이나 프레임워크의 깊은 이해 등은 무시하기 쉽죠. &lt;/p&gt;
&lt;p&gt;또 학원의 교육 과정은 실제 개발 상황과는 다르기 때문에 문제가 생깁니다.  &lt;/p&gt;
&lt;p&gt;모든 게 잘 갖춰진 동물원과 아프리카 야생을 생각해보세요.  &lt;/p&gt;
&lt;p&gt;동물원에서는 급작스런 날씨의 변화나 천적의 습격, 먹이가 떨어져서 굶어죽는 상황 등이 나오지 않습니다.  &lt;/p&gt;
&lt;p&gt;완벽히 통제된 상황이죠.  &lt;/p&gt;
&lt;p&gt;반면 야생에서는 언제 잡아 먹힐지 모르고, 갑자기 가뭄이 들어서 마실 물이 없어져도 이상하지 않습니다.  &lt;/p&gt;
&lt;p&gt;회사의 업무는 야생인데 학원은 동물원이죠. 언제 에러가 터지거나 다른 부서의 요청이 들어올지 몰라요.  &lt;/p&gt;
&lt;p&gt;학원만 다니면 실제 쓰이는 서비스에 필요한 기능을 많이 못 배울 수 있습니다.  &lt;/p&gt;
&lt;p&gt;선생님이 잘 가공된 정보만 받아 먹다보면  &lt;/p&gt;
&lt;p&gt;혼자 문제 해결하는 능력이 많이 떨어질 수 있어요.  &lt;/p&gt;
&lt;p&gt;커리 큘럼에 없었던 에러를 접하면 해결을 못할 수 있죠.  &lt;/p&gt;
&lt;p&gt;저도 다른 학원 출신 개발자랑 일해봤는데 배운 것만 잘 쓰시더라구요 ㅠ  &lt;/p&gt;
&lt;p&gt;학원에서 배우는 것 뿐만 아니라 공모전을 하거나, 개인 프로젝트를 하거나, 앱 출시 등을 하면은 &lt;/p&gt;
&lt;p&gt;이 문제를 좀 줄일 수 있지만 그러기가 쉽지는 않죠.  &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h3&gt;&lt;a name=&quot;header-n68&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;국비 학원의 장점 &lt;/h3&gt;&lt;p&gt;장점은 무료라는 거죠. 무료다보니 효율이 좋지 않습니다. &lt;/p&gt;
&lt;p&gt;다만 유료학원 가보기 전에 체험삼아 가보기에는 정말 좋습니다.  &lt;/p&gt;
&lt;p&gt;사실 비싼 학원이라고 다 잘 가르치는 건 아니거든요.  &lt;/p&gt;
&lt;p&gt;패스트 캠퍼스, 러닝 스푼즈, 비트 컴퓨터 학원, 스터디 파이 등 코딩 배울 곳은 정말 많습니다.  &lt;/p&gt;
&lt;p&gt;문제는 어디가 잘 가르치고 못 가르치는지 초보자 입장에선 알 수가 없죠.  &lt;/p&gt;
&lt;p&gt;국비 학원을 한 두 달 다녀보면 어디가 진짜 잘 가르치는지 볼 수 있는 안목이 생깁니다.  &lt;/p&gt;
&lt;p&gt;청담동 레스토랑도 가보고, 맘스 터치도 가봐야 어디가 음식을 잘하는지 알 수 있듯이  &lt;/p&gt;
&lt;p&gt;학원도 겪어봐야 어디가 좋은지 알 수 있습니다.  &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h3&gt;&lt;a name=&quot;header-n78&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;국비 학원의 단점 &lt;/h3&gt;&lt;p&gt;자신이 지불한 만큼, 투자를 하는 게 사람심리입니다. 시간이든 금전이든 감정적 투자든 많이 투자할 수록 값어치를 높게 봅니다.  &lt;/p&gt;
&lt;p&gt;짝사랑을 오래 할 수록 쉽게 떨치지 못하고, 값이 떨어진 주식을 오래 갖고 있을수록 팔지를 못하죠.  &lt;/p&gt;
&lt;p&gt;국비 학원의 대부분의 문제점은 무료라는 데서 발생합니다.  &lt;/p&gt;
&lt;p&gt;무언가를 얻기 위해 투자를 안 했으니, 교육 수준이나 환경이 좋지 못합니다.  &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h5&gt;&lt;a name=&quot;header-n84&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;1.무료라 수강생 수준이 떨어진다.  &lt;/h5&gt;&lt;p&gt;아무래도 자기 돈을 내고 온 곳이 아니다 보니 열심히 하는 사람이 적습니다. 조금 하다가 어려우면은 포기하는 사람도 많구요.  &lt;/p&gt;
&lt;p&gt;제대로 도전해 보지도 않고, 1~2시간정도 하다가 어렵다고 불만을 토로하는 사람이 많습니다. 이런 사람이 많으면 반 수업 분위기가 처질수 밖에 없죠.  &lt;/p&gt;
&lt;p&gt;어떤 수강생들은 모 대학 교수의 소개로 5명 정도 함께 들어왔는데, 뒤에서 롤만 엄청나게 하더군요. 자바는 수업에서 들어서 이미 잘 안다는 이유였습니다.  &lt;/p&gt;
&lt;p&gt;또 수업은 안 듣고 웹서핑만 열심히 하는 분도 있었습니다. 보통 국비 학원 가면 20~30명정도 있는데, 3~5명정도만 열심히 합니다. &lt;/p&gt;
&lt;p&gt;나머지는 적당히 시간만  보내다가 가는 경우가 많아요. &lt;/p&gt;
&lt;p&gt;결국 선생님도 처음 3개월은 열정적이셨는데 뒤의 2개월은 하루 4시간정도만 강의하시고 4시간은 숙제 + 자습 시켰습니다.  &lt;/p&gt;
&lt;p&gt;코딩 과제 시키면 하는 사람이 적었거든요 ㅠ  &lt;/p&gt;
&lt;p&gt;모두 열심히 안 하는 환경에서는 혼자 주말에도 공부하고, 수업에도 안 배우는 부분을 찾아보는 사람은 이상해 보일 수 있습니다.  &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h5&gt;&lt;a name=&quot;header-n94&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;2.선생님에 따라 차이가 크다. &lt;/h5&gt;&lt;p&gt;저는 운이 좋게도 좋은 선생님을 만났는데, 그 분은 원래 강남에서 강의를 하다가 그때만 종로로 강의를 하러 오신 거였습니다.  &lt;/p&gt;
&lt;p&gt;보통은 안 그렇더군요. 2018년에도 자바 6까지만 가르친다는 이야기를 스터디 나갔다가 듣게 되었죠. 충격이었습니다.  &lt;/p&gt;
&lt;p&gt;학생들을 무시하는 경우도 종종 있구요.  &lt;/p&gt;
&lt;p&gt;아무래도 국비 학원은 무료다 보니, 좋은 선생님 찾기가 힘들어요. 물론 있긴 합니다만 운이 좋아야해요.  &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h5&gt;&lt;a name=&quot;header-n100&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;3.낡은 커리큘럼 &lt;/h5&gt;&lt;p&gt;좋은 선생님들이 적다보니 커리큘럼도 오래된 경우가 많습니다.  &lt;/p&gt;
&lt;p&gt;옛 기술을 그대로 가르치는 경우가 많구요.  &lt;/p&gt;
&lt;p&gt;웹도 엄청나게 많이 바뀌었는데 제가 5년전에 배웠던 jsp를 아직도 학원에서 가르치더군요 ㅠㅠ  &lt;/p&gt;
&lt;p&gt;IT쪽은 필요한 지식이 빠르게 바뀌는 만큼, 교육 과정도 업데이트를 자주 해야하는데 국비 학원은 그렇지 못합니다.  &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h3&gt;&lt;a name=&quot;header-n106&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;마무리 &lt;/h3&gt;&lt;p&gt;저도 국비학원을 다녀 보긴 했지만 초반 3개월을 지나니 크게 배우는 게 없더군요.  &lt;/p&gt;
&lt;p&gt;프로그래밍을 꼭 배우고 싶은데 돈이 부족하거나, 습관이 안 잡혀 있다면 권합니다. &lt;/p&gt;
&lt;p&gt;1, 2달정도 체험해 보다 좋은 교육 과정 들으러 가는 것도 좋습니다.  &lt;/p&gt;
&lt;p&gt;하지만 가능하면 유료 동영상 강의나, 유료 학원을 듣기를 권합니다.  &lt;/p&gt;
&lt;p&gt;5만원 아끼려다 개발 자체를 싫어하게 될 수도 있거든요.  &lt;/p&gt;
&lt;p&gt;단기적으로는 돈을 아끼는 게 좋지만 인생 전체로 보면 큰 손해입니다.  &lt;/p&gt;
&lt;p&gt;이 글을 참고해 꼭 현명한 선택을 하시기를 바랍니다.  &lt;/p&gt;&lt;/div&gt;</description>
      <category>코딩 배우는 법을 배우기</category>
      <category>국비 학원</category>
      <category>자바 독학</category>
      <category>코딩 독학</category>
      <category>코딩 학원</category>
      <category>코딩 학원 추천</category>
      <category>파이썬 공부</category>
      <category>파이썬 독학</category>
      <category>프로그래밍 독학</category>
      <category>프로그래밍 언어 추천</category>
      <author>에드 신</author>
      <guid isPermaLink="true">https://software-creator.tistory.com/12</guid>
      <comments>https://software-creator.tistory.com/12#entry12comment</comments>
      <pubDate>Sun, 11 Nov 2018 13:35:01 +0900</pubDate>
    </item>
    <item>
      <title>플러터를 빠르게 배우기 좋은 4개의 사이트</title>
      <link>https://software-creator.tistory.com/11</link>
      <description>&lt;meta charset=&quot;UTF-8&quot;&gt;&lt;meta name=&quot;viewport&quot; content=&quot;width=device-width initial-scale=1&quot;&gt;
&lt;title&gt;플러터를 빠르게 배우기 좋은 4개의 사이트&lt;/title&gt;&lt;link href=&quot;https://fonts.loli.net/css?family=Open+Sans:400italic,700italic,700,400&amp;amp;subset=latin,latin-ext&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot;&gt;&lt;style type=&quot;text/css&quot;&gt;html {overflow-x: initial !important;}:root { --bg-color: #ffffff; --text-color: #333333; --select-text-bg-color: #B5D6FC; --select-text-font-color: auto; --monospace: &quot;Lucida Console&quot;,Consolas,&quot;Courier&quot;,monospace; }
html { font-size: 14px; background-color: var(--bg-color); color: var(--text-color); font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; -webkit-font-smoothing: antialiased; }
body { margin: 0px; padding: 0px; height: auto; bottom: 0px; top: 0px; left: 0px; right: 0px; font-size: 1rem; line-height: 1.42857143; overflow-x: hidden; background-image: inherit; background-size: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: inherit; background-position: inherit inherit; background-repeat: inherit inherit; }
iframe { margin: auto; }
a.url { word-break: break-all; }
a:active, a:hover { outline: 0px; }
.in-text-selection, ::selection { text-shadow: none; background: var(--select-text-bg-color); color: var(--select-text-font-color); }
#write { margin: 0px auto; height: auto; width: inherit; word-break: normal; word-wrap: break-word; position: relative; white-space: normal; overflow-x: visible; }
#write.first-line-indent p { text-indent: 2em; }
#write.first-line-indent li p, #write.first-line-indent p * { text-indent: 0px; }
#write.first-line-indent li { margin-left: 2em; }
.for-image #write { padding-left: 8px; padding-right: 8px; }
body.typora-export { padding-left: 30px; padding-right: 30px; }
.typora-export .footnote-line, .typora-export p { white-space: pre-wrap; }
@media screen and (max-width: 500px) { 
  body.typora-export { padding-left: 0px; padding-right: 0px; }
  .CodeMirror-sizer { margin-left: 0px !important; }
  .CodeMirror-gutters { display: none !important; }
}
#write li &gt; figure:first-child { margin-top: -20px; }
#write ol, #write ul { position: relative; }
img { max-width: 100%; vertical-align: middle; }
button, input, select, textarea { color: inherit; font-family: inherit; font-size: inherit; font-style: inherit; font-variant-caps: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; }
input[type=&quot;checkbox&quot;], input[type=&quot;radio&quot;] { line-height: normal; padding: 0px; }
*, ::after, ::before { box-sizing: border-box; }
#write h1, #write h2, #write h3, #write h4, #write h5, #write h6, #write p, #write pre { width: inherit; }
#write h1, #write h2, #write h3, #write h4, #write h5, #write h6, #write p { position: relative; }
h1, h2, h3, h4, h5, h6 { break-after: avoid-page; break-inside: avoid; orphans: 2; }
p { orphans: 4; }
h1 { font-size: 2rem; }
h2 { font-size: 1.8rem; }
h3 { font-size: 1.6rem; }
h4 { font-size: 1.4rem; }
h5 { font-size: 1.2rem; }
h6 { font-size: 1rem; }
.md-math-block, .md-rawblock, h1, h2, h3, h4, h5, h6, p { margin-top: 1rem; margin-bottom: 1rem; }
.hidden { display: none; }
.md-blockmeta { color: rgb(204, 204, 204); font-weight: 700; font-style: italic; }
a { cursor: pointer; }
sup.md-footnote { padding: 2px 4px; background-color: rgba(238, 238, 238, 0.701961); color: rgb(85, 85, 85); border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; cursor: pointer; }
sup.md-footnote a, sup.md-footnote a:hover { color: inherit; text-transform: inherit; text-decoration: inherit; }
#write input[type=&quot;checkbox&quot;] { cursor: pointer; width: inherit; height: inherit; }
figure { overflow-x: auto; margin: 1.2em 0px; max-width: calc(100% + 16px); padding: 0px; }
figure &gt; table { margin: 0px !important; }
tr { break-inside: avoid; break-after: auto; }
thead { display: table-header-group; }
table { border-collapse: collapse; border-spacing: 0px; width: 100%; overflow: auto; break-inside: auto; text-align: left; }
table.md-table td { min-width: 80px; }
.CodeMirror-gutters { border-right-width: 0px; background-color: inherit; }
.CodeMirror { text-align: left; }
.CodeMirror-placeholder { opacity: 0.3; }
.CodeMirror pre { padding: 0px 4px; }
.CodeMirror-lines { padding: 0px; }
div.hr:focus { cursor: none; }
#write pre { white-space: pre-wrap; }
#write.fences-no-line-wrapping pre { white-space: pre; }
#write pre.ty-contain-cm { white-space: normal; }
.CodeMirror-gutters { margin-right: 4px; }
.md-fences { font-size: 0.9rem; display: block; break-inside: avoid; text-align: left; overflow: visible; white-space: pre; background-image: inherit; background-size: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: inherit; position: relative !important; background-position: inherit inherit; background-repeat: inherit inherit; }
.md-diagram-panel { width: 100%; margin-top: 10px; text-align: center; padding-top: 0px; padding-bottom: 8px; overflow-x: auto; }
#write .md-fences.mock-cm { white-space: pre-wrap; }
.md-fences.md-fences-with-lineno { padding-left: 0px; }
#write.fences-no-line-wrapping .md-fences.mock-cm { white-space: pre; overflow-x: auto; }
.md-fences.mock-cm.md-fences-with-lineno { padding-left: 8px; }
.CodeMirror-line, twitterwidget { break-inside: avoid; }
.footnotes { opacity: 0.8; font-size: 0.9rem; margin-top: 1em; margin-bottom: 1em; }
.footnotes + .footnotes { margin-top: 0px; }
.md-reset { margin: 0px; padding: 0px; border: 0px; outline: 0px; vertical-align: top; text-decoration: none; text-shadow: none; float: none; position: static; width: auto; height: auto; white-space: nowrap; cursor: inherit; line-height: normal; font-weight: 400; text-align: left; box-sizing: content-box; direction: ltr; background-position: 0px 0px; background-repeat: initial initial; }
li div { padding-top: 0px; }
blockquote { margin: 1rem 0px; }
li .mathjax-block, li p { margin: 0.5rem 0px; }
li { margin: 0px; position: relative; }
blockquote &gt; :last-child { margin-bottom: 0px; }
blockquote &gt; :first-child, li &gt; :first-child { margin-top: 0px; }
.footnotes-area { color: rgb(136, 136, 136); margin-top: 0.714rem; padding-bottom: 0.143rem; white-space: normal; }
#write .footnote-line { white-space: pre-wrap; }
@media print { 
  body, html { border: 1px solid transparent; height: 99%; break-after: avoid-page; break-before: avoid-page; }
  #write { margin-top: 0px; border-color: transparent !important; }
  .typora-export * { -webkit-print-color-adjust: exact; }
  html.blink-to-pdf { font-size: 13px; }
  .typora-export #write { padding-left: 1cm; padding-right: 1cm; padding-bottom: 0px; break-after: avoid-page; }
  .typora-export #write::after { height: 0px; }
  @page { margin: 20mm 0px; }
}
.footnote-line { margin-top: 0.714em; font-size: 0.7em; }
a img, img a { cursor: pointer; }
pre.md-meta-block { font-size: 0.8rem; min-height: 0.8rem; white-space: pre-wrap; background-color: rgb(204, 204, 204); display: block; overflow-x: hidden; background-position: initial initial; background-repeat: initial initial; }
p &gt; img:only-child { display: block; margin: auto; }
p &gt; .md-image:only-child { display: inline-block; width: 100%; text-align: center; }
#write .MathJax_Display { margin: 0.8em 0px 0px; }
.md-math-block { width: 100%; }
.md-math-block:not(:empty)::after { display: none; }
[contenteditable=&quot;true&quot;]:active, [contenteditable=&quot;true&quot;]:focus { outline: 0px; box-shadow: none; }
.md-task-list-item { position: relative; list-style-type: none; }
.task-list-item.md-task-list-item { padding-left: 0px; }
.md-task-list-item &gt; input { position: absolute; top: 0px; left: 0px; margin-left: -1.2em; margin-top: calc(1em - 10px); }
.math { font-size: 1rem; }
.md-toc { min-height: 3.58rem; position: relative; font-size: 0.9rem; border-top-left-radius: 10px; border-top-right-radius: 10px; border-bottom-right-radius: 10px; border-bottom-left-radius: 10px; }
.md-toc-content { position: relative; margin-left: 0px; }
.md-toc-content::after, .md-toc::after { display: none; }
.md-toc-item { display: block; color: rgb(65, 131, 196); }
.md-toc-item a { text-decoration: none; }
.md-toc-inner:hover { text-decoration: underline; }
.md-toc-inner { display: inline-block; cursor: pointer; }
.md-toc-h1 .md-toc-inner { margin-left: 0px; font-weight: 700; }
.md-toc-h2 .md-toc-inner { margin-left: 2em; }
.md-toc-h3 .md-toc-inner { margin-left: 4em; }
.md-toc-h4 .md-toc-inner { margin-left: 6em; }
.md-toc-h5 .md-toc-inner { margin-left: 8em; }
.md-toc-h6 .md-toc-inner { margin-left: 10em; }
@media screen and (max-width: 48em) { 
  .md-toc-h3 .md-toc-inner { margin-left: 3.5em; }
  .md-toc-h4 .md-toc-inner { margin-left: 5em; }
  .md-toc-h5 .md-toc-inner { margin-left: 6.5em; }
  .md-toc-h6 .md-toc-inner { margin-left: 8em; }
}
a.md-toc-inner { font-size: inherit; font-style: inherit; font-weight: inherit; line-height: inherit; }
.footnote-line a:not(.reversefootnote) { color: inherit; }
.md-attr { display: none; }
.md-fn-count::after { content: &quot;.&quot;; }
code, pre, samp, tt { font-family: var(--monospace); }
kbd { margin: 0px 0.1em; padding: 0.1em 0.6em; font-size: 0.8em; color: rgb(36, 39, 41); background-color: rgb(255, 255, 255); border: 1px solid rgb(173, 179, 185); border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; box-shadow: rgba(12, 13, 14, 0.2) 0px 1px 0px, rgb(255, 255, 255) 0px 0px 0px 2px inset; white-space: nowrap; vertical-align: middle; background-position: initial initial; background-repeat: initial initial; }
.md-comment { color: rgb(162, 127, 3); opacity: 0.8; font-family: var(--monospace); }
code { text-align: left; }
a.md-print-anchor { white-space: pre !important; border: none !important; display: inline-block !important; position: absolute !important; width: 1px !important; right: 0px !important; outline: 0px !important; text-shadow: initial !important; background-position: 0px 0px !important; background-repeat: initial initial !important; }
.md-inline-math .MathJax_SVG .noError { display: none !important; }
.md-math-block .MathJax_SVG_Display { text-align: center; margin: 0px; position: relative; text-indent: 0px; max-width: none; max-height: none; min-height: 0px; min-width: 100%; width: auto; overflow-y: hidden; display: block !important; }
.MathJax_SVG_Display, .md-inline-math .MathJax_SVG_Display { width: auto; margin: inherit; display: inline-block !important; }
.MathJax_SVG .MJX-monospace { font-family: var(--monospace); }
.MathJax_SVG .MJX-sans-serif { font-family: sans-serif; }
.MathJax_SVG { display: inline; font-style: normal; font-weight: 400; line-height: normal; zoom: 90%; text-indent: 0px; text-align: left; text-transform: none; letter-spacing: normal; word-spacing: normal; word-wrap: normal; white-space: nowrap; float: none; direction: ltr; max-width: none; max-height: none; min-width: 0px; min-height: 0px; border: 0px; padding: 0px; margin: 0px; }
.MathJax_SVG * { transition: none; }
.MathJax_SVG_Display svg { vertical-align: middle !important; margin-bottom: 0px !important; }
.os-windows.monocolor-emoji .md-emoji { font-family: &quot;Segoe UI Symbol&quot;, sans-serif; }
.md-diagram-panel &gt; svg { max-width: 100%; }
[lang=&quot;mermaid&quot;] svg, [lang=&quot;flow&quot;] svg { max-width: 100%; }
[lang=&quot;mermaid&quot;] .node text { font-size: 1rem; }
table tr th { border-bottom-width: 0px; }
video { max-width: 100%; display: block; margin: 0px auto; }
iframe { max-width: 100%; width: 100%; border: none; }
.highlight td, .highlight tr { border: 0px; }


.CodeMirror { height: auto; }
.CodeMirror.cm-s-inner { background-image: inherit; background-size: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: inherit; background-position: inherit inherit; background-repeat: inherit inherit; }
.CodeMirror-scroll { overflow-y: hidden; overflow-x: auto; z-index: 3; }
.CodeMirror-gutter-filler, .CodeMirror-scrollbar-filler { background-color: rgb(255, 255, 255); }
.CodeMirror-gutters { border-right-width: 1px; border-right-style: solid; border-right-color: rgb(221, 221, 221); background-image: inherit; background-size: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: inherit; white-space: nowrap; background-position: inherit inherit; background-repeat: inherit inherit; }
.CodeMirror-linenumber { padding: 0px 3px 0px 5px; text-align: right; color: rgb(153, 153, 153); }
.cm-s-inner .cm-keyword { color: rgb(119, 0, 136); }
.cm-s-inner .cm-atom, .cm-s-inner.cm-atom { color: rgb(34, 17, 153); }
.cm-s-inner .cm-number { color: rgb(17, 102, 68); }
.cm-s-inner .cm-def { color: rgb(0, 0, 255); }
.cm-s-inner .cm-variable { color: rgb(0, 0, 0); }
.cm-s-inner .cm-variable-2 { color: rgb(0, 85, 170); }
.cm-s-inner .cm-variable-3 { color: rgb(0, 136, 85); }
.cm-s-inner .cm-string { color: rgb(170, 17, 17); }
.cm-s-inner .cm-property { color: rgb(0, 0, 0); }
.cm-s-inner .cm-operator { color: rgb(152, 26, 26); }
.cm-s-inner .cm-comment, .cm-s-inner.cm-comment { color: rgb(170, 85, 0); }
.cm-s-inner .cm-string-2 { color: rgb(255, 85, 0); }
.cm-s-inner .cm-meta { color: rgb(85, 85, 85); }
.cm-s-inner .cm-qualifier { color: rgb(85, 85, 85); }
.cm-s-inner .cm-builtin { color: rgb(51, 0, 170); }
.cm-s-inner .cm-bracket { color: rgb(153, 153, 119); }
.cm-s-inner .cm-tag { color: rgb(17, 119, 0); }
.cm-s-inner .cm-attribute { color: rgb(0, 0, 204); }
.cm-s-inner .cm-header, .cm-s-inner.cm-header { color: rgb(0, 0, 255); }
.cm-s-inner .cm-quote, .cm-s-inner.cm-quote { color: rgb(0, 153, 0); }
.cm-s-inner .cm-hr, .cm-s-inner.cm-hr { color: rgb(153, 153, 153); }
.cm-s-inner .cm-link, .cm-s-inner.cm-link { color: rgb(0, 0, 204); }
.cm-negative { color: rgb(221, 68, 68); }
.cm-positive { color: rgb(34, 153, 34); }
.cm-header, .cm-strong { font-weight: 700; }
.cm-del { text-decoration: line-through; }
.cm-em { font-style: italic; }
.cm-link { text-decoration: underline; }
.cm-error { color: red; }
.cm-invalidchar { color: red; }
.cm-constant { color: rgb(38, 139, 210); }
.cm-defined { color: rgb(181, 137, 0); }
div.CodeMirror span.CodeMirror-matchingbracket { color: rgb(0, 255, 0); }
div.CodeMirror span.CodeMirror-nonmatchingbracket { color: rgb(255, 34, 34); }
.cm-s-inner .CodeMirror-activeline-background { background-image: inherit; background-size: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: inherit; background-position: inherit inherit; background-repeat: inherit inherit; }
.CodeMirror { position: relative; overflow: hidden; }
.CodeMirror-scroll { height: 100%; outline: 0px; position: relative; box-sizing: content-box; background-image: inherit; background-size: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: inherit; background-position: inherit inherit; background-repeat: inherit inherit; }
.CodeMirror-sizer { position: relative; }
.CodeMirror-gutter-filler, .CodeMirror-hscrollbar, .CodeMirror-scrollbar-filler, .CodeMirror-vscrollbar { position: absolute; z-index: 6; display: none; }
.CodeMirror-vscrollbar { right: 0px; top: 0px; overflow: hidden; }
.CodeMirror-hscrollbar { bottom: 0px; left: 0px; overflow: hidden; }
.CodeMirror-scrollbar-filler { right: 0px; bottom: 0px; }
.CodeMirror-gutter-filler { left: 0px; bottom: 0px; }
.CodeMirror-gutters { position: absolute; left: 0px; top: 0px; padding-bottom: 30px; z-index: 3; }
.CodeMirror-gutter { white-space: normal; height: 100%; box-sizing: content-box; padding-bottom: 30px; margin-bottom: -32px; display: inline-block; }
.CodeMirror-gutter-wrapper { position: absolute; z-index: 4; border: none !important; background-position: 0px 0px !important; background-repeat: initial initial !important; }
.CodeMirror-gutter-background { position: absolute; top: 0px; bottom: 0px; z-index: 4; }
.CodeMirror-gutter-elt { position: absolute; cursor: default; z-index: 4; }
.CodeMirror-lines { cursor: text; }
.CodeMirror pre { border-top-left-radius: 0px; border-top-right-radius: 0px; border-bottom-right-radius: 0px; border-bottom-left-radius: 0px; border-width: 0px; font-family: inherit; font-size: inherit; margin: 0px; white-space: pre; word-wrap: normal; color: inherit; z-index: 2; position: relative; overflow: visible; background-position: 0px 0px; background-repeat: initial initial; }
.CodeMirror-wrap pre { word-wrap: break-word; white-space: pre-wrap; word-break: normal; }
.CodeMirror-code pre { border-right-width: 30px; border-right-style: solid; border-right-color: transparent; width: fit-content; }
.CodeMirror-wrap .CodeMirror-code pre { border-right-style: none; width: auto; }
.CodeMirror-linebackground { position: absolute; left: 0px; right: 0px; top: 0px; bottom: 0px; z-index: 0; }
.CodeMirror-linewidget { position: relative; z-index: 2; overflow: auto; }
.CodeMirror-wrap .CodeMirror-scroll { overflow-x: hidden; }
.CodeMirror-measure { position: absolute; width: 100%; height: 0px; overflow: hidden; visibility: hidden; }
.CodeMirror-measure pre { position: static; }
.CodeMirror div.CodeMirror-cursor { position: absolute; visibility: hidden; border-right-style: none; width: 0px; }
.CodeMirror div.CodeMirror-cursor { visibility: hidden; }
.CodeMirror-focused div.CodeMirror-cursor { visibility: inherit; }
.cm-searching { background-color: rgba(255, 255, 0, 0.4); background-position: initial initial; background-repeat: initial initial; }
@media print { 
  .CodeMirror div.CodeMirror-cursor { visibility: hidden; }
}


:root {
    --side-bar-bg-color: #fafafa;
    --control-text-color: #777;
}

@include-when-export url(https://fonts.loli.net/css?family=Open+Sans:400italic,700italic,700,400&amp;subset=latin,latin-ext);

@font-face {
    font-family: 'Open Sans';
    font-style: normal;
    font-weight: normal;
    src: local('Open Sans Regular'),url('file:///Users/JcSnap/Library/Application%20Support/abnerworks.Typora/themes/github/400.woff') format('woff');
}

@font-face {
    font-family: 'Open Sans';
    font-style: italic;
    font-weight: normal;
    src: local('Open Sans Italic'),url('file:///Users/JcSnap/Library/Application%20Support/abnerworks.Typora/themes/github/400i.woff') format('woff');
}

@font-face {
    font-family: 'Open Sans';
    font-style: normal;
    font-weight: bold;
    src: local('Open Sans Bold'),url('file:///Users/JcSnap/Library/Application%20Support/abnerworks.Typora/themes/github/700.woff') format('woff');
}

@font-face {
    font-family: 'Open Sans';
    font-style: italic;
    font-weight: bold;
    src: local('Open Sans Bold Italic'),url('file:///Users/JcSnap/Library/Application%20Support/abnerworks.Typora/themes/github/700i.woff') format('woff');
}

html {
    font-size: 16px;
}

body {
    font-family: &quot;Open Sans&quot;,&quot;Clear Sans&quot;,&quot;Helvetica Neue&quot;,Helvetica,Arial,sans-serif;
    color: rgb(51, 51, 51);
    line-height: 1.6;
}

#write {
    max-width: 860px;
  	margin: 0 auto;
  	padding: 30px;
    padding-bottom: 100px;
}
#write &gt; ul:first-child,
#write &gt; ol:first-child{
    margin-top: 30px;
}

a {
    color: #4183C4;
}
h1,
h2,
h3,
h4,
h5,
h6 {
    position: relative;
    margin-top: 1rem;
    margin-bottom: 1rem;
    font-weight: bold;
    line-height: 1.4;
    cursor: text;
}
h1:hover a.anchor,
h2:hover a.anchor,
h3:hover a.anchor,
h4:hover a.anchor,
h5:hover a.anchor,
h6:hover a.anchor {
    /*background: url(&quot;file:///Users/JcSnap/Library/Application%20Support/images/modules/styleguide/para.png&quot;) no-repeat 10px center;*/
    text-decoration: none;
}
h1 tt,
h1 code {
    font-size: inherit;
}
h2 tt,
h2 code {
    font-size: inherit;
}
h3 tt,
h3 code {
    font-size: inherit;
}
h4 tt,
h4 code {
    font-size: inherit;
}
h5 tt,
h5 code {
    font-size: inherit;
}
h6 tt,
h6 code {
    font-size: inherit;
}
h1 {
    padding-bottom: .3em;
    font-size: 2.25em;
    line-height: 1.2;
    border-bottom: 1px solid #eee;
}
h2 {
   padding-bottom: .3em;
    font-size: 1.75em;
    line-height: 1.225;
    border-bottom: 1px solid #eee;
}
h3 {
    font-size: 1.5em;
    line-height: 1.43;
}
h4 {
    font-size: 1.25em;
}
h5 {
    font-size: 1em;
}
h6 {
   font-size: 1em;
    color: #777;
}
p,
blockquote,
ul,
ol,
dl,
table{
    margin: 0.8em 0;
}
li&gt;ol,
li&gt;ul {
    margin: 0 0;
}
hr {
    height: 2px;
    padding: 0;
    margin: 16px 0;
    background-color: #e7e7e7;
    border: 0 none;
    overflow: hidden;
    box-sizing: content-box;
}

li p.first {
    display: inline-block;
}
ul,
ol {
    padding-left: 30px;
}
ul:first-child,
ol:first-child {
    margin-top: 0;
}
ul:last-child,
ol:last-child {
    margin-bottom: 0;
}
blockquote {
    border-left: 4px solid #dfe2e5;
    padding: 0 15px;
    color: #777777;
}
blockquote blockquote {
    padding-right: 0;
}
table {
    padding: 0;
    word-break: initial;
}
table tr {
    border-top: 1px solid #dfe2e5;
    margin: 0;
    padding: 0;
}
table tr:nth-child(2n),
thead {
    background-color: #f8f8f8;
}
table tr th {
    font-weight: bold;
    border: 1px solid #dfe2e5;
    border-bottom: 0;
    text-align: left;
    margin: 0;
    padding: 6px 13px;
}
table tr td {
    border: 1px solid #dfe2e5;
    text-align: left;
    margin: 0;
    padding: 6px 13px;
}
table tr th:first-child,
table tr td:first-child {
    margin-top: 0;
}
table tr th:last-child,
table tr td:last-child {
    margin-bottom: 0;
}

.CodeMirror-lines {
    padding-left: 4px;
}

.code-tooltip {
    box-shadow: 0 1px 1px 0 rgba(0,28,36,.3);
    border-top: 1px solid #eef2f2;
}

.md-fences,
code,
tt {
    border: 1px solid #e7eaed;
    background-color: #f8f8f8;
    border-radius: 3px;
    padding: 0;
    padding: 2px 4px 0px 4px;
    font-size: 0.9em;
}

code {
    background-color: #f3f4f4;
    padding: 0 4px 2px 4px;
}

.md-fences {
    margin-bottom: 15px;
    margin-top: 15px;
    padding: 0.2em 1em;
    padding-top: 8px;
    padding-bottom: 6px;
}


.md-task-list-item &gt; input {
  margin-left: -1.3em;
}

@media print {
    html {
        font-size: 13px;
    }
    table,
    pre {
        page-break-inside: avoid;
    }
    pre {
        word-wrap: break-word;
    }
}

.md-fences {
	background-color: #f8f8f8;
}
#write pre.md-meta-block {
	padding: 1rem;
    font-size: 85%;
    line-height: 1.45;
    background-color: #f7f7f7;
    border: 0;
    border-radius: 3px;
    color: #777777;
    margin-top: 0 !important;
}

.mathjax-block&gt;.code-tooltip {
	bottom: .375rem;
}

.md-mathjax-midline {
    background: #fafafa;
}

#write&gt;h3.md-focus:before{
	left: -1.5625rem;
	top: .375rem;
}
#write&gt;h4.md-focus:before{
	left: -1.5625rem;
	top: .285714286rem;
}
#write&gt;h5.md-focus:before{
	left: -1.5625rem;
	top: .285714286rem;
}
#write&gt;h6.md-focus:before{
	left: -1.5625rem;
	top: .285714286rem;
}
.md-image&gt;.md-meta {
    /*border: 1px solid #ddd;*/
    border-radius: 3px;
    padding: 2px 0px 0px 4px;
    font-size: 0.9em;
    color: inherit;
}

.md-tag {
    color: #a7a7a7;
    opacity: 1;
}

.md-toc { 
    margin-top:20px;
    padding-bottom:20px;
}

.sidebar-tabs {
    border-bottom: none;
}

#typora-quick-open {
    border: 1px solid #ddd;
    background-color: #f8f8f8;
}

#typora-quick-open-item {
    background-color: #FAFAFA;
    border-color: #FEFEFE #e5e5e5 #e5e5e5 #eee;
    border-style: solid;
    border-width: 1px;
}

/** focus mode */
.on-focus-mode blockquote {
    border-left-color: rgba(85, 85, 85, 0.12);
}

header, .context-menu, .megamenu-content, footer{
    font-family: &quot;Segoe UI&quot;, &quot;Arial&quot;, sans-serif;
}

.file-node-content:hover .file-node-icon,
.file-node-content:hover .file-node-open-state{
    visibility: visible;
}

.mac-seamless-mode #typora-sidebar {
    background-color: #fafafa;
    background-color: var(--side-bar-bg-color);
}

.md-lang {
    color: #b4654d;
}

.html-for-mac .context-menu {
    --item-hover-bg-color: #E6F0FE;
}

#md-notification .btn {
    border: 0;
}

.dropdown-menu .divider {
    border-color: #e5e5e5;
}

 .typora-export p, .typora-export .footnote-line {white-space: normal;} 
&lt;/style&gt;


&lt;div id=&quot;write&quot; class=&quot;is-mac&quot;&gt;&lt;p&gt;플러터를 빠르게 배우려면 &lt;/p&gt;
&lt;p&gt;어떻게 UI를 코드로 만드는지 알아야합니다. &lt;/p&gt;
&lt;p&gt;다트를 공부하고 플러터를 배우는 것도 좋지만 &lt;/p&gt;
&lt;p&gt;플러터를 갖고 위젯을 조금씩 수정하고, 핫리로딩해보다가&lt;/p&gt;
&lt;p&gt;모르는 게 나올 면 그때 다트를 찾아보는 게 효율적입니다. &lt;/p&gt;
&lt;p&gt;제가 추천하는 학습 순서는 다음과 같습니다. &lt;/p&gt;
&lt;p&gt;일단 위젯과 레이아웃의 사용법에 익숙해지고, &lt;/p&gt;
&lt;p&gt;그 다음에 구글이 제공한 풍부한 예제를 분석해보고 &lt;/p&gt;
&lt;p&gt;실제 앱을 만들어보는 겁니다. &lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;dart&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;dart&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;추천&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;사이트&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;및&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;학습&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;순서&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-number&quot;&gt;1.&lt;/span&gt;&lt;span class=&quot;cm-variable&quot;&gt;코드랩&lt;/span&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-number&quot;&gt;2.&lt;/span&gt;&lt;span class=&quot;cm-variable&quot;&gt;플러터&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;레이아웃&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;튜토리얼&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;문서&lt;/span&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-number&quot;&gt;3.&lt;/span&gt;&lt;span class=&quot;cm-variable&quot;&gt;구글&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;플러터&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;예제&lt;/span&gt; (&lt;span class=&quot;cm-variable&quot;&gt;갤러리&lt;/span&gt;) &lt;span class=&quot;cm-variable&quot;&gt;분석&lt;/span&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-number&quot;&gt;4.&lt;/span&gt;&lt;span class=&quot;cm-variable&quot;&gt;플러터&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;행성&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;만들기&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;튜토리얼&lt;/span&gt; &lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-number&quot;&gt;5.&lt;/span&gt;&lt;span class=&quot;cm-variable&quot;&gt;실제&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;앱&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;제작&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 220px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 220px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;h5&gt;&lt;a name=&quot;header-n629&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;1. 코드랩- 첫 플러터 앱 만들기 1, 2  &lt;/h5&gt;&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;%20https://codelabs.developers.google.com/codelabs/first-flutter-app-pt1/#0&quot;&gt;링크1&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://codelabs.developers.google.com/codelabs/first-flutter-app-pt2/#0&quot;&gt;링크2&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;&lt;p&gt;구글 코드랩은 정말 설명이 깔끔한 편이고, 플러터 튜토리얼도 잘 되어 있습니다. &lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;배울 수 있는 것 : 첫 플러터앱 만들기, 위젯 개념 잡기, 리스트뷰 만들어보기, 버튼 클릭(Interactivity), 다른 페이지로 넘어가기 (Routing)&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h5&gt;&lt;a name=&quot;header-n363&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;2. 플러터 레이아웃 튜토리얼 문서 &lt;/h5&gt;&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://flutter.io/docs/development/ui/layout&quot;&gt;링크&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;플러터도 위젯과 레이아웃의 종류가 다양한데요. 그 차이를 알아야 플러터를 자연스럽게 쓸 수 있죠. 이 문서를 보면 Row, Column, Expanded의 차이부터 시작해, 각종 레이아웃들(GridView, ListView, Stack )이 다 나와 있습니다. 무엇보다 예제 코드가 짧아서 바로 실행해 보기 좋죠. &lt;/li&gt;&lt;li&gt;배울 수 있는 것 : 레이아웃에 대한 깊은 이해 &lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h5&gt;&lt;a name=&quot;header-n217&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;3. 구글 예제 분석 &lt;/h5&gt;&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://github.com/flutter/flutter/tree/master/examples/flutter_gallery&quot;&gt;링크&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;이런 게 있었나 싶은 위젯이나 기능들이 정말 많습니다. 꼭 폰에 넣어서 확인하면서 소스 분석해보세요. &lt;/li&gt;&lt;li&gt;배울 수 있는 것 : 쿠퍼티노 디자인, 구글 표준 코드 &lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h5&gt;&lt;a name=&quot;header-n73&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;4. 행성 정보 앱 만들기 (미디엄 글)&lt;/h5&gt;&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://sergiandreplace.com/planets-flutter-from-design-to-app/&quot;&gt;링크&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;5개의 포스트에 걸쳐 플러터의 기본 기능을 알려줍니다.&lt;/li&gt;&lt;li&gt;디자인이 깔끔한데다가 2페이지로 구성된 앱이라 어떻게 페이지를 이동하는지 알 수 있습니다. &lt;/li&gt;&lt;li&gt;배울 수 있는 것 : 이쁘게 레이아웃 잡기, Routing(페이지 이동), 애니메이션, 전반적인 복습&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;마무리&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;사실 여기까지 했으면 기본적으로  UI만드는 건 무리가 없습니다. &lt;/p&gt;
&lt;p&gt;이제 제대로 앱을 만드려면 아래의 것들을 천천히 찾아보시면 되요. &lt;/p&gt;&lt;ul&gt;&lt;li&gt;안드로이드, ios 네이티브 코드 쓰기&lt;/li&gt;&lt;li&gt;웹에서 데이터 받아서 파싱하기&lt;/li&gt;&lt;li&gt;각종 플러그인(로컬 데이터 베이스, 파이어베이스, 지도) 써보기 &lt;/li&gt;&lt;li&gt;위젯 깊이 알기 (렌더링 과정, inheritedWidget)&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;저도 이 글에서 소개한 글을 통해 플러터를 배웠고, 같은 순서로 튜토리얼을 만들어보려고 합니다~!&lt;/p&gt;
&lt;p&gt;아, 그리고 전 유데미 플러터 과정은 좀 안 맞더군요. 별로 안 배웠는데 문제를 풀어야되서요.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;영상으로 배우실 거면 유튜브 &lt;a href=&quot;https://www.youtube.com/channel/UCYqCZOwHbnPwyjawKfE21wg&quot;&gt;TensorProgramming&lt;/a&gt;도 좋습니다. &lt;/p&gt;
&lt;p&gt;설명이 깔끔합니다. &lt;/p&gt;
&lt;p&gt;세부적인 것도 다 풀어서 이야기해줍니다. &lt;/p&gt;
&lt;p&gt;여기는 왜 async를 쓰고, isolate는 왜 쓰고, 왜 모델을 쓰는지 등 차근차근 말해주죠.&lt;/p&gt;
&lt;p&gt;이해가 잘 됩니다. 단점은 영어란 거죠. &lt;/p&gt;
&lt;p&gt;그래도 무료 영상 중에 이정도 퀄리티인 곳은 없습니다. &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;그럼 플러터 개발을 즐기실 수 있기를 바라며 글을 마치도록 하겠습니다. &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;/div&gt;</description>
      <category>플러터(Flutter)</category>
      <category>Flutter</category>
      <category>flutter layout</category>
      <category>플러터</category>
      <category>플러터 튜토리얼</category>
      <author>에드 신</author>
      <guid isPermaLink="true">https://software-creator.tistory.com/11</guid>
      <comments>https://software-creator.tistory.com/11#entry11comment</comments>
      <pubDate>Wed, 7 Nov 2018 13:55:42 +0900</pubDate>
    </item>
    <item>
      <title>Flutter Layout - 첫 플러터 앱 만들어보기</title>
      <link>https://software-creator.tistory.com/10</link>
      <description>&lt;meta charset=&quot;UTF-8&quot;&gt;&lt;meta name=&quot;viewport&quot; content=&quot;width=device-width initial-scale=1&quot;&gt;
&lt;title&gt;Flutter Layout - 첫 플러터 앱 만들어보기&lt;/title&gt;&lt;link href=&quot;https://fonts.loli.net/css?family=Open+Sans:400italic,700italic,700,400&amp;amp;subset=latin,latin-ext&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot;&gt;&lt;style type=&quot;text/css&quot;&gt;html {overflow-x: initial !important;}:root { --node-fill:  #ECECFF; --node-border:  #CCCCFF; --note-fill:  #fff5ad; --note-border:  #aaaa33; --cluster-fill:  #ffffde  !important; --cluster-border:  #aaaa33  !important; }
.mermaid .label { color: var(--text-color); }
.node rect, .node circle, .node ellipse, .node polygon { fill: var(--node-fill); stroke: var(--node-border); stroke-width: 1px; }
.edgePath .path { stroke: var(--text-color); }
.edgeLabel { background-color: var(--bg-color); }
.cluster rect { fill: rgb(255, 255, 222) !important; rx: 4px !important; stroke: rgb(170, 170, 51) !important; stroke-width: 1px !important; }
.cluster text { fill: var(--text-color); }
.actor { stroke: var(--node-border); fill: var(--node-fill); }
text.actor { fill: var(--text-color); stroke: none; }
.actor-line { stroke: grey; }
.messageLine0 { stroke-width: 1.5px; stroke: var(--text-color); }
.messageLine1 { stroke-width: 1.5px; stroke: var(--text-color); }
#arrowhead { fill: var(--text-color); }
#crosshead path { fill: var(--text-color)  !important; stroke: var(--text-color)  !important; }
.messageText { fill: var(--text-color); stroke: none; }
.labelBox { stroke: var(--node-border); fill: var(--node-fill); }
.labelText { fill: var(--text-color); stroke: none; }
.loopText { fill: var(--text-color); stroke: none; }
.loopLine { stroke-width: 2px; stroke: var(--node-border); }
.note { stroke: var(--note-border); fill: var(--note-fill); }
.noteText { fill: var(--text-color); stroke: none; font-size: 14px; }
.section { stroke: none; opacity: 0.2; }
.section0 { fill: rgba(102, 102, 255, 0.490196); }
.section2 { fill: rgb(255, 244, 0); }
.section1, .section3 { fill: white; opacity: 0.2; }
.sectionTitle0 { fill: var(--text-color); }
.sectionTitle1 { fill: var(--text-color); }
.sectionTitle2 { fill: var(--text-color); }
.sectionTitle3 { fill: var(--text-color); }
.sectionTitle { text-anchor: start; font-size: 11px; }
.grid .tick { stroke: lightgrey; opacity: 0.3; shape-rendering: crispedges; }
.grid path { stroke-width: 0px; }
.today { fill: none; stroke: red; stroke-width: 2px; }
.task { stroke-width: 2px; }
.taskText { text-anchor: middle; font-size: 11px; }
.taskTextOutsideRight { fill: black; text-anchor: start; font-size: 11px; }
.taskTextOutsideLeft { fill: black; text-anchor: end; font-size: 11px; }
.taskText0, .taskText1, .taskText2, .taskText3 { fill: white; }
.task0, .task1, .task2, .task3 { fill: rgb(138, 144, 221); stroke: rgb(83, 79, 188); }
.taskTextOutside0, .taskTextOutside2 { fill: var(--text-color); }
.taskTextOutside1, .taskTextOutside3 { fill: var(--text-color); }
.active0, .active1, .active2, .active3 { fill: rgb(191, 199, 255); stroke: rgb(83, 79, 188); }
.activeText0, .activeText1, .activeText2, .activeText3 { fill: black !important; }
.done0, .done1, .done2, .done3 { stroke: grey; fill: lightgrey; stroke-width: 2px; }
.doneText0, .doneText1, .doneText2, .doneText3 { fill: black !important; }
.crit0, .crit1, .crit2, .crit3 { stroke: rgb(255, 136, 136); fill: red; stroke-width: 2px; }
.activeCrit0, .activeCrit1, .activeCrit2, .activeCrit3 { stroke: rgb(255, 136, 136); fill: rgb(191, 199, 255); stroke-width: 2px; }
.doneCrit0, .doneCrit1, .doneCrit2, .doneCrit3 { stroke: rgb(255, 136, 136); fill: lightgrey; stroke-width: 2px; cursor: pointer; shape-rendering: crispedges; }
.doneCritText0, .doneCritText1, .doneCritText2, .doneCritText3 { fill: black !important; }
.activeCritText0, .activeCritText1, .activeCritText2, .activeCritText3 { fill: black !important; }
.titleText { text-anchor: middle; font-size: 18px; fill: black; }
.node text { font-size: 14px; }
div.mermaidTooltip { position: absolute; text-align: center; max-width: 200px; padding: 2px; font-size: 12px; background-color: rgb(255, 255, 222); border: 1px solid rgb(170, 170, 51); border-top-left-radius: 2px; border-top-right-radius: 2px; border-bottom-right-radius: 2px; border-bottom-left-radius: 2px; pointer-events: none; z-index: 100; background-position: initial initial; background-repeat: initial initial; }
#write .md-diagram-panel .md-diagram-panel-preview div { }


:root { --bg-color: #ffffff; --text-color: #333333; --select-text-bg-color: #B5D6FC; --select-text-font-color: auto; --monospace: &quot;Lucida Console&quot;,Consolas,&quot;Courier&quot;,monospace; }
html { font-size: 14px; background-color: var(--bg-color); color: var(--text-color); font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; -webkit-font-smoothing: antialiased; }
body { margin: 0px; padding: 0px; height: auto; bottom: 0px; top: 0px; left: 0px; right: 0px; font-size: 1rem; line-height: 1.42857143; overflow-x: hidden; background-image: inherit; background-size: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: inherit; background-position: inherit inherit; background-repeat: inherit inherit; }
iframe { margin: auto; }
a.url { word-break: break-all; }
a:active, a:hover { outline: 0px; }
.in-text-selection, ::selection { text-shadow: none; background: var(--select-text-bg-color); color: var(--select-text-font-color); }
#write { margin: 0px auto; height: auto; width: inherit; word-break: normal; word-wrap: break-word; position: relative; white-space: normal; overflow-x: visible; }
#write.first-line-indent p { text-indent: 2em; }
#write.first-line-indent li p, #write.first-line-indent p * { text-indent: 0px; }
#write.first-line-indent li { margin-left: 2em; }
.for-image #write { padding-left: 8px; padding-right: 8px; }
body.typora-export { padding-left: 30px; padding-right: 30px; }
.typora-export .footnote-line, .typora-export p { white-space: pre-wrap; }
@media screen and (max-width: 500px) { 
  body.typora-export { padding-left: 0px; padding-right: 0px; }
  .CodeMirror-sizer { margin-left: 0px !important; }
  .CodeMirror-gutters { display: none !important; }
}
#write li &gt; figure:first-child { margin-top: -20px; }
#write ol, #write ul { position: relative; }
img { max-width: 100%; vertical-align: middle; }
button, input, select, textarea { color: inherit; font-family: inherit; font-size: inherit; font-style: inherit; font-variant-caps: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; }
input[type=&quot;checkbox&quot;], input[type=&quot;radio&quot;] { line-height: normal; padding: 0px; }
*, ::after, ::before { box-sizing: border-box; }
#write h1, #write h2, #write h3, #write h4, #write h5, #write h6, #write p, #write pre { width: inherit; }
#write h1, #write h2, #write h3, #write h4, #write h5, #write h6, #write p { position: relative; }
h1, h2, h3, h4, h5, h6 { break-after: avoid-page; break-inside: avoid; orphans: 2; }
p { orphans: 4; }
h1 { font-size: 2rem; }
h2 { font-size: 1.8rem; }
h3 { font-size: 1.6rem; }
h4 { font-size: 1.4rem; }
h5 { font-size: 1.2rem; }
h6 { font-size: 1rem; }
.md-math-block, .md-rawblock, h1, h2, h3, h4, h5, h6, p { margin-top: 1rem; margin-bottom: 1rem; }
.hidden { display: none; }
.md-blockmeta { color: rgb(204, 204, 204); font-weight: 700; font-style: italic; }
a { cursor: pointer; }
sup.md-footnote { padding: 2px 4px; background-color: rgba(238, 238, 238, 0.701961); color: rgb(85, 85, 85); border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; cursor: pointer; }
sup.md-footnote a, sup.md-footnote a:hover { color: inherit; text-transform: inherit; text-decoration: inherit; }
#write input[type=&quot;checkbox&quot;] { cursor: pointer; width: inherit; height: inherit; }
figure { overflow-x: auto; margin: 1.2em 0px; max-width: calc(100% + 16px); padding: 0px; }
figure &gt; table { margin: 0px !important; }
tr { break-inside: avoid; break-after: auto; }
thead { display: table-header-group; }
table { border-collapse: collapse; border-spacing: 0px; width: 100%; overflow: auto; break-inside: auto; text-align: left; }
table.md-table td { min-width: 80px; }
.CodeMirror-gutters { border-right-width: 0px; background-color: inherit; }
.CodeMirror { text-align: left; }
.CodeMirror-placeholder { opacity: 0.3; }
.CodeMirror pre { padding: 0px 4px; }
.CodeMirror-lines { padding: 0px; }
div.hr:focus { cursor: none; }
#write pre { white-space: pre-wrap; }
#write.fences-no-line-wrapping pre { white-space: pre; }
#write pre.ty-contain-cm { white-space: normal; }
.CodeMirror-gutters { margin-right: 4px; }
.md-fences { font-size: 0.9rem; display: block; break-inside: avoid; text-align: left; overflow: visible; white-space: pre; background-image: inherit; background-size: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: inherit; position: relative !important; background-position: inherit inherit; background-repeat: inherit inherit; }
.md-diagram-panel { width: 100%; margin-top: 10px; text-align: center; padding-top: 0px; padding-bottom: 8px; overflow-x: auto; }
#write .md-fences.mock-cm { white-space: pre-wrap; }
.md-fences.md-fences-with-lineno { padding-left: 0px; }
#write.fences-no-line-wrapping .md-fences.mock-cm { white-space: pre; overflow-x: auto; }
.md-fences.mock-cm.md-fences-with-lineno { padding-left: 8px; }
.CodeMirror-line, twitterwidget { break-inside: avoid; }
.footnotes { opacity: 0.8; font-size: 0.9rem; margin-top: 1em; margin-bottom: 1em; }
.footnotes + .footnotes { margin-top: 0px; }
.md-reset { margin: 0px; padding: 0px; border: 0px; outline: 0px; vertical-align: top; text-decoration: none; text-shadow: none; float: none; position: static; width: auto; height: auto; white-space: nowrap; cursor: inherit; line-height: normal; font-weight: 400; text-align: left; box-sizing: content-box; direction: ltr; background-position: 0px 0px; background-repeat: initial initial; }
li div { padding-top: 0px; }
blockquote { margin: 1rem 0px; }
li .mathjax-block, li p { margin: 0.5rem 0px; }
li { margin: 0px; position: relative; }
blockquote &gt; :last-child { margin-bottom: 0px; }
blockquote &gt; :first-child, li &gt; :first-child { margin-top: 0px; }
.footnotes-area { color: rgb(136, 136, 136); margin-top: 0.714rem; padding-bottom: 0.143rem; white-space: normal; }
#write .footnote-line { white-space: pre-wrap; }
@media print { 
  body, html { border: 1px solid transparent; height: 99%; break-after: avoid-page; break-before: avoid-page; }
  #write { margin-top: 0px; border-color: transparent !important; }
  .typora-export * { -webkit-print-color-adjust: exact; }
  html.blink-to-pdf { font-size: 13px; }
  .typora-export #write { padding-left: 1cm; padding-right: 1cm; padding-bottom: 0px; break-after: avoid-page; }
  .typora-export #write::after { height: 0px; }
  @page { margin: 20mm 0px; }
}
.footnote-line { margin-top: 0.714em; font-size: 0.7em; }
a img, img a { cursor: pointer; }
pre.md-meta-block { font-size: 0.8rem; min-height: 0.8rem; white-space: pre-wrap; background-color: rgb(204, 204, 204); display: block; overflow-x: hidden; background-position: initial initial; background-repeat: initial initial; }
p &gt; img:only-child { display: block; margin: auto; }
p &gt; .md-image:only-child { display: inline-block; width: 100%; text-align: center; }
#write .MathJax_Display { margin: 0.8em 0px 0px; }
.md-math-block { width: 100%; }
.md-math-block:not(:empty)::after { display: none; }
[contenteditable=&quot;true&quot;]:active, [contenteditable=&quot;true&quot;]:focus { outline: 0px; box-shadow: none; }
.md-task-list-item { position: relative; list-style-type: none; }
.task-list-item.md-task-list-item { padding-left: 0px; }
.md-task-list-item &gt; input { position: absolute; top: 0px; left: 0px; margin-left: -1.2em; margin-top: calc(1em - 10px); }
.math { font-size: 1rem; }
.md-toc { min-height: 3.58rem; position: relative; font-size: 0.9rem; border-top-left-radius: 10px; border-top-right-radius: 10px; border-bottom-right-radius: 10px; border-bottom-left-radius: 10px; }
.md-toc-content { position: relative; margin-left: 0px; }
.md-toc-content::after, .md-toc::after { display: none; }
.md-toc-item { display: block; color: rgb(65, 131, 196); }
.md-toc-item a { text-decoration: none; }
.md-toc-inner:hover { text-decoration: underline; }
.md-toc-inner { display: inline-block; cursor: pointer; }
.md-toc-h1 .md-toc-inner { margin-left: 0px; font-weight: 700; }
.md-toc-h2 .md-toc-inner { margin-left: 2em; }
.md-toc-h3 .md-toc-inner { margin-left: 4em; }
.md-toc-h4 .md-toc-inner { margin-left: 6em; }
.md-toc-h5 .md-toc-inner { margin-left: 8em; }
.md-toc-h6 .md-toc-inner { margin-left: 10em; }
@media screen and (max-width: 48em) { 
  .md-toc-h3 .md-toc-inner { margin-left: 3.5em; }
  .md-toc-h4 .md-toc-inner { margin-left: 5em; }
  .md-toc-h5 .md-toc-inner { margin-left: 6.5em; }
  .md-toc-h6 .md-toc-inner { margin-left: 8em; }
}
a.md-toc-inner { font-size: inherit; font-style: inherit; font-weight: inherit; line-height: inherit; }
.footnote-line a:not(.reversefootnote) { color: inherit; }
.md-attr { display: none; }
.md-fn-count::after { content: &quot;.&quot;; }
code, pre, samp, tt { font-family: var(--monospace); }
kbd { margin: 0px 0.1em; padding: 0.1em 0.6em; font-size: 0.8em; color: rgb(36, 39, 41); background-color: rgb(255, 255, 255); border: 1px solid rgb(173, 179, 185); border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; box-shadow: rgba(12, 13, 14, 0.2) 0px 1px 0px, rgb(255, 255, 255) 0px 0px 0px 2px inset; white-space: nowrap; vertical-align: middle; background-position: initial initial; background-repeat: initial initial; }
.md-comment { color: rgb(162, 127, 3); opacity: 0.8; font-family: var(--monospace); }
code { text-align: left; }
a.md-print-anchor { white-space: pre !important; border: none !important; display: inline-block !important; position: absolute !important; width: 1px !important; right: 0px !important; outline: 0px !important; text-shadow: initial !important; background-position: 0px 0px !important; background-repeat: initial initial !important; }
.md-inline-math .MathJax_SVG .noError { display: none !important; }
.md-math-block .MathJax_SVG_Display { text-align: center; margin: 0px; position: relative; text-indent: 0px; max-width: none; max-height: none; min-height: 0px; min-width: 100%; width: auto; overflow-y: hidden; display: block !important; }
.MathJax_SVG_Display, .md-inline-math .MathJax_SVG_Display { width: auto; margin: inherit; display: inline-block !important; }
.MathJax_SVG .MJX-monospace { font-family: var(--monospace); }
.MathJax_SVG .MJX-sans-serif { font-family: sans-serif; }
.MathJax_SVG { display: inline; font-style: normal; font-weight: 400; line-height: normal; zoom: 90%; text-indent: 0px; text-align: left; text-transform: none; letter-spacing: normal; word-spacing: normal; word-wrap: normal; white-space: nowrap; float: none; direction: ltr; max-width: none; max-height: none; min-width: 0px; min-height: 0px; border: 0px; padding: 0px; margin: 0px; }
.MathJax_SVG * { transition: none; }
.MathJax_SVG_Display svg { vertical-align: middle !important; margin-bottom: 0px !important; }
.os-windows.monocolor-emoji .md-emoji { font-family: &quot;Segoe UI Symbol&quot;, sans-serif; }
.md-diagram-panel &gt; svg { max-width: 100%; }
[lang=&quot;mermaid&quot;] svg, [lang=&quot;flow&quot;] svg { max-width: 100%; }
[lang=&quot;mermaid&quot;] .node text { font-size: 1rem; }
table tr th { border-bottom-width: 0px; }
video { max-width: 100%; display: block; margin: 0px auto; }
iframe { max-width: 100%; width: 100%; border: none; }
.highlight td, .highlight tr { border: 0px; }


.CodeMirror { height: auto; }
.CodeMirror.cm-s-inner { background-image: inherit; background-size: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: inherit; background-position: inherit inherit; background-repeat: inherit inherit; }
.CodeMirror-scroll { overflow-y: hidden; overflow-x: auto; z-index: 3; }
.CodeMirror-gutter-filler, .CodeMirror-scrollbar-filler { background-color: rgb(255, 255, 255); }
.CodeMirror-gutters { border-right-width: 1px; border-right-style: solid; border-right-color: rgb(221, 221, 221); background-image: inherit; background-size: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: inherit; white-space: nowrap; background-position: inherit inherit; background-repeat: inherit inherit; }
.CodeMirror-linenumber { padding: 0px 3px 0px 5px; text-align: right; color: rgb(153, 153, 153); }
.cm-s-inner .cm-keyword { color: rgb(119, 0, 136); }
.cm-s-inner .cm-atom, .cm-s-inner.cm-atom { color: rgb(34, 17, 153); }
.cm-s-inner .cm-number { color: rgb(17, 102, 68); }
.cm-s-inner .cm-def { color: rgb(0, 0, 255); }
.cm-s-inner .cm-variable { color: rgb(0, 0, 0); }
.cm-s-inner .cm-variable-2 { color: rgb(0, 85, 170); }
.cm-s-inner .cm-variable-3 { color: rgb(0, 136, 85); }
.cm-s-inner .cm-string { color: rgb(170, 17, 17); }
.cm-s-inner .cm-property { color: rgb(0, 0, 0); }
.cm-s-inner .cm-operator { color: rgb(152, 26, 26); }
.cm-s-inner .cm-comment, .cm-s-inner.cm-comment { color: rgb(170, 85, 0); }
.cm-s-inner .cm-string-2 { color: rgb(255, 85, 0); }
.cm-s-inner .cm-meta { color: rgb(85, 85, 85); }
.cm-s-inner .cm-qualifier { color: rgb(85, 85, 85); }
.cm-s-inner .cm-builtin { color: rgb(51, 0, 170); }
.cm-s-inner .cm-bracket { color: rgb(153, 153, 119); }
.cm-s-inner .cm-tag { color: rgb(17, 119, 0); }
.cm-s-inner .cm-attribute { color: rgb(0, 0, 204); }
.cm-s-inner .cm-header, .cm-s-inner.cm-header { color: rgb(0, 0, 255); }
.cm-s-inner .cm-quote, .cm-s-inner.cm-quote { color: rgb(0, 153, 0); }
.cm-s-inner .cm-hr, .cm-s-inner.cm-hr { color: rgb(153, 153, 153); }
.cm-s-inner .cm-link, .cm-s-inner.cm-link { color: rgb(0, 0, 204); }
.cm-negative { color: rgb(221, 68, 68); }
.cm-positive { color: rgb(34, 153, 34); }
.cm-header, .cm-strong { font-weight: 700; }
.cm-del { text-decoration: line-through; }
.cm-em { font-style: italic; }
.cm-link { text-decoration: underline; }
.cm-error { color: red; }
.cm-invalidchar { color: red; }
.cm-constant { color: rgb(38, 139, 210); }
.cm-defined { color: rgb(181, 137, 0); }
div.CodeMirror span.CodeMirror-matchingbracket { color: rgb(0, 255, 0); }
div.CodeMirror span.CodeMirror-nonmatchingbracket { color: rgb(255, 34, 34); }
.cm-s-inner .CodeMirror-activeline-background { background-image: inherit; background-size: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: inherit; background-position: inherit inherit; background-repeat: inherit inherit; }
.CodeMirror { position: relative; overflow: hidden; }
.CodeMirror-scroll { height: 100%; outline: 0px; position: relative; box-sizing: content-box; background-image: inherit; background-size: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: inherit; background-position: inherit inherit; background-repeat: inherit inherit; }
.CodeMirror-sizer { position: relative; }
.CodeMirror-gutter-filler, .CodeMirror-hscrollbar, .CodeMirror-scrollbar-filler, .CodeMirror-vscrollbar { position: absolute; z-index: 6; display: none; }
.CodeMirror-vscrollbar { right: 0px; top: 0px; overflow: hidden; }
.CodeMirror-hscrollbar { bottom: 0px; left: 0px; overflow: hidden; }
.CodeMirror-scrollbar-filler { right: 0px; bottom: 0px; }
.CodeMirror-gutter-filler { left: 0px; bottom: 0px; }
.CodeMirror-gutters { position: absolute; left: 0px; top: 0px; padding-bottom: 30px; z-index: 3; }
.CodeMirror-gutter { white-space: normal; height: 100%; box-sizing: content-box; padding-bottom: 30px; margin-bottom: -32px; display: inline-block; }
.CodeMirror-gutter-wrapper { position: absolute; z-index: 4; border: none !important; background-position: 0px 0px !important; background-repeat: initial initial !important; }
.CodeMirror-gutter-background { position: absolute; top: 0px; bottom: 0px; z-index: 4; }
.CodeMirror-gutter-elt { position: absolute; cursor: default; z-index: 4; }
.CodeMirror-lines { cursor: text; }
.CodeMirror pre { border-top-left-radius: 0px; border-top-right-radius: 0px; border-bottom-right-radius: 0px; border-bottom-left-radius: 0px; border-width: 0px; font-family: inherit; font-size: inherit; margin: 0px; white-space: pre; word-wrap: normal; color: inherit; z-index: 2; position: relative; overflow: visible; background-position: 0px 0px; background-repeat: initial initial; }
.CodeMirror-wrap pre { word-wrap: break-word; white-space: pre-wrap; word-break: normal; }
.CodeMirror-code pre { border-right-width: 30px; border-right-style: solid; border-right-color: transparent; width: fit-content; }
.CodeMirror-wrap .CodeMirror-code pre { border-right-style: none; width: auto; }
.CodeMirror-linebackground { position: absolute; left: 0px; right: 0px; top: 0px; bottom: 0px; z-index: 0; }
.CodeMirror-linewidget { position: relative; z-index: 2; overflow: auto; }
.CodeMirror-wrap .CodeMirror-scroll { overflow-x: hidden; }
.CodeMirror-measure { position: absolute; width: 100%; height: 0px; overflow: hidden; visibility: hidden; }
.CodeMirror-measure pre { position: static; }
.CodeMirror div.CodeMirror-cursor { position: absolute; visibility: hidden; border-right-style: none; width: 0px; }
.CodeMirror div.CodeMirror-cursor { visibility: hidden; }
.CodeMirror-focused div.CodeMirror-cursor { visibility: inherit; }
.cm-searching { background-color: rgba(255, 255, 0, 0.4); background-position: initial initial; background-repeat: initial initial; }
@media print { 
  .CodeMirror div.CodeMirror-cursor { visibility: hidden; }
}


:root {
    --side-bar-bg-color: #fafafa;
    --control-text-color: #777;
}

@include-when-export url(https://fonts.loli.net/css?family=Open+Sans:400italic,700italic,700,400&amp;subset=latin,latin-ext);

@font-face {
    font-family: 'Open Sans';
    font-style: normal;
    font-weight: normal;
    src: local('Open Sans Regular'),url('file:///Users/JcSnap/Library/Application%20Support/abnerworks.Typora/themes/github/400.woff') format('woff');
}

@font-face {
    font-family: 'Open Sans';
    font-style: italic;
    font-weight: normal;
    src: local('Open Sans Italic'),url('file:///Users/JcSnap/Library/Application%20Support/abnerworks.Typora/themes/github/400i.woff') format('woff');
}

@font-face {
    font-family: 'Open Sans';
    font-style: normal;
    font-weight: bold;
    src: local('Open Sans Bold'),url('file:///Users/JcSnap/Library/Application%20Support/abnerworks.Typora/themes/github/700.woff') format('woff');
}

@font-face {
    font-family: 'Open Sans';
    font-style: italic;
    font-weight: bold;
    src: local('Open Sans Bold Italic'),url('file:///Users/JcSnap/Library/Application%20Support/abnerworks.Typora/themes/github/700i.woff') format('woff');
}

html {
    font-size: 16px;
}

body {
    font-family: &quot;Open Sans&quot;,&quot;Clear Sans&quot;,&quot;Helvetica Neue&quot;,Helvetica,Arial,sans-serif;
    color: rgb(51, 51, 51);
    line-height: 1.6;
}

#write {
    max-width: 860px;
  	margin: 0 auto;
  	padding: 30px;
    padding-bottom: 100px;
}
#write &gt; ul:first-child,
#write &gt; ol:first-child{
    margin-top: 30px;
}

a {
    color: #4183C4;
}
h1,
h2,
h3,
h4,
h5,
h6 {
    position: relative;
    margin-top: 1rem;
    margin-bottom: 1rem;
    font-weight: bold;
    line-height: 1.4;
    cursor: text;
}
h1:hover a.anchor,
h2:hover a.anchor,
h3:hover a.anchor,
h4:hover a.anchor,
h5:hover a.anchor,
h6:hover a.anchor {
    /*background: url(&quot;file:///Users/JcSnap/Library/Application%20Support/images/modules/styleguide/para.png&quot;) no-repeat 10px center;*/
    text-decoration: none;
}
h1 tt,
h1 code {
    font-size: inherit;
}
h2 tt,
h2 code {
    font-size: inherit;
}
h3 tt,
h3 code {
    font-size: inherit;
}
h4 tt,
h4 code {
    font-size: inherit;
}
h5 tt,
h5 code {
    font-size: inherit;
}
h6 tt,
h6 code {
    font-size: inherit;
}
h1 {
    padding-bottom: .3em;
    font-size: 2.25em;
    line-height: 1.2;
    border-bottom: 1px solid #eee;
}
h2 {
   padding-bottom: .3em;
    font-size: 1.75em;
    line-height: 1.225;
    border-bottom: 1px solid #eee;
}
h3 {
    font-size: 1.5em;
    line-height: 1.43;
}
h4 {
    font-size: 1.25em;
}
h5 {
    font-size: 1em;
}
h6 {
   font-size: 1em;
    color: #777;
}
p,
blockquote,
ul,
ol,
dl,
table{
    margin: 0.8em 0;
}
li&gt;ol,
li&gt;ul {
    margin: 0 0;
}
hr {
    height: 2px;
    padding: 0;
    margin: 16px 0;
    background-color: #e7e7e7;
    border: 0 none;
    overflow: hidden;
    box-sizing: content-box;
}

li p.first {
    display: inline-block;
}
ul,
ol {
    padding-left: 30px;
}
ul:first-child,
ol:first-child {
    margin-top: 0;
}
ul:last-child,
ol:last-child {
    margin-bottom: 0;
}
blockquote {
    border-left: 4px solid #dfe2e5;
    padding: 0 15px;
    color: #777777;
}
blockquote blockquote {
    padding-right: 0;
}
table {
    padding: 0;
    word-break: initial;
}
table tr {
    border-top: 1px solid #dfe2e5;
    margin: 0;
    padding: 0;
}
table tr:nth-child(2n),
thead {
    background-color: #f8f8f8;
}
table tr th {
    font-weight: bold;
    border: 1px solid #dfe2e5;
    border-bottom: 0;
    text-align: left;
    margin: 0;
    padding: 6px 13px;
}
table tr td {
    border: 1px solid #dfe2e5;
    text-align: left;
    margin: 0;
    padding: 6px 13px;
}
table tr th:first-child,
table tr td:first-child {
    margin-top: 0;
}
table tr th:last-child,
table tr td:last-child {
    margin-bottom: 0;
}

.CodeMirror-lines {
    padding-left: 4px;
}

.code-tooltip {
    box-shadow: 0 1px 1px 0 rgba(0,28,36,.3);
    border-top: 1px solid #eef2f2;
}

.md-fences,
code,
tt {
    border: 1px solid #e7eaed;
    background-color: #f8f8f8;
    border-radius: 3px;
    padding: 0;
    padding: 2px 4px 0px 4px;
    font-size: 0.9em;
}

code {
    background-color: #f3f4f4;
    padding: 0 4px 2px 4px;
}

.md-fences {
    margin-bottom: 15px;
    margin-top: 15px;
    padding: 0.2em 1em;
    padding-top: 8px;
    padding-bottom: 6px;
}


.md-task-list-item &gt; input {
  margin-left: -1.3em;
}

@media print {
    html {
        font-size: 13px;
    }
    table,
    pre {
        page-break-inside: avoid;
    }
    pre {
        word-wrap: break-word;
    }
}

.md-fences {
	background-color: #f8f8f8;
}
#write pre.md-meta-block {
	padding: 1rem;
    font-size: 85%;
    line-height: 1.45;
    background-color: #f7f7f7;
    border: 0;
    border-radius: 3px;
    color: #777777;
    margin-top: 0 !important;
}

.mathjax-block&gt;.code-tooltip {
	bottom: .375rem;
}

.md-mathjax-midline {
    background: #fafafa;
}

#write&gt;h3.md-focus:before{
	left: -1.5625rem;
	top: .375rem;
}
#write&gt;h4.md-focus:before{
	left: -1.5625rem;
	top: .285714286rem;
}
#write&gt;h5.md-focus:before{
	left: -1.5625rem;
	top: .285714286rem;
}
#write&gt;h6.md-focus:before{
	left: -1.5625rem;
	top: .285714286rem;
}
.md-image&gt;.md-meta {
    /*border: 1px solid #ddd;*/
    border-radius: 3px;
    padding: 2px 0px 0px 4px;
    font-size: 0.9em;
    color: inherit;
}

.md-tag {
    color: #a7a7a7;
    opacity: 1;
}

.md-toc { 
    margin-top:20px;
    padding-bottom:20px;
}

.sidebar-tabs {
    border-bottom: none;
}

#typora-quick-open {
    border: 1px solid #ddd;
    background-color: #f8f8f8;
}

#typora-quick-open-item {
    background-color: #FAFAFA;
    border-color: #FEFEFE #e5e5e5 #e5e5e5 #eee;
    border-style: solid;
    border-width: 1px;
}

/** focus mode */
.on-focus-mode blockquote {
    border-left-color: rgba(85, 85, 85, 0.12);
}

header, .context-menu, .megamenu-content, footer{
    font-family: &quot;Segoe UI&quot;, &quot;Arial&quot;, sans-serif;
}

.file-node-content:hover .file-node-icon,
.file-node-content:hover .file-node-open-state{
    visibility: visible;
}

.mac-seamless-mode #typora-sidebar {
    background-color: #fafafa;
    background-color: var(--side-bar-bg-color);
}

.md-lang {
    color: #b4654d;
}

.html-for-mac .context-menu {
    --item-hover-bg-color: #E6F0FE;
}

#md-notification .btn {
    border: 0;
}

.dropdown-menu .divider {
    border-color: #e5e5e5;
}

 .typora-export p, .typora-export .footnote-line {white-space: normal;} 
&lt;/style&gt;


&lt;div id=&quot;write&quot; class=&quot;is-mac&quot;&gt;&lt;h3&gt;&lt;a name=&quot;header-n0&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;Flutter Layout - 첫 플러터 앱 만들어보기&lt;/h3&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h3&gt;&lt;a name=&quot;header-n10&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;- UI 만들어보기&lt;/h3&gt;&lt;ul&gt;&lt;li&gt;플러터란?&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;&lt;p&gt;위젯이란?&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;기본 위젯 사용해보기&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;변경 없는 위젯(statelessWidget) vs 변경 있는 위젯(staefuleWidget)&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h3&gt;&lt;a name=&quot;header-n825&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;1. 플러터란?&lt;/h3&gt;&lt;p&gt;플러터는 구글에서 만든 프레임워크입니다. 크로스 플랫폼 개발을 쉽게 할 수 있게 해줍니다. &lt;/p&gt;
&lt;p&gt;직접 써보니 상당히 생산성이 높아서 플러터를 집중적으로 공부하고 있습니다. &lt;/p&gt;
&lt;p&gt;플러터의 가장 큰 특징은 UI까지 모두 코드로 작성한다는 점입니다. &lt;/p&gt;
&lt;p&gt;iOS의 스토리보드나 안드로이드의 xml의 경우 다른 데서 UI를 만들고, &lt;/p&gt;
&lt;p&gt;앱 상에서는 UI를 불러오는 방식으로 코딩을 했는데요.&lt;/p&gt;
&lt;p&gt;플러터는 다릅니다. &lt;/p&gt;
&lt;p&gt;아주 간단한 플러터 코드를 보도록 하죠.&lt;/p&gt;&lt;pre lang=&quot;dart&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; spellcheck=&quot;false&quot; style=&quot;page-break-inside: unset;&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;dart&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;cm-string&quot;&gt;'package:flutter/material.dart'&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;main&lt;/span&gt;() &lt;span class=&quot;cm-operator&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;runApp&lt;/span&gt;(&lt;span class=&quot;cm-keyword&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;MyApp&lt;/span&gt;()); &lt;span class=&quot;cm-comment&quot;&gt;// 앱 실행 &lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;MyApp&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;extends&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;StatelessWidget&lt;/span&gt; { &lt;span class=&quot;cm-comment&quot;&gt;// 상태 변경이 없는 위젯. 한번 UI가 그려지면 그대로 있음.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-meta&quot;&gt;@override&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;Widget&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;build&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;BuildContext&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;context&lt;/span&gt;) { &lt;span class=&quot;cm-comment&quot;&gt;// UI를 만드는 부분. &lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;MaterialApp&lt;/span&gt;( &lt;span class=&quot;cm-comment&quot;&gt;// 구글 기본 디자인인 Material Design을 써서 앱을 만든다. &lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;title&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;'플러터 앱'&lt;/span&gt;, &lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;home&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;Scaffold&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;appBar&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;AppBar&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;title&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;Text&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;&quot;타이틀&quot;&lt;/span&gt;)), &lt;span class=&quot;cm-comment&quot;&gt;// 앱의 상단 타이틀&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;body&lt;/span&gt; : &lt;span class=&quot;cm-variable&quot;&gt;Text&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;&quot;첫 플러터 앱&quot;&lt;/span&gt;) &lt;span class=&quot;cm-comment&quot;&gt;// 앱 화면에 표시되는 텍스트&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;  ),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  );&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  }&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 352px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 352px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;UI를 만드는 코드가 &lt;em&gt;MaterialApp()&lt;/em&gt; 안에 들어 있습니다. &lt;/p&gt;
&lt;p&gt;&lt;em&gt;Scaffold()&lt;/em&gt;,  &lt;em&gt;AppBar()&lt;/em&gt; , &lt;em&gt;Text()&lt;/em&gt; 등 UI 관련 코드를 바로 쓰고 있습니다. 이것들이 하는 일은 밑에서 설명할께요.&lt;/p&gt;
&lt;p&gt;코드로 UI를 만들다보니 처음에는 정신없을 수 있는데 &lt;/p&gt;
&lt;p&gt;익숙해질수록 빠르게 작업을 할 수 있습니다. &lt;/p&gt;
&lt;p&gt;한번 실행을 해볼까요?&lt;/p&gt;
&lt;p&gt;깔끔한 UI가 나오네요.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/13621579/47952652-0d00d380-dfb6-11e8-8bfc-9af20c58f684.png&quot; alt=&quot;alt&quot; referrerpolicy=&quot;no-referrer&quot;&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;한번 코드를 간단히 수정하고 다시 실행을 해볼께요. &lt;/p&gt;
&lt;p&gt;&lt;em&gt;AppBar&lt;/em&gt; 와 &lt;em&gt;Text&lt;/em&gt; 의 내용만 바꿔보도록 할께요.&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;dart&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;dart&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;MyApp&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;extends&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;StatelessWidget&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-meta&quot;&gt;@override&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;Widget&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;build&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;BuildContext&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;context&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;MaterialApp&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;title&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;'플러터 앱'&lt;/span&gt;, &lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;debugShowCheckedModeBanner&lt;/span&gt;: &lt;span class=&quot;cm-atom&quot;&gt;false&lt;/span&gt;, &lt;span class=&quot;cm-comment&quot;&gt;// debug 표시를 보지 않습니다. &lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;home&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;Scaffold&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;appBar&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;AppBar&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;title&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;Text&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;&quot;앱 타이틀&quot;&lt;/span&gt;)),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;body&lt;/span&gt; : &lt;span class=&quot;cm-variable&quot;&gt;Text&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;&quot;나의 첫 플러터 앱&quot;&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;  ),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  );&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  }&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 286px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 286px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/13621579/47952668-433e5300-dfb6-11e8-9c6f-5fa7a957ab6a.png&quot; alt=&quot;alt text&quot; referrerpolicy=&quot;no-referrer&quot;&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;저장을 하면 바로 내용이 바뀌는 걸 알 수 있죠. &lt;/p&gt;
&lt;p&gt;이렇게 바뀐 걸 바로바로 앱에 반영할 수 있는 게 플러터의 가장 큰 장점입니다. &lt;/p&gt;&lt;h3&gt;&lt;a name=&quot;header-n830&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;2. 위젯이란?&lt;/h3&gt;&lt;p&gt;간단히 말해 플러터 앱에 있는 모든 게 위젯이라 생각하면 되요. 텍스트, 버튼, 화면구성(레이아웃), 전체 뼈대 모든 게 위젯이죠. &lt;/p&gt;
&lt;p&gt;위에서 잠깐 본 머터리얼앱(MaterialApp), 스캐폴드 (Scaffold), 텍스트(Text) 모두 다 위젯이에요.&lt;/p&gt;
&lt;p&gt;플러터는 위젯 안에 위젯을 넣는 방식으로 앱을 만들어요. &lt;/p&gt;
&lt;p&gt;가장 바깥의 위젯을 그리고, 안에 있는 위젯은 다음에 그리며 UI를 만들어가죠. &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;위젯의 구조는 뒤집어진 나무와 비슷하답니다. 머터리얼 앱이 가장 위에 있고, 나중에 붙은 위젯이 아래에 있죠. &lt;/p&gt;
&lt;p&gt;아래 그림을 볼까요?&lt;/p&gt;&lt;div class=&quot;md-diagram-panel&quot;&gt;&lt;svg id=&quot;mermaidChart119&quot; width=&quot;360.0625&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot; height=&quot;519&quot; viewBox=&quot;0 0 360.0625 519&quot; style=&quot;height: 559px;&quot;&gt;&lt;style&gt;&lt;/style&gt;&lt;style&gt;#mermaidChart119 {
    color: rgb(51, 51, 51);
    font: normal normal normal normal 14.399999618530273px/23px &quot;Lucida Console&quot;, Consolas, Courier, monospace;
  }&lt;/style&gt;&lt;g transform=&quot;translate(32, 32)&quot;&gt;&lt;g class=&quot;output&quot;&gt;&lt;g class=&quot;clusters&quot;&gt;&lt;/g&gt;&lt;g class=&quot;edgePaths&quot;&gt;&lt;g class=&quot;edgePath&quot; style=&quot;opacity: 1;&quot;&gt;&lt;path class=&quot;path&quot; d=&quot;M148.03125,63L148.03125,88L148.03125,113&quot; marker-end=&quot;url(#arrowhead912)&quot; style=&quot;fill:none&quot;&gt;&lt;/path&gt;&lt;defs&gt;&lt;marker id=&quot;arrowhead912&quot; viewBox=&quot;0 0 10 10&quot; refX=&quot;9&quot; refY=&quot;5&quot; markerUnits=&quot;strokeWidth&quot; markerWidth=&quot;8&quot; markerHeight=&quot;6&quot; orient=&quot;auto&quot;&gt;&lt;path d=&quot;M 0 0 L 10 5 L 0 10 z&quot; class=&quot;arrowheadPath&quot; style=&quot;stroke-width: 1px; stroke-dasharray: 1px, 0px;&quot;&gt;&lt;/path&gt;&lt;/marker&gt;&lt;/defs&gt;&lt;/g&gt;&lt;g class=&quot;edgePath&quot; style=&quot;opacity: 1;&quot;&gt;&lt;path class=&quot;path&quot; d=&quot;M148.03125,156L148.03125,181L148.03125,206&quot; marker-end=&quot;url(#arrowhead913)&quot; style=&quot;fill:none&quot;&gt;&lt;/path&gt;&lt;defs&gt;&lt;marker id=&quot;arrowhead913&quot; viewBox=&quot;0 0 10 10&quot; refX=&quot;9&quot; refY=&quot;5&quot; markerUnits=&quot;strokeWidth&quot; markerWidth=&quot;8&quot; markerHeight=&quot;6&quot; orient=&quot;auto&quot;&gt;&lt;path d=&quot;M 0 0 L 10 5 L 0 10 z&quot; class=&quot;arrowheadPath&quot; style=&quot;stroke-width: 1px; stroke-dasharray: 1px, 0px;&quot;&gt;&lt;/path&gt;&lt;/marker&gt;&lt;/defs&gt;&lt;/g&gt;&lt;g class=&quot;edgePath&quot; style=&quot;opacity: 1;&quot;&gt;&lt;path class=&quot;path&quot; d=&quot;M112.65305779569893,249L71.515625,274L71.515625,299&quot; marker-end=&quot;url(#arrowhead914)&quot; style=&quot;fill:none&quot;&gt;&lt;/path&gt;&lt;defs&gt;&lt;marker id=&quot;arrowhead914&quot; viewBox=&quot;0 0 10 10&quot; refX=&quot;9&quot; refY=&quot;5&quot; markerUnits=&quot;strokeWidth&quot; markerWidth=&quot;8&quot; markerHeight=&quot;6&quot; orient=&quot;auto&quot;&gt;&lt;path d=&quot;M 0 0 L 10 5 L 0 10 z&quot; class=&quot;arrowheadPath&quot; style=&quot;stroke-width: 1px; stroke-dasharray: 1px, 0px;&quot;&gt;&lt;/path&gt;&lt;/marker&gt;&lt;/defs&gt;&lt;/g&gt;&lt;g class=&quot;edgePath&quot; style=&quot;opacity: 1;&quot;&gt;&lt;path class=&quot;path&quot; d=&quot;M183.40944220430106,249L224.546875,274L224.546875,299&quot; marker-end=&quot;url(#arrowhead915)&quot; style=&quot;fill:none&quot;&gt;&lt;/path&gt;&lt;defs&gt;&lt;marker id=&quot;arrowhead915&quot; viewBox=&quot;0 0 10 10&quot; refX=&quot;9&quot; refY=&quot;5&quot; markerUnits=&quot;strokeWidth&quot; markerWidth=&quot;8&quot; markerHeight=&quot;6&quot; orient=&quot;auto&quot;&gt;&lt;path d=&quot;M 0 0 L 10 5 L 0 10 z&quot; class=&quot;arrowheadPath&quot; style=&quot;stroke-width: 1px; stroke-dasharray: 1px, 0px;&quot;&gt;&lt;/path&gt;&lt;/marker&gt;&lt;/defs&gt;&lt;/g&gt;&lt;g class=&quot;edgePath&quot; style=&quot;opacity: 1;&quot;&gt;&lt;path class=&quot;path&quot; d=&quot;M71.515625,342L71.515625,367L71.515625,392&quot; marker-end=&quot;url(#arrowhead916)&quot; style=&quot;fill:none&quot;&gt;&lt;/path&gt;&lt;defs&gt;&lt;marker id=&quot;arrowhead916&quot; viewBox=&quot;0 0 10 10&quot; refX=&quot;9&quot; refY=&quot;5&quot; markerUnits=&quot;strokeWidth&quot; markerWidth=&quot;8&quot; markerHeight=&quot;6&quot; orient=&quot;auto&quot;&gt;&lt;path d=&quot;M 0 0 L 10 5 L 0 10 z&quot; class=&quot;arrowheadPath&quot; style=&quot;stroke-width: 1px; stroke-dasharray: 1px, 0px;&quot;&gt;&lt;/path&gt;&lt;/marker&gt;&lt;/defs&gt;&lt;/g&gt;&lt;g class=&quot;edgePath&quot; style=&quot;opacity: 1;&quot;&gt;&lt;path class=&quot;path&quot; d=&quot;M224.546875,342L224.546875,367L224.546875,392&quot; marker-end=&quot;url(#arrowhead917)&quot; style=&quot;fill:none&quot;&gt;&lt;/path&gt;&lt;defs&gt;&lt;marker id=&quot;arrowhead917&quot; viewBox=&quot;0 0 10 10&quot; refX=&quot;9&quot; refY=&quot;5&quot; markerUnits=&quot;strokeWidth&quot; markerWidth=&quot;8&quot; markerHeight=&quot;6&quot; orient=&quot;auto&quot;&gt;&lt;path d=&quot;M 0 0 L 10 5 L 0 10 z&quot; class=&quot;arrowheadPath&quot; style=&quot;stroke-width: 1px; stroke-dasharray: 1px, 0px;&quot;&gt;&lt;/path&gt;&lt;/marker&gt;&lt;/defs&gt;&lt;/g&gt;&lt;/g&gt;&lt;g class=&quot;edgeLabels&quot;&gt;&lt;g class=&quot;edgeLabel&quot; transform=&quot;&quot; style=&quot;opacity: 1;&quot;&gt;&lt;g transform=&quot;translate(0,0)&quot; class=&quot;label&quot;&gt;&lt;foreignObject width=&quot;0&quot; height=&quot;0&quot;&gt;&lt;div xmlns=&quot;http://www.w3.org/1999/xhtml&quot; style=&quot;display: inline-block; white-space: nowrap;&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;/foreignObject&gt;&lt;/g&gt;&lt;/g&gt;&lt;g class=&quot;edgeLabel&quot; transform=&quot;&quot; style=&quot;opacity: 1;&quot;&gt;&lt;g transform=&quot;translate(0,0)&quot; class=&quot;label&quot;&gt;&lt;foreignObject width=&quot;0&quot; height=&quot;0&quot;&gt;&lt;div xmlns=&quot;http://www.w3.org/1999/xhtml&quot; style=&quot;display: inline-block; white-space: nowrap;&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;/foreignObject&gt;&lt;/g&gt;&lt;/g&gt;&lt;g class=&quot;edgeLabel&quot; transform=&quot;&quot; style=&quot;opacity: 1;&quot;&gt;&lt;g transform=&quot;translate(0,0)&quot; class=&quot;label&quot;&gt;&lt;foreignObject width=&quot;0&quot; height=&quot;0&quot;&gt;&lt;div xmlns=&quot;http://www.w3.org/1999/xhtml&quot; style=&quot;display: inline-block; white-space: nowrap;&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;/foreignObject&gt;&lt;/g&gt;&lt;/g&gt;&lt;g class=&quot;edgeLabel&quot; transform=&quot;&quot; style=&quot;opacity: 1;&quot;&gt;&lt;g transform=&quot;translate(0,0)&quot; class=&quot;label&quot;&gt;&lt;foreignObject width=&quot;0&quot; height=&quot;0&quot;&gt;&lt;div xmlns=&quot;http://www.w3.org/1999/xhtml&quot; style=&quot;display: inline-block; white-space: nowrap;&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;/foreignObject&gt;&lt;/g&gt;&lt;/g&gt;&lt;g class=&quot;edgeLabel&quot; transform=&quot;&quot; style=&quot;opacity: 1;&quot;&gt;&lt;g transform=&quot;translate(0,0)&quot; class=&quot;label&quot;&gt;&lt;foreignObject width=&quot;0&quot; height=&quot;0&quot;&gt;&lt;div xmlns=&quot;http://www.w3.org/1999/xhtml&quot; style=&quot;display: inline-block; white-space: nowrap;&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;/foreignObject&gt;&lt;/g&gt;&lt;/g&gt;&lt;g class=&quot;edgeLabel&quot; transform=&quot;&quot; style=&quot;opacity: 1;&quot;&gt;&lt;g transform=&quot;translate(0,0)&quot; class=&quot;label&quot;&gt;&lt;foreignObject width=&quot;0&quot; height=&quot;0&quot;&gt;&lt;div xmlns=&quot;http://www.w3.org/1999/xhtml&quot; style=&quot;display: inline-block; white-space: nowrap;&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;/foreignObject&gt;&lt;/g&gt;&lt;/g&gt;&lt;/g&gt;&lt;g class=&quot;nodes&quot;&gt;&lt;g class=&quot;node&quot; id=&quot;A&quot; transform=&quot;translate(148.03125,41.5)&quot; style=&quot;opacity: 1;&quot;&gt;&lt;rect rx=&quot;0&quot; ry=&quot;0&quot; x=&quot;-56.2109375&quot; y=&quot;-21.5&quot; width=&quot;112.421875&quot; height=&quot;43&quot;&gt;&lt;/rect&gt;&lt;g class=&quot;label&quot; transform=&quot;translate(0,0)&quot;&gt;&lt;g transform=&quot;translate(-46.2109375,-11.5)&quot;&gt;&lt;foreignObject width=&quot;92.421875&quot; height=&quot;23&quot;&gt;&lt;div xmlns=&quot;http://www.w3.org/1999/xhtml&quot; style=&quot;display: inline-block; white-space: nowrap;&quot;&gt;MaterialApp&lt;/div&gt;&lt;/foreignObject&gt;&lt;/g&gt;&lt;/g&gt;&lt;/g&gt;&lt;g class=&quot;node&quot; id=&quot;B&quot; transform=&quot;translate(148.03125,134.5)&quot; style=&quot;opacity: 1;&quot;&gt;&lt;rect rx=&quot;0&quot; ry=&quot;0&quot; x=&quot;-26.8046875&quot; y=&quot;-21.5&quot; width=&quot;53.609375&quot; height=&quot;43&quot;&gt;&lt;/rect&gt;&lt;g class=&quot;label&quot; transform=&quot;translate(0,0)&quot;&gt;&lt;g transform=&quot;translate(-16.8046875,-11.5)&quot;&gt;&lt;foreignObject width=&quot;33.609375&quot; height=&quot;23&quot;&gt;&lt;div xmlns=&quot;http://www.w3.org/1999/xhtml&quot; style=&quot;display: inline-block; white-space: nowrap;&quot;&gt;Home&lt;/div&gt;&lt;/foreignObject&gt;&lt;/g&gt;&lt;/g&gt;&lt;/g&gt;&lt;g class=&quot;node&quot; id=&quot;C&quot; transform=&quot;translate(148.03125,227.5)&quot; style=&quot;opacity: 1;&quot;&gt;&lt;rect rx=&quot;0&quot; ry=&quot;0&quot; x=&quot;-43.609375&quot; y=&quot;-21.5&quot; width=&quot;87.21875&quot; height=&quot;43&quot;&gt;&lt;/rect&gt;&lt;g class=&quot;label&quot; transform=&quot;translate(0,0)&quot;&gt;&lt;g transform=&quot;translate(-33.609375,-11.5)&quot;&gt;&lt;foreignObject width=&quot;67.21875&quot; height=&quot;23&quot;&gt;&lt;div xmlns=&quot;http://www.w3.org/1999/xhtml&quot; style=&quot;display: inline-block; white-space: nowrap;&quot;&gt;Scaffold&lt;/div&gt;&lt;/foreignObject&gt;&lt;/g&gt;&lt;/g&gt;&lt;/g&gt;&lt;g class=&quot;node&quot; id=&quot;D&quot; transform=&quot;translate(71.515625,320.5)&quot; style=&quot;opacity: 1;&quot;&gt;&lt;rect rx=&quot;0&quot; ry=&quot;0&quot; x=&quot;-35.2109375&quot; y=&quot;-21.5&quot; width=&quot;70.421875&quot; height=&quot;43&quot;&gt;&lt;/rect&gt;&lt;g class=&quot;label&quot; transform=&quot;translate(0,0)&quot;&gt;&lt;g transform=&quot;translate(-25.2109375,-11.5)&quot;&gt;&lt;foreignObject width=&quot;50.421875&quot; height=&quot;23&quot;&gt;&lt;div xmlns=&quot;http://www.w3.org/1999/xhtml&quot; style=&quot;display: inline-block; white-space: nowrap;&quot;&gt;AppBar&lt;/div&gt;&lt;/foreignObject&gt;&lt;/g&gt;&lt;/g&gt;&lt;/g&gt;&lt;g class=&quot;node&quot; id=&quot;E&quot; transform=&quot;translate(224.546875,320.5)&quot; style=&quot;opacity: 1;&quot;&gt;&lt;rect rx=&quot;0&quot; ry=&quot;0&quot; x=&quot;-26.8046875&quot; y=&quot;-21.5&quot; width=&quot;53.609375&quot; height=&quot;43&quot;&gt;&lt;/rect&gt;&lt;g class=&quot;label&quot; transform=&quot;translate(0,0)&quot;&gt;&lt;g transform=&quot;translate(-16.8046875,-11.5)&quot;&gt;&lt;foreignObject width=&quot;33.609375&quot; height=&quot;23&quot;&gt;&lt;div xmlns=&quot;http://www.w3.org/1999/xhtml&quot; style=&quot;display: inline-block; white-space: nowrap;&quot;&gt;Body&lt;/div&gt;&lt;/foreignObject&gt;&lt;/g&gt;&lt;/g&gt;&lt;/g&gt;&lt;g class=&quot;node&quot; id=&quot;F&quot; transform=&quot;translate(71.515625,413.5)&quot; style=&quot;opacity: 1;&quot;&gt;&lt;rect rx=&quot;0&quot; ry=&quot;0&quot; x=&quot;-51.515625&quot; y=&quot;-21.5&quot; width=&quot;103.03125&quot; height=&quot;43&quot;&gt;&lt;/rect&gt;&lt;g class=&quot;label&quot; transform=&quot;translate(0,0)&quot;&gt;&lt;g transform=&quot;translate(-41.515625,-11.5)&quot;&gt;&lt;foreignObject width=&quot;83.03125&quot; height=&quot;23&quot;&gt;&lt;div xmlns=&quot;http://www.w3.org/1999/xhtml&quot; style=&quot;display: inline-block; white-space: nowrap;&quot;&gt;Text - 제목&lt;/div&gt;&lt;/foreignObject&gt;&lt;/g&gt;&lt;/g&gt;&lt;/g&gt;&lt;g class=&quot;node&quot; id=&quot;G&quot; transform=&quot;translate(224.546875,413.5)&quot; style=&quot;opacity: 1;&quot;&gt;&lt;rect rx=&quot;0&quot; ry=&quot;0&quot; x=&quot;-51.515625&quot; y=&quot;-21.5&quot; width=&quot;103.03125&quot; height=&quot;43&quot;&gt;&lt;/rect&gt;&lt;g class=&quot;label&quot; transform=&quot;translate(0,0)&quot;&gt;&lt;g transform=&quot;translate(-41.515625,-11.5)&quot;&gt;&lt;foreignObject width=&quot;83.03125&quot; height=&quot;23&quot;&gt;&lt;div xmlns=&quot;http://www.w3.org/1999/xhtml&quot; style=&quot;display: inline-block; white-space: nowrap;&quot;&gt;Text - 내용&lt;/div&gt;&lt;/foreignObject&gt;&lt;/g&gt;&lt;/g&gt;&lt;/g&gt;&lt;/g&gt;&lt;/g&gt;&lt;/g&gt;&lt;/svg&gt;&lt;/div&gt;&lt;p&gt;그림을 보면 머터리얼앱이 꼭대기에 있고, 텍스트들이 가장 밑에 있죠. &lt;/p&gt;
&lt;p&gt;지금은 텍스트 위젯을 몇개 안 더했지만, 필요에 따라 얼마든지 위젯을 더해줄 수 있습니다. &lt;/p&gt;
&lt;p&gt;위젯을 간단히 정리해볼께요.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;위젯 = UI를 만드는 기본 단위&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;위젯 = 안에서 밖으로 하나씩 더해준다. &lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;위젯이 하는 일은 꼭 기억하도록 합시다!&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h4&gt;&lt;a name=&quot;header-n343&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;2.1. 머터리얼앱, 스캐폴드는 어디에 쓸까&lt;/h4&gt;&lt;p&gt;바로 텍스트 위젯을 쓰면 편할텐데 머터리얼앱이랑 스캐폴드로 감싸고 있죠. &lt;/p&gt;
&lt;p&gt;둘 다 구글 머터리얼 디자인을 쓰기 위해서 필요합니다. &lt;/p&gt;&lt;ul&gt;&lt;li&gt;머터리얼앱 (MaterialApp) - 구글 머터리얼 디자인을 쓰겠단 뜻이에요. 전체 앱의 테마, 색깔등을 정할 수 있습니다. &lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;스캐폴드 (Scaffold) - 기본적인 머터리얼 디자인 구조를 잡아줍니다. 뼈대라고 보시면 되요. &lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h4&gt;&lt;a name=&quot;header-n366&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;2.2. 다른 위젯 넣어보기 - 아이콘(Icon)&lt;/h4&gt;&lt;p&gt;Text 위젯 대신에 다른 위젯을 써보도록 해요. &lt;/p&gt;
&lt;p&gt;&lt;em&gt;Icon()&lt;/em&gt; 위젯을 써보도록 할께요.&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;body : Icon(Icons.send, color: Colors.blueAccent) // 원하는 아이콘을 지정, 색도 바꿀 수 있습니다.&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 22px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 22px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;아이콘이 화면이 뜨네요! &lt;/p&gt;
&lt;p&gt;플러터는 여러 아이콘들을 기본적으로 갖고 있어서 빠르게 앱을 만들때 좋습니다. &lt;/p&gt;&lt;h4&gt;&lt;a name=&quot;header-n391&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;2.3. 다른 위젯 넣어보기 - 이미지(Image)&lt;/h4&gt;&lt;p&gt;아이콘 대신 이미지를 보여주는 위젯을 써보도록 할께요.&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;dart&quot; style=&quot;page-break-inside: unset;&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;dart&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;main&lt;/span&gt;() &lt;span class=&quot;cm-operator&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;runApp&lt;/span&gt;(&lt;span class=&quot;cm-keyword&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;MyApp&lt;/span&gt;());&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;MyApp&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;extends&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;StatelessWidget&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-meta&quot;&gt;@override&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;Widget&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;build&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;BuildContext&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;context&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;imageUrl&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-string&quot;&gt;&quot;https://images.pexels.com/photos/912110/pexels-photo-912110.jpeg?auto=compress&amp;amp;cs=tinysrgb&amp;amp;dpr=2&amp;amp;h=650&amp;amp;w=940&quot;&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;MaterialApp&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;title&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;'플러터 앱'&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;debugShowCheckedModeBanner&lt;/span&gt;: &lt;span class=&quot;cm-atom&quot;&gt;false&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;home&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;Scaffold&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;appBar&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;AppBar&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;title&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;Text&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;&quot;앱 타이틀&quot;&lt;/span&gt;)),&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;body&lt;/span&gt; : &lt;span class=&quot;cm-variable&quot;&gt;Image&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;network&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;imageUrl&lt;/span&gt;) &lt;span class=&quot;cm-comment&quot;&gt;// 이미지 보여주기 &lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;  ),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  );&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 396px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 396px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;(이미지 출처 : &lt;a href=&quot;https://images.pexels.com/&quot; target=&quot;_blank&quot; class=&quot;url&quot;&gt;https://images.pexels.com/&lt;/a&gt; , 라이센스 없는 이미지)&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/13621579/47952670-46394380-dfb6-11e8-994f-83cd25f40612.png&quot; alt=&quot;alt text&quot; referrerpolicy=&quot;no-referrer&quot;&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;웹상에서 이미지를 받아서 보여주고 있습니다. &lt;/p&gt;
&lt;p&gt;&lt;em&gt;Image.network()&lt;/em&gt; 에서 이미지 처리를 하고 있네요. &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h4&gt;&lt;a name=&quot;header-n476&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;2.4. 여러 위젯 같이 써보기&lt;/h4&gt;&lt;p&gt;위젯 안에 여러 위젯을 넣을 수도 있습니다. &lt;/p&gt;
&lt;p&gt;어떤 위젯 안에 넣느냐에 따라 가로로 놓이기도 하고, 세로로 놓이기도 합니다. &lt;/p&gt;&lt;h5&gt;&lt;a name=&quot;header-n413&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;Column - 세로로 위젯 추가하기 &lt;/h5&gt;&lt;p&gt;Column 위젯을 쓰면 안에 있는 위젯이 세로로 배치됩니다.&lt;/p&gt;
&lt;p&gt;칼럼 위젯을 바깥에 두고, 그 안에 텍스트, 아이콘 위젯을 넣었습니다. &lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;dart&quot; style=&quot;page-break-inside: unset;&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;dart&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;x&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;MyApp&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;extends&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;StatelessWidget&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-meta&quot;&gt;@override&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;Widget&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;build&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;BuildContext&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;context&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;MaterialApp&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;title&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;'플러터 앱'&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;debugShowCheckedModeBanner&lt;/span&gt;: &lt;span class=&quot;cm-atom&quot;&gt;false&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;home&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;Scaffold&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;appBar&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;AppBar&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;title&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;Text&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;&quot;앱 타이틀&quot;&lt;/span&gt;)),&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;body&lt;/span&gt; : &lt;span class=&quot;cm-variable&quot;&gt;Column&lt;/span&gt;( &lt;span class=&quot;cm-comment&quot;&gt;// 위젯을 세로로 배치.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;children&lt;/span&gt;: &lt;span class=&quot;cm-operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-variable&quot;&gt;Widget&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;gt;&lt;/span&gt;[&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;Text&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;&quot;나의 첫 플러터 앱&quot;&lt;/span&gt;),&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;Text&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;&quot;이제 앱 개발 해보자&quot;&lt;/span&gt;),&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;Icon&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;Icons&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;videocam&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;color&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;Colors&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;amber&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;  ],&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;  )&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;  ),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  );&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 418px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 418px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;h3&gt;&lt;a name=&quot;header-n4&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt; &lt;/h3&gt;&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/13621579/47952672-4afdf780-dfb6-11e8-9336-375744149a3f.png&quot; alt=&quot;alt text&quot; referrerpolicy=&quot;no-referrer&quot;&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;텍스트, 텍스트, 위젯 세로 순으로 나오네요. &lt;/p&gt;
&lt;p&gt;가로로도 위젯을 배치해보죠.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h5&gt;&lt;a name=&quot;header-n444&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;Row - 가로로 위젯 보여주기&lt;/h5&gt;&lt;p&gt;Column이 있던 부분을 Row로 바꿔줍시다!&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;dart&quot; style=&quot;page-break-inside: unset;&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;dart&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;x&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;import&lt;/span&gt; &lt;span class=&quot;cm-string&quot;&gt;'package:flutter/material.dart'&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;main&lt;/span&gt;() &lt;span class=&quot;cm-operator&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;runApp&lt;/span&gt;(&lt;span class=&quot;cm-keyword&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;MyApp&lt;/span&gt;());&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;MyApp&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;extends&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;StatelessWidget&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-meta&quot;&gt;@override&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;Widget&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;build&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;BuildContext&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;context&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;MaterialApp&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;title&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;'플러터 앱'&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;debugShowCheckedModeBanner&lt;/span&gt;: &lt;span class=&quot;cm-atom&quot;&gt;false&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;home&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;Scaffold&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;appBar&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;AppBar&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;title&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;Text&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;&quot;앱 타이틀&quot;&lt;/span&gt;)),&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;body&lt;/span&gt; : &lt;span class=&quot;cm-variable&quot;&gt;Row&lt;/span&gt; (&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;mainAxisAlignment&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;MainAxisAlignment&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;spaceAround&lt;/span&gt;, &lt;span class=&quot;cm-comment&quot;&gt;// 주 방향(여기서는 Row니 가로입니다)으로 어떻게 위젯을 배열할지 정합니다. MainAxisAlignment.spaceAround는 위젯의 간격이 서로 일정하게 벌려주는 걸 말합니다.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;children&lt;/span&gt;: &lt;span class=&quot;cm-operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-variable&quot;&gt;Widget&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;gt;&lt;/span&gt;[&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;Text&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;&quot;나의 첫 플러터 앱&quot;&lt;/span&gt;),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;Text&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;&quot;이제 앱 개발 해보자&quot;&lt;/span&gt;),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;Icon&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;Icons&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;videocam&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;color&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;Colors&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;amber&lt;/span&gt;),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;  ],&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;  )&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;  ),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  );&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 572px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 572px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Column에서 Row로 바꾸니 바로 위젯의 위치가 바뀌었네요.&lt;/p&gt;
&lt;p&gt;이처럼 플러터에서는 어떤 위젯을 쓰느냐에 따라 다른 결과가 나옵니다. &lt;/p&gt;
&lt;p&gt;위젯들의 차이를 아는 게  플러터를 잘 배우는 지름길이에요.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h3&gt;&lt;a name=&quot;header-n483&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;3.  상태 변경 없는 위젯(statelessWidget) vs 상태 변경 있는 위젯(staefuleWidget)&lt;/h3&gt;&lt;p&gt;여태까지 위젯은 단순히 글자나 그림을 보여주고 끝났습니다. 버튼을 누르거나 텍스트를 수정할 일은 없었죠. &lt;/p&gt;
&lt;p&gt;한번 버튼을 써보도록 할까요?&lt;/p&gt;
&lt;p&gt;버튼을 누르면 텍스트 위젯의 값이 바뀌도록 하는 코드를 작성해보겠습니다. &lt;/p&gt;
&lt;p&gt;&lt;em&gt;RaisedButton()&lt;/em&gt; 이 버튼을 만들 때 쓰입니다. &lt;/p&gt;&lt;h5&gt;&lt;a name=&quot;header-n548&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;3.1 Stateless 위젯에 버튼 넣어보기&lt;/h5&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;dart&quot; style=&quot;page-break-inside: unset;&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;dart&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;x&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;MyApp&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;extends&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;StatelessWidget&lt;/span&gt; { &lt;span class=&quot;cm-comment&quot;&gt;// 상태 변경이 없는 위젯. 한번 UI가 그려지면 그대로 있음.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;counter&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;0&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;increaseCounter&lt;/span&gt;() {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;counter&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;++&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-meta&quot;&gt;@override&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;Widget&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;build&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;BuildContext&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;context&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;MaterialApp&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;title&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;&quot;첫 플러터 앱&quot;&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;home&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;Scaffold&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;appBar&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;AppBar&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;title&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;Text&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;&quot;내 플러터 앱&quot;&lt;/span&gt;),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;  ),&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;body&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;Container&lt;/span&gt;( &lt;span class=&quot;cm-comment&quot;&gt;// 컨테이너에 넣어서 마진이나 패딩을 주도록 함&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;child&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;Column&lt;/span&gt;( &lt;span class=&quot;cm-comment&quot;&gt;// 세로로 위젯들을 배열&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;children&lt;/span&gt;: &lt;span class=&quot;cm-operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-variable&quot;&gt;Widget&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;gt;&lt;/span&gt;[&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;Text&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;&quot;&lt;/span&gt;$&lt;span class=&quot;cm-variable&quot;&gt;counter&lt;/span&gt;&lt;span class=&quot;cm-string&quot;&gt;&quot;&lt;/span&gt;),&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;RaisedButton&lt;/span&gt;( &lt;span class=&quot;cm-comment&quot;&gt;// 버튼 위젯&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;child&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;Text&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-string&quot;&gt;&quot;Add &lt;/span&gt;$&lt;span class=&quot;cm-variable&quot;&gt;counter&lt;/span&gt;&lt;span class=&quot;cm-string&quot;&gt;&quot;&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;style&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;TextStyle&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;color&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;Colors&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;white&lt;/span&gt;), &lt;span class=&quot;cm-comment&quot;&gt;// 텍스트의 색은 하얀색으로.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;  ),&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;color&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;Colors&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;red&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;onPressed&lt;/span&gt;: () { &lt;span class=&quot;cm-comment&quot;&gt;// 클릭할 때마다 counter변수가 변하도록 한다. &lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;increaseCounter&lt;/span&gt;();&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;  },&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;  ),&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;  ],&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;  ),&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;  ),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;  ),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  );&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 792px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 792px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;아무리 버튼을 눌러도 바뀌는 게 없죠?&lt;/p&gt;
&lt;p&gt;&lt;em&gt;StatelessWidget&lt;/em&gt; 을 써서 위젯이 바뀌지 않는 거에요.&lt;/p&gt;
&lt;p&gt;위젯이 변하는 경우에는 &lt;em&gt;StatefulWidget&lt;/em&gt; 을 써야합니다. &lt;/p&gt;
&lt;p&gt;위젯이 변하는 경우는 텍스트를 수정하거나, 버튼을 누르거나, 리스트 뷰를 업데이트 하거나 하는 등 다양한 경우가 있어요. &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;플러터는 위젯의 변화를 스테이트(State)를 통해서 확인합니다. 스테이트가 변하면 위젯이 바뀌었는지 보고, UI를 업데이트 합니다. &lt;/p&gt;&lt;h6&gt;&lt;a name=&quot;header-n545&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;3.2. Stateful 위젯 만들어보기&lt;/h6&gt;&lt;p&gt;스테이트풀 위젯은 2개로 나뉘어요. 스테이트랑 위젯 부분인데요. &lt;/p&gt;
&lt;p&gt;실제 UI를 그리는 코드는 스테이트쪽에 있습니다. &lt;/p&gt;
&lt;p&gt;기존의 StatelessWidget과 유사하지만, 스테이트랑 위젯을 나눠서 변화하는 부분을 따로 관리하는 게 특징입니다. &lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;&amp;nbsp;dart&quot; style=&quot;page-break-inside: unset;&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;&amp;nbsp;dart&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;MyApp&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;extends&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;StatefulWidget&lt;/span&gt; { &lt;span class=&quot;cm-comment&quot;&gt;// 위젯 부분, 스테이트를 다루는 부분은 분리되어 있다. &lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-meta&quot;&gt;@override&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;_MyAppState&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;createState&lt;/span&gt;() &lt;span class=&quot;cm-operator&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;_MyAppState&lt;/span&gt;();&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;_MyAppState&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;extends&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;State&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-variable&quot;&gt;MyApp&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;gt;&lt;/span&gt; { &lt;span class=&quot;cm-comment&quot;&gt;// 스테이트를 관리하고, UI를 그리는 부분. &lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-meta&quot;&gt;@override&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;Widget&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;build&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;BuildContext&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;context&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;MaterialApp&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;title&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;&quot;첫 Stateful App&quot;&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;home&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;Scaffold&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;appBar&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;AppBar&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;title&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;Text&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;&quot;내 Stateful Widget&quot;&lt;/span&gt;),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;  ),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;body&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;Container&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;child&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;Text&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;&quot;Stateful Widget&quot;&lt;/span&gt;),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;  ),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;  ),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  );&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  }&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 462px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 462px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;대략적인 구조를 파악했으니 버튼을 추가해보겠습니다.&lt;/p&gt;&lt;h5&gt;&lt;a name=&quot;header-n568&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;예시 - 버튼을 통한 텍스트 변경&lt;/h5&gt;&lt;p&gt;버튼을 누를 때마다 텍스트가 바뀌는 앱을 만들어볼께요. &lt;/p&gt;
&lt;p&gt;&lt;em&gt;Text&lt;/em&gt; 하나와 &lt;em&gt;RaiseButton&lt;/em&gt; 두개가 들어갑니다. &lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;dart&quot; style=&quot;page-break-inside: unset;&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;dart&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;x&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;MyApp&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;extends&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;StatefulWidget&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-meta&quot;&gt;@override&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;_MyAppState&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;createState&lt;/span&gt;() &lt;span class=&quot;cm-operator&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;_MyAppState&lt;/span&gt;();&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;_MyAppState&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;extends&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;State&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-variable&quot;&gt;MyApp&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;gt;&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;counter&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;0&lt;/span&gt;; &lt;span class=&quot;cm-comment&quot;&gt;// Text UI에 표시될 값&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;increaseCounter&lt;/span&gt;() { &lt;span class=&quot;cm-comment&quot;&gt;// 버튼을 누르면 counter 값을 증가시킴&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;setState&lt;/span&gt;(() {&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;counter&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;++&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  });&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;decreaseCounter&lt;/span&gt;() { &lt;span class=&quot;cm-comment&quot;&gt;// 버튼을 누르면 counter 값을 감소시킴&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;setState&lt;/span&gt;(() {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;counter&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;--&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  });&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-meta&quot;&gt;@override&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;Widget&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;build&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;BuildContext&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;context&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;MaterialApp&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;title&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;&quot;첫 플러터 앱&quot;&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;home&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;Scaffold&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;appBar&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;AppBar&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;title&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;Text&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;&quot;내 플러터 앱&quot;&lt;/span&gt;),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;  ),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;body&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;Container&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;padding&lt;/span&gt;: &lt;span class=&quot;cm-keyword&quot;&gt;const&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;EdgeInsets&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;all&lt;/span&gt;(&lt;span class=&quot;cm-number&quot;&gt;16.0&lt;/span&gt;), &lt;span class=&quot;cm-comment&quot;&gt;// 전체적으로 16씩 패딩을 주었음.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;child&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;Column&lt;/span&gt;( &lt;span class=&quot;cm-comment&quot;&gt;// 세로로 위젯을 배치 &lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;children&lt;/span&gt;: &lt;span class=&quot;cm-operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-variable&quot;&gt;Widget&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;gt;&lt;/span&gt;[&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;Text&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-string&quot;&gt;&quot;&lt;/span&gt;$&lt;span class=&quot;cm-variable&quot;&gt;counter&lt;/span&gt;&lt;span class=&quot;cm-string&quot;&gt;&quot;&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;style&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;TextStyle&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;fontSize&lt;/span&gt;: &lt;span class=&quot;cm-number&quot;&gt;160.0&lt;/span&gt;),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;  ),&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;Row&lt;/span&gt;( &lt;span class=&quot;cm-comment&quot;&gt;// 가로로 위젯을 배치, 안에 버튼 2개가 들어가 있음. &lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;mainAxisAlignment&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;MainAxisAlignment&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;spaceEvenly&lt;/span&gt;, &lt;span class=&quot;cm-comment&quot;&gt;// 위젯끼리 같은 공간만큼 띄움&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;children&lt;/span&gt;: &lt;span class=&quot;cm-operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-variable&quot;&gt;Widget&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;gt;&lt;/span&gt;[&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;RaisedButton&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;child&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;Text&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-string&quot;&gt;&quot;Add&quot;&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;style&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;TextStyle&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;color&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;Colors&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;white&lt;/span&gt;),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;  ),&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;color&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;Colors&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;red&lt;/span&gt;, &lt;span class=&quot;cm-comment&quot;&gt;// 버튼 색은 빨강색으로&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;onPressed&lt;/span&gt;: () { &lt;span class=&quot;cm-comment&quot;&gt;// 버튼을 누르면 안에 있는 함수를 실행&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;increaseCounter&lt;/span&gt;();&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;  },&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;  ),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;RaisedButton&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;child&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;Text&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-string&quot;&gt;&quot;Subtract&quot;&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;style&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;TextStyle&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;color&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;Colors&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;white&lt;/span&gt;),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;  ),&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;color&lt;/span&gt;: &lt;span class=&quot;cm-variable&quot;&gt;Colors&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;blue&lt;/span&gt;, &lt;span class=&quot;cm-comment&quot;&gt;// 버튼 색은 파란색으로&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;onPressed&lt;/span&gt;: () { &lt;span class=&quot;cm-comment&quot;&gt;// 버튼을 누르면 안에 있는 함수를 실행&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;decreaseCounter&lt;/span&gt;();&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;  },&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;  ),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;  ],&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;  )&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;  ],&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;  ),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;  ),&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;  ),&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  );&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  }&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 1496px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 1496px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt; &lt;/p&gt;
&lt;p&gt;실행을 하면 아래와 같이 나옵니다. &lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/13621579/47961627-fe67fa00-e051-11e8-999a-5ccccccd5cd4.png&quot; alt=&quot;alt text&quot; referrerpolicy=&quot;no-referrer&quot;&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Add버튼과 Subtract 버튼을 눌러보세요.&lt;/p&gt;
&lt;p&gt;Text 값이 변합니다. &lt;/p&gt;
&lt;p&gt;이처럼 위젯의 값이 바뀌는 경우는 꼭 &lt;em&gt;StatefulWidget&lt;/em&gt; 을 써줘야합니다. &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h3&gt;&lt;a name=&quot;header-n609&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;마무리&lt;/h3&gt;&lt;p&gt;오늘은 기초 플러터 앱 만드는 법을 알아보았습니다. &lt;/p&gt;
&lt;p&gt;시작인만큼 조급해 하지말고 차근차근 기능을 더하다보면 &lt;/p&gt;
&lt;p&gt;더 유용한 앱도 만들 수 있습니다. &lt;/p&gt;
&lt;p&gt;다음에는 레이아웃에 대해 알아보도록 할께요.&lt;/p&gt;&lt;/div&gt;</description>
      <category>플러터(Flutter)</category>
      <category>Flutter</category>
      <category>flutter tutorial</category>
      <category>flutter vs react native</category>
      <category>stateful widget</category>
      <category>stateless widget</category>
      <category>구글 플러터</category>
      <category>리액트 네이티브 vs 플러터</category>
      <category>플러터</category>
      <category>플러터 vs 리액티브 네이티브</category>
      <category>플러터 레이아웃</category>
      <category>플러터 튜토리얼</category>
      <category>플루터</category>
      <author>에드 신</author>
      <guid isPermaLink="true">https://software-creator.tistory.com/10</guid>
      <comments>https://software-creator.tistory.com/10#entry10comment</comments>
      <pubDate>Sun, 4 Nov 2018 17:06:45 +0900</pubDate>
    </item>
    <item>
      <title>Flutter - 스트림. 다트에서 비동기 프로그래밍</title>
      <link>https://software-creator.tistory.com/9</link>
      <description>&lt;meta charset=&quot;UTF-8&quot;&gt;&lt;meta name=&quot;viewport&quot; content=&quot;width=device-width initial-scale=1&quot;&gt;
&lt;title&gt;Flutter - 스트림. 다트에서 비동기 프로그래밍&lt;/title&gt;&lt;link href=&quot;https://fonts.loli.net/css?family=Open+Sans:400italic,700italic,700,400&amp;amp;subset=latin,latin-ext&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot;&gt;&lt;style type=&quot;text/css&quot;&gt;html {overflow-x: initial !important;}:root { --node-fill:  #ECECFF; --node-border:  #CCCCFF; --note-fill:  #fff5ad; --note-border:  #aaaa33; --cluster-fill:  #ffffde  !important; --cluster-border:  #aaaa33  !important; }
.mermaid .label { color: var(--text-color); }
.node rect, .node circle, .node ellipse, .node polygon { fill: var(--node-fill); stroke: var(--node-border); stroke-width: 1px; }
.edgePath .path { stroke: var(--text-color); }
.edgeLabel { background-color: var(--bg-color); }
.cluster rect { fill: rgb(255, 255, 222) !important; rx: 4px !important; stroke: rgb(170, 170, 51) !important; stroke-width: 1px !important; }
.cluster text { fill: var(--text-color); }
.actor { stroke: var(--node-border); fill: var(--node-fill); }
text.actor { fill: var(--text-color); stroke: none; }
.actor-line { stroke: grey; }
.messageLine0 { stroke-width: 1.5px; stroke: var(--text-color); }
.messageLine1 { stroke-width: 1.5px; stroke: var(--text-color); }
#arrowhead { fill: var(--text-color); }
#crosshead path { fill: var(--text-color)  !important; stroke: var(--text-color)  !important; }
.messageText { fill: var(--text-color); stroke: none; }
.labelBox { stroke: var(--node-border); fill: var(--node-fill); }
.labelText { fill: var(--text-color); stroke: none; }
.loopText { fill: var(--text-color); stroke: none; }
.loopLine { stroke-width: 2px; stroke: var(--node-border); }
.note { stroke: var(--note-border); fill: var(--note-fill); }
.noteText { fill: var(--text-color); stroke: none; font-size: 14px; }
.section { stroke: none; opacity: 0.2; }
.section0 { fill: rgba(102, 102, 255, 0.490196); }
.section2 { fill: rgb(255, 244, 0); }
.section1, .section3 { fill: white; opacity: 0.2; }
.sectionTitle0 { fill: var(--text-color); }
.sectionTitle1 { fill: var(--text-color); }
.sectionTitle2 { fill: var(--text-color); }
.sectionTitle3 { fill: var(--text-color); }
.sectionTitle { text-anchor: start; font-size: 11px; }
.grid .tick { stroke: lightgrey; opacity: 0.3; shape-rendering: crispedges; }
.grid path { stroke-width: 0px; }
.today { fill: none; stroke: red; stroke-width: 2px; }
.task { stroke-width: 2px; }
.taskText { text-anchor: middle; font-size: 11px; }
.taskTextOutsideRight { fill: black; text-anchor: start; font-size: 11px; }
.taskTextOutsideLeft { fill: black; text-anchor: end; font-size: 11px; }
.taskText0, .taskText1, .taskText2, .taskText3 { fill: white; }
.task0, .task1, .task2, .task3 { fill: rgb(138, 144, 221); stroke: rgb(83, 79, 188); }
.taskTextOutside0, .taskTextOutside2 { fill: var(--text-color); }
.taskTextOutside1, .taskTextOutside3 { fill: var(--text-color); }
.active0, .active1, .active2, .active3 { fill: rgb(191, 199, 255); stroke: rgb(83, 79, 188); }
.activeText0, .activeText1, .activeText2, .activeText3 { fill: black !important; }
.done0, .done1, .done2, .done3 { stroke: grey; fill: lightgrey; stroke-width: 2px; }
.doneText0, .doneText1, .doneText2, .doneText3 { fill: black !important; }
.crit0, .crit1, .crit2, .crit3 { stroke: rgb(255, 136, 136); fill: red; stroke-width: 2px; }
.activeCrit0, .activeCrit1, .activeCrit2, .activeCrit3 { stroke: rgb(255, 136, 136); fill: rgb(191, 199, 255); stroke-width: 2px; }
.doneCrit0, .doneCrit1, .doneCrit2, .doneCrit3 { stroke: rgb(255, 136, 136); fill: lightgrey; stroke-width: 2px; cursor: pointer; shape-rendering: crispedges; }
.doneCritText0, .doneCritText1, .doneCritText2, .doneCritText3 { fill: black !important; }
.activeCritText0, .activeCritText1, .activeCritText2, .activeCritText3 { fill: black !important; }
.titleText { text-anchor: middle; font-size: 18px; fill: black; }
.node text { font-size: 14px; }
div.mermaidTooltip { position: absolute; text-align: center; max-width: 200px; padding: 2px; font-size: 12px; background-color: rgb(255, 255, 222); border: 1px solid rgb(170, 170, 51); border-top-left-radius: 2px; border-top-right-radius: 2px; border-bottom-right-radius: 2px; border-bottom-left-radius: 2px; pointer-events: none; z-index: 100; background-position: initial initial; background-repeat: initial initial; }
#write .md-diagram-panel .md-diagram-panel-preview div { }


:root { --bg-color: #ffffff; --text-color: #333333; --select-text-bg-color: #B5D6FC; --select-text-font-color: auto; --monospace: &quot;Lucida Console&quot;,Consolas,&quot;Courier&quot;,monospace; }
html { font-size: 14px; background-color: var(--bg-color); color: var(--text-color); font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; -webkit-font-smoothing: antialiased; }
body { margin: 0px; padding: 0px; height: auto; bottom: 0px; top: 0px; left: 0px; right: 0px; font-size: 1rem; line-height: 1.42857143; overflow-x: hidden; background-image: inherit; background-size: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: inherit; background-position: inherit inherit; background-repeat: inherit inherit; }
iframe { margin: auto; }
a.url { word-break: break-all; }
a:active, a:hover { outline: 0px; }
.in-text-selection, ::selection { text-shadow: none; background: var(--select-text-bg-color); color: var(--select-text-font-color); }
#write { margin: 0px auto; height: auto; width: inherit; word-break: normal; word-wrap: break-word; position: relative; white-space: normal; overflow-x: visible; }
#write.first-line-indent p { text-indent: 2em; }
#write.first-line-indent li p, #write.first-line-indent p * { text-indent: 0px; }
#write.first-line-indent li { margin-left: 2em; }
.for-image #write { padding-left: 8px; padding-right: 8px; }
body.typora-export { padding-left: 30px; padding-right: 30px; }
.typora-export .footnote-line, .typora-export p { white-space: pre-wrap; }
@media screen and (max-width: 500px) { 
  body.typora-export { padding-left: 0px; padding-right: 0px; }
  .CodeMirror-sizer { margin-left: 0px !important; }
  .CodeMirror-gutters { display: none !important; }
}
#write li &gt; figure:first-child { margin-top: -20px; }
#write ol, #write ul { position: relative; }
img { max-width: 100%; vertical-align: middle; }
button, input, select, textarea { color: inherit; font-family: inherit; font-size: inherit; font-style: inherit; font-variant-caps: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; }
input[type=&quot;checkbox&quot;], input[type=&quot;radio&quot;] { line-height: normal; padding: 0px; }
*, ::after, ::before { box-sizing: border-box; }
#write h1, #write h2, #write h3, #write h4, #write h5, #write h6, #write p, #write pre { width: inherit; }
#write h1, #write h2, #write h3, #write h4, #write h5, #write h6, #write p { position: relative; }
h1, h2, h3, h4, h5, h6 { break-after: avoid-page; break-inside: avoid; orphans: 2; }
p { orphans: 4; }
h1 { font-size: 2rem; }
h2 { font-size: 1.8rem; }
h3 { font-size: 1.6rem; }
h4 { font-size: 1.4rem; }
h5 { font-size: 1.2rem; }
h6 { font-size: 1rem; }
.md-math-block, .md-rawblock, h1, h2, h3, h4, h5, h6, p { margin-top: 1rem; margin-bottom: 1rem; }
.hidden { display: none; }
.md-blockmeta { color: rgb(204, 204, 204); font-weight: 700; font-style: italic; }
a { cursor: pointer; }
sup.md-footnote { padding: 2px 4px; background-color: rgba(238, 238, 238, 0.701961); color: rgb(85, 85, 85); border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; cursor: pointer; }
sup.md-footnote a, sup.md-footnote a:hover { color: inherit; text-transform: inherit; text-decoration: inherit; }
#write input[type=&quot;checkbox&quot;] { cursor: pointer; width: inherit; height: inherit; }
figure { overflow-x: auto; margin: 1.2em 0px; max-width: calc(100% + 16px); padding: 0px; }
figure &gt; table { margin: 0px !important; }
tr { break-inside: avoid; break-after: auto; }
thead { display: table-header-group; }
table { border-collapse: collapse; border-spacing: 0px; width: 100%; overflow: auto; break-inside: auto; text-align: left; }
table.md-table td { min-width: 80px; }
.CodeMirror-gutters { border-right-width: 0px; background-color: inherit; }
.CodeMirror { text-align: left; }
.CodeMirror-placeholder { opacity: 0.3; }
.CodeMirror pre { padding: 0px 4px; }
.CodeMirror-lines { padding: 0px; }
div.hr:focus { cursor: none; }
#write pre { white-space: pre-wrap; }
#write.fences-no-line-wrapping pre { white-space: pre; }
#write pre.ty-contain-cm { white-space: normal; }
.CodeMirror-gutters { margin-right: 4px; }
.md-fences { font-size: 0.9rem; display: block; break-inside: avoid; text-align: left; overflow: visible; white-space: pre; background-image: inherit; background-size: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: inherit; position: relative !important; background-position: inherit inherit; background-repeat: inherit inherit; }
.md-diagram-panel { width: 100%; margin-top: 10px; text-align: center; padding-top: 0px; padding-bottom: 8px; overflow-x: auto; }
#write .md-fences.mock-cm { white-space: pre-wrap; }
.md-fences.md-fences-with-lineno { padding-left: 0px; }
#write.fences-no-line-wrapping .md-fences.mock-cm { white-space: pre; overflow-x: auto; }
.md-fences.mock-cm.md-fences-with-lineno { padding-left: 8px; }
.CodeMirror-line, twitterwidget { break-inside: avoid; }
.footnotes { opacity: 0.8; font-size: 0.9rem; margin-top: 1em; margin-bottom: 1em; }
.footnotes + .footnotes { margin-top: 0px; }
.md-reset { margin: 0px; padding: 0px; border: 0px; outline: 0px; vertical-align: top; text-decoration: none; text-shadow: none; float: none; position: static; width: auto; height: auto; white-space: nowrap; cursor: inherit; line-height: normal; font-weight: 400; text-align: left; box-sizing: content-box; direction: ltr; background-position: 0px 0px; background-repeat: initial initial; }
li div { padding-top: 0px; }
blockquote { margin: 1rem 0px; }
li .mathjax-block, li p { margin: 0.5rem 0px; }
li { margin: 0px; position: relative; }
blockquote &gt; :last-child { margin-bottom: 0px; }
blockquote &gt; :first-child, li &gt; :first-child { margin-top: 0px; }
.footnotes-area { color: rgb(136, 136, 136); margin-top: 0.714rem; padding-bottom: 0.143rem; white-space: normal; }
#write .footnote-line { white-space: pre-wrap; }
@media print { 
  body, html { border: 1px solid transparent; height: 99%; break-after: avoid-page; break-before: avoid-page; }
  #write { margin-top: 0px; border-color: transparent !important; }
  .typora-export * { -webkit-print-color-adjust: exact; }
  html.blink-to-pdf { font-size: 13px; }
  .typora-export #write { padding-left: 1cm; padding-right: 1cm; padding-bottom: 0px; break-after: avoid-page; }
  .typora-export #write::after { height: 0px; }
  @page { margin: 20mm 0px; }
}
.footnote-line { margin-top: 0.714em; font-size: 0.7em; }
a img, img a { cursor: pointer; }
pre.md-meta-block { font-size: 0.8rem; min-height: 0.8rem; white-space: pre-wrap; background-color: rgb(204, 204, 204); display: block; overflow-x: hidden; background-position: initial initial; background-repeat: initial initial; }
p &gt; img:only-child { display: block; margin: auto; }
p &gt; .md-image:only-child { display: inline-block; width: 100%; text-align: center; }
#write .MathJax_Display { margin: 0.8em 0px 0px; }
.md-math-block { width: 100%; }
.md-math-block:not(:empty)::after { display: none; }
[contenteditable=&quot;true&quot;]:active, [contenteditable=&quot;true&quot;]:focus { outline: 0px; box-shadow: none; }
.md-task-list-item { position: relative; list-style-type: none; }
.task-list-item.md-task-list-item { padding-left: 0px; }
.md-task-list-item &gt; input { position: absolute; top: 0px; left: 0px; margin-left: -1.2em; margin-top: calc(1em - 10px); }
.math { font-size: 1rem; }
.md-toc { min-height: 3.58rem; position: relative; font-size: 0.9rem; border-top-left-radius: 10px; border-top-right-radius: 10px; border-bottom-right-radius: 10px; border-bottom-left-radius: 10px; }
.md-toc-content { position: relative; margin-left: 0px; }
.md-toc-content::after, .md-toc::after { display: none; }
.md-toc-item { display: block; color: rgb(65, 131, 196); }
.md-toc-item a { text-decoration: none; }
.md-toc-inner:hover { text-decoration: underline; }
.md-toc-inner { display: inline-block; cursor: pointer; }
.md-toc-h1 .md-toc-inner { margin-left: 0px; font-weight: 700; }
.md-toc-h2 .md-toc-inner { margin-left: 2em; }
.md-toc-h3 .md-toc-inner { margin-left: 4em; }
.md-toc-h4 .md-toc-inner { margin-left: 6em; }
.md-toc-h5 .md-toc-inner { margin-left: 8em; }
.md-toc-h6 .md-toc-inner { margin-left: 10em; }
@media screen and (max-width: 48em) { 
  .md-toc-h3 .md-toc-inner { margin-left: 3.5em; }
  .md-toc-h4 .md-toc-inner { margin-left: 5em; }
  .md-toc-h5 .md-toc-inner { margin-left: 6.5em; }
  .md-toc-h6 .md-toc-inner { margin-left: 8em; }
}
a.md-toc-inner { font-size: inherit; font-style: inherit; font-weight: inherit; line-height: inherit; }
.footnote-line a:not(.reversefootnote) { color: inherit; }
.md-attr { display: none; }
.md-fn-count::after { content: &quot;.&quot;; }
code, pre, samp, tt { font-family: var(--monospace); }
kbd { margin: 0px 0.1em; padding: 0.1em 0.6em; font-size: 0.8em; color: rgb(36, 39, 41); background-color: rgb(255, 255, 255); border: 1px solid rgb(173, 179, 185); border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; box-shadow: rgba(12, 13, 14, 0.2) 0px 1px 0px, rgb(255, 255, 255) 0px 0px 0px 2px inset; white-space: nowrap; vertical-align: middle; background-position: initial initial; background-repeat: initial initial; }
.md-comment { color: rgb(162, 127, 3); opacity: 0.8; font-family: var(--monospace); }
code { text-align: left; }
a.md-print-anchor { white-space: pre !important; border: none !important; display: inline-block !important; position: absolute !important; width: 1px !important; right: 0px !important; outline: 0px !important; text-shadow: initial !important; background-position: 0px 0px !important; background-repeat: initial initial !important; }
.md-inline-math .MathJax_SVG .noError { display: none !important; }
.md-math-block .MathJax_SVG_Display { text-align: center; margin: 0px; position: relative; text-indent: 0px; max-width: none; max-height: none; min-height: 0px; min-width: 100%; width: auto; overflow-y: hidden; display: block !important; }
.MathJax_SVG_Display, .md-inline-math .MathJax_SVG_Display { width: auto; margin: inherit; display: inline-block !important; }
.MathJax_SVG .MJX-monospace { font-family: var(--monospace); }
.MathJax_SVG .MJX-sans-serif { font-family: sans-serif; }
.MathJax_SVG { display: inline; font-style: normal; font-weight: 400; line-height: normal; zoom: 90%; text-indent: 0px; text-align: left; text-transform: none; letter-spacing: normal; word-spacing: normal; word-wrap: normal; white-space: nowrap; float: none; direction: ltr; max-width: none; max-height: none; min-width: 0px; min-height: 0px; border: 0px; padding: 0px; margin: 0px; }
.MathJax_SVG * { transition: none; }
.MathJax_SVG_Display svg { vertical-align: middle !important; margin-bottom: 0px !important; }
.os-windows.monocolor-emoji .md-emoji { font-family: &quot;Segoe UI Symbol&quot;, sans-serif; }
.md-diagram-panel &gt; svg { max-width: 100%; }
[lang=&quot;mermaid&quot;] svg, [lang=&quot;flow&quot;] svg { max-width: 100%; }
[lang=&quot;mermaid&quot;] .node text { font-size: 1rem; }
table tr th { border-bottom-width: 0px; }
video { max-width: 100%; display: block; margin: 0px auto; }
iframe { max-width: 100%; width: 100%; border: none; }
.highlight td, .highlight tr { border: 0px; }


.CodeMirror { height: auto; }
.CodeMirror.cm-s-inner { background-image: inherit; background-size: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: inherit; background-position: inherit inherit; background-repeat: inherit inherit; }
.CodeMirror-scroll { overflow-y: hidden; overflow-x: auto; z-index: 3; }
.CodeMirror-gutter-filler, .CodeMirror-scrollbar-filler { background-color: rgb(255, 255, 255); }
.CodeMirror-gutters { border-right-width: 1px; border-right-style: solid; border-right-color: rgb(221, 221, 221); background-image: inherit; background-size: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: inherit; white-space: nowrap; background-position: inherit inherit; background-repeat: inherit inherit; }
.CodeMirror-linenumber { padding: 0px 3px 0px 5px; text-align: right; color: rgb(153, 153, 153); }
.cm-s-inner .cm-keyword { color: rgb(119, 0, 136); }
.cm-s-inner .cm-atom, .cm-s-inner.cm-atom { color: rgb(34, 17, 153); }
.cm-s-inner .cm-number { color: rgb(17, 102, 68); }
.cm-s-inner .cm-def { color: rgb(0, 0, 255); }
.cm-s-inner .cm-variable { color: rgb(0, 0, 0); }
.cm-s-inner .cm-variable-2 { color: rgb(0, 85, 170); }
.cm-s-inner .cm-variable-3 { color: rgb(0, 136, 85); }
.cm-s-inner .cm-string { color: rgb(170, 17, 17); }
.cm-s-inner .cm-property { color: rgb(0, 0, 0); }
.cm-s-inner .cm-operator { color: rgb(152, 26, 26); }
.cm-s-inner .cm-comment, .cm-s-inner.cm-comment { color: rgb(170, 85, 0); }
.cm-s-inner .cm-string-2 { color: rgb(255, 85, 0); }
.cm-s-inner .cm-meta { color: rgb(85, 85, 85); }
.cm-s-inner .cm-qualifier { color: rgb(85, 85, 85); }
.cm-s-inner .cm-builtin { color: rgb(51, 0, 170); }
.cm-s-inner .cm-bracket { color: rgb(153, 153, 119); }
.cm-s-inner .cm-tag { color: rgb(17, 119, 0); }
.cm-s-inner .cm-attribute { color: rgb(0, 0, 204); }
.cm-s-inner .cm-header, .cm-s-inner.cm-header { color: rgb(0, 0, 255); }
.cm-s-inner .cm-quote, .cm-s-inner.cm-quote { color: rgb(0, 153, 0); }
.cm-s-inner .cm-hr, .cm-s-inner.cm-hr { color: rgb(153, 153, 153); }
.cm-s-inner .cm-link, .cm-s-inner.cm-link { color: rgb(0, 0, 204); }
.cm-negative { color: rgb(221, 68, 68); }
.cm-positive { color: rgb(34, 153, 34); }
.cm-header, .cm-strong { font-weight: 700; }
.cm-del { text-decoration: line-through; }
.cm-em { font-style: italic; }
.cm-link { text-decoration: underline; }
.cm-error { color: red; }
.cm-invalidchar { color: red; }
.cm-constant { color: rgb(38, 139, 210); }
.cm-defined { color: rgb(181, 137, 0); }
div.CodeMirror span.CodeMirror-matchingbracket { color: rgb(0, 255, 0); }
div.CodeMirror span.CodeMirror-nonmatchingbracket { color: rgb(255, 34, 34); }
.cm-s-inner .CodeMirror-activeline-background { background-image: inherit; background-size: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: inherit; background-position: inherit inherit; background-repeat: inherit inherit; }
.CodeMirror { position: relative; overflow: hidden; }
.CodeMirror-scroll { height: 100%; outline: 0px; position: relative; box-sizing: content-box; background-image: inherit; background-size: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: inherit; background-position: inherit inherit; background-repeat: inherit inherit; }
.CodeMirror-sizer { position: relative; }
.CodeMirror-gutter-filler, .CodeMirror-hscrollbar, .CodeMirror-scrollbar-filler, .CodeMirror-vscrollbar { position: absolute; z-index: 6; display: none; }
.CodeMirror-vscrollbar { right: 0px; top: 0px; overflow: hidden; }
.CodeMirror-hscrollbar { bottom: 0px; left: 0px; overflow: hidden; }
.CodeMirror-scrollbar-filler { right: 0px; bottom: 0px; }
.CodeMirror-gutter-filler { left: 0px; bottom: 0px; }
.CodeMirror-gutters { position: absolute; left: 0px; top: 0px; padding-bottom: 30px; z-index: 3; }
.CodeMirror-gutter { white-space: normal; height: 100%; box-sizing: content-box; padding-bottom: 30px; margin-bottom: -32px; display: inline-block; }
.CodeMirror-gutter-wrapper { position: absolute; z-index: 4; border: none !important; background-position: 0px 0px !important; background-repeat: initial initial !important; }
.CodeMirror-gutter-background { position: absolute; top: 0px; bottom: 0px; z-index: 4; }
.CodeMirror-gutter-elt { position: absolute; cursor: default; z-index: 4; }
.CodeMirror-lines { cursor: text; }
.CodeMirror pre { border-top-left-radius: 0px; border-top-right-radius: 0px; border-bottom-right-radius: 0px; border-bottom-left-radius: 0px; border-width: 0px; font-family: inherit; font-size: inherit; margin: 0px; white-space: pre; word-wrap: normal; color: inherit; z-index: 2; position: relative; overflow: visible; background-position: 0px 0px; background-repeat: initial initial; }
.CodeMirror-wrap pre { word-wrap: break-word; white-space: pre-wrap; word-break: normal; }
.CodeMirror-code pre { border-right-width: 30px; border-right-style: solid; border-right-color: transparent; width: fit-content; }
.CodeMirror-wrap .CodeMirror-code pre { border-right-style: none; width: auto; }
.CodeMirror-linebackground { position: absolute; left: 0px; right: 0px; top: 0px; bottom: 0px; z-index: 0; }
.CodeMirror-linewidget { position: relative; z-index: 2; overflow: auto; }
.CodeMirror-wrap .CodeMirror-scroll { overflow-x: hidden; }
.CodeMirror-measure { position: absolute; width: 100%; height: 0px; overflow: hidden; visibility: hidden; }
.CodeMirror-measure pre { position: static; }
.CodeMirror div.CodeMirror-cursor { position: absolute; visibility: hidden; border-right-style: none; width: 0px; }
.CodeMirror div.CodeMirror-cursor { visibility: hidden; }
.CodeMirror-focused div.CodeMirror-cursor { visibility: inherit; }
.cm-searching { background-color: rgba(255, 255, 0, 0.4); background-position: initial initial; background-repeat: initial initial; }
@media print { 
  .CodeMirror div.CodeMirror-cursor { visibility: hidden; }
}


:root {
    --side-bar-bg-color: #fafafa;
    --control-text-color: #777;
}

@include-when-export url(https://fonts.loli.net/css?family=Open+Sans:400italic,700italic,700,400&amp;subset=latin,latin-ext);

@font-face {
    font-family: 'Open Sans';
    font-style: normal;
    font-weight: normal;
    src: local('Open Sans Regular'),url('file:///Users/JcSnap/Library/Application%20Support/abnerworks.Typora/themes/github/400.woff') format('woff');
}

@font-face {
    font-family: 'Open Sans';
    font-style: italic;
    font-weight: normal;
    src: local('Open Sans Italic'),url('file:///Users/JcSnap/Library/Application%20Support/abnerworks.Typora/themes/github/400i.woff') format('woff');
}

@font-face {
    font-family: 'Open Sans';
    font-style: normal;
    font-weight: bold;
    src: local('Open Sans Bold'),url('file:///Users/JcSnap/Library/Application%20Support/abnerworks.Typora/themes/github/700.woff') format('woff');
}

@font-face {
    font-family: 'Open Sans';
    font-style: italic;
    font-weight: bold;
    src: local('Open Sans Bold Italic'),url('file:///Users/JcSnap/Library/Application%20Support/abnerworks.Typora/themes/github/700i.woff') format('woff');
}

html {
    font-size: 16px;
}

body {
    font-family: &quot;Open Sans&quot;,&quot;Clear Sans&quot;,&quot;Helvetica Neue&quot;,Helvetica,Arial,sans-serif;
    color: rgb(51, 51, 51);
    line-height: 1.6;
}

#write {
    max-width: 860px;
  	margin: 0 auto;
  	padding: 30px;
    padding-bottom: 100px;
}
#write &gt; ul:first-child,
#write &gt; ol:first-child{
    margin-top: 30px;
}

a {
    color: #4183C4;
}
h1,
h2,
h3,
h4,
h5,
h6 {
    position: relative;
    margin-top: 1rem;
    margin-bottom: 1rem;
    font-weight: bold;
    line-height: 1.4;
    cursor: text;
}
h1:hover a.anchor,
h2:hover a.anchor,
h3:hover a.anchor,
h4:hover a.anchor,
h5:hover a.anchor,
h6:hover a.anchor {
    /*background: url(&quot;file:///Users/JcSnap/Library/Application%20Support/images/modules/styleguide/para.png&quot;) no-repeat 10px center;*/
    text-decoration: none;
}
h1 tt,
h1 code {
    font-size: inherit;
}
h2 tt,
h2 code {
    font-size: inherit;
}
h3 tt,
h3 code {
    font-size: inherit;
}
h4 tt,
h4 code {
    font-size: inherit;
}
h5 tt,
h5 code {
    font-size: inherit;
}
h6 tt,
h6 code {
    font-size: inherit;
}
h1 {
    padding-bottom: .3em;
    font-size: 2.25em;
    line-height: 1.2;
    border-bottom: 1px solid #eee;
}
h2 {
   padding-bottom: .3em;
    font-size: 1.75em;
    line-height: 1.225;
    border-bottom: 1px solid #eee;
}
h3 {
    font-size: 1.5em;
    line-height: 1.43;
}
h4 {
    font-size: 1.25em;
}
h5 {
    font-size: 1em;
}
h6 {
   font-size: 1em;
    color: #777;
}
p,
blockquote,
ul,
ol,
dl,
table{
    margin: 0.8em 0;
}
li&gt;ol,
li&gt;ul {
    margin: 0 0;
}
hr {
    height: 2px;
    padding: 0;
    margin: 16px 0;
    background-color: #e7e7e7;
    border: 0 none;
    overflow: hidden;
    box-sizing: content-box;
}

li p.first {
    display: inline-block;
}
ul,
ol {
    padding-left: 30px;
}
ul:first-child,
ol:first-child {
    margin-top: 0;
}
ul:last-child,
ol:last-child {
    margin-bottom: 0;
}
blockquote {
    border-left: 4px solid #dfe2e5;
    padding: 0 15px;
    color: #777777;
}
blockquote blockquote {
    padding-right: 0;
}
table {
    padding: 0;
    word-break: initial;
}
table tr {
    border-top: 1px solid #dfe2e5;
    margin: 0;
    padding: 0;
}
table tr:nth-child(2n),
thead {
    background-color: #f8f8f8;
}
table tr th {
    font-weight: bold;
    border: 1px solid #dfe2e5;
    border-bottom: 0;
    text-align: left;
    margin: 0;
    padding: 6px 13px;
}
table tr td {
    border: 1px solid #dfe2e5;
    text-align: left;
    margin: 0;
    padding: 6px 13px;
}
table tr th:first-child,
table tr td:first-child {
    margin-top: 0;
}
table tr th:last-child,
table tr td:last-child {
    margin-bottom: 0;
}

.CodeMirror-lines {
    padding-left: 4px;
}

.code-tooltip {
    box-shadow: 0 1px 1px 0 rgba(0,28,36,.3);
    border-top: 1px solid #eef2f2;
}

.md-fences,
code,
tt {
    border: 1px solid #e7eaed;
    background-color: #f8f8f8;
    border-radius: 3px;
    padding: 0;
    padding: 2px 4px 0px 4px;
    font-size: 0.9em;
}

code {
    background-color: #f3f4f4;
    padding: 0 4px 2px 4px;
}

.md-fences {
    margin-bottom: 15px;
    margin-top: 15px;
    padding: 0.2em 1em;
    padding-top: 8px;
    padding-bottom: 6px;
}


.md-task-list-item &gt; input {
  margin-left: -1.3em;
}

@media print {
    html {
        font-size: 13px;
    }
    table,
    pre {
        page-break-inside: avoid;
    }
    pre {
        word-wrap: break-word;
    }
}

.md-fences {
	background-color: #f8f8f8;
}
#write pre.md-meta-block {
	padding: 1rem;
    font-size: 85%;
    line-height: 1.45;
    background-color: #f7f7f7;
    border: 0;
    border-radius: 3px;
    color: #777777;
    margin-top: 0 !important;
}

.mathjax-block&gt;.code-tooltip {
	bottom: .375rem;
}

.md-mathjax-midline {
    background: #fafafa;
}

#write&gt;h3.md-focus:before{
	left: -1.5625rem;
	top: .375rem;
}
#write&gt;h4.md-focus:before{
	left: -1.5625rem;
	top: .285714286rem;
}
#write&gt;h5.md-focus:before{
	left: -1.5625rem;
	top: .285714286rem;
}
#write&gt;h6.md-focus:before{
	left: -1.5625rem;
	top: .285714286rem;
}
.md-image&gt;.md-meta {
    /*border: 1px solid #ddd;*/
    border-radius: 3px;
    padding: 2px 0px 0px 4px;
    font-size: 0.9em;
    color: inherit;
}

.md-tag {
    color: #a7a7a7;
    opacity: 1;
}

.md-toc { 
    margin-top:20px;
    padding-bottom:20px;
}

.sidebar-tabs {
    border-bottom: none;
}

#typora-quick-open {
    border: 1px solid #ddd;
    background-color: #f8f8f8;
}

#typora-quick-open-item {
    background-color: #FAFAFA;
    border-color: #FEFEFE #e5e5e5 #e5e5e5 #eee;
    border-style: solid;
    border-width: 1px;
}

/** focus mode */
.on-focus-mode blockquote {
    border-left-color: rgba(85, 85, 85, 0.12);
}

header, .context-menu, .megamenu-content, footer{
    font-family: &quot;Segoe UI&quot;, &quot;Arial&quot;, sans-serif;
}

.file-node-content:hover .file-node-icon,
.file-node-content:hover .file-node-open-state{
    visibility: visible;
}

.mac-seamless-mode #typora-sidebar {
    background-color: #fafafa;
    background-color: var(--side-bar-bg-color);
}

.md-lang {
    color: #b4654d;
}

.html-for-mac .context-menu {
    --item-hover-bg-color: #E6F0FE;
}

#md-notification .btn {
    border: 0;
}

.dropdown-menu .divider {
    border-color: #e5e5e5;
}

 .typora-export p, .typora-export .footnote-line {white-space: normal;} 
&lt;/style&gt;


&lt;div id=&quot;write&quot; class=&quot;is-mac&quot;&gt;&lt;h3&gt;&lt;a name=&quot;header-n355&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;목차&lt;/h3&gt;&lt;ul&gt;&lt;li&gt;&lt;ol start=&quot;&quot;&gt;&lt;li&gt;스트림이란?&lt;/li&gt;&lt;/ol&gt;&lt;ul&gt;&lt;li&gt;스트림 간단한 예제&lt;/li&gt;&lt;li&gt;스트림 다양하게 처리하기&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;&lt;ol start=&quot;2&quot;&gt;&lt;li&gt;스트림 내부 구조&lt;/li&gt;&lt;/ol&gt;&lt;ul&gt;&lt;li&gt;서브스크립션&lt;/li&gt;&lt;li&gt;브로드 캐스트&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;&lt;ol start=&quot;3&quot;&gt;&lt;li&gt;스트림 컨트롤러&lt;/li&gt;&lt;/ol&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h3&gt;&lt;a name=&quot;header-n382&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;1. Stream이란?&lt;/h3&gt;&lt;p&gt;스트림은 데이터나 이벤트가 들어오는 통로다. 앱을 만들다보면 데이터를 처리할 일이 많은데, 어느 타이밍에 데이터가 들어올지 확실히 알기 어렵다. 스트림은 이와 같은 비동기 작업을 할 때 주로 쓰인다.&lt;/p&gt;
&lt;p&gt;예컨데 네트워크에서 데이터를 받아서 UI에 보여주는 상황을 생각해보자. 언제 네트워크에서 데이터를 다 받을지 알기 어렵다. 신호가 약한 와이파이를 쓸 수도 있고, 빵빵한 통신을 쓰고 있을 수도 있다.  &lt;/p&gt;
&lt;p&gt;이런 문제를 스트림은 데이터를 만드는 곳과 소비하는 곳을 따로둬서 이 문제를 해결한다.&lt;/p&gt;&lt;div class=&quot;md-diagram-panel&quot;&gt;&lt;svg id=&quot;mermaidChart4&quot; width=&quot;282.421875&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot; height=&quot;263&quot; viewBox=&quot;0 0 282.421875 263&quot; style=&quot;height: 303px;&quot;&gt;&lt;style&gt;&lt;/style&gt;&lt;style&gt;#mermaidChart4 {
    color: rgb(51, 51, 51);
    font: normal normal normal normal 14.399999618530273px/23px &quot;Lucida Console&quot;, Consolas, Courier, monospace;
  }&lt;/style&gt;&lt;g transform=&quot;translate(32, 32)&quot;&gt;&lt;g class=&quot;output&quot;&gt;&lt;g class=&quot;clusters&quot;&gt;&lt;/g&gt;&lt;g class=&quot;edgePaths&quot;&gt;&lt;g class=&quot;edgePath&quot; style=&quot;opacity: 1;&quot;&gt;&lt;path class=&quot;path&quot; d=&quot;M83.84223464439656,136L52.625,99.5L83.84223464439656,63&quot; marker-end=&quot;url(#arrowhead51)&quot; style=&quot;fill:none&quot;&gt;&lt;/path&gt;&lt;defs&gt;&lt;marker id=&quot;arrowhead51&quot; viewBox=&quot;0 0 10 10&quot; refX=&quot;9&quot; refY=&quot;5&quot; markerUnits=&quot;strokeWidth&quot; markerWidth=&quot;8&quot; markerHeight=&quot;6&quot; orient=&quot;auto&quot;&gt;&lt;path d=&quot;M 0 0 L 10 5 L 0 10 z&quot; class=&quot;arrowheadPath&quot; style=&quot;stroke-width: 1px; stroke-dasharray: 1px, 0px;&quot;&gt;&lt;/path&gt;&lt;/marker&gt;&lt;/defs&gt;&lt;/g&gt;&lt;g class=&quot;edgePath&quot; style=&quot;opacity: 1;&quot;&gt;&lt;path class=&quot;path&quot; d=&quot;M120.61870285560344,63L151.8359375,99.5L120.61870285560344,136&quot; marker-end=&quot;url(#arrowhead52)&quot; style=&quot;fill:none&quot;&gt;&lt;/path&gt;&lt;defs&gt;&lt;marker id=&quot;arrowhead52&quot; viewBox=&quot;0 0 10 10&quot; refX=&quot;9&quot; refY=&quot;5&quot; markerUnits=&quot;strokeWidth&quot; markerWidth=&quot;8&quot; markerHeight=&quot;6&quot; orient=&quot;auto&quot;&gt;&lt;path d=&quot;M 0 0 L 10 5 L 0 10 z&quot; class=&quot;arrowheadPath&quot; style=&quot;stroke-width: 1px; stroke-dasharray: 1px, 0px;&quot;&gt;&lt;/path&gt;&lt;/marker&gt;&lt;/defs&gt;&lt;/g&gt;&lt;/g&gt;&lt;g class=&quot;edgeLabels&quot;&gt;&lt;g class=&quot;edgeLabel&quot; transform=&quot;translate(52.625,99.5)&quot; style=&quot;opacity: 1;&quot;&gt;&lt;g transform=&quot;translate(-32.625,-11.5)&quot; class=&quot;label&quot;&gt;&lt;foreignObject width=&quot;65.25&quot; height=&quot;23&quot;&gt;&lt;div xmlns=&quot;http://www.w3.org/1999/xhtml&quot; style=&quot;display: inline-block; white-space: nowrap;&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;관찰(구독)&lt;/span&gt;&lt;/div&gt;&lt;/foreignObject&gt;&lt;/g&gt;&lt;/g&gt;&lt;g class=&quot;edgeLabel&quot; transform=&quot;translate(151.8359375,99.5)&quot; style=&quot;opacity: 1;&quot;&gt;&lt;g transform=&quot;translate(-46.5859375,-11.5)&quot; class=&quot;label&quot;&gt;&lt;foreignObject width=&quot;93.171875&quot; height=&quot;23&quot;&gt;&lt;div xmlns=&quot;http://www.w3.org/1999/xhtml&quot; style=&quot;display: inline-block; white-space: nowrap;&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;바뀐점 알려주기&lt;/span&gt;&lt;/div&gt;&lt;/foreignObject&gt;&lt;/g&gt;&lt;/g&gt;&lt;/g&gt;&lt;g class=&quot;nodes&quot;&gt;&lt;g class=&quot;node&quot; id=&quot;A&quot; transform=&quot;translate(102.23046875,157.5)&quot; style=&quot;opacity: 1;&quot;&gt;&lt;rect rx=&quot;5&quot; ry=&quot;5&quot; x=&quot;-62.6484375&quot; y=&quot;-21.5&quot; width=&quot;125.296875&quot; height=&quot;43&quot;&gt;&lt;/rect&gt;&lt;g class=&quot;label&quot; transform=&quot;translate(0,0)&quot;&gt;&lt;g transform=&quot;translate(-52.6484375,-11.5)&quot;&gt;&lt;foreignObject width=&quot;105.296875&quot; height=&quot;23&quot;&gt;&lt;div xmlns=&quot;http://www.w3.org/1999/xhtml&quot; style=&quot;display: inline-block; white-space: nowrap;&quot;&gt;관찰자-데이터소비&lt;/div&gt;&lt;/foreignObject&gt;&lt;/g&gt;&lt;/g&gt;&lt;/g&gt;&lt;g class=&quot;node&quot; id=&quot;B&quot; transform=&quot;translate(102.23046875,41.5)&quot; style=&quot;opacity: 1;&quot;&gt;&lt;rect rx=&quot;5&quot; ry=&quot;5&quot; x=&quot;-68.703125&quot; y=&quot;-21.5&quot; width=&quot;137.40625&quot; height=&quot;43&quot;&gt;&lt;/rect&gt;&lt;g class=&quot;label&quot; transform=&quot;translate(0,0)&quot;&gt;&lt;g transform=&quot;translate(-58.703125,-11.5)&quot;&gt;&lt;foreignObject width=&quot;117.40625&quot; height=&quot;23&quot;&gt;&lt;div xmlns=&quot;http://www.w3.org/1999/xhtml&quot; style=&quot;display: inline-block; white-space: nowrap;&quot;&gt;관찰대상-데이터생산&lt;/div&gt;&lt;/foreignObject&gt;&lt;/g&gt;&lt;/g&gt;&lt;/g&gt;&lt;/g&gt;&lt;/g&gt;&lt;/g&gt;&lt;/svg&gt;&lt;/div&gt;&lt;p&gt;스트림에서 데이터의 추가나 변경이 일어나면 이를 관찰하던데서 처리한다.&lt;/p&gt;
&lt;p&gt;일단 이해를 돕기 위해 스트림을 하나 만들어보자.&lt;/p&gt;
&lt;p&gt;1초마다 데이터를 만드는 스트림이다.&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;dart&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;dart&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;main&lt;/span&gt;() {&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;stream&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;Stream&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;periodic&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;Duration&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;seconds&lt;/span&gt;: &lt;span class=&quot;cm-number&quot;&gt;1&lt;/span&gt;), (&lt;span class=&quot;cm-variable&quot;&gt;x&lt;/span&gt;) &lt;span class=&quot;cm-operator&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;x&lt;/span&gt;).&lt;span class=&quot;cm-variable&quot;&gt;take&lt;/span&gt;(&lt;span class=&quot;cm-number&quot;&gt;10&lt;/span&gt;); &lt;span class=&quot;cm-comment&quot;&gt;// 1. 스트림 만들기 - 1초마다 데이터를 1개씩 만듬, 10개 까지만.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;stream&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;listen&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;print&lt;/span&gt;); &lt;span class=&quot;cm-comment&quot;&gt;// 2. 이벤트 처리&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 110px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 110px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;10초동안 1초 간격으로 출력을 한다.&lt;/p&gt;
&lt;p&gt;짧은 코드지만 스트림을 이해하기에 충분하다.&lt;/p&gt;
&lt;p&gt;좀 더  설명을 해보겠다.&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;ol start=&quot;&quot;&gt;&lt;li&gt;&lt;em&gt;Stream.periodic()&lt;/em&gt; 에서 일정시간마다 데이터(이벤트)를 만든다.&lt;/li&gt;&lt;/ol&gt;&lt;/li&gt;&lt;li&gt;&lt;ol start=&quot;2&quot;&gt;&lt;li&gt;&lt;p&gt;listen()을 한다. 스트림에서 만들어지는 이벤트를 관찰하기 시작한다.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;리슨에서 적은대로 데이터를 다룬다. 여기서는 &lt;em&gt;listen(print)&lt;/em&gt; 라고 적었기에 출력만 한다.&lt;/p&gt;
&lt;p&gt;다르게도 한번 바꿔보자. &lt;em&gt;listen((int number) =&amp;gt; print(number + number))&lt;/em&gt; 라고 적으면 어떤 결과가 나올까?&lt;/p&gt;&lt;/li&gt;&lt;/ol&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;방금 전 코드를 그림으로 그리면 아래와 같다.&lt;/p&gt;&lt;div class=&quot;md-diagram-panel&quot;&gt;&lt;svg id=&quot;mermaidChart5&quot; width=&quot;221.875&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot; height=&quot;263&quot; viewBox=&quot;0 0 221.875 263&quot; style=&quot;height: 303px;&quot;&gt;&lt;style&gt;&lt;/style&gt;&lt;style&gt;#mermaidChart5 {
    color: rgb(51, 51, 51);
    font: normal normal normal normal 14.399999618530273px/23px &quot;Lucida Console&quot;, Consolas, Courier, monospace;
  }&lt;/style&gt;&lt;g transform=&quot;translate(32, 32)&quot;&gt;&lt;g class=&quot;output&quot;&gt;&lt;g class=&quot;clusters&quot;&gt;&lt;/g&gt;&lt;g class=&quot;edgePaths&quot;&gt;&lt;g class=&quot;edgePath&quot; style=&quot;opacity: 1;&quot;&gt;&lt;path class=&quot;path&quot; d=&quot;M78.9375,63L78.9375,99.5L78.9375,136&quot; marker-end=&quot;url(#arrowhead60)&quot; style=&quot;fill:none&quot;&gt;&lt;/path&gt;&lt;defs&gt;&lt;marker id=&quot;arrowhead60&quot; viewBox=&quot;0 0 10 10&quot; refX=&quot;9&quot; refY=&quot;5&quot; markerUnits=&quot;strokeWidth&quot; markerWidth=&quot;8&quot; markerHeight=&quot;6&quot; orient=&quot;auto&quot;&gt;&lt;path d=&quot;M 0 0 L 10 5 L 0 10 z&quot; class=&quot;arrowheadPath&quot; style=&quot;stroke-width: 1px; stroke-dasharray: 1px, 0px;&quot;&gt;&lt;/path&gt;&lt;/marker&gt;&lt;/defs&gt;&lt;/g&gt;&lt;/g&gt;&lt;g class=&quot;edgeLabels&quot;&gt;&lt;g class=&quot;edgeLabel&quot; transform=&quot;translate(78.9375,99.5)&quot; style=&quot;opacity: 1;&quot;&gt;&lt;g transform=&quot;translate(-33.609375,-11.5)&quot; class=&quot;label&quot;&gt;&lt;foreignObject width=&quot;67.21875&quot; height=&quot;23&quot;&gt;&lt;div xmlns=&quot;http://www.w3.org/1999/xhtml&quot; style=&quot;display: inline-block; white-space: nowrap;&quot;&gt;&lt;span class=&quot;edgeLabel&quot;&gt;2.Listen&lt;/span&gt;&lt;/div&gt;&lt;/foreignObject&gt;&lt;/g&gt;&lt;/g&gt;&lt;/g&gt;&lt;g class=&quot;nodes&quot;&gt;&lt;g class=&quot;node&quot; id=&quot;A&quot; transform=&quot;translate(78.9375,41.5)&quot; style=&quot;opacity: 1;&quot;&gt;&lt;rect rx=&quot;5&quot; ry=&quot;5&quot; x=&quot;-58.9375&quot; y=&quot;-21.5&quot; width=&quot;117.875&quot; height=&quot;43&quot;&gt;&lt;/rect&gt;&lt;g class=&quot;label&quot; transform=&quot;translate(0,0)&quot;&gt;&lt;g transform=&quot;translate(-48.9375,-11.5)&quot;&gt;&lt;foreignObject width=&quot;97.875&quot; height=&quot;23&quot;&gt;&lt;div xmlns=&quot;http://www.w3.org/1999/xhtml&quot; style=&quot;display: inline-block; white-space: nowrap;&quot;&gt;1.스트림 만들기&lt;/div&gt;&lt;/foreignObject&gt;&lt;/g&gt;&lt;/g&gt;&lt;/g&gt;&lt;g class=&quot;node&quot; id=&quot;B&quot; transform=&quot;translate(78.9375,157.5)&quot; style=&quot;opacity: 1;&quot;&gt;&lt;rect rx=&quot;5&quot; ry=&quot;5&quot; x=&quot;-52.8828125&quot; y=&quot;-21.5&quot; width=&quot;105.765625&quot; height=&quot;43&quot;&gt;&lt;/rect&gt;&lt;g class=&quot;label&quot; transform=&quot;translate(0,0)&quot;&gt;&lt;g transform=&quot;translate(-42.8828125,-11.5)&quot;&gt;&lt;foreignObject width=&quot;85.765625&quot; height=&quot;23&quot;&gt;&lt;div xmlns=&quot;http://www.w3.org/1999/xhtml&quot; style=&quot;display: inline-block; white-space: nowrap;&quot;&gt;3.이벤트 처리&lt;/div&gt;&lt;/foreignObject&gt;&lt;/g&gt;&lt;/g&gt;&lt;/g&gt;&lt;/g&gt;&lt;/g&gt;&lt;/g&gt;&lt;/svg&gt;&lt;/div&gt;&lt;p&gt;&lt;strong&gt;스트림은 항상 만들기 -&amp;gt; 연결(listen) -&amp;gt; 데이터 처리의 과정을 거친다&lt;/strong&gt;. 하나라도 빠지면 안된다!&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h4&gt;&lt;a name=&quot;header-n410&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;1.1. Stream  - 여러 방법으로 스트림 만들기&lt;/h4&gt;&lt;p&gt;스트림을 만드는 방법은 다양하다.&lt;/p&gt;
&lt;p&gt;즉시 만들거나, 일정 시간마다 만들거나, 퓨처를 써서 만들 수 있다.&lt;/p&gt;
&lt;p&gt;아래 예제를 보고 따라해보도록 하자.&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;dart&quot; style=&quot;page-break-inside: unset;&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;dart&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;main&lt;/span&gt;() {&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;Stream&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;fromIterable&lt;/span&gt;([&lt;span class=&quot;cm-number&quot;&gt;1&lt;/span&gt;,&lt;span class=&quot;cm-number&quot;&gt;2&lt;/span&gt;,&lt;span class=&quot;cm-number&quot;&gt;3&lt;/span&gt;,&lt;span class=&quot;cm-number&quot;&gt;4&lt;/span&gt;,&lt;span class=&quot;cm-number&quot;&gt;5&lt;/span&gt;]) &lt;span class=&quot;cm-comment&quot;&gt;// 일반적인 데이터를 다룰 때&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;  .&lt;span class=&quot;cm-variable&quot;&gt;listen&lt;/span&gt;((&lt;span class=&quot;cm-builtin&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;x&lt;/span&gt;) &lt;span class=&quot;cm-operator&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;'iterable : &lt;/span&gt;${&lt;span class=&quot;cm-variable&quot;&gt;x&lt;/span&gt;}&lt;span class=&quot;cm-string&quot;&gt;'&lt;/span&gt;));&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;Stream&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;periodic&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;Duration&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;seconds&lt;/span&gt;: &lt;span class=&quot;cm-number&quot;&gt;1&lt;/span&gt;), (&lt;span class=&quot;cm-variable&quot;&gt;x&lt;/span&gt;) &lt;span class=&quot;cm-operator&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;x&lt;/span&gt;) &lt;span class=&quot;cm-comment&quot;&gt;// 1초에 1번씩 동작&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;  .&lt;span class=&quot;cm-variable&quot;&gt;take&lt;/span&gt;(&lt;span class=&quot;cm-number&quot;&gt;5&lt;/span&gt;) &lt;span class=&quot;cm-comment&quot;&gt;// 5개까지만 데이터를 처리함.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;  .&lt;span class=&quot;cm-variable&quot;&gt;listen&lt;/span&gt;((&lt;span class=&quot;cm-variable&quot;&gt;x&lt;/span&gt;) &lt;span class=&quot;cm-operator&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;'take : &lt;/span&gt;${&lt;span class=&quot;cm-variable&quot;&gt;x&lt;/span&gt;}&lt;span class=&quot;cm-string&quot;&gt;'&lt;/span&gt;));&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;Stream&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;fromFuture&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;getData&lt;/span&gt;()) &lt;span class=&quot;cm-comment&quot;&gt;// 비동기 데이터를 처리할 때&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  .&lt;span class=&quot;cm-variable&quot;&gt;listen&lt;/span&gt;((&lt;span class=&quot;cm-variable&quot;&gt;x&lt;/span&gt;) &lt;span class=&quot;cm-operator&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;'from Future : &lt;/span&gt;${&lt;span class=&quot;cm-variable&quot;&gt;x&lt;/span&gt;}&lt;span class=&quot;cm-string&quot;&gt;'&lt;/span&gt;));&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;Future&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-builtin&quot;&gt;String&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;getData&lt;/span&gt;() &lt;span class=&quot;cm-keyword&quot;&gt;async&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;await&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;Future&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;delayed&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;Duration&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;seconds&lt;/span&gt;: &lt;span class=&quot;cm-number&quot;&gt;5&lt;/span&gt;)); &lt;span class=&quot;cm-comment&quot;&gt;// 5초간 대기&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;&quot;Fetched Data&quot;&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;cm-string&quot;&gt;&quot;5초 기다렸다가 온 데이터입니다&quot;&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 374px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 374px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;shell&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;shell&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;// 출력결과&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;iterable : &lt;span class=&quot;cm-number&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;iterable : &lt;span class=&quot;cm-number&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;iterable : &lt;span class=&quot;cm-number&quot;&gt;3&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;iterable : &lt;span class=&quot;cm-number&quot;&gt;4&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;iterable : &lt;span class=&quot;cm-number&quot;&gt;5&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;take : &lt;span class=&quot;cm-number&quot;&gt;0&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;take : &lt;span class=&quot;cm-number&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;take : &lt;span class=&quot;cm-number&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;take : &lt;span class=&quot;cm-number&quot;&gt;3&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;take : &lt;span class=&quot;cm-number&quot;&gt;4&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;Fetched Data&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;from Future : &lt;span class=&quot;cm-number&quot;&gt;5&lt;/span&gt;초 기다렸다가 온 데이터입니다&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 286px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 286px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;이해가 되었는가? 반복적인 작업을 하고 싶다면  Stream.periodic()을 쓰고,&lt;/p&gt;
&lt;p&gt;비동기 처리를 한다면 Stream.fromFuture()를 쓰도록 하자.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h4&gt;&lt;a name=&quot;header-n419&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;1.2. Stream - 처음, 끝의 데이터만 사용하기&lt;/h4&gt;&lt;p&gt;스트림 데이터를 다루는 방법은 다양하다.&lt;/p&gt;
&lt;p&gt;맨 앞의 데이터만 쓸 수도 있고,  맨 마지막의 데이터만 쓸 수도 있다.&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;dart&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;dart&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;stream&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;Stream&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;fromIterable&lt;/span&gt;([&lt;span class=&quot;cm-number&quot;&gt;1&lt;/span&gt;,&lt;span class=&quot;cm-number&quot;&gt;2&lt;/span&gt;,&lt;span class=&quot;cm-number&quot;&gt;3&lt;/span&gt;,&lt;span class=&quot;cm-number&quot;&gt;4&lt;/span&gt;,&lt;span class=&quot;cm-number&quot;&gt;5&lt;/span&gt;]);&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;stream&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;first&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;then&lt;/span&gt;((&lt;span class=&quot;cm-variable&quot;&gt;value&lt;/span&gt;) &lt;span class=&quot;cm-operator&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;&quot;stream.first: &lt;/span&gt;$&lt;span class=&quot;cm-variable&quot;&gt;value&lt;/span&gt;&lt;span class=&quot;cm-string&quot;&gt;&quot;&lt;/span&gt;)); &amp;nbsp;&lt;span class=&quot;cm-comment&quot;&gt;// 가장 앞의 데이터만 가져온다 - 결과 : 1&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;stream&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;Stream&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;fromIterable&lt;/span&gt;([&lt;span class=&quot;cm-number&quot;&gt;1&lt;/span&gt;,&lt;span class=&quot;cm-number&quot;&gt;2&lt;/span&gt;,&lt;span class=&quot;cm-number&quot;&gt;3&lt;/span&gt;,&lt;span class=&quot;cm-number&quot;&gt;4&lt;/span&gt;,&lt;span class=&quot;cm-number&quot;&gt;5&lt;/span&gt;]);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;stream&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;last&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;then&lt;/span&gt;((&lt;span class=&quot;cm-variable&quot;&gt;value&lt;/span&gt;) &lt;span class=&quot;cm-operator&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;&quot;stream.last: &lt;/span&gt;$&lt;span class=&quot;cm-variable&quot;&gt;value&lt;/span&gt;&lt;span class=&quot;cm-string&quot;&gt;&quot;&lt;/span&gt;)); &amp;nbsp;&lt;span class=&quot;cm-comment&quot;&gt;// 가장 마지막의 데이터만 가져옴 - 결과값 : 5&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;stream&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;Stream&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;fromIterable&lt;/span&gt;([&lt;span class=&quot;cm-number&quot;&gt;1&lt;/span&gt;,&lt;span class=&quot;cm-number&quot;&gt;2&lt;/span&gt;,&lt;span class=&quot;cm-number&quot;&gt;3&lt;/span&gt;,&lt;span class=&quot;cm-number&quot;&gt;4&lt;/span&gt;,&lt;span class=&quot;cm-number&quot;&gt;5&lt;/span&gt;]);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;stream&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;isEmpty&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;then&lt;/span&gt;((&lt;span class=&quot;cm-variable&quot;&gt;value&lt;/span&gt;) &lt;span class=&quot;cm-operator&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;&quot;stream.isEmpty: &lt;/span&gt;$&lt;span class=&quot;cm-variable&quot;&gt;value&lt;/span&gt;&lt;span class=&quot;cm-string&quot;&gt;&quot;&lt;/span&gt;)); &amp;nbsp;&lt;span class=&quot;cm-comment&quot;&gt;// 비어 있는지 확인 - false&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;stream&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;Stream&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;fromIterable&lt;/span&gt;([&lt;span class=&quot;cm-number&quot;&gt;10&lt;/span&gt;,&lt;span class=&quot;cm-number&quot;&gt;20&lt;/span&gt;,&lt;span class=&quot;cm-number&quot;&gt;30&lt;/span&gt;,&lt;span class=&quot;cm-number&quot;&gt;40&lt;/span&gt;,&lt;span class=&quot;cm-number&quot;&gt;50&lt;/span&gt;,&lt;span class=&quot;cm-number&quot;&gt;60&lt;/span&gt;]);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;stream&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;length&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;then&lt;/span&gt;((&lt;span class=&quot;cm-variable&quot;&gt;value&lt;/span&gt;) &lt;span class=&quot;cm-operator&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;&quot;stream.length: &lt;/span&gt;$&lt;span class=&quot;cm-variable&quot;&gt;value&lt;/span&gt;&lt;span class=&quot;cm-string&quot;&gt;&quot;&lt;/span&gt;)); &amp;nbsp;&lt;span class=&quot;cm-comment&quot;&gt;// 전체 길이 - 6&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 308px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 308px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;위의 예제를 잘 보면 스트림을 쓸때마다 계속 새로 만들어준다.&lt;/p&gt;
&lt;p&gt;여기서 드는 의문.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;stream.first 를 실행하고 stream.last 를 바로 실행할 수는 없는걸까? &lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;아쉽게도 안 된다. 스트림는 기본적으로 싱글 서브스크립션(Single Subscription)이다. 싱글 서브스크립션은 한군데서만 리슨할 수 있다. 여러군데서 리슨하려면 브로드캐스트(Broadcast)로 변경해줘야하는데 밑에서 알아보도록 하자.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h4&gt;&lt;a name=&quot;header-n428&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;1.3. Stream - 스트림 변경, StreamTransformer&lt;/h4&gt;&lt;p&gt;map을 쓰면 스트림을 어느정도는 변경할 수는 있다.&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;dart&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;dart&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;streamMap&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;Stream&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;periodic&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;Duration&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;milliseconds&lt;/span&gt;: &lt;span class=&quot;cm-number&quot;&gt;200&lt;/span&gt;), (&lt;span class=&quot;cm-variable&quot;&gt;x&lt;/span&gt;) &lt;span class=&quot;cm-operator&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;x&lt;/span&gt;).&lt;span class=&quot;cm-variable&quot;&gt;take&lt;/span&gt;(&lt;span class=&quot;cm-number&quot;&gt;3&lt;/span&gt;).&lt;span class=&quot;cm-variable&quot;&gt;map&lt;/span&gt;((&lt;span class=&quot;cm-variable&quot;&gt;x&lt;/span&gt;) &lt;span class=&quot;cm-operator&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;x&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;10&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;streamMap&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;listen&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;print&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 66px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 66px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;하지만 map만으로는 복잡한 처리를 하기 힘들다.&lt;/p&gt;
&lt;p&gt;StreamTransformer를 쓰면 스트림을 변경해 쓰기에 좋다.  &lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;dart&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;dart&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;transformer&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;StreamTransformer&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;fromHandlers&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;handleData&lt;/span&gt;: (&lt;span class=&quot;cm-variable&quot;&gt;value&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;sink&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &lt;span class=&quot;cm-tab&quot; role=&quot;presentation&quot; cm-text=&quot;	&quot;&gt; &lt;/span&gt;&lt;span class=&quot;cm-variable&quot;&gt;sink&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;add&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;&quot;First: &lt;/span&gt;$&lt;span class=&quot;cm-variable&quot;&gt;value&lt;/span&gt;&lt;span class=&quot;cm-string&quot;&gt;&quot;&lt;/span&gt;); &lt;span class=&quot;cm-comment&quot;&gt;// Stream Sink는 스트림 이벤트를 받아들이는 곳이다.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;sink&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;add&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;&quot;Second: &lt;/span&gt;$&lt;span class=&quot;cm-variable&quot;&gt;value&lt;/span&gt;&lt;span class=&quot;cm-string&quot;&gt;&quot;&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;});&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;stream&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;Stream&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;fromIterable&lt;/span&gt;([&lt;span class=&quot;cm-string&quot;&gt;&quot;Good&quot;&lt;/span&gt;,&lt;span class=&quot;cm-number&quot;&gt;1&lt;/span&gt;,&lt;span class=&quot;cm-number&quot;&gt;2&lt;/span&gt;,&lt;span class=&quot;cm-number&quot;&gt;3&lt;/span&gt;,&lt;span class=&quot;cm-number&quot;&gt;4&lt;/span&gt;,&lt;span class=&quot;cm-number&quot;&gt;5&lt;/span&gt;]);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;stream&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;transform&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;transformer&lt;/span&gt;).&lt;span class=&quot;cm-variable&quot;&gt;listen&lt;/span&gt;((&lt;span class=&quot;cm-variable&quot;&gt;value&lt;/span&gt;) &lt;span class=&quot;cm-operator&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;&quot;listen : &lt;/span&gt;$&lt;span class=&quot;cm-variable&quot;&gt;value&lt;/span&gt;&lt;span class=&quot;cm-string&quot;&gt;&quot;&lt;/span&gt;));&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 198px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 198px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;map만 썼을 때보다 활용도가 높다.&lt;/p&gt;&lt;h4&gt;&lt;a name=&quot;header-n435&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;1.4 Stream - async*, yield&lt;/h4&gt;&lt;p&gt;함수를 써서 스트림을 만드려면 어떻게 해야할까?&lt;/p&gt;
&lt;p&gt;아래 코드를 보자.&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;dart&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;dart&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;Stream&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-builtin&quot;&gt;int&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;createStream&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;List&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-builtin&quot;&gt;int&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;numbers&lt;/span&gt;) &lt;span class=&quot;cm-keyword&quot;&gt;async&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;*&lt;/span&gt; { &lt;span class=&quot;cm-comment&quot;&gt;// async*는 yield를 쓴다는 의미다.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;for&lt;/span&gt; (&lt;span class=&quot;cm-builtin&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;number&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;numbers&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;yield&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;number&lt;/span&gt;; &lt;span class=&quot;cm-comment&quot;&gt;// yield는 제너레이터를 만든단 뜻이다.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;main&lt;/span&gt;() {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;numStream&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;createStream&lt;/span&gt;([&lt;span class=&quot;cm-number&quot;&gt;1&lt;/span&gt;,&lt;span class=&quot;cm-number&quot;&gt;3&lt;/span&gt;,&lt;span class=&quot;cm-number&quot;&gt;5&lt;/span&gt;,&lt;span class=&quot;cm-number&quot;&gt;7&lt;/span&gt;,&lt;span class=&quot;cm-number&quot;&gt;9&lt;/span&gt;]); &lt;span class=&quot;cm-comment&quot;&gt;// 스트림을 만든다.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;numStream&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;listen&lt;/span&gt;((&lt;span class=&quot;cm-builtin&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;number&lt;/span&gt;) &lt;span class=&quot;cm-operator&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;number&lt;/span&gt;)); &lt;span class=&quot;cm-comment&quot;&gt;// 스트림으로부터 데이터를 받아서 출력을 한다.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 264px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 264px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;함수로 만든 스트림도 이전처럼 동작한다. 차이점은 async*와 yield를 써서 만들었단 점이다.&lt;/p&gt;
&lt;p&gt;async*와 yield가 어떤 뜻인지 알아보자.&lt;/p&gt;&lt;ul&gt;&lt;li&gt;async* : async*는 제너레이터를 만든단 뜻이다. 제너레이터는 게으르게(lazily) 데이터 연산을 할 때 쓰인다. 게으르다는 건 미리 연산을 다 하는 게 아니라, 요청이 있을때까지는 연산 하는 걸 미루어 두었다가 필요할 때 처리하는 걸 뜻한다.  &lt;/li&gt;&lt;li&gt;yield : return이랑 유사하다. return은 한번 리턴하면 함수가 종료되지만, yield는 열린 채로 있어서 필요할 때 다른 연산을 할 수 있다.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;async와 async*는 다르게 쓰이니 차이를 잘 알고 넘어가도록 하자.&lt;/p&gt;
&lt;p&gt;이제 스트림에 좀 익숙해졌을 거다.&lt;/p&gt;
&lt;p&gt;스트림을 더 써보기 전에 내부 동작을 알아보도록 하자.&lt;/p&gt;&lt;h3&gt;&lt;a name=&quot;header-n449&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;2. Stream 내부 동작 원리&lt;/h3&gt;&lt;p&gt;스트림은 3가지로 구성되어 있다.&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Stream&lt;/li&gt;&lt;li&gt;StreamSubscription : 스트림과 이벤트의 연결고리, 이벤트에 변경이 생기면 처리한다&lt;/li&gt;&lt;li&gt;데이터(이벤트)&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;아래 그림을 보고 각각의 역할이 어떤지 알아보도록 하자.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/13621579/47102596-1c72e380-d278-11e8-93f2-c1f564b6c2fd.png&quot; alt=&quot;alt text&quot; referrerpolicy=&quot;no-referrer&quot;&gt;&lt;/p&gt;
&lt;p&gt;[그림1]&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;dart&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;dart&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;streamIter&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;Stream&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;fromIterable&lt;/span&gt;([&lt;span class=&quot;cm-number&quot;&gt;10&lt;/span&gt;,&lt;span class=&quot;cm-number&quot;&gt;20&lt;/span&gt;,&lt;span class=&quot;cm-number&quot;&gt;30&lt;/span&gt;,&lt;span class=&quot;cm-number&quot;&gt;40&lt;/span&gt;,&lt;span class=&quot;cm-number&quot;&gt;50&lt;/span&gt;]);&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;StreamSubscription&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;subscription&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;streamIter&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;listen&lt;/span&gt;((&lt;span class=&quot;cm-builtin&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;number&lt;/span&gt;) &lt;span class=&quot;cm-operator&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;number&lt;/span&gt;));&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;subscription&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;cancel&lt;/span&gt;() &lt;span class=&quot;cm-comment&quot;&gt;// 연결 해제&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 88px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 88px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;그림에서도 볼 수 있듯이 스트림은 이벤트 소스와 연결되어 있다.&lt;/p&gt;&lt;ul&gt;&lt;li&gt;listen 하기 전 : 강한 연결, 진한 화살표&lt;/li&gt;&lt;li&gt;listen 한 후 : 약한 연결, 흐린 화살표, &lt;em&gt;StreamSubscription과 EventSource가 연결됨&lt;/em&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;앞에선 listen()에서 이벤트 처리를 하는 것 같았지만, 실제로는 StreamSubscription에서 이벤트 콜백을 다룬다. 새로운 이벤트가 생기거나, 에러가 생기면, StreamSubscription에서 이를 처리한다. 뿐만 아니라 StreamSubscription은 이벤트 소스와의 연결도 끊어버릴 수 있다.&lt;/p&gt;
&lt;p&gt;StreamSubscription은 이벤트 처리를 콜백을 정해서 한다.&lt;/p&gt;
&lt;p&gt;2가지 방법이 있는데 아래 코드를 보자.&lt;/p&gt;&lt;ul&gt;&lt;li&gt;onData, onError, onDone을 subscription에서 정의&lt;/li&gt;&lt;/ul&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;dart&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;dart&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-builtin&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;stream&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;Stream&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;periodic&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;Duration&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;milliseconds&lt;/span&gt;: &lt;span class=&quot;cm-number&quot;&gt;200&lt;/span&gt;), (&lt;span class=&quot;cm-variable&quot;&gt;x&lt;/span&gt;) &lt;span class=&quot;cm-operator&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;x&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;StreamSubscription&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;subscription&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;stream&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;listen&lt;/span&gt;(&lt;span class=&quot;cm-atom&quot;&gt;null&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;subscription&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;onData&lt;/span&gt;((&lt;span class=&quot;cm-variable&quot;&gt;value&lt;/span&gt;) { &lt;span class=&quot;cm-comment&quot;&gt;// onData : 데이터를 하나씩 처리할때&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;&quot;listen stream : &lt;/span&gt;$&lt;span class=&quot;cm-variable&quot;&gt;value&lt;/span&gt;&lt;span class=&quot;cm-string&quot;&gt;&quot;&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;if&lt;/span&gt; (&lt;span class=&quot;cm-variable&quot;&gt;value&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;10&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;subscription&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;cancel&lt;/span&gt;();&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  });&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;subscription&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;onError&lt;/span&gt;((&lt;span class=&quot;cm-variable&quot;&gt;err&lt;/span&gt;) &lt;span class=&quot;cm-operator&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;&quot;error : &lt;/span&gt;$&lt;span class=&quot;cm-variable&quot;&gt;err&lt;/span&gt;&lt;span class=&quot;cm-string&quot;&gt;&quot;&lt;/span&gt;)); &lt;span class=&quot;cm-comment&quot;&gt;// 에러가 났을때&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;subscription&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;onDone&lt;/span&gt;(() &lt;span class=&quot;cm-operator&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;&quot;on done&quot;&lt;/span&gt;)); &lt;span class=&quot;cm-comment&quot;&gt;// 더 받을 데이터가 없을때&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 242px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 242px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;ul&gt;&lt;li&gt;listen 내부에 정의&lt;/li&gt;&lt;/ul&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;dart&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;dart&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;stream&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;Stream&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;periodic&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;Duration&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;milliseconds&lt;/span&gt;: &lt;span class=&quot;cm-number&quot;&gt;200&lt;/span&gt;), (&lt;span class=&quot;cm-variable&quot;&gt;x&lt;/span&gt;) &lt;span class=&quot;cm-operator&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;x&lt;/span&gt;).&lt;span class=&quot;cm-variable&quot;&gt;take&lt;/span&gt;(&lt;span class=&quot;cm-number&quot;&gt;10&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;subscription&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;stream&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;listen&lt;/span&gt;((&lt;span class=&quot;cm-variable&quot;&gt;x&lt;/span&gt;) &lt;span class=&quot;cm-operator&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;print&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;onDone&lt;/span&gt;: () {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;&quot;on done&quot;&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-tab&quot; role=&quot;presentation&quot; cm-text=&quot;	&quot;&gt;    &lt;/span&gt; },&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;onError&lt;/span&gt;: () {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;&quot;on error&quot;&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;});&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 176px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 176px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;사용법은 다르지만 동작은 동일하다.&lt;/p&gt;
&lt;p&gt;취향에 맞게 사용하도록 하자.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h4&gt;&lt;a name=&quot;header-n482&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;Stream - BroadCast&lt;/h4&gt;&lt;p&gt;기본적으로 만들어지는 스트림은 한 곳에서만 listen할 수 있다.&lt;/p&gt;
&lt;p&gt;아래 코드를 실행해보면 에러가 난다.&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;dart&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;dart&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;stream&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;Stream&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;periodic&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;Duration&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;milliseconds&lt;/span&gt;: &lt;span class=&quot;cm-number&quot;&gt;200&lt;/span&gt;), (&lt;span class=&quot;cm-variable&quot;&gt;x&lt;/span&gt;) &lt;span class=&quot;cm-operator&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;x&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;  .&lt;span class=&quot;cm-variable&quot;&gt;where&lt;/span&gt;((&lt;span class=&quot;cm-variable&quot;&gt;x&lt;/span&gt;) &lt;span class=&quot;cm-operator&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;x&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;%&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;2&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;0&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;  .&lt;span class=&quot;cm-variable&quot;&gt;take&lt;/span&gt;(&lt;span class=&quot;cm-number&quot;&gt;3&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;stream&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;listen&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;print&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;stream&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;listen&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;print&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 110px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 110px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;여러 곳에서 listen을 하려면 브로드캐스트를 사용해야한다.&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;dart&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;dart&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;sc&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;StreamController&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;broadcast&lt;/span&gt;(); &lt;span class=&quot;cm-comment&quot;&gt;//&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;broadcastStream&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;sc&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;stream&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;broadcastStream&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;listen&lt;/span&gt;((&lt;span class=&quot;cm-variable&quot;&gt;v&lt;/span&gt;) &lt;span class=&quot;cm-operator&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;'broadcast1 &lt;/span&gt;${&lt;span class=&quot;cm-variable&quot;&gt;v&lt;/span&gt;}&lt;span class=&quot;cm-string&quot;&gt;'&lt;/span&gt;));&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;broadcastStream&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;listen&lt;/span&gt;((&lt;span class=&quot;cm-variable&quot;&gt;v&lt;/span&gt;) &lt;span class=&quot;cm-operator&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;'broadcast2 &lt;/span&gt;${&lt;span class=&quot;cm-variable&quot;&gt;v&lt;/span&gt;}&lt;span class=&quot;cm-string&quot;&gt;'&lt;/span&gt;));&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;sc&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;add&lt;/span&gt;(&lt;span class=&quot;cm-number&quot;&gt;10&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;sc&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;add&lt;/span&gt;(&lt;span class=&quot;cm-number&quot;&gt;20&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 176px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 176px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;실행하고 출력을 확인해보자.&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;shell&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;shell&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;broadcast1 &lt;span class=&quot;cm-number&quot;&gt;10&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;broadcast2 &lt;span class=&quot;cm-number&quot;&gt;10&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;broadcast1 &lt;span class=&quot;cm-number&quot;&gt;20&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;broadcast2 &lt;span class=&quot;cm-number&quot;&gt;20&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 88px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 88px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;여러번 리슨할 경우 각각의 데이터를 따로 처리하는 걸 알 수 있다.&lt;/p&gt;
&lt;p&gt;같은 데이터를 다른 뷰에서 처리할 때 효과적으로 쓸 수 있겠다.&lt;/p&gt;
&lt;p&gt;요약하면 다음과 같다.&lt;/p&gt;&lt;ul&gt;&lt;li&gt;single - listen을 한번만 할 수 있음, 기본 스트림 컨트롤러임.&lt;/li&gt;&lt;li&gt;broadcast - listen을 여러번 할 수 있음.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/13621579/47102614-24328800-d278-11e8-9791-e61aa15c5873.png&quot; alt=&quot;alt text&quot; referrerpolicy=&quot;no-referrer&quot;&gt;&lt;/p&gt;
&lt;p&gt;[그림2]&lt;/p&gt;&lt;h3&gt;&lt;a name=&quot;header-n500&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;3. StreamController&lt;/h3&gt;&lt;p&gt;Stream을 매번 열었다가(listen) 닫는 건(cancel) 비효율적이다.&lt;/p&gt;
&lt;p&gt;게다가 스트림이 여러 개일때는 모든 스트림을 일일이 닫는 건 비효율적이다. 여러 스트림을 관리하기 위해 StreamController를 쓴다.&lt;/p&gt;
&lt;p&gt;아래의 예제를 보자.&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;dart&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;dart&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;final&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;StreamController&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;ctrl&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;StreamController&lt;/span&gt;();&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;final&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;StreamSubscription&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;subscription&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;ctrl&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;stream&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;listen&lt;/span&gt;((&lt;span class=&quot;cm-variable&quot;&gt;data&lt;/span&gt;) &lt;span class=&quot;cm-operator&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;data&lt;/span&gt;)); &lt;span class=&quot;cm-comment&quot;&gt;// 데이터가 더해질때마다 print 한다.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;ctrl&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;add&lt;/span&gt;(&lt;span class=&quot;cm-number&quot;&gt;10&lt;/span&gt;); &lt;span class=&quot;cm-comment&quot;&gt;// 데이터 추가&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;ctrl&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;add&lt;/span&gt;(&lt;span class=&quot;cm-number&quot;&gt;200&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;ctrl&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;add&lt;/span&gt;(&lt;span class=&quot;cm-number&quot;&gt;300&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;ctrl&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;close&lt;/span&gt;(); &lt;span class=&quot;cm-comment&quot;&gt;// 컨트롤러 닫음&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-comment&quot;&gt;//final StreamSubscription subscription2 = ctrl.stream.listen((data) =&amp;gt; print(data)); // 에러발생! listen을 여러번 하는 건 안됨. 스트림을 브로드캐스트로 바꿔줘야함.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;ctrl&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;add&lt;/span&gt;(&lt;span class=&quot;cm-number&quot;&gt;950&lt;/span&gt;); &lt;span class=&quot;cm-comment&quot;&gt;// 위에서 컨트롤러가 닫혔기에 출력되지 않음.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 308px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 308px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;스트림 컨트롤러에 데이터가 더해질때마다 값을 출력한다. 스트림 컨트롤러가 닫기 전까지만 이벤트를 처리한다.&lt;/p&gt;
&lt;p&gt;아래 그림2을 보자. 위의 [그림1]과 유사한데, 스트림 컨트롤러만 추가되었다.&lt;/p&gt;
&lt;p&gt;스트림 컨트롤러를 쓰면 여러 스트림을 한꺼번의 관리할 수 있기에, 앱을 제작할 때 도움이 된다.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/13621579/47102606-21d02e00-d278-11e8-9693-521f9838e314.png&quot; alt=&quot;alt text&quot; referrerpolicy=&quot;no-referrer&quot;&gt;&lt;/p&gt;
&lt;p&gt;[그림3]&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h3&gt;&lt;a name=&quot;header-n512&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;마무리&lt;/h3&gt;&lt;p&gt;스트림을 쓰면 비동기 상황에 대처하거나, 반응형 프로그램을 만들기에 좋다. &lt;/p&gt;
&lt;p&gt;스트림을 익혀서 좀 더 쾌적한 프로그램을 만들어보도록 하자.&lt;/p&gt;
&lt;p&gt;다음에는 플러터에서 어떻게 스트림이 쓰이는지 알아보자. &lt;/p&gt;
&lt;p&gt;참고 - &lt;a href=&quot;https://www.dartlang.org/articles/libraries/broadcast-streams&quot; target=&quot;_blank&quot; class=&quot;url&quot;&gt;https://www.dartlang.org/articles/libraries/broadcast-streams&lt;/a&gt; (그림출처)&lt;/p&gt;
&lt;p&gt;참고 - &lt;a href=&quot;http://dartdoc.takyam.com/docs/tutorials/streams/&quot; target=&quot;_blank&quot; class=&quot;url&quot;&gt;http://dartdoc.takyam.com/docs/tutorials/streams/&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;</description>
      <category>플러터(Flutter)</category>
      <category>DART</category>
      <category>dart stream subscription</category>
      <category>flutter stream</category>
      <category>flutter stream subscription</category>
      <category>Stream</category>
      <category>stream controller</category>
      <category>stream subscription</category>
      <category>다트</category>
      <category>다트 스트림</category>
      <category>스트림</category>
      <category>플러터 스트림</category>
      <category>플루터 스트림</category>
      <author>에드 신</author>
      <guid isPermaLink="true">https://software-creator.tistory.com/9</guid>
      <comments>https://software-creator.tistory.com/9#entry9comment</comments>
      <pubDate>Thu, 25 Oct 2018 13:13:33 +0900</pubDate>
    </item>
    <item>
      <title>코딩 시작하기 - 어떤 프로그래밍 언어를 고를까</title>
      <link>https://software-creator.tistory.com/8</link>
      <description>&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;프로그래밍 언어를 고르는 건 쉽지 않다. 특히 코딩을 처음 배우는 경우는 더욱 어렵다.&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;&lt;br data-mce-bogus=&quot;1&quot;&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;C, 자바, 파이썬, R, 자바스크립트, 스위프트, 코틀린 등 언어의 종류가 한 두개가 아니다.&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;&lt;br data-mce-bogus=&quot;1&quot;&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;음식도 설렁탕 하나만 파는 곳이면 고르기가 쉬운데&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;&lt;br data-mce-bogus=&quot;1&quot;&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;김밥 천국에 가면 메뉴가 너무 많아서 고민된다.&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;&lt;br data-mce-bogus=&quot;1&quot;&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;그래서인지 주변의 비전공자들이 항상 묻는 질문이 있다.&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;&quot;어떤 언어 배울까요?&quot;&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;본론부터 말하면 '파이썬', '자바 스크립트', '자바' 중에 하나를 고르기를 권한다.&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;언어를 고를 때는 &lt;b&gt;난이도, 배우는 목적, 대중성&lt;/b&gt;을 항상 고려해야한다.&lt;/div&gt;
&lt;script async=&quot;&quot; src=&quot;//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js&quot;&gt;&lt;/script&gt;
&lt;ins class=&quot;adsbygoogle&quot; style=&quot;display:block; text-align:center;&quot; data-ad-layout=&quot;in-article&quot; data-ad-format=&quot;fluid&quot; data-ad-client=&quot;ca-pub-1354028625691685&quot; data-ad-slot=&quot;5868073117&quot;&gt;&lt;/ins&gt;
&lt;script&gt;
     (adsbygoogle = window.adsbygoogle || []).push({});
&lt;/script&gt;&lt;div style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;그래야 배우기가 수월하기 때문이다.&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;'파이썬', '자바 스크립트', '자바'를 추천하는 이유를 알고 싶으면 더 읽어보도록 하자.&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;아니면 바로 '파이썬'을 받아서 배워보는 것도 좋다.&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;그럼 왜 저 3개의 언어를 추천하는지 알아보도록 하겠다.&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;&lt;br data-mce-bogus=&quot;1&quot;&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;&lt;b&gt;1. 난이도 - 프로그래밍 언어에 따라 차이가 크다.&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;처음 코딩을 배울 때는 언어가 얼마나 쉽냐 어렵냐가 중요하다.&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;&lt;br data-mce-bogus=&quot;1&quot;&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;코딩이라고 해서 다 똑같지 않다.&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;외국어도 난이도가 다르듯이, 프로그래밍 언어도 난이도 차이가 있다.&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;&lt;br data-mce-bogus=&quot;1&quot;&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;예컨데, 한국 사람이 중국어를 배우려면 성조, 한자, 광동어, 발음 배우기 등 알아야할 게 어마어마하게 많다.&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;&lt;br data-mce-bogus=&quot;1&quot;&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;반면 일본어는 문자만 배우면 금방 읽을 수 있고, 여행할 수준까지는 쉽게 배울 수 있다.&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;&lt;br data-mce-bogus=&quot;1&quot;&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;'파이썬', '자바스크립트'는 비교적 난이도가 낮은 편이고, 몇몇 개념만 익히면 금방 배워나갈 수 있다.&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;작은 웹사이트 만드는 법이나 간단한 데이터 분석은 1~2달이면 배울 수 있다.&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;&lt;br data-mce-bogus=&quot;1&quot;&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;반면 '자바', 'C'는 난이도가 제법 있는 편이다.&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;문법 배우다 보면 1~2달은 금방 지나간다.&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;준비시간만 2달이니 성취감을 느끼기가 어렵다.&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;하루하루 발전해야 재미를 느낄 수 있고, 재미를 느껴야 더 열심히 하게 된다.&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;그래서 쉽게 익힐 수 있는 '파이썬'과 '자바 스크립트'를 초보자에게 권한다.&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;&lt;br data-mce-bogus=&quot;1&quot;&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;개인적으로 생각하는 난이도를 적어보았으니 참고하도록 하자.&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;&lt;br data-mce-bogus=&quot;1&quot;&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;파이썬 ★&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;자바스크립트 ★★&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;자바 ★★★★&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;코틀린 ★★★☆&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;스위프트 ★★★☆&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;C ★★★★&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;C++ ★★★★★&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;파이썬이나&amp;nbsp;자바스크립트는&amp;nbsp;뭔가 빠진 건 아닌가요 하는 의문이 들 수도 있는데 그렇지 않다.&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;&lt;br data-mce-bogus=&quot;1&quot;&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;다른 언어들과 유사한 방식으로 만들어졌으며, 다만 편의를 위해 조금 생략이 있을 뿐이다.&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;&lt;br data-mce-bogus=&quot;1&quot;&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;파이썬, 자바스크립트로 시작해도 다른 언어를 배우는 데 문제가 없다.&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;오히려 파이썬, 자바스크립트를 배우고 다른 언어를 배우면 속도가 더 빠르다.&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;프로그래밍 언어는 어느정도는 비슷한 면이 있기 때문이다.&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;&lt;br data-mce-bogus=&quot;1&quot;&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;쉬운 언어로 자신감을 얻고 다른 언어로 넘어가는 걸 추천한다.&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;&lt;br data-mce-bogus=&quot;1&quot;&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;난이도 다음으로 중요한 건 목적이다.&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;&lt;b&gt;2. 목적 - 코딩을 왜 배우려는가&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;&lt;br data-mce-bogus=&quot;1&quot;&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;코딩을 처음 배울 때는 파이썬과 자바스크립트를 추천하지만 다른 선택을 해야할 때도 있다.&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;&lt;br data-mce-bogus=&quot;1&quot;&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;지구를 2시간만에 도는 초음속 비행기도 바닷가에 가면, 돛단배보다 쓸모 없는 것처럼&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;&lt;br data-mce-bogus=&quot;1&quot;&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;목적에 맞는 프로그래밍 언어를 택해야한다.&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;&lt;br data-mce-bogus=&quot;1&quot;&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;보통 코딩을 배우는 목적은 6가지다&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;&lt;br data-mce-bogus=&quot;1&quot;&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;1. IT 분야에서 일하는 데 도움이 될 것 같아서&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;2. 웹 사이트를 만들어 보고 싶다&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;3. 앱을 만들어 보고 싶다&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;4. 데이터 분석이나 인공지능을 배워보고 싶다.&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;5. IT가 빠르게 발전하니 자기 계발을 위해서&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;6. 남들이 한다니깐&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;1,2,5,6의 경우 파이썬과 자바스크립트 중 하나를 배우면 되고&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;4의 경우 파이썬을 배우면 된다.&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;반면 앱을 배우려면 자바나 코틀린,스위프트를 배워야한다.&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;&lt;br data-mce-bogus=&quot;1&quot;&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;IOT 기기를 만들고 싶다면 C를 배워야한다.&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;&lt;br data-mce-bogus=&quot;1&quot;&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;게임을 만들고 싶다면 C++을 배워야한다.&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;목적에 안 맞는 언어를 배우면 아무리 공부를 많이 해도 의미가 없다.&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;중국 여행을 간다면 중국어를 공부해야지, 수학만 100시간 공부하고 가면 소용없다.&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;자신의 목적에 맞는 언어를 택하도록 하자.&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;간단히 언어별 용도를 정리해 보았다. 선택을 할때 참고하도록 하자.&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;&lt;br data-mce-bogus=&quot;1&quot;&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em;&quot;&gt;파이썬 - 데이터 분석, 인공지능, 웹사이트, 서버&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em;&quot;&gt;자바스크립트 - 웹사이트, 서버&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em;&quot;&gt;자바 - 거의 다 가능&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em;&quot;&gt;코틀린 - 앱&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em;&quot;&gt;스위프트 - 앱&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em;&quot;&gt;C - 하드웨어, 시스템 프로그래밍&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em;&quot;&gt;C++ - 게임, 이미지 프로세싱, 서버, 인공지능 등&lt;/div&gt;&lt;br data-mce-bogus=&quot;1&quot;&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;파이썬과 자바가 제일 널리 쓰인다.&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;범용성 측면에서는 파이썬이 최고다.&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;앱을 만들게 아니면 파이썬부터 시작하도록 하자.&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;자바도 여러 방면에 두루 쓰이지만 첫 언어로는 좀 어려울 수 있다.&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;&lt;br data-mce-bogus=&quot;1&quot;&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;파이썬을 정복하고 자바를 시작하면, 자바도 그리 어렵지 않게 느껴질 것이다.&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;&lt;br data-mce-bogus=&quot;1&quot;&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;다음으로 봐야될 건 대중성이다. 많은 사람이 쓰는 언어가 배우기에 좋다.&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;&lt;br data-mce-bogus=&quot;1&quot;&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;&lt;b&gt;3. 대중성 - 얼마나 많은 사람이 쓰는가&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;&lt;br data-mce-bogus=&quot;1&quot;&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;처음에는 많은 사람들이 쓰는 언어를 배우는 게 좋다.&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;&lt;br data-mce-bogus=&quot;1&quot;&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;인터넷 상에도 자료가 많고, 어떻게 배웠는지 경험담도 많고, 코딩하다가 안 풀릴 때 해결책도 많다.&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;시중의 책 절반이 자바이고, 나머지 책의 30%는 파이썬이다.&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;그만큼 널리 쓰이고 있기에 선생님이나 같이 배울 사람을 찾기도 쉽다.&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;첫 언어는 대중적이고 쉬운 걸 택하는 게 좋다.&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;그래야 포기하지 않고 꾸준히 공부할 수 있다.&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;또 대중적인 언어를 고르면 중급자용 책이나 강의를 구하기도 쉽다.&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;책이나 강의도 수요가 있어야 팔리는데, 너무 소수만 쓰는 언어는 기초 서적도 잘 없다.&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;반면 자바는 초~고급 서적까지 다 있고, 파이썬은 최근 1~2년 사이에 관련 서적이 대거 출판되고 있다.&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;자바스크립트도 자바나 파이썬 만큼은 아니지만 충분한 자료가 있는 편이다.&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;대중성을 고려해서도 파이썬, 자바스크립트는 훌륭한 선택이다.&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;&lt;br data-mce-bogus=&quot;1&quot;&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;&lt;b&gt;마무리&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;&lt;br data-mce-bogus=&quot;1&quot;&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;어떤 한 언어를 배운다고 다른 언어를 못 배우는 건 아니다.&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;&lt;br data-mce-bogus=&quot;1&quot;&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;다만 조금 더 자신에게 맞는 선택을 하면 빠르게 결과를 볼 수 있다.&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;&lt;br data-mce-bogus=&quot;1&quot;&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;난 처음 코딩을 배울 때 파이썬 -&amp;gt; 자바 -&amp;gt; 자바스크립트 순으로 배웠는데&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;&lt;br data-mce-bogus=&quot;1&quot;&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;덕분에 코딩을 계속 배울 수 있었다. 반면 C 나 자바로 시작한 많은 학생들은 코딩을 어렵게 생각하고 포기했다.&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;적절한 선택을 하는 건 정말 중요하다.&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;&lt;br data-mce-bogus=&quot;1&quot;&gt;&lt;/div&gt;&lt;div style=&quot;margin: 0px; padding: 0px; border: 0px; line-height: 1.57143em; font-family: gotham, helvetica, arial, sans-serif; font-size: 14px; color: rgb(56, 56, 56);&quot;&gt;코딩을 배우고 나면 많은 게 달리 보인다. 꼭 코딩을 꾸준히 배워 다른 세상을 경험하기를..&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</description>
      <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>에드 신</author>
      <guid isPermaLink="true">https://software-creator.tistory.com/8</guid>
      <comments>https://software-creator.tistory.com/8#entry8comment</comments>
      <pubDate>Thu, 25 Oct 2018 02:37:24 +0900</pubDate>
    </item>
    <item>
      <title>안드로이드 레이아웃, 생명주기</title>
      <link>https://software-creator.tistory.com/7</link>
      <description>&lt;meta charset=&quot;UTF-8&quot;&gt;&lt;meta name=&quot;viewport&quot; content=&quot;width=device-width initial-scale=1&quot;&gt;
&lt;title&gt;안드로이드 레이아웃, 생명주기&lt;/title&gt;&lt;link href=&quot;https://fonts.googleapis.com/css?family=Open+Sans:400italic,700italic,700,400&amp;amp;subset=latin,latin-ext&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot;&gt;&lt;style type=&quot;text/css&quot;&gt;html {overflow-x: initial !important;}:root { --bg-color: #ffffff; --text-color: #333333; --select-text-bg-color: #B5D6FC; --select-text-font-color: auto; --monospace: &quot;Lucida Console&quot;,Consolas,&quot;Courier&quot;,monospace; }
html { font-size: 14px; background-color: var(--bg-color); color: var(--text-color); font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; -webkit-font-smoothing: antialiased; }
body { margin: 0px; padding: 0px; height: auto; bottom: 0px; top: 0px; left: 0px; right: 0px; font-size: 1rem; line-height: 1.42857143; overflow-x: hidden; background-image: inherit; background-size: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: inherit; background-position: inherit inherit; background-repeat: inherit inherit; }
iframe { margin: auto; }
a.url { word-break: break-all; }
a:active, a:hover { outline: 0px; }
.in-text-selection, ::selection { text-shadow: none; background: var(--select-text-bg-color); color: var(--select-text-font-color); }
#write { margin: 0px auto; height: auto; width: inherit; word-break: normal; word-wrap: break-word; position: relative; white-space: normal; padding-bottom: 70px; overflow-x: visible; }
.first-line-indent #write div, .first-line-indent #write li, .first-line-indent #write p { text-indent: 2em; }
.first-line-indent #write div :not(p):not(div), .first-line-indent #write div.md-htmlblock-container, .first-line-indent #write p *, .first-line-indent pre { text-indent: 0px; }
.for-image #write { padding-left: 8px; padding-right: 8px; }
body.typora-export { padding-left: 30px; padding-right: 30px; }
@media screen and (max-width: 500px) { 
  body.typora-export { padding-left: 0px; padding-right: 0px; }
  .CodeMirror-sizer { margin-left: 0px !important; }
  .CodeMirror-gutters { display: none !important; }
}
#write &gt; blockquote:first-child, #write &gt; div:first-child, #write &gt; figure:first-child, #write &gt; ol:first-child, #write &gt; p:first-child, #write &gt; pre:first-child, #write &gt; ul:first-child { margin-top: 30px; }
#write li &gt; figure:first-child { margin-top: -20px; }
#write ol, #write ul { position: relative; }
img { max-width: 100%; vertical-align: middle; }
button, input, select, textarea { color: inherit; font-family: inherit; font-size: inherit; font-style: inherit; font-variant-caps: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; }
input[type=&quot;checkbox&quot;], input[type=&quot;radio&quot;] { line-height: normal; padding: 0px; }
*, ::after, ::before { box-sizing: border-box; }
#write h1, #write h2, #write h3, #write h4, #write h5, #write h6, #write p, #write pre { width: inherit; }
#write h1, #write h2, #write h3, #write h4, #write h5, #write h6, #write p { position: relative; }
h1, h2, h3, h4, h5, h6 { break-after: avoid-page; break-inside: avoid; orphans: 2; }
p { orphans: 4; }
h1 { font-size: 2rem; }
h2 { font-size: 1.8rem; }
h3 { font-size: 1.6rem; }
h4 { font-size: 1.4rem; }
h5 { font-size: 1.2rem; }
h6 { font-size: 1rem; }
.md-math-block, .md-rawblock, h1, h2, h3, h4, h5, h6, p { margin-top: 1rem; margin-bottom: 1rem; }
.hidden { display: none; }
.md-blockmeta { color: rgb(204, 204, 204); font-weight: 700; font-style: italic; }
a { cursor: pointer; }
sup.md-footnote { padding: 2px 4px; background-color: rgba(238, 238, 238, 0.701961); color: rgb(85, 85, 85); border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; cursor: pointer; }
sup.md-footnote a, sup.md-footnote a:hover { color: inherit; text-transform: inherit; text-decoration: inherit; }
#write input[type=&quot;checkbox&quot;] { cursor: pointer; width: inherit; height: inherit; }
figure { overflow-x: auto; margin: 1.2em 0px; max-width: calc(100% + 16px); padding: 0px; }
figure &gt; table { margin: 0px !important; }
tr { break-inside: avoid; break-after: auto; }
thead { display: table-header-group; }
table { border-collapse: collapse; border-spacing: 0px; width: 100%; overflow: auto; break-inside: auto; text-align: left; }
table.md-table td { min-width: 80px; }
.CodeMirror-gutters { border-right-width: 0px; background-color: inherit; }
.CodeMirror { text-align: left; }
.CodeMirror-placeholder { opacity: 0.3; }
.CodeMirror pre { padding: 0px 4px; }
.CodeMirror-lines { padding: 0px; }
div.hr:focus { cursor: none; }
#write pre { white-space: pre-wrap; }
#write.fences-no-line-wrapping pre { white-space: pre; }
#write pre.ty-contain-cm { white-space: normal; }
.CodeMirror-gutters { margin-right: 4px; }
.md-fences { font-size: 0.9rem; display: block; break-inside: avoid; text-align: left; overflow: visible; white-space: pre; background-image: inherit; background-size: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: inherit; position: relative !important; background-position: inherit inherit; background-repeat: inherit inherit; }
.md-diagram-panel { width: 100%; margin-top: 10px; text-align: center; padding-top: 0px; padding-bottom: 8px; overflow-x: auto; }
#write .md-fences.mock-cm { white-space: pre-wrap; }
.md-fences.md-fences-with-lineno { padding-left: 0px; }
#write.fences-no-line-wrapping .md-fences.mock-cm { white-space: pre; overflow-x: auto; }
.md-fences.mock-cm.md-fences-with-lineno { padding-left: 8px; }
.CodeMirror-line, twitterwidget { break-inside: avoid; }
.footnotes { opacity: 0.8; font-size: 0.9rem; margin-top: 1em; margin-bottom: 1em; }
.footnotes + .footnotes { margin-top: 0px; }
.md-reset { margin: 0px; padding: 0px; border: 0px; outline: 0px; vertical-align: top; text-decoration: none; text-shadow: none; float: none; position: static; width: auto; height: auto; white-space: nowrap; cursor: inherit; line-height: normal; font-weight: 400; text-align: left; box-sizing: content-box; direction: ltr; background-position: 0px 0px; background-repeat: initial initial; }
li div { padding-top: 0px; }
blockquote { margin: 1rem 0px; }
li .mathjax-block, li p { margin: 0.5rem 0px; }
li { margin: 0px; position: relative; }
blockquote &gt; :last-child { margin-bottom: 0px; }
blockquote &gt; :first-child, li &gt; :first-child { margin-top: 0px; }
.footnotes-area { color: rgb(136, 136, 136); margin-top: 0.714rem; padding-bottom: 0.143rem; white-space: normal; }
#write .footnote-line { white-space: pre-wrap; }
@media print { 
  body, html { border: 1px solid transparent; height: 99%; break-after: avoid-page; break-before: avoid-page; }
  #write { margin-top: 0px; border-color: transparent !important; }
  .typora-export * { -webkit-print-color-adjust: exact; }
  html.blink-to-pdf { font-size: 13px; }
  .typora-export #write { padding-left: 1cm; padding-right: 1cm; padding-bottom: 0px; break-after: avoid-page; }
  .typora-export #write::after { height: 0px; }
  @page { margin: 20mm 0px; }
}
.footnote-line { margin-top: 0.714em; font-size: 0.7em; }
a img, img a { cursor: pointer; }
pre.md-meta-block { font-size: 0.8rem; min-height: 0.8rem; white-space: pre-wrap; background-color: rgb(204, 204, 204); display: block; overflow-x: hidden; background-position: initial initial; background-repeat: initial initial; }
p &gt; img:only-child { display: block; margin: auto; }
p &gt; .md-image:only-child { display: inline-block; width: 100%; text-align: center; }
#write .MathJax_Display { margin: 0.8em 0px 0px; }
.md-math-block { width: 100%; }
.md-math-block:not(:empty)::after { display: none; }
[contenteditable=&quot;true&quot;]:active, [contenteditable=&quot;true&quot;]:focus { outline: 0px; box-shadow: none; }
.md-task-list-item { position: relative; list-style-type: none; }
.task-list-item.md-task-list-item { padding-left: 0px; }
.md-task-list-item &gt; input { position: absolute; top: 0px; left: 0px; margin-left: -1.2em; margin-top: calc(1em - 10px); }
.math { font-size: 1rem; }
.md-toc { min-height: 3.58rem; position: relative; font-size: 0.9rem; border-top-left-radius: 10px; border-top-right-radius: 10px; border-bottom-right-radius: 10px; border-bottom-left-radius: 10px; }
.md-toc-content { position: relative; margin-left: 0px; }
.md-toc-content::after, .md-toc::after { display: none; }
.md-toc-item { display: block; color: rgb(65, 131, 196); }
.md-toc-item a { text-decoration: none; }
.md-toc-inner:hover { }
.md-toc-inner { display: inline-block; cursor: pointer; }
.md-toc-h1 .md-toc-inner { margin-left: 0px; font-weight: 700; }
.md-toc-h2 .md-toc-inner { margin-left: 2em; }
.md-toc-h3 .md-toc-inner { margin-left: 4em; }
.md-toc-h4 .md-toc-inner { margin-left: 6em; }
.md-toc-h5 .md-toc-inner { margin-left: 8em; }
.md-toc-h6 .md-toc-inner { margin-left: 10em; }
@media screen and (max-width: 48em) { 
  .md-toc-h3 .md-toc-inner { margin-left: 3.5em; }
  .md-toc-h4 .md-toc-inner { margin-left: 5em; }
  .md-toc-h5 .md-toc-inner { margin-left: 6.5em; }
  .md-toc-h6 .md-toc-inner { margin-left: 8em; }
}
a.md-toc-inner { font-size: inherit; font-style: inherit; font-weight: inherit; line-height: inherit; }
.footnote-line a:not(.reversefootnote) { color: inherit; }
.md-attr { display: none; }
.md-fn-count::after { content: &quot;.&quot;; }
code, pre, samp, tt { font-family: var(--monospace); }
kbd { margin: 0px 0.1em; padding: 0.1em 0.6em; font-size: 0.8em; color: rgb(36, 39, 41); background-color: rgb(255, 255, 255); border: 1px solid rgb(173, 179, 185); border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; box-shadow: rgba(12, 13, 14, 0.2) 0px 1px 0px, rgb(255, 255, 255) 0px 0px 0px 2px inset; white-space: nowrap; vertical-align: middle; background-position: initial initial; background-repeat: initial initial; }
.md-comment { color: rgb(162, 127, 3); opacity: 0.8; font-family: var(--monospace); }
code { text-align: left; }
a.md-print-anchor { white-space: pre !important; border: none !important; display: inline-block !important; position: absolute !important; width: 1px !important; right: 0px !important; outline: 0px !important; text-shadow: initial !important; background-position: 0px 0px !important; background-repeat: initial initial !important; }
.md-inline-math .MathJax_SVG .noError { display: none !important; }
.md-math-block .MathJax_SVG_Display { text-align: center; margin: 0px; position: relative; text-indent: 0px; max-width: none; max-height: none; min-height: 0px; min-width: 100%; width: auto; overflow-y: hidden; display: block !important; }
.MathJax_SVG_Display, .md-inline-math .MathJax_SVG_Display { width: auto; margin: inherit; display: inline-block !important; }
.MathJax_SVG .MJX-monospace { font-family: var(--monospace); }
.MathJax_SVG .MJX-sans-serif { font-family: sans-serif; }
.MathJax_SVG { display: inline; font-style: normal; font-weight: 400; line-height: normal; zoom: 90%; text-indent: 0px; text-align: left; text-transform: none; letter-spacing: normal; word-spacing: normal; word-wrap: normal; white-space: nowrap; float: none; direction: ltr; max-width: none; max-height: none; min-width: 0px; min-height: 0px; border: 0px; padding: 0px; margin: 0px; }
.MathJax_SVG * { transition: none; }
.MathJax_SVG_Display svg { vertical-align: middle !important; margin-bottom: 0px !important; }
.os-windows.monocolor-emoji .md-emoji { font-family: &quot;Segoe UI Symbol&quot;, sans-serif; }
.md-diagram-panel &gt; svg { max-width: 100%; }
[lang=&quot;mermaid&quot;] svg, [lang=&quot;flow&quot;] svg { max-width: 100%; }
[lang=&quot;mermaid&quot;] .node text { font-size: 1rem; }
table tr th { border-bottom-width: 0px; }
video { max-width: 100%; display: block; margin: 0px auto; }
iframe { max-width: 100%; width: 100%; border: none; }
.highlight td, .highlight tr { border: 0px; }


.CodeMirror { height: auto; }
.CodeMirror.cm-s-inner { background-image: inherit; background-size: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: inherit; background-position: inherit inherit; background-repeat: inherit inherit; }
.CodeMirror-scroll { overflow-y: hidden; overflow-x: auto; z-index: 3; }
.CodeMirror-gutter-filler, .CodeMirror-scrollbar-filler { background-color: rgb(255, 255, 255); }
.CodeMirror-gutters { border-right-width: 1px; border-right-style: solid; border-right-color: rgb(221, 221, 221); background-image: inherit; background-size: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: inherit; white-space: nowrap; background-position: inherit inherit; background-repeat: inherit inherit; }
.CodeMirror-linenumber { padding: 0px 3px 0px 5px; text-align: right; color: rgb(153, 153, 153); }
.cm-s-inner .cm-keyword { color: rgb(119, 0, 136); }
.cm-s-inner .cm-atom, .cm-s-inner.cm-atom { color: rgb(34, 17, 153); }
.cm-s-inner .cm-number { color: rgb(17, 102, 68); }
.cm-s-inner .cm-def { color: rgb(0, 0, 255); }
.cm-s-inner .cm-variable { color: rgb(0, 0, 0); }
.cm-s-inner .cm-variable-2 { color: rgb(0, 85, 170); }
.cm-s-inner .cm-variable-3 { color: rgb(0, 136, 85); }
.cm-s-inner .cm-string { color: rgb(170, 17, 17); }
.cm-s-inner .cm-property { color: rgb(0, 0, 0); }
.cm-s-inner .cm-operator { color: rgb(152, 26, 26); }
.cm-s-inner .cm-comment, .cm-s-inner.cm-comment { color: rgb(170, 85, 0); }
.cm-s-inner .cm-string-2 { color: rgb(255, 85, 0); }
.cm-s-inner .cm-meta { color: rgb(85, 85, 85); }
.cm-s-inner .cm-qualifier { color: rgb(85, 85, 85); }
.cm-s-inner .cm-builtin { color: rgb(51, 0, 170); }
.cm-s-inner .cm-bracket { color: rgb(153, 153, 119); }
.cm-s-inner .cm-tag { color: rgb(17, 119, 0); }
.cm-s-inner .cm-attribute { color: rgb(0, 0, 204); }
.cm-s-inner .cm-header, .cm-s-inner.cm-header { color: rgb(0, 0, 255); }
.cm-s-inner .cm-quote, .cm-s-inner.cm-quote { color: rgb(0, 153, 0); }
.cm-s-inner .cm-hr, .cm-s-inner.cm-hr { color: rgb(153, 153, 153); }
.cm-s-inner .cm-link, .cm-s-inner.cm-link { color: rgb(0, 0, 204); }
.cm-negative { color: rgb(221, 68, 68); }
.cm-positive { color: rgb(34, 153, 34); }
.cm-header, .cm-strong { font-weight: 700; }
.cm-del { text-decoration: line-through; }
.cm-em { font-style: italic; }
.cm-link { text-decoration: underline; }
.cm-error { color: red; }
.cm-invalidchar { color: red; }
.cm-constant { color: rgb(38, 139, 210); }
.cm-defined { color: rgb(181, 137, 0); }
div.CodeMirror span.CodeMirror-matchingbracket { color: rgb(0, 255, 0); }
div.CodeMirror span.CodeMirror-nonmatchingbracket { color: rgb(255, 34, 34); }
.cm-s-inner .CodeMirror-activeline-background { background-image: inherit; background-size: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: inherit; background-position: inherit inherit; background-repeat: inherit inherit; }
.CodeMirror { position: relative; overflow: hidden; }
.CodeMirror-scroll { height: 100%; outline: 0px; position: relative; box-sizing: content-box; background-image: inherit; background-size: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: inherit; background-position: inherit inherit; background-repeat: inherit inherit; }
.CodeMirror-sizer { position: relative; }
.CodeMirror-gutter-filler, .CodeMirror-hscrollbar, .CodeMirror-scrollbar-filler, .CodeMirror-vscrollbar { position: absolute; z-index: 6; display: none; }
.CodeMirror-vscrollbar { right: 0px; top: 0px; overflow: hidden; }
.CodeMirror-hscrollbar { bottom: 0px; left: 0px; overflow: hidden; }
.CodeMirror-scrollbar-filler { right: 0px; bottom: 0px; }
.CodeMirror-gutter-filler { left: 0px; bottom: 0px; }
.CodeMirror-gutters { position: absolute; left: 0px; top: 0px; padding-bottom: 30px; z-index: 3; }
.CodeMirror-gutter { white-space: normal; height: 100%; box-sizing: content-box; padding-bottom: 30px; margin-bottom: -32px; display: inline-block; }
.CodeMirror-gutter-wrapper { position: absolute; z-index: 4; border: none !important; background-position: 0px 0px !important; background-repeat: initial initial !important; }
.CodeMirror-gutter-background { position: absolute; top: 0px; bottom: 0px; z-index: 4; }
.CodeMirror-gutter-elt { position: absolute; cursor: default; z-index: 4; }
.CodeMirror-lines { cursor: text; }
.CodeMirror pre { border-top-left-radius: 0px; border-top-right-radius: 0px; border-bottom-right-radius: 0px; border-bottom-left-radius: 0px; border-width: 0px; font-family: inherit; font-size: inherit; margin: 0px; white-space: pre; word-wrap: normal; color: inherit; z-index: 2; position: relative; overflow: visible; background-position: 0px 0px; background-repeat: initial initial; }
.CodeMirror-wrap pre { word-wrap: break-word; white-space: pre-wrap; word-break: normal; }
.CodeMirror-code pre { border-right-width: 30px; border-right-style: solid; border-right-color: transparent; width: fit-content; }
.CodeMirror-wrap .CodeMirror-code pre { border-right-style: none; width: auto; }
.CodeMirror-linebackground { position: absolute; left: 0px; right: 0px; top: 0px; bottom: 0px; z-index: 0; }
.CodeMirror-linewidget { position: relative; z-index: 2; overflow: auto; }
.CodeMirror-wrap .CodeMirror-scroll { overflow-x: hidden; }
.CodeMirror-measure { position: absolute; width: 100%; height: 0px; overflow: hidden; visibility: hidden; }
.CodeMirror-measure pre { position: static; }
.CodeMirror div.CodeMirror-cursor { position: absolute; visibility: hidden; border-right-style: none; width: 0px; }
.CodeMirror div.CodeMirror-cursor { visibility: hidden; }
.CodeMirror-focused div.CodeMirror-cursor { visibility: inherit; }
.cm-searching { background-color: rgba(255, 255, 0, 0.4); background-position: initial initial; background-repeat: initial initial; }
@media print { 
  .CodeMirror div.CodeMirror-cursor { visibility: hidden; }
}


:root {
    --side-bar-bg-color: #fafafa;
    --control-text-color: #777;
}

@include-when-export url(https://fonts.googleapis.com/css?family=Open+Sans:400italic,700italic,700,400&amp;subset=latin,latin-ext);

@font-face {
    font-family: 'Open Sans';
    font-style: normal;
    font-weight: normal;
    src: local('Open Sans Regular'),url('file:///Users/JcSnap/Library/Application%20Support/abnerworks.Typora/themes/github/400.woff') format('woff')
}

@font-face {
    font-family: 'Open Sans';
    font-style: italic;
    font-weight: normal;
    src: local('Open Sans Italic'),url('file:///Users/JcSnap/Library/Application%20Support/abnerworks.Typora/themes/github/400i.woff') format('woff')
}

@font-face {
    font-family: 'Open Sans';
    font-style: normal;
    font-weight: bold;
    src: local('Open Sans Bold'),url('file:///Users/JcSnap/Library/Application%20Support/abnerworks.Typora/themes/github/700.woff') format('woff')
}

@font-face {
    font-family: 'Open Sans';
    font-style: italic;
    font-weight: bold;
    src: local('Open Sans Bold Italic'),url('file:///Users/JcSnap/Library/Application%20Support/abnerworks.Typora/themes/github/700i.woff') format('woff')
}

html {
    font-size: 16px;
}

body {
    font-family: &quot;Open Sans&quot;,&quot;Clear Sans&quot;,&quot;Helvetica Neue&quot;,Helvetica,Arial,sans-serif;
    color: rgb(51, 51, 51);
    line-height: 1.6;
}

#write{
    max-width: 860px;
  	margin: 0 auto;
  	padding: 20px 30px 40px 30px;
	padding-top: 20px;
    padding-bottom: 100px;
}
#write &gt; ul:first-child,
#write &gt; ol:first-child{
    margin-top: 30px;
}

body &gt; *:first-child {
    margin-top: 0 !important;
}
body &gt; *:last-child {
    margin-bottom: 0 !important;
}
a {
    color: #4183C4;
}
h1,
h2,
h3,
h4,
h5,
h6 {
    position: relative;
    margin-top: 1rem;
    margin-bottom: 1rem;
    font-weight: bold;
    line-height: 1.4;
    cursor: text;
}
h1:hover a.anchor,
h2:hover a.anchor,
h3:hover a.anchor,
h4:hover a.anchor,
h5:hover a.anchor,
h6:hover a.anchor {
    /*background: url(&quot;file:///Users/JcSnap/Library/Application%20Support/images/modules/styleguide/para.png&quot;) no-repeat 10px center;*/
    text-decoration: none;
}
h1 tt,
h1 code {
    font-size: inherit;
}
h2 tt,
h2 code {
    font-size: inherit;
}
h3 tt,
h3 code {
    font-size: inherit;
}
h4 tt,
h4 code {
    font-size: inherit;
}
h5 tt,
h5 code {
    font-size: inherit;
}
h6 tt,
h6 code {
    font-size: inherit;
}
h1 {
    padding-bottom: .3em;
    font-size: 2.25em;
    line-height: 1.2;
    border-bottom: 1px solid #eee;
}
h2 {
   padding-bottom: .3em;
    font-size: 1.75em;
    line-height: 1.225;
    border-bottom: 1px solid #eee;
}
h3 {
    font-size: 1.5em;
    line-height: 1.43;
}
h4 {
    font-size: 1.25em;
}
h5 {
    font-size: 1em;
}
h6 {
   font-size: 1em;
    color: #777;
}
p,
blockquote,
ul,
ol,
dl,
table{
    margin: 0.8em 0;
}
li&gt;ol,
li&gt;ul {
    margin: 0 0;
}
hr {
    height: 2px;
    padding: 0;
    margin: 16px 0;
    background-color: #e7e7e7;
    border: 0 none;
    overflow: hidden;
    box-sizing: content-box;
}

body &gt; h2:first-child {
    margin-top: 0;
    padding-top: 0;
}
body &gt; h1:first-child {
    margin-top: 0;
    padding-top: 0;
}
body &gt; h1:first-child + h2 {
    margin-top: 0;
    padding-top: 0;
}
body &gt; h3:first-child,
body &gt; h4:first-child,
body &gt; h5:first-child,
body &gt; h6:first-child {
    margin-top: 0;
    padding-top: 0;
}
a:first-child h1,
a:first-child h2,
a:first-child h3,
a:first-child h4,
a:first-child h5,
a:first-child h6 {
    margin-top: 0;
    padding-top: 0;
}
h1 p,
h2 p,
h3 p,
h4 p,
h5 p,
h6 p {
    margin-top: 0;
}
li p.first {
    display: inline-block;
}
ul,
ol {
    padding-left: 30px;
}
ul:first-child,
ol:first-child {
    margin-top: 0;
}
ul:last-child,
ol:last-child {
    margin-bottom: 0;
}
blockquote {
    border-left: 4px solid #dfe2e5;
    padding: 0 15px;
    color: #777777;
}
blockquote blockquote {
    padding-right: 0;
}
table {
    padding: 0;
    word-break: initial;
}
table tr {
    border-top: 1px solid #dfe2e5;
    margin: 0;
    padding: 0;
}
table tr:nth-child(2n),
thead {
    background-color: #f8f8f8;
}
table tr th {
    font-weight: bold;
    border: 1px solid #dfe2e5;
    border-bottom: 0;
    text-align: left;
    margin: 0;
    padding: 6px 13px;
}
table tr td {
    border: 1px solid #dfe2e5;
    text-align: left;
    margin: 0;
    padding: 6px 13px;
}
table tr th:first-child,
table tr td:first-child {
    margin-top: 0;
}
table tr th:last-child,
table tr td:last-child {
    margin-bottom: 0;
}

.CodeMirror-lines {
    padding-left: 4px;
}

.code-tooltip {
    box-shadow: 0 1px 1px 0 rgba(0,28,36,.3);
    border-top: 1px solid #eef2f2;
}

.md-fences,
code,
tt {
    border: 1px solid #e7eaed;
    background-color: #f8f8f8;
    border-radius: 3px;
    padding: 0;
    padding: 2px 4px 0px 4px;
    font-size: 0.9em;
}

code {
    background-color: #f3f4f4;
    padding: 0 4px 2px 4px;
}

.md-fences {
    margin-bottom: 15px;
    margin-top: 15px;
    padding: 0.2em 1em;
    padding-top: 8px;
    padding-bottom: 6px;
}


.md-task-list-item &gt; input {
  margin-left: -1.3em;
}

@media screen and (min-width: 914px) {
    /*body {
        width: 854px;
        margin: 0 auto;
    }*/
}
@media print {
    html {
        font-size: 13px;
    }
    table,
    pre {
        page-break-inside: avoid;
    }
    pre {
        word-wrap: break-word;
    }
}

.md-fences {
	background-color: #f8f8f8;
}
#write pre.md-meta-block {
	padding: 1rem;
    font-size: 85%;
    line-height: 1.45;
    background-color: #f7f7f7;
    border: 0;
    border-radius: 3px;
    color: #777777;
    margin-top: 0 !important;
}

.mathjax-block&gt;.code-tooltip {
	bottom: .375rem;
}

.md-mathjax-midline {
    background: #fafafa;
}

#write&gt;h3.md-focus:before{
	left: -1.5625rem;
	top: .375rem;
}
#write&gt;h4.md-focus:before{
	left: -1.5625rem;
	top: .285714286rem;
}
#write&gt;h5.md-focus:before{
	left: -1.5625rem;
	top: .285714286rem;
}
#write&gt;h6.md-focus:before{
	left: -1.5625rem;
	top: .285714286rem;
}
.md-image&gt;.md-meta {
    /*border: 1px solid #ddd;*/
    border-radius: 3px;
    padding: 2px 0px 0px 4px;
    font-size: 0.9em;
    color: inherit;
}

.md-tag {
    color: #a7a7a7;
    opacity: 1;
}

.md-toc { 
    margin-top:20px;
    padding-bottom:20px;
}

.sidebar-tabs {
    border-bottom: none;
}

#typora-quick-open {
    border: 1px solid #ddd;
    background-color: #f8f8f8;
}

#typora-quick-open-item {
    background-color: #FAFAFA;
    border-color: #FEFEFE #e5e5e5 #e5e5e5 #eee;
    border-style: solid;
    border-width: 1px;
}

/** focus mode */
.on-focus-mode blockquote {
    border-left-color: rgba(85, 85, 85, 0.12);
}

header, .context-menu, .megamenu-content, footer{
    font-family: &quot;Segoe UI&quot;, &quot;Arial&quot;, sans-serif;
}

.file-node-content:hover .file-node-icon,
.file-node-content:hover .file-node-open-state{
    visibility: visible;
}

.mac-seamless-mode #typora-sidebar {
    background-color: #fafafa;
    background-color: var(--side-bar-bg-color);
}

.md-lang {
    color: #b4654d;
}

.html-for-mac .context-menu {
    --item-hover-bg-color: #E6F0FE;
}


 .typora-export p, .typora-export .footnote-line {white-space: normal;} 
&lt;/style&gt;


&lt;div id=&quot;write&quot; class=&quot;is-mac&quot;&gt;&lt;h3&gt;&lt;a name=&quot;header-n1729&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;목차&lt;/h3&gt;&lt;ul&gt;&lt;li&gt;&lt;p&gt;레이아웃(UI) 개념 및 종류&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;p&gt;뷰에 대한 소개&lt;/p&gt;&lt;ul&gt;&lt;li&gt;정의 : 화면을 나타내는 최소 단위, 아이콘 따위&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;레이아웃의 종류 및 구성 요소&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;p&gt;xml이란?&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Linear layout&lt;/p&gt;&lt;ul&gt;&lt;li&gt;width, height, orientation&lt;/li&gt;&lt;li&gt;id&lt;/li&gt;&lt;li&gt;weight&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;상대 레이아웃(Relative layout)&lt;/p&gt;&lt;ul&gt;&lt;li&gt;width, height, rightOf, endOf&lt;/li&gt;&lt;li&gt;padding, margin&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Grid layout&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Constraint layout&lt;/p&gt;&lt;ul&gt;&lt;li&gt;UI에디터 사용법&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;&lt;p&gt;각종 버튼과 앱을 연결해보기&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;p&gt;버튼의 종류&lt;/p&gt;&lt;ul&gt;&lt;li&gt;width, height, click, id&lt;/li&gt;&lt;li&gt;margin, padding&lt;/li&gt;&lt;li&gt;sp, dp 차이&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;이벤트란?&lt;/p&gt;&lt;ul&gt;&lt;li&gt;리스너, 함수 사용&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;안드로이드 라이프 사이클&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;hr&gt;&lt;h3&gt;&lt;a name=&quot;header-n1790&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;들어가며&lt;/h3&gt;&lt;p&gt;UI는 안드로이드의 가장 기본적인 부분이에요.&lt;/p&gt;
&lt;p&gt;실제 사용자들이 앱을 쓸 때 매일 접하는 게 UI이죠.&lt;/p&gt;
&lt;p&gt;UI는 레이아웃과 뷰로 되어 있습니다.&lt;/p&gt;
&lt;p&gt;뷰는 버튼이나 텍스트등 앱 상의 아이콘을 가리켜요. 레이아웃은 전체 UI 구조를 잡을 때 쓰여요. 레이아웃은 뷰가 어느 위치에 넣일지 정합니다.&lt;/p&gt;&lt;h3&gt;&lt;a name=&quot;header-n1795&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;Layout&lt;/h3&gt;&lt;p&gt;레이아웃은 XML로 만들어져 있어요. XML은 처음에는 헷갈리는데 금방 익숙해질 거에요.
간단히 XML의 개념만 이야기하고 넘어갈께요.&lt;/p&gt;&lt;h5&gt;&lt;a name=&quot;header-n1798&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;xml(엑스엠엘) 설명&lt;/h5&gt;&lt;p&gt;xml은 데이터를 저장하고, 보여주는 데 사용하는 문서입니다.
엑셀이나 워드를 보면 일정한 형식이 있는데
xml도 컴퓨터가 이해하기 쉽게 만든 문서에요.&lt;/p&gt;
&lt;p&gt;xml은 웹의 기본인 html이랑 무척 비슷하게 생겼어요.&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;xml&quot; style=&quot;page-break-inside: unset;&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;xml&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;coffeeshop&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;americano&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;ice&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;5&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;ice&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt; &amp;nbsp;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;coffee&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;150&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;coffee&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;americano&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;cafelatte&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;ice&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;8&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;ice&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;milk&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;50&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;milk&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;coffee&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;130&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;coffee&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;cafelatte&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;coffeeshop&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt; &amp;nbsp;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 308px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 308px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;xml&quot; style=&quot;page-break-inside: unset;&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;xml&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;xmlns는 namespace를 일컫는다.&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;namespace는 동일한 이름의 요소들이 충돌하는 걸 막기 위해 쓰인다.&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;똑같은 body여도 다르게 쓰일 수 있다.&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;첫번째 body는 html이지만&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;body&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;h3&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;html의 글자&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;h3&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;p&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;html의 단락&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;p&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;body&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;두번째 body는 신체 정보를 의미한다.&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;body&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt; &amp;nbsp;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;weight&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;70&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;weight&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;height&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;175&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;height&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;body&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt; &amp;nbsp;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;xml에서는 이런 충돌을 막기 위해 네임스페이스(xmlns)를 쓴다.&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;xmlns는 &lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;요소이름&lt;/span&gt; &lt;span class=&quot;cm-attribute&quot;&gt;xmlns:prefix&lt;/span&gt;=&lt;span class=&quot;cm-string&quot;&gt;&quot;URI&quot;&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt; 방식으로 쓰인다.&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;예컨데 &amp;nbsp;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;html:body&lt;/span&gt; &lt;span class=&quot;cm-attribute&quot;&gt;xmlns:html&lt;/span&gt;=&lt;span class=&quot;cm-string&quot;&gt;&quot;https://www.w3.org/TR/html5/&quot;&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt; 같은 식으로 쓰인다.&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;URI는 Uniform Resource Identifieres의 약자인데, 인터넷 상의 자원을 나타낼 때 쓰인다.&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;인터넷 주소도 URI의 하나이다. &amp;nbsp;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;root&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-attribute&quot;&gt;xmlns:html&lt;/span&gt;=&lt;span class=&quot;cm-string&quot;&gt;&quot;https://www.w3.org/TR/html5/&quot;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-attribute&quot;&gt;xmlns:physical&lt;/span&gt;=&lt;span class=&quot;cm-string&quot;&gt;&quot;http://codingsam.com/xml/physical/&quot;&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;html:body&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;html:h3&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;html의 글자&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;html:h3&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;html:p&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;html의 단락&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;html:p&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;html:body&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;physical:body&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt; &amp;nbsp;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;physical:weight&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;70&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;physical:weight&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;physical:height&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;175&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;physical:height&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;physical:body&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;root&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 902px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 902px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;안드로이드 xml도 동일한 구조를 가지고 있어요.
처음에 xmlns를 선언하고 그 밑에 요소(attribute)들을 놓는 구조에요.&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;xml&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;xml&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;RelativeLayout&lt;/span&gt; &lt;span class=&quot;cm-attribute&quot;&gt;xmlns:android&lt;/span&gt;=&lt;span class=&quot;cm-string&quot;&gt;&quot;http://schemas.android.com/apk/res/android&quot;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-attribute&quot;&gt;xmlns:app&lt;/span&gt;=&lt;span class=&quot;cm-string&quot;&gt;&quot;http://schemas.android.com/apk/res-auto&quot;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-attribute&quot;&gt;xmlns:tools&lt;/span&gt;=&lt;span class=&quot;cm-string&quot;&gt;&quot;http://schemas.android.com/tools&quot;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-attribute&quot;&gt;android:layout_width&lt;/span&gt;=&lt;span class=&quot;cm-string&quot;&gt;&quot;match_parent&quot;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-attribute&quot;&gt;android:layout_height&lt;/span&gt;=&lt;span class=&quot;cm-string&quot;&gt;&quot;match_parent&quot;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-attribute&quot;&gt;tools:context&lt;/span&gt;=&lt;span class=&quot;cm-string&quot;&gt;&quot;com.hello.MainActivity&quot;&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;cm-tag&quot;&gt;RelativeLayout&lt;/span&gt;&lt;span class=&quot;cm-tag cm-bracket&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 176px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 176px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;h3&gt;&lt;a name=&quot;header-n1807&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;레이아웃 구조&lt;/h3&gt;&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/13621579/47419429-21272280-d7b7-11e8-9549-b231a9e748d7.png&quot; alt=&quot;alt text&quot; referrerpolicy=&quot;no-referrer&quot;&gt;&lt;/p&gt;
&lt;p&gt;안드로이드는 한 화면을 레이아웃이라는 걸로 표시해요.
레이아웃 안에 각종 뷰(버튼,텍스트,프로그레스바 등)이 있는 구조입니다.&lt;/p&gt;
&lt;p&gt;레이아웃은 어떻게 UI를 만들지 정하는 뼈대라고 보면 되요.&lt;/p&gt;
&lt;p&gt;레이아웃을 어떤 걸 정하느냐에 따라
안에 들은 뷰들은 큰 영향을 받아요.&lt;/p&gt;
&lt;p&gt;안드로이드 레이아웃 종류는 정말 많은데요.
많이 쓰는 몇개만 알아볼께요.&lt;/p&gt;&lt;h4&gt;&lt;a name=&quot;header-n1813&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;Linear Layout&lt;/h4&gt;&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/13621579/47419436-284e3080-d7b7-11e8-86b3-cddb67f3f20f.jpg&quot; alt=&quot;alt text&quot; referrerpolicy=&quot;no-referrer&quot;&gt;
리니어 레이아웃은 수직이나 수평으로 뷰를 배치하는 레이아웃입니다.&lt;/p&gt;
&lt;p&gt;일단 한번 뷰들을 레이아웃 위에 놓아볼께요.&lt;/p&gt;
&lt;p&gt;수직이나 수평으로만 계속 뷰가 놓이는 걸 알 수 있죠?&lt;/p&gt;
&lt;p&gt;orientation을 통해 방향을 정해줍니다!&lt;/p&gt;
&lt;p&gt;리니어 레이아웃의 가장 큰 특징은 weight 인데요.&lt;/p&gt;
&lt;p&gt;리니어 레이아웃 안에 있는 뷰들의 비중을 정할 수 있어요.&lt;/p&gt;
&lt;p&gt;3개의 버튼을 놓고 1:2:1로 weight를 맞춰볼까요?&lt;/p&gt;
&lt;p&gt;화면 전체 해상도와 상관없이 버튼의 비중이 정해지게 됩니다.&lt;/p&gt;
&lt;p&gt;다른 해상도를 지닌 기기로 바꿔도 그대로죠.&lt;/p&gt;
&lt;p&gt;이때문에 리니어 레이아웃이 많이 쓰였습니다.&lt;/p&gt;
&lt;p&gt;만들기 쉽고 편하거든요. 대신 속도 문제가 좀 있어요.&lt;/p&gt;
&lt;p&gt;뷰의 위치를 정확하게 하는데도 좀 어려움이 있구요.&lt;/p&gt;&lt;h5&gt;&lt;a name=&quot;header-n1827&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;Linear Layout의 구성요소(attribute)&lt;/h5&gt;&lt;p&gt;레이아웃은 항상 넓이(width)와 높이(height)를 정해줘야해요&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;xml&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;xml&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;android:layout_width=&quot;match_parent&quot;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;android:layout_height=&quot;match_parent&quot;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 44px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 44px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;layout_width안에 값을 바꿔주면 넓이가 변하게 됩니다.
layout_width에 넣을 수 있는 값은 3개가 있어요.&lt;/p&gt;&lt;ul&gt;&lt;li&gt;match_parent
: 바깥 부분에 맞게 꽉 채우기&lt;/li&gt;&lt;li&gt;wrap_content
: 내용물에 맞게 크기 조절하기&lt;/li&gt;&lt;li&gt;xxdp (100dp, 150dp)
: 해상도에 따른 값으로 조절하기&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;3개 중에 원하는 대로 골라서 쓰면은 되고,
가장 밑에 있는 레이아웃의 경우 보통 match_parent를 써요.  &lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;xml&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;xml&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;android:layout_width=&quot;100dp&quot;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;android:layout_height=&quot;wrap_content&quot;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 44px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 44px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h4&gt;&lt;a name=&quot;header-n1841&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;Relative Layout&lt;/h4&gt;&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/13621579/47419440-2dab7b00-d7b7-11e8-9225-5baddb8b6a1a.jpg&quot; alt=&quot;alt text&quot; referrerpolicy=&quot;no-referrer&quot;&gt;&lt;/p&gt;
&lt;p&gt;다음으로 많이 쓰는 건 렐러티브 레이아웃인데요.&lt;/p&gt;
&lt;p&gt;안에 있는 뷰들의 위치에 따라서&lt;/p&gt;
&lt;p&gt;뷰의 위치가 바뀝니다.&lt;/p&gt;
&lt;p&gt;마치 똑같은 사람이어도 누구한테는 '엄마' 누구한테는 '이모'이고 누구한테는 '고모'인것처럼&lt;/p&gt;
&lt;p&gt;뷰도 위치에 따라 서로의 관계를 나타내게 됩니다.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;'버튼1의 오른쪽(rightOf)', '텍스트뷰1의 왼쪽', '레이아웃의 끝에(endOf)'&lt;/strong&gt; 등 종류가 무궁무진해요.&lt;/p&gt;
&lt;p&gt;이건 해봐서 익숙해지는 게 답이랍니다 ㅠㅠ&lt;/p&gt;
&lt;p&gt;렐러티브 레이아웃이 세밀하게 위치를 잡기에 더 좋고&lt;/p&gt;
&lt;p&gt;속도도 리니어 레이아웃보다 나은 편입니다.&lt;/p&gt;
&lt;p&gt;하지만 렐러티브 레이아웃도 이제는 물러나는 추세에요.&lt;/p&gt;
&lt;p&gt;구글에서는 ** Constraint Layout ** 을 권장하고 있습니다.&lt;/p&gt;&lt;h4&gt;&lt;a name=&quot;header-n1855&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;TextView&lt;/h4&gt;&lt;p&gt;뷰는 id를 통해 다룰 수 있는 게 가장 큰 특징이에요.&lt;/p&gt;
&lt;p&gt;사실 텍스트뷰나 버튼이나 비슷한 특성을 공유해요.&lt;/p&gt;
&lt;p&gt;또한 세밀한 위치 조정을 위해 padding과 margin을 자주 사용한답니다.&lt;/p&gt;
&lt;p&gt;padding은 안쪽으로 들어오고,&lt;/p&gt;
&lt;p&gt;margin은 바깥쪽으로부터 움직입니다.&lt;/p&gt;
&lt;p&gt;한번 보여드리는 게 날 것 같네요.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/13621579/47419450-31d79880-d7b7-11e8-90c9-a12d541ba73d.png&quot; alt=&quot;alt text&quot; referrerpolicy=&quot;no-referrer&quot;&gt;&lt;/p&gt;&lt;h4&gt;&lt;a name=&quot;header-n1864&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;Button&lt;/h4&gt;&lt;p&gt;누를 수 있는 뷰에요. 상호작용을 위해서 사용한답니다.&lt;/p&gt;&lt;h4&gt;&lt;a name=&quot;header-n1866&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;EditText&lt;/h4&gt;&lt;p&gt;문자 입력을 받을 수 있는 뷰에요.&lt;/p&gt;
&lt;p&gt;로그인 화면 등을 만들 때 사용합니다.&lt;/p&gt;&lt;h4&gt;&lt;a name=&quot;header-n1869&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;ImageView&lt;/h4&gt;&lt;p&gt;이미지를 표시하기 위해서 사용하는 뷰에요.&lt;/p&gt;
&lt;p&gt;정말 많이 쓰입니다.&lt;/p&gt;&lt;h4&gt;&lt;a name=&quot;header-n1872&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;뷰(View)와 액티비티(Activity)의 연결&lt;/h4&gt;&lt;p&gt;레이아웃에 놓은 뷰를 어떻게 실제 코드와 연결을 할까요?&lt;/p&gt;
&lt;p&gt;이 작업은 뷰에 있는 id를 통해 이뤄집니다.&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;java&quot; style=&quot;page-break-inside: unset;&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;java&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;cm-def&quot;&gt;MainActivity&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;extends&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;AppCompatActivity&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;Button&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;login&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-meta&quot;&gt;@Override&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;protected&lt;/span&gt; &lt;span class=&quot;cm-variable-3&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;onCreate&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;Bundle&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;savedInstanceState&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;super&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;onCreate&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;savedInstanceState&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;setContentView&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;R&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;layout&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;activity_main&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;login&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;findViewById&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;R&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;id&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;login&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;login&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;setOnClickListener&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;event&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;-&amp;gt;&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;  });&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 330px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 330px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;findViewById()가 보이나요?
이 함수를 통해 뷰의 ID를 찾은 뒤, 액티비티에서 사용할 수 있게 해줍니다.&lt;/p&gt;
&lt;p&gt;버튼 객체를 생성하는 작업이라고 보면 되요.&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;java&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;java&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;Button&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;login&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;findViewById&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;R&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;id&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;login&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;Button&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;login2&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;Button&lt;/span&gt;();&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 44px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 44px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;실제 findViewId를 써서 찾은 뷰는
인스턴스처럼 쓸 수 있어요.&lt;/p&gt;
&lt;p&gt;이제 뷰에 입력을 받는 법을 알아볼께요.&lt;/p&gt;&lt;h4&gt;&lt;a name=&quot;header-n1881&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;이벤트 관리하기&lt;/h4&gt;&lt;p&gt;뷰들은 사람이 뷰를 누를 때 반응을 해요.
사람이 뷰를 건드리는 걸 뷰 입장에서는 이벤트라고 하는데,
뷰는 이벤트가 생기기만을 간절히 기다리고 있습니다.&lt;/p&gt;
&lt;p&gt;이벤트는 &lt;strong&gt;'화면 터치'나 '마우스 클릭'&lt;/strong&gt; 같은 걸&lt;/p&gt;
&lt;p&gt;뷰는 이벤트를 처리하기 위해서 &lt;strong&gt;'리스너(listener)'&lt;/strong&gt; 를 씁니다.&lt;/p&gt;
&lt;p&gt;동작 과정을 하나하나 설명해볼께요.&lt;/p&gt;&lt;ol start=&quot;&quot;&gt;&lt;li&gt;뷰(버튼)과 리스너를 연결한다.&lt;/li&gt;&lt;li&gt;뷰는 이벤트가 들어오기를 기다리고(listen) 있다.&lt;/li&gt;&lt;li&gt;이벤트가 들어오면(화면 터치 등) 리스너는 정해진 일을 한다.&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/13621579/47419467-3bf99700-d7b7-11e8-95de-d2a52efe3935.jpeg&quot; alt=&quot;alt text&quot; referrerpolicy=&quot;no-referrer&quot;&gt;&lt;/p&gt;&lt;h4&gt;&lt;a name=&quot;header-n1895&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;안드로이드 생명주기&lt;/h4&gt;&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/13621579/47419480-4025b480-d7b7-11e8-8c9b-fbb6799267f1.png&quot; alt=&quot;alt text&quot; referrerpolicy=&quot;no-referrer&quot;&gt;&lt;/p&gt;
&lt;p&gt;안드로이드는 라이프사이클이란 독특한 개념이 있는데요.&lt;/p&gt;
&lt;p&gt;언제 앱이 시작되고 멈출지 모르기 때문에 생긴 개념이랍니다.&lt;/p&gt;
&lt;p&gt;우리가 노트북이나 데스크탑을 쓸 때는 주로 안 자리에서 사용하고&lt;/p&gt;
&lt;p&gt;방해받을 일이 상대적으로 적죠.&lt;/p&gt;
&lt;p&gt;반면 스마트폰의 경우 중간에 전화도 오고, 쓰다가 내려놓는 일도 잦은 편이죠.&lt;/p&gt;
&lt;p&gt;안드로이드 생명주기는 이런 상황을 다루기 위해 나온 개념입니다.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;앱을 완전히 끄는 경우, 잠깐 밑으로 내린 경우, 다시 앱을 쓰는 경우&lt;/strong&gt; 등에 여러 상황이 있죠.&lt;/p&gt;
&lt;p&gt;크게 3가지만 기억하면 됩니다.&lt;/p&gt;&lt;ol start=&quot;&quot;&gt;&lt;li&gt;onCreate - 앱(액티비티)을 처음 시작할때 호출됨&lt;/li&gt;&lt;li&gt;onResume - 앱(액티비티)에 들어갈 때 호출됨&lt;/li&gt;&lt;li&gt;onStop - 앱(액티비티)을 백버튼, 홈버튼 등을 눌러 안보이게 했을때 호출됨, 백그라운드 상태일때 호출되는거죠.&lt;/li&gt;&lt;/ol&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;java&quot; style=&quot;page-break-inside: unset;&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;java&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;cm-def&quot;&gt;MainActivity&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;extends&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;AppCompatActivity&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;Button&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;login&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-meta&quot;&gt;@Override&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;protected&lt;/span&gt; &lt;span class=&quot;cm-variable-3&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;onCreate&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;Bundle&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;savedInstanceState&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;super&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;onCreate&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;savedInstanceState&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;setContentView&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;R&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;layout&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;activity_main&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;Log&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;i&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;&quot;LifeCycle&quot;&lt;/span&gt;, &lt;span class=&quot;cm-string&quot;&gt;&quot;onCreate&quot;&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-meta&quot;&gt;@Override&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;protected&lt;/span&gt; &lt;span class=&quot;cm-variable-3&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;onResume&lt;/span&gt;() {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;super&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;onResume&lt;/span&gt;();&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;Log&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;i&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;&quot;LifeCycle&quot;&lt;/span&gt;, &lt;span class=&quot;cm-string&quot;&gt;&quot;onResume&quot;&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-meta&quot;&gt;@Override&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;protected&lt;/span&gt; &lt;span class=&quot;cm-variable-3&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;onStop&lt;/span&gt;() {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;super&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;onStop&lt;/span&gt;();&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;Log&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;i&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;&quot;LifeCycle&quot;&lt;/span&gt;, &lt;span class=&quot;cm-string&quot;&gt;&quot;onStop&quot;&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 506px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 506px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;h3&gt;&lt;a name=&quot;header-n1914&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;마무리&lt;/h3&gt;&lt;p&gt;레이아웃이랑 뷰는 처음에는 헷갈릴 수 있는 데&lt;/p&gt;
&lt;p&gt;반복해서 쓰다보면은 점점 익숙해집니다!&lt;/p&gt;&lt;h3&gt;&lt;a name=&quot;header-n1917&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;혼자 해보기&lt;/h3&gt;&lt;p&gt;코딩을 배우는 건 하루엔 안 되고 혼자서 충분한 연습을 해야해요.&lt;/p&gt;
&lt;p&gt;오늘 배운 걸 바탕으로 간단한 프로그램을 만들어보세요.&lt;/p&gt;
&lt;p&gt;중간에 막히더라도 극복하고 나면 보람을 느낄 수 있습니다.&lt;/p&gt;
&lt;p&gt;그 과정에서 배운 게 오래 기억에 남죠.&lt;/p&gt;
&lt;p&gt;아래 적은 프로그램을 스스로 만들어보세요!&lt;/p&gt;&lt;ul&gt;&lt;li&gt;로그인 화면 만들어 보기&lt;/li&gt;&lt;li&gt;계산기 만들어보기&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;참고 : Constraint Layout ( &lt;a href=&quot;https://medium.com/&quot; target=&quot;_blank&quot; class=&quot;url&quot;&gt;https://medium.com/&lt;/a&gt;@futureofdev/android-constraintlayout-%EC%89%BD%EA%B2%8C-%EC%95%8C%EC%95%84%EA%B0%80%EC%9E%90-62d2ded79c17 )&lt;/p&gt;&lt;/div&gt;</description>
      <category>안드로이드 (Android)</category>
      <category>android</category>
      <category>Android Event</category>
      <category>android lifecyle</category>
      <category>layout</category>
      <category>Linear Layout</category>
      <category>Relative Layout</category>
      <category>view</category>
      <category>안드로이드</category>
      <category>안드로이드 레이아웃</category>
      <category>안드로이드 로그</category>
      <category>안드로이드 생명주기</category>
      <author>에드 신</author>
      <guid isPermaLink="true">https://software-creator.tistory.com/7</guid>
      <comments>https://software-creator.tistory.com/7#entry7comment</comments>
      <pubDate>Wed, 24 Oct 2018 18:08:30 +0900</pubDate>
    </item>
    <item>
      <title>안드로이드를 위한 자바 - 클래스</title>
      <link>https://software-creator.tistory.com/6</link>
      <description>&lt;meta charset=&quot;UTF-8&quot;&gt;&lt;meta name=&quot;viewport&quot; content=&quot;width=device-width initial-scale=1&quot;&gt;
&lt;title&gt;안드로이드를 위한 자바 - 클래스&lt;/title&gt;&lt;link href=&quot;https://fonts.googleapis.com/css?family=Open+Sans:400italic,700italic,700,400&amp;amp;subset=latin,latin-ext&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot;&gt;&lt;style type=&quot;text/css&quot;&gt;html {overflow-x: initial !important;}:root { --bg-color: #ffffff; --text-color: #333333; --select-text-bg-color: #B5D6FC; --select-text-font-color: auto; --monospace: &quot;Lucida Console&quot;,Consolas,&quot;Courier&quot;,monospace; }
html { font-size: 14px; background-color: var(--bg-color); color: var(--text-color); font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; -webkit-font-smoothing: antialiased; }
body { margin: 0px; padding: 0px; height: auto; bottom: 0px; top: 0px; left: 0px; right: 0px; font-size: 1rem; line-height: 1.42857143; overflow-x: hidden; background-image: inherit; background-size: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: inherit; background-position: inherit inherit; background-repeat: inherit inherit; }
iframe { margin: auto; }
a.url { word-break: break-all; }
a:active, a:hover { outline: 0px; }
.in-text-selection, ::selection { text-shadow: none; background: var(--select-text-bg-color); color: var(--select-text-font-color); }
#write { margin: 0px auto; height: auto; width: inherit; word-break: normal; word-wrap: break-word; position: relative; white-space: normal; padding-bottom: 70px; overflow-x: visible; }
.first-line-indent #write div, .first-line-indent #write li, .first-line-indent #write p { text-indent: 2em; }
.first-line-indent #write div :not(p):not(div), .first-line-indent #write div.md-htmlblock-container, .first-line-indent #write p *, .first-line-indent pre { text-indent: 0px; }
.for-image #write { padding-left: 8px; padding-right: 8px; }
body.typora-export { padding-left: 30px; padding-right: 30px; }
@media screen and (max-width: 500px) { 
  body.typora-export { padding-left: 0px; padding-right: 0px; }
  .CodeMirror-sizer { margin-left: 0px !important; }
  .CodeMirror-gutters { display: none !important; }
}
#write &gt; blockquote:first-child, #write &gt; div:first-child, #write &gt; figure:first-child, #write &gt; ol:first-child, #write &gt; p:first-child, #write &gt; pre:first-child, #write &gt; ul:first-child { margin-top: 30px; }
#write li &gt; figure:first-child { margin-top: -20px; }
#write ol, #write ul { position: relative; }
img { max-width: 100%; vertical-align: middle; }
button, input, select, textarea { color: inherit; font-family: inherit; font-size: inherit; font-style: inherit; font-variant-caps: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; }
input[type=&quot;checkbox&quot;], input[type=&quot;radio&quot;] { line-height: normal; padding: 0px; }
*, ::after, ::before { box-sizing: border-box; }
#write h1, #write h2, #write h3, #write h4, #write h5, #write h6, #write p, #write pre { width: inherit; }
#write h1, #write h2, #write h3, #write h4, #write h5, #write h6, #write p { position: relative; }
h1, h2, h3, h4, h5, h6 { break-after: avoid-page; break-inside: avoid; orphans: 2; }
p { orphans: 4; }
h1 { font-size: 2rem; }
h2 { font-size: 1.8rem; }
h3 { font-size: 1.6rem; }
h4 { font-size: 1.4rem; }
h5 { font-size: 1.2rem; }
h6 { font-size: 1rem; }
.md-math-block, .md-rawblock, h1, h2, h3, h4, h5, h6, p { margin-top: 1rem; margin-bottom: 1rem; }
.hidden { display: none; }
.md-blockmeta { color: rgb(204, 204, 204); font-weight: 700; font-style: italic; }
a { cursor: pointer; }
sup.md-footnote { padding: 2px 4px; background-color: rgba(238, 238, 238, 0.701961); color: rgb(85, 85, 85); border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; cursor: pointer; }
sup.md-footnote a, sup.md-footnote a:hover { color: inherit; text-transform: inherit; text-decoration: inherit; }
#write input[type=&quot;checkbox&quot;] { cursor: pointer; width: inherit; height: inherit; }
figure { overflow-x: auto; margin: 1.2em 0px; max-width: calc(100% + 16px); padding: 0px; }
figure &gt; table { margin: 0px !important; }
tr { break-inside: avoid; break-after: auto; }
thead { display: table-header-group; }
table { border-collapse: collapse; border-spacing: 0px; width: 100%; overflow: auto; break-inside: auto; text-align: left; }
table.md-table td { min-width: 80px; }
.CodeMirror-gutters { border-right-width: 0px; background-color: inherit; }
.CodeMirror { text-align: left; }
.CodeMirror-placeholder { opacity: 0.3; }
.CodeMirror pre { padding: 0px 4px; }
.CodeMirror-lines { padding: 0px; }
div.hr:focus { cursor: none; }
#write pre { white-space: pre-wrap; }
#write.fences-no-line-wrapping pre { white-space: pre; }
#write pre.ty-contain-cm { white-space: normal; }
.CodeMirror-gutters { margin-right: 4px; }
.md-fences { font-size: 0.9rem; display: block; break-inside: avoid; text-align: left; overflow: visible; white-space: pre; background-image: inherit; background-size: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: inherit; position: relative !important; background-position: inherit inherit; background-repeat: inherit inherit; }
.md-diagram-panel { width: 100%; margin-top: 10px; text-align: center; padding-top: 0px; padding-bottom: 8px; overflow-x: auto; }
#write .md-fences.mock-cm { white-space: pre-wrap; }
.md-fences.md-fences-with-lineno { padding-left: 0px; }
#write.fences-no-line-wrapping .md-fences.mock-cm { white-space: pre; overflow-x: auto; }
.md-fences.mock-cm.md-fences-with-lineno { padding-left: 8px; }
.CodeMirror-line, twitterwidget { break-inside: avoid; }
.footnotes { opacity: 0.8; font-size: 0.9rem; margin-top: 1em; margin-bottom: 1em; }
.footnotes + .footnotes { margin-top: 0px; }
.md-reset { margin: 0px; padding: 0px; border: 0px; outline: 0px; vertical-align: top; text-decoration: none; text-shadow: none; float: none; position: static; width: auto; height: auto; white-space: nowrap; cursor: inherit; line-height: normal; font-weight: 400; text-align: left; box-sizing: content-box; direction: ltr; background-position: 0px 0px; background-repeat: initial initial; }
li div { padding-top: 0px; }
blockquote { margin: 1rem 0px; }
li .mathjax-block, li p { margin: 0.5rem 0px; }
li { margin: 0px; position: relative; }
blockquote &gt; :last-child { margin-bottom: 0px; }
blockquote &gt; :first-child, li &gt; :first-child { margin-top: 0px; }
.footnotes-area { color: rgb(136, 136, 136); margin-top: 0.714rem; padding-bottom: 0.143rem; white-space: normal; }
#write .footnote-line { white-space: pre-wrap; }
@media print { 
  body, html { border: 1px solid transparent; height: 99%; break-after: avoid-page; break-before: avoid-page; }
  #write { margin-top: 0px; border-color: transparent !important; }
  .typora-export * { -webkit-print-color-adjust: exact; }
  html.blink-to-pdf { font-size: 13px; }
  .typora-export #write { padding-left: 1cm; padding-right: 1cm; padding-bottom: 0px; break-after: avoid-page; }
  .typora-export #write::after { height: 0px; }
  @page { margin: 20mm 0px; }
}
.footnote-line { margin-top: 0.714em; font-size: 0.7em; }
a img, img a { cursor: pointer; }
pre.md-meta-block { font-size: 0.8rem; min-height: 0.8rem; white-space: pre-wrap; background-color: rgb(204, 204, 204); display: block; overflow-x: hidden; background-position: initial initial; background-repeat: initial initial; }
p &gt; img:only-child { display: block; margin: auto; }
p &gt; .md-image:only-child { display: inline-block; width: 100%; text-align: center; }
#write .MathJax_Display { margin: 0.8em 0px 0px; }
.md-math-block { width: 100%; }
.md-math-block:not(:empty)::after { display: none; }
[contenteditable=&quot;true&quot;]:active, [contenteditable=&quot;true&quot;]:focus { outline: 0px; box-shadow: none; }
.md-task-list-item { position: relative; list-style-type: none; }
.task-list-item.md-task-list-item { padding-left: 0px; }
.md-task-list-item &gt; input { position: absolute; top: 0px; left: 0px; margin-left: -1.2em; margin-top: calc(1em - 10px); }
.math { font-size: 1rem; }
.md-toc { min-height: 3.58rem; position: relative; font-size: 0.9rem; border-top-left-radius: 10px; border-top-right-radius: 10px; border-bottom-right-radius: 10px; border-bottom-left-radius: 10px; }
.md-toc-content { position: relative; margin-left: 0px; }
.md-toc-content::after, .md-toc::after { display: none; }
.md-toc-item { display: block; color: rgb(65, 131, 196); }
.md-toc-item a { text-decoration: none; }
.md-toc-inner:hover { }
.md-toc-inner { display: inline-block; cursor: pointer; }
.md-toc-h1 .md-toc-inner { margin-left: 0px; font-weight: 700; }
.md-toc-h2 .md-toc-inner { margin-left: 2em; }
.md-toc-h3 .md-toc-inner { margin-left: 4em; }
.md-toc-h4 .md-toc-inner { margin-left: 6em; }
.md-toc-h5 .md-toc-inner { margin-left: 8em; }
.md-toc-h6 .md-toc-inner { margin-left: 10em; }
@media screen and (max-width: 48em) { 
  .md-toc-h3 .md-toc-inner { margin-left: 3.5em; }
  .md-toc-h4 .md-toc-inner { margin-left: 5em; }
  .md-toc-h5 .md-toc-inner { margin-left: 6.5em; }
  .md-toc-h6 .md-toc-inner { margin-left: 8em; }
}
a.md-toc-inner { font-size: inherit; font-style: inherit; font-weight: inherit; line-height: inherit; }
.footnote-line a:not(.reversefootnote) { color: inherit; }
.md-attr { display: none; }
.md-fn-count::after { content: &quot;.&quot;; }
code, pre, samp, tt { font-family: var(--monospace); }
kbd { margin: 0px 0.1em; padding: 0.1em 0.6em; font-size: 0.8em; color: rgb(36, 39, 41); background-color: rgb(255, 255, 255); border: 1px solid rgb(173, 179, 185); border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; box-shadow: rgba(12, 13, 14, 0.2) 0px 1px 0px, rgb(255, 255, 255) 0px 0px 0px 2px inset; white-space: nowrap; vertical-align: middle; background-position: initial initial; background-repeat: initial initial; }
.md-comment { color: rgb(162, 127, 3); opacity: 0.8; font-family: var(--monospace); }
code { text-align: left; }
a.md-print-anchor { white-space: pre !important; border: none !important; display: inline-block !important; position: absolute !important; width: 1px !important; right: 0px !important; outline: 0px !important; text-shadow: initial !important; background-position: 0px 0px !important; background-repeat: initial initial !important; }
.md-inline-math .MathJax_SVG .noError { display: none !important; }
.md-math-block .MathJax_SVG_Display { text-align: center; margin: 0px; position: relative; text-indent: 0px; max-width: none; max-height: none; min-height: 0px; min-width: 100%; width: auto; overflow-y: hidden; display: block !important; }
.MathJax_SVG_Display, .md-inline-math .MathJax_SVG_Display { width: auto; margin: inherit; display: inline-block !important; }
.MathJax_SVG .MJX-monospace { font-family: var(--monospace); }
.MathJax_SVG .MJX-sans-serif { font-family: sans-serif; }
.MathJax_SVG { display: inline; font-style: normal; font-weight: 400; line-height: normal; zoom: 90%; text-indent: 0px; text-align: left; text-transform: none; letter-spacing: normal; word-spacing: normal; word-wrap: normal; white-space: nowrap; float: none; direction: ltr; max-width: none; max-height: none; min-width: 0px; min-height: 0px; border: 0px; padding: 0px; margin: 0px; }
.MathJax_SVG * { transition: none; }
.MathJax_SVG_Display svg { vertical-align: middle !important; margin-bottom: 0px !important; }
.os-windows.monocolor-emoji .md-emoji { font-family: &quot;Segoe UI Symbol&quot;, sans-serif; }
.md-diagram-panel &gt; svg { max-width: 100%; }
[lang=&quot;mermaid&quot;] svg, [lang=&quot;flow&quot;] svg { max-width: 100%; }
[lang=&quot;mermaid&quot;] .node text { font-size: 1rem; }
table tr th { border-bottom-width: 0px; }
video { max-width: 100%; display: block; margin: 0px auto; }
iframe { max-width: 100%; width: 100%; border: none; }
.highlight td, .highlight tr { border: 0px; }


.CodeMirror { height: auto; }
.CodeMirror.cm-s-inner { background-image: inherit; background-size: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: inherit; background-position: inherit inherit; background-repeat: inherit inherit; }
.CodeMirror-scroll { overflow-y: hidden; overflow-x: auto; z-index: 3; }
.CodeMirror-gutter-filler, .CodeMirror-scrollbar-filler { background-color: rgb(255, 255, 255); }
.CodeMirror-gutters { border-right-width: 1px; border-right-style: solid; border-right-color: rgb(221, 221, 221); background-image: inherit; background-size: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: inherit; white-space: nowrap; background-position: inherit inherit; background-repeat: inherit inherit; }
.CodeMirror-linenumber { padding: 0px 3px 0px 5px; text-align: right; color: rgb(153, 153, 153); }
.cm-s-inner .cm-keyword { color: rgb(119, 0, 136); }
.cm-s-inner .cm-atom, .cm-s-inner.cm-atom { color: rgb(34, 17, 153); }
.cm-s-inner .cm-number { color: rgb(17, 102, 68); }
.cm-s-inner .cm-def { color: rgb(0, 0, 255); }
.cm-s-inner .cm-variable { color: rgb(0, 0, 0); }
.cm-s-inner .cm-variable-2 { color: rgb(0, 85, 170); }
.cm-s-inner .cm-variable-3 { color: rgb(0, 136, 85); }
.cm-s-inner .cm-string { color: rgb(170, 17, 17); }
.cm-s-inner .cm-property { color: rgb(0, 0, 0); }
.cm-s-inner .cm-operator { color: rgb(152, 26, 26); }
.cm-s-inner .cm-comment, .cm-s-inner.cm-comment { color: rgb(170, 85, 0); }
.cm-s-inner .cm-string-2 { color: rgb(255, 85, 0); }
.cm-s-inner .cm-meta { color: rgb(85, 85, 85); }
.cm-s-inner .cm-qualifier { color: rgb(85, 85, 85); }
.cm-s-inner .cm-builtin { color: rgb(51, 0, 170); }
.cm-s-inner .cm-bracket { color: rgb(153, 153, 119); }
.cm-s-inner .cm-tag { color: rgb(17, 119, 0); }
.cm-s-inner .cm-attribute { color: rgb(0, 0, 204); }
.cm-s-inner .cm-header, .cm-s-inner.cm-header { color: rgb(0, 0, 255); }
.cm-s-inner .cm-quote, .cm-s-inner.cm-quote { color: rgb(0, 153, 0); }
.cm-s-inner .cm-hr, .cm-s-inner.cm-hr { color: rgb(153, 153, 153); }
.cm-s-inner .cm-link, .cm-s-inner.cm-link { color: rgb(0, 0, 204); }
.cm-negative { color: rgb(221, 68, 68); }
.cm-positive { color: rgb(34, 153, 34); }
.cm-header, .cm-strong { font-weight: 700; }
.cm-del { text-decoration: line-through; }
.cm-em { font-style: italic; }
.cm-link { text-decoration: underline; }
.cm-error { color: red; }
.cm-invalidchar { color: red; }
.cm-constant { color: rgb(38, 139, 210); }
.cm-defined { color: rgb(181, 137, 0); }
div.CodeMirror span.CodeMirror-matchingbracket { color: rgb(0, 255, 0); }
div.CodeMirror span.CodeMirror-nonmatchingbracket { color: rgb(255, 34, 34); }
.cm-s-inner .CodeMirror-activeline-background { background-image: inherit; background-size: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: inherit; background-position: inherit inherit; background-repeat: inherit inherit; }
.CodeMirror { position: relative; overflow: hidden; }
.CodeMirror-scroll { height: 100%; outline: 0px; position: relative; box-sizing: content-box; background-image: inherit; background-size: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: inherit; background-position: inherit inherit; background-repeat: inherit inherit; }
.CodeMirror-sizer { position: relative; }
.CodeMirror-gutter-filler, .CodeMirror-hscrollbar, .CodeMirror-scrollbar-filler, .CodeMirror-vscrollbar { position: absolute; z-index: 6; display: none; }
.CodeMirror-vscrollbar { right: 0px; top: 0px; overflow: hidden; }
.CodeMirror-hscrollbar { bottom: 0px; left: 0px; overflow: hidden; }
.CodeMirror-scrollbar-filler { right: 0px; bottom: 0px; }
.CodeMirror-gutter-filler { left: 0px; bottom: 0px; }
.CodeMirror-gutters { position: absolute; left: 0px; top: 0px; padding-bottom: 30px; z-index: 3; }
.CodeMirror-gutter { white-space: normal; height: 100%; box-sizing: content-box; padding-bottom: 30px; margin-bottom: -32px; display: inline-block; }
.CodeMirror-gutter-wrapper { position: absolute; z-index: 4; border: none !important; background-position: 0px 0px !important; background-repeat: initial initial !important; }
.CodeMirror-gutter-background { position: absolute; top: 0px; bottom: 0px; z-index: 4; }
.CodeMirror-gutter-elt { position: absolute; cursor: default; z-index: 4; }
.CodeMirror-lines { cursor: text; }
.CodeMirror pre { border-top-left-radius: 0px; border-top-right-radius: 0px; border-bottom-right-radius: 0px; border-bottom-left-radius: 0px; border-width: 0px; font-family: inherit; font-size: inherit; margin: 0px; white-space: pre; word-wrap: normal; color: inherit; z-index: 2; position: relative; overflow: visible; background-position: 0px 0px; background-repeat: initial initial; }
.CodeMirror-wrap pre { word-wrap: break-word; white-space: pre-wrap; word-break: normal; }
.CodeMirror-code pre { border-right-width: 30px; border-right-style: solid; border-right-color: transparent; width: fit-content; }
.CodeMirror-wrap .CodeMirror-code pre { border-right-style: none; width: auto; }
.CodeMirror-linebackground { position: absolute; left: 0px; right: 0px; top: 0px; bottom: 0px; z-index: 0; }
.CodeMirror-linewidget { position: relative; z-index: 2; overflow: auto; }
.CodeMirror-wrap .CodeMirror-scroll { overflow-x: hidden; }
.CodeMirror-measure { position: absolute; width: 100%; height: 0px; overflow: hidden; visibility: hidden; }
.CodeMirror-measure pre { position: static; }
.CodeMirror div.CodeMirror-cursor { position: absolute; visibility: hidden; border-right-style: none; width: 0px; }
.CodeMirror div.CodeMirror-cursor { visibility: hidden; }
.CodeMirror-focused div.CodeMirror-cursor { visibility: inherit; }
.cm-searching { background-color: rgba(255, 255, 0, 0.4); background-position: initial initial; background-repeat: initial initial; }
@media print { 
  .CodeMirror div.CodeMirror-cursor { visibility: hidden; }
}


:root {
    --side-bar-bg-color: #fafafa;
    --control-text-color: #777;
}

@include-when-export url(https://fonts.googleapis.com/css?family=Open+Sans:400italic,700italic,700,400&amp;subset=latin,latin-ext);

@font-face {
    font-family: 'Open Sans';
    font-style: normal;
    font-weight: normal;
    src: local('Open Sans Regular'),url('file:///Users/JcSnap/Library/Application%20Support/abnerworks.Typora/themes/github/400.woff') format('woff')
}

@font-face {
    font-family: 'Open Sans';
    font-style: italic;
    font-weight: normal;
    src: local('Open Sans Italic'),url('file:///Users/JcSnap/Library/Application%20Support/abnerworks.Typora/themes/github/400i.woff') format('woff')
}

@font-face {
    font-family: 'Open Sans';
    font-style: normal;
    font-weight: bold;
    src: local('Open Sans Bold'),url('file:///Users/JcSnap/Library/Application%20Support/abnerworks.Typora/themes/github/700.woff') format('woff')
}

@font-face {
    font-family: 'Open Sans';
    font-style: italic;
    font-weight: bold;
    src: local('Open Sans Bold Italic'),url('file:///Users/JcSnap/Library/Application%20Support/abnerworks.Typora/themes/github/700i.woff') format('woff')
}

html {
    font-size: 16px;
}

body {
    font-family: &quot;Open Sans&quot;,&quot;Clear Sans&quot;,&quot;Helvetica Neue&quot;,Helvetica,Arial,sans-serif;
    color: rgb(51, 51, 51);
    line-height: 1.6;
}

#write{
    max-width: 860px;
  	margin: 0 auto;
  	padding: 20px 30px 40px 30px;
	padding-top: 20px;
    padding-bottom: 100px;
}
#write &gt; ul:first-child,
#write &gt; ol:first-child{
    margin-top: 30px;
}

body &gt; *:first-child {
    margin-top: 0 !important;
}
body &gt; *:last-child {
    margin-bottom: 0 !important;
}
a {
    color: #4183C4;
}
h1,
h2,
h3,
h4,
h5,
h6 {
    position: relative;
    margin-top: 1rem;
    margin-bottom: 1rem;
    font-weight: bold;
    line-height: 1.4;
    cursor: text;
}
h1:hover a.anchor,
h2:hover a.anchor,
h3:hover a.anchor,
h4:hover a.anchor,
h5:hover a.anchor,
h6:hover a.anchor {
    /*background: url(&quot;file:///Users/JcSnap/Library/Application%20Support/images/modules/styleguide/para.png&quot;) no-repeat 10px center;*/
    text-decoration: none;
}
h1 tt,
h1 code {
    font-size: inherit;
}
h2 tt,
h2 code {
    font-size: inherit;
}
h3 tt,
h3 code {
    font-size: inherit;
}
h4 tt,
h4 code {
    font-size: inherit;
}
h5 tt,
h5 code {
    font-size: inherit;
}
h6 tt,
h6 code {
    font-size: inherit;
}
h1 {
    padding-bottom: .3em;
    font-size: 2.25em;
    line-height: 1.2;
    border-bottom: 1px solid #eee;
}
h2 {
   padding-bottom: .3em;
    font-size: 1.75em;
    line-height: 1.225;
    border-bottom: 1px solid #eee;
}
h3 {
    font-size: 1.5em;
    line-height: 1.43;
}
h4 {
    font-size: 1.25em;
}
h5 {
    font-size: 1em;
}
h6 {
   font-size: 1em;
    color: #777;
}
p,
blockquote,
ul,
ol,
dl,
table{
    margin: 0.8em 0;
}
li&gt;ol,
li&gt;ul {
    margin: 0 0;
}
hr {
    height: 2px;
    padding: 0;
    margin: 16px 0;
    background-color: #e7e7e7;
    border: 0 none;
    overflow: hidden;
    box-sizing: content-box;
}

body &gt; h2:first-child {
    margin-top: 0;
    padding-top: 0;
}
body &gt; h1:first-child {
    margin-top: 0;
    padding-top: 0;
}
body &gt; h1:first-child + h2 {
    margin-top: 0;
    padding-top: 0;
}
body &gt; h3:first-child,
body &gt; h4:first-child,
body &gt; h5:first-child,
body &gt; h6:first-child {
    margin-top: 0;
    padding-top: 0;
}
a:first-child h1,
a:first-child h2,
a:first-child h3,
a:first-child h4,
a:first-child h5,
a:first-child h6 {
    margin-top: 0;
    padding-top: 0;
}
h1 p,
h2 p,
h3 p,
h4 p,
h5 p,
h6 p {
    margin-top: 0;
}
li p.first {
    display: inline-block;
}
ul,
ol {
    padding-left: 30px;
}
ul:first-child,
ol:first-child {
    margin-top: 0;
}
ul:last-child,
ol:last-child {
    margin-bottom: 0;
}
blockquote {
    border-left: 4px solid #dfe2e5;
    padding: 0 15px;
    color: #777777;
}
blockquote blockquote {
    padding-right: 0;
}
table {
    padding: 0;
    word-break: initial;
}
table tr {
    border-top: 1px solid #dfe2e5;
    margin: 0;
    padding: 0;
}
table tr:nth-child(2n),
thead {
    background-color: #f8f8f8;
}
table tr th {
    font-weight: bold;
    border: 1px solid #dfe2e5;
    border-bottom: 0;
    text-align: left;
    margin: 0;
    padding: 6px 13px;
}
table tr td {
    border: 1px solid #dfe2e5;
    text-align: left;
    margin: 0;
    padding: 6px 13px;
}
table tr th:first-child,
table tr td:first-child {
    margin-top: 0;
}
table tr th:last-child,
table tr td:last-child {
    margin-bottom: 0;
}

.CodeMirror-lines {
    padding-left: 4px;
}

.code-tooltip {
    box-shadow: 0 1px 1px 0 rgba(0,28,36,.3);
    border-top: 1px solid #eef2f2;
}

.md-fences,
code,
tt {
    border: 1px solid #e7eaed;
    background-color: #f8f8f8;
    border-radius: 3px;
    padding: 0;
    padding: 2px 4px 0px 4px;
    font-size: 0.9em;
}

code {
    background-color: #f3f4f4;
    padding: 0 4px 2px 4px;
}

.md-fences {
    margin-bottom: 15px;
    margin-top: 15px;
    padding: 0.2em 1em;
    padding-top: 8px;
    padding-bottom: 6px;
}


.md-task-list-item &gt; input {
  margin-left: -1.3em;
}

@media screen and (min-width: 914px) {
    /*body {
        width: 854px;
        margin: 0 auto;
    }*/
}
@media print {
    html {
        font-size: 13px;
    }
    table,
    pre {
        page-break-inside: avoid;
    }
    pre {
        word-wrap: break-word;
    }
}

.md-fences {
	background-color: #f8f8f8;
}
#write pre.md-meta-block {
	padding: 1rem;
    font-size: 85%;
    line-height: 1.45;
    background-color: #f7f7f7;
    border: 0;
    border-radius: 3px;
    color: #777777;
    margin-top: 0 !important;
}

.mathjax-block&gt;.code-tooltip {
	bottom: .375rem;
}

.md-mathjax-midline {
    background: #fafafa;
}

#write&gt;h3.md-focus:before{
	left: -1.5625rem;
	top: .375rem;
}
#write&gt;h4.md-focus:before{
	left: -1.5625rem;
	top: .285714286rem;
}
#write&gt;h5.md-focus:before{
	left: -1.5625rem;
	top: .285714286rem;
}
#write&gt;h6.md-focus:before{
	left: -1.5625rem;
	top: .285714286rem;
}
.md-image&gt;.md-meta {
    /*border: 1px solid #ddd;*/
    border-radius: 3px;
    padding: 2px 0px 0px 4px;
    font-size: 0.9em;
    color: inherit;
}

.md-tag {
    color: #a7a7a7;
    opacity: 1;
}

.md-toc { 
    margin-top:20px;
    padding-bottom:20px;
}

.sidebar-tabs {
    border-bottom: none;
}

#typora-quick-open {
    border: 1px solid #ddd;
    background-color: #f8f8f8;
}

#typora-quick-open-item {
    background-color: #FAFAFA;
    border-color: #FEFEFE #e5e5e5 #e5e5e5 #eee;
    border-style: solid;
    border-width: 1px;
}

/** focus mode */
.on-focus-mode blockquote {
    border-left-color: rgba(85, 85, 85, 0.12);
}

header, .context-menu, .megamenu-content, footer{
    font-family: &quot;Segoe UI&quot;, &quot;Arial&quot;, sans-serif;
}

.file-node-content:hover .file-node-icon,
.file-node-content:hover .file-node-open-state{
    visibility: visible;
}

.mac-seamless-mode #typora-sidebar {
    background-color: #fafafa;
    background-color: var(--side-bar-bg-color);
}

.md-lang {
    color: #b4654d;
}

.html-for-mac .context-menu {
    --item-hover-bg-color: #E6F0FE;
}


 .typora-export p, .typora-export .footnote-line {white-space: normal;} 
&lt;/style&gt;


&lt;div id=&quot;write&quot; class=&quot;is-mac&quot;&gt;&lt;h3&gt;&lt;a name=&quot;header-n1719&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;목차&lt;/h3&gt;&lt;ul&gt;&lt;li&gt;&lt;p&gt;Java Class, Interface, Static 배우기&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;p&gt;Class&lt;/p&gt;&lt;ul&gt;&lt;li&gt;틀만들기, 빵틀&lt;/li&gt;&lt;li&gt;클래스 만들고, 변수 함수 만들어보기&lt;/li&gt;&lt;li&gt;인스턴스의 개념&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Interface&lt;/p&gt;&lt;ul&gt;&lt;li&gt;클래스인데 비어 있는 클래스&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Extends&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Override&lt;/li&gt;&lt;li&gt;Overload&lt;/li&gt;&lt;li&gt;다형성&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Static&lt;/p&gt;&lt;ul&gt;&lt;li&gt;미리 메모리에 불러서 사용하는 경우&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Enum&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h3&gt;&lt;a name=&quot;header-n1755&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;들어가기&lt;/h3&gt;&lt;p&gt;안드로이드를 배우려면 자바의 몇몇 개념을 필수적으로 알아야합니다.&lt;/p&gt;
&lt;p&gt;그 중에 가장 중요한 게 클래스죠.&lt;/p&gt;
&lt;p&gt;클래스는 처음에는 이해하기 난해할 수 있는데 익숙해질수록 잘 쓸 수 있게 됩니다.&lt;/p&gt;
&lt;p&gt;그럼 클래스를 배워보도록 할까요?&lt;/p&gt;&lt;h3&gt;&lt;a name=&quot;header-n1760&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;Class란?&lt;/h3&gt;&lt;p&gt;클래스는 자바에서 함수, 변수 등을 묶어서 쓰는 '틀'이라고 생각하면 됩니다.&lt;/p&gt;
&lt;p&gt;함수가 반복되는 일을 줄이기 위해 나왔듯이,&lt;/p&gt;
&lt;p&gt;클래스도 반복을 최소화하기 위해서 나왔어요.&lt;/p&gt;
&lt;p&gt;예를 들어볼께요. 빵을 만드는 경우를 생각해보죠.&lt;/p&gt;
&lt;p&gt;빵을 하나를 만드는 건 쉽지만 수백개를 손으로 만드려고 하면은 어렵죠.&lt;/p&gt;
&lt;p&gt;이때 우리는 빵을 찍어낼 빵틀이 필요해요.&lt;/p&gt;
&lt;p&gt;클래스가 하는 일이 빵틀과 같아요.&lt;/p&gt;
&lt;p&gt;여러번 해야할 일이 있는데, 일일이 함수를 만들어 쓰려면 효율적이지 않으니&lt;/p&gt;
&lt;p&gt;클래스를 만들어서 반복을 줄이는 거죠.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/13621579/47412889-d4881b00-d7a7-11e8-9c5d-291053a034a8.jpeg&quot; alt=&quot;alt text&quot; referrerpolicy=&quot;no-referrer&quot;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/13621579/47412895-d7830b80-d7a7-11e8-9f9d-8955318fca71.jpeg&quot; alt=&quot;alt text&quot; referrerpolicy=&quot;no-referrer&quot;&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;java&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;java&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;cm-def&quot;&gt;Bread&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable-3&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;size&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;100&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable-3&quot;&gt;String&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;taste&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-string&quot;&gt;&quot;달다&quot;&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 88px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 88px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;그럼 클래스는 어떻게 사용해야할까요?&lt;/p&gt;
&lt;p&gt;아까 빵틀이 클래스라고 했죠?&lt;/p&gt;
&lt;p&gt;빵을 만들어서 사용을 합니다.&lt;/p&gt;
&lt;p&gt;아래와 같은 모양으로 클래스를 만들어요.&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;java&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;java&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;cm-def&quot;&gt;Main&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;cm-variable-3&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;main&lt;/span&gt;(&lt;span class=&quot;cm-variable-3&quot;&gt;String&lt;/span&gt;[] &lt;span class=&quot;cm-variable&quot;&gt;args&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-comment&quot;&gt;// 클래스 이름 = new 클래스();&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;Bread&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;bread1&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;Bread&lt;/span&gt;();&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;Bread&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;bread2&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;Bread&lt;/span&gt;();&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 198px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 198px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;조금 낯설 수 있는데 곧 적응될 거에요.&lt;/p&gt;
&lt;p&gt;클래스를 만들 때는 항상 &lt;strong&gt;new&lt;/strong&gt; 를 적어줘야해요.&lt;/p&gt;
&lt;p&gt;실제 사용할때는 &lt;strong&gt;이름&lt;/strong&gt; 을 가지고 사용하는데요.&lt;/p&gt;
&lt;p&gt;여기서 이름은 &lt;strong&gt;bread1&lt;/strong&gt; 이 되겠네요. 이름의 정확한 명칭은 &lt;strong&gt;인스턴스&lt;/strong&gt; 인데 나중에 더 설명을 할께요.&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;java&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;java&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;bread1&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;size&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;bread1&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;taste&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;System&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;out&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;println&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;bread1&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;size&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 66px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 66px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;출력을 해보면 Bread에 있던 size의 값이 나오죠?&lt;/p&gt;
&lt;p&gt;클래스는 안에 있는 변수를 가져오거나 바꿀 수 있어요.&lt;/p&gt;
&lt;p&gt;첨이라 복잡하지만 익숙해지면 따로 관리하니 편하단걸 알 수 있을 거에요.&lt;/p&gt;
&lt;p&gt;클래스에는 변수만 넣을 수 있는 게 아니에요.&lt;/p&gt;
&lt;p&gt;함수도 넣을 수 있답니다.&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;java&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;java&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;cm-def&quot;&gt;Bread&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable-3&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;size&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;100&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable-3&quot;&gt;String&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;taste&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-string&quot;&gt;&quot;달다&quot;&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable-3&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;showTaste&lt;/span&gt;() {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;System&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;out&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;println&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;taste&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 176px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 176px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;클래스에 있는 함수도 변수와 비슷한 방법으로 사용할 수 있습니다.&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;java&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;java&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;cm-def&quot;&gt;Main&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;cm-variable-3&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;main&lt;/span&gt;(&lt;span class=&quot;cm-variable-3&quot;&gt;String&lt;/span&gt;[] &lt;span class=&quot;cm-variable&quot;&gt;args&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;Bread&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;br&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;Bread&lt;/span&gt;();&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;br&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;showTaste&lt;/span&gt;();&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;br&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;taste&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-string&quot;&gt;&quot;고소하다&quot;&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;br&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;showTaste&lt;/span&gt;();&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable-3&quot;&gt;String&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;name&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-string&quot;&gt;&quot;Mike&quot;&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable-3&quot;&gt;String&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;address&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;cm-variable-3&quot;&gt;String&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;&quot;Seoul&quot;&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 264px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 264px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;클래스에서 함수를 쓰는 걸 보면 어딘가 익숙한데요.&lt;/p&gt;
&lt;p&gt;문자열, String이랑 비슷하게 생기지 않았나요?&lt;/p&gt;
&lt;p&gt;사실 String도 클래스의 일종입니다. 사람들이 편하게 썼던 문자열도 기본 자료형이 아니었던거죠.&lt;/p&gt;
&lt;p&gt;여태까지는 클래스를 만들고 변수에 값을 넣어줬는데&lt;/p&gt;
&lt;p&gt;만들때부터 값을 넣어줄 수는 없을까요?&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;java&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;java&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;cm-def&quot;&gt;Bread&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable-3&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;mSize&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;100&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable-3&quot;&gt;String&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;mTaste&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-string&quot;&gt;&quot;달다&quot;&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable-3&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;showTaste&lt;/span&gt;() {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;System&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;out&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;println&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;taste&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;Bread&lt;/span&gt;(&lt;span class=&quot;cm-variable-3&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;size&lt;/span&gt;, &lt;span class=&quot;cm-variable-3&quot;&gt;String&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;taste&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;this&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;mSize&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;size&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;this&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;mTaste&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;taste&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 286px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 286px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;가능합니다. 클래스에다가 Constructor(생성자)라는 걸 추가해주면 되는데요.&lt;/p&gt;
&lt;p&gt;생성자라는 번역이 좀 어색해서 잘 안 와닿을거에요. 컨스트럭트(Construct)가 만든다는 뜻이잖아요.&lt;/p&gt;
&lt;p&gt;컨스트럭터(Contructor)는 만들어주는 일을 하는 것이라고 보면 되요.&lt;/p&gt;
&lt;p&gt;컨스트럭터는 클래스를 처음 만들때, 값을 넣고 싶은 경우에 사용합니다.&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;java&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;java&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;cm-def&quot;&gt;Main&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;cm-variable-3&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;main&lt;/span&gt;(&lt;span class=&quot;cm-variable-3&quot;&gt;String&lt;/span&gt;[] &lt;span class=&quot;cm-variable&quot;&gt;args&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;Bread&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;myBread&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;Bread&lt;/span&gt;(&lt;span class=&quot;cm-number&quot;&gt;500&lt;/span&gt;, &lt;span class=&quot;cm-string&quot;&gt;&quot;부드럽다&quot;&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;System&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;out&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;println&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;myBread&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;mSize&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 132px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 132px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;h3&gt;&lt;a name=&quot;header-n1803&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;Extend - 상속&lt;/h3&gt;&lt;p&gt;클래스는 중복을 줄이기 위해 만들어졌어요.&lt;/p&gt;
&lt;p&gt;중복을 줄이려면 만들어진 걸 재활용해야해요.&lt;/p&gt;
&lt;p&gt;다시 쓰기 위해 나온 게 상속이란 개념인데요.&lt;/p&gt;
&lt;p&gt;다른 클래스를 &lt;strong&gt;확장&lt;/strong&gt; 해서 쓴다고 보면 되요.&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;java&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;java&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;자식클래스&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;extends&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;부모클래스&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 22px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 22px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;기본 구조는 계속 쓰려는, 원형이 되는 클래스를 가져다가 쓰는 거라고 보면 되요.&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;java&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;java&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;cm-def&quot;&gt;Person&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable-3&quot;&gt;String&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;name&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable-3&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;weight&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable-3&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;height&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 110px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 110px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;java&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;java&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;cm-def&quot;&gt;Man&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;extends&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;Person&lt;/span&gt;{&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable-3&quot;&gt;boolean&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;isBold&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-atom&quot;&gt;false&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 66px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 66px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;java&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;java&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;cm-def&quot;&gt;Woman&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;extends&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;Person&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 66px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 66px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;상속을 하게 되면 부모(상위의 클래스)에 있는 변수나 클래스를
모두 쓸 수 있어요.&lt;/p&gt;&lt;h3&gt;&lt;a name=&quot;header-n1816&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;Interface - 인터페이스&lt;/h3&gt;&lt;p&gt;인터페이스는 클래스랑 비슷하게 생겼는데 좀 다른 일을 해요.&lt;/p&gt;
&lt;p&gt;인터페이스는 함수를 직접 구현하지는 않고, 다른 클래스에서 구현하도록 합니다.&lt;/p&gt;
&lt;p&gt;인터페이스는 일종의 껍데기라고 할 수 있죠.&lt;/p&gt;
&lt;p&gt;인터페이스의 역할은 크게 2개입니다.&lt;/p&gt;&lt;ol start=&quot;&quot;&gt;&lt;li&gt;구현의 강제&lt;/li&gt;&lt;li&gt;동작의 분리&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;먼저 &lt;strong&gt;구현의 강제&lt;/strong&gt;를 설명해볼께요.&lt;/p&gt;
&lt;p&gt;여행준비를 한다고 생각을 해봐요.&lt;/p&gt;
&lt;p&gt;여행 가려고 하면 꼭 해야하는 일들이 있죠.&lt;/p&gt;
&lt;p&gt;어떻게 이동할지 정하기(버스,기차,비행기), 어디 머물지 정하기, 입을 옷 챙기기 등 할 일이 많아요.&lt;/p&gt;
&lt;p&gt;하지만 바빠다 보면 깜빡하기가 쉽습니다.&lt;/p&gt;
&lt;p&gt;누가 안 까먹게 신경 써줬으면 좋겠죠?&lt;/p&gt;
&lt;p&gt;그게 인터페이스가 하는 역할입니다.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;다음으론 &lt;strong&gt;동작의 분리&lt;/strong&gt;인데요.&lt;/p&gt;
&lt;p&gt;모든 기능을 한 클래스에 넣으면 너무 클래스가 커져요.&lt;/p&gt;
&lt;p&gt;복잡성을 줄이기 위해 인터페이스를 써서 필요한 기능들을 따로 분리해냅니다.&lt;/p&gt;
&lt;p&gt;예시를 보면서 좀 더 알아보도록 하죠.&lt;/p&gt;&lt;h6&gt;&lt;a name=&quot;header-n1838&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;Interface 예시 - Bird 클래스&lt;/h6&gt;&lt;p&gt;Bird 클래스를 만들어볼께요.&lt;/p&gt;
&lt;p&gt;새의 종류는 오리,기러기,제비,타조 등 다양해요.  &lt;/p&gt;
&lt;p&gt;어떤 새는 날수 있지만 닭이나 타조는 못 날죠.&lt;/p&gt;
&lt;p&gt;따라서 Bird 클래스에 나는 동작을 넣는 건 맞지 않습니다.&lt;/p&gt;
&lt;p&gt;동작에 따라 인터페이스를 만들고, 필요한 클래스만 인터페이스를 구현하도록 할께요.&lt;/p&gt;
&lt;p&gt;새는 날거나, 달릴 수 있으니 FlyBehavior 인터페이스와 RunBehavior 인터페이스를 만들겠습니다.&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;java&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;java&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;cm-def&quot;&gt;Bird&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable-3&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;quack&lt;/span&gt;() {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;System&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;out&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;println&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;&quot;새가 꽥꽥&quot;&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;interface&lt;/span&gt; &lt;span class=&quot;cm-def&quot;&gt;FlyBehavior&lt;/span&gt; { &lt;span class=&quot;cm-comment&quot;&gt;// 나는 행동을 따로 분리해 필요한 클래스에서 구현하게 합니다.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable-3&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;fly&lt;/span&gt;();&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;interface&lt;/span&gt; &lt;span class=&quot;cm-def&quot;&gt;RunBehavior&lt;/span&gt; { &lt;span class=&quot;cm-comment&quot;&gt;// 달리는 행동을 분리해 필요한 클래스에서 구현하게 합니다.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable-3&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;run&lt;/span&gt;();&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 286px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 286px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;만든 인터페이스를 필요한 클래스에서 쓰도록 할께요.&lt;/p&gt;
&lt;p&gt;오리는 날 수 있으니 Duck(오리) 클래스는 FlyBehavior를 구현하도록 할께요.&lt;/p&gt;
&lt;p&gt;반면 타조는 날지 못하고 뛰어다니니 Ostrich(타조) 클래스는 RunBehavoir를 구현하도록 할께요.&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;java&quot; style=&quot;page-break-inside: unset;&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;java&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;cm-def&quot;&gt;Duck&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;extends&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;Bird&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;implements&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;FlyBehavior&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-meta&quot;&gt;@Override&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;cm-variable-3&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;fly&lt;/span&gt;() {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;System&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;out&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;println&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;&quot;오리가 날아다녀요&quot;&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;cm-def&quot;&gt;ostrich&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;extends&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;Bird&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;implements&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;RunBehavior&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-meta&quot;&gt;@Override&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;cm-variable-3&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;run&lt;/span&gt;() {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;System&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;out&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;println&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;&quot;타조가 뛰어다녀요&quot;&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;cm-def&quot;&gt;Main&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;cm-variable-3&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;main&lt;/span&gt;(&lt;span class=&quot;cm-variable-3&quot;&gt;String&lt;/span&gt;[] &lt;span class=&quot;cm-variable&quot;&gt;args&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;Duck&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;duck&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;Duck&lt;/span&gt;();&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;duck&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;fly&lt;/span&gt;(); &lt;span class=&quot;cm-comment&quot;&gt;// 오리 클래스에서는 fly()를 구현했습니다.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;Ostrich&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;ostrich&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;Ostrich&lt;/span&gt;();&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;ostrich&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;run&lt;/span&gt;(); &lt;span class=&quot;cm-comment&quot;&gt;// 타조 클래스에선 run()을 구현했습니다.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 528px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 528px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;Duck과 Ostrich 모두 Bird 클래스를 상속했지만 동작은 달라지게 됩니다.&lt;/p&gt;
&lt;p&gt;이렇게 필요한 기능을 인터페이스로 따로 빼내게 되면 클래스가 간결해지고 나중에 보기 편합니다.&lt;/p&gt;
&lt;p&gt;하나 예를 더 볼께요. 이번에는 앱을 만드는 예시에요.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h6&gt;&lt;a name=&quot;header-n1854&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;Interface 예시 - 앱 클래스&lt;/h6&gt;&lt;p&gt;앱을 하나 쓰는 걸 생각해보죠. 모든 앱에 공통된 기능이 있겠죠? 앱을 열었다가 닫는 건 모든 앱에 필요합니다.&lt;/p&gt;
&lt;p&gt;반면 터치나 인터넷을 쓰는 건 모든 앱에 필요한 건 아니죠.&lt;/p&gt;
&lt;p&gt;터치와 네트워크는 따로 인터페이스로 빼놓았습니다.&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;java&quot; style=&quot;page-break-inside: unset;&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;java&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;cm-def&quot;&gt;App&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable-3&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;open&lt;/span&gt;();&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable-3&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;close&lt;/span&gt;();&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;interface&lt;/span&gt; &lt;span class=&quot;cm-def&quot;&gt;TouchEvent&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable-3&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;onClick&lt;/span&gt;();&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable-3&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;onTouch&lt;/span&gt;();&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable-3&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;onSwipe&lt;/span&gt;();&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;interface&lt;/span&gt; &lt;span class=&quot;cm-def&quot;&gt;Newtwork&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable-3&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;onConnect&lt;/span&gt;();&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable-3&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;onDisconnect&lt;/span&gt;();&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 330px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 330px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;메모앱은 글씨를 써야하니 터치 이벤트가 필요하겠죠. 그래서 터치 이벤트 인터페이스를 구현했습니다.&lt;/p&gt;
&lt;p&gt;채팅앱은 인터넷이 있어야 다른 사람이랑 채팅을 할 수 있겠죠. 네트워크 인터페이스를 구현했습니다.&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;java&quot; style=&quot;page-break-inside: unset;&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;java&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;cm-def&quot;&gt;MemoApp&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;extends&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;App&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;implements&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;TouchEvent&lt;/span&gt;{&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-meta&quot;&gt;@Override&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;cm-variable-3&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;onClick&lt;/span&gt;() {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;System&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;out&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;println&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;&quot;메모 앱을 눌렀네요&quot;&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-meta&quot;&gt;@Override&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;cm-variable-3&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;onTouch&lt;/span&gt;() {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;System&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;out&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;println&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;&quot;메모 앱을 터치했네요&quot;&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-meta&quot;&gt;@Override&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;cm-variable-3&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;onSwipe&lt;/span&gt;() {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;System&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;out&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;println&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;&quot;메모 앱을 스와이프했네요.&quot;&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;cm-def&quot;&gt;ChatApp&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;extends&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;App&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;implements&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;Newtwork&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-meta&quot;&gt;@Override&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;cm-variable-3&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;onConnect&lt;/span&gt;() {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;System&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;out&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;println&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;&quot;네트워크에 연결되었어요. 채팅을 시작합니다&quot;&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-meta&quot;&gt;@Override&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;cm-variable-3&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;onDisconnect&lt;/span&gt;() {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;System&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;out&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;println&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;&quot;네트워크가 끊겼어요. 채팅을 종료합니다&quot;&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 660px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 660px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;똑같이 App Class를 상속받았지만 MemoApp이랑 ChatApp은 다르게 동작합니다.&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;java&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;java&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;cm-def&quot;&gt;Main&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;cm-variable-3&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;main&lt;/span&gt;(&lt;span class=&quot;cm-variable-3&quot;&gt;String&lt;/span&gt;[] &lt;span class=&quot;cm-variable&quot;&gt;args&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;MemoApp&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;memoApp&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;MemoApp&lt;/span&gt;();&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;memoApp&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;onClick&lt;/span&gt;();&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;ChatApp&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;chatApp&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;ChatApp&lt;/span&gt;();&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;chatApp&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;onConnect&lt;/span&gt;();&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-tab&quot; role=&quot;presentation&quot; cm-text=&quot;	&quot;&gt;    &lt;/span&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 198px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 198px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;이처럼 인터페이스를 쓰게 되면 &lt;/p&gt;
&lt;p&gt;유연하게 프로그램을 만들 수 있습니다.&lt;/p&gt;&lt;h4&gt;&lt;a name=&quot;header-n1866&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;Enum&lt;/h4&gt;&lt;p&gt;자바에서 Enum(이넘)은 여러 변수를 함께 묶어야할 때 쓰입니다.&lt;/p&gt;
&lt;p&gt;근데 꼭 Enum은 필요한 걸까요? 그냥 변수를 쓰면 안 될까요?&lt;/p&gt;
&lt;p&gt;요일을 나타내는 변수를 이때까지 배운걸로 만들어볼께요.&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;java&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;java&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;cm-variable-3&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;MONDAY&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;100&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;cm-variable-3&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;TUESDAY&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;200&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;cm-variable-3&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;WEDNESDAY&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;300&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;cm-variable-3&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;THURSDAY&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;400&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;cm-variable-3&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;FRIDAY&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;500&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;cm-variable-3&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;SATURDAY&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;600&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;cm-variable-3&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;SUNDAY&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;700&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 154px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 154px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;변수를 7개나 적어야해서 보기 좋지 않고
한눈에 들어오지 않습니다.&lt;/p&gt;
&lt;p&gt;반면 Enum을 보죠.&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;java&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;java&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;enum&lt;/span&gt; &lt;span class=&quot;cm-def&quot;&gt;DAY&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;MON&lt;/span&gt;,&lt;span class=&quot;cm-variable&quot;&gt;TUE&lt;/span&gt;,&lt;span class=&quot;cm-variable&quot;&gt;WED&lt;/span&gt;,&lt;span class=&quot;cm-variable&quot;&gt;THU&lt;/span&gt;,&lt;span class=&quot;cm-variable&quot;&gt;FRI&lt;/span&gt;,&lt;span class=&quot;cm-variable&quot;&gt;SAT&lt;/span&gt;,&lt;span class=&quot;cm-variable&quot;&gt;SUN&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 66px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 66px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;한 블록 안에 다 들어와 있어서 보기가 편하고 구분도 잘 됩니다.&lt;/p&gt;
&lt;p&gt;Enum은 클래스랑 비슷하게 사용합니다.&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;java&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;java&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 8px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;DAY&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;today&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;DAY&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;MON&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 22px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 22px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;h3&gt;&lt;a name=&quot;header-n1877&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;마무리&lt;/h3&gt;&lt;p&gt;안드로이드 개발에 필요한 자바의 80%는 배웠습니다.&lt;/p&gt;
&lt;p&gt;자바의 다른 개념도 쓰이지만 안드로이드를 배우며 알아가는 게 좋습니다.&lt;/p&gt;
&lt;p&gt;80대 20의 법칙 아시나요?&lt;/p&gt;
&lt;p&gt;자바도 20년이나 된 언어다 보니 문법이 다양하지만&lt;/p&gt;
&lt;p&gt;항상 주로 쓰이는 개념이 쓰입니다.&lt;/p&gt;
&lt;p&gt;오늘 배운 개념만 숙지하면 안드로이드 개발을 시작하는데 무리가 없습니다!&lt;/p&gt;
&lt;p&gt;그럼 다음에는 안드로이드의 UI와 레이아웃에 대해 알아보도록 할께요!&lt;/p&gt;&lt;/div&gt;</description>
      <category>안드로이드 (Android)</category>
      <category>enum</category>
      <category>extends</category>
      <category>java</category>
      <category>java class</category>
      <category>java extends</category>
      <category>java interface</category>
      <category>Method</category>
      <category>static</category>
      <category>자바</category>
      <category>자바 다형성</category>
      <category>자바 스태틱</category>
      <category>자바 인터페이스</category>
      <category>자바 클래스</category>
      <category>자바 클래스 상속</category>
      <category>자바 클래스 생성자</category>
      <category>자바클래스</category>
      <category>자바클래스생성자</category>
      <category>클래스</category>
      <author>에드 신</author>
      <guid isPermaLink="true">https://software-creator.tistory.com/6</guid>
      <comments>https://software-creator.tistory.com/6#entry6comment</comments>
      <pubDate>Wed, 24 Oct 2018 16:25:28 +0900</pubDate>
    </item>
    <item>
      <title>Flutter - 자바 개발자를 위한 다트</title>
      <link>https://software-creator.tistory.com/5</link>
      <description>&lt;meta charset=&quot;UTF-8&quot;&gt;&lt;meta name=&quot;viewport&quot; content=&quot;width=device-width initial-scale=1&quot;&gt;
&lt;title&gt;flutter-java-vs-dart&lt;/title&gt;&lt;link href=&quot;https://fonts.googleapis.com/css?family=Open+Sans:400italic,700italic,700,400&amp;amp;subset=latin,latin-ext&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot;&gt;&lt;style type=&quot;text/css&quot;&gt;html {overflow-x: initial !important;}:root { --bg-color: #ffffff; --text-color: #333333; --select-text-bg-color: #B5D6FC; --select-text-font-color: auto; --monospace: 'Lucida Console',Consolas,'Courier',monospace; }
html { font-size: 14px; background-color: var(--bg-color); color: var(--text-color); font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; -webkit-font-smoothing: antialiased; }
body { margin: 0px; padding: 0px; height: auto; bottom: 0px; top: 0px; left: 0px; right: 0px; font-size: 1rem; line-height: 1.42857143; overflow-x: hidden; background-image: inherit; background-size: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: inherit; background-position: inherit inherit; background-repeat: inherit inherit; }
iframe { margin: auto; }
a.url { word-break: break-all; }
a:active, a:hover { outline: 0px; }
.in-text-selection, ::selection { text-shadow: none; background: var(--select-text-bg-color); color: var(--select-text-font-color); }
#write { margin: 0px auto; height: auto; width: inherit; word-break: normal; word-wrap: break-word; position: relative; white-space: normal; padding-bottom: 70px; overflow-x: visible; }
.first-line-indent #write div, .first-line-indent #write li, .first-line-indent #write p { text-indent: 2em; }
.first-line-indent #write div :not(p):not(div), .first-line-indent #write div.md-htmlblock-container, .first-line-indent #write p *, .first-line-indent pre { text-indent: 0px; }
.for-image #write { padding-left: 8px; padding-right: 8px; }
body.typora-export { padding-left: 30px; padding-right: 30px; }
@media screen and (max-width: 500px) { 
  body.typora-export { padding-left: 0px; padding-right: 0px; }
  .CodeMirror-sizer { margin-left: 0px !important; }
  .CodeMirror-gutters { display: none !important; }
}
#write &gt; blockquote:first-child, #write &gt; div:first-child, #write &gt; figure:first-child, #write &gt; ol:first-child, #write &gt; p:first-child, #write &gt; pre:first-child, #write &gt; ul:first-child { margin-top: 30px; }
#write li &gt; figure:first-child { margin-top: -20px; }
#write ol, #write ul { position: relative; }
img { max-width: 100%; vertical-align: middle; }
button, input, select, textarea { color: inherit; font-family: inherit; font-size: inherit; font-style: inherit; font-variant-caps: inherit; font-weight: inherit; line-height: inherit; }
input[type=&quot;checkbox&quot;], input[type=&quot;radio&quot;] { line-height: normal; padding: 0px; }
*, ::after, ::before { box-sizing: border-box; }
#write h1, #write h2, #write h3, #write h4, #write h5, #write h6, #write p, #write pre { width: inherit; }
#write h1, #write h2, #write h3, #write h4, #write h5, #write h6, #write p { position: relative; }
h1, h2, h3, h4, h5, h6 { break-after: avoid-page; break-inside: avoid; orphans: 2; }
p { orphans: 4; }
h1 { font-size: 2rem; }
h2 { font-size: 1.8rem; }
h3 { font-size: 1.6rem; }
h4 { font-size: 1.4rem; }
h5 { font-size: 1.2rem; }
h6 { font-size: 1rem; }
.md-math-block, .md-rawblock, h1, h2, h3, h4, h5, h6, p { margin-top: 1rem; margin-bottom: 1rem; }
.hidden { display: none; }
.md-blockmeta { color: rgb(204, 204, 204); font-weight: 700; font-style: italic; }
a { cursor: pointer; }
sup.md-footnote { padding: 2px 4px; background-color: rgba(238, 238, 238, 0.701961); color: rgb(85, 85, 85); border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; cursor: pointer; }
sup.md-footnote a, sup.md-footnote a:hover { color: inherit; text-transform: inherit; text-decoration: inherit; }
#write input[type=&quot;checkbox&quot;] { cursor: pointer; width: inherit; height: inherit; }
figure { overflow-x: auto; margin: 1.2em 0px; max-width: calc(100% + 16px); padding: 0px; }
figure &gt; table { margin: 0px !important; }
tr { break-inside: avoid; break-after: auto; }
thead { display: table-header-group; }
table { border-collapse: collapse; border-spacing: 0px; width: 100%; overflow: auto; break-inside: auto; text-align: left; }
table.md-table td { min-width: 80px; }
.CodeMirror-gutters { border-right-width: 0px; background-color: inherit; }
.CodeMirror { text-align: left; }
.CodeMirror-placeholder { opacity: 0.3; }
.CodeMirror pre { padding: 0px 4px; }
.CodeMirror-lines { padding: 0px; }
div.hr:focus { cursor: none; }
#write pre { white-space: pre-wrap; }
#write.fences-no-line-wrapping pre { white-space: pre; }
#write pre.ty-contain-cm { white-space: normal; }
.CodeMirror-gutters { margin-right: 4px; }
.md-fences { font-size: 0.9rem; display: block; break-inside: avoid; text-align: left; overflow: visible; white-space: pre; background-image: inherit; background-size: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: inherit; position: relative !important; background-position: inherit inherit; background-repeat: inherit inherit; }
.md-diagram-panel { width: 100%; margin-top: 10px; text-align: center; padding-top: 0px; padding-bottom: 8px; overflow-x: auto; }
#write .md-fences.mock-cm { white-space: pre-wrap; }
.md-fences.md-fences-with-lineno { padding-left: 0px; }
#write.fences-no-line-wrapping .md-fences.mock-cm { white-space: pre; overflow-x: auto; }
.md-fences.mock-cm.md-fences-with-lineno { padding-left: 8px; }
.CodeMirror-line, twitterwidget { break-inside: avoid; }
.footnotes { opacity: 0.8; font-size: 0.9rem; margin-top: 1em; margin-bottom: 1em; }
.footnotes + .footnotes { margin-top: 0px; }
.md-reset { margin: 0px; padding: 0px; border: 0px; outline: 0px; vertical-align: top; text-decoration: none; text-shadow: none; float: none; position: static; width: auto; height: auto; white-space: nowrap; cursor: inherit; line-height: normal; font-weight: 400; text-align: left; box-sizing: content-box; direction: ltr; background-position: 0px 0px; background-repeat: initial initial; }
li div { padding-top: 0px; }
blockquote { margin: 1rem 0px; }
li .mathjax-block, li p { margin: 0.5rem 0px; }
li { margin: 0px; position: relative; }
blockquote &gt; :last-child { margin-bottom: 0px; }
blockquote &gt; :first-child, li &gt; :first-child { margin-top: 0px; }
.footnotes-area { color: rgb(136, 136, 136); margin-top: 0.714rem; padding-bottom: 0.143rem; white-space: normal; }
#write .footnote-line { white-space: pre-wrap; }
@media print { 
  body, html { border: 1px solid transparent; height: 99%; break-after: avoid-page; break-before: avoid-page; }
  #write { margin-top: 0px; border-color: transparent !important; }
  .typora-export * { -webkit-print-color-adjust: exact; }
  html.blink-to-pdf { font-size: 13px; }
  .typora-export #write { padding-left: 1cm; padding-right: 1cm; padding-bottom: 0px; break-after: avoid-page; }
  .typora-export #write::after { height: 0px; }
  @page { margin: 20mm 0px; }
}
.footnote-line { margin-top: 0.714em; font-size: 0.7em; }
a img, img a { cursor: pointer; }
pre.md-meta-block { font-size: 0.8rem; min-height: 0.8rem; white-space: pre-wrap; background-color: rgb(204, 204, 204); display: block; overflow-x: hidden; background-position: initial initial; background-repeat: initial initial; }
p &gt; img:only-child { display: block; margin: auto; }
p &gt; .md-image:only-child { display: inline-block; width: 100%; text-align: center; }
#write .MathJax_Display { margin: 0.8em 0px 0px; }
.md-math-block { width: 100%; }
.md-math-block:not(:empty)::after { display: none; }
[contenteditable=&quot;true&quot;]:active, [contenteditable=&quot;true&quot;]:focus { outline: 0px; box-shadow: none; }
.md-task-list-item { position: relative; list-style-type: none; }
.task-list-item.md-task-list-item { padding-left: 0px; }
.md-task-list-item &gt; input { position: absolute; top: 0px; left: 0px; margin-left: -1.2em; margin-top: calc(1em - 10px); }
.math { font-size: 1rem; }
.md-toc { min-height: 3.58rem; position: relative; font-size: 0.9rem; border-top-left-radius: 10px; border-top-right-radius: 10px; border-bottom-right-radius: 10px; border-bottom-left-radius: 10px; }
.md-toc-content { position: relative; margin-left: 0px; }
.md-toc-content::after, .md-toc::after { display: none; }
.md-toc-item { display: block; color: rgb(65, 131, 196); }
.md-toc-item a { text-decoration: none; }
.md-toc-inner:hover { }
.md-toc-inner { display: inline-block; cursor: pointer; }
.md-toc-h1 .md-toc-inner { margin-left: 0px; font-weight: 700; }
.md-toc-h2 .md-toc-inner { margin-left: 2em; }
.md-toc-h3 .md-toc-inner { margin-left: 4em; }
.md-toc-h4 .md-toc-inner { margin-left: 6em; }
.md-toc-h5 .md-toc-inner { margin-left: 8em; }
.md-toc-h6 .md-toc-inner { margin-left: 10em; }
@media screen and (max-width: 48em) { 
  .md-toc-h3 .md-toc-inner { margin-left: 3.5em; }
  .md-toc-h4 .md-toc-inner { margin-left: 5em; }
  .md-toc-h5 .md-toc-inner { margin-left: 6.5em; }
  .md-toc-h6 .md-toc-inner { margin-left: 8em; }
}
a.md-toc-inner { font-size: inherit; font-style: inherit; font-weight: inherit; line-height: inherit; }
.footnote-line a:not(.reversefootnote) { color: inherit; }
.md-attr { display: none; }
.md-fn-count::after { content: '.'; }
code, pre, samp, tt { font-family: var(--monospace); }
kbd { margin: 0px 0.1em; padding: 0.1em 0.6em; font-size: 0.8em; color: rgb(36, 39, 41); background-color: rgb(255, 255, 255); border: 1px solid rgb(173, 179, 185); border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; box-shadow: rgba(12, 13, 14, 0.2) 0px 1px 0px, rgb(255, 255, 255) 0px 0px 0px 2px inset; white-space: nowrap; vertical-align: middle; background-position: initial initial; background-repeat: initial initial; }
.md-comment { color: rgb(162, 127, 3); opacity: 0.8; font-family: var(--monospace); }
code { text-align: left; }
a.md-print-anchor { white-space: pre !important; border: none !important; display: inline-block !important; position: absolute !important; width: 1px !important; right: 0px !important; outline: 0px !important; text-shadow: initial !important; background-position: 0px 0px !important; background-repeat: initial initial !important; }
.md-inline-math .MathJax_SVG .noError { display: none !important; }
.md-math-block .MathJax_SVG_Display { text-align: center; margin: 0px; position: relative; text-indent: 0px; max-width: none; max-height: none; min-height: 0px; min-width: 100%; width: auto; overflow-y: hidden; display: block !important; }
.MathJax_SVG_Display, .md-inline-math .MathJax_SVG_Display { width: auto; margin: inherit; display: inline-block !important; }
.MathJax_SVG .MJX-monospace { font-family: var(--monospace); }
.MathJax_SVG .MJX-sans-serif { font-family: sans-serif; }
.MathJax_SVG { display: inline; font-style: normal; font-weight: 400; line-height: normal; zoom: 90%; text-indent: 0px; text-align: left; text-transform: none; letter-spacing: normal; word-spacing: normal; word-wrap: normal; white-space: nowrap; float: none; direction: ltr; max-width: none; max-height: none; min-width: 0px; min-height: 0px; border: 0px; padding: 0px; margin: 0px; }
.MathJax_SVG * { transition: none; }
.MathJax_SVG_Display svg { vertical-align: middle !important; margin-bottom: 0px !important; }
.os-windows.monocolor-emoji .md-emoji { font-family: 'Segoe UI Symbol', sans-serif; }
.md-diagram-panel &gt; svg { max-width: 100%; }
[lang=&quot;mermaid&quot;] svg, [lang=&quot;flow&quot;] svg { max-width: 100%; }
[lang=&quot;mermaid&quot;] .node text { font-size: 1rem; }
table tr th { border-bottom-width: 0px; }
video { max-width: 100%; display: block; margin: 0px auto; }
iframe { max-width: 100%; width: 100%; border: none; }
.highlight td, .highlight tr { border: 0px; }


.CodeMirror { height: auto; }
.CodeMirror.cm-s-inner { background-image: inherit; background-size: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: inherit; background-position: inherit inherit; background-repeat: inherit inherit; }
.CodeMirror-scroll { overflow-y: hidden; overflow-x: auto; z-index: 3; }
.CodeMirror-gutter-filler, .CodeMirror-scrollbar-filler { background-color: rgb(255, 255, 255); }
.CodeMirror-gutters { border-right-width: 1px; border-right-style: solid; border-right-color: rgb(221, 221, 221); background-image: inherit; background-size: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: inherit; white-space: nowrap; background-position: inherit inherit; background-repeat: inherit inherit; }
.CodeMirror-linenumber { padding: 0px 3px 0px 5px; text-align: right; color: rgb(153, 153, 153); }
.cm-s-inner .cm-keyword { color: rgb(119, 0, 136); }
.cm-s-inner .cm-atom, .cm-s-inner.cm-atom { color: rgb(34, 17, 153); }
.cm-s-inner .cm-number { color: rgb(17, 102, 68); }
.cm-s-inner .cm-def { color: rgb(0, 0, 255); }
.cm-s-inner .cm-variable { color: rgb(0, 0, 0); }
.cm-s-inner .cm-variable-2 { color: rgb(0, 85, 170); }
.cm-s-inner .cm-variable-3 { color: rgb(0, 136, 85); }
.cm-s-inner .cm-string { color: rgb(170, 17, 17); }
.cm-s-inner .cm-property { color: rgb(0, 0, 0); }
.cm-s-inner .cm-operator { color: rgb(152, 26, 26); }
.cm-s-inner .cm-comment, .cm-s-inner.cm-comment { color: rgb(170, 85, 0); }
.cm-s-inner .cm-string-2 { color: rgb(255, 85, 0); }
.cm-s-inner .cm-meta { color: rgb(85, 85, 85); }
.cm-s-inner .cm-qualifier { color: rgb(85, 85, 85); }
.cm-s-inner .cm-builtin { color: rgb(51, 0, 170); }
.cm-s-inner .cm-bracket { color: rgb(153, 153, 119); }
.cm-s-inner .cm-tag { color: rgb(17, 119, 0); }
.cm-s-inner .cm-attribute { color: rgb(0, 0, 204); }
.cm-s-inner .cm-header, .cm-s-inner.cm-header { color: rgb(0, 0, 255); }
.cm-s-inner .cm-quote, .cm-s-inner.cm-quote { color: rgb(0, 153, 0); }
.cm-s-inner .cm-hr, .cm-s-inner.cm-hr { color: rgb(153, 153, 153); }
.cm-s-inner .cm-link, .cm-s-inner.cm-link { color: rgb(0, 0, 204); }
.cm-negative { color: rgb(221, 68, 68); }
.cm-positive { color: rgb(34, 153, 34); }
.cm-header, .cm-strong { font-weight: 700; }
.cm-del { text-decoration: line-through; }
.cm-em { font-style: italic; }
.cm-link { text-decoration: underline; }
.cm-error { color: red; }
.cm-invalidchar { color: red; }
.cm-constant { color: rgb(38, 139, 210); }
.cm-defined { color: rgb(181, 137, 0); }
div.CodeMirror span.CodeMirror-matchingbracket { color: rgb(0, 255, 0); }
div.CodeMirror span.CodeMirror-nonmatchingbracket { color: rgb(255, 34, 34); }
.cm-s-inner .CodeMirror-activeline-background { background-image: inherit; background-size: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: inherit; background-position: inherit inherit; background-repeat: inherit inherit; }
.CodeMirror { position: relative; overflow: hidden; }
.CodeMirror-scroll { height: 100%; outline: 0px; position: relative; box-sizing: content-box; background-image: inherit; background-size: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: inherit; background-position: inherit inherit; background-repeat: inherit inherit; }
.CodeMirror-sizer { position: relative; }
.CodeMirror-gutter-filler, .CodeMirror-hscrollbar, .CodeMirror-scrollbar-filler, .CodeMirror-vscrollbar { position: absolute; z-index: 6; display: none; }
.CodeMirror-vscrollbar { right: 0px; top: 0px; overflow: hidden; }
.CodeMirror-hscrollbar { bottom: 0px; left: 0px; overflow: hidden; }
.CodeMirror-scrollbar-filler { right: 0px; bottom: 0px; }
.CodeMirror-gutter-filler { left: 0px; bottom: 0px; }
.CodeMirror-gutters { position: absolute; left: 0px; top: 0px; padding-bottom: 30px; z-index: 3; }
.CodeMirror-gutter { white-space: normal; height: 100%; box-sizing: content-box; padding-bottom: 30px; margin-bottom: -32px; display: inline-block; }
.CodeMirror-gutter-wrapper { position: absolute; z-index: 4; border: none !important; background-position: 0px 0px !important; background-repeat: initial initial !important; }
.CodeMirror-gutter-background { position: absolute; top: 0px; bottom: 0px; z-index: 4; }
.CodeMirror-gutter-elt { position: absolute; cursor: default; z-index: 4; }
.CodeMirror-lines { cursor: text; }
.CodeMirror pre { border-top-left-radius: 0px; border-top-right-radius: 0px; border-bottom-right-radius: 0px; border-bottom-left-radius: 0px; border-width: 0px; font-family: inherit; font-size: inherit; margin: 0px; white-space: pre; word-wrap: normal; color: inherit; z-index: 2; position: relative; overflow: visible; background-position: 0px 0px; background-repeat: initial initial; }
.CodeMirror-wrap pre { word-wrap: break-word; white-space: pre-wrap; word-break: normal; }
.CodeMirror-code pre { border-right-width: 30px; border-right-style: solid; border-right-color: transparent; width: -webkit-fit-content; }
.CodeMirror-wrap .CodeMirror-code pre { border-right-style: none; width: auto; }
.CodeMirror-linebackground { position: absolute; left: 0px; right: 0px; top: 0px; bottom: 0px; z-index: 0; }
.CodeMirror-linewidget { position: relative; z-index: 2; overflow: auto; }
.CodeMirror-wrap .CodeMirror-scroll { overflow-x: hidden; }
.CodeMirror-measure { position: absolute; width: 100%; height: 0px; overflow: hidden; visibility: hidden; }
.CodeMirror-measure pre { position: static; }
.CodeMirror div.CodeMirror-cursor { position: absolute; visibility: hidden; border-right-style: none; width: 0px; }
.CodeMirror div.CodeMirror-cursor { visibility: hidden; }
.CodeMirror-focused div.CodeMirror-cursor { visibility: inherit; }
.cm-searching { background-color: rgba(255, 255, 0, 0.4); background-position: initial initial; background-repeat: initial initial; }
@media print { 
  .CodeMirror div.CodeMirror-cursor { visibility: hidden; }
}


:root {
    --side-bar-bg-color: #fafafa;
    --control-text-color: #777;
}

@include-when-export url(https://fonts.googleapis.com/css?family=Open+Sans:400italic,700italic,700,400&amp;subset=latin,latin-ext);

@font-face {
    font-family: 'Open Sans';
    font-style: normal;
    font-weight: normal;
    src: local('Open Sans Regular'),url('file:///Users/JcSnap/Library/Application%20Support/abnerworks.Typora/themes/github/400.woff') format('woff')
}

@font-face {
    font-family: 'Open Sans';
    font-style: italic;
    font-weight: normal;
    src: local('Open Sans Italic'),url('file:///Users/JcSnap/Library/Application%20Support/abnerworks.Typora/themes/github/400i.woff') format('woff')
}

@font-face {
    font-family: 'Open Sans';
    font-style: normal;
    font-weight: bold;
    src: local('Open Sans Bold'),url('file:///Users/JcSnap/Library/Application%20Support/abnerworks.Typora/themes/github/700.woff') format('woff')
}

@font-face {
    font-family: 'Open Sans';
    font-style: italic;
    font-weight: bold;
    src: local('Open Sans Bold Italic'),url('file:///Users/JcSnap/Library/Application%20Support/abnerworks.Typora/themes/github/700i.woff') format('woff')
}

html {
    font-size: 16px;
}

body {
    font-family: &quot;Open Sans&quot;,&quot;Clear Sans&quot;,&quot;Helvetica Neue&quot;,Helvetica,Arial,sans-serif;
    color: rgb(51, 51, 51);
    line-height: 1.6;
}

#write{
    max-width: 860px;
  	margin: 0 auto;
  	padding: 20px 30px 40px 30px;
	padding-top: 20px;
    padding-bottom: 100px;
}
#write &gt; ul:first-child,
#write &gt; ol:first-child{
    margin-top: 30px;
}

body &gt; *:first-child {
    margin-top: 0 !important;
}
body &gt; *:last-child {
    margin-bottom: 0 !important;
}
a {
    color: #4183C4;
}
h1,
h2,
h3,
h4,
h5,
h6 {
    position: relative;
    margin-top: 1rem;
    margin-bottom: 1rem;
    font-weight: bold;
    line-height: 1.4;
    cursor: text;
}
h1:hover a.anchor,
h2:hover a.anchor,
h3:hover a.anchor,
h4:hover a.anchor,
h5:hover a.anchor,
h6:hover a.anchor {
    /*background: url(&quot;file:///Users/JcSnap/Library/Application%20Support/images/modules/styleguide/para.png&quot;) no-repeat 10px center;*/
    text-decoration: none;
}
h1 tt,
h1 code {
    font-size: inherit;
}
h2 tt,
h2 code {
    font-size: inherit;
}
h3 tt,
h3 code {
    font-size: inherit;
}
h4 tt,
h4 code {
    font-size: inherit;
}
h5 tt,
h5 code {
    font-size: inherit;
}
h6 tt,
h6 code {
    font-size: inherit;
}
h1 {
    padding-bottom: .3em;
    font-size: 2.25em;
    line-height: 1.2;
    border-bottom: 1px solid #eee;
}
h2 {
   padding-bottom: .3em;
    font-size: 1.75em;
    line-height: 1.225;
    border-bottom: 1px solid #eee;
}
h3 {
    font-size: 1.5em;
    line-height: 1.43;
}
h4 {
    font-size: 1.25em;
}
h5 {
    font-size: 1em;
}
h6 {
   font-size: 1em;
    color: #777;
}
p,
blockquote,
ul,
ol,
dl,
table{
    margin: 0.8em 0;
}
li&gt;ol,
li&gt;ul {
    margin: 0 0;
}
hr {
    height: 2px;
    padding: 0;
    margin: 16px 0;
    background-color: #e7e7e7;
    border: 0 none;
    overflow: hidden;
    box-sizing: content-box;
}

body &gt; h2:first-child {
    margin-top: 0;
    padding-top: 0;
}
body &gt; h1:first-child {
    margin-top: 0;
    padding-top: 0;
}
body &gt; h1:first-child + h2 {
    margin-top: 0;
    padding-top: 0;
}
body &gt; h3:first-child,
body &gt; h4:first-child,
body &gt; h5:first-child,
body &gt; h6:first-child {
    margin-top: 0;
    padding-top: 0;
}
a:first-child h1,
a:first-child h2,
a:first-child h3,
a:first-child h4,
a:first-child h5,
a:first-child h6 {
    margin-top: 0;
    padding-top: 0;
}
h1 p,
h2 p,
h3 p,
h4 p,
h5 p,
h6 p {
    margin-top: 0;
}
li p.first {
    display: inline-block;
}
ul,
ol {
    padding-left: 30px;
}
ul:first-child,
ol:first-child {
    margin-top: 0;
}
ul:last-child,
ol:last-child {
    margin-bottom: 0;
}
blockquote {
    border-left: 4px solid #dfe2e5;
    padding: 0 15px;
    color: #777777;
}
blockquote blockquote {
    padding-right: 0;
}
table {
    padding: 0;
    word-break: initial;
}
table tr {
    border-top: 1px solid #dfe2e5;
    margin: 0;
    padding: 0;
}
table tr:nth-child(2n),
thead {
    background-color: #f8f8f8;
}
table tr th {
    font-weight: bold;
    border: 1px solid #dfe2e5;
    border-bottom: 0;
    text-align: left;
    margin: 0;
    padding: 6px 13px;
}
table tr td {
    border: 1px solid #dfe2e5;
    text-align: left;
    margin: 0;
    padding: 6px 13px;
}
table tr th:first-child,
table tr td:first-child {
    margin-top: 0;
}
table tr th:last-child,
table tr td:last-child {
    margin-bottom: 0;
}

.CodeMirror-lines {
    padding-left: 4px;
}

.code-tooltip {
    box-shadow: 0 1px 1px 0 rgba(0,28,36,.3);
    border-top: 1px solid #eef2f2;
}

.md-fences,
code,
tt {
    border: 1px solid #e7eaed;
    background-color: #f8f8f8;
    border-radius: 3px;
    padding: 0;
    padding: 2px 4px 0px 4px;
    font-size: 0.9em;
}

code {
    background-color: #f3f4f4;
    padding: 0 4px 2px 4px;
}

.md-fences {
    margin-bottom: 15px;
    margin-top: 15px;
    padding: 0.2em 1em;
    padding-top: 8px;
    padding-bottom: 6px;
}


.md-task-list-item &gt; input {
  margin-left: -1.3em;
}

@media screen and (min-width: 914px) {
    /*body {
        width: 854px;
        margin: 0 auto;
    }*/
}
@media print {
    html {
        font-size: 13px;
    }
    table,
    pre {
        page-break-inside: avoid;
    }
    pre {
        word-wrap: break-word;
    }
}

.md-fences {
	background-color: #f8f8f8;
}
#write pre.md-meta-block {
	padding: 1rem;
    font-size: 85%;
    line-height: 1.45;
    background-color: #f7f7f7;
    border: 0;
    border-radius: 3px;
    color: #777777;
    margin-top: 0 !important;
}

.mathjax-block&gt;.code-tooltip {
	bottom: .375rem;
}

.md-mathjax-midline {
    background: #fafafa;
}

#write&gt;h3.md-focus:before{
	left: -1.5625rem;
	top: .375rem;
}
#write&gt;h4.md-focus:before{
	left: -1.5625rem;
	top: .285714286rem;
}
#write&gt;h5.md-focus:before{
	left: -1.5625rem;
	top: .285714286rem;
}
#write&gt;h6.md-focus:before{
	left: -1.5625rem;
	top: .285714286rem;
}
.md-image&gt;.md-meta {
    /*border: 1px solid #ddd;*/
    border-radius: 3px;
    padding: 2px 0px 0px 4px;
    font-size: 0.9em;
    color: inherit;
}

.md-tag {
    color: #a7a7a7;
    opacity: 1;
}

.md-toc { 
    margin-top:20px;
    padding-bottom:20px;
}

.sidebar-tabs {
    border-bottom: none;
}

#typora-quick-open {
    border: 1px solid #ddd;
    background-color: #f8f8f8;
}

#typora-quick-open-item {
    background-color: #FAFAFA;
    border-color: #FEFEFE #e5e5e5 #e5e5e5 #eee;
    border-style: solid;
    border-width: 1px;
}

/** focus mode */
.on-focus-mode blockquote {
    border-left-color: rgba(85, 85, 85, 0.12);
}

header, .context-menu, .megamenu-content, footer{
    font-family: &quot;Segoe UI&quot;, &quot;Arial&quot;, sans-serif;
}

.file-node-content:hover .file-node-icon,
.file-node-content:hover .file-node-open-state{
    visibility: visible;
}

.mac-seamless-mode #typora-sidebar {
    background-color: #fafafa;
    background-color: var(--side-bar-bg-color);
}

.md-lang {
    color: #b4654d;
}

.html-for-mac .context-menu {
    --item-hover-bg-color: #E6F0FE;
}


 .typora-export p, .typora-export .footnote-line {white-space: normal;} 
&lt;/style&gt;


&lt;div id=&quot;write&quot; class=&quot;is-mac&quot;&gt;&lt;h3&gt;&lt;a name=&quot;header-n778&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;자바 개발자를 위한 다트&lt;/h3&gt;&lt;p&gt;플러터(Flutter)로 개발을 하면서 다트를 처음 써보게 되었는데, 하루도 안되어 적응을 하였다.&lt;/p&gt;&lt;p&gt;그만큼 자바와 다트는 많은 공통점이 있다.&lt;/p&gt;&lt;p&gt;다트 공식 웹사이트에선 &lt;strong&gt;familiar to many existing developers&lt;/strong&gt; 라고 말하는 데 과장된 이야기가 아니다.&lt;/p&gt;&lt;p&gt;대부분의 문법이 큰 차이가 없으며, 객체 지향 프로그래밍을 접해봤다면 빠르게 다트를 배울 수 있다.&lt;/p&gt;&lt;p&gt;다트와 자바엔 어떤 공통점과 차이가 있는지 알아보도록 하자.&lt;/p&gt;&lt;h4&gt;&lt;a name=&quot;header-n785&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;변수 - 타입 지정, 타입 추론&lt;/h4&gt;&lt;p&gt;다트의 변수 선언은 자바랑 무척 유사하지만 차이가 있다.
자바는 타입을 항상 지정해야된다.&lt;/p&gt;&lt;p&gt;다트는 타입을 정할 수도 있고, 안 정할 수도 있다. 타입을 정하지 않으면 컴파일할때 타입이 정해진다.(타입 추론)&lt;/p&gt;&lt;p&gt;다만 한번 정한 타입을 나중에 바꿀 수는 없다.(타입 세이프함 type-safe)&lt;/p&gt;&lt;p&gt;아래 코드를 보자. 기본적인 숫자와 문자에 관한 자료형들이다.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;JAVA - 타입 지정&lt;/strong&gt;&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;java&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;java&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 7.609375px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable-3&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;num&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;10&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;float&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;height&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;175.3&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable-3&quot;&gt;long&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;area&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;2500L&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable-3&quot;&gt;String&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;name&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-string&quot;&gt;&quot;Mike&quot;&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 88px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 88px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;전반적으로 비슷하지만 동적 타입이 있단 점에서 다르다.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;DART - 타입 지정 or 타입 추론&lt;/strong&gt;&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;java&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;java&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 7.609375px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable-3&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;num&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;10&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable-3&quot;&gt;double&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;height&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;175.3&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable-3&quot;&gt;String&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;name&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-string&quot;&gt;&quot;Mike&quot;&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;world&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-string&quot;&gt;&quot;Hello world&quot;&lt;/span&gt;; &lt;span class=&quot;cm-comment&quot;&gt;// 동적 타입, 타입 추론&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;age&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;78&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 110px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 110px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;밑에 처럼 타입을 중간에 바꾸는 건 안된다.&lt;/p&gt;&lt;p&gt;&lt;del&gt;var abc = &quot;Hello&quot;;&lt;/del&gt;&lt;/p&gt;&lt;p&gt;&lt;del&gt;abc = 10;&lt;/del&gt;&lt;/p&gt;&lt;p&gt;&lt;del&gt;abc = true;&lt;/del&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h4&gt;&lt;a name=&quot;header-n801&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;배열 대신에 리스트&lt;/h4&gt;&lt;p&gt;자바에선 배열과 리스트를 구분하지만 다트는 리스트만 사용하기에 좀 더 편하게 데이터를 다룰 수 있다.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;JAVA&lt;/strong&gt;&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;java&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;java&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 7.609375px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable-3&quot;&gt;int&lt;/span&gt;[] &lt;span class=&quot;cm-variable&quot;&gt;numbers&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; [&lt;span class=&quot;cm-number&quot;&gt;10&lt;/span&gt;, &lt;span class=&quot;cm-number&quot;&gt;20&lt;/span&gt;, &lt;span class=&quot;cm-number&quot;&gt;30&lt;/span&gt;];&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable-3&quot;&gt;String&lt;/span&gt;[] &lt;span class=&quot;cm-variable&quot;&gt;countries&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; {&lt;span class=&quot;cm-string&quot;&gt;&quot;USA&quot;&lt;/span&gt;, &lt;span class=&quot;cm-string&quot;&gt;&quot;JAPAN&quot;&lt;/span&gt;, &lt;span class=&quot;cm-string&quot;&gt;&quot;KOREA&quot;&lt;/span&gt;};&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;ArrayList&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-variable-3&quot;&gt;Integer&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;lists&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;ArrayList&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;lt;&amp;gt;&lt;/span&gt;();&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;lists&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;add&lt;/span&gt;(&lt;span class=&quot;cm-number&quot;&gt;100&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;lists&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;add&lt;/span&gt;(&lt;span class=&quot;cm-number&quot;&gt;200&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;lists&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;add&lt;/span&gt;(&lt;span class=&quot;cm-number&quot;&gt;300&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 132px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 132px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;리스트에 서로 다른 자료형도 섞을 수 있다.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;DART&lt;/strong&gt;&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;java&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;java&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 7.609375px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;numbers&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; [&lt;span class=&quot;cm-number&quot;&gt;10&lt;/span&gt;, &lt;span class=&quot;cm-number&quot;&gt;20&lt;/span&gt;, &lt;span class=&quot;cm-number&quot;&gt;30&lt;/span&gt;];&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;countries&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; [&lt;span class=&quot;cm-string&quot;&gt;&quot;USA&quot;&lt;/span&gt;, &lt;span class=&quot;cm-string&quot;&gt;&quot;JAPAN&quot;&lt;/span&gt;, &lt;span class=&quot;cm-string&quot;&gt;&quot;KOREA&quot;&lt;/span&gt;, &lt;span class=&quot;cm-number&quot;&gt;10&lt;/span&gt;];&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;countries&lt;/span&gt;[&lt;span class=&quot;cm-number&quot;&gt;0&lt;/span&gt;]);&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 66px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 66px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;h3&gt;&lt;a name=&quot;header-n808&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;함수&lt;/h3&gt;&lt;p&gt;웹을 위해 만들어진 언어라 그런지, 자바스크립트랑 비슷한 측면이 많다. 타입을 명시해도 되고, 안 해도 된다.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;JAVA&lt;/strong&gt;&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;java&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;java&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 7.609375px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable-3&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;cm-def&quot;&gt;add&lt;/span&gt;(&lt;span class=&quot;cm-variable-3&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;a&lt;/span&gt;, &lt;span class=&quot;cm-variable-3&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;b&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;a&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;b&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 66px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 66px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;&lt;strong&gt;DART - 타입 추론.&lt;/strong&gt;&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;java&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;java&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 7.609375px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;combine&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;a&lt;/span&gt;,&lt;span class=&quot;cm-variable&quot;&gt;b&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;a&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;b&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;result&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;combine&lt;/span&gt;(&lt;span class=&quot;cm-number&quot;&gt;10&lt;/span&gt;, &lt;span class=&quot;cm-number&quot;&gt;20&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;result&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;word&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;combine&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;&quot;hello&quot;&lt;/span&gt;, &lt;span class=&quot;cm-string&quot;&gt;&quot;world&quot;&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;word&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 198px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 198px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;&lt;strong&gt;DART - 타입 지정.&lt;/strong&gt;&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;java&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;java&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 7.609375px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable-3&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;cm-def&quot;&gt;add&lt;/span&gt;(&lt;span class=&quot;cm-variable-3&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;a&lt;/span&gt;, &lt;span class=&quot;cm-variable-3&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;b&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;a&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;b&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable-3&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;sum&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;add&lt;/span&gt;(&lt;span class=&quot;cm-number&quot;&gt;15&lt;/span&gt;, &lt;span class=&quot;cm-number&quot;&gt;25&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;sum&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 132px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 132px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;Effective Dart에서는 타입을 지정하는 걸 권장하고 있다.
사실 플러터로 다트를 배우다 보니, 타입 지정을 안해도 되는지 몰랐었다.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h3&gt;&lt;a name=&quot;header-n818&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;If, For, While, Case&lt;/h3&gt;&lt;p&gt;자바와 다트의 차이가 없는거나 마찬가지라 생략한다.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h3&gt;&lt;a name=&quot;header-n821&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;Class - 이름 있는 생성자(Named Constructor)&lt;/h3&gt;&lt;p&gt;자바와 다트의 생성자를 같이 보도록 하자. 크게 다르지 않다.  &lt;/p&gt;&lt;p&gt;&lt;strong&gt;JAVA&lt;/strong&gt;&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;java&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;java&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 7.609375px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;cm-def&quot;&gt;Point&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable-3&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;x&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable-3&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;y&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;Point&lt;/span&gt;(&lt;span class=&quot;cm-variable-3&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;x&lt;/span&gt;, &lt;span class=&quot;cm-variable-3&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;y&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;this&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;x&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;x&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;this&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;y&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;y&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 198px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 198px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;&lt;strong&gt;DART&lt;/strong&gt;&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;java&quot; style=&quot;page-break-inside: unset;&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;java&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 7.609375px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;cm-def&quot;&gt;Point&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;num&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;x&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;num&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;y&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;Point&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;num&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;x&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;num&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;y&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;this&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;x&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;x&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;this&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;y&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;y&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;Point&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;origin&lt;/span&gt;() {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;x&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;0&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;y&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;0&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 308px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 308px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;1가지를 제외하고는 큰 차이가 없다. &lt;strong&gt;Point.origin()&lt;/strong&gt; 가 있냐 없냐의 차이다. &lt;strong&gt;Point.origin()&lt;/strong&gt; 은 대체 어떤 역할을 하는 걸까?
&lt;strong&gt;Point.origin()&lt;/strong&gt; 은 이름 있는 생성자(Named Constructor)로 x,y를 0으로 초기화 하는 역할을 한다.&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;java&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;java&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 7.609375px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;Point&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;p&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;Point&lt;/span&gt;(&lt;span class=&quot;cm-number&quot;&gt;10&lt;/span&gt;, &lt;span class=&quot;cm-number&quot;&gt;30&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;p&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;x&lt;/span&gt;); &lt;span class=&quot;cm-comment&quot;&gt;// 10&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;origin&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;Point&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;origin&lt;/span&gt;();&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;origin&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;x&lt;/span&gt;); &lt;span class=&quot;cm-comment&quot;&gt;// 0&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 110px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 110px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;이처럼 이름 있는 생성자(Name Constructor)는 여러 생성자를 만들거나 생성자 내에서 값 체크, 파싱 등 각종 작업을 할 때 쓰인다.&lt;/p&gt;&lt;p&gt;(다트 공식 사이트의 Named Constructor 정의 - Use a named constructor to implement multiple constructors for a class or to provide extra clarity)&lt;/p&gt;&lt;p&gt;이제 json을 파싱하는 생성자를 만들어보겠다.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;DART&lt;/strong&gt;&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;java&quot; style=&quot;page-break-inside: unset;&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;java&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 7.609375px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;cm-def&quot;&gt;Point&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;num&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;x&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;num&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;y&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;Point&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;num&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;x&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;num&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;y&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;this&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;x&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;x&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;this&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;y&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;y&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;Point&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;origin&lt;/span&gt;() {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;x&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;0&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;y&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;0&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;Point&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;fromJson&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;Map&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-variable-3&quot;&gt;String&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;num&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;json&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  : &lt;span class=&quot;cm-variable&quot;&gt;x&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;json&lt;/span&gt;[&lt;span class=&quot;cm-string&quot;&gt;'x'&lt;/span&gt;],&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;y&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;json&lt;/span&gt;[&lt;span class=&quot;cm-string&quot;&gt;'y'&lt;/span&gt;] {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;'In Point.fromJson(): ($x, $y)'&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 440px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 440px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;이름 있는 생성자를 만들고 실행을 해보자.
객체를 만들때 json 파싱을 이어서 한다.&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;java&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;java&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 7.609375px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable-3&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;cm-def&quot;&gt;main&lt;/span&gt;() {&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;Map&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-variable-3&quot;&gt;String&lt;/span&gt;, &lt;span class=&quot;cm-variable-3&quot;&gt;int&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;json&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;Map&lt;/span&gt;();&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;json&lt;/span&gt;[&lt;span class=&quot;cm-string&quot;&gt;'x'&lt;/span&gt;] &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;15&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;json&lt;/span&gt;[&lt;span class=&quot;cm-string&quot;&gt;'y'&lt;/span&gt;] &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;20&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;point&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;Point&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;fromJson&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;json&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;&quot;point x : ${point.x}, y: ${point.y}&quot;&lt;/span&gt;); &lt;span class=&quot;cm-comment&quot;&gt;// point x : 15, y: 20 출력&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 176px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 176px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;h3&gt;&lt;a name=&quot;header-n836&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;Factory&lt;/h3&gt;&lt;p&gt;팩토리 생성자는 팩토리 패턴을 쉽게 쓰기 위해 만들어졌다.&lt;/p&gt;&lt;p&gt;자바에서 팩토리 패턴을 쓰려면 팩토리 클래스를 따로 만들어줘야한다.
다트에서는 기본 생성자와 같이 쓸 수 있다.&lt;/p&gt;&lt;p&gt;자바로 팩토리 패턴을 구현해보고, 다트로도 구현을 해보도록 하겠다.&lt;/p&gt;&lt;p&gt;여기서는 로봇 회사의 예를 들어보겠다. 청소로봇, 전투용 로봇 등 다양한 로봇을 만드는 회사이다.&lt;/p&gt;&lt;p&gt; 공장에서 로봇의 종류에 따라 생산을 한다.  &lt;/p&gt;&lt;p&gt;&lt;strong&gt;JAVA - 로봇 클래스 선언, 각 로봇을 담당.&lt;/strong&gt;&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;java&quot; style=&quot;page-break-inside: unset;&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;java&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 7.609375px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;abstract&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;cm-def&quot;&gt;Robot&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;abstract&lt;/span&gt; &lt;span class=&quot;cm-variable-3&quot;&gt;String&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;getName&lt;/span&gt;();&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;abstract&lt;/span&gt; &lt;span class=&quot;cm-variable-3&quot;&gt;String&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;command&lt;/span&gt;();&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;cm-def&quot;&gt;CleanRobot&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;extends&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;Robot&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-meta&quot;&gt;@Override&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable-3&quot;&gt;String&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;getName&lt;/span&gt;() {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;cm-string&quot;&gt;&quot;Clean&quot;&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-meta&quot;&gt;@Override&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable-3&quot;&gt;String&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;command&lt;/span&gt;() {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;System&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;out&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;println&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;&quot;clean a room&quot;&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;cm-string&quot;&gt;&quot;clean a room&quot;&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;cm-def&quot;&gt;WarRobot&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;extends&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;Robot&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-meta&quot;&gt;@Override&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable-3&quot;&gt;String&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;getName&lt;/span&gt;() {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;cm-string&quot;&gt;&quot;War&quot;&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-meta&quot;&gt;@Override&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable-3&quot;&gt;String&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;command&lt;/span&gt;() {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;System&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;out&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;println&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;&quot;declare war&quot;&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;cm-string&quot;&gt;&quot;declare war&quot;&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 660px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 660px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;로봇 클래스를 만들었으면 팩토리 클래스를 만들어보자.로봇 이름에 따라 다른 클래스를 만들어준다.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;JAVA - 팩토리 클래스, 모든 로봇의 생산을 담당&lt;/strong&gt;&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;java&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;java&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 7.609375px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;cm-def&quot;&gt;RobotFactory&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;Robot&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;createRobot&lt;/span&gt;(&lt;span class=&quot;cm-variable-3&quot;&gt;String&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;name&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;switch&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;name&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;case&lt;/span&gt; &lt;span class=&quot;cm-string&quot;&gt;&quot;Clean&quot;&lt;/span&gt;:&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;CleanRobot&lt;/span&gt;();&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;case&lt;/span&gt; &lt;span class=&quot;cm-string&quot;&gt;&quot;War&quot;&lt;/span&gt;:&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;WarRobot&lt;/span&gt;();&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;cm-atom&quot;&gt;null&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 286px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 286px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;&lt;strong&gt;JAVA - 실행&lt;/strong&gt;&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;java&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;java&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 7.609375px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;RobotFactory&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;factory&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;RobotFactory&lt;/span&gt;();&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;Robot&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;r1&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;factory&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;createRobot&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;&quot;Android&quot;&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;r1&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;command&lt;/span&gt;();&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;Robot&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;r2&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;factory&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;createRobot&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;&quot;iOS&quot;&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;r2&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;command&lt;/span&gt;();&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 110px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 110px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;다트의 경우 기본 클래스 안에 팩토리 생성자를 만든다. 팩토리 생성자는 자바에서 팩토리 클래스랑 동일한 일을 한다. 따라서 추가적으로 팩토리 클래스를 만들 필요가 없다.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;DART - 로봇 클래스, 팩토리 생성자 사용&lt;/strong&gt;&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;java&quot; style=&quot;page-break-inside: unset;&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;java&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 7.609375px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;abstract&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;cm-def&quot;&gt;Robot&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;Robot&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;create&lt;/span&gt;();&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;factory&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;Robot&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;RobotType&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;type&lt;/span&gt;) { &lt;span class=&quot;cm-comment&quot;&gt;// 팩토리 생성자&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;switch&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;type&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;case&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;RobotType&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;Clean&lt;/span&gt;:&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;CleanRobot&lt;/span&gt;();&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;case&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;RobotType&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;War&lt;/span&gt;:&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;WarRobot&lt;/span&gt;();&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable-3&quot;&gt;String&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;getName&lt;/span&gt;();&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable-3&quot;&gt;String&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;command&lt;/span&gt;();&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;enum&lt;/span&gt; &lt;span class=&quot;cm-def&quot;&gt;RobotType&lt;/span&gt;{&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;Clean&lt;/span&gt;,&lt;span class=&quot;cm-variable&quot;&gt;War&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 440px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 440px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;&lt;strong&gt;DART - 자식 클래스들&lt;/strong&gt;&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;java&quot; style=&quot;page-break-inside: unset;&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;java&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 7.609375px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;cm-def&quot;&gt;CleanRobot&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;extends&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;Robot&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;CleanRobot&lt;/span&gt;(): &lt;span class=&quot;cm-keyword&quot;&gt;super&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;create&lt;/span&gt;();&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-meta&quot;&gt;@override&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable-3&quot;&gt;String&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;getName&lt;/span&gt;() {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;cm-string&quot;&gt;&quot;Clean&quot;&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-meta&quot;&gt;@override&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable-3&quot;&gt;String&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;command&lt;/span&gt;() {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;&quot;clean a room&quot;&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;cm-string&quot;&gt;&quot;clean a room&quot;&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;cm-def&quot;&gt;WarRobot&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;extends&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;Robot&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;WarRobot&lt;/span&gt;(): &lt;span class=&quot;cm-keyword&quot;&gt;super&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;create&lt;/span&gt;();&lt;/span&gt;&lt;/pre&gt;&lt;div class=&quot;&quot; style=&quot;position: relative;&quot;&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-meta&quot;&gt;@override&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable-3&quot;&gt;String&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;getName&lt;/span&gt;() {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;cm-string&quot;&gt;&quot;War&quot;&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-meta&quot;&gt;@override&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable-3&quot;&gt;String&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;command&lt;/span&gt;() {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;&quot;declare war&quot;&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;cm-string&quot;&gt;&quot;declare war&quot;&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 682px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 682px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;&lt;strong&gt;DART - 실행&lt;/strong&gt;&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;java&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;java&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 7.609375px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;Robot&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;r1&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;Robot&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;RobotType&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;Clean&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;r1&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;command&lt;/span&gt;();&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;Robot&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;r2&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;Robot&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;RobotType&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;War&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;r2&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;command&lt;/span&gt;();&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 88px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 88px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;따로 팩토리 클래스를 만들지 않았지만, 서로 다른 클래스를 만들어낸다.&lt;/p&gt;&lt;h3&gt;&lt;a name=&quot;header-n857&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;Map&lt;/h3&gt;&lt;p&gt;자바와 다트의 맵은 조금 다르다. 자바의 맵은 자유롭게 수정이 가능하지만, 다트는 수정 가능하게 쓸 수 도, 불가능하도록 쓸 수 도 있다.&lt;/p&gt;&lt;p&gt;자바는 맵에 키가 있어도 값을 추가한다.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;JAVA&lt;/strong&gt;&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;java&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;java&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 7.609375px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;Map&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-variable-3&quot;&gt;String&lt;/span&gt;, &lt;span class=&quot;cm-variable-3&quot;&gt;Integer&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;map&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;HashMap&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;lt;&amp;gt;&lt;/span&gt;();&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;map&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;put&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;&quot;height&quot;&lt;/span&gt;, &lt;span class=&quot;cm-number&quot;&gt;175&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;map&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;put&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;&quot;height&quot;&lt;/span&gt;, &lt;span class=&quot;cm-number&quot;&gt;180&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;System&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;out&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;println&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;map&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;get&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;&quot;height&quot;&lt;/span&gt;)); &lt;span class=&quot;cm-comment&quot;&gt;// 180 출력&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 88px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 88px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;다트는 2가지 방법으로 맵을 관리한다.&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;p&gt;키가 있어도 값을 추가하거나(수정 불가),&lt;/p&gt;&lt;ul&gt;&lt;li&gt;map[key] = value&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;키가 없을때만 값을 추가한다(수정 가능).&lt;/p&gt;&lt;ul&gt;&lt;li&gt;putIfAbsent 사용&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;strong&gt;DART&lt;/strong&gt;&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;java&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;java&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 7.609375px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;Map&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-variable-3&quot;&gt;String&lt;/span&gt;, &lt;span class=&quot;cm-variable-3&quot;&gt;int&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;map&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;Map&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-variable-3&quot;&gt;String&lt;/span&gt;, &lt;span class=&quot;cm-variable-3&quot;&gt;int&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;gt;&lt;/span&gt;();&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;map&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;putIfAbsent&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;&quot;height&quot;&lt;/span&gt;, () &lt;span class=&quot;cm-operator&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;175&lt;/span&gt;); &lt;span class=&quot;cm-comment&quot;&gt;// 키가 없을 때만 값을 추가&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;map&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;putIfAbsent&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;&quot;height&quot;&lt;/span&gt;, () &lt;span class=&quot;cm-operator&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;180&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;map&lt;/span&gt;[&lt;span class=&quot;cm-string&quot;&gt;&quot;height&quot;&lt;/span&gt;]); &lt;span class=&quot;cm-comment&quot;&gt;// 175 출력&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;map&lt;/span&gt;[&lt;span class=&quot;cm-string&quot;&gt;&quot;height&quot;&lt;/span&gt;] &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;190&lt;/span&gt;; &lt;span class=&quot;cm-comment&quot;&gt;// 이미 키가 있어도 값을 추가&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;map&lt;/span&gt;[&lt;span class=&quot;cm-string&quot;&gt;&quot;height&quot;&lt;/span&gt;]); &lt;span class=&quot;cm-comment&quot;&gt;// 190 출력&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 176px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 176px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;h3&gt;&lt;a name=&quot;header-n876&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;Concurrency(동시성) - Isolate, Thread&lt;/h3&gt;&lt;p&gt;다트에서는 어떻게 병렬 작업을 할까?&lt;/p&gt;&lt;p&gt;다트는 싱글 스레드이다. 여러 스레드를 만들 수 없다. 다트에선 Isolate를 만들어 병렬 처리를 한다. 스레드 안에 Isolate가 여럿 있는 걸 상상하면 된다.&lt;/p&gt;&lt;p&gt;Isolate는 분리된 작업 단위이다. Isolate는 각각의 메모리 힙(Each isolate has its own memory heap)가 있다. 락(lock)을 걸 수 없기에 경쟁 상태(race condition)나 데드락이 발생하지 않는다!&lt;/p&gt;&lt;p&gt;가장 기본이 되는 Isolate는 &lt;strong&gt;main isolate&lt;/strong&gt; 이다. 다트 런타임에 의해 만들어진다.&lt;/p&gt;&lt;p&gt;main isolate는 필요에 따라 Isolate를 만들어 쓴다(spawn).&lt;/p&gt;&lt;p&gt;isolate를 만드는 걸 스폰(spawn)이라고 한다. 게임을 하면 몬스터를 스폰한다는 말을 종종 하는데 만든다는 의미다.&lt;/p&gt;&lt;p&gt;간단한 예제를 보자.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;DART - Isolate 만들기(스폰하기)&lt;/strong&gt;&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;java&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;java&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 7.609375px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable-3&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;cm-def&quot;&gt;main&lt;/span&gt;() {&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;Isolate&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;spawn&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;sendMessage&lt;/span&gt;, &lt;span class=&quot;cm-string&quot;&gt;'Hello'&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;Isolate&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;spawn&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;sendMessage&lt;/span&gt;, &lt;span class=&quot;cm-string&quot;&gt;'Greetings'&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;Isolate&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;spawn&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;sendMessage&lt;/span&gt;, &lt;span class=&quot;cm-string&quot;&gt;'Welcome'&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable-3&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;cm-def&quot;&gt;sendMessage&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;message&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;'This is a ${message}'&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 198px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 198px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;main을 실행하면 3개의 Isolate가 만들어진다.&lt;/p&gt;&lt;p&gt;각각의 Isolate는 순서대로 실행되지는 않는다.&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;java&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;java&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 7.609375px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-operator&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;출력&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;결과&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;1&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;This&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;is&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;a&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;2.&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;Greetings&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;This&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;is&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;a&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;1.&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;Hello&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;This&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;is&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;a&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;3.&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;Welcome&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-operator&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;출력&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;결과&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;2&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;This&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;is&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;a&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;3.&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;Welcome&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;This&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;is&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;a&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;2.&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;Greetings&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;This&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;is&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;a&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;1.&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;Hello&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 198px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 198px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;h3&gt;&lt;a name=&quot;header-n889&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;비동기처리 - Future, Async, Await&lt;/h3&gt;&lt;p&gt;자바는 오래된 언어다 보니 비동기처리가 기본적으로 지원되지 않는다. 외부 라이브러리(RxJava)를 쓰거나, 최신 자바 버전을 써야한다. RxJava는 난이도가 좀 있는 편이라 처음엔 쓰기 어렵다.&lt;/p&gt;&lt;p&gt;다트의 비동기 처리는 간편하다. 퓨처(Future, 미래)란 객체를 쓰는데, 자세한 건 밑에서 알아보도록 하자.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;JAVA&lt;/strong&gt;&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;java&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;java&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 7.609375px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-comment&quot;&gt;// Java 8 - async 함수를 사용해 비동기 처리를 했다.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;CompletableFuture&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;runAsync&lt;/span&gt;(() &lt;span class=&quot;cm-operator&quot;&gt;-&amp;gt;&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;System&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;out&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;println&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;&quot;Run async in CompletableFuture&quot;&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;  });&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-comment&quot;&gt;// RXJava - 새 스레드를 생성해서 비동기 처리를 했다.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;Observable&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;just&lt;/span&gt;(&lt;span class=&quot;cm-number&quot;&gt;1&lt;/span&gt;,&lt;span class=&quot;cm-number&quot;&gt;2&lt;/span&gt;,&lt;span class=&quot;cm-number&quot;&gt;3&lt;/span&gt;,&lt;span class=&quot;cm-number&quot;&gt;4&lt;/span&gt;,&lt;span class=&quot;cm-number&quot;&gt;5&lt;/span&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;  .&lt;span class=&quot;cm-variable&quot;&gt;subscribeOn&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;Schedulers&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;io&lt;/span&gt;())&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;  .&lt;span class=&quot;cm-variable&quot;&gt;subscribe&lt;/span&gt;(&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;numbers&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;-&amp;gt;&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;System&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;out&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;println&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;numbers&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;  });&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 264px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 264px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;다트의 비동기는 Future, await, async로 구성되어 있다.&lt;/p&gt;&lt;p&gt;간단히 어떤 의미인지 알아보도록 하자.&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Future : 바로 끝나지 않는 작업을 할때 쓰인다. 일반적인 함수는 결과를 리턴하지만, 비동기 함수는 Future를 리턴한다.&lt;/li&gt;&lt;li&gt;await :  비동기 처리가 끝날 때까지 기다린다는 의미다. 다른 작업을 진행하지 않는다. Future의 작업을 완료하고 다음 작업을 할때 쓰인다.&lt;/li&gt;&lt;li&gt;async :  비동기 처리를 하겠단 선언이다.  await는 async와 항상 함께 쓰인다.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;아직 어떤 뜻인지 와닿지 않을 거다. 예제를 따라해보면서 이해해보자.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;DART - 1. Future만 써보기 - second() 함수만 2초 뒤에 실행된다.&lt;/strong&gt;&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;dart&quot; style=&quot;page-break-inside: unset;&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;dart&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 7.609375px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;main&lt;/span&gt;() {&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-tab&quot; role=&quot;presentation&quot; cm-text=&quot;	&quot;&gt;    &lt;/span&gt;&lt;span class=&quot;cm-variable&quot;&gt;first&lt;/span&gt;();&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-tab&quot; role=&quot;presentation&quot; cm-text=&quot;	&quot;&gt;    &lt;/span&gt;&lt;span class=&quot;cm-variable&quot;&gt;second&lt;/span&gt;();&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-tab&quot; role=&quot;presentation&quot; cm-text=&quot;	&quot;&gt;    &lt;/span&gt;&lt;span class=&quot;cm-variable&quot;&gt;third&lt;/span&gt;();&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;} &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;first&lt;/span&gt;() {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;&quot;First&quot;&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;second&lt;/span&gt;() &lt;span class=&quot;cm-keyword&quot;&gt;async&lt;/span&gt; { &lt;span class=&quot;cm-comment&quot;&gt;// async는 비동기 처리하라는 의미.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;Future&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;delayed&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;Duration&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;seconds&lt;/span&gt;: &lt;span class=&quot;cm-number&quot;&gt;2&lt;/span&gt;), () { &lt;span class=&quot;cm-comment&quot;&gt;// 2초 딜레이&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;&quot;Second&quot;&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  });&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;third&lt;/span&gt;() {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;&quot;Third&quot;&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 418px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 418px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;First,&lt;/p&gt;&lt;p&gt;Third,&lt;/p&gt;&lt;p&gt;Second&lt;/p&gt;&lt;p&gt;순으로 출력된다. Seoncd의 출력을 2초 늦췄기 때문이다.&lt;/p&gt;&lt;p&gt;second() 함수를 조금 수정해보겠다.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;DART - 2. Future와 따로 실행해보기&lt;/strong&gt;&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;dart&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;dart&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 7.609375px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;main&lt;/span&gt;() {&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-tab&quot; role=&quot;presentation&quot; cm-text=&quot;	&quot;&gt;    &lt;/span&gt;&lt;span class=&quot;cm-variable&quot;&gt;first&lt;/span&gt;();&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-tab&quot; role=&quot;presentation&quot; cm-text=&quot;	&quot;&gt;    &lt;/span&gt;&lt;span class=&quot;cm-variable&quot;&gt;second&lt;/span&gt;();&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-tab&quot; role=&quot;presentation&quot; cm-text=&quot;	&quot;&gt;    &lt;/span&gt;&lt;span class=&quot;cm-variable&quot;&gt;third&lt;/span&gt;();&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;second&lt;/span&gt;() &lt;span class=&quot;cm-keyword&quot;&gt;async&lt;/span&gt; { &lt;span class=&quot;cm-comment&quot;&gt;// async는 비동기 처리하라는 의미.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;Future&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;delayed&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;Duration&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;seconds&lt;/span&gt;: &lt;span class=&quot;cm-number&quot;&gt;2&lt;/span&gt;), () {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;&quot;Future inside&quot;&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  });&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;&quot;Second&quot;&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 286px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 286px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;shell&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;shell&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 7.609375px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;First&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;Second&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;Third&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;Future inside&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 88px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 88px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;순으로 실행된다.&lt;/p&gt;&lt;p&gt;Future를 함수 내에서 쓰더라도, 멈추지 않고 쭉 실행된다.&lt;/p&gt;&lt;p&gt;그러면 await를 쓰면 어떻게 될까?&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;DART 3. - await 사용 - 퓨처가 완료될때까지 기다림.&lt;/strong&gt;&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;dart&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;dart&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 7.609375px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;main&lt;/span&gt;() {&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-tab&quot; role=&quot;presentation&quot; cm-text=&quot;	&quot;&gt;    &lt;/span&gt;&lt;span class=&quot;cm-variable&quot;&gt;first&lt;/span&gt;();&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-tab&quot; role=&quot;presentation&quot; cm-text=&quot;	&quot;&gt;    &lt;/span&gt;&lt;span class=&quot;cm-variable&quot;&gt;second&lt;/span&gt;();&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-tab&quot; role=&quot;presentation&quot; cm-text=&quot;	&quot;&gt;    &lt;/span&gt;&lt;span class=&quot;cm-variable&quot;&gt;third&lt;/span&gt;();&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;second&lt;/span&gt;() &lt;span class=&quot;cm-keyword&quot;&gt;async&lt;/span&gt; { &lt;span class=&quot;cm-comment&quot;&gt;// async는 비동기 처리하라는 의미. await를 쓸 때는 꼭 붙여줘야한다.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;await&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;Future&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;delayed&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;Duration&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;seconds&lt;/span&gt;: &lt;span class=&quot;cm-number&quot;&gt;2&lt;/span&gt;), () { &lt;span class=&quot;cm-comment&quot;&gt;// 먼저 실행된다.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;&quot;Future inside&quot;&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;  });&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;&quot;Second&quot;&lt;/span&gt;); &lt;span class=&quot;cm-comment&quot;&gt;// 가장 마지막에 실행&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 286px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 286px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;shell&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;shell&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 7.609375px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;First&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;Third&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;Future inside&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;Second&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 88px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 88px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;Future.delay가 print(&quot;Second&quot;) 보다 먼저 실행된다.&lt;/p&gt;&lt;p&gt;퓨처가 완료할때까지 나머지 부분이 기다린 것이다.&lt;/p&gt;&lt;p&gt;await를 쓰면 Future의 작업이 끝날 때까지 기다렸다 다음으로 넘어간다!&lt;/p&gt;&lt;p&gt;그렇다면 중간에 멈추지 않고 Future 값을 처리하려면 어떻게 해야할까?&lt;/p&gt;&lt;p&gt;then()을 써주면 된다.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;비동기 파일 읽기&lt;/strong&gt;&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;dart&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;dart&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 7.609375px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;main&lt;/span&gt;() {&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;&quot;BEFORE&quot;&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;readFileAsync&lt;/span&gt;().&lt;span class=&quot;cm-variable&quot;&gt;then&lt;/span&gt;((&lt;span class=&quot;cm-variable&quot;&gt;data&lt;/span&gt;) &lt;span class=&quot;cm-operator&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;data&lt;/span&gt;));&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;&quot;AFTER&quot;&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;Future&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;readFileAsync&lt;/span&gt;() &lt;span class=&quot;cm-keyword&quot;&gt;async&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;await&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;File&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;&quot;file.json&quot;&lt;/span&gt;).&lt;span class=&quot;cm-variable&quot;&gt;readAsString&lt;/span&gt;();&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 198px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 198px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;아래는 출력값이다.&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;dart&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;dart&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 7.609375px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;BEFORE&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;AFTER&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;{&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-string&quot;&gt;&quot;name&quot;&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;&quot;hochul&quot;&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-string&quot;&gt;&quot;age&quot;&lt;/span&gt;: &lt;span class=&quot;cm-number&quot;&gt;33&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 132px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 132px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;생각대로 파일 데이터가 가장 늦게 읽힌다.&lt;/p&gt;&lt;p&gt;반면 await를 쓰면 파일 읽기를 완료할때까지 다른 작업을 하지 않는다.&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;dart&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;dart&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 7.609375px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-builtin&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;main&lt;/span&gt;() {&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;&quot;BEFORE&quot;&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-keyword&quot;&gt;await&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;readFileAsync&lt;/span&gt;());&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;&quot;AFTER&quot;&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 110px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 110px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;shell&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;shell&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 7.609375px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;BEFORE&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;{&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-string&quot;&gt;&quot;name&quot;&lt;/span&gt;: &lt;span class=&quot;cm-string&quot;&gt;&quot;hochul&quot;&lt;/span&gt;,&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-string&quot;&gt;&quot;age&quot;&lt;/span&gt;: &lt;span class=&quot;cm-number&quot;&gt;33&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;AFTER&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 132px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 132px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;파일 읽기가 끝난 뒤에 AFTER를 출력한다.&lt;/p&gt;&lt;p&gt;await를 쓰면 간단히 비동기처리를 할 수 있지만, 메인 함수에서 쓰는 건 주의해야겠다.&lt;/p&gt;&lt;h3&gt;&lt;br /&gt;&lt;/h3&gt;&lt;h3&gt;&lt;a name=&quot;header-n937&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;Isolate vs Future&lt;/h3&gt;&lt;p&gt;Isolate와 Future는 어떤 차이가 있을까?&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Isolate: 병렬 작업을 할 수 있게 해준다. 멀티 스레드와 유사하며 여러 Isolate를 만들어서 작업을 할 수 있다.&lt;/li&gt;&lt;li&gt;Future: 비동기 처리를 하지만, 보통 한 스레드내에서 작업이 이뤄진다.&lt;/li&gt;&lt;/ul&gt;&lt;h3&gt;&lt;a name=&quot;header-n945&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;결론&lt;/h3&gt;&lt;p&gt;자바와 다트는 큰 부분에서 비슷하지만, 세부적인 데서 차이가 있다.&lt;/p&gt;&lt;p&gt;자바 개발자라면 1~2일 정도면 다트 문접에 익숙해질 수 있다.&lt;/p&gt;&lt;p&gt;자료형, 생성자, 동시성, 비동기 처리등에서 다르긴 하지만 수월한 편이다.&lt;/p&gt;&lt;p&gt;빠르게 변하는 IT 세상에서 새 언어를 배우는 건 필수적이다.&lt;/p&gt;&lt;p&gt;주말 오후를 잠깐 투자해 다트를 배워보는 건 어떨까?&lt;/p&gt;&lt;p&gt;간결함에 놀라고 안드로이드와 IOS를 한번에 잡을 수 있는 매력 푹 빠져들게 될 것이다.&lt;/p&gt;&lt;p&gt;다음엔 플러터의 기본 레이아웃에 대해 알아보도록 하겠다!&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;참고 - &lt;a href=&quot;http://cogitas.net/from-java-to-dart/&quot; target=&quot;_blank&quot; class=&quot;url&quot;&gt;http://cogitas.net/from-java-to-dart/&lt;/a&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;참고 - &lt;a href=&quot;https://hackernoon.com/are-futures-in-dart-threads-2cdc5bd8063a&quot; target=&quot;_blank&quot; class=&quot;url&quot;&gt;https://hackernoon.com/are-futures-in-dart-threads-2cdc5bd8063a&lt;/a&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;참고 - &lt;a href=&quot;http://jpryan.me/dartbyexample/&quot; target=&quot;_blank&quot; class=&quot;url&quot;&gt;http://jpryan.me/dartbyexample/&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;

&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</description>
      <category>플러터(Flutter)</category>
      <author>에드 신</author>
      <guid isPermaLink="true">https://software-creator.tistory.com/5</guid>
      <comments>https://software-creator.tistory.com/5#entry5comment</comments>
      <pubDate>Thu, 18 Oct 2018 02:59:59 +0900</pubDate>
    </item>
    <item>
      <title>코딩을 책으로 배울 수 있을까? - 효과적인 코딩 공부법</title>
      <link>https://software-creator.tistory.com/3</link>
      <description>&lt;div style=&quot;-en-clipboard:true;&quot;&gt;인공지능, 4차 산업 혁명 때문에 코딩에 대한 관심이 무척 커졌다. 내게&amp;nbsp;코딩 공부법을 물어보는 사람도 많다. 오늘은 코딩을 처음 배울 때 효과적으로 배우는 법에 대해 알아보겠다.&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;-en-clipboard:true;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;-en-clipboard:true;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 12pt;&quot;&gt;1. 책으로 코딩을 배우지 말자.&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;-en-clipboard:true;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;맑은 고딕&amp;quot;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;-en-clipboard:true;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;맑은 고딕&amp;quot;, sans-serif;&quot;&gt;많은 사람들이 코딩을 배울때도 책을 산다. 흔히 무언가를 배울 때 책을 사는 걸 당연하게 생각하기 때문이다.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: 10pt;&quot;&gt;하지만&lt;/span&gt;&lt;span style=&quot;font-size: 10pt;&quot;&gt; 책으로 코딩을 배우는 건 좋지 않다.&lt;/span&gt;&lt;span style=&quot;font-size: 10pt;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;책은 필요하지만 처음 배울 때는 아니다. 질문을 바꿔보자.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br clear=&quot;none&quot;&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &amp;quot;맑은 고딕&amp;quot;, sans-serif;&quot;&gt;축구를 책으로 배울 수 있을까?&amp;nbsp;&lt;/span&gt;피아노를 책으로 배울 수 있을까? 그림을 책으로 배울 수 있을까?&lt;/div&gt;&lt;div&gt;&lt;br clear=&quot;none&quot;&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &amp;quot;맑은 고딕&amp;quot;, sans-serif;&quot;&gt;당연히 아니다. 질문 자체가 어리석게 느껴진다.&amp;nbsp;&lt;/span&gt;직접 해보고, 잘못 된 점을 계속 고쳐야지 배울 수 있다. 행동 + 지식 둘 다 필요하다.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br clear=&quot;none&quot;&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &amp;quot;맑은 고딕&amp;quot;, sans-serif;&quot;&gt;&lt;i&gt;&lt;span style=&quot;font-size: 12pt;&quot;&gt;코딩은 단순히 아는 것만으로는 안 되고 직접 해보는 과정이 필요하다.&amp;nbsp;&lt;/span&gt;
&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br clear=&quot;none&quot;&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &amp;quot;맑은 고딕&amp;quot;, sans-serif;&quot;&gt;소프트웨어를 만드는 과정을 보면, 개발자들은 대부분 키보드를 두들기며 하루를 보낸다. &amp;nbsp;&lt;/span&gt;중간에 잘못되면 앞에 있던 코드를 지우기도 하고, 새로운 코드를 쓰기도 하고, 에러가 생기면 인터넷을 뒤지기도 한다. 일을 더 빨리 하기 위해 단축키를 쓰기도 하고, 다양한 보조 도구를 쓴다. 하지만 책에는 이 모든 과정이 생략되어 있다. 책에는 코드만 덩그러니 남아 있다. 책은 200장짜리 사진과 같다. 많은 부분이 생략되어 있다.&amp;nbsp;영상과 사진은 엄연히 다르다. 특히 편집된 것이라면.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;그러면 어떻게 해야할까?&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &amp;quot;맑은 고딕&amp;quot;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &amp;quot;맑은 고딕&amp;quot;, sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 12pt;&quot;&gt;2. 수업을 듣거나, 영상 강의를 보자.&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br clear=&quot;none&quot;&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &amp;quot;맑은 고딕&amp;quot;, sans-serif;&quot;&gt;난 수업을 듣거나 영상 강의를 권한다.&amp;nbsp;&lt;/span&gt;실제 코딩을 어떻게 하는지 알 수 있기 때문이다.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br clear=&quot;none&quot;&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &amp;quot;맑은 고딕&amp;quot;, sans-serif;&quot;&gt;개인적으로 추천하는 방법은 다음과 같다.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br clear=&quot;none&quot;&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &amp;quot;맑은 고딕&amp;quot;, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14pt;&quot;&gt;&lt;b&gt;수업 듣기 &amp;gt;= 유료 영상 강의 &amp;gt; &lt;/b&gt;&lt;span style=&quot;font-size: 10pt;&quot;&gt;무료 영상 강의 &amp;gt; 잘 쓰인 책 &amp;gt; 엉망인 책 &amp;gt; 초보끼리 스터디하기&amp;nbsp;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br clear=&quot;none&quot;&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &amp;quot;맑은 고딕&amp;quot;, sans-serif;&quot;&gt;여유가 있다면 학원 가거나 그룹 수업을 듣는 게 제일 좋다.&amp;nbsp;어려움이 생겼을 때 바로바로 물어볼 수 있기 때문이다.&amp;nbsp;&lt;/span&gt;비용은 천차만별인데 20~200만원까지 한다. 개인 수업보단 그룹 수업이 나은데, 수강생끼리 친해지면 모르는 걸 물어볼 수도 있고 많은 도움이 된다. 수업을 듣더라도 무료 영상 강의나 책을 보면서 공부하도록 하자. 사실 선생님이 모든 걸 다 알려줄 수는 없다.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br clear=&quot;none&quot;&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &amp;quot;맑은 고딕&amp;quot;, sans-serif;&quot;&gt;다음으로 유료 영상 강의를 듣길 권한다. 3~10만원정도인데 충분히 가치를 한다. 커리큘럼이 잘 짜야져 있기 때문이다.&amp;nbsp;&lt;/span&gt;의지력이 약하면 그룹 스터디를 만들어 영상 강의를 같이 듣자. 실력이 쌓이고 나선 무료 강의(유투브)도 나쁘진 않지만 처음에는 유료 영상 강의를 강력히 권한다.&amp;nbsp;&lt;/div&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;3. 책은 코딩에 익숙해지면 보자.&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &amp;quot;맑은 고딕&amp;quot;, sans-serif;&quot;&gt;그럼 책은 쓸데가 없을까? 아니다.&amp;nbsp;&lt;/span&gt;책은 코딩을 어느정도 접하고 보면 정말 좋다. 영상이나 수업은 말로 하다보니, 내가 제대로 이해를 못한 부분도 알아 들었다 생각하기 쉽다. 한번만 이야기하고서는 넘어가기 때문이다. 분명히 수업시간에는 잘 알아 들은 것 같은데, 실제 해보려고 하면 못 하는 경우가 많다. 뇌가 잠깐만 기억했다가 잊어버렸기 때문이다.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br clear=&quot;none&quot;&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &amp;quot;맑은 고딕&amp;quot;, sans-serif;&quot;&gt;반면 책은 단기기억에서 장기기억으로 넘어갈 때 유용하다.&amp;nbsp;&lt;/span&gt;책을 보다보면 내가 이해한 부분과 모르는 부분이 명확해진다. 내가 몰랐던 걸 확인하고, 다시 코딩을 해보는 과정에서 뼈속 깊이 기억하게 된다. 영상만 봐서는 이런 과정을 겪을 수 없다.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &amp;quot;맑은 고딕&amp;quot;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &amp;quot;맑은 고딕&amp;quot;, sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: 12pt;&quot;&gt;4. 하지 말아야 할일&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br clear=&quot;none&quot;&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &amp;quot;맑은 고딕&amp;quot;, sans-serif;&quot;&gt;반면 엉망인 책을 보거나, 초보끼리 스터디는 하지 말자. 코딩 자체를 싫어하게 될 가능성이 높다.&amp;nbsp;&lt;/span&gt;번역 도서 중에 안 좋은 책이 정말 많다. 가능하면 한국인 저자 책을 고르고, 3~5권정도 빌려서 본 뒤에 맘에 드는 것 1권을 사도록 하자. 번역서를 고른다면 일본어 번역책이 낫고, 미국 서적을 번역한 건 초반에 피하자. 기술 서적은 영어 번역이 안 좋은 경우가 많다. 그나마 일본어 번역은 어순이 비슷해서 알아듣기 쉬운 경우가 많기 때문이다.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br clear=&quot;none&quot;&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &amp;quot;맑은 고딕&amp;quot;, sans-serif;&quot;&gt;초보끼리 스터디는 서로 에러 못 고치고 괴로워만 할 가능성이 높다.&amp;nbsp;&lt;/span&gt;영어도 못하는 사람끼리 하면 콩글리시만 느는 것처럼 코딩도 잘못된 습관만 생길 수 있다. 차라리 강의를 사서 같이 보고 이야기하다 헤어지는 게 낫다.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br clear=&quot;none&quot;&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &amp;quot;맑은 고딕&amp;quot;, sans-serif;&quot;&gt;지난 5년간의 경험을 바탕으로 글을 적어보았다. 프로그래밍&lt;/span&gt;의 즐겁고도 험난한 세계로 온 걸 환영한다. 초반의 어려움을 딛고 꼭 만드는 기쁨을 경험할 수 있기를 바란다. &amp;nbsp;&lt;/div&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</description>
      <category>코딩 배우는 법을 배우기</category>
      <category>Coding</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>
      <category>코딩 영상 수업</category>
      <category>코딩 잘하는 법</category>
      <category>코딩학원</category>
      <category>파이썬</category>
      <author>에드 신</author>
      <guid isPermaLink="true">https://software-creator.tistory.com/3</guid>
      <comments>https://software-creator.tistory.com/3#entry3comment</comments>
      <pubDate>Mon, 15 Oct 2018 15:44:32 +0900</pubDate>
    </item>
    <item>
      <title>안드로이드를 위한 자바  - 변수, 자료형, if, for</title>
      <link>https://software-creator.tistory.com/2</link>
      <description>&lt;meta charset=&quot;UTF-8&quot;&gt;&lt;meta name=&quot;viewport&quot; content=&quot;width=device-width initial-scale=1&quot;&gt;
&lt;title&gt;안드로이드를 위한 자바  - 변수, 자료형, if, for&lt;/title&gt;&lt;link href=&quot;https://fonts.googleapis.com/css?family=Open+Sans:400italic,700italic,700,400&amp;amp;subset=latin,latin-ext&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot;&gt;&lt;style type=&quot;text/css&quot;&gt;html {overflow-x: initial !important;}:root { --bg-color: #ffffff; --text-color: #333333; --select-text-bg-color: #B5D6FC; --select-text-font-color: auto; --monospace: 'Lucida Console',Consolas,'Courier',monospace; }
html { font-size: 14px; background-color: var(--bg-color); color: var(--text-color); font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; -webkit-font-smoothing: antialiased; }
body { margin: 0px; padding: 0px; height: auto; bottom: 0px; top: 0px; left: 0px; right: 0px; font-size: 1rem; line-height: 1.42857143; overflow-x: hidden; background-image: inherit; background-size: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: inherit; background-position: inherit inherit; background-repeat: inherit inherit; }
iframe { margin: auto; }
a.url { word-break: break-all; }
a:active, a:hover { outline: 0px; }
.in-text-selection, ::selection { text-shadow: none; background: var(--select-text-bg-color); color: var(--select-text-font-color); }
#write { margin: 0px auto; height: auto; width: inherit; word-break: normal; word-wrap: break-word; position: relative; white-space: normal; padding-bottom: 70px; overflow-x: visible; }
.first-line-indent #write div, .first-line-indent #write li, .first-line-indent #write p { text-indent: 2em; }
.first-line-indent #write div :not(p):not(div), .first-line-indent #write div.md-htmlblock-container, .first-line-indent #write p *, .first-line-indent pre { text-indent: 0px; }
.for-image #write { padding-left: 8px; padding-right: 8px; }
body.typora-export { padding-left: 30px; padding-right: 30px; }
@media screen and (max-width: 500px) { 
  body.typora-export { padding-left: 0px; padding-right: 0px; }
  .CodeMirror-sizer { margin-left: 0px !important; }
  .CodeMirror-gutters { display: none !important; }
}
#write &gt; blockquote:first-child, #write &gt; div:first-child, #write &gt; figure:first-child, #write &gt; ol:first-child, #write &gt; p:first-child, #write &gt; pre:first-child, #write &gt; ul:first-child { margin-top: 30px; }
#write li &gt; figure:first-child { margin-top: -20px; }
#write ol, #write ul { position: relative; }
img { max-width: 100%; vertical-align: middle; }
button, input, select, textarea { color: inherit; font-family: inherit; font-size: inherit; font-style: inherit; font-variant-caps: inherit; font-weight: inherit; line-height: inherit; }
input[type=&quot;checkbox&quot;], input[type=&quot;radio&quot;] { line-height: normal; padding: 0px; }
*, ::after, ::before { box-sizing: border-box; }
#write h1, #write h2, #write h3, #write h4, #write h5, #write h6, #write p, #write pre { width: inherit; }
#write h1, #write h2, #write h3, #write h4, #write h5, #write h6, #write p { position: relative; }
h1, h2, h3, h4, h5, h6 { break-after: avoid-page; break-inside: avoid; orphans: 2; }
p { orphans: 4; }
h1 { font-size: 2rem; }
h2 { font-size: 1.8rem; }
h3 { font-size: 1.6rem; }
h4 { font-size: 1.4rem; }
h5 { font-size: 1.2rem; }
h6 { font-size: 1rem; }
.md-math-block, .md-rawblock, h1, h2, h3, h4, h5, h6, p { margin-top: 1rem; margin-bottom: 1rem; }
.hidden { display: none; }
.md-blockmeta { color: rgb(204, 204, 204); font-weight: 700; font-style: italic; }
a { cursor: pointer; }
sup.md-footnote { padding: 2px 4px; background-color: rgba(238, 238, 238, 0.701961); color: rgb(85, 85, 85); border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; cursor: pointer; }
sup.md-footnote a, sup.md-footnote a:hover { color: inherit; text-transform: inherit; text-decoration: inherit; }
#write input[type=&quot;checkbox&quot;] { cursor: pointer; width: inherit; height: inherit; }
figure { overflow-x: auto; margin: 1.2em 0px; max-width: calc(100% + 16px); padding: 0px; }
figure &gt; table { margin: 0px !important; }
tr { break-inside: avoid; break-after: auto; }
thead { display: table-header-group; }
table { border-collapse: collapse; border-spacing: 0px; width: 100%; overflow: auto; break-inside: auto; text-align: left; }
table.md-table td { min-width: 80px; }
.CodeMirror-gutters { border-right-width: 0px; background-color: inherit; }
.CodeMirror { text-align: left; }
.CodeMirror-placeholder { opacity: 0.3; }
.CodeMirror pre { padding: 0px 4px; }
.CodeMirror-lines { padding: 0px; }
div.hr:focus { cursor: none; }
#write pre { white-space: pre-wrap; }
#write.fences-no-line-wrapping pre { white-space: pre; }
#write pre.ty-contain-cm { white-space: normal; }
.CodeMirror-gutters { margin-right: 4px; }
.md-fences { font-size: 0.9rem; display: block; break-inside: avoid; text-align: left; overflow: visible; white-space: pre; background-image: inherit; background-size: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: inherit; position: relative !important; background-position: inherit inherit; background-repeat: inherit inherit; }
.md-diagram-panel { width: 100%; margin-top: 10px; text-align: center; padding-top: 0px; padding-bottom: 8px; overflow-x: auto; }
#write .md-fences.mock-cm { white-space: pre-wrap; }
.md-fences.md-fences-with-lineno { padding-left: 0px; }
#write.fences-no-line-wrapping .md-fences.mock-cm { white-space: pre; overflow-x: auto; }
.md-fences.mock-cm.md-fences-with-lineno { padding-left: 8px; }
.CodeMirror-line, twitterwidget { break-inside: avoid; }
.footnotes { opacity: 0.8; font-size: 0.9rem; margin-top: 1em; margin-bottom: 1em; }
.footnotes + .footnotes { margin-top: 0px; }
.md-reset { margin: 0px; padding: 0px; border: 0px; outline: 0px; vertical-align: top; text-decoration: none; text-shadow: none; float: none; position: static; width: auto; height: auto; white-space: nowrap; cursor: inherit; line-height: normal; font-weight: 400; text-align: left; box-sizing: content-box; direction: ltr; background-position: 0px 0px; background-repeat: initial initial; }
li div { padding-top: 0px; }
blockquote { margin: 1rem 0px; }
li .mathjax-block, li p { margin: 0.5rem 0px; }
li { margin: 0px; position: relative; }
blockquote &gt; :last-child { margin-bottom: 0px; }
blockquote &gt; :first-child, li &gt; :first-child { margin-top: 0px; }
.footnotes-area { color: rgb(136, 136, 136); margin-top: 0.714rem; padding-bottom: 0.143rem; white-space: normal; }
#write .footnote-line { white-space: pre-wrap; }
@media print { 
  body, html { border: 1px solid transparent; height: 99%; break-after: avoid-page; break-before: avoid-page; }
  #write { margin-top: 0px; border-color: transparent !important; }
  .typora-export * { -webkit-print-color-adjust: exact; }
  html.blink-to-pdf { font-size: 13px; }
  .typora-export #write { padding-left: 1cm; padding-right: 1cm; padding-bottom: 0px; break-after: avoid-page; }
  .typora-export #write::after { height: 0px; }
  @page { margin: 20mm 0px; }
}
.footnote-line { margin-top: 0.714em; font-size: 0.7em; }
a img, img a { cursor: pointer; }
pre.md-meta-block { font-size: 0.8rem; min-height: 0.8rem; white-space: pre-wrap; background-color: rgb(204, 204, 204); display: block; overflow-x: hidden; background-position: initial initial; background-repeat: initial initial; }
p &gt; img:only-child { display: block; margin: auto; }
p &gt; .md-image:only-child { display: inline-block; width: 100%; text-align: center; }
#write .MathJax_Display { margin: 0.8em 0px 0px; }
.md-math-block { width: 100%; }
.md-math-block:not(:empty)::after { display: none; }
[contenteditable=&quot;true&quot;]:active, [contenteditable=&quot;true&quot;]:focus { outline: 0px; box-shadow: none; }
.md-task-list-item { position: relative; list-style-type: none; }
.task-list-item.md-task-list-item { padding-left: 0px; }
.md-task-list-item &gt; input { position: absolute; top: 0px; left: 0px; margin-left: -1.2em; margin-top: calc(1em - 10px); }
.math { font-size: 1rem; }
.md-toc { min-height: 3.58rem; position: relative; font-size: 0.9rem; border-top-left-radius: 10px; border-top-right-radius: 10px; border-bottom-right-radius: 10px; border-bottom-left-radius: 10px; }
.md-toc-content { position: relative; margin-left: 0px; }
.md-toc-content::after, .md-toc::after { display: none; }
.md-toc-item { display: block; color: rgb(65, 131, 196); }
.md-toc-item a { text-decoration: none; }
.md-toc-inner:hover { }
.md-toc-inner { display: inline-block; cursor: pointer; }
.md-toc-h1 .md-toc-inner { margin-left: 0px; font-weight: 700; }
.md-toc-h2 .md-toc-inner { margin-left: 2em; }
.md-toc-h3 .md-toc-inner { margin-left: 4em; }
.md-toc-h4 .md-toc-inner { margin-left: 6em; }
.md-toc-h5 .md-toc-inner { margin-left: 8em; }
.md-toc-h6 .md-toc-inner { margin-left: 10em; }
@media screen and (max-width: 48em) { 
  .md-toc-h3 .md-toc-inner { margin-left: 3.5em; }
  .md-toc-h4 .md-toc-inner { margin-left: 5em; }
  .md-toc-h5 .md-toc-inner { margin-left: 6.5em; }
  .md-toc-h6 .md-toc-inner { margin-left: 8em; }
}
a.md-toc-inner { font-size: inherit; font-style: inherit; font-weight: inherit; line-height: inherit; }
.footnote-line a:not(.reversefootnote) { color: inherit; }
.md-attr { display: none; }
.md-fn-count::after { content: '.'; }
code, pre, samp, tt { font-family: var(--monospace); }
kbd { margin: 0px 0.1em; padding: 0.1em 0.6em; font-size: 0.8em; color: rgb(36, 39, 41); background-color: rgb(255, 255, 255); border: 1px solid rgb(173, 179, 185); border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; box-shadow: rgba(12, 13, 14, 0.2) 0px 1px 0px, rgb(255, 255, 255) 0px 0px 0px 2px inset; white-space: nowrap; vertical-align: middle; background-position: initial initial; background-repeat: initial initial; }
.md-comment { color: rgb(162, 127, 3); opacity: 0.8; font-family: var(--monospace); }
code { text-align: left; }
a.md-print-anchor { white-space: pre !important; border: none !important; display: inline-block !important; position: absolute !important; width: 1px !important; right: 0px !important; outline: 0px !important; text-shadow: initial !important; background-position: 0px 0px !important; background-repeat: initial initial !important; }
.md-inline-math .MathJax_SVG .noError { display: none !important; }
.md-math-block .MathJax_SVG_Display { text-align: center; margin: 0px; position: relative; text-indent: 0px; max-width: none; max-height: none; min-height: 0px; min-width: 100%; width: auto; overflow-y: hidden; display: block !important; }
.MathJax_SVG_Display, .md-inline-math .MathJax_SVG_Display { width: auto; margin: inherit; display: inline-block !important; }
.MathJax_SVG .MJX-monospace { font-family: var(--monospace); }
.MathJax_SVG .MJX-sans-serif { font-family: sans-serif; }
.MathJax_SVG { display: inline; font-style: normal; font-weight: 400; line-height: normal; zoom: 90%; text-indent: 0px; text-align: left; text-transform: none; letter-spacing: normal; word-spacing: normal; word-wrap: normal; white-space: nowrap; float: none; direction: ltr; max-width: none; max-height: none; min-width: 0px; min-height: 0px; border: 0px; padding: 0px; margin: 0px; }
.MathJax_SVG * { transition: none; }
.MathJax_SVG_Display svg { vertical-align: middle !important; margin-bottom: 0px !important; }
.os-windows.monocolor-emoji .md-emoji { font-family: 'Segoe UI Symbol', sans-serif; }
.md-diagram-panel &gt; svg { max-width: 100%; }
[lang=&quot;mermaid&quot;] svg, [lang=&quot;flow&quot;] svg { max-width: 100%; }
[lang=&quot;mermaid&quot;] .node text { font-size: 1rem; }
table tr th { border-bottom-width: 0px; }
video { max-width: 100%; display: block; margin: 0px auto; }
iframe { max-width: 100%; width: 100%; border: none; }
.highlight td, .highlight tr { border: 0px; }


.CodeMirror { height: auto; }
.CodeMirror.cm-s-inner { background-image: inherit; background-size: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: inherit; background-position: inherit inherit; background-repeat: inherit inherit; }
.CodeMirror-scroll { overflow-y: hidden; overflow-x: auto; z-index: 3; }
.CodeMirror-gutter-filler, .CodeMirror-scrollbar-filler { background-color: rgb(255, 255, 255); }
.CodeMirror-gutters { border-right-width: 1px; border-right-style: solid; border-right-color: rgb(221, 221, 221); background-image: inherit; background-size: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: inherit; white-space: nowrap; background-position: inherit inherit; background-repeat: inherit inherit; }
.CodeMirror-linenumber { padding: 0px 3px 0px 5px; text-align: right; color: rgb(153, 153, 153); }
.cm-s-inner .cm-keyword { color: rgb(119, 0, 136); }
.cm-s-inner .cm-atom, .cm-s-inner.cm-atom { color: rgb(34, 17, 153); }
.cm-s-inner .cm-number { color: rgb(17, 102, 68); }
.cm-s-inner .cm-def { color: rgb(0, 0, 255); }
.cm-s-inner .cm-variable { color: rgb(0, 0, 0); }
.cm-s-inner .cm-variable-2 { color: rgb(0, 85, 170); }
.cm-s-inner .cm-variable-3 { color: rgb(0, 136, 85); }
.cm-s-inner .cm-string { color: rgb(170, 17, 17); }
.cm-s-inner .cm-property { color: rgb(0, 0, 0); }
.cm-s-inner .cm-operator { color: rgb(152, 26, 26); }
.cm-s-inner .cm-comment, .cm-s-inner.cm-comment { color: rgb(170, 85, 0); }
.cm-s-inner .cm-string-2 { color: rgb(255, 85, 0); }
.cm-s-inner .cm-meta { color: rgb(85, 85, 85); }
.cm-s-inner .cm-qualifier { color: rgb(85, 85, 85); }
.cm-s-inner .cm-builtin { color: rgb(51, 0, 170); }
.cm-s-inner .cm-bracket { color: rgb(153, 153, 119); }
.cm-s-inner .cm-tag { color: rgb(17, 119, 0); }
.cm-s-inner .cm-attribute { color: rgb(0, 0, 204); }
.cm-s-inner .cm-header, .cm-s-inner.cm-header { color: rgb(0, 0, 255); }
.cm-s-inner .cm-quote, .cm-s-inner.cm-quote { color: rgb(0, 153, 0); }
.cm-s-inner .cm-hr, .cm-s-inner.cm-hr { color: rgb(153, 153, 153); }
.cm-s-inner .cm-link, .cm-s-inner.cm-link { color: rgb(0, 0, 204); }
.cm-negative { color: rgb(221, 68, 68); }
.cm-positive { color: rgb(34, 153, 34); }
.cm-header, .cm-strong { font-weight: 700; }
.cm-del { text-decoration: line-through; }
.cm-em { font-style: italic; }
.cm-link { text-decoration: underline; }
.cm-error { color: red; }
.cm-invalidchar { color: red; }
.cm-constant { color: rgb(38, 139, 210); }
.cm-defined { color: rgb(181, 137, 0); }
div.CodeMirror span.CodeMirror-matchingbracket { color: rgb(0, 255, 0); }
div.CodeMirror span.CodeMirror-nonmatchingbracket { color: rgb(255, 34, 34); }
.cm-s-inner .CodeMirror-activeline-background { background-image: inherit; background-size: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: inherit; background-position: inherit inherit; background-repeat: inherit inherit; }
.CodeMirror { position: relative; overflow: hidden; }
.CodeMirror-scroll { height: 100%; outline: 0px; position: relative; box-sizing: content-box; background-image: inherit; background-size: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: inherit; background-position: inherit inherit; background-repeat: inherit inherit; }
.CodeMirror-sizer { position: relative; }
.CodeMirror-gutter-filler, .CodeMirror-hscrollbar, .CodeMirror-scrollbar-filler, .CodeMirror-vscrollbar { position: absolute; z-index: 6; display: none; }
.CodeMirror-vscrollbar { right: 0px; top: 0px; overflow: hidden; }
.CodeMirror-hscrollbar { bottom: 0px; left: 0px; overflow: hidden; }
.CodeMirror-scrollbar-filler { right: 0px; bottom: 0px; }
.CodeMirror-gutter-filler { left: 0px; bottom: 0px; }
.CodeMirror-gutters { position: absolute; left: 0px; top: 0px; padding-bottom: 30px; z-index: 3; }
.CodeMirror-gutter { white-space: normal; height: 100%; box-sizing: content-box; padding-bottom: 30px; margin-bottom: -32px; display: inline-block; }
.CodeMirror-gutter-wrapper { position: absolute; z-index: 4; border: none !important; background-position: 0px 0px !important; background-repeat: initial initial !important; }
.CodeMirror-gutter-background { position: absolute; top: 0px; bottom: 0px; z-index: 4; }
.CodeMirror-gutter-elt { position: absolute; cursor: default; z-index: 4; }
.CodeMirror-lines { cursor: text; }
.CodeMirror pre { border-top-left-radius: 0px; border-top-right-radius: 0px; border-bottom-right-radius: 0px; border-bottom-left-radius: 0px; border-width: 0px; font-family: inherit; font-size: inherit; margin: 0px; white-space: pre; word-wrap: normal; color: inherit; z-index: 2; position: relative; overflow: visible; background-position: 0px 0px; background-repeat: initial initial; }
.CodeMirror-wrap pre { word-wrap: break-word; white-space: pre-wrap; word-break: normal; }
.CodeMirror-code pre { border-right-width: 30px; border-right-style: solid; border-right-color: transparent; width: -webkit-fit-content; }
.CodeMirror-wrap .CodeMirror-code pre { border-right-style: none; width: auto; }
.CodeMirror-linebackground { position: absolute; left: 0px; right: 0px; top: 0px; bottom: 0px; z-index: 0; }
.CodeMirror-linewidget { position: relative; z-index: 2; overflow: auto; }
.CodeMirror-wrap .CodeMirror-scroll { overflow-x: hidden; }
.CodeMirror-measure { position: absolute; width: 100%; height: 0px; overflow: hidden; visibility: hidden; }
.CodeMirror-measure pre { position: static; }
.CodeMirror div.CodeMirror-cursor { position: absolute; visibility: hidden; border-right-style: none; width: 0px; }
.CodeMirror div.CodeMirror-cursor { visibility: hidden; }
.CodeMirror-focused div.CodeMirror-cursor { visibility: inherit; }
.cm-searching { background-color: rgba(255, 255, 0, 0.4); background-position: initial initial; background-repeat: initial initial; }
@media print { 
  .CodeMirror div.CodeMirror-cursor { visibility: hidden; }
}


:root {
    --side-bar-bg-color: #fafafa;
    --control-text-color: #777;
}

@include-when-export url(https://fonts.googleapis.com/css?family=Open+Sans:400italic,700italic,700,400&amp;subset=latin,latin-ext);

@font-face {
    font-family: 'Open Sans';
    font-style: normal;
    font-weight: normal;
    src: local('Open Sans Regular'),url('file:///Users/JcSnap/Library/Application%20Support/abnerworks.Typora/themes/github/400.woff') format('woff')
}

@font-face {
    font-family: 'Open Sans';
    font-style: italic;
    font-weight: normal;
    src: local('Open Sans Italic'),url('file:///Users/JcSnap/Library/Application%20Support/abnerworks.Typora/themes/github/400i.woff') format('woff')
}

@font-face {
    font-family: 'Open Sans';
    font-style: normal;
    font-weight: bold;
    src: local('Open Sans Bold'),url('file:///Users/JcSnap/Library/Application%20Support/abnerworks.Typora/themes/github/700.woff') format('woff')
}

@font-face {
    font-family: 'Open Sans';
    font-style: italic;
    font-weight: bold;
    src: local('Open Sans Bold Italic'),url('file:///Users/JcSnap/Library/Application%20Support/abnerworks.Typora/themes/github/700i.woff') format('woff')
}

html {
    font-size: 16px;
}

body {
    font-family: &quot;Open Sans&quot;,&quot;Clear Sans&quot;,&quot;Helvetica Neue&quot;,Helvetica,Arial,sans-serif;
    color: rgb(51, 51, 51);
    line-height: 1.6;
}

#write{
    max-width: 860px;
  	margin: 0 auto;
  	padding: 20px 30px 40px 30px;
	padding-top: 20px;
    padding-bottom: 100px;
}
#write &gt; ul:first-child,
#write &gt; ol:first-child{
    margin-top: 30px;
}

body &gt; *:first-child {
    margin-top: 0 !important;
}
body &gt; *:last-child {
    margin-bottom: 0 !important;
}
a {
    color: #4183C4;
}
h1,
h2,
h3,
h4,
h5,
h6 {
    position: relative;
    margin-top: 1rem;
    margin-bottom: 1rem;
    font-weight: bold;
    line-height: 1.4;
    cursor: text;
}
h1:hover a.anchor,
h2:hover a.anchor,
h3:hover a.anchor,
h4:hover a.anchor,
h5:hover a.anchor,
h6:hover a.anchor {
    /*background: url(&quot;file:///Users/JcSnap/Library/Application%20Support/images/modules/styleguide/para.png&quot;) no-repeat 10px center;*/
    text-decoration: none;
}
h1 tt,
h1 code {
    font-size: inherit;
}
h2 tt,
h2 code {
    font-size: inherit;
}
h3 tt,
h3 code {
    font-size: inherit;
}
h4 tt,
h4 code {
    font-size: inherit;
}
h5 tt,
h5 code {
    font-size: inherit;
}
h6 tt,
h6 code {
    font-size: inherit;
}
h1 {
    padding-bottom: .3em;
    font-size: 2.25em;
    line-height: 1.2;
    border-bottom: 1px solid #eee;
}
h2 {
   padding-bottom: .3em;
    font-size: 1.75em;
    line-height: 1.225;
    border-bottom: 1px solid #eee;
}
h3 {
    font-size: 1.5em;
    line-height: 1.43;
}
h4 {
    font-size: 1.25em;
}
h5 {
    font-size: 1em;
}
h6 {
   font-size: 1em;
    color: #777;
}
p,
blockquote,
ul,
ol,
dl,
table{
    margin: 0.8em 0;
}
li&gt;ol,
li&gt;ul {
    margin: 0 0;
}
hr {
    height: 2px;
    padding: 0;
    margin: 16px 0;
    background-color: #e7e7e7;
    border: 0 none;
    overflow: hidden;
    box-sizing: content-box;
}

body &gt; h2:first-child {
    margin-top: 0;
    padding-top: 0;
}
body &gt; h1:first-child {
    margin-top: 0;
    padding-top: 0;
}
body &gt; h1:first-child + h2 {
    margin-top: 0;
    padding-top: 0;
}
body &gt; h3:first-child,
body &gt; h4:first-child,
body &gt; h5:first-child,
body &gt; h6:first-child {
    margin-top: 0;
    padding-top: 0;
}
a:first-child h1,
a:first-child h2,
a:first-child h3,
a:first-child h4,
a:first-child h5,
a:first-child h6 {
    margin-top: 0;
    padding-top: 0;
}
h1 p,
h2 p,
h3 p,
h4 p,
h5 p,
h6 p {
    margin-top: 0;
}
li p.first {
    display: inline-block;
}
ul,
ol {
    padding-left: 30px;
}
ul:first-child,
ol:first-child {
    margin-top: 0;
}
ul:last-child,
ol:last-child {
    margin-bottom: 0;
}
blockquote {
    border-left: 4px solid #dfe2e5;
    padding: 0 15px;
    color: #777777;
}
blockquote blockquote {
    padding-right: 0;
}
table {
    padding: 0;
    word-break: initial;
}
table tr {
    border-top: 1px solid #dfe2e5;
    margin: 0;
    padding: 0;
}
table tr:nth-child(2n),
thead {
    background-color: #f8f8f8;
}
table tr th {
    font-weight: bold;
    border: 1px solid #dfe2e5;
    border-bottom: 0;
    text-align: left;
    margin: 0;
    padding: 6px 13px;
}
table tr td {
    border: 1px solid #dfe2e5;
    text-align: left;
    margin: 0;
    padding: 6px 13px;
}
table tr th:first-child,
table tr td:first-child {
    margin-top: 0;
}
table tr th:last-child,
table tr td:last-child {
    margin-bottom: 0;
}

.CodeMirror-lines {
    padding-left: 4px;
}

.code-tooltip {
    box-shadow: 0 1px 1px 0 rgba(0,28,36,.3);
    border-top: 1px solid #eef2f2;
}

.md-fences,
code,
tt {
    border: 1px solid #e7eaed;
    background-color: #f8f8f8;
    border-radius: 3px;
    padding: 0;
    padding: 2px 4px 0px 4px;
    font-size: 0.9em;
}

code {
    background-color: #f3f4f4;
    padding: 0 4px 2px 4px;
}

.md-fences {
    margin-bottom: 15px;
    margin-top: 15px;
    padding: 0.2em 1em;
    padding-top: 8px;
    padding-bottom: 6px;
}


.md-task-list-item &gt; input {
  margin-left: -1.3em;
}

@media screen and (min-width: 914px) {
    /*body {
        width: 854px;
        margin: 0 auto;
    }*/
}
@media print {
    html {
        font-size: 13px;
    }
    table,
    pre {
        page-break-inside: avoid;
    }
    pre {
        word-wrap: break-word;
    }
}

.md-fences {
	background-color: #f8f8f8;
}
#write pre.md-meta-block {
	padding: 1rem;
    font-size: 85%;
    line-height: 1.45;
    background-color: #f7f7f7;
    border: 0;
    border-radius: 3px;
    color: #777777;
    margin-top: 0 !important;
}

.mathjax-block&gt;.code-tooltip {
	bottom: .375rem;
}

.md-mathjax-midline {
    background: #fafafa;
}

#write&gt;h3.md-focus:before{
	left: -1.5625rem;
	top: .375rem;
}
#write&gt;h4.md-focus:before{
	left: -1.5625rem;
	top: .285714286rem;
}
#write&gt;h5.md-focus:before{
	left: -1.5625rem;
	top: .285714286rem;
}
#write&gt;h6.md-focus:before{
	left: -1.5625rem;
	top: .285714286rem;
}
.md-image&gt;.md-meta {
    /*border: 1px solid #ddd;*/
    border-radius: 3px;
    padding: 2px 0px 0px 4px;
    font-size: 0.9em;
    color: inherit;
}

.md-tag {
    color: #a7a7a7;
    opacity: 1;
}

.md-toc { 
    margin-top:20px;
    padding-bottom:20px;
}

.sidebar-tabs {
    border-bottom: none;
}

#typora-quick-open {
    border: 1px solid #ddd;
    background-color: #f8f8f8;
}

#typora-quick-open-item {
    background-color: #FAFAFA;
    border-color: #FEFEFE #e5e5e5 #e5e5e5 #eee;
    border-style: solid;
    border-width: 1px;
}

/** focus mode */
.on-focus-mode blockquote {
    border-left-color: rgba(85, 85, 85, 0.12);
}

header, .context-menu, .megamenu-content, footer{
    font-family: &quot;Segoe UI&quot;, &quot;Arial&quot;, sans-serif;
}

.file-node-content:hover .file-node-icon,
.file-node-content:hover .file-node-open-state{
    visibility: visible;
}

.mac-seamless-mode #typora-sidebar {
    background-color: #fafafa;
    background-color: var(--side-bar-bg-color);
}

.md-lang {
    color: #b4654d;
}

.html-for-mac .context-menu {
    --item-hover-bg-color: #E6F0FE;
}


 .typora-export p, .typora-export .footnote-line {white-space: normal;} 
&lt;/style&gt;


&lt;div id=&quot;write&quot; class=&quot;is-mac&quot;&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h2&gt;&lt;a name=&quot;header-n3892&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;1. 프로그래밍 언어란?&lt;/h2&gt;&lt;ul&gt;&lt;li&gt;프로그래밍은 사람의 언어를 기계어로 바꾸는 과정이에요. 기계어란 어떤 의미일까요?&lt;/li&gt;&lt;/ul&gt;&lt;h3&gt;&lt;a name=&quot;header-n3896&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;1.1 기계어&lt;/h3&gt;&lt;ul&gt;&lt;li&gt;컴퓨터가 알아듣는 말입니다. 0과 1로만 이루어져 있죠. 컴퓨터는 0과 1외에는 알아들지를 못합니다.사람과 달리 0과 1만 쓰기에 컴퓨터는 이진법만 씁니다. 10진법을 쓰는 사람과는 다르죠.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/13621579/46917877-b0d60f80-d006-11e8-9509-25d0f523864e.jpeg&quot; alt=&quot;alt text&quot; referrerpolicy=&quot;no-referrer&quot;&gt;&lt;/p&gt;&lt;h3&gt;&lt;a name=&quot;header-n3901&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;1.2 사람의 언어&lt;/h3&gt;&lt;ul&gt;&lt;li&gt;우리가 매일 쓰는 말입니다. 단어, 문장으로 이뤄져 있으며 감정이나 어조에 따라 의미가 달라지기도 합니다. 복잡하죠. 0과 1로된 기계어와 반대입니다.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/13621579/46917879-b9c6e100-d006-11e8-941f-ef2d0dc4f8f3.jpeg&quot; alt=&quot;alt text&quot; referrerpolicy=&quot;no-referrer&quot;&gt;&lt;/p&gt;&lt;h3&gt;&lt;a name=&quot;header-n3907&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;1.3 프로그래밍 언어&lt;/h3&gt;&lt;ul&gt;&lt;li&gt;컴퓨터가 사람이 하는 말을 알아듣도록 하기 위해 만든 언어입니다.&lt;/li&gt;&lt;li&gt;C,자바,파이썬,R 등의 다양한 종류가 있습니다.&lt;/li&gt;&lt;li&gt;사람이 하는 말을 그대로 알아들을 만큼 컴퓨터가 똑똑하지 못해 나온 게 프로그래밍 언어구요. 언어기 때문에 기본 문법이 있고, 잘 활용하면 한편의 글(소프트웨어)를 쓸 수 있습니다.&lt;/li&gt;&lt;li&gt;사람이 쓰는 언어와 유사점이 많지만, 컴퓨터를 위한 언어라는 점이 다릅니다.&lt;/li&gt;&lt;li&gt;작은 문법이 모여, 블록을 이루고, 블록을 갖고 성이나 우주선을 만든다고 생각하세요.
소프트웨어의 거장들은 소프트웨어를 건축과 비교하는데, 저도 그 의미를 한참뒤에야 알았습니다. 대성당을 지으려면 벽돌을 쌓아야하듯이, 소프트웨어를 만드려면 문법을 알아야해요!&lt;/li&gt;&lt;/ul&gt;&lt;h2&gt;&lt;a name=&quot;header-n3920&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;2. 개발툴 설치&lt;/h2&gt;&lt;p&gt;프로그래밍을 배우기 위해서는 보통 2가지가 필요합니다.&lt;/p&gt;&lt;ol start=&quot;&quot;&gt;&lt;li&gt;언어&lt;/li&gt;&lt;li&gt;개발도구입니다.&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;우리가 고른 언어는 자바이고, 개발도구는 인텔리 제이(회사이름) 계열을 택하도록 하겠습니다.&lt;/p&gt;&lt;h3&gt;&lt;a name=&quot;header-n3928&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;2.1 자바(java, jdk) 설치&lt;/h3&gt;&lt;ul&gt;&lt;li&gt;구글에서 'jdk 1.8'을 검색해주세요.&lt;/li&gt;&lt;li&gt;jdk는 java development kit(자바 개발 도구)의 약자입니다.&lt;/li&gt;&lt;li&gt;jdk를 설치하면은 자바를 쓸 수 있게 됩니다.  &lt;/li&gt;&lt;li&gt;&lt;a href=&quot;http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html&quot; target=&quot;_blank&quot; class=&quot;url&quot;&gt;http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h3&gt;&lt;a name=&quot;header-n3938&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;2.2 안드로이드 스튜디오 설치&lt;/h3&gt;&lt;ul&gt;&lt;li&gt;구글에서 'android studio'를 검색해주세요.&lt;/li&gt;&lt;li&gt;안드로이드 스튜디오는 개발을 쉽게 하도록 도와주는 개발 도구(IDE, Integrated Development Environment, 통합 개발툴)입니다.&lt;/li&gt;&lt;li&gt;안드로이드 스튜디오를 설치하면 프로젝트 생성 화면이 나옵니다.&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://developer.android.com/studio/&quot; target=&quot;_blank&quot; class=&quot;url&quot;&gt;https://developer.android.com/studio/&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h2&gt;&lt;a name=&quot;header-n3949&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;3. 자바 기초&lt;/h2&gt;&lt;p&gt;오늘 설명해 드리는 걸 한꺼번에 이해하려고 하실 필요는 없어요. 저도 자바 이해 하는데 2달 정도 걸렸어요. 오늘 다 알려드리는 건 전체적으로 어떤 게 있는지 알아보자는 의미입니다. 처음 헬스장에 가면은 어떤 기구가 있는지 한번씩 테스트를 해보잖아요. 그렇다고 모든 운동을 한번에 잘하게 되는 건 아니잖아요. 근육이 붙으려면 시간이 필요해요. 코딩, 자바 배우는 것도 비슷하다고 생각하시면 됩니다.&lt;/p&gt;&lt;h3&gt;&lt;a name=&quot;header-n3952&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;3.1. 개발 툴 쓰기&lt;/h3&gt;&lt;ul&gt;&lt;li&gt;&lt;p&gt;새로 만들기 (맥 : Command + N , 윈도우 : Alt + insert)&lt;/p&gt;&lt;ul&gt;&lt;li&gt;파일, 폴더 등을 만들때 쓰이는 단축키입니다.&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;저장하기 (맥 : Command + S, 윈도우 : Ctrl + S)&lt;/p&gt;&lt;ul&gt;&lt;li&gt;작성한 코드가 날라가지 않게 주기적으로 저장해 주셔야 해요&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;실행하기 (맥 : Ctrl + Shift + R, 윈도우 : Ctrl + F10)&lt;/p&gt;&lt;ul&gt;&lt;li&gt;코드를 실행해 줍니다. 제일 많이 쓰는 명령어에요. 꼭 외워두세요.&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;정렬하기 (맥: Command + alt + l)&lt;/p&gt;&lt;ul&gt;&lt;li&gt;코드를 정렬해줍니다.&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;&lt;h3&gt;&lt;a name=&quot;header-n3974&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;3.2. 자바 기본 문법&lt;/h3&gt;&lt;h5&gt;&lt;a name=&quot;header-n3975&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;3.2.1. 기본 구조 눈으로 보기&lt;/h5&gt;&lt;p&gt;프로그래밍의 가장 기본은 'Hello World'를 출력하는 거에요.
이를 위해 5줄 정도 코드를 작성해 줘야하는데, 새로운 개념이 많이 나오거든요.
일단은 따라서 쳐주세요. 차차 설명을 하겠습니다.&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;java&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;java&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 7.109375px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-comment&quot;&gt;// 프로그램 실행을 위한 최소 단위&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;cm-def&quot;&gt;Main&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;cm-variable-3&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;main&lt;/span&gt;(&lt;span class=&quot;cm-variable-3&quot;&gt;String&lt;/span&gt;[] &lt;span class=&quot;cm-variable&quot;&gt;args&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;System&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;out&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;println&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;&quot;Hello World&quot;&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 132px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 132px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;ul&gt;&lt;li&gt;실행을 하면 'Hello World'가 출력됩니다.&lt;/li&gt;&lt;li&gt;간단히 어떤 것들인지 설명을 해드릴께요. 못 알아듣는 게 당연하니 긴장하지 마시구요.&lt;/li&gt;&lt;li&gt;이해를 돕기 위해 비유를 들께요.
프로그래밍은 블록을 맞추는 거라고 생각하면은 되요.
레고 블록도 비슷하게 생긴 블록을 합치면, 보물섬도 생기고, 우주선도 나오잖아요.&lt;/li&gt;&lt;li&gt;첫줄을 보면 &lt;strong&gt;public class Main&lt;/strong&gt; 이라고 적혀있는데, 하나의 블록입니다.
이건 클래스라는 블록인데 일단 넘어갈께요.&lt;/li&gt;&lt;li&gt;두번째줄을 보면 &lt;strong&gt;public static void main(String [])&lt;/strong&gt; 이라고 적혀있는데, 이것도 하나의 블록이에요. 이건 메인 함수라는 건데 넘어갈께요.&lt;/li&gt;&lt;li&gt;세번재줄을 보면 &lt;strong&gt;System.out.println(&quot;Hello World&quot;)&lt;/strong&gt; 라고 적혀 있는데, 아까 출력되었던 Hello World가 있는 만큼 주의해 볼께요. 이 줄은 ()안에 있는 걸 출력한다는 의미입니다. 이걸 함수라고 하는데 함수는 기억해 두셔야해요. 조금 이따가 다시 설명할께요.&lt;/li&gt;&lt;li&gt;마지막으로 중괄호에 대해서 설명할께요. {}가 자꾸보이는데 무슨 뜻인지 몰라서 답답하셨죠? 아까도 말씀 드렸지만 컴퓨터는 멍청합니다. 어디가 시작이고, 어디가 끝인지 잘 몰라요. {}는 시작과 끝을 의미하구요. 각 블록의 앞과 끝에 꼭 적어주셔야 합니다.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;아까 &lt;strong&gt;&lt;em&gt;System.out.println()&lt;/em&gt;&lt;/strong&gt; 를 설명하며, 함수라 불리며 중요하다고 했죠.
그러면 함수란 무엇일까요? System.out.println()에 있는 값을 바꿔주면 어떻게 될까요?&lt;/p&gt;&lt;h3&gt;&lt;a name=&quot;header-n3994&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;3.2.2 값 바꿔가며 함수 써보기&lt;/h3&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;java&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;java&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 7.109375px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;cm-def&quot;&gt;Main&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;cm-variable-3&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;main&lt;/span&gt;(&lt;span class=&quot;cm-variable-3&quot;&gt;String&lt;/span&gt;[] &lt;span class=&quot;cm-variable&quot;&gt;args&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;System&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;out&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;println&lt;/span&gt;(&lt;span class=&quot;cm-number&quot;&gt;10&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 110px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 110px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;10이 출력되네요.&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;java&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;java&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 7.109375px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;cm-def&quot;&gt;Main&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;cm-variable-3&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;main&lt;/span&gt;(&lt;span class=&quot;cm-variable-3&quot;&gt;String&lt;/span&gt;[] &lt;span class=&quot;cm-variable&quot;&gt;args&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;System&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;out&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;println&lt;/span&gt;(&lt;span class=&quot;cm-number&quot;&gt;97.7&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 110px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 110px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;97.7이 출력되네요. 정수(float)도 문제가 없네요.&lt;/p&gt;
&lt;p&gt;마이너스 값을 넣어볼까요?&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;java&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;java&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 7.109375px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;cm-def&quot;&gt;Main&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;cm-variable-3&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;main&lt;/span&gt;(&lt;span class=&quot;cm-variable-3&quot;&gt;String&lt;/span&gt;[] &lt;span class=&quot;cm-variable&quot;&gt;args&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;System&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;out&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;println&lt;/span&gt;(&lt;span class=&quot;cm-operator&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;cm-number&quot;&gt;59&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 110px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 110px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;-59가 출력되네요.&lt;/p&gt;
&lt;p&gt;다시 문자를 넣어볼까요? 아침 인사를 해보죠.&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;java&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;java&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 7.109375px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;cm-def&quot;&gt;Main&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;cm-variable-3&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;main&lt;/span&gt;(&lt;span class=&quot;cm-variable-3&quot;&gt;String&lt;/span&gt;[] &lt;span class=&quot;cm-variable&quot;&gt;args&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;System&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;out&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;println&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;&quot;Good Morning&quot;&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 110px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 110px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;한글을 넣어볼까요?&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;java&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;java&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 7.109375px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;cm-def&quot;&gt;Main&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;cm-variable-3&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;main&lt;/span&gt;(&lt;span class=&quot;cm-variable-3&quot;&gt;String&lt;/span&gt;[] &lt;span class=&quot;cm-variable&quot;&gt;args&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;System&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;out&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;println&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;&quot;한글날&quot;&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 110px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 110px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;문제 없이 나옵니다.&lt;/p&gt;
&lt;p&gt;지금 () 안에 있는 값을 바꿀 때마다
다른 값이 출력되었죠. 이게 바로 함수에요.&lt;/p&gt;
&lt;p&gt;+앞뒤에 숫자가 있으면 더하는 게 약속이잖아요.
10 + 7 = 17
실제 +는 아무 의미가 없는데, 전세계 수학자들이 약속을 해서 앞뒤 숫자를 더하는 거죠.&lt;/p&gt;
&lt;p&gt;함수도 컴퓨터가 알아들을 수 있게 약속을 하는 겁니다.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;em&gt;System.out.println();&lt;/em&gt;&lt;/strong&gt; 의 경우 괄호 안의 값을 출력하겠다고 약속을 한 거에요.&lt;/p&gt;
&lt;p&gt;함수는 조금 이따 추가적으로 설명을 하도록 할께요.&lt;/p&gt;&lt;h3&gt;&lt;a name=&quot;header-n4013&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;3.3 변수&lt;/h3&gt;&lt;p&gt;컴퓨터는 값을 저장해 두었다가 나중에 필요할 때 사용합니다.
이때 값이 저장된 공간을 변수라고 하는데요. 어떻게 쓰는지 예시를 보도록 할께요.&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;java&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;java&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 7.109375px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;cm-def&quot;&gt;Main&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;cm-variable-3&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;main&lt;/span&gt;(&lt;span class=&quot;cm-variable-3&quot;&gt;String&lt;/span&gt;[] &lt;span class=&quot;cm-variable&quot;&gt;args&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable-3&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;number&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;10&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;System&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;out&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;println&lt;/span&gt;(&lt;span class=&quot;cm-number&quot;&gt;10&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;System&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;out&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;println&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;number&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 154px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 154px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;2번 출력을 했는데, 하나는 10을 바로 출력해줬고
다른 하나는 &lt;strong&gt;&lt;em&gt;int number&lt;/em&gt;&lt;/strong&gt; 라는 곳에 10을 넣은 뒤에 출력을 해주었어요. int는 정수인 걸
나타내 주기 위해 쓰였구요. &lt;strong&gt;&lt;em&gt;int number = 10;&lt;/em&gt;&lt;/strong&gt; 처럼 값을 넣어서 쓸 수 있게 하는 게 변수랍니다.&lt;/p&gt;
&lt;p&gt;number 변수를 수정해볼께요. 어떤 값이 출력될까요?&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;java&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;java&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 7.109375px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;cm-def&quot;&gt;Main&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;cm-variable-3&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;main&lt;/span&gt;(&lt;span class=&quot;cm-variable-3&quot;&gt;String&lt;/span&gt;[] &lt;span class=&quot;cm-variable&quot;&gt;args&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable-3&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;number&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;10&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-comment&quot;&gt;//System.out.println(10);&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;System&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;out&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;println&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;number&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;number&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;30&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;System&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;out&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;println&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;number&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 198px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 198px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;30이 출력되는 걸 알 수 있죠.&lt;/p&gt;
&lt;p&gt;변수로는 쓸 수 있는 게 있고 없는 게 있어요.&lt;/p&gt;
&lt;p&gt;어떤 게 있는지 볼까요?&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;java&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;java&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 7.109375px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;cm-def&quot;&gt;Main&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;cm-variable-3&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;main&lt;/span&gt;(&lt;span class=&quot;cm-variable-3&quot;&gt;String&lt;/span&gt;[] &lt;span class=&quot;cm-variable&quot;&gt;args&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable-3&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;number&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;10&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable-3&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;number&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;35&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 132px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 132px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;한번 이전에 선언한 변수는 다시 선언할 수 없구요.
자바에서 쓰려고 정해놓은 단어들(int, String 등)은 쓸 수가 없어요!&lt;/p&gt;
&lt;p&gt;앞으로는 변수를 통해서만 작업을 할 거에요.
그럼 변수에는 어떤 게 있을까요?&lt;/p&gt;&lt;h3&gt;&lt;a name=&quot;header-n4025&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;3.3.1 변수의 종류&lt;/h3&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;java&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;java&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 7.109375px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable-3&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;number&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;10&lt;/span&gt;; &lt;span class=&quot;cm-comment&quot;&gt;// 정수 변수, 10이 들어 있음&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable-3&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;appleSize&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;200&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable-3&quot;&gt;String&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;city&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-string&quot;&gt;&quot;Seoul&quot;&lt;/span&gt;; &lt;span class=&quot;cm-comment&quot;&gt;// 문자 변수, &quot;Mike&quot;가 들어 있음&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable-3&quot;&gt;String&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;address&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-string&quot;&gt;&quot;Gang-nam&quot;&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable-3&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;sum&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;number&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;appleSize&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 110px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 110px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;변수는 &lt;strong&gt;&lt;em&gt;자료형(type) / 변수명(name)&lt;/em&gt;&lt;/strong&gt; 형식으로 쓰입니다.&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;p&gt;자료형은 변수의 종류를 말하고, 정해진 것만 쓸 수 있습니다.
정수,소수,문자 등등이 있습니다.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;변수명은 원하는 걸 써줄 수 있어요.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;자료형의 종류는 다양한데 많이 쓰는 것만 나열해볼께요.&lt;/p&gt;&lt;ul&gt;&lt;li&gt;int : 정수. 1,50,77,1000,-5,-15&lt;/li&gt;&lt;li&gt;long : (큰)정수. 1234567890&lt;/li&gt;&lt;li&gt;float : 소수. 1.23345234^4&lt;/li&gt;&lt;li&gt;doulbe : (큰)소수. 1.12, 2.352&lt;/li&gt;&lt;li&gt;char : 문자 한글자. 'a','ㄱ','c' ...&lt;/li&gt;&lt;li&gt;String : 문자. &quot;안녕하세요&quot;, &quot;Good Morning&quot;&lt;/li&gt;&lt;li&gt;boolean : 참거짓. true, false&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;java&quot; style=&quot;page-break-inside: unset;&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;java&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 7.109375px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;span&gt;&lt;span&gt;​&lt;/span&gt;x&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;cm-def&quot;&gt;Main&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;cm-variable-3&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;main&lt;/span&gt;(&lt;span class=&quot;cm-variable-3&quot;&gt;String&lt;/span&gt;[] &lt;span class=&quot;cm-variable&quot;&gt;args&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable-3&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;number&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;10&lt;/span&gt;; &lt;span class=&quot;cm-comment&quot;&gt;// 정수 변수, 10이 들어 있음&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable-3&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;appleSize&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;200&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable-3&quot;&gt;String&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;city&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-string&quot;&gt;&quot;Seoul&quot;&lt;/span&gt;; &lt;span class=&quot;cm-comment&quot;&gt;// 문자 변수, &quot;Mike&quot;가 들어 있음&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable-3&quot;&gt;String&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;address&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-string&quot;&gt;&quot;Gang-nam&quot;&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable-3&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;sum&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;number&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;appleSize&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;System&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;out&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;println&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;sum&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable-3&quot;&gt;double&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;big&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;10.0&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable-3&quot;&gt;boolean&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;isKorean&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-atom&quot;&gt;false&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;System&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;out&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;println&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;isKorean&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 308px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 308px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;h3&gt;&lt;a name=&quot;header-n4052&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;3.3.2 변수 가지고 놀기&lt;/h3&gt;&lt;p&gt;변수 끼리는 서로 더하거나, 빼거나 곱하거나 할 수 있습니다.&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;java&quot; style=&quot;page-break-inside: unset;&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;java&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 7.109375px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;cm-def&quot;&gt;Main&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;cm-variable-3&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;main&lt;/span&gt;(&lt;span class=&quot;cm-variable-3&quot;&gt;String&lt;/span&gt;[] &lt;span class=&quot;cm-variable&quot;&gt;args&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable-3&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;a&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;10&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable-3&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;b&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;24&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable-3&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;c&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;40&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-comment&quot;&gt;// 각종 사칙 연산&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;a&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;a&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;10&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;a&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;a&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;10&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;a&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;+=&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;10&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;a&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;-=&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;10&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;a&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;a&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;2&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;a&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;a&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;/&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;2&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable-3&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;result&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;a&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;b&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;System&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;out&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;println&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;result&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable-3&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;result2&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;a&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;b&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;System&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;out&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;println&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;result2&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable-3&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;result3&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;a&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;b&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;c&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;System&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;out&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;println&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;result3&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable-3&quot;&gt;String&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;start&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-string&quot;&gt;&quot;Good&quot;&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable-3&quot;&gt;String&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;end&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-string&quot;&gt;&quot;World&quot;&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;System&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;out&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;println&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;start&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;end&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable-3&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;div&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;20&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;%&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;6&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;System&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;out&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;println&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;div&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 682px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 682px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;h4&gt;&lt;a name=&quot;header-n4056&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;이해도 점검1 : 변수 3개를 더하고 그 값을 출력해보세요.&lt;/h4&gt;&lt;h4&gt;&lt;a name=&quot;header-n4057&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;이해도 점검2 : 변수 5개를 곱하고 그 값을 출력해보세요.&lt;/h4&gt;&lt;h3&gt;&lt;a name=&quot;header-n4059&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;3.4 배열(array) 조금 더 커진 변수&lt;/h3&gt;&lt;p&gt;여기까지는 변수를 하나씩만 사용했습니다.
그런데 변수를 한꺼번에 많이 쓰고 싶다면 어떻게 해야되죠?
사과의 무게를 동시에 기록하고 싶은 상황을 상상해 봅시다.&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;java&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;java&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 7.109375px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable-3&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;appleSize1&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;10&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable-3&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;appleSize2&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;25&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable-3&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;appleSize3&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;9&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable-3&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;appleSize4&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;14&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 88px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 88px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;여태까지 배운걸 따르면, 변수를 하나하나 다 만들어줘야하죠.
지금은 4개니까 괜찮지만 10개, 100개면 어떻게 해야할까요?&lt;/p&gt;
&lt;p&gt;이럴 때를 대비해 나온 게 &lt;strong&gt;&lt;em&gt;배열(array)&lt;/em&gt;&lt;/strong&gt; 입니다.&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;java&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;java&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 7.109375px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable-3&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;appleSizes&lt;/span&gt;[] &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; {&lt;span class=&quot;cm-number&quot;&gt;10&lt;/span&gt;, &lt;span class=&quot;cm-number&quot;&gt;25&lt;/span&gt;, &lt;span class=&quot;cm-number&quot;&gt;9&lt;/span&gt;, &lt;span class=&quot;cm-number&quot;&gt;14&lt;/span&gt;};&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 22px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 22px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;한 변수에 여러 값을 담을 수 있죠.
필요한 데이터를 불러올때는 appleSizes[0], appleSizes[1] 처럼 안에 숫자를 넣어줍니다.
이 숫자를 배열의 인덱스(index)라고 합니다.&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;java&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;java&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 7.109375px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;System&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;out&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;println&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;appleSizes&lt;/span&gt;[&lt;span class=&quot;cm-number&quot;&gt;0&lt;/span&gt;]); &lt;span class=&quot;cm-comment&quot;&gt;// index 0&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 22px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 22px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;int형만 되는 게 아닙니다.&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;java&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;java&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 7.109375px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable-3&quot;&gt;String&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;fruits&lt;/span&gt;[] &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; {&lt;span class=&quot;cm-string&quot;&gt;&quot;Apple&quot;&lt;/span&gt;, &lt;span class=&quot;cm-string&quot;&gt;&quot;Banana&quot;&lt;/span&gt;, &lt;span class=&quot;cm-string&quot;&gt;&quot;Grape&quot;&lt;/span&gt;};&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;System&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;out&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;println&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;fruits&lt;/span&gt;[&lt;span class=&quot;cm-number&quot;&gt;0&lt;/span&gt;]);&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 44px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 44px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;배열을 통하면 각종 계산을 편리하게 할 수 있습니다.&lt;/p&gt;&lt;h3&gt;&lt;a name=&quot;header-n4070&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;3.5 for - 조건문, 여러 데이터 동시에 다루기&lt;/h3&gt;&lt;p&gt;배열로 많은 데이터를 동시에 다루게 된 건 좋은데
하나씩 써줘야 되나요? 더 좋은 방법이 없을까요?&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;java&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;java&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 7.109375px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;System&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;out&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;println&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;fruits&lt;/span&gt;[&lt;span class=&quot;cm-number&quot;&gt;0&lt;/span&gt;]);&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;System&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;out&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;println&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;fruits&lt;/span&gt;[&lt;span class=&quot;cm-number&quot;&gt;1&lt;/span&gt;]);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;System&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;out&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;println&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;fruits&lt;/span&gt;[&lt;span class=&quot;cm-number&quot;&gt;2&lt;/span&gt;]);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 88px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 88px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;for문은 여러 동작을 할 때 쓰이는데요.
for의 영어 뜻이 ~동안이니,
~동안 계속 프로그램 돌리라는 뜻입니다.&lt;/p&gt;
&lt;p&gt;일단 코드를 한번 보고 설명을 다시 듣도록 해요.&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;java&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;java&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 7.109375px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;cm-def&quot;&gt;Main&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;cm-variable-3&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;main&lt;/span&gt;(&lt;span class=&quot;cm-variable-3&quot;&gt;String&lt;/span&gt;[] &lt;span class=&quot;cm-variable&quot;&gt;args&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;for&lt;/span&gt;(&lt;span class=&quot;cm-variable-3&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;index&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;0&lt;/span&gt;; &lt;span class=&quot;cm-variable&quot;&gt;index&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;3&lt;/span&gt;; &lt;span class=&quot;cm-variable&quot;&gt;index&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;++&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;System&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;out&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;println&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;index&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 154px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 154px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;실행을 해보면 3번 출력이 되죠?
하나 하나 설명을 해볼께요.&lt;/p&gt;
&lt;p&gt;for문의 구조를 보죠.&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;java&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;java&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 7.109375px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;for&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;시작점&lt;/span&gt;; &lt;span class=&quot;cm-variable&quot;&gt;끝나는지점&lt;/span&gt;; &lt;span class=&quot;cm-variable&quot;&gt;증가치&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 66px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 66px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;언제 시작을 하고, 끝낼지 나타나는 부분이에요.&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;java&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;java&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 7.109375px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;for&lt;/span&gt;(&lt;span class=&quot;cm-variable-3&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;index&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;0&lt;/span&gt;; &lt;span class=&quot;cm-variable&quot;&gt;index&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;3&lt;/span&gt;; &lt;span class=&quot;cm-variable&quot;&gt;index&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;++&lt;/span&gt;) { &lt;span class=&quot;cm-comment&quot;&gt;// 0부터 시작해, 3보다 작을때 종료, 1씩 증가함&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;System&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;out&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;println&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;index&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 66px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 66px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;1씩 늘어나는 걸 알 수 있죠.
그러면 2씩 늘어나게 할 수는 없을까요?
값을 조금 변경해보죠.&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;java&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;java&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 7.109375px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;for&lt;/span&gt;(&lt;span class=&quot;cm-variable-3&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;index&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;0&lt;/span&gt;; &lt;span class=&quot;cm-variable&quot;&gt;index&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;10&lt;/span&gt;; &lt;span class=&quot;cm-variable&quot;&gt;index&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;+=&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;2&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;System&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;out&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;println&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;&quot;index : &quot;&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;index&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 66px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 66px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;2씩 출력되다가 멈추는 걸 알 수 있어요.&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;java&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;java&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 7.109375px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;for&lt;/span&gt;(&lt;span class=&quot;cm-variable-3&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;index&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;1&lt;/span&gt;; &lt;span class=&quot;cm-variable&quot;&gt;index&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;20&lt;/span&gt;; &lt;span class=&quot;cm-variable&quot;&gt;index&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;*=&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;3&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;System&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;out&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;println&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;&quot;index : &quot;&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;index&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 66px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 66px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;마지막으로 구구단을 만들어볼께요. 흔히 프로그래밍 처음 접할 때 제일 많이 만들어보는 게 구구단이에요.&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;java&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;java&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 7.109375px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;for&lt;/span&gt;(&lt;span class=&quot;cm-variable-3&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;cm-number&quot;&gt;2&lt;/span&gt;; &lt;span class=&quot;cm-variable&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-number&quot;&gt;10&lt;/span&gt;; &lt;span class=&quot;cm-variable&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;++&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;for&lt;/span&gt;(&lt;span class=&quot;cm-variable-3&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;j&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;cm-number&quot;&gt;1&lt;/span&gt;; &lt;span class=&quot;cm-variable&quot;&gt;j&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;cm-number&quot;&gt;10&lt;/span&gt;; &lt;span class=&quot;cm-variable&quot;&gt;j&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;++&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;System&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;out&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;i&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;cm-variable&quot;&gt;j&lt;/span&gt;&lt;span class=&quot;cm-operator&quot;&gt;+&lt;/span&gt;&lt;span class=&quot;cm-string&quot;&gt;&quot; &quot;&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;System&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;out&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;println&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;&quot;&quot;&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 132px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 132px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;이제 for문 만큼 중요한 조건문에 대해서 알아볼께요.&lt;/p&gt;&lt;h3&gt;&lt;a name=&quot;header-n4089&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;3.6 if문 - 조건문, 여러개 중에 하나를 택할때&lt;/h3&gt;&lt;p&gt;if문은 객관식이랑 비슷해요.&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;p&gt;문제 : 다음 중 한국의 수도는 어디일까?&lt;/p&gt;&lt;ul&gt;&lt;li&gt;a.도쿄&lt;/li&gt;&lt;li&gt;b.부산&lt;/li&gt;&lt;li&gt;c.서울&lt;/li&gt;&lt;li&gt;d.강남&lt;/li&gt;&lt;li&gt;e.대구&lt;/li&gt;&lt;/ul&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;여러 보기 중에 하나를 고르는 게 if 문 입니다.
if만 쓸수도 있지만, 보통은 if-else를 같이 써요.&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;java&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;java&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 7.109375px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable-3&quot;&gt;boolean&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;isKorean&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-atom&quot;&gt;true&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;if&lt;/span&gt; (&lt;span class=&quot;cm-variable&quot;&gt;isKorean&lt;/span&gt;) { &lt;span class=&quot;cm-comment&quot;&gt;// 참이면 이 블록으로&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;System&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;out&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;println&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;&quot;나는 한국 사람이에요.&quot;&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;} &lt;span class=&quot;cm-keyword&quot;&gt;else&lt;/span&gt; { &lt;span class=&quot;cm-comment&quot;&gt;// 거짓이면 이 블록으로&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;System&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;out&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;println&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;&quot;나는 한국 사람이 아니에요.&quot;&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 154px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 154px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;조건문엔 boolean만 쓸 수 있는 게 아니에요.
int를 써서 나이가 얼마인지 확인하는 조건문을 만들어볼께요!&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;java&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;java&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 7.109375px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;if&lt;/span&gt; (&lt;span class=&quot;cm-variable&quot;&gt;age&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;10&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;System&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;out&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;println&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;&quot;10살보다 어려요&quot;&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;} &lt;span class=&quot;cm-keyword&quot;&gt;else&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;if&lt;/span&gt; (&lt;span class=&quot;cm-variable&quot;&gt;age&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;20&lt;/span&gt;){&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;System&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;out&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;println&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;&quot;20살보다 어려요&quot;&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;} &lt;span class=&quot;cm-keyword&quot;&gt;else&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;if&lt;/span&gt; (&lt;span class=&quot;cm-variable&quot;&gt;age&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;30&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;System&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;out&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;println&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;&quot;30살보다 어려요&quot;&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;} &lt;span class=&quot;cm-keyword&quot;&gt;else&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;System&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;out&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;println&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;&quot;30살보다 나이가 많아요&quot;&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 198px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 198px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;if는 조건 하나만 확인하는데,
추가적으로 조건을 더 보고 싶을때 else if를 써줍니다.
사용법은 if와 동일한데, if문 아래에만 나올 수 있어요.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h3&gt;&lt;a name=&quot;header-n4112&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;3.7 함수 만들어보기&lt;/h3&gt;&lt;p&gt;함수는 반복적인 작업을 줄이기 위해서 쓰여요.
대부분의 프로그래밍은 함수,조건문(if,for)으로 이루어져 있습니다.
나중에 클래스라는 것도 배우겠지만 사실 함수랑 조건문만 있으면 대부분의 프로그램은
다 만들 수 있어요.&lt;/p&gt;
&lt;p&gt;일단 반복적인 작업을 해보고 함수의 필요성을 느껴보도록 할께요.&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;java&quot; style=&quot;page-break-inside: unset;&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;java&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 7.109375px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable-3&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;apple&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;2500&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable-3&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;grape&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;5000&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable-3&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;sum1&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;apple&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;grape&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable-3&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;banana&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;5600&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable-3&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;pineapple&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;6000&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable-3&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;sum2&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;banana&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;pineapple&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable-3&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;math&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;90&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable-3&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;english&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;75&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable-3&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;korean&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;60&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable-3&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;sum3&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;math&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;english&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;korean&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 308px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 308px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;같은 더하기를 반복하는 걸 알 수 있죠!
이런 중복을 줄이기 위해 나온 게 함수입니다.&lt;/p&gt;&lt;h4&gt;&lt;a name=&quot;header-n4117&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;함수란?&lt;/h4&gt;&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/13621579/46915743-b887bb00-cfea-11e8-8262-9392819d3f94.png&quot; alt=&quot;alt text&quot; referrerpolicy=&quot;no-referrer&quot;&gt;&lt;/p&gt;
&lt;p&gt;함수는 어떤 틀안에 재료를 넣으면 원하는 결과가 나오는 틀이에요.&lt;/p&gt;
&lt;p&gt;과일을 반으로 자르는 함수 안에 사과를 넣으면 사과가 반으로 잘리고,
오렌지를 넣으면 오렌지가 반으로 잘리고, 파인애플을 넣으면 파인애플이 반으로 잘린다고 볼 수 있죠.&lt;/p&gt;
&lt;p&gt;대표적인 함수를 하나 적어볼께요.&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;java&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;java&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 7.109375px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;cm-variable-3&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;cm-def&quot;&gt;add&lt;/span&gt;(&lt;span class=&quot;cm-variable-3&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;a&lt;/span&gt;, &lt;span class=&quot;cm-variable-3&quot;&gt;int&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;a&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;b&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 66px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 66px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/13621579/46915718-40b99080-cfea-11e8-9690-ec7aece55277.JPG&quot; alt=&quot;alt text&quot; referrerpolicy=&quot;no-referrer&quot;&gt;&lt;/p&gt;
&lt;p&gt;함수는 크게 4부분으로 나눠져 있어요.&lt;/p&gt;&lt;ol start=&quot;&quot;&gt;&lt;li&gt;접근범위 (public, private등으로 표시된 부분)&lt;/li&gt;&lt;li&gt;리턴타입 (함수의 마지막에 어떤 걸 리턴해줄 지를 나타냄)&lt;/li&gt;&lt;li&gt;함수명 (add, minus등 임의로 정해줄 수 있음)&lt;/li&gt;&lt;li&gt;매개변수 (int a, int b 처럼 외부에서 받아들이는 값)&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/13621579/46915748-c6d5d700-cfea-11e8-918b-f2c0aa19366c.JPG&quot; alt=&quot;alt text&quot; referrerpolicy=&quot;no-referrer&quot;&gt;&lt;/p&gt;
&lt;p&gt;이제 더하기(add) 함수를 만들어 볼께요.&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;java&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;java&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 7.109375px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;cm-variable-3&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;cm-def&quot;&gt;add&lt;/span&gt;(&lt;span class=&quot;cm-variable-3&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;a&lt;/span&gt;, &lt;span class=&quot;cm-variable-3&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;b&lt;/span&gt;) { &lt;span class=&quot;cm-comment&quot;&gt;// a,b는 변수가 들어오는 부분.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;a&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;b&lt;/span&gt;; &lt;span class=&quot;cm-comment&quot;&gt;// return은 계산 후 결과값이 밖으로 나가는 부분&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 66px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 66px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;java&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;java&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 7.109375px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable-3&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;sum&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;add&lt;/span&gt;(&lt;span class=&quot;cm-number&quot;&gt;10&lt;/span&gt;, &lt;span class=&quot;cm-number&quot;&gt;20&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;System&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;out&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;println&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;sum&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;sum&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;add&lt;/span&gt;(&lt;span class=&quot;cm-number&quot;&gt;105&lt;/span&gt;, &lt;span class=&quot;cm-number&quot;&gt;204&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;System&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;out&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;println&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;sum&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;sum&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;add&lt;/span&gt;(&lt;span class=&quot;cm-operator&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;cm-number&quot;&gt;5&lt;/span&gt;, &lt;span class=&quot;cm-number&quot;&gt;12&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;System&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;out&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;println&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;sum&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 132px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 132px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;같은 방법으로 뺄쎔도 만들어보도록 할께요.&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;java&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;java&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 7.109375px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;cm-variable-3&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;cm-def&quot;&gt;minus&lt;/span&gt;(&lt;span class=&quot;cm-variable-3&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;a&lt;/span&gt;, &lt;span class=&quot;cm-variable-3&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;b&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;a&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;b&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 66px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 66px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;java&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;java&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 7.109375px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable-3&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;result&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;minus&lt;/span&gt;(&lt;span class=&quot;cm-number&quot;&gt;10&lt;/span&gt;, &lt;span class=&quot;cm-number&quot;&gt;20&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;System&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;out&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;println&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;result&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable-3&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;result2&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;minus&lt;/span&gt;(&lt;span class=&quot;cm-number&quot;&gt;100&lt;/span&gt;, &lt;span class=&quot;cm-number&quot;&gt;35&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-variable&quot;&gt;System&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;out&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;println&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;result2&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 88px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 88px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;곱하기도 만들어볼께요.&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;java&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;java&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 7.109375px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;cm-variable-3&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;cm-def&quot;&gt;multiply&lt;/span&gt;(&lt;span class=&quot;cm-variable-3&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;x&lt;/span&gt;, &lt;span class=&quot;cm-variable-3&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;y&lt;/span&gt;, &lt;span class=&quot;cm-variable-3&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;z&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;x&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;y&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;z&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;cm-variable-3&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;cm-def&quot;&gt;complex&lt;/span&gt;(&lt;span class=&quot;cm-variable-3&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;x&lt;/span&gt;, &lt;span class=&quot;cm-variable-3&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;y&lt;/span&gt;, &lt;span class=&quot;cm-variable-3&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;z&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable-3&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;result&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;x&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;y&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;z&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;result&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;cm-variable-3&quot;&gt;double&lt;/span&gt; &lt;span class=&quot;cm-def&quot;&gt;rectangle&lt;/span&gt;(&lt;span class=&quot;cm-variable-3&quot;&gt;double&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;width&lt;/span&gt;, &lt;span class=&quot;cm-variable-3&quot;&gt;double&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;height&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable-3&quot;&gt;double&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;area&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;width&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;height&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;area&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 286px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 286px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;h3&gt;&lt;a name=&quot;header-n4147&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;이해도 점검3 : 삼각형의 넓이를 구하는 함수를 만들어보세요.&lt;/h3&gt;&lt;h3&gt;&lt;a name=&quot;header-n4148&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;이해도 점검4 : 나누기 함수를 만들어보세요.&lt;/h3&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h3&gt;&lt;a name=&quot;header-n4150&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;3.8 키보드로부터 값 입력받기&lt;/h3&gt;&lt;p&gt;여태까지 값을 출력하는 것만 배웠죠.
System.out.print()과 같은 형태였습니다.&lt;/p&gt;
&lt;p&gt;반대로 입력은
System.in 형태이구요.
System.in이 보이면 입력을 받는구나 하고 생각하시면 됩니다.&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;java&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;java&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 7.109375px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;cm-def&quot;&gt;Main&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;cm-variable-3&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;main&lt;/span&gt;(&lt;span class=&quot;cm-variable-3&quot;&gt;String&lt;/span&gt;[] &lt;span class=&quot;cm-variable&quot;&gt;args&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;System&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;out&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;println&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;&quot;원하는 값을 입력해주세요:&quot;&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;Scanner&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;sc&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;Scanner&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;System&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;in&lt;/span&gt;); &lt;span class=&quot;cm-comment&quot;&gt;// Scanner는 키보드,마우스 등 입력 장치로부터 값을 받아들이는 장치입니다.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable-3&quot;&gt;String&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;result&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;sc&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;next&lt;/span&gt;(); &lt;span class=&quot;cm-comment&quot;&gt;// 키보드로 들어온 입력을 가져오는 부분이에요.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;System&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;out&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;println&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;result&lt;/span&gt;); &lt;span class=&quot;cm-comment&quot;&gt;// 입력 받은 값을 출력합니다.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 220px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 220px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;h2&gt;&lt;a name=&quot;header-n4156&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;4.1. 미니프로젝트&amp;nbsp;1  - ** Java로 계산기 만들기 **&lt;/h2&gt;&lt;h5&gt;&lt;a name=&quot;header-n4157&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;설계하기&lt;/h5&gt;&lt;p&gt;책을 보며 코딩을 배울 때의 단점이 실제 코딩을 하는 그대로 하지 않는다는 거에요. 축구를 잘하려면 축구 선수가 운동하는 걸 보고 따라해야하고, 그림을 잘 그리려면 그림을 그리는 걸 따라하면서 배워야해요. 하지만 책은 어떤 사람이 한 생각과 행동의 흔적이라 한계가 있어요.&lt;/p&gt;
&lt;p&gt;미니 프로젝트를 통해서 어떻게 소프트웨어를 설계하는지를 보고 경험을 통해 배워보도록 하겠습니다.&lt;/p&gt;&lt;h5&gt;&lt;a name=&quot;header-n4161&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;문제 정의하기&lt;/h5&gt;&lt;p&gt;코딩을 시작하기 전에 무얼 만들어야할지 정의를 하게 됩니다. 계산기를 만들기 위해 필요한 건 무엇일까요?&lt;/p&gt;
&lt;p&gt;잠시 생각을 해봅시다.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;일단&lt;/p&gt;&lt;ol start=&quot;&quot;&gt;&lt;li&gt;숫자를 입력 받아야하고 (입력)&lt;/li&gt;&lt;li&gt;어떤 더하기냐 곱하기냐를 정해야하고 (조건)&lt;/li&gt;&lt;li&gt;계산을 하고 (연산,함수)&lt;/li&gt;&lt;li&gt;결과를 보여줘야합니다.(출력)&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;java&quot; style=&quot;page-break-inside: unset;&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;java&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 7.109375px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;cm-def&quot;&gt;Main&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;cm-variable-3&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;main&lt;/span&gt;(&lt;span class=&quot;cm-variable-3&quot;&gt;String&lt;/span&gt;[] &lt;span class=&quot;cm-variable&quot;&gt;args&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;Scanner&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;sc&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;Scanner&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;System&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;in&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;System&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;out&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;println&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;&quot;계산기 프로그램입니다.&quot;&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;System&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;out&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;&quot;+,-,*,/ 중에 하고 싶은 계산을 골라주세요:&quot;&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable-3&quot;&gt;String&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;operator&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;sc&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;next&lt;/span&gt;();&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;System&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;out&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;&quot;첫 입력값:&quot;&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable-3&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;a&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;sc&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;nextInt&lt;/span&gt;();&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;System&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;out&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;&quot;두번째 입력값:&quot;&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable-3&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;b&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;sc&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;nextInt&lt;/span&gt;();&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable-3&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;result&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;0&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;if&lt;/span&gt; (&lt;span class=&quot;cm-variable&quot;&gt;operator&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;equals&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;&quot;+&quot;&lt;/span&gt;)) {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;result&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;add&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;a&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;b&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;  } &lt;span class=&quot;cm-keyword&quot;&gt;else&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;if&lt;/span&gt; (&lt;span class=&quot;cm-variable&quot;&gt;operator&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;equals&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;&quot;*&quot;&lt;/span&gt;)) {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;result&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;multiply&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;a&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;b&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;  } &lt;span class=&quot;cm-keyword&quot;&gt;else&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;if&lt;/span&gt; (&lt;span class=&quot;cm-variable&quot;&gt;operator&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;equals&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;&quot;-&quot;&lt;/span&gt;)) {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;result&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;minus&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;a&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;b&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;  } &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;else&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;if&lt;/span&gt; (&lt;span class=&quot;cm-variable&quot;&gt;operator&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;equals&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;&quot;/&quot;&lt;/span&gt;)) {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;result&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;divide&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;a&lt;/span&gt;, &lt;span class=&quot;cm-variable&quot;&gt;b&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;System&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;out&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;println&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;&quot;결과는 : &quot;&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;result&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;cm-variable-3&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;add&lt;/span&gt;(&lt;span class=&quot;cm-variable-3&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;a&lt;/span&gt;, &lt;span class=&quot;cm-variable-3&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;b&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;a&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;b&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;cm-variable-3&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;minus&lt;/span&gt;(&lt;span class=&quot;cm-variable-3&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;a&lt;/span&gt;, &lt;span class=&quot;cm-variable-3&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;b&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;a&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;-&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;b&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;cm-variable-3&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;multiply&lt;/span&gt;(&lt;span class=&quot;cm-variable-3&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;a&lt;/span&gt;, &lt;span class=&quot;cm-variable-3&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;b&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;a&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;b&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;cm-variable-3&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;divide&lt;/span&gt;(&lt;span class=&quot;cm-variable-3&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;a&lt;/span&gt;, &lt;span class=&quot;cm-variable-3&quot;&gt;int&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;b&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;if&lt;/span&gt; (&lt;span class=&quot;cm-variable&quot;&gt;b&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;!=&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;0&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;a&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;/&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;b&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;System&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;out&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;println&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;&quot;0으로 나누지 말아주세요&quot;&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;cm-number&quot;&gt;0&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 1100px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 1100px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;h2&gt;&lt;a name=&quot;header-n4179&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;4.2. 미니프로젝트2 -  Java로 간단한 채팅 하기&amp;nbsp;&lt;/h2&gt;&lt;p&gt;자기 자신과 대화하는 프로그램을 만들어보겠습니다. 혼자 말하고 대답하는 카카오톡이라고 보면 됩니다.&lt;/p&gt;&lt;pre spellcheck=&quot;false&quot; class=&quot;md-fences md-end-block ty-contain-cm modeLoaded&quot; lang=&quot;java&quot; style=&quot;page-break-inside: unset;&quot;&gt;&lt;div class=&quot;CodeMirror cm-s-inner CodeMirror-wrap&quot; lang=&quot;java&quot;&gt;&lt;div style=&quot;overflow: hidden; position: relative; width: 3px; height: 0px; top: 0px; left: 7.109375px;&quot;&gt;&lt;textarea autocorrect=&quot;off&quot; autocapitalize=&quot;off&quot; spellcheck=&quot;false&quot; tabindex=&quot;0&quot; style=&quot;position: absolute; bottom: -1em; padding: 0px; width: 1000px; height: 1em; outline: none;&quot;&gt;&lt;/textarea&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scrollbar-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-filler&quot; cm-not-content=&quot;true&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-scroll&quot; tabindex=&quot;-1&quot;&gt;&lt;div class=&quot;CodeMirror-sizer&quot; style=&quot;margin-left: 0px; margin-bottom: 0px; border-right-width: 0px; padding-right: 0px; padding-bottom: 0px;&quot;&gt;&lt;div style=&quot;position: relative; top: 0px;&quot;&gt;&lt;div class=&quot;CodeMirror-lines&quot; role=&quot;presentation&quot;&gt;&lt;div role=&quot;presentation&quot; style=&quot;position: relative; outline: none;&quot;&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;pre&gt;&lt;span&gt;xxxxxxxxxx&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-measure&quot;&gt;&lt;/div&gt;&lt;div style=&quot;position: relative; z-index: 1;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-code&quot; role=&quot;presentation&quot; style=&quot;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline&quot; style=&quot;position: relative;&quot;&gt;&lt;div class=&quot;CodeMirror-activeline-background CodeMirror-linebackground&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutter-background CodeMirror-activeline-gutter&quot; style=&quot;left: 0px; width: 0px;&quot;&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span class=&quot;cm-keyword&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;cm-def&quot;&gt;Main&lt;/span&gt; {&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;static&lt;/span&gt; &lt;span class=&quot;cm-variable-3&quot;&gt;void&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;main&lt;/span&gt;(&lt;span class=&quot;cm-variable-3&quot;&gt;String&lt;/span&gt;[] &lt;span class=&quot;cm-variable&quot;&gt;args&lt;/span&gt;) {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;Scanner&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;sc&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-keyword&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;Scanner&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;System&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;in&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;System&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;out&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;&quot;첫번째 이름을 입력해주세요:&quot;&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable-3&quot;&gt;String&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;user1&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;sc&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;next&lt;/span&gt;();&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;System&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;out&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;println&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;user1&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;cm-string&quot;&gt;&quot;이 입장하셨습니다&quot;&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;System&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;out&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;print&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;&quot;두번째 이름을 입력해주세요:&quot;&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable-3&quot;&gt;String&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;user2&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;sc&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;next&lt;/span&gt;();&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;System&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;out&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;println&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;user2&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;cm-string&quot;&gt;&quot;이 입장하셨습니다&quot;&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;System&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;out&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;println&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;&quot;-- 채팅을 시작합니다 --&quot;&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;while&lt;/span&gt; (&lt;span class=&quot;cm-atom&quot;&gt;true&lt;/span&gt;) { &lt;span class=&quot;cm-comment&quot;&gt;// 특정 조건을 만족하는 동안 계속 동작합니다.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable-3&quot;&gt;String&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;input&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;sc&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;next&lt;/span&gt;();&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;if&lt;/span&gt; (&lt;span class=&quot;cm-variable&quot;&gt;input&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;equals&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;&quot;exit&quot;&lt;/span&gt;)) {&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;System&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;out&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;println&lt;/span&gt;(&lt;span class=&quot;cm-string&quot;&gt;&quot;종료합니다.&quot;&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-keyword&quot;&gt;break&lt;/span&gt;;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;&lt;span cm-text=&quot;&quot;&gt;​&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;System&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;out&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;println&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;user1&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;cm-string&quot;&gt;&quot; : &quot;&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;input&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;cm-variable&quot;&gt;System&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;out&lt;/span&gt;.&lt;span class=&quot;cm-variable&quot;&gt;println&lt;/span&gt;(&lt;span class=&quot;cm-variable&quot;&gt;user2&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;cm-string&quot;&gt;&quot; : &quot;&lt;/span&gt; &lt;span class=&quot;cm-operator&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;cm-variable&quot;&gt;input&lt;/span&gt;);&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt; &amp;nbsp;  }&lt;/span&gt;&lt;/pre&gt;&lt;pre class=&quot; CodeMirror-line &quot; role=&quot;presentation&quot;&gt;&lt;span role=&quot;presentation&quot; style=&quot;padding-right: 0.1px;&quot;&gt;}&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;position: absolute; height: 0px; width: 1px; border-bottom-width: 0px; border-bottom-style: solid; border-bottom-color: transparent; top: 550px;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;CodeMirror-gutters&quot; style=&quot;display: none; height: 550px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/pre&gt;&lt;p&gt;서로 입력을 번갈아 가면서 하면은 채팅 프로그램이 되겠죠?
다른 컴퓨터끼리 채팅을 하려면 네트워크가 필요한데,
이 부분은 좀 더 학습한 뒤에 알아보도록 할께요!&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;h2&gt;&lt;a name=&quot;header-n4189&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;5. 혼자 공부해 보기&lt;/h2&gt;&lt;ol start=&quot;&quot;&gt;&lt;li&gt;출력하기&lt;/li&gt;&lt;/ol&gt;&lt;blockquote&gt;&lt;ul&gt;&lt;li&gt;&quot;오늘을 뭐할까&quot;를 출력해보세요&lt;/li&gt;&lt;li&gt;10+5 를 출력해보세요.&lt;/li&gt;&lt;li&gt;5~100까지 출력을 해주세요&lt;/li&gt;&lt;li&gt;10~100까지 짝수만 출력을 해보세요.&lt;/li&gt;&lt;/ul&gt;&lt;/blockquote&gt;&lt;ol start=&quot;2&quot;&gt;&lt;li&gt;함수 만들기&lt;/li&gt;&lt;/ol&gt;&lt;blockquote&gt;&lt;ul&gt;&lt;li&gt;원의 넓이(3.14 * 반지름 * 반지름)를 구하는 함수를 만들어보세요.&lt;/li&gt;&lt;li&gt;BMI를 구하는 함수를 만들어보세요. (힌트 bmi는 키랑 몸무게로 계산을 합니다)&lt;/li&gt;&lt;/ul&gt;&lt;/blockquote&gt;&lt;ol start=&quot;3&quot;&gt;&lt;li&gt;프로젝트 개선하기&lt;/li&gt;&lt;/ol&gt;&lt;blockquote&gt;&lt;ul&gt;&lt;li&gt;숫자 2개만 입력 받을 수 있는 계산기 함수를 4개 입력 받을 수 있게 고쳐보세요.&lt;/li&gt;&lt;/ul&gt;&lt;/blockquote&gt;&lt;/div&gt;</description>
      <category>안드로이드 (Android)</category>
      <category>android</category>
      <category>IDE</category>
      <category>java</category>
      <category>jdk</category>
      <category>개발툴</category>
      <category>개발툴 설치</category>
      <category>안드로이드</category>
      <category>안드로이드 스튜디오</category>
      <category>오라클</category>
      <category>자바</category>
      <category>자바 for</category>
      <category>자바 if</category>
      <category>자바 if문</category>
      <category>자바 클래스</category>
      <category>자바 포문</category>
      <author>에드 신</author>
      <guid isPermaLink="true">https://software-creator.tistory.com/2</guid>
      <comments>https://software-creator.tistory.com/2#entry2comment</comments>
      <pubDate>Sun, 14 Oct 2018 23:27:03 +0900</pubDate>
    </item>
    <item>
      <title>컴퓨터의 구조 - CPU, RAM, 디스크란?</title>
      <link>https://software-creator.tistory.com/1</link>
      <description>&lt;meta charset=&quot;UTF-8&quot;&gt;&lt;meta name=&quot;viewport&quot; content=&quot;width=device-width initial-scale=1&quot;&gt;
&lt;title&gt;컴퓨터의 구조 - CPU, RAM, 디스크란?&lt;/title&gt;&lt;link href=&quot;https://fonts.googleapis.com/css?family=Open+Sans:400italic,700italic,700,400&amp;amp;subset=latin,latin-ext&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot;&gt;&lt;style type=&quot;text/css&quot;&gt;html {overflow-x: initial !important;}:root { --bg-color: #ffffff; --text-color: #333333; --select-text-bg-color: #B5D6FC; --select-text-font-color: auto; --monospace: 'Lucida Console',Consolas,'Courier',monospace; }
html { font-size: 14px; background-color: var(--bg-color); color: var(--text-color); font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; -webkit-font-smoothing: antialiased; }
body { margin: 0px; padding: 0px; height: auto; bottom: 0px; top: 0px; left: 0px; right: 0px; font-size: 1rem; line-height: 1.42857143; overflow-x: hidden; background-image: inherit; background-size: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: inherit; background-position: inherit inherit; background-repeat: inherit inherit; }
iframe { margin: auto; }
a.url { word-break: break-all; }
a:active, a:hover { outline: 0px; }
.in-text-selection, ::selection { text-shadow: none; background: var(--select-text-bg-color); color: var(--select-text-font-color); }
#write { margin: 0px auto; height: auto; width: inherit; word-break: normal; word-wrap: break-word; position: relative; white-space: normal; padding-bottom: 70px; overflow-x: visible; }
.first-line-indent #write div, .first-line-indent #write li, .first-line-indent #write p { text-indent: 2em; }
.first-line-indent #write div :not(p):not(div), .first-line-indent #write div.md-htmlblock-container, .first-line-indent #write p *, .first-line-indent pre { text-indent: 0px; }
.for-image #write { padding-left: 8px; padding-right: 8px; }
body.typora-export { padding-left: 30px; padding-right: 30px; }
@media screen and (max-width: 500px) { 
  body.typora-export { padding-left: 0px; padding-right: 0px; }
  .CodeMirror-sizer { margin-left: 0px !important; }
  .CodeMirror-gutters { display: none !important; }
}
#write &gt; blockquote:first-child, #write &gt; div:first-child, #write &gt; figure:first-child, #write &gt; ol:first-child, #write &gt; p:first-child, #write &gt; pre:first-child, #write &gt; ul:first-child { margin-top: 30px; }
#write li &gt; figure:first-child { margin-top: -20px; }
#write ol, #write ul { position: relative; }
img { max-width: 100%; vertical-align: middle; }
button, input, select, textarea { color: inherit; font-family: inherit; font-size: inherit; font-style: inherit; font-variant-caps: inherit; font-weight: inherit; line-height: inherit; }
input[type=&quot;checkbox&quot;], input[type=&quot;radio&quot;] { line-height: normal; padding: 0px; }
*, ::after, ::before { box-sizing: border-box; }
#write h1, #write h2, #write h3, #write h4, #write h5, #write h6, #write p, #write pre { width: inherit; }
#write h1, #write h2, #write h3, #write h4, #write h5, #write h6, #write p { position: relative; }
h1, h2, h3, h4, h5, h6 { break-after: avoid-page; break-inside: avoid; orphans: 2; }
p { orphans: 4; }
h1 { font-size: 2rem; }
h2 { font-size: 1.8rem; }
h3 { font-size: 1.6rem; }
h4 { font-size: 1.4rem; }
h5 { font-size: 1.2rem; }
h6 { font-size: 1rem; }
.md-math-block, .md-rawblock, h1, h2, h3, h4, h5, h6, p { margin-top: 1rem; margin-bottom: 1rem; }
.hidden { display: none; }
.md-blockmeta { color: rgb(204, 204, 204); font-weight: 700; font-style: italic; }
a { cursor: pointer; }
sup.md-footnote { padding: 2px 4px; background-color: rgba(238, 238, 238, 0.701961); color: rgb(85, 85, 85); border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; cursor: pointer; }
sup.md-footnote a, sup.md-footnote a:hover { color: inherit; text-transform: inherit; text-decoration: inherit; }
#write input[type=&quot;checkbox&quot;] { cursor: pointer; width: inherit; height: inherit; }
figure { overflow-x: auto; margin: 1.2em 0px; max-width: calc(100% + 16px); padding: 0px; }
figure &gt; table { margin: 0px !important; }
tr { break-inside: avoid; break-after: auto; }
thead { display: table-header-group; }
table { border-collapse: collapse; border-spacing: 0px; width: 100%; overflow: auto; break-inside: auto; text-align: left; }
table.md-table td { min-width: 80px; }
.CodeMirror-gutters { border-right-width: 0px; background-color: inherit; }
.CodeMirror { text-align: left; }
.CodeMirror-placeholder { opacity: 0.3; }
.CodeMirror pre { padding: 0px 4px; }
.CodeMirror-lines { padding: 0px; }
div.hr:focus { cursor: none; }
#write pre { white-space: pre-wrap; }
#write.fences-no-line-wrapping pre { white-space: pre; }
#write pre.ty-contain-cm { white-space: normal; }
.CodeMirror-gutters { margin-right: 4px; }
.md-fences { font-size: 0.9rem; display: block; break-inside: avoid; text-align: left; overflow: visible; white-space: pre; background-image: inherit; background-size: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: inherit; position: relative !important; background-position: inherit inherit; background-repeat: inherit inherit; }
.md-diagram-panel { width: 100%; margin-top: 10px; text-align: center; padding-top: 0px; padding-bottom: 8px; overflow-x: auto; }
#write .md-fences.mock-cm { white-space: pre-wrap; }
.md-fences.md-fences-with-lineno { padding-left: 0px; }
#write.fences-no-line-wrapping .md-fences.mock-cm { white-space: pre; overflow-x: auto; }
.md-fences.mock-cm.md-fences-with-lineno { padding-left: 8px; }
.CodeMirror-line, twitterwidget { break-inside: avoid; }
.footnotes { opacity: 0.8; font-size: 0.9rem; margin-top: 1em; margin-bottom: 1em; }
.footnotes + .footnotes { margin-top: 0px; }
.md-reset { margin: 0px; padding: 0px; border: 0px; outline: 0px; vertical-align: top; text-decoration: none; text-shadow: none; float: none; position: static; width: auto; height: auto; white-space: nowrap; cursor: inherit; line-height: normal; font-weight: 400; text-align: left; box-sizing: content-box; direction: ltr; background-position: 0px 0px; background-repeat: initial initial; }
li div { padding-top: 0px; }
blockquote { margin: 1rem 0px; }
li .mathjax-block, li p { margin: 0.5rem 0px; }
li { margin: 0px; position: relative; }
blockquote &gt; :last-child { margin-bottom: 0px; }
blockquote &gt; :first-child, li &gt; :first-child { margin-top: 0px; }
.footnotes-area { color: rgb(136, 136, 136); margin-top: 0.714rem; padding-bottom: 0.143rem; white-space: normal; }
#write .footnote-line { white-space: pre-wrap; }
@media print { 
  body, html { border: 1px solid transparent; height: 99%; break-after: avoid-page; break-before: avoid-page; }
  #write { margin-top: 0px; border-color: transparent !important; }
  .typora-export * { -webkit-print-color-adjust: exact; }
  html.blink-to-pdf { font-size: 13px; }
  .typora-export #write { padding-left: 1cm; padding-right: 1cm; padding-bottom: 0px; break-after: avoid-page; }
  .typora-export #write::after { height: 0px; }
  @page { margin: 20mm 0px; }
}
.footnote-line { margin-top: 0.714em; font-size: 0.7em; }
a img, img a { cursor: pointer; }
pre.md-meta-block { font-size: 0.8rem; min-height: 0.8rem; white-space: pre-wrap; background-color: rgb(204, 204, 204); display: block; overflow-x: hidden; background-position: initial initial; background-repeat: initial initial; }
p &gt; img:only-child { display: block; margin: auto; }
p &gt; .md-image:only-child { display: inline-block; width: 100%; text-align: center; }
#write .MathJax_Display { margin: 0.8em 0px 0px; }
.md-math-block { width: 100%; }
.md-math-block:not(:empty)::after { display: none; }
[contenteditable=&quot;true&quot;]:active, [contenteditable=&quot;true&quot;]:focus { outline: 0px; box-shadow: none; }
.md-task-list-item { position: relative; list-style-type: none; }
.task-list-item.md-task-list-item { padding-left: 0px; }
.md-task-list-item &gt; input { position: absolute; top: 0px; left: 0px; margin-left: -1.2em; margin-top: calc(1em - 10px); }
.math { font-size: 1rem; }
.md-toc { min-height: 3.58rem; position: relative; font-size: 0.9rem; border-top-left-radius: 10px; border-top-right-radius: 10px; border-bottom-right-radius: 10px; border-bottom-left-radius: 10px; }
.md-toc-content { position: relative; margin-left: 0px; }
.md-toc-content::after, .md-toc::after { display: none; }
.md-toc-item { display: block; color: rgb(65, 131, 196); }
.md-toc-item a { text-decoration: none; }
.md-toc-inner:hover { }
.md-toc-inner { display: inline-block; cursor: pointer; }
.md-toc-h1 .md-toc-inner { margin-left: 0px; font-weight: 700; }
.md-toc-h2 .md-toc-inner { margin-left: 2em; }
.md-toc-h3 .md-toc-inner { margin-left: 4em; }
.md-toc-h4 .md-toc-inner { margin-left: 6em; }
.md-toc-h5 .md-toc-inner { margin-left: 8em; }
.md-toc-h6 .md-toc-inner { margin-left: 10em; }
@media screen and (max-width: 48em) { 
  .md-toc-h3 .md-toc-inner { margin-left: 3.5em; }
  .md-toc-h4 .md-toc-inner { margin-left: 5em; }
  .md-toc-h5 .md-toc-inner { margin-left: 6.5em; }
  .md-toc-h6 .md-toc-inner { margin-left: 8em; }
}
a.md-toc-inner { font-size: inherit; font-style: inherit; font-weight: inherit; line-height: inherit; }
.footnote-line a:not(.reversefootnote) { color: inherit; }
.md-attr { display: none; }
.md-fn-count::after { content: '.'; }
code, pre, samp, tt { font-family: var(--monospace); }
kbd { margin: 0px 0.1em; padding: 0.1em 0.6em; font-size: 0.8em; color: rgb(36, 39, 41); background-color: rgb(255, 255, 255); border: 1px solid rgb(173, 179, 185); border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; box-shadow: rgba(12, 13, 14, 0.2) 0px 1px 0px, rgb(255, 255, 255) 0px 0px 0px 2px inset; white-space: nowrap; vertical-align: middle; background-position: initial initial; background-repeat: initial initial; }
.md-comment { color: rgb(162, 127, 3); opacity: 0.8; font-family: var(--monospace); }
code { text-align: left; }
a.md-print-anchor { white-space: pre !important; border: none !important; display: inline-block !important; position: absolute !important; width: 1px !important; right: 0px !important; outline: 0px !important; text-shadow: initial !important; background-position: 0px 0px !important; background-repeat: initial initial !important; }
.md-inline-math .MathJax_SVG .noError { display: none !important; }
.md-math-block .MathJax_SVG_Display { text-align: center; margin: 0px; position: relative; text-indent: 0px; max-width: none; max-height: none; min-height: 0px; min-width: 100%; width: auto; overflow-y: hidden; display: block !important; }
.MathJax_SVG_Display, .md-inline-math .MathJax_SVG_Display { width: auto; margin: inherit; display: inline-block !important; }
.MathJax_SVG .MJX-monospace { font-family: var(--monospace); }
.MathJax_SVG .MJX-sans-serif { font-family: sans-serif; }
.MathJax_SVG { display: inline; font-style: normal; font-weight: 400; line-height: normal; zoom: 90%; text-indent: 0px; text-align: left; text-transform: none; letter-spacing: normal; word-spacing: normal; word-wrap: normal; white-space: nowrap; float: none; direction: ltr; max-width: none; max-height: none; min-width: 0px; min-height: 0px; border: 0px; padding: 0px; margin: 0px; }
.MathJax_SVG * { transition: none; }
.MathJax_SVG_Display svg { vertical-align: middle !important; margin-bottom: 0px !important; }
.os-windows.monocolor-emoji .md-emoji { font-family: 'Segoe UI Symbol', sans-serif; }
.md-diagram-panel &gt; svg { max-width: 100%; }
[lang=&quot;mermaid&quot;] svg, [lang=&quot;flow&quot;] svg { max-width: 100%; }
[lang=&quot;mermaid&quot;] .node text { font-size: 1rem; }
table tr th { border-bottom-width: 0px; }
video { max-width: 100%; display: block; margin: 0px auto; }
iframe { max-width: 100%; width: 100%; border: none; }
.highlight td, .highlight tr { border: 0px; }


:root {
    --side-bar-bg-color: #fafafa;
    --control-text-color: #777;
}

@include-when-export url(https://fonts.googleapis.com/css?family=Open+Sans:400italic,700italic,700,400&amp;subset=latin,latin-ext);

@font-face {
    font-family: 'Open Sans';
    font-style: normal;
    font-weight: normal;
    src: local('Open Sans Regular'),url('file:///Users/JcSnap/Library/Application%20Support/abnerworks.Typora/themes/github/400.woff') format('woff')
}

@font-face {
    font-family: 'Open Sans';
    font-style: italic;
    font-weight: normal;
    src: local('Open Sans Italic'),url('file:///Users/JcSnap/Library/Application%20Support/abnerworks.Typora/themes/github/400i.woff') format('woff')
}

@font-face {
    font-family: 'Open Sans';
    font-style: normal;
    font-weight: bold;
    src: local('Open Sans Bold'),url('file:///Users/JcSnap/Library/Application%20Support/abnerworks.Typora/themes/github/700.woff') format('woff')
}

@font-face {
    font-family: 'Open Sans';
    font-style: italic;
    font-weight: bold;
    src: local('Open Sans Bold Italic'),url('file:///Users/JcSnap/Library/Application%20Support/abnerworks.Typora/themes/github/700i.woff') format('woff')
}

html {
    font-size: 16px;
}

body {
    font-family: &quot;Open Sans&quot;,&quot;Clear Sans&quot;,&quot;Helvetica Neue&quot;,Helvetica,Arial,sans-serif;
    color: rgb(51, 51, 51);
    line-height: 1.6;
}

#write{
    max-width: 860px;
  	margin: 0 auto;
  	padding: 20px 30px 40px 30px;
	padding-top: 20px;
    padding-bottom: 100px;
}
#write &gt; ul:first-child,
#write &gt; ol:first-child{
    margin-top: 30px;
}

body &gt; *:first-child {
    margin-top: 0 !important;
}
body &gt; *:last-child {
    margin-bottom: 0 !important;
}
a {
    color: #4183C4;
}
h1,
h2,
h3,
h4,
h5,
h6 {
    position: relative;
    margin-top: 1rem;
    margin-bottom: 1rem;
    font-weight: bold;
    line-height: 1.4;
    cursor: text;
}
h1:hover a.anchor,
h2:hover a.anchor,
h3:hover a.anchor,
h4:hover a.anchor,
h5:hover a.anchor,
h6:hover a.anchor {
    /*background: url(&quot;file:///Users/JcSnap/Library/Application%20Support/images/modules/styleguide/para.png&quot;) no-repeat 10px center;*/
    text-decoration: none;
}
h1 tt,
h1 code {
    font-size: inherit;
}
h2 tt,
h2 code {
    font-size: inherit;
}
h3 tt,
h3 code {
    font-size: inherit;
}
h4 tt,
h4 code {
    font-size: inherit;
}
h5 tt,
h5 code {
    font-size: inherit;
}
h6 tt,
h6 code {
    font-size: inherit;
}
h1 {
    padding-bottom: .3em;
    font-size: 2.25em;
    line-height: 1.2;
    border-bottom: 1px solid #eee;
}
h2 {
   padding-bottom: .3em;
    font-size: 1.75em;
    line-height: 1.225;
    border-bottom: 1px solid #eee;
}
h3 {
    font-size: 1.5em;
    line-height: 1.43;
}
h4 {
    font-size: 1.25em;
}
h5 {
    font-size: 1em;
}
h6 {
   font-size: 1em;
    color: #777;
}
p,
blockquote,
ul,
ol,
dl,
table{
    margin: 0.8em 0;
}
li&gt;ol,
li&gt;ul {
    margin: 0 0;
}
hr {
    height: 2px;
    padding: 0;
    margin: 16px 0;
    background-color: #e7e7e7;
    border: 0 none;
    overflow: hidden;
    box-sizing: content-box;
}

body &gt; h2:first-child {
    margin-top: 0;
    padding-top: 0;
}
body &gt; h1:first-child {
    margin-top: 0;
    padding-top: 0;
}
body &gt; h1:first-child + h2 {
    margin-top: 0;
    padding-top: 0;
}
body &gt; h3:first-child,
body &gt; h4:first-child,
body &gt; h5:first-child,
body &gt; h6:first-child {
    margin-top: 0;
    padding-top: 0;
}
a:first-child h1,
a:first-child h2,
a:first-child h3,
a:first-child h4,
a:first-child h5,
a:first-child h6 {
    margin-top: 0;
    padding-top: 0;
}
h1 p,
h2 p,
h3 p,
h4 p,
h5 p,
h6 p {
    margin-top: 0;
}
li p.first {
    display: inline-block;
}
ul,
ol {
    padding-left: 30px;
}
ul:first-child,
ol:first-child {
    margin-top: 0;
}
ul:last-child,
ol:last-child {
    margin-bottom: 0;
}
blockquote {
    border-left: 4px solid #dfe2e5;
    padding: 0 15px;
    color: #777777;
}
blockquote blockquote {
    padding-right: 0;
}
table {
    padding: 0;
    word-break: initial;
}
table tr {
    border-top: 1px solid #dfe2e5;
    margin: 0;
    padding: 0;
}
table tr:nth-child(2n),
thead {
    background-color: #f8f8f8;
}
table tr th {
    font-weight: bold;
    border: 1px solid #dfe2e5;
    border-bottom: 0;
    text-align: left;
    margin: 0;
    padding: 6px 13px;
}
table tr td {
    border: 1px solid #dfe2e5;
    text-align: left;
    margin: 0;
    padding: 6px 13px;
}
table tr th:first-child,
table tr td:first-child {
    margin-top: 0;
}
table tr th:last-child,
table tr td:last-child {
    margin-bottom: 0;
}

.CodeMirror-lines {
    padding-left: 4px;
}

.code-tooltip {
    box-shadow: 0 1px 1px 0 rgba(0,28,36,.3);
    border-top: 1px solid #eef2f2;
}

.md-fences,
code,
tt {
    border: 1px solid #e7eaed;
    background-color: #f8f8f8;
    border-radius: 3px;
    padding: 0;
    padding: 2px 4px 0px 4px;
    font-size: 0.9em;
}

code {
    background-color: #f3f4f4;
    padding: 0 4px 2px 4px;
}

.md-fences {
    margin-bottom: 15px;
    margin-top: 15px;
    padding: 0.2em 1em;
    padding-top: 8px;
    padding-bottom: 6px;
}


.md-task-list-item &gt; input {
  margin-left: -1.3em;
}

@media screen and (min-width: 914px) {
    /*body {
        width: 854px;
        margin: 0 auto;
    }*/
}
@media print {
    html {
        font-size: 13px;
    }
    table,
    pre {
        page-break-inside: avoid;
    }
    pre {
        word-wrap: break-word;
    }
}

.md-fences {
	background-color: #f8f8f8;
}
#write pre.md-meta-block {
	padding: 1rem;
    font-size: 85%;
    line-height: 1.45;
    background-color: #f7f7f7;
    border: 0;
    border-radius: 3px;
    color: #777777;
    margin-top: 0 !important;
}

.mathjax-block&gt;.code-tooltip {
	bottom: .375rem;
}

.md-mathjax-midline {
    background: #fafafa;
}

#write&gt;h3.md-focus:before{
	left: -1.5625rem;
	top: .375rem;
}
#write&gt;h4.md-focus:before{
	left: -1.5625rem;
	top: .285714286rem;
}
#write&gt;h5.md-focus:before{
	left: -1.5625rem;
	top: .285714286rem;
}
#write&gt;h6.md-focus:before{
	left: -1.5625rem;
	top: .285714286rem;
}
.md-image&gt;.md-meta {
    /*border: 1px solid #ddd;*/
    border-radius: 3px;
    padding: 2px 0px 0px 4px;
    font-size: 0.9em;
    color: inherit;
}

.md-tag {
    color: #a7a7a7;
    opacity: 1;
}

.md-toc { 
    margin-top:20px;
    padding-bottom:20px;
}

.sidebar-tabs {
    border-bottom: none;
}

#typora-quick-open {
    border: 1px solid #ddd;
    background-color: #f8f8f8;
}

#typora-quick-open-item {
    background-color: #FAFAFA;
    border-color: #FEFEFE #e5e5e5 #e5e5e5 #eee;
    border-style: solid;
    border-width: 1px;
}

/** focus mode */
.on-focus-mode blockquote {
    border-left-color: rgba(85, 85, 85, 0.12);
}

header, .context-menu, .megamenu-content, footer{
    font-family: &quot;Segoe UI&quot;, &quot;Arial&quot;, sans-serif;
}

.file-node-content:hover .file-node-icon,
.file-node-content:hover .file-node-open-state{
    visibility: visible;
}

.mac-seamless-mode #typora-sidebar {
    background-color: #fafafa;
    background-color: var(--side-bar-bg-color);
}

.md-lang {
    color: #b4654d;
}

.html-for-mac .context-menu {
    --item-hover-bg-color: #E6F0FE;
}


 .typora-export p, .typora-export .footnote-line {white-space: normal;} 
&lt;/style&gt;


&lt;div id=&quot;write&quot; class=&quot;is-mac&quot;&gt;&lt;h2&gt;&lt;a name=&quot;header-n0&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;1. 컴퓨터의 이해&lt;/h2&gt;&lt;p&gt;우린 완성되어 있는 컴퓨터만 보면서 살아갑니다. 그러다 보니 컴퓨터는 하나의 마법처럼만 보입니다. 하지만 크기나 모양에 상관없이 구조는 동일합니다.  &lt;/p&gt;
&lt;p&gt;사람이 남자,여자,아이,노인,백인,흑인이더라도 사람이라는 점에서 동일하듯이,
노트북, 스마트폰, 드론, 로봇, 무인자동차 모두 다 컴퓨터입니다.&lt;/p&gt;
&lt;p&gt;그럼 컴퓨터는 무엇으로 이뤄져 있을까요?
크게 3가지로 나뉩니다.&lt;/p&gt;
&lt;p&gt;CPU, RAM, HARD DISK(SSD) 이지요.
이 세가지의 역할만 이해하면 컴퓨터의 원리를 알 수 있습니다. (다나와에서 노트북 살때도 도움이 됩니다. )&lt;/p&gt;&lt;h3&gt;&lt;a name=&quot;header-n6&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;1.1.1 CPU (Central Processing Unit, 중앙 처리 장치)&lt;/h3&gt;&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/13621579/46917988-67d28b00-d007-11e8-9ac4-aadc029094a6.jpg&quot; alt=&quot;alt text&quot; referrerpolicy=&quot;no-referrer&quot;&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;CPU는 고속 계산장치인데요. 사람의 뇌와 같은 역할을 합니다. 단순히 고속 계산 장치라고 하면은 감이 안 올 텐데요. CPU는 보통 Hz(헤르츠)라는 단위로 표시하는데 1초당 깜빡이는 횟수를 나타냅니다.&lt;/li&gt;&lt;li&gt;저렴한 20만원 짜리 노트북의 경우 1.8 GHz(기가 헤르츠)의 CPU를 쓰는데요. 기가 헤르츠가 10^9(1억)이니 1억번이나 깜빡인다고 할 수 있습니다. 작은 칩 속에 놀라운 비밀이 있는 것이죠.&lt;/li&gt;&lt;li&gt;CPU는 덧셈, 뺄쎔을 엄청나게 빠른 속도로 하는 기계입니다. 다른 거는 하나도 못합니다. CPU는 이진법으로 밖에 계산을 못합니다. 0과 1만 이해할 수 있는 거죠. 어떻게 보면 멍청한 기계인데, 이 기계를 기반으로 인공지능을 만든다니 놀랍지 않나요?&lt;/li&gt;&lt;li&gt;인텔이 CPU를 만든 덕분에 세계에서 가장 큰 기업이 되었지요. 그만큼 CPU는 중요합니다.&lt;/li&gt;&lt;li&gt;손정의 소프트뱅크 회장이 투자한 ARM(35조에 인수)은 모바일용 CPU를 설계하는 회사입니다. CPU가 얼마나 IT업계에서 중요한지 알 수 있지 않나요?&lt;/li&gt;&lt;/ul&gt;&lt;h3&gt;&lt;a name=&quot;header-n19&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;1.1.2 RAM(Random Access Memory, 램)&lt;/h3&gt;&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/13621579/46917992-6dc86c00-d007-11e8-99b8-e75f73da44d5.jpg&quot; alt=&quot;alt text&quot; referrerpolicy=&quot;no-referrer&quot;&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;RAM은 임시 기억 장치인데요. CPU가 하려는 값을 잠시 저장했다가 CPU에서 계산할 때 씁니다. 우리도 외워야할 영어 단어나, 할 일을 종이에 적거나 스마트폰에 적어두듯이 컴퓨터도 할 일을 다른 데 적어두는 거죠. 그게 바로 RAM입니다.&lt;/li&gt;&lt;li&gt;RAM은 왜 필요할까요? 다 CPU에서 하면은 편할텐데 굳이 RAM을 만들어 머리 아프게 하는 걸까요?
바로 경제적 이유때문입니다. CPU는 만들기도 어렵고 가격이 비쌉니다. 한때는 전세계에서 2개의 회사만 만들정도로 독점이 심했습니다.&lt;/li&gt;&lt;li&gt;결국 RAM은 비싼 CPU를 효율적으로 쓰기 위해 만들어졌습니다.&lt;/li&gt;&lt;li&gt;RAM은 큰 문제가 있는데 전원을 끄면은 저장된 게 사라집니다. 잠깐 밖에 기억을 못합니다. 문서나 PPT 작업을 하다가 날아간 기억이 있으시죠? 이게 다 RAM에다만 저장을 해서 생긴 일입니다. 이를 해결하고자 나온 게 하드 디스크입니다.&lt;/li&gt;&lt;/ul&gt;&lt;h3&gt;&lt;a name=&quot;header-n30&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;1.1.3 HARD DISK(하드 디스크, 보통 SSD)&lt;/h3&gt;&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/13621579/46917997-728d2000-d007-11e8-8be1-4798830081cd.jpg&quot; alt=&quot;alt text&quot; referrerpolicy=&quot;no-referrer&quot;&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;하드 디스크는 영구 기억 장치인데요. 한번 저장된 데이터는 물리적 충격이 없는 이상 계속 보존됩니다. 하드 디스크를 집어 던지거나, 강하게 때리지 않는 이상 데이터를 보관, 저장합니다. 뇌의 장기 기억과 비슷하죠. 어렸을 떄 배운 외국어나, 수학공식은 시간이 지나도 안 까먹잖아요. 그게 다 장기 기억으로 옮겨갔기 때문입니다.&lt;/li&gt;&lt;li&gt;얼핏 봐도 하드 디스크가 제일 좋아보이는데 왜 굳이 RAM을 쓸까요? 바로 속도 문제입니다. RAM에 비하면 하드 디스크는 굼뱅이 수준이거든요. CPU가 바로 하드디스크에서 데이터를 찾아야 했다면 컴퓨터 켜는 데만도 1시간은 걸렸을 거에요.&lt;/li&gt;&lt;/ul&gt;&lt;h3&gt;&lt;a name=&quot;header-n37&quot; class=&quot;md-header-anchor &quot;&gt;&lt;/a&gt;1.1.4 CPU, RAM, HARD DISK의 연관성&lt;/h3&gt;&lt;p&gt;&lt;img src=&quot;https://user-images.githubusercontent.com/13621579/46918016-92bcdf00-d007-11e8-8d52-94fdba4808bd.jpg&quot; alt=&quot;alt text&quot; referrerpolicy=&quot;no-referrer&quot;&gt;&lt;/p&gt;
&lt;p&gt;문서 프로그램을 실행하는 걸 생각해봅시다.
어떻게 하드디스크로부터 CPU까지 연결이 될까요?&lt;/p&gt;
&lt;p&gt;-1. 우리가 소프트웨어를 쓰려면 일단 하드 디스크에 저장되었는지 보고, 디스크에 있는 데이터를 불러옵니다.&lt;/p&gt;
&lt;p&gt;-2. 램에다 소프트웨어를 올리고 동작을 할 준비를 합니다.&lt;/p&gt;
&lt;p&gt;-3. 필요한 만큼 CPU에서 연산을 하며 소프트웨어를 동작시킵니다.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;em&gt;요약하자면 아래와 같아요&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;cpu - 계산 장치, 뇌와 유사&lt;/p&gt;
&lt;p&gt;ram - 단기 기억 장치, 잠깐 계산 결과를 기억함&lt;/p&gt;
&lt;p&gt;disk - 장기 기억 장치.&lt;/p&gt;
&lt;p&gt;항상 기억하고 있어 주세요.&lt;/p&gt;&lt;/div&gt;</description>
      <category>안드로이드 (Android)</category>
      <category>CPU</category>
      <category>memory</category>
      <category>Ram</category>
      <category>SSD</category>
      <category>노트북</category>
      <category>램</category>
      <category>씨피유</category>
      <author>에드 신</author>
      <guid isPermaLink="true">https://software-creator.tistory.com/1</guid>
      <comments>https://software-creator.tistory.com/1#entry1comment</comments>
      <pubDate>Sun, 14 Oct 2018 18:22:28 +0900</pubDate>
    </item>
  </channel>
</rss>