Devlopment/C,C++,Ruby,Python

    RPOC 조건구문

    DB Query 조건구문 : 값 삽입 =: 같은 것. : 같지 않은 것 ( != 와 동일 )

    C언어 문자열 변환 - char형 int형

    Header : stdlib.h or ctype.h 1. char -> int 변환 * Fuctnion : int atoi(const char *str); * 문자일 경우(숫자가 1자리) '0'을 빼는걸로 가능 2. int -> char 변환 * Fuctnion : char * itoa ( int value, char * str, int base ); * 문자일 경우(숫자가 1자리) '0'을 더하는걸로 가능 * Function 2 : int sprintf (const char s, const char * format, ... ); 추가적으로 char szStr[7] = "abcdef"; 라는 변수가 있을 때 szStr + 2를 하면 "cdef"만 출력

    time 관련

    time_t 타입 time.h 정의 typedef long time_t; time()함수의 원형- time_t time(time_t &timer) time_t의 주소를 매개변수로 보내면 그 변수에 1970년 1월 1일 부터 현재까지 경과한 초를 넘겨 줌 void ftime(struct timeb *buf); sys/timeb.h 정의 현재 시간을 구해 timeb구조체에 저장한다. timeb 구조체 struct timeb { long time; short millitm; short timezone; short dslflag; }

    PROC 사용 방법

    # PROC 사용을 위한 선언 EXEC SQL INCLUDE SQLCA # 호스트 변수 선언 방법 1 (.c 파일에서 사용) EXEC SQL BEGIN DECLARE SECTION; /* variable_declarations */ EXEC SQL END DECLARE SECTION; # 호스트 변수 선언 방법 2 (.h파일에서 사용) #ifdef SESC_DECLARE /* variable_declarations */ #endif #호스트 변수 제한사항 -변수 이름은 알파벳과 밑줄로 시작해야 하며 길이는 50자까지 제한-변수 선언과 동시에 값 초기화는 불가능 # 기본구조 1 (select) EXEC SQL BEGIN DECLARE SECTION; 호스트 변수 선언 EXEC SQL END DECLARE ..

    [Ruby on Rails] 라우팅 설정

    루비의 라우팅 설정 config/routes.rb 파일에서 이루어짐 URL과 컨트롤러와의 설정 http://도메인/클래스/메소드/파라미터 클래스 - 해당 컨트롤러 클래스와 매핑 메소드 - 액션 메소드 이름과 매핑 파라미터 - id파라미터로 넘겨줌

    [Ruby on Rails] 레일스의 철학 & 네이밍 규칙

    레일스의 철학 1. DRY - Don't Repeat Yourself 반복적인 코딩 작업은 피하시오. 2. 설정보다는 관례가 더 편리하다. Convention over Configuration 레일스의 네이밍 규칙 클래스 이름 - 카멜 케이스(Camel Case)로 표기 예) PhotoAlbum클래스 - photo_album.rb 파일에서 정의 카멜케이스(Camel Case) 여러 단어를 연결할 때, 뛰어쓰기를 하지 않고 각 단어의 첫 번째 글자를 대문자로 표기하는 방법 대문자와 소문자가 이어진 모습이 마치 낙타의 혹 모양을 띠고 있다고 해서 부르게 됨

    C++ 기본 형태

    // 헤더 선언부 #pragma once #include #include using namespace std; #include #define VAR 10 // 메인 선언부 #include "Main.h" #include 쓰인 헤더 파일 void main() { } // 클래스 선언 #include "Main.h" class classname { public: void PrintVar(int iVertexNum); void Print(); virtual ~classname(); protected: void Initialize(); private: int var; }; // 클래스 메인 #include "클래스 헤더" classname::classname() { // 생성자 } classname::~clas..

    C 기본 형태

    #include int function(int a, int b); int main(){ printf("5 + 3 : %d \n", function(5,3)); return 0; } int function(int a, int b){ return a+b; }

    [Ruby on Rails] 레일스 플러그인

    ruby script/plugin install scaffolding svn://errtheblog.com/svn/plugins/classic_pagination svn://errtheblog.com/svn/plugins/will_paginate svn://errtheblog.com/svn/plugins/classic_pagination

    [Ruby on Rails] 루비 오픈 소스 라이브러리

    http://raa.ruby-lang.org/cat.rhtml?category_major=Library