목록분류 전체보기 (257)
일상 코딩
#include #include #include using namespace std; class IntArray { private: unsigned m_length = 0; int *m_data = nullptr; // 동적할당 public: IntArray(unsigned length) : m_length(length) { m_data = new int[length]; } // initialize_list 생성자. IntArray(const std::initializer_list &list) : IntArray(list.size()) { int count = 0; for(auto & element : list) { m_data[count] = element; ++count; } // for (unsig..
#include #include using namespace std; class MyString { //private: public: char *m_data = nullptr; int m_length = 0; public: // 문자열 받고 있는 생성자 MyString(const char *source = "") { assert(source); // 문자열 길이 함수 // +1 을 한 이유는 문자열 끝에 문자열 끝을 나타내기 위한 '\0'을 넣기 위함. m_length = std::strlen(source) + 1; // 동적할당 메모리 m_data = new char[m_length]; // 깊은 복사 for (int i = 0; i < m_length; ++i) m_data[i] = source[i]..
https://paperswithcode.com/paper/graph-neural-networks-a-review-of-methods-and Papers with Code - Graph Neural Networks: A Review of Methods and Applications Implemented in 5 code libraries. paperswithcode.com
#include #include using namespace std; class Fraction { private: int m_numerator; int m_denominator; public: // 문자형 들어오면 삭제해버리는 명령어. // 혹은 구버전에서 쓰던 습관 같은것을 원천 차단하는 수단으로도 사용됨. Fraction(char) = delete; // 함수 인자 입력시 명확하게 강제하는 explicit 명령어. // converting constructor로 자동으로 작동되게 막는 명령어이기도함. explicit Fraction(int num = 0, int den = 1) : m_numerator(num), m_denominator(den) { assert(den != 0); cout
Copy Constructor return Value Optimization #include #include using namespace std; class Fraction { private: int m_numerator; int m_denominator; // private 영역으로 넣게되면 복사가 안되게 된다. // Fraction(const Fraction &fraction) // copy constructor // : m_numerator(fraction.m_numerator), // m_denominator(fraction.m_denominator) // { // // 복사 생성자가 얼마나 자주 생성이되는지 알아보는 출력 코드 // cout
#include using namespace std; class Cents { private: int m_cents; public: Cents(int cents = 0) { m_cents = cents; } int getCents() { return m_cents; } void setCents(int cents) { m_cents = cents; } operator int() { cout
#include using namespace std; class Accumulator { private: int m_counter = 0; public: int operator () (int i) { return (m_counter += i); } }; int main() { Accumulator acc; // functor cout
#include #include class IntList { private: int m_list[10]{1,2,3,4,5,6,7,8,9,10}; public: // void setItem(int index, int value) // { // m_list[index] = value; // } // int getItem(int index) // { // return m_list[index]; // } // // array 자체를 포인터로 얻는 방법 // int * getList() // { // return m_list; // } int & operator [] (const int index) { // 이렇게 assert로 막아줘야 // runtime error debugging시 시간을 // 아낄 수 있다..
https://cafe.naver.com/opencv/56565 MLOps 니 DevOps 니 하는것들은 도대체 뭔가요? 대한민국 모임의 시작, 네이버 카페 cafe.naver.com
https://okky.kr/ OKKY - All That Developer Editor's Choice Weekly Best 이런 상황 말이 되나요? 보름 925 2021-10-23 12:04:58 3년차 백엔드 개발자 연봉 닉넴후 56 2021-10-26 20:17:40 Q&A js log확인방법 자바 session 질문드립니다 bkgttmg 2k 2021-10-29 08:30:15 Controlle okky.kr ※ 링크 저장하게 된 이유인 글 몇가지 https://okky.kr/article/1085063 OKKY | 스타트업 회사의 신입 개발자입니다. 안녕하세요. 6개월 차에 접어드는 신입 개발자입니다. 요즘들어 궁금한게 생겨서 하나 여쭤보고자 이렇게 글을 올립니다. 저희 회사가 스타트업입니다...