본문 바로가기

Programming

(138)
Objective-C의 튜토리얼 번역 Tristan O'Tierney씨가 운영하는 사이트에 한글로 번역된 글이 소개되어져 있네요 영어, 중국어, 한국어를 지원하니 빠르게 Objective-C를 공부하시는 분들께 도움이 될 거 같습니다. http://www.otierney.net/objective-c.html 개요 시작하기 이 튜토리얼 다운로드 환경설정 머리말 hello world 만들기 클래스 만들기 인터페이스: @interface 구현: @implementation 모두 합하기 세부적인 내용들 매개변수를 여러 개 갖는 경우 생성자 접근 권한 클래스 수준 접근성 예외처리 상속, 다형성, 그리고 다른 객체 지향 프로그래밍의 기능들 id 형 상속, 다형성, 그리고 다른 객체 지향 프로그래밍의 기능들 동적 형 카테고리 포징 프로토콜 메모리 관리 ..
NSString 문자열 자르기 NSString에서도 문자열 자르기대한 API를 제공합니다. 해당 문자열을 기준으로 문자열을 자르는 방식입니다. C++의 _tcstok와 비슷하다고 보시면 됩니다. 사용법 NSString *items = @"abc/def/g"; NSArray *arrItem = [items componentsSeparatedByString:@"/"]; /// 0 : abc 1: def 2: g // for (int i = 0; i < arrItem.count; i++) { NSLog(@"%@", [arrItem objectAtIndex:i]); }
iOS SDK 버전 Old versions of iPhone SDK You need Apple developer account to login But Apple has disabled some of the links recently iPhone SDK 2.2.1 Leopard (10.5.4) http://developer.apple.com/iphone/download.action?path=/iphone/iphone_sdk_for_iphone_os_2.2.1__9m2621a__final/iphone_sdk_for_iphone_os_2.2.19m2621afinal.dmg iPhone SDK 3.0 (Xcode 3.1.3) Leopard (10.5.7) http://developer.apple.com/iphone/download..
64bit 구별 방법 개발을 하다보면 32bit와 64bti용으로 제작 해야 될 때가 많죠~ 그럴때 해당 PC가 어떤 플랫폼인지 구별해야할 때가 있는데 그럴때 사용하는 코드입니다. 방법1) 다음과 같이 kernel32에서 64bit인지 프로세스를 얻어내서 사용하는 방법이 있습니다. [DllImport("kernel32.dll")] public static extern bool IsWow64Process(System.IntPtr hProcess, out bool lpSystemInfo); public static bool IsWow64Process1 { get { bool retVal = false; IsWow64Process(System.Diagnostics.Process.GetCurrentProcess().Handle, o..
C# Coding Standards and Best Programming Practices dotnetspider.com에서 C#을 사용할 때 지켜야 할 기본 규칙을 정리한 문서입니다. 출처 : http://www.dotnetspider.com/tutorials/BestPractices.aspx 목차 1. Author 2. License, Copyrights and Disclaimer 3. Revision History 4. Introduction 5. Purpose of coding standards and best practices 6. How to follow the standards across the team 7. Naming Conventions and Standards 8. Indentation and Spacing 9. Good Programming practices 10. Ar..
Trac 업데이트(0.11.5 -> 0.12) 저번주 Trac을 업데이트 한다고 나름 테스트 서버에서 확인 하고 실서버 적용했는데.. 이런 과부하가 걸릴줄이야 알고 보니 업데이트 과정중에 플러그인을 하나 설치 안한 듯 하다. Trac 업데이트 순서 이다. (각각의 플러그인 설명은 다른 사이트 참조) Trac(0.11.5 -> 0.12 업데이트) 1. cd C:\Python25\Lib\Site-Package 2. easy_install Genshi 3. easy_install ElementTree 4. easy_install Babel 5. easy_install --upgrade Trac=0.12 6. Apache 재시작 7. 현재 trac 사이트 업데이트 trac-admin c:\trac\test 위의 순서대로 설치 하니깐 잘 설치가 되었다. 원래..
다중 커멘트라인 입력 받기 MFC 프로그램 하다 보면 커멘드 라인으로 입력을 받아야 할 때가 많이 있다. 방법은 아래와 같다. CString strArglist[MAX_PATH]; int nArgs; int i; szArglist = CommandLineToArgvW(GetCommandLineW(), &nArgs); if( NULL == szArglist ) { AfxMessageBox(_T("CommandLineToArgvW failed")); } else { for( i = 0; i < nArgs; i++ ) AfxMessageBox(strArglist[i]); }
/unsafe 모드 사용 C#에서는 형식 안전성과 보안을 유지하기 위해 기본적으로 포인터 산술 연산을 지원하지 않습니다. 그러나 unsafe 키워드를 사용하면 포인터를 사용할 수 있는 안전하지 않은 컨텍스트를 정의할 수 있습니다. 포인터에 대한 자세한 내용은 포인터 형식 항목을 참조하십시오. 주로 C#에서 C의 포인터를 참조하기 위해서 쓰입니다. 설정 unsafe를 사용하기 위해서는 속성을 변경해야 합니다. 프로젝트에서 [속성]-[빌드] 로 이동하면 중간쯤에 안전하지 않은 코드 허용 이 보인다. 이 곳이 체크 되어 있지 않으면 체크 해줍니다. 사용방법 namespace TestApp { unsafe struct UseUnSafe { int nAddCount; public pATT* nextNode; } } 좀 더 자세한 방법은 ..

반응형