반응형
반응형

점프 투 플라스크

https://wikidocs.net/book/4542

 

점프 투 플라스크

**점프 투 플라스크 오프라인 책 출간 !! (2020.11)** * [책 구입 안내](https://wikidocs.net/102760)

wikidocs.net

 

반응형
반응형

빅데이터 - 하둡, 하이브로 시작하기 Hadoop, Hive

 

https://wikidocs.net/book/2203

 

빅데이터 - 하둡, 하이브로 시작하기

이 책은 하둡을 처음 시작하는 사람들을 대상으로 작성하였습니다. **하둡**은 빅데이터 기술의 시작점입니다. 하둡이 맵리듀스와 HDFS 기술을 소개하면서 빅데이터를 ...

wikidocs.net

반응형
반응형


Websites to learn Python

반응형
반응형

HTML5 웹에서 마이크 녹음 기능

 

 

 

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>마이크 테스트</title>
</head>

<body>
    <input type=checkbox id="chk-hear-mic"><label for="chk-hear-mic">마이크 소리 듣기</label>
    <button id="record">녹음</button>
    <button id="stop">정지</button>
    <div id="sound-clips"></div>
    <script>
        const record = document.getElementById("record")
        const stop = document.getElementById("stop")
        const soundClips = document.getElementById("sound-clips")
        const chkHearMic = document.getElementById("chk-hear-mic")

        const audioCtx = new(window.AudioContext || window.webkitAudioContext)() // 오디오 컨텍스트 정의

        const analyser = audioCtx.createAnalyser()
        //        const distortion = audioCtx.createWaveShaper()
        //        const gainNode = audioCtx.createGain()
        //        const biquadFilter = audioCtx.createBiquadFilter()

        function makeSound(stream) {
            const source = audioCtx.createMediaStreamSource(stream)

            source.connect(analyser)
            //            analyser.connect(distortion)
            //            distortion.connect(biquadFilter)
            //            biquadFilter.connect(gainNode)
            //            gainNode.connect(audioCtx.destination) // connecting the different audio graph nodes together
            analyser.connect(audioCtx.destination)

        }

        if (navigator.mediaDevices) {
            console.log('getUserMedia supported.')

            const constraints = {
                audio: true
            }
            let chunks = []

            navigator.mediaDevices.getUserMedia(constraints)
                .then(stream => {

                    const mediaRecorder = new MediaRecorder(stream)
                    
                    chkHearMic.onchange = e => {
                        if(e.target.checked == true) {
                            audioCtx.resume()
                            makeSound(stream)
                        } else {
                            audioCtx.suspend()
                        }
                    }
                    
                    record.onclick = () => {
                        mediaRecorder.start()
                        console.log(mediaRecorder.state)
                        console.log("recorder started")
                        record.style.background = "red"
                        record.style.color = "black"
                    }

                    stop.onclick = () => {
                        mediaRecorder.stop()
                        console.log(mediaRecorder.state)
                        console.log("recorder stopped")
                        record.style.background = ""
                        record.style.color = ""
                    }

                    mediaRecorder.onstop = e => {
                        console.log("data available after MediaRecorder.stop() called.")

                        const clipName = prompt("오디오 파일 제목을 입력하세요.", new Date())

                        const clipContainer = document.createElement('article')
                        const clipLabel = document.createElement('p')
                        const audio = document.createElement('audio')
                        const deleteButton = document.createElement('button')

                        clipContainer.classList.add('clip')
                        audio.setAttribute('controls', '')
                        deleteButton.innerHTML = "삭제"
                        clipLabel.innerHTML = clipName

                        clipContainer.appendChild(audio)
                        clipContainer.appendChild(clipLabel)
                        clipContainer.appendChild(deleteButton)
                        soundClips.appendChild(clipContainer)

                        audio.controls = true
                        const blob = new Blob(chunks, {
                            'type': 'audio/ogg codecs=opus'
                        })
                        chunks = []
                        const audioURL = URL.createObjectURL(blob)
                        audio.src = audioURL
                        console.log("recorder stopped")

                        deleteButton.onclick = e => {
                            evtTgt = e.target
                            evtTgt.parentNode.parentNode.removeChild(evtTgt.parentNode)
                        }
                    }

                    mediaRecorder.ondataavailable = e => {
                        chunks.push(e.data)
                    }
                })
                .catch(err => {
                    console.log('The following error occurred: ' + err)
                })
        }
    </script>
</body></html>
반응형
반응형

PostgreSQL - windows 설치

 

https://www.enterprisedb.com/downloads/postgres-postgresql-downloads

 

Download PostgreSQL Database for Windows, Linux and MacOS & 32-bit or 64-bit Versions | EDB

Download PostgreSQL packages or installers free from EDB. Get PostgreSQL for Windows, Linux and MacOS platforms. Download 32-bit or 64-bit versions. Download open-source PostgreSQL now.

www.enterprisedb.com

반응형
반응형

SVN - Previous operation has not finished; run 'cleanup' if it was interrupted 에러일때.

 

clean up 하려면

"Cleanup failed to process the following paths:

Previous operation has not finished; run 'cleanup' if it was interrupted

Please execute the 'Cleanup' command. "  이런 에러 나고. 

 

http://www.sqlite.org/download.html  에서  sqlite 다운로드

sqlite-tools-win32-x86-3360000.zip
(1.82 MiB)

 

CMD 창으로 해당 .svn 폴더있는 곳으로 들어가서

sqlite3 .svn/wc.db "select * from work_queue"

select 되는게 있으면 삭제

sqlite3 .svn/wc.db "delete from work_queue"


//-- 폴더가 lock 되어있으면   

sqlite3 .svn/wc.db "delete from wc_lock"

 

반응형

+ Recent posts