순수한 공상과학연구소

전체 글 (227)

  1. 2021.11.04 [SQL] 비교 표현식 (gt, lt, ge, le, eq, ne)

    출처: https://88240.tistory.com/493 비교 표현식 (gt, lt, ge, le, eq, ne) 비교 표현식 줄임말 eq - equal ( = ) ne - not equal ( ) lt - little ( = ) 비교 표현식 구분 표현식 비교 크다 a gt b.. 88240.tistory.com 비교 표현식 줄임말 eq - equal ( = ) ne - not equal ( ) lt - little ( = ) 비교 표현식 구분 표현식 비교 크다 a gt b a > b 작다 a lt b a < ..

  2. 2021.11.04 [Java] Set, HashSet 사용법 데이터 삽입, 삭제, 출력

    출처: https://tosuccess.tistory.com/145 [자바/java] Set, HashSet 사용법 데이터 삽입, 삭제, 출력 Set이란? 자바 컬렉션에 HashSet은 Set 인터페이스의 구현 클래스다. Set은 한국말로는 "집합"이고, 따로 저장 순서를 유지하지는 않는다. 또한 중복 값을 허용하지 않는다는 특징을 갖고 있다. *순서 tosuccess.tistory.com Set이란? 자바 컬렉션에 HashSet은 Set 인터페이스의 구현 클래스다. Set은 한국말로는 "집합"이고, 따로 저장 순서를 유지하지는 않는다. 또한 중복 값을 허용하지 않는다는 특징을 갖고 있다. *순서를 유지하고 싶으면 LinkedHashSet 클래스를 사용하면 된다. 1. 객체 선언 - new HashSet..

  3. 2021.11.02 [React] 따라하면 좋을 것 같은 클론 코딩 - React

    출처: https://velog.io/@minn602/2%EC%B0%A8-%ED%94%84%EB%A1%9C%EC%A0%9D%ED%8A%B8-%ED%9B%84%EA%B8%B0-Airbnb-clone-project 2차 프로젝트 후기 - Airbnb clone project !youtubeRFja9gWiVzs위코드 2차 프로젝트로 에어비앤비 클론 프로젝트를 진행하게 되었다. 프로젝트 발표에서 내가 발표했던 사이트이고 일단 UI가 너무 이쁜 사이트라 꼭 클론을 해보고 싶었던 사이 velog.io 깃: https://github.com/wecode-bootcamp-korea/16-2nd-bearbnb-frontend

  4. 2021.11.01 [JavaScript, React] 쿠키 cookie 다루기

    출처: https://ko.javascript.info/cookie 쿠키와 document.cookie ko.javascript.info react, axios 요청에서 backend 서버에서 자동으로 cookie 얻기: {withCredentials: true} 쓴다. 출처: https://stackoverflow.com/questions/43002444/make-axios-send-cookies-in-its-requests-automatically Make Axios send cookies in its requests automatically I am sending requests from the client to my Express.js server using Axios. I set a cookie..

  5. 2021.10.20 Module not found: Can't resolve 'firebase' in code example

    출처: https://newbedev.com/module-not-found-can-t-resolve-firebase-in-code-example Programming tutorials | Newbedev Checkout new tutorials and guides for programming languages Javascript, Python, Java, Golang, C++, PHP newbedev.com 출처: https://stackoverflow.com/questions/62571879/getting-the-error-module-not-found-cant-resolve-firebase-app

  6. 2021.10.20 리액트 VSCode 자동완성 익스텐션 추천 (Auto Import, Code snippets 등)

    출처: https://breathtaking-life.tistory.com/117 리액트 VSCode 자동완성 익스텐션 추천 (Auto Import, Code snippets 등) 리액트를 공부하며 필요한 익스텐션을 정리해보았다. - Auto Import - ES6, TS, JSX, TSX Auto Import - ES6, TS, JSX, TSX - Visual Studio Marketplace Extension for Visual Studio Code - Automatically finds.. breathtaking-life.tistory.com

  7. 2021.09.10 [Go] Golang으로 백엔드 개발하기

    출처: https://umi0410.github.io/blog/golang/how-to-backend-in-go-db/ Golang으로 백엔드 개발하기 - 1. 데이터베이스 작업하기 (Ent 프레임워크 이용) 시작하며 Go 언어를 처음 시작한 지 벌써 1년이 지났다니 시간이 참 빠른 것 같습니다! Java는 Spring이라고하는 거대한 프레임워크가 자리 잡고 있어 딱히 어떤 프레임워크나 라이브러리를 사용할 umi0410.github.io

  8. 2021.09.07 [React] Create react app 하기

    터미널에 npx create-react-app app이름 출처: https://ko.reactjs.org/docs/create-a-new-react-app.html 새로운 React 앱 만들기 – React A JavaScript library for building user interfaces ko.reactjs.org 마지막에 We suggest that you begin by typing: cd voca npm start Happy hacking! 나오면 성공

  9. 2021.09.01 [Java SpringBoot] Spring Boot jar 파일 실행시 jsp 404 Not Found Error 해결방법(solution)

    출처: https://regyu.tistory.com/3 Spring Boot jar 파일 실행시 jsp 404 Not Found Error 해결방법(solution) spring boot jar.md Spring Boot 스프링부트는 Spring 프로젝트가 제공하는 다양한 라이브러리와 프레임워크로 단독실행되는, 실행하기만 하면 되는 상용화 가능한 수준의, 스프링 기반 애플리케이션을 regyu.tistory.com

출처: https://88240.tistory.com/493

 

비교 표현식 (gt, lt, ge, le, eq, ne)

비교 표현식 줄임말 eq - equal ( = ) ne - not equal ( <> ) lt - little ( < ) le - little or equal ( <= ) gt - greater ( > ) ge - greater or equal ( >= ) 비교 표현식 구분 표현식 비교  크다  a gt b..

88240.tistory.com

 

비교 표현식 줄임말

eq - equal ( = )

ne - not equal ( <> )

lt - little ( < )

le - little or equal ( <= )

gt - greater ( > )

ge - greater or equal ( >= )

 

비교 표현식 

구분  표현식  교 
 크다  a gt b  a > b
 작다  a lt b  a < b
 크거나 같다  a ge b  a >= b
 작거나 같다  a le b  a <= b
 같다  a eq b  a == b
 같지 않다  a ne b  a !== b

 

표현 방식 예시

 표현 방식  조건
 [$A -eq $B]  A 와  B 의 값이 같은 경우
 [$A -ne $B]  A 와  B 의 값이 다른 경우
 [$A -gt $B]  A 가  B 보다 큰 경우
 [$A -lt $B]  A 가  B 보다 작은 경우
 [$A -ge $B]  A 가  B 보다 크거나 같은 경우
 [$A -le $B]  A 가  B 보다 작거나 같은 경우
 [$String_1 = $String_2]  두 문자열이 같은 경우
 [$String_1 = $String_2]  두 문자열이 다른 경우
 [-z "$String"]  문자열의 길이가 0인 경우
 [-n "$String"]  문자열의 길이가 0이 아닌 경우

 

 

참고 사이트 

http://firedev.tistory.com/entry/ibatis-%EB%B9%84%EA%B5%90-%ED%91%9C%ED%98%84%EC%8B%9D-gt-lt-ge-le-eq-ne

https://blog.naver.com/sipzirala/220169990592



출처: https://88240.tistory.com/493 [shaking blog]

출처: https://tosuccess.tistory.com/145

 

[자바/java] Set, HashSet 사용법 데이터 삽입, 삭제, 출력

Set이란? 자바 컬렉션에 HashSet은 Set 인터페이스의 구현 클래스다. Set은 한국말로는 "집합"이고, 따로 저장 순서를 유지하지는 않는다. 또한 중복 값을 허용하지 않는다는 특징을 갖고 있다. *순서

tosuccess.tistory.com

 

Set이란?

자바 컬렉션에 HashSet은 Set 인터페이스의 구현 클래스다. Set은 한국말로는 "집합"이고,

따로 저장 순서를 유지하지는 않는다. 또한 중복 값을 허용하지 않는다는 특징을 갖고 있다.

 

*순서를 유지하고 싶으면 LinkedHashSet 클래스를 사용하면 된다.

 

1. 객체 선언 - new HashSet<>();

1 Set<String> set = new HashSet<String>(); cs

 

 

2. 데이터 삽입 - set.add()

1
2
3
4
5
6
Set<String> set = new HashSet<String>();
        
        set.add("apple");
        set.add("banana");
        set.add("pyopyo");
        set.add("kiwi");
cs

 

 

3. 데이터 삭제 - set.remove(object e);

1
2
3
4
5
6
7
8
Set<String> set = new HashSet<String>();
        
        set.add("apple");
        set.add("banana");
        set.add("pyopyo");
        set.add("kiwi");
        
        set.remove("apple");
cs

 

 

4. 데이터 출력 

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
public static void main(String args[]) {
        Set<String> set = new HashSet<String>();
        
        set.add("apple");
        set.add("banana");
        set.add("pyopyo");
        set.add("kiwi");
        
        Iterator<String> iterSet = set.iterator();
        while(iterSet.hasNext()) {
            System.out.print(iterSet.next() +" ");
        }
        
        System.out.println();
        System.out.println(set.toString());
        
    }
Colored by Color Scripter
cs
/*출력*/
banana apple kiwi pyopyo 
[banana, apple, kiwi, pyopyo]

Iterator을 사용하는 경우는 각 데이터를 조작할 때 사용한다.

toString() 경우에는 단순히 set에 어떤 데이터가 포함되어있는지 확인할 때 사용한다.

 

 

5. 값 포함 유무 - set.contains(object e)

1
2
3
4
5
6
7
8
9
10
11
12
13
public static void main(String args[]) {
        Set<String> set = new HashSet<String>();
        
        set.add("apple");
        set.add("banana");
        set.add("pyopyo");
        set.add("kiwi");
    
        System.out.println(set.contains("apple"));
        System.out.println(set.contains("hi"));
    }
Colored by Color Scripter
cs
/*출력*/
true
false

 

 

6. 전체 데이터 삭제 - set.clear()

1
2
3
4
5
6
7
8
9
10
11
12
public static void main(String args[]) {
        Set<String> set = new HashSet<String>();
        
        set.add("apple");
        set.add("banana");
        set.add("pyopyo");
        set.add("kiwi");
    
        set.clear();
        System.out.println(set.toString());
    
    }
Colored by Color Scripter
cs
/*출력*/
[]

 

 

7. 값 존재 유무 - set.isEmpty()

1
2
3
4
5
6
7
8
9
10
public static void main(String args[]) {
        Set<String> set = new HashSet<String>();
        
        set.add("apple");
        set.add("banana");
        set.add("pyopyo");
        set.add("kiwi");
    
        System.out.println(set.isEmpty());
    }
Colored by Color Scripter
cs
/*출력*/
false

 

 

8. Set 데이터 크기 - set.size()

1
2
3
4
5
6
7
8
9
10
public static void main(String args[]) {
        Set<String> set = new HashSet<String>();
        
        set.add("apple");
        set.add("banana");
        set.add("pyopyo");
        set.add("kiwi");
    
        System.out.println(set.size());
    }
Colored by Color Scripter
cs
/*출력*/
4



출처: https://tosuccess.tistory.com/145 [EI_HJ]

출처: https://ko.javascript.info/cookie

 

쿠키와 document.cookie

 

ko.javascript.info

 

react, axios 요청에서 backend 서버에서 자동으로 cookie 얻기: {withCredentials: true} 쓴다. 

출처: https://stackoverflow.com/questions/43002444/make-axios-send-cookies-in-its-requests-automatically

 

Make Axios send cookies in its requests automatically

I am sending requests from the client to my Express.js server using Axios. I set a cookie on the client and I want to read that cookie from all Axios requests without adding them manually to requ...

stackoverflow.com

 

npm 으로 쿠키 다루기 

출처: https://blog.pumpkin-raccoon.com/80

 

react-cookie 쉽게 사용하기

회원가입과 로그인 같은 인증(auth) 기능을 구현하기 위해서 프론트엔드에서 쿠키에 토큰(jwt)을 저장하는 경우가 많습니다. 저는 그런 경우에 react-cookie를 자주 사용하는데요, 패키지 설명을 읽어

blog.pumpkin-raccoon.com

 

터미널에 

npx create-react-app app이름

출처: https://ko.reactjs.org/docs/create-a-new-react-app.html

 

새로운 React 앱 만들기 – React

A JavaScript library for building user interfaces

ko.reactjs.org

 

마지막에 

We suggest that you begin by typing:

  cd voca
  npm start

Happy hacking!

나오면 성공