달력

5

« 2024/5 »

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
2010. 1. 27. 21:33

ascii vi 대응표 용-ILE/잡다구리2010. 1. 27. 21:33

ASCII 대응표
10진수 설명 기호
0 NUL [^@]
1 SOH [^A]
2 STX [^B]
3 ETX [^C]
4 EOT [^D]
5 ENQ [^E]
6 ACK [^F]
7 BEL [^G]
8 BS [^H]
11 VT [^K]
12 NP [^L]
13 CR [^M]
14 SO [^N]
15 SI [^O]
16 DLE [^P]
17 DC1 [^Q]
18 DC2 [^R]
19 DC3 [^S]
20 DC4 [^T]
21 NAK [^U]
22 SYN [^V]
23 ETB [^W]
24 SP [^X]
25 EM [^Y]
26 SUB [^Z]
27 ESC [^[]
28 FS [^]
29 GS [^]]
30 RS []
31 US [^_]
127 DEL [^?]

 

:
Posted by mastar

http://suite.tistory.com/  fs 2010 01 

가. 도미노 6.5 버전대에 C++ 로 툴킷이 없는건지 컴파일을 못한건지해서  --;
아마 C++ 로 했다면 일반 DIIOP 방식과 비슷해서 개발은 양호할것으로 생각됨~~~

어찌되었든 C 버전으로  IBM사이트에서 무료로 제공해주는 툴킷(C10QYEN.tar.Z)에있는 샘플로 테스트 해보았다.

일반 필드 출력 , 내용출력(mime,등) ,
첨부파일 다운로드?(로컬에저장)  (<- 이건 툴킷에 샘플이 없어서 중국어느 사이트 참고
                                                참고 중국사이트 : http://topic.csdn.net/t/20040609/10/3076169.html

나. 도미노가 설치된 서버에서  수정한 툴킷 샘플은

/notesapi/samples/misc/nsf_dump

수정 예제 및 Makefile ( solrais gcc version ) :

Makefile

                                                                  

nsf_dump.c

 
                                                             
주요 함수 사용함수는 NSFSearch , NSFItemScan , NSFDbInfoParse , NSFNoteExtractFile ( 파일 다운로드 )  


다. UniversalID  - UNID  가져오기

C sample

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

sprintf(UNID,"%08x%08x%08x%08x",SearchMatch.OriginatorID.File.Innards[1],SearchMatch.OriginatorID.File.Innards[0],
                        SearchMatch.OriginatorID.Note.Innards[1],SearchMatch.OriginatorID.Note.Innards[0]);

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C++ sample
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
DWORD a=unid->File.Innards[0];
   DWORD b=unid->File.Innards[1];
   //printf("aaaa1:%x," , a);
   //printf("aaaa2:%x\n" , b);

   cout.width(8);
   cout.fill('0');
   cout <<  hex <<b ;
   cout.width(8);
   cout.fill('0');
   cout<< hex<<toupper(a);

   a=unid->Note.Innards[0];
   b=unid->Note.Innards[1];
 
   cout <<  hex <<b;
   cout.width(8);
   cout.fill('0');
   cout<< hex<<toupper(a);

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


라.  도미노 연계시에는

DIIOP(JAVA) > C++ API (함수prefix LN*)  > C API (함수prefix NSF*)

좋아보임 (C API로 세그먼트 뽈트 에러나면 도미노 죽어버림 ~.~)

아래 참고 C, C++ 차이 링크 원본 : 
http://lotusdesk.blogspot.com/2009/11/differences-between-lotus-notes-c-api.html


Differences between Lotus Notes C API and C++ API

We always have few options if we need to do with Lotus Notes something externally. Here I'll try to provide a brief comparison chart of Lotus Notes CAPI and CppAPI. I hope this brochure can help to do the right choice before going deep into the water.

 

Lotus Notes CAPI
Lotus Notes CppAPI
Complex code, requires high attention during development because it works with raw memory pointers. So without experience it's very easy to produce memory leaks and access violations.
Simple code, it's very similar to Lotus Script and Java APIs.
Procedural code.
Object oriented code.
Notes uses it internally, so no dependency files required to install.
CppAPI requires lcppnXX.dll, there XX is a version of CppAPI. While this dll has versioning info most functionality is compatible across Lotus Notes versions. So lcppn70.dll is working with Lotus Notes 6.5 and Lotus Notes 8.5.1 Standard.
Can be coded anything so it can work much like it was a built-in feature of Lotus Notes.
There are limitations introduced by CppAPI implementation. It's obvious because CppAPI built on CAPI. In most cases it's the same limitations as in LotusScript or Java API. So if you can't do something in LotusScript and you like to move to a lower level than CppAPI is not your option. A good example of such limitations is a memo with attachment. While it's only few lines of code using CppAPI, this memo doesn't look good in Notes because there is no icon thumbnail, just a gray rectangle. With CAPI there will be 300-400 lines of code to add an attachment and to represent it as an icon inside of memo body. It's complex, but memo will look like the one created in Lotus Notes by a real user.
Strings represented in form of special LN Multibyte string (LMBCS). While in the code it looks like a normal ANSI string of type "char *" it can contain zeros inside and encoded non ANSI symbols. It's very easy to miss a large part of text and break international symbols if you apply standard C functions like strcat or strcpy. I'll write in the next post how to work with Lotus strings in CAPI to preserve international symbols and handle zeros in the middle of the string.
LNString class handles lotus strings just perfect. It has methods for string concatenation, searches, substring extraction, etc. It can return a pointer to the platform one byte character set encoding of the string. However it's still better to convert LMBCS to Unicode if you need to pass it outside of Lotus, and it's missing in CppAPI.

Here is a sample code of the same functionality in Lotus CAPI and CppAPI. The code opens Lotus database.

void CppApiCode()
{
 LNNotesSession session;
 session.Init();
 LNString databasePath = "special\\testdb.nsf";
 LNString serverPath;
 LNDatabase docDB;
 session.GetDatabase(databasePath, &docDB, serverPath);
 // Open the database.
 docDB.Open();
 ...
 docDB.Close();
}

void CApiCode()
{
 STATUS error = NotesInitExtended();
 DBHANDLE hDB = 0;
 char szFileName[] = "special\\testdb.nsf";
 char szServerName[] = "";
 char szDbPath[MAXPATH+1];
 error = OSPathNetConstruct(0, szServerName, szFileName, szDbPath);
 // Open the database.
 error = NSFDbOpen(szDbPath, &hDB);
 ...
 NSFDbClose(hDB);
}



 
:
Posted by mastar

http://suite.tistory.com fs 2010 01

" Begin MIME to CD Conversion / End MIME to CD Conversion "

이런로그 안보고 싶을때

도미노 디렉토리에 notes.ini 아래옵션추가


CONVERTER_LOG_LEVEL=10

출처 링크 : http://documentation.excitor.com/technotes/2408.htm
                http://www-01.ibm.com/support/docview.wss?rs=899&uid=swg21104966

diiop 서버에서 기동 명령어는 > load diiop  ㅋ

국내에서 노츠 자료는 참없군 ~.~

 

:
Posted by mastar

suite.tistory.com fs 2010 01

검색엔진  수집기 만드는중  Notes공부해보니  참 운영하기에는 좋은 개발툴이자 DB 이자 웹서버 인거같다.
다만 검색엔진하고는 연계를 하지말라고 만든것 같기도하고   ~.~

암튼 좋은 링크가있어 올림

원문 URL : http://georgelanglais.blogspot.com/2008/12/notes-domino-backend-api-architecture.html

[BackendArchitecture1.bmp]
                             <착하신 분 잘 만들었음>

결론:  DIIOP는 Domino나 Notes 가 없어도 되지만
          C/C++ 라인은 반드시 Notes나 Domino 가 설치된 서버에서 가능    


참고로 C++ API 샘플도 
원문 링크 : http://www.notes411.com/dominosource/tips.nsf/0/5013A6AF2B2E5F5C802571B8007F4B67!opendocument


샘플 파일 :             


샘플 테스트 결과 클라이언트(Notes)설치된 상태에서 잘됨

:
Posted by mastar

http://suite.tistory.com 2009 12 fs

같은 대역대 있는 윈도우 컴터 공유

사용자 삽입 이미지



이런류에대한 해결방법이 검색해도 잘안보이길래 작성함~~

1. 445번 포트 방화벽 해제 

   대상 ip 192.168.1.2  
  시작->실행 : 
   netsh firewall set portopening TCP 445 ENABLE
   
  출처 : http://www.microsoft.com/korea/technet/prodtechnol/winxppro/maintain/sp2netwk.mspx
 
 포트 확인 :>telnet 193.1.1.2 445  

 2. 이래도 안되면 윈도우에 설치된 방화벽확인

    시작->실행 : wscui.cpl

사용자 삽입 이미지


   실행후 방화벽에 뭔가 설치되었다면 방화벽 해제~~~

 

:
Posted by mastar


suite.tistory.com 2009 07  fs

뭐~ 기간구하기 가입 총기간 개월 , 년도 같은거 구할때

먼저 시작날짜 하고 종료 날짜를 GregorianCalendar 에 세팅

시작 GregorianCalendar s_cal= new GregorianCalendar(strtYear,strtMonth,startDay);
종료 GregorianCalendar e_cal= new GregorianCalendar(endYear,endMonth+1,endDay);


다음 밀리세컨드로 빼서 계산

 Long mdiff=( e_cal.getTimeInMillis() - s_cal.getTimeInMillis() ) / 60000 / 60 / 24 ;

System.out.println("경과월 : " + mdiff);
System.out.println("경과년 : " + mdiff / 365 );

이상 끝~~


 

:
Posted by mastar


http://suite.tistory.com 2009 05 fs

os: sun-os 5.10

로컬에서 작업할때는 서버에 임시로 relay 설정

1. sendmail.cf 에서
 
기존 :

# SMTP daemon options
O DaemonPortOptions=Name=MTA-v4, Family=inet
O DaemonPortOptions=Name=MTA-v6, Family=inet6
O DaemonPortOptions=Port=587, Name=MSA, M=E
O DaemonPortOptions=Port=smtp,Addr=0.0.0.0, Name=MTA

수정 :

#O DaemonPortOptions=Name=MTA-v4, Family=inet
#O DaemonPortOptions=Name=MTA-v6, Family=inet6
#O DaemonPortOptions=Port=587, Name=MSA, M=E
O DaemonPortOptions=Port=smtp,Addr=0.0.0.0, Name=MTA

2. vi /etc/mail/access

193.1.1.74      RELAY 

#193.1.1.74번 ip에서 오는요청은 타 메일 서버로 보내준다는의미

#>cd /etc/mail; makemap hash access <access
  -> access.db 생성

3. sendmail 재실행
#>cd /etc/init.d/ ; ./sendmail restart


4.테스트 
ip:
193.1.1.74 에서 
윈도우 + r : cmd 실행 

mail from :fs@fs.com
rcpt to : fs@nate.com
data
ㅋㅋㅋㅋㅋ
zzz
.




참고 솔라리스 dns resolv.conf 적용 안될때 (nameserver)
 
#> vi nsswitch.conf 수정

# server lookup.  See resolv.conf(4).
기존
#hosts:      files
수정 #hosts:      files dns


 
 

 

:
Posted by mastar

http://suite.tistory.com/ fs 2009 05

1. gcc 설치 4.* 버전을 bff 로 smitty로 설치는 잘안되서 rpm 으로 

    $> rpm -Uvh gcc-3.3.2-5.aix5.3.ppc.rpm  <- 당연 루트로
     설치된 위치는 : /usr/opt/freeware/lib/gcc-lib/powerpc-ibm-aix5.3.0.0

            

gcc-3.3.2-5.aix5.3.ppc.rpm


     rpm 4.* 버전도 잘안되서 3.* 대 버전설치

2. ld: 0706-006 라이브러리 파일 -l fs을(를) 찾거나 열 수 없습니다.
        ld:open(): 경로 이름에 있는 파일이나 디렉토리가 존재하지 않습니다.

에러 해결은 라이브러리 패스 -L 위치에 있는 so -> a 로 변경해서 컴파일 해결~  ~.~;;

=> 아마도 gcc 4.* 대 버전을 설치하면 2번과 같은 에러는 나지 않을것같기도 하고??? 여기까지~
 

     

 

:
Posted by mastar

http://suite.tistory.com/ 2009 03 fs

리눅스 <-> 윈도우 데이터 공유를
ftp로 하니 넘 불편해서 웹하드를 알아봤다~~
삼바는 일단 탈락~~ 여러가지 이유~~

찾은건 WEBDAV http://webdav.org

웹하드 서버를 리눅스에서는 아파치로 하면되고~
윈도우는 해보지않았지만 서버구성어쩌고 클릭클릭하면 되는것같다!

여기서는 아파치한거만 작성 ~ 루트아닌 일반사용자 계정으로~~~

1. 아파치 dav 모듈은 아파치 2.0 이상이면 기본으로 설치가 되어있다~

   확인 httpd.conf 에서 LoadModule dav_module modules/mod_dav.so  있음된다

2. httpd.conf 작성

  # dav 락파일이름 지정 디렉토리없음 만들어줘야함
  DAVLockDB "/lockdir/DAVLockDB"
  #웹하드 디렉토리 지정~
  <Directory /apache2/webhard>
  DAV On
  AuthName "WebDAV Login"
  AuthType Basic
  # 최소한은 보안 계정과 암호 ~~ webdav가 검색해보니 보안상문제는 많은걸로 보임~
  AuthUserFile /apache2/.htpasswd_fs
  #<LimitExcept GET HEAD OPTIONS>
    require valid-user
  #</LimitExcept>
  Order allow,deny
  Allow from all
 # 파일이 브라우저에서 보이게
 # Options Indexes FollowSymLinks

</Directory> 

3. 암호 파일 생성
   htpasswd  -m -c /apache2/.htpasswd_fs fs

4. 공유 디렉토리 생성및 쓰기 권한
    mkdir -p /apache2/webhard
    chmod 755  /apache2/webhard

5. apachectl restart 아파치 재시작

이렇게 하면 서버 설정 완료~~~

다음 윈도우(비스타)에서 서버 등록은 그림으로

1. 내컴퓨터에서 마우스오른쪽 클릭



2. 클릭클릭~



3. 웹서버 등록 : 위에서 지정한 계정과 암호 입력후 클릭 클릭~~~




끝~~


역시~ 없으면 만들까 생각했는데-.-; 착하신분들이 이미 이런 공유프로그램을 만들어 두었다~~~


 

:
Posted by mastar


http://suite.tistory.com/ 2009 02 fs

global temporary TABLE


//테이블 먼저 생성
create global temporary TABLE DEPT_TMP2
( cst_no CHAR(10) ,
  ang_data VARCHAR2(100) ,
  name VARCHAR2(50)
  )ON COMMIT preserve rows;


AS SELECT  a.cst_no ,  a.agent ||'_'|| a.cst_type ||'_'|| a.cst_grade as ang_data  , b.name from tbl__ang_agent a, wjcom.wc_bp_sap_agent b where a.agent = b.agent
SELECT


//인덱싱
create   INDEX  idxcst_no222 ON  DEPT_TMP2 (cst_no)

//삽입
INSERT into  DEPT_TMP2  ( cst_no,ang_data,name )
SELECT a.cst_no ,  a.agent ||'_'|| a.cst_type ||'_'|| a.cst_grade as ang_data  , b.name from tbl__ang_agent a, wjcom.wc_bp_sap_agent b where a.agent = b.agent


// 생성과 동시에
create global temporary TABLE dept_tmp2

ON COMMIT preserve rows
AS SELECT  a.cst_no ,  a.agent ||'_'|| a.cst_type ||'_'|| a.cst_grade as ang_data  , b.name from tbl__ang_agent a, wjcom.wc_bp_sap_agent b where a.agent = b.agent

drop TABLE DEPT_TMP2
TRUNCATE TABLE DEPT_TMP2

COMMIT


SELECT * FROM dept_tmp2 WHERE cst_no='0000000377'
wjcom.wc_bp_sap_agent 

CREATE INDEX WJTH.IDX_TBL_ERP_cst_X1
ON WJTH.TBL_ERP_cst (REG_NO)
insert into gtt1
select level
from dual
connect by level <= 1101
;

그냥 연습~~~~~ 쓸모가 있을려나 ...

:
Posted by mastar