허당 레몬도리
article thumbnail
[asp.net core] API 서비스 배열(array) 값 받기
가. 언어유형/C# 2022. 1. 11. 19:03

[Route("add")] [HttpPut] public async Task Add([FromQuery] int[] array_ids) { return new JsonResult(""); } 위와 같이 [FromQuery]로 받아 처리할 수 있다. 호출 방법은 Postman 기준으로 아래와 같이 입력하면 된다. Form을 이용할 경우 아래와 같이 name을 같게 해주면 입력 값을 배열로 받을 수 있다. . . . 명심해야할 것은 [FromQuery] int[] array_ids 는 맨 앞에 위치해야 한다 앞에 다른 변수가 있을 경우 인식이 불가하여 아래와 같은 에러를 볼 수 있다

memset() or value initialization to zero out a struct?
가. 언어유형/C or C++ 2021. 11. 8. 11:58

https://stackoverflow.com/questions/1998752/memset-or-value-initialization-to-zero-out-a-struct memset() or value initialization to zero out a struct? In Win32 API programming it's typical to use C structs with multiple fields. Usually only a couple of them have meaningful values and all others have to be zeroed out. This can be achieved in eithe... stackoverflow.com https://www.py4u.net/discuss..

[asp.net core] checkbox parameter로 받기
가. 언어유형/C# 2021. 10. 28. 16:53

1. 단일 체크박스 html cs public async Task Edit(Models.Sample model, bool check_box_name) { if (true == check_box_name) { // 처리 } } 2. 여러 체크박스를 한번에 받기 html cs public async Task Edit(Models.Sample model, int[] check_box_name) { if (true == check_box_name) { // 처리 } } int[], string[]로 받을 수 있다.

Minidump TYPE enum 값 설명
가. 언어유형/C or C++ 2019. 12. 19. 11:32

출처 : http://www.debuginfo.com/articles/effminidumps.html#minidumptypesIntroductionIn the last couple of years, crash dumps became an important part of our debugging activities. The possibility to create a snapshot of the application state at the exact moment of failure and analyze it with a conventional debugger running on the developer’s machine is invaluable when our software fails on the cust..

[dotnet core] web api file upload(feat. windows forms)
가. 언어유형/C# 2019. 10. 25. 18:12

webserver 를 이용해 파일 업로드 기능을 만들다가 남겨놓으면 좋을거 같아 남깁니다. 코드는 아래 받으면 되고 Visual Studio 2017버전으로 작성이 되었습니다. 기본적인 코드를 소개(?)하겠습니다. 1. web server project create 1.1 Controllers folder - new controller 1.2 Code using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; using System.IO; namespace WebServer.Controllers { [ApiController] public class FIleUploadController : ControllerBase { [HttpPost] [Rou..

[C#] List<T>에서 Byte[]로 변경
가. 언어유형/C# 2019. 7. 17. 10:32

출처 : https://stackoverflow.com/questions/34884854/convert-listint-to-byte Convert list to byte[] How to convert list to byte[]? I could use this: byte[] bytes = lista.SelectMany(BitConverter.GetBytes).ToArray(); But it works only for list. If you have few ideas - m... stackoverflow.com List -> byte[] byte[] bytes = lista .SelectMany(x => x) .SelectMany(BitConverter.GetBytes) .ToArray(); byte[] -..

#include <>와 ""의 차이
가. 언어유형/C or C++ 2019. 7. 11. 11:21

출처 : https://gcc.gnu.org/onlinedocs/cpp/Include-Syntax.html Both user and system header files are included using the preprocessing directive ‘#include’. It has two variants:사용자와 시스템 헤더 파일은 모두 사전 처리 지침 '#include'를 사용하여 포함된다. 두 가지 변형이 있다.#include This variant is used for system header files. It searches for a file named file in a standard list of system directories. You can prepend directories to ..

보호되어 있는 글입니다. 내용을 보시려면 비밀번호를 입력해주세요.