๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ

์ „์ฒด ๊ธ€

(402)
[MYSQL] ํ”„๋กœ๊ทธ๋ž˜๋จธ์Šค - ๊ณ ๋“์  ํ‚คํŠธ SUM, MAX, MIN ์ตœ๋Œ“๊ฐ’ ๊ตฌํ•˜๊ธฐ select DATETIME as '์‹œ๊ฐ„' from ANIMAL_INS order by DATETIME desc limit 1 ์ตœ์†Ÿ๊ฐ’ ๊ตฌํ•˜๊ธฐ select min(DATETIME) as '์‹œ๊ฐ„' from ANIMAL_INS ๋™๋ฌผ ์ˆ˜ ๊ตฌํ•˜๊ธฐ select count(*) from ANIMAL_INS ์ค‘๋ณต ์ œ๊ฑฐํ•˜๊ธฐ select count(distinct name) from ANIMAL_INS where name is not null
[MYSQL] ํ”„๋กœ๊ทธ๋ž˜๋จธ์Šค - ๊ณ ๋“์  ํ‚คํŠธ SELECT ๋ชจ๋“  ๋ ˆ์ฝ”๋“œ ์กฐํšŒํ•˜๊ธฐ select * from ANIMAL_INS order by ANIMAL_ID; ์—ญ์ˆœ ์ •๋ ฌํ•˜๊ธฐ select NAME,DATETIME from ANIMAL_INS order by ANIMAL_ID desc; ์•„ํ”ˆ ๋™๋ฌผ ์ฐพ๊ธฐ select ANIMAL_ID,NAME from ANIMAL_INS where INTAKE_CONDITION = "Sick" order by ANIMAL_ID ; ์–ด๋ฆฐ ๋™๋ฌผ ์ฐพ๊ธฐ select ANIMAL_ID,NAME from ANIMAL_INS where INTAKE_CONDITION != "Aged" order by ANIMAL_ID; ๋™๋ฌผ์˜ ์•„์ด๋””์™€ ์ด๋ฆ„ select ANIMAL_ID,NAME from ANIMAL_INS order by ANIMAL_ID; ์—ฌ..
[JAVA] String VS StringBuilder VS StringBuffer String VS StringBuilder/StringBuffer String๊ณผ StringBuilder/StringBuffer ํด๋ž˜์Šค์˜ ๊ฐ€์žฅ ํฐ ์ฐจ์ด์ ์€ String์€ ๋ถˆ๋ณ€์˜ ์†์„ฑ์„ ๊ฐ€์ง„๋‹ค๋Š” ์ ์ด๋‹ค. String์€ .concat(๊ฐ’) or +"๊ฐ’"์„ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ๋‹ค. ํ•˜์ง€๋งŒ String์€ ๋ถˆ๋ณ€ํ•˜๊ธฐ ๋•Œ๋ฌธ์— ๊ฐ’์„ ๋ณ€๊ฒฝํ•  ์ˆ˜ ์—†์–ด ๊ธฐ์กด String์— ๋“ค์–ด์žˆ๋˜ ๊ฐ’์„ ๋ฒ„๋ฆฌ๊ณ  ์ƒˆ๋กœ ๊ฐ’์„ ํ• ๋‹นํ•˜๋Š” ๊ฒƒ์ด๋‹ค. ๊ทธ๋ ‡๊ธฐ ๋•Œ๋ฌธ์— concat , +๋ฅผ ์‚ฌ์šฉํ•  ๋•Œ ์†๋„๊ฐ€ ๋Š๋ ค์ง„๋‹ค. StringBuilder, StringBuffer๋Š” String๊ณผ ๋ฌธ์ž์—ด์„ ๋”ํ•  ๋•Œ ๊ฐ์ฒด๋ฅผ ์ƒ์„ฑํ•˜๋Š” ๊ฒƒ์ด ์•„๋‹ˆ๋ผ ๊ธฐ์กด์˜ ๋ฐ์ดํ„ฐ์— ๋”ํ•˜๋Š” ๋ฐฉ์‹์„ ์‚ฌ์šฉํ•˜๊ธฐ ๋•Œ๋ฌธ์— ์†๋„๋„ ๋น ๋ฅด๋ฉฐ ์ƒ๋Œ€์ ์œผ๋กœ ๋ถ€ํ•˜๊ฐ€ ์ ๋‹ค. ๊ทธ๋ ‡๋‹ค๋ฉด StringBuilder์™€ StringBu..
[WEB] Spring ํ•œ๊ธ€ ๊นจ์ง ๋ฐฉ์ง€ web.xml์— ์ถ”๊ฐ€ํ•ด์ฃผ์ž! encodingFilter org.springframework.web.filter.CharacterEncodingFilter encoding UTF-8 forceEncoding true encodingFilter /* ์œ— ๋ฐฉ๋ฒ•์ด ์•ˆ๋˜๋ฉด ํŒŒ์ผ๋งˆ๋‹ค ์ถ”๊ฐ€ํ•ด์ฃผ์ž
[Window] ์›๊ฒฉ ๋ฐ์Šคํฌํ†ฑ ์—ฐ๊ฒฐํ•˜๊ธฐ 1. ์›๊ฒฉ ๋ฐ์Šคํฌํ†ฑ ์—ฐ๊ฒฐ์„ ๋“ค์–ด๊ฐ€์ค€๋‹ค. 2. ์ปดํ“จํ„ฐ ์นธ์— ip๋ฅผ ์ ์–ด์ค€ ํ›„ ์—ฐ๊ฒฐ์„ ๋ˆŒ๋Ÿฌ์ค€๋‹ค. 3. ์•”ํ˜ธ๋ฅผ ์ž…๋ ฅํ•ด์ค€๋‹ค.
[Linux] window์—์„œ SSH๋ฅผ ์ด์šฉํ•˜์—ฌ ์„œ๋ฒ„์— ์ ‘๊ทผํ•˜๊ธฐ window์—์„œ SSH๋ฅผ ์ด์šฉํ•˜์—ฌ ์„œ๋ฒ„๋ฅผ ์ ‘๊ทผํ•ด๋ณด์ž. SSH๋ž€? - Secure Shell์˜ ์ค„์ž„๋ง๋กœ, ์›๊ฒฉ ํ˜ธ์ŠคํŠธ์— ์ ‘์†ํ•˜๊ธฐ ์œ„ํ•ด ์‚ฌ์šฉ๋˜๋Š” ๋ณด์•ˆ ํ”„๋กœํ† ์ฝœ window์—์„œ ์ ‘๊ทผํ•˜๊ธฐ ์œ„ํ•ด์„œ๋Š” puttygen, putty๋ฅผ ์‚ฌ์šฉํ•ด์•ผํ•œ๋‹ค. 1. ๋จผ์ € putty๋ฅผ ์„ค์น˜ํ•ด์ค€๋‹ค. putty๋ฅผ ์„ค์น˜ํ•˜๋ฉด puttygen๋„ ๊ฐ™์ด ์„ค์น˜๊ฐ€ ๋œ๋‹ค. 2. ์„œ๋ฒ„์— ์ ‘๊ทผํ•˜๊ธฐ ์œ„ํ•ด์„œ๋Š” puttygen์„ ์‚ฌ์šฉํ•˜์—ฌ pemํŒŒ์ผ์„ ppk๋กœ ๋ณ€ํ™˜์‹œ์ผœ์•ผํ•œ๋‹ค. Puttygen -> load -> all files ํด๋ฆญ -> pemํŒŒ์ผ ์„ ํƒ -> save private key ํด๋ฆญ ppk ํŒŒ์ผ ์ด๋ฆ„์€ pem ํŒŒ์ผ๊ณผ ๊ฐ™์€ ๊ฒƒ์œผ๋กœ ํ•ด์ฃผ์—ˆ๋‹ค. 3. ssh ์˜ auth์—์„œ ํŒŒ์ผ์„ ๋ถˆ๋Ÿฌ์™€์ค€๋‹ค. browse๋ฅผ ํด๋ฆญํ•˜์—ฌ ๋ฐฉ๊ธˆ ๋งŒ๋“  ppkํŒŒ์ผ์„ ๋ถˆ๋Ÿฌ์™€์ค€๋‹ค. ๋‹ค..
[Python] ๋ฐฑ์ค€ #11723 - ์ง‘ํ•ฉ ๋ฌธ์ œ https://www.acmicpc.net/problem/11723 11723๋ฒˆ: ์ง‘ํ•ฉ ์ฒซ์งธ ์ค„์— ์ˆ˜ํ–‰ํ•ด์•ผ ํ•˜๋Š” ์—ฐ์‚ฐ์˜ ์ˆ˜ M (1 ≤ M ≤ 3,000,000)์ด ์ฃผ์–ด์ง„๋‹ค. ๋‘˜์งธ ์ค„๋ถ€ํ„ฐ M๊ฐœ์˜ ์ค„์— ์ˆ˜ํ–‰ํ•ด์•ผ ํ•˜๋Š” ์—ฐ์‚ฐ์ด ํ•œ ์ค„์— ํ•˜๋‚˜์”ฉ ์ฃผ์–ด์ง„๋‹ค. www.acmicpc.net ํ’€์ด import sys n = int(input()) s = set() for _ in range(n): arr = sys.stdin.readline().strip().split() if arr[0] == 'add': s.add(int(arr[1])) elif arr[0] == 'remove': try: s.remove(int(arr[1])) except: pass elif arr[0] == 'check': if int(ar..
[Python] ๋ฐฑ์ค€ #13458 - ์‹œํ—˜ ๊ฐ๋… ๋ฌธ์ œ https://www.acmicpc.net/problem/13458 13458๋ฒˆ: ์‹œํ—˜ ๊ฐ๋… ์ฒซ์งธ ์ค„์— ์‹œํ—˜์žฅ์˜ ๊ฐœ์ˆ˜ N(1 ≤ N ≤ 1,000,000)์ด ์ฃผ์–ด์ง„๋‹ค. ๋‘˜์งธ ์ค„์—๋Š” ๊ฐ ์‹œํ—˜์žฅ์— ์žˆ๋Š” ์‘์‹œ์ž์˜ ์ˆ˜ Ai (1 ≤ Ai ≤ 1,000,000)๊ฐ€ ์ฃผ์–ด์ง„๋‹ค. ์…‹์งธ ์ค„์—๋Š” B์™€ C๊ฐ€ ์ฃผ์–ด์ง„๋‹ค. (1 ≤ B, C ≤ 1,000,000) www.acmicpc.net ํ’€์ด n = int(input()) arr = map(int,input().split()) b,c = map(int,input().split()) sol = 0 for i in arr: sol +=1 i = i-b if i>0: sol+=i//c if i%c !=0 : sol+=1 print(sol) ์ด ๊ฐ๋…๊ด€์ด ๊ฐ์‹œํ•  ์ˆ˜ ์žˆ๋Š” ์‘์‹œ์ž..