달력

22025  이전 다음

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28

Subversion 설치.

 

설치 파일 : CollabNetSubversion-server-1.5.0-23.win32.exe

 

 

설치시에 repository 부분 설정하는 곳이 있는데 윈도우 인스톨 된 드라이브 말고

 

d 드라이브나 데이터 저장되는 드라이브로 변경해 주세요.

 

 

1. ehr 소스가 저장될 프로젝트를 생성해 주세요.

 

커맨드 창에서 아래와 같이 해주시면 됩니다.

 

svnadmin create --fs-type fsfs c:\svn_repository\ehr_2008_07

 

 

2. 소스세이프에 생성된 프로젝트 에서 현재 프로젝트의 접근 설정을 해주세요.

 

c:\svn_repository\ehr_2008_07\conf 디렉토리에 보면

 

 

svnserve.conf 파일이 있습니다.

 

이곳에서 아래의 부분을 수정해 주세요.(# 표시를 지워주세요)

 

12번째 줄 : #anon-access = read --> anon-access = none

 

13번째 줄 : #auth-access = write

 

20번째 줄 : #password-db = passwd --> 앞에 # 표시 제거

 

32번째 줄 : # realm = My First Repository --> realm = ehr_2008_07

 

 

 

 

3. 사용자를 등록해야 합니다.

 

c:\svn_repository\ehr_2008_07\conf 디렉토리에 보면

 

passwd 라는 텍스트 파일이 존재합니다.

 

해당 파일을 아래와 같이 수정해 주세요.

 

### This file is an example password file for svnserve.

### Its format is similar to that of svnserve.conf. As shown in the

### example below it contains one section labelled [users].

### The name and password for each user follow, one account per line.

 

[users]

# harry = harryssecret

# sally = sallyssecret

 

jy = 1111

tornado = 1111

 

 

4. svn manager 설치해주세요.(재부팅 되도 svn 이 자동실행 됩니다)

 

SVNManager-1.1.1-Setup.msi  파일을 설치

 

설치 하신 후 아래의 순서로 셋팅해 주시면 됩니다.

 

시작 --> 모든 프로그램 --> Subversion --> SVNServe manager 를 실행

 

실행하면 작업 트레이에 아이콘 생성됨.

 

아이콘 더블클릭 하면 설정 화면 보여짐.

 

Subversion Repository 에서 경로를 d:\svn_repository 로 맞춤

 

Port --> 3690  으로 입력

 

Run Mode --> Normal 로 선택

 

Start 버튼 클릭

 

Hide 버튼 클릭

 

 

끝입니다

Posted by tornado
|

현재 프로젝트 weblogic 6.1 -.-;

웹서비스 작업해야 하는데, 6.1 에서는 Stateless Session Bean, Message Driven Bean 에만

웹서비스를 생성 할 수 있다.

ant task 중에서 wsgen 이라는게 있더군.

그래서 ant build 파일 만들어서 빌드 하고 ear 을 weblogic 에 심어줬다.

자바 클라이언트로는 dynamic, static 둘다 잘 됨.

그러나~~~~~

asp.net 2.0 에서 자바 웹서비스를 생성하지 못한다.

웹서비스 참조 걸었을 경우 map파일을 만들지 못함.

왜!!!!

웹로직에서 생성한 웹서비스의 wsdl.jsp 에 문제가 있다.

<definitions
targetNamespace="java:com.xxx"
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/1999/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:tns="java:com.xxx"
>

xmlns 가 1999 라서 문제가 생긴다.

문제를 빨랑 해결해야 해서...

ear 파일 까고, war 파일 까서...

아래와 같이 고쳤다.

<definitions
targetNamespace="java:com.xxx"
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:tns="java:com.xxx"
>

년도만 2001 로 고쳤더니 잘 됨.

버젼이 낮으니 이런 문제도 발생을 하는군요.

Posted by tornado
|

http://jcifs.samba.org/



http://jcifs.samba.org/src/docs/ntlmhttpauth.html



읽어보구 현재 프로젝트에 적용할 수 있을때 해야겠다.




Posted by tornado
|
[출처] http://cafe.daum.net/carsguide/NYhB/3427




[토스카 튜닝]국산차 토스카튜닝은 무죄!!






It’s Black Tiger
아스팔트를 질풍처럼 달리는 6개의 강력한 심장


야생을 지배하는 절대 강자
힘차게 포효하며 달려가는 범처럼
강하고 카리스마 넘치는 차는 없을까?

어둠의 터널을 지나 드디어 중형차를 지배할 것이 왔다!


It’s Black Tiger

GM대우의 야심 찬 중형세단
2008 토스카 프리미엄6
진보를 향한 열정으로 우리에게 돌아왔다


Tosca’s Back

GM대우의 브랜드 파워와 토스카의 강력한 내구성 그리고 럭셔리한 디자인까지
이제는 튜닝마니아들을 주목시킬 토스카튜닝!



GM대우 토스카, 절대 럭셔리로 바꾸다

Medium Sedan the Luxury Style

 

 


토스카튜닝으로 진보한 토스카의 자태를 보라!
그것은 표호 하는 한 마리 범의 모습이다

럭셔리한 모습뿐 아니라 강력한 포스까지 느껴지는 건 왜일까?
토스카는 중형세단의 진보와 열정을 그대로 보여주는 최초의 작품이다

진보된 중형세단 그것은 불가능이라고 했지만
대형세단만의 중후한 멋과 럭셔리한 디자인도
이제 토스카에겐 아무것도 아니다


Impossible is nothing
불가능, 그것은 토스카에겐 아무것도 아니다!


<야생을 질주하는 범처럼 토스카의 눈은 카리스마다>
  



<비교할 수 없는 멋, 이것이 진정한 휠이다!>
 


<강한 포스가 느껴지는 튜닝 토스카의 뒤태, 모두의 시선을 사로잡다> 
 



<박지성은 맨유의 심장, 토스카는 아스팔트 위의 강력한 6기통 심장>
 


2008년 중형세단 시대, 중형차를 리드하라!
토스카, 이제 2008년 토스카 프리미엄6로 진보하다

변화를 두려워하지 마라! 토스카의 진보는 계속된다




'이것저것 > 낙서장' 카테고리의 다른 글

곰이 운전해~  (0) 2008.09.12
영리한 고양이 ^^  (0) 2008.07.27
너무 귀여운 우리 조카들 ^^  (0) 2007.08.23
아~ 낚시가고 싶다 ㅠㅠ  (0) 2007.08.21
회사서 새로 지급한 노트북 --> 산타로사..  (0) 2007.06.17
Posted by tornado
|

http://support.microsoft.com/kb/312629



PRB: Response.End, Response.Redirect 또는 Server.Transfer를 사용하면 ThreadAbortException이 발생한다

기술 자료 ID : 312629
마지막 검토 : 2006년 1월 20일 금요일
수정 : 2.4
이 문서는 이전에 다음 ID로 출판되었음: KR312629

현상

Response.End, Response.Redirect 또는 Server.Transfer 메서드를 사용하면 ThreadAbortException 예외가 발생합니다. try-catch 문을 사용하면 이 예외를 catch할 수 있습니다.

위로 가기

원인

Response.End 메서드는 페이지 실행을 종료시키고 해당 응용 프로그램 이벤트 파이프라인의 Application_EndRequest 이벤트로 실행을 이동합니다. Response.End 다음에 오는 코드 줄들은 실행되지 않습니다.

Response.Redirect 메서드와 Server.Transfer 메서드가 모두 내부적으로 Response.End를 호출하기 때문에 이러한 문제가 발생합니다.

위로 가기

해결 방법

이 문제를 해결하려면 다음 방법 중 하나를 사용하십시오.
Response.End의 경우 Response.End 대신 HttpContext.Current.ApplicationInstance.CompleteRequest 메서드를 호출하여 Application_EndRequest 이벤트에 대한 코드 실행을 무시합니다.
Response.Redirect의 경우 endResponse 매개 변수에 대해 false를 전달하여 Response.End를 내부적으로 호출하지 않도록 하는 Response.Redirect(String url, bool endResponse) 오버로드를 사용합니다. 예는 다음과 같습니다.
  Response.Redirect ("nextpage.aspx", false);
						
이 해결 방법을 사용하면 Response.Redirect 다음에 오는 코드가 실행됩니다.
Server.Transfer의 경우 Server.Execute 메서드를 대신 사용합니다.

위로 가기

현재 상태

이것은 의도적으로 설계된 동작입니다.
Posted by tornado
|
http://www.mikepope.com/blog/AddComment.aspx?blogid=1264

베리 베리 굿잡...


August 17, 2005  |  System.Net.Mail and embedded images  |  14353 hit(s)

Finally stumbled upon the way to create email messages with embedded images in ASP.NET 2.0. (Note that this doesn't work for ASP.NET 1.1, sorry to say.)

For review ... you can add an image to an email message in these ways:
  • Attach it. Works ok, but it's ... attached. Illustrated earlier.
  • In an HTML-formatted message, create an <img> tag that points to an absolute URL.
  • In an HTML-formatted message, create an <img> tag that points to an embedded image and then (duh) embed the image. In that case, the image shows up inline with the message's text.

Pointing to an absolute URL keeps the message size down, but you have no control over the image on the server, and it could go away or change. Attaching and embedding keep a copy of the image with the message, but bloat the message size.

So, embedding. The trick, such as it is, is to create an alternative view and to add a linked resource to the alternative view. Alternative views enable you to create different versions of the email message -- typically one in plain text and the other formatted with HTML. These then substitute for the basic msg.Body property. Behind the scenes, the class creates the appropriately formatted multipart email that incorporates the alternative views, which lets the email client choose which one to use.

To do the actual embedding, you need to do a number of things:
  • Create an HTML-formatted message.
  • Use an <img> tag in the message body.
  • For the src attribute of the <img>, point not to a URL, but to a content ID (cid). This points to the portion of the message containing the image stream.
  • Create an alternative view.
  • Create a linkedResource that slurps up the image you want to embed.
  • Assign a content ID to the linked resource -- this should match the cid you used in the <img> tag.
  • Assign the image's file name to the linked resource.

(I think it takes more lines to describe it than to actually do it.)

Here's code. I can't take credit for it. I played with this for a long time trying to get it to work and came close, but I ultimately relied on an example provided by
mharder in an internal email. Note the syntax of the <img> tag and the use of ContentId, ContentType.Name, and filename.
Imports System.Net.Mail
Imports System.Net.Mime
Imports System.IO

[...]

Dim fromAddress As String = "mike@elsewhere.com"
Dim toAddress As String = "mike@elsewhere.com"
Dim subject As String = "Test EmbeddedImage"
Dim contentId As String = "image1"
Dim path As String = Server.MapPath("~") & "\"
Dim filename As String = path & "MyPicture.jpg"
Dim body As String = "Here is a linked resource: <img src=""cid:image1""/>"

Dim mailMessage As New MailMessage(fromAddress, toAddress)
mailMessage.Subject = "Testing embedded image"
Dim av1 As AlternateView
av1 = AlternateView.CreateAlternateViewFromString(body, Nothing, _
MediaTypeNames.Text.Html)
Dim linkedResource As LinkedResource = New LinkedResource(filename)
linkedResource.ContentId = contentId
linkedResource.ContentType.Name = filename

av1.LinkedResources.Add(linkedResource)
mailMessage.AlternateViews.Add(av1)
mailMessage.IsBodyHtml = True
Dim mailSender As New SmtpClient("smtpHost")
Try
mailSender.Send(mailMessage)
labelStatus.Text = "Message sent!"
Catch ex As Exception
labelStatus.Text = ex.Message
End Try
Posted by tornado
|

펌 : http://blog.naver.com/basis_ryuki?Redirect=Log&logNo=30026875105

기순씨... 쌩유~



1.vsto제대로 깔고 보자.

- vsto runtime은 기본적으로 오피스2007 -> vs2005 설치순으로 했을때 Vs2005설치시에 깔려주신다..


- vsto runtime깔렸으니까 괜찮겠지 믿고나서 뒤에 큰코 다치지 말고.. 하나더 깔아야 한다.

   (안그럼 솔루션 파일 열었을때  "C:\Program Files\MSBuild\Microsoft.VisualStudio.OfficeTools2.targets"가 없다는 둥 에러가 뜬다..)

  : Visual Stuio Tool for Office sp2


  그렇게 깔아서 정상으로 나왔을때 C:\Program Files\MSBuild\는 다음과 같다.


- 여기서 만사 오케 하시면 감사하겠지만.. 좀 수틀려 버리시면.. 솔루션을 열고 나서 Outlook reference참조 에러도 난다.. (망할녀석!!)

   office를 나중에 설치했을때 문제라고 하는데 정상 설치했을때도 가끔 그러는것 같다..


  정확히는 "Microsoft.Office.Interop"에러라고 빌드시에 나온다.. 별별짓을 다해도 소용없다.

  우왕 좌왕하다가 포맷말고..(난 벌써 했단말야..ㅠㅠ) 아래 링크에 가서 파일 다운 ..

 

  http://www.microsoft.com/downloads/details.aspx?familyid=59DAEBAA-BED4-4282-A28C-B864D8BFA513&displaylang=en

- 설치하고 솔루션을 다시 열었을대 outlook reference참조가 정상으로 되어있음 확인!

   빌드 Succeeded!!


=========================================================================================

[펌]컴퓨터에 설치된 VSTO 2005 Runtime의 버전을 알아보려면..

-출처 : 김유철 책임 블로그에서..^^;;


  • 레지스트리 설정: 다음 레지스트리 설정을 확인하십시오.
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\vsto runtime Setup\v8.0.50727
    • “Update = 2”가 나타나는 경우 VSTO Runtime의 8.0.50727.891 버전이 이미 설치되어 있으므로 이 다운로드를 설치하지 않아도 됩니다.
    • “Update = 1”이 나타나는 경우 원래 VSTO 2005 SE Runtime이 설치되어 있습니다(버전 8.0.50727.816). 이 다운로드를 설치하는 것이 좋습니다.
    • 레지스트리 키가 나타나지만 Update 설정이 없는 경우 first-edition VSTO 2005 Runtime이 설치되어 있습니다(버전 8.0.50727.42). 이 다운로드를 설치하는 것이 좋습니다.
    • 위의 키를 찾을 수 없는 경우 설치된 VSTO 2005 Runtime이 없습니다. 이 다운로드를 설치하는 것이 좋습니다.
  • 파일 버전: Program Files\Common Files\Microsoft Shared\VSTO\8.0\에 있는 AddinLoader.dll이라는 파일을 검사하여 파일 버전 번호를 확인할 수 있습니다.
    • 이 런타임 버전의 파일 버전 번호는 8.0.50727.891입니다.
    • 원래 VSTO 2005 SE 파일 버전 번호는 8.0.50727.816입니다.
    • first-edition VSTO 2005 파일 버전 번호는 8.0.50727.42입니다

      [출처] 험난한 vsto 설치..|작성자 유키

  • Posted by tornado
    |

    출처 : http://blogs.msdn.com/vikas/archive/2007/07/21/getting-into-a-folder-by-path-using-ews.aspx



    Getting into a folder by path using EWS

    Exchange Web Service is very powerful but everything has some limitations.

    I've been struggling with one limitation that you cannot access any folder in Mailbox using its path like

    /Inbox/MyFolder1/MyAnotherFolder/ThisIsTheFolderIWant

    Client is not aware of the folder hierarchy on server side so you cannot access any folder directly, you need to create your own mechanism for that.

    I am sharing the sample code I have created to Traverse down to the Folder path one by one and finally return the last folder.

    Approach

    -          Suppose you want to get into “/Inbox/First/Second/Final” folder

    -          Get root folder’s ID

    -          Find Inbox using root folder’s ID

    -          Find First using Inbox folder’s ID

    -          and so on till Final folder

    -          Remember you should call FindFolder with FullString ContainmentModeType to get the desired result, otherwise you might get wrong folder

    Code

    Note: I have tested this code on Exchange 2007 RTM with Visual Studio 2005 , and it should work fine

        class Program

        {

            static void Main(string[] args)

     

            {

     

                ExchangeServiceBinding esb = new ExchangeServiceBinding();

                esb.Credentials = new System.Net.NetworkCredential("UserName", "Password");

                esb.Url = "http://YourExchangeServerHere/ews/exchange.asmx";

     

                BaseFolderType bft = GetFolderByPath(esb, "/Inbox/Folder1/Folder2/Folder3/FinalFolder");

               

                if (null == bft)

                    Console.WriteLine("Folder not found.");

                else

                    Console.WriteLine("Folder Found: " + bft.DisplayName);

                return;

                

            }

     

            static public BaseFolderType GetFolderByPath(ExchangeServiceBinding esb, string szFolderPath)

            {

                if (null == szFolderPath)

                    return null;

     

                if (szFolderPath.IndexOf("/") == -1)

                    return null;

     

                if (szFolderPath.Substring(0, 1).CompareTo("/") == 0)

                    szFolderPath = szFolderPath.Substring(1);

               

                string[] Path=szFolderPath.Split('/');

                string szParentFolderId = null;

                BaseFolderType bft = null;

     

                for (int i = 0; i < Path.GetLength(0); i++)

                {

                    if (null == szParentFolderId)

                        szParentFolderId = GetRootFolderId(esb);

     

                    bft = GetFolder(esb, szParentFolderId, Path[i]);

                    if (null == bft)

                        return null;

                    else

                        szParentFolderId = bft.FolderId.Id;

                }

                return bft;

            }

            static public BaseFolderType GetFolder(ExchangeServiceBinding esb, string szParentFolderId, string szFolderName)

            {

                if (null == esb || null == szFolderName)

                    return null;

                //get the root folder ID

                FolderIdType[] fit = new FolderIdType[1];

                fit[0] = new FolderIdType();

                fit[0].Id = szParentFolderId;

                //set the props that we want to retrieve

                FolderResponseShapeType frst = new FolderResponseShapeType();

                frst.BaseShape = DefaultShapeNamesType.AllProperties;

                //restrict the search on the folder name

                PathToUnindexedFieldType ftFolderName = new

                PathToUnindexedFieldType();

                ftFolderName.FieldURI = UnindexedFieldURIType.folderDisplayName;

                ConstantValueType cvt = new ConstantValueType();

                cvt.Value = szFolderName;

                FieldURIOrConstantType ctFolderName = new FieldURIOrConstantType();

                ctFolderName.Item = cvt;

                ContainsExpressionType cet = new ContainsExpressionType();

                cet.Constant = cvt;

                cet.Item = ftFolderName;

     

                cet.ContainmentComparison = ContainmentComparisonType.IgnoreCase;

                cet.ContainmentComparisonSpecified = true;

                cet.ContainmentMode = ContainmentModeType.FullString;

                cet.ContainmentModeSpecified = true;

                RestrictionType rt = new RestrictionType();

                rt.Item = cet;

                //find the folder

                FindFolderType fft = new FindFolderType();

                fft.Traversal = FolderQueryTraversalType.Deep;

                fft.ParentFolderIds = fit;

                fft.FolderShape = frst;

                fft.Restriction = rt;

                FindFolderResponseType ffrt = esb.FindFolder(fft);

                ResponseMessageType rmt =

                ((ResponseMessageType)ffrt.ResponseMessages.Items[0]);

                if (rmt.ResponseClass == ResponseClassType.Success)

                {

                    BaseFolderType[] bfts = ((FindFolderResponseMessageType)ffrt.ResponseMessages.Items[0]).RootFolder.Folders;

                    if (bfts.GetLength(0) > 0)

                        return bfts[0];

                    else

                        return null;

                }

     

                else

                    return null;

            }

            static public string GetRootFolderId(ExchangeServiceBinding esb)

            {

                if (null == esb)

                    return null;

     

                DistinguishedFolderIdType[] dfit = new DistinguishedFolderIdType[1];

               

                    //get the root folder ID

                    dfit[0] = new DistinguishedFolderIdType();

                    dfit[0].Id = DistinguishedFolderIdNameType.root;

               

                //set the props that we want to retrieve

                FolderResponseShapeType frst = new FolderResponseShapeType();

                frst.BaseShape = DefaultShapeNamesType.AllProperties;

                //get the folder

                GetFolderType gftRoot = new GetFolderType();

                gftRoot.FolderIds = dfit;

               

                gftRoot.FolderShape = frst;

                GetFolderResponseType gfrt = esb.GetFolder(gftRoot);

                FolderInfoResponseMessageType firmt =

                ((FolderInfoResponseMessageType)gfrt.ResponseMessages.Items[0]);

                if (firmt.ResponseClass == ResponseClassType.Success)

                    return ((FolderInfoResponseMessageType)gfrt.ResponseMessages.Items[0]).Folders[0].FolderId.Id;

                else

                    return null;

            }

        }

     



    Posted by tornado
    |

    VISUAL STUDIO Theme Gallery

    .NET 2008. 3. 20. 19:25
    Posted by tornado
    |

    Configuring Context-Sensitive Custom Tabs MOC2007

    How to configure custom content sensitive tabs in Microsoft Office Communicator MOC2007?

    Well its very simple to do. For more indepth information see Communicator_2007_Deployment_Guide from pagr 14.

    Setting up a custom tab requires:

    • A network-accessible custom tab definition file in XML format that gives the location of each tab’s main page and controls the information Communicator passes to this page.
    • A registry entry in the \Software\Policies\Microsoft\Communicator registry hive that gives the location of the tab definition file.

    · A graphic in Portable Network Graphics (PNG) format for the tab. The graphic can be:

    • Up to 16 pixels high by 16 pixels wide, or
    • Exactly 32 pixels high by 32 pixels wide.

    One or more Web pages for display in the Office Communicator window.

    Step 1. Create a custom XML file to prepare your MOC2007 configuration:

    Example:

    <?xml version="1.0" ?> 
    <tabdata>
    <tab>
       <image>/.png">http://<COMPUTERNAME>/<IMAGE>.png</image>
       <name>Smoelenboek</name>
       <tooltip>Tooltip text</tooltip> 
       <contenturl> /">http://<WEBURL>/</contenturl>  
       <userid>true</userid>
       <contactid>true</contactid>
       <accessibility>inside</accessibility>
    </tab>
    </tabdata>

    Step 2. Customize the registry in:

    HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Communicator

    The TabURL setting can be added to either section of the registry. However, settings in the hkey_local_machine\software section take precedence.

    image

    The HTML file containing the tab content must be in a trusted location on the network. The XML and PNG files can be stored in the same location as the HTML file, or on a network server or local machine. For example:

    · file:///\\contonso-it\oc\tabs.xml

    · file:///c:/myTab/tabs.xml

    Example:

    file:///c:/temp/customtab.xml

    Step 3. Restart your MOC2007 client and there you go ;-)

    image

    Posted by tornado
    |
        <script type="text/javascript">
      <!--
      //Disable right click script
      //visit http://www.rainbow.arch.scriptmania.com/scripts/
      ///////////////////////////////////
      function clickIE() {if (document.all) {return false;}}
      function clickNS(e) {
       if (document.layers||(document.getElementById&&!document.all)) {
        if (e.which==2||e.which==3) {return false;}
       }
      }
      if (document.layers) {document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}
      else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;}
      document.oncontextmenu=new Function("return false")
      // -->
     </script>

    'DHTML > Javascript' 카테고리의 다른 글

    NS/FireFox equiv of event.srcElement  (0) 2008.12.07
    [링크] 스크립트 주석 표준  (0) 2008.07.29
    TextArea 에 숫자만 입력하기  (0) 2007.11.14
    JavaScript Throw Statement  (0) 2007.08.21
    scriptaculous 응용한 accordion 메뉴...  (0) 2007.06.20
    Posted by tornado
    |
    처음 보는 에러...


    당황...


    하드디스크 용량 봤더니 100% ㅠㅠ

    로그 지웠더니 하드 용량의 절반을 찾음..

    로그 쉘을 잘못 짰나... 고쳐야겠다.
    Posted by tornado
    |
    http://www.velocityreviews.com/forums/t81512-htmltable-control-css-class.html


    Default Re: HtmlTable control css class

    Thanks Jeffrey, this works just fine. It is perhaps worth noting that
    Attributes["class"] = "myCSSClass" uses C# syntax. VB is
    Attributes("class") = "myCSSClass". This trips me up regularly - I much
    prefer C# syntax, but am sometimes forced to use VB.

    > Alfred,
    > Any time you want to add any attribute that may not be included in the
    > code, just use HtmlTable.Attributes["class"] = "myCSSClass";
    > This will work for any attribute.
    >
    > Best regards,
    > Jeffrey Palermo
    >
    > "Alfred Salton" <> wrote in message
    > news:2004062721504216807%alfredsalton@hotmailcom.. .
    >> Can anyone show me how to set the css class of an HtmlTable control in
    >> code on the server?
    >>
    >> I can't find any indication that the css class is a property of the
    >> HtmlTable, HtmlTableRow and HtmlTableCell classes. I'm getting the
    >> uncomfortable feeling that this can't be done, even though it seems
    >> incredible to me!

    Posted by tornado
    |
    Posted by tornado
    |
    스타일 시트로 간단하게 해결~


    <pre style="word-wrap: break-word"> 내용... </pre>

    또는 table 에 table-layout: fixed 스타일도 같이 주면 해결된다.
    Posted by tornado
    |
    음.. 대단
    유튜브에서 펌...


    '이것저것 > 음악' 카테고리의 다른 글

    Nightwish Planet Hell  (0) 2007.06.20
    [국산] SpearGuitar GLADIUS-1  (0) 2007.03.09
    [Guitar] Dame Saint t290..  (0) 2007.03.09
    추억의 노래. Mr. Zibago - Little Russian  (0) 2007.01.28
    Gary Moore - Still got the blues LIVE  (0) 2007.01.28
    Posted by tornado
    |



    declare @money money

    set @money = 123456 

    select replace(convert(varchar(15),convert(money,@money),1),'.00','')

     

    -.-

     

    Sql money 타입으로 캐스팅 하고 그것을 다시 convert 1 주면 1,000,000.00 같이 나오는데

    그중에 .00 공백으로 치환하니 간단히 되는군요

    Posted by tornado
    |
    [펌] SQL Server Explorer 만들기;
    [원글] http://blog.vuscode.com/malovicn/archive/2007/11/12/how-to-build-your-own-sql-server-explorer.aspx



    .NET exploration, articles, cool links, surf logs, book reviews, .net, c#, smart clients, software factories, patterns & practices, web casts and much more

    How to build your own SQL Server Explorer

    Recently, I've started making in my free time my own little ORM tool, mainly as an fun way into exploration of the ADO .NET 2.0

    Every  dissent ORM tool has to be based on DB object enumeration activities and I've noticed there are not a lot straight "how to" articles on net how to do various things (at least I had a hard time finding them), so I decided to make a simple blog post describing exactly those How-To's

    How to enumerate visible SQL server instances

    Enumerating visible instances of MS SQL Server can be performed by executing the GetDataSource() of the SqlDataSourceEnumerator type singleton instance.

    GetDataSource returns four column data table with next columns:

    1. ServerName - Name of the server.
    2. InstanceName - Name of the server instance. Blank if the server is running as the default instance.
    3. IsClustered - Indicates whether the server is part of a cluster.
    4. Version - Version of the server (8.00.x for SQL Server 2000, and 9.00.x for SQL Server 2005).

    Code example:

       1: public static IList<string> GetActiveServers()
       2: {
       3:     Collection<string> result = new Collection<string>();
       4:     SqlDataSourceEnumerator instanceEnumerator = SqlDataSourceEnumerator.Instance;
       5:     DataTable instancesTable = instanceEnumerator.GetDataSources();
       6:     foreach (DataRow row in instancesTable.Rows)
       7:     {
       8:         if (!string.IsNullOrEmpty(row["InstanceName"].ToString()))
       9:             result.Add(string.Format(@"{0}\{1}", row["ServerName"], row["InstanceName"]));
      10:         else
      11:             result.Add(row["ServerName"].ToString());
      12:     }
      13:     return result;
      14: }

    How to enumerate databases of the given SQL server instance

    Enumerating the databases of the given server can be performed by executing the GetSchema method of the SqlConnection instance with a SqlClientMetaDataCollectionNames.Databases string enumeration value passed to method.

    Passing that enumeration or it's string equivalent ("Databases") is totally the same, except enumeration looks cooler :)

    Code example:

       1: public static IList<string> GetDatabases(string serverName, string userId, string password,
       2:                                               bool windowsAuthentication)
       3:      {
       4:          Collection<string> result = new Collection<string>();
       5:          using (
       6:              SqlConnection connection =
       7:                  GetActiveConnection(serverName, string.Empty, userId, password, windowsAuthentication))
       8:          {
       9:              connection.Open();
      10:              DataTable dt = connection.GetSchema(SqlClientMetaDataCollectionNames.Databases);
      11:              foreach (DataRow row in dt.Rows)
      12:              {
      13:                  result.Add(string.Format("{0}", row[0]));
      14:              }
      15:          }
      16:          return result;
      17:      }

    In line 6, we are using an instance of SqlConnection type created by GetActiveConnection method.

    In line 10, we are calling GetSchema connection instance method which returns a data table with a single column which contains the name of the database

    in ADO NET, methods used for retrieving schema information always are overloaded with a version accepting additional string array parameter which is used for passing the restrictions (you can think of it as a filter criteria) which ADO.NET should apply while retrieving resulting set.
    Retrieving database schema in our example has only one restriction and that is database name so if we would write something like

       DataTable dt = connection.GetSchema("Databases", new string[] {"Northwind" });

    Please notice in that that line that I used "Databases" and not enumeration and that I have passed single string array with "Nortwind" content.
    Result of passing that restriction would be that ADO NET would retrieve only databases fulfilling the restriction requirement, which means only Nortwind database data would be returned

    GetActiveConnection method creates a new SqlConnection instance using SqlConnectionStringBuilder class which is used to build connection string for given parameters.

    Something like this

       1: private static SqlConnection GetActiveConnection(string serverName, string databaseName, string userName,
       2:                                                  string password, bool useIntegratedSecurity)
       3: {
       4:     SqlConnectionStringBuilder connBuilder = new SqlConnectionStringBuilder();
       5:     connBuilder.DataSource = serverName;
       6:     connBuilder.InitialCatalog = databaseName;
       7:     connBuilder.IntegratedSecurity = useIntegratedSecurity;
       8:     connBuilder.UserID = userName;
       9:     connBuilder.Password = password;
      10:     return new SqlConnection(connBuilder.ConnectionString);
      11: }

    I'll be using this helper methods also in rest of the examples

    How to enumerate tables of the given database

    In general, the procedure of retrieval tables is the same as the procedure described for databases, in a sense that the GetSchema method of SqlConnection instance is been called but this time with SqlClientMetaDataCollectionNames.Tables ("Tables") enumerated value.

    The big difference between those two is in the fact that tables restriction are contained of four different constraint arguments:

    1. database name
    2. owner/schema name ("dbo")
    3. table name (which should contain null value if we want to retrieve all tables of database)
    4. table type (which can have values "VIEW" for views and "BASE TABLE" for tables

    So, to retrieve the list of tables for a given database we could use code similar to the next one:

       1: public static IList<string> GetTables(string serverName, string databaseName, string userId, string password,
       2:                                       bool windowsAuthentication)
       3: {
       4:     string[] restrictions = new string[4];
       5:     restrictions[0] = databaseName; // database/catalog name   
       6:     restrictions[1] = "dbo"; // owner/schema name   
       7:     restrictions[2] = null; // table name   
       8:     restrictions[3] = "BASE TABLE"; // table type    
       9:     Collection<string> result = new Collection<string>();
      10:     using (
      11:         SqlConnection connection =
      12:             GetActiveConnection(serverName, databaseName, userId, password, windowsAuthentication))
      13:     {
      14:         connection.Open();
      15:         DataTable dt = connection.GetSchema(SqlClientMetaDataCollectionNames.Tables, restrictions);
      16:         foreach (DataRow row in dt.Rows)
      17:         {
      18:             if (!row[2].ToString().StartsWith("sys"))
      19:                 result.Add(string.Format(@"{0}", row[2]));
      20:         }
      21:     }
      22:     return result;
      23: }
    Column keys of the columns of the data table returned are:
    • Column 0. "table_catalog"
    • Column 1. "table_schema"
    • Column 2. "table_name"
    • Column 3. "table_type"

    How to enumerate columns of the given table

    The list of restriction parameters for column retrieval is shorter and it contains next 3 string values:

    1. Database name
    2. Owner/schema name
    3. Table name

    SqlConnection instance GetSchema method gets this time SqlClientMetaDataCollectionNames.Columns ("Columns") enumerated value and the resulting data table contains next 18 columns:

    Column 0 - "TABLE_CATALOG"
    Column 1 - "TABLE_SCHEMA"
    Column 2 - "TABLE_NAME"
    Column 3 - "COLUMN_NAME"
    Column 4 - "ORDINAL_POSTION"
    Column 5 - "COLUMN_DEFAULT"
    Column 6 - "IS_NULLABLE"
    Column 7 - "DATA_TYPE"
    Column 8 - "CHARACTER_MAXIMUM_LENGTH"
    Column 9 - "CHARACTER_OCTET_LENGTH"
    Column 10 - "NUMERIC_PRECISION"
    Column 11 - "NUMERIC_PRECISION_RADIX"
    Column 12 - "NUMERIC_SCALE"
    Column 13 - "DATETIME_PRECISION"
    Column 14 - "CHARACTER_SET_CATALOG"
    Column 15 - "CHARACTER_SET_SCHEMA"
    Column 16 - "CHARACTER_SET_NAME"
    Column 17 - "COLLATION_CATALOG"

    I believe column names are self explanatory and familiar to all of us, so I'll skip explanation of what they stand for

    In our little example we would return concatenated string containing the column name and data type, where data type in case of char data types would show maximal number  of characters and in case of decimal precision data.

    The code doing that might look like this:

       1: public static IList<string> GetColumns(
       2:        string serverName, string databaseName, string userId,
       3:        string password, bool windowsAuthentication, string tableName)
       4:    {
       5:        SqlConnection connection =
       6:            GetActiveConnection(serverName, databaseName, userId, 
       7:                                password, windowsAuthentication);
       8:  
       9:        string[] restrictions = new string[3];
      10:        restrictions[0] = connection.Database; // database/catalog name      
      11:        restrictions[1] = "dbo"; // owner/schema name      
      12:        restrictions[2] = tableName; // table name      
      13:        IList<string> result = new Collection<string>();
      14:        using (connection)
      15:        {
      16:            connection.Open();
      17:            DataTable columns = connection.GetSchema(SqlClientMetaDataCollectionNames.Columns, restrictions);
      18:            foreach (DataRow row in columns.Rows)
      19:            {
      20:                string columnName = row[3].ToString();
      21:                string columnDataType = row[7].ToString();
      22:                if (columnDataType.IndexOf("char") > -1)
      23:                {
      24:                    // row[8] - CHARACTER_MAXIMUM_LENGTH    
      25:                    columnDataType = string.Format("{0}({1})", columnDataType, row[8]);
      26:                }
      27:                if (columnDataType.IndexOf("decimal") > -1)
      28:                {
      29:                    // row[10] - CHARACTER_OCTET_LENGTH    
      30:                    // row[11] - NUMERIC_PRECISION    
      31:                    columnDataType = string.Format("{0}({1},{2})", columnDataType, row[10], row[11]);
      32:                }
      33:                result.Add(string.Format("{0},{1}", columnName, columnDataType));
      34:            }
      35:            return result;
      36:        }
      37:    }

    How to enumerate indexes of the table

    List of restrictions which can be used for indexes is the same as the one used for table, with 4 elements: database name, schema, table name and table type

    We are executing GetSchema method of SqlConnection instance with SqlClientMetaDataCollectionNames.IndexColumns ("IndexColumns") enumerated value sent as a parameter and the resulting data table contains next 9 columns

    • Column 0 - "constraint_catalog"
    • Column 1 - "constraint_schema"
    • Column 2 - "constraint_name"
    • Column 3 - "table_catalog"
    • Column 4 - "table_schema"
    • Column 5 - "table_name"
    • Column 6 - "column_name"
    • Column 7 - "ordinal_position"
    • Column 8 - "KeyType"
    • Column 8 - "index_name"

    Column 8 ("KeyType") describes the data type of the index and contains a numeric value which points to certain data type.

    There's a list:

    34 :  image
    35 :  text
    48 :  tinyint
    52 :  smallint
    56 :  int
    58 :  smalldatetime
    59 :  real
    60 :  money
    61 :  datetime
    62 :  float
    98 :  sql_variant
    99 :  ntext
    104 :  bit
    106 :  decimal
    108 :  numeric
    122 :  smallmoney
    127 : bigint
    165 :  varbinary
    167 :  varchar
    173 :  binary
    175 :  char
    189 :  timestamp
    231 :  nvarchar
    239 :  nchar

    So to enumerate indexes, one might write next code:

       1: public static IList<string> GetIndexes(SqlConnection connection, string tableName)
       2:       {
       3:           string[] restrictions = new string[3];
       4:           restrictions[0] = connection.Database; // database/catalog name      
       5:           restrictions[1] = "dbo"; // owner/schema name      
       6:           restrictions[2] = tableName; // table name      
       7:           IList<string> result = new Collection<string>();
       8:           using (connection)
       9:           {
      10:               connection.Open();
      11:               DataTable columns = connection.GetSchema(SqlClientMetaDataCollectionNames.IndexColumns, restrictions);
      12:               foreach (DataRow row in columns.Rows)
      13:               {
      14:                   string columnName = row["column_name"].ToString();
      15:                   string indexName = row["index_name"].ToString();
      16:                   bool isPrimaryKey = row["constarint_name"].ToString().StartsWith("PK");
      17:                   result.Add(string.Format("Index:{0}, on column:{1}, PK:{2}", indexName, columnName, isPrimaryKey));
      18:               }
      19:               return result;
      20:           }
      21:       }

    How to enumerate parameters of the stored procedure

    Enumeration of parameters used in a stored procedure is been done through usage of the SqlCommandBuilder static DeriveParameters method which accepts the SqlCommand instance constructed for a given sql connection and ctored procedure

    According to http://www.codeproject.com/useritems/DetermineSql2005SPParams.asp, there is a difference in how SQL 2000 and SQL 2005 and there's a need of handling that problem with some additional approach, but according to my personal experience that's not the case - I never had problems he described.
    So, IMHO to enumerate parameters of a stored procedure next simple code should be used regardless of the SQL version:

       1: public static SqlParameter[] DiscoverStoredProcedureParameters(SqlConnection sqlConnection,
       2:                                                                string storedProcedureName)
       3: {
       4:     SqlCommand cmd = new SqlCommand(storedProcedureName, sqlConnection);
       5:     cmd.CommandType = CommandType.StoredProcedure;
       6:     using (sqlConnection)
       7:     {
       8:         sqlConnection.Open();
       9:         SqlCommandBuilder.DeriveParameters(cmd);
      10:     }
      11:     SqlParameter[] discoveredParameters = new SqlParameter[cmd.Parameters.Count];
      12:     cmd.Parameters.CopyTo(discoveredParameters, 0);
      13:     return discoveredParameters;
      14: }

    Test drive

    Bellow you can find a source code of a small example which enumerates the databases (on left), tables of selected database (top right) and columns selected table (right down).

    image[5]


    Conclusion

    ADO NET 2.0 removes the need of using ADOX or SQLDMO components for the tasks covering examining the structure of the database objects. It is almost trivial (with a bit reading of documentation) to do the thing which were before not-so trivial. But...
    Although already very simple to use, I would like to see in future ADO NET 3.0 version  next enhancements:

    • Replacing the property bags as a way of passing arguments with DTOs as data carriers instead of string arrays. I guess that would have to be done in some new SQL connection related helper class to preserve compatibilty
    • For the same reasons I don't like property bags as a method parameter data carriers, I don't like the result data tables
      Having LINQ in place, I don't see the reason why we won't replace the returning DataTables with some more OOP friendly solution

    You can download source code of this example here




    Posted by tornado
    |

    몰랐네...

    속도도 괜찮고 쓸만하군.

    vss 버려야긋다~

    http://ankhsvn.tigris.org/servlets/ProjectDocumentList?folderID=7315

    사용자 삽입 이미지

    Posted by tornado
    |

    fn_ParseInt 손봐야함.. 소숫점 안됨.

    -------------------------------------------------------------------------------
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <HTML>
     <HEAD>
      <TITLE> New Document </TITLE>
      <META NAME="Generator" CONTENT="EditPlus">
      <META NAME="Author" CONTENT="">
      <META NAME="Keywords" CONTENT="">
      <META NAME="Description" CONTENT="">


      <script>
     var digitCheck = function(obj){
      if(!fn_ParseInt(obj.value)){
       alert("숫자만 입력하세요!!");
       var regEx = new RegExp('[^\\-\\+\\.\\d]','g');
       document.getElementById(obj.id).value = obj.value.replace(regEx, '');
      }
     }

     var fn_ParseInt = function(arg1){       
      if(fn_Trim(arg1).length == 0){
       return false;
      }

      var reg = /(^\d+$)|(^\d+\.\d+$)/;
          
      if(reg.test(arg1)){
       return true
      }else{
       return false;
      }
     }

     var fn_Trim = function(arg1) {
      return arg1.replace(/(^\s*)|(\s*$)/gi, "");
     }

      </script>
     </HEAD>

     <BODY>
      <form>
      <input type="text" id="digitTxt" onkeyup="digitCheck(this);" />
      <br />
      </form>

     </BODY>
    </HTML>

    Posted by tornado
    |