- [ Java ][Eclipse] Could not create the Java virtual machine2016-06-09 15:17:44이클립스가 설치된 폴더 안에 있는 eclipse.ini 파일을 메모장으로 열고,--launcher.XXMaxPermSize (Perm영역의 최대 크기)256M -Xms512m (heap영역의 시작 크기)-Xmx512m (heap영역의 최대 크기) Perm영역과 Heap영역의 크기를 조정하면 에러를 잡을 수 있었다. 내 경우, Xms768m-Xmx1024m이었던 것을 Xms512m-Xmx512m로 수정함으로써 해결할 수 있었다. 출처 : http://zero-gravity.tistory.com/152
- [ Oracle ]해당 연도의 첫날과 마지막날 표시2016-05-03 16:57:541년 날짜 계산은 2월 날짜가 변동되므로 이렇게 안되지만 1월1일과 12월31일은 고정이므로 간단하게 표현할수 있다. select to_char(sysdate,'yyyy')||'0101', to_char(sysdate,'yyyy')||'1231' from dual
- [ C# ]마우스 좌표값 얻기2016-04-05 13:05:58기본적인 좌표값은Mouseposition.X , Mouseposition.Y 로 사용하면된다. 하지만 컨트롤안에서 좌표가 필요할때가 있다.해당컨트롤.PointToClient(Mouseposition.X , Mouseposition.Y)로 사용하면된다. (MouseEventArgs e ) e.X, e.Y 와 같다.
- [ C# ]Bitmap객체를 이용한 이미지 분할2016-03-10 11:36:41소스는 비트맵 객체를 GetPixel을 이용해 모든 픽셀을 저장한 뒤에넓이와 높이 위치를 지정하면 새로운 Bitmap객체에 SetPixel로 값을 복사하는 방식이다.원하는 위치를 지정하여 내 임의대로 자를 수 있다. 출처 : http://jinmy.tistory.com/4
- [ WPF ]MenuItem 클릭 이벤트2016-01-19 13:40:31Name을 설정한뒤 Test.Click += new RoutedEventHandler(Test_Click);클릭이벤트와 연결해준다. void CommonHandler(object sender, RoutedEventArgs e) { MenuItem mi = e.Source as MenuItem; switch (mi.Name) { case "One": { //do something; break; } case "Two": { //do something else break; } case "Three": { //something else again break; } }잘됩니다^^
- [ C# ]xml 쓰기 읽기2015-12-16 17:29:19/// /// XML 생성 /// private void CreateXML() { // 생성할 XML 파일 경로와 이름, 인코딩 방식을 설정합니다. XmlTextWriter textWriter = new XmlTextWriter(@"C:\example.xml", Encoding.UTF8); // 들여쓰기 설정 textWriter.Formatting = Formatting.Indented; // 문서에 쓰기를 시작합니다. textWriter.WriteStartDocument(); // 루트 설정 textWriter.WriteStartElement("root"); // 노드와 값 설정 textWriter.WriteStartElement("root_a"); textWriter.WriteString("a"); ..
- [ C# ]기상날씨 xml 파싱2015-12-14 16:33:59class Weather{ // http://www.kma.go.kr/wid/queryDFS.jsp?gridx=98&gridy=84 기상청 날씨 xml 이용 public string weather = ""; public Weather() { getWeather(); } public void getWeather() { XmlDocument docX = new XmlDocument(); // XmlDocument 생성 try { docX.Load("http://www.kma.go.kr/wid/queryDFS.jsp?gridx=98&gridy=84"); // url로 xml 파일 로드 } catch { return; } XmlNodeList hourList = docX.GetElementsByTagName("..
- [ C# ]PictureBox 이미지 다른 이름으로 저장2015-10-19 13:07:04SaveFileDialog dlg = new SaveFileDialog(); dlg.Title = "다른 이름으로 저장"; dlg.DefaultExt = "jpg"; dlg.Filter = "JPEG (*.jpg)|*.jpg|Bitmap (*.bmp)|*.bmp|GIF (*.gif)|*.gif"; dlg.FilterIndex = 0; if (dlg.ShowDialog() == DialogResult.OK) { pictureBox1.Image.Save(dlg.FileName); }