공부/etc
-
[Spring Boot] Controller vs RestController공부/etc 2024. 3. 2. 17:30
package wordle.wordle.controller; import com.fasterxml.jackson.databind.ObjectMapper; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.*; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.node.ObjectNode; import com.fasterxml.jackson.databind.node.ArrayNode; import java.io..
-
[코테 준비] reminders공부/etc 2023. 10. 7. 14:59
cmp 함수 만들때는, 문제에 있는 모든 조건을 활용하여 만들기!!!! 특히 대소 비교할때 주의. 모든 경우를 고려할 것 // 구조체 형식 struct square { int r, c, len; // 위 꼭짓점(r,c), 한 변 길이: len }; // cmp 함수 bool cmp(square& candi1, square& candi2) { if (candi1.len < candi2.len) return true; else if (candi1.len == candi2.len) { if (candi1.r < candi2.r) return true; else if (candi1.r == candi2.r) { if (candi1.c < candi2.c) return true; else return false;..
-
Adafruit ESP32 Feather V2 CH2102F 사용해보기 (1) - 환경설정부터 예제 코드 실행까지공부/etc 2022. 6. 22. 23:16
1. Arduino IDE setup 참고) https://learn.adafruit.com/adafruit-esp32-feather-v2/arduino-ide-setup 1) CP210x Windows Drivers 설치 https://www.silabs.com/developers/usb-to-uart-bridge-vcp-drivers CP210x USB to UART Bridge VCP Drivers - Silicon Labs The CP210x USB to UART Bridge Virtual COM Port (VCP) drivers are required for device operation as a Virtual COM Port to facilitate host communication with ..
-
[git] 로컬 저장소에서 변경한 내역을 원격 저장소에 반영하기공부/etc 2022. 1. 10. 02:00
상황: 로컬 파일 [15729_방탈출.c]를 원격 저장소에 push한 후, 로컬 저장소에서 [15729_방탈출.c]를 [15729.c]로 수정한 후 [15729.c]를 원격 저장소에 push함 원격 저장소에는 아래와 같이 2개의 파일이 존재하고 로컬 저장소에는 15729.c 파일만 존재하는 상황에서 원격 저장소에서도 15729_방탈출.c 파일 삭제 내역을 반영하고 싶음 git status 명령어를 통해 deleted된 15729_방탈출.c 파일이 commit이 되지 않은 것을 확인 git commit -am "15729_방탈출.c 삭제" 를 통해 commit 작업 수행 후 git push origin master 명령어를 수행하면 됨! 아래와 같이 원격 저장소에 로컬 저장소 변경 내역이 반영된 것을 확인..
-
[라즈베리파이] USB 마이크를 이용해서 음성데이터를 녹음하기공부/etc 2021. 11. 8. 22:25
1. 라즈베리파이에 USB 마이크 연결 2. 마이크의 card, device 정보 가져오기 arecord -l card: 1 / device: 0 3. 스피커의 card, device 정보 가져오기 aplay -l card: 0 / device: 0 4. .asoundrc 파일 생성 nano .asoundrc pcm "hw: , " (참고) https://www.alsa-project.org/wiki/Asoundrc 5. USB 마이크 녹음 테스트 arecord -D plughw:1,0 -r 16000 -t wav -d 5 testmic.wav -D : 디바이스 이름 -r : sample rate -t : 타입 (voc, wav, raw, au) -d : 녹음할 시간(초) 참고) https://linux..
-
[git] warning: LF will be replaced by CRLF공부/etc 2021. 11. 6. 02:31
내가 git add를 한 환경은 Windows 10인데 위와 같은 warning이 떠서 검색을 해봤다. 윈도우에서는 줄바꿈 시 CRLF(\r\n) 방식을 쓰는 반면에 유닉스, 리눅스에서는 LF(\n) 방식을 써서 위와 같은 경고가 뜨는 것이라고 한다. 운영체제별로 줄바꿈 규칙이 다르기때문에 git에서 위와 같은 경고를 표시해준 것이다. 아래와 같은 명령어를 입력해서 줄바꿈 문자가 자동 변환되도록 설정해주면 된다. git config core.autocrlf true
-
라즈베리파이로 적외선 신호를 보내보자 - 2공부/etc 2021. 8. 27. 23:54
2021.08.27 - [공부/etc] - 라즈베리파이로 적외선 신호를 보내보자 - 1 라즈베리파이로 적외선 신호를 보내보자 - 1 오랜만에 포스팅을 하게 된 계기는 어제 퇴근 10분전에 일어난 사건 때문이다^^^^^^^ 라즈베리파이에 적외선 센서를 달고 신호가 잘 전송되는 것을 확인하고나서 라즈베리파이 케이스를 끼우려고 happyst.tistory.com 이전 포스트에서 설정한 gpio 핀 정보에 맞게 IR 수광부, 발광부 센서를 연결한다. 1. 라즈베리파이 - IR 수광부 동작 확인 1) LIRC systemd service 중단 sudo systemctl stop lircd 2) IR 수신기에서 raw data 출력 시작 mode2 -d /dev/lirc1 3) IR 리모컨 버튼을 눌러서 IR 수신..
-
라즈베리파이로 적외선 신호를 보내보자 - 1공부/etc 2021. 8. 27. 15:32
오랜만에 포스팅을 하게 된 계기는 어제 퇴근 10분전에 일어난 사건 때문이다^^^^^^^ 라즈베리파이에 적외선 센서를 달고 신호가 잘 전송되는 것을 확인하고나서 라즈베리파이 케이스를 끼우려고 한게 문제였다...ㅎ 아무 생각 없이 라즈베리파이를 케이스에 끼우다가 잘 안들어가길래 원래 잘 안들어가는건가?싶었는데 라즈베리파이 부팅도 안되고 거의 손이 데일정도로 발열이 나서 구글링을 해봤더니 SD카드가 문제라고 했다.. 겉보기에는 전혀 문제가 없었기때문에 설마..부러졌겠어?싶었는데 확인해보니까 아니나다를까 거의 부러진 상태였다ㅎㅎ 교훈: 케이스를 끼우기 전에 먼저 sd카드를 빼두자,,, 아무튼 그래서 새로운 sd카드에 어제 했던 작업들을 다시 할 겸 포스팅을 하게 되었다. 작업의 목표는 라즈베리파이에 적외선 발..