C++ 파일 한줄씩 읽기

 왜 자꾸 기억이 안날까 ==;;


 ifstream infile;
 std::strig buff;

 while( getline(infile, buff) )
 {



  }

 
by 요다 | 2006/12/04 16:02 | Jedi's Move | 트랙백 | 덧글(0)
WinXP + asp + 보안문제 해결

 dll로 컴포넌트를 웹에 등록시키고,
 웹브라우저에서 읽어들일때

 server.createobject 가 보안때문에 실패했다고 나오는 에러에 대해서
 대처 방법.



 이건 결국, IIS 5.1 로 넘어오면서, 보안이 좀더 엄격해졌기 때문이다.

 이걸 해결하는 방법은, asp 가 들어있는 폴더를 아무곳에나 놔두고

 관리도구-> 인터넷정보서비스(IIS) 로 들어가서

 기본웹사이트 밑쪽에

  새로만들기 -> 가상디렉토리

 를 만든다음 그것을 아까전의 그 폴더에 연결시켜준다.
 이제, web에서 가상디렉토리를 연결하면 여기에 연결된다.

 이제, 이것을 접속하려면, 그 폴더에 대해서,
 속성탭을 누르고, 나머지는 놔둔 상태에서, 응용프로그램 보호 텝을 '높음'으로 격리시킨다음

 디렉터리 보안 탭을 누르면, 익명 엑세스 및 인증제어 탭이 보인다.

 여기서 편집을 누르고, '익명엑세스'를 없앤다음

 windows 통합 인증을 선택해주면

 이제부터 localhost 에서 해당사이트를 접속해서 보여줄수 있다.




 
by 요다 | 2006/10/23 17:19 | Jedi's Move | 트랙백 | 덧글(0)
논문 문구
------------------------------------------------------------
       기존 논문에서 사용되던, 좋은 문구를 모아봅시다.                 
------------------------------------------------------------
 

by 요다 | 2006/10/18 13:50 | Jedi's Move | 트랙백 | 덧글(2)
Linux shared 메모리 사용방법
생각외로 쉽다.

a.c 와 b.c 를 만들어서 테스트 해보았다.

=========================================
a.c
=========================================
#include <stdio.h>
#include <sys/types.h>
#include <sys/ipc.h>
#include <sys/shm.h>
#define SEGSIZE 100
static key_t shared_key;
static char shared_str[100];
main(int argc, char *argv[])
{
       shared_key = 7777777;
       int   shmid, cntr;
       char  *segptr;
       /* Open the shared memory segment - create if necessary */
       if((shmid = shmget(shared_key, SEGSIZE, IPC_CREAT|IPC_EXCL|0666)) == -1)
       {
               printf("Shared memory segment exists - opening as client ");
               /* Segment probably already exists - try as a client */
               if((shmid = shmget(shared_key, SEGSIZE, 0)) == -1)
               {
                       perror("shmget");
                       exit(1);
               }
       }
       else
       {
               printf("Creating new shared memory segment ");
               printf("Key value is : %d ", shared_key);
       }
       /* Attach (map) the shared memory segment into the current process */
       if((segptr = shmat(shmid, 0, 0)) == -1)
       {
               perror("shmat");
               exit(1);
       }
       ////////////////////////
       // 정보를 저장한다.

       // writing the data into the shared memory
       // time/filename/..
       // ex) "<0103/01.mp3/01.mp3*02.mp3*03.mp3>"
       strcpy(shared_str,"<0103/01.mp3/01.mp3*02.mp3*03.mp3>");
       strcpy(segptr, shared_str);
}


======================================================================================
b.c
======================================================================================
#include <stdio.h>
#include <sys/types.h>
#include <sys/ipc.h>
#include <sys/shm.h>
#define SEGSIZE 100
static key_t shared_key;
static char shared_str[100];
main(int argc, char *argv[])
{
       shared_key = 7777777;
       int   shmid, cntr;
       char  *segptr;
       /* Open the shared memory segment - create if necessary */
       if((shmid = shmget(shared_key, SEGSIZE, IPC_CREAT|IPC_EXCL|0666)) == -1)
       {
               printf("Shared memory segment exists - opening as client ");
               /* Segment probably already exists - try as a client */
               if((shmid = shmget(shared_key, SEGSIZE, 0)) == -1)
               {
                       perror("shmget");
                       exit(1);
               }
       }
       else
       {
               printf("Creating new shared memory segment ");
               printf("Key value is : %d ", shared_key);
       }
       /* Attach (map) the shared memory segment into the current process */
       if((segptr = shmat(shmid, 0, 0)) == -1)
       {
               perror("shmat");
               exit(1);
       }
       ////////////////////////
       // 정보를 읽어온다.

       printf("%s ",segptr);
}

by 요다 | 2006/05/01 20:13 | Jedi's Move | 트랙백 | 덧글(0)
Come back
 
호주에 다녀왔음.

학회도 좋았고,, 머니 머니 해도 시드니가 정말 좋더군

돈 많이 벌면 좋은 이유에 대해서 다른 어떤 이유보다

시드니가 설득력이 있었음.


아.. 여튼 매우 좋았음 ㅠ.ㅠ
by 요다 | 2006/02/05 16:24 | My Life is | 트랙백 | 덧글(0)
행복의 증가
 
인류의 진화의 최종목적이 '행복한 세상' 이라면...

이 세상은 나름대로 진화의 길을 걷고 있는 듯 하다.


난 배고픔의 세대가 아니라서,
배고픔의 해소같은 물리적은 행복의 증진은 잘 모르겠으나...

더 정제된 것,
더 아름다운 것,
더 폭넓은 가치관등을

더 빨리, 더 많이, 더 손쉽게 얻고 접할 수 있는 기회가 넓어져간다는 점에서
분명 인류는 진화하고 있다고 생각한다.

어제 오늘만해도...
버스에서 우연히 들었던 임정희의 '눈물이 안났어'를 바로 검색해서 쥬크온으로 무한으로 들을 수 있었고,
위풍당당 행진곡의 모든 악절을 모두 구해서 맘껏 들을 수 있었다.

5~6년 전이라면 상상도 할 수 없었던 일이다.




by 요다 | 2006/01/10 20:44 | The World is | 트랙백 | 덧글(0)
stlsplit
vector<string> stlsplit(string& text, string separators )
{
  int n = text.length();
  int start, stop;
  vector<string> result;
  start = text.find_first_not_of(separators);
  while ((start >= 0) && (start < n)) {
     stop = text.find_first_of(separators, start);
     if ((stop < 0) || (stop > n)) stop = n;
     result.push_back(text.substr(start, stop - start));
     start = text.find_first_not_of(separators, stop+1);
  }
  return result;
}
by 요다 | 2006/01/09 16:02 | Jedi's Move | 트랙백 | 덧글(0)
가슴이...
 
가슴이 너무 아파..

괜히 널 만난걸까?

왼쪽 가슴 한복판이 계속 아파서..

숨을 쉴수가 없네.
by 요다 | 2006/01/09 10:47 | My Life is | 트랙백 | 덧글(0)
봐야될 영화
 
꼭 봐야지 하는데 못본 영화가 꽤 된다.

1. 나의 밀리언 달러 베이비
2. 너는 내운명
3.
by 요다 | 2006/01/04 22:55 | Movie | 트랙백 | 덧글(0)
아무리 많아도 지나치지 않는것..
 
어깨를 쭉 피는 것.
당당하게  걷는 것.
책을 많이 읽는 것.
사람을 많이 만나는 것.
대화를 많이 하는 것.
걸음을 많이 걷는 것.


Let's add
by 요다 | 2006/01/03 15:54 | My Life is | 트랙백(3) | 덧글(0)
<< 이전 페이지 다음 페이지 >>