반응형

➰ Library 35

[Python] 2차원배열 동시에 선언&초기화하기

가로 A, 세로 B 길이의 배열을 선언한다고 가정 1. arr = [[0 for _ in range(A)] for _ in range(B)] 2. arr = [[0] * (A) for _ in range(B)] 3. arr = [[0] * A ] * B 😡 마지막 방법은 사용하지 말것! → * 을 사용하면, 주소값을 복사하여 2차원 배열을 만드는 것이기 때문에 arr[0][x]을 수정하면 같은 주소를 공유하는 arr[0][x], arr[1][x], arr[2][x] 의 값이 한번에 변경되는 문제가 발생한다.

➰ Library/Python 2021.03.29

Fullcalendar에서 event 잘림 현상 해결하기

fullcalendar를 사용하여 보고서의 내용을 제공하기 위해서는 아래의 코드에서 title : '가나다라마바사...' 부분에 보고서의 요약본을 넣어주어야한다. document.addEventListener('DOMContentLoaded', function() { var calendarEl = document.getElementById('calendar'); //var today_date = calendar.getDate(); var calendar = new FullCalendar.Calendar(calendarEl, { headerToolbar: { left: 'prev,next', center: 'title', right: 'today' }, initialDate: '2021-01-01' //t..

➰ Library/기타 2021.03.23

Fullcalendar 날짜 색 변경 & 일정 배경없이 넣기

fullcalendar 라이브러리를 사용하여 달력을 만들게 되면 일정을 추가할 때마다 아래의 그림과 같이 하나의 박스가 생기고 그 안에 글자가 써지게 된다! document.addEventListener('DOMContentLoaded', function() { var calendarEl = document.getElementById('calendar'); var calendar = new FullCalendar.Calendar(calendarEl, { headerToolbar: { left: 'prev,next', center: 'title', right: 'today' }, initialDate: '2021-01-01' , editable : true , eventLimit : true , event..

➰ Library/기타 2021.03.23

[C++] 입출력 가속시키는 법

preset() 함수를 main 함수 맨 윗줄에서 사용한다. void preset() { std::ios_base::sync_with_stdio(false); std::cin.tie(NULL); std::cout.tie(NULL); } int main(){ preset(); //code } 쓰면 좋은 이유 → cin, cout이 scanf, printf에 비해서 속도가 많이 느리고 std::endl보다 '\n'가 훨씬 빠르다. → sync_with_stdio(false); 를 이용해서 C++ 입출력을 가속시켜서 사용할 것이라면 scanf와 printf와 섞어서 사용하지 말 것! 싱글 쓰레드 환경에서만 사용할 것! 그래도 시간초과가 난다면 C 표준입출력 함수들을 사용할 것!

➰ Library/C & C++ 2021.03.16

맥에 Discord 설치하기

1. 클러스터 맥에 brew 설치 rm -rf $HOME/.brew && git clone --depth=1 $HOME/.brew && export PATH=$HOME/.brew/bin:$PATH && brew update && echo "export PATH=$HOME/.brew/bin:$PATH" >> ~/.zshrc 2. brew 제대로 깔렸는지 확인 brew --version 3. Applications 에 notion 설치하기 brew install discord --appdir=~/Applications //안되면 brew cask install discord --appdir=~/Applications 📌42서울 클러스터 이용시 맥>Applications 에 설치되는 것이 아니라 개인 계정(인..

맥에 Notion 설치하기

1. 클러스터 맥에 brew 설치 rm -rf $HOME/.brew && git clone --depth=1 $HOME/.brew && export PATH=$HOME/.brew/bin:$PATH && brew update && echo "export PATH=$HOME/.brew/bin:$PATH" >> ~/.zshrc 2. brew 제대로 깔렸는지 확인 brew --version 3. Applications 에 notion 설치하기 brew install notion --appdir=~/Applications //안되면 brew cask install notion --appdir=~/Applications 📌42서울 클러스터 이용시 맥>Applications 에 설치되는 것이 아니라 개인 계정(인트라..