1. 프로세스 리스트 확인 : tasklist
1) 설명 : 프로세스 리스트를 보여준다
2) 입력 구조 : TASKLIST [/S 시스템 [/U 사용자 이름 [/P [암호]]]] [/M [모듈] | /SVC | /V] [/FI 필터] [/FO 형식] [/NH]
3) 기본 구성 : 프로세스 명, pid, 세션명 등을 보여준다

2. 프로세스 kill : taskkill
설명 : 개발을 진행하거나 하다보면 여기저기 튀어나오는 좀비들때문에 여간 귀찮은것이 아니다.
          그럴때 프로세스를 죽일수 있는 명령어가 taskkill 이다
2) 기본 구성 : TASKKILL[/S시스템[/U사용자이름[/P[암호]]]] { [/FI 필터] [/PID 프로세스 id | /IM 이미지 이름] } [/T] [/F]
3) 주요 옵션
a. /PID 프로세스 ID : 특정 프로세스ID의 프로세스 종료하기
    예시 : taskkill /PID 21500 -> 21500 PID를 가지는 프로세스 종료해라
b. /IM 프로세스명 : 특정 이름을 가지는 프로세스 종료(와일드카드(*) 사용가능)
    예시 : taskkill /IM java* -> java로 시작하는 이름을 가진 프로세스 종료해라
c. /T : 지정된 프로세스와 그 자식 프로세스 까지 종료
예시 : taskkill /T /PID 21303 -> PID가 21303인 프로세스와 그 자식 프로세스 까지 종료

3. WMIC 명령어를 통한 부모 프로세스 찾기

wmic를 통해 보고싶은것만 찾아보자
   -> wmic process where 항목="항목값" get 파라미터1, 파라미터2, 파라미터3
   -> 프로세스 항목의 값이 "항목값인" 프로세스의 파라미터1, 파라미터2, 파라미터3 정보를 표시해준다.
예시) wmic process where name="chrome.exe" get processid, parentprocessid, commandline
       -> 프로세스명이 chrome.exe인 프로세스의 pid, ppid, commandline을 볼수 있다.

 


C:\Users>tasklist

이미지 이름                    PID 세션 이름              세션#  메모리 사용
========================= ======== ================ =========== ============
System Idle Process              0 Services                   0          8 K
System                           4 Services                   0      1,164 K
Secure System                   56 Services                   0     22,768 K
Registry                       112 Services                   0     23,268 K
smss.exe                       396 Services                   0        956 K
csrss.exe                      568 Services                   0      3,892 K
wininit.exe                    668 Services                   0      4,140 K
services.exe                   892 Services                   0      7,948 K
LsaIso.exe                     900 Services                   0      3,484 K
lsass.exe                      920 Services                   0     12,788 K
svchost.exe                    356 Services                   0     18,748 K
fontdrvhost.exe                520 Services                   0      2,028 K
svchost.exe                    980 Services                   0     12,752 K
svchost.exe                   1068 Services                   0      6,900 K
svchost.exe                   1228 Services                   0      7,408 K
svchost.exe                   1240 Services                   0      6,648 K
svchost.exe                   1288 Services                   0      3,824 K
svchost.exe                   1404 Services                   0      5,512 K
svchost.exe                   1412 Services                   0      6,232 K
svchost.exe                   1476 Services                   0     14,064 K
svchost.exe                   1508 Services                   0     10,360 K
svchost.exe                   1568 Services                   0      4,260 K
svchost.exe                   1596 Services                   0      6,448 K
svchost.exe                   1604 Services                   0      5,120 K
svchost.exe                   1652 Services                   0      5,432 K
svchost.exe                   1704 Services                   0      4,872 K
svchost.exe                   1736 Services                   0      6,824 K
svchost.exe                   1916 Services                   0      7,768 K
WUDFHost.exe                  1940 Services                   0      4,496 K
svchost.exe                   2000 Services                   0      6,024 K
svchost.exe                   2008 Services                   0      4,196 K
svchost.exe                   2016 Services                   0      6,968 K
svchost.exe                   2112 Services                   0      7,512 K
svchost.exe                   2140 Services                   0      4,760 K
Memory Compression            2148 Services                   0    209,304 K
igfxCUIService.exe            2188 Services                   0      4,996 K
svchost.exe                   2196 Services                   0      4,376 K
svchost.exe                   2256 Services                   0      4,352 K
svchost.exe                   2272 Services                   0      4,140 K
svchost.exe                   2344 Services                   0      4,816 K
svchost.exe                   2464 Services                   0      4,568 K
svchost.exe                   2536 Services                   0      5,204 K
svchost.exe                   2564 Services                   0      5,280 K
svchost.exe                   2576 Services                   0      5,456 K
svchost.exe                   2708 Services                   0      6,068 K
svchost.exe                   2780 Services                   0      4,116 K
svchost.exe                   2864 Services                   0     11,904 K
svchost.exe                   2912 Services                   0      5,008 K
svchost.exe                   3016 Services                   0      4,668 K
svchost.exe                   3024 Services                   0      5,256 K
svchost.exe                   2948 Services                   0      4,376 K
svchost.exe                   3176 Services                   0      4,328 K
svchost.exe                   3212 Services                   0      8,216 K
svchost.exe                   3252 Services                   0      6,152 K
spoolsv.exe                   3340 Services                   0      5,708 K
svchost.exe                   3380 Services                   0      3,972 K
svchost.exe                   3476 Services                   0     14,992 K
svchost.exe                   3484 Services                   0      5,884 K
svchost.exe                   3492 Services                   0     20,832 K
eausvc.exe                    3500 Services                   0      1,720 K
ObCrossEXService.exe          3508 Services                   0      2,380 K
AnySign4PCLauncher.exe        3520 Services                   0      9,612 K
IniClientSvc_x64.exe          3532 Services                   0      5,548 K
kpmsvc.exe                    3544 Services                   0      1,736 K
macourtsafersvc.exe           3576 Services                   0      2,468 K
svchost.exe                   3600 Services                   0     23,728 K
svchost.exe                   3676 Services                   0      6,176 K
nossvc.exe                    3684 Services                   0      1,384 K
runSW.exe                     3704 Services                   0      2,860 K
ASDSvc.exe                    3720 Services                   0     11,492 K
svchost.exe                   3728 Services                   0      4,060 K
svchost.exe                   3740 Services                   0      4,516 K
TENXW_SVR.exe                 3804 Services                   0      4,160 K
MsMpEng.exe                   3868 Services                   0    218,900 K
svchost.exe                   3892 Services                   0      3,912 K
svchost.exe                   3916 Services                   0      8,240 K
wpmsvc.exe                    3936 Services                   0      6,412 K
svchost.exe                   3996 Services                   0      5,548 K
svchost.exe                   4104 Services                   0      3,916 K
svchost.exe                   4352 Services                   0      4,048 K
svchost.exe                   4480 Services                   0      6,004 K
wlanext.exe                   4612 Services                   0      4,608 K
conhost.exe                   4632 Services                   0      3,328 K
NisSrv.exe                    5512 Services                   0      6,948 K
svchost.exe                   5876 Services                   0     13,572 K
PresentationFontCache.exe     6736 Services                   0      4,220 K
svchost.exe                   6852 Services                   0     12,852 K
svchost.exe                   7044 Services                   0      4,600 K
svchost.exe                   7088 Services                   0      6,744 K
svchost.exe                   7428 Services                   0      4,784 K
svchost.exe                   7632 Services                   0      8,096 K
svchost.exe                   7960 Services                   0      5,472 K
svchost.exe                   9388 Services                   0     10,012 K
svchost.exe                   9544 Services                   0     28,188 K
SearchIndexer.exe             9860 Services                   0     20,920 K
svchost.exe                   1332 Services                   0      8,232 K
svchost.exe                   3412 Services                   0      8,052 K
GoogleCrashHandler.exe       11268 Services                   0        752 K
GoogleCrashHandler64.exe     11276 Services                   0        632 K
svchost.exe                  12040 Services                   0      8,956 K
svchost.exe                  12212 Services                   0      6,048 K
SecurityHealthService.exe    12096 Services                   0     12,520 K
svchost.exe                   9812 Services                   0      5,148 K
SgrmBroker.exe                8676 Services                   0      7,504 K
svchost.exe                  11304 Services                   0      8,516 K
svchost.exe                   7844 Services                   0      4,596 K
csrss.exe                     3140 Console                    2      4,260 K
winlogon.exe                 14184 Console                    2      5,940 K
fontdrvhost.exe              12684 Console                    2      4,444 K
dwm.exe                      13324 Console                    2     42,940 K
MoUsoCoreWorker.exe           3908 Services                   0     18,648 K
TEWebP.exe                    9676 Console                    2      4,740 K
TEWebP64.exe                  9712 Console                    2      6,660 K
svchost.exe                   9120 Services                   0      7,272 K
svchost.exe                   4620 Services                   0      4,216 K
SwUSB.exe                    12296 Console                    2      5,272 K
AnySign4PC.exe               12552 Console                    2      8,784 K
kpmcnt.exe                    8272 Console                    2      2,756 K
sihost.exe                    6000 Console                    2     18,520 K
svchost.exe                   4492 Console                    2     16,296 K
svchost.exe                   9336 Console                    2     17,144 K
taskhostw.exe                13520 Console                    2      9,328 K
igfxEM.exe                    4316 Console                    2      8,168 K
igfxHK.exe                    7564 Console                    2      6,936 K
igfxTray.exe                  2632 Console                    2      7,988 K
INISAFEAdminUtil.exe         10336 Console                    2      2,488 K
ctfmon.exe                   10724 Console                    2      9,280 K
explorer.exe                 10788 Console                    2     70,700 K
nosstarter.npe                6708 Console                    2     11,500 K
svchost.exe                   8216 Console                    2      8,980 K
macourtsafer.exe             12112 Console                    2      2,540 K
CrossEXService.exe           10852 Console                    2      2,708 K
msedge.exe                    5048 Console                    2     99,368 K
msedge.exe                   13576 Console                    2      5,352 K
TEWeb.exe                    13432 Console                    2      3,868 K
msedge.exe                   10044 Console                    2    118,148 K
msedge.exe                   13420 Console                    2     25,536 K
msedge.exe                   11516 Console                    2      6,620 K
TEWeb64.exe                  11128 Console                    2      6,820 K
delfino.exe                  11952 Console                    2      6,644 K
INISAFECrossWebEXSvc.exe     10216 Console                    2      7,412 K
veraport-x64.exe             13136 Console                    2      8,596 K
StartMenuExperienceHost.e    12808 Console                    2     25,048 K
StSess.exe                   13888 Console                    2      7,072 K
RuntimeBroker.exe            10136 Console                    2      9,900 K
SearchApp.exe                 6424 Console                    2    118,648 K
RuntimeBroker.exe            11444 Console                    2      9,624 K
SkypeBackgroundHost.exe      14464 Console                    2      5,184 K
SkypeApp.exe                 14496 Console                    2     95,716 K
LockApp.exe                  14644 Console                    2      7,148 K
RuntimeBroker.exe            14808 Console                    2      9,008 K
StSess32.exe                 15156 Console                    2      2,788 K
RuntimeBroker.exe            11080 Console                    2      7,264 K
RuntimeBroker.exe            15432 Console                    2      8,796 K
SecurityHealthSystray.exe    15560 Console                    2      6,976 K
OneDrive.exe                 16048 Console                    2     21,184 K
ShellExperienceHost.exe      16260 Console                    2     23,260 K
jusched.exe                  16348 Console                    2      3,396 K
RuntimeBroker.exe            16288 Console                    2      9,236 K
SkypeBridge.exe              16672 Console                    2     22,336 K
TextInputHost.exe            17316 Console                    2     12,560 K
dllhost.exe                   8900 Console                    2      6,124 K
KakaoTalk.exe                16528 Console                    2    116,472 K
msedge.exe                   16804 Console                    2    180,808 K
dllhost.exe                  17128 Console                    2      5,492 K
svchost.exe                   9400 Console                    2      6,012 K
svchost.exe                  11156 Services                   0      6,232 K
ApplicationFrameHost.exe      3572 Console                    2      8,028 K
jucheck.exe                  14308 Console                    2      4,544 K
UserOOBEBroker.exe           12860 Console                    2      7,132 K
msedge.exe                   15580 Console                    2    154,940 K
msedge.exe                   16304 Console                    2     61,860 K
msedge.exe                    9504 Console                    2     11,652 K
chrome.exe                   15596 Console                    2     86,588 K
chrome.exe                    9084 Console                    2      5,744 K
chrome.exe                    9296 Console                    2     67,316 K
chrome.exe                    1744 Console                    2     17,320 K
chrome.exe                    9220 Console                    2      7,936 K
chrome.exe                   10392 Console                    2     48,676 K
chrome.exe                   12024 Console                    2     12,752 K
cmd.exe                       9592 Console                    2      3,928 K
conhost.exe                  15308 Console                    2     19,360 K
svchost.exe                  12504 Services                   0     10,836 K
svchost.exe                  16032 Services                   0      7,472 K
Microsoft.Photos.exe         15568 Console                    2     15,896 K
svchost.exe                  17512 Services                   0      8,492 K
svchost.exe                  18828 Services                   0      6,504 K
RuntimeBroker.exe            18480 Console                    2     14,728 K
VSSVC.exe                     9000 Services                   0      9,968 K
svchost.exe                  17696 Services                   0      9,140 K
WmiPrvSE.exe                 18916 Services                   0      9,452 K
svchost.exe                   6240 Services                   0     12,596 K
backgroundTaskHost.exe       17640 Console                    2     27,112 K
RuntimeBroker.exe            18476 Console                    2     21,824 K
TrustedInstaller.exe         11364 Services                   0      7,856 K
svchost.exe                  10780 Services                   0      7,772 K
svchost.exe                  18036 Services                   0      8,288 K
smartscreen.exe               7556 Console                    2      9,196 K
svchost.exe                   8056 Services                   0      8,248 K
tasklist.exe                  2824 Console                    2      9,528 K
WmiPrvSE.exe                  6368 Services                   0      9,972 K

C:\Users>
C:\Users>wmic process where name="svchost.exe" get processid, parentprocessid, commandline
CommandLine                                                            ParentProcessId  ProcessId
                                                                       892              356
                                                                       892              980
                                                                       892              1068
                                                                       892              1228
                                                                       892              1240
                                                                       892              1288
                                                                       892              1404
                                                                       892              1412
                                                                       892              1476
                                                                       892              1508
                                                                       892              1568
                                                                       892              1596
                                                                       892              1604
                                                                       892              1652
                                                                       892              1704
                                                                       892              1736
                                                                       892              1916
                                                                       892              2000
                                                                       892              2008
                                                                       892              2016
                                                                       892              2112
                                                                       892              2140
                                                                       892              2196
                                                                       892              2256
                                                                       892              2272
                                                                       892              2344
                                                                       892              2464
                                                                       892              2536
                                                                       892              2564
                                                                       892              2576
                                                                       892              2708
                                                                       892              2780
                                                                       892              2864
                                                                       892              2912
                                                                       892              3016
                                                                       892              3024
                                                                       892              2948
                                                                       892              3176
                                                                       892              3212
                                                                       892              3252
                                                                       892              3380
                                                                       892              3476
                                                                       892              3484
                                                                       892              3492
                                                                       892              3600
                                                                       892              3676
                                                                       892              3728
                                                                       892              3740
                                                                       892              3892
                                                                       892              3916
                                                                       892              3996
                                                                       892              4104
                                                                       892              4352
                                                                       892              4480
                                                                       892              5876
                                                                       892              6852
                                                                       892              7044
                                                                       892              7088
                                                                       892              7428
                                                                       892              7632
                                                                       892              7960
                                                                       892              9388
                                                                       892              9544
                                                                       892              1332
                                                                       892              3412
                                                                       892              12040
                                                                       892              12212
                                                                       892              9812
                                                                       892              11304
                                                                       892              7844
                                                                       892              9120
                                                                       892              4620
C:\Windows\system32\svchost.exe -k UnistackSvcGroup -s CDPUserSvc      892              4492
C:\Windows\system32\svchost.exe -k UnistackSvcGroup -s WpnUserService  892              9336
C:\Windows\system32\svchost.exe -k ClipboardSvcGroup -p -s cbdhsvc     892              8216
C:\Windows\system32\svchost.exe -k UnistackSvcGroup                    892              9400
                                                                       892              11156
                                                                       892              12504
                                                                       892              16032
                                                                       892              17512
                                                                       892              18828
                                                                       892              17696
                                                                       892              6240
                                                                       892              10780
                                                                       892              18036


C:\Users>
C:\Users>tasklist

이미지 이름                    PID 세션 이름              세션#  메모리 사용
========================= ======== ================ =========== ============
System Idle Process              0 Services                   0          8 K
services.exe                   892 Services                   0      7,948 K
wininit.exe                    668 Services                   0      4,140 K


wmic process where name="services.exe" get processid, parentprocessid, commandline
C:\Users>wmic process where name="services.exe" get processid, parentprocessid, commandline
CommandLine  ParentProcessId  ProcessId
             668              892

wmic process where name="wininit.exe" get processid, parentprocessid, commandline
C:\Users>wmic process where name="wininit.exe" get processid, parentprocessid, commandline
CommandLine  ParentProcessId  ProcessId
             552              668

C:\Users>

C:\Users>wmic process where name="System Idle Process" get processid, parentprocessid, commandline
CommandLine  ParentProcessId  ProcessId
             0                0


C:\Users>



taskkill /T /PID 21303 -> PID가 21303인 프로세스와 그 자식 프로세스 까지 종료

taskkill /T /PID 0
C:\Windows\system32>taskkill /T /PID 0
오류: PID 56인 프로세스(PID 4인 자식 프로세스)를 종료할 수 없습니다.
원인: 액세스가 거부되었습니다.
오류: PID 112인 프로세스(PID 4인 자식 프로세스)를 종료할 수 없습니다.
원인: 액세스가 거부되었습니다.
오류: PID 396인 프로세스(PID 4인 자식 프로세스)를 종료할 수 없습니다.
원인: 이 프로세스는 중대한 시스템 프로세스입니다. Taskkill에서 이 프로세스를 종료할 수 없습니다.
오류: PID 2148인 프로세스(PID 4인 자식 프로세스)를 종료할 수 없습니다.
원인: 액세스가 거부되었습니다.
오류: PID 4인 프로세스(PID 0인 자식 프로세스)를 종료할 수 없습니다.
원인: 이 프로세스의 자식 프로세스가 하나 이상 실행되고 있습니다.
오류: PID 0인 프로세스(PID 0인 자식 프로세스)를 종료할 수 없습니다.
원인: 이 프로세스의 자식 프로세스가 하나 이상 실행되고 있습니다.

C:\Windows\system32>


# SetWindowLong 함수란 무엇인가,mmmm
# SetWindowLong 함수란 무엇인가,mmmm

 


SetWindowLong 
LONG WINAPI SetWindowLong(
_In_HWND hWnd,
_In_int nIndex,
_In_LONG dwNewLong
);

지정된 윈도우의 속성을 변경합니다. 이 함수로 지정된 기능을 32bit 값으로 메모리에 추가합니다.
이 함수는 SetWindowLongPtr 함수로 대체 되었습니다.32bit, 64bit와 호환됩니다. 사용법은 같습니다.
이 함수는 SetWindowPos함수를 호출할때까지 적용되지 않습니다.

hWnd
변경을 원하는 윈도우의 핸들

nIndex
어느 설정을 변경 할 것인지 정해진 상수로 넣어줍니다.
GWL_STYLE - 새로운 윈도우 스타일을 설정합니다.
GWL_EXSTYLE - 새로운 확장 윈도우 스타일을 설정합니다.
GWL_HINSTANCE - 새 응용 프로그램 인스턴스 핸들을 설정합니다.
GWL_ID - 하위 윈도우의 새 식별자를 설정합니다. 창은 최상위 창이 될수없습니다.
GWL_USERDATA - 창과 관련된 사용자 데이터를 설정합니다. 이 값은 창을 만든 응용프로그램에서 사용하기 위한 값입니다. 초기 값은 0입니다.
GWL_WNDPROC - 윈도우 프로시저의 새주소를 설정합니다. 창이 호출한 스레도와 동일한 프로세스에 속하지 않으면 이 값은 변경 할수 없습니다.


Ex)
public static extern Int32 GetWindowLong(IntPtr hWnd, Int32 Offset);
[DllImport("user32.dll")]
public static extern Int32 SetWindowLong(IntPtr hWnd, Int32 Offset, Int32 newLong);
[DllImport("user32.dll")]

WindowStyle myStyle = (WindowStyle)style;
myStyle = myStyle & ~WindowStyle.WS_SYSMENU;
style = SetWindowLong(childForm.Handle, GWL_STYLE, (int)myStyle);

#함수를 하나만 사용해서, 두개의 함수를 구현하는 방법(오버라이딩의 진화,ㅡ,ㅡㅡ)
#함수를 하나만 사용해서, 두개의 함수를 구현하는 방법(오버라이딩의 진화,ㅡ,ㅡㅡ)
#함수를 하나만 사용해서, 두개의 함수를 구현하는 방법(오버라이딩의 진화,ㅡ,ㅡㅡ)


using System;

class Program
{
    public static void Main(string[] args)
    {
        checkparameters nm = new checkparameters();
nm.run();

checkparametersdown nmm = new checkparametersdown();
nmm.run();
    }
}

//함수를 하나만 사용해서, 두개의 함수를 구현하는 방법
//함수를 하나만 사용해서, 두개의 함수를 구현하는 방법
class checkparameters
{
    void basefrm(string portno, string apmLiteRedismanager, string apmLiteRedismanagers = null )
    {
        Console.WriteLine(portno + "/" + apmLiteRedismanager + "/" + apmLiteRedismanagers);
    }
    public void run()
    {
        basefrm("1010", "1010");
basefrm("1010", "1010", "1010");
    }
}
class checkparametersdown
{
    void basefrm(string portno, string apmLiteRedismanager, string apmLiteRedismanagers)
    {
        Console.WriteLine(portno + "/" + apmLiteRedismanager + "/" + apmLiteRedismanagers);
    }
    void basefrm(string portno, string apmLiteRedismanager)
    {
        Console.WriteLine(portno + "/" + apmLiteRedismanager);
    }
    public void run()
    {
        basefrm("1010", "1010");
basefrm("1010", "1010", "1010");
    }
}



[Git] push 명령어로 local 변경 사항 원격 저장소에 반영하기
[Git] push 명령어로 local 변경 사항 원격 저장소에 반영하기
[Git] push 명령어로 local 변경 사항 원격 저장소에 반영하기
[Git] push 명령어로 local 변경 사항 원격 저장소에 반영하기
[Git] push 명령어로 local 변경 사항 원격 저장소에 반영하기







아래는 해당 프로젝트 소스디렉토리로 이동해서 수정된 부분을 반영하는 방법이다.

>cd ~/source/repository/Final/
>git branch -M BRANCH_PROJECT_NAME
>git add .
>git commit -m "query 2024.01.25 history commit"
>git push -u origin BRANCH_PROJECT_NAME


- git commit과 push의 차이점 이해하기
- git commit과 push의 차이점 이해하기
- git commit과 push의 차이점 이해하기

그렇다면 git commit과 push의 차이는 뭘까?
그렇다면 git commit과 push의 차이는 뭘까?
그렇다면 git commit과 push의 차이는 뭘까?

git commit만으로는 왜 원격 저장소에 반영이 안될까?
git commit만으로는 왜 원격 저장소에 반영이 안될까?
git commit만으로는 왜 원격 저장소에 반영이 안될까?

우리가 데이터를 변경한 후 commit을 하면 그 내역은 로컬 저장소에 반영이 된다.
우리가 데이터를 변경한 후 commit을 하면 그 내역은 로컬 저장소에 반영이 된다.
우리가 데이터를 변경한 후 commit을 하면 그 내역은 로컬 저장소에 반영이 된다.
즉, 내 pc 내의 저장소에만 반영이 된 것이다.
즉, 내 pc 내의 저장소에만 반영이 된 것이다.
즉, 내 pc 내의 저장소에만 반영이 된 것이다.

로컬저장소에 반영된 변경 사항을 원격에도 반영하기 위한 도구가 push다.
로컬저장소에 반영된 변경 사항을 원격에도 반영하기 위한 도구가 push다.
로컬저장소에 반영된 변경 사항을 원격에도 반영하기 위한 도구가 push다.

commit한 내역을 push하게 되면, 이제 원격 저장소에도 그 내역이 업데이트 되는 것이다.
commit한 내역을 push하게 되면, 이제 원격 저장소에도 그 내역이 업데이트 되는 것이다.
commit한 내역을 push하게 되면, 이제 원격 저장소에도 그 내역이 업데이트 되는 것이다.

따라서, commit은 내 pc 내의 작업이 때문에 크게 위험하지 않다.
따라서, commit은 내 pc 내의 작업이 때문에 크게 위험하지 않다.
따라서, commit은 내 pc 내의 작업이 때문에 크게 위험하지 않다.

하지만 push는 원격 저장소, 즉 공동으로 작업하는 프로젝트에 (개인 프로젝트일 수도 있지만)
하지만 push는 원격 저장소, 즉 공동으로 작업하는 프로젝트에 (개인 프로젝트일 수도 있지만)
하지만 push는 원격 저장소, 즉 공동으로 작업하는 프로젝트에 (개인 프로젝트일 수도 있지만)

그 내역이 반영되는 것이기 때문에 신중하게 해야한다.
그 내역이 반영되는 것이기 때문에 신중하게 해야한다.
그 내역이 반영되는 것이기 때문에 신중하게 해야한다.





 

"파일"이라는 한글을 여러타입으로 저장후에 c언어에서 읽어서 출력해보기
"파일"이라는 한글을 여러타입으로 저장후에 c언어에서 읽어서 출력해보기
"파일"이라는 한글을 여러타입으로 저장후에 c언어에서 읽어서 출력해보기


c언어에서 언어셋을 다루는일은 어려운일이다. 특히 한글을 다루는 일은 더더욱 그렇다.
아래는 여러가지 방식으로 저장되어진 "파일"이라는 한글을 바이트단위로 출력해본다.

 

 

#include <stdio.h>
#include <string.h>
 
int main(int argc, char *argv[])
{
    int kk;
    char tmp[1024];
    FILE *fp = NULL;

    if(argc != 2) return(-1);

    if(( fp = fopen(argv[1], "rt")) == NULL) return(-1);

    memset(tmp, 0x00, sizeof(tmp));

    while(1)
    {
        memset(tmp, 0x00, sizeof(tmp));
        if(fgets(tmp, sizeof(tmp), fp) == NULL) break;

        for(kk=0; kk<sizeof(tmp); kk++)
        {
            if(tmp[kk]==0x00) break;
            printf("[%d],", tmp[kk]);
        }
        printf("\n");
        printf("%s", tmp);
        printf("\n");
    }

    if(fp != NULL) fclose(fp);
    return(0);
}

# Windows Console에 Sin,Cos 그래프 표시

 

 

 



using System;

class Program
{
    public static void Main(string[] args)
    {
        CHKNM nmm = new CHKNM();
nmm.RUN();
    }
}
class CHKNM
{
    //Console Width, Heigth
    int width = 0;
    int height = 0;

    //Math.Cos,Math.Sin's Value to mapping Console Screen Size
    double mapx = 0.0;
    double mapy = 0.0;

    int toggle = 0;
    int nextxpos = 0;

    int end_degree_value = 360 * 2;

    public void RUN()
    {
width  = Console.WindowWidth;
        height = Console.WindowHeight;

        //Dynamic array index possible
int[,] screenposition = new int[width,height];

for(int ii=0; ii<height; ii++)
for(int kk=0; kk<width; kk++)
{
    screenposition[kk,ii]=0;
}

        for(int degree = 1; degree < end_degree_value; degree++)
{
    double radian = Math.PI * degree / 180.0;
    double funcy = Math.Cos(radian) + 1.0;

    mapy = height * 0.99 / 4.0;
    mapx = Convert.ToDouble(width) / Convert.ToDouble(end_degree_value);

    int ypos = Convert.ToInt32(funcy * mapy);
    int xpos = Convert.ToInt32(degree * mapx);

    if(ypos == height) continue;
    if(xpos == width) continue;

            if(toggle == 0)
    {
        toggle = 100;
nextxpos = xpos;
screenposition[xpos,ypos]=1;
    }
    else
    {
        if(nextxpos == xpos) continue;
else
{
    screenposition[xpos,ypos]=1;
    nextxpos = xpos;
}
    }
}
#if(true)
        string screenTxt = "";
for(int ii=0; ii<height/2; ii++)
{
    for(int kk=0; kk<width; kk++)
    {
        if(screenposition[kk,ii] == 1) screenTxt += "*";
else screenTxt += " ";
    }
    screenTxt += "\n";
}
Console.WriteLine(screenTxt);
#endif
    }
}









# visual studio offline 2019->2022 설치

# visual studio offline 2019가 이미 설치되어져 있다.
# visual studio offline 2022를 동시에 설치한다.

- 현재 장비에 인터넷은 되지 않는다. 통합설치는 불가능하고, 개별설치로 2019를 설치해서 사용중이다.
- 어찌 어찌 visual studio offline 2019 버젼을 설치해서 소스코드를 빌드해서 사용중이다.
- 이제 visual studio offline 2022버젼을 설치해야 한다. 물론 이것도 개별설치로 진행해야 할것이다. 통합설치는 불가능.



    - (참고문헌의 예)
    - (99.9) Visual Studio(2019) 설치 관리자를 엽니다. 제품 카드에서 기타 단추를 선택한 후 구성 내보내기를 선택합니다.

- Visual studio offline 2022버젼 binary 폴더로 이동한다.
- (99.9)의 내용을 d:\tmp\memo\myconfig.vsconfig로 저장한다.
- 아래의 shell을 실행한다.
- vs_setup.exe --config d:\tmp\memo\myconfig.vsconfig
- 실행결과 (?)
- InstallerProjects2022.visx 확장프로그램 더블클릭시에, 자동실행
- Visual Studio 2022에 확장 이식가능.
- Visual Studio 2019는 InstallerProjects.visx로 해야한다.
- 실행결과 (?)

호환적인부분에서 문제점이 발견되어진다. 해결방법은(?)


 

Visual studio 2019 Installer 내보내기결과)

{
  "version": "1.0",
  "components": [
    "Microsoft.VisualStudio.Component.CoreEditor",
    "Microsoft.VisualStudio.Workload.CoreEditor",
    "Microsoft.VisualStudio.Component.NuGet",
    "Microsoft.VisualStudio.Component.Roslyn.Compiler",
    "Microsoft.VisualStudio.Component.Roslyn.LanguageServices",
    "Microsoft.Net.Component.4.8.SDK",
    "Microsoft.Net.Component.4.7.2.TargetingPack",
    "Microsoft.Net.ComponentGroup.DevelopmentPrerequisites",
    "Microsoft.Component.MSBuild",
    "Microsoft.VisualStudio.Component.TextTemplating",
    "Microsoft.Net.Component.4.TargetingPack",   -> 2022에 적용되지 않음(?)
    "Microsoft.Net.Component.4.6.TargetingPack",
    "Microsoft.VisualStudio.Component.DiagnosticTools",
    "Microsoft.VisualStudio.Component.AppInsights.Tools",
    "Microsoft.VisualStudio.Component.IntelliCode",
    "Microsoft.Net.Component.4.8.TargetingPack",
    "Microsoft.VisualStudio.Component.VSSDK",
    "Microsoft.VisualStudio.ComponentGroup.VisualStudioExtension.Prerequisites",
    "Microsoft.VisualStudio.Component.DslTools",
    "Microsoft.Component.CodeAnalysis.SDK",
    "Microsoft.VisualStudio.Workload.VisualStudioExtension",
    "Microsoft.Component.ClickOnce"
  ]
}

 

Windows Form 실행시에 Message 순서출력
Windows Form 실행시에 Message 순서출력, Windows Form 실행시에 Message 순서출력

namespace WindowsFormsApp1
{
    public partial class Form1 : Form
    {
        private IntPtr tailHandle = IntPtr.Zero;
        int index = 0;
        public Form1()
        {
            InitializeComponent();

            //this.Visible=false;
        }
        private void SendToTail(int index, string data)
        {
            tailHandle = APMApiPublic.FindWindow(null, "DEBUGDEBUGDEBUG");
            if (tailHandle != IntPtr.Zero && data.Length > 0 && APMApiPublic.IsWindow(tailHandle))
            {
                try
                {
                    byte[] dataByte = Encoding.UTF8.GetBytes(data);

                    APMApiPublic.COPYDATASTRUCT copyData = new APMApiPublic.COPYDATASTRUCT();
                    copyData.dwData = (IntPtr)0;
                    copyData.cbData = dataByte.Length;
                    copyData.lpData = Marshal.AllocHGlobal(dataByte.Length);
                    Marshal.Copy(dataByte, 0, copyData.lpData, dataByte.Length);

                    IntPtr sendData = Marshal.AllocHGlobal(Marshal.SizeOf(copyData));
                    Marshal.StructureToPtr(copyData, sendData, true);

                    IntPtr _result = APMApiPublic.SendMessage(tailHandle, APMApiPublic.WM_COPYDATA, (IntPtr)index, sendData);

                    Marshal.FreeHGlobal(copyData.lpData);
                    Marshal.FreeHGlobal(sendData);
                }
                catch (Exception exp)
                {
                    //MessageBox.Show(exp.Message);
                }
            }
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            SendToTail(1, "(Form1_Load)()()()()()[INDEX]:" + index.ToString("0000000"));
            index++;
        }

        private void Form1_Shown(object sender, EventArgs e)
        {
            SendToTail(1, "(Form1_Shown)()()()()()[INDEX]:" + index.ToString("0000000"));
            index++;
        }

        private void Form1_Enter(object sender, EventArgs e)
        {
            SendToTail(1, "(Form1_Enter)()()()()()[INDEX]:" + index.ToString("0000000"));
            index++;
        }

        private void Form1_ForeColorChanged(object sender, EventArgs e)
        {
            SendToTail(1, "(Form1_ForeColorChanged)()()()()()[INDEX]:" + index.ToString("0000000"));
            index++;
        }

        private void Form1_FormClosed(object sender, FormClosedEventArgs e)
        {
            SendToTail(1, "(Form1_FormClosed)()()()()()[INDEX]:" + index.ToString("0000000"));
            index++;
        }

        private void Form1_Activated(object sender, EventArgs e)
        {
            SendToTail(1, "(Form1_Activated)()()()()()[INDEX]:" + index.ToString("0000000"));
            index++;
        }

        private void Form1_Paint(object sender, PaintEventArgs e)
        {
            SendToTail(1, "(Form1_Paint)()()()()()[INDEX]:" + index.ToString("0000000"));
            index++;
        }
    }
}

+ Recent posts