사이드바 열기

대상 언어

1. PHP

개발 언어

1. Python?

대상 IDE

1. vim?

2. Editplus?

간략설명

1. 주석을 통해 간단한 함수 및 클래스의 레퍼런스 HTML 문서 만들기

간단한 주석 예제

1. 클래스 

/***

 * filename : CommonFunction.class.php

 * type : class

 * name : CommonFunction 

 * description : Common Function Class

 * - html 4.01 strict, html 4.01 transitional, html4.01 frameset

 * - xhtml 1.0 strict, xthml 1.0 transitional, xhtml 1.0  frameset

 * - html 5

 * date : 2012.04.04

 ***/


2. 함수

/***

 * type : function[public,static]

 * name : movedToScritp

 * argument : url[string], title[string], message[string], charset[string], doctype[string]

 * description : 스크립트 이동 함수

 * date : 2012.04.04

 ***/


추가사항 ( 2012년 04월 12일 )

해당 Edit 가 자동으로 주석을 넣을 수 있도록 기능 추가?


Posted by LaLuna
Posted by LaLuna





Posted by LaLuna







Posted by LaLuna




Posted by LaLuna

학교 실습시간

Posted by LaLuna
머리가 굳어서 인가.. 예제가 이따구 밖에 안나오네..

어떻게 쉽게 하려고 해도 똥망진창이 되어가는 코드..
주석도 붙이려다가.. 결국은 안붙이게 되고..




Posted by LaLuna

교수님께서 장장 일주일 전에 내주신 레포트를 내기 하루전에 시작했다.

흠 Scheme 문법이 생소하기도 하고, 내 생각이 폭넓지 못해 두어시간 고생한듯 싶다.

Source Code

Output
Posted by LaLuna
목적 : 수업시간에 분수를 클래스화 하는 실습을 진행하고 있고, 멘토링 모임을 진행하고 있어서 분수 클래스를 만들어 보기로 한다.

목표
1. 산술연산 및 대입연산, 관계연산이 모두 가능하도록 만들기로 한다.

2011년 10월 20일 목요일
헤더파일에 생성자와 파괴자, 연산자 오버로딩을 정의

Rational.h
Rational.cpp

Posted by LaLuna
#include 
#include 
#include 
#include 

#define UINT unsigned int

using namespace std;

typedef struct _Word_info {
    string word;
    int freq;
} Word_info;

bool compareTo(const Word_info& x, const Word_info& y);
string lowcaseString(const string &s);

int main(void)
{
    vector word_vector;
    string word;
    Word_info word_info;

    while( cin >> word ) 
    {
        bool flag= false;
        word = lowcaseString(word);
        if( word_vector.size() == 0)
        {
            word_info.word = word;
            word_info.freq = 1;
            word_vector.push_back(word_info);
            continue;
        }
        for(UINT i = 0; i < word_vector.size(); i++)
        {
            if(word_vector[i].word == word)
            {
                word_vector[i].freq++;
                flag = true;
            }
        }
        if( flag==false) {
            word_info.word = word;
            word_info.freq = 1;
            word_vector.push_back(word_info);
        }
    }
    sort(word_vector.begin(), word_vector.end(), compareTo);

    for(UINT i = 0; i < word_vector.size(); i++)
    {
        cout << word_vector[i].word << ' ' << word_vector[i].freq << endl;
    }
    return 0;
}

string lowcaseString(const string &s)
{
    char* buf = new char[s.size()+1];
    s.copy(buf, s.size());
    for(UINT i = 0; i < s.size(); i++) buf[i] = tolower(buf[i]);
    string word(buf, s.size());
    delete buf;
    return word;
}
bool compareTo(const Word_info& x, const Word_info& y)
{
    return x.word < y.word;
}
Posted by LaLuna
위로

사이드바 열기