Hi, It's ME
My Main Study Trends Flow
[STL] std::ranges::find
[STL] std::ranges::find
STL
2024.06.23 23:07
1. 개요std::ranges::find 함수는 C++20에서 도입된 범위 기반 알고리즘으로, 지정된 범위 내에서 특정 값을 찾는다.1.1. std::find VS std::ranges::find1.1.1. std::find 예시#include // std::find#include #include int main() { std::vector numbers = {1, 2, 3, 4, 5, 6, 7, 8, 9}; // std::find를 사용하여 값 5를 찾기 auto it = std::find(numbers.begin(), numbers.end(), 5); if (it != numbers.end()) { std::cout 1.1.2. std::ranges:..
[STL] std::ranges::minmax_element
[STL] std::ranges::minmax_element
STL
2024.06.23 22:48
1. 개요std::ranges::minmax_element 함수는 C++20부터 표준 라이브러리에 추가된 함수로, 주어진 범위에서 가장 작은(minimum) 요소와 가장 큰(maximum) 요소의 반복자를 동시에 반환한다.2. templatetemplateauto minmax_example(const Range& range) { return std::ranges::minmax_element(range);}2.1. 매개 변수 range: 검색할 요소들의 범위를 나타내는 반복자들이다.comp (선택적): 비교 조건을 나타내는 함수 객체(람다 함수)이다. 기본적으로는 2.2.반환값std::pair 객체를 반환한다. std::pair는 두 개의 반복자를 포함하며, 첫 번째 반복자는 가장 작은 요소를 가리키..
[STL] std::ranges::any_of
[STL] std::ranges::any_of
STL
2024.06.23 22:40
1. 개요std::ranges::any_of 함수는 C++20부터 표준 라이브러리에 추가된 함수로, 주어진 범위(range)에서 하나 이상의 요소가 주어진 조건을 만족하는지 검사한다.2. templatetemplatebool any_of_example(const Range& range, UnaryPredicate predicate) { return std::ranges::any_of(range, predicate);}2.1. 멤버함수std::ranges::any_of(range, predicate): 주어진 범위에서 하나 이상의 요소가 unary_predicate 조건을 만족하는지 검사한다.range: 검사할 요소들의 범위를 나타내는 반복자들이다.predicate: 각 요소를 평가할 조건을 나타내는..
[STL] std::negate
[STL] std::negate
STL
2024.06.23 22:30
1. 개요std::negate는 C++11부터 도입된 표준 라이브러리의 일부이며, 함수형 프로그래밍 스타일을 지원하는 함수 객체(functor)이다. 단항 연산자로 입력된 값을 부정(negation)하는 역할을 한다. 즉, 입력된 값의 부호를 반대로 바꿔준다.2. 사용 예시#include #include // std::negateint main() { std::negate neg; // int 타입의 부정 함수 객체를 선언 int x = 10; int y = neg(x); // -x를 계산하여 y에 할당 std::cout 2.1. 결과 출력x = 10, y = -103. 참고사항3.1. 관련 문서https://en.cppreference.com/w/cpp/utility/functi..
[STL] std::vector
[STL] std::vector
STL
2024.06.23 22:23
1.개요std::vector는 동적 배열(dynamic array) 컨테이너이다. 요소들을 선형으로 저장하며, 인덱스를 통해 각 요소에 접근할 수 있다. 크기를 동적으로 조절할 수 있는 배열로, 메모리 내에 연속적으로 저장된다.2. 주요 멤버 함수push_back(): 벡터 끝에 요소를 추가한다.pop_back(): 벡터의 마지막 요소를 제거한다.size(): 벡터에 저장된 요소의 개수를 반환한다.begin(), end(): 벡터의 시작과 끝을 가리키는 반복자를 반환한다.resize(): 벡터의 크기를 조정한다.3. 참고 사항3.1. 비용메모리 할당 및 해제 비용이 추가될 수 있으므로, 성능 요구 사항을 고려하여 사용3.2. 관련 문서https://en.cppreference.com/w/cpp/conta..
[STL] std::ranges::transform
[STL] std::ranges::transform
STL
2024.06.23 22:08
1. 개요std::ranges::transform 함수는 C++20부터 도입된 범위 기반 알고리즘 중 하나로, 주어진 입력 범위의 각 요소에 대해 지정된 변환 작업을 수행하고, 변환된 요소들을 출력 범위에 저장한다.2. templatetemplate constexpr OutputRange transform(InputRange&& inputRange, OutputRange&& outputRange, UnaryOperation op);InputRange: 변환할 입력 범위로, 범위의 첫 번째 요소의 시작과 끝을 나타낸다.OutputRange: 변환된 요소들을 저장할 출력 범위로, 반드시 OutputIterator의 요구사항을 충족해야 한다.UnaryOperation: 각 요소에 적용할 단항 연산(함수 객체 ..
[C++] 람다(Lambda) 함수
[C++] 람다(Lambda) 함수
C++
2024.06.23 21:43
1. 람다(Lambda) 함수캡처를 통해 lambda 함수는 자신이 생성된 시점에서의 외부 변수의 값을 유지하거나 사용한다. 일반적으로 lambda 함수는 외부 변수에 대한 접근을 제한한다. lambda 함수 내에서 외부 변수에 접근하려면, 그 변수를 명시적으로 캡처해야 된다.2. [ ][]는 C++에서 람다(Lambda) 함수를 정의할 때 사용3. 캡처(Capture)3.1. 캡처(Capture)란?C++ 람다(Lambda) 함수에서 외부 변수를 내부로 가져오는 것을 말한다.3.2. 캡처(Capture) 위치대괄호([ ]) 안에 위치하며, 여기에 캡처할 변수를 지정한다.4. 사용예시[캡처위치(외부변수)](lambda 내부 변수){lambda 함수}
[CMake] CMakeLists.txt 작성
[CMake] CMakeLists.txt 작성
CMake
2024.06.23 21:04
1. root/CMakeLists.txtcmake_minimum_required(VERSION 3.5) # 최대한 높은 버전 사용project(projectName VERSION 0.1.0) # 프로젝트 이름과 버전set(CMAKE_CXX_STANDARD 20) # C++ 표준 설정set(CMAKE_CXX_STANDARD_REQUIRED TRUE) # C++ 표준 준수를 필수로 설정# CPM.cmake settings# ------------------------------------------------------------------------------file( DOWNLOAD https://github.com/cpm-cmake/CPM.cmake/releases/download/v0.38.3/C..
Computer Science
Python 기초지식
Python 기초지식
Python
2024.05.04 03:05
Interpreter 사용실행이 필요할 때 기계어로 변환하는 Interpreter(인터프리터)를 사용한다. 이는 마치 동시 통역과 같다. 데이터란?정보의 집합으로, 숫자, 텍스트, 이미지, 음성 등의 형태로 나타낼 수 있다. 이러한 데이터는 컴퓨터나 기타 디지털 장치에서 수집되고 저장되며, 분석되거나 가공되어 유용한 정보를 제공한다. 변수란?데이터가 저장되어 있는 메모리 공간이다. 변수를 사용하는 이유?데이터를 재사용하기 위한 목적으로 프로그램을 보다 효율적으로 관리할 수 있다.변수 선언 및 초기화 변수 선언 = 데이터 초깃값 ex) number = 2024 변수 작명법- 영문 사용- 첫 문자는 소문자로- 가급적 데이터의 의미를 파악할 수 있는 명사 사용- Carmel 표기법 또는 Snake 표기법 사용..
NEW
[STL] std::ranges::find
STL2024.06.23 23:07[STL] std::ranges::find

1. 개요std::ranges::find 함수는 C++20에서 도입된 범위 기반 알고리즘으로, 지정된 범위 내에서 특정 값을 찾는다.1.1. std::find VS std::ranges::find1.1.1. std::find 예시#include // std::find#include #include int main() { std::vector numbers = {1, 2, 3, 4, 5, 6, 7, 8, 9}; // std::find를 사용하여 값 5를 찾기 auto it = std::find(numbers.begin(), numbers.end(), 5); if (it != numbers.end()) { std::cout 1.1.2. std::ranges:..

[STL] std::ranges::minmax_element
STL2024.06.23 22:48[STL] std::ranges::minmax_element

1. 개요std::ranges::minmax_element 함수는 C++20부터 표준 라이브러리에 추가된 함수로, 주어진 범위에서 가장 작은(minimum) 요소와 가장 큰(maximum) 요소의 반복자를 동시에 반환한다.2. templatetemplateauto minmax_example(const Range& range) { return std::ranges::minmax_element(range);}2.1. 매개 변수 range: 검색할 요소들의 범위를 나타내는 반복자들이다.comp (선택적): 비교 조건을 나타내는 함수 객체(람다 함수)이다. 기본적으로는 2.2.반환값std::pair 객체를 반환한다. std::pair는 두 개의 반복자를 포함하며, 첫 번째 반복자는 가장 작은 요소를 가리키..

[STL] std::ranges::any_of
STL2024.06.23 22:40[STL] std::ranges::any_of

1. 개요std::ranges::any_of 함수는 C++20부터 표준 라이브러리에 추가된 함수로, 주어진 범위(range)에서 하나 이상의 요소가 주어진 조건을 만족하는지 검사한다.2. templatetemplatebool any_of_example(const Range& range, UnaryPredicate predicate) { return std::ranges::any_of(range, predicate);}2.1. 멤버함수std::ranges::any_of(range, predicate): 주어진 범위에서 하나 이상의 요소가 unary_predicate 조건을 만족하는지 검사한다.range: 검사할 요소들의 범위를 나타내는 반복자들이다.predicate: 각 요소를 평가할 조건을 나타내는..

Install & Setup
Ninja 설치하기
Ninja 설치하기
Install and Setup
2024.06.23 16:53
1. Chocolaty package Installhttps://chocolatey.org/install Installing ChocolateyChocolatey is software management automation for Windows that wraps installers, executables, zips, and scripts into compiled packages. Chocolatey integrates w/SCCM, Puppet, Chef, etc. Chocolatey is trusted by businesses to manage software deployments.chocolatey.org1.1 관리자 모드 powershell 실행Set-ExecutionPolicy Bypass -S..
LLVM 설치하기
LLVM 설치하기
Install and Setup
2024.06.23 16:02
1. LLVM donwload linkhttps://releases.llvm.org/download.html LLVM Download PageIf you'd like access to the "latest and greatest" in LLVM development, please see the instructions for accessing the LLVM Git Repository. The major changes and improvements that the development version contains relative to the previous release are listed ireleases.llvm.org1.1. Download LLVM ver원하는 버전을 선택한다. 나는 가장 최신 버..
Terminal 꾸미기
Terminal 꾸미기
Install and Setup
2024.06.23 02:26
1. Windows Terminal Download linkhttps://apps.microsoft.com/detail/9N0DX20HK701 Windows Terminal - Windows에서 무료 다운로드 및 설치 | Microsoft StoreWindows 터미널은 명령 프롬프트, PowerShell 및 WSL과 같은 명령 줄 도구 및 셸 사용자를 위한 최신의 빠르고 효율적이며 강력한 생산성의 터미널 응용 프로그램입니다. 주요 기능으로는 여러 탭, 창,apps.microsoft.com 2. 기본 설정2.1. Windows Terminal 2.2. D2Codinghttps://github.com/naver/d2codingfont GitHub - naver/d2codingfont: D2 Coding 글..
CMake 설치하기
CMake 설치하기
Install and Setup
2024.06.23 00:43
1. CMake Download linkhttps://cmake.org/download/ Download CMakeYou can either download binaries or source code archives for the latest stable or previous release or access the current development (aka nightly) distribution through Git. This software may not be exported in violation of any U.S. export laws or regulatiocmake.org 2. Download cmake-3.30.0-rc3-windows-x86_64.msi Windows 환경에서 설치하려 하므..
PyCharm 설치하기
PyCharm 설치하기
Install and Setup
2024.05.05 23:35
Step 1. PyCharm 사이트에 접속하기PyCharm 다운로드를 위해 https://www.jetbrains.com/ko-kr/pycharm/download/?section=windows 사이트에 접속한다. PyCharm 다운로드: 데이터 과학 및 웹 개발을 위해 JetBrains가 만든 Python IDE www.jetbrains.com Step 2. Download2.1 .exe형식의 파일 Download순수 Python 개발용 IDE에서 다운로드해야 무료로 사용할 수 있다. 2.2 다운로드 받은 .exe2.3 PyCharm Setup다운로드 받은 .exe파일을 실행하여 별 다른 선택 없이 다음 버튼을 클릭하여 다운로드를 마쳤다.
Python 시작하기
Python 시작하기
Install and Setup
2024.05.01 22:01
Step 1. Python 사이트 접속하기Python을 다운로드하기 위해 https://www.python.org/ 사이트에 접속한다.  Welcome to Python.orgThe official home of the Python Programming Languagewww.python.orgStep 2 . Download2.1 .exe형식의 파일 Download접속을 하면 아래와 같은 홈페이지가 뜨는데, 메뉴바에서 Downloads에 마우스 커서를 올려보자.Download for Windows에서 Python x.x.x이 적혀있는 버튼을 클릭하면 바로 최신 버전의 .exe를 다운로드 받을 수 있다. 다른 버전을 받고 싶다면 All releases를 클릭해서 원하는 버전의 Pyhon을 다운로드 받으면 된..
[GitHub] Token 설정하기
[GitHub] Token 설정하기
Install and Setup
2024.01.15 22:38
GitHub 로그인 후, 오른쪽 상단에서 본인 프로필을 클릭한다.  사이드 바에서 Setting을 찾아 클릭한다.  왼쪽 사이드 메뉴에서 Developer settings를 찾아 클릭한다.  Personal access tokens를 클릭한다.  그럼 하단에 메뉴들이 생기는데 Tokens(classic)을 클릭한다.  오른쪽 상단에서 Generate new token을 클릭한다.   Generate new token (classic)을 클릭한다.  Note는 간단한 설명을 쓰는 곳이다.그러므로 아무 말이나 써도 상관 없다.나는 Java practice라고 써주었다. Expiration은 만료기간을 나타낸다.특별한 기간을 정하고 싶지 않아서 No expiration을 선택했다. Select scopes는 ..
SourceTree 시작하기(2)_GitHub와 SourceTree 연동
SourceTree 시작하기(2)_GitHub와 SourceTree 연동
Install and Setup
2023.12.30 03:30
SourceTree를 열어 상단의 Remote를 클릭한다.    계정 추가를 클릭한다.    나는 호스팅 서비스를 GitHub를 선택했고 선호 프로토콜을 HTTPS로 골랐다.GitHub Token을 미리 생성했으므로 인증은 Personal Access Token으로하고사용자명은 GitHub의 ID를 입력했다.Token 생성을 아직 하지 못했다면 (https://rlog0918.tistory.com/336)을 참고한다. [GitHub] Token 설정하기GitHub 로그인 후, 오른쪽 상단에서 본인 프로필을 클릭한다. 사이드 바에서 Setting을 찾아 클릭한다. 왼쪽 사이드 메뉴에서 Developer settings를 찾아 클릭한다. Personal access tokens를 클릭한다. 그럼 하rlog0..
728x90
반응형
image