본문 바로가기

Programming68

python thread http://www.tutorialspoint.com/python/python_multithreading.htm Running several threads is similar to running several different programs concurrently, but with the following benefits: Multiple threads within a process share the same data space with the main thread and can therefore share information or communicate with each other more easily than if they were separate processes.Threads sometimes .. 2013. 8. 21.
qtCreator build error : error: explicit instantiation of ‘std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const ... since updating to Mountain Lion operator 2013. 5. 27.
matlab read and play wav files MATLAB에는 웬만한건 다 있다 역시 사운드 파일 읽고 재생하는건 기본 file = 'beep-1.wav'; [y, Fs, nbits] = wavread(file); file2 = 'button-11.wav'; [y2, Fs2, nbits2] = wavread(file2); sound(y,Fs); sound(y2,Fs2); 이렇게 하면 되는데, y는 사운드데이터가 들은 벡터, Fs 는 데이터가 encode된 Hz. nbits는 encode bit수 이다. matlab help 에 나와있듯 Number of BitsMATLAB Data TypeData Range 8uint8 (unsigned integer) 0 2013. 2. 14.
python 파이썬 파일 이름 변경 filename change 파일 이름을 일괄적으로 변경해야 될 경우가 있다. 한두개라면 손으로 하면 되나 수십개 이상 되면 무조건 코드를 짜야한다. 1.제일 코드가 간단한건 아무래도 MATLAB. 대신 MATLAB인 만큼 속도가 역시 느리다. >> moivefile(name1, name2) 하면 파일 이름이 name1인 파일이 name2로 변경. 2.두번째로는 shell script.. 터미널 윈도우에서 mv a b 하는 것과 같다. 어짜피 쉘스크림트라는게 터미널에서 도는 shell 의 스크립트이니깐.. 3. 세번쨰로는 C(or C++)에서 하는 방법. 언어 자체에서 이런 걸 지원하지 않으니 system api를 써야한다. 윈도에선 구글검색 하면 바로 나오니 패스. 리눅스에선 이 블로그에 예전 포스팅 했었다. LINK 4. PYT.. 2012. 9. 25.