전체 글
-
[Postgresql] tsquery, tsvector를 이용한 텍스트 검색DB & SQL 2023. 7. 11. 11:31
Like 조회의 한계 문자열을 에서 해당 단어가 포함되어있는지 여부를 찾을 때 like 를 사용하는 경우가 있습니다. 간편하지만 % 를 사용하면 해당 필드에 인덱스가 있음에도 이를 사용할 수 없어 성능이 떨어지는 단점이 있습니다. select * from posts where title like '%검색어%'; -- 인덱스를 사용할 수 없음 데이터가 적은 테이블에선 큰 문제가 되지 않지만, 주소검색과 같이 100만건이 넘는 테이블에서도 이렇게 사용할 수 있을까요? 이번시간엔 Postgresql 에서 문자열을 빠르게 검색할 수 있는 기법 중 하나인 tsquery, tsvector 를 사용하는 방법을 알아봅니다. tsvector? tsquery? tsvector 는 텍스트 검색을 위해 Postgresql 에..
-
[Javascript] navigator.clipboard.write 사용시 PC와 아이폰은 되지만 안드로이드만 실패할 경우Javascript & TypeScript 2023. 7. 3. 19:45
아래와 같은 코드로 클립보드 문자를 복사하는 코드를 만드는 경우가 종종 있다. function copy() { const text = 'copy text'; navigator.clipboard.writeText(text); alert("복사되었습니다."); } test PC 브라우저와 아이폰에서 정상동작하여 별 생각 없이 썼는데, 안드로이드에선 클립보드 복사가 동작하지 않는다는 문의가 들어왔다. 원인은 Promise 처리를 제대로 안했기 때문이다. 코드를 다음과 같이 해결하면 된다. function copy() { const text = 'copy text'; navigator.clipboard.writeText(text).then(() => { alert("복사되었습니다."); }).catch((err..
-
[Github Copilot] Github Copilot Chat 미리 보기ETC 2023. 5. 24. 00:12
어느날 문득 Github에서 메일을 한 통이 날라왔다. Welcome to the Copilot chat private beta! You're off the waitlist and can start using Copilot chat. Getting Started Here are the instructions to get started: Before starting, please make sure that the GitHub ID you intend to use has an active subscription to GitHub Copilot and matches the ID that you used to join the GitHub Copilot chat waitlist. 잊고 있었던 Gopilot cha..
-
[ADO.NET] 프로시저 호출 시 the Size property has an invalid size of 0 오류 일어날 때 확인 사항.NET/개념 및 유용한 팁 2023. 4. 20. 22:42
1. 오류원인 SqlCommand 사용시 SqlParameter 가 Varchar와 같이 사이즈가 지정된 유형을 OUTPUT으로 받는 파라메터라면 Size를 필수적으로 설정해야한다. 그러지 않을 경우 the Size property has an invalid size of 0 오류가 발생할 수 있다. 2. 재현 아래와 같은 테이블과 프로시저 있다고 가정하자. -- 테이블 CREATE TABLE ApplicationDB.dbo.Student ( StudentId INT NOT NULL PRIMARY KEY, -- primary key column "Name" [NVARCHAR](50) NOT NULL, "Id" [NVARCHAR](50) NOT NULL -- specify more columns here ..
-
[PowerShell] Publish-Script 명령어로 배포시 Failed to generate the compressed file for script 'Cannot index into a null array.' 오류 현상Shell & CMD/PowerShell 2023. 3. 25. 23:23
파워셸로 스크립트를 배포하는 과정에서 Failed to generate the compressed file for script 'Cannot index into a null array.' 가 발생했다. 원인은 배포할 스크립트를 Publish-Script가 배포할 스크립트를 nupkg 형식으로 만드는 과정에서 나타나는 오류인데, 스크립트를 잘못 작성해서 문제가 된게 아니라 OS가 영어가 아닌 다른 언어일 경우 나타나는 환경적인 이슈이다. 관련 내용은 Github issue 에서 확인 가능하다. https://github.com/PowerShell/PowerShellGetv2/issues/606#issuecomment-686660440 Failed to generate the compressed file f..
-
[ASP.NET Core] AddSingleton(), AddScoped(), AddTransient() 차이점 - 2.NET/ASP.NET Core 2023. 3. 15. 21:47
해당 포스트 작성하기 약 2년 전, ASP.NET Core 에서 3가지 생명주기에 대해 정리한 적이 있었다. [ASP.NET Core] AddSingleton(), AddScoped(), AddTransient() 차이점 - 1 :: 또치의 삽질 보관함 (tistory.com) [ASP.NET Core] AddSingleton(), AddScoped(), AddTransient() 차이점 - 1 ASP.NET Core에서 의존성 주입에 의해 추가되는 Service는 크게 3가지 생명주기를 지닌다. AddSingleton AddScoped AddTransient AddSingleton의 경우는 클라이언트(보통 웹브라우저)의 접속상태에 관계없이, 웹 서 ddochea.tistory.com 지난시간에 Scop..
-
[.NET] The last access/last write time on file 빌드오류.NET/개념 및 유용한 팁 2023. 3. 12. 17:17
아래와 같은 오류가 발생했다. The last access/last write time on file "obj/Debug/net6.0/example-producer.MvcApplicationPartsAssemblyInfo.cache" cannot be set. Access to the path '/workspaces/example-producer/obj/Debug/net6.0/example-producer.MvcApplicationPartsAssemblyInfo.cache' is denied. [/workspaces/example-producer/example-producer.csproj] 해결은 obj 폴더를 제거하고 다시 빌드하면 된다.
-
[Design] SVG 아이콘 사이트 icon-sets.iconify.design 소개ETC 2023. 3. 6. 21:35
https://icon-sets.iconify.design/ Icon Sets • Iconify Thousands of icons, one unified framework. icon-sets.iconify.design 검색결과 에 맞는 svg 아이콘의 path 값을 찾을수 있으며 next, nuxt, sveltekit 에서 npm 패키지 방식을 통해 설치하여 사용할 수 있는 방법도 제공하는 라이브러리이자 무료 아이콘 사이트이다. 검색한 아이콘 중 마음에 드는 아이콘 선택 후, 하단의 Code for 영역에서 SVG를 직접 선택하여 사용하거나, 개발 플랫폼에 맞는 npm 패키지 가이드에 따라 사용할 수 있다. 무료라고해서 제공되는 모든 아이콘이 제한없는 무료는 아니다. 아이콘 제작자는 따로 있기 때문에 라..