본문 바로가기

전체 글

(274)
깃허브 특정 브런치만 클론하기, 브랜치명 변경하기 git clone -b {branch_name} --single-branch {저장소 URL} git branch -m [OLD_BRANCH] [NEW_BRANCH]
파이썬 기초 문법 https://github.com/kimzerovirus/PythonStudy GitHub - kimzerovirus/PythonStudy: 파이썬 알고리즘 및 기초문법 공부 파이썬 알고리즘 및 기초문법 공부. Contribute to kimzerovirus/PythonStudy development by creating an account on GitHub. github.com 문자열 " , ' , """ , ''' 4가지 방법으로 작성가능함 문자열 관련함수들 count 문자개수세기 find 해당 문자 위치 알려주기, 존재하지 않는다면 -1 반환 index find와 기능은 같지만, 존재하지 않는다면 오류를 반환한다. join 문자열 삽입 ex) ','.join('abcd') => a,b,c,d upp..
[jetson tx2] jetpack설치 및 기본세팅 참고자료 Jetson tx2는 가상머신 위에서 설치하면 안된다는 글 https://medium.com/@surmenok/getting-started-with-nvidia-jetson-tx2-5952a2d8d7ae Jetson tx2 설치방법을 적어놓은 글들 https://judo0179.tistory.com/19 [2020ver.] https://judo0179.tistory.com/128?category=281331 [2021ver.] https://hoony9x.com/nvidia-jetson-tx2-developer-kit-unpack-and-initial-setting/ https://github.com/developer0hye/TX2-JetPack-Installation-Guide-Kr 윈도우에서 vmw..
배열 원하는 형태로 재조립하기 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 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 let arr = [ '1.txt', '1.json', '1.wav', '2.txt', '2.json', '2.wav', '3.txt', '3.wav', '4.txt', '4.json', '4.wav', '5.txt', '5.json', '5.wav', '6.txt', '6.json', '6.wav', '7.txt', '7.json', '7.wav', '8.txt', '8.json', '8.wav', '9.txt', '9.json', '10.txt', '10.json', '10.wa..
Tus프로토콜을 사용한 업로드 const input = document.getElementById('input'); ​ input.addEventListener("change", function (e) { const files = e.target.files; ​ function tusUpload(files) { [].map.call(files, (file, index) => { var upload = new tus.Upload(file, { endpoint: 'http://localhost:5000/uploads', retryDelays: [0, 3000, 5000, 10000, 20000], metadata: { filename: file.name, filetype: file.type }, chunkSize: 8 * 1024 * 1..
file.slice is not a function, 비배열 객체, 유사배열 File 객체를 콘솔로 찍어보면 배열로 표시된다. 하지만 리얼 배열은 아니므로 배열 메서드를 사용할 수 없다. const blob = new Blob([].slice.call(file, from, to)); 위와 같이 []배열에 담아준뒤 slice메서드를 실행 한 후 blob으로 전송하기 위해 다시 blob객체에 담아줬다. 하지만 서버단에 보낸 param정보들을 split하려니깐 또 에러가 나는데 (name || '').split('.').pop(); 다음과 같이 name값이 없으면 빈문자열을 넣어주니 잘 된다. splice는 잘라내기 slice는 부분복사(원본 배열 손상x) * 더 쉬운 방법 Array.from(유사배열객체); Array.from() 메서드는 유사 배열 객체(array-like obje..
Node.js, FormData => multer모듈로 업로드 하기 client document.getElementById("filepicker").addEventListener("change", e => { menuVal.checked = false; let output = document.getElementById("listing"); let files = e.target.files; for (let i = 0; i { let percentage = (e.loaded * 100) / e.total; let currentPercentage = Math.round(percentage); console.log(currentPercentage + "%"); setProgress(currentPercentage ); }, headers: { 'Content-Type': 'mu..
Service와 Repository Repository패키지는 DB에 접근하는 모든 자원들이 모여있는 곳 Service패키지는 DB에 접근하는 코드는 Repository에 위임하고, 비즈니스로직과 관련된 일들을 수행한다.