.Net Web Service Work Book UserPreferences
 
Help Info Print View Search Diffs Edit
 인덱스   찾기   Freeboard   Subjectless   Images   최근글 

오전 10:13 2004-05-28
[WWW]Naming Conventions for .NET / C# Projects
[WWW]101 Visual Basic and C# Code Samples

오후 2:27 2004-05-22
제기랄 닷넷은 프로그램 실행되는 경로 알아내는 것도 뭐 이리 복잡해.

System.AppDomain?.CurrentDomain?.BaseDirectory?에서 긁어오자 =3

오전 12:57 2004-05-19
직렬화의 기본
Project test = new Project(); 
test.m_dTeamStrength = 1.0d; 
test.m_strName = "TestProject"; 
test.m_strDesc = "This is my test Project"; 
System.IO.FileStream fsOutput = new System.IO.FileStream(@"C:\1.xml", System.IO.FileMode.Create); 
System.Xml.Serialization.XmlSerializer serializer= new System.Xml.Serialization.XmlSerializer(test.GetType()); 
serializer.Serialize(fsOutput, test); 

오후 4:58 2004-05-17
오전 11:03 2004-05-12
별 차이가 없을 것 같지만, 위 구문은 페이지 렌더링이 끝난 다음에 세션값이 말소된다.
즉시 값을 제거하고 비교할 경우가 있거든 RemoveAll
?()을 사용하자.
Session.Abandon(); 
Response.Write(null!=Session["user_pid"]); 
Session.RemoveAll(); 
Response.Write(null!=Session["user_pid"]); 

오전 1:37 2004-05-09
특정 웹 페이지의 내용을 긁어오기.
System.Net.HttpWebRequest request = 
(System.Net.HttpWebRequest)System.Net.WebRequest.Create("http://localhost"); 
System.Net.HttpWebResponse response = 
(System.Net.HttpWebResponse)request.GetResponse(); 
System.IO.StreamReader reader = new 
System.IO.StreamReader(response.GetResponseStream()); 
 
Response.Write(reader.ReadToEnd()); 

오후 5:51 2004-05-06
string에 Io.Stream을 연결해서, XmlWriter?로 xml 난사하기.
System.Text.StringBuilder strReturn = new System.Text.StringBuilder(); 
System.IO.StringWriter strWriter = new System.IO.StringWriter(strReturn); 
System.Xml.XmlTextWriter xWriter = new System.Xml.XmlTextWriter(strWriter); 
 
xWriter.WriteStartDocument(); 
xWriter.WriteStartElement("TestElement"); 
xWriter.WriteString("OK"); 
xWriter.WriteEndElement(); 
xWriter.WriteEndDocument(); 
strWriter.Close(); 
오전 12:00 2004-05-05
md5인코딩..
System.Security.Cryptography.MD5CryptoServiceProvider md5 = new System.Security.Cryptography.MD5CryptoServiceProvider(); 
strReturn = new string(ByteToHex(md5.ComputeHash((new System.Text.UnicodeEncoding()).GetBytes(strPassword)))); 
System.Security.Cryptography.MD5CryptoServiceProvider md5 = new System.Security.Cryptography.MD5CryptoServiceProvider(); 
strReturn = new string(ByteToHex(md5.ComputeHash(CharToByte("MD5".ToCharArray())))); 
오후 5:34 2004-05-04
oledb로부터 xml 뽑아먹기.
OleDbConnection conn = new OleDbConnection(ConfigurationSettings.AppSettings["DSNConnectionString"]); 
 
OleDbCommand comm = new OleDbCommand("Select * from tbTarot", conn); 
comm.CommandTimeout = 30; 
 
OleDbDataAdapter da = new OleDbDataAdapter(); 
da.SelectCommand = comm; 
 
DataSet ds = new DataSet(); 
da.Fill(ds, "tbTarot"); 
 
return ds.GetXml(); 

오후 11:33 2004-05-03
이런 니미롤 썅썅바.
.net에서 char가 16비트 문자로 취급되는 바람에 byte <-> char의 변환은 불가능해졌다.
private byte[] CharToByte(char[] c) { 
        byte[] b = new byte[c.Length]; 
        for(int i=0;i<c.Length;i++) 
                b[i] = (byte)c[i]; 
        return b; 
} 
 
private char[] ByteToHex(byte[] b) { 
        char[] c = new char[b.Length*2]; 
         
        for (int i = 0; i < b.Length; i++)      { 
                int n = b[i]; 
                c[i * 2] = hexDigits[n >> 4]; 
                c[i * 2 + 1] = hexDigits[n & 0xF]; 
        } 
        return c; 
} 

오후 2:36 2004-04-17
mdb <-> TarotService? <-> Tarot.mft.co.kr/pda <-> flash ui <-> client
<Request_Authorization>  
        <User_ID>asd</User_ID>  
        <User_Password>asd</User_Password>  
</Request_Authorization>  
  
<Response_Authorization>  
        <Result>OK</Result>  
        <UserInfo>  
                <TarotUser>  
                        <user_PID>2</user_PID>  
                        <user_ID>asd</user_ID>  
                        <user_Name>asd</user_Name>  
                        <pwd>asd</pwd>  
                        <email>[email protected]</email>  
                </TarotUser>  
        </UserInfo>  
</Response_Authorization>  
  
<Response_Authorization>  
        <Result>Fail</Result>  
        <Message>...</Message>  
</Response_Authorization>  
  
회원가입  
<Request_UserAdd>  
        <User_ID>Kenial</User_ID>  
        <User_Name>이수겸</User_Name>  
        <User_Password>1234</User_Password>  
        <User_Email>[email protected]</User_Email>  
</Request_UserAdd>  
  
<Response_UserAdd>  
        <Result>OK</Result>  
        <UserInfo>  
                <TarotUser>  
                        <user_PID>76</user_PID>  
                        <user_ID>Kenial</user_ID>  
                        <user_Name>이수겸</user_Name>  
                        <pwd>1234</pwd>  
                        <email>[email protected]</email>  
                </TarotUser>  
        </UserInfo>  
</Response_UserAdd>  
  
회원정보 변경  
<Request_UserModify>  
        <User_ID>Kenial</User_ID>  
        <User_Name>이수겸</User_Name>  
        <User_OldPassword>1234</User_OldPassword>  
        <User_NewPassword>4321</User_NewPassword>  
        <User_Email>[email protected]</User_Email>  
</Request_UserModify>  
  
<Response_UserModify>  
        <Result>OK</Result>  
        <UserInfo>  
                <TarotUser>  
                        <user_PID>76</user_PID>  
                        <user_ID>Kenial</user_ID>  
                        <user_Name>이수겸</user_Name>  
                        <pwd>4321</pwd>  
                        <email>[email protected]</email>  
                </TarotUser>  
        </UserInfo>  
</Response_UserModify>  
  
카드정보 열람  
<Request_GetCards>  
        <Card_Codes>m02;m01</Card_Codes>  
</Request_GetCards>  
  
<Response_Cards>  
        <Result>OK</Result>  
        <TarotCardList>  
                <TarotCard>  
                        <Card_Name_Kr>여성 대사제</Card_Name_Kr>  
                        <Card_Name_En>The High Priestess</Card_Name_En>  
                        <Contents>이 카드는....</Contents>  
                        <Meaning>지혜, 건전한 판단력, 무의식 속의 깨달음, 신비스러움, 일반적  
  
인 상식, 평온과 침착, 객관적인 타당성, 상황의 판단, 통찰력, 꿈과 상상력의 영향력을 받음, 더  
  
욱 넓은 실체를 파악함, 직관, 지식, 지각, 인지, 자기 의존, 무표정한, 감동을 쉽게 드러내지 않  
  
는, 정신적이고 관념적인 대인 관계</Meaning>  
                        <Keyword>순수, 지성</Keyword>  
                        <Card_ImageFilename>m02.jpg</Card_ImageFilename>  
                </TarotCard>  
                <TarotCard>  
                        <Card_Name_Kr>마법사</Card_Name_Kr>  
                        <Card_Name_En>The Magician</Card_Name_En>  
                        <Contents>타로 카드의...</Contents>  
                        <Meaning>독창성, 창조성, 상상력, 자기 의존, 자발적인 행동, 자기 확신  
  
, 발명의 재주, 정교함, 융통성, 탄력성, 유연성, 능수 능란함, 자기 통제, 자제심, 극기심, 재빠  
  
른 손재주, 책략, 속임수를 부릴 수 있음</Meaning>  
                        <Keyword>창조, 시초</Keyword>  
                        <Card_ImageFilename>m01.jpg</Card_ImageFilename>  
                </TarotCard>  
        </TarotCardList>  
</Response_Cards>  
  
카드 점 아카이브 목록 가져오기  
<Request_ArchiveList>  
        <User_ID>asd</User_ID>  
</Request_ArchiveList>  
  
<Response_ArchiveList>  
        <Result>OK</Result>  
        <ArchiveList>  
                <TarotArchive>  
                        <Archive_PID>1</Archive_PID>  
                        <User_PID>2</User_PID>  
                        <Question_Text>testquestion</Question_Text>  
                        <Question_Date>2003-11-11T21:57:09.0000000+09:00</Question_Date>  
                        <A_Card_Code_1>m01</A_Card_Code_1>  
                        <A_Card_Code_2>m01</A_Card_Code_2>  
                        <A_Card_Code_3>m01</A_Card_Code_3>  
                        <A_Card_Code_4>m01</A_Card_Code_4>  
                        <A_Card_Code_5>m01</A_Card_Code_5>  
                        <A_Card_Code_6>m01</A_Card_Code_6>  
                        <A_Card_Code_7>m01</A_Card_Code_7>  
                        <A_Card_Code_8>m01</A_Card_Code_8>  
                        <A_Card_Code_9>m01</A_Card_Code_9>  
                        <A_Card_Code_10>m01</A_Card_Code_10>  
                </TarotArchive>  
                <TarotArchive>  
                        <Archive_PID>2</Archive_PID>  
                        <User_PID>2</User_PID>  
                        <Question_Text>asd</Question_Text>  
                        <Question_Date>2003-11-11T22:12:33.0000000+09:00</Question_Date>  
                        <A_Card_Code_1 />  
                        <A_Card_Code_2 />  
                        <A_Card_Code_3 />  
                        <A_Card_Code_4 />  
                        <A_Card_Code_5 />  
                        <A_Card_Code_6 />  
                        <A_Card_Code_7 />  
                        <A_Card_Code_8 />  
                        <A_Card_Code_9 />  
                        <A_Card_Code_10 />  
                </TarotArchive>  
        </ArchiveList>  
</Response_ArchiveList>  
  
카드 점 아카이브 가져오기  
<Request_ArchiveInfo>  
        <Archive_PID>23</Archive_PID>  
</Request_ArchiveInfo>  
  
Response_ArchiveInfo>  
        <Result>OK</Result>  
        <ArchiveInfo>  
                <TarotArchive>  
                        <Archive_PID>13</Archive_PID>  
                        <User_PID>2</User_PID>  
                        <Question_Text>testquestion</Question_Text>  
                        <Question_Date>2003-11-11T22:18:39.0000000+09:00</Question_Date>  
                        <A_Card_Code_1>m01</A_Card_Code_1>  
                        <A_Card_Code_2>m01</A_Card_Code_2>  
                        <A_Card_Code_3>m01</A_Card_Code_3>  
                        <A_Card_Code_4>m01</A_Card_Code_4>  
                        <A_Card_Code_5>m01</A_Card_Code_5>  
                        <A_Card_Code_6>m01</A_Card_Code_6>  
                        <A_Card_Code_7>m01</A_Card_Code_7>  
                        <A_Card_Code_8>m01</A_Card_Code_8>  
                        <A_Card_Code_9>m01</A_Card_Code_9>  
                        <A_Card_Code_10>m01</A_Card_Code_10>  
                </TarotArchive>  
        </ArchiveInfo>  
</Response_ArchiveInfo>  
  
  
이메일 발송  
<Request_ArchiveMail> 
        <Archive_PID>54</Archive_PID> 
</Request_ArchiveMail> 
  
<Response_ArchiveMailSend> 
        <Result>OK</Result> 
</Response_ArchiveMailSend> 
  
<Request_xxxx>  
<Response_xxxx>  
<Invalid_Message />  

오전 12:11 2004-04-10
[WWW]msdn 한글 페이지

일단 xml 관련 아티클을 읽어보면서 생각을 해 보자...


프로그래밍분류


PythonPowered EditText of this page (last modified 2005-01-19 11:06:22)
FindPage by browsing, searching, or an index
Or try one of these actions: DeletePage, DeleteUploadedFile, LikePages, SpellCheck, UploadFile