엄청 느림???
그래도 사용해 보자
2018년 8월 1일 수요일
2018년 6월 12일 화요일
솔릳웍스 2015 sim disabled 현상
https://hawkridgesys.com/blog/solidworks-and-windows-update-alert-solution
Instability in SOLIDWORKS due to conflict with Microsoft KB3072630
Summary
There is a conflict with Microsoft KB3072630 (published July 14 2015) which can cause SOLIDWORKS to become unstable when installed or updated after KB3072630 is applied. The Microsoft update makes changes to Windows Installer which prevents SOLIDWORKS installations (new, modify/repair, update or uninstall) from being executed correctly. We are working diligently to produce a software fix as soon as possible in SOLIDWORKS 2015 and 2016, however in the interim please review the information below to prevent and correct instability caused by this conflict.2018년 3월 12일 월요일
CFileDialog에서 여러 파일을 다루는 부분
255개 이상의 파일의 이름을 가져오려고 했는데 그 이상은 에러.
CFileDialog dlg(TRUE, "", NULL, OFN_FILEMUSTEXIST | OFN_HIDEREADONLY | OFN_EXPLORER | OFN_LONGNAMES | OFN_ALLOWMULTISELECT, szFilter, NULL);
char filename[10000] = {0};
dlg.m_ofn.lpstrFile = filename;
dlg.m_ofn.nMaxFile = 10000-1;
여기서 첫번째 오류 LEESH
좀더 찾아보니.
기본적으로 2048 버퍼 사이즈로 설정이 되어 있기 때문에
보통 20개 글자라고 하면... 2048/20 정도만 올라옴.
그래서, 위와 같이 늘려주었는데, 10,000 사이즈로 버퍼를 잡았으니,
글자수가 40개 이면,,, 250개 정도 파일만 다루게 됨. 따라서,
CFileDialog dlgFile(TRUE);
CString fileName;
const int c_cMaxFiles = 10000;
const int c_cbBuffSize = (c_cMaxFiles * (MAX_PATH + 1)) + 1;
dlgFile.GetOFN().lpstrFile = fileName.GetBuffer(c_cbBuffSize);
dlgFile.GetOFN().nMaxFile = c_cMaxFiles;
이렇게 해줘야 10000개정도 다룰수 있음.
https://social.msdn.microsoft.com/Forums/vstudio/en-US/828d548e-2c9b-460f-8138-339e2d557878/cfiledialog-and-ofnallowmultiselect?forum=vcgeneral
CFileDialog dlg(TRUE, "", NULL, OFN_FILEMUSTEXIST | OFN_HIDEREADONLY | OFN_EXPLORER | OFN_LONGNAMES | OFN_ALLOWMULTISELECT, szFilter, NULL);
char filename[10000] = {0};
dlg.m_ofn.lpstrFile = filename;
dlg.m_ofn.nMaxFile = 10000-1;
여기서 첫번째 오류 LEESH
좀더 찾아보니.
기본적으로 2048 버퍼 사이즈로 설정이 되어 있기 때문에
보통 20개 글자라고 하면... 2048/20 정도만 올라옴.
그래서, 위와 같이 늘려주었는데, 10,000 사이즈로 버퍼를 잡았으니,
글자수가 40개 이면,,, 250개 정도 파일만 다루게 됨. 따라서,
CFileDialog dlgFile(TRUE);
CString fileName;
const int c_cMaxFiles = 10000;
const int c_cbBuffSize = (c_cMaxFiles * (MAX_PATH + 1)) + 1;
dlgFile.GetOFN().lpstrFile = fileName.GetBuffer(c_cbBuffSize);
dlgFile.GetOFN().nMaxFile = c_cMaxFiles;
이렇게 해줘야 10000개정도 다룰수 있음.
https://social.msdn.microsoft.com/Forums/vstudio/en-US/828d548e-2c9b-460f-8138-339e2d557878/cfiledialog-and-ofnallowmultiselect?forum=vcgeneral
2018년 3월 5일 월요일
2018년 2월 26일 월요일
Octave 옥타브 matlab 대안으로 USB4000 데이터를 읽어본다.
Octave 4.2.1 은 javaaddpath가 가능하다.
>> javaaddpath('C:\Program Files\Ocean Optics\OmniDriver\OOI_HOME\OmniDriver.jar');
>> wrapper = com.oceanoptics.omnidriver.api.wrapper.Wrapper();
>> wrapper.openAllSpectrometers();
"error: 'com' undefined",
>> wrapper = javaObject ("com.oceanoptics.omnidriver.api.wrapper.Wrapper")
>> spectrum = wrapper.getSpectrum(0);
>> wavelengths = wrapper.getWavelengths(0);
>> plot(wavelengths, spectrum);
>> javaaddpath('C:\Program Files\Ocean Optics\OmniDriver\OOI_HOME\OmniDriver.jar');
>> wrapper = com.oceanoptics.omnidriver.api.wrapper.Wrapper();
>> wrapper.openAllSpectrometers();
"error: 'com' undefined",
>> wrapper = javaObject ("com.oceanoptics.omnidriver.api.wrapper.Wrapper")
>> spectrum = wrapper.getSpectrum(0);
>> wavelengths = wrapper.getWavelengths(0);
>> plot(wavelengths, spectrum);
2018년 1월 31일 수요일
2017년 8월 21일 월요일
중복되지 않게 나열하기 알고리즘
int SET[8] = { 0, 1, 2, 3, 4, 5, 6, 7 };
int LIST[8] = { 3, 5, 7, 2, 7, 0, 0, 3 };
int INDEX[8];
short k,j,ii=0;
for(ii=0;ii<8;ii++){
LIST[ii] = rand()%8;
}
// 순서 정하기
for(ii=0;ii<8;ii++){
for(j=0; j<8; j++){
if( SET[j] == LIST[ii] ) INDEX[ii] = j;
}
INDEX[ii] = INDEX[ii] % 8;
}
// 순서가 현재 것이 다음들 것과 같은 것이 있으면 다음들 것을 + 1 처리
// 이전 것들과도 비교.
for(ii=0;ii<8;ii++){
for(j=ii+1; j<8; j++){
if( INDEX[ii] == INDEX[j] ){
int uni = (INDEX[ii]+1)%8;
for(k=0; k<ii; k++){
if( INDEX[k] == uni ){
uni = (uni+1)%8;
k=-1; // ++이 수행됨.
}
}
INDEX[j] = uni;
}
}
}
CString bf, str("");
int sum = 0;
for(ii=0;ii<8;ii++){
sum += INDEX[ii];
bf.Format( "[%d] SET=%d LIST=%d INDEX=%d \r\n" , ii, SET[ii], LIST[ii], INDEX[ii] ); str += bf;
}
bf.Format( " SUM =%d \r\n" , sum ); str += bf;
// if( sum != 28 )
AfxMessageBox(str);
피드 구독하기:
글 (Atom)
