<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
    <channel>
        <title>mimme_.log</title>
        <link>https://velog.io/</link>
        <description>끄적끄적</description>
        <lastBuildDate>Mon, 21 Aug 2023 07:26:04 GMT</lastBuildDate>
        <docs>https://validator.w3.org/feed/docs/rss2.html</docs>
        <generator>https://github.com/jpmonette/feed</generator>
        <copyright>Copyright (C) 2019. mimme_.log. All rights reserved.</copyright>
        <atom:link href="https://v2.velog.io/rss/mimme_" rel="self" type="application/rss+xml"/>
        <item>
            <title><![CDATA[[TIL] 질문에 답하기 (1)]]></title>
            <link>https://velog.io/@mimme_/TIL-%EC%A7%88%EB%AC%B8%EC%97%90-%EB%8B%B5%ED%95%98%EA%B8%B0-1</link>
            <guid>https://velog.io/@mimme_/TIL-%EC%A7%88%EB%AC%B8%EC%97%90-%EB%8B%B5%ED%95%98%EA%B8%B0-1</guid>
            <pubDate>Mon, 21 Aug 2023 07:26:04 GMT</pubDate>
            <description><![CDATA[<p><a href="https://careerly.co.kr/comments/83898?utm_source=paid_facebook&amp;utm_medium=webtraffic&amp;utm_campaign=FB_UA_WebTraffic_Engineer_Test_Web&amp;utm_content=Test_Comment_Mass_Information_ImageSlide_003&amp;fbclid=PAAabDhm_wZTEiWPLKyRLJuHPxfbb-jJmYHhhl9MjywZu4AIwDAfUrufg132E_aem_AVag6a1FxfLej8h8ZB9dVs0RIdO3QFapWSJ53svzxuJunWmw47ZetXcYhSyUB7HQP38nU3k1qcfGULyQVb7c22JJ">주니어 자바 개발자를 위한 100가지 질문 1편</a>
을 바탕으로 질문에 답변하는 형식으로 이루어졌습니다.</p>
<h3 id="1jdk--java-development-kit-자바-개발-키트">1.JDK ( Java Development Kit) 자바 개발 키트</h3>
<p>: JDK는 JRE를 포함하고 컴파일과 같이 개발에 사용하는 도구들을 포함한다.
    자바 프로그램을 개발하는경우에는 JDK를 사용해야한다.</p>
<p>JRE ( Java Runtime Environment) 자바 실행 환경
 : 자바 클래스 라이브러리를 포함하고 있어서 자바 프로그램을 실행하는것을 지원한다.
    단, 컴파일이나 디버그와 같은 도구는 포함하지 않는다.
    자바 프로그램을 개발하는것이 아닌 단순 자바를 실행하기만 할 경우에는 JRE를 사용하면 된다.</p>
<hr>
<h3 id="2--와-equals의-차이점">2. == 와 equals의 차이점</h3>
<p>== 
: 비교하고자하는 대상의 주소값을 비교한다.</p>
<p>equals()
: 비교하고자 하는 대상의 값 자체를 비교한다.
  만약, String 타입의 파라미터를 받아서 null 값으로 equals를 처리했을 경우</p>
<pre><code class="language-java">    if (param.equals(&quot;&quot;)) {
     // equals()의 인자는 null 이여도 NullPointerException이 발생하지 않는다.
     //  Object.equals() 내부에서 자체적으로 param 값이 null인지 체크하기 때문이다
    }</code></pre>
<hr>
<h3 id="3-equals는-두-개체가-동일한-hashcode를-가지고-있는-경우-참이어야-합니다-맞습니까">3. Equals()는 두 개체가 동일한 hashCode()를 가지고 있는 경우 참이어야 합니다. 맞습니까?</h3>
<p>: hashCode()는 객체의 해시코드를 반환하는 메서드를 말한다.
  equals()의 경우 객체들간의 값 자체를 비교하는 메서드를 말한다.
   두 객체를 equals()를 사용해 확인했을때 true를 반환한다면, hashCode()역시 값은 같아야한다.
   하지만, hashCode() 값이 동일하다고해서 equals()값이 항상 같은 값으로 나오는것은 아니다.
   equals() 메서드를 재정의 할때 hashCode() 메서드도 함께 재정의를 해야지 해당 일관성을 유지할 수 있다.</p>
<hr>
<h3 id="4-java에서-final의-기능은-무엇입니까">4. Java에서 final의 기능은 무엇입니까?</h3>
<p>: 변수, 메서드, 클래스에 모두 사용가능하다.
   즉, 해당 final이 붙은 경우 해당 값을 수정 할 수 없다는 의미를 가지게 된다.
   그러므로 초기화 값은 필수적이다. ( 값을 변경하고자 할 경우 컴파일 에러가 발생한다.)
  final을 사용할 경우 아래와 같은 상황이 된다.</p>
<p>  1) 변수의 경우 값 변경이 불가능하다. ( = 값 변경 불가)
   2) 메서드의 경우 Override가 되지 않는다. ( = 재정의 불가)
   3) 클래스의 경우 다른 클래스가 상속할 수 없는 클래스가 된다. ( = 상속 불가)</p>
<hr>
<h3 id="5-java에서-mathround-15는-무엇을-의미합니까">5. Java에서 Math.round(-1.5)는 무엇을 의미합니까?</h3>
<p>: round는 반올림을 의미하며 해당값은 -1이 나온다.</p>
<hr>
<h3 id="6-string은-기본-데이터-타입입니까">6. String은 기본 데이터 타입입니까?</h3>
<p>: 자바에서 데이터타입은 기본 타입과 참조 타입이 존재한다.
    기본 타입의 경우, 값이 저장될때 실제 값이 저장된다. ( 정수형 / 실수형 / 문자형/ 논리형 등이 존재한다)
  참조 타입의 경우, 값이 저장될때 저장된 위치의 주소값이 저장된다.
    문자열인 String의 경우 클래스 타입으로 참조타입에 해당하기 때문에 기본 데이터 유형이 아니다.</p>
<hr>
<h3 id="7-자바에서-문자열을-조작하는-클래스는-무엇이-있습니까-각-클래스의-차이점은-뭘까요">7. 자바에서 문자열을 조작하는 클래스는 무엇이 있습니까? 각 클래스의 차이점은 뭘까요?</h3>
<p> : 문자열과 관련된 클래스는 총 3가지가 있다.
     Stirng, StringBuffer, StringBuilder
       크게 두종류로 나눈다면 문자열의 가변과 불변으로 나뉠 수 있다
    가변 : StringBuffer, StringBuilder ( 문자열이 할당된 메모리 공간이 변한다.)
   불변 : String ( 문자열이 할당된 메모리 공간이 변하지 않는다.)
_  ? StringBuffer vs StringBuilder_
1 ) StringBuffer : 동기화지원 / 멀티쓰레드 환경
2 ) StringBuilder : 동기화 지원을 하지 않는다 (싱글쓰레드 환경 혹은 멀티쓰레드 환경이지만 동기화가 필요하지 않은경우 사용한다.)
   +) StringBuilder 동기화를 지원하지 않기 때문에 싱글쓰레드 환경에서 연산속도가 빠르다.</p>
<hr>
<h3 id="8-string-str-i와-string-str--new-stringi가-동일합니까">8. String str =&quot;i&quot;와 String str = new String(&quot;i&quot;)가 동일합니까?</h3>
<p> : 객체를 생성할 경우에는 해당 주소값이 할당되기 때문에 비교 할 경우 false가 출력된다.
 하지만, String str1 =&quot;i&quot; 와 String str2 = &quot;i&quot; 처럼 값을 할당할경우에는 문자열 자체를 비교하기 때문에 true 값이 출력된다.</p>
<hr>
<h3 id="9-문자열을-반전시키는-가장-좋은-방법은-무엇인가요">9. 문자열을 반전시키는 가장 좋은 방법은 무엇인가요?</h3>
<p> : StringBuilder 에 reverse() 사용하기</p>
<hr>
<h3 id="10-string-클래스의-일반적인-메서드는-무엇이-있나요">10. String 클래스의 일반적인 메서드는 무엇이 있나요?</h3>
<p> : 메서드가 많지만 자주 사용되는 메서드를 사용하고자한다.
    1 ) subString() : 문자열 자르기 
    2 ) equals() : 문자열 비교
    3 ) length() : 문자열 길이
    4 ) replace() : 문자열 변경
    5 ) trim() : 문자열 공백 제거 ...</p>
]]></description>
        </item>
        <item>
            <title><![CDATA[[BACKJOON/JAVA] 단계별로 풀어보기 5단계]]></title>
            <link>https://velog.io/@mimme_/BACKJOONJAVA-%EB%8B%A8%EA%B3%84%EB%B3%84%EB%A1%9C-%ED%92%80%EC%96%B4%EB%B3%B4%EA%B8%B0-5%EB%8B%A8%EA%B3%84</link>
            <guid>https://velog.io/@mimme_/BACKJOONJAVA-%EB%8B%A8%EA%B3%84%EB%B3%84%EB%A1%9C-%ED%92%80%EC%96%B4%EB%B3%B4%EA%B8%B0-5%EB%8B%A8%EA%B3%84</guid>
            <pubDate>Fri, 18 Aug 2023 00:30:07 GMT</pubDate>
            <description><![CDATA[<h3 id="백준-단계별로-풀어보기-5단계-문자열">백준 단계별로 풀어보기 5단계 [문자열]</h3>
<ul>
<li><p>단계 : 5-1</p>
</li>
<li><p>문제 : <a href="https://www.acmicpc.net/problem/27866">#27866</a></p>
</li>
<li><p>문제 제목 : 문자와 문자열</p>
<pre><code class="language-java">public class Main {
 public static void main(String[] args) throws IOException {

     BufferedReader bf = new BufferedReader( new InputStreamReader(System.in));

     String str = bf.readLine();
     int n = Integer.parseInt(bf.readLine());

     bf.close();
     System.out.println(str.charAt(n-1));

 }
}</code></pre>
</li>
<li><p>단계 : 5-2</p>
</li>
<li><p>문제 : <a href="https://www.acmicpc.net/problem/2743">#2743</a></p>
</li>
<li><p>문제 제목 : 단어 길이 재기</p>
<pre><code class="language-java">public class Main {
 public static void main(String[] args) throws IOException {

     BufferedReader bf = new BufferedReader( new InputStreamReader(System.in));

     String str = bf.readLine();

     bf.close();
     System.out.println(str.length());

 }
}</code></pre>
</li>
<li><p>단계 : 5-3</p>
</li>
<li><p>문제 : <a href="https://www.acmicpc.net/problem/9086">#9086</a></p>
</li>
<li><p>문제 제목 : 문자열</p>
<pre><code class="language-java">public class Main {
 public static void main(String[] args) throws IOException {

     BufferedReader bf = new BufferedReader( new InputStreamReader(System.in));

     int n = Integer.parseInt(bf.readLine());

     for ( int i = 0; i&lt; n; i++){
         String str = bf.readLine();

         System.out.println(str.charAt(0)+&quot;&quot;+str.charAt(str.length()-1));
     }   

     bf.close();

 }
}</code></pre>
</li>
<li><p>단계 : 5-4</p>
</li>
<li><p>문제 : <a href="https://www.acmicpc.net/problem/11654">#11654</a></p>
</li>
<li><p>문제 제목 : 아스키 코드</p>
<pre><code class="language-java">public class Main {
 public static void main(String[] args) throws IOException {

     BufferedReader bf = new BufferedReader( new InputStreamReader(System.in));

     char ch = bf.readLine().charAt(0);
     int num = (int)ch;

     bf.close();
     System.out.println(num);

 }
}</code></pre>
</li>
<li><p>단계 : 5-5</p>
</li>
<li><p>문제 : <a href="https://www.acmicpc.net/problem/11720">#11720</a></p>
</li>
<li><p>문제 제목 : 숫자의 합</p>
<pre><code class="language-java">public class Main {
 public static void main(String[] args) throws IOException {

     BufferedReader bf = new BufferedReader( new InputStreamReader(System.in));

     int n = Integer.parseInt(bf.readLine());
     String[] arr = new String[n];

     arr = bf.readLine().split(&quot;&quot;);
     int sum = 0;
     for ( int i=0; i&lt; n; i++){
         sum +=  Integer.parseInt(arr[i]);
     }
     bf.close();

     System.out.println(sum);

</code></pre>
</li>
</ul>
<pre><code>}</code></pre><p>}</p>
<pre><code>
 - 단계 : 5-6
 - 문제 : [#10809](https://www.acmicpc.net/problem/10809)
 - 문제 제목 : 알파벳 찾기
``` java
public class Main {
    public static void main(String[] args) throws IOException {

        BufferedReader bf = new BufferedReader( new InputStreamReader(System.in));

        String str = bf.readLine();
        int[] arr= new int[26];

        for ( int i =0; i &lt; arr.length; i++){
            arr[i] = -1;
        }

        for ( int j = 0; j &lt; str.length(); j++){
            char ch = str.charAt(j);
            if ( arr[ch - &#39;a&#39; ]==  -1){
                arr[ch - &#39;a&#39;] = j;
            }
        }

        for ( int k=0; k &lt; arr.length; k++){
            System.out.print(arr[k]+ &quot; &quot;);
        }

        bf.close();
    }
}</code></pre><ul>
<li><p>단계 : 5-7</p>
</li>
<li><p>문제 : <a href="https://www.acmicpc.net/problem/2675">#2675</a></p>
</li>
<li><p>문제 제목 : 문자열 반복</p>
<pre><code class="language-java">public class Main {
 public static void main(String[] args) throws IOException {

     BufferedReader bf = new BufferedReader( new InputStreamReader(System.in));

     //입력갯수
     int n = Integer.parseInt(bf.readLine());

     for (int i=0; i &lt; n; i++){

         StringTokenizer st = new StringTokenizer(bf.readLine(), &quot; &quot;);

         int num = Integer.parseInt(st.nextToken());
         String word =st.nextToken();
         String[] arr = new String[word.length()-1];

</code></pre>
</li>
</ul>
<pre><code>        for ( int j = 0; j &lt; word.length(); j++){
            arr = word.split(&quot;&quot;);

            for ( int k =0; k &lt; num; k ++){
                System.out.print(arr[j]);    
            }

        } 
        System.out.println(&quot;&quot;);           
    }       

    bf.close();
}</code></pre><p>}</p>
<pre><code>
 - 단계 : 5-8
 - 문제 : [#1152](https://www.acmicpc.net/problem/1152)
 - 문제 제목 : 단어의 개수
``` java
public class Main {
    public static void main(String[] args) throws IOException {

        BufferedReader bf = new BufferedReader( new InputStreamReader(System.in));

        String str = bf.readLine();
        StringTokenizer st = new StringTokenizer( str, &quot; &quot;);

        System.out.println(st.countTokens());

        bf.close();
    }
}</code></pre><ul>
<li><p>단계 : 5-9</p>
</li>
<li><p>문제 : <a href="https://www.acmicpc.net/problem/2908">#2908</a></p>
</li>
<li><p>문제 제목 : 상수</p>
<pre><code class="language-java">public class Main {
 public static void main(String[] args) throws IOException {

     BufferedReader bf = new BufferedReader( new InputStreamReader(System.in));

     String str = bf.readLine();
     StringTokenizer st = new StringTokenizer( str, &quot; &quot;);
     String[] arr= new String[2];

     for ( int i = 0; i&lt; arr.length; i++){
         arr[i] = new StringBuilder(st.nextToken()).reverse().toString();
     }

     System.out.println(Integer.parseInt(arr[0]) &gt; Integer.parseInt(arr[1]) ? arr[0] : arr[1]);

     bf.close();
 }
}</code></pre>
</li>
<li><p>단계 : 5-10</p>
</li>
<li><p>문제 : <a href="https://www.acmicpc.net/problem/5622">#5622</a></p>
</li>
<li><p>문제 제목 : 다이얼</p>
<pre><code class="language-java">public class Main {
 public static void main(String[] args) throws IOException {

     BufferedReader bf = new BufferedReader( new InputStreamReader(System.in));

     String str = bf.readLine();
     int cnt = 0;

     for ( int i = 0; i &lt; str.length(); i++){

         switch(str.charAt(i)){
             case &#39;A&#39; : case &#39;B&#39; : case &#39;C&#39; :
                 cnt += 3;
                 break;
             case &#39;D&#39; : case &#39;E&#39; : case &#39;F&#39; :
                 cnt += 4;
                 break;
             case &#39;G&#39; : case &#39;H&#39; : case &#39;I&#39; :
                 cnt += 5;
                 break;
             case &#39;J&#39; : case &#39;K&#39; : case &#39;L&#39; :
                 cnt += 6;
                 break;
             case &#39;M&#39; : case &#39;N&#39; : case &#39;O&#39; :
                 cnt += 7;
                 break;
             case &#39;P&#39; : case &#39;Q&#39;: case &#39;R&#39; : case &#39;S&#39; : 
                 cnt += 8; 
                 break;
             case &#39;T&#39; : case &#39;U&#39;: case &#39;V&#39; : 
                 cnt += 9;
                 break;
             case &#39;W&#39; : case &#39;X&#39;: case &#39;Y&#39; : case &#39;Z&#39; : 
                 cnt += 10;
                 break;

         }
     }

     System.out.println(cnt);

     bf.close();
 }
}</code></pre>
</li>
<li><p>단계 : 5-11</p>
</li>
<li><p>문제 : <a href="https://www.acmicpc.net/problem/11718">#11718</a></p>
</li>
<li><p>문제 제목 : 그대로 출력하기</p>
<pre><code class="language-java">public class Main {
 public static void main(String[] args) throws IOException {

     BufferedReader bf = new BufferedReader( new InputStreamReader(System.in));

     String str = &quot;&quot;;
     while((str = bf.readLine()) != null){
         System.out.println(str);
     }

     bf.close();
 }
}</code></pre>
</li>
</ul>
]]></description>
        </item>
        <item>
            <title><![CDATA[[BACKJOON/JAVA] 단계별로 풀어보기 4단계]]></title>
            <link>https://velog.io/@mimme_/BACKJOON-%EB%8B%A8%EA%B3%84%EB%B3%84%EB%A1%9C-%ED%92%80%EC%96%B4%EB%B3%B4%EA%B8%B0-4%EB%8B%A8%EA%B3%84</link>
            <guid>https://velog.io/@mimme_/BACKJOON-%EB%8B%A8%EA%B3%84%EB%B3%84%EB%A1%9C-%ED%92%80%EC%96%B4%EB%B3%B4%EA%B8%B0-4%EB%8B%A8%EA%B3%84</guid>
            <pubDate>Thu, 17 Aug 2023 00:34:03 GMT</pubDate>
            <description><![CDATA[<h3 id="백준-단계별로-풀어보기-4단계-1차원-배열">백준 단계별로 풀어보기 4단계 [1차원 배열]</h3>
<ul>
<li><p>단계 : 4-1</p>
</li>
<li><p>문제 : <a href="https://www.acmicpc.net/problem/10807">#10807</a></p>
</li>
<li><p>문제 제목 : 개수 세기</p>
<pre><code class="language-java">public class Main {
 public static void main(String[] args) {
     Scanner in = new Scanner(System.in);

     int n = in.nextInt();
     int cnt = 0;
     int[] arr = new int[n];

     for(int i =0; i&lt; n; i++){
         arr[i] = in.nextInt();
     }
     int match = in.nextInt();

     in.close();
     for ( int j = 0; j &lt; n; j++){
         if ( match == arr[j]){
             cnt++;
         }
     }

     System.out.println(cnt);

</code></pre>
</li>
</ul>
<pre><code>}</code></pre><p>}</p>
<pre><code>
 - 단계 : 4-2
 - 문제 : [#10871](https://www.acmicpc.net/problem/10871)
 - 문제 제목 : X보다 작은 수
``` java
public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);

        int n = in.nextInt();

        int[] arr = new int[n];
        int x = in.nextInt();

        for ( int i=0; i &lt; n; i++){
            arr[i] = in.nextInt();
        }
        in.close();

        for ( int i =0; i&lt; n; i++){
            if ( x &gt; arr[i]){
                System.out.print(arr[i]+&quot; &quot;);
            }
        }


    }
}</code></pre><ul>
<li><p>단계 : 4-3</p>
</li>
<li><p>문제 : <a href="https://www.acmicpc.net/problem/10818">#10818</a></p>
</li>
<li><p>문제 제목 : 최소, 최대</p>
<pre><code class="language-java">public class Main {
 public static void main(String[] args) {
     Scanner in = new Scanner(System.in);

     int n = in.nextInt();
     int[] arr = new int[n];

     for ( int i =0; i &lt; n; i++){
         arr[i] = in.nextInt();
     }
     in.close();

     Arrays.sort(arr);
     System.out.println(arr[0] + &quot; &quot; + arr[n-1]);
 }
}</code></pre>
</li>
<li><p>단계 : 4-4</p>
</li>
<li><p>문제 : <a href="https://www.acmicpc.net/problem/2562">#2562</a></p>
</li>
<li><p>문제 제목 : 최댓값</p>
<pre><code class="language-java">public class Main {
 public static void main(String[] args) {
     Scanner in = new Scanner(System.in);

     int[] arr = new int[9];
     int max = 0;
     int n =0;

     for ( int i =0; i &lt; arr.length; i++){
         arr[i] = in.nextInt();
     }
     in.close();

     for (int j = 0; j &lt; arr.length; j++){
         if ( max &lt; arr[j]){
             max = arr[j];
             n = j+1;
         }
     }

     System.out.println(max);
     System.out.println(n);

 }
}</code></pre>
</li>
<li><p>단계 : 4-5</p>
</li>
<li><p>문제 : <a href="https://www.acmicpc.net/problem/10810">#10810</a></p>
</li>
<li><p>문제 제목 : 공 넣기</p>
<pre><code class="language-java">public class Main {
 public static void main(String[] args) {
     Scanner in = new Scanner(System.in);

     int n = in.nextInt();
     int[] arr = new int[n];

     int m = in.nextInt();

     for ( int i =0; i&lt; m; i++){
         int f = in.nextInt();
         int e = in.nextInt();

         int ball = in.nextInt();

         for ( int j=f-1; j &lt; e; j++){
             arr[j] = ball;
         }
     }

     in.close();

     for (int k = 0; k &lt; arr.length; k++){
         System.out.print(arr[k] + &quot; &quot;);
     }
 }
}</code></pre>
</li>
<li><p>단계 : 4-6</p>
</li>
<li><p>문제 : <a href="https://www.acmicpc.net/problem/10813">#10813</a></p>
</li>
<li><p>문제 제목 : 공 바꾸기</p>
<pre><code class="language-java">public class Main {
 public static void main(String[] args) {
     Scanner in = new Scanner(System.in);

     // n개의 바구니
     int n = in.nextInt();
     int[] arr = new int[n];

     // m번 교환
     int m = in.nextInt();

     // 처음에 번호와 같은 번호가 적힌 공이 들어가있음
     for ( int i=0; i &lt; n; i++){
         arr[i] = i+1;
     }

     for ( int j=0; j &lt; m; j++){
         int x = in.nextInt();
         int y = in.nextInt();

         int tmp = arr[x-1];

         arr[x-1] = arr[y-1];
         arr[y-1] = tmp;
     }

</code></pre>
</li>
</ul>
<pre><code>    for ( int k=0; k&lt;n; k++){
        System.out.print(arr[k] + &quot; &quot;);
    }

}</code></pre><p>}</p>
<pre><code>
 - 단계 : 4-7
 - 문제 : [#5597](https://www.acmicpc.net/problem/5597)
 - 문제 제목 : 과제 안 내신 분..?
``` java
public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        int[] arr = new int[31];
        //온 사람은 출석 체크
        for (int i = 0; i &lt; 28; i++) {
            int n = Integer.parseInt(br.readLine());
            arr[n] = 1;
        }
        for (int i = 1; i &lt;= 30; i++) {
            if (arr[i] != 1) System.out.println(i);  //불리지 않은 사람 출력
        }
    }
}</code></pre><ul>
<li><p>단계 : 4-8</p>
</li>
<li><p>문제 : <a href="https://www.acmicpc.net/problem/3052">#3052</a></p>
</li>
<li><p>문제 제목 : 나머지</p>
<pre><code class="language-java">public class Main {
 public static void main(String[] args) throws IOException {
     BufferedReader bf = new BufferedReader( new InputStreamReader(System.in));
     int[] arr = new int[10];
     boolean tf;
     int cnt = 0 ;

     for ( int i =0; i &lt; 10; i++){
         int n = Integer.parseInt(bf.readLine());
         arr[i] = n%42;
     }

     for ( int j = 0; j &lt; arr.length; j++){
         tf = false;
         for ( int k = j+1; k &lt; arr.length; k++){
             if ( arr[j] == arr[k]){
                 tf = true;
                 break;
             }
         }

         if ( tf == false){
             cnt++;
         }
     }
     System.out.println(cnt);

 }
}</code></pre>
</li>
<li><p>단계 : 4-9</p>
</li>
<li><p>문제 : <a href="https://www.acmicpc.net/problem/10811">#10811</a></p>
</li>
<li><p>문제 제목 : 바구니 뒤집기</p>
<pre><code class="language-java">public class Main {
 public static void main(String[] args) throws IOException {
     BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
     StringTokenizer st = new StringTokenizer(bf.readLine());

     // 배열 크기 설정
     int n = Integer.parseInt(st.nextToken());
     // 바꿀 횟수 설정
     int m = Integer.parseInt(st.nextToken());

</code></pre>
</li>
</ul>
<pre><code>    int[] arr = new int[n];


    // 순서변경 초기값 설정
    for ( int i=0; i &lt; arr.length; i++){
        arr[i] = i+1;
    }

    // 순서변경 횟수 만큼 반복문
    for(int j=0; j&lt;m; j++) {
        st = new StringTokenizer(bf.readLine(), &quot; &quot;);
        int x = Integer.parseInt(st.nextToken())-1;
        int y = Integer.parseInt(st.nextToken())-1;

        for(int k=x; k&lt;=y; k++, y--) {
            int temp = arr[k];
            arr[k] = arr[y];
            arr[y] = temp;
        }
    }

    for(int z=0; z&lt;arr.length; z++)
        System.out.print(arr[z] + &quot; &quot;);

    bf.close();

}</code></pre><p>}</p>
<pre><code>
 - 단계 : 4-10
 - 문제 : [#1546](https://www.acmicpc.net/problem/1546)
 - 문제 제목 : 평균
``` java
public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader bf = new  BufferedReader( new InputStreamReader(System.in));
        int n = Integer.parseInt(bf.readLine());

        double[] arr = new double[n];
        double sum = 0;

        StringTokenizer st = new StringTokenizer(bf.readLine(), &quot; &quot;);
        for (int i = 0; i&lt; arr.length; i++) {
            arr[i] = Double.parseDouble(st.nextToken());
        }

        // 정렬
        Arrays.sort(arr);

        for ( int j = 0; j &lt; arr.length; j++){
            sum += ((arr[j]/arr[arr.length-1])*100);
        }

        System.out.println(sum/ arr.length);
    }
}</code></pre>]]></description>
        </item>
        <item>
            <title><![CDATA[[BACKJOON/JAVA] 단계별로 풀어보기 3단계]]></title>
            <link>https://velog.io/@mimme_/BACKJOON-%EB%8B%A8%EA%B3%84%EB%B3%84%EB%A1%9C-%ED%92%80%EC%96%B4%EB%B3%B4%EA%B8%B0-3%EB%8B%A8%EA%B3%84</link>
            <guid>https://velog.io/@mimme_/BACKJOON-%EB%8B%A8%EA%B3%84%EB%B3%84%EB%A1%9C-%ED%92%80%EC%96%B4%EB%B3%B4%EA%B8%B0-3%EB%8B%A8%EA%B3%84</guid>
            <pubDate>Wed, 16 Aug 2023 00:31:47 GMT</pubDate>
            <description><![CDATA[<h3 id="백준-단계별로-풀어보기-3단계-반복문">백준 단계별로 풀어보기 3단계 [반복문]</h3>
<ul>
<li><p>단계 : 3-1</p>
</li>
<li><p>문제 : <a href="https://www.acmicpc.net/problem/2739">#2739</a></p>
</li>
<li><p>문제 제목 : 구구단</p>
<pre><code class="language-java">public class Main {
 public static void main(String[] args) {
     Scanner in = new Scanner(System.in);

     int n = in.nextInt();
     in.close();

     for ( int i=1; i&lt; 10; i++){
         System.out.println( n +&quot; * &quot; + i + &quot; = &quot; + n*i);
     }
 }
}</code></pre>
</li>
<li><p>단계 : 3-2</p>
</li>
<li><p>문제 : <a href="https://www.acmicpc.net/problem/10950">#10950</a></p>
</li>
<li><p>문제 제목 : A+B - 3</p>
<pre><code class="language-java">public class Main {

 public static void main(String[] args) {
     Scanner in = new Scanner( System.in);

     // 테스트 케이스 개수
     int t = in.nextInt();

     for (int i =0; i &lt; t ; i++){
         int a = in.nextInt();
         int b = in.nextInt();

         System.out.println(a+b);
     }

     in.close();
 }
}
</code></pre>
</li>
</ul>
<pre><code>
 - 단계 : 3-3
 - 문제 : [#8393](https://www.acmicpc.net/problem/8393)
 - 문제 제목 : 합
``` java
public class Main {

    public static void main(String[] args) {

        Scanner in = new Scanner(System.in);

        int n = in.nextInt();
        in.close();

        int sum = 0;
        for ( int i =1 ; i &lt;= n; i ++){
            sum += i;
        }
        System.out.println( sum );
    }
}
</code></pre><ul>
<li><p>단계 : 3-4</p>
</li>
<li><p>문제 : <a href="https://www.acmicpc.net/problem/25304">#25304</a></p>
</li>
<li><p>문제 제목 : 영수증</p>
<pre><code class="language-java">public class Main {

 public static void main(String[] args) {

     Scanner in = new Scanner(System.in);
     int total = in.nextInt();
     int n = in.nextInt();
     int sum = 0;

     for ( int i=0; i &lt; n; i ++){
         int money = in.nextInt();
         int any = in.nextInt();

         sum += money * any;
     }

     in.close();

     if( total == sum){
         System.out.println(&quot;Yes&quot;);
     } else {
         System.out.println(&quot;No&quot;);
     }
 }
}</code></pre>
</li>
<li><p>단계 : 3-5</p>
</li>
<li><p>문제 : <a href="https://www.acmicpc.net/problem/25314">#25314</a></p>
</li>
<li><p>문제 제목 : 코딩은 체육과목 입니다</p>
<pre><code class="language-java">public class Main {

 public static void main(String[] args) {

     Scanner in = new Scanner(System.in);
     String str = &quot;&quot;;
     int n = in.nextInt();

     in.close();

     int cnt = n/4;
     for (int i =0; i &lt; cnt; i++){
         str += &quot;long &quot;;
     }

     System.out.println(str + &quot;int&quot;);

 }
}</code></pre>
</li>
<li><p>단계 : 3-6</p>
</li>
<li><p>문제 : <a href="https://www.acmicpc.net/problem/15552">#15552</a></p>
</li>
<li><p>문제 제목 : 빠른 A+B</p>
<pre><code class="language-java">public class Main {

 public static void main(String[] args) throws IOException {

     BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
     BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));

</code></pre>
</li>
</ul>
<pre><code>    int N = Integer.parseInt(br.readLine());

    StringTokenizer st;

    for (int i = 0; i &lt; N; i++) {
        st = new StringTokenizer(br.readLine(),&quot; &quot;);
        bw.write((Integer.parseInt(st.nextToken()) + Integer.parseInt(st.nextToken()))+ &quot;\n&quot;);
    }
    br.close();
    bw.flush();
    bw.close();

}</code></pre><p>}</p>
<pre><code>
 - 단계 : 3-7
 - 문제 : [#11021](https://www.acmicpc.net/problem/11021)
 - 문제 제목 : A+B - 7
``` java
public class Main {

    public static void main(String[] args) {

        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        for ( int i = 1; i&lt;= n; i++){
            int a = in.nextInt();
            int b = in.nextInt();

            System.out.println(&quot;Case #&quot;+i+&quot;: &quot;+ (a+b));
        }

        in.close();

    }
}</code></pre><ul>
<li><p>단계 : 3-8</p>
</li>
<li><p>문제 : <a href="https://www.acmicpc.net/problem/11022">#11022</a></p>
</li>
<li><p>문제 제목 : A+B - 8</p>
<pre><code class="language-java">public class Main {

 public static void main(String[] args) {

     Scanner in = new Scanner(System.in);
     int n = in.nextInt();
     for ( int i = 1; i&lt;= n; i++){
         int a = in.nextInt();
         int b = in.nextInt();

         System.out.println(&quot;Case #&quot;+i+&quot;: &quot;+a+&quot; + &quot; + b +&quot; = &quot;+ (a+b));
     }

     in.close();

</code></pre>
</li>
</ul>
<pre><code>}</code></pre><p>}</p>
<pre><code>
 - 단계 : 3-9
 - 문제 : [#2438](https://www.acmicpc.net/problem/2438)
 - 문제 제목 : 별 찍기 - 1
``` java
public class Main {

    public static void main(String[] args) {

        Scanner in = new Scanner(System.in);
        int n = in.nextInt();

        String str = &quot;&quot;;
        for ( int i = 1; i&lt;= n; i++){
            for ( int j = 1; j &lt;= n-i; j++){
                System.out.print(&quot; &quot;);
            }
            for ( int k = 1; k &lt;= i; k++){
                System.out.print(&quot;*&quot;);
            }
            System.out.println();
        }

        in.close();

    }
}</code></pre><ul>
<li><p>단계 : 3-10</p>
</li>
<li><p>문제 : <a href="https://www.acmicpc.net/problem/10951">#10951</a></p>
</li>
<li><p>문제 제목 : A+B - 4</p>
<pre><code class="language-java">public class Main {

 public static void main(String[] args) {

     Scanner in = new Scanner(System.in);

     while(in.hasNextInt()){
         int a = in.nextInt();
         int b = in.nextInt();

         System.out.println(a+b);
     }
     in.close();

 }
}</code></pre>
</li>
</ul>
]]></description>
        </item>
        <item>
            <title><![CDATA[[BACKJOON/JAVA] 단계별로 풀어보기 2단계]]></title>
            <link>https://velog.io/@mimme_/BACKJOON-%EB%8B%A8%EA%B3%84%EB%B3%84%EB%A1%9C-%ED%92%80%EC%96%B4%EB%B3%B4%EA%B8%B0-2%EB%8B%A8%EA%B3%84</link>
            <guid>https://velog.io/@mimme_/BACKJOON-%EB%8B%A8%EA%B3%84%EB%B3%84%EB%A1%9C-%ED%92%80%EC%96%B4%EB%B3%B4%EA%B8%B0-2%EB%8B%A8%EA%B3%84</guid>
            <pubDate>Fri, 11 Aug 2023 00:25:25 GMT</pubDate>
            <description><![CDATA[<h3 id="백준-단계별로-풀어보기-2단계-조건문">백준 단계별로 풀어보기 2단계 [조건문]</h3>
<ul>
<li><p>단계 : 2-1</p>
</li>
<li><p>문제 : <a href="https://www.acmicpc.net/problem/1330">#1330</a></p>
</li>
<li><p>문제 제목 : 두 수 비교하기</p>
<pre><code class="language-java">public class Main {
 public static void main(String[] args) {
     Scanner in = new Scanner(System.in);

     int A = in.nextInt();
     int B = in.nextInt();

     if ( A &gt; B){
       System.out.println(&quot;&gt;&quot;);
     } else if ( A &lt; B) {
       System.out.println(&quot;&lt;&quot;);
     } else if ( A == B){
       System.out.println(&quot;==&quot;);
     }

     in.close();
 }
}</code></pre>
</li>
<li><p>단계 : 2-2</p>
</li>
<li><p>문제 : <a href="https://www.acmicpc.net/problem/9498">#9498</a></p>
</li>
<li><p>문제 제목 : 두 수 비교하기</p>
<pre><code class="language-java">public class Main {
 public static void main(String[] args) {
     Scanner in = new Scanner(System.in);

     int A = in.nextInt();

     if ( A &gt;= 90 &amp;&amp; A &lt;= 100){
         System.out.println(&quot;A&quot;);
     } else if ( A &gt;=80 &amp;&amp; A &lt; 90){
         System.out.println(&quot;B&quot;);
     } else if ( A &gt;=70 &amp;&amp; A &lt; 80){
         System.out.println(&quot;C&quot;);
     } else if ( A &gt;= 60 &amp;&amp; A &lt;70){
         System.out.println(&quot;D&quot;);
     } else {
         System.out.println(&quot;F&quot;);
     }
 }
}</code></pre>
</li>
<li><p>단계 : 2-3</p>
</li>
<li><p>문제 : <a href="https://www.acmicpc.net/problem/2753">#2753</a></p>
</li>
<li><p>문제 제목 : 윤년</p>
<pre><code class="language-java">public class Main {
 public static void main(String[] args) {
     Scanner in = new Scanner(System.in);
     int a = in.nextInt();

     if ( a%4 == 0 &amp;&amp; (a%400 == 0 || a%100 != 0) ){
         System.out.println(&quot;1&quot;);
     } else{
         System.out.println(&quot;0&quot;);
     }

     in.close();

 }
}</code></pre>
</li>
<li><p>단계 : 2-4</p>
</li>
<li><p>문제 : <a href="https://www.acmicpc.net/problem/14681">#14681</a></p>
</li>
<li><p>문제 제목 : 사분면 고르기</p>
<pre><code class="language-java">public class Main {
 public static void main(String[] args) {
     Scanner in = new Scanner(System.in);

     int x = in.nextInt();
     int y = in.nextInt();

     if ( x &gt; 0 &amp;&amp; y &gt; 0){
         System.out.println(&quot;1&quot;);
     } else if ( x &lt; 0 &amp;&amp; y &gt; 0){
         System.out.println(&quot;2&quot;);
     } else if ( x &lt; 0 &amp;&amp; y &lt; 0){
         System.out.println(&quot;3&quot;);
     } else if ( x &gt; 0 &amp;&amp; y &lt; 0){
         System.out.println(&quot;4&quot;);
     }

     in.close();
 }
}</code></pre>
</li>
<li><p>단계 : 2-5</p>
</li>
<li><p>문제 : <a href="https://www.acmicpc.net/problem/2884">#2884</a></p>
</li>
<li><p>문제 제목 : 알람 시계</p>
<pre><code class="language-java">public class Main {
 public static void main(String[] args) {
     Scanner in = new Scanner(System.in);

     int h = in.nextInt();
     int m = in.nextInt();

     in.close();

     if ( m &lt; 45){

         h--;
         m = 60 - (45 - m);
         if ( h &lt; 0){
             h = 23;
         }
         System.out.println(h + &quot; &quot; + m);
     }else {
         System.out.println(h + &quot; &quot; + (m-45));
     }
  }
}</code></pre>
</li>
<li><p>단계 : 2-6</p>
</li>
<li><p>문제 : <a href="https://www.acmicpc.net/problem/2525">#2525</a></p>
</li>
<li><p>문제 제목 : 오븐 시계</p>
<pre><code class="language-java">public class Main {

 public static void main(String[] args) {
     Scanner in = new Scanner(System.in);

     // 시간
     int h = in.nextInt();
     int m = in.nextInt();

     //경과 시간 
     int n = in.nextInt();

     in.close();
     System.out.println( ((m+n)/60+h)%24 + &quot; &quot; + (m+n)%60);
 }
}</code></pre>
</li>
<li><p>단계 : 2-7</p>
</li>
<li><p>문제 : <a href="https://www.acmicpc.net/problem/2480">#2480</a></p>
</li>
<li><p>문제 제목 : 주사위 세개</p>
<pre><code class="language-java">public class Main {
 public static void main(String[] args) {

     Scanner in = new Scanner(System.in);

     int a = in.nextInt();
     int b = in.nextInt();
     int c = in.nextInt();

     in.close();

     // 모두같은 경우
     if ( a == b &amp;&amp; b == c &amp;&amp; a == c){
         System.out.println(10000+(a*1000));
     } else if ( a == b &amp;&amp; b != c ){
         System.out.println(1000+(a*100));
     } else if ( a == c &amp;&amp; a != b ){
         System.out.println(1000+(a*100));
     } else if (b == c &amp;&amp; a != b){
         System.out.println(1000+(b*100));
     } else if ( a != b &amp;&amp; b !=c &amp;&amp; a != c){
         if ( a &gt; b &amp;&amp; b &gt; c){
             System.out.println(a*100);
         } else if ( a &gt; c &amp;&amp; c &gt; b){
             System.out.println(a*100);
         } else if (b &gt; a &amp;&amp; a &gt; c){
             System.out.println(b*100);
         } else if (b &gt; c &amp;&amp; c &gt; a){
             System.out.println(b*100);
         } else if ( c &gt; a &amp;&amp; a &gt; b){
             System.out.println(c*100);
         } else if ( c &gt; b &amp;&amp; b &gt; a ){
             System.out.println(c*100);
         }

     }

 }
}</code></pre>
</li>
</ul>
]]></description>
        </item>
        <item>
            <title><![CDATA[[BACKJOON/JAVA] 단계별로 풀어보기 1단계]]></title>
            <link>https://velog.io/@mimme_/BACKJOON-%EB%8B%A8%EA%B3%84%EB%B3%84%EB%A1%9C-%ED%92%80%EC%96%B4%EB%B3%B4%EA%B8%B0-1%EB%8B%A8%EA%B3%84</link>
            <guid>https://velog.io/@mimme_/BACKJOON-%EB%8B%A8%EA%B3%84%EB%B3%84%EB%A1%9C-%ED%92%80%EC%96%B4%EB%B3%B4%EA%B8%B0-1%EB%8B%A8%EA%B3%84</guid>
            <pubDate>Thu, 03 Aug 2023 02:34:12 GMT</pubDate>
            <description><![CDATA[<h3 id="백준-단계별로-풀어보기-1단계-입출력과-사칙연산">백준 단계별로 풀어보기 1단계 [입출력과 사칙연산]</h3>
<ul>
<li>단계 : 1-1</li>
<li>문제 : <a href="https://www.acmicpc.net/problem/2557">#2557</a></li>
<li>문제 제목 : Hello World<pre><code class="language-java">public class Main {
 public static void main(String[] args) {
    System.out.println(&quot;Hello World!&quot;);
 }
}</code></pre>
</li>
</ul>
<ul>
<li>단계 : 1-2</li>
<li>문제 : <a href="https://www.acmicpc.net/problem/1000">#1000</a></li>
<li>문제 제목 : A+B<pre><code class="language-java">import java.util.Scanner;
</code></pre>
</li>
</ul>
<p>public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);</p>
<pre><code>      int A = in.nextInt();
    int B = in.nextInt();
    System.out.println(A+B);

    in.close();
}</code></pre><p>}</p>
<pre><code>
- 단계 : 1-3
- 문제 : [#1001](https://www.acmicpc.net/problem/1001)
- 문제 제목 : A-B
``` java
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
            Scanner in = new Scanner(System.in);

              int A = in.nextInt();
            int B = in.nextInt();
            System.out.println(A-B);

            in.close();
    }
}</code></pre><ul>
<li>단계 : 1-4</li>
<li>문제 : <a href="https://www.acmicpc.net/problem/10998">#10998</a></li>
<li>문제 제목 : AxB<pre><code class="language-java">import java.util.Scanner;
</code></pre>
</li>
</ul>
<p>public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);</p>
<pre><code>    int a = in.nextInt();
    int b = in.nextInt();

    System.out.println(a*b);

    in.close();

}</code></pre><p>}</p>
<pre><code>
- 단계 : 1-5
- 문제 : [#1008](https://www.acmicpc.net/problem/1008)
- 문제 제목 : A/B
``` java
import java.util.Scanner;

public class Main{

public static void main(String[] args){
    Scanner in = new Scanner(System.in);

    double a = in.nextDouble();
    double b = in.nextDouble();

    System.out.println(a/b);

    in.close();
    }
}</code></pre><ul>
<li>단계 : 1-6</li>
<li>문제 : <a href="https://www.acmicpc.net/problem/10869">#10869</a></li>
<li>문제 제목 : 사칙연산<pre><code class="language-java">import java.util.Scanner;
</code></pre>
</li>
</ul>
<p>public class Main {
    public static void main(String[] args) {</p>
<pre><code>    int a, b;
    Scanner scan = new Scanner(System.in);
    a = scan.nextInt();
    b = scan.nextInt();

    System.out.println(a+b);
    System.out.println(a-b);
    System.out.println(a*b);
    System.out.println(a/b);
    System.out.println(a%b);
}</code></pre><p>}</p>
<pre><code>
- 단계 : 1-7
- 문제 : [#10926](https://www.acmicpc.net/problem/10926)
- 문제 제목 : ??!
``` java
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
            Scanner in = new Scanner(System.in);
            String str = in.nextLine();
           System.out.println(str+&quot;??!&quot;);

            in.close();
    }
}</code></pre><ul>
<li>단계 : 1-8</li>
<li>문제 : <a href="https://www.acmicpc.net/problem/18108">#18108</a></li>
<li>문제 제목 : 1998년생인 내가 태국에서는 2541년생?!<pre><code class="language-java">import java.util.Scanner;
</code></pre>
</li>
</ul>
<p>public class Main {
    public static void main(String[] args) {
            Scanner in = new Scanner(System.in);
            int str = in.nextInt();
            System.out.println(str-543);</p>
<pre><code>        in.close();
}</code></pre><p>}</p>
<pre><code>
- 단계 : 1-9
- 문제 : [#10430](https://www.acmicpc.net/problem/10430)
- 문제 제목 : 나머지
``` java
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
            Scanner in = new Scanner(System.in);
            int a = in.nextInt();
            int b = in.nextInt();
            int c = in.nextInt();

            System.out.println((a+b)%c);
            System.out.println(((a%c)+(b%c))%c);
            System.out.println((a*b)%c);
            System.out.println(((a%c)*(b%c))%c);

            in.close();
    }
}</code></pre><ul>
<li>단계 : 1-10</li>
<li>문제 : <a href="https://www.acmicpc.net/problem/2588">#2588</a></li>
<li>문제 제목 : 곱셈<pre><code class="language-java">import java.util.Scanner;
</code></pre>
</li>
</ul>
<p>public class Main {
    public static void main(String[] args) {
            Scanner in = new Scanner(System.in);
            int a = in.nextInt();
            int b = in.nextInt();</p>
<pre><code>        System.out.println( a * (b%10));
        System.out.println( a *( b%100/10));
        System.out.println( a * (b/100));
        System.out.println( a * b);
        in.close();
}</code></pre><p>}</p>
<pre><code>
- 단계 : 1-11
- 문제 : [#11382](https://www.acmicpc.net/problem/11382)
- 문제 제목 : 꼬마 정민
``` java
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
            Scanner in = new Scanner(System.in);
            long a = in.nextLong();
            long b = in.nextLong();
            long c = in.nextLong();

            System.out.println(a + b + c);
            in.close();
    }
}</code></pre><ul>
<li><p>단계 : 1-12</p>
</li>
<li><p>문제 : <a href="https://www.acmicpc.net/problem/10171">#10171</a></p>
</li>
<li><p>문제 제목 : 고양이</p>
<pre><code class="language-java">public class Main {
  public static void main(String[] args) {
     System.out.println(&quot;\\    /\\&quot;);
     System.out.println(&quot; )  ( &#39;)&quot;);
     System.out.println(&quot;(  /  )&quot;);
     System.out.println(&quot; \\(__)|&quot;);

  }
}</code></pre>
</li>
<li><p>단계 : 1-13</p>
</li>
<li><p>문제 : <a href="https://www.acmicpc.net/problem/10172">#10172</a></p>
</li>
<li><p>문제 제목 : 개</p>
<pre><code class="language-java">public class Main{

  public static void main(String[] args){
      System.out.println(&quot;|\\_/|&quot;);
      System.out.println(&quot;|q p|   /}&quot;);
      System.out.println(&quot;( 0 )\&quot;\&quot;\&quot;\\&quot;);
      System.out.println(&quot;|\&quot;^\&quot;`    |&quot;);
      System.out.println(&quot;||_/=\\\\__|&quot;);
  }
}</code></pre>
</li>
</ul>
]]></description>
        </item>
        <item>
            <title><![CDATA[[Jquery] 엑셀 다운로드 기능]]></title>
            <link>https://velog.io/@mimme_/Jquery-%EC%97%91%EC%85%80-%EB%8B%A4%EC%9A%B4%EB%A1%9C%EB%93%9C-%EA%B8%B0%EB%8A%A5</link>
            <guid>https://velog.io/@mimme_/Jquery-%EC%97%91%EC%85%80-%EB%8B%A4%EC%9A%B4%EB%A1%9C%EB%93%9C-%EA%B8%B0%EB%8A%A5</guid>
            <pubDate>Tue, 01 Aug 2023 00:57:46 GMT</pubDate>
            <description><![CDATA[<p>[Jquery] 엑셀 다운로드 기능 만들기</p>
<h3 id="html">html</h3>
<pre><code class="language-html">&lt;div&gt;
    &lt;button id=&quot;excelDown&quot;&gt;다운로드&lt;/button&gt;
&lt;/div&gt;

&lt;div&gt;
    &lt;table id= &quot;tableAll&quot;&gt;
        &lt;colgroup&gt;
            &lt;col width=&quot;auto&quot; /&gt;
            &lt;col width=&quot;auto&quot; /&gt;
            &lt;col width=&quot;auto&quot; /&gt;
            &lt;col width=&quot;auto&quot; /&gt;
        &lt;/colgroup&gt;
        &lt;thead&gt;
            &lt;tr&gt;
                &lt;th&gt;첫번째 데이터&lt;/th&gt;
                &lt;th&gt;두번째 데이터&lt;/th&gt;
                &lt;th&gt;세번째 데이터&lt;/th&gt;
                &lt;th&gt;네번째 데이터&lt;/th&gt;
            &lt;/tr&gt;
        &lt;/thead&gt;
        &lt;tbody id=&quot;tableData&quot;&gt;
        &lt;/tbody&gt;
    &lt;/table&gt;
&lt;/div&gt;</code></pre>
<ul>
<li>테이블 태그 안에 아이디 값을 만들어준다.
 ( ex : <code>&lt;table id=&quot;tableAll&quot;&gt;</code>)</li>
</ul>
<h3 id="js">js</h3>
<pre><code class="language-js">$(function () {
    $(&quot;#excelDown&quot;).on(&quot;click&quot;,function(){
        var header = {};
        header.columns = [];
        //테이블 id
        var rowList = document.getElementById(&#39;tableAll&#39;).rows;

        var head = rowList[0];

        for(i = 0; i&lt; head.cells.length ; i++){
            var headColumn = {};
            headColumn.label = head.cells[i].innerHTML.replace(/&lt;[^&gt;]*&gt;?/g, &#39;&#39;);
            headColumn.key = head.cells[i].innerHTML;
            headColumn.width = 20;
            header.columns.push(headColumn);
        }

        var headArr = new Array();
        var rowCount = 0;
        var workbook = new ExcelJS.Workbook();
        workbook.creator = &#39;작성자&#39;;
        workbook.lastModifiedBy = &#39;최종 수정자&#39;;
        workbook.created = new Date();
        workbook.modified = new Date();
        var sheet = workbook.addWorksheet(&#39;Sheet&#39;);
        sheet.columns = header.columns;
        for( var j=0; j &lt; header.columns.length; j++){
            headArr.push(header.columns[j].label);
        }
        sheet.addRow(headArr);
        var cellData = [];
        for( var j=1; j&lt;rowList.length; j++ ) {
            var data = {};
            for(i = 0; i&lt; head.cells.length ; i++){
                data[head.cells[i].innerHTML] = rowList[j].cells[i].innerHTML
            }
            cellData.push(data)
        }
        for( var i=0;i&lt;rowList.length;i++ ) {
            sheet.addRow(cellData[i]);
        }
        workbook.xlsx.writeBuffer().then( function(data) {
            var blob = new Blob([data], { type: &#39;application/vnd.openxmlformats-officedocument.spreadsheetml.sheet&#39; });
            var date = new Date();
            var year = date.getFullYear().toString();
            var month = date.getMonth() + 1;
            month = month &lt; 10 ? &#39;0&#39; + month.toString() : month.toString();
            var day = date.getDate();
            day = day &lt; 10 ? &#39;0&#39; + day.toString() : day.toString();
            var hour = date.getHours();
            hour = hour &lt; 10 ? &#39;0&#39; + hour.toString() : hour.toString();
            var minites = date.getMinutes();
            minites = minites &lt; 10 ? &#39;0&#39; + minites.toString() : minites.toString();
            var seconds = date.getSeconds();
            seconds = seconds &lt; 10 ? &#39;0&#39; + seconds.toString() : seconds.toString();
             //파일 이름 설정하는 부분
            saveAs(blob, &#39;엑셀 다운로드 기능 -&#39;+year + month + day + hour + minites + seconds+&#39;.xlsx&#39;);
        });
    })
});</code></pre>
<ul>
<li>excelDown 버튼을 클릭했을경우 이벤트 발생처리를 하게된다.</li>
<li>tableAll 에있는 rows를 가져와서 엑셀 데이터로 만들어준다.</li>
<li>saveAs 에서 파일명을 설정할 수 있다. </li>
</ul>
]]></description>
        </item>
        <item>
            <title><![CDATA[[Postgresql] Linux DB 백업 자동화]]></title>
            <link>https://velog.io/@mimme_/Postgresql-Linux-DB-%EB%B0%B1%EC%97%85-%EC%9E%90%EB%8F%99%ED%99%94</link>
            <guid>https://velog.io/@mimme_/Postgresql-Linux-DB-%EB%B0%B1%EC%97%85-%EC%9E%90%EB%8F%99%ED%99%94</guid>
            <pubDate>Tue, 25 Jul 2023 02:15:43 GMT</pubDate>
            <description><![CDATA[<h4 id="1-linux-환경에서-자동화-설정을-하기-위해서는-crontab-설정에대해-알아야한다"><strong><em>1. linux 환경에서 자동화 설정을 하기 위해서는 crontab 설정에대해 알아야한다.</em></strong></h4>
<pre><code>  #크론탭 편집
  crontab -e

  #크론탭 작업 내용 확인
  crontab -l</code></pre><pre><code>- crontab 설정방법</code></pre><pre><code>  #Example of job definition:
  #.---------------- minute (0 - 59)
  #|   .------------- hour (0 - 23)
  #|   |   .---------- day of month (1 - 31)
  #|   |   |  .------- month (1 - 12) OR jan,feb,mar,apr ...
  #|   |   |  |   .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat
  #|   |   |  |   |
  #*   *   *  *   *   user-name command to be executed
  #분  시  일 월  요일 명령어 또는 스크립트

  분 (minute)    0-59, * 설정 시 1분 단위로 실행
  시 (hour)    0-23, * 설정 시 매시간 실행
  일 (day of month)    1-31, * 설정 시 매일 실행
  월 (month)    1-12, * 설정 시 매달 실행 
  요일 (day of week)    0-7, * 설정 시 월요일부터 일요일까지 매일 실행
  명령어 또는 스크립트 (command)    실행할 명령어 또는 프로그램 등 설정
</code></pre><p>   예시)</p>
<pre><code>   * 2 25 * * /db/dump.sh
   매일 25일 02시에 dump.sh 실행</code></pre><p>   crontab 설정 이후에는 재시작 처리 해줘야한다.</p>
<pre><code>   # crontab 재시작
   service crond restart
   # crontab 상태 확인
   service crond </code></pre><h4 id="2-백업-스크립트-작성하기"><em>2. 백업 스크립트 작성하기</em></h4>
<pre><code>  - 디렉토리 생성하기
  ` mkdir /home/db`
- 스크립트 생성하기
   `vim /home/db/dump.sh`
- 스크립트 작성하기
```</code></pre><p>   #!/bin/bash
  FILENAME=$(backUpDB +&quot;%Y-%m-%d_%H%M&quot;).dump
  cd $BACKUP_DIR
  PGPASSWORD=&quot;비밀번호&quot; pg_dump -h &quot;ip주소&quot; -U &quot;사용자명&quot; &quot;DB명&quot; -Fc -v &gt; &quot;${BACKUP_DIR}/DBNAME_${FILENAME}&quot;
  echo &quot;Delete old file DBNAME_${DEL_FILE}&quot;
  echo &quot;BACKUP - End time : &quot; $(date +&quot;%Y-%m-%d %H:%M:%S&quot;)
    ```</p>
<pre><code> - FILENAME : dump.sh 실행시 결과물로 만들어질 파일명
- BACKUP_DIR : FILENAME 과 같이 변수로 설정하거나 혹은 고정된 디렉토리 값을 입력해도 무관하다.
- 추가적으로, dump.sh 실행과 동시에 일정 시간이 지난 오래된 dump의 결과물을 삭제하고자 한다면

```
DEL_FILE=$(backUpDB -d &#39;60 day ago&#39; +&#39;%Y-%m-%d_&#39;)&quot;*.dump&quot;
rm &quot;${BACKUP_DIR}/DBNAME_${DEL_FILE}&quot; 
```</code></pre><p>   을 추가적으로 작성해주면 된다.  &#39;60 day ago&#39; 부분의 숫자의 값만 변경하면 된다.    </p>
]]></description>
        </item>
        <item>
            <title><![CDATA[[Postgresql] Linux DB 덤프 및 복원 ]]></title>
            <link>https://velog.io/@mimme_/Postgresql-Linux-DB-%EB%8D%A4%ED%94%84-%EB%B0%8F-%EB%B3%B5%EC%9B%90</link>
            <guid>https://velog.io/@mimme_/Postgresql-Linux-DB-%EB%8D%A4%ED%94%84-%EB%B0%8F-%EB%B3%B5%EC%9B%90</guid>
            <pubDate>Fri, 21 Jul 2023 01:39:19 GMT</pubDate>
            <description><![CDATA[<p><strong>Linux에서 Postgresql DB 덤프 및 복원 방법</strong></p>
<ol>
<li><p>DUMP
1) psql 접근 권한이 있는 계정으로 접속한다.
2) psql 이 있는 폴더로 접근한다.</p>
<pre><code>cd /usr/psql-11/bin</code></pre><p>3) dump 하고자 하는 DB에 설정값을 입력해서 받는다</p>
<pre><code>옵션사항 : 
 -d, 덤프할 DBNAME 데이터베이스
 -h, 호스트 이름 데이터베이스 서버 호스트 또는 소켓 디렉터리
 -p, PORT 데이터베이스 서버 포트 번호
 -U, 지정된 데이터베이스 사용자로 NAME 연결
 -w, --no-password 비밀번호 확인 안 함
 -W, --password 비밀번호 강제 적용 프롬프트(자동으로 발생해야 함)
</code></pre><p>4 ) 특정 테이블 DUMP 뜨기</p>
<pre><code>pg_dump -d [DB 이름] -h [DB IP주소] -p [DB 포트] -U [사용자명] -t[받고자하는 테이블 명] &gt; [경로/파일명.확장자]</code></pre><pre><code> -t 덤프 받고자 하는 테이블 
 -T 덤프 제외 테이블
 * DB 전체 DUMP시 -t 사용 안하고 DB명만 적으면 됨</code></pre><ol start="2">
<li>BACK-UP
1) 특정 테이블만 복원<pre><code>psql -h[DB IP주소] -p [DB 포트] -U [사용자명] -f 백업.sql [DB명]</code></pre>2) 전체 복원<pre><code>psql [DB명] &lt; 백업.sql</code></pre></li>
</ol>
</li>
</ol>
]]></description>
        </item>
    </channel>
</rss>