XML과 .NET

.NET의 XML DOM 클래스들
XML Document의 부분부분에 해당하는 클래스
document elementXmlElement
processing instructionsXmlProcessingInstruction
ElementXmlElement
AttributeXmlAttribute
Test valuesXmlText
NodesXmlNode
크리에이티브 커먼즈 라이센스
Creative Commons License

Posted by 솔라뷰

2010/04/27 17:46 2010/04/27 17:46
,
Response
No Trackback , No Comment
RSS :
http://www.solarview.net/rss/response/297

코드 생성기

프로그래밍을 하다보면 기계적으로 반복해야 할 일들이 생긴다. 이런 일들로 일일이 타이핑을 한다는 것은 매우 지루하고 따분한 일이다. 그래서 코드을 자동으로 생성하도록 할 필요가 생긴다.
곧 개발환경의 매크로를 이용하거나, Perl과 같은 문자열 처리기를 통하여 코드를 자동처리하도록 한다.
다음의 사이트도 그 중의 하나이다.

http://kimsk99.springnote.com/pages/63531
- 미리 지정된 텍스트를 현재 커서위치(실렉트된 것)에 삽입하는 매크로
- 현재 편집중인 파일과 같은 이름이고 확장자만 cpp <-> h 로 바뀐 파일을 열어주는 매크로

http://www.devpia.com/maeul/contents/d ··· f%3D8423
- 이름과 날짜를 입력
- 수평 라인 주석을 입력

http://serious-code.net/tc/tag/Visual%20Studio%20Macro
- 선택된 라인들에서 중복된 라인들은 삭제하고 나머지를 정렬하기
- 자동으로 getter/setter생성하기

Using Visual Studio .NET Macros

- 속성을 위한 매크로
사용자 삽입 이미지

Private 변수를 Property Procedure로 확장하기


크리에이티브 커먼즈 라이센스
Creative Commons License

Posted by 솔라뷰

2010/04/18 15:38 2010/04/18 15:38
, , ,
Response
No Trackback , 2 Comments
RSS :
http://www.solarview.net/rss/response/293

프로그램을 개발한 다음, 사용자가 설치해서 사용할 수 있도록 하기 위해서는 '설치용 프로그램'(일명 setup 프로그램)을 만들어야 한다.
Visual Studio .NET 2005에서는 솔루션에 '설치 프로젝트'를 추가하여 개발 프로그램을 설치가능하게 할 수 있다.
다음의 사이트는 이것을 잘 설명하고 있다.
http://www.nohungry.net/tt1/tag/110
크리에이티브 커먼즈 라이센스
Creative Commons License

Posted by 솔라뷰

2010/03/10 09:24 2010/03/10 09:24
,
Response
No Trackback , No Comment
RSS :
http://www.solarview.net/rss/response/286

xpath와 namespace

Hey all,

Simple question, I just want to select the text from the <Template> tag. Here's what I have, but the Xpath doesn't match anything.

public static void TestXPath()
{
string xmlText = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>";
xmlText += "<Properties xmlns=\"http://schemas.openxmlformats.org/officeDocument/2006/extended-properties\" xmlns:vt=\"http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes\">";
xmlText += "<Template>Normal</Template> <TotalTime>1</TotalTime> <Pages>1</Pages> <Words>6</Words>";
xmlText += "</Properties>";

XmlDocument xmlDoc = new XmlDocument();
xmlDoc.Load(new System.IO.StringReader(xmlText));

foreach (XmlNode node in xmlDoc.SelectNodes("//Template"))
{
Console.WriteLine("{0}: {1}", node.Name, node.InnerText);
}
}


You need to use an XmlNamespaceManager because the
Template element is in a namespace:

XmlDocument xmlDoc = new XmlDocument();
xmlDoc.Load(new System.IO.StringReader(xmlText));
XmlNamespaceManager manager = new XmlNamespaceManager(xmlDoc.NameTable);
manager.AddNamespace("ns",
"http://schemas.openxmlformats.org/officeDocument/2006/extended-properties");

foreach (XmlNode node in xmlDoc.SelectNodes("//ns:Template", manager))
{
Console.WriteLine("{0}: {1}", node.Name, node.InnerText);
}

크리에이티브 커먼즈 라이센스
Creative Commons License

Posted by 솔라뷰

2010/03/02 13:09 2010/03/02 13:09
,
Response
No Trackback , No Comment
RSS :
http://www.solarview.net/rss/response/285

[book]Visual Basic.NET Class Design Handbook

비주얼 베이직 6.0에서 비주얼 베이직 닷넷(이하 비베닷넷)으로 옮기는 과정에서 참 많은 것이 장벽이었는데, 이런 것들 한 방에 해결해 준 책이 바로

Visual Basic .NET Class Design Handbook: Coding Effective Classes (Paperback)이다.

사용자 삽입 이미지

비베닷넷이 되면서 완전히 객체지향 프로그래밍 언어로 탈바꿈했다. 객체지향프로그래밍의 핵심은 그 무엇보다도 객체를 만들어내는 설계도 같은 클래스라고 할 수 있다. 책 제목에서도 알 수 있듯이 이 클래스를 어떻게 효과적으로 설계할 것인가를 자세히 다루고 있다.
참 맛있게 읽은 책이다.

During object-oriented analysis and design, we identify the most important objects in our system, and consider how they relate to each other. But during object-oriented programming, we don't write 'objects'; we define classes to represent the behavior and attributes of objects.
객체지향 분석과 설계를 하는 동안에, 우리는 우리 시스템 안의 가장 중요한 객체를 규명하고, 서로간에 어떻게 관계하는지를 고려한다. 그러나 객체지향 프로그래밍을 하는 동안에는 '객체들'을 작성하지 않는다. 다만 객체들의 행위와 속성을 대표하는 클래스를 정의한다.
(본문 중에서)

크리에이티브 커먼즈 라이센스
Creative Commons License

Posted by 솔라뷰

2009/07/14 20:37 2009/07/14 20:37
,
Response
No Trackback , No Comment
RSS :
http://www.solarview.net/rss/response/257

마이크로소프트의 도움말 사이트 http://support.microsoft.com/?id=322090
크리에이티브 커먼즈 라이센스
Creative Commons License

Posted by 솔라뷰

2009/07/14 09:31 2009/07/14 09:31
Response
No Trackback , No Comment
RSS :
http://www.solarview.net/rss/response/256

삼각함수 비교

삼각함수 비교


설명 Excel VBA VB6 VB.NET 비고
sin 사인함수 Sin Sin Sin Sin
cos 코사인함수 Cos Cos Cos Cos
tan 탄젠트함수 Tan Tan Tan Tan
arcsin 사인역함수 Asin - - Asin
arccos 코사인역함수 Acos - - Acos
arctan 탄젠트역함수 Atan
Atan2
Atn Atn Atan
Atan2

sinh 하이퍼볼릭사인함수 Sinh - - Sinh
cosh 하이퍼볼릭코사인함수 Cosh - - Cosh
tanh 하이퍼볼릭탄젠트함수 Tanh - - Tanh
arcsinh 하이퍼볼릭사인역함수 Asinh - - -
arccosh 하이퍼볼릭코사인역함수 Acosh - - -
arctanh 하이퍼볼릭탄젠트역함수 Atanh - - -
이상에서 보듯 VB6와 VBA로 프로그래밍을 하고자 하면, 삼각함수의 역함수를 작성해야 한다. 만약 VBA에서 새로 역함수를 작성하지 않고, 엑셀함수를 사용하고자 한다면 다음과 같이 하면 된다.
area = WorksheetFunction.Pi * radius ^ 2
a = WorksheetFunction.Acos(b)
크리에이티브 커먼즈 라이센스
Creative Commons License

Posted by 솔라뷰

2009/05/29 19:13 2009/05/29 19:13
,
Response
No Trackback , No Comment
RSS :
http://www.solarview.net/rss/response/251

« Previous : 1 : 2 : 3 : 4 : 5 : Next »