728x90
반응형

1. 모바일 기기를 위한 기본 다지기, 뷰포트

뷰포트란 스마트폰 화면에서 실제 내용이 표시되는 영역입니다.

 

<meta name="viewport" content="<속성1=값>, <속성2=값2>, ... ">

content 안에서 사용하는 뷰포트 속성은 다음과 같습니다.

속성 설명 사용 가능한 값 기본값
width 뷰포트 너비 device-width 또는 크기 브라우저 기본값
height 뷰포트 높이 device-height 또는 크기 브라우저 기본값
user-scalable 확대/축소 가능여부 yes or no yes
initial-scalable 초기 확대/축소 값 1-10 1
minimum-scale 최소 확대/축소 값 0-10 0.25
maximum-scale 최대 확대/축소 값 0-10 1.6

 

2. 크롬의 디바이스 모드 활용하기

크롬에서 ctrl + shift + I 키를 눌러 개발자 도구 창을 엽니다.

개발자 도구 창의 맨 왼쪽 윗부분에 디바이스 모드 아이콘을 클릭합니다.

728x90
반응형
728x90
반응형

Microsoft wants smart people. Geeks. People who are passionate about technology. You probably won't be tested on the ins and outs of C++ APIs, but you will be expected to write code on the board.

 

In a typical interview, you'll show up at Microsoft at some time in the morning and fill out initial paper work.

You will have a short interview with a recruiter who will give you a sample question.

Your recruiter is usually there to prep you, not to grill you on technical quesiotns.

If you get asked some basic technical questions, it may be because your recruiter wants to ease you into the interview so that you're less nervous when the real interview starts.

 

Definitely Prepare:

"Why do you want to work for Microsoft?"

 

In this question, Microsofts want to see that you're passionate about technology.

A great answer might be, "I have been using Microsoft software as long as I can remember, and I am really impressed at how Microsoft manages to create a product that is universally excellent."

728x90
반응형
728x90
반응형

shared_ptr은 make_shared()로 생성한다.

auto shptr = make_shared<Simple>();

C++17부터 shared_ptr도 unique_ptr와 마찬가지로 기존 C 스타일 동적 할당 배열에 대한 포인터를 저장할 수 있다.

C++17이전에는 이렇게 할 수 없었다.

 

shared_ptr도 unique_ptr처럼 get()과 reset() method를 제공한다.

다른점은 reset()을 호출하면 레퍼런스 카운팅 메커니즘에 따라 마지막 shared_ptr가 제거되거나 리셋될 때 리소스가 해제된다. 현재 동일한 리소스를 공유하는 shared_ptr의 개수는 use_count()로 알아낼 수 있다.

728x90
반응형
728x90
반응형

auto ptr = make_unique<Simple>();

 

make_unique()를 지원하지 않는다면,

unique_ptr<Simple> ptr(new Simple());

 

unique_ptr은 단독 소유권을 표현하기 때문에 복사할 수 없다.

std::move() 를 사용하면 하나의 unique_ptr을 다른곳으로 이동할 수 있다.

 

unique_ptr은 기존 C 스타일의 동적 할당 배열을 저장하는데 적합하다.

auto myTest = make_unique<int[]>(10);

하지만, 이보다는 std::array나 std::vector와 같은 표준 라이브러리 컨테이너를 사용하는 것이 바람직하다.

728x90
반응형

+ Recent posts