블로그 이미지
SQL Server VS. 석이 minsouk@hotmail.com MSSQL 쿼리성능 관련해 궁금한 사항이 있다면 언제나 누구나 TeamViewer + Line (네이버 japan 메신저) 에 minsouk1 추가 후 연락주세요~ 010-9967-0955 보미아빠

카테고리

보미아빠, 석이 (434)
밥벌이 (16)
싸이클 (1)
일상 (1)
Total188,858
Today32
Yesterday73

달력

« » 2017.09
          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 29 30

공지사항

'보미아빠, 석이'에 해당되는 글 434건

  1. 2017.08.24 vs shortcut
  2. 2017.07.06 cd 복사
  3. 2017.06.29 excel 암호풀기
  4. 2017.06.14 ssms 에러
  5. 2017.06.12 json
  6. 2017.06.12 Using Java Classes in your .NET Application
  7. 2017.06.05 powershell
  8. 2017.03.07 로그인 복사
  9. 2016.12.30 psexec
  10. 2016.12.19 ssdt

vs shortcut

분류없음 / 2017.08.24 22:29


<주석>-------------------------------------------------------------------
Ctrl+K, Ctrl+C 선택 영역 주석 처리 (.NET 2003, 2005)
Ctrl+K, Ctrl+U 선택 영역 주석 없앰 (.NET 2003, 2005) 
 

<
이동>
------------------------------------------------------------------------------

Ctrl + F2               현재 라인에 북마크 지정/해제

F2                       지정된 다음 북마크로 이동

Ctrl + Shift + F2      지정된 모든 북마크를 해제

Ctrl-K, Ctrl-H         바로가기 설정. ( 작업목록 창에서 확인가능 )

Ctrl-K,K                북마크 설정 / 해제

Ctrl-K,L                북마크 모두 해제

Ctrl-K,N                북마크 다음으로 이동

Ctrl-K,P                북마크 이전으로 이동

Ctrl-K,C                선택한 블럭을 전부 코멘트

Ctrl-K,U                선택한 블럭을 전부 언코멘트(코멘트 해제)

Ctrl + ] 또는 E        {괄호의 짝을 찾아줌

Ctrl + J, K              #ifdef  #endif의 짝을 찾아줌

Ctrl+ -, Ctrl+Shift+ -

현재 커서를 기억하는 Ctrl+F3(VS6에서), Ctrl+K,K(VS7에서와는 달리 사용자가 별도로 입력을 해주는건 없고단지 이전에 커서가 있었던곳으로 위 키를 누를 때마다 이동된다. (shift를 이용하면 역순)

 

Ctrl-F12                커서위치 내용의 선언(.h)으로 이동

F12                      커서위치 내용의 정의(.cpp)로 이동

Shift+Alt+F12         빠른기호찾기

 

Ctrl-Shift-G           #include "파일명파일로 바로 직접이동

F8                       After a build failure hit

Shift+F8            거꾸로

Ctrl + D                툴바의 찾기 Editbox로 이동 

 


<
편집>
------------------------------------------------------------------------------

Ctrl-F                   찾기 대화상자

Ctrl-H                  바꾸기 대화상자

Ctrl-Shift-F           파일들에서 찾기 대화상자

Ctrl-Shift-H           파일들에서 바꾸기 대화상자

Ctrl-G                  해당 줄로 가기 (별로 필요없음)

Ctrl-K,Ctrl-F          선택된 영역 자동 인덴트 (VS6 Alt-F8기능)

Ctrl-Shift-Spacebar             함수와매개변수설명이 안나올경우강제로 나오게

Ctrl+Alt+T

Ctrl+Spacebar       멤버목록 팝업창이 나타납니다

Ctrl+Shift+R           (키보드 레코딩)

             가끔 연속된 연속기만으로는 부족한경우가 있다.

             이때 Ctrl+Shift+R 을 누르고원하는 동작들을 수행후,

다시 Ctrl+Shift+R을 눌러 종료한다. 

이 중간동작을 원하는 위치에서 반복하고 싶다면

             Ctrl+Shift+P 를 누른다.

 

Ctrl+Shift+V           (히스토리 붙이기)

Ctrl-Z                  이전으로 되돌리기

Ctrl-Shift-Z           되돌렸다다시 복구하기

Ctrl + I                  문자열 입력점진적으로 문자열 찾기

Ctrl + F3               현재 커서에 있는 문자열 찾기

Ctrl+Shift+F3          거꾸로 찾기

F3                       찾은 문자열에 대한 다음 문자열 (Next Search)

Ctrl + H                 문자열 찾아 바꾸기 (Replace)

Ctrl + Left/Right     단어 단위로 이동

Ctrl+[Delete|Backspace] 단어 단위로 삭제

Ctrl + L                 한 라인을 클립보드로 잘라내기

Ctrl + Shift + L       한 라인을 삭제

Alt + Mouse          세로로 블록 설정하기 (마우스로)

Ctrl + Shift + F8      세로로 블록 설정하기 (키보드로),

취소할 때는 Esc키를 눌러야 함

블록설정>>Tab       선택된 블록의 문자열을 일괄적으로 들여쓰기(Tab)

블록설정>>Shift + Tab선택된 블록의 문자열을 일괄적으로 내어쓰기

Alt+F8>> [Tab|Shift + Tab]

                          들여쓰기 자동 조정

Ctrl + T                 현재 커서에 있는 변수/함수에 대한 Type

Tooltip 힌트 창에 나타남

Ctrl + Alt + T          멤버 변수/함수 목록에 대한 팝업 창이 나타남

Ctrl + Shift + T       공백/콤마/파이프/괄호 등을 기준으로

좌우 문자열을 Swap시킴

Ctrl + Shift + 8       문단기호 표시/감추기 :

Tab ^, Space .으로 표시

Ctrl + D                 툴바의 찾기 Editbox로 이동

Ctrl + Up/Down      커서는 고정시키고 화면만 스크롤 시키기

CTRL+SHIFT+T       커서 위치의 단어와 앞 단어가 서로 교체

ALT+SHIFT+T         커서 위치의 한줄과 윗줄이 서로 교환

Ctrl + Shift + U       소문자가 대문자로 둔갑.

Ctrl + U                 대문자를 소문자로 변경

Ctrl + Shift + F8      블럭설정

Ctrl + C, C                          That copies the current line.

Ctrl+K, Ctrl+C                      Automatically commented.

Ctrl+K, Ctrl+U                      Uncommented.

 


<
디버그/빌드>
-----------------------------------------------------------------------

F5                       디버그 시작

F9                       디버그 브렉포인트 지정/해제

Ctrl-F9                 현위치 설정된 브렉포인트 해제

Ctrl-Shift-F9         현재 소스파일에 지정된 모든 Breakpoint 해제

Shift-F5               디버그 빠져나오기

Ctrl-F10                커서가 있는곳까지 실행

Shift-F11                           현 함수를 빠져나감.

 

Shift+Ctrl+B           전체 빌드(프로젝트가 여러개있을경우 모두 빌드)

Alt+B, C                해당 프로젝트만 정리.

Alt+B, U                해당 프로젝트만 빌드.

Ctrl-F7                 현 파일만 컴파일    현 프로젝트만 빌드

Ctrl-F5                 프로그램 시작

Shift + F9                           디버그 모드에서 추가하고픈 변수나 등등

앞에 커서를 위치 시킨후 Shift+F9를 누르면

Watch Window에 자동으로 추가.

 


<
창관련>
----------------------------------------------------------------------------
Shift+Alt+Enter       전체 창 (토글 됨)

F4                       속성창 보여준다.

Ctrl+Alt+X                           리소스에디터 툴박스창

Ctrl+Alt+K              작업목록 창.

Ctrl + Tab                           Edit하고 있는 Child Window 간의 이동

Ctrl + F4               현재 Edit하고 있는 Child Window를 닫기

Ctrl-M, Ctrl-L         소스파일의 함수헤더만 보이기 (구현부는 감추고)

Ctrl-M, Ctrl-M        현재 커서가 위치한 함수를 접는다/편다. (토글 키)

Ctrl+R, Ctrl+R         Word Wrap

Ctrl+M+L               편집.전체개요표시숨기기

 

Ctrl+M+H           편집.선택영역숨기기

Ctrl+M+U           편집.현재숨기기중지

 

Alt + F7                Project Setting



저작자 표시 비영리 변경 금지
신고
Posted by 보미아빠

cd 복사

분류없음 / 2017.07.06 00:38

imgBurn

DVDFabPasskey 8


cd2mp3 : CDex


저작자 표시 비영리 변경 금지
신고
Posted by 보미아빠

excel 암호풀기

분류없음 / 2017.06.29 17:38

http://m.blog.naver.com/sindong14/220408019666

헐~ 이렇게 쉬울수가....2016까지 다 풀립니다. (테스트 완료)

저작자 표시 비영리 변경 금지
신고
Posted by 보미아빠

ssms 에러

분류없음 / 2017.06.14 14:05

https://connect.microsoft.com/VisualStudio/feedback/details/1171345/exception-when-opening-editor

 

del %temp%

 

저작자 표시 비영리 변경 금지
신고
Posted by 보미아빠

json

분류없음 / 2017.06.12 13:41

http://devluna.blogspot.kr/2016/05/newtonsoftjson-c-net-json-parsing.html

http://www.csharpstudy.com/Data/Json-jsonnet.aspx

저작자 표시 비영리 변경 금지
신고
Posted by 보미아빠

 

https://www.codeproject.com/Articles/13549/Using-Java-Classes-in-your-NET-Application

 

 

IKVM.NET is an open source implementation of Java for Mono /Microsoft .NET Framework and makes it possible both to develop .NET applications in Java, and to use existing Java APIs and libraries in applications written in any .NET language.
Is your email address OK? You are signed up for our newsletters but your email address is either unconfirmed, or has not been reconfirmed in a long time. Please click here to have a confirmation email sent so we can confirm your email address and start sending you newsletters again. Alternatively, you can update your subscriptions.

Introduction

Suppose you have been asked to migrate an existing multi-tier application to .NET where the business layer is written in Java. Normally you would have no option but to recode and port the entire application to any .NET language (e.g. C#).  However this is where IKVM.NET comes to the rescue.

IKVM.NET is an open source implementation of Java for Mono /Microsoft .NET Framework and makes it possible both to develop .NET applications in Java, and to use existing Java API's and libraries in applications written in any .NET language. It is written in C# and the executables, documentation and source code can be downloaded from here.

IKVM.NET consists of the following three main parts:

  1. A Java Virtual Machine implemented in .NET
  2. A .NET implementation of the Java class libraries
  3. Tools that enable Java and .NET interoperability

However before we get any further into this topic, let’s discuss about few of the main components of the IKVM.NET package which we would be using later in this article.

  • IKVM.Runtime.dll: The VM runtime and all supporting code containing the byte code JIT compiler/verifier, object model remapping infrastructure and the managed .NET re-implementations of the native methods in Classpath. 
  • IKVM.GNU.Classpath.dll: Compiled version of GNU Classpath, the Free Software Foundation's implementation of the Java class libraries, plus some additional IKVM.NET specific code. 
  • ikvm.exe: Starter executable, comparable to java.exe ("dynamic mode").
  • ikvmc.exe: Static compiler. Used to compile Java classes and jars into a .NET assembly ("static mode").

Now back to our problem of migrating the existing Java business classes so that they can be accessed by the newly proposed .NET application. We would also like to use the various existing Java API and libraries in our .NET application.  Let’s start by doing just that.

Setting Up IKVM.NET

Download the binary distribution from the sourceforge site and unzip the contents to C:\ikvm (or X:\ikvm where X is your drive). You would find the ikvm executables and DLLs in the C:\ikvm\bin directory.  Open a command or shell window, cd to C:\ikvm\bin, and type ‘ikvm’.

If your system is operating correctly, you should see the following output:

usage: ikvm [-options] <class> [args...] (to execute a class) or ikvm -jar [-options] <jarfile> [args...] (to execute a jar file)

For Linux based systems, the setup is similar as above. This is all you need to do for running the demo application.

Our Demo Java Business Class (JavaToNet.java)

public class JavaToNet 
{
    public static void main(String[] args) 
    {
        System.out.println("This is a demonstration Program which\n");
        System.out.println("shows the conversion of Java class to\n");
        System.out.println("a .NET dll\n");
    }
    public  static double AddNumbers(double a,double b){
    double c = 0;
    c = a + b;
    return c;    
    }
    public  static double SubNumbers(double a,double b){
        double c = 0;
        c = a - b;
        return c;    
        }
    public  static double MulNumbers(double a,double b){
        double c = 0;
        c = a * b;
        return c;    
        }
    public  static double DivNumbers(double a,double b){
        double c = 0;
        c = a / b;
        return c;    
        }
}

Our Java class is very simple. It has four functions for add, subtract, multiply and divide that take two double values and return a result. Our objective is to access these functions through our C# application. Compile the above Java file to get the JavaToNet.class. We will use this Java class file to generate the .NET DLL to be referenced in our C# program.

Using IKVM.NET to Convert Java Class to .NET DLL

Copy the above Java class file (JavaToNet.class) to the C:\ikvm\bin directory. Now run the following command:

This would create the JavaToNet.dll from the JavaToNet.class file. There are other command line option for ikvmc.exe. For example: ‘ikvmc –target:exe javaToNet.class’ would create an EXE and not a DLL. You can get all the options by typing ‘ikvmc’ in the command line.

Setting Up Your .NET Development Environment

  1. Start by creating a C# Windows application project. 

  2. Drag and drop controls into the form as shown:

  3. Add the following DLLs as references to the project. Both DLLs are present in the C:\ikvm\bin folder.

    • JavaToNet.dll
    • IKVM.GNU.Classpath.dll
  4. Add the following code to the button click event of the ‘Calculate’ button:

    private void btnCal_Click(object sender, System.EventArgs e)
    {
    if (rdAdd.Checked == true)
        {
        txtResult.Text = Convert.ToString(JavaToNet.AddNumbers
    	(Convert.ToDouble(txtNum1.Text),Convert.ToDouble(txtNum2.Text)));
        }else if (rdSub.Checked ==true)
        {
        txtResult.Text = Convert.ToString(JavaToNet.SubNumbers
    	(Convert.ToDouble(txtNum1.Text),Convert.ToDouble(txtNum2.Text)));                
        }
        else if (rdMul.Checked == true)
        {
        txtResult.Text = Convert.ToString(JavaToNet.MulNumbers
    	(Convert.ToDouble(txtNum1.Text),Convert.ToDouble(txtNum2.Text)));                
        }
        else
        {
        txtResult.Text = Convert.ToString(JavaToNet.DivNumbers
    	(Convert.ToDouble(txtNum1.Text),Convert.ToDouble(txtNum2.Text)));            
        }
    }
  5. Add the following using directive on the top of the *.cs file:

    using TimeZone = java.util.TimeZone;
  6. Add the following code to the button click event of the ‘Time Zone’ button.

    private void btnTimeZone_Click(object sender, System.EventArgs e)
    {
    MessageBox.Show(TimeZone.getDefault().getDisplayName());
    }
  7. Compile and run the application. The C# application would now call the AddNumbers(), SubNumbers(), MulNumbers() and DivNumbers() functions present in the JavaToNet.dll and return the result.

  8. Click on the ‘Time Zone’ button. The application accesses the java.util.TimeZone class and displays the exact time zone of the place.

Conclusion

Since these methods had originally been written in Java, IKVM.NET provides us an easy and viable way to access those classes and methods from a .NET application. Similarly as shown above in the ‘Time Zone’ example, you can access most of the existing Java packages (e.g. java.io, java.util, etc.) and use them in your application.

However there are certain drawbacks. IKVM.NET, while still being actively developed, has limited support for AWT classes and hence porting Java GUI can be ruled out at present. Also some of the default Java classes are still being ported so you might not get all the functionalities you require. Also if your application depends on the exact Java class loading semantics, you might have to modify it to suit your needs.

History

  • 03-25-06 Initial publication

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

저작자 표시 비영리 변경 금지
신고
Posted by 보미아빠

powershell

분류없음 / 2017.06.05 11:17

remote command 활성화

https://technet.microsoft.com/en-us/library/ff700227.aspx

 

 

 

get-service winrm

Start-Service winrm

get-service winrm

winrm s winrm/config/client '@{TrustedHosts="WIN-6S4NEPKTVUI"}'

winrm quickconfig

 

파일 /  새 원격 PowerShell 탭

인증 ...

 

 

 

PowerShell 책

http://www.reedbushey.com/86Windows%20Powershell%20Cookbook%203rd%20Edition.pdf

 

 

C# 으로 powershell 불러쓰기

https://blogs.msdn.microsoft.com/kebab/2014/04/28/executing-powershell-scripts-from-c/

 

 

 

sql parameter

http://sql-articles.com/articles/general/enable-disable-trace-flags-in-sql-server/

 

 

 

기본 쿼리

https://msdn.microsoft.com/ko-kr/powershell/scripting/getting-started/cookbooks/working-with-registry-entries

 

 

sql parameter 쿼리하기

[mon]: PS C:\Users\db\Documents> Get-ItemProperty -Path Registry::"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQLServer\Parameters"

 

파일 읽어서 반환하기

 

등등

 

 using (PowerShell PowerShellInstance = PowerShell.Create())
                {

                    string cmd = @"Get-Item -Path Registry::\'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server'";
                    PowerShellInstance.AddScript(cmd);
                    Console.WriteLine(cmd);

                    Collection<PSObject> PSOutput = PowerShellInstance.Invoke();
                    foreach (PSObject outputItem in PSOutput)
                    {
                        // if null object was dumped to the pipeline during the script then a null
                        // object may be present here. check for null to prevent potential NRE.
                        if (outputItem != null)
                        {
                            if (PowerShellInstance.Streams.Error.Count > 0)
                            {
                                Console.WriteLine("Error");
                            }
                            else
                            {
                                Console.WriteLine(outputItem.BaseObject.GetType().FullName);
                                Console.WriteLine(outputItem.BaseObject.ToString() + "\n");

                                if (outputItem.BaseObject is RegistryKey)
                                {
                                    RegistryKey rk = outputItem.BaseObject as RegistryKey;
                                    string[] valueNames = rk.GetValueNames();
                                    foreach (string s in valueNames)
                                    {
                                        RegistryValueKind rvk = rk.GetValueKind(s);
                                        switch (rvk)
                                        {
                                            case RegistryValueKind.MultiString:
                                                string[] values = (string[])rk.GetValue(s);
                                                Console.Write("\r\n {0} ({1}) =", s, rvk);
                                                for (int i = 0; i < values.Length; i++)
                                                {
                                                    if (i != 0) Console.Write(",");
                                                    Console.Write(" \"{0}\"", values[i]);
                                                }
                                                Console.WriteLine();
                                                break;

                                            case RegistryValueKind.Binary:
                                                byte[] bytes = (byte[])rk.GetValue(s);
                                                Console.Write("\r\n {0} ({1}) =", s, rvk);
                                                for (int i = 0; i < bytes.Length; i++)
                                                {
                                                    // Display each byte as two hexadecimal digits.
                                                    Console.Write(" {0:X2}", bytes[i]);
                                                }
                                                Console.WriteLine();
                                                break;

                                            default:
                                                Console.WriteLine("\r\n {0} ({1}) = {2}", s, rvk, rk.GetValue(s));
                                                break;
                                        }
                                    }
                                }

 

                            }
                        }
                       

                    }
                }
 

저작자 표시 비영리 변경 금지
신고
Posted by 보미아빠

로그인 복사

분류없음 / 2017.03.07 15:40

https://support.microsoft.com/en-us/help/918992/how-to-transfer-logins-and-passwords-between-instances-of-sql-server

저작자 표시 비영리 변경 금지
신고
Posted by 보미아빠

psexec

분류없음 / 2016.12.30 13:56

psexec \\ip cmd

net localgroup "Event Log Readers" yourusername /add

exit



저작자 표시 비영리 변경 금지
신고
Posted by 보미아빠

ssdt

분류없음 / 2016.12.19 14:16

https://msdn.microsoft.com/en-us/library/mt204009.aspx

http://www.techrepublic.com/blog/data-center/auto-deploy-and-version-your-sql-server-database-with-ssdt/

저작자 표시 비영리 변경 금지
신고
Posted by 보미아빠

최근에 달린 댓글

최근에 받은 트랙백

글 보관함