Native 썸네일형 리스트형 base36 encode/decode [code] /** * @file CBase36.h * @author cheol-dong choi * @version 1.0 * @date 2011-02-15 (09:34:12) * @section LICENSE * * Copyright (c) 2003-2011, cheol-dong choi, (http://www.sarangnamu.net) * * Permission is hereby granted, free of charge, to any person * obtaining a copy of this software and associated documentation * files (the "Software"), to deal in the Software without * restriction, inc.. 더보기 Very very useful: eBooks compiled from top StackOverflow topics/answers @smashingmag Very very useful: eBooks compiled from top StackOverflow topics/answers - http://bit.ly/hVci3r Stack Overflow ebooks http://hewgill.com/~greg/stackoverflow/ebooks/ http://www.mobipocket.com/en/downloadsoft/productdetailsreader.asp 더보기 c++0x closure http://vsts2010.tistory.com/80 람다 식 외부에 정의되어 있는 변수를 람다 식 내에서 사용한 후 결과를 그 변수에 그대로 저장하고 싶을 때가 있습니다. 이럴 때 클로져를 사용하면 됩니다. [code] [](파라메터) { 식 } [/code] [code] int main() { vector Moneys; Moneys.push_back( 100 ); Moneys.push_back( 4000 ); Moneys.push_back( 50 ); Moneys.push_back( 7 ); int TotalMoney1 = 0; for_each(Moneys.begin(), Moneys.end(), [&TotalMoney1](int Money) { TotalMoney1 += Money; .. 더보기 c++0x lamda http://vsts2010.tistory.com/75 람다 사용 방법은 아래와 같습니다. [code] [](파라메터) { 식 } [](int x) -> int { return x + 50; } [/code] 아래의 클래스는 test 클래스에 res 가 true 인 것을 찾기 위한 과정에 일부이고 이를 위해서 일반적으로 사용해온 방식과 람다의 에 방식을 비교하기 위해서 생성한 코드 입니다. 핵심적으로 봐야할 부분은 find_it 에서 별도에 struct 를 구성하여 만들었던 부분이 람다구조로 손쉽게 구현되는 걸 볼 수 있습니다. 이러한 방법에 대한 개략적인 소개는 모어 조엘원 소프트웨어 라는 책에 javascript 기반으로 잘 설명되어 있습니다. [code] // 1. Test object 에 refe.. 더보기 c++0x rvalue reference http://vsts2010.tistory.com/59 http://blogs.msdn.com/vcblog/archive/2009/02/03/rvalue-references-c-0x-features-in-vc10-part-2.aspx [code] RValue Reference의 의해 임시 오브젝트를 만들어서 복사하지 않고 포인터의 이동에 의해 프로그램의 성능이 빨라지고 낭비가 없어집니다 [/code] std::move()를 사용할 때 주의할 점 [code] int main() { vector v1; v1.push_back(10); v1.push_back(12); vector v2 = std::move(v1); cout 더보기 c++0x auto auto 1. 변수 정의 때 명시적으로 type을 지정하지 않아도 된다. 2. auto로 정의한 변수는 초기화할 때 type이 결정된다. 3. 컴파일 타임 때 type이 결정된다. 4. 템플릿 프로그래밍에 사용하면 코딩이 간편해지고. 코드 가독성이 좋아진다. 더보기 c++0x http://vsts2010.tistory.com/category/C++0x 더보기 Google URL parsing and canonicalization library http://code.google.com/p/google-url/source/checkout 더보기 me2day - 주로 브라우저가 없는 곳에서 작업을 해야 되는 상태라 다음과 같이 HTTP Authentication: Basic 를 이용해서 접근 하는 방법으로 구현 한다. - me2day 가 xauth를 지원하면 좋겠다만은.. 없는 것 같으니 일단 이걸로 .. - me2day api 사이트 http://dev.naver.com/openapi/apis/me2day/me2api_intro#metwo3 - LOG 는 printf 로 대체 된다. - HTTP 전송은 libcurl 을 이용했다. - md5 는 openssl 을 이용했다. (md5만 오픈되어 있는 것 많으니 굳이 openssl 을 사용하지 않아도 된다.) [code] /** * @file CMe2day.h * @author cheol-dong choi * .. 더보기 unittest++ (TDD) http://unittest-cpp.sourceforge.net/ Getting started Listed below is a minimal C++ program to run a failing test through UnitTest++. 유닛 테스트 실패 예제 [code] // test.cpp #include TEST(FailSpectacularly) { CHECK(false); } int main() { return UnitTest::RunAllTests(); } [/code] UnitTest++.h is a facade header for UnitTest++, so including that should get you all features of the library. All classes and f.. 더보기 이전 1 2 3 4 5 ··· 45 다음