<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
    <channel>
        <title>은주의 개발일지</title>
        <link>https://velog.io/</link>
        <description></description>
        <lastBuildDate>Mon, 26 Sep 2022 12:52:07 GMT</lastBuildDate>
        <docs>https://validator.w3.org/feed/docs/rss2.html</docs>
        <generator>https://github.com/jpmonette/feed</generator>
        <copyright>Copyright (C) 2019. 은주의 개발일지. All rights reserved.</copyright>
        <atom:link href="https://v2.velog.io/rss/eunjo_ourism" rel="self" type="application/rss+xml"/>
        <item>
            <title><![CDATA[C프로그래밍 6장]]></title>
            <link>https://velog.io/@eunjo_ourism/C%ED%94%84%EB%A1%9C%EA%B7%B8%EB%9E%98%EB%B0%8D-6%EC%9E%A5</link>
            <guid>https://velog.io/@eunjo_ourism/C%ED%94%84%EB%A1%9C%EA%B7%B8%EB%9E%98%EB%B0%8D-6%EC%9E%A5</guid>
            <pubDate>Mon, 26 Sep 2022 12:52:07 GMT</pubDate>
            <description><![CDATA[<h1 id="1-반복문-개요">1. 반복문 개요</h1>
<h2 id="1-1-반복문">1-1. 반복문</h2>
<ul>
<li>특정 조건을 만족하는 동안 계속 반복하여 실행하는 문장</li>
<li>루프(loop)라고도 불림</li>
<li>while 문, do-while 문, for 문<h2 id="1-2-while-문">1-2. while 문</h2>
<pre><code class="language-c">while (조건식)
{
  반복할 문장;
}</code></pre>
</li>
<li>조건식이 참인 동안 중괄호로 둘러 쌓인 블록 안의 문장 반복<h1 id="2-do-while-문">2. do-while 문</h1>
<h2 id="2-1-do-while-문">2-1. do-while 문</h2>
</li>
<li>반복할 문장을 실행한 후에 조건식 검사</li>
<li>반복문 내에 있는 문장을 최소한 한 번 실행하고자 할 때 유용</li>
<li>주의) 마지막에 세미콜론(;)을 반드시 써야 함<pre><code class="language-c">do {
  반복할 문장;
} while( 조건식 );</code></pre>
<h1 id="3-for-문">3. for 문</h1>
<h2 id="3-1-for-문">3-1. for 문</h2>
</li>
<li>일반적으로 반복하는 횟수가 정해진 경우에 사용</li>
<li>초기식, 조건식, 증감식으로 구성되고, 세미콜론으로 구분<ul>
<li>초기식은 처음 한 번만 수행</li>
<li>이후, 조건식 → 반복할 문장 → 증감식이 반복적으로 수행됨<pre><code class="language-c">for(초기식 ; 조건식 ; 증감식) {
반복할 문장;
}</code></pre>
<h2 id="3-2-for-문의-상세-동작-방식">3-2. for 문의 상세 동작 방식</h2>
</li>
</ul>
</li>
</ul>
<ol>
<li>초기식을 수행한다.</li>
<li>조건식을 검사한다.</li>
<li>조건식의 값이 거짓이면 for문의 실행이 종료된다.</li>
<li>조건식의 값이 참이면 문장이 실행된다.</li>
<li>증감을 실행하고 2로 돌아간다.</li>
</ol>
<h2 id="3-4-for-문의-자주-활용되는-형태">3-4. for 문의 자주 활용되는 형태</h2>
<ul>
<li><code>for( ; i&lt;=5; i++)</code>: 빈 초기식</li>
<li><code>for(int i=1; i&lt;=5; i++)</code>: 변수 선언 및 초기화 (단, i는 for 문 안에서만 사용 가능)</li>
<li><code>for(sum=0, i=1; i&lt;=5; i++)</code>: 여려 개의 초기식 (콤마로 구분)</li>
<li><code>for(i=0; i&lt;=5; )</code>: 빈 증감식</li>
<li><code>for(i=0, j=0; i&lt;=5; i++, j++)</code>: 여러 개의 초기식과 증감식</li>
<li><code>for(i=0; ; i++)</code>: 빈 조건식 (무한루프) 이 경우 조건식의 결과는 항상 참으로 간주
→ 문법적으로는 초기식, 조건식, 증감식에는 어떤 수식도 가능</li>
</ul>
<h1 id="4-중첩-반복">4. 중첩 반복</h1>
<h2 id="4-1-중첩-반복다중-반복">4-1. 중첩 반복(다중 반복)</h2>
<ul>
<li>반복문에서 반복 대상은 어떤 문장이든 가능</li>
<li>반복문 안에 또 다른 반복문이 오는 경우를 중첩 반복이라 함</li>
</ul>
<h1 id="5-반복문-기타">5. 반복문 기타</h1>
<h2 id="5-1-break-문">5-1. break 문</h2>
<ul>
<li>현재 사용 중인 반복문을 중단하고 제어를 반복문 바깥으로 이동</li>
</ul>
<h2 id="5-2-continue-문">5-2. continue 문</h2>
<ul>
<li>현재 수행 중인 반복문에서 현재 조건 값에 대한 처리를 중단하고, 다음 조건 값에 대한 처리를 수행</li>
<li>결과적으로 continue 문과 반복문의 마지막 부분 사이에 있는 문장은 실행되지 않음</li>
</ul>
<h2 id="5-3-무한-반복">5-3. 무한 반복</h2>
<ul>
<li>일반적으로 반복문에서는 조건을 지정하여 조건에 맞는 경우에만 반복을 시킴</li>
<li>경우에 따라서는 반복이 무한히 지속되는 무한 반복을 사용하는 경우도 있음</li>
</ul>
]]></description>
        </item>
        <item>
            <title><![CDATA[C프로그래밍 5장]]></title>
            <link>https://velog.io/@eunjo_ourism/C%ED%94%84%EB%A1%9C%EA%B7%B8%EB%9E%98%EB%B0%8D-5%EC%9E%A5</link>
            <guid>https://velog.io/@eunjo_ourism/C%ED%94%84%EB%A1%9C%EA%B7%B8%EB%9E%98%EB%B0%8D-5%EC%9E%A5</guid>
            <pubDate>Mon, 19 Sep 2022 12:01:37 GMT</pubDate>
            <description><![CDATA[<h1 id="1-조건문-개요">1. 조건문 개요</h1>
<h2 id="1-1-제어문">1-1. 제어문</h2>
<ul>
<li>C 언어는 순차처리언어로, 특별한 지정이 없으면, 소스 코드 첫 줄부터 차례대로 처리</li>
<li>그러나 문제 해결 위해 처리 흐름 제어 필요 → 제어문</li>
</ul>
<table>
<thead>
<tr>
<th align="center">분류</th>
<th align="center">종류</th>
</tr>
</thead>
<tbody><tr>
<td align="center">조건문</td>
<td align="center">if 문, if-else 문, switch 문</td>
</tr>
<tr>
<td align="center">반복문</td>
<td align="center">for 문, while 문, do-while 문</td>
</tr>
<tr>
<td align="center">기타</td>
<td align="center">break 문, continue 문, goto 문, return 문</td>
</tr>
</tbody></table>
<h1 id="2-if-문">2. if 문</h1>
<h2 id="2-1-if-문">2-1. if 문</h2>
<ul>
<li>조건식이 참이면 중괄호로 둘러 쌓인 블록 안의 문장들이 실행된다. </li>
<li>구문<pre><code class="language-c">if( 조건식 )
{
  문장;     // 조건식이 참일 때만 실행
}     // 블록 안의 문장이 하나인 경우 중괄호 생략 가능</code></pre>
</li>
</ul>
<h2 id="2-2-if-문-사용-시-주의-사항">2-2. if 문 사용 시 주의 사항</h2>
<ul>
<li>if의 조건식 뒤에 바로 세미콜론 ; 은 쓰지 않는다.</li>
<li>조건식에서 비교 연산자 == 가 아닌 대입 연산자 = 를 쓰는 경우<pre><code class="language-c">int x = -2;
if( x = 9 ) // 대입 연산: 참
  printf(&quot;x는 %d\n&quot;,x);</code></pre>
→ 위 코드는 컴파일 오류가 발생하지 않음 (즉, 문법적 오류 없음)
→ 위 코드의 의미: x에 9를 대입하고, x의 값을 조건식으로 사용 (C 언어에서 0이 아니면 모두 참)</li>
</ul>
<h1 id="3-if-else-문">3. if-else 문</h1>
<h2 id="3-1-if-else-문">3-1. if-else 문</h2>
<ul>
<li>if의 조건식이 참이면 조건식 바로 다음의 블록이 실행되고, </li>
<li>조건식이 거짓이면 else 문 다음의 블록이 실행된다. </li>
<li>구문<pre><code class="language-c">if( 조건식 ) {
  문장1; // 조건식이 참일 때 실행
}
else {
  문장2; // 조건식이 거짓일 때 실행
}    // 각 블록 안의 문장이 하나인 경우, 해당 블록의 중괄호 생략 가능</code></pre>
</li>
</ul>
<h1 id="4-다중-if-문">4. 다중 if 문</h1>
<h2 id="4-1-다중-if-문-or-중첩-if-문">4-1. 다중 if 문 or 중첩 if 문</h2>
<ul>
<li>if 문 안의 문장이 또 다른 if 문인 경우 (if-else 문 포함)</li>
</ul>
<h2 id="4-2-else는-위쪽에서-짝이-없는-가장-가까운-if와-짝이-된다">4-2. else는 위쪽에서 짝이 없는 가장 가까운 if와 짝이 된다.</h2>
<pre><code class="language-c">if( x &gt;= 0 )
    if( x%2 == 0)
        printf(&quot;양의 짝수 또는 0\n&quot;);
    else
        printf(&quot;양의 홀수\n&quot;);</code></pre>
<h2 id="4-3-else를-멀리-있는-if와-짝을-지으려면">4-3. else를 멀리 있는 if와 짝을 지으려면?</h2>
<ul>
<li>중괄호 <code>{}</code>를 사용하여 if 문의 적용 범위를 강제로 바꿔주면 됨<pre><code class="language-c">if(x &gt;= 0) {
  if(x%2 == 0)
      printf(&quot;양의 짝수 또는 0\n&quot;);
}
else printf(&quot;음수\n&quot;);</code></pre>
</li>
</ul>
<h2 id="4-4-다중-선택을-위한-다중-if-문의-일반적인-구문">4-4. 다중 선택을 위한 다중 if 문의 일반적인 구문</h2>
<pre><code class="language-c">if( 조건식 A ) {
    문장1; // 조건식 A가 참일 때 실행
}
else if( 조건식 B ) {
    문장2; // 조건식 A는 거짓이고, 조건식 B는 참일 때 실행
}
else if( 조건식 C ) {
    문장3; // 조건식 A, B는 모두 거짓이고, 조건식 C는 참일 때 실행
}
⋯
else {
    문장; ⇨ 조건식 A, B, C, … 모두 거짓일 때 실행
} // 각 블록 안의 문장이 하나인 경우, 해당 블록의 중괄호 생략 가능</code></pre>
<h1 id="5-switch-문">5. switch 문</h1>
<h2 id="5-1-switch-문">5-1. switch 문</h2>
<ul>
<li>주로 다중 선택에 사용하는데, 다중 if문보다 간결</li>
<li>대신, 사용 영역이 if-else에 비해 제한적</li>
</ul>
<h2 id="5-2-switch-문-동작-방식">5-2. switch 문 동작 방식</h2>
<ul>
<li>switch 문 수식의 결과 값과 case의 상수 값을 차례로 비교하여 일치하는 case의 문장들부터 차례로 수행</li>
<li>case 비교 시 <code>default:</code> 의 의미 : 그 외의 경우</li>
<li>해당 case도 없고, <code>default:</code> 도 없으면? : 아무 문장도 실행하지 않고, switch 문 끝으로 이동</li>
</ul>
<h2 id="5-3-break-문">5-3. break 문</h2>
<ul>
<li>switch 문을 중간에 벗어나는 역할</li>
<li>switch 문 수행도중 break 문을 만나면 switch 문 끝으로 이동</li>
</ul>
<h2 id="5-4-case-에-정수1-2-3이순서대로나와야하나-no">5-4. case 에 정수1, 2, 3이순서대로나와야하나? NO!!</h2>
<ul>
<li>순서 상관없다 (하지만, 굳이..)</li>
<li>문자도 가능</li>
</ul>
<h2 id="5-5-switch-문-사용시-주의점">5-5. switch 문 사용시 주의점</h2>
<ul>
<li>case 에는 정수형 상수(문자 포함)만 가능<ul>
<li><code>case 1 :</code> ⇨ (O) 정수형 상수</li>
<li><code>case &#39;a&#39; :</code> ⇨ (O) 문자형 상수 (C 언어에서 문자도 정수이다.)</li>
</ul>
</li>
</ul>
]]></description>
        </item>
        <item>
            <title><![CDATA[C프로그래밍 4장]]></title>
            <link>https://velog.io/@eunjo_ourism/C%ED%94%84%EB%A1%9C%EA%B7%B8%EB%9E%98%EB%B0%8D-4%EC%9E%A5</link>
            <guid>https://velog.io/@eunjo_ourism/C%ED%94%84%EB%A1%9C%EA%B7%B8%EB%9E%98%EB%B0%8D-4%EC%9E%A5</guid>
            <pubDate>Mon, 19 Sep 2022 12:00:12 GMT</pubDate>
            <description><![CDATA[<h1 id="1-수식과-연산자-개요">1. 수식과 연산자 개요</h1>
<h2 id="1-1-연산자">1-1. 연산자</h2>
<ul>
<li>데이터를 가공하고 처리하기 위한 가장 기본 도구</li>
<li>연산 종류에 따른 분류 : 산술 연산자, 관계 연산자, 논리 연산자, 증감 연산자, 비트 연산자, 대입 연산자, 조건 연산자 등</li>
<li>피연산자 개수에 따른 분류 : 단항 연산자, 이항 연산자, 삼항 연산자</li>
</ul>
<h2 id="1-2-수식">1-2. 수식</h2>
<ul>
<li>피연산자들과 연산자의 조합으로 어떠한 값을 갖는 요소<pre><code class="language-c">num = 10;            // 상수인 10이 수식
num1 = num;            // 변수인 num이 수식
num2 = num + 1;        // 연산식인 num + 1이 수식</code></pre>
</li>
</ul>
<h1 id="2-산술-연산자">2. 산술 연산자</h1>
<h2 id="2-1-산술-연산자-종류">2-1. 산술 연산자 종류</h2>
<table>
<thead>
<tr>
<th align="center">연산자</th>
<th align="center">정수 연산</th>
<th align="center">부동소수 연산</th>
</tr>
</thead>
<tbody><tr>
<td align="center">+</td>
<td align="center">더하기</td>
<td align="center">더하기</td>
</tr>
<tr>
<td align="center">-</td>
<td align="center">빼기</td>
<td align="center">빼기</td>
</tr>
<tr>
<td align="center">*</td>
<td align="center">곱하기</td>
<td align="center">곱하기</td>
</tr>
<tr>
<td align="center">/</td>
<td align="center">몫</td>
<td align="center">실수 나눗셈</td>
</tr>
<tr>
<td align="center">%</td>
<td align="center">나머지</td>
<td align="center">(정의 되지 않음)</td>
</tr>
</tbody></table>
<h2 id="2-2-연산-순서">2-2. 연산 순서</h2>
<ul>
<li>연산자 우선순위 : <code>*</code>, <code>/</code>, <code>%</code> &gt; <code>+</code>, <code>-</code></li>
<li>결합 수칙 : 왼쪽에서 오른쪽 방향으로 적용</li>
</ul>
<h2 id="2-3-산술-연산과-자료형">2-3. 산술 연산과 자료형</h2>
<ul>
<li><p>연산 결과도 자료형이 정해져 있어야 함</p>
</li>
<li><p>산술 연산의 경우 피연산자의 자료형에 따라 연산 결과값의 자료형이 결정됨</p>
<ul>
<li>정수형과 정수형 → 정수형</li>
<li>부동소수형과 부동소수형 → 부동소수형</li>
<li>정수형과 부동소수형 → 부동소수형</li>
</ul>
</li>
<li><p>앞의 규칙은 연산자 별로 적용</p>
</li>
<li><p>앞의 규칙은 변수에도 동일하게 적용</p>
</li>
</ul>
<h2 id="2-4-피연산자가-모두-정수형인데-부동소수-연산을-하고-싶으면">2-4. 피연산자가 모두 정수형인데, 부동소수 연산을 하고 싶으면?</h2>
<ul>
<li>명시적 형변환 이용<ul>
<li>형 변환이 적용되는 범위에 주의<pre><code class="language-c">int a = 5, b = 2;
double x;
x = (double) a / b;
x = (double) (a / b);</code></pre>
</li>
</ul>
</li>
</ul>
<h1 id="3-대입-연산자">3. 대입 연산자</h1>
<h2 id="3-1-대입-연산자-">3-1. 대입 연산자 =</h2>
<ul>
<li>연산자 오른쪽 수식의 값을 왼쪽 변수에 대입(수학의 등호와 완전히 다른 의미)<blockquote>
<h2 id="변수--수식">변수 = 수식</h2>
</blockquote>
</li>
</ul>
<h2 id="3-2-연속-대입">3-2. 연속 대입</h2>
<ul>
<li>대입 연산의 결과는 왼쪽 변수에 저장되는 값</li>
<li>이를 이용하면 대입을 연속적으로 수행할 수 있음
<code>a = b = c = 2;</code> 이 문장의 의미는
<code>c = 2;</code>
<code>b = c;</code>
<code>a = b;</code></li>
</ul>
<h2 id="3-3-복합-대입-연산자">3-3. 복합 대입 연산자</h2>
<h3 id="-대입-연산자와-산술-연산자의-결합">: 대입 연산자와 산술 연산자의 결합</h3>
<table>
<thead>
<tr>
<th align="center">복합 대입 연산</th>
<th align="center">동일 대입문</th>
</tr>
</thead>
<tbody><tr>
<td align="center">a += x</td>
<td align="center">a = a + (x)</td>
</tr>
<tr>
<td align="center">a -= x</td>
<td align="center">a = a - (x)</td>
</tr>
<tr>
<td align="center">a *= x</td>
<td align="center">a = a * (x)</td>
</tr>
<tr>
<td align="center">a /= x</td>
<td align="center">a = a / (x)</td>
</tr>
<tr>
<td align="center">a %= x</td>
<td align="center">a = a % (x)</td>
</tr>
</tbody></table>
<h2 id="3-4-증감-연산자">3-4. 증감 연산자</h2>
<ul>
<li>변수의 값을 1씩 증가(++) 혹은 감소(--) 시키는 단항 연산자</li>
</ul>
<table>
<thead>
<tr>
<th align="center">증감 연산</th>
<th align="center">의미</th>
</tr>
</thead>
<tbody><tr>
<td align="center">++a</td>
<td align="center">a의 값 1 증가 -&gt; a의 값 사용</td>
</tr>
<tr>
<td align="center">--a</td>
<td align="center">a의 값 1 감소 -&gt; a의 값 사용</td>
</tr>
<tr>
<td align="center">a++</td>
<td align="center">a의 값 사용 -&gt; a의 값 1 증가</td>
</tr>
<tr>
<td align="center">a--</td>
<td align="center">a의 값 사용 -&gt; a의 값 1 감소</td>
</tr>
</tbody></table>
<h1 id="4-관계-연산자">4. 관계 연산자</h1>
<h2 id="4-1-관계-연산자">4-1. 관계 연산자</h2>
<ul>
<li>왼쪽과 오른쪽의 대소 관계를 비교하는 연산자</li>
<li>연산의 결과가 참이면 1이고 거짓이면 0<ul>
<li>C언어에서는 0이 아닌 값은 모두 참으로 간주</li>
</ul>
</li>
</ul>
<table>
<thead>
<tr>
<th align="center">관계 연산</th>
<th align="center">의미</th>
</tr>
</thead>
<tbody><tr>
<td align="center">x == y</td>
<td align="center">x의 값과 y의 값이 같다</td>
</tr>
<tr>
<td align="center">x != y</td>
<td align="center">x와 y가 같지 않다</td>
</tr>
<tr>
<td align="center">x &lt; y</td>
<td align="center">x가 y 보다 작다</td>
</tr>
<tr>
<td align="center">x &lt;= y</td>
<td align="center">x가 y 보다 작거나 같다</td>
</tr>
<tr>
<td align="center">x &gt; y</td>
<td align="center">x가 y 보다 크다</td>
</tr>
<tr>
<td align="center">x &gt;= y</td>
<td align="center">x가 y 보다 크거나 같다</td>
</tr>
</tbody></table>
<h2 id="4-2-관계-연산자와-산술-연산자의-우선순위">4-2. 관계 연산자와 산술 연산자의 우선순위</h2>
<ul>
<li>관계 연산자 &lt; 산술 연산자</li>
</ul>
<h2 id="4-3-주의-수식-4--5--2-의-결과는">4-3. 주의) 수식 4 &lt; 5 &lt; 2 의 결과는?</h2>
<ul>
<li>수학적 의미
  : 5는 4보다 크고 2보다 작다 (거짓)</li>
<li>C언어에서의 의미
  : 4 &lt; 5 &lt; 2 → (4 &lt; 5) &lt; 2 → 1 &lt; 2 → 수식 결과 : 참(1)</li>
</ul>
<h1 id="5-논리-연산자">5. 논리 연산자</h1>
<h2 id="5-1-논리-연산자">5-1. 논리 연산자</h2>
<ul>
<li>논리 연산 값으로 참이면 1, 거짓이면 0</li>
</ul>
<table>
<thead>
<tr>
<th align="center">논리 연산</th>
<th align="center">의미</th>
<th align="center">연산 결과</th>
</tr>
</thead>
<tbody><tr>
<td align="center">!x</td>
<td align="center">논리부정(NOT)</td>
<td align="center">x가 참이면 거짓, 거짓이면 참</td>
</tr>
<tr>
<td align="center">x &amp;&amp; y</td>
<td align="center">논리곱(AND)</td>
<td align="center">x, y가 둘 다 참이면 참, 그렇지 않으면 거짓</td>
</tr>
<tr>
<td align="center">x ││ y</td>
<td align="center">논리합(OR)</td>
<td align="center">x, y 중 하나라도 참이면 참, 그렇지 않으면 거짓</td>
</tr>
</tbody></table>
<h2 id="5-2-논리-연산자의-연산-순서">5-2. 논리 연산자의 연산 순서</h2>
<ul>
<li>우선순위 : <code>!</code> &gt; <code>&amp;&amp;</code> &gt; <code>||</code></li>
<li>우선순위가 같은 경우 왼쪽부터 계산</li>
<li>우선순위를 무시하려면 괄호 사용</li>
</ul>
<h2 id="5-3-논리-연산자와-관계산술-연산자의-우선순위">5-3. 논리 연산자와 관계/산술 연산자의 우선순위</h2>
<ul>
<li><code>!</code> &gt; 관계/산술 연산자 &gt; <code>&amp;&amp;</code> &lt; <code>||</code></li>
</ul>
<h1 id="6-그-외-연산자">6. 그 외 연산자</h1>
<h2 id="6-1-조건-연산자">6-1. 조건 연산자</h2>
<ul>
<li>if ~ else 문을 대신하여 사용할 수 있는 연산자</li>
<li>피연산자 수가 3개인 삼항 연산자<blockquote>
<h3 id="조건--a--b">조건 ? A : B</h3>
<ul>
<li>조건이 true인 경우, 결과 값은 A</li>
<li>조건이 false인 경우, 결과 값은 B</li>
</ul>
</blockquote>
</li>
</ul>
<h2 id="6-2-콤마-연산자">6-2. 콤마 연산자</h2>
<ul>
<li>여러 수식을 하나의 문장으로 표현할 때 사용<pre><code class="language-c">a = b + 3, b = 2, b += a;</code></pre>
</li>
</ul>
<h2 id="6-3-sizeof-연산자">6-3. sizeof 연산자</h2>
<ul>
<li>저장 공간의 크기를 바이트 단위로 계산
<code>sizeof(char)</code>의 결과 값 1 (괄호 필수)
<code>sizeof(3.14)</code> 또는 <code>sizeof 3.14</code>의 결과 값 8
<code>sizeof(num)</code> 또는 <code>sizeof num</code>의 결과 값 4 (num이 int 형 변수일 때)</li>
<li>시스템에 따라 결과 값은 다를 수 있음</li>
</ul>
<h2 id="6-4-형변환-연산자--명시적-형변환을-위해-사용">6-4. 형변환 연산자 : 명시적 형변환을 위해 사용</h2>
<ul>
<li><code>x = (double) a/b;</code> → a의 자료형을 부동 소수로 변환</li>
<li><code>x = (double) (a/b);</code> → a/b의 결과 값을 부동 소수로 변환</li>
</ul>
<h1 id="7-연산자-우선순위와-결합수칙">7. 연산자 우선순위와 결합수칙</h1>
<h2 id="7-1-연산자-우선순위">7-1. 연산자 우선순위</h2>
<ul>
<li>여러 연산자가 함께 사용된 경우 우선순위에 의존</li>
<li>다른 순서로 연산을 하고 싶은 경우 괄호를 이용</li>
</ul>
<h2 id="7-2-결합수칙">7-2. 결합수칙</h2>
<ul>
<li>연산의 순서를 나타냄</li>
<li>연산자 우선순위가 같은 경우 결합수칙에 의존</li>
</ul>
<table>
<thead>
<tr>
<th align="center">순위</th>
<th align="center">연산자</th>
<th align="center">종류</th>
<th align="center">결합수칙</th>
</tr>
</thead>
<tbody><tr>
<td align="center">1</td>
<td align="center">() [] . -&gt;</td>
<td align="center">멤버</td>
<td align="center">왼쪽 우선</td>
</tr>
<tr>
<td align="center">2</td>
<td align="center">+ - ++ -- ! ~ * &amp; sizeof (자료형)</td>
<td align="center">단항</td>
<td align="center">오른쪽 우선</td>
</tr>
<tr>
<td align="center">3</td>
<td align="center">* % /</td>
<td align="center">산술</td>
<td align="center">왼쪽 우선</td>
</tr>
<tr>
<td align="center">4</td>
<td align="center">+ -</td>
<td align="center">산술</td>
<td align="center">왼쪽 우선</td>
</tr>
<tr>
<td align="center">5</td>
<td align="center">&lt;&lt; &gt;&gt;</td>
<td align="center">비트(이동)</td>
<td align="center">왼쪽 우선</td>
</tr>
<tr>
<td align="center">6</td>
<td align="center">&lt; &gt; &lt;= &gt;=</td>
<td align="center">관계</td>
<td align="center">왼쪽 우선</td>
</tr>
<tr>
<td align="center">7</td>
<td align="center">== !=</td>
<td align="center">관계</td>
<td align="center">왼쪽 우선</td>
</tr>
<tr>
<td align="center">8</td>
<td align="center">&amp;</td>
<td align="center">비트(논리)</td>
<td align="center">왼쪽 우선</td>
</tr>
<tr>
<td align="center">9</td>
<td align="center">^</td>
<td align="center">비트(논리)</td>
<td align="center">왼쪽 우선</td>
</tr>
<tr>
<td align="center">10</td>
<td align="center">｜</td>
<td align="center">비트(논리)</td>
<td align="center">왼쪽 우선</td>
</tr>
<tr>
<td align="center">11</td>
<td align="center">&amp;&amp;</td>
<td align="center">논리</td>
<td align="center">왼쪽 우선</td>
</tr>
<tr>
<td align="center">12</td>
<td align="center">｜｜</td>
<td align="center">논리</td>
<td align="center">왼쪽 우선</td>
</tr>
<tr>
<td align="center">13</td>
<td align="center">?:</td>
<td align="center">조건</td>
<td align="center">오른쪽 우선</td>
</tr>
<tr>
<td align="center">14</td>
<td align="center">= += -= *= %= /= ^= &lt;&lt;= &gt;&gt;=</td>
<td align="center">대입</td>
<td align="center">오른쪽 우선</td>
</tr>
<tr>
<td align="center">15</td>
<td align="center">,</td>
<td align="center">콤마</td>
<td align="center">왼쪽 우선</td>
</tr>
</tbody></table>
]]></description>
        </item>
        <item>
            <title><![CDATA[C프로그래밍 3장]]></title>
            <link>https://velog.io/@eunjo_ourism/C%ED%94%84%EB%A1%9C%EA%B7%B8%EB%9E%98%EB%B0%8D-3%EC%9E%A5</link>
            <guid>https://velog.io/@eunjo_ourism/C%ED%94%84%EB%A1%9C%EA%B7%B8%EB%9E%98%EB%B0%8D-3%EC%9E%A5</guid>
            <pubDate>Mon, 19 Sep 2022 11:57:23 GMT</pubDate>
            <description><![CDATA[<h1 id="1-printf를-이용한-출력">1. printf()를 이용한 출력</h1>
<h2 id="1-1-기본-사용법">1-1. 기본 사용법</h2>
<ul>
<li>출력할 내용 : <code>printf(&quot;출력하고 싶은 내용&quot;);</code></li>
<li>서식 지정자를 이용한 값 출력 : <code>printf(&quot;%d + %d&quot;, 10, num);</code></li>
</ul>
<h2 id="1-2-서식-지정자와-출력할-값-개수-불일치">1-2. 서식 지정자와 출력할 값 개수 불일치</h2>
<ul>
<li>서식 지정자가 더 많은 경우 : 남은 서식 지정자는 쓰레기 값</li>
<li>출력할 값이 더 많은 경우 : 남는 값 사용되지 않음</li>
</ul>
<h2 id="1-3-서식-지정자-종류">1-3. 서식 지정자 종류</h2>
<table>
<thead>
<tr>
<th align="center">분류</th>
<th align="center">서식 지정자</th>
<th align="center">대상 자료형</th>
<th align="center">출력 형태</th>
</tr>
</thead>
<tbody><tr>
<td align="center">정수형</td>
<td align="center">%d</td>
<td align="center">int</td>
<td align="center">10진수</td>
</tr>
<tr>
<td align="center"></td>
<td align="center">%u</td>
<td align="center">unsigned int</td>
<td align="center">10진수</td>
</tr>
<tr>
<td align="center"></td>
<td align="center">%o</td>
<td align="center"></td>
<td align="center">8진수</td>
</tr>
<tr>
<td align="center"></td>
<td align="center">%x, %X</td>
<td align="center"></td>
<td align="center">16진수</td>
</tr>
<tr>
<td align="center">부동소수형</td>
<td align="center">%f</td>
<td align="center">float</td>
<td align="center">고정 소수점 표기</td>
</tr>
<tr>
<td align="center"></td>
<td align="center">%lf</td>
<td align="center">double</td>
<td align="center"></td>
</tr>
<tr>
<td align="center">문자형</td>
<td align="center">%c</td>
<td align="center">char</td>
<td align="center">문자 하나</td>
</tr>
<tr>
<td align="center"></td>
<td align="center">%s</td>
<td align="center"></td>
<td align="center">문자열</td>
</tr>
</tbody></table>
<h2 id="1-4-서식-지정자-확장">1-4. 서식 지정자 확장</h2>
<h4 id="1-출력-폭-지정">1) 출력 폭 지정</h4>
<pre><code class="language-c">printf(&quot;%5d\n&quot;, 25);
printf(&quot;%9f\n&quot;, 2.5);</code></pre>
<pre><code>▼실행결과▼
□□□25
□2.500000</code></pre><h4 id="2-정밀도-지정부동소수">2) 정밀도 지정(부동소수)</h4>
<pre><code class="language-c">printf(&quot;%.3f\n&quot;, 2.5);
printf(&quot;%.1f\n&quot;, 2.56);
printf(&quot;%6.2f\n&quot;, 2.5);</code></pre>
<pre><code>▼실행결과▼
2.500
2.6
□□2.50</code></pre><h4 id="4-플래그">4) 플래그</h4>
<ul>
<li>플래그 : 정렬방식, 부호 출력 방식, 진법 표시 방식 등을 조정하기 위해 사용</li>
<li>0 플래그 <pre><code class="language-c">printf(&quot;%05d\n&quot;, 25);</code></pre>
<pre><code>▼실행결과▼
00025</code></pre></li>
</ul>
<h1 id="2-scanf를-이용한-입력">2. scanf()를 이용한 입력</h1>
<h2 id="2-1-기본-사용법">2-1. 기본 사용법</h2>
<ul>
<li>서식 지정자를 쓰고, 뒤에 값을 저장할 변수 이름 명시</li>
<li>반드시 <code>&amp;</code> 기호 붙이기 (특별한 언급이 없으면)</li>
<li>자료형에 따라 사용되는 서식 지정자가 다름</li>
</ul>
<h2 id="2-2-여러-값-입력-받기">2-2. 여러 값 입력 받기</h2>
<ul>
<li>예) 정수와 부동소수 입력 받기 : 값 구분 위해 보통 공백 사용<pre><code class="language-c">int a;
double b;
</code></pre>
</li>
</ul>
<p>scanf(&quot;%d%lf&quot;, &amp;a, &amp;b);
printf(&quot;입력 값: %d %f\n&quot;, a, b);</p>
<pre><code></code></pre><p>▼키보드로 입력▼
5 3.1[Enter]</p>
<p>▼실행결과▼
입력 값: 5 3.100000</p>
<pre><code>## 2-3. 여러 문자 입력 시 주의할 점
- 공백도 하나의 문자로 간주되어 입력 값으로 처리되므로 공백 없이 입력
```c
char c1, c2;

scanf(&quot;%c%c&quot;, c1, c2);
printf(&quot;문자 출력: [%c][%c]\n&quot;, c1, c2);</code></pre><pre><code>▼키보드로 입력▼
AB[Enter]

▼실행결과▼
문자 출력: [A][B]</code></pre><ul>
<li>탭, 개행 문자도 동일하게 문자 입력으로 처리<pre><code class="language-c">char c1, c2;
</code></pre>
</li>
</ul>
<p>printf(&quot;c1 입력: &quot;);
scanf(&quot;%c&quot;, &amp;c1 ); ⇨ 첫 번째 문자 입력</p>
<p>printf(&quot;c2 입력: &quot;);
scanf(&quot;%c&quot;, &amp;c2 ); ⇨ 두 번째 문자 입력</p>
<p>printf(&quot;문자 출력: [%c][%c]\n&quot;, c1, c2 );</p>
<pre><code></code></pre><p>▼실행결과▼
c1 입력: A[Enter]                // [Enter]키 \n 이 c2에 저장돼서
C2 입력: 문자 출력: [A][            // 출력 됨
]</p>
<pre><code>- 원하는 형태로 입력받기 위한 해결책(트릭)
⇨ [Entet] 키로 입력되는 개행 문자를 임시 변수에 저장해 없애기
```c
char c1, c2, tmp;

printf(&quot;c1 입력: &quot;);
scanf(&quot;%c%c&quot;, &amp;c1, &amp;tmp);
printf(&quot;c2 입력: &quot;);
scanf(&quot;%c%c&quot;, &amp;c2, &amp;tmp);

printf(&quot;문자 출력: [%c][%c]\n&quot;, c1, c2);</code></pre><pre><code>▼실행결과▼
c1 입력: A[Enter]                // 개행 문자는 tmp에 저장
C2 입력: B[Enter]
문자 출력: [A][B]</code></pre><h2 id="2-4-문자와-정수또는-부동소수가-혼합되어-입력받는-경우">2-4. 문자와 정수(또는 부동소수)가 혼합되어 입력받는 경우</h2>
<ul>
<li>정수 입력에서는 공백, 탭, 개행 문자 무시됨</li>
<li>문자 입력에서는 공백, 탭, 개행 문자가 하나의 문자로 처리됨</li>
</ul>
<h2 id="2-5-입력-구분자-지정하기">2-5. 입력 구분자 지정하기</h2>
<ul>
<li>입력 구분자로 하이픈(-)을 사용한 예<pre><code class="language-c">int a=0, b=0, c=0;
</code></pre>
</li>
</ul>
<p>printf(&quot;정수 입력: &quot;);</p>
<p>scanf(&quot;%d-%d-%d&quot;, &amp;a, &amp;b, &amp;c);
printf(&quot;%d %d %d\n&quot;, a, b, c);</p>
<pre><code></code></pre><p>▼실행결과(입력 형식을 맞춘 예)▼
정수 입력: 20-10-30[Enter]
20 10 30</p>
<pre><code></code></pre><p>▼실행결과(입력 형식을 맞추지 않은 예)▼
정수 입력: 20 10 30[Enter]
20 0 0
```</p>
]]></description>
        </item>
        <item>
            <title><![CDATA[C프로그래밍 2장]]></title>
            <link>https://velog.io/@eunjo_ourism/C%ED%94%84%EB%A1%9C%EA%B7%B8%EB%9E%98%EB%B0%8D-2%EC%A3%BC%EC%B0%A8</link>
            <guid>https://velog.io/@eunjo_ourism/C%ED%94%84%EB%A1%9C%EA%B7%B8%EB%9E%98%EB%B0%8D-2%EC%A3%BC%EC%B0%A8</guid>
            <pubDate>Mon, 19 Sep 2022 10:56:42 GMT</pubDate>
            <description><![CDATA[<h1 id="1-변수와-자료형">1. 변수와 자료형</h1>
<h2 id="1-1-변수-자료형-상수">1-1. 변수, 자료형, 상수</h2>
<ul>
<li>변수 : 값을 담을 그릇<ul>
<li>값을 저장하기 위한 기억 장소</li>
<li>사용하기 전에 반드시 선언 : <code>int c;</code></li>
</ul>
</li>
<li>자료형 : 그릇의 모양<ul>
<li>자료 값의 형태</li>
</ul>
</li>
<li>상수 : 변하지 않는 수로 변수와 대비되는 개념<ul>
<li>10, 20, 30 과 같은 특정 값<h1 id="2-변수-선언과-사용">2. 변수 선언과 사용</h1>
<h2 id="2-1-변수-선언">2-1. 변수 선언</h2>
<pre><code class="language-c">int c;</code></pre>
</li>
</ul>
</li>
<li>자료형 <code>int</code>, <code>char</code>, <code>float</code>, <code>double</code> 등을 앞에 명시한 후 사용할 변수 이름을 적음</li>
<li>변수 선언도 하나의 문장이므로 세미콜론을 붙여야 함<pre><code class="language-c">int num;
char ch;
float x;
double y;
</code></pre>
</li>
</ul>
<p>int num1, num2;        // 같은 자료형에 두 개 이상의 변수 한 문장에 선언 가능</p>
<pre><code>## 2-2) 변수 값 저장
- 선언된 변수에 값을 저장하기 위해서는 대입연산자 `=` 사용
- 왼쪽 변수에 오른쪽의 값을 대입(저장)하라는 의미
- 변수에 새로운 값을 대입하면 이전 값은 사라짐
```c
int num;        // 변수 num 선언

num = 10 + 20;    // 변수 num에 값 30 대입(저장)</code></pre><h2 id="2-3-변수-값-참조">2-3) 변수 값 참조</h2>
<pre><code class="language-c">int num;
num = 10;

printf(&quot;%d&quot;, num);    // 변수 num에 저장된 값 10 출력</code></pre>
<h2 id="2-4-변수의-위치에-따른-의미">2-4) 변수의 위치에 따른 의미</h2>
<p><code>a = b;</code> : 변수 a에 변수 b의 값 대입</p>
<ul>
<li>대입 연산자 왼쪽 : 저장 공간 자체</li>
<li>대입 연산자 오른쪽 : 저장된 값<h2 id="2-5-변수-초기화">2-5) 변수 초기화</h2>
</li>
<li>변수를 선언만 하고 값을 대입하지 않으면 쓰레기 값이 저장되어 있음</li>
<li>선언과 동시에 변수 값 지정 (변수 초기화) : <code>int num = 123;</code><h2 id="2-6-키워드와-식별자">2-6) 키워드와 식별자</h2>
</li>
</ul>
<ol>
<li>키워드<ul>
<li>C언어에서 특별한 의미를 가지도록 미리 정해놓은 단어</li>
<li><code>char</code>, <code>int</code>, <code>double</code> 등</li>
</ul>
</li>
<li>식별자<ul>
<li>변수처럼 프로그래머가 지어서 사용하는 이름</li>
<li>식별자로 사용할 수 없는 이름의 예<ul>
<li>밑줄이 아닌 특수 문자 X</li>
<li>첫 문자에 숫자 X</li>
<li>키워드 X<h1 id="3-정수-자료형">3. 정수 자료형</h1>
<h2 id="3-1-정수-자료형">3-1. 정수 자료형</h2>
</li>
</ul>
</li>
</ul>
</li>
</ol>
<ul>
<li>자료형 키워드 : <code>int</code>, <code>short</code>, <code>long</code>, <code>long long</code></li>
<li>정수형 출력 : <code>printf</code>의 서식 지정자 <code>%d</code>사용</li>
<li>정수형의 크기 : <code>short</code> &lt;= <code>int</code> &lt;= <code>long</code> &lt;= <code>long long</code><h2 id="3-2-signed와-unsigned">3-2. signed와 unsigned</h2>
</li>
</ul>
<ol>
<li><code>signed</code> : 음수와 양수 모두 표현</li>
<li><code>unsigned</code> : 0과 양수만 표현<ul>
<li><code>printf</code>의 서식 지정자 <code>%u</code> 사용</li>
</ul>
</li>
</ol>
<ul>
<li>int, short 등의 앞에 부호 여부 명시해주면 됨</li>
<li>명시하지 않으면 기본적으로 signed<h1 id="4-부동소수-자료형">4. 부동소수 자료형</h1>
</li>
<li>자료형 키워드 : <code>float</code>, <code>double</code>, <code>long double</code></li>
<li>부동소수형 출력 : <code>printf</code>의 서식 지정자 <code>%f</code>사용</li>
<li>부동소수형의 크기 : <code>float</code> &lt;= <code>double</code> &lt;= <code>long double</code><h1 id="5-문자-자료형">5. 문자 자료형</h1>
<h2 id="5-1-문자-자료형">5-1. 문자 자료형</h2>
</li>
<li>자료형 키워드 : <code>char&#39;, &#39;signed char&#39;, &#39;unsigned char</code></li>
<li>문자형 출력 : <code>printf</code>의 서식 지정자 <code>%c</code>사용</li>
<li>문자형의 크기는 모두 1바이트<h2 id="5-2-문자형의-실체">5-2. 문자형의 실체</h2>
</li>
<li>특정 문자에 해당하는 정수값을 지정 : 아스키(ASCII) 코드</li>
<li>문자형은 본질적으로 정수형과 동일<pre><code class="language-c">char c1 = &#39;A&#39;;        // 문자 &#39;A&#39;로 초기화
char c2 = 65;        // 정수 65로 초기화
</code></pre>
</li>
</ul>
<p>printf(&quot;c1: %c %d\n&quot;, c1, c1);
printf(&quot;c2: %c %d\n&quot;, c2, c2);</p>
<pre><code></code></pre><p>▼ 실행 결과 ▼</p>
<p>c1: A 65
c2: A 65</p>
<pre><code>- 정수 연산 가능
```c
char ch = &#39;A&#39; + 1;     // 65 + 1 = 66 =&gt; 문자 &#39;B&#39; 저장</code></pre><ul>
<li>부호 없는 자료형 가능<h2 id="5-3-특수-문자이스케이프-시퀀스">5-3. 특수 문자(이스케이프 시퀀스)</h2>
</li>
<li><code>\n</code> : 새로운 줄로 이동</li>
<li><code>\t</code> : 다음 탭으로 이동</li>
<li><code>\b</code> : 앞으로 한 칸 이동</li>
<li><code>\r</code> : 줄의 맨 앞으로 이동</li>
<li><code>\a</code> : &#39;삑&#39; 소리를 냄</li>
<li><code>\\</code> : 역슬래쉬 \</li>
<li><code>\&#39;</code> : 작은 따옴표 &#39;</li>
<li><code>\&quot;</code> : 큰 따옴표 &quot;<h1 id="6-자료형-변환">6. 자료형 변환</h1>
<h2 id="6-1-자동-형변환">6-1. 자동 형변환</h2>
</li>
<li>자동 형변환(묵시적 형변환) : 정수 &lt;-&gt; 부동소수 형 변환을 자동으로 수행</li>
<li><code>int a = 123.45;</code><pre><code>a &lt;= 123(정수) &lt;= 123.45(부동소수)
          형 변환</code></pre></li>
<li><code>double b = 123;</code><pre><code>b &lt;= 123.0(부동소수) &lt;= 123(정수)
               형 변환</code></pre><h2 id="6-2-명시적-형변환">6-2. 명시적 형변환</h2>
</li>
<li>printf의 서식 지정자에 따라 형변환이 자동으로 발생하지 않아 <strong>명시적 형변환</strong> 필요<pre><code class="language-c">printf(&quot;12.3: %d\n&quot;, (int) 12.3);
printf(&quot;123: %f\n&quot;, (double) 123);</code></pre>
```
▼ 실행결과 ▼</li>
</ul>
<p>12.3: 12
123: 123.000000</p>
<pre><code></code></pre>]]></description>
        </item>
        <item>
            <title><![CDATA[C프로그래밍 1장]]></title>
            <link>https://velog.io/@eunjo_ourism/C%ED%94%84-1%EC%A3%BC%EC%B0%A8-%EC%A0%95%EB%A6%AC</link>
            <guid>https://velog.io/@eunjo_ourism/C%ED%94%84-1%EC%A3%BC%EC%B0%A8-%EC%A0%95%EB%A6%AC</guid>
            <pubDate>Thu, 15 Sep 2022 06:34:38 GMT</pubDate>
            <description><![CDATA[<h1 id="1-프로그램-기초">1. 프로그램 기초</h1>
<h2 id="1-1-프로그램-기초-코드-형태">1-1. 프로그램 기초 코드 형태</h2>
<pre><code class="language-c">#pragma warning(disable : 4996) 
#include &lt;stdio.h&gt;

int main()            
{
    return 0;        
}                    </code></pre>
<ol>
<li><code>#pragma warning(disable : 4996)</code> <ul>
<li>scanf 함수에 대한(?) 컴파일 경고 표시하지 않기</li>
</ul>
</li>
<li><code>#include &lt;stdio.h&gt;</code><ul>
<li>&#39;stdio.h 를 포함한다.&#39; = 내가 작성하고 있는 이 코드에 stdio.h를 포함한다.</li>
<li>stdio.h : standard input output, h: 파일의 확장자.</li>
<li>=&gt; 표준입출력에 관련된 내용을 담고 있는 확장자가 h인 파일의 이름</li>
<li>stdio.h 파일 안에 수많은 함수가 정의되어 있음.</li>
</ul>
</li>
<li><code>int main(){}</code><ul>
<li>main() 함수가 종료할 때 정수형 값을 리턴하겠다.</li>
</ul>
</li>
<li><code>main()</code> : 프로그램의 시작 지점을 나타내는 함수</li>
<li><code>return 0;</code><ul>
<li>&#39;종료 상태&#39;라는 의미를 갖고 있는 값을 반환.</li>
<li>stdio.h에는 성공적으로 종료시 0을, 성공적이지 못하면 1을 반환하게끔 정의되어 있음</li>
</ul>
</li>
<li>모든 C 프로그램에서 main 함수는 반드시 하나 존재해야 하고, C 언어의 문장은 세미콜론 &#39;;&#39;으로 끝난다.<h2 id="1-2-주석">1-2. 주석</h2>
</li>
</ol>
<ul>
<li><code>/* ... */</code> : <code>/*</code>과 <code>*/</code> 사이의 내용을 모두 주석으로 처리</li>
<li><code>//</code> : <code>//</code> 뒤 해당 라인 끝까지의 내용을 주석으로 처리<h2 id="1-3-오류의-종류와-디버깅">1-3. 오류의 종류와 디버깅</h2>
</li>
<li>버그(bug) : 프로그램에 존재하는 오류</li>
<li>디버깅(debugging) : 오류를 고치는 행위
  → 보통 &#39;디버깅&#39;이라 함은 런타임 오류를 해결하는 것을 지칭</li>
<li>컴파일 오류 : 문법적 오류. 컴파일러가 문법을 검사하여 오류가 있으면 알려줌</li>
<li>컴파일 경고 : 오류는 아니지만, 오류의 가능성이 있는 부분</li>
<li>런타임 오류(runtime error) 또는 실행 오류 : 프로그램의 결과가 의도와 다르거나 비정상적으로 종료되는 경우<h1 id="2-출력-printf">2. 출력: printf()</h1>
<pre><code class="language-c">#include &lt;stdio.h&gt;
int main()
{
  printf(&quot;Hello.&quot;);    // &quot;Hello.&quot; 출력
}</code></pre>
</li>
<li><code>printf(&quot;&quot;)</code> : <strong>큰 따옴표</strong>의 시작과 끝 사이에 있는 내용 출력</li>
</ul>
<h1 id="3-입력-scanf">3. 입력: scanf()</h1>
<pre><code class="language-c">#include &lt;stdio.h&gt;
int main()
{
    scanf(&quot;%d&quot;, &amp;a);
}</code></pre>
<ul>
<li><code>scanf(&quot;%d&quot;, &amp;a);</code> : 키보드로 입력된 정수 값을 변수 a에 저장</li>
<li><code>%d</code> : 입력되는 값을 정수로 해석하라는 의미의 서식지정자</li>
<li><code>&amp;a</code> : 입력된 값을 저장할 변수</li>
</ul>
]]></description>
        </item>
        <item>
            <title><![CDATA[[웹개발] 2주차 진행사항]]></title>
            <link>https://velog.io/@eunjo_ourism/7%EC%A3%BC%EC%B0%A8-%EC%A7%84%ED%96%89%EC%82%AC%ED%95%AD</link>
            <guid>https://velog.io/@eunjo_ourism/7%EC%A3%BC%EC%B0%A8-%EC%A7%84%ED%96%89%EC%82%AC%ED%95%AD</guid>
            <pubDate>Thu, 17 Mar 2022 12:25:20 GMT</pubDate>
            <description><![CDATA[<h1 id="apppy">app.py</h1>
<pre><code>from flask import Flask, render_template, request, jsonify
app = Flask(__name__)

from pymongo import MongoClient
client = MongoClient(&#39;mongodb+srv://test:sparta@cluster0.jmelm.mongodb.net/Cluster0?retryWrites=true&amp;w=majority&#39;)
db = client.dbsparta

# 홈
@app.route(&#39;/&#39;)
def home():
   return render_template(&#39;index.html&#39;)

# 마이페이지
@app.route(&#39;/mypage&#39;)
def mypage():
   return render_template(&#39;mypage.html&#39;)

# 기록하기
@app.route(&#39;/record&#39;)
def record():
    return render_template(&#39;record.html&#39;)

# 수정하기
@app.route(&#39;/modify&#39;)
def modify():
    return render_template(&#39;modify.html&#39;)

# 기록 페이지에서 기록한 거 POST
@app.route(&quot;/record&quot;, methods=[&quot;POST&quot;])
def record_post():
    Id_receive = request.form[&#39;Id_give&#39;]
    Name_receive = request.form[&#39;Name_give&#39;]
    Introduce_receive = request.form[&#39;Introduce_give&#39;]
    Goal_receive = request.form[&#39;Goal_give&#39;]
    Favorite_thing_receive = request.form[&#39;Favorite_thing_give&#39;]
    Good_thing_receive = request.form[&#39;Good_thing_give&#39;]
    First_values_receive = request.form[&#39;First_values_give&#39;]
    World_needs_receive = request.form[&#39;World_needs_give&#39;]

    doc = {
        &#39;Id&#39;: Id_receive,
        &#39;Name&#39;: Name_receive,
        &#39;Introduce&#39;: Introduce_receive,
        &#39;Goal&#39;: Goal_receive,
        &#39;Favorite_thing&#39;: Favorite_thing_receive,
        &#39;Good_thing&#39;: Good_thing_receive,
        &#39;First_values&#39;: First_values_receive,
        &#39;World_needs&#39;: World_needs_receive,
    }
    db.record.insert_one(doc)

    return jsonify({&#39;msg&#39;: &#39;기록 완료!&#39;})

# 수정 페이지에서 수정한 거 POST
@app.route(&quot;/modify&quot;, methods=[&quot;POST&quot;])
def modify_post():
    Id_receive = request.form[&#39;Id_give&#39;]
    Name_receive = request.form[&#39;Name_give&#39;]
    Introduce_receive = request.form[&#39;Introduce_give&#39;]
    Goal_receive = request.form[&#39;Goal_give&#39;]
    Favorite_thing_receive = request.form[&#39;Favorite_thing_give&#39;]
    Good_thing_receive = request.form[&#39;Good_thing_give&#39;]
    First_values_receive = request.form[&#39;First_values_give&#39;]
    World_needs_receive = request.form[&#39;World_needs_give&#39;]

    db.record.update_one({&#39;Id&#39;: Id_receive}, {&#39;$set&#39;: {&#39;Name&#39;: Name_receive}})
    db.record.update_one({&#39;Id&#39;: Id_receive}, {&#39;$set&#39;: {&#39;Introduce&#39;: Introduce_receive}})
    db.record.update_one({&#39;Id&#39;: Id_receive}, {&#39;$set&#39;: {&#39;Goal&#39;: Goal_receive}})
    db.record.update_one({&#39;Id&#39;: Id_receive}, {&#39;$set&#39;: {&#39;Favorite_thing&#39;: Favorite_thing_receive}})
    db.record.update_one({&#39;Id&#39;: Id_receive}, {&#39;$set&#39;: {&#39;Good_thing&#39;: Good_thing_receive}})
    db.record.update_one({&#39;Id&#39;: Id_receive}, {&#39;$set&#39;: {&#39;First_values&#39;: First_values_receive}})
    db.record.update_one({&#39;Id&#39;: Id_receive}, {&#39;$set&#39;: {&#39;World_needs&#39;:World_needs_receive}})

    return jsonify({&#39;msg&#39;: &#39;수정 완료!&#39;})

# 기록된 데이터 마이페이지에 불러오기
@app.route(&quot;/mypages&quot;, methods=[&quot;GET&quot;])
def record_get():
    record_list = list(db.record.find({}, {&#39;_id&#39;: False}))
    return jsonify({&#39;records&#39;: record_list})

# 아이디 중복 확인
@app.route(&quot;/logins&quot;, methods=[&quot;GET&quot;])
def login_get():
    id_list = list(db.record.find({}, {&#39;_id&#39;: False}))
    return jsonify({&#39;ids&#39;: id_list})

# 기록된 데이터 불러오기
@app.route(&quot;/edit&quot;, methods=[&quot;GET&quot;])
def edit_get():
    edit_list = list(db.record.find({}, {&#39;_id&#39;: False}))
    return jsonify({&#39;edit&#39;: edit_list})

if __name__ == &#39;__main__&#39;:
   app.run(&#39;0.0.0.0&#39;, port=5000, debug=True)</code></pre><h1 id="indexhtml">index.html</h1>
<pre><code>&lt;!DOCTYPE html&gt;
&lt;html lang=&quot;en&quot;&gt;
&lt;head&gt;
    &lt;meta charset=&quot;UTF-8&quot;&gt;
    &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1, shrink-to-fit=no&quot;&gt;

    &lt;link href=&quot;https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css&quot; rel=&quot;stylesheet&quot;
          integrity=&quot;sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC&quot; crossorigin=&quot;anonymous&quot;&gt;
    &lt;script src=&quot;https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js&quot;&gt;&lt;/script&gt;
    &lt;script src=&quot;https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.bundle.min.js&quot;
            integrity=&quot;sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM&quot;
            crossorigin=&quot;anonymous&quot;&gt;&lt;/script&gt;

    &lt;title&gt;홈페이지&lt;/title&gt;
    &lt;script&gt;
        $(document).ready(function () {
            mypages();
        });

        function mypages() {
            $.ajax({
                type: &#39;GET&#39;,
                url: &#39;/mypages&#39;,
                data: {},
                success: function (response) {
                    let rows = response[&#39;records&#39;]
                    for (let i = 0; i &lt; rows.length; i++) {
                        let Name = rows[i][&#39;Name&#39;]
                        let Introduce = rows[i][&#39;Introduce&#39;]
                        let Id = rows[i][&#39;Id&#39;]
                        let temp_html = `&lt;div class=&quot;card&quot; id=&quot;Card&quot; type=&quot;button&quot; onclick=&quot;location.href= &#39;/mypage?userid=&#39;+ &#39;${Id}&#39;&quot;&gt;
                                            &lt;p class=&quot;title&quot; id=&quot;Title&quot;&gt;${Introduce}&lt;/p&gt;
                                            &lt;p class=&quot;name&quot; id=&quot;Name&quot;&gt;${Name}&lt;/p&gt;
                                        &lt;/div&gt;`
                        $(&#39;#box&#39;).append(temp_html)
                    }
                }
            });
        }
    &lt;/script&gt;
&lt;/head&gt;
&lt;body&gt;
    &lt;p type=&quot;button&quot; onclick=&quot;location.href=&#39;/record&#39;&quot;&gt;기록하기&lt;/p&gt;
    &lt;div class=&quot;box&quot; id=&quot;box&quot;&gt;
    &lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;</code></pre><h1 id="mypagehtml">mypage.html</h1>
<pre><code>&lt;!DOCTYPE html&gt;
&lt;html lang=&quot;en&quot;&gt;
&lt;head&gt;
    &lt;meta charset=&quot;UTF-8&quot;&gt;
    &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1, shrink-to-fit=no&quot;&gt;

    &lt;link href=&quot;https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css&quot; rel=&quot;stylesheet&quot;
          integrity=&quot;sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC&quot; crossorigin=&quot;anonymous&quot;&gt;
    &lt;script src=&quot;https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js&quot;&gt;&lt;/script&gt;
    &lt;script src=&quot;https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.bundle.min.js&quot;
            integrity=&quot;sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM&quot;
            crossorigin=&quot;anonymous&quot;&gt;&lt;/script&gt;

    &lt;title&gt;마이 페이지&lt;/title&gt;

    &lt;style&gt;
        @font-face {
            font-family: &#39;ChosunGu&#39;;
            src: url(&#39;https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_20-04@1.0/ChosunGu.woff&#39;) format(&#39;woff&#39;);
            font-weight: normal;
            font-style: normal;
        }

        @font-face {
            font-family: &#39;S-CoreDream-3Light&#39;;
            src: url(&#39;https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_six@1.2/S-CoreDream-3Light.woff&#39;) format(&#39;woff&#39;);
            font-weight: normal;
            font-style: normal;
        }

        @font-face {
            font-family: &#39;GangwonEdu_OTFLightA&#39;;
            src: url(&#39;https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_2201-2@1.0/GangwonEdu_OTFLightA.woff&#39;) format(&#39;woff&#39;);
            font-weight: normal;
            font-style: normal;
        }

        @font-face {
            font-family: &#39;S-CoreDream-5Medium&#39;;
            src: url(&#39;https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_six@1.2/S-CoreDream-5Medium.woff&#39;) format(&#39;woff&#39;);
            font-weight: normal;
            font-style: normal;
        }

        .box {
            display: flex;
            flex-direction: row;
            justify-content: center;
            align-items: flex-start;

            padding: 20px;

            font-family: &#39;S-CoreDream-3Light&#39;;
        }

        .profile {
            margin: 10px 50px auto auto;

            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
        }

        th, td {
            border-bottom: 1px solid #b7b7b7;
            padding: 10px;
        }

        .personal {
            font-family: &#39;ChosunGu&#39;;
            margin: 10px auto auto 50px;
        }

        .personal &gt; h1 {
            font-family: &#39;GangwonEdu_OTFLightA&#39;;
            text-align: center; /*문단 가운데 정렬*/
        }

        .goal {
            display: flex;
            flex-direction: row;
            margin: 10px auto 10px auto;
        }

        .goal &gt; .card {
            width: 800px;
            margin: 10px auto 10px auto;
        }

        .name {
            font-family: &#39;S-CoreDream-5Medium&#39;;
            margin: 10px;
            padding: 3px;
            width: 200px;
            background-color: gray;
            color: white;
            text-align: center;
        }

        h5 {
            color: #b7b7b7;
            font-size: 15px;
        }
    &lt;/style&gt;

    &lt;script&gt;
        $(document).ready(function () {
            mypages();
        });

        // userid 값 가져오기
        let queryString = location.search;
        const urlParams = new URLSearchParams(queryString);
        let userId = urlParams.get(&quot;userid&quot;)

        function modify() {
            location.href = &quot;/modify?userid=&quot; + userId;
        }

        function mypages() {
            $.ajax({
                type: &#39;GET&#39;,
                url: &#39;/mypages&#39;,
                data: {},
                success: function (response) {
                    let rows = response[&#39;records&#39;]

                    for (let i = 0; i &lt; rows.length; i++) {
                        // 가져온 userid 값과 같으면 데이터 불러와서 붙이기
                        if (rows[i][&#39;Id&#39;] == userId) {
                            let Name = rows[i][&#39;Name&#39;]
                            let Introduce = rows[i][&#39;Introduce&#39;]
                            let Goal = rows[i][&#39;Goal&#39;]
                            let Favorite_thing = rows[i][&#39;Favorite_thing&#39;]
                            let Good_thing = rows[i][&#39;Good_thing&#39;]
                            let First_values = rows[i][&#39;First_values&#39;]
                            let World_needs = rows[i][&#39;World_needs&#39;]

                            let element_Name = document.getElementById(&quot;Name&quot;)
                            element_Name.innerText = `${Name}`
                            let element_Title = document.getElementById(&quot;Title&quot;)
                            element_Title.innerText = `${Introduce}`
                            let element_Goal = document.getElementById(&quot;Goal&quot;)
                            element_Goal.innerText = `${Goal}`
                            let element_Favorite_thing = document.getElementById(&quot;Favorite-thing&quot;)
                            element_Favorite_thing.innerText = `${Favorite_thing}`
                            let element_Good_thing = document.getElementById(&quot;Good-thing&quot;)
                            element_Good_thing.innerText = `${Good_thing}`
                            let element_First_values = document.getElementById(&quot;First-values&quot;)
                            element_First_values.innerText = `${First_values}`
                            let element_World_needs = document.getElementById(&quot;World-needs&quot;)
                            element_World_needs.innerText = `${World_needs}`
                        }
                    }
                }
            });
        }
    &lt;/script&gt;

&lt;/head&gt;
&lt;body&gt;
&lt;div class=&quot;box&quot;&gt;
    &lt;div class=&quot;profile&quot;&gt;
        &lt;p class=&quot;name&quot; id=&quot;Name&quot;&gt;이름&lt;/p&gt;

        &lt;!--기록 페이지로 이동--&gt;
        &lt;p type=&quot;button&quot; onclick=&quot;modify()&quot;&gt;수정하기&lt;/p&gt;

    &lt;/div&gt;
    &lt;div class=&quot;personal&quot;&gt;
        &lt;h1 class=&quot;title&quot; id=&quot;Title&quot;&gt;&quot;나를 표현하는 한 문장&quot;&lt;/h1&gt;
        &lt;div class=&quot;goal&quot;&gt;
            &lt;div class=&quot;card&quot;&gt;
                &lt;div class=&quot;card-body&quot;&gt;
                    &lt;h5 class=&quot;card-title&quot;&gt;목표&lt;/h5&gt;
                    &lt;p class=&quot;goal-text&quot; id=&quot;Goal&quot;&gt;내용&lt;/p&gt;
                &lt;/div&gt;
            &lt;/div&gt;
        &lt;/div&gt;
        &lt;!--Components &gt; Card &gt; Grid cards--&gt;
        &lt;div class=&quot;row row-cols-1 row-cols-md-2 g-4&quot;&gt;
            &lt;div class=&quot;col&quot;&gt;
                &lt;div class=&quot;card&quot;&gt;
                    &lt;div class=&quot;card-body&quot;&gt;
                        &lt;h5 class=&quot;card-title&quot;&gt;좋아하는 것&lt;/h5&gt;
                        &lt;p class=&quot;favorite-thing-text&quot; id=&quot;Favorite-thing&quot;&gt;내용&lt;/p&gt;
                    &lt;/div&gt;
                &lt;/div&gt;
            &lt;/div&gt;
            &lt;div class=&quot;col&quot;&gt;
                &lt;div class=&quot;card&quot;&gt;
                    &lt;div class=&quot;card-body&quot;&gt;
                        &lt;h5 class=&quot;card-title&quot;&gt;잘 하는 것&lt;/h5&gt;
                        &lt;p class=&quot;good-thing-text&quot; id=&quot;Good-thing&quot;&gt;내용&lt;/p&gt;
                    &lt;/div&gt;
                &lt;/div&gt;
            &lt;/div&gt;
            &lt;div class=&quot;col&quot;&gt;
                &lt;div class=&quot;card&quot;&gt;
                    &lt;div class=&quot;card-body&quot;&gt;
                        &lt;h5 class=&quot;card-title&quot;&gt;우선 가치관&lt;/h5&gt;
                        &lt;p class=&quot;first-values-text&quot; id=&quot;First-values&quot;&gt;내용&lt;/p&gt;
                    &lt;/div&gt;
                &lt;/div&gt;
            &lt;/div&gt;
            &lt;div class=&quot;col&quot;&gt;
                &lt;div class=&quot;card&quot;&gt;
                    &lt;div class=&quot;card-body&quot;&gt;
                        &lt;h5 class=&quot;card-title&quot;&gt;세상이 필요로 하는 것&lt;/h5&gt;
                        &lt;p class=&quot;world-needs-text&quot; id=&quot;World-needs&quot;&gt;내용&lt;/p&gt;
                    &lt;/div&gt;
                &lt;/div&gt;
            &lt;/div&gt;
        &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;</code></pre><h1 id="modifyhtml">modify.html</h1>
<pre><code>&lt;!DOCTYPE html&gt;
&lt;html lang=&quot;en&quot;&gt;

&lt;meta charset=&quot;UTF-8&quot;&gt;
&lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1, shrink-to-fit=no&quot;&gt;

&lt;script src=&quot;https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js&quot;&gt;&lt;/script&gt;

&lt;!--부트스트랩--&gt;
&lt;link href=&quot;https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css&quot; rel=&quot;stylesheet&quot;
      integrity=&quot;sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC&quot; crossorigin=&quot;anonymous&quot;&gt;
&lt;script src=&quot;https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js&quot;&gt;&lt;/script&gt;
&lt;script src=&quot;https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.bundle.min.js&quot;
        integrity=&quot;sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM&quot;
        crossorigin=&quot;anonymous&quot;&gt;&lt;/script&gt;

&lt;title&gt;수정하기&lt;/title&gt;

&lt;style&gt;
    th, td {
        border-bottom: 1px solid #b7b7b7;
        padding: 10px;
    }
&lt;/style&gt;

&lt;script&gt;
    $(document).ready(function () {
        edit();
    });

    let queryString = location.search;
    const urlParams = new URLSearchParams(queryString);
    let userId = urlParams.get(&quot;userid&quot;)

    // 기록된 정보 가져오기
    function edit() {
        $.ajax({
            type: &#39;GET&#39;,
            url: &#39;/edit&#39;,
            data: {},
            success: function (response) {
                let rows = response[&#39;edit&#39;]

                for (let i = 0; i &lt; rows.length; i++) {
                    if (rows[i][&#39;Id&#39;] == userId) {
                        let Id = rows[i][&#39;Id&#39;]
                        let Name = rows[i][&#39;Name&#39;]
                        let Introduce = rows[i][&#39;Introduce&#39;]
                        let Goal = rows[i][&#39;Goal&#39;]
                        let Favorite_thing = rows[i][&#39;Favorite_thing&#39;]
                        let Good_thing = rows[i][&#39;Good_thing&#39;]
                        let First_values = rows[i][&#39;First_values&#39;]
                        let World_needs = rows[i][&#39;World_needs&#39;]

                        let temp_html = `&lt;table&gt;
                                            &lt;tbody&gt;
                                            &lt;tr class=&quot;id&quot;&gt;
                                                &lt;td&gt;
                                                    &lt;label for=&quot;Id&quot;&gt;아이디&lt;/label&gt;
                                                &lt;/td&gt;
                                                &lt;td&gt;
                                                    &lt;p id=&quot;userId&quot;&gt;${Id}&lt;/p&gt;
                                                &lt;/td&gt;
                                            &lt;/tr&gt;
                                            &lt;tr class=&quot;tr1&quot;&gt;
                                                &lt;td&gt;
                                                    &lt;label for=&quot;Name&quot;&gt;이름&lt;/label&gt;
                                                &lt;/td&gt;
                                                &lt;td&gt;
                                                    &lt;p&gt;&lt;input type=&quot;text&quot; id=&quot;Name&quot; class=&quot;input-name&quot; value=&quot;${Name}&quot;/&gt;&lt;/p&gt;
                                                &lt;/td&gt;
                                            &lt;/tr&gt;
                                            &lt;tr class=&quot;tr1&quot;&gt;
                                                &lt;td&gt;
                                                    &lt;label for=&quot;Introduce&quot;&gt;나를 표현하는 한 문장&lt;/label&gt;
                                                &lt;/td&gt;
                                                &lt;td&gt;
                                                    &lt;p&gt;&lt;textarea id=&quot;Introduce&quot; class=&quot;input-introduce&quot;&gt;${Introduce}&lt;/textarea&gt;&lt;/p&gt;
                                                &lt;/td&gt;
                                            &lt;/tr&gt;
                                            &lt;tr class=&quot;tr1&quot;&gt;
                                                &lt;td&gt;
                                                    &lt;label for=&quot;Goal&quot;&gt;목표&lt;/label&gt;
                                                &lt;/td&gt;
                                                &lt;td&gt;
                                                    &lt;p&gt;&lt;textarea id=&quot;Goal&quot; class=&quot;input-goal&quot;&gt;${Goal}&lt;/textarea&gt;&lt;/p&gt;
                                                &lt;/td&gt;
                                            &lt;/tr&gt;
                                            &lt;tr class=&quot;tr1&quot;&gt;
                                                &lt;td&gt;
                                                    &lt;label for=&quot;Favorite_thing&quot;&gt;좋아하는 것&lt;/label&gt;
                                                &lt;/td&gt;
                                                &lt;td&gt;
                                                    &lt;p&gt;&lt;textarea id=&quot;Favorite_thing&quot; class=&quot;input-favorite-thing&quot;&gt;${Favorite_thing}&lt;/textarea&gt;&lt;/p&gt;
                                                &lt;/td&gt;
                                            &lt;/tr&gt;
                                            &lt;tr class=&quot;tr1&quot;&gt;
                                                &lt;td&gt;
                                                    &lt;label for=&quot;Good_thing&quot;&gt;잘 하는 것&lt;/label&gt;
                                                &lt;/td&gt;
                                                &lt;td&gt;
                                                    &lt;p&gt;&lt;textarea id=&quot;Good_thing&quot; class=&quot;input-good-thing&quot;&gt;${Good_thing}&lt;/textarea&gt;&lt;/p&gt;
                                                &lt;/td&gt;
                                            &lt;/tr&gt;
                                            &lt;tr class=&quot;tr1&quot;&gt;
                                                &lt;td&gt;
                                                    &lt;label for=&quot;First_values&quot;&gt;우선 가치관&lt;/label&gt;
                                                &lt;/td&gt;
                                                &lt;td&gt;
                                                    &lt;p&gt;&lt;textarea id=&quot;First_values&quot; class=&quot;input-first-values&quot;&gt;${First_values}&lt;/textarea&gt;&lt;/p&gt;
                                                &lt;/td&gt;
                                            &lt;/tr&gt;
                                            &lt;tr class=&quot;tr1&quot;&gt;
                                                &lt;td&gt;
                                                    &lt;label for=&quot;World_needs&quot;&gt;세상이 필요로 하는 것&lt;/label&gt;
                                                &lt;/td&gt;
                                                &lt;td&gt;
                                                    &lt;p&gt;&lt;textarea id=&quot;World_needs&quot; class=&quot;input-world-needs&quot;&gt;${World_needs}&lt;/textarea&gt;&lt;/p&gt;
                                                &lt;/td&gt;
                                            &lt;/tr&gt;
                                            &lt;/tbody&gt;
                                        &lt;/table&gt;
                                        `
                        $(&#39;#table-box&#39;).append(temp_html)
                    }
                }
            }
        })
    }

    // 기록 데이터 수정하기
    function modify() {
        let Id = userId
        let Name = $(&#39;#Name&#39;).val()
        let Introduce = $(&#39;#Introduce&#39;).val()
        let Goal = $(&#39;#Goal&#39;).val()
        let Favorite_thing = $(&#39;#Favorite_thing&#39;).val()
        let Good_thing = $(&#39;#Good_thing&#39;).val()
        let First_values = $(&#39;#First_values&#39;).val()
        let World_needs = $(&#39;#World_needs&#39;).val()
        window.location.href = &quot;/mypage?userid=&quot; + Id;

        $.ajax({
            type: &#39;POST&#39;,
            url: &#39;/modify&#39;,
            data: {
                Id_give: Id,
                Name_give: Name,
                Introduce_give: Introduce,
                Goal_give: Goal,
                Favorite_thing_give: Favorite_thing,
                Good_thing_give: Good_thing,
                First_values_give: First_values,
                World_needs_give: World_needs
            },
            success: function (response) {
                alert(response[&#39;msg&#39;])
                // 새로고침
                window.location.reload()
            }
        });
    }
&lt;/script&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;box id=&quot;recording-box&quot; class=&quot;recording-box&quot;&gt;
    &lt;div id=&quot;table-box&quot;&gt;&lt;/div&gt;
    &lt;button onclick=&quot;modify()&quot; type=&quot;button&quot;&gt;수정하기&lt;/button&gt;
&lt;/box&gt;
&lt;/body&gt;
&lt;/html&gt;</code></pre><h1 id="recordhtml">record.html</h1>
<pre><code>&lt;!DOCTYPE html&gt;
&lt;html lang=&quot;en&quot;&gt;

    &lt;meta charset=&quot;UTF-8&quot;&gt;
    &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1, shrink-to-fit=no&quot;&gt;

    &lt;script src=&quot;https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js&quot;&gt;&lt;/script&gt;

    &lt;!--부트스트랩--&gt;
    &lt;link href=&quot;https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css&quot; rel=&quot;stylesheet&quot;
          integrity=&quot;sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC&quot; crossorigin=&quot;anonymous&quot;&gt;
    &lt;script src=&quot;https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js&quot;&gt;&lt;/script&gt;
    &lt;script src=&quot;https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.bundle.min.js&quot;
            integrity=&quot;sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM&quot;
            crossorigin=&quot;anonymous&quot;&gt;&lt;/script&gt;

    &lt;title&gt;기록하기&lt;/title&gt;

    &lt;style&gt;
        th, td {
            border-bottom: 1px solid #b7b7b7;
            padding: 10px;
        }
    &lt;/style&gt;

    &lt;script&gt;
        function login() {
            $.ajax({
                type: &#39;GET&#39;,
                url: &#39;/logins&#39;,
                data: {},
                success: function (response) {
                    let rows = response[&#39;ids&#39;]
                    let Id_list = []
                    for (let i = 0; i &lt; rows.length; i++) {
                        Id_list[i] = rows[i][&#39;Id&#39;]
                    }
                    console.log(Id_list)
                    let test_id = $(&#39;#Id&#39;).val()
                    if (test_id == &quot;&quot;) {
                        alert(&quot;아이디를 입력하세요.&quot;)
                    } else {
                        if (Id_list.includes(test_id) === true) {
                            alert(&quot;중복된 아이디입니다.&quot;)
                        } else {
                            alert(&quot;사용가능한 아이디입니다.&quot;)
                        }
                    }
                }
            });
        }

        function recording() {
            if ($(&#39;#Id&#39;).val() == &quot;&quot;) {
                alert(&quot;아이디를 입력하세요.&quot;)
            } else if ($(&#39;#Name&#39;).val() == &quot;&quot;) {
                alert(&quot;이름을 입력하세요.&quot;)
            } else {
                let Id = $(&#39;#Id&#39;).val()
                let Name = $(&#39;#Name&#39;).val()
                let Introduce = $(&#39;#Introduce&#39;).val()
                let Goal = $(&#39;#Goal&#39;).val()
                let Favorite_thing = $(&#39;#Favorite_thing&#39;).val()
                let Good_thing = $(&#39;#Good_thing&#39;).val()
                let First_values = $(&#39;#First_values&#39;).val()
                let World_needs = $(&#39;#World_needs&#39;).val()
                window.location.href = &quot;/mypage?userid=&quot; + Id;

                $.ajax({
                    type: &#39;POST&#39;,
                    url: &#39;/record&#39;,
                    data: {
                        Id_give: Id,
                        Name_give: Name,
                        Introduce_give: Introduce,
                        Goal_give: Goal,
                        Favorite_thing_give: Favorite_thing,
                        Good_thing_give: Good_thing,
                        First_values_give: First_values,
                        World_needs_give: World_needs
                    },
                    success: function (response) {
                        alert(response[&#39;msg&#39;])
                        // 새로고침
                        window.location.reload()
                    }
                });
            }
        }

    &lt;/script&gt;
&lt;/head&gt;
&lt;body&gt;
    &lt;!--마이페이지로 이동하기--&gt;
    &lt;box id=&quot;recording-box&quot; class=&quot;recording-box&quot;&gt;
        &lt;table&gt;
            &lt;tbody&gt;
            &lt;tr class=&quot;id&quot;&gt;
                &lt;td&gt;
                    &lt;label for=&quot;Id&quot;&gt;아이디&lt;/label&gt;
                &lt;/td&gt;
                &lt;td&gt;
                    &lt;p&gt;&lt;input type=&quot;text&quot; id=&quot;Id&quot; class=&quot;input-id&quot; value=&quot;&quot;/&gt;&lt;/p&gt;
                    &lt;p type=&quot;button&quot; onclick=&quot;login()&quot;&gt;아이디 중복확인&lt;/p&gt;
                &lt;/td&gt;
            &lt;/tr&gt;
            &lt;tr class=&quot;tr1&quot;&gt;
                &lt;td&gt;
                    &lt;label for=&quot;Name&quot;&gt;이름&lt;/label&gt;
                &lt;/td&gt;
                &lt;td&gt;
                    &lt;p&gt;&lt;input type=&quot;text&quot; id=&quot;Name&quot; class=&quot;input-name&quot; value=&quot;&quot;/&gt;&lt;/p&gt;
                &lt;/td&gt;
            &lt;/tr&gt;
            &lt;tr class=&quot;tr1&quot;&gt;
                &lt;td&gt;
                    &lt;label for=&quot;Introduce&quot;&gt;나를 표현하는 한 문장&lt;/label&gt;
                &lt;/td&gt;
                &lt;td&gt;
                    &lt;p&gt;&lt;textarea id=&quot;Introduce&quot; class=&quot;input-introduce&quot; value=&quot;&quot;&gt;&lt;/textarea&gt;&lt;/p&gt;
                &lt;/td&gt;
            &lt;/tr&gt;
            &lt;tr class=&quot;tr1&quot;&gt;
                &lt;td&gt;
                    &lt;label for=&quot;Goal&quot;&gt;목표&lt;/label&gt;
                &lt;/td&gt;
                &lt;td&gt;
                    &lt;p&gt;&lt;textarea id=&quot;Goal&quot; class=&quot;input-goal&quot; value=&quot;&quot;&gt;&lt;/textarea&gt;&lt;/p&gt;
                &lt;/td&gt;
            &lt;/tr&gt;
            &lt;tr class=&quot;tr1&quot;&gt;
                &lt;td&gt;
                    &lt;label for=&quot;Favorite_thing&quot;&gt;좋아하는 것&lt;/label&gt;
                &lt;/td&gt;
                &lt;td&gt;
                    &lt;p&gt;&lt;textarea id=&quot;Favorite_thing&quot; class=&quot;input-favorite-thing&quot; value=&quot;&quot;&gt;&lt;/textarea&gt;&lt;/p&gt;
                &lt;/td&gt;
            &lt;/tr&gt;
            &lt;tr class=&quot;tr1&quot;&gt;
                &lt;td&gt;
                    &lt;label for=&quot;Good_thing&quot;&gt;잘 하는 것&lt;/label&gt;
                &lt;/td&gt;
                &lt;td&gt;
                    &lt;p&gt;&lt;textarea id=&quot;Good_thing&quot; class=&quot;input-good-thing&quot; value=&quot;&quot;&gt;&lt;/textarea&gt;&lt;/p&gt;
                &lt;/td&gt;
            &lt;/tr&gt;
            &lt;tr class=&quot;tr1&quot;&gt;
                &lt;td&gt;
                    &lt;label for=&quot;First_values&quot;&gt;우선 가치관&lt;/label&gt;
                &lt;/td&gt;
                &lt;td&gt;
                    &lt;p&gt;&lt;textarea id=&quot;First_values&quot; class=&quot;input-first-values&quot; value=&quot;&quot;&gt;&lt;/textarea&gt;&lt;/p&gt;
                &lt;/td&gt;
            &lt;/tr&gt;
            &lt;tr class=&quot;tr1&quot;&gt;
                &lt;td&gt;
                    &lt;label for=&quot;World_needs&quot;&gt;세상이 필요로 하는 것&lt;/label&gt;
                &lt;/td&gt;
                &lt;td&gt;
                    &lt;p&gt;&lt;textarea id=&quot;World_needs&quot; class=&quot;input-world-needs&quot; value=&quot;&quot;&gt;&lt;/textarea&gt;&lt;/p&gt;
                &lt;/td&gt;
            &lt;/tr&gt;
            &lt;/tbody&gt;
        &lt;/table&gt;
        &lt;button onclick=&quot;recording();&quot; type=&quot;button&quot;&gt;기록하기&lt;/button&gt;
    &lt;/box&gt;
&lt;/body&gt;
&lt;/html&gt;</code></pre>]]></description>
        </item>
        <item>
            <title><![CDATA[[웹개발] 1주차 진행사항]]></title>
            <link>https://velog.io/@eunjo_ourism/6%EC%A3%BC%EC%B0%A8</link>
            <guid>https://velog.io/@eunjo_ourism/6%EC%A3%BC%EC%B0%A8</guid>
            <pubDate>Fri, 11 Mar 2022 10:56:09 GMT</pubDate>
            <description><![CDATA[<h1 id="서버">서버</h1>
<h2 id="apppy">app.py</h2>
<pre><code class="language-python">from flask import Flask, render_template, request, jsonify
app = Flask(__name__)

from pymongo import MongoClient
client = MongoClient(&#39;mongodb+srv://test:sparta@cluster0.jmelm.mongodb.net/Cluster0?retryWrites=true&amp;w=majority&#39;)
db = client.dbsparta

# 홈페이지
@app.route(&#39;/&#39;)
def home():
   return render_template(&#39;index.html&#39;)

# 마이페이지
@app.route(&#39;/mypage&#39;)
def mypage():
   return render_template(&#39;mypage.html&#39;)

# 기록페이지
@app.route(&#39;/record&#39;)
def record():
    return render_template(&#39;record.html&#39;)

# 기록 페이지 POST
@app.route(&quot;/record&quot;, methods=[&quot;POST&quot;])
def record_post():
    Name_receive = request.form[&#39;Name_give&#39;]
    Introduce_receive = request.form[&#39;Introduce_give&#39;]
    Goal_receive = request.form[&#39;Goal_give&#39;]
    Favorite_thing_receive = request.form[&#39;Favorite_thing_give&#39;]
    Good_thing_receive = request.form[&#39;Good_thing_give&#39;]
    First_values_receive = request.form[&#39;First_values_give&#39;]
    World_needs_receive = request.form[&#39;World_needs_give&#39;]

    doc = {
        &#39;Name&#39;: Name_receive,
        &#39;Introduce&#39;: Introduce_receive,
        &#39;Goal&#39;: Goal_receive,
        &#39;Favorite_thing&#39;: Favorite_thing_receive,
        &#39;Good_thing&#39;: Good_thing_receive,
        &#39;First_values&#39;: First_values_receive,
        &#39;World_needs&#39;: World_needs_receive
    }

    db.record.insert_one(doc)

    return jsonify({&#39;msg&#39;: &#39;기록 완료!&#39;})

@app.route(&quot;/&quot;, methods=[&quot;GET&quot;])
def record_get():
    record_list = list(db.record.find({}, {&#39;_id&#39;: False}))
    return jsonify({&#39;records&#39;: record_list})

if __name__ == &#39;__main__&#39;:
   app.run(&#39;0.0.0.0&#39;, port=5000, debug=True)</code></pre>
<h1 id="html">HTML</h1>
<h2 id="indexhtml">index.html</h2>
<blockquote>
</blockquote>
<ul>
<li>해야할 것<ul>
<li>홈페이지 html, css...</li>
</ul>
</li>
</ul>
<pre><code class="language-html">&lt;!DOCTYPE html&gt;
&lt;html lang=&quot;en&quot;&gt;
&lt;head&gt;
    &lt;meta charset=&quot;UTF-8&quot;&gt;
    &lt;title&gt;홈페이지&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
    &lt;a href=&quot;/mypage&quot;&gt;my page&lt;/a&gt;
    &lt;a href=&quot;/record&quot;&gt;기록하기&lt;/a&gt;
&lt;/body&gt;
&lt;/html&gt;</code></pre>
<h2 id="mypagehtml">mypage.html</h2>
<blockquote>
<ul>
<li>해야할 것<ul>
<li>기록 페이지에서 기록한 거 마이 페이지에 붙이기</li>
</ul>
</li>
</ul>
</blockquote>
<pre><code class="language-html">&lt;!DOCTYPE html&gt;
&lt;html lang=&quot;en&quot;&gt;
&lt;head&gt;
    &lt;meta charset=&quot;UTF-8&quot;&gt;
    &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1, shrink-to-fit=no&quot;&gt;

    &lt;link href=&quot;https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css&quot; rel=&quot;stylesheet&quot;
          integrity=&quot;sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC&quot; crossorigin=&quot;anonymous&quot;&gt;
    &lt;script src=&quot;https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js&quot;&gt;&lt;/script&gt;
    &lt;script src=&quot;https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.bundle.min.js&quot;
            integrity=&quot;sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM&quot;
            crossorigin=&quot;anonymous&quot;&gt;&lt;/script&gt;

    &lt;title&gt;마이 페이지&lt;/title&gt;

    &lt;style&gt;
        @font-face {
            font-family: &#39;ChosunGu&#39;;
            src: url(&#39;https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_20-04@1.0/ChosunGu.woff&#39;) format(&#39;woff&#39;);
            font-weight: normal;
            font-style: normal;
        }

        @font-face {
            font-family: &#39;S-CoreDream-3Light&#39;;
            src: url(&#39;https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_six@1.2/S-CoreDream-3Light.woff&#39;) format(&#39;woff&#39;);
            font-weight: normal;
            font-style: normal;
        }

        @font-face {
            font-family: &#39;GangwonEdu_OTFLightA&#39;;
            src: url(&#39;https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_2201-2@1.0/GangwonEdu_OTFLightA.woff&#39;) format(&#39;woff&#39;);
            font-weight: normal;
            font-style: normal;
        }

        @font-face {
            font-family: &#39;S-CoreDream-5Medium&#39;;
            src: url(&#39;https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_six@1.2/S-CoreDream-5Medium.woff&#39;) format(&#39;woff&#39;);
            font-weight: normal;
            font-style: normal;
        }

        .box {
            display: flex;
            flex-direction: row;
            justify-content: center;
            align-items: flex-start;

            padding: 20px;

            font-family: &#39;S-CoreDream-3Light&#39;;
        }

        .profile {
            margin: 10px 50px auto auto;

            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
        }

        th, td {
            border-bottom: 1px solid #b7b7b7;
            padding: 10px;
        }

        .personal {
            font-family: &#39;ChosunGu&#39;;
            margin: 10px auto auto 50px;
        }

        .personal &gt; h1 {
            font-family: &#39;GangwonEdu_OTFLightA&#39;;
            text-align: center; /*문단 가운데 정렬*/
        }

        .goal {
            display: flex;
            flex-direction: row;
            margin: 10px auto 10px auto;
        }

        .goal &gt; .card {
            width: 800px;
            margin: 10px auto 10px auto;
        }

        .name {
            font-family: &#39;S-CoreDream-5Medium&#39;;
            margin: 10px;
            padding: 3px;
            width: 200px;
            background-color: gray;
            color: white;
            text-align: center;
        }

        h5 {
            color: #b7b7b7;
            font-size: 15px;
        }
    &lt;/style&gt;

&lt;/head&gt;
&lt;body&gt;
&lt;div class=&quot;box&quot;&gt;
    &lt;div class=&quot;profile&quot;&gt;
        &lt;img src=&quot;&quot; width=&quot;200&quot; height=&quot;200&quot;&gt;
        &lt;p class=&quot;name&quot;&gt;이름&lt;/p&gt;

        &lt;!--기록 페이지로 이동--&gt;
        &lt;a href=&quot;/record&quot;&gt;기록하기&lt;/a&gt;

    &lt;/div&gt;
    &lt;div class=&quot;personal&quot;&gt;
        &lt;h1 class=&quot;title&quot;&gt;&quot;나를 표현하는 한 문장&quot;&lt;/h1&gt;
        &lt;div class=&quot;goal&quot;&gt;
            &lt;div class=&quot;card&quot;&gt;
                &lt;div class=&quot;card-body&quot;&gt;
                    &lt;h5 class=&quot;card-title&quot;&gt;목표&lt;/h5&gt;
                    &lt;p class=&quot;goaltext&quot;&gt;내용&lt;/p&gt;
                &lt;/div&gt;
            &lt;/div&gt;
        &lt;/div&gt;
        &lt;!--Components &gt; Card &gt; Grid cards--&gt;
        &lt;div class=&quot;row row-cols-1 row-cols-md-2 g-4&quot;&gt;
            &lt;div class=&quot;col&quot;&gt;
                &lt;div class=&quot;card&quot;&gt;
                    &lt;div class=&quot;card-body&quot;&gt;
                        &lt;h5 class=&quot;card-title&quot;&gt;좋아하는 것&lt;/h5&gt;
                        &lt;p class=&quot;favoritethingtext&quot;&gt;내용&lt;/p&gt;
                    &lt;/div&gt;
                &lt;/div&gt;
            &lt;/div&gt;
            &lt;div class=&quot;col&quot;&gt;
                &lt;div class=&quot;card&quot;&gt;
                    &lt;div class=&quot;card-body&quot;&gt;
                        &lt;h5 class=&quot;card-title&quot;&gt;잘 하는 것&lt;/h5&gt;
                        &lt;p class=&quot;goodthingtext&quot;&gt;내용&lt;/p&gt;
                    &lt;/div&gt;
                &lt;/div&gt;
            &lt;/div&gt;
            &lt;div class=&quot;col&quot;&gt;
                &lt;div class=&quot;card&quot;&gt;
                    &lt;div class=&quot;card-body&quot;&gt;
                        &lt;h5 class=&quot;card-title&quot;&gt;우선 가치관&lt;/h5&gt;
                        &lt;p class=&quot;firstvaluestext&quot;&gt;내용&lt;/p&gt;
                    &lt;/div&gt;
                &lt;/div&gt;
            &lt;/div&gt;
            &lt;div class=&quot;col&quot;&gt;
                &lt;div class=&quot;card&quot;&gt;
                    &lt;div class=&quot;card-body&quot;&gt;
                        &lt;h5 class=&quot;card-title&quot;&gt;세상이 필요로 하는 것&lt;/h5&gt;
                        &lt;p class=&quot;worldneedstext&quot;&gt;내용&lt;/p&gt;
                    &lt;/div&gt;
                &lt;/div&gt;
            &lt;/div&gt;
        &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;</code></pre>
<h2 id="recordhtml">record.html</h2>
<blockquote>
<ul>
<li>해야할 것<ul>
<li>이미지 파일 url db에 저장하기 </li>
<li>CSS - 깔끔하게 하기</li>
</ul>
</li>
</ul>
</blockquote>
<pre><code class="language-html">&lt;!DOCTYPE html&gt;
&lt;html lang=&quot;en&quot;&gt;

    &lt;meta charset=&quot;UTF-8&quot;&gt;
    &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1, shrink-to-fit=no&quot;&gt;

    &lt;script src=&quot;https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js&quot;&gt;&lt;/script&gt;

    &lt;!--부트스트랩--&gt;
    &lt;link href=&quot;https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css&quot; rel=&quot;stylesheet&quot;
          integrity=&quot;sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC&quot; crossorigin=&quot;anonymous&quot;&gt;
    &lt;script src=&quot;https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js&quot;&gt;&lt;/script&gt;
    &lt;script src=&quot;https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.bundle.min.js&quot;
            integrity=&quot;sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM&quot;
            crossorigin=&quot;anonymous&quot;&gt;&lt;/script&gt;

    &lt;title&gt;마이 페이지 - 기록하기&lt;/title&gt;

    &lt;style&gt;
        th, td {
            border-bottom: 1px solid #b7b7b7;
            padding: 10px;
        }
    &lt;/style&gt;

    &lt;script&gt;

        // 이미지 미리보기 [https://alikong.tistory.com/33][http://yoonbumtae.com/?p=3304]참고
        function readURL(input) {
            // 인풋 태그에 파일이 있는 경우
            if (input.files &amp;&amp; input.files[0]) {
                // FileReader 인스턴스 생성
                const reader = new FileReader();
                // 이미지가 로드 된 경우
                reader.onload = function (e) {
                    document.getElementById(&#39;preview&#39;).src = e.target.result;
                };
                // reader가 이미지 읽도록 하기
                reader.readAsDataURL(input.files[0]);
            } else {
                document.getElementById(&#39;preview&#39;).src = &quot;&quot;;
            }
        }

        $(document).ready(function () {
            recorded();
        });

        function recorded() {
            $.ajax({
                type: &#39;GET&#39;,
                url: &#39;/record&#39;,
                data: {},
                success: function (response) {
                    let rows = response[&#39;records&#39;]
                    for (let i = 0; i &lt; rows.length; i++) {
                        let Name = rows[i][&#39;Name&#39;]
                        let Introduce = rows[i][&#39;Introduce&#39;]
                        let Goal = rows[i][&#39;Goal&#39;]
                        let Favorite_thing = rows[i][&#39;Favorite_thing&#39;]
                        let Good_thing = rows[i][&#39;Good_thing&#39;]
                        let First_values = rows[i][&#39;First_values&#39;]
                        let World_needs = rows[i][&#39;World_needs&#39;]

                        console.log(Name,Introduce, Goal, Favorite_thing, Good_thing, First_values, World_needs)
                    }
                }
            });
        }

        function recording() {
            let Name = $(&#39;#Name&#39;).val()
            let Introduce = $(&#39;#Introduce&#39;).val()
            let Goal = $(&#39;#Goal&#39;).val()
            let Favorite_thing = $(&#39;#Favorite_thing&#39;).val()
            let Good_thing = $(&#39;#Good_thing&#39;).val()
            let First_values = $(&#39;#First_values&#39;).val()
            let World_needs = $(&#39;#World_needs&#39;).val()

            $.ajax({
                type: &#39;POST&#39;,
                url: &#39;/record&#39;,
                data: {
                    Name_give: Name,
                    Introduce_give: Introduce,
                    Goal_give: Goal,
                    Favorite_thing_give: Favorite_thing,
                    Good_thing_give: Good_thing,
                    First_values_give: First_values,
                    World_needs_give: World_needs
                },
                success: function (response) {
                    alert(response[&#39;msg&#39;])
                    // 새로고침
                    window.location.reload()
                }
            });
        }

    &lt;/script&gt;
&lt;/head&gt;
&lt;body&gt;
    &lt;!--마이페이지로 이동하기--&gt;
    &lt;a href=&quot;/mypage&quot;&gt;my page&lt;/a&gt;

    &lt;box id=&quot;recording-box&quot; class=&quot;recording-box&quot;&gt;
        &lt;table&gt;
            &lt;tbody&gt;
            &lt;tr class=&quot;tr1&quot;&gt;
                &lt;td&gt;
                    &lt;label for=&quot;Name&quot;&gt;이름&lt;/label&gt;
                &lt;/td&gt;
                &lt;td&gt;
                    &lt;p&gt;&lt;input type=&quot;text&quot; id=&quot;Name&quot; class=&quot;input-name&quot; value=&quot;&quot;/&gt;&lt;/p&gt;
                &lt;/td&gt;
            &lt;/tr&gt;
            &lt;tr class=&quot;tr1&quot;&gt;
                &lt;td&gt;프로필 이미지&lt;/td&gt;
                &lt;td&gt;
                    &lt;p&gt;&lt;input type=&quot;file&quot; class=&quot;input-image&quot; onchange=&quot;readURL(this);&quot;&gt;&lt;/p&gt;
                    &lt;p&gt;&lt;img id=&quot;preview&quot; width=&quot;200px&quot; height=&quot;200px&quot;/&gt;&lt;/p&gt;
                &lt;/td&gt;
            &lt;/tr&gt;
            &lt;tr class=&quot;tr1&quot;&gt;
                &lt;td&gt;
                    &lt;label for=&quot;Introduce&quot;&gt;나를 표현하는 한 문장&lt;/label&gt;
                &lt;/td&gt;
                &lt;td&gt;
                    &lt;p&gt;&lt;textarea id=&quot;Introduce&quot; class=&quot;input-introduce&quot; value=&quot;&quot;&gt;&lt;/textarea&gt;&lt;/p&gt;
                &lt;/td&gt;
            &lt;/tr&gt;
            &lt;tr class=&quot;tr1&quot;&gt;
                &lt;td&gt;
                    &lt;label for=&quot;Goal&quot;&gt;목표&lt;/label&gt;
                &lt;/td&gt;
                &lt;td&gt;
                    &lt;p&gt;&lt;textarea id=&quot;Goal&quot; class=&quot;input-goal&quot; value=&quot;&quot;&gt;&lt;/textarea&gt;&lt;/p&gt;
                &lt;/td&gt;
            &lt;/tr&gt;
            &lt;tr class=&quot;tr1&quot;&gt;
                &lt;td&gt;
                    &lt;label for=&quot;Favorite_thing&quot;&gt;좋아하는 것&lt;/label&gt;
                &lt;/td&gt;
                &lt;td&gt;
                    &lt;p&gt;&lt;textarea id=&quot;Favorite_thing&quot; class=&quot;input-favorite-thing&quot; value=&quot;&quot;&gt;&lt;/textarea&gt;&lt;/p&gt;
                &lt;/td&gt;
            &lt;/tr&gt;
            &lt;tr class=&quot;tr1&quot;&gt;
                &lt;td&gt;
                    &lt;label for=&quot;Good_thing&quot;&gt;잘 하는 것&lt;/label&gt;
                &lt;/td&gt;
                &lt;td&gt;
                    &lt;p&gt;&lt;textarea id=&quot;Good_thing&quot; class=&quot;input-good-thing&quot; value=&quot;&quot;&gt;&lt;/textarea&gt;&lt;/p&gt;
                &lt;/td&gt;
            &lt;/tr&gt;
            &lt;tr class=&quot;tr1&quot;&gt;
                &lt;td&gt;
                    &lt;label for=&quot;First_values&quot;&gt;우선 가치관&lt;/label&gt;
                &lt;/td&gt;
                &lt;td&gt;
                    &lt;p&gt;&lt;textarea id=&quot;First_values&quot; class=&quot;input-first-values&quot; value=&quot;&quot;&gt;&lt;/textarea&gt;&lt;/p&gt;
                &lt;/td&gt;
            &lt;/tr&gt;
            &lt;tr class=&quot;tr1&quot;&gt;
                &lt;td&gt;
                    &lt;label for=&quot;World_needs&quot;&gt;세상이 필요로 하는 것&lt;/label&gt;
                &lt;/td&gt;
                &lt;td&gt;
                    &lt;p&gt;&lt;textarea id=&quot;World_needs&quot; class=&quot;input-world-needs&quot; value=&quot;&quot;&gt;&lt;/textarea&gt;&lt;/p&gt;
                &lt;/td&gt;
            &lt;/tr&gt;
            &lt;/tbody&gt;
        &lt;/table&gt;
        &lt;button onclick=&quot;recording()&quot; type=&quot;button&quot;&gt;기록하기&lt;/button&gt;
    &lt;/box&gt;
&lt;/body&gt;
&lt;/html&gt;</code></pre>
<h1 id="페이지">페이지</h1>
<h2 id="홈페이지">홈페이지(&#39;/&#39;)</h2>
<p><img src="https://images.velog.io/images/eunjo_ourism/post/b7907efc-26d4-4c35-842e-fbd561471c7d/image.png" alt=""></p>
<h2 id="마이페이지mypage">마이페이지(&#39;/mypage&#39;)</h2>
<p><img src="https://images.velog.io/images/eunjo_ourism/post/61339e2f-877b-45a8-b026-0acc5dbad131/image.png" alt=""></p>
<h2 id="기록페이지record">기록페이지(&#39;/record&#39;)</h2>
<p><img src="https://images.velog.io/images/eunjo_ourism/post/91da9e8f-c9fd-47e3-b39e-da1f30bacaaa/image.png" alt=""></p>
<h1 id="7주차-계획">7주차 계획</h1>
<ol>
<li>프로필 이미지!</li>
<li>GET 한 것 마이페이지에 내용 붙이기</li>
<li>기록페이지 CSS</li>
<li>홈페이지 만들기</li>
</ol>
]]></description>
        </item>
        <item>
            <title><![CDATA[기록 페이지]]></title>
            <link>https://velog.io/@eunjo_ourism/%EA%B8%B0%EB%A1%9D-%ED%8E%98%EC%9D%B4%EC%A7%80</link>
            <guid>https://velog.io/@eunjo_ourism/%EA%B8%B0%EB%A1%9D-%ED%8E%98%EC%9D%B4%EC%A7%80</guid>
            <pubDate>Fri, 11 Mar 2022 08:56:09 GMT</pubDate>
            <description><![CDATA[<h1 id="1-등록-페이지-표-만들기">1. 등록 페이지 표 만들기</h1>
<ul>
<li>html<pre><code class="language-html">&lt;table&gt;
  &lt;tbody&gt;
  &lt;tr class=&quot;tr1&quot;&gt;
      &lt;td&gt;
          &lt;label for=&quot;Name&quot;&gt;이름&lt;/label&gt;
      &lt;/td&gt;
      &lt;td&gt;
          &lt;p&gt;&lt;input type=&quot;text&quot; id=&quot;Name&quot; class=&quot;input-name&quot; value=&quot;&quot;/&gt;&lt;/p&gt;
      &lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr class=&quot;tr1&quot;&gt;
      &lt;td&gt;프로필 이미지&lt;/td&gt;
      &lt;td&gt;
          &lt;p&gt;&lt;input type=&quot;file&quot; class=&quot;input-image&quot;&gt;&lt;/p&gt;
      &lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr class=&quot;tr1&quot;&gt;
      &lt;td&gt;
          &lt;label for=&quot;Introduce&quot;&gt;나를 표현하는 한 문장&lt;/label&gt;
      &lt;/td&gt;
      &lt;td&gt;
          &lt;p&gt;&lt;textarea id=&quot;Introduce&quot; class=&quot;input-introduce&quot; value=&quot;&quot;&gt;&lt;/textarea&gt;&lt;/p&gt;
      &lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr class=&quot;tr1&quot;&gt;
      &lt;td&gt;
          &lt;label for=&quot;Goal&quot;&gt;목표&lt;/label&gt;
      &lt;/td&gt;
      &lt;td&gt;
          &lt;p&gt;&lt;textarea id=&quot;Goal&quot; class=&quot;input-goal&quot; value=&quot;&quot;&gt;&lt;/textarea&gt;&lt;/p&gt;
      &lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr class=&quot;tr1&quot;&gt;
      &lt;td&gt;
          &lt;label for=&quot;Favorite_thing&quot;&gt;좋아하는 것&lt;/label&gt;
      &lt;/td&gt;
      &lt;td&gt;
          &lt;p&gt;&lt;textarea id=&quot;Favorite_thing&quot; class=&quot;input-favorite-thing&quot; value=&quot;&quot;&gt;&lt;/textarea&gt;&lt;/p&gt;
      &lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr class=&quot;tr1&quot;&gt;
      &lt;td&gt;
          &lt;label for=&quot;Good_thing&quot;&gt;잘 하는 것&lt;/label&gt;
      &lt;/td&gt;
      &lt;td&gt;
          &lt;p&gt;&lt;textarea id=&quot;Good_thing&quot; class=&quot;input-good-thing&quot; value=&quot;&quot;&gt;&lt;/textarea&gt;&lt;/p&gt;
      &lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr class=&quot;tr1&quot;&gt;
      &lt;td&gt;
          &lt;label for=&quot;First_values&quot;&gt;우선 가치관&lt;/label&gt;
      &lt;/td&gt;
      &lt;td&gt;
          &lt;p&gt;&lt;textarea id=&quot;First_values&quot; class=&quot;input-first-values&quot; value=&quot;&quot;&gt;&lt;/textarea&gt;&lt;/p&gt;
      &lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr class=&quot;tr1&quot;&gt;
      &lt;td&gt;
          &lt;label for=&quot;World_needs&quot;&gt;세상이 필요로 하는 것&lt;/label&gt;
      &lt;/td&gt;
      &lt;td&gt;
          &lt;p&gt;&lt;textarea id=&quot;World_needs&quot; class=&quot;input-world-needs&quot; value=&quot;&quot;&gt;&lt;/textarea&gt;&lt;/p&gt;
      &lt;/td&gt;
  &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;</code></pre>
<body>
  <table>
      <tbody>
          <tr class="tr1">
              <td>
                  <label for="Name">이름</label>
              </td>
              <td>
                  <p><input type="text" id="Name" class="input-name" value=""/></p>
              </td>
          </tr>
          <tr class="tr1">
              <td>프로필 이미지</td>
              <td>
                  <p><input type="file" class="input-image"></p>
              </td>
          </tr>
          <tr class="tr1">
              <td>
                  <label for="Introduce">나를 표현하는 한 문장</label>
              </td>
              <td>
                  <p><textarea id="Introduce" class="input-introduce" value=""></textarea></p>
              </td>
          </tr>
          <tr class="tr1">
              <td>
                  <label for="Goal">목표</label>
              </td>
              <td>
                  <p><textarea id="Goal" class="input-goal" value=""></textarea></p>
              </td>
          </tr>
          <tr class="tr1">
              <td>
                  <label for="Favorite_thing">좋아하는 것</label>
              </td>
              <td>
                  <p><textarea id="Favorite_thing" class="input-favorite-thing" value=""></textarea></p>
              </td>
          </tr>
          <tr class="tr1">
              <td>
                  <label for="Good_thing">잘 하는 것</label>
              </td>
              <td>
                  <p><textarea id="Good_thing" class="input-good-thing" value=""></textarea></p>
              </td>
          </tr>
          <tr class="tr1">
              <td>
                  <label for="First_values">우선 가치관</label>
              </td>
              <td>
                  <p><textarea id="First_values" class="input-first-values" value=""></textarea></p>
              </td>
          </tr>
          <tr class="tr1">
              <td>
                  <label for="World_needs">세상이 필요로 하는 것</label>
              </td>
              <td>
                  <p><textarea id="World_needs" class="input-world-needs" value=""></textarea></p>
              </td>
          </tr>
      </tbody>
  </table>
</body>

</li>
</ul>
<h1 id="2-프로필-이미지-미리보기">2. 프로필 이미지 미리보기</h1>
<p><a href="https://alikong.tistory.com/33">https://alikong.tistory.com/33</a> , <a href="http://yoonbumtae.com/?p=3304">http://yoonbumtae.com/?p=3304</a></p>
<ul>
<li>html<pre><code class="language-html">&lt;td&gt;프로필 이미지&lt;/td&gt;
&lt;td&gt;
  &lt;p&gt;&lt;input type=&quot;file&quot; class=&quot;input-image&quot; onchange=&quot;readURL(this);&quot;&gt;&lt;/p&gt;
  &lt;p&gt;&lt;img id=&quot;preview&quot; width=&quot;200px&quot; height=&quot;200px&quot;/&gt;&lt;/p&gt;
&lt;/td&gt;</code></pre>
</li>
<li>javascript<pre><code class="language-javascript">// 이미지 미리보기 
function readURL(input) {
  // 인풋 태그에 파일이 있는 경우
  if (input.files &amp;&amp; input.files[0]) {
      // FileReader 인스턴스 생성
      const reader = new FileReader();
      // 이미지가 로드 된 경우
      reader.onload = function (e) {
          document.getElementById(&#39;preview&#39;).src = e.target.result;
      };
      // reader가 이미지 읽도록 하기
      reader.readAsDataURL(input.files[0]);
  } else {
      document.getElementById(&#39;preview&#39;).src = &quot;&quot;;
  }
}</code></pre>
</li>
</ul>
<hr>
<pre><code>&lt;!DOCTYPE html&gt;
&lt;html lang=&quot;en&quot;&gt;

    &lt;script src=&quot;https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js&quot;&gt;&lt;/script&gt;

    &lt;!--css 파일 불러오기--&gt;
    &lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;static/style.css&quot;&gt;

    &lt;title&gt;기록하기&lt;/title&gt;

    &lt;script&gt;
        $(document).ready(function () {
            recorded();
        });

        function recorded() {
            $.ajax({
                type: &#39;GET&#39;,
                url: &#39;/mypage&#39;,
                data: {},
                success: function (response) {
                    alert(response[&#39;msg&#39;])
                }
            });
        }

        function recording() {
            let Name = $(&#39;#Name&#39;).val()
            let Introduce = $(&#39;#Introduce&#39;).val()
            let Goal = $(&#39;#Goal&#39;).val()
            let Favorite_thing = $(&#39;#Favorite_thing&#39;).val()
            let Good_thing = $(&#39;#Good_thing&#39;).val()
            let First_values = $(&#39;#First_values&#39;).val()
            let World_needs = $(&#39;#World_needs&#39;).val()

            $.ajax({
                type: &#39;POST&#39;,
                url: &#39;/mypage&#39;,
                data: {
                    Name_give: Name,
                    Introduce_give: Introduce,
                    Goal_give: Goal,
                    Favorite_thing_give: Favorite_thing,
                    Good_thing_give: Good_thing,
                    First_values_give: First_values,
                    World_needs_give: World_needs
                },
                success: function (response) {
                    alert(response[&#39;msg&#39;])
                    // 새로고침
                    window.location.reload()
                }
            });
        }

        // 이미지 미리보기 [https://alikong.tistory.com/33][http://yoonbumtae.com/?p=3304]참고
        function readURL(input) {
            // 인풋 태그에 파일이 있는 경우
            if (input.files &amp;&amp; input.files[0]) {
                // FileReader 인스턴스 생성
                const reader = new FileReader();
                // 이미지가 로드 된 경우
                reader.onload = function (e) {
                    document.getElementById(&#39;preview&#39;).src = e.target.result;
                };
                // reader가 이미지 읽도록 하기
                reader.readAsDataURL(input.files[0]);
            } else {
                document.getElementById(&#39;preview&#39;).src = &quot;&quot;;
            }
        }
    &lt;/script&gt;</code></pre></head>
<body>
    <table>
        <tbody>
        <tr class="tr1">
            <td>
                <label for="Name">이름</label>
            </td>
            <td>
                <p><input type="text" id="Name" class="input-name" value=""/></p>
            </td>
        </tr>
        <tr class="tr1">
            <td>프로필 이미지</td>
            <td>
                <p><input type="file" class="input-image" onchange="readURL(this);"></p>
                <p><img id="preview" width="200px" height="200px"/></p>
            </td>
        </tr>
        <tr class="tr1">
            <td>
                <label for="Introduce">나를 표현하는 한 문장</label>
            </td>
            <td>
                <p><textarea id="Introduce" class="input-introduce" value=""></textarea></p>
            </td>
        </tr>
        <tr class="tr1">
            <td>
                <label for="Goal">목표</label>
            </td>
            <td>
                <p><textarea id="Goal" class="input-goal" value=""></textarea></p>
            </td>
        </tr>
        <tr class="tr1">
            <td>
                <label for="Favorite_thing">좋아하는 것</label>
            </td>
            <td>
                <p><textarea id="Favorite_thing" class="input-favorite-thing" value=""></textarea></p>
            </td>
        </tr>
        <tr class="tr1">
            <td>
                <label for="Good_thing">잘 하는 것</label>
            </td>
            <td>
                <p><textarea id="Good_thing" class="input-good-thing" value=""></textarea></p>
            </td>
        </tr>
        <tr class="tr1">
            <td>
                <label for="First_values">우선 가치관</label>
            </td>
            <td>
                <p><textarea id="First_values" class="input-first-values" value=""></textarea></p>
            </td>
        </tr>
        <tr class="tr1">
            <td>
                <label for="World_needs">세상이 필요로 하는 것</label>
            </td>
            <td>
                <p><textarea id="World_needs" class="input-world-needs" value=""></textarea></p>
            </td>
        </tr>
        </tbody>
    </table>
    <button onclick="recording()" type="button">기록하기</button>
</body>
</html>

<hr>
<h1 id="3-클라이언트-서버-연결하기">3. 클라이언트-서버 연결하기</h1>
<ul>
<li>app.py<pre><code class="language-python">from flask import Flask, render_template, request, jsonify
app = Flask(__name__)
</code></pre>
</li>
</ul>
<p>@app.route(&#39;/&#39;)
def home():
   return render_template(&#39;index.html&#39;)</p>
<p>@app.route(&quot;/mypage&quot;, methods=[&quot;POST&quot;])
def mypage_post():
    sample_receive = request.form[&#39;sample_give&#39;]
    print(sample_receive)
    return jsonify({&#39;msg&#39;: &#39;POST 연결 완료!&#39;})</p>
<p>@app.route(&quot;/mypage&quot;, methods=[&quot;GET&quot;])
def mypage_get():
    return jsonify({&#39;msg&#39;: &#39;GET 연결 완료!&#39;})</p>
<p>if <strong>name</strong> == &#39;<strong>main</strong>&#39;:
   app.run(&#39;0.0.0.0&#39;, port=5000, debug=True)</p>
<pre><code>- javascript
```javascript
&lt;script src=&quot;https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js&quot;&gt;&lt;/script&gt;

&lt;script&gt;
$(document).ready(function () {
    recorded();
});

function recorded() {
    $.ajax({
        type: &#39;GET&#39;,
        url: &#39;/mypage&#39;,
        data: {},
        success: function (response) {
            alert(response[&#39;msg&#39;])
        }
    });
}

function recording() {
    $.ajax({
        type: &#39;POST&#39;,
        url: &#39;/mypage&#39;,
        data: {sample_give: &#39;데이터전송&#39;},
        success: function (response) {
            alert(response[&#39;msg&#39;])
        }
    });
}
&lt;/script&gt;</code></pre><h1 id="4-post">4. POST</h1>
<ul>
<li>서버<pre><code class="language-python">from flask import Flask, render_template, request, jsonify
app = Flask(__name__)
</code></pre>
</li>
</ul>
<p>from pymongo import MongoClient
client = MongoClient(&#39;mongodb+srv://test:<a href="mailto:sparta@cluster0.jmelm.mongodb.net">sparta@cluster0.jmelm.mongodb.net</a>/Cluster0?retryWrites=true&amp;w=majority&#39;)
db = client.dbsparta</p>
<p>@app.route(&quot;/mypage&quot;, methods=[&quot;POST&quot;])
def mypage_post():
    Name_receive = request.form[&#39;Name_give&#39;]
    Introduce_receive = request.form[&#39;Introduce_give&#39;]
    Goal_receive = request.form[&#39;Goal_give&#39;]
    Favorite_thing_receive = request.form[&#39;Favorite_thing_give&#39;]
    Good_thing_receive = request.form[&#39;Good_thing_give&#39;]
    First_values_receive = request.form[&#39;First_values_give&#39;]
    World_needs_receive = request.form[&#39;World_needs_give&#39;]</p>
<pre><code>doc = {
    &#39;Name&#39;: Name_receive,
    &#39;Introduce&#39;: Introduce_receive,
    &#39;Goal&#39;: Goal_receive,
    &#39;Favorite_thing&#39;: Favorite_thing_receive,
    &#39;Good_thing&#39;: Good_thing_receive,
    &#39;First_values&#39;: First_values_receive,
    &#39;World_needs&#39;: World_needs_receive
}

db.mypage.insert_one(doc)

return jsonify({&#39;msg&#39;: &#39;기록 완료!&#39;})</code></pre><pre><code>
- javascript
``` javascript
function recording() {
    let Name = $(&#39;#Name&#39;).val()
    let Introduce = $(&#39;#Introduce&#39;).val()
    let Goal = $(&#39;#Goal&#39;).val()
    let Favorite_thing = $(&#39;#Favorite_thing&#39;).val()
    let Good_thing = $(&#39;#Good_thing&#39;).val()
    let First_values = $(&#39;#First_values&#39;).val()
    let World_needs = $(&#39;#World_needs&#39;).val()

    $.ajax({
        type: &#39;POST&#39;,
        url: &#39;/mypage&#39;,
        data: {
            Name_give: Name,
            Introduce_give: Introduce,
            Goal_give: Goal,
            Favorite_thing_give: Favorite_thing,
            Good_thing_give: Good_thing,
            First_values_give: First_values,
            World_needs_give: World_needs
        },
        success: function (response) {
            alert(response[&#39;msg&#39;])
            // 새로고침
            window.location.reload()
        }
    });
}</code></pre><ul>
<li>html<pre><code class="language-html">&lt;table&gt;
  &lt;tbody&gt;
  &lt;tr class=&quot;tr1&quot;&gt;
      &lt;td&gt;
          &lt;label for=&quot;Name&quot;&gt;이름&lt;/label&gt;
      &lt;/td&gt;
      &lt;td&gt;
          &lt;p&gt;&lt;input type=&quot;text&quot; id=&quot;Name&quot; class=&quot;input-name&quot; value=&quot;&quot;/&gt;&lt;/p&gt;
      &lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr class=&quot;tr1&quot;&gt;
      &lt;td&gt;프로필 이미지&lt;/td&gt;
      &lt;td&gt;
          &lt;p&gt;&lt;input type=&quot;file&quot; class=&quot;input-image&quot; onchange=&quot;readURL(this);&quot;&gt;&lt;/p&gt;
          &lt;p&gt;&lt;img id=&quot;preview&quot; width=&quot;200px&quot; height=&quot;200px&quot;/&gt;&lt;/p&gt;
      &lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr class=&quot;tr1&quot;&gt;
      &lt;td&gt;
          &lt;label for=&quot;Introduce&quot;&gt;나를 표현하는 한 문장&lt;/label&gt;
      &lt;/td&gt;
      &lt;td&gt;
          &lt;p&gt;&lt;textarea id=&quot;Introduce&quot; class=&quot;input-introduce&quot; value=&quot;&quot;&gt;&lt;/textarea&gt;&lt;/p&gt;
      &lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr class=&quot;tr1&quot;&gt;
      &lt;td&gt;
          &lt;label for=&quot;Goal&quot;&gt;목표&lt;/label&gt;
      &lt;/td&gt;
      &lt;td&gt;
          &lt;p&gt;&lt;textarea id=&quot;Goal&quot; class=&quot;input-goal&quot; value=&quot;&quot;&gt;&lt;/textarea&gt;&lt;/p&gt;
      &lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr class=&quot;tr1&quot;&gt;
      &lt;td&gt;
          &lt;label for=&quot;Favorite_thing&quot;&gt;좋아하는 것&lt;/label&gt;
      &lt;/td&gt;
      &lt;td&gt;
          &lt;p&gt;&lt;textarea id=&quot;Favorite_thing&quot; class=&quot;input-favorite-thing&quot; value=&quot;&quot;&gt;&lt;/textarea&gt;&lt;/p&gt;
      &lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr class=&quot;tr1&quot;&gt;
      &lt;td&gt;
          &lt;label for=&quot;Good_thing&quot;&gt;잘 하는 것&lt;/label&gt;
      &lt;/td&gt;
      &lt;td&gt;
          &lt;p&gt;&lt;textarea id=&quot;Good_thing&quot; class=&quot;input-good-thing&quot; value=&quot;&quot;&gt;&lt;/textarea&gt;&lt;/p&gt;
      &lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr class=&quot;tr1&quot;&gt;
      &lt;td&gt;
          &lt;label for=&quot;First_values&quot;&gt;우선 가치관&lt;/label&gt;
      &lt;/td&gt;
      &lt;td&gt;
          &lt;p&gt;&lt;textarea id=&quot;First_values&quot; class=&quot;input-first-values&quot; value=&quot;&quot;&gt;&lt;/textarea&gt;&lt;/p&gt;
      &lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr class=&quot;tr1&quot;&gt;
      &lt;td&gt;
          &lt;label for=&quot;World_needs&quot;&gt;세상이 필요로 하는 것&lt;/label&gt;
      &lt;/td&gt;
      &lt;td&gt;
          &lt;p&gt;&lt;textarea id=&quot;World_needs&quot; class=&quot;input-world-needs&quot; value=&quot;&quot;&gt;&lt;/textarea&gt;&lt;/p&gt;
      &lt;/td&gt;
  &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;
&lt;button onclick=&quot;recording()&quot; type=&quot;button&quot;&gt;기록하기&lt;/button&gt;</code></pre>
<h1 id="5-get">5. GET</h1>
</li>
</ul>
]]></description>
        </item>
        <item>
            <title><![CDATA[[웹개발] 서비스 기획안]]></title>
            <link>https://velog.io/@eunjo_ourism/Who-Am-I-%EA%B8%B0%ED%9A%8D%EC%95%88</link>
            <guid>https://velog.io/@eunjo_ourism/Who-Am-I-%EA%B8%B0%ED%9A%8D%EC%95%88</guid>
            <pubDate>Sun, 27 Feb 2022 05:03:01 GMT</pubDate>
            <description><![CDATA[<h1 id="who-am-i">Who Am I?</h1>
<h3 id="부제--personal-branding">부제 | Personal Branding</h3>
<h4 id="span-stylecolor4867a9고민하고-성장하고-성취하는span-과정-속에서-span-stylecolora94848길잡이span가-되어주고-span-stylecolora94848동기span를-부여해-줄-span-stylecolor82b3dewho-am-i-span"><span style="color:#4867a9">고민하고 성장하고 성취하는</span> 과정 속에서 <span style="color:#a94848">길잡이</span>가 되어주고 <span style="color:#a94848">동기</span>를 부여해 줄 <span style="color:#82b3de">Who Am I? </span></h4>
<h4 id="나의-가치관-좋아하는-것-잘하는-것-그리고-세상이-필요로-하는-것을-알고-내가-진심으로-바라는-목표를-세우고-성취하자">나의 가치관, 좋아하는 것, 잘하는 것, 그리고 세상이 필요로 하는 것을 알고, 내가 진심으로 바라는 목표를 세우고 성취하자!</h4>
<blockquote>
<p><em>&quot; 외부의 힘이 깬 알은 생명이 끝나지만 내부의 힘으로 깬 알은 생명이 시작된다. 위대한 것은 항상 자신의 안에서 시작된다. &quot; -짐퀵-</em></p>
</blockquote>
<hr>
<h1 id="프로젝트-레이아웃">프로젝트 레이아웃</h1>
<h2 id="메인-페이지">메인 페이지</h2>
<p><img src="https://images.velog.io/images/eunjo_ourism/post/c74ce70c-c92e-4e29-8695-4aebe96137ff/%EC%8A%AC%EB%9D%BC%EC%9D%B4%EB%93%9C2.JPG" alt=""></p>
<h2 id="모든-브랜드-목록">모든 브랜드 목록</h2>
<p><img src="https://images.velog.io/images/eunjo_ourism/post/e5f3422a-a488-4c1e-aaee-1ee08344b0ba/%EC%8A%AC%EB%9D%BC%EC%9D%B4%EB%93%9C3.JPG" alt=""></p>
<h2 id="다른-사람의-페이지">다른 사람의 페이지</h2>
<p><img src="https://images.velog.io/images/eunjo_ourism/post/56f72301-94a7-47ec-bd75-200ad1936b70/%EC%8A%AC%EB%9D%BC%EC%9D%B4%EB%93%9C4.JPG" alt=""></p>
<h2 id="다른-사람의-페이지---메시지">다른 사람의 페이지 - 메시지</h2>
<p><img src="https://images.velog.io/images/eunjo_ourism/post/cbc80676-bdec-4426-b0df-aa08cad89a52/%EC%8A%AC%EB%9D%BC%EC%9D%B4%EB%93%9C5.JPG" alt=""></p>
<h2 id="마이-페이지">마이 페이지</h2>
<p><img src="https://images.velog.io/images/eunjo_ourism/post/892cda92-c0f2-4b85-9fd3-3c90fa967dde/%EC%8A%AC%EB%9D%BC%EC%9D%B4%EB%93%9C6.JPG" alt=""></p>
<h2 id="마이-페이지---메시지">마이 페이지 - 메시지</h2>
<p><img src="https://images.velog.io/images/eunjo_ourism/post/6c0e47ee-7f78-4b58-8702-7d904d95082f/%EC%8A%AC%EB%9D%BC%EC%9D%B4%EB%93%9C7.JPG" alt=""></p>
<h2 id="마이-페이지---기록">마이 페이지 - 기록</h2>
<p><img src="https://images.velog.io/images/eunjo_ourism/post/b1d3d33e-4543-4a54-8ac8-7b80c242e82a/%EC%8A%AC%EB%9D%BC%EC%9D%B4%EB%93%9C8.JPG" alt=""></p>
<h2 id="마이-페이지---수정">마이 페이지 - 수정</h2>
<p><img src="https://images.velog.io/images/eunjo_ourism/post/eb1c9b28-1aec-4d9a-8582-ac29e6e361fa/%EC%8A%AC%EB%9D%BC%EC%9D%B4%EB%93%9C9.JPG" alt=""><img src="https://images.velog.io/images/eunjo_ourism/post/eafe4308-eec2-4ecc-a786-f51031173ed2/%EC%8A%AC%EB%9D%BC%EC%9D%B4%EB%93%9C10.JPG" alt=""></p>
<h1 id="개발해야-하는-기능들">개발해야 하는 기능들</h1>
<h2 id="메인-페이지-1">메인 페이지</h2>
<p><img src="https://images.velog.io/images/eunjo_ourism/post/c74ce70c-c92e-4e29-8695-4aebe96137ff/%EC%8A%AC%EB%9D%BC%EC%9D%B4%EB%93%9C2.JPG" alt=""></p>
<table>
<thead>
<tr>
<th align="center">기능</th>
<th align="center">Method</th>
<th align="center">URL</th>
<th>Data</th>
<th align="center">반환값</th>
</tr>
</thead>
<tbody><tr>
<td align="center">페이지 조회</td>
<td align="center">GET</td>
<td align="center">/brands</td>
<td></td>
<td align="center">프로필 데이터</td>
</tr>
</tbody></table>
<h2 id="모든-브랜드-목록-1">모든 브랜드 목록</h2>
<p><img src="https://images.velog.io/images/eunjo_ourism/post/e5f3422a-a488-4c1e-aaee-1ee08344b0ba/%EC%8A%AC%EB%9D%BC%EC%9D%B4%EB%93%9C3.JPG" alt=""></p>
<h2 id="다른-사람의-페이지-1">다른 사람의 페이지</h2>
<p><img src="https://images.velog.io/images/eunjo_ourism/post/56f72301-94a7-47ec-bd75-200ad1936b70/%EC%8A%AC%EB%9D%BC%EC%9D%B4%EB%93%9C4.JPG" alt=""></p>
<table>
<thead>
<tr>
<th align="center">기능</th>
<th align="center">Method</th>
<th align="center">URL</th>
<th>Data</th>
<th align="center">반환값</th>
</tr>
</thead>
<tbody><tr>
<td align="center">프로필 조회</td>
<td align="center">GET</td>
<td align="center">/brands/id</td>
<td></td>
<td align="center">프로필 데이터</td>
</tr>
<tr>
<td align="center">프로필 조회</td>
<td align="center">GET</td>
<td align="center">/brands/id</td>
<td></td>
<td align="center">기록 데이터</td>
</tr>
</tbody></table>
<h2 id="다른-사람의-페이지---메시지-1">다른 사람의 페이지 - 메시지</h2>
<p><img src="https://images.velog.io/images/eunjo_ourism/post/cbc80676-bdec-4426-b0df-aa08cad89a52/%EC%8A%AC%EB%9D%BC%EC%9D%B4%EB%93%9C5.JPG" alt=""></p>
<table>
<thead>
<tr>
<th align="center">기능</th>
<th align="center">Method</th>
<th align="center">URL</th>
<th>Data</th>
<th align="center">반환값</th>
</tr>
</thead>
<tbody><tr>
<td align="center">메시지 조회</td>
<td align="center">GET</td>
<td align="center">/brands/id</td>
<td></td>
<td align="center">메시지 리스트</td>
</tr>
<tr>
<td align="center">메시지 작성</td>
<td align="center">POST</td>
<td align="center">/brands/id</td>
<td><code>{&#39;name&#39;:name,&#39;image&#39;:image,&#39;message&#39;:message}</code></td>
<td align="center">작성 메시지 데이터</td>
</tr>
</tbody></table>
<h2 id="마이-페이지-1">마이 페이지</h2>
<p><img src="https://images.velog.io/images/eunjo_ourism/post/892cda92-c0f2-4b85-9fd3-3c90fa967dde/%EC%8A%AC%EB%9D%BC%EC%9D%B4%EB%93%9C6.JPG" alt=""></p>
<table>
<thead>
<tr>
<th align="center">기능</th>
<th align="center">Method</th>
<th align="center">URL</th>
<th>Data</th>
<th align="center">반환값</th>
</tr>
</thead>
<tbody><tr>
<td align="center">프로필 조회</td>
<td align="center">GET</td>
<td align="center">/brands/id</td>
<td></td>
<td align="center">프로필 데이터</td>
</tr>
<tr>
<td align="center">프로필 조회</td>
<td align="center">GET</td>
<td align="center">/brands/id</td>
<td></td>
<td align="center">기록 데이터</td>
</tr>
<tr>
<td align="center">프로필 수정</td>
<td align="center">POST</td>
<td align="center">/brands/id</td>
<td><code>{&#39;image&#39;:image,&#39;name&#39;:name,&#39;career&#39;:career,&#39;title&#39;:title}</code></td>
<td align="center">작성 프로필 데이터</td>
</tr>
</tbody></table>
<h2 id="마이-페이지---메시지-1">마이 페이지 - 메시지</h2>
<p><img src="https://images.velog.io/images/eunjo_ourism/post/6c0e47ee-7f78-4b58-8702-7d904d95082f/%EC%8A%AC%EB%9D%BC%EC%9D%B4%EB%93%9C7.JPG" alt=""></p>
<table>
<thead>
<tr>
<th align="center">기능</th>
<th align="center">Method</th>
<th align="center">URL</th>
<th>Data</th>
<th align="center">반환값</th>
</tr>
</thead>
<tbody><tr>
<td align="center">메시지 조회</td>
<td align="center">GET</td>
<td align="center">/brands/id</td>
<td></td>
<td align="center">메시지 데이터</td>
</tr>
<tr>
<td align="center">메시지 삭제</td>
<td align="center">GET</td>
<td align="center">/brands/id</td>
<td></td>
<td align="center">메시지 데이터</td>
</tr>
<tr>
<td align="center">메시지 작성</td>
<td align="center">POST</td>
<td align="center">/brands/id</td>
<td><code>{&#39;name&#39;:name,&#39;image&#39;:image,&#39;message&#39;:message}</code></td>
<td align="center">작성 메시지 데이터</td>
</tr>
</tbody></table>
<h2 id="마이-페이지---기록-1">마이 페이지 - 기록</h2>
<p><img src="https://images.velog.io/images/eunjo_ourism/post/b1d3d33e-4543-4a54-8ac8-7b80c242e82a/%EC%8A%AC%EB%9D%BC%EC%9D%B4%EB%93%9C8.JPG" alt=""></p>
<table>
<thead>
<tr>
<th align="center">기능</th>
<th align="center">Method</th>
<th align="center">URL</th>
<th>Data</th>
<th align="center">반환값</th>
</tr>
</thead>
<tbody><tr>
<td align="center">기록 조회</td>
<td align="center">GET</td>
<td align="center">/brands/id</td>
<td></td>
<td align="center">기록 데이터</td>
</tr>
<tr>
<td align="center">기록 편집</td>
<td align="center">POST</td>
<td align="center">/brands/id</td>
<td><code>{&#39;goal&#39;:goal,&#39;purpose&#39;:purpose,&#39;favorite_thing&#39;:favorite_thing,&#39;favorite_thing_content&#39;:favorite_thing_content,&#39;good_thing&#39;:good_thing,&#39;good_thing_content&#39;:good_thing_content,&#39;first_values&#39;:first_values,&#39;first_values_content&#39;:first_values_content,&#39;world_needs&#39;:world_needs,&#39;world_needs_content&#39;:world_needs_content}</code></td>
<td align="center">작성 기록 데이터</td>
</tr>
</tbody></table>
<h2 id="마이-페이지---수정-1">마이 페이지 - 수정</h2>
<p><img src="https://images.velog.io/images/eunjo_ourism/post/eb1c9b28-1aec-4d9a-8582-ac29e6e361fa/%EC%8A%AC%EB%9D%BC%EC%9D%B4%EB%93%9C9.JPG" alt=""><img src="https://images.velog.io/images/eunjo_ourism/post/eafe4308-eec2-4ecc-a786-f51031173ed2/%EC%8A%AC%EB%9D%BC%EC%9D%B4%EB%93%9C10.JPG" alt=""></p>
]]></description>
        </item>
        <item>
            <title><![CDATA[지니뮤직 1~50 순위 크롤링 하기]]></title>
            <link>https://velog.io/@eunjo_ourism/%EC%A7%80%EB%8B%88%EB%AE%A4%EC%A7%81-%ED%81%AC%EB%A1%A4%EB%A7%81-jbhboxba</link>
            <guid>https://velog.io/@eunjo_ourism/%EC%A7%80%EB%8B%88%EB%AE%A4%EC%A7%81-%ED%81%AC%EB%A1%A4%EB%A7%81-jbhboxba</guid>
            <pubDate>Fri, 25 Feb 2022 06:03:31 GMT</pubDate>
            <description><![CDATA[<h1 id="1-파이썬-패키지">1. 파이썬 패키지</h1>
<h2 id="1-1-패키지란">1-1. 패키지란?</h2>
<p>Python 에서 패키지는 모듈(일종의 기능들 묶음)을 모아 놓은 단위이다. 이런 패키지 의 묶음을 라이브러리 라고 볼 수 있다. 즉 외부 라이브러리를 사용하기 위해서 패키지를 설치해야 한다. </p>
<h2 id="1-2-request-라이브러리">1-2. request 라이브러리</h2>
<h3 id="1-request">1) request</h3>
<p>request는 파이썬으로 HTTP 호출하는 프로그램을 작성할 때 가장 많이 사용되는 라이브러리이다. HTTP, HTTPS 웹 사이트에 요청하기 위해 사용되는 모듈 중 하나이다.</p>
<pre><code class="language-python">GET 방식: request.get()
POST 방식: request.post()</code></pre>
<h3 id="2-사용방법">2) 사용방법</h3>
<pre><code class="language-python">import requests                            # request 라이브러리 불러오기
data = requests.get(&#39;요청 할 url 입력&#39;)    # 특정 변수에 get 방식으로 데이터 가져오기</code></pre>
<h3 id="3-헤더-값-추가">3) 헤더 값 추가</h3>
<p>User-Agent 값이 없으면 서버에서 응답 값을 내주지 않는 경우가 있다. 이 경우 HTTP 요청에 headers 값을 추가해야 한다.</p>
<blockquote>
<h4 id="크롬-user-agent-값-확인하기">크롬 User-Agent 값 확인하기</h4>
</blockquote>
<ol>
<li>크롬 개발자 도구[단축키 F12] 들어가기</li>
<li>Console 창에 navigator.userAgent 입력
<img src="https://images.velog.io/images/eunjo_ourism/post/8bc69279-f441-4b72-a0dc-a498d46be23f/image.png" alt="">→ &#39;Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.102 Safari/537.36&#39;<h4 id="헤더-값-추가하기">헤더 값 추가하기</h4>
<pre><code class="language-python">import requests
headers = {&#39;User-Agent&#39;:&#39;Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.102 Safari/537.36&#39;}
data = requests.get(&#39;요청 할 url 입력&#39;,headers=headers)</code></pre>
</li>
</ol>
<h2 id="1-3-bs4-라이브러리">1-3. bs4 라이브러리</h2>
<h3 id="1-bs4beautifulsoup4">1) bs4(BeautifulSoup4)</h3>
<p>bs4란 웹에서 가져온 HTML 코드를 파이썬에서 사용하기 편하게 비슷한 분류의 데이터별로 나누어주는 라이브러리이다.</p>
<h3 id="2-사용방법-1">2) 사용방법</h3>
<pre><code class="language-python">import requests                                    # requests 불러오기
from bs4 import BeautifulSoup                    # bs4에 있는 BeatifulSoup 불러오기

data = requests.get(&#39;요청 할 url 입력&#39;)            # requests 사용
soup = BeatifulSoup(data.text,&#39;html.parser&#39;)    # BeatifulSoup    사용</code></pre>
<pre><code class="language-python">- data.text : data로 얻은 html을 문자열로 반환하는 것을 의미
- &#39;html.parser&#39; : 기본적으로 내장되어 있는 분류 방식(parser) 사용
→ 이 외에도 lxml, xml 등의 분류 방식이 있음</code></pre>
<h1 id="2-파이썬-패키지-설치하기">2. 파이썬 패키지 설치하기</h1>
<ol>
<li>파일 &gt; 설정 &gt; +
<img src="https://images.velog.io/images/eunjo_ourism/post/c3df49d7-2c24-4eee-9eaf-e0ae75743735/image.png" alt=""></li>
<li>requests 검색 &gt; 패키지 설치
<img src="https://images.velog.io/images/eunjo_ourism/post/9ffe0148-2ffa-47fb-9680-1c160ced0107/image.png" alt=""></li>
<li>같은 방법으로 bs4 설치
<img src="https://images.velog.io/images/eunjo_ourism/post/761c1a83-6f9a-47bf-9722-50535eb4d55f/image.png" alt=""></li>
</ol>
<h1 id="3-지니-뮤직-크롤링-하기">3. 지니 뮤직 크롤링 하기</h1>
<p>아래와 같이 나오도록 <a href="https://www.genie.co.kr/chart/top200?ditc=M&amp;rtm=N&amp;ymd=20210701">지니 뮤직</a> 크롤링 하기!</p>
<pre><code>1 바라만 본다 MSG워너비 (M.O.M)
2 Next Level aespa
3 신호등 이무진
4 Weekend 태연 (TAEYEON)
5 치맛바람 (Chi Mat Ba Ram) 브레이브걸스 (Brave girls)
6 Butter 방탄소년단
7 나를 아는 사람 MSG워너비 (정상동기)
8 Permission to Dance 방탄소년단
9 비 오는 날 듣기 좋은 노래 (Feat. Colde) 에픽하이 (EPIK HIGH)
10 헤픈 우연 헤이즈 (Heize)
11 하루만 더 빅마마 (Big Mama)
12 비와 당신 이무진
13 Alcohol-Free TWICE (트와이스)
14 롤린 (Rollin&#39;) 브레이브걸스 (Brave girls)
15 Peaches (Feat. Daniel Caesar &amp; Giveon) Justin Bieber
16 Dun Dun Dance 오마이걸 (OH MY GIRL)
17 Dynamite 방탄소년단
18 라일락 아이유 (IU)
19 안녕 (Hello) 조이 (JOY)
20 추적이는 여름 비가 되어 장범준
21 운전만해 (We Ride) 브레이브걸스 (Brave girls)
22 Celebrity 아이유 (IU)
23 러브 (Prod. by 로코베리) 로꼬 &amp; 이성경
24 Bad Habits Ed Sheeran
25 상상더하기 MSG워너비
26 ASAP STAYC (스테이씨)
27 상상더하기 라붐 (LABOUM)
28 밤이 되니까 원슈타인
29 Timeless SG워너비
30 좋아좋아 조정석
31 Savage Love (Laxed - Siren Beat) (BTS Remix) Jawsh 685 &amp; Jason Derulo &amp; 방탄소년단
32 다정히 내 이름을 부르면 경서예지 &amp; 전건호
33 내 손을 잡아 아이유 (IU)
34 사이렌 Remix (Feat. UNEDUCATED KID &amp; Paul Blanco) 호미들
35 At My Worst Pink Sweat$
36 작은 것들을 위한 시 (Boy With Luv) (Feat. Halsey) 방탄소년단
37 OHAYO MY NIGHT 디핵 (D-Hack) &amp; PATEKO
38 가을 우체국 앞에서 김대명
39 나는 너 좋아 장범준
40 멜로디 ASH ISLAND
41 Blueming 아이유 (IU)
42 밝게 빛나는 별이 되어 비춰줄게 송이한
43 에잇 (Prod. &amp; Feat. SUGA of BTS) 아이유 (IU)
44 2002 Anne-Marie
45 LOVE DAY (2021) (바른연애 길잡이 X 양요섭, 정은지) 양요섭 &amp; 정은지
46 아로하 조정석
47 흔들리는 꽃들 속에서 네 샴푸향이 느껴진거야 장범준
48 이제 나만 믿어요 임영웅
49 낙하 (With 아이유) AKMU (악뮤)
50 Off My Face Justin Bieber</code></pre><h2 id="3-1-크롤링-기본-셋팅">3-1. 크롤링 기본 셋팅</h2>
<h4 id="1-request-라이브러리-셋팅">1. request 라이브러리 셋팅</h4>
<pre><code class="language-python"># 1) requests 라이브러리 import
import requests

# 2) headers란 변수에 User-Agent 값 넣기
headers = {&#39;User-Agent&#39; : &#39;Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.102 Safari/537.36&#39;}

# 3) url을 이용해 get 방식으로 HTML 문서 요청
data = requests.get(&#39;https://www.genie.co.kr/chart/top200?ditc=M&amp;rtm=N&amp;ymd=20210701&#39;,headers=headers)</code></pre>
<h4 id="2-bs4-라이브러리-셋팅">2. bs4 라이브러리 셋팅</h4>
<pre><code class="language-python">import requests

# 1) bs4 에서 BeautifulSoup 불러오기
from bs4 import BeautifulSoup

headers = {&#39;User-Agent&#39; : &#39;Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.102 Safari/537.36&#39;}
data = requests.get(&#39;https://www.genie.co.kr/chart/top200?ditc=M&amp;rtm=N&amp;ymd=20210701&#39;,headers=headers)

# 2-1) data에서 받은 HTML 문서를 text(문자열) 형식으로 반환해서 
# 2-2) 파이썬이 읽을 수 있는 태그 기반 html 구조로 변환
soup = BeautifulSoup(data.text, &#39;html.parser&#39;)</code></pre>
<h2 id="3-2-가져올-데이터-위치-파악">3-2. 가져올 데이터 위치 파악</h2>
<h4 id="1-rank">1. rank</h4>
<p>1) 개발자 도구 → 아래 그림에서 1번 누르기 → 순위가 적혀 있는 부분 클릭
<img src="https://images.velog.io/images/eunjo_ourism/post/003c6755-2725-443f-a8e8-6e0b19f5f02c/image.png" alt="">
2) 개발자 도구 Elements 에 표시된 줄 더블 클릭 → Copy → Copy selector
<img src="https://images.velog.io/images/eunjo_ourism/post/32d319f1-4a5f-4a1d-9a49-7c6248a88a2c/image.png" alt="">
3) 같은 방식으로 2순위 부분도 Copy selector
4) 순위 위치 파악</p>
<pre><code class="language-python">rank 1 selector: #body-content &gt; div.newest-list &gt; div &gt; table &gt; tbody &gt; tr:nth-child(1) &gt; td.number
rank 2 selector: #body-content &gt; div.newest-list &gt; div &gt; table &gt; tbody &gt; tr:nth-child(2) &gt; td.number</code></pre>
<h4 id="2-title">2. title</h4>
<p>위와 같은 방법으로 2개의 노래 제목 Copy selector</p>
<pre><code class="language-python">rank 1 selector: #body-content &gt; div.newest-list &gt; div &gt; table &gt; tbody &gt; tr:nth-child(1) &gt; td.info &gt; a.title.ellipsis
rank 2 selector: #body-content &gt; div.newest-list &gt; div &gt; table &gt; tbody &gt; tr:nth-child(2) &gt; td.info &gt; a.title.ellipsis</code></pre>
<h4 id="3-artist">3. artist</h4>
<p>2개의 노래 가수 Copy selector</p>
<pre><code class="language-python">rank 1 selector: #body-content &gt; div.newest-list &gt; div &gt; table &gt; tbody &gt; tr:nth-child(1) &gt; td.info &gt; a.artist.ellipsis
rank 2 selector: #body-content &gt; div.newest-list &gt; div &gt; table &gt; tbody &gt; tr:nth-child(2) &gt; td.info &gt; a.artist.ellipsis</code></pre>
<h4 id="4-태그-파악">4. 태그 파악</h4>
<p>rank, title, artist 모두 아래 태그까지 동일</p>
<pre><code class="language-python">#body-content &gt; div.newest-list &gt; div &gt; table &gt; tbody &gt; tr</code></pre>
<h2 id="3-3-데이터-선택해서-가져오기">3-3. 데이터 선택해서 가져오기</h2>
<h4 id="1-필요한-데이터-선택해서-가져오기">1. 필요한 데이터 선택해서 가져오기</h4>
<pre><code class="language-python">import requests
from bs4 import BeautifulSoup

headers = {&#39;User-Agent&#39; : &#39;Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.102 Safari/537.36&#39;}
data = requests.get(&#39;https://www.genie.co.kr/chart/top200?ditc=M&amp;rtm=N&amp;ymd=20210701&#39;,headers=headers)

soup = BeautifulSoup(data.text, &#39;html.parser&#39;)

# trs 라는 변수에 아래 경로에 있는 모든 tr 태그 안에 있는 정보 가져오기
trs = soup.select(&#39;#body-content &gt; div.newest-list &gt; div &gt; table &gt; tbody &gt; tr&#39;)</code></pre>
<pre><code class="language-python">trs에는 다음과 같이 리스트 형식으로 저장한다.

trs[0]에는 tr:nth-child(1)에 포함되는 정보를,
trs[1]에는 tr:nth-child(2)에 포함되는 정보를,
trs[2]에는 tr:nth-child(3)에 포함되는 정보를,
trs[3]에는 tr:nth-child(4)에 포함되는 정보를,
...
trs[49]에는 tr:nth-child(50)에 포함되는 정보를 저장한다.</code></pre>
<h4 id="2-반복문을-이용해-rank-title-artist-데이터-선택하기">2. 반복문을 이용해 rank, title, artist 데이터 선택하기</h4>
<p>trs은 trs[0]~trs[49]까지 총 50개의 요소가 저장된 리스트 이므로 반복문을 사용해 필요한 정보를 선택해 가져올 수 있다.</p>
<pre><code class="language-python">- rank 위치: tr &gt; td.number
- title 위치: tr &gt; td.info &gt; a.title.ellipsis
- artist 위치: tr &gt; td.info &gt; a.artist.ellipsis</code></pre>
<pre><code class="language-python">import requests
from bs4 import BeautifulSoup

headers = {&#39;User-Agent&#39; : &#39;Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.102 Safari/537.36&#39;}
data = requests.get(&#39;https://www.genie.co.kr/chart/top200?ditc=M&amp;rtm=N&amp;ymd=20210701&#39;,headers=headers)

soup = BeautifulSoup(data.text, &#39;html.parser&#39;)

trs = soup.select(&#39;#body-content &gt; div.newest-list &gt; div &gt; table &gt; tbody &gt; tr&#39;)

# trs[0]부터 trs[49]까지 순서대로 돌면서
for tr in trs:
    # 클래스명이 number인 td태그의 text를 변수 rank에 담는다.
    rank = tr.select_one(&#39;td.number&#39;).text
    # a.title.ellipsis에 위치한 text를 변수 title에 담는다.
    title = tr.select_one(&#39;a.title.ellipsis&#39;).text
    # a.artist.ellipsis에 위치한 text를 변수 artist에 담는다.
    artist = tr.select_one(&#39;a.artist.ellipsis&#39;).text</code></pre>
<h2 id="3-4-데이터-출력하기">3-4. 데이터 출력하기</h2>
<h4 id="1-출력-해-보기">1. 출력 해 보기</h4>
<pre><code class="language-python">import requests
from bs4 import BeautifulSoup

headers = {&#39;User-Agent&#39; : &#39;Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.102 Safari/537.36&#39;}
data = requests.get(&#39;https://www.genie.co.kr/chart/top200?ditc=M&amp;rtm=N&amp;ymd=20210701&#39;,headers=headers)

soup = BeautifulSoup(data.text, &#39;html.parser&#39;)

trs = soup.select(&#39;#body-content &gt; div.newest-list &gt; div &gt; table &gt; tbody &gt; tr&#39;)

# trs[0]부터 trs[49]까지 순서대로 돌면서
for tr in trs:
    rank = tr.select_one(&#39;td.number&#39;).text
    title = tr.select_one(&#39;a.title.ellipsis&#39;).text
    artist = tr.select_one(&#39;a.artist.ellipsis&#39;).text

    # rank, title, artist 출력
    print(rank, title, artist)</code></pre>
<pre><code>1


20상승









                                    바라만 본다 MSG워너비 (M.O.M)
2


유지









                                    Next Level aespa

...

50


13하강









                                    Off My Face Justin Bieber</code></pre><h4 id="2-rank-title-여백-제거">2. rank, title 여백 제거</h4>
<pre><code class="language-python">import requests
from bs4 import BeautifulSoup

headers = {&#39;User-Agent&#39; : &#39;Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.102 Safari/537.36&#39;}
data = requests.get(&#39;https://www.genie.co.kr/chart/top200?ditc=M&amp;rtm=N&amp;ymd=20210701&#39;,headers=headers)

soup = BeautifulSoup(data.text, &#39;html.parser&#39;)

trs = soup.select(&#39;#body-content &gt; div.newest-list &gt; div &gt; table &gt; tbody &gt; tr&#39;)

for tr in trs:
    rank = tr.select_one(&#39;td.number&#39;).text.strip()
    title = tr.select_one(&#39;a.title.ellipsis&#39;).text.strip()
    artist = tr.select_one(&#39;a.artist.ellipsis&#39;).text

    print(rank, title, artist)</code></pre>
<pre><code>1


20상승 바라만 본다 MSG워너비 (M.O.M)
2


유지 Next Level aespa

...

50


13하강 Off My Face Justin Bieber</code></pre><h4 id="3-rank-순위만-출력">3. rank 순위만 출력</h4>
<pre><code class="language-python">import requests
from bs4 import BeautifulSoup

headers = {&#39;User-Agent&#39; : &#39;Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.102 Safari/537.36&#39;}
data = requests.get(&#39;https://www.genie.co.kr/chart/top200?ditc=M&amp;rtm=N&amp;ymd=20210701&#39;,headers=headers)

soup = BeautifulSoup(data.text, &#39;html.parser&#39;)

trs = soup.select(&#39;#body-content &gt; div.newest-list &gt; div &gt; table &gt; tbody &gt; tr&#39;)

for tr in trs:
    rank = tr.select_one(&#39;td.number&#39;).text[0:2].strip()
    title = tr.select_one(&#39;a.title.ellipsis&#39;).text.strip()
    artist = tr.select_one(&#39;a.artist.ellipsis&#39;).text

    print(rank, title, artist)</code></pre>
<pre><code>1 바라만 본다 MSG워너비 (M.O.M)
2 Next Level aespa
3 신호등 이무진
4 Weekend 태연 (TAEYEON)
5 치맛바람 (Chi Mat Ba Ram) 브레이브걸스 (Brave girls)
6 Butter 방탄소년단
7 나를 아는 사람 MSG워너비 (정상동기)
8 Permission to Dance 방탄소년단
9 비 오는 날 듣기 좋은 노래 (Feat. Colde) 에픽하이 (EPIK HIGH)
10 헤픈 우연 헤이즈 (Heize)
11 하루만 더 빅마마 (Big Mama)
12 비와 당신 이무진
13 Alcohol-Free TWICE (트와이스)
14 롤린 (Rollin&#39;) 브레이브걸스 (Brave girls)
15 19금




                                    Peaches (Feat. Daniel Caesar &amp; Giveon) Justin Bieber
16 Dun Dun Dance 오마이걸 (OH MY GIRL)
17 Dynamite 방탄소년단
18 라일락 아이유 (IU)
19 안녕 (Hello) 조이 (JOY)
20 추적이는 여름 비가 되어 장범준
21 운전만해 (We Ride) 브레이브걸스 (Brave girls)
22 Celebrity 아이유 (IU)
23 러브 (Prod. by 로코베리) 로꼬 &amp; 이성경
24 Bad Habits Ed Sheeran
25 상상더하기 MSG워너비
26 ASAP STAYC (스테이씨)
27 상상더하기 라붐 (LABOUM)
28 밤이 되니까 원슈타인
29 Timeless SG워너비
30 좋아좋아 조정석
31 Savage Love (Laxed - Siren Beat) (BTS Remix) Jawsh 685 &amp; Jason Derulo &amp; 방탄소년단
32 다정히 내 이름을 부르면 경서예지 &amp; 전건호
33 내 손을 잡아 아이유 (IU)
34 사이렌 Remix (Feat. UNEDUCATED KID &amp; Paul Blanco) 호미들
35 At My Worst Pink Sweat$
36 작은 것들을 위한 시 (Boy With Luv) (Feat. Halsey) 방탄소년단
37 OHAYO MY NIGHT 디핵 (D-Hack) &amp; PATEKO
38 가을 우체국 앞에서 김대명
39 나는 너 좋아 장범준
40 멜로디 ASH ISLAND
41 Blueming 아이유 (IU)
42 밝게 빛나는 별이 되어 비춰줄게 송이한
43 에잇 (Prod. &amp; Feat. SUGA of BTS) 아이유 (IU)
44 2002 Anne-Marie
45 LOVE DAY (2021) (바른연애 길잡이 X 양요섭, 정은지) 양요섭 &amp; 정은지
46 아로하 조정석
47 흔들리는 꽃들 속에서 네 샴푸향이 느껴진거야 장범준
48 이제 나만 믿어요 임영웅
49 낙하 (With 아이유) AKMU (악뮤)
50 Off My Face Justin Bieber</code></pre><h4 id="4-title에-19금-문자열-지우기">4. title에 &quot;19금&quot; 문자열 지우기</h4>
<pre><code class="language-python">import requests
from bs4 import BeautifulSoup

headers = {&#39;User-Agent&#39; : &#39;Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.102 Safari/537.36&#39;}
data = requests.get(&#39;https://www.genie.co.kr/chart/top200?ditc=M&amp;rtm=N&amp;ymd=20210701&#39;,headers=headers)

soup = BeautifulSoup(data.text, &#39;html.parser&#39;)

trs = soup.select(&#39;#body-content &gt; div.newest-list &gt; div &gt; table &gt; tbody &gt; tr&#39;)

for tr in trs:
    rank = tr.select_one(&#39;td.number&#39;).text[0:2].strip()

    title = tr.select_one(&#39;a.title.ellipsis&#39;).text.strip()

    # 만약 title에 &quot;19금&quot; 문자열이 있다면
    if &quot;19금&quot; in title:
        # &quot;19금&quot; 문자열 지우고
        title = title.strip(&quot;19금&quot;)
        # title 양쪽 여백 지우기
        title = title.strip()

    artist = tr.select_one(&#39;a.artist.ellipsis&#39;).text

    print(rank, title, artist)</code></pre>
<h1 id="최종-코드">최종 코드</h1>
<pre><code class="language-python">import requests
from bs4 import BeautifulSoup

headers = {&#39;User-Agent&#39; : &#39;Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.102 Safari/537.36&#39;}
data = requests.get(&#39;https://www.genie.co.kr/chart/top200?ditc=M&amp;rtm=N&amp;ymd=20210701&#39;,headers=headers)

soup = BeautifulSoup(data.text, &#39;html.parser&#39;)

trs = soup.select(&#39;#body-content &gt; div.newest-list &gt; div &gt; table &gt; tbody &gt; tr&#39;)

for tr in trs:
    rank = tr.select_one(&#39;td.number&#39;).text[0:2].strip()

    title = tr.select_one(&#39;a.title.ellipsis&#39;).text.strip()

    if &quot;19금&quot; in title:
        title = title.strip(&quot;19금&quot;)
        title = title.strip()

    artist = tr.select_one(&#39;a.artist.ellipsis&#39;).text

    print(rank, title, artist)</code></pre>
<h1 id="실행-결과">실행 결과</h1>
<pre><code>1 바라만 본다 MSG워너비 (M.O.M)
2 Next Level aespa
3 신호등 이무진
4 Weekend 태연 (TAEYEON)
5 치맛바람 (Chi Mat Ba Ram) 브레이브걸스 (Brave girls)
6 Butter 방탄소년단
7 나를 아는 사람 MSG워너비 (정상동기)
8 Permission to Dance 방탄소년단
9 비 오는 날 듣기 좋은 노래 (Feat. Colde) 에픽하이 (EPIK HIGH)
10 헤픈 우연 헤이즈 (Heize)
11 하루만 더 빅마마 (Big Mama)
12 비와 당신 이무진
13 Alcohol-Free TWICE (트와이스)
14 롤린 (Rollin&#39;) 브레이브걸스 (Brave girls)
15 Peaches (Feat. Daniel Caesar &amp; Giveon) Justin Bieber
16 Dun Dun Dance 오마이걸 (OH MY GIRL)
17 Dynamite 방탄소년단
18 라일락 아이유 (IU)
19 안녕 (Hello) 조이 (JOY)
20 추적이는 여름 비가 되어 장범준
21 운전만해 (We Ride) 브레이브걸스 (Brave girls)
22 Celebrity 아이유 (IU)
23 러브 (Prod. by 로코베리) 로꼬 &amp; 이성경
24 Bad Habits Ed Sheeran
25 상상더하기 MSG워너비
26 ASAP STAYC (스테이씨)
27 상상더하기 라붐 (LABOUM)
28 밤이 되니까 원슈타인
29 Timeless SG워너비
30 좋아좋아 조정석
31 Savage Love (Laxed - Siren Beat) (BTS Remix) Jawsh 685 &amp; Jason Derulo &amp; 방탄소년단
32 다정히 내 이름을 부르면 경서예지 &amp; 전건호
33 내 손을 잡아 아이유 (IU)
34 사이렌 Remix (Feat. UNEDUCATED KID &amp; Paul Blanco) 호미들
35 At My Worst Pink Sweat$
36 작은 것들을 위한 시 (Boy With Luv) (Feat. Halsey) 방탄소년단
37 OHAYO MY NIGHT 디핵 (D-Hack) &amp; PATEKO
38 가을 우체국 앞에서 김대명
39 나는 너 좋아 장범준
40 멜로디 ASH ISLAND
41 Blueming 아이유 (IU)
42 밝게 빛나는 별이 되어 비춰줄게 송이한
43 에잇 (Prod. &amp; Feat. SUGA of BTS) 아이유 (IU)
44 2002 Anne-Marie
45 LOVE DAY (2021) (바른연애 길잡이 X 양요섭, 정은지) 양요섭 &amp; 정은지
46 아로하 조정석
47 흔들리는 꽃들 속에서 네 샴푸향이 느껴진거야 장범준
48 이제 나만 믿어요 임영웅
49 낙하 (With 아이유) AKMU (악뮤)
50 Off My Face Justin Bieber</code></pre>]]></description>
        </item>
        <item>
            <title><![CDATA[python - 기본문법]]></title>
            <link>https://velog.io/@eunjo_ourism/python-%EA%B8%B0%EB%B3%B8%EB%AC%B8%EB%B2%95</link>
            <guid>https://velog.io/@eunjo_ourism/python-%EA%B8%B0%EB%B3%B8%EB%AC%B8%EB%B2%95</guid>
            <pubDate>Sun, 20 Feb 2022 11:02:07 GMT</pubDate>
            <description><![CDATA[<h1 id="1-변수">1. 변수</h1>
<h2 id="1-1-변수">1-1. 변수</h2>
<h3 id="1-변수란">1) 변수란?</h3>
<blockquote>
</blockquote>
<p>데이터를 담는 박스이자 언제든지 값을 변경할 수 있는 수.</p>
<h3 id="2-변수이름">2) 변수이름</h3>
<blockquote>
</blockquote>
<p>변수의 이름은 데이터의 의미를 가장 잘 설명해야 한다.</p>
<h4 id="변수이름-명명-규칙">변수이름 명명 규칙</h4>
<ol>
<li>대문자와 소문자를 구분한다.</li>
<li>알파벳, 숫자, 밑줄을 사용하여 만들 수 있다.</li>
<li>변수명 중간에 공백이 들어가면 안 된다.</li>
<li>숫자로 시작할 수 없다.</li>
<li>예약어는 변수로 사용할 수 없다.
(and, as, break, True, False, class 등)</li>
</ol>
<h2 id="1-2-대입문">1-2. 대입문</h2>
<blockquote>
</blockquote>
<h4 id="대입문할당문이란">대입문(할당문)이란?</h4>
<p>컴퓨터 내부에서 변수에 값을 할당하는 문장. javascript와 달리 let으로 변수를 선언하지 않는다.</p>
<ul>
<li>할당 형식
= : 변수에 값을 저장한다는 의미<ol>
<li>변수 = 값(상수)</li>
<li>변수 = 변수</li>
<li>변수 = 수식<pre><code class="language-python">&lt;예시&gt;
a = 1        # a = 1
b = a        # b = 1
c = a + b    # c = 2</code></pre>
</li>
</ol>
</li>
</ul>
<h2 id="1-3-연산">1-3. 연산</h2>
<h3 id=""></h3>
<blockquote>
</blockquote>
<h4 id="산술-연산">산술 연산</h4>
<ul>
<li>덧셈(+)</li>
<li>뺄셈(-)</li>
<li>곱셈(*)</li>
<li>나눗셈(/)</li>
<li>몫(//)</li>
<li>나머지(%)</li>
<li>지수승(**)<h4 id="연산자-우선-순위">연산자 우선 순위</h4>
</li>
</ul>
<ol>
<li>()</li>
<li>**</li>
<li>*, /, //, %</li>
<li>+, -<h4 id="복합-대입-연산자">복합 대입 연산자</h4>
→ 연산과 할당을 동시에 수행<pre><code class="language-python">         연산자            복합대입연산자
덧셈            a = a + b        a += b
뺄셈            a = a - b        a -+ b
곱셈            a = a * b        a *= b
나눗셈        a = a / b        a /= b
몫            a = a // b        a //= b
나머지        a = a % b        a %= b
지수승        a = a ** b        a **= b</code></pre>
<h4 id="관계연산자">관계연산자</h4>
→ 조건식에서 두 개의 피연산자를 비교할 때 사용<pre><code class="language-python">연산            의미
x == y        x와 y가 같은가?
x != y        x와 y가 다른가?
x &gt; y        x가 y보다 큰가?
x &lt; y        x가 y보다 작은가?
x &gt;= y        x가 y보다 크거나 같은가?
x &lt;= y        x가 y보다 작거나 같은가?</code></pre>
<h4 id="논리연산자">논리연산자</h4>
→ 여러 개의 조건을 조합해 조건식을 판단할 때 사용
```python
&lt;AND 연산&gt;
예) x and y</li>
</ol>
<ul>
<li>x와 y가 모두 참이면 참. 그렇지 않으면 거짓</li>
<li>x가 거짓이면 y는 계산하지 않고 거짓으로 판명
<code></code>python
&lt;OR 연산&gt;
예) x or y</li>
<li>x나 y 중에서 하나만 참이면 참. 모두 거짓이면 거짓</li>
<li>x가 참이면 y는 계산하지 않고 참으로 판명
<code></code>python
&lt;NOT 연산&gt;
예) not x</li>
<li>x가 참이면 거짓, x가 거짓이면 참<pre><code></code></pre></li>
</ul>
<h1 id="2-자료형">2. 자료형</h1>
<h2 id="2-1-숫자-불-문자">2-1. 숫자, 불, 문자</h2>
<blockquote>
</blockquote>
<h4 id="숫자">숫자</h4>
<pre><code class="language-python">n1 = 1000        # 정수     int
n2 = 1.5        # 지수     float
n2 = 21 + 3j    # 복소수    complex</code></pre>
<h4 id="불">불</h4>
<p>: 참, 거짓을 표현하는 자료형</p>
<pre><code class="language-python">a = True
b = False</code></pre>
<h4 id="문자">문자</h4>
<pre><code class="language-python">a = &#39;hello!&#39;</code></pre>
<h2 id="2-1-리스트">2-1. 리스트</h2>
<blockquote>
</blockquote>
<h4 id="리스트-생성">리스트 생성</h4>
<ol>
<li>요소를 가진 리스트 생성<pre><code class="language-python">a_list = [2, 3, 1, 4]
b_list = [0]*5</code></pre>
</li>
<li>공백 리스트 생성<pre><code class="language-python">a_list = []
b_list = list()</code></pre>
</li>
</ol>
<h2 id="2-2-딕셔너리-형">2-2. 딕셔너리 형</h2>
<blockquote>
</blockquote>
<h4 id="-1"></h4>
<p>키와 값을 한 쌍으로 저장하는 자료 구조</p>
<pre><code class="language-python">- 키(Key): 중복 불가
- 값(Value): 중복 허용</code></pre>
<h4 id="딕셔너리-생성">딕셔너리 생성</h4>
<pre><code class="language-python">a_dic = {}
a_dic = {&#39;name&#39;: &#39;eunju&#39;, &#39;age&#39;: 23}</code></pre>
<h1 id="3-함수">3. 함수</h1>
<blockquote>
</blockquote>
<h4 id="함수-정의">함수 정의</h4>
<pre><code class="language-python">def 함수이름(매개변수):
    명령문
    ...
    return 반환값</code></pre>
<h4 id="함수-호출">함수 호출</h4>
<pre><code class="language-python">변수 = 함수이름(매개변수)</code></pre>
<h4 id="두-수-a-b의-합을-구하는-함수-예시">두 수 a, b의 합을 구하는 함수 예시</h4>
<ol>
<li>함수 정의<pre><code class="language-python">def add(a,b):
 c = a + b
 return c</code></pre>
</li>
<li>함수 호출<pre><code class="language-python">d = add(2,3)    # d=5</code></pre>
</li>
</ol>
<h1 id="4-조건문">4. 조건문</h1>
<blockquote>
</blockquote>
<h4 id="if">if</h4>
<pre><code class="language-python">if 조건식:     # 조건식을 충족하면 명령문을 실행
    명령문</code></pre>
<h4 id="if---else">if - else</h4>
<pre><code class="language-python">if 조건식:
    명령문
else:        # if 조건식을 충족하지 않는 나머지에 대해 명령문을 수행
    명령문</code></pre>
<h4 id="if---elif">if - elif</h4>
<pre><code class="language-python">if 조건식:        
    명령문
elif 조건식:    # 조건식을 충족하면 명령문을 실행 → 조건을 2개 이상 만들 때 사용
    명령문
elif 조건식:
    명령문</code></pre>
<h4 id="if---elif---else">if - elif - else</h4>
<pre><code class="language-python">if 조건식:    
    명령문
elif 조건식:
    명령문
else:         #  if, elif 조건식을 모두 충족시키지 않는 나머지에 대해 명령문을 실행
    명령문</code></pre>
<h1 id="5-반복문">5. 반복문</h1>
<h2 id="5-1-while-문">5-1. while 문</h2>
<blockquote>
<h4 id="while-문">while 문</h4>
<p>조건을 정해 놓고 조건을 만족하지 않을 때까지 명령문을 반복한다.</p>
</blockquote>
<h4 id="continue">continue</h4>
<p>: 반복문의 시작점으로 이동하는 명령어</p>
<h4 id="break">break</h4>
<p>: 무한루프 반복문을 빠져나오는 명령어</p>
<pre><code class="language-python">while 조건식에 상관 없이 반복문을 탈출</code></pre>
<h2 id="5-2-for-문">5-2. for 문</h2>
<blockquote>
</blockquote>
<h4 id="for-문">for 문</h4>
<p>정해진 횟수 만큼 반복 실행한다.</p>
<h4 id="예시">예시</h4>
<pre><code class="language-python">a_list = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
for i in a_list:
    if i%2 == 0 :        
        print(i)        # a_list에서 짝수만 출력</code></pre>
]]></description>
        </item>
        <item>
            <title><![CDATA[Ajax]]></title>
            <link>https://velog.io/@eunjo_ourism/Ajax</link>
            <guid>https://velog.io/@eunjo_ourism/Ajax</guid>
            <pubDate>Tue, 15 Feb 2022 13:48:06 GMT</pubDate>
            <description><![CDATA[<h1 id="1-서버-클라이언트">1. 서버-클라이언트</h1>
<h2 id="1-1-서버-클라이언트-통신">1-1. 서버-클라이언트 통신</h2>
<blockquote>
</blockquote>
<h4 id="클라이언트">클라이언트</h4>
<p>: 서버에게 서비스를 요구하는 사용자</p>
<h4 id="서버">서버</h4>
<p>: 사용자의 요청으로 서비스를 수행하는 서비스 제공자</p>
<h4 id="서버-클라이언트-통신">서버-클라이언트 통신</h4>
<ol>
<li>클라이언트는 서버가 만들어 놓은 API에 요청을 보낸다. <pre><code>예) https://naver.com/
→ 이름이 &quot;naver.com&quot;인 서버에 있는 &quot;/&quot;창구에 요청을 보낸 것</code></pre></li>
<li>서버가 요청을 받아들이면 서비스를 수행한다.
```
예) 웹의 동작 개념 (HTML 파일 전달)</li>
<li>클라이언트가 서버에 웹 정보를 요청하면</li>
<li>서버가 HTML 파일을 클라이언트에게 전달한다.
→ 데이터만 보낼 경우 JSON 형식으로 보냄</li>
<li>크롬, 익스플로어 등의 브라우저가 HTML 파일을 브라우저에 그려준다.<pre><code></code></pre></li>
</ol>
<h2 id="1-2-데이터-요청-방식">1-2. 데이터 요청 방식</h2>
<h3 id="1-get">1) GET</h3>
<blockquote>
<ul>
<li>통상적으로 데이터 조회(Read)를 요청할 때 사용하는 방식
예) 영화 목록 조회</li>
</ul>
</blockquote>
<blockquote>
<h4 id="json">JSON</h4>
</blockquote>
<ul>
<li>서버에서 클라이언트로 데이터를 보낼 때 사용하는 형식</li>
<li>Javascript 객체 표기법의 부분집합</li>
</ul>
<ol>
<li>JSON 데이터는 Key:Value 형태로 이루어진다.</li>
<li>JSON 데이터는 쉼표(,)로 나열한다.</li>
<li>딕셔너리 형: 객체(object)는 중괄호 {} 로 둘러쌓아 표현한다.</li>
<li>리스트 형: 배열(array)은 대괄호 [] 로 둘러쌓아 표현한다.<pre><code class="language-javascript">{
RealtimeCityAir: {
 row: [
    {
       parkingBikeTotCnt: &quot;8&quot;,
       rackTotCnt: &quot;22&quot;,
       shared: &quot;36&quot;,
       stationId: &quot;ST-4&quot;,
       stationLatitude: &quot;37.55564880&quot;,
       stationLongitude: &quot;126.91062927&quot;,
       stationName: &quot;102. 망원역 1번출구 앞&quot;
    }
    {…},
    {…},
    {…},
    {…}
 ]
}
}</code></pre>
</li>
</ol>
<blockquote>
</blockquote>
<h4 id="get-방식으로-데이터를-전달하는-방법">GET 방식으로 데이터를 전달하는 방법</h4>
<ul>
<li>? : 여기서부터 전달할 데이터가 작성된다는 의미
? 앞: 서버 주소, ? 뒤: 전달한 데이터</li>
<li>&amp; : 전달할 데이터가 더 있다는 뜻<pre><code class="language-javascript">예) google.com/search?q=아이폰&amp;sourceid=chrome&amp;ie=UTF-8
위 주소는 google.com의 search 창구에 다음 정보를 전달합니다!
q=아이폰            (검색어)
sourceid=chrome    (브라우저 정보)
ie=UTF-8           (인코딩 정보)</code></pre>
</li>
</ul>
<h3 id="2-post">2) POST</h3>
<blockquote>
<ul>
<li>통상적으로 데이터 생성(Create), 변경(Update), 삭제(Delete) 요청 할 때 사용하는 방식
예) 회원가입, 회원탈퇴, 비밀번호 수정</li>
</ul>
</blockquote>
<hr>
<h1 id="2-ajax">2. Ajax</h1>
<h2 id="2-1-ajax란">2-1. Ajax란?</h2>
<blockquote>
</blockquote>
<ul>
<li>자바스크립트의 라이브러리 중 하나로 웹 페이지 전체를 새로고침 할 필요없이 일부분의 데이터만 가져올 수 있게 하는 것<pre><code class="language-javascript">&lt;Ajax 기본 골격&gt;
$.ajax({
type: &quot;GET&quot;,
url: &quot;여기에URL을입력&quot;,
data: {},
success: function(response){
  console.log(response)
}
})</code></pre>
<pre><code class="language-javascript">&lt;Ajax 코드 해설&gt;
$.ajax({
type: &quot;GET&quot;, // GET 방식으로 요청한다.
url: &quot;http://spartacodingclub.shop/sparta_api/seoulair&quot;,
data: {}, // 요청하면서 함께 줄 데이터 (GET 요청시엔 비워두세요)
success: function(response){ // 서버에서 준 결과를 response라는 변수에 담음
  console.log(response) // 서버에서 준 결과를 이용해서 나머지 코드를 작성
}
})</code></pre>
```javascript
&lt;GET,POST&gt;</li>
<li>GET 요청은, url 뒤에 아래와 같이 붙여서 데이터를 가져간다.
<a href="http://naver.com?param=value&amp;param2=value2">http://naver.com?param=value&amp;param2=value2</a> </li>
<li>POST 요청은, data : {} 에 넣어서 데이터를 가져간다.
data: { param: &#39;value&#39;, param2: &#39;value2&#39; },<pre><code></code></pre></li>
</ul>
<h2 id="2-2-ajax-연습">2-2. Ajax 연습</h2>
<blockquote>
</blockquote>
<ul>
<li>요청한 url에 담긴 정보 개발자 도구 콘솔에 출력<pre><code>&lt;script&gt;
$.ajax({
  type: &quot;GET&quot;,
  url: &quot;http://spartacodingclub.shop/sparta_api/seoulair&quot;,
  data: {},
  success: function (response) {
    console.log(response)
  }
})
&lt;/script&gt;</code></pre><img src="https://images.velog.io/images/eunjo_ourism/post/da2e2817-3953-4382-b1b6-28db5870fe85/image.png" alt=""></li>
<li>모든 구의 미세먼지 값 출력하기</li>
</ul>
<ol>
<li>미세먼지 데이터가 어디에 있는지 찾기
<img src="https://images.velog.io/images/eunjo_ourism/post/b8179e4d-ab06-4eb4-b0ad-1fdcf57369b1/image.png" alt="">→ 미세먼지 수치는 IDEX_MVL, RealtimeCityAir &gt; row 에 위치함<pre><code></code></pre></li>
<li>리스트 선언해서 row 값 담아 출력하기<pre><code>&lt;script&gt;
$.ajax({
 type: &quot;GET&quot;,
 url: &quot;http://spartacodingclub.shop/sparta_api/seoulair&quot;,
 data: {},
 success: function(response){
       let mise_list = response[&quot;RealtimeCityAir&quot;][&quot;row&quot;]; // 꺼내는 부분!
       console.log(mise_list);
 }
})
&lt;/script&gt;</code></pre><img src="https://images.velog.io/images/eunjo_ourism/post/a6c2e68f-eb92-4660-9b85-b1277d26bd69/image.png" alt=""></li>
<li>반복문으로 구 데이터 출력하기<pre><code>&lt;script&gt;
$.ajax({
 type: &quot;GET&quot;,
 url: &quot;http://spartacodingclub.shop/sparta_api/seoulair&quot;,
 data: {},
 success: function (response) {
   let mise_list = response[&quot;RealtimeCityAir&quot;][&quot;row&quot;];
   for (let i = 0; i &lt; mise_list.length; i++) {
     let mise = mise_list[i];
     console.log(mise);
   }
 },
})
&lt;/script&gt;</code></pre><img src="https://images.velog.io/images/eunjo_ourism/post/0e609bba-cdd1-419a-8cd6-24ca78e1b0d3/image.png" alt=""></li>
<li>구 데이터에서 구 이름, 미세먼지 수치만 골라내서 출력하기<pre><code>&lt;script&gt;
$.ajax({
 type: &quot;GET&quot;,
 url: &quot;http://spartacodingclub.shop/sparta_api/seoulair&quot;,
 data: {},
 success: function (response) {
   let mise_list = response[&quot;RealtimeCityAir&quot;][&quot;row&quot;];
   for (let i = 0; i &lt; mise_list.length; i++) {
     let mise = mise_list[i];
     let gu_name = mise[&quot;MSRSTE_NM&quot;];
     let gu_mise = mise[&quot;IDEX_MVL&quot;];
     console.log(gu_name, gu_mise);
   }
 }
});
&lt;/script&gt;</code></pre><img src="https://images.velog.io/images/eunjo_ourism/post/668ccd42-fd35-4752-b3fe-f83f613d6534/image.png" alt=""></li>
</ol>
]]></description>
        </item>
        <item>
            <title><![CDATA[jQuery]]></title>
            <link>https://velog.io/@eunjo_ourism/jQuery</link>
            <guid>https://velog.io/@eunjo_ourism/jQuery</guid>
            <pubDate>Sun, 13 Feb 2022 05:01:27 GMT</pubDate>
            <description><![CDATA[<h2 id="1-jquery">1. jQuery</h2>
<h3 id="1-1-jquery란">1-1. jQuery란?</h3>
<blockquote>
</blockquote>
<h4 id="jquery란-html의-요소들을-조작하는-편리한-javascript-라이브러리">jQuery란 HTML의 요소들을 조작하는 편리한 Javascript 라이브러리</h4>
<ul>
<li>미리 작성된 javascript 코드인 jQuery를 사용하면 코드를 효율적이고 직관적으로 작성할 수 있음</li>
</ul>
<hr>
<h3 id="1-2-jquery-사용-준비">1-2. jQuery 사용 준비</h3>
<blockquote>
</blockquote>
<h4 id="jquery-다운로드-받기">jQuery 다운로드 받기</h4>
<blockquote>
</blockquote>
<ol>
<li><a href="https://jquery.com/download/">https://jquery.com/download/</a> 접속</li>
<li>압축된 파일 or 압축되지 않은 파일 다운로드
```</li>
</ol>
<ul>
<li>압축파일: 프로덕션 버전으로 라이브 웹사이트용</li>
<li>압축파일X: 개발버전으로 테스트 및 개발용<pre><code>![](https://images.velog.io/images/eunjo_ourism/post/b9f85d8a-a378-41ad-95c3-bc45cb08e086/image.png)</code></pre>2-1. 압축 파일일 경우
  1) 마우스 우클릭
  2) 다른 이름으로 저장
  3) 원하는 경로에 다운로드
```</li>
</ul>
<ol start="3">
<li>HTML 문서 안에 다음 코드를 추가
<img src="https://images.velog.io/images/eunjo_ourism/post/5bdce3f2-ece0-439b-9560-10a55dac0258/image.png" alt=""><pre><code>3-1. 파일경로, 파일이름 적절히 변경하기
&lt;script src=&quot;파일경로/파일이름&quot;&gt;&lt;/script&gt;</code></pre></li>
</ol>
<blockquote>
</blockquote>
<h4 id="cdn-이용하기">CDN 이용하기</h4>
<ul>
<li>CDN이란 온라인 상의 대용량 콘텐츠를 저렴한 비용으로 빠르게 전송하는 기술</li>
</ul>
<ol>
<li><a href="https://www.w3schools.com/jquery/jquery_get_started.asp">https://www.w3schools.com/jquery/jquery_get_started.asp</a> 접속</li>
<li>HTML 문서 안에 다음 코드를 추가
<img src="https://images.velog.io/images/eunjo_ourism/post/a7b1a352-11f2-4c15-9ae3-48ddb89af443/image.png" alt=""></li>
</ol>
<hr>
<h3 id="1-3-jquery-사용하기">1-3. jQuery 사용하기</h3>
<blockquote>
</blockquote>
<ol>
<li>jQuery는 id를 선택자로 사용한다. 따라서 조작하고 싶은 부분에 id 속성을 추가하고 값을 준다.</li>
</ol>
<ul>
<li>예) 조작하고 싶은 부분이 div 태그이고 값을 box로 주고 싶으면<pre><code>&lt;body&gt;
  &lt;div id=&quot;box&quot;&gt;&lt;/div&gt;
&lt;/body&gt;</code></pre></li>
</ul>
<ol start="2">
<li>조작하고 싶은 부분을 id 값을 이용해 가리킨다.</li>
</ol>
<ul>
<li>예) id 값이 box인 부분을 조작하고 싶으면<pre><code>&lt;head&gt;
  &lt;script&gt;
      $(&#39;#box&#39;);        // # 은 아이디를 의미
  &lt;/script&gt;
&lt;/head&gt;</code></pre></li>
</ul>
<ol start="3">
<li>원하는 기능을 구글링해 사용한다.</li>
</ol>
<hr>
<h3 id="1-4-jquery-사용예시">1-4. jQuery 사용예시</h3>
<blockquote>
</blockquote>
<h4 id="value-값-가져오기">value 값 가져오기</h4>
<ol>
<li>id 값 주기<pre><code>&lt;body&gt;
 &lt;input id=&quot;url&quot; type=&quot;email&quot; value=&quot;eunjurism@naver.com&quot;&gt;&lt;/div&gt;
&lt;/body&gt;</code></pre></li>
<li>크롬 개발자도구 콘솔창 열기</li>
<li>id 값이 url인 곳을 가리키기
<img src="https://images.velog.io/images/eunjo_ourism/post/2b401497-4df7-46e0-891d-a6b6f0f58956/image.png" alt=""></li>
<li>val()로 값을 가져오기
<img src="https://images.velog.io/images/eunjo_ourism/post/6dd06a16-8e9d-4050-ada6-30b8bfecf5b2/image.png" alt=""></li>
</ol>
<ul>
<li>javascript로 value 값 가져오려면
<img src="https://images.velog.io/images/eunjo_ourism/post/3cf26ddf-353d-4d00-b09d-b3497829c863/image.png" alt=""><blockquote>
</blockquote>
</li>
</ul>
]]></description>
        </item>
        <item>
            <title><![CDATA[Javascript 입문]]></title>
            <link>https://velog.io/@eunjo_ourism/Javascript-%EC%9E%85%EB%AC%B8</link>
            <guid>https://velog.io/@eunjo_ourism/Javascript-%EC%9E%85%EB%AC%B8</guid>
            <pubDate>Wed, 02 Feb 2022 13:30:58 GMT</pubDate>
            <description><![CDATA[<h1 id="1-javascript-기초">1. Javascript 기초</h1>
<h2 id="1-1-javascript란">1-1. Javascript란?</h2>
<blockquote>
</blockquote>
<ul>
<li>웹페이지에 생동감을 불어넣기 위해 만들어진 프로그래밍 언어로 브라우저가 알아들을 수 있는 언어
```</li>
<li>스크립트(script): 자바스크립트로 작성한 프로그램
<code></code>javascript
&lt; JS 주석처리 &gt;</li>
<li>한 줄 주석: //주석내용</li>
<li>여러 줄 주석: /<em>주석내용</em>/<pre><code>
</code></pre></li>
</ul>
<h2 id="1-2-자바스크립트---html-연결">1-2 자바스크립트 - HTML 연결</h2>
<blockquote>
</blockquote>
<h3 id="html-문서에-직접-작성">HTML 문서에 직접 작성</h3>
<pre><code>&lt;head&gt;~&lt;/head&gt; 안에 &lt;script&gt;~&lt;/script&gt; 태그 만들어 작성</code></pre><pre><code>&lt;!--예시--&gt;
&lt;head&gt;
    &lt;script&gt;
        function hey() {
            alert(&#39;안녕!&#39;);
        }
    &lt;/script&gt;
&lt;/head&gt;
&lt;body&gt;
    &lt;button onclick=&quot;hey()&quot;&gt;버튼&lt;/button&gt;
&lt;/body&gt;</code></pre><blockquote>
</blockquote>
<h3 id="스크립트-파일을-만든-후-불러오기">스크립트 파일을 만든 후 불러오기</h3>
<pre><code>1. JavaScript 파일을 같은 폴더에 따로 만들어 작성
2. HTML 문서에 연결
→ &lt;head&gt;~&lt;/head&gt; 안에 &lt;script src=&quot;JS파일이름.js&quot;&gt;&lt;/script&gt; 코드 넣기</code></pre><hr>
<h1 id="2-기초-문법">2. 기초 문법</h1>
<h2 id="2-1-함수">2-1. 함수</h2>
<h3 id="1-개념">1) 개념</h3>
<blockquote>
</blockquote>
<h4 id="함수란">함수란?</h4>
<ul>
<li>JavaScript의 기본적인 구성 블록 중 하나</li>
<li>고유 미션을 수행하는 명령어들의 모임</li>
<li>미리 작성한 후 호출하여 사용함<blockquote>
</blockquote>
<h4 id="함수-용어-정리">함수 용어 정리</h4>
</li>
<li>변수: 언제든지 변경할 수 있는 값이자, 그 값을 저장하는 박스</li>
<li>매개변수: 함수를 정의할 때 사용하는 변수</li>
<li>인수: 함수가 호출될 때 매개변수에 실제로 담기는 값</li>
<li>반환값 or 결과값: 함수가 호출된 곳으로 반환하는 값<blockquote>
</blockquote>
<h4 id="콘솔창이란">콘솔창이란?</h4>
</li>
<li>자바스크립트를 실행하고, 에러 메시지 등을 출력해주는 창
→ 명령 프롬프트</li>
</ul>
<h3 id="2-변수명">2) 변수명</h3>
<blockquote>
</blockquote>
<ul>
<li>데이터의 의미를 쉽게 알아볼 수 있게 작성하는 것이 중요!</li>
</ul>
<h3 id="3-함수-선언하고-호출하기">3) 함수 선언하고 호출하기</h3>
<blockquote>
</blockquote>
<h4 id="선언하기">선언하기</h4>
<pre><code class="language-javascript">function 함수이름(매개변수) {
    명령문
    ...
    return 반환값    // return: 결과값을 반환하기 위한 명령어
}</code></pre>
<h4 id="호출하기">호출하기</h4>
<ul>
<li>함수 이름을 사용해 함수를 실제로 사용하는 것<pre><code class="language-javascript">함수이름(인수);</code></pre>
<blockquote>
</blockquote>
<h4 id="예시">예시</h4>
</li>
<li>선언하기<pre><code class="language-javascript">function sum(n1, n2) {
  console.log(&#39;숫자&#39;, n1, n2);        // console.log: 콘솔창에 메시지 표시하기 위한 명령어
  return n1 + n2;
}</code></pre>
</li>
<li>호출하기<pre><code class="language-javascript">sum(1, 2); // 3
sum(3, -1); // 2</code></pre>
</li>
</ul>
<h3 id="4-기본-내장-함수">4) 기본 내장 함수</h3>
<blockquote>
</blockquote>
<ul>
<li>기본적으로 내장되어있는 함수는 로딩 과정이 필요없다.<h4 id="-변수-대입-let으로-변수를-선언">※ 변수 대입: &#39;let&#39;으로 변수를 선언</h4>
<pre><code class="language-javascript">let n = 23
n = 50        // 한 번 let으로 선언했으면, 다시 선언하지 않고 값을 대입</code></pre>
<h4 id="연산">연산</h4>
</li>
<li>사칙연산<pre><code class="language-javascript">let a = 4
let b = 2
a+b        // 6
a-b     // 2
a*b        // 8
a/b        // 2</code></pre>
<pre><code class="language-javascript">let first_name = &#39;eunju&#39;
let last_name = &#39;lee&#39;
first_name + last_name     // &#39;eunjulee&#39;</code></pre>
<pre><code class="language-javascript"># 문자+숫자 는 숫자를 문자로 바꾼 뒤 연산함
let n = 1
let a = &quot;number&quot;
a+n        // number1</code></pre>
</li>
<li>나눗셈의 나머지 구하기<pre><code class="language-javascript">et a = 15
let b = 4
a % b        // 3</code></pre>
</li>
<li>특정 문자로 문자열 나누기<pre><code class="language-javascript">let phone_umber = &#39;010-1234-5678&#39;        
let result = phone_umber.split(&#39;-&#39;)        // &#39;-&#39;로 문자열 나누기
result                                    // [&#39;010&#39;, &#39;1234&#39;, &#39;5678&#39;]</code></pre>
</li>
</ul>
<hr>
<h2 id="2-2-자료형">2-2. 자료형</h2>
<h3 id="1-리스트">1) 리스트</h3>
<blockquote>
</blockquote>
<h4 id="리스트--대량의-데이터를-순서를-가지고-저장">리스트 : 대량의 데이터를 순서를 가지고 저장</h4>
<ul>
<li>리스트 선언
```javascript</li>
<li>let a_list = []</li>
<li>let a_list = [1,2,3]
```</li>
<li>출력<pre><code class="language-javascript">a_list[1] // 2 를 출력
a_list[2] // 3 을 출력</code></pre>
</li>
<li>리스트 추가<pre><code class="language-javascript">a_list.push(&#39;안녕&#39;)
a_list // [1, 2, 3, &quot;안녕&quot;] 를 출력</code></pre>
</li>
<li>리스트 길이 구하기<pre><code class="language-javascript">a_list.length // 4를 출력</code></pre>
</li>
</ul>
<h3 id="2-딕셔너리">2) 딕셔너리</h3>
<blockquote>
</blockquote>
<h4 id="딕셔너리--키key와-값value을-한-쌍으로-저장하는-자료-구조">딕셔너리 : 키(key)와 값(value)을 한 쌍으로 저장하는 자료 구조</h4>
<ul>
<li>키(key): 중복 불가, 값(value): 중복 허용</li>
<li>딕셔너리 선언
```javascript</li>
<li>let a_dict = {}</li>
<li>let a_dict = {&#39;name&#39;:&#39;eunju&#39;,&#39;age&#39;:23}
a_dict[&#39;name&#39;] // &#39;eunju&#39;를 출력
a_dict[&#39;age&#39;] // 23을 출력
```</li>
<li>딕셔너리 추가<pre><code class="language-javascript">a_dict[&#39;height&#39;] = 164
a_dict // {name: &quot;eunju&quot;, age: 23, height: 164}을 출력</code></pre>
</li>
<li>딕셔너리 삭제<pre><code class="language-javascript">del a_dict[&#39;name&#39;]
a_dict // {age: 23, height: 164}을 출력</code></pre>
</li>
</ul>
<hr>
<h2 id="2-3-조건문">2-3. 조건문</h2>
<h3 id="1-조건문이란">1) 조건문이란?</h3>
<blockquote>
</blockquote>
<p>특정 조건을 만족할 때 작업을 실행하는 제어문</p>
<h3 id="2-if--else-if--else">2) if | else if | else</h3>
<blockquote>
</blockquote>
<h4 id="if">if</h4>
<pre><code class="language-javascript">if (조건식) {    // 조건식을 충족하면 블록문을 실행
    명령문
}</code></pre>
<h4 id="if---else">if - else</h4>
<pre><code class="language-javascript">if (조건식) {    
    명령문
} else {        // if 조건식을 충족하지 않는 나머지에 대해 명령문을 수행
    명령문
}</code></pre>
<h4 id="if---else-if">if - else if</h4>
<pre><code class="language-javascript">if (조건식) {        
    명령문
} else if (조건식) {    // 조건식을 충족하면 명령문을 실행 → 조건을 2개 이상 만들 때 사용
    명령문
} else if (조건식) {
    명령문
}
...</code></pre>
<h4 id="if---else-if---else">if - else if - else</h4>
<pre><code class="language-javascript">if (조건식) {        
    명령문
} else if (조건식) {    
} else {                //  if, else if 조건식을 모두 충족시키지 않는 나머지에 대해 명령문을 실행
    명령문
}</code></pre>
<hr>
<h2 id="2-4-반복문">2-4. 반복문</h2>
<h3 id="1-반복문이란">1) 반복문이란?</h3>
<blockquote>
</blockquote>
<p>반복해서 실행하는 제어문</p>
<h3 id="2-while">2) while</h3>
<blockquote>
</blockquote>
<p>조건을 만족하면 반복 실행한다.</p>
<pre><code class="language-javascript">n = 0;
while (n &lt; 5) {    // 조건식 &#39;n &lt; 5&#39;를 만족시키면 명령문 반복 실행
    명령문
    n ++;        // n이 증가해야 무한 반복하지 않음
}</code></pre>
<pre><code class="language-javascript">&lt; 증감 연산자&gt;
- i++ : i 를 1 증가시킴
- i-- : i 를 1 감소시킴</code></pre>
<h3 id="3-for">3) for</h3>
<blockquote>
</blockquote>
<p>정해진 횟수만큼 반복 실행한다.</p>
<pre><code class="language-javascript">for (시작조건; 반복조건; 더하기) {
    명령문
}</code></pre>
<pre><code class="language-javascript">&lt; 0부터 99까지 출력 &gt;
for (let i = 0; i &lt; 100; i++) {
    console.log(i);
}
// i=0부터 i=99 까지 console.log(i)를 실행
// 명령문을 실행 할 때마다 i가 1 증가하므로 반복조건에 맞지 않을 때까지 반복 실행함</code></pre>
<h3 id="4-조건문과-반복문">4) 조건문과 반복문</h3>
<blockquote>
</blockquote>
<h4 id="조건문과-반복문을-활용해-짝수만-출력">조건문과 반복문을 활용해 짝수만 출력</h4>
<pre><code class="language-javascript">for (let i = 1; i &lt; 10; i++) {
    if (i%2 == 0) {
        console.log(i);
    }
}
// 2 4 6 8 출력</code></pre>
]]></description>
        </item>
        <item>
            <title><![CDATA[CSS 입문]]></title>
            <link>https://velog.io/@eunjo_ourism/CSS-%EC%9E%85%EB%AC%B8</link>
            <guid>https://velog.io/@eunjo_ourism/CSS-%EC%9E%85%EB%AC%B8</guid>
            <pubDate>Tue, 01 Feb 2022 03:02:31 GMT</pubDate>
            <description><![CDATA[<h1 id="1-css-기초">1. CSS 기초</h1>
<h2 id="1-html-부모-자식-구조">1) HTML 부모-자식 구조</h2>
<blockquote>
</blockquote>
<ul>
<li>HTML 요소(태그)는 &quot;누구 안에 누가 있느냐&quot;를 파악하는 것이 중요</li>
</ul>
<ol>
<li>부모: 포함하는 태그</li>
<li>자식: 포함되는 태그<pre><code># 자식은 부모의 속성값을 상속받는다.
# 속성값을 직접 주면 상속된 값은 무시된다.
# 즉, 속성값을 따로 주지않은 경우에만 상속을 받는다.</code></pre><pre><code>&lt;head&gt;
&lt;style&gt;
 .a {color: green; font-size: medium}
 .b {font-family: cursive; font-size: small}
 .c {font-size: large}
&lt;/style&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;div class=&quot;a&quot;&gt; 나는 a이고 b와 c의 부모!
 &lt;div class=&quot;b&quot;&gt; 나는 b이고 a의 자식, c의 부모!
   &lt;div class=&quot;c&quot;&gt; 나는 c이고 a와 b의 자식
   &lt;/div&gt;
 &lt;/div&gt;
&lt;/div&gt;
&lt;/body&gt;</code></pre><head>
<style>
 .a {color: green; font-size: larger}
 .b {font-family: cursive; font-size: small}
 .c {font-size: large}
</style>
</head>
<body>
<div class="a"> 나는 a이고 b와 c의 부모!
 <div class="b"> 나는 b이고 a의 자식, c의 부모!
   <div class="c"> 나는 c이고 a와 b의 자식
   </div>
 </div>
</div>
</body>

</li>
</ol>
<blockquote>
<h4 id="주석">주석</h4>
</blockquote>
<pre><code>/*주석 내용*/</code></pre><pre><code>주석처리 하고싶은 라인 선택 → [ctrl+/]</code></pre><blockquote>
</blockquote>
<h4 id="css-파일-분리">CSS 파일 분리</h4>
<pre><code>1. css 파일을 같은 폴더에 만들기 → &quot;(css파일이름).css&quot;</code></pre><pre><code>2. head 태그에서 불러오기 ↓
&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href = &quot;(css파일이름).css&quot;&gt;</code></pre><hr>
<h2 id="2-css-적용">2) CSS 적용</h2>
<blockquote>
</blockquote>
<h3 id="css-적용">CSS 적용</h3>
<pre><code>1. &lt;head&gt; ~ &lt;/head&gt; 안에 &lt;style&gt; ~ &lt;/style&gt; 로 공간을 만들어 작성
2. 꾸미려는 대상을 가리킴 → 선택자
3. 중괄호 {} 안에 꾸밀 내용을 작성
# &#39;;&#39; 을 사용해 여러 내용을 작성</code></pre><hr>
<h3 id="선택자">선택자</h3>
<ol>
<li>전체 선택자
```</li>
</ol>
<ul>
<li>{} : HTML 해당 페이지 내부의 모든 태그를 선택
```</li>
</ul>
<ol start="2">
<li>태그(요소) 선택자: div, p, ul, span 등 HTML 요소(태그)를 선택하는 선택자<pre><code>div {} : 모든 div 태그를 선택
p {} : 모든 p 태그를 선택
ul {} : 모든 ul 태그를 선택
…</code></pre></li>
<li>클래스 선택자: 특정 값을 class 값으로 갖는 요소를 선택<pre><code>1) 클래스 선택자 앞에 요소가 있을 때
div.mytitle {} : div 태그 중에 mytitle 값을 가진 태그를 선택
2) 클래스 선택자 앞에 아무 것도 없을 때
mytitle {} / .mytitle {} : mytitle 값을 가진 모든 태그를 선택</code></pre></li>
<li>자식 선택자: 특정 요소의 자식 요소를 선택<pre><code>1) 특정 태그의 자식 태그를 선택
div &gt; p : div 태그 안의 p 태그만 선택
2) 특정 값을 갖는 부모 안에 있는 특정 태그를 선택할 때
.mytitle &gt; h1 {} : mytitle 값을 갖는 태그 안의 h1 태그만 선택
3) 특정 태그의 특정 값을 갖는 자식 요소를 선택할 때
div &gt; .mytitle {}</code></pre></li>
</ol>
<hr>
<h1 id="2-자주-사용되는-css">2. 자주 사용되는 CSS</h1>
<pre><code>- initial: 기본값으로 설정
- inherit: 부모 요소의 속성값을 상속받음</code></pre><h2 id="1-배경">1) 배경</h2>
<blockquote>
</blockquote>
<ul>
<li>background-color : 배경색을 정하는 속성
```
background-color: transparent | color | initial | inherit</li>
<li>transparent: 배경색 X, 기본값</li>
<li>color: 원하는 색으로 설정
```</li>
<li>background-image : 배경 이미지를 정하는 속성
```
background-image: none | url | initial | inherit</li>
<li>none: 배경 이미지 X, 기본값</li>
<li>url: 이미지의 URL 입력
→ background-image: url(&quot;이미지 URL 입력&quot;)
```</li>
<li>background-size : 배경 이미지의 사이즈를 정하는 속성
```
background-size: auto | length | cover | contain | initial | inherit</li>
<li>auto: 이미지 크기 유지, 기본값</li>
<li>length: 값 두 개 → 가로 크기, 세로 크기 / 값 한 개 → 가로 크기</li>
<li>cover: 배경 크기에 맞게 이미지 확대 or 축소</li>
<li>contain: 배경 크기에 벗어나지 않게 최대 크기로 이미지 확대 or 축소
```</li>
<li>background-position : 배경 이미지의 위치를 정하는 속성
```
background-position: (가로 위치) (세로 위치) | initial | inherit</li>
<li>(가로 위치): left, center, right, 백분율, 길이</li>
<li>(세로 위치): top, center, bottom, 백분율, 길이<pre><code>#주로 (background-image, background-size, background-position)을 세트로 사용
</code></pre></li>
</ul>
<hr>
<h2 id="2-사이즈">2) 사이즈</h2>
<blockquote>
</blockquote>
<ul>
<li>요소의 너비와 높이 설정
```</li>
<li>width: 요소의 너비 설정</li>
<li>height: 요소의 높이 설정<pre><code></code></pre></li>
</ul>
<hr>
<h2 id="3-폰트">3) 폰트</h2>
<blockquote>
</blockquote>
<pre><code>font-size
font-weight
font-family
color</code></pre><blockquote>
</blockquote>
<h3 id="문법">문법</h3>
<ul>
<li>속성<pre><code>font-family는 글꼴을 설정하는 속성</code></pre></li>
<li>값
```</li>
<li>family-name: 글꼴 이름</li>
<li>generic-family: 글꼴 유형</li>
<li>initial: 웹 브라우저 기본 글꼴로 설정</li>
<li>inherit: 부모 요소의 속성값을 그대로 따름
```</li>
<li>예시
```
font-family: &#39;Nanum Gothic&#39;, sans-serif;</li>
<li>&#39;Nanum Gothic&#39;: 폰트 이름<h1 id="폰트-이름에-공백이-있으면-따옴표-사용">폰트 이름에 공백이 있으면 따옴표 사용</h1>
</li>
<li>sans-serif: 글꼴 유형<pre><code></code></pre></li>
</ul>
<blockquote>
</blockquote>
<h3 id="구글-웹폰트-적용하는-방법">구글 웹폰트 적용하는 방법</h3>
<ol>
<li><a href="https://fonts.google.com/?subset=korean">https://fonts.google.com/?subset=korean</a> 접속</li>
<li>마음에 드는 폰트 눌러서 [+select this style] 클릭
<img src="https://images.velog.io/images/eunjo_ourism/post/9ce09090-06ac-4b6c-b608-0269a59b4cc1/image.png" alt=""></li>
<li>오른쪽 상단 아이콘 클릭
<img src="https://images.velog.io/images/eunjo_ourism/post/5ba1c3d4-b0d1-4d71-ac2c-ed08b18d624c/image.png" alt=""></li>
<li>link 태그 복사
<img src="https://images.velog.io/images/eunjo_ourism/post/ad27b59b-afca-4d07-b4ed-0dedae5199fc/image.png" alt=""></li>
<li>head 안에 붙여넣기<pre><code>&lt;!DOCTYPE html&gt;
&lt;html lang=&quot;en&quot;&gt;
&lt;head&gt;
 &lt;meta charset=&quot;UTF-8&quot;&gt;
 &lt;title&gt;Title&lt;/title&gt;
 &lt;!-- 5. head 안에 폰트 링크 붙여넣기↓ --&gt;
 &lt;link href=&quot;https://fonts.googleapis.com/css2?family=Nanum+Pen+Script&amp;display=swap&quot; rel=&quot;stylesheet&quot;&gt; 
&lt;/head&gt;
&lt;body&gt;
 &lt;h1&gt;글꼴 적용하기&lt;/h1&gt;
&lt;/body&gt;
&lt;/html&gt;</code></pre></li>
<li>CSS 복사
<img src="https://images.velog.io/images/eunjo_ourism/post/eb7b50fe-a57e-4116-a0eb-10950eb07a94/image.png" alt=""></li>
<li>head &gt; style 안에 붙여넣기<pre><code>&lt;!DOCTYPE html&gt;
&lt;html lang=&quot;en&quot;&gt;
&lt;head&gt;
 &lt;meta charset=&quot;UTF-8&quot;&gt;
 &lt;title&gt;Title&lt;/title&gt;
 &lt;link href=&quot;https://fonts.googleapis.com/css2?family=Nanum+Pen+Script&amp;display=swap&quot; rel=&quot;stylesheet&quot;&gt;
 &lt;!-- 7. head &gt; style 안에 글꼴 CSS 붙여넣기 ↓ --&gt;
 &lt;style&gt;
     * {font-family: &#39;Nanum Pen Script&#39;, cursive;} /**/
 &lt;/style&gt;
&lt;/head&gt;
&lt;body&gt;
 &lt;h1&gt;글꼴 적용하기&lt;/h1&gt;
&lt;/body&gt;
&lt;/html&gt;</code></pre><img src="https://images.velog.io/images/eunjo_ourism/post/29e2a80c-6381-4d67-a261-8e08f16b8e8e/image.png" alt=""></li>
</ol>
<hr>
<hr>
<h2 id="4-간격">4) 간격</h2>
<blockquote>
</blockquote>
<ul>
<li>margin : 요소 안쪽 여백
```</li>
<li>margin: x y z w</li>
<li>margin-top: x</li>
<li>margin-right: x</li>
<li>margin-bottom: x</li>
<li>margin-left: x
```</li>
<li>padding : 요소 바깥쪽 여백
```</li>
<li>padding: x y z w</li>
<li>padding-top: x</li>
<li>padding-right: x</li>
<li>padding-bottom: x</li>
<li>padding-left: x
```</li>
<li>margin, padding 속성값 → 시계방향으로 적용(상 우 하 좌)
```</li>
<li>margin: x y z w → 시계방향(상→우→하→좌)으로 여백 적용</li>
<li>margin: x = margin: x x x x</li>
<li>margin: x y = margin: x y x y</li>
<li>margin: x y z = margin: x y z y<pre><code></code></pre></li>
</ul>
<hr>
<h2 id="5-기타">5) 기타</h2>
<blockquote>
</blockquote>
<ul>
<li>border-radius : 테두리를 둥글게 만드는 속성<pre><code># 테두리마다 둥글기를 다르게 적용 할 수 있음</code></pre></li>
<li>border : 테두리 만드는 속성
```
border: 두께 모양 색</li>
<li>두께: medium(기본값) | thick | thin | length</li>
<li>모양: none(기본값) | solid | dashed | dotted | double | groove | hidden | inset | outset | ridge
```</li>
<li>text-align : 문단 정렬 방식을 정하는 속성
```
text-align: left | right | center | justify</li>
<li>justify: 가운데 정렬
```</li>
<li>:hover : 마우스 오버
→ 마우스 올렸을 때 적용할 CSS 작성<pre><code>|예시|
button:hover {border: 2px solid white;}
→ button 위에 마우스 올렸을 때 2px, 실선, 하얀색 테두리로 설정</code></pre></li>
</ul>
<hr>
<h1 id="3-flexbox">3. flexbox</h1>
<h2 id="1-개념">1) 개념</h2>
<ul>
<li>flexbox는 박스 안 요소들을 자유롭게 배치하기 위해 필요함</li>
</ul>
<blockquote>
</blockquote>
<h3 id="속성값">속성값</h3>
<pre><code>1) container(박스)에 적용할 수 있는 속성값이 존재
- display | flex-direction | flex-wrap | flex-flow | justify-content | align-items | align-content
2) 각각의 item에 적용할 수 있는 속성값이 존재
- order | flex-grow | flex-shrink | flex | align-self</code></pre><blockquote>
</blockquote>
<h3 id="중심축과-반대축">중심축과 반대축</h3>
<pre><code>중심축을 수평이나 수직으로 설정할 수 있음
- 수평축이 중심축: item이 왼쪽에서 오른쪽으로 정렬
- 수직축이 중심축: item이 위에서 아래로 정렬</code></pre><h2 id="2-적용">2) 적용</h2>
<blockquote>
</blockquote>
<pre><code>1. 부모와 자식 구조일 때 
2. 부모 태그에 display: flex; 속성을 주면 flexbox 레이아웃으로 바꿈</code></pre><h3 id="1-flex-적용-예시---요소-가운데로-정렬">1. flex 적용 예시 - 요소 가운데로 정렬</h3>
<pre><code>display: flex;                1. flexbox 레이아웃으로 설정
flex-direction: column;        2. 요소의 배열 방향 설정
justify-content: center;    3. 가로축을 기준, 요소들의 좌우에 대한 정렬 설정
align-items: center;        4. 세로축 기준, 요소들의 상하에 대한 정렬 설정</code></pre><hr>
<h1 id="4-부트스트랩">4. 부트스트랩</h1>
<blockquote>
<h2 id="부트스트랩이란">부트스트랩이란?</h2>
</blockquote>
<ul>
<li>Bootstrap : 프론트엔드 오픈 소스 툴킷
※ 잘 찾아서 자신의 디자인 목적에 맞게 잘 고쳐 쓰기!<pre><code>→ 입력 창, 버튼, 각종 레이아웃 등 HTML 및 CSS 기반의 디자인 템플릿으로 제공
→ 추가적인 자바스크립트 확장들도 포함
→ 오픈소스로 공개되어 있어 기존의 디자인을 재사용하거나 자유롭게 수정 및 재배포 가능</code></pre></li>
</ul>
<h1 id="5-반응형-웹디자인">5. 반응형 웹디자인</h1>
<blockquote>
</blockquote>
<ul>
<li>웹브라우저의 크기가 변하는 것에 따라 각 요소도 그에 맞춰 변하도록 설정<pre><code>&lt;예시&gt;
max-width: 500px;    1. 요소의 너비가 최대 500px까지 커지도록 설정
width: 95%;            2. 그 전까지는 부모 요소의 너비의 95% 만 차지하도록 설정</code></pre></li>
</ul>
]]></description>
        </item>
        <item>
            <title><![CDATA[HTML 입문]]></title>
            <link>https://velog.io/@eunjo_ourism/HTML-%EC%9E%85%EB%AC%B8</link>
            <guid>https://velog.io/@eunjo_ourism/HTML-%EC%9E%85%EB%AC%B8</guid>
            <pubDate>Mon, 31 Jan 2022 03:04:38 GMT</pubDate>
            <description><![CDATA[<h1 id="1-기초">1. 기초</h1>
<blockquote>
</blockquote>
<ul>
<li>서버(server): front-end를 주는 역할</li>
<li>프론트엔드(front-end): HTML, CSS, JavaScript 등 사이트 이용자의 눈에 보이는 부분</li>
<li>백엔드(back-end): 사이트 이용자의 눈에 보이지 않는 부분</li>
</ul>
<blockquote>
</blockquote>
<p>HTML은 크게 head와 body로 구성된다.</p>
<ul>
<li>head<pre><code>&lt;head&gt;페이지의 속성 정보&lt;/head&gt;</code></pre></li>
<li>body<pre><code>&lt;body&gt;페이지의 내용&lt;/body&gt;</code></pre></li>
</ul>
<hr>
<h1 id="2-문법">2. 문법</h1>
<blockquote>
</blockquote>
<pre><code>&lt;tegname&gt;contents&lt;/tegname&gt;</code></pre><pre><code>- &lt;tegname&gt;: 시작 태그, &lt;/tegname&gt;: 종료 태그
- &lt;contents&gt;: 내용</code></pre><blockquote>
<h4 id="주석">주석</h4>
</blockquote>
<pre><code>&lt;!--주석 내용--&gt;</code></pre><pre><code>주석: 웹브라우저가 해석하지 않는 코드</code></pre><pre><code>주석처리 하고싶은 라인 선택 → [ctrl+/]</code></pre><h4 id="줄맞춤">줄맞춤</h4>
<pre><code>줄맞춤 하고싶은 라인 선택 → [Ctrl + Alt + L]</code></pre><blockquote>
<h4 id="속성">속성</h4>
</blockquote>
<pre><code>&lt;tagname attribute=&quot;value&quot;&gt;Contents&lt;/tagname&gt;</code></pre><pre><code>태그에 속성을 추가하고 값을 정함
=&gt; 같은 태그가 여러개일 경우 특정 태그를 CSS로 꾸미려면 그 태그에 이름을 붙여줘야 함</code></pre><p>&lt;예시&gt;</p>
<pre><code>&lt;div class=&quot;mytitle&quot;&gt;제목입니다.&lt;/div&gt;
div라는 태그에 class라는 속성을 추가하고 &quot;mytitle&quot;이라는 값을 지정함</code></pre><hr>
<h1 id="3-자주-사용되는-태그">3. 자주 사용되는 태그</h1>
<h2 id="3-1-구역을-나누는-태그">3-1. 구역을 나누는 태그</h2>
<blockquote>
</blockquote>
<pre><code>&lt;div&gt;구역을 나누는 태그&lt;/div&gt;
&lt;p&gt;문단을 나누는 태그&lt;/p&gt;</code></pre><pre><code>- 구역과 구역, 문단과 문단 사이 간격이 크게 있음
- p는 paragraph의 약자</code></pre><hr>
<pre><code>&lt;br&gt;: 줄바꿈
&lt;hr&gt;: 수평 가로선</code></pre><blockquote>
</blockquote>
<pre><code>&lt;ul&gt;
  &lt;li&gt;bullet 1&lt;/li&gt;
  &lt;li&gt;bullet 2&lt;/li&gt;
&lt;ul&gt;</code></pre><ul>
  <li>bullet 1</li>
  <li>bullet 2</li>
<ul> <!---->

<h2 id="3-2-구역-내-콘텐츠-태그">3-2. 구역 내 콘텐츠 태그</h2>
<blockquote>
</blockquote>
<ul>
<li>h1은 페이지마다 하나씩 써줘야 검색이 잘 된다.<pre><code>&lt;h1&gt;제목을 나타내는 태그&lt;/h1&gt;
&lt;h2&gt;소제목을 나타내는 태그&lt;/h2&gt;
&lt;h3&gt;더 작아진 제목&lt;/h3&gt;
&lt;h4&gt;더더 작아진 제목&lt;/h4&gt;
&lt;h5&gt;더더더 작아진 제목&lt;/h5&gt;
&lt;h6&gt;더더더더 작아진 제목&lt;/h6&gt;</code></pre><h1>제목을 나타내는 태그</h1>
<h2>소제목을 나타내는 태그</h2>
<h3>더 작아진 제목</h3>
<h4>더더 작아진 제목</h4>
<h5>더더더 작아진 제목</h5>
<h6>더더더더 작아진 제목</h6>

</li>
</ul>
<blockquote>
</blockquote>
<pre><code>특정 &lt;span style=&quot;color:red&quot;&gt;글자&lt;/span&gt;를 꾸밀 때 사용</code></pre><p>특정 <span style="color:red">글자</span>를 꾸밀 때 사용</p>
<blockquote>
</blockquote>
<h4 id="링크">링크</h4>
<pre><code>&lt;a href=&quot;link&quot;&gt;Label&lt;/a&gt;</code></pre><p>&lt;예시&gt;</p>
<pre><code>&lt;a href=&quot;https://blog.naver.com/eunjo_ourism&quot;&gt;은주의 블로그&lt;/a&gt;</code></pre><p><a href="https://blog.naver.com/eunjo_ourism">은주의 블로그</a></p>
<blockquote>
<h4 id="input">input</h4>
</blockquote>
<pre><code>&lt;input type=&quot;text&quot;/&gt;</code></pre><p><input type="text"/><!----></p>
<pre><code>&lt;input type=&quot;password&quot;/&gt;</code></pre><p><input type="password"/><!----></p>
<pre><code>&lt;input type=&quot;radio&quot;/&gt;</code></pre><p><input type="radio"/><!----></p>
<pre><code>&lt;input type=&quot;checkbox&quot;/&gt;</code></pre><p><input type="checkbox"/><!----></p>
<pre><code>&lt;input type=&quot;button&quot;/&gt;</code></pre><p><input type="button"/><!----></p>
<pre><code>&lt;input type=&quot;submit&quot;/&gt;</code></pre><p><input type="submit"/><!----></p>
<pre><code>&lt;input type=&quot;reset&quot;/&gt;</code></pre><p><input type="reset"/><!----></p>
<pre><code>&lt;input type=&quot;image&quot; src=&quot;https://search.pstatic.net/common/?src=http%3A%2F%2Fblogfiles.naver.net%2FMjAyMjAxMTdfMjkx%2FMDAxNjQyNDA5OTA2ODkw.8ZSk_14G_Zxo__E4lLuBjyLrNpi6GdbSSIcT4H1q9Ccg.zXpE9i5bnxKsAWF0iLZtLH8TZHirvAAsLSZ317Lzf3sg.JPEG.eunjo_ourism%2FIMG_1092.JPG&amp;type=a340&quot;/&gt;</code></pre><p><input type="image" src="https://search.pstatic.net/common/?src=http%3A%2F%2Fblogfiles.naver.net%2FMjAyMjAxMTdfMjkx%2FMDAxNjQyNDA5OTA2ODkw.8ZSk_14G_Zxo__E4lLuBjyLrNpi6GdbSSIcT4H1q9Ccg.zXpE9i5bnxKsAWF0iLZtLH8TZHirvAAsLSZ317Lzf3sg.JPEG.eunjo_ourism%2FIMG_1092.JPG&type=a340"/><!----></p>
<pre><code>&lt;input type=&quot;file&quot;/&gt;</code></pre><p><input type="file"/><!---->  </p>
<blockquote>
</blockquote>
<pre><code>&lt;textarea&gt;여러 줄의 문자열을 입력할 수 있는 양식&lt;/textarea&gt;</code></pre>]]></description>
        </item>
    </channel>
</rss>