프로그래밍
-
[UE4]월드에 Player Start Actor가 있는데 Player Character가 스폰되지 않음프로그래밍/의문 2020. 9. 15. 15:20
플레이 모드가 시뮬레이트(Simulate)로 되어 있어서 스폰되지 않았다. 시뮬레이트 모드의 단축키가 Alt+S로 되어있어서, 나도 모르게 Alt+S를 눌렀던 거 같다. 아마 파일을 세이브 하던 버릇 때문에. 플레이 모드를 선택된 뷰포트(Selected Viewport)로 변경하자 정상적으로 스폰 되었다. 아래 글을 참고하였다. https://answers.unrealengine.com/questions/166517/player-start-not-working.html
-
[C++] 정규 프로젝트 구조(Canonical Project Structure)프로그래밍/c++ 2020. 8. 28. 12:57
OpenStd, Canonical Project Structure를 참고 함 http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p1204r0.html 헤더와 CPP는 같은 디렉토리에 헤더와 소스는 옆에 있음 Header and source files (or module interface and implementation files) are next to each other (no include/ and src/ split). 의외라고 생각한 부분. 헤더는 include/ 소스는 src/ 로 나누는 방식을 권할 줄 알았음. 프로젝트의 소스 코드는 프로젝트와 동일한 이름의 디렉토리 아래에 배치 name/ ├─ name/ │ ├─ foo.hpp │ ├─ foo..
-
c++ namespace 로 감싸진 클래스, 구조체 전방 선언프로그래밍/c++ 2020. 8. 26. 02:51
// Foo.h // // namespace 를 먼저 선언 여기선 예제를 위해 AnyNamespace로 함. namespace AnyNamespace { class AnyClass; } // 여러 뎁스의 경우(since C++17) namespace AnyNamespace::Depth1::Depth2 { class AnyClass2; } class Foo { public: void HandleAnyClass_0_mutable(class AnyNamespace::AnyClass&); void HandleAnyClass_0_const(const class AnyNamespace::AnyClass&); // 또는 class를 붙여서... void HandleAnyClass_1_mutable(AnyNamespa..
-
Json의 NewLine은 \n프로그래밍/의문 2020. 8. 15. 01:17
Json의 NewLine은 \r\n인가 \n인가 궁금해서 찾아봄. 결론은 \n 3. Line Separator is '\n' This means '\r\n' is also supported because trailing white space is ignored when parsing JSON values. The last character in the file may be a line separator, and it will be treated the same as if there was no line separator present.
-
왜 MTU 사이즈는 1500 bytes 인가?프로그래밍/의문 2020. 8. 5. 10:59
https://community.cisco.com/t5/other-network-architecture/why-the-mtu-size-is-1500/td-p/105418 Why the MTU size is 1500 ? Can somebody explain that why the Ethernet Maximum Transmission Unit was chosen to be 1500 bytes (why exactly 1500) ? It might have some historical reason. Thanks, Nadeem community.cisco.com 1. The standard set by IEEE802.3 specifies the MTU of Ethernet is 1500 bytes. 2. Ther..
-
boost::asio::buffer_cast는 deperecated프로그래밍/c++ - boost::asio 2020. 7. 31. 16:18
https://www.boost.org/doc/libs/1_73_0/doc/html/boost_asio/reference/buffer_cast.html buffer_cast - 1.73.0 (Deprecated: Use the data() member function.) The boost::asio::buffer_cast function is used to obtain a pointer to the underlying memory region associated with a buffer. Cast a non-modifiable buffer to a specified pointer to POD type. template< typename Po www.boost.org 확인 결과 boost 1.66.0 부터..
-
비교문 최적화에 도움 되는 개념. 드 모르간 법칙(De Morgan's laws)프로그래밍/기록, 개념, 용어 2020. 7. 3. 12:39
드 모르간 법칙(De Morgan's law) https://ko.wikipedia.org/wiki/%EB%93%9C_%EB%AA%A8%EB%A5%B4%EA%B0%84%EC%9D%98_%EB%B2%95%EC%B9%99 드 모르간의 법칙 - 위키백과, 우리 모두의 백과사전 위키백과, 우리 모두의 백과사전. 드 모르간의 법칙(영어: De Morgan's laws)은 수리 논리학이나 집합론에서 논리곱(집합의 공통 부분), 논리합(집합의 모든 부분), 부정(여집합) 연산간의 관계(드 모�� ko.wikipedia.org 비교문에도 드 모르간 법칙을 적용할 수 있으며 and, or, not 이 복잡하게 되어있는 것들이 있다면 드 모르간 법칙을 활용해 확 줄일 수도 있다. (A∪B)` = A`∩B` (A∩B)` =..
-
비교문에서 상수를 왼쪽에 써야 하는 사람들의 주장프로그래밍/의문 2020. 6. 14. 22:19
int a = 0; if (a = 10) { /// 항상 true } if (10 = a) { /// 상수에 a를 대입? 컴파일러가 오류를 띄움. } ==를 이용한 비교 시 == 중 =를 실수로 뺄 경우 발생하는 이슈를 방지할 수 있기 때문에. 개인적인 기호로는 a == 10이 더 좋음. 각각 a equals 10, 10 equals a 인데, 전자가 더 자연스럽다고 느끼기 때문에. for문에서 ++i, i++ 만큼 더이상 의미 없는 주장 아닐까 하는 생각을 함. "우리 프로젝트의 컨벤션이니까"라고 말하는 게 더 공감하기 좋다고 생각 한다.