Develop

    [C#] ASP.NET API URL 대소문자 구분 안하게 설정

    ASP.NET API Routing Lowercase 수정 전 /api/Checkdb : success /api/checkdb : fail Routing 설정 # program.cs var builder = WebApplication.CreateBuilder(args); builder.Services.AddRouting(option => { option.LowercaseUrls = true; }); var app = builder.Build(); 수정 후 /api/Checkdb : success /api/checkdb : success

    [C#] ASP.NET API Cors 전체 허용

    ASP.NET API Cors 허용 UseCors 설정 http, https 허용 # Program.cs var app = builder.Build(); app.UseCors(x => { x.AllowAnyHeader(). AllowAnyMethod(). AllowAnyOrigin(). SetIsOriginAllowed(origin => true). WithOrigins("http://*"). WithOrigins("https://*"). AllowCredentials(); });

    [PowerShell] ps1 파일 실행 오류 : 이 시스템에서 스크립트를 실행할 수 없으므로 ~

    PowerShell ps1 실행 시 Policy 오류 Policy 선언 후 실행 # Powershell.exe -noprofile -executionpolicy bypass -file "[PS1 FILE PATH]" Powershell.exe -noprofile -executionpolicy bypass -file "./install_all.ps1"

    [PowerShell] ForEach문 활용

    PowerShell Foreach Array 생성 $removeAppxPackage = @( 'Microsoft.MicrosoftOfficeHub', 'Microsoft.MicrosoftSolitaireCollection', 'MicrosoftTeams', 'Microsoft.WindowsCamera', 'Microsoft.Getstarted', 'SpotifyAB.SpotifyMusic', 'Microsoft.ZuneMusic', 'Microsoft.ZuneVideo', 'Microsoft.BingNews', 'Microsoft.People', 'Microsoft.BingWeather' ) Foreach 실행 # foreach ( $item in [Array] ) { RUN COMMAND } forea..

    [PowerShell] 현재 경로 확인

    PowerShell 현재 경로 확인 pwd $nowPath = (pwd).Path Write-Host $nowPath # or $nowPath = ${pwd} Write-Host $nowPath # or Write-Host ${pwd}

    [PowerShell] 변수 설정 / 활용

    PowerShell 변수 설정 / 활용 PowerShell 변수 설정 $psVal=11 #Integer [int]$psInt=11 #Boolean (0: False / 1: True) [bool]$psBoolean=0 #String [string]$psString="ssd" PowerShell 변수 사용 [string]$dirPath="C:\vault" Get-Item $dirPath

    [PowerShell] 특정 폴더 용량 확인

    PowerShell 폴더 용량 확인 PowerShell Command # Target Directory : C:\vaults # $GetDir = Get-ChildItem [DIRECTORY_PATH] -recurse | Measure-Object -property length -sum $GetDir = Get-ChildItem C:\vaults -recurse | Measure-Object -property length -sum $GetDirSize = $GetDir.Sum Write-Host $GetDirSize PowerShell One line command # Target Directory : C:\vaults # $GetDirSize = (Get-ChildItem [DIRECTORY_PATH]..

    [Java] Spring Boot Rest API 응답 코드 변경

    ResponseEntity 사용 사용처 Spring Boot에서 API Return 시 응답 코드 변경에 사용 Package org.springframework.http.ResponseEntity 사용법 return new ResponseEntity(SEND_DATA , HTTP_STATUS) SEND_DATA : JSON 형식으로 보낼 파일 HTTP_STATUS : 응답 코드 org.springframework.http.HttpStatus Example @RequestMapping(method = RequestMethod.GET, path = "login") public ResponseEntity Login(String id, String password){ try{ LoginEntity userinf..

    [WPF, Telerik] RadGanttView - Event Container

    Event Container 일반적인 Task 표시 블럭 데이터 입력 XAML Code public ObservableCollection GanttTasks { get; set; } private void SetGantt() { // 2021-08-01 ~ 2021-08-02 // Title : Task 1 var task1 = new GanttTask(new DateTime(2021, 08, 01), new DateTime(2021, 08, 02), "Task 1"); // 2021-08-01 ~ 2021-08-03 // Title : Task 2 var task2 = new GanttTask(new DateTime(2021, 08, 01), new DateTime(2021, 08, 03), "Task..

    [Cordova, Exception] Build-tool 31.0.0 is missing DX

    에러 내용 Cordova Android 실행 시 dx.bat을 찾을 수 없다고 나오는 현상. Build-tool 31.0.0 is missing DX at C:\Users\WDAGUtilityAccount\AppData\Local\Android\sdk\build-tools\31.0.0\dx.bat Build-tool 31.0.0 is missing DX at C:\Users\WDAGUtilityAccount\AppData\Local\Android\sdk\build-tools\31.0.0\dx.bat FAILURE: Build failed with an exception. * What went wrong: Could not determine the dependencies of task ':app:compi..