개소리 왈왈2009. 6. 15. 19:31
답 : 네! 그렇습니다!


요즘 기자는 워드써서 한글 맞춤법 검사도 안하나 수준도 아니고
무슨 이렇게 대박 오타를 내!!


한편 1위는 김윤석 주연의 ‘거북이 달린다’가 43만 7838명(누적관객 50만 8007명), 2위는 39만 5528명(누적관객 148만 9314명)을 모은 ‘박물관이 살아있다2’가 3위는 22만 9157명(누적관객 412만 7575명)을 동원한 ‘터미넹터:미래전쟁의 시작’(터미네이터4)이 차지했다.


오타는 어디에 +_+!

[링크 : http://tv.media.daum.net/news/general/200906/15/newsen/v8930129.html]
Posted by 구차니
Download the Code 39 truetype font package.
다운로드는 위에 링크를 클릭해주세요

Tips for Using the Barcode Font

  • Be sure to add an asterisk * character before and after your text. Example *YOURTEXTHERE*
  • Microsoft Word may adjust the character spacing and make the barcode unreadable. You may have more luck with Wordpad, found in the Windows Start Menu under Programs > Accessories.


폰트를 다운로드 받으면 두개가 나오는데, Free 3 of 9 Extended알파벳까지 적용된 폰트이다.
위에 빨간색 했듯이, 반드시 문자열 앞뒤로 *를 쳐주어야 한다.

개인적으로 16 사이즈로 출력해서 사용중
(작아 보인다고 32 포인트 했더니 스캐너가 인식 못하는 불상사가 -ㅁ-!)

[링크 : http://www.barcodesinc.com/free-barcode-font/]
Posted by 구차니
Programming/C Win32 MFC2009. 6. 15. 17:25
MFC 다이얼로그에서 폰트를 수정하는 눈에 띄는 방법은
다이얼로그의 Properties를 눌러서 다이얼로그 전체의 폰트를 변경하는 것이다.




RichEditCtrl 사용해도 된다고 하지만, RichEditCtrl은 구동도 번거로운지라 다른 방법을 찾아 보게 되었다.

Step 1. CFont 변수를 Member Variable로 추가한다.(Private 추천)
Step 2. Class Wizard에서 컨트롤 변수를 선언해준다.
class CPrjNameDlg : public CDialog
{
// Construction
public:
    CFont m_fedit;

// Dialog Data
    //{{AFX_DATA(CBarcodeDlg)
    enum { IDD = IDD_DIALOG_ID };
    CEdit    m_edit;
}

Step 3. OnInitDialog() 에서 Cfont 변수를 CreateFont로 생성한다.
m_fedit.CreateFont(52, 0, 0, 0, FW_BOLD, FALSE, FALSE, 0, DEFAULT_CHARSET,
        OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, DEFAULT_PITCH | FF_SWISS,
        "Courier New");
처음의 52는 폰트 크기, FW_BOLD는 폰트 특성(현재 굵게-Bold), 마지막의 "Courier New"는 변경할 폰트 이름이다.

Step 4. Cfont 변수를 원하는 컨트롤에 SetFont 메소드를 이용하여 설정한다.
m_edit.SetFont(&m_fedit);

주의 할 사항은, 지역 변수로 사용하면 CFont 내용이 사라지므로 커서만 커진 채 글씨가 커지지는 않는다.
[링크 : http://www.tipssoft.com/bulletin/board.php?bo_table=FAQ&wr_id=299]


참고 사항으로
한글폰트는 "~체" 라는 것들은 고정폭 폰트이다.
영문폰트는 Courier / Courier New / Lucida Console / Fixedsys 정도?

[링크 : http://www.lowing.org/fonts/]


Posted by 구차니
Programming/C Win32 MFC2009. 6. 15. 17:06

Ctrl-W 를 눌러,
클래스 위저드에서 다이얼로그 Object를 선택
Messages 에서 PreTranslateMessage를 선택하여
Add Function / Edit Code 를 한 뒤 아래의 코드를 넣어준다.


BOOL ClassName::PreTranslateMessage(MSG* pMsg)
{
     // TODO: Add your specialized code here and/or call the base class
     if(pMsg->wParam == VK_RETURN || pMsg->wParam == VK_ESCAPE)
          return TRUE;
          
     return CDialog::PreTranslateMessage(pMsg);
}

[링크 : http://lafirr.tistory.com/20]
Posted by 구차니
Posted by 구차니
Programming/C Win32 MFC2009. 6. 15. 10:21
PreTranslateMessage() 를 추가 후에

if(pMsg->wParam == VK_RETURN || pMsg->wParam == VK_ESCAPE) return TRUE;

를 사용하면 엔터, ESC로 종료되는것을 막을 수 있다.


만약에 Editbox에서 엔터로 입력을 받아들여야 할 경우에는, 위와 같이 하면 인식을 못하게 되므로

CWnd *w;
w = GetFocus();
if (w->GetDlgCtrlID() == IDC_CTRL_ID) ...

이런식으로 특정 포커스에서 인식하도록 연결해주면 될 듯?


[링크 : http://lafirr.tistory.com/20] PreTranslateMessage
[링크 : http://www.dreamy.pe.kr/zbxe/?mid=codeclip&category=5904&document_srl=5958] PreTranslateMessage
[링크 : http://purelab.org/zbxe/?mid=guruin&page=3&document_srl=250] 서브클래싱
Posted by 구차니
개소리 왈왈/자전거2009. 6. 15. 01:44
싸이클이 갑자기 땡겨서 가격을 조사해볼겸
단골 자전거 수리점에 갔떠니..


23만원 부터 해드릴 수 있어요~



OTL 털썩.
MTB로 평지 평균 20km 정도 밟는데, 사이클 탄다고 해서 40km 밟는 것도 아닌데
23만원 들여서 사야 하나? 아니 그 길이 만만찮은데 가능한가?
이런 저런 고민 끝에 일단 내린 결론


"돈 생기면 그 때 지르자 ㅋㅋ"


 

막상 사진으로 해놓으니 핸들이랑 바퀴 차이 밖에 안나네 -ㅁ-
아무튼.. 뱃살이 많은 나로서는 엎드려 타다 시피하는 사이클이 가능할려나? ㅠ.ㅠ

사람들 마다 이야기는 다르지만,
MTB가 경사이용 최대 50km 평지 20km 라고 하는데 비해
사이클은 경사이용하면 60~70km 평지 30~50km 정도라고 하는데..
일단 타보기 전에는 알 수 없는 노릇이고 ㄱ-


  
  

[출처 : www.congnamul.com]

대충 계산해보면 실질적으로 짧아야 20km 인데 경사구간에다가, 길 건너기가 쉽지않아서 고민이 된다.
그래도 6km 정도라면 ㄱ- 약간의 경사 따위는 극복을 해내야지!!!

문제는 자전거 타면 샤워시설이 없는 회사이니
3달에 10만원 정도 들지도 모르는 헬스장도 끊어야 한다는 문제가!!
Posted by 구차니
6. Proposal
-----------

Use a comment after the {tagaddress} field.  The format would be:

    {tagname}<Tab>{tagfile}<Tab>{tagaddress}[;"<Tab>{tagfield}..]

   {tagname}    Any identifier, not containing white space..
   <Tab>    Exactly one TAB character (although many versions of Vi can handle any amount of white space).
   {tagfile}    The name of the file where {tagname} is defined, relative to the current directory
                   (or location of the tags file?).
   {tagaddress}    Any Ex command.  When executed, it behaves like 'magic' was not set.
                         It may be restricted to a line number or a search pattern (Posix).

Optionally:
   ;"        semicolon + doublequote: Ends the tagaddress in way that looks like the start of a comment to Vi.
   {tagfield}    See below.

A tagfield has a name, a colon, and a value: "name:value".
- The name consist only out of alphabetical characters.  Upper and lower case are allowed.
   Lower case is recommended.  Case matters ("kind:" and "Kind: are different tagfields).
- The value may be empty.
  It cannot contain a <Tab>.
  When a value contains a "\t", this stands for a <Tab>.
  When a value contains a "\r", this stands for a <CR>.
  When a value contains a "\n", this stands for a <NL>.
  When a value contains a "\\", this stands for a single '\' character.
  Other use of the backslash character is reserved for future expansion.
  Warning: When a tagfield value holds an MS-DOS file name, the backslashes must be doubled!

Proposed tagfield names:

FIELD-NAME    DESCRIPTION

arity        Number of arguments for a function tag.
class        Name of the class for which this tag is a member or method.
enum        Name of the enumeration in which this tag is an enumerator.
file        Static (local) tag, with a scope of the specified file.  When the value is empty, {tagfile} is used.
function    Function in which this tag is defined.  Useful for local variables (and functions).
               When functions nest (e.g., in Pascal), the function names are concatenated, separated with
                '/', so it looks like a path.
kind        Kind of tag.  The value depends on the language.  For C and
        C++ these kinds are recommended:
        c    class name
        d    define (from #define XXX)
        e    enumerator
        f    function or method name
        F    File name
        g    enumeration name
        m    member (of structure or class data)
        p    function prototype
        s    structure name
        t    typedef
        u    union name
        v    variable
        When this field is omitted, the kind of tag is undefined.
struct        Name of the struct in which this tag is a member.
union        Name of the union in which this tag is a member.

Note that these are mostly for C and C++.  When tags programs are written for
other languages, this list should be extended to include the used field names.
This will help users to be independent of the tags program used.

Examples:

    asdf    sub.cc    /^asdf()$/;"    new_field:some\svalue    file:
    foo_t    sub.h    /^typedef foo_t$/;"    kind:t
    func3    sub.p    /^func3()$/;"    function:/func1/func2    file:
    getflag    sub.c    /^getflag(arg)$/;"    kind:f    file:
    inc    sub.cc    /^inc()$/;"    file: class:PipeBuf


The name of the "kind:" field can be omitted.  This is to reduce the size of
the tags file by about 15%.  A program reading the tags file can recognize the
"kind:" field by the missing ':'.  Examples:

    foo_t    sub.h    /^typedef foo_t$/;"    t
    getflag    sub.c    /^getflag(arg)$/;"    f    file:


Additional remarks:
- When a tagfield appears twice in a tag line, only the last one is used.

Note about line separators:

Vi traditionally runs on Unix systems, where the line separator is a single
linefeed character <NL>.  On MS-DOS and compatible systems <CR><NL> is the
standard line separator.  To increase portability, this line separator is also
supported.

On the Macintosh a single <CR> is used for line separator.  Supporting this on
Unix systems causes problems, because most fgets() implementation don't see
the <CR> as a line separator.  Therefore the support for a <CR> as line
separator is limited to the Macintosh.

Summary:
line separator    generated on        accepted on
<LF>        Unix            Unix, MS-DOS, Macintosh
<CR>        Macintosh        Macintosh
<CR><LF>    MS-DOS            Unix, MS-DOS, Macintosh

The characters <CR> and <LF> cannot be used inside a tag line.  This is not
mentioned elsewhere (because it's obvious).

Note about white space:

Vi allowed any white space to separate the tagname from the tagfile, and the
filename from the tagaddress.  This would need to be allowed for backwards
compatibility.  However, all known programs that generate tags use a single
<Tab> to separate fields.

There is a problem for using file names with embedded white space in the
tagfile field.  To work around this, the same special characters could be used
as in the new fields, for example "\s".  But, unfortunately, in MS-DOS the
backslash character is used to separate file names.  The file name
"c:\vim\sap" contains "\s", but this is not a <Space>.  The number of
backslashes could be doubled, but that will add a lot of characters, and make
parsing the tags file slower and clumsy.

To avoid these problems, we will only allow a <Tab> to separate fields, and
not support a file name or tagname that contains a <Tab> character.  This
means that we are not 100% Vi compatible.  However, there is no known tags
program that uses something else than a <Tab> to separate the fields.  Only
when a user typed the tags file himself, or made his own program to generate a
tags file, we could run into problems.  To solve this, the tags file should be
filtered, to replace the arbitrary white space with a single <Tab>.  This Vi
command can be used:

    :%s/^\([^ ^I]*\)[ ^I]*\([^ ^I]*\)[ ^I]*/\1^I\2^I/

(replace ^I with a real <Tab>).

TAG FILE INFORMATION:

Psuedo-tag lines can be used to encode information into the tag file regarding
details about its content (e.g. have the tags been sorted?, are the optional
tagfields present?), and regarding the program used to generate the tag file.
This information can be used both to optimize use of the tag file (e.g.
enable/disable binary searching) and provide general information (what version
of the generator was used).

The names of the tags used in these lines may be suitably chosen to ensure
that when sorted, they will always be located near the first lines of the tag
file.  The use of "!_TAG_" is recommended.  Note that a rare tag like "!"
can sort to before these lines.  The program reading the tags file should be
smart enough to skip over these tags.

The lines described below have been chosen to convey a select set of
information.

Tag lines providing information about the content of the tag file:

!_TAG_FILE_FORMAT    {version-number}    /optional comment/
!_TAG_FILE_SORTED    {0|1}            /0=unsorted, 1=sorted/

The {version-number} used in the tag file format line reserves the value of
"1" for tag files complying with the original UNIX vi/ctags format, and
reserves the value "2" for tag files complying with this proposal. This value
may be used to determine if the extended features described in this proposal
are present.

Tag lines providing information about the program used to generate the tag
file, and provided solely for documentation purposes:

!_TAG_PROGRAM_AUTHOR    {author-name}    /{email-address}/
!_TAG_PROGRAM_NAME    {program-name}    /optional comment/
!_TAG_PROGRAM_URL    {URL}    /optional comment/
!_TAG_PROGRAM_VERSION    {version-id}    /optional comment/

[링크 : http://ctags.sourceforge.net/FORMAT]



별다른 옵션을 주지 않고
 ctags [filename]
으로 실행하면 tags 라는 파일이 생성됨

$more test.c
#include <stdio.h>
#define VERSION 1.00

typedef struct _point_
{
    int x;
    int y;
} POINT;

void main()
{
    int a;
    char str[] = "Hello world";
    POINT pt;
   
    printf("%s\n",str);
}

$ more tags
!_TAG_FILE_FORMAT    2    /extended format; --format=1 will not append ;" to lines/
!_TAG_FILE_SORTED    1    /0=unsorted, 1=sorted, 2=foldcase/
!_TAG_PROGRAM_AUTHOR    Darren Hiebert    /dhiebert@users.sourceforge.net/
!_TAG_PROGRAM_NAME    Exuberant Ctags    //
!_TAG_PROGRAM_URL    http://ctags.sourceforge.net    /official site/
!_TAG_PROGRAM_VERSION    5.4    //
POINT    test.c    /^} POINT;$/;"    t    file:
VERSION    test.c    2;"    d    file:
_point_    test.c    /^typedef struct _point_$/;"    s    file:
main    test.c    /^void main()$/;"    f
x    test.c    /^    int x;$/;"    m    struct:_point_    file:
y    test.c    /^   
int y;$/;"    m    struct:_point_    file:

{tagname}<Tab>{tagfile}<Tab>{tagaddress}[;"<Tab>{tagfield}..] 가 기본 포맷인데
POINT    test.c    /^} POINT;$/;"    t    file: 를 보면

tagname - POINT
tagfile - test.c
tagaddress - /^} POINT;$/
tagfield - t
tagfield - file:

라는 의미를 지니게 된다. 아래의 POINT 구조체의 x, y 변수는 m(member)로 표기된다.

'프로그램 사용 > ctags & cscope' 카테고리의 다른 글

ctags 제약사항  (0) 2011.10.28
kscope 에서 특정 확장자 추가하기  (0) 2009.11.04
kscope 프로젝트 생성하기  (0) 2009.08.20
ctags  (0) 2009.01.07
Posted by 구차니
하드웨어2009. 6. 14. 00:42
이번에 디바이스 마트에 이벤트로 풀린건지 모르겠지만 8500원/1개 (VAT 별도로) 올라왔다.

48Pin LCC / 400Kbps I2C / 렌즈 별도(요게 압박)

[링크 : http://www.devicemart.co.kr/mart7/mall.php?cat=001007004&query=view&no=9589#]
Posted by 구차니
누구를 위한 검찰인지 모르겠다.

참고인이 누구누구인지도 알 수 없이 봉인해서 역사의 뒤안길로 숨기는 것이
수사기록으로 남겨 보존하겠다는 걸까?

검찰역시, 이러한 행동이 많은 사람들의 의문을 생기게 하는 것을 알고 있음에도
이러한 바보짓을 할 수 밖에 없는건 어떠한 꼬리를 잡혔기 때문일까?

아니면, 이러한 것에 의문을 가지지 않을 정도로 국민들이 바보라고 생각하는 걸까?


[링크 : http://www.ithedaily.com/news/articleView.html?idxno=38596]
Posted by 구차니