본문 바로가기

Native

read tiny size text file https://www.facebook.com/photo.php?fbid=960557974006760&set=gm.646358332164663&type=1&theater std::ifstream fp("text.txt"); if (!fp) { return 0; } std::stringstream ss; ss 더보기
sublime text 에서 검색시 폴더 제외, 파일 제외 하기 http://stackoverflow.com/questions/13706965/limit-file-search-scope-in-sublime-text-2 Prefereneces -> Settings (Default) -> // 검색에 제외시킬 확장자 명 "binary_file_patterns": ["*.jpg", "*.jpeg", "*.png", "*.gif", "*.ttf", "*.tga", "*.dds", "*.ico", "*.eot", "*.pdf", "*.swf", "*.jar", "*.zip"], // 검색에 제외시킬 폴더 명 "folder_exclude_patterns": [".svn", ".git", ".hg", "CVS"], 더보기
My Top 10 Sublime Text Plugins http://www.henriquebarroso.com/my-top-10sublime-2-plugins/ 더보기
non-local variable uses anonymous type warning in C++ http://stackoverflow.com/questions/16383099/non-local-variable-uses-anonymous-type-warning-in-c extern "C" { #include "headername.h" } 더보기
libevent with visual studio 2008 Use the Visual Studio Command Prompt, then cd \where\you\put\it nmake -f makefile.nmake 더보기
cpp net lib http://cpp-netlib.github.com/latest/index.html 더보기
push framework http://www.pushframework.com/ 더보기
a fast compressor / decompressor snappy http://code.google.com/p/snappy/ via @xguru 더보기
I64x webkit 소스를 포팅 중 생소한 내용 발견.. [code] String fileName; do { ++seq; fileName = pathByAppendingComponent(dbDir, String::format("%016"PRIx64".db", seq)); } while (fileExists(fileName)); return String::format("%016"PRIx64".db", seq); [/code] PRIx64 는 다음과 같이 define 되어 있었다. [code] #define PRIx64 "llx" [/code] I64x 가 무엇인지 찾아보니 64bit integer를 헥사로 출력하기 위한 것 이라고... 근데 format 에 + 따위는 없는 것이냐?? 더보기
namespace namespace 개념은 알고 있었으나 실제적으로 프로젝트에 사용할일이 그다지 없다보니 개념만 알고 있었는데 이번 webkit 소스를 분석하면서 알게된 사실 하나 일단 이랬다. 3만 번대 webkit 에서는 String 값이 WebCore 내에 존재하고 있었으나 7만번대에서는 WTF 로 namespace가 변경이 되었었다. 실제 코드이용은 WebCore::String 으로 이용한 곳도 있었지만 주로 String 식으로 namespace를 사용하지 않고 사용하고 있었는데 WebCore를 WTF 로 바라보게 하는 방법이 먼가 했더니만 생각보다 간단한 방법 [code] using WTF::String; [/code] 로 하면 String 으로 이용할 수 있었던 것 물론 using namespace WTF; 를.. 더보기