์ผ | ์ | ํ | ์ | ๋ชฉ | ๊ธ | ํ |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
- ๋ ์
- ๋ฐฐ์์ ๋ฐฐ์
- K๋ฐฐํฐ๋ฆฌ๋ ๋ณผ๋ฃจ์
- ์ํ์ฃผ
- ๋๊ฐ
- ํ์ฒ์ ๋ฆฌํธ๋ฆฌํธ
- html
- ์๋ฐ์คํฌ๋ฆฝํธ
- Java
- css
- ํ์ด์ฌ
- ๊ฐ์ดํ ์ข ๋ญ๊ฐ๋น
- ์นํผ๋ธ๋ฆฌ์ฑ
- JavaScript
- ์๋ฐ
- ์ํ
- ์ฝ๋ฉ
- ์ค๋ธ์
- ์ค๋ผํด
- ๊น๋ฏธ๊ฒฝ์๋งํ์์
- ํฐ์คํ ๋ฆฌ์ฑ๋ฆฐ์ง
- Python
- ๋ฐ์ํ
- ํ๋ก๊ทธ๋๋ฐ
- ๊ฐ๋ฐ
- ๋ฐ์ดํฐ๋ฒ ์ด์ค
- database
- ์นดํ๋๊ฐ
- ์ ๋ฆฌํธ๋ฆฌํธ
- ์ฑ
- Today
- Total
๋ชฉ๋ก๋ถ๋ฅ ์ ์ฒด๋ณด๊ธฐ (235)
JiYoung Dev ๐ฅ
String.valueOf() public String solution(String s) { String answer = ""; char[] arr = s.toCharArray(); int idx = 0; for(int i = 0 ; i < arr.length ; i++) { if(arr[i] != 32) { if(idx % 2 == 0) { answer += String.valueOf(arr[i]).toUpperCase(); } else { answer += String.valueOf(arr[i]).toLowerCase(); } idx++; }else { idx=0; answer += " "; } } return answer; }
Arrays.copyOf(๋ฐฐ์ด, ๋ณ๊ฒฝํ๊ณ ์ ํ๋ ํฌ๊ธฐ) copyOf๋ก ๋ฐฐ์ด ๋ณตํํ๊ณ ์ํ๋ ํฌ๊ธฐ๋ก ์ง์ class Solution { public int[] solution(int []arr) { int idx = 1; int[] answer = new int[arr.length]; answer[0] = arr[0]; for(int i = 1 ; i < arr.length ; i++) { if(arr[i] != arr[i-1]) { answer[idx] = arr[i]; idx++; } } int[] copy = Arrays.copyOf(answer, idx); return copy; } }

์ ์ ์น ์ ํ๋ฆฌ์ผ์ด์ ๊ณผ ์ฌ์ดํธ๊ฐ ์ค๊ฐ์ ์์ด ๋ธ๋ผ์ฐ์ ๊ฐ์ ์ค๋์ค๋ ์์ ๋ฏธ๋์ด๋ฅผ ์คํธ๋ฆผํ๊ณ , ์์์ ๋ฐ์ดํฐ๋ฅผ ๊ตํํ ์ ์๋๋ก ํ๋ ๊ธฐ์ ์๋ฒ๋ฅผ ์ต๋ํ ๊ฑฐ์น์ง ์๊ณ P2P(Peer-to-Peer Network)๋ก ๋ธ๋ผ์ฐ์ ๋ ๋จ๋ง๊ฐ์ ๋ฐ์ดํฐ๋ฅผ ์ฃผ๊ณ ๋ฐ๋ ๊ธฐ์ ์ ์น ํ์ค\ Zoom, ๊ตฌ๊ธ Meet, ํ์ด์ค๋ถ ๋ฉ์ ์ ๋ฑ์์ ์ฌ์ฉ ํน์ง ์น์์ ์ฌ์ฉํ ์ ์๋ ์ ์ผํ P2P ๊ธฐ์ ๋ก ๊ฐ๊ฐ์ ๊ธฐ๊ธฐ๊ฐ ์๋ฒ์ ๋์ ์์ด ์ฐ๊ฒฐ๋๊ธฐ ์ํด ์ฐ๊ฒฐ์ ๋์์ฃผ๋ ์๋ฒ(Signaling)๊ณผ P2P ์ฐ๊ฒฐ์ด ๋ถ๊ฐ๋ฅํ ์ํฉ์ ๋๋นํ ๋ฆด๋ ์ด ์๋ฒ(TURN)๊ฐ ํ์ํจ UDP(User Datagram Protocol) ๊ธฐ๋ฐ์ ์คํธ๋ฆฌ๋ฐ ๊ธฐ์ WebRTC๋ฅผ ๊ตฌ์ฑํ๋ ์ผ๋ จ์ ํ์ค๋ค์ ํ๋ฌ๊ทธ์ธ์ด๋ ์ 3์ ์ํํธ์จ์ด ์ค์น ์์ด ์ข ๋จ ๊ฐ ๋ฐ์ดํฐ ๊ณต์ ์ ..

์ค์น ์ฌ๋ถ ํ์ธ rpm -qa httpd php mariadb-server ํ๋ก๊ทธ๋จ ์ค์น dnf -y install httpd php php-mysqlnd mariadb-server ๋ฒ์ ผํ์ธ rpm -qa httpd php mariadb-server rpm -qi httpd php mariadb-server dnf info httpd php mariadb-server ์๋น์ค ๊ตฌ๋ systemctl restart/enable/status httpd systemctl restart/enable/status mariadb start ์ฌ์ฉ์ ์ด๋ฏธ active ์ํ๋ผ๋ฉด ์ค๋ฅ๋ ์ ์์ → restart ํฌํธ ์ด๊ธฐ (http, https) firewall-config ํด๋ผ์ด์ธํธ์์ ์๋ฒ ์ฐ๊ฒฐ ๋๋ฉ์ธ ์ค์ DNS ์..

-- 1. ์๊ฒฉ์ง ์์คํ ๊ด๋ฆฌ์ -- 461 --------------------- -- ํ ๋ (telnet) dnf install telnet-server -- ์๋น์ค ์์ systemctl start telnet.socket -- ์๋น์ค ์ํํ์ธ systemctl status telnet.socket -- ํ ๋ ์ฉ ์ฌ์ฉ์์์ฑ adduser inho passwd inho -- ๋ฐฉํ๋ฒฝ open -- gui ์ค์ firewall-config -- cli ์ค์ firewall-cmd --add-service=telnet firewall-cmd --add-port=23/tcp firewall-cmd --permanent --add-service=telnet firewall-cmd --reload -- xrdp -..

cron ๋ด๊ฐ ์ํ๋ ์๊ฐ๋์ ์์ ์ ์งํํ ์ ์๋๋ก ์ค์ → ๋ฐฐ์น ์ฒ๋ฆฌ์ ์ฌ์ฉ (๋ฐฑ์ ) ๋ถ, ์, ์ผ, ์, ์์ผ์ ์ ํด์ง ์๊ฐ์ด ๋๋ฉด ๋ฐฑ์ ๋๋๋ก cron ์ค์ ํ๊ธฐ [root@localhost backup]# nano /etc/crontab [root@localhost backup]# systemctl restart crond [root@localhost backup]# systemctl status crond 1. ๋ฐฐ์น ํ๋ก๊ทธ๋จ ์ฝ๋ - backup.sh (๋ณธ์ธ ๊ณ์ ์์ ์์ฑ) home ๋๋ ํ ๋ฆฌ๋ฅผ ๋ฐฑ์ ํ ์์ถ → backup ํด๋์ ์ ์ฅํ๋ ํ๋ก๊ทธ๋จ backup ํด๋ ์์ฑ : mkdir /backup backup.sh ์คํ๊ถํ ๋ถ์ฌ : chmod 755 backup.sh 2. crontabl ํ๋ก..

vmware : ๊ฐ์์๋ฒ๋ฅผ ๋์๊ฐ ์ ์๊ฒ ํด์ฃผ๋ ํ๋ก๊ทธ๋จ ๋ฆฌ๋ ์ ์๋ฒ ์ค์น ๊ฐ์์๋ฒ vm์ ๋ถ์ด๊ธฐ ํธ์คํธ ์ฃผ์ ๋ณ๊ฒฝ power On ํต์ ํ์ธ : ping test host ์ปดํจํฐ์์ ์งํ ์๋น์ค ์คํ์ํค๋ ค๋ฉด system ctl start restart stop status 4๊ฐ์ง option http ์คํํ๋ฉด๋จ rpm ์ผ๋ก ํ๋ก๊ทธ๋จ ์ค์น ์ค์นํ๊ณ ์ ํ๋ ํ์ผ ์์น๋ก ์ด๋ [root@localhost CentOS-8-BaseOS-x86_64]# cd AppStream/ [root@localhost AppStream]# cd Packages/ [root@localhost Packages]# ls mc-* mc-4.8.19-9.el8.x86_64.rpm ํ์ผ ์ค์น ์ฌ๋ถ ํ์ธ : qa [root@localh..
string.substring(start idx, end idx) ์์ idx๋ง ์ ๋ ฅํ๋ฉด ์๋์ผ๋ก ๋ง์ง๋ง idx๊น์ง ์๋ผ์ค class Solution { public String solution(String phone_number) { String answer = ""; int size = phone_number.length(); String str = phone_number.substring(size-4); for(int i = 0 ; i < size - 4 ; i++){ answer += "*"; } answer += str; return answer; } }

ํธํ๊ฒ ์ฌ์ฉํ๋ ค๋ฉด autoincrement ์ฌ์ฉํ๋ ํ์id ๊ฐ์ ์ค๋ณต์ ํ์ฉํ์ง ์๋ ์ปฌ๋ผ์ด ์๋ค๋ฉด ์ด๋ฅผ pk๋ก ์ฌ์ฉํ๋ ๊ฒ์ ์ถ์ฒํจ db ์ค๊ณ์ ๊ณ ๋ คํ ์ 1. ๊ฐ๊ฐ ํ ์ด๋ธ์ pk๋ ์ ์ค์ ์ด ๋์ด ์๋๊ฐ? 2. ์ธ๋ํค ์ค์ ์ด ์ ๋์๋๊ฐ? ๊ผญ ์ธ๋ํค๋ ์ค์ ์ํด๋ ๋จ → ํ์ ๋ฐ์ดํฐ๊ฐ ์ญ์ ๋ ๋ ๊ด๋ จ๋ ๋ฐ์ดํฐ ์ง์ฐ๊ณ ์ถ์ ๋, ํ์์ด ์์ด์ผ๋ง ๋ฐ์ดํฐ๋ฅผ ์ถ๊ฐํ๊ณ ์ถ์ ๋ ์ฌ์ฉ → ์ฐ๊ด๊ด๊ณ๋ ์ค์ ํ๋ ์ธ๋ํค ์ค์ ์ ์ํด๋ ๋จ 3. ๊ฐ๊ฐ์ ์์ฑ์ด ๊ผญ ํ์ํ ์์ฑ์ธ๊ฐ? 4. ์ฃผ์ํฐํฐ ๋จผ์ ํ๋ก๊ทธ๋จ ๊ตฌํ ํ ๋ฉ์ธ ์ํฐํฐ , ํ์ ์ํฐํฐ ์์ผ๋ก ๊ฐ๋ฐํ๋ฉด ํธํ๋ค.
System.Threading.Timer ํ์ฉํ์ฌ Thread ๊ตฌํํ๊ธฐ System.Threading.Timer ์ง์ ๋ ๊ฐ๊ฒฉ์ผ๋ก ๋ฉ์๋๋ฅผ ์คํํ๋ ๋ฉ์ปค๋์ฆ์ ์ ๊ณต ์ฌ์ฉ๋ฒ ์ ์ธ System.Threading.Timer thread; ๊ฐ์ฒด ์์ฑ ๋ฐ ์ฐ๋ ๋ ์คํ ๊ฐ์ฒด ์์ฑ์ ๋ฐ๋ณต์ ์ผ๋ก ์คํํ๊ฒ ๋ ๋ฉ์๋๋ฅผ ์ฝ๋ฐฑ ๋ฉ์๋๋ก ๋ฑ๋กํด์ผ ํจ (ThreadRandNum) thread.Change(num1, num2)์์ num1 ์ ์์ํ๊ธฐ ์ ๋๊ธฐ(์ง์ฐ) ์๊ฐ, num2๋ ๋ฐ๋ณต ์ฃผ๊ธฐ thread = new System.Threading.Timer(ThreadRandNum); thread.Change(0, 2000); BeginInvoke ์ฌ์ฉ ์๋์ฐ ์์ฉํ๋ก๊ทธ๋จ์ UI Thread์ ์ฐ๊ด๋ ๊ฒฝ์ฐ Cross Thread..