분류 전체보기(354)
-
[WinForm] Listbox 문자에 색 입히기
private void listBoxTest_DrawItem(object sender, DrawItemEventArgs e) { if (listBoxTest.Items.Count == 0) return; // owner draw를 사용하여 ListBox에 색칠하기 Brush myBrush; string strText = listBoxTest.Items[e.Index].ToString(); if (strText.Contains("ERROR") == true) { // ERROR문자가 있으면 붉게 칠한다. myBrush = Brushes.Red; } else if (strText.Contains("SUCCESS") == true) { // SUCCESS문자가 있으면 파랗게 칠한다. myBrush = Brus..
2016.06.28 -
[WinForm] 현재실행된 경로찾기
Def_Value.CurrentDirectory = Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase); Def_Value.CurrentDirectory = Def_Value.CurrentDirectory.Substring(6, Def_Value.CurrentDirectory.Length - 6); 한번씩 현재 위치를 못읽어와 ini파일 생성시 꼬일때 사용하면 좋다.
2016.04.26 -
[MSSQL] 복구작업
alter database ermsdb set emergency;go alter database ermsdb set single_usergo dbcc checkdb('ermsdb', repair_allow_data_loss) with all_errormsgs;go alter database ermsdb set multi_user;go
2016.03.18 -
[Ubuntu] File Write
파일 저장하기 179 QFile *file = new QFile; 180 QString filename = "supplies.dat"; 181 file->setFileName(filename); 182 file->open(QIODevice::WriteOnly); 183 184 for(int i = 0; i text(); 187 188 QString _str = QString("%1,%2,%3,%4,%5\n") 189 .arg(supplies[i][0]) 190 .arg(supplies[i][1]) 191 .arg(supplies[i][2]) 192 .arg(supplies[i][3]) 193 ..
2016.03.17 -
[Ubuntu] 권한 설정
권한 변경 chmod 명령어로 변경chmod [소유주][소유그룹][나머지] [파일명 or 디렉토리]읽기(4) + 쓰기(2)+ 실행(1)ex) test.c 라는 파일을 소유주 전체, 소유그룹 읽기, 나머지 읽기chmod 744 test.c
2016.03.10 -
[Ubuntu] 열려있는 포트 및 IP 확인
윈도우 환경에서도 네트워크 상태를 확인하기 위한 명령어로 netstat 있다.Linux 계열에서도 동일하게 netstat이라는 명령어가 있으며 확인하는 명령어는 아래와 같다.① 연결중인 모든포트 확인 $ sudo netstat -nap ② 열려있는 모든 포트 확인 $ sudo netstat -lp
2016.03.07