STUDY 42

[Spring] Spring CRUD, 학생 목록 저장하고 출력하기

templates / create.html Create Student Name: Email: Back templates / home.html Student List No Student Here ... 번호 : [[${student.id}]] 이름 : [[${student.name}]] 이메일 : [[${student.email}]] Create model / StudentDto.java package com.example.crud.model; public class StudentDto { private Long id; private String name; private String email; public StudentDto() { } public StudentDto(Long id, String name..

STUDY/Spring 2023.06.08

[Python] 알고리즘 코드 상에서, 시간과 메모리 측정하기

i) 알고리즘에서 시간을 측정하는 작업을 사용하고 싶을 때, import time start = time.time() # 코드 작성 end = time.time() print("time : ", end - start) example. 백준 14888 # import sys import time start = time.time() n = int(input()) num = list(map(int, input().split())) op = list(map(int, input().split())) minN = int(1e9) maxN = int(-1e9) def f(c, v): global minN, maxN if c == n: if minN > v: minN = v if maxN < v: maxN = v el..

STUDY/Solution 2023.01.03

[Toeic Speaking] Part 4

[Part 4] Question 8-10 단어만 말하면 안 되고, 하나의 완결된 문장과 정확한 문법을 써서 답변해야 함 키포인트 정확한 문법과 주어+동사를 갖춘 문장으로 듣기에서 물어보는 부분을 표를 보고 '읽는 법' 듣기가 표의 무엇을 물어보는지 '잘 듣는 법' (+ 안 들렸을 때 대처법까지) 화려한 문장을 쓸 필요가 없다. 간결하고 정확한 문장으로 # 전치사 정리 날짜(요일) : on 달력에서 콕 집을 수 있는 날짜는 On을 쓴다. On Oct 24th 시각 : at at 9:00 am from 2 pm to 3 pm 특정 장소(건물명, 주소) : at at Kimpo Airport at 1330 Main Street 실내 장쇼, 도시, 나라 : in In Room 105 In Seoul # 8번에서..

STUDY/English 2022.12.14

[Toeic Speaking] Part 3

[Part 3] 준비시간 3초, 답변시간 15초 문제는 내 친구 너무 어렵게 말하면 안 된다, 쉬운 문장으로 말하기 진짜 내 얘기를 하지 말기 내가 할 말의 70%는 미리 준비하기 템플릿만 알아도 대처 가능 최대한 긍정적으로 대답 문제에 맞게 정확하게 대답하는 것 Internet, social media, parks, exercising, home cleaning products, house plants ... 등 자주 나옴 ex. house plants # 파트 3 유형 소개 토픽 확인 키워드 확인 Imagine ~ about 키워드 5,6번 의문사(1,2)개, 이유, 준비시간:3초, 답변시간:15초 7번 의견/선호도, 장단점/옵션선택, 추천, 준비시간:3초, 답변시간:30초 1. 상황설명 화면 : 주..

STUDY/English 2022.12.13

[Toeic Speaking] Part 1

[Part 1] 억양 중요 ! Part 1 망하는 세가지 : 모노톤/소심톤, 쉬운 단어 발음/강세 실수, 속도가 너무 빠름 어려운 단어, 사람이름이나 고유명사는 틀려도 됨. 자신감 있게 R, L, F, V 발음 주의 우리말의 ' ㅡ ' 발음은 약하게 # R 발음 / L 발음 # F 발음 # V 발음 # Part 1 만점 받기 어려운 단어 자신감 있게 읽기 틀린 부분은 그 단어부터 다시 읽기 적정 속도로 읽기 남는 시간은 멘탈관리하기 # 모노톤/소심톤 It's time for your weather update for this week. 잇츠 타임 폴 월 웨덜 업-데이트 폴 디스 위크 저음 ㄴㄴ, 밝게 # 쉬운 단어 발음/강세 실수 expect 엑스펙트 x, 익스펙트 o # 억양을 올려줘야 할 곳 중요 명..

STUDY/English 2022.12.12

[Toeic Speaking] Part 2

[Part2] 이 사진은 (장소)에서 찍힌 사진입니다. This is a picture take at (장소) This is a picture taken indoors / outdoors 이 사진에서 가장 먼저 보이는 것은 (대표적인 사물 / 사람) 입니다. The first thing I can see from this picture is (대표적인 사물 / 사람) 사진의 정면에는 (사람 / 사물) 이 있습니다. In the foreground of the picture, there is 단수명사 / there are 복수명사 / I can see 단/복수명사 사진의 중심에는 ~ In the middle of the picture, there is/are ~ 사진의 배경에는 ~ In the backgr..

STUDY/English 2022.12.09

[토익스피킹] 토스 문제 구성

22점 만점 1-2 Read a text aloud (3점) - 답변 준비시간 45초, 답변 시간 45초 3-4 Describe a picture - 답변 준비시간 45초, 답변 시간 45초 5-7 Respond to questions - 답변 준비시간 문항당 3초, 답변 시간 15초(5-6), 30초(7) 8-10 Respond to questions using information provided - 답변 준비시간 분항당 3초( 지문 읽는 시간 45초 ), 답변 시간 15초(8-9), 30초(10) 11 Express an opinion - 답변 준비시간 30초, 답변시간 60초

STUDY/English 2022.11.30

[OpenCV] cv2.imwrite 까맣게 사진이 저장되는 이유

딥러닝 모델을 돌리고 인풋 적용 후 결과 이미지를 저장하는 데 계속 까만 사진으로 저장이 되었다 .. -> 정규화가 안되있던 것 (정규화 : 특정 부분에 몰려 있는 값을 전체 영역으로 골고루 분포하게 하도록 만듦) imgs = np.expand_dims(load_net_in(INPUT_IMG_FNAME, desired_size=INPUT_SIZE), axis=0) ys = model.predict(imgs) y = postprocess(ys)[0] save_file = "x" + str(j) + ".jpg" y = cv2.cvtColor(y, cv2.COLOR_BGR2RGB) y = cv2.normalize(y, None, 0, 255, cv2.NORM_MINMAX, dtype=cv2.CV_8U) # 이..

STUDY/Solution 2022.09.27

[Android Studio] naver map api - 위치 클릭 시 위경도, 도로명 주소 출력

@Override public void onMapReady(@NonNull NaverMap naverMap) { this.mNaverMap = naverMap; Marker marker = new Marker(); naverMap.setLocationSource(mLocationSource); // 지도 클릭 이벤트 처리 naverMap.setOnMapClickListener((point, coord) -> { // 클릭한 위치의 위경도 : coord.latitude, coord.longitud marker.setPosition(new LatLng(coord.latitude, coord.longitude)); marker.setMap(naverMap); // 위경도로 도로명 주소 변환 g = new Ge..

STUDY/Solution 2022.08.31

2022.08.22 답변 등록 기능 만들기, 화면 꾸미기

projects/myproject/pybo/templates/question/question_detail.html {{ question.subject }} {{ question.content }} # 답변 블루프린트 만들기 projects/myproject/pybo/views/answer_views.py from datetime import datetime from flask import Blueprint, url_for, request from werkzeug.utils import redirect from pybo import db from pybo.models import Question, Answer bp = Blueprint('answer', __name__, url_prefix='/answer..

STUDY/Flask 2022.08.22

2022.08.22 Flask 모델 데이터 처리, 질문&답변 상세 기능 만들기

# ORM 라이브러리 설치 (myproject) c:\projects\myproject>pip install flask-migrate projects/myproject/config.py import os BASE_DIR = os.path.dirname(__file__) SQLALCHEMY_DATABASE_URI = 'sqlite:///{}'.format(os.path.join(BASE_DIR, 'pybo.db')) SQLALCHEMY_TRACK_MODIFICATIONS = False projects/myproject/pybo/__init__.py from flask import Flask from flask_migrate import Migrate from flask_sqlalchemy import SQ..

STUDY/Flask 2022.08.22

[하계 코딩테스트 특강] 2022.07.28 그래프, 트리 알고리즘

1) 다익스트라 알고리즘 우선순위 표를 만들어 구함 [1, 2, 12] : 1번 정점에서 2번 정점까지 가는 데 드는 비용 12 - java package ch08; import java.io.*; import java.util.*; class Edge implements Comparable{ public int vex; public int cost; Edge(int vex, int cost){ this.vex = vex; this.cost = cost; } @Override public int compareTo(Edge ob){ return this.cost - ob.cost; } } public class 다익스트라알고리즘 { public int solution(int n, int[][] edges,..

STUDY/Coding Test 2022.07.28